Working on library/collections.abc (#287)

* Working on library/collections.abc

* Corrections

* Coquille

* Correction

* Correction
This commit is contained in:
Guillaume Fayard 2018-07-31 17:50:55 +02:00 committed by Julien Palard
parent a5509f8904
commit a6408e0991

View File

@ -6,22 +6,23 @@ msgstr ""
"Project-Id-Version: Python 3.6\n" "Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-28 15:29+0200\n" "POT-Creation-Date: 2018-06-28 15:29+0200\n"
"PO-Revision-Date: 2018-07-04 11:34+0200\n" "PO-Revision-Date: 2018-07-29 12:18+0200\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n" "Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" "Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n" "X-Generator: Poedit 2.0.9\n"
#: ../Doc/library/collections.abc.rst:2 #: ../Doc/library/collections.abc.rst:2
msgid ":mod:`collections.abc` --- Abstract Base Classes for Containers" msgid ":mod:`collections.abc` --- Abstract Base Classes for Containers"
msgstr "" msgstr ""
":mod:`collections.abc` --- Classes de base abstraites pour les conteneurs"
#: ../Doc/library/collections.abc.rst:10 #: ../Doc/library/collections.abc.rst:10
msgid "Formerly, this module was part of the :mod:`collections` module." msgid "Formerly, this module was part of the :mod:`collections` module."
msgstr "" msgstr "Auparavant, ce module faisait partie du module :mod:`collections`."
#: ../Doc/library/collections.abc.rst:13 #: ../Doc/library/collections.abc.rst:13
msgid "**Source code:** :source:`Lib/_collections_abc.py`" msgid "**Source code:** :source:`Lib/_collections_abc.py`"
@ -33,16 +34,22 @@ msgid ""
"that can be used to test whether a class provides a particular interface; " "that can be used to test whether a class provides a particular interface; "
"for example, whether it is hashable or whether it is a mapping." "for example, whether it is hashable or whether it is a mapping."
msgstr "" msgstr ""
"Ce module fournit :term:`des classes de base abstraites <abstract base "
"class>` qui peuvent être utilisées pour vérifier si une classe fournit une "
"interface particulière (par exemple, savoir s'il s'agit d'un hachable ou "
"d'une table de correspondance)."
#: ../Doc/library/collections.abc.rst:31 #: ../Doc/library/collections.abc.rst:31
msgid "Collections Abstract Base Classes" msgid "Collections Abstract Base Classes"
msgstr "" msgstr "Classes de base abstraites de collections"
#: ../Doc/library/collections.abc.rst:33 #: ../Doc/library/collections.abc.rst:33
msgid "" msgid ""
"The collections module offers the following :term:`ABCs <abstract base " "The collections module offers the following :term:`ABCs <abstract base "
"class>`:" "class>`:"
msgstr "" msgstr ""
"Le module collections apporte les :term:`ABC <abstract base class>` "
"suivantes :"
#: ../Doc/library/collections.abc.rst:38 #: ../Doc/library/collections.abc.rst:38
msgid "ABC" msgid "ABC"
@ -58,7 +65,7 @@ msgstr "Méthodes abstraites"
#: ../Doc/library/collections.abc.rst:38 #: ../Doc/library/collections.abc.rst:38
msgid "Mixin Methods" msgid "Mixin Methods"
msgstr "" msgstr "Méthodes *mixin*"
#: ../Doc/library/collections.abc.rst:40 #: ../Doc/library/collections.abc.rst:40
msgid ":class:`Container`" msgid ":class:`Container`"
@ -95,11 +102,11 @@ msgstr "``__next__``"
#: ../Doc/library/collections.abc.rst:44 #: ../Doc/library/collections.abc.rst:44
msgid ":class:`Reversible`" msgid ":class:`Reversible`"
msgstr "" msgstr ":class:`Reversible`"
#: ../Doc/library/collections.abc.rst:44 #: ../Doc/library/collections.abc.rst:44
msgid "``__reversed__``" msgid "``__reversed__``"
msgstr "" msgstr "``__reversed__``"
#: ../Doc/library/collections.abc.rst:45 #: ../Doc/library/collections.abc.rst:45
msgid ":class:`Generator`" msgid ":class:`Generator`"
@ -132,7 +139,7 @@ msgstr "``__call__``"
#: ../Doc/library/collections.abc.rst:48 ../Doc/library/collections.abc.rst:64 #: ../Doc/library/collections.abc.rst:48 ../Doc/library/collections.abc.rst:64
#: ../Doc/library/collections.abc.rst:74 #: ../Doc/library/collections.abc.rst:74
msgid ":class:`Collection`" msgid ":class:`Collection`"
msgstr "" msgstr ":class:`Collection`"
#: ../Doc/library/collections.abc.rst:48 #: ../Doc/library/collections.abc.rst:48
msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`"
@ -149,7 +156,7 @@ msgstr ":class:`Sequence`"
#: ../Doc/library/collections.abc.rst:52 #: ../Doc/library/collections.abc.rst:52
msgid ":class:`Reversible`, :class:`Collection`" msgid ":class:`Reversible`, :class:`Collection`"
msgstr "" msgstr ":class:`Reversible`, :class:`Collection`"
#: ../Doc/library/collections.abc.rst:52 ../Doc/library/collections.abc.rst:61 #: ../Doc/library/collections.abc.rst:52 ../Doc/library/collections.abc.rst:61
msgid "``__getitem__``, ``__len__``" msgid "``__getitem__``, ``__len__``"
@ -159,7 +166,7 @@ msgstr "``__getitem__``, ``__len__``"
msgid "" msgid ""
"``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``"
msgstr "" msgstr ""
"``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" "``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``"
#: ../Doc/library/collections.abc.rst:55 #: ../Doc/library/collections.abc.rst:55
msgid ":class:`MutableSequence`" msgid ":class:`MutableSequence`"
@ -176,14 +183,16 @@ msgid ""
"Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, " "Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, "
"``pop``, ``remove``, and ``__iadd__``" "``pop``, ``remove``, and ``__iadd__``"
msgstr "" msgstr ""
"Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, "
"``extend``, ``pop``, ``remove`` et ``__iadd__``"
#: ../Doc/library/collections.abc.rst:61 #: ../Doc/library/collections.abc.rst:61
msgid ":class:`ByteString`" msgid ":class:`ByteString`"
msgstr "" msgstr ":class:`ByteString`"
#: ../Doc/library/collections.abc.rst:61 #: ../Doc/library/collections.abc.rst:61
msgid "Inherited :class:`Sequence` methods" msgid "Inherited :class:`Sequence` methods"
msgstr "" msgstr "Méthodes héritées de :class:`Sequence`"
#: ../Doc/library/collections.abc.rst:64 ../Doc/library/collections.abc.rst:68 #: ../Doc/library/collections.abc.rst:64 ../Doc/library/collections.abc.rst:68
msgid ":class:`Set`" msgid ":class:`Set`"
@ -195,7 +204,7 @@ msgid ""
"``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" "``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``"
msgstr "" msgstr ""
"``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, "
"``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" "``__and__``, ``__or__``, ``__sub__``, ``__xor__`` et ``isdisjoint``"
#: ../Doc/library/collections.abc.rst:68 #: ../Doc/library/collections.abc.rst:68
msgid ":class:`MutableSet`" msgid ":class:`MutableSet`"
@ -210,6 +219,8 @@ msgid ""
"Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " "Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, "
"``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" "``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``"
msgstr "" msgstr ""
"Méthodes héritées de :class:`Set`, et ``clear``, ``pop``, ``remove``, "
"``__ior__``, ``__iand__``, ``__ixor__`` et ``__isub__``"
#: ../Doc/library/collections.abc.rst:74 ../Doc/library/collections.abc.rst:78 #: ../Doc/library/collections.abc.rst:74 ../Doc/library/collections.abc.rst:78
msgid ":class:`Mapping`" msgid ":class:`Mapping`"
@ -224,7 +235,7 @@ msgid ""
"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and "
"``__ne__``" "``__ne__``"
msgstr "" msgstr ""
"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__`` et "
"``__ne__``" "``__ne__``"
#: ../Doc/library/collections.abc.rst:78 #: ../Doc/library/collections.abc.rst:78
@ -242,6 +253,8 @@ msgid ""
"Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " "Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, "
"``update``, and ``setdefault``" "``update``, and ``setdefault``"
msgstr "" msgstr ""
"Méthodes héritées de :class:`Mapping`, et ``pop``, ``popitem``, ``clear``, "
"``update`` et ``setdefault``"
#: ../Doc/library/collections.abc.rst:85 #: ../Doc/library/collections.abc.rst:85
msgid ":class:`MappingView`" msgid ":class:`MappingView`"
@ -321,10 +334,12 @@ msgid ""
"ABCs for classes that provide respectively the methods :meth:" "ABCs for classes that provide respectively the methods :meth:"
"`__contains__`, :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`." "`__contains__`, :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`."
msgstr "" msgstr ""
"ABC pour les classes qui définissent respectivement les méthodes :meth:"
"`__contains__`, :meth:`__hash__`, :meth:`__len__` et :meth:`__call__`."
#: ../Doc/library/collections.abc.rst:110 #: ../Doc/library/collections.abc.rst:110
msgid "ABC for classes that provide the :meth:`__iter__` method." msgid "ABC for classes that provide the :meth:`__iter__` method."
msgstr "" msgstr "ABC pour les classes qui définissent la méthode :meth:`__iter__`."
#: ../Doc/library/collections.abc.rst:112 #: ../Doc/library/collections.abc.rst:112
msgid "" msgid ""
@ -334,21 +349,31 @@ msgid ""
"only reliable way to determine whether an object is :term:`iterable` is to " "only reliable way to determine whether an object is :term:`iterable` is to "
"call ``iter(obj)``." "call ``iter(obj)``."
msgstr "" msgstr ""
"Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont "
"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:"
"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :"
"meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:"
"`itérable <iterable>` est d'appeler ``iter(obj)``."
#: ../Doc/library/collections.abc.rst:120 #: ../Doc/library/collections.abc.rst:120
msgid "ABC for sized iterable container classes." msgid "ABC for sized iterable container classes."
msgstr "" msgstr "ABC pour les classes de conteneurs itérables et *sized*."
#: ../Doc/library/collections.abc.rst:126 #: ../Doc/library/collections.abc.rst:126
msgid "" msgid ""
"ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" "ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:"
"`~iterator.__next__` methods. See also the definition of :term:`iterator`." "`~iterator.__next__` methods. See also the definition of :term:`iterator`."
msgstr "" msgstr ""
"ABC pour les classes qui définissent les méthodes :meth:`~iterator.__iter__` "
"et :meth:`~iterator.__next__`. Voir aussi la définition d':term:`itérateur "
"<iterator>`."
#: ../Doc/library/collections.abc.rst:132 #: ../Doc/library/collections.abc.rst:132
msgid "" msgid ""
"ABC for iterable classes that also provide the :meth:`__reversed__` method." "ABC for iterable classes that also provide the :meth:`__reversed__` method."
msgstr "" msgstr ""
"ABC pour les classes d'itérables qui implémentent également la méthode :meth:"
"`__reversed__`."
#: ../Doc/library/collections.abc.rst:139 #: ../Doc/library/collections.abc.rst:139
msgid "" msgid ""
@ -357,10 +382,14 @@ msgid ""
"throw` and :meth:`~generator.close` methods. See also the definition of :" "throw` and :meth:`~generator.close` methods. See also the definition of :"
"term:`generator`." "term:`generator`."
msgstr "" msgstr ""
"ABC pour les classes de générateurs qui implémentent le protocole défini "
"dans la :pep:`342` qui étend les itérateurs avec les méthodes :meth:"
"`~generator.send`, :meth:`~generator.throw` et :meth:`~generator.close`. "
"Voir aussi la définition de :term:`générateur <generator>`."
#: ../Doc/library/collections.abc.rst:150 #: ../Doc/library/collections.abc.rst:150
msgid "ABCs for read-only and mutable :term:`sequences <sequence>`." msgid "ABCs for read-only and mutable :term:`sequences <sequence>`."
msgstr "" msgstr "ABC pour les :term:`séquences <sequence>` immuables et muables."
#: ../Doc/library/collections.abc.rst:152 #: ../Doc/library/collections.abc.rst:152
msgid "" msgid ""
@ -372,23 +401,35 @@ msgid ""
"be with a linked list), the mixins will have quadratic performance and will " "be with a linked list), the mixins will have quadratic performance and will "
"likely need to be overridden." "likely need to be overridden."
msgstr "" msgstr ""
"Note pour l'implémentation : quelques méthodes *mixin*, comme :meth:"
"`__iter__`, :meth:`__reversed__` et :meth:`index`, font des appels répétés à "
"la méthode sous-jacente :meth:`__getitem__`. Ainsi, si :meth:`__getitem__` "
"est implémentée avec une vitesse d'accès constante, les méthodes *mixin* "
"auront une performance linéaire ; cependant, si elle est linéaire, les "
"*mixin* auront une performance quadratique, il serait alors judicieux de les "
"surcharger."
#: ../Doc/library/collections.abc.rst:161 #: ../Doc/library/collections.abc.rst:161
msgid "The index() method added support for *stop* and *start* arguments." msgid "The index() method added support for *stop* and *start* arguments."
msgstr "" msgstr ""
"La méthode index() a ajouté le support des arguments *start* et *stop*."
#: ../Doc/library/collections.abc.rst:168 #: ../Doc/library/collections.abc.rst:168
msgid "ABCs for read-only and mutable sets." msgid "ABCs for read-only and mutable sets."
msgstr "" msgstr "ABC pour les ensembles immuables et muables."
#: ../Doc/library/collections.abc.rst:173 #: ../Doc/library/collections.abc.rst:173
msgid "ABCs for read-only and mutable :term:`mappings <mapping>`." msgid "ABCs for read-only and mutable :term:`mappings <mapping>`."
msgstr "" msgstr ""
"ABC pour les :term:`tables de correspondances <mapping>` immuables et "
"muables."
#: ../Doc/library/collections.abc.rst:180 #: ../Doc/library/collections.abc.rst:180
msgid "" msgid ""
"ABCs for mapping, items, keys, and values :term:`views <dictionary view>`." "ABCs for mapping, items, keys, and values :term:`views <dictionary view>`."
msgstr "" msgstr ""
"ABC pour les :term:`vues<dictionary view>` de *mappings* (tableaux de "
"correspondances), d'éléments, de clés et de valeurs."
#: ../Doc/library/collections.abc.rst:184 #: ../Doc/library/collections.abc.rst:184
msgid "" msgid ""
@ -396,12 +437,17 @@ msgid ""
"expressions. Custom implementations must provide the :meth:`__await__` " "expressions. Custom implementations must provide the :meth:`__await__` "
"method." "method."
msgstr "" msgstr ""
"ABC pour les objets :term:`awaitables <awaitable>`, qui peuvent être "
"utilisés dans les expressions :keyword:`await`. Les implémentations "
"personnalisées doivent définir la méthode :meth:`__await__`."
#: ../Doc/library/collections.abc.rst:188 #: ../Doc/library/collections.abc.rst:188
msgid "" msgid ""
":term:`Coroutine` objects and instances of the :class:`~collections.abc." ":term:`Coroutine` objects and instances of the :class:`~collections.abc."
"Coroutine` ABC are all instances of this ABC." "Coroutine` ABC are all instances of this ABC."
msgstr "" msgstr ""
"Les objets :term:`coroutines <coroutine>` et les instances de l'ABC :class:"
"`~collections.abc.Coroutine` sont tous des instances de cette ABC."
#: ../Doc/library/collections.abc.rst:192 #: ../Doc/library/collections.abc.rst:192
msgid "" msgid ""
@ -411,6 +457,12 @@ msgid ""
"``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:" "``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:"
"`inspect.isawaitable` to detect them." "`inspect.isawaitable` to detect them."
msgstr "" msgstr ""
"En CPython, les coroutines basées sur les générateurs (les générateurs "
"décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont "
"*awaitables*, bien qu'elles n'aient pas de méthode :meth:`__await__`. "
"Évaluer ``isinstance(gencoro, Awaitable)`` où ``gencoro`` est un générateur "
"décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les "
"détecter."
#: ../Doc/library/collections.abc.rst:202 #: ../Doc/library/collections.abc.rst:202
msgid "" msgid ""
@ -421,6 +473,12 @@ msgid ""
"also instances of :class:`Awaitable`. See also the definition of :term:" "also instances of :class:`Awaitable`. See also the definition of :term:"
"`coroutine`." "`coroutine`."
msgstr "" msgstr ""
"ABC pour les classes compatibles avec les coroutines. Elles implémentent les "
"méthodes suivantes, définies dans :ref:`coroutine-objects` : :meth:"
"`~coroutine.send`, :meth:`~coroutine.throw` et :meth:`~coroutine.close`. Les "
"implémentations personnalisées doivent également fournir :meth:`__await__`. "
"Toutes les instances de :class:`Coroutine` sont également des instances de :"
"class:`Awaitable`. Voir aussi la définition de :term:`coroutine`."
#: ../Doc/library/collections.abc.rst:210 #: ../Doc/library/collections.abc.rst:210
msgid "" msgid ""
@ -430,30 +488,45 @@ msgid ""
"``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:" "``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:"
"`inspect.isawaitable` to detect them." "`inspect.isawaitable` to detect them."
msgstr "" msgstr ""
"En CPython, les coroutines basées sur les générateurs (les générateurs "
"décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont "
"*awaitables*, bien qu'elles n'aient pas de méthode :meth:`__await__`. "
"Évaluer ``isinstance(gencoro, Corourine)`` où ``gencoro`` est un générateur "
"décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les "
"détecter."
#: ../Doc/library/collections.abc.rst:220 #: ../Doc/library/collections.abc.rst:220
msgid "" msgid ""
"ABC for classes that provide ``__aiter__`` method. See also the definition " "ABC for classes that provide ``__aiter__`` method. See also the definition "
"of :term:`asynchronous iterable`." "of :term:`asynchronous iterable`."
msgstr "" msgstr ""
"ABC pour les classes qui définissent la méthode ``__aiter__``. Voir aussi la "
"définition d':term:`itérable asynchrone <asynchronous iterable>`."
#: ../Doc/library/collections.abc.rst:227 #: ../Doc/library/collections.abc.rst:227
msgid "" msgid ""
"ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See "
"also the definition of :term:`asynchronous iterator`." "also the definition of :term:`asynchronous iterator`."
msgstr "" msgstr ""
"ABC pour les classes qui définissent les méthodes ``__aiter__`` et "
"``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone "
"<asynchronous iterator>`."
#: ../Doc/library/collections.abc.rst:234 #: ../Doc/library/collections.abc.rst:234
msgid "" msgid ""
"ABC for asynchronous generator classes that implement the protocol defined " "ABC for asynchronous generator classes that implement the protocol defined "
"in :pep:`525` and :pep:`492`." "in :pep:`525` and :pep:`492`."
msgstr "" msgstr ""
"ABC pour les classes de générateurs asynchrones qui implémentent le "
"protocole défini dans la :pep:`525` et dans la :pep:`492`."
#: ../Doc/library/collections.abc.rst:240 #: ../Doc/library/collections.abc.rst:240
msgid "" msgid ""
"These ABCs allow us to ask classes or instances if they provide particular " "These ABCs allow us to ask classes or instances if they provide particular "
"functionality, for example::" "functionality, for example::"
msgstr "" msgstr ""
"Ces ABC permettent de demander à des classes ou à des instances si elles "
"fournissent des fonctionnalités particulières, par exemple ::"
#: ../Doc/library/collections.abc.rst:247 #: ../Doc/library/collections.abc.rst:247
msgid "" msgid ""
@ -464,10 +537,19 @@ msgid ""
"meth:`__len__`. The ABC supplies the remaining methods such as :meth:" "meth:`__len__`. The ABC supplies the remaining methods such as :meth:"
"`__and__` and :meth:`isdisjoint`::" "`__and__` and :meth:`isdisjoint`::"
msgstr "" msgstr ""
"Une partie des ABC sont également utiles en tant que *mixins* : cela rend "
"plus facile le développement de classes qui gèrent des API de conteneurs. "
"Par exemple, pour écrire une classe qui gère l'API entière de :class:`Set`, "
"il est uniquement nécessaire de fournir les trois méthodes sous-jacentes "
"abstraites :meth:`__contains__`, :meth:`__iter__` et :meth:`__len__`. L'ABC "
"apporte les méthodes restantes, comme :meth:`__and__` et :meth:"
"`isdisjoint` ::"
#: ../Doc/library/collections.abc.rst:276 #: ../Doc/library/collections.abc.rst:276
msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
msgstr "" msgstr ""
"Notes à propos de l'utilisation de :class:`Set` et :class:`MutableSet` comme "
"*mixin* :"
#: ../Doc/library/collections.abc.rst:279 #: ../Doc/library/collections.abc.rst:279
msgid "" msgid ""
@ -480,6 +562,16 @@ msgid ""
"signature, you will need to override :meth:`_from_iterable` with a " "signature, you will need to override :meth:`_from_iterable` with a "
"classmethod that can construct new instances from an iterable argument." "classmethod that can construct new instances from an iterable argument."
msgstr "" msgstr ""
"Comme une partie des opérations sur les ensembles créent de nouveaux "
"ensembles, les méthodes *mixins* par défaut ont besoin d'un moyen de créer "
"de nouvelles instances à partir d'un itérable. Le constructeur de classe est "
"supposé avoir une signature de la forme ``ClassName(iterable)``. Cette "
"supposition est faite par une méthode de classe interne appelée :meth:"
"`_from_iterable` qui appelle ``cls(iterable)`` pour construire un nouvel "
"ensemble. Si le :class:`Set` *mixin* est utilisé dans une classe avec un "
"constructeur de signature différente, fvous devrez surcharger :meth:"
"`_from_iterable` avec une méthode de classe qui peut construire de nouvelles "
"instances à partir d'un argument itérable."
#: ../Doc/library/collections.abc.rst:290 #: ../Doc/library/collections.abc.rst:290
msgid "" msgid ""
@ -487,6 +579,9 @@ msgid ""
"fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other " "fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other "
"operations will automatically follow suit." "operations will automatically follow suit."
msgstr "" msgstr ""
"Pour surcharger les comparaisons (a priori pour la rapidité, puisque la "
"sémantique est fixe), il faut redéfinir :meth:`__le__` et :meth:`__ge__`, "
"puis les autres opérations seront automatiquement adaptées."
#: ../Doc/library/collections.abc.rst:295 #: ../Doc/library/collections.abc.rst:295
msgid "" msgid ""
@ -496,13 +591,23 @@ msgid ""
"inherit from both :meth:`Set` and :meth:`Hashable`, then define ``__hash__ = " "inherit from both :meth:`Set` and :meth:`Hashable`, then define ``__hash__ = "
"Set._hash``." "Set._hash``."
msgstr "" msgstr ""
"La classe *mixin* :class:`Set` apporte une méthode :meth:`_hash` pour "
"calculer une valeur de hachage pour l'ensemble ; cependant :meth:`__hash__` "
"n'est pas défini car tous les ensembles ne sont pas hachables ou immuables. "
"Pour ajouter l'hachabilité d'un ensemble en utilisant les *mixins*, héritez "
"de :meth:`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = Set."
"_hash``."
#: ../Doc/library/collections.abc.rst:303 #: ../Doc/library/collections.abc.rst:303
msgid "" msgid ""
"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an " "`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an "
"example built on :class:`MutableSet`." "example built on :class:`MutableSet`."
msgstr "" msgstr ""
"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ pour un "
"exemple construit sur :class:`MutableSet`."
#: ../Doc/library/collections.abc.rst:306 #: ../Doc/library/collections.abc.rst:306
msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`."
msgstr "" msgstr ""
"Pour plus d'informations à propos des ABC, voir le module :mod:`abc` et la :"
"pep:`3119`."