# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2016, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Python 3.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-10-13 22:28+0200\n" "PO-Revision-Date: 2018-02-15 00:42+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.11\n" #: ../Doc/library/collections.abc.rst:2 msgid ":mod:`collections.abc` --- Abstract Base Classes for Containers" msgstr "" #: ../Doc/library/collections.abc.rst:10 msgid "Formerly, this module was part of the :mod:`collections` module." msgstr "" #: ../Doc/library/collections.abc.rst:13 msgid "**Source code:** :source:`Lib/_collections_abc.py`" msgstr "**Code source :** :source:`Lib/_collections_abc.py`" #: ../Doc/library/collections.abc.rst:23 msgid "" "This module provides :term:`abstract base classes ` " "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." msgstr "" #: ../Doc/library/collections.abc.rst:31 msgid "Collections Abstract Base Classes" msgstr "" #: ../Doc/library/collections.abc.rst:33 msgid "" "The collections module offers the following :term:`ABCs `:" msgstr "" #: ../Doc/library/collections.abc.rst:38 msgid "ABC" msgstr "ABC" #: ../Doc/library/collections.abc.rst:38 msgid "Inherits from" msgstr "Hérite de" #: ../Doc/library/collections.abc.rst:38 msgid "Abstract Methods" msgstr "Méthodes abstraites" #: ../Doc/library/collections.abc.rst:38 msgid "Mixin Methods" msgstr "" #: ../Doc/library/collections.abc.rst:40 msgid ":class:`Container`" msgstr ":class:`Container`" #: ../Doc/library/collections.abc.rst:40 msgid "``__contains__``" msgstr "``__contains__``" #: ../Doc/library/collections.abc.rst:41 msgid ":class:`Hashable`" msgstr ":class:`Hashable`" #: ../Doc/library/collections.abc.rst:41 msgid "``__hash__``" msgstr "``__hash__``" #: ../Doc/library/collections.abc.rst:42 ../Doc/library/collections.abc.rst:43 #: ../Doc/library/collections.abc.rst:44 msgid ":class:`Iterable`" msgstr ":class:`Iterable`" #: ../Doc/library/collections.abc.rst:42 ../Doc/library/collections.abc.rst:43 msgid "``__iter__``" msgstr "``__iter__``" #: ../Doc/library/collections.abc.rst:43 ../Doc/library/collections.abc.rst:45 msgid ":class:`Iterator`" msgstr ":class:`Iterator`" #: ../Doc/library/collections.abc.rst:43 msgid "``__next__``" msgstr "``__next__``" #: ../Doc/library/collections.abc.rst:44 msgid ":class:`Reversible`" msgstr "" #: ../Doc/library/collections.abc.rst:44 msgid "``__reversed__``" msgstr "" #: ../Doc/library/collections.abc.rst:45 msgid ":class:`Generator`" msgstr ":class:`Generator`" #: ../Doc/library/collections.abc.rst:45 ../Doc/library/collections.abc.rst:92 msgid "``send``, ``throw``" msgstr "``send``, ``throw``" #: ../Doc/library/collections.abc.rst:45 msgid "``close``, ``__iter__``, ``__next__``" msgstr "``close``, ``__iter__``, ``__next__``" #: ../Doc/library/collections.abc.rst:46 ../Doc/library/collections.abc.rst:85 msgid ":class:`Sized`" msgstr ":class:`Sized`" #: ../Doc/library/collections.abc.rst:46 ../Doc/library/collections.abc.rst:85 msgid "``__len__``" msgstr "``__len__``" #: ../Doc/library/collections.abc.rst:47 msgid ":class:`Callable`" msgstr ":class:`Callable`" #: ../Doc/library/collections.abc.rst:47 msgid "``__call__``" msgstr "``__call__``" #: ../Doc/library/collections.abc.rst:48 ../Doc/library/collections.abc.rst:64 #: ../Doc/library/collections.abc.rst:74 msgid ":class:`Collection`" msgstr "" #: ../Doc/library/collections.abc.rst:48 msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" #: ../Doc/library/collections.abc.rst:48 ../Doc/library/collections.abc.rst:64 msgid "``__contains__``, ``__iter__``, ``__len__``" msgstr "``__contains__``, ``__iter__``, ``__len__``" #: ../Doc/library/collections.abc.rst:52 ../Doc/library/collections.abc.rst:55 #: ../Doc/library/collections.abc.rst:61 msgid ":class:`Sequence`" msgstr ":class:`Sequence`" #: ../Doc/library/collections.abc.rst:52 msgid ":class:`Reversible`, :class:`Collection`" msgstr "" #: ../Doc/library/collections.abc.rst:52 ../Doc/library/collections.abc.rst:61 msgid "``__getitem__``, ``__len__``" msgstr "``__getitem__``, ``__len__``" #: ../Doc/library/collections.abc.rst:52 msgid "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" msgstr "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" #: ../Doc/library/collections.abc.rst:55 msgid ":class:`MutableSequence`" msgstr ":class:`MutableSequence`" #: ../Doc/library/collections.abc.rst:55 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" #: ../Doc/library/collections.abc.rst:55 msgid "" "Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, " "``pop``, ``remove``, and ``__iadd__``" msgstr "" #: ../Doc/library/collections.abc.rst:61 msgid ":class:`ByteString`" msgstr "" #: ../Doc/library/collections.abc.rst:61 msgid "Inherited :class:`Sequence` methods" msgstr "" #: ../Doc/library/collections.abc.rst:64 ../Doc/library/collections.abc.rst:68 msgid ":class:`Set`" msgstr ":class:`Set`" #: ../Doc/library/collections.abc.rst:64 msgid "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" msgstr "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" #: ../Doc/library/collections.abc.rst:68 msgid ":class:`MutableSet`" msgstr ":class:`MutableSet`" #: ../Doc/library/collections.abc.rst:68 msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" #: ../Doc/library/collections.abc.rst:68 msgid "" "Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" msgstr "" #: ../Doc/library/collections.abc.rst:74 ../Doc/library/collections.abc.rst:78 msgid ":class:`Mapping`" msgstr ":class:`Mapping`" #: ../Doc/library/collections.abc.rst:74 msgid "``__getitem__``, ``__iter__``, ``__len__``" msgstr "``__getitem__``, ``__iter__``, ``__len__``" #: ../Doc/library/collections.abc.rst:74 msgid "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__ne__``" msgstr "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__ne__``" #: ../Doc/library/collections.abc.rst:78 msgid ":class:`MutableMapping`" msgstr ":class:`MutableMapping`" #: ../Doc/library/collections.abc.rst:78 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" #: ../Doc/library/collections.abc.rst:78 msgid "" "Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " "``update``, and ``setdefault``" msgstr "" #: ../Doc/library/collections.abc.rst:85 ../Doc/library/collections.abc.rst:90 msgid ":class:`MappingView`" msgstr ":class:`MappingView`" #: ../Doc/library/collections.abc.rst:86 msgid ":class:`ItemsView`" msgstr ":class:`ItemsView`" #: ../Doc/library/collections.abc.rst:86 ../Doc/library/collections.abc.rst:88 msgid ":class:`MappingView`, :class:`Set`" msgstr ":class:`MappingView`, :class:`Set`" #: ../Doc/library/collections.abc.rst:86 ../Doc/library/collections.abc.rst:88 #: ../Doc/library/collections.abc.rst:90 msgid "``__contains__``, ``__iter__``" msgstr "``__contains__``, ``__iter__``" #: ../Doc/library/collections.abc.rst:88 msgid ":class:`KeysView`" msgstr ":class:`KeysView`" #: ../Doc/library/collections.abc.rst:90 msgid ":class:`ValuesView`" msgstr ":class:`ValuesView`" #: ../Doc/library/collections.abc.rst:91 ../Doc/library/collections.abc.rst:92 msgid ":class:`Awaitable`" msgstr ":class:`Awaitable`" #: ../Doc/library/collections.abc.rst:91 msgid "``__await__``" msgstr "``__await__``" #: ../Doc/library/collections.abc.rst:92 msgid ":class:`Coroutine`" msgstr ":class:`Coroutine`" #: ../Doc/library/collections.abc.rst:92 msgid "``close``" msgstr "``close``" #: ../Doc/library/collections.abc.rst:93 ../Doc/library/collections.abc.rst:94 msgid ":class:`AsyncIterable`" msgstr ":class:`AsyncIterable`" #: ../Doc/library/collections.abc.rst:93 ../Doc/library/collections.abc.rst:94 msgid "``__aiter__``" msgstr "``__aiter__``" #: ../Doc/library/collections.abc.rst:94 ../Doc/library/collections.abc.rst:95 msgid ":class:`AsyncIterator`" msgstr ":class:`AsyncIterator`" #: ../Doc/library/collections.abc.rst:94 msgid "``__anext__``" msgstr "``__anext__``" #: ../Doc/library/collections.abc.rst:95 msgid ":class:`AsyncGenerator`" msgstr ":class:`AsyncGenerator`" #: ../Doc/library/collections.abc.rst:95 msgid "``asend``, ``athrow``" msgstr "``asend``, ``athrow``" #: ../Doc/library/collections.abc.rst:95 msgid "``aclose``, ``__aiter__``, ``__anext__``" msgstr "``aclose``, ``__aiter__``, ``__anext__``" #: ../Doc/library/collections.abc.rst:104 msgid "" "ABCs for classes that provide respectively the methods :meth:" "`__contains__`, :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`." msgstr "" #: ../Doc/library/collections.abc.rst:109 msgid "ABC for classes that provide the :meth:`__iter__` method." msgstr "" #: ../Doc/library/collections.abc.rst:111 msgid "" "Checking ``isinstance(obj, Iterable)`` detects classes that are registered " "as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " "not detect classes that iterate with the :meth:`__getitem__` method. The " "only reliable way to determine whether an object is :term:`iterable` is to " "call ``iter(obj)``." msgstr "" #: ../Doc/library/collections.abc.rst:119 msgid "ABC for sized iterable container classes." msgstr "" #: ../Doc/library/collections.abc.rst:125 msgid "" "ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" "`~iterator.__next__` methods. See also the definition of :term:`iterator`." msgstr "" #: ../Doc/library/collections.abc.rst:131 msgid "" "ABC for iterable classes that also provide the :meth:`__reversed__` method." msgstr "" #: ../Doc/library/collections.abc.rst:138 msgid "" "ABC for generator classes that implement the protocol defined in :pep:`342` " "that extends iterators with the :meth:`~generator.send`, :meth:`~generator." "throw` and :meth:`~generator.close` methods. See also the definition of :" "term:`generator`." msgstr "" #: ../Doc/library/collections.abc.rst:149 msgid "ABCs for read-only and mutable :term:`sequences `." msgstr "" #: ../Doc/library/collections.abc.rst:151 msgid "" "Implementation note: Some of the mixin methods, such as :meth:`__iter__`, :" "meth:`__reversed__` and :meth:`index`, make repeated calls to the " "underlying :meth:`__getitem__` method. Consequently, if :meth:`__getitem__` " "is implemented with constant access speed, the mixin methods will have " "linear performance; however, if the underlying method is linear (as it would " "be with a linked list), the mixins will have quadratic performance and will " "likely need to be overridden." msgstr "" #: ../Doc/library/collections.abc.rst:160 msgid "The index() method added support for *stop* and *start* arguments." msgstr "" #: ../Doc/library/collections.abc.rst:167 msgid "ABCs for read-only and mutable sets." msgstr "" #: ../Doc/library/collections.abc.rst:172 msgid "ABCs for read-only and mutable :term:`mappings `." msgstr "" #: ../Doc/library/collections.abc.rst:179 msgid "" "ABCs for mapping, items, keys, and values :term:`views `." msgstr "" #: ../Doc/library/collections.abc.rst:183 msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " "expressions. Custom implementations must provide the :meth:`__await__` " "method." msgstr "" #: ../Doc/library/collections.abc.rst:187 msgid "" ":term:`Coroutine` objects and instances of the :class:`~collections.abc." "Coroutine` ABC are all instances of this ABC." msgstr "" #: ../Doc/library/collections.abc.rst:191 msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" "`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " "though they do not have an :meth:`__await__` method. Using " "``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:" "`inspect.isawaitable` to detect them." msgstr "" #: ../Doc/library/collections.abc.rst:201 msgid "" "ABC for coroutine compatible classes. These implement the following " "methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" "`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations " "must also implement :meth:`__await__`. All :class:`Coroutine` instances are " "also instances of :class:`Awaitable`. See also the definition of :term:" "`coroutine`." msgstr "" #: ../Doc/library/collections.abc.rst:209 msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" "`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " "though they do not have an :meth:`__await__` method. Using " "``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:" "`inspect.isawaitable` to detect them." msgstr "" #: ../Doc/library/collections.abc.rst:219 msgid "" "ABC for classes that provide ``__aiter__`` method. See also the definition " "of :term:`asynchronous iterable`." msgstr "" #: ../Doc/library/collections.abc.rst:226 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." msgstr "" #: ../Doc/library/collections.abc.rst:233 msgid "" "ABC for asynchronous generator classes that implement the protocol defined " "in :pep:`525` and :pep:`492`." msgstr "" #: ../Doc/library/collections.abc.rst:239 msgid "" "These ABCs allow us to ask classes or instances if they provide particular " "functionality, for example::" msgstr "" #: ../Doc/library/collections.abc.rst:246 msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " "classes supporting container APIs. For example, to write a class supporting " "the full :class:`Set` API, it is only necessary to supply the three " "underlying abstract methods: :meth:`__contains__`, :meth:`__iter__`, and :" "meth:`__len__`. The ABC supplies the remaining methods such as :meth:" "`__and__` and :meth:`isdisjoint`::" msgstr "" #: ../Doc/library/collections.abc.rst:275 msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgstr "" #: ../Doc/library/collections.abc.rst:278 msgid "" "Since some set operations create new sets, the default mixin methods need a " "way to create new instances from an iterable. The class constructor is " "assumed to have a signature in the form ``ClassName(iterable)``. That " "assumption is factored-out to an internal classmethod called :meth:" "`_from_iterable` which calls ``cls(iterable)`` to produce a new set. If the :" "class:`Set` mixin is being used in a class with a different constructor " "signature, you will need to override :meth:`_from_iterable` with a " "classmethod that can construct new instances from an iterable argument." msgstr "" #: ../Doc/library/collections.abc.rst:289 msgid "" "To override the comparisons (presumably for speed, as the semantics are " "fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other " "operations will automatically follow suit." msgstr "" #: ../Doc/library/collections.abc.rst:294 msgid "" "The :class:`Set` mixin provides a :meth:`_hash` method to compute a hash " "value for the set; however, :meth:`__hash__` is not defined because not all " "sets are hashable or immutable. To add set hashability using mixins, " "inherit from both :meth:`Set` and :meth:`Hashable`, then define ``__hash__ = " "Set._hash``." msgstr "" #: ../Doc/library/collections.abc.rst:302 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." msgstr "" #: ../Doc/library/collections.abc.rst:305 msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgstr ""