@@ -1500,6 +1500,12 @@ msgid ""
1500
1500
"found. Empty matches are included in the result unless they touch the "
1501
1501
"beginning of another match."
1502
1502
msgstr ""
1503
+ "Renvoie un :term:`iterator` produisant des :ref:`objets de correspondance "
1504
+ "<match-objects>` pour toutes les correspondances non chevauchantes de "
1505
+ "l'expression rationnelle *pattern* sur la chaîne *string*. *string* est "
1506
+ "analysée de la gauche vers la droite, et les correspondances sont renvoyées "
1507
+ "dans l'ordre où elles sont trouvées. Les correspondances vides sont inclues "
1508
+ "dans le résultat sauf si elles touchent le début d'une autre correspondance."
1503
1509
1504
1510
#: ../Doc/library/re.rst:716
1505
1511
msgid ""
@@ -1512,17 +1518,31 @@ msgid ""
1512
1518
"as ``\\ &`` are left alone. Backreferences, such as ``\\ 6``, are replaced "
1513
1519
"with the substring matched by group 6 in the pattern. For example:"
1514
1520
msgstr ""
1521
+ "Renvoie la chaîne obtenue en remplaçant les occurrences (sans chevauchement) "
1522
+ "les plus à gauche de *pattern* dans *string* par le remplacement *repl*. Si "
1523
+ "le motif n'est pas trouvé, *string* est renvoyée inchangée. *repl* peut "
1524
+ "être une chaîne de caractères ou une fonction ; si c'est une chaîne, toutes "
1525
+ "les séquences d'échappement qu'elle contient sont traduites. Ainsi, ``\\ n`` "
1526
+ "est convertie en un simple saut de ligne, ``\r`` en un retour chariot, et "
1527
+ "ainsi de suite. Les séquences inconnues telles que ``\\ &`` sont laissées "
1528
+ "intactes. Les références arrières, telles que ``\\ 6``, sont remplacées par "
1529
+ "la sous-chaîne correspondant au groupe 6 dans le motif. Par exemple :"
1515
1530
1516
1531
#: ../Doc/library/re.rst:730
1517
1532
msgid ""
1518
1533
"If *repl* is a function, it is called for every non-overlapping occurrence "
1519
1534
"of *pattern*. The function takes a single match object argument, and "
1520
1535
"returns the replacement string. For example:"
1521
1536
msgstr ""
1537
+ "Si *repl* est une fonction, elle est appelée pour chaque occurrence non "
1538
+ "chevauchante de *pattern*. La fonction prend comme argument un objet de "
1539
+ "correspondance, et renvoie la chaîne de remplacement. Par exemple :"
1522
1540
1523
1541
#: ../Doc/library/re.rst:742
1524
1542
msgid "The pattern may be a string or an RE object."
1525
1543
msgstr ""
1544
+ "Le motif peut être une chaîne de caractères ou un objet expression "
1545
+ "rationnelle."
1526
1546
1527
1547
#: ../Doc/library/re.rst:744
1528
1548
msgid ""
@@ -1532,6 +1552,12 @@ msgid ""
1532
1552
"only when not adjacent to a previous match, so ``sub('x*', '-', 'abc')`` "
1533
1553
"returns ``'-a-b-c-'``."
1534
1554
msgstr ""
1555
+ "L'argument optionnel *count* est le nombre maximum d'occurrences du motif à "
1556
+ "remplacer : *count* ne doit pas être un nombre négatif. Si omis ou nul, "
1557
+ "toutes les occurrences seront remplacées. Les correspondances vides avec le "
1558
+ "motif sont remplacées uniquement quand elles ne sont pas adjacentes à une "
1559
+ "précédente correspondance, ainsi ``sub('x*', '-', 'abc')`` renvoie ``'-a-b-"
1560
+ "c-'``."
1535
1561
1536
1562
#: ../Doc/library/re.rst:750
1537
1563
msgid ""
@@ -1545,51 +1571,75 @@ msgid ""
1545
1571
"backreference ``\\ g<0>`` substitutes in the entire substring matched by the "
1546
1572
"RE."
1547
1573
msgstr ""
1574
+ "Dans les arguments *repl* de type *string*, en plus des séquences "
1575
+ "d'échappement et références arrières décrites au-dessus, ``\\ g<name>`` "
1576
+ "utilisera la sous-chaîne correspondant au groupe nommé ``name``, comme "
1577
+ "défini par la syntaxe ``(?P<name>...)``. ``\\ g<number>`` utilise le groupe "
1578
+ "numéroté associé ; ``\\ g<2>`` est ainsi équivalent à ``\\ 2``, mais n'est pas "
1579
+ "ambigu dans un remplacement tel que ``\\ g<2>0``, ``\\ 20`` serait interprété "
1580
+ "comme une référence au groupe 20, et non une référence au groupe 2 suivie "
1581
+ "par un caractère littéral ``'0'``. La référence arrière ``\\ g<0>`` est "
1582
+ "remplacée par la sous-chaîne entière validée par l'expression rationnelle."
1548
1583
1549
1584
#: ../Doc/library/re.rst:763 ../Doc/library/re.rst:783
1550
1585
#: ../Doc/library/re.rst:995
1551
1586
msgid "Unmatched groups are replaced with an empty string."
1552
- msgstr ""
1587
+ msgstr "Les groupes sans correspondance sont remplacés par une chaîne vide. "
1553
1588
1554
1589
#: ../Doc/library/re.rst:766
1555
1590
msgid ""
1556
1591
"Unknown escapes in *pattern* consisting of ``'\\ '`` and an ASCII letter now "
1557
1592
"are errors."
1558
1593
msgstr ""
1594
+ "Les séquences d'échappement inconnues dans *pattern* formées par ``'\\ '`` et "
1595
+ "une lettre ASCII sont maintenant des erreurs."
1559
1596
1560
1597
#: ../Doc/library/re.rst:772
1561
1598
msgid ""
1562
1599
"Deprecated since version 3.5, will be removed in version 3.7: Unknown "
1563
1600
"escapes in repl consisting of '\\ ' and an ASCII letter now raise a "
1564
1601
"deprecation warning and will be forbidden in Python 3.7."
1565
1602
msgstr ""
1603
+ "Déprécié depuis la version 3.5, sera supprimé dans la 3.7 : Les séquences "
1604
+ "d'échappement dans *repl* formées d'un '\\ ' et d'une lettre ASCII lèvent "
1605
+ "maintenant un avertissement de dépréciation et seront interdites en Python "
1606
+ "3.7."
1566
1607
1567
1608
#: ../Doc/library/re.rst:772
1568
1609
msgid ""
1569
1610
"Unknown escapes in *repl* consisting of ``'\\ '`` and an ASCII letter now "
1570
1611
"raise a deprecation warning and will be forbidden in Python 3.7."
1571
1612
msgstr ""
1613
+ "Les séquences d'échappement dans *repl* formées d'un ``'\\ '`` et d'une "
1614
+ "lettre ASCII lèvent maintenant un avertissement de dépréciation et seront "
1615
+ "interdites en Python 3.7."
1572
1616
1573
1617
#: ../Doc/library/re.rst:777
1574
1618
msgid ""
1575
1619
"Perform the same operation as :func:`sub`, but return a tuple ``(new_string, "
1576
1620
"number_of_subs_made)``."
1577
1621
msgstr ""
1622
+ "Réalise la même opération que :func:`sub`, mais renvoie un *tuple* "
1623
+ "``(nouvelle_chaîne, nombre_de_substitutions_réalisées)``."
1578
1624
1579
1625
#: ../Doc/library/re.rst:789
1580
1626
msgid ""
1581
1627
"Escape all the characters in *pattern* except ASCII letters, numbers and "
1582
1628
"``'_'``. This is useful if you want to match an arbitrary literal string "
1583
1629
"that may have regular expression metacharacters in it. For example::"
1584
1630
msgstr ""
1631
+ "Échappe tous les caractères de *pattern* à l'exception des lettres ASCII, "
1632
+ "des nombres et de ``'_'``. Cela est utile si vous voulez valider une "
1633
+ "quelconque chaîne littérale qui pourrait contenir des métacaractères "
1634
+ "d'expressions rationnelles. Par exemple : ::"
1585
1635
1586
1636
#: ../Doc/library/re.rst:804
1587
1637
msgid "The ``'_'`` character is no longer escaped."
1588
- msgstr ""
1638
+ msgstr "Le caractère ``'_'`` n'est plus échappé. "
1589
1639
1590
1640
#: ../Doc/library/re.rst:810
1591
1641
msgid "Clear the regular expression cache."
1592
- msgstr ""
1642
+ msgstr "Vide le cache d'expressions rationnelles. "
1593
1643
1594
1644
#: ../Doc/library/re.rst:815
1595
1645
msgid ""
@@ -1599,40 +1649,48 @@ msgid ""
1599
1649
"matching. It is never an error if a string contains no match for a "
1600
1650
"pattern. The error instance has the following additional attributes:"
1601
1651
msgstr ""
1652
+ "Exception levée quand une chaîne passée à l'une des fonctions ici présentes "
1653
+ "n'est pas une expression rationnelle valide (contenant par exemple une "
1654
+ "parenthèse non fermée) ou quand d'autres erreurs se produisent durant la "
1655
+ "compilation ou l'analyse. Il ne se produit jamais d'erreur si une chaîne ne "
1656
+ "contient aucune correspondance pour un motif. Les instances de l'erreur ont "
1657
+ "les attributs additionnels suivants :"
1602
1658
1603
1659
#: ../Doc/library/re.rst:823
1604
1660
msgid "The unformatted error message."
1605
- msgstr ""
1661
+ msgstr "Le message d'erreur non formatté. "
1606
1662
1607
1663
#: ../Doc/library/re.rst:827
1608
1664
msgid "The regular expression pattern."
1609
- msgstr ""
1665
+ msgstr "Le motif d'expression rationnelle. "
1610
1666
1611
1667
#: ../Doc/library/re.rst:831
1612
1668
msgid "The index of *pattern* where compilation failed."
1613
- msgstr ""
1669
+ msgstr "L'index dans *pattern* où la compilation a échoué. "
1614
1670
1615
1671
#: ../Doc/library/re.rst:835
1616
1672
msgid "The line corresponding to *pos*."
1617
- msgstr ""
1673
+ msgstr "La ligne correspondant à *pos*. "
1618
1674
1619
1675
#: ../Doc/library/re.rst:839
1620
1676
msgid "The column corresponding to *pos*."
1621
- msgstr ""
1677
+ msgstr "La colonne correspondant à *pos*. "
1622
1678
1623
1679
#: ../Doc/library/re.rst:841
1624
1680
msgid "Added additional attributes."
1625
- msgstr ""
1681
+ msgstr "Ajout des attributs additionnels. "
1626
1682
1627
1683
#: ../Doc/library/re.rst:847
1628
1684
msgid "Regular Expression Objects"
1629
- msgstr ""
1685
+ msgstr "Objets d'expressions rationnelles "
1630
1686
1631
1687
#: ../Doc/library/re.rst:849
1632
1688
msgid ""
1633
1689
"Compiled regular expression objects support the following methods and "
1634
1690
"attributes:"
1635
1691
msgstr ""
1692
+ "Les expressions rationnelles compilées supportent les méthodes et attributs "
1693
+ "suivants :"
1636
1694
1637
1695
#: ../Doc/library/re.rst:854
1638
1696
msgid ""
@@ -1642,6 +1700,11 @@ msgid ""
1642
1700
"pattern; note that this is different from finding a zero-length match at "
1643
1701
"some point in the string."
1644
1702
msgstr ""
1703
+ "Analyse *string* à la recherche du premier emplacement où l'expression "
1704
+ "rationnelle trouve une correspondance, et envoie l':ref:`objet de "
1705
+ "correspondance <match-objects>` trouvé. Renvoie ``None`` si aucune position "
1706
+ "dans la chaîne ne satisfait le motif ; notez que cela est différent que de "
1707
+ "trouver une correspondance vide dans la chaîne."
1645
1708
1646
1709
#: ../Doc/library/re.rst:860
1647
1710
msgid ""
@@ -1651,6 +1714,11 @@ msgid ""
1651
1714
"beginning of the string and at positions just after a newline, but not "
1652
1715
"necessarily at the index where the search is to start."
1653
1716
msgstr ""
1717
+ "Le second paramètre *pos* (optionnel) donne l'index dans la chaîne où la "
1718
+ "recherche doit débuter ; il vaut ``0`` par défaut. Cela n'est pas "
1719
+ "complètement équivalent à un *slicing* sur la chaîne ; le caractère de motif "
1720
+ "``'^'`` correspond au début réel de la chaîne et aux positions juste après "
1721
+ "un saut de ligne, mais pas nécessairement à l'index où la recherche commence."
1654
1722
1655
1723
#: ../Doc/library/re.rst:866
1656
1724
379B
msgid ""
0 commit comments