Complete library/re.po

This commit is contained in:
Antoine Rozo 2017-06-01 09:16:45 +02:00
parent 73cfd4b7c5
commit 1b877b0506

View File

@ -1729,6 +1729,13 @@ msgid ""
"compiled regular expression object, ``rx.search(string, 0, 50)`` is " "compiled regular expression object, ``rx.search(string, 0, 50)`` is "
"equivalent to ``rx.search(string[:50], 0)``." "equivalent to ``rx.search(string[:50], 0)``."
msgstr "" msgstr ""
"Le paramètre optionnel *endpos* limite la longueur sur laquelle la chaîne "
"sera analysée ; ce sera comme si la chaîne faisait *endpos* caractères de "
"long, donc uniquement les caractères de *pos* à ``endpos - 1`` seront "
"analysés pour trouver une correspondance. Si *endpos* est inférieur à "
"*pos*, aucune correspondance ne sera trouvée ; dit autrement, avec *rx* une "
"expression rationnelle compilée, ``rx.search(string, 0, 50)`` est équivalent "
"à ``rx.search(string[:50], 0)``."
#: ../Doc/library/re.rst:881 #: ../Doc/library/re.rst:881
msgid "" msgid ""
@ -1737,18 +1744,26 @@ msgid ""
"Return ``None`` if the string does not match the pattern; note that this is " "Return ``None`` if the string does not match the pattern; note that this is "
"different from a zero-length match." "different from a zero-length match."
msgstr "" msgstr ""
"Si zéro caractère ou plus au début de *string* correspondent à cette "
"expression rationnelle, renvoie l':ref:`objet de correspondance <match-"
"objects>` trouvé. Renvoie ``None`` si la chaîne ne correspond pas au motif ; "
"notez que cela est différent d'une correspondance vide."
#: ../Doc/library/re.rst:886 ../Doc/library/re.rst:904 #: ../Doc/library/re.rst:886 ../Doc/library/re.rst:904
msgid "" msgid ""
"The optional *pos* and *endpos* parameters have the same meaning as for the :" "The optional *pos* and *endpos* parameters have the same meaning as for the :"
"meth:`~regex.search` method." "meth:`~regex.search` method."
msgstr "" msgstr ""
"Les paramètres optionnels *pos* et *endpos* ont le même sens que pour la "
"méthode :meth:`~regex.search`."
#: ../Doc/library/re.rst:894 #: ../Doc/library/re.rst:894
msgid "" msgid ""
"If you want to locate a match anywhere in *string*, use :meth:`~regex." "If you want to locate a match anywhere in *string*, use :meth:`~regex."
"search` instead (see also :ref:`search-vs-match`)." "search` instead (see also :ref:`search-vs-match`)."
msgstr "" msgstr ""
"Si vous voulez une recherche n'importe où dans *string*, utilisez plutôt :"
"meth:`~regex.search` (voir aussi :ref:`search-vs-match`)."
#: ../Doc/library/re.rst:900 #: ../Doc/library/re.rst:900
msgid "" msgid ""
@ -1757,10 +1772,14 @@ msgid ""
"string does not match the pattern; note that this is different from a zero-" "string does not match the pattern; note that this is different from a zero-"
"length match." "length match."
msgstr "" msgstr ""
"Si la chaîne *string* entière valide l'expression rationnelle, renvoie l':"
"ref:`object de correspondance <match-object>` associé. Renvoie ``None`` si "
"la chaîne ne correspond pas au motif ; notez que cela est différent d'une "
"correspondance vide."
#: ../Doc/library/re.rst:918 #: ../Doc/library/re.rst:918
msgid "Identical to the :func:`split` function, using the compiled pattern." msgid "Identical to the :func:`split` function, using the compiled pattern."
msgstr "" msgstr "Identique à la fonction :func:`split`, en utilisant le motif compilé."
#: ../Doc/library/re.rst:923 #: ../Doc/library/re.rst:923
msgid "" msgid ""
@ -1768,6 +1787,9 @@ msgid ""
"also accepts optional *pos* and *endpos* parameters that limit the search " "also accepts optional *pos* and *endpos* parameters that limit the search "
"region like for :meth:`match`." "region like for :meth:`match`."
msgstr "" msgstr ""
"Similaire à la fonction :func:`findall`, en utilisant le motif compilé, mais "
"accepte aussi des paramètres *pos* et *endpos* optionnels qui limitent la "
"région de recherche comme pour :meth:`match`."
#: ../Doc/library/re.rst:930 #: ../Doc/library/re.rst:930
msgid "" msgid ""
@ -1775,6 +1797,9 @@ msgid ""
"also accepts optional *pos* and *endpos* parameters that limit the search " "also accepts optional *pos* and *endpos* parameters that limit the search "
"region like for :meth:`match`." "region like for :meth:`match`."
msgstr "" msgstr ""
"Similaire à la fonction :func:`finditer`, en utilisant le motif compilé, "
"mais accepte aussi des paramètres *pos* et *endpos* optionnels qui limitent "
"la région de recherche comme pour :meth:`match`."
#: ../Doc/library/re.rst:937 #: ../Doc/library/re.rst:937
msgid "Identical to the :func:`sub` function, using the compiled pattern." msgid "Identical to the :func:`sub` function, using the compiled pattern."
@ -1930,6 +1955,10 @@ msgid ""
"groups might participate in the match. These groups will default to " "groups might participate in the match. These groups will default to "
"``None`` unless the *default* argument is given:" "``None`` unless the *default* argument is given:"
msgstr "" msgstr ""
"Si on rend la partie décimale et tout ce qui la suit optionnels, tous les "
"groupes ne figureront pas dans la correspondance. Ces groupes sans "
"correspondance vaudront ``None`` sauf si une autre valeur est donnée à "
"l'argument *default* :"
#: ../Doc/library/re.rst:1090 #: ../Doc/library/re.rst:1090
msgid "" msgid ""
@ -1937,6 +1966,10 @@ msgid ""
"by the subgroup name. The *default* argument is used for groups that did " "by the subgroup name. The *default* argument is used for groups that did "
"not participate in the match; it defaults to ``None``. For example:" "not participate in the match; it defaults to ``None``. For example:"
msgstr "" msgstr ""
"Renvoie un dictionnaire contenant tous les sous-groupes *nommés* de la "
"correspondance, accessibles par leurs noms. L'argument *default* est "
"utilisé pour les groupes qui ne figurent pas dans la correspondance ; il "
"vaut ``None`` par défaut. Par exemple :"
#: ../Doc/library/re.rst:1102 #: ../Doc/library/re.rst:1102
msgid "" msgid ""
@ -1946,6 +1979,12 @@ msgid ""
"object *m*, and a group *g* that did contribute to the match, the substring " "object *m*, and a group *g* that did contribute to the match, the substring "
"matched by group *g* (equivalent to ``m.group(g)``) is ::" "matched by group *g* (equivalent to ``m.group(g)``) is ::"
msgstr "" msgstr ""
"Renvoie les indices de début et de fin de la sous-chaîne correspondant au "
"groupe *group* ; *group* vaut par défaut zéro (pour récupérer les indices de "
"la correspondance complète). Renvoie ``-1`` si *group* existe mais ne figure "
"pas dans la correspondance. Pour un objet de correspondance *m*, et un "
"groupe *g* qui y figure, la sous-chaîne correspondant au groupe *g* "
"(équivalente à ``m.group(g)``) est : ::"
#: ../Doc/library/re.rst:1110 #: ../Doc/library/re.rst:1110
msgid "" msgid ""
@ -1954,10 +1993,15 @@ msgid ""
"start(0)`` is 1, ``m.end(0)`` is 2, ``m.start(1)`` and ``m.end(1)`` are both " "start(0)`` is 1, ``m.end(0)`` is 2, ``m.start(1)`` and ``m.end(1)`` are both "
"2, and ``m.start(2)`` raises an :exc:`IndexError` exception." "2, and ``m.start(2)`` raises an :exc:`IndexError` exception."
msgstr "" msgstr ""
"Notez que ``m.start(group)`` sera égal à ``m.end(group)`` si *group* "
"correspond à une chaîne vide. Par exemple, après ``m = re.search('b(c?)', "
"'cba')``, ``m.start(0)`` vaut 1, ``m.end(0)`` vaut 2, ``m.start(1)`` et ``m."
"end(1)`` valent tous deux 2, et ``m.start(2)`` lève une exception :exc:"
"`IndexError`."
#: ../Doc/library/re.rst:1115 #: ../Doc/library/re.rst:1115
msgid "An example that will remove *remove_this* from email addresses:" msgid "An example that will remove *remove_this* from email addresses:"
msgstr "" msgstr "Un exemple qui supprimera *remove_this* d'une adresse email :"
#: ../Doc/library/re.rst:1125 #: ../Doc/library/re.rst:1125
msgid "" msgid ""
@ -1965,6 +2009,10 @@ msgid ""
"that if *group* did not contribute to the match, this is ``(-1, -1)``. " "that if *group* did not contribute to the match, this is ``(-1, -1)``. "
"*group* defaults to zero, the entire match." "*group* defaults to zero, the entire match."
msgstr "" msgstr ""
"Pour un objet de correspondance *m*, renvoie le *tuple* ``(m.start(group), m."
"end(group))``. Notez que si *group* ne figure pas dans la correspondance, "
"``(-1, -1)`` est renvoyé. *group* vaut par défaut zéro, pour la "
"correspondance entière."
#: ../Doc/library/re.rst:1132 #: ../Doc/library/re.rst:1132
msgid "" msgid ""
@ -1972,6 +2020,10 @@ msgid ""
"`~regex.match` method of a :ref:`regex object <re-objects>`. This is the " "`~regex.match` method of a :ref:`regex object <re-objects>`. This is the "
"index into the string at which the RE engine started looking for a match." "index into the string at which the RE engine started looking for a match."
msgstr "" msgstr ""
"La valeur de *pos* qui a été passée à la méthode :meth:`~regex.search` ou :"
"meth:`~regex.match` d'un :ref:`objet expression rationnelle <re-objects>`. "
"C'est l'index dans la chaîne à partir duquel le moteur d'expressions "
"rationnelles recherche une correspondance."
#: ../Doc/library/re.rst:1139 #: ../Doc/library/re.rst:1139
msgid "" msgid ""
@ -1979,6 +2031,10 @@ msgid ""
"`~regex.match` method of a :ref:`regex object <re-objects>`. This is the " "`~regex.match` method of a :ref:`regex object <re-objects>`. This is the "
"index into the string beyond which the RE engine will not go." "index into the string beyond which the RE engine will not go."
msgstr "" msgstr ""
"La valeur de *endpos* qui a été passée à la méthode :meth:`~regex.search` "
"ou :meth:`~regex.match` d'un :ref:`objet expression rationnelle <re-"
"objects>`. C'est l'index dans la chaîne que le moteur d'expressions "
"rationnelles ne dépassera pas."
#: ../Doc/library/re.rst:1146 #: ../Doc/library/re.rst:1146
msgid "" msgid ""
@ -1988,36 +2044,47 @@ msgid ""
"``'ab'``, while the expression ``(a)(b)`` will have ``lastindex == 2``, if " "``'ab'``, while the expression ``(a)(b)`` will have ``lastindex == 2``, if "
"applied to the same string." "applied to the same string."
msgstr "" msgstr ""
"L'index entier du dernier groupe de capture validé, ou ``None`` si aucun "
"groupe ne correspondait. Par exemple, les expressions ``(a)b``, ``((a)(b))`` "
"et ``((ab))`` auront un ``lastindex == 1`` si appliquées à la chaîne "
"``'ab'``, alors que l'expression ``(a)(b)`` aura un ``lastindex == 2`` si "
"appliquée à la même chaîne."
#: ../Doc/library/re.rst:1155 #: ../Doc/library/re.rst:1155
msgid "" msgid ""
"The name of the last matched capturing group, or ``None`` if the group " "The name of the last matched capturing group, or ``None`` if the group "
"didn't have a name, or if no group was matched at all." "didn't have a name, or if no group was matched at all."
msgstr "" msgstr ""
"Le nom du dernier groupe capturant validé, ou ``None`` si le groupe n'a pas "
"de nom, ou si aucun groupe ne correspondait."
#: ../Doc/library/re.rst:1161 #: ../Doc/library/re.rst:1161
msgid "" msgid ""
"The regular expression object whose :meth:`~regex.match` or :meth:`~regex." "The regular expression object whose :meth:`~regex.match` or :meth:`~regex."
"search` method produced this match instance." "search` method produced this match instance."
msgstr "" msgstr ""
"L'expression rationnelle dont la méthode :meth:`~regex.match` ou :meth:"
"`~regex.search` a produit cet objet de correspondance."
#: ../Doc/library/re.rst:1167 #: ../Doc/library/re.rst:1167
msgid "The string passed to :meth:`~regex.match` or :meth:`~regex.search`." msgid "The string passed to :meth:`~regex.match` or :meth:`~regex.search`."
msgstr "" msgstr "La chaîne passée à :meth:`~regex.match` ou :meth:`~regex.search`."
#: ../Doc/library/re.rst:1173 #: ../Doc/library/re.rst:1173
msgid "Regular Expression Examples" msgid "Regular Expression Examples"
msgstr "" msgstr "Exemples d'expressions rationnelles"
#: ../Doc/library/re.rst:1177 #: ../Doc/library/re.rst:1177
msgid "Checking for a Pair" msgid "Checking for a Pair"
msgstr "" msgstr "Rechercher une paire"
#: ../Doc/library/re.rst:1179 #: ../Doc/library/re.rst:1179
msgid "" msgid ""
"In this example, we'll use the following helper function to display match " "In this example, we'll use the following helper function to display match "
"objects a little more gracefully:" "objects a little more gracefully:"
msgstr "" msgstr ""
"Dans cet exemple, nous utiliserons cette fonction de facilité pour afficher "
"les objets de correspondance sous une meilleure forme :"
#: ../Doc/library/re.rst:1189 #: ../Doc/library/re.rst:1189
msgid "" msgid ""
@ -2026,10 +2093,18 @@ msgid ""
"ace, \"k\" for king, \"q\" for queen, \"j\" for jack, \"t\" for 10, and " "ace, \"k\" for king, \"q\" for queen, \"j\" for jack, \"t\" for 10, and "
"\"2\" through \"9\" representing the card with that value." "\"2\" through \"9\" representing the card with that value."
msgstr "" msgstr ""
"Supposez que vous écriviez un jeu de poker où la main d'un joueur est "
"représentée par une chaîne de 5 caractères avec chaque caractère "
"représentant une carte, \"a\" pour l'as, \"k\" pour le roi (*king*), \"q\" "
"pour la reine (*queen*), \"j\" pour le valet (*jack*), \"t\" pour 10 "
"(*ten*), et les caractères de \"2\" à \"9\" représentant les cartes avec ces "
"valeurs."
#: ../Doc/library/re.rst:1194 #: ../Doc/library/re.rst:1194
msgid "To see if a given string is a valid hand, one could do the following:" msgid "To see if a given string is a valid hand, one could do the following:"
msgstr "" msgstr ""
"Pour vérifier qu'une chaîne donnée est une main valide, on pourrait faire "
"comme suit :"
#: ../Doc/library/re.rst:1204 #: ../Doc/library/re.rst:1204
msgid "" msgid ""
@ -2037,16 +2112,22 @@ msgid ""
"cards. To match this with a regular expression, one could use backreferences " "cards. To match this with a regular expression, one could use backreferences "
"as such:" "as such:"
msgstr "" msgstr ""
"La dernière main, ``\"727ak\"``, contenait une paire, deux cartes de la même "
"valeur. Pour valider cela avec une expression rationnelle, on pourrait "
"utiliser des références arrière comme :"
#: ../Doc/library/re.rst:1214 #: ../Doc/library/re.rst:1214
msgid "" msgid ""
"To find out what card the pair consists of, one could use the :meth:`~match." "To find out what card the pair consists of, one could use the :meth:`~match."
"group` method of the match object in the following manner:" "group` method of the match object in the following manner:"
msgstr "" msgstr ""
"Pour trouver de quelle carte est composée la paire, on pourrait utiliser la "
"méthode :meth:`~match.group` de l'objet de correspondance de la manière "
"suivante :"
#: ../Doc/library/re.rst:1234 #: ../Doc/library/re.rst:1234
msgid "Simulating scanf()" msgid "Simulating scanf()"
msgstr "" msgstr "Simuler scanf()"
#: ../Doc/library/re.rst:1238 #: ../Doc/library/re.rst:1238
msgid "" msgid ""
@ -2056,14 +2137,19 @@ msgid ""
"equivalent mappings between :c:func:`scanf` format tokens and regular " "equivalent mappings between :c:func:`scanf` format tokens and regular "
"expressions." "expressions."
msgstr "" msgstr ""
"Python n'a actuellement pas d'équivalent à la fonction C :c:func:`scanf`. "
"Les expressions rationnelles sont généralement plus puissantes, mais aussi "
"plus verbeuses, que les chaînes de format :c:func:`scanf`. Le tableau "
"suivant présente des expressions rationnelles plus ou moins équivalentes aux "
"éléments de formats de :c:func:`scanf`."
#: ../Doc/library/re.rst:1245 #: ../Doc/library/re.rst:1245
msgid ":c:func:`scanf` Token" msgid ":c:func:`scanf` Token"
msgstr "" msgstr "Élément de :c:func:`scanf`"
#: ../Doc/library/re.rst:1245 #: ../Doc/library/re.rst:1245
msgid "Regular Expression" msgid "Regular Expression"
msgstr "" msgstr "Expression rationnelle"
#: ../Doc/library/re.rst:1247 #: ../Doc/library/re.rst:1247
msgid "``%c``" msgid "``%c``"
@ -2140,18 +2226,19 @@ msgstr "``[-+]?(0[xX])?[\\dA-Fa-f]+``"
#: ../Doc/library/re.rst:1266 #: ../Doc/library/re.rst:1266
msgid "To extract the filename and numbers from a string like ::" msgid "To extract the filename and numbers from a string like ::"
msgstr "" msgstr ""
"Pour extraire le nom de fichier et les nombres depuis une chaîne comme : ::"
#: ../Doc/library/re.rst:1270 #: ../Doc/library/re.rst:1270
msgid "you would use a :c:func:`scanf` format like ::" msgid "you would use a :c:func:`scanf` format like ::"
msgstr "" msgstr "vous utiliseriez un format :c:func:`scanf` comme : ::"
#: ../Doc/library/re.rst:1274 #: ../Doc/library/re.rst:1274
msgid "The equivalent regular expression would be ::" msgid "The equivalent regular expression would be ::"
msgstr "" msgstr "L'expression rationnelle équivalente serait : ::"
#: ../Doc/library/re.rst:1282 #: ../Doc/library/re.rst:1282
msgid "search() vs. match()" msgid "search() vs. match()"
msgstr "" msgstr "search() vs. match()"
#: ../Doc/library/re.rst:1286 #: ../Doc/library/re.rst:1286
msgid "" msgid ""
@ -2160,6 +2247,10 @@ msgid ""
"the string, while :func:`re.search` checks for a match anywhere in the " "the string, while :func:`re.search` checks for a match anywhere in the "
"string (this is what Perl does by default)." "string (this is what Perl does by default)."
msgstr "" msgstr ""
"Python offre deux opérations primitives basées sur les expressions "
"rationnelles : :func:`re.match` cherche une correspondance uniquement au "
"début de la chaîne, tandis que :func:`re.search` en recherche une n'importe "
"où dans la chaîne (ce que fait Perl par défaut)."
#: ../Doc/library/re.rst:1291 #: ../Doc/library/re.rst:1291
msgid "For example::" msgid "For example::"
@ -2170,6 +2261,8 @@ msgid ""
"Regular expressions beginning with ``'^'`` can be used with :func:`search` " "Regular expressions beginning with ``'^'`` can be used with :func:`search` "
"to restrict the match at the beginning of the string::" "to restrict the match at the beginning of the string::"
msgstr "" msgstr ""
"Les expressions rationnelles commençant par ``'^'`` peuvent être utilisées "
"avec :func:`search` pour restreindre la recherche au début de la chaîne : ::"
#: ../Doc/library/re.rst:1305 #: ../Doc/library/re.rst:1305
msgid "" msgid ""
@ -2177,10 +2270,13 @@ msgid ""
"the beginning of the string, whereas using :func:`search` with a regular " "the beginning of the string, whereas using :func:`search` with a regular "
"expression beginning with ``'^'`` will match at the beginning of each line." "expression beginning with ``'^'`` will match at the beginning of each line."
msgstr "" msgstr ""
"Notez cependant qu'en mode :const:`MULTILINE`, :func:`match`ne recherche "
"qu'au début de la chaîne, alors que :func:`search` avec une expression "
"rationnelle commençant par ``'^'`` recherchera au début de chaque ligne."
#: ../Doc/library/re.rst:1315 #: ../Doc/library/re.rst:1315
msgid "Making a Phonebook" msgid "Making a Phonebook"
msgstr "" msgstr "Construire un répertoire téléphonique"
#: ../Doc/library/re.rst:1317 #: ../Doc/library/re.rst:1317
msgid "" msgid ""
@ -2189,18 +2285,27 @@ msgid ""
"that can be easily read and modified by Python as demonstrated in the " "that can be easily read and modified by Python as demonstrated in the "
"following example that creates a phonebook." "following example that creates a phonebook."
msgstr "" msgstr ""
":func:`split` découpe une chaîne en une liste délimitée par le motif donné. "
"La méthode est inestimable pour convertir des données textuelles vers des "
"structures de données qui peuvent être lues et modifiées par Python comme "
"démontré dans l'exemple suivant qui crée un répertoire téléphonique."
#: ../Doc/library/re.rst:1322 #: ../Doc/library/re.rst:1322
msgid "" msgid ""
"First, here is the input. Normally it may come from a file, here we are " "First, here is the input. Normally it may come from a file, here we are "
"using triple-quoted string syntax:" "using triple-quoted string syntax:"
msgstr "" msgstr ""
"Premièrement, voici l'entrée. Elle provient normalement d'un fichier, nous "
"utilisons ici une chaîne à guillemets triples :"
#: ../Doc/library/re.rst:1333 #: ../Doc/library/re.rst:1333
msgid "" msgid ""
"The entries are separated by one or more newlines. Now we convert the string " "The entries are separated by one or more newlines. Now we convert the string "
"into a list with each nonempty line having its own entry:" "into a list with each nonempty line having its own entry:"
msgstr "" msgstr ""
"Les entrées sont séparées par un saut de ligne ou plus. Nous convertissons "
"maintenant la chaîne en une liste où chaque ligne non vide aura sa propre "
"entrée :"
#: ../Doc/library/re.rst:1346 #: ../Doc/library/re.rst:1346
msgid "" msgid ""
@ -2208,6 +2313,10 @@ msgid ""
"number, and address. We use the ``maxsplit`` parameter of :func:`split` " "number, and address. We use the ``maxsplit`` parameter of :func:`split` "
"because the address has spaces, our splitting pattern, in it:" "because the address has spaces, our splitting pattern, in it:"
msgstr "" msgstr ""
"Finalement, on sépare chaque entrée en une liste avec prénom, nom, numéro de "
"téléphone et adresse. Nous utilisons le paramètre ``maxsplit`` de :func:"
"`split` parce que l'adresse contient des espaces, qui sont notre motif de "
"séparation :"
#: ../Doc/library/re.rst:1359 #: ../Doc/library/re.rst:1359
msgid "" msgid ""
@ -2215,10 +2324,13 @@ msgid ""
"not occur in the result list. With a ``maxsplit`` of ``4``, we could " "not occur in the result list. With a ``maxsplit`` of ``4``, we could "
"separate the house number from the street name:" "separate the house number from the street name:"
msgstr "" msgstr ""
"Le motif ``:?`` trouve les deux points derrière le nom de famille, pour "
"qu'ils n'apparaissent pas dans la liste résultante. Avec un ``maxsplit`` de "
"``4``, nous pourrions séparer le numéro du nom de la rue."
#: ../Doc/library/re.rst:1374 #: ../Doc/library/re.rst:1374
msgid "Text Munging" msgid "Text Munging"
msgstr "" msgstr "Mélanger les lettres des mots"
#: ../Doc/library/re.rst:1376 #: ../Doc/library/re.rst:1376
msgid "" msgid ""
@ -2227,10 +2339,14 @@ msgid ""
"function to \"munge\" text, or randomize the order of all the characters in " "function to \"munge\" text, or randomize the order of all the characters in "
"each word of a sentence except for the first and last characters::" "each word of a sentence except for the first and last characters::"
msgstr "" msgstr ""
":func:`sub` remplace toutes les occurrences d'un motif par une chaîne ou le "
"résultat d'une fonction. Cet exemple le montre, en utilisant :func:`sub` "
"avec une fonction qui mélange aléatoirement les caractères de chaque mot "
"dans une phrase (à l'exception des premiers et derniers caractères) : ::"
#: ../Doc/library/re.rst:1393 #: ../Doc/library/re.rst:1393
msgid "Finding all Adverbs" msgid "Finding all Adverbs"
msgstr "" msgstr "Trouver tous les adverbes"
#: ../Doc/library/re.rst:1395 #: ../Doc/library/re.rst:1395
msgid "" msgid ""
@ -2239,10 +2355,14 @@ msgid ""
"find all of the adverbs in some text, he or she might use :func:`findall` in " "find all of the adverbs in some text, he or she might use :func:`findall` in "
"the following manner:" "the following manner:"
msgstr "" msgstr ""
":func:`findall` trouve *toutes* les occurrences d'un motif, pas juste la "
"première comme le fait :func:`search`. Par exemple, si un(e) écrivain(e) "
"voulait trouver tous les adverbes dans un texte, il/elle devrait utiliser :"
"func:`findall` de la manière suivante :"
#: ../Doc/library/re.rst:1406 #: ../Doc/library/re.rst:1406
msgid "Finding all Adverbs and their Positions" msgid "Finding all Adverbs and their Positions"
msgstr "" msgstr "Trouver tous les adverbes et leurs positions"
#: ../Doc/library/re.rst:1408 #: ../Doc/library/re.rst:1408
msgid "" msgid ""
@ -2253,10 +2373,16 @@ msgid ""
"positions* in some text, he or she would use :func:`finditer` in the " "positions* in some text, he or she would use :func:`finditer` in the "
"following manner:" "following manner:"
msgstr "" msgstr ""
"Pour obtenir plus d'informations sur les correspondances que juste le texte "
"trouvé, :func:`finditer` est utile en fournissant des :ref:`objets de "
"correspondance <match-objects>` plutôt que des chaînes. En continuant avec "
"le précédent exemple, si l'écrivain(e) voulait trouver tous les adverbes *et "
"leurs positions* dans un texte, il/elle utiliserait :func:`finditer` de la "
"manière suivante :"
#: ../Doc/library/re.rst:1422 #: ../Doc/library/re.rst:1422
msgid "Raw String Notation" msgid "Raw String Notation"
msgstr "" msgstr "Notation brutes de chaînes"
#: ../Doc/library/re.rst:1424 #: ../Doc/library/re.rst:1424
msgid "" msgid ""
@ -2265,6 +2391,11 @@ msgid ""
"prefixed with another one to escape it. For example, the two following " "prefixed with another one to escape it. For example, the two following "
"lines of code are functionally identical:" "lines of code are functionally identical:"
msgstr "" msgstr ""
"La notation brute de chaînes (``r\"text\"``) garde saines les expressions "
"rationnelles. Sans elle, chaque *backslash* (``'\\'``) dans une expression "
"rationnelle devrait être préfixé d'un autre *backslash* pour l'échapper. "
"Par exemple, les deux lignes de code suivantes sont fonctionnellement "
"identiques :"
#: ../Doc/library/re.rst:1434 #: ../Doc/library/re.rst:1434
msgid "" msgid ""
@ -2273,10 +2404,14 @@ msgid ""
"Without raw string notation, one must use ``\"\\\\\\\\\"``, making the " "Without raw string notation, one must use ``\"\\\\\\\\\"``, making the "
"following lines of code functionally identical:" "following lines of code functionally identical:"
msgstr "" msgstr ""
"Pour rechercher un *backslash* littéral, il faut l'échapper dans "
"l'expression rationnelle. Avec la notation brute, cela signifie ``r\"\\\\"
"\"``. Sans elle, il faudrait utiliser ``\"\\\\\\\\\"``, faisant que les "
"deux lignes de code suivantes sont fonctionnellement identiques :"
#: ../Doc/library/re.rst:1446 #: ../Doc/library/re.rst:1446
msgid "Writing a Tokenizer" msgid "Writing a Tokenizer"
msgstr "" msgstr "Écrire un analyseur lexical"
#: ../Doc/library/re.rst:1448 #: ../Doc/library/re.rst:1448
msgid "" msgid ""
@ -2284,6 +2419,10 @@ msgid ""
"analyzes a string to categorize groups of characters. This is a useful " "analyzes a string to categorize groups of characters. This is a useful "
"first step in writing a compiler or interpreter." "first step in writing a compiler or interpreter."
msgstr "" msgstr ""
"Un `analyseur lexical ou scanner <https://en.wikipedia.org/wiki/"
"Lexical_analysis>`_ analyse une chaîne pour catégoriser les groupes de "
"caractères. C'est une première étape utile dans l'écriture d'un compilateur "
"ou d'un interpréteur."
#: ../Doc/library/re.rst:1452 #: ../Doc/library/re.rst:1452
msgid "" msgid ""
@ -2291,7 +2430,10 @@ msgid ""
"is to combine those into a single master regular expression and to loop over " "is to combine those into a single master regular expression and to loop over "
"successive matches::" "successive matches::"
msgstr "" msgstr ""
"Les catégories de texte sont spécifiées par des expressions rationnelles. "
"La technique est de les combiner dans une unique expression rationnelle "
"maîtresse, et de boucler sur les correspondances successives : ::"
#: ../Doc/library/re.rst:1502 #: ../Doc/library/re.rst:1502
msgid "The tokenizer produces the following output::" msgid "The tokenizer produces the following output::"
msgstr "" msgstr "L'analyseur produit la sortie suivante : ::"