traduction de reference/compound_stmts.po (#1750)

Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
Co-authored-by: Julien Palard <julien@palard.fr>
This commit is contained in:
Christophe Nanteuil 2021-10-31 07:37:32 +01:00 committed by GitHub
parent 9aeda18cd3
commit e5e5006aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 62 additions and 26 deletions

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: Python 3\n" "Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n" "POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2021-10-23 20:49+0200\n" "PO-Revision-Date: 2021-10-27 21:17+0200\n"
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n" "Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" "Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n" "Language: fr\n"
@ -1541,6 +1541,8 @@ msgid ""
"The following is the logical flow for matching a class pattern against a " "The following is the logical flow for matching a class pattern against a "
"subject value:" "subject value:"
msgstr "" msgstr ""
"Voici le déroulement dun filtrage de classe sur la valeur du champ de "
"recherche :"
#: reference/compound_stmts.rst:1023 #: reference/compound_stmts.rst:1023
msgid "" msgid ""
@ -1566,7 +1568,7 @@ msgid ""
"are present." "are present."
msgstr "" msgstr ""
"S'il n'y a pas d'argument au filtre, le filtre réussit. Sinon, les étapes " "S'il n'y a pas d'argument au filtre, le filtre réussit. Sinon, les étapes "
"suivantes dépendent de la présence ou non de filtres pour les arguments " "suivantes dépendent de la présence ou non de motifs pour les arguments "
"positionnels ou par mot-clé." "positionnels ou par mot-clé."
#: reference/compound_stmts.rst:1033 #: reference/compound_stmts.rst:1033
@ -1575,9 +1577,9 @@ msgid ""
"subpattern is accepted which will match the entire subject; for these types " "subpattern is accepted which will match the entire subject; for these types "
"keyword patterns also work as for other types." "keyword patterns also work as for other types."
msgstr "" msgstr ""
"Pour un certain nombre de types natifs (indiqués ci-dessous), un filtre " "Pour un certain nombre de types natifs (indiqués ci-dessous), un motif "
"positionnel seul est accepté, qui est confronté au champ de recherche en " "positionnel seul est accepté, qui est confronté au champ de recherche en "
"entier ; pour ces types, les filtres avec mots-clés fonctionnent comme les " "entier ; pour ces types, les motifs par mots-clés fonctionnent comme les "
"autres types." "autres types."
#: reference/compound_stmts.rst:1037 #: reference/compound_stmts.rst:1037
@ -1585,20 +1587,24 @@ msgid ""
"If only keyword patterns are present, they are processed as follows, one by " "If only keyword patterns are present, they are processed as follows, one by "
"one:" "one:"
msgstr "" msgstr ""
"S'il n'y a que des motifs par mot-clé (NdT : dans le sens « argument par "
"mot-clé »), ils sont évalués comme ceci, un par un :"
#: reference/compound_stmts.rst:1040 #: reference/compound_stmts.rst:1040
msgid "I. The keyword is looked up as an attribute on the subject." msgid "I. The keyword is looked up as an attribute on the subject."
msgstr "" msgstr "I. Le mot-clé est recherché en tant qu'attribut du champ de recherche."
#: reference/compound_stmts.rst:1042 #: reference/compound_stmts.rst:1042
msgid "" msgid ""
"If this raises an exception other than :exc:`AttributeError`, the exception " "If this raises an exception other than :exc:`AttributeError`, the exception "
"bubbles up." "bubbles up."
msgstr "" msgstr ""
"Si cela lève une exception autre que :exc:`AttributeError`, l'exception est "
"propagée vers le haut."
#: reference/compound_stmts.rst:1045 #: reference/compound_stmts.rst:1045
msgid "If this raises :exc:`AttributeError`, the class pattern has failed." msgid "If this raises :exc:`AttributeError`, the class pattern has failed."
msgstr "" msgstr "Si cela lève l'exception :exc:`AttributeError`, le filtre échoue."
#: reference/compound_stmts.rst:1047 #: reference/compound_stmts.rst:1047
msgid "" msgid ""
@ -1606,10 +1612,14 @@ msgid ""
"the subject's attribute value. If this fails, the class pattern fails; if " "the subject's attribute value. If this fails, the class pattern fails; if "
"this succeeds, the match proceeds to the next keyword." "this succeeds, the match proceeds to the next keyword."
msgstr "" msgstr ""
"Sinon, le motif associé au mot-clé est confronté à la valeur de l'attribut "
"du champ de recherche. Si cela échoue, le filtre de classe échoue ; si cela "
"réussit, le filtre passe au mot-clé suivant."
#: reference/compound_stmts.rst:1052 #: reference/compound_stmts.rst:1052
msgid "II. If all keyword patterns succeed, the class pattern succeeds." msgid "II. If all keyword patterns succeed, the class pattern succeeds."
msgstr "" msgstr ""
"II. Si tous les motifs par mot-clé ont réussi, le filtre de classe réussit."
#: reference/compound_stmts.rst:1054 #: reference/compound_stmts.rst:1054
msgid "" msgid ""
@ -1617,27 +1627,35 @@ msgid ""
"patterns using the :data:`~object.__match_args__` attribute on the class " "patterns using the :data:`~object.__match_args__` attribute on the class "
"``name_or_attr`` before matching:" "``name_or_attr`` before matching:"
msgstr "" msgstr ""
"Si des motifs positionnels sont présents, ils sont convertis en motifs par "
"mot-clé en utilisant l'attribut :data:`~object.__match_args__` de la classe "
"``name_or_attr`` avant le filtrage :"
#: reference/compound_stmts.rst:1058 #: reference/compound_stmts.rst:1058
msgid "" msgid ""
"I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." "I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called."
msgstr "" msgstr ""
"I. L'équivalent de ``getattr(cls, \"__match_args__\", ())`` est appelé."
#: reference/compound_stmts.rst:1060 #: reference/compound_stmts.rst:1060
msgid "If this raises an exception, the exception bubbles up." msgid "If this raises an exception, the exception bubbles up."
msgstr "" msgstr "Si cela lève une exception, elle est propagée vers le haut."
#: reference/compound_stmts.rst:1062 #: reference/compound_stmts.rst:1062
msgid "" msgid ""
"If the returned value is not a tuple, the conversion fails and :exc:" "If the returned value is not a tuple, the conversion fails and :exc:"
"`TypeError` is raised." "`TypeError` is raised."
msgstr "" msgstr ""
"Si la valeur de retour n'est pas un *n*-uplet, la conversion échoue et une :"
"exc:`TypeError` est levée."
#: reference/compound_stmts.rst:1065 #: reference/compound_stmts.rst:1065
msgid "" msgid ""
"If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" "If there are more positional patterns than ``len(cls.__match_args__)``, :exc:"
"`TypeError` is raised." "`TypeError` is raised."
msgstr "" msgstr ""
"S'il y a plus de motifs positionnels que ``len(cls.__match_args__)``, une :"
"exc:`TypeError` est levée."
#: reference/compound_stmts.rst:1068 #: reference/compound_stmts.rst:1068
msgid "" msgid ""
@ -1645,29 +1663,38 @@ msgid ""
"``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " "``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a "
"string; if not :exc:`TypeError` is raised." "string; if not :exc:`TypeError` is raised."
msgstr "" msgstr ""
"Sinon, le motif positionnel ``i`` est converti en motif par mot-clé (le mot-"
"clé sera ``__match_args__[i]``). ``__match_args__[i]`` doit être une chaîne, "
"sinon une :exc:`TypeError` est levée."
#: reference/compound_stmts.rst:1072 #: reference/compound_stmts.rst:1072
msgid "If there are duplicate keywords, :exc:`TypeError` is raised." msgid "If there are duplicate keywords, :exc:`TypeError` is raised."
msgstr "" msgstr "Si un mot-clé est dupliqué, une :exc:`TypeError` est levée."
#: reference/compound_stmts.rst:1074 #: reference/compound_stmts.rst:1074
msgid ":ref:`class-pattern-matching`" msgid ":ref:`class-pattern-matching`"
msgstr "" msgstr ":ref:`class-pattern-matching`"
#: reference/compound_stmts.rst:1077 #: reference/compound_stmts.rst:1077
msgid "" msgid ""
"II. Once all positional patterns have been converted to keyword patterns," "II. Once all positional patterns have been converted to keyword patterns,"
msgstr "" msgstr ""
"II. Une fois que tous les motifs positionnels ont été convertis en motifs "
"par mot-clé,"
#: reference/compound_stmts.rst:1077 #: reference/compound_stmts.rst:1077
msgid "the match proceeds as if there were only keyword patterns." msgid "the match proceeds as if there were only keyword patterns."
msgstr "" msgstr ""
"le filtre se déroule comme si tous les motifs étaient des motifs par mots-"
"clés."
#: reference/compound_stmts.rst:1079 #: reference/compound_stmts.rst:1079
msgid "" msgid ""
"For the following built-in types the handling of positional subpatterns is " "For the following built-in types the handling of positional subpatterns is "
"different:" "different:"
msgstr "" msgstr ""
"Pour les types natifs suivants, le traitement des motifs positionnels est "
"différent :"
#: reference/compound_stmts.rst:1082 #: reference/compound_stmts.rst:1082
msgid ":class:`bool`" msgid ":class:`bool`"
@ -1720,35 +1747,43 @@ msgid ""
"``int(0|1)`` matches the value ``0``, but not the values ``0.0`` or " "``int(0|1)`` matches the value ``0``, but not the values ``0.0`` or "
"``False``." "``False``."
msgstr "" msgstr ""
"Ces classes acceptent un argument positionnel seul et le filtre s'applique "
"alors sur l'ensemble de l'objet plutôt que sur un simple attribut. Par "
"exemple, ``int(0|1)`` réussit lorsqu'il est confronté à la valeur ``0``, "
"mais pas aux valeurs ``0.0`` ou ``False``."
#: reference/compound_stmts.rst:1098 #: reference/compound_stmts.rst:1098
msgid "" msgid ""
"In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" "In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:"
msgstr "" msgstr ""
"En termes simples, ``CLS(P1, attr=P2)`` réussit seulement si la séquence "
"suivante est déroulée :"
#: reference/compound_stmts.rst:1100 #: reference/compound_stmts.rst:1100
msgid "``isinstance(<subject>, CLS)``" msgid "``isinstance(<subject>, CLS)``"
msgstr "" msgstr "``isinstance(<subject>, CLS)``"
#: reference/compound_stmts.rst:1101 #: reference/compound_stmts.rst:1101
msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``"
msgstr "" msgstr ""
"convertit ``P1`` vers un motif par mot-clé en utilisant ``CLS."
"__match_args__``"
#: reference/compound_stmts.rst:1103 #: reference/compound_stmts.rst:1103
msgid "For each keyword argument ``attr=P2``:" msgid "For each keyword argument ``attr=P2``:"
msgstr "" msgstr "Pour chaque argument par mot-clé ``attr=P2`` :"
#: reference/compound_stmts.rst:1103 #: reference/compound_stmts.rst:1103
msgid "``hasattr(<subject>, \"attr\")``" msgid "``hasattr(<subject>, \"attr\")``"
msgstr "" msgstr "``hasattr(<subject>, \"attr\")``"
#: reference/compound_stmts.rst:1104 #: reference/compound_stmts.rst:1104
msgid "``P2`` matches ``<subject>.attr``" msgid "``P2`` matches ``<subject>.attr``"
msgstr "" msgstr "``P2`` correspond à ``<subject>.attr``"
#: reference/compound_stmts.rst:1105 #: reference/compound_stmts.rst:1105
msgid "... and so on for the corresponding keyword argument/pattern pair." msgid "... and so on for the corresponding keyword argument/pattern pair."
msgstr "" msgstr "… et ainsi de suite pour les paires motif/argument par mot-clé."
#: reference/compound_stmts.rst:1120 #: reference/compound_stmts.rst:1120
msgid "Function definitions" msgid "Function definitions"
@ -1847,7 +1882,6 @@ msgstr ""
"exprimée dans la grammaire." "exprimée dans la grammaire."
#: reference/compound_stmts.rst:1202 #: reference/compound_stmts.rst:1202
#, fuzzy
msgid "" msgid ""
"**Default parameter values are evaluated from left to right when the " "**Default parameter values are evaluated from left to right when the "
"function definition is executed.** This means that the expression is " "function definition is executed.** This means that the expression is "
@ -1863,12 +1897,13 @@ msgstr ""
"droite quand la définition de la fonction est exécutée**. Cela signifie que " "droite quand la définition de la fonction est exécutée**. Cela signifie que "
"l'expression est évaluée une fois, lorsque la fonction est définie, et que " "l'expression est évaluée une fois, lorsque la fonction est définie, et que "
"c'est la même valeur « pré-calculée » qui est utilisée à chaque appel. C'est " "c'est la même valeur « pré-calculée » qui est utilisée à chaque appel. C'est "
"particulièrement important à comprendre lorsqu'un paramètre par défaut est " "particulièrement important à comprendre lorsque la valeur d'un paramètre par "
"un objet mutable, tel qu'une liste ou un dictionnaire : si la fonction " "défaut est un objet mutable (cas d'une liste ou un dictionnaire par "
"modifie l'objet (par exemple en ajoutant un élément à une liste), la valeur " "exemple) : si la fonction modifie l'objet (par exemple en ajoutant un "
"par défaut est modifiée. En général, ce n'est pas l'effet voulu. Une façon " "élément à une liste), la valeur par défaut est modifiée. En général, ce "
"d'éviter cet écueil est d'utiliser ``None`` par défaut et de tester " "n'est pas l'effet voulu. Une façon d'éviter cet écueil est d'utiliser "
"explicitement la valeur dans le corps de la fonction. Par exemple ::" "``None`` par défaut et de tester explicitement la valeur dans le corps de la "
"fonction. Par exemple ::"
#: reference/compound_stmts.rst:1223 #: reference/compound_stmts.rst:1223
msgid "" msgid ""
@ -1899,6 +1934,7 @@ msgstr ""
"passés qu'en utilisant des arguments par mot-clé. Au contraire, ceux avant " "passés qu'en utilisant des arguments par mot-clé. Au contraire, ceux avant "
"``/`` ne peuvent être passés qu'avec des arguments positionnels." "``/`` ne peuvent être passés qu'avec des arguments positionnels."
# pas de majuscule car suit un :
#: reference/compound_stmts.rst:1235 #: reference/compound_stmts.rst:1235
msgid "" msgid ""
"The ``/`` function parameter syntax may be used to indicate positional-only " "The ``/`` function parameter syntax may be used to indicate positional-only "
@ -2172,7 +2208,6 @@ msgid "Coroutine function definition"
msgstr "Définition de fonctions coroutines" msgstr "Définition de fonctions coroutines"
#: reference/compound_stmts.rst:1410 #: reference/compound_stmts.rst:1410
#, fuzzy
msgid "" msgid ""
"Execution of Python coroutines can be suspended and resumed at many points " "Execution of Python coroutines can be suspended and resumed at many points "
"(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` " "(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` "
@ -2180,10 +2215,9 @@ msgid ""
"function." "function."
msgstr "" msgstr ""
"L'exécution de coroutines Python peut être suspendue et reprise à plusieurs " "L'exécution de coroutines Python peut être suspendue et reprise à plusieurs "
"endroits (voir :term:`coroutine`). Dans le corps d'une coroutine, tout " "endroits (voir :term:`coroutine`). Les expressions :keyword:`await`, :"
"identificateur ``await`` ou ``async`` devient un mots-clé réservé ; les " "keyword:`async for` et :keyword:`async with` ne peuvent être utilisées que "
"expressions :keyword:`await`, :keyword:`async for` et :keyword:`async with` " "dans les corps de coroutines."
"ne peuvent être utilisées que dans les corps de coroutines."
#: reference/compound_stmts.rst:1414 #: reference/compound_stmts.rst:1414
msgid "" msgid ""
@ -2211,6 +2245,8 @@ msgid ""
"``await`` and ``async`` are now keywords; previously they were only treated " "``await`` and ``async`` are now keywords; previously they were only treated "
"as such inside the body of a coroutine function." "as such inside the body of a coroutine function."
msgstr "" msgstr ""
"``await`` et ``async`` sont dorénavant des mots-clés ; auparavant, ils "
"n'étaient traités comme tels que dans le corps d'une fonction coroutine."
#: reference/compound_stmts.rst:1434 #: reference/compound_stmts.rst:1434
msgid "The :keyword:`!async for` statement" msgid "The :keyword:`!async for` statement"