diff --git a/dict b/dict index e78287b3..c7cdeb04 100644 --- a/dict +++ b/dict @@ -54,9 +54,11 @@ métacaractère métacaractères métaclasse métaclasses +muabilité muable muables -muabilité +multiensemble +multiensembles namespace pip pourcent diff --git a/library/collections.po b/library/collections.po index 0557ba21..3b7bf5c0 100644 --- a/library/collections.po +++ b/library/collections.po @@ -5,29 +5,33 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.6\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2018-06-28 15:29+0200\n" +"PO-Revision-Date: 2018-10-05 15:34+0200\n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Guillaume Fayard \n" +"X-Generator: Poedit 2.1.1\n" #: ../Doc/library/collections.rst:2 msgid ":mod:`collections` --- Container datatypes" -msgstr "" +msgstr ":mod:`collections` --- Types de données de conteneurs" #: ../Doc/library/collections.rst:10 msgid "**Source code:** :source:`Lib/collections/__init__.py`" -msgstr "" +msgstr "**Code source :** :source:`Lib/collections/__init__.py`" #: ../Doc/library/collections.rst:20 msgid "" -"This module implements specialized container datatypes providing " -"alternatives to Python's general purpose built-in containers, :class:" -"`dict`, :class:`list`, :class:`set`, and :class:`tuple`." +"This module implements specialized container datatypes providing alternatives to " +"Python's general purpose built-in containers, :class:`dict`, :class:`list`, :class:" +"`set`, and :class:`tuple`." msgstr "" +"Ce module implémente des types de données de conteneurs spécialisés qui apportent des " +"alternatives aux conteneurs natifs de Python plus généraux :class:`dict`, :class:" +"`list`, :class:`set` et :class:`tuple`." #: ../Doc/library/collections.rst:25 msgid ":func:`namedtuple`" @@ -35,7 +39,7 @@ msgstr ":func:`namedtuple`" #: ../Doc/library/collections.rst:25 msgid "factory function for creating tuple subclasses with named fields" -msgstr "" +msgstr "fonction permettant de créer des sous-classes de ``tuple`` avec des champs nommés" #: ../Doc/library/collections.rst:26 msgid ":class:`deque`" @@ -44,6 +48,8 @@ msgstr ":class:`deque`" #: ../Doc/library/collections.rst:26 msgid "list-like container with fast appends and pops on either end" msgstr "" +"conteneur se comportant comme une liste avec des ajouts et retraits rapides à chaque " +"extrémité" #: ../Doc/library/collections.rst:27 msgid ":class:`ChainMap`" @@ -52,6 +58,8 @@ msgstr ":class:`ChainMap`" #: ../Doc/library/collections.rst:27 msgid "dict-like class for creating a single view of multiple mappings" msgstr "" +"classe semblable aux dictionnaires qui crée une unique vue à partir de plusieurs " +"dictionnaires" #: ../Doc/library/collections.rst:28 msgid ":class:`Counter`" @@ -59,7 +67,7 @@ msgstr ":class:`Counter`" #: ../Doc/library/collections.rst:28 msgid "dict subclass for counting hashable objects" -msgstr "" +msgstr "sous-classe de ``dict`` pour compter des objets hachables" #: ../Doc/library/collections.rst:29 msgid ":class:`OrderedDict`" @@ -68,6 +76,8 @@ msgstr ":class:`OrderedDict`" #: ../Doc/library/collections.rst:29 msgid "dict subclass that remembers the order entries were added" msgstr "" +"sous-classe de ``dict`` qui garde en mémoire l'ordre dans lequel les entrées ont été " +"ajoutées" #: ../Doc/library/collections.rst:30 msgid ":class:`defaultdict`" @@ -76,6 +86,8 @@ msgstr ":class:`defaultdict`" #: ../Doc/library/collections.rst:30 msgid "dict subclass that calls a factory function to supply missing values" msgstr "" +"sous-classe de ``dict`` qui appelle une fonction de fabrication en cas de valeur " +"manquante" #: ../Doc/library/collections.rst:31 msgid ":class:`UserDict`" @@ -83,7 +95,7 @@ msgstr ":class:`UserDict`" #: ../Doc/library/collections.rst:31 msgid "wrapper around dictionary objects for easier dict subclassing" -msgstr "" +msgstr "surcouche autour des objets dictionnaires pour faciliter l'héritage de ``dict``" #: ../Doc/library/collections.rst:32 msgid ":class:`UserList`" @@ -91,7 +103,7 @@ msgstr ":class:`UserList`" #: ../Doc/library/collections.rst:32 msgid "wrapper around list objects for easier list subclassing" -msgstr "" +msgstr "surcouche autour des objets listes pour faciliter l'héritage de ``list``" #: ../Doc/library/collections.rst:33 msgid ":class:`UserString`" @@ -100,1089 +112,1455 @@ msgstr ":class:`UserString`" #: ../Doc/library/collections.rst:33 msgid "wrapper around string objects for easier string subclassing" msgstr "" +"surcouche autour des objets chaînes de caractères pour faciliter l'héritage de ``str``" #: ../Doc/library/collections.rst:36 msgid "" -"Moved :ref:`collections-abstract-base-classes` to the :mod:`collections.abc` " -"module. For backwards compatibility, they continue to be visible in this " -"module through Python 3.7. Subsequently, they will be removed entirely." +"Moved :ref:`collections-abstract-base-classes` to the :mod:`collections.abc` module. " +"For backwards compatibility, they continue to be visible in this module through Python " +"3.7. Subsequently, they will be removed entirely." msgstr "" +"Les :ref:`collections-abstract-base-classes` ont été déplacées vers le module :mod:" +"`collections.abc`. Pour assurer la rétrocompatibilité, elles sont toujours disponibles " +"dans ce module en Python 3.7 mais seront ensuite totalement supprimées." #: ../Doc/library/collections.rst:43 msgid ":class:`ChainMap` objects" -msgstr ":class:`ChainMap` objects" +msgstr "Objets :class:`ChainMap`" #: ../Doc/library/collections.rst:47 msgid "" -"A :class:`ChainMap` class is provided for quickly linking a number of " -"mappings so they can be treated as a single unit. It is often much faster " -"than creating a new dictionary and running multiple :meth:`~dict.update` " -"calls." +"A :class:`ChainMap` class is provided for quickly linking a number of mappings so they " +"can be treated as a single unit. It is often much faster than creating a new " +"dictionary and running multiple :meth:`~dict.update` calls." msgstr "" +"Le module fournit une classe :class:`ChainMap` afin de réunir rapidement plusieurs " +"dictionnaires en une unique entité. Cela est souvent plus rapide que de créer un " +"nouveau dictionnaire et d'effectuer plusieurs appels de :meth:`~dict.update`." #: ../Doc/library/collections.rst:51 -msgid "" -"The class can be used to simulate nested scopes and is useful in templating." +msgid "The class can be used to simulate nested scopes and is useful in templating." msgstr "" +"Cette classe peut être utilisée pour simuler des portées imbriquées, elle est aussi " +"utile pour le *templating*." #: ../Doc/library/collections.rst:55 msgid "" -"A :class:`ChainMap` groups multiple dicts or other mappings together to " -"create a single, updateable view. If no *maps* are specified, a single " -"empty dictionary is provided so that a new chain always has at least one " -"mapping." +"A :class:`ChainMap` groups multiple dicts or other mappings together to create a " +"single, updateable view. If no *maps* are specified, a single empty dictionary is " +"provided so that a new chain always has at least one mapping." msgstr "" +"Un objet :class:`ChainMap` regroupe plusieurs dictionnaires (ou autres tableaux de " +"correspondance) en une vue que l'on peut mettre à jour. Si le paramètre *maps* est " +"vide, un dictionnaire vide est fourni de telle manière qu'une nouvelle chaîne possède " +"toujours au moins un dictionnaire." #: ../Doc/library/collections.rst:59 msgid "" -"The underlying mappings are stored in a list. That list is public and can " -"be accessed or updated using the *maps* attribute. There is no other state." +"The underlying mappings are stored in a list. That list is public and can be accessed " +"or updated using the *maps* attribute. There is no other state." msgstr "" +"Les dictionnaires sous-jacents sont stockés dans une liste. Celle-ci est publique et " +"peut être consultée ou mise à jour via l'attribut *maps*. Il n'y a pas d'autre état." #: ../Doc/library/collections.rst:62 msgid "" -"Lookups search the underlying mappings successively until a key is found. " -"In contrast, writes, updates, and deletions only operate on the first " -"mapping." +"Lookups search the underlying mappings successively until a key is found. In contrast, " +"writes, updates, and deletions only operate on the first mapping." msgstr "" +"Les recherches s'effectuent successivement dans chaque dictionnaire jusqu'à la première " +"clé correspondante. En revanche, les écritures, mises à jour et suppressions " +"n'affectent que le premier dictionnaire." #: ../Doc/library/collections.rst:65 msgid "" -"A :class:`ChainMap` incorporates the underlying mappings by reference. So, " -"if one of the underlying mappings gets updated, those changes will be " -"reflected in :class:`ChainMap`." +"A :class:`ChainMap` incorporates the underlying mappings by reference. So, if one of " +"the underlying mappings gets updated, those changes will be reflected in :class:" +"`ChainMap`." msgstr "" +"Un objet :class:`ChainMap` incorpore les dictionnaires sous-jacents par leur référence. " +"Ainsi, si l'un d'eux est modifié, les changements affectent également la :class:" +"`ChainMap`." #: ../Doc/library/collections.rst:69 msgid "" -"All of the usual dictionary methods are supported. In addition, there is a " -"*maps* attribute, a method for creating new subcontexts, and a property for " -"accessing all but the first mapping:" +"All of the usual dictionary methods are supported. In addition, there is a *maps* " +"attribute, a method for creating new subcontexts, and a property for accessing all but " +"the first mapping:" msgstr "" +"Toutes les méthodes usuelles des dictionnaires sont gérées. De plus, cette classe " +"fournit un attribut *maps*, une méthode pour créer de nouveaux sous-contextes et une " +"propriété pour accéder à tous les dictionnaires sous-jacents excepté le premier :" #: ../Doc/library/collections.rst:75 msgid "" -"A user updateable list of mappings. The list is ordered from first-searched " -"to last-searched. It is the only stored state and can be modified to change " -"which mappings are searched. The list should always contain at least one " -"mapping." +"A user updateable list of mappings. The list is ordered from first-searched to last-" +"searched. It is the only stored state and can be modified to change which mappings are " +"searched. The list should always contain at least one mapping." msgstr "" +"Liste de dictionnaires éditable par l'utilisateur et classée selon l'ordre de " +"recherche. Il s'agit de l'unique état stocké et elle peut être modifiée pour changer " +"l'ordre de recherche. La liste doit toujours contenir au moins un dictionnaire." #: ../Doc/library/collections.rst:82 msgid "" -"Returns a new :class:`ChainMap` containing a new map followed by all of the " -"maps in the current instance. If ``m`` is specified, it becomes the new map " -"at the front of the list of mappings; if not specified, an empty dict is " -"used, so that a call to ``d.new_child()`` is equivalent to: ``ChainMap({}, " -"*d.maps)``. This method is used for creating subcontexts that can be " -"updated without altering values in any of the parent mappings." +"Returns a new :class:`ChainMap` containing a new map followed by all of the maps in the " +"current instance. If ``m`` is specified, it becomes the new map at the front of the " +"list of mappings; if not specified, an empty dict is used, so that a call to ``d." +"new_child()`` is equivalent to: ``ChainMap({}, *d.maps)``. This method is used for " +"creating subcontexts that can be updated without altering values in any of the parent " +"mappings." msgstr "" +"Renvoie un nouvel objet :class:`ChainMap` contenant un nouveau dictionnaire suivi par " +"tous les autres de l'instance actuelle. Si ``m`` est spécifié, il devient le nouveau " +"dictionnaire au début de la liste ; sinon, un dictionnaire vide est utilisé, de telle " +"manière qu'appeler ``d.new_child()`` équivaut à appeler ``ChainMap({}, *d.maps)``. " +"Cette méthode est utile pour créer des sous-contextes qui peuvent être mis à jour sans " +"altérer les valeurs dans les dictionnaires parents." #: ../Doc/library/collections.rst:90 msgid "The optional ``m`` parameter was added." -msgstr "" +msgstr "Ajout du paramètre optionnel ``m``." #: ../Doc/library/collections.rst:95 msgid "" -"Property returning a new :class:`ChainMap` containing all of the maps in the " -"current instance except the first one. This is useful for skipping the " -"first map in the search. Use cases are similar to those for the :keyword:" -"`nonlocal` keyword used in :term:`nested scopes `. The use " -"cases also parallel those for the built-in :func:`super` function. A " -"reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``." +"Property returning a new :class:`ChainMap` containing all of the maps in the current " +"instance except the first one. This is useful for skipping the first map in the " +"search. Use cases are similar to those for the :keyword:`nonlocal` keyword used in :" +"term:`nested scopes `. The use cases also parallel those for the built-" +"in :func:`super` function. A reference to ``d.parents`` is equivalent to: " +"``ChainMap(*d.maps[1:])``." msgstr "" +"Propriété qui renvoie un nouvel objet :class:`ChainMap` contenant tous les " +"dictionnaires de l'instance actuelle hormis le premier. Cette propriété est utile pour " +"ignorer le premier dictionnaire dans les recherches ; son utilisation rappelle le mot-" +"clé :keyword:`nonlocal` (utilisé pour les :term:`portées imbriquées `), " +"ou bien la fonction native :func:`super`. Une référence à ``d.parents`` est équivalente " +"à : ``ChainMap(*d.maps[1:])``." #: ../Doc/library/collections.rst:106 msgid "" -"The `MultiContext class `_ in the Enthought `CodeTools package " -"`_ has options to support writing to " -"any mapping in the chain." +"The `MultiContext class `_ in the Enthought `CodeTools package `_ has options to support writing to any mapping in the chain." msgstr "" +"La `classe MultiContext `_ dans le `package CodeTools `_ d'Enthought possède des options pour gérer l'écriture dans n'importe quel " +"dictionnaire de la chaîne." #: ../Doc/library/collections.rst:112 msgid "" -"Django's `Context class `_ for templating is a read-only chain of mappings. It " -"also features pushing and popping of contexts similar to the :meth:" -"`~collections.ChainMap.new_child` method and the :attr:`~collections." -"ChainMap.parents` property." +"Django's `Context class `_ for templating is a read-only chain of mappings. It also features " +"pushing and popping of contexts similar to the :meth:`~collections.ChainMap.new_child` " +"method and the :attr:`~collections.ChainMap.parents` property." msgstr "" +"La `classe de contexte de Django `_ pour la création de modèles est une chaîne de dictionnaires en " +"lecture seule. Elle comporte également des fonctionnalités d'ajouts et de retraits de " +"contextes similaires à la méthode :meth:`~collections.ChainMap.new_child` et à la " +"propriété :attr:`~collections.ChainMap.parents`." #: ../Doc/library/collections.rst:119 msgid "" -"The `Nested Contexts recipe `_ " -"has options to control whether writes and other mutations apply only to the " -"first mapping or to any mapping in the chain." +"The `Nested Contexts recipe `_ has " +"options to control whether writes and other mutations apply only to the first mapping " +"or to any mapping in the chain." msgstr "" +"`Le Cas pratique des contextes imbriqués `_ a des options pour contrôler si les écritures et autres mutations ne s'appliquent " +"qu'au premier ou à un autre dictionnaire de la chaîne." #: ../Doc/library/collections.rst:124 msgid "" -"A `greatly simplified read-only version of Chainmap `_." +"A `greatly simplified read-only version of Chainmap `_." msgstr "" +"Une `version grandement simplifiée de Chainmap en lecture seule `_." #: ../Doc/library/collections.rst:129 msgid ":class:`ChainMap` Examples and Recipes" -msgstr "" +msgstr "Exemples et cas pratiques utilisant :class:`ChainMap`" #: ../Doc/library/collections.rst:131 msgid "This section shows various approaches to working with chained maps." msgstr "" +"Cette partie montre diverses approches afin de travailler avec les dictionnaires " +"chaînés." #: ../Doc/library/collections.rst:134 msgid "Example of simulating Python's internal lookup chain::" -msgstr "" +msgstr "Exemple 1 : simulation de la chaîne de recherche interne de Python : ::" #: ../Doc/library/collections.rst:139 msgid "" -"Example of letting user specified command-line arguments take precedence " -"over environment variables which in turn take precedence over default " -"values::" +"Example of letting user specified command-line arguments take precedence over " +"environment variables which in turn take precedence over default values::" msgstr "" +"Exemple 2 : spécification d'une hiérarchie pour les options : ligne de commande, " +"variable d'environnement, valeurs par défaut : ::" #: ../Doc/library/collections.rst:156 msgid "" -"Example patterns for using the :class:`ChainMap` class to simulate nested " -"contexts::" +"Example patterns for using the :class:`ChainMap` class to simulate nested contexts::" msgstr "" +"Exemple 3 : modèles pour simuler des contexte imbriqués avec la classe :class:" +"`ChainMap` ::" #: ../Doc/library/collections.rst:175 msgid "" -"The :class:`ChainMap` class only makes updates (writes and deletions) to the " -"first mapping in the chain while lookups will search the full chain. " -"However, if deep writes and deletions are desired, it is easy to make a " -"subclass that updates keys found deeper in the chain::" +"The :class:`ChainMap` class only makes updates (writes and deletions) to the first " +"mapping in the chain while lookups will search the full chain. However, if deep writes " +"and deletions are desired, it is easy to make a subclass that updates keys found deeper " +"in the chain::" msgstr "" +"La classe :class:`ChainMap` ne met à jour (écriture et suppression) que le premier " +"dictionnaire de la chaîne, alors qu'une recherche inspecte toute la chaîne. Cependant, " +"si l'on veut effectuer des écritures ou suppressions en profondeur, on peut facilement " +"faire une sous-classe qui met à jour les clés trouvées de la chaîne en profondeur : ::" -#: ../Doc/library/collections.rst:206 +#: ../Doc/library/collections.rst:205 msgid ":class:`Counter` objects" -msgstr "" +msgstr "Objets :class:`Counter`" -#: ../Doc/library/collections.rst:208 +#: ../Doc/library/collections.rst:207 +msgid "A counter tool is provided to support convenient and rapid tallies. For example::" +msgstr "" +"Ce module fournit un outil pour effectuer rapidement et facilement des dénombrements. " +"Par exemple : ::" + +#: ../Doc/library/collections.rst:226 msgid "" -"A counter tool is provided to support convenient and rapid tallies. For " -"example::" +"A :class:`Counter` is a :class:`dict` subclass for counting hashable objects. It is an " +"unordered collection where elements are stored as dictionary keys and their counts are " +"stored as dictionary values. Counts are allowed to be any integer value including zero " +"or negative counts. The :class:`Counter` class is similar to bags or multisets in " +"other languages." msgstr "" +"La classe :class:`Counter` est une sous-classe de :class:`dict` qui permet le " +"dénombrement d'objets hachables. Il s'agit d'une collection non ordonnée dans laquelle " +"les éléments sont stockés comme des clés de dictionnaire et leurs nombres d’occurrences " +"respectifs comme leurs valeurs. Ceux-ci peuvent être des entiers relatifs (positifs, " +"négatifs ou nuls). La classe :class:`Counter` est similaire aux sacs ou aux " +"multiensembles dans d'autres langages." -#: ../Doc/library/collections.rst:227 +#: ../Doc/library/collections.rst:232 msgid "" -"A :class:`Counter` is a :class:`dict` subclass for counting hashable " -"objects. It is an unordered collection where elements are stored as " -"dictionary keys and their counts are stored as dictionary values. Counts " -"are allowed to be any integer value including zero or negative counts. The :" -"class:`Counter` class is similar to bags or multisets in other languages." +"Elements are counted from an *iterable* or initialized from another *mapping* (or " +"counter):" msgstr "" +"Les éléments sont comptés à partir d'un itérable ou initialisés à partir d'un autre " +"dictionnaire (ou compteur) :" -#: ../Doc/library/collections.rst:233 +#: ../Doc/library/collections.rst:240 msgid "" -"Elements are counted from an *iterable* or initialized from another " -"*mapping* (or counter):" +"Counter objects have a dictionary interface except that they return a zero count for " +"missing items instead of raising a :exc:`KeyError`:" msgstr "" +"Les objets Counter ont une interface de dictionnaire, à l'exception près qu'ils " +"renvoient zéro au lieu de lever une exception :exc:`KeyError` pour des éléments " +"manquants :" -#: ../Doc/library/collections.rst:241 +#: ../Doc/library/collections.rst:247 msgid "" -"Counter objects have a dictionary interface except that they return a zero " -"count for missing items instead of raising a :exc:`KeyError`:" +"Setting a count to zero does not remove an element from a counter. Use ``del`` to " +"remove it entirely:" msgstr "" +"Mettre un comptage à zéro pour un élément ne le retire pas de l'objet Counter. Il faut " +"utiliser ``del`` pour le supprimer complètement :" -#: ../Doc/library/collections.rst:248 +#: ../Doc/library/collections.rst:256 +msgid "Counter objects support three methods beyond those available for all dictionaries:" +msgstr "" +"En plus des méthodes disponibles pour tous les dictionnaires, les objets compteurs " +"gèrent trois méthodes supplémentaires :" + +#: ../Doc/library/collections.rst:261 msgid "" -"Setting a count to zero does not remove an element from a counter. Use " -"``del`` to remove it entirely:" +"Return an iterator over elements repeating each as many times as its count. Elements " +"are returned in arbitrary order. If an element's count is less than one, :meth:" +"`elements` will ignore it." msgstr "" +"Renvoie un itérateur sur chaque élément en le répétant autant de fois que la valeur du " +"compteur associé. Les éléments sont renvoyés dans un ordre arbitraire. Si le comptage " +"d'un élément est strictement inférieur à 1, alors :meth:`elements` l'ignore." -#: ../Doc/library/collections.rst:257 +#: ../Doc/library/collections.rst:271 msgid "" -"Counter objects support three methods beyond those available for all " -"dictionaries:" +"Return a list of the *n* most common elements and their counts from the most common to " +"the least. If *n* is omitted or ``None``, :meth:`most_common` returns *all* elements " +"in the counter. Elements with equal counts are ordered arbitrarily:" msgstr "" +"Renvoie une liste des *n* éléments les plus nombreux et leur valeur respective dans " +"l'ordre décroissant. Si *n* n'est pas fourni ou vaut ``None``, :meth:`most_common` " +"renvoie *tous* les éléments du compteur. Les éléments qui ont le même nombre " +"d'occurrences sont ordonnés de manière arbitraire :" -#: ../Doc/library/collections.rst:262 +#: ../Doc/library/collections.rst:281 msgid "" -"Return an iterator over elements repeating each as many times as its count. " -"Elements are returned in arbitrary order. If an element's count is less " -"than one, :meth:`elements` will ignore it." +"Elements are subtracted from an *iterable* or from another *mapping* (or counter). " +"Like :meth:`dict.update` but subtracts counts instead of replacing them. Both inputs " +"and outputs may be zero or negative." msgstr "" +"Les éléments sont soustraits à partir d'un itérable ou d'un autre dictionnaire (ou " +"compteur). Cette méthode se comporte comme :meth:`dict.update` mais soustrait les " +"nombres d'occurrences au lieu de les remplacer. Les entrées et sorties peuvent être " +"négatives ou nulles." -#: ../Doc/library/collections.rst:272 +#: ../Doc/library/collections.rst:293 msgid "" -"Return a list of the *n* most common elements and their counts from the most " -"common to the least. If *n* is omitted or ``None``, :meth:`most_common` " -"returns *all* elements in the counter. Elements with equal counts are " -"ordered arbitrarily:" +"The usual dictionary methods are available for :class:`Counter` objects except for two " +"which work differently for counters." msgstr "" +"Les méthodes usuelles des dictionnaires sont disponibles pour les objets :class:" +"`Counter` à l'exception de deux méthodes qui fonctionnent différemment pour les " +"compteurs." -#: ../Doc/library/collections.rst:282 -msgid "" -"Elements are subtracted from an *iterable* or from another *mapping* (or " -"counter). Like :meth:`dict.update` but subtracts counts instead of " -"replacing them. Both inputs and outputs may be zero or negative." -msgstr "" - -#: ../Doc/library/collections.rst:294 -msgid "" -"The usual dictionary methods are available for :class:`Counter` objects " -"except for two which work differently for counters." -msgstr "" - -#: ../Doc/library/collections.rst:299 +#: ../Doc/library/collections.rst:298 msgid "This class method is not implemented for :class:`Counter` objects." -msgstr "" +msgstr "Cette méthode de classe n'est pas implémentée pour les objets :class:`Counter`." -#: ../Doc/library/collections.rst:303 +#: ../Doc/library/collections.rst:302 msgid "" -"Elements are counted from an *iterable* or added-in from another *mapping* " -"(or counter). Like :meth:`dict.update` but adds counts instead of replacing " -"them. Also, the *iterable* is expected to be a sequence of elements, not a " -"sequence of ``(key, value)`` pairs." +"Elements are counted from an *iterable* or added-in from another *mapping* (or " +"counter). Like :meth:`dict.update` but adds counts instead of replacing them. Also, " +"the *iterable* is expected to be a sequence of elements, not a sequence of ``(key, " +"value)`` pairs." msgstr "" +"Les éléments sont comptés à partir d'un itérable ou ajoutés d'un autre dictionnaire (ou " +"compteur). Cette méthode se comporte comme :meth:`dict.update` mais additionne les " +"nombres d'occurrences au lieu de les remplacer. De plus, l'itérable doit être une " +"séquence d'éléments et non une séquence de paires ``(clé, valeur)``." -#: ../Doc/library/collections.rst:308 +#: ../Doc/library/collections.rst:307 msgid "Common patterns for working with :class:`Counter` objects::" -msgstr "" +msgstr "Opérations usuelles sur les objets :class:`Counter` : ::" -#: ../Doc/library/collections.rst:320 +#: ../Doc/library/collections.rst:319 msgid "" -"Several mathematical operations are provided for combining :class:`Counter` " -"objects to produce multisets (counters that have counts greater than zero). " -"Addition and subtraction combine counters by adding or subtracting the " -"counts of corresponding elements. Intersection and union return the minimum " -"and maximum of corresponding counts. Each operation can accept inputs with " -"signed counts, but the output will exclude results with counts of zero or " -"less." +"Several mathematical operations are provided for combining :class:`Counter` objects to " +"produce multisets (counters that have counts greater than zero). Addition and " +"subtraction combine counters by adding or subtracting the counts of corresponding " +"elements. Intersection and union return the minimum and maximum of corresponding " +"counts. Each operation can accept inputs with signed counts, but the output will " +"exclude results with counts of zero or less." msgstr "" +"Quelques opérations mathématiques sont fournies pour combiner des objets :class:" +"`Counter` afin de créer des multiensembles (des compteurs dont les dénombrements des " +"éléments sont strictement supérieurs à zéro). Les additions et soustractions combinent " +"les compteurs en ajoutant ou retranchant les nombres d'occurrences des éléments " +"correspondants. Les intersections et unions renvoient les minimums et maximums des " +"comptages correspondants. Chaque opération peut accepter des entrées avec des comptages " +"relatifs, mais la sortie exclut les résultats avec des comptages négatifs ou nuls." -#: ../Doc/library/collections.rst:338 +#: ../Doc/library/collections.rst:337 msgid "" -"Unary addition and subtraction are shortcuts for adding an empty counter or " -"subtracting from an empty counter." +"Unary addition and subtraction are shortcuts for adding an empty counter or subtracting " +"from an empty counter." msgstr "" +"L'addition et la soustraction unaires (avec un seul terme) sont des raccourcis pour " +"respectivement additionner un compteur avec un compteur vide ou et pour retrancher un " +"compteur d'un compteur vide." -#: ../Doc/library/collections.rst:347 +#: ../Doc/library/collections.rst:346 +msgid "Added support for unary plus, unary minus, and in-place multiset operations." +msgstr "" +"Ajout de la gestion des additions et soustractions unaires, et des remplacements dans " +"les multiensembles." + +#: ../Doc/library/collections.rst:351 msgid "" -"Added support for unary plus, unary minus, and in-place multiset operations." +"Counters were primarily designed to work with positive integers to represent running " +"counts; however, care was taken to not unnecessarily preclude use cases needing other " +"types or negative values. To help with those use cases, this section documents the " +"minimum range and type restrictions." msgstr "" +"Les compteurs ont été conçus essentiellement pour fonctionner avec des entiers naturels " +"pour représenter les dénombrements en cours ; cependant, les cas d'utilisation " +"nécessitant d'autres types ou des valeurs négatives n'ont pas été écartés. Pour vous " +"aider dans ces cas particuliers, cette section documente la plage minimale et les " +"restrictions de type." -#: ../Doc/library/collections.rst:352 +#: ../Doc/library/collections.rst:356 msgid "" -"Counters were primarily designed to work with positive integers to represent " -"running counts; however, care was taken to not unnecessarily preclude use " -"cases needing other types or negative values. To help with those use cases, " -"this section documents the minimum range and type restrictions." +"The :class:`Counter` class itself is a dictionary subclass with no restrictions on its " +"keys and values. The values are intended to be numbers representing counts, but you " +"*could* store anything in the value field." msgstr "" +"La classe :class:`Counter` est elle-même une sous-classe de dictionnaire sans " +"restriction particulière sur ces clés ou valeurs. Les valeurs ont vocation à être des " +"nombres représentants des comptages, mais il est *possible* de stocker n'importe quel " +"type de valeur." -#: ../Doc/library/collections.rst:357 +#: ../Doc/library/collections.rst:360 msgid "" -"The :class:`Counter` class itself is a dictionary subclass with no " -"restrictions on its keys and values. The values are intended to be numbers " -"representing counts, but you *could* store anything in the value field." +"The :meth:`~Counter.most_common` method requires only that the values be orderable." msgstr "" +"La méthode :meth:`~Counter.most_common` exige uniquement que les valeurs soient " +"ordonnables." -#: ../Doc/library/collections.rst:361 +#: ../Doc/library/collections.rst:362 msgid "" -"The :meth:`~Counter.most_common` method requires only that the values be " -"orderable." +"For in-place operations such as ``c[key] += 1``, the value type need only support " +"addition and subtraction. So fractions, floats, and decimals would work and negative " +"values are supported. The same is also true for :meth:`~Counter.update` and :meth:" +"`~Counter.subtract` which allow negative and zero values for both inputs and outputs." msgstr "" +"Les opérations de remplacement telles que ``c[key] += 1`` exigent une valeur dont le " +"type gère l'addition et la soustraction. Cela inclut donc les fractions, les flottants " +"et les décimaux, y compris négatifs. Il en va de même pour :meth:`~Counter.update` et :" +"meth:`~Cointer.substract` qui acceptent des valeurs négatives ou nulles dans les " +"entrées et sorties." -#: ../Doc/library/collections.rst:363 +#: ../Doc/library/collections.rst:368 msgid "" -"For in-place operations such as ``c[key] += 1``, the value type need only " -"support addition and subtraction. So fractions, floats, and decimals would " -"work and negative values are supported. The same is also true for :meth:" -"`~Counter.update` and :meth:`~Counter.subtract` which allow negative and " -"zero values for both inputs and outputs." +"The multiset methods are designed only for use cases with positive values. The inputs " +"may be negative or zero, but only outputs with positive values are created. There are " +"no type restrictions, but the value type needs to support addition, subtraction, and " +"comparison." msgstr "" +"Les méthodes de multiensembles sont uniquement conçues pour les cas d'utilisation avec " +"des valeurs positives. Les entrées peuvent contenir des valeurs négatives ou nulles, " +"mais seules les sorties avec des valeurs positives sont créées. Il n'y a pas de " +"restriction de type, mais les types des valeurs doivent gérer l'addition, la " +"soustraction et la comparaison." -#: ../Doc/library/collections.rst:369 +#: ../Doc/library/collections.rst:373 msgid "" -"The multiset methods are designed only for use cases with positive values. " -"The inputs may be negative or zero, but only outputs with positive values " -"are created. There are no type restrictions, but the value type needs to " -"support addition, subtraction, and comparison." +"The :meth:`~Counter.elements` method requires integer counts. It ignores zero and " +"negative counts." msgstr "" +"La méthode :meth:`~Counter.elements` exige des valeurs entières et ignore les valeurs " +"négatives ou nulles." -#: ../Doc/library/collections.rst:374 +#: ../Doc/library/collections.rst:378 msgid "" -"The :meth:`~Counter.elements` method requires integer counts. It ignores " -"zero and negative counts." +"`Bag class `_ in " +"Smalltalk." msgstr "" +"`Bag class `_ " +"dans Smalltalk." -#: ../Doc/library/collections.rst:379 +#: ../Doc/library/collections.rst:381 +msgid "Wikipedia entry for `Multisets `_." +msgstr "" +"L'article Wikipédia sur les `multiensembles `_ sur Wikipédia (ou `l'article en anglais `_)." + +#: ../Doc/library/collections.rst:383 msgid "" -"`Bag class `_ in Smalltalk." +"`C++ multisets `_ tutorial with examples." msgstr "" +"Des guides et exemples à propos des `multiensembles en C++ `_." -#: ../Doc/library/collections.rst:382 +#: ../Doc/library/collections.rst:386 msgid "" -"Wikipedia entry for `Multisets `_." +"For mathematical operations on multisets and their use cases, see *Knuth, Donald. The " +"Art of Computer Programming Volume II, Section 4.6.3, Exercise 19*." msgstr "" +"Pour les opérations mathématiques sur les multiensembles et leurs applications, voir " +"*Knuth, Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise 19*." -#: ../Doc/library/collections.rst:384 +#: ../Doc/library/collections.rst:390 msgid "" -"`C++ multisets `_ tutorial with examples." +"To enumerate all distinct multisets of a given size over a given set of elements, see :" +"func:`itertools.combinations_with_replacement`::" msgstr "" +"Pour lister tous les multiensembles distincts de même taille parmi un ensemble donné " +"d'éléments, voir :func:`itertools.combinations_with_replacement` : ::" -#: ../Doc/library/collections.rst:387 -msgid "" -"For mathematical operations on multisets and their use cases, see *Knuth, " -"Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " -"19*." -msgstr "" - -#: ../Doc/library/collections.rst:391 -msgid "" -"To enumerate all distinct multisets of a given size over a given set of " -"elements, see :func:`itertools.combinations_with_replacement`::" -msgstr "" - -#: ../Doc/library/collections.rst:398 +#: ../Doc/library/collections.rst:397 msgid ":class:`deque` objects" -msgstr "" +msgstr "Objets :class:`deque`" -#: ../Doc/library/collections.rst:402 +#: ../Doc/library/collections.rst:401 msgid "" -"Returns a new deque object initialized left-to-right (using :meth:`append`) " -"with data from *iterable*. If *iterable* is not specified, the new deque is " -"empty." +"Returns a new deque object initialized left-to-right (using :meth:`append`) with data " +"from *iterable*. If *iterable* is not specified, the new deque is empty." msgstr "" +"Renvoie un nouvel objet *deque* initialisé de gauche à droite (en utilisant :meth:" +"`append`) avec les données d'*iterable*. Si *iterable* n'est pas spécifié, alors la " +"nouvelle *deque* est vide." -#: ../Doc/library/collections.rst:405 +#: ../Doc/library/collections.rst:404 msgid "" -"Deques are a generalization of stacks and queues (the name is pronounced " -"\"deck\" and is short for \"double-ended queue\"). Deques support thread-" -"safe, memory efficient appends and pops from either side of the deque with " -"approximately the same O(1) performance in either direction." +"Deques are a generalization of stacks and queues (the name is pronounced \"deck\" and " +"is short for \"double-ended queue\"). Deques support thread-safe, memory efficient " +"appends and pops from either side of the deque with approximately the same O(1) " +"performance in either direction." msgstr "" +"Les *deques* sont une généralisation des piles et des files (*deque* se prononce " +"\"*dèque*\" et est l'abréviation de l'anglais *double-ended queue*) : il est possible " +"d'ajouter et retirer des éléments par les deux bouts des *deques*. Celles-ci gèrent des " +"ajouts et des retraits utilisables par de multiples fils d'exécution (*thread-safe*) et " +"efficients du point de vue de la mémoire des deux côtés de la *deque*, avec " +"approximativement la même performance en *O(1)* dans les deux sens." -#: ../Doc/library/collections.rst:410 +#: ../Doc/library/collections.rst:409 msgid "" -"Though :class:`list` objects support similar operations, they are optimized " -"for fast fixed-length operations and incur O(n) memory movement costs for " -"``pop(0)`` and ``insert(0, v)`` operations which change both the size and " -"position of the underlying data representation." +"Though :class:`list` objects support similar operations, they are optimized for fast " +"fixed-length operations and incur O(n) memory movement costs for ``pop(0)`` and " +"``insert(0, v)`` operations which change both the size and position of the underlying " +"data representation." msgstr "" +"Bien que les les objets :class:`list` gèrent des opérations similaires, ils sont " +"optimisés pour des opérations qui ne changent pas la taille de la liste. Les opérations " +"``pop(0)`` et ``insert(0, v)`` qui changent la taille et la position de la " +"représentation des données sous-jacentes entraînent des coûts de déplacement de mémoire " +"en *O(n)*." -#: ../Doc/library/collections.rst:416 +#: ../Doc/library/collections.rst:415 msgid "" -"If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " -"length. Otherwise, the deque is bounded to the specified maximum length. " -"Once a bounded length deque is full, when new items are added, a " -"corresponding number of items are discarded from the opposite end. Bounded " -"length deques provide functionality similar to the ``tail`` filter in Unix. " -"They are also useful for tracking transactions and other pools of data where " -"only the most recent activity is of interest." +"If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary length. " +"Otherwise, the deque is bounded to the specified maximum length. Once a bounded length " +"deque is full, when new items are added, a corresponding number of items are discarded " +"from the opposite end. Bounded length deques provide functionality similar to the " +"``tail`` filter in Unix. They are also useful for tracking transactions and other pools " +"of data where only the most recent activity is of interest." msgstr "" +"Si *maxlen* n'est pas spécifié ou vaut *None*, les *deques* peuvent atteindre une " +"taille arbitraire. Sinon, la *deque* est limitée par cette taille maximale. Une fois " +"que celle-ci est atteinte, un ajout d'un ou plusieurs éléments engendre la suppression " +"du nombre correspondant d'éléments à l'autre extrémité de la *deque*. Les *deques* à " +"longueur limitée apportent des fonctionnalités similaire au filtre ``tail`` d'Unix. " +"Elles sont aussi utiles pour le suivi de transactions et autres lots de données où " +"seule l'activité récente est intéressante." -#: ../Doc/library/collections.rst:425 +#: ../Doc/library/collections.rst:424 msgid "Deque objects support the following methods:" -msgstr "" +msgstr "Les objets *deques* gèrent les méthodes suivantes :" -#: ../Doc/library/collections.rst:429 +#: ../Doc/library/collections.rst:428 msgid "Add *x* to the right side of the deque." -msgstr "" +msgstr "Ajoute *x* à l'extrémité droite de la *deque*." -#: ../Doc/library/collections.rst:434 +#: ../Doc/library/collections.rst:433 msgid "Add *x* to the left side of the deque." -msgstr "" +msgstr "Ajoute *x* à l'extrémité gauche de la *deque*." -#: ../Doc/library/collections.rst:439 +#: ../Doc/library/collections.rst:438 msgid "Remove all elements from the deque leaving it with length 0." -msgstr "" +msgstr "Supprime tous les éléments de la *deque* et la laisse avec une longueur de 0." -#: ../Doc/library/collections.rst:444 +#: ../Doc/library/collections.rst:443 msgid "Create a shallow copy of the deque." -msgstr "" +msgstr "Crée une copie superficielle de la *deque*." -#: ../Doc/library/collections.rst:451 +#: ../Doc/library/collections.rst:450 msgid "Count the number of deque elements equal to *x*." -msgstr "" +msgstr "Compte le nombre d'éléments de la *deque* égaux à *x*." -#: ../Doc/library/collections.rst:458 +#: ../Doc/library/collections.rst:457 msgid "" -"Extend the right side of the deque by appending elements from the iterable " +"Extend the right side of the deque by appending elements from the iterable argument." +msgstr "" +"Étend la *deque* en ajoutant les éléments de l'itérable en argument à son extrémité " +"droite." + +#: ../Doc/library/collections.rst:463 +msgid "" +"Extend the left side of the deque by appending elements from *iterable*. Note, the " +"series of left appends results in reversing the order of elements in the iterable " "argument." msgstr "" +"Étend la *deque* en ajoutant les éléments d'*iterable* à son extrémité gauche. Dans ce " +"cas, notez que la série d'ajouts inverse l'ordre des éléments de l'argument itérable." -#: ../Doc/library/collections.rst:464 +#: ../Doc/library/collections.rst:470 msgid "" -"Extend the left side of the deque by appending elements from *iterable*. " -"Note, the series of left appends results in reversing the order of elements " -"in the iterable argument." +"Return the position of *x* in the deque (at or after index *start* and before index " +"*stop*). Returns the first match or raises :exc:`ValueError` if not found." msgstr "" +"Renvoie la position de *x* dans la *deque* (à partir de *start* inclus et jusqu'à " +"*stop* exclus). Renvoie la première correspondance ou lève :exc:`ValueError` si aucune " +"n'est trouvée." -#: ../Doc/library/collections.rst:471 -msgid "" -"Return the position of *x* in the deque (at or after index *start* and " -"before index *stop*). Returns the first match or raises :exc:`ValueError` " -"if not found." -msgstr "" - -#: ../Doc/library/collections.rst:480 +#: ../Doc/library/collections.rst:479 msgid "Insert *x* into the deque at position *i*." -msgstr "" +msgstr "Insère *x* dans la *deque* à la position *i*." -#: ../Doc/library/collections.rst:482 +#: ../Doc/library/collections.rst:481 msgid "" -"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" -"exc:`IndexError` is raised." +"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :exc:" +"`IndexError` is raised." msgstr "" +"Si une insertion provoque un dépassement de la taille limitée d'une *deque*, alors elle " +"lève une exception :exc:`IndexError`." -#: ../Doc/library/collections.rst:490 +#: ../Doc/library/collections.rst:489 msgid "" -"Remove and return an element from the right side of the deque. If no " -"elements are present, raises an :exc:`IndexError`." +"Remove and return an element from the right side of the deque. If no elements are " +"present, raises an :exc:`IndexError`." msgstr "" +"Retire et renvoie un élément de l'extrémité droite de la *deque*. S'il n'y a aucun " +"élément, lève une exception :exc:`IndexError`." -#: ../Doc/library/collections.rst:496 +#: ../Doc/library/collections.rst:495 msgid "" -"Remove and return an element from the left side of the deque. If no elements " -"are present, raises an :exc:`IndexError`." +"Remove and return an element from the left side of the deque. If no elements are " +"present, raises an :exc:`IndexError`." msgstr "" +"Retire et renvoie un élément de l'extrémité gauche de la *deque*. S'il n'y a aucun " +"élément, lève une exception :exc:`IndexError`." -#: ../Doc/library/collections.rst:502 -msgid "" -"Remove the first occurrence of *value*. If not found, raises a :exc:" -"`ValueError`." +#: ../Doc/library/collections.rst:501 +msgid "Remove the first occurrence of *value*. If not found, raises a :exc:`ValueError`." msgstr "" +"Supprime la première occurrence de *value*. Si aucune occurrence n'est trouvée, lève " +"une exception :exc:`ValueError`." -#: ../Doc/library/collections.rst:508 +#: ../Doc/library/collections.rst:507 msgid "Reverse the elements of the deque in-place and then return ``None``." msgstr "" +"Inverse le sens des éléments de la *deque* sans créer de copie et renvoie ``None``." -#: ../Doc/library/collections.rst:515 -msgid "" -"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " -"left." +#: ../Doc/library/collections.rst:514 +msgid "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the left." msgstr "" +"Décale les éléments de la *deque* de *n* places vers la droite (le dernier élément " +"revient au début). Si *n* est négatif, décale vers la gauche." -#: ../Doc/library/collections.rst:518 +#: ../Doc/library/collections.rst:517 msgid "" -"When the deque is not empty, rotating one step to the right is equivalent to " -"``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " -"to ``d.append(d.popleft())``." +"When the deque is not empty, rotating one step to the right is equivalent to ``d." +"appendleft(d.pop())``, and rotating one step to the left is equivalent to ``d.append(d." +"popleft())``." msgstr "" +"Quand la *deque* n'est pas vide, un décalage d'une place vers la droite équivaut à ``d." +"appendleft(d.pop())`` et un décalage d'une place vers la gauche est équivalent à ``d." +"append(d.popleft())``." -#: ../Doc/library/collections.rst:523 +#: ../Doc/library/collections.rst:522 msgid "Deque objects also provide one read-only attribute:" -msgstr "" +msgstr "Les objets *deques* fournissent également un attribut en lecture seule :" -#: ../Doc/library/collections.rst:527 +#: ../Doc/library/collections.rst:526 msgid "Maximum size of a deque or ``None`` if unbounded." -msgstr "" +msgstr "La taille maximale d'une *deque*, ou ``None`` si illimitée." -#: ../Doc/library/collections.rst:532 +#: ../Doc/library/collections.rst:531 msgid "" "In addition to the above, deques support iteration, pickling, ``len(d)``, " -"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " -"with the :keyword:`in` operator, and subscript references such as " -"``d[-1]``. Indexed access is O(1) at both ends but slows to O(n) in the " -"middle. For fast random access, use lists instead." +"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing with the :" +"keyword:`in` operator, and subscript references such as ``d[-1]``. Indexed access is " +"O(1) at both ends but slows to O(n) in the middle. For fast random access, use lists " +"instead." msgstr "" +"En plus des méthodes précédentes, les *deques* gèrent l'itération, la sérialisation, " +"``len(d)``, ``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, le test " +"d'appartenance avec l'opérateur :keyword:`in`, et les références en indice comme " +"``d[-1]``. L'accès par indice est en *O(1)* aux extrémités mais en *O(n)* au milieu. " +"Pour des accès aléatoires rapides, il est préférable d'utiliser des listes." -#: ../Doc/library/collections.rst:538 +#: ../Doc/library/collections.rst:537 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." msgstr "" +"Depuis la version 3.5, les *deques* gèrent ``__add__()``, ``__mul__()`` et " +"``__imul__()``." -#: ../Doc/library/collections.rst:541 +#: ../Doc/library/collections.rst:540 msgid "Example:" msgstr "Exemple :" -#: ../Doc/library/collections.rst:598 +#: ../Doc/library/collections.rst:597 msgid ":class:`deque` Recipes" -msgstr "" +msgstr "Cas pratiques utilisant :class:`deque`" -#: ../Doc/library/collections.rst:600 +#: ../Doc/library/collections.rst:599 msgid "This section shows various approaches to working with deques." -msgstr "" +msgstr "Cette partie montre diverses approches afin de travailler avec les *deques*." -#: ../Doc/library/collections.rst:602 +#: ../Doc/library/collections.rst:601 msgid "" -"Bounded length deques provide functionality similar to the ``tail`` filter " -"in Unix::" +"Bounded length deques provide functionality similar to the ``tail`` filter in Unix::" msgstr "" +"Les *deques* à taille limitée apportent une fonctionnalité similaire au filtre ``tail`` " +"d'Unix : ::" -#: ../Doc/library/collections.rst:610 +#: ../Doc/library/collections.rst:609 msgid "" -"Another approach to using deques is to maintain a sequence of recently added " -"elements by appending to the right and popping to the left::" +"Another approach to using deques is to maintain a sequence of recently added elements " +"by appending to the right and popping to the left::" msgstr "" +"Une autre approche d'utilisation des *deques* est de maintenir une séquence d'éléments " +"récemment ajoutés en les ajoutant à droite et en retirant les anciens par la gauche : ::" -#: ../Doc/library/collections.rst:625 +#: ../Doc/library/collections.rst:624 msgid "" -"A `round-robin scheduler `_ can be implemented with input iterators stored in a :" -"class:`deque`. Values are yielded from the active iterator in position " -"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." -"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." -"rotate` method::" +"A `round-robin scheduler `_ can " +"be implemented with input iterators stored in a :class:`deque`. Values are yielded " +"from the active iterator in position zero. If that iterator is exhausted, it can be " +"removed with :meth:`~deque.popleft`; otherwise, it can be cycled back to the end with " +"the :meth:`~deque.rotate` method::" msgstr "" +"Un `ordonnancement en round-robin `_ peut être implémenté avec des entrées itérateurs stockées dans " +"une :class:`deque`. Les valeurs sont produites par l'itérateur actif en position zéro. " +"Si cet itérateur est épuisé, il peut être retiré avec la méthode :meth:`~deque." +"popleft` ; ou bien il peut être remis à la fin avec la méthode :meth:`~ deque." +"rotate` : ::" -#: ../Doc/library/collections.rst:644 +#: ../Doc/library/collections.rst:643 msgid "" -"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " -"slicing and deletion. For example, a pure Python implementation of ``del " -"d[n]`` relies on the ``rotate()`` method to position elements to be popped::" +"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` slicing and " +"deletion. For example, a pure Python implementation of ``del d[n]`` relies on the " +"``rotate()`` method to position elements to be popped::" msgstr "" +"La méthode :meth:`~deque.rotate` apporte une façon d'implémenter la sélection " +"d'intervalle (*slicing*) et les suppressions pour les :class:`deques`. Par exemple, une " +"implémentation de ``del d[n]`` en Python pur utilise la méthode ``rotate()`` pour " +"mettre en position les éléments à éjecter : ::" -#: ../Doc/library/collections.rst:653 +#: ../Doc/library/collections.rst:652 msgid "" -"To implement :class:`deque` slicing, use a similar approach applying :meth:" -"`~deque.rotate` to bring a target element to the left side of the deque. " -"Remove old entries with :meth:`~deque.popleft`, add new entries with :meth:" -"`~deque.extend`, and then reverse the rotation. With minor variations on " -"that approach, it is easy to implement Forth style stack manipulations such " -"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``." +"To implement :class:`deque` slicing, use a similar approach applying :meth:`~deque." +"rotate` to bring a target element to the left side of the deque. Remove old entries " +"with :meth:`~deque.popleft`, add new entries with :meth:`~deque.extend`, and then " +"reverse the rotation. With minor variations on that approach, it is easy to implement " +"Forth style stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, " +"``pick``, ``rot``, and ``roll``." msgstr "" +"Pour implémenter le *slicing* pour les :class:`deques `, il est possible " +"d'utiliser une approche similaire en appliquant :meth:`~deque.rotate` afin d'apporter " +"un élément cible à l'extrémité gauche de la *deque*. On éjecte les anciennes entrées " +"avec :meth:`~deque.popleft` et on ajoute les nouvelles avec :meth:`~deque.extend`, puis " +"on inverse la rotation. Il est aisé d'implémenter les manipulations des piles inspirées " +"du Forth telles que ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot`` et " +"``roll``." -#: ../Doc/library/collections.rst:663 +#: ../Doc/library/collections.rst:662 msgid ":class:`defaultdict` objects" -msgstr "" +msgstr "Objets :class:`defaultdict`" -#: ../Doc/library/collections.rst:667 +#: ../Doc/library/collections.rst:666 msgid "" -"Returns a new dictionary-like object. :class:`defaultdict` is a subclass of " -"the built-in :class:`dict` class. It overrides one method and adds one " -"writable instance variable. The remaining functionality is the same as for " -"the :class:`dict` class and is not documented here." +"Returns a new dictionary-like object. :class:`defaultdict` is a subclass of the built-" +"in :class:`dict` class. It overrides one method and adds one writable instance " +"variable. The remaining functionality is the same as for the :class:`dict` class and " +"is not documented here." msgstr "" +"Renvoie un nouvel objet qui se comporte comme un dictionnaire. :class:`defaultdic` est " +"une sous-classe de la la classe native :class:`dict`. Elle surcharge une méthode et " +"ajoute une variable d'instance modifiable. Les autres fonctionnalités sont les mêmes " +"que celles des objets :class:`dict` et ne sont pas documentées ici." -#: ../Doc/library/collections.rst:672 +#: ../Doc/library/collections.rst:671 msgid "" -"The first argument provides the initial value for the :attr:" -"`default_factory` attribute; it defaults to ``None``. All remaining " -"arguments are treated the same as if they were passed to the :class:`dict` " -"constructor, including keyword arguments." +"The first argument provides the initial value for the :attr:`default_factory` " +"attribute; it defaults to ``None``. All remaining arguments are treated the same as if " +"they were passed to the :class:`dict` constructor, including keyword arguments." msgstr "" +"Le premier argument fournit la valeur initiale de l'attribut :attr:`default_factory` " +"qui doit être un objet appelable sans paramètre ou ``None``, sa valeur par défaut. Tous " +"les autres arguments sont traités comme si on les passait au constructeur de :class:" +"`dict`, y compris les arguments nommés." -#: ../Doc/library/collections.rst:678 +#: ../Doc/library/collections.rst:677 msgid "" -":class:`defaultdict` objects support the following method in addition to the " -"standard :class:`dict` operations:" +":class:`defaultdict` objects support the following method in addition to the standard :" +"class:`dict` operations:" msgstr "" +"En plus des opérations usuelles de :class:`dict`, les objets :class:`defaultdict` " +"gèrent les méthodes supplémentaires suivantes :" -#: ../Doc/library/collections.rst:683 +#: ../Doc/library/collections.rst:682 msgid "" -"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" -"`KeyError` exception with the *key* as argument." +"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:`KeyError` " +"exception with the *key* as argument." msgstr "" +"Si l'attribut :attr:`default_factory` est ``None``, lève une exception :exc:`KeyError` " +"avec *key* comme argument." -#: ../Doc/library/collections.rst:686 +#: ../Doc/library/collections.rst:685 msgid "" -"If :attr:`default_factory` is not ``None``, it is called without arguments " -"to provide a default value for the given *key*, this value is inserted in " -"the dictionary for the *key*, and returned." +"If :attr:`default_factory` is not ``None``, it is called without arguments to provide a " +"default value for the given *key*, this value is inserted in the dictionary for the " +"*key*, and returned." msgstr "" +"Si :attr:`default_fatory`` ne vaut pas ``None``, cet attribut est appelé sans argument " +"pour fournir une valeur par défaut pour la *key* demandée. Cette valeur est insérée " +"dans le dictionnaire avec pour clé *key* et est renvoyée." -#: ../Doc/library/collections.rst:690 +#: ../Doc/library/collections.rst:689 msgid "" -"If calling :attr:`default_factory` raises an exception this exception is " -"propagated unchanged." +"If calling :attr:`default_factory` raises an exception this exception is propagated " +"unchanged." msgstr "" +"Si appeler :attr:`default_factory` lève une exception, celle-ci est transmise inchangée." -#: ../Doc/library/collections.rst:693 +#: ../Doc/library/collections.rst:692 msgid "" -"This method is called by the :meth:`__getitem__` method of the :class:`dict` " -"class when the requested key is not found; whatever it returns or raises is " -"then returned or raised by :meth:`__getitem__`." +"This method is called by the :meth:`__getitem__` method of the :class:`dict` class when " +"the requested key is not found; whatever it returns or raises is then returned or " +"raised by :meth:`__getitem__`." msgstr "" +"Cette méthode est appelée par la méthode :meth:`__getitem__` de la classe :class:`dict` " +"lorsque la clé demandée n'est pas trouvée. Ce qu'elle renvoie ou lève est alors renvoyé " +"ou levé par :meth:`__getitem__`." -#: ../Doc/library/collections.rst:697 +#: ../Doc/library/collections.rst:696 msgid "" -"Note that :meth:`__missing__` is *not* called for any operations besides :" -"meth:`__getitem__`. This means that :meth:`get` will, like normal " -"dictionaries, return ``None`` as a default rather than using :attr:" -"`default_factory`." +"Note that :meth:`__missing__` is *not* called for any operations besides :meth:" +"`__getitem__`. This means that :meth:`get` will, like normal dictionaries, return " +"``None`` as a default rather than using :attr:`default_factory`." msgstr "" +"Remarquez que :meth:`__missing__` n'est *pas* appelée pour les opérations autres que :" +"meth:`__getitem__`. Cela signifie que :meth:`get` renvoie ``None`` comme les " +"dictionnaires natifs dans les cas triviaux et n'utilise pas :attr:`default_factory`." -#: ../Doc/library/collections.rst:703 +#: ../Doc/library/collections.rst:702 msgid ":class:`defaultdict` objects support the following instance variable:" -msgstr "" +msgstr "Les objets :class:`defaultdict` gèrent la variable d'instance :" -#: ../Doc/library/collections.rst:708 +#: ../Doc/library/collections.rst:707 msgid "" -"This attribute is used by the :meth:`__missing__` method; it is initialized " -"from the first argument to the constructor, if present, or to ``None``, if " -"absent." +"This attribute is used by the :meth:`__missing__` method; it is initialized from the " +"first argument to the constructor, if present, or to ``None``, if absent." msgstr "" +"Cet attribut est utilisé par la méthode :meth:`__missing__` ; il est initialisé par le " +"premier argument passé au constructeur, s'il est spécifié, sinon par ``None``." -#: ../Doc/library/collections.rst:714 +#: ../Doc/library/collections.rst:713 msgid ":class:`defaultdict` Examples" -msgstr "" +msgstr "Exemples utilisant :class:`defaultdict`" -#: ../Doc/library/collections.rst:716 +#: ../Doc/library/collections.rst:715 msgid "" -"Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " -"to group a sequence of key-value pairs into a dictionary of lists:" +"Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy to group a " +"sequence of key-value pairs into a dictionary of lists:" msgstr "" +"Utiliser :class:`list` comme :attr:`~defaultdict.default_factory` facilite le " +"regroupement d'une séquence de paires clé-valeur en un dictionnaire de listes :" -#: ../Doc/library/collections.rst:727 +#: ../Doc/library/collections.rst:726 msgid "" -"When each key is encountered for the first time, it is not already in the " -"mapping; so an entry is automatically created using the :attr:`~defaultdict." -"default_factory` function which returns an empty :class:`list`. The :meth:" -"`list.append` operation then attaches the value to the new list. When keys " -"are encountered again, the look-up proceeds normally (returning the list for " -"that key) and the :meth:`list.append` operation adds another value to the " -"list. This technique is simpler and faster than an equivalent technique " -"using :meth:`dict.setdefault`:" +"When each key is encountered for the first time, it is not already in the mapping; so " +"an entry is automatically created using the :attr:`~defaultdict.default_factory` " +"function which returns an empty :class:`list`. The :meth:`list.append` operation then " +"attaches the value to the new list. When keys are encountered again, the look-up " +"proceeds normally (returning the list for that key) and the :meth:`list.append` " +"operation adds another value to the list. This technique is simpler and faster than an " +"equivalent technique using :meth:`dict.setdefault`:" msgstr "" +"Lorsque chaque clé est rencontrée pour la première fois, elle n'est pas encore présente " +"dans le dictionnaire, donc une entrée est automatiquement créée grâce à la fonction :" +"attr:`~defaultdict.default_factory` qui renvoie un objet :class:`list` vide. " +"L'opération :meth:`list.append` ajoute la valeur à la nouvelle liste. Quand les clés " +"sont à nouveau rencontrées, la recherche se déroule correctement (elle renvoie la liste " +"de cette clé) et l'opération :meth:`list.append` ajoute une autre valeur à la liste. " +"Cette technique est plus simple et plus rapide qu'une technique équivalente utilisant :" +"meth:`dict.setdefault` :" -#: ../Doc/library/collections.rst:742 +#: ../Doc/library/collections.rst:741 msgid "" -"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" -"class:`defaultdict` useful for counting (like a bag or multiset in other " -"languages):" +"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :class:" +"`defaultdict` useful for counting (like a bag or multiset in other languages):" msgstr "" +"Utiliser :class:`int` comme :attr:`~defaultdict.default_factory` rend la classe :class:" +"`defaultdict` pratique pour le comptage (comme un sac ou multi-ensemble dans d'autres " +"langages) :" -#: ../Doc/library/collections.rst:754 +#: ../Doc/library/collections.rst:753 msgid "" -"When a letter is first encountered, it is missing from the mapping, so the :" -"attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " -"default count of zero. The increment operation then builds up the count for " -"each letter." +"When a letter is first encountered, it is missing from the mapping, so the :attr:" +"`~defaultdict.default_factory` function calls :func:`int` to supply a default count of " +"zero. The increment operation then builds up the count for each letter." msgstr "" +"Quand une lettre est rencontrée pour la première fois, elle n'est pas dans le " +"dictionnaire, donc la fonction :attr:`~defaultdict.default_factory` appelle :func:`int` " +"pour mettre un nouveau compteur à zéro. L'incrémentation augmente ensuite le comptage " +"pour chaque lettre." -#: ../Doc/library/collections.rst:758 +#: ../Doc/library/collections.rst:757 msgid "" -"The function :func:`int` which always returns zero is just a special case of " -"constant functions. A faster and more flexible way to create constant " -"functions is to use a lambda function which can supply any constant value " -"(not just zero):" +"The function :func:`int` which always returns zero is just a special case of constant " +"functions. A faster and more flexible way to create constant functions is to use a " +"lambda function which can supply any constant value (not just zero):" msgstr "" +"La fonction :func:`int` qui retourne toujours zéro est simplement une fonction " +"constante particulière. Un moyen plus flexible et rapide de créer une fonction " +"constante est d'utiliser une fonction lambda qui peut fournir n'importe quelle valeur " +"constante (pas seulement zéro) :" -#: ../Doc/library/collections.rst:770 +#: ../Doc/library/collections.rst:769 msgid "" -"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" -"class:`defaultdict` useful for building a dictionary of sets:" +"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :class:" +"`defaultdict` useful for building a dictionary of sets:" msgstr "" +"Utiliser :class:`set` comme :attr:`~defaultdict.default_factory` rend la classe :class:" +"`defaultdict` pratique pour créer un dictionnaire d'ensembles :" -#: ../Doc/library/collections.rst:783 +#: ../Doc/library/collections.rst:782 msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" msgstr "" +":func:`namedtuple`: fonction de construction pour *n-uplets* (*tuples*) avec des champs " +"nommés" -#: ../Doc/library/collections.rst:785 +#: ../Doc/library/collections.rst:784 msgid "" -"Named tuples assign meaning to each position in a tuple and allow for more " -"readable, self-documenting code. They can be used wherever regular tuples " -"are used, and they add the ability to access fields by name instead of " -"position index." +"Named tuples assign meaning to each position in a tuple and allow for more readable, " +"self-documenting code. They can be used wherever regular tuples are used, and they add " +"the ability to access fields by name instead of position index." msgstr "" +"Les tuples nommés assignent une signification à chacun de leur élément, ce qui rend le " +"code plus lisible et explicite. Ils peuvent être utilisés partout où les tuples natifs " +"sont utilisés, et ils ajoutent la possibilité d'accéder à leurs champs grâce à leur nom " +"au lieu de leur index de position." -#: ../Doc/library/collections.rst:791 +#: ../Doc/library/collections.rst:790 msgid "" -"Returns a new tuple subclass named *typename*. The new subclass is used to " -"create tuple-like objects that have fields accessible by attribute lookup as " -"well as being indexable and iterable. Instances of the subclass also have a " -"helpful docstring (with typename and field_names) and a helpful :meth:" -"`__repr__` method which lists the tuple contents in a ``name=value`` format." +"Returns a new tuple subclass named *typename*. The new subclass is used to create " +"tuple-like objects that have fields accessible by attribute lookup as well as being " +"indexable and iterable. Instances of the subclass also have a helpful docstring (with " +"typename and field_names) and a helpful :meth:`__repr__` method which lists the tuple " +"contents in a ``name=value`` format." msgstr "" +"Renvoie une nouvelle sous-classe de ``tuple`` appelée *typename*. Elle est utilisée " +"pour créer des objets se comportant comme les *tuples* qui ont des champs accessibles " +"par recherche d'attribut en plus d'être indexables et itérables. Les instances de cette " +"sous-classe possèdent aussi une *docstring* explicite (avec *type_name* et les " +"*field_names*) et une méthode :meth:`__repr__` pratique qui liste le contenu du tuple " +"au format ``nom=valeur``." -#: ../Doc/library/collections.rst:797 +#: ../Doc/library/collections.rst:796 msgid "" -"The *field_names* are a sequence of strings such as ``['x', 'y']``. " -"Alternatively, *field_names* can be a single string with each fieldname " -"separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``." +"The *field_names* are a sequence of strings such as ``['x', 'y']``. Alternatively, " +"*field_names* can be a single string with each fieldname separated by whitespace and/or " +"commas, for example ``'x y'`` or ``'x, y'``." msgstr "" +"*field_names* peut être une séquence de chaînes de caractères telle que ``['x', 'y']`` " +"ou bien une unique chaîne de caractères où les noms de champs sont séparés par un " +"espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, y'``." -#: ../Doc/library/collections.rst:801 +#: ../Doc/library/collections.rst:800 msgid "" -"Any valid Python identifier may be used for a fieldname except for names " -"starting with an underscore. Valid identifiers consist of letters, digits, " -"and underscores but do not start with a digit or underscore and cannot be a :" -"mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*." +"Any valid Python identifier may be used for a fieldname except for names starting with " +"an underscore. Valid identifiers consist of letters, digits, and underscores but do " +"not start with a digit or underscore and cannot be a :mod:`keyword` such as *class*, " +"*for*, *return*, *global*, *pass*, or *raise*." msgstr "" +"N'importe quel identifiant Python peut être utilisé pour un nom de champ hormis ceux " +"commençant par un tiret bas. Les identifiants valides peuvent contenir des lettres, des " +"chiffres (sauf en première position) et des tirets bas (sauf en première position). Un " +"identifiant ne peut pas être un :mod:`keyword` tel que ``class``, ``for``, ``return``, " +"``global``, ``pass`` ou ``raise``." -#: ../Doc/library/collections.rst:807 +#: ../Doc/library/collections.rst:806 msgid "" -"If *rename* is true, invalid fieldnames are automatically replaced with " -"positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " -"converted to ``['abc', '_1', 'ghi', '_3']``, eliminating the keyword ``def`` " -"and the duplicate fieldname ``abc``." +"If *rename* is true, invalid fieldnames are automatically replaced with positional " +"names. For example, ``['abc', 'def', 'ghi', 'abc']`` is converted to ``['abc', '_1', " +"'ghi', '_3']``, eliminating the keyword ``def`` and the duplicate fieldname ``abc``." msgstr "" +"Si *rename* vaut ``True``, alors les noms de champs invalides sont automatiquement " +"renommés en noms positionnels. Par exemple, ``['abc', 'def', 'ghi', 'abc']`` est " +"converti en ``['abc, '_1', 'ghi', '_3']`` afin d'éliminer le mot-clé ``def`` et le " +"doublon de ``abc``." -#: ../Doc/library/collections.rst:812 +#: ../Doc/library/collections.rst:811 msgid "" -"*defaults* can be ``None`` or an :term:`iterable` of default values. Since " -"fields with a default value must come after any fields without a default, " -"the *defaults* are applied to the rightmost parameters. For example, if the " -"fieldnames are ``['x', 'y', 'z']`` and the defaults are ``(1, 2)``, then " -"``x`` will be a required argument, ``y`` will default to ``1``, and ``z`` " -"will default to ``2``." +"*defaults* can be ``None`` or an :term:`iterable` of default values. Since fields with " +"a default value must come after any fields without a default, the *defaults* are " +"applied to the rightmost parameters. For example, if the fieldnames are ``['x', 'y', " +"'z']`` and the defaults are ``(1, 2)``, then ``x`` will be a required argument, ``y`` " +"will default to ``1``, and ``z`` will default to ``2``." msgstr "" +"*defaults* peut être ``None`` ou un :term:`iterable` de valeurs par défaut. Comme les " +"champs avec une valeur par défaut doivent être définis après les champs sans valeur par " +"défaut, les *defaults* sont appliqués aux paramètres les plus à droite. Par exemple, si " +"les noms des champs sont ``['x', 'y', 'z']`` et les valeurs par défaut ``(1, 2)``, " +"alors ``x`` est un argument obligatoire tandis que ``y`` et ``y`` valent par défaut " +"``1`` et ``2``." -#: ../Doc/library/collections.rst:819 +#: ../Doc/library/collections.rst:818 msgid "" -"If *module* is defined, the ``__module__`` attribute of the named tuple is " -"set to that value." +"If *module* is defined, the ``__module__`` attribute of the named tuple is set to that " +"value." msgstr "" +"Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` du tuple " +"nommé." -#: ../Doc/library/collections.rst:822 +#: ../Doc/library/collections.rst:821 msgid "" -"Named tuple instances do not have per-instance dictionaries, so they are " -"lightweight and require no more memory than regular tuples." +"Named tuple instances do not have per-instance dictionaries, so they are lightweight " +"and require no more memory than regular tuples." msgstr "" +"Les instances de tuples nommés n'ont pas de dictionnaires propres, elles sont donc " +"légères et ne requièrent pas plus de mémoire que les tuples natifs." -#: ../Doc/library/collections.rst:825 +#: ../Doc/library/collections.rst:824 msgid "Added support for *rename*." -msgstr "" +msgstr "Gestion de *rename*." -#: ../Doc/library/collections.rst:828 +#: ../Doc/library/collections.rst:827 msgid "" -"The *verbose* and *rename* parameters became :ref:`keyword-only arguments " -"`." +"The *verbose* and *rename* parameters became :ref:`keyword-only arguments `." msgstr "" +"Les paramètres *verbose* et *rename* deviennent des :ref:`arguments obligatoirement " +"nommés `." -#: ../Doc/library/collections.rst:832 +#: ../Doc/library/collections.rst:831 msgid "Added the *module* parameter." -msgstr "" +msgstr "Ajout du paramètre *module*." -#: ../Doc/library/collections.rst:835 +#: ../Doc/library/collections.rst:834 msgid "Remove the *verbose* parameter and the :attr:`_source` attribute." -msgstr "" +msgstr "Suppression du paramètre *verbose* et de l'attribut :attr:`_source`." -#: ../Doc/library/collections.rst:838 +#: ../Doc/library/collections.rst:837 +msgid "Added the *defaults* parameter and the :attr:`_field_defaults` attribute." +msgstr "Ajout du paramètre *defaults* et de l'attribut :attr:`_field_defaults`." + +#: ../Doc/library/collections.rst:857 msgid "" -"Added the *defaults* parameter and the :attr:`_field_defaults` attribute." +"Named tuples are especially useful for assigning field names to result tuples returned " +"by the :mod:`csv` or :mod:`sqlite3` modules::" msgstr "" +"Les tuples nommés sont particulièrement utiles pour associer des noms de champs à des " +"tuples renvoyés par les modules :mod:`csv` ou :mod:`sqlite3` : ::" -#: ../Doc/library/collections.rst:858 +#: ../Doc/library/collections.rst:873 msgid "" -"Named tuples are especially useful for assigning field names to result " -"tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" +"In addition to the methods inherited from tuples, named tuples support three additional " +"methods and two attributes. To prevent conflicts with field names, the method and " +"attribute names start with an underscore." msgstr "" +"En plus des méthodes héritées de ``tuple``, les tuples nommés implémentent trois " +"méthodes et deux attributs supplémentaires. Pour éviter les conflits avec noms de " +"champs, leurs noms commencent par un tiret bas." -#: ../Doc/library/collections.rst:874 +#: ../Doc/library/collections.rst:879 +msgid "Class method that makes a new instance from an existing sequence or iterable." +msgstr "" +"Méthode de classe qui construit une nouvelle instance à partir d'une séquence ou d'un " +"itérable existant." + +#: ../Doc/library/collections.rst:889 msgid "" -"In addition to the methods inherited from tuples, named tuples support three " -"additional methods and two attributes. To prevent conflicts with field " -"names, the method and attribute names start with an underscore." +"Return a new :class:`OrderedDict` which maps field names to their corresponding values:" msgstr "" +"Renvoie un nouvel :class:`OrderedDict` qui associe chaque nom de champ à sa valeur " +"correspondante :" -#: ../Doc/library/collections.rst:880 -msgid "" -"Class method that makes a new instance from an existing sequence or iterable." -msgstr "" - -#: ../Doc/library/collections.rst:890 -msgid "" -"Return a new :class:`OrderedDict` which maps field names to their " -"corresponding values:" -msgstr "" - -#: ../Doc/library/collections.rst:899 +#: ../Doc/library/collections.rst:898 msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." -msgstr "" +msgstr "Renvoie un :class:`OrderedDict` au lieu d'un :class:`dict` natif." -#: ../Doc/library/collections.rst:904 +#: ../Doc/library/collections.rst:903 msgid "" -"Return a new instance of the named tuple replacing specified fields with new " -"values::" +"Return a new instance of the named tuple replacing specified fields with new values::" msgstr "" +"Renvoie une nouvelle instance du tuple nommé en remplaçant les champs spécifiés par " +"leurs nouvelles valeurs : ::" -#: ../Doc/library/collections.rst:916 +#: ../Doc/library/collections.rst:915 msgid "" -"Tuple of strings listing the field names. Useful for introspection and for " -"creating new named tuple types from existing named tuples." +"Tuple of strings listing the field names. Useful for introspection and for creating " +"new named tuple types from existing named tuples." msgstr "" +"Tuple de chaînes de caractères listant les noms de champs. Pratique pour " +"l'introspection et pour créer de nouveaux types de tuples nommés à partir d'existants." -#: ../Doc/library/collections.rst:931 +#: ../Doc/library/collections.rst:930 msgid "Dictionary mapping field names to default values." -msgstr "" +msgstr "Dictionnaire qui assigne les valeurs par défaut aux noms des champs." -#: ../Doc/library/collections.rst:941 +#: ../Doc/library/collections.rst:940 msgid "" -"To retrieve a field whose name is stored in a string, use the :func:" -"`getattr` function:" +"To retrieve a field whose name is stored in a string, use the :func:`getattr` function:" msgstr "" +"Pour récupérer un champ dont le nom est une chaîne de caractères, utilisez la fonction :" +"func:`getattr` :" -#: ../Doc/library/collections.rst:947 +#: ../Doc/library/collections.rst:946 msgid "" -"To convert a dictionary to a named tuple, use the double-star-operator (as " -"described in :ref:`tut-unpacking-arguments`):" +"To convert a dictionary to a named tuple, use the double-star-operator (as described " +"in :ref:`tut-unpacking-arguments`):" msgstr "" +"Pour convertir un dictionnaire en tuple nommé, utilisez l'opérateur double-étoile " +"(comme expliqué dans :ref:`tut-unpacking-arguments`) :" -#: ../Doc/library/collections.rst:954 +#: ../Doc/library/collections.rst:953 msgid "" "Since a named tuple is a regular Python class, it is easy to add or change " -"functionality with a subclass. Here is how to add a calculated field and a " -"fixed-width print format:" +"functionality with a subclass. Here is how to add a calculated field and a fixed-width " +"print format:" msgstr "" +"Il est aisé d'ajouter ou de modifier les fonctionnalités des tuples nommés grâce à " +"l'héritage puisqu'il s'agit de simples classes. Voici comment ajouter un champ calculé " +"avec une longueur fixe d'affichage :" -#: ../Doc/library/collections.rst:973 +#: ../Doc/library/collections.rst:972 msgid "" -"The subclass shown above sets ``__slots__`` to an empty tuple. This helps " -"keep memory requirements low by preventing the creation of instance " -"dictionaries." +"The subclass shown above sets ``__slots__`` to an empty tuple. This helps keep memory " +"requirements low by preventing the creation of instance dictionaries." msgstr "" +"La sous-classe ci-dessus définit ``__slots__`` comme un tuple vide. Cela permet de " +"garder une emprunte mémoire faible en empêchant la création de dictionnaire d'instance." -#: ../Doc/library/collections.rst:976 +#: ../Doc/library/collections.rst:975 msgid "" -"Subclassing is not useful for adding new, stored fields. Instead, simply " -"create a new named tuple type from the :attr:`~somenamedtuple._fields` " -"attribute:" +"Subclassing is not useful for adding new, stored fields. Instead, simply create a new " +"named tuple type from the :attr:`~somenamedtuple._fields` attribute:" msgstr "" +"L'héritage n'est pas pertinent pour ajouter de nouveaux champs. Il est préférable de " +"simplement créer un nouveau type de tuple nommé avec l'attribut :attr:`~somenamedtuple." +"_fields` :" -#: ../Doc/library/collections.rst:981 +#: ../Doc/library/collections.rst:980 msgid "" -"Docstrings can be customized by making direct assignments to the ``__doc__`` " -"fields:" +"Docstrings can be customized by making direct assignments to the ``__doc__`` fields:" msgstr "" +"Les *docstrings* peuvent être personnalisées en modifiant directement l'attribut " +"``__doc__`` :" -#: ../Doc/library/collections.rst:990 +#: ../Doc/library/collections.rst:989 msgid "Property docstrings became writeable." -msgstr "" +msgstr "La propriété devient éditable." -#: ../Doc/library/collections.rst:993 +#: ../Doc/library/collections.rst:992 msgid "" -"Default values can be implemented by using :meth:`~somenamedtuple._replace` " -"to customize a prototype instance:" +"Default values can be implemented by using :meth:`~somenamedtuple._replace` to " +"customize a prototype instance:" msgstr "" +"Les valeurs par défaut peuvent être implémentées en utilisant :meth:`~somenamedtuple." +"_replace` pour personnaliser une instance prototype :" -#: ../Doc/library/collections.rst:1004 +#: ../Doc/library/collections.rst:1003 msgid "" -"`Recipe for named tuple abstract base class with a metaclass mix-in `_ by Jan Kaliszewski. Besides providing an :term:`abstract base " -"class` for named tuples, it also supports an alternate :term:`metaclass`-" -"based constructor that is convenient for use cases where named tuples are " -"being subclassed." +"`Recipe for named tuple abstract base class with a metaclass mix-in `_ " +"by Jan Kaliszewski. Besides providing an :term:`abstract base class` for named tuples, " +"it also supports an alternate :term:`metaclass`-based constructor that is convenient " +"for use cases where named tuples are being subclassed." msgstr "" +"`Cas pratique : classe de base abstraite de tuple nommé grâce à une métaclasse mixin " +"`_ par Jan Kaliszewski. En plus de fournir une :term:`abstract base class` " +"pour les tuples nommés, elle gère un constructeur de :term:`metaclass` pratique dans " +"les cas où l'on hérite de tuples nommés." -#: ../Doc/library/collections.rst:1011 +#: ../Doc/library/collections.rst:1010 msgid "" -"See :meth:`types.SimpleNamespace` for a mutable namespace based on an " -"underlying dictionary instead of a tuple." +"See :meth:`types.SimpleNamespace` for a mutable namespace based on an underlying " +"dictionary instead of a tuple." msgstr "" +"Voir :meth:`types.SimpleNamespace` pour un espace de noms muable basé sur un " +"dictionnaire sous-jacent à la place d'un tuple." -#: ../Doc/library/collections.rst:1014 -msgid "" -"See :meth:`typing.NamedTuple` for a way to add type hints for named tuples." +#: ../Doc/library/collections.rst:1013 +msgid "See :meth:`typing.NamedTuple` for a way to add type hints for named tuples." msgstr "" +"Voir :meth:`typing.NamedTuple` pour un moyen d'ajouter des indications de type pour les " +"tuples nommés." -#: ../Doc/library/collections.rst:1018 +#: ../Doc/library/collections.rst:1017 msgid ":class:`OrderedDict` objects" -msgstr "" +msgstr "Objets :class:`OrderedDict`" -#: ../Doc/library/collections.rst:1020 +#: ../Doc/library/collections.rst:1019 msgid "" -"Ordered dictionaries are just like regular dictionaries but they remember " -"the order that items were inserted. When iterating over an ordered " -"dictionary, the items are returned in the order their keys were first added." +"Ordered dictionaries are just like regular dictionaries but they remember the order " +"that items were inserted. When iterating over an ordered dictionary, the items are " +"returned in the order their keys were first added." msgstr "" +"En plus de se comporter comme des dictionnaires natifs, les dictionnaires ordonnés " +"mémorisent l'ordre dans lequel les éléments ont été insérés. Quand on itère sur un " +"dictionnaire ordonné, les éléments sont renvoyés dans l'ordre d'insertion des clés." -#: ../Doc/library/collections.rst:1026 +#: ../Doc/library/collections.rst:1025 msgid "" -"Return an instance of a dict subclass, supporting the usual :class:`dict` " -"methods. An *OrderedDict* is a dict that remembers the order that keys were " -"first inserted. If a new entry overwrites an existing entry, the original " -"insertion position is left unchanged. Deleting an entry and reinserting it " -"will move it to the end." +"Return an instance of a dict subclass, supporting the usual :class:`dict` methods. An " +"*OrderedDict* is a dict that remembers the order that keys were first inserted. If a " +"new entry overwrites an existing entry, the original insertion position is left " +"unchanged. Deleting an entry and reinserting it will move it to the end." msgstr "" +"Renvoie une instance d'une sous-classe de ``dict`` qui gère les méthodes usuelles de :" +"class:`dict`. Un objet *OrderedDict* est un dictionnaire qui mémorise l'ordre " +"d'insertion des clés. Si une nouvelle entrée en écrase une autre, sa position reste " +"inchangé. Si une entrée est supprimée puis réinsérée, elle est placée en dernière " +"position." -#: ../Doc/library/collections.rst:1036 +#: ../Doc/library/collections.rst:1035 msgid "" -"The :meth:`popitem` method for ordered dictionaries returns and removes a " -"(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" -"out)` order if *last* is true or :abbr:`FIFO (first-in, first-out)` order if " -"false." +"The :meth:`popitem` method for ordered dictionaries returns and removes a (key, value) " +"pair. The pairs are returned in :abbr:`LIFO (last-in, first-out)` order if *last* is " +"true or :abbr:`FIFO (first-in, first-out)` order if false." msgstr "" +"La méthode :meth:`popitem` pour les dictionnaires ordonnés retire et renvoie une paire " +"``(clé, valeur)``. Les paires sont renvoyées comme pour une pile, c'est-à-dire dernier " +"entré, premier sorti (en anglais :abbr:`LIFO (last-in, first-out)`) si *last* vaut " +"``True``. Si *last* vaut ``False``, alors les paires sont renvoyées comme pour une " +"file, c'est-à-dire premier entré, premier sorti (en anglais :abbr:`FIFO (first-in, " +"first-out)`)." -#: ../Doc/library/collections.rst:1043 +#: ../Doc/library/collections.rst:1042 msgid "" -"Move an existing *key* to either end of an ordered dictionary. The item is " -"moved to the right end if *last* is true (the default) or to the beginning " -"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist::" +"Move an existing *key* to either end of an ordered dictionary. The item is moved to " +"the right end if *last* is true (the default) or to the beginning if *last* is false. " +"Raises :exc:`KeyError` if the *key* does not exist::" msgstr "" +"Déplace une clé *key* existante à l'une des deux extrémités du dictionnaire : à droite " +"si *last* vaut ``True`` (comportement par défaut) ou à gauche sinon. Lève une " +"exception :exc:`KeyError` si la clé *key* n'est pas trouvée : ::" -#: ../Doc/library/collections.rst:1058 +#: ../Doc/library/collections.rst:1057 msgid "" -"In addition to the usual mapping methods, ordered dictionaries also support " -"reverse iteration using :func:`reversed`." +"In addition to the usual mapping methods, ordered dictionaries also support reverse " +"iteration using :func:`reversed`." msgstr "" +"En plus des méthodes usuelles des dictionnaires, les dictionnaires ordonnés gèrent " +"l'itération en sens inverse grâce à :func:`reversed`." -#: ../Doc/library/collections.rst:1061 +#: ../Doc/library/collections.rst:1060 msgid "" -"Equality tests between :class:`OrderedDict` objects are order-sensitive and " -"are implemented as ``list(od1.items())==list(od2.items())``. Equality tests " -"between :class:`OrderedDict` objects and other :class:`~collections.abc." -"Mapping` objects are order-insensitive like regular dictionaries. This " -"allows :class:`OrderedDict` objects to be substituted anywhere a regular " -"dictionary is used." +"Equality tests between :class:`OrderedDict` objects are order-sensitive and are " +"implemented as ``list(od1.items())==list(od2.items())``. Equality tests between :class:" +"`OrderedDict` objects and other :class:`~collections.abc.Mapping` objects are order-" +"insensitive like regular dictionaries. This allows :class:`OrderedDict` objects to be " +"substituted anywhere a regular dictionary is used." msgstr "" +"Les tests d'égalité entre deux objets :class:`OrderedDict` sont sensibles à l'ordre et " +"sont implémentés comme ceci : ``list(od1.items() == list(od2.items())``. Les tests " +"d'égalité entre un objet :class:`OrderedDict` et un objet :class:`~collections.abc." +"Mapping` ne sont pas sensibles à l'ordre (comme les dictionnaires natifs). Cela permet " +"substituer des objets :class:`OrderedDict` partout où les dictionnaires natifs sont " +"utilisés." -#: ../Doc/library/collections.rst:1068 +#: ../Doc/library/collections.rst:1067 msgid "" -"The items, keys, and values :term:`views ` of :class:" -"`OrderedDict` now support reverse iteration using :func:`reversed`." +"The items, keys, and values :term:`views ` of :class:`OrderedDict` now " +"support reverse iteration using :func:`reversed`." msgstr "" +"Les :term:`vues ` d'éléments, de clés et de valeurs de :class:" +"`OrderedDict` gèrent maintenant l'itération en sens inverse en utilisant :func:" +"`reversed`." -#: ../Doc/library/collections.rst:1072 +#: ../Doc/library/collections.rst:1071 msgid "" -"With the acceptance of :pep:`468`, order is retained for keyword arguments " -"passed to the :class:`OrderedDict` constructor and its :meth:`update` method." +"With the acceptance of :pep:`468`, order is retained for keyword arguments passed to " +"the :class:`OrderedDict` constructor and its :meth:`update` method." msgstr "" +"Suite à l'acceptation de la :pep:`468`, l'ordre des arguments nommés passés au " +"constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est conservé." -#: ../Doc/library/collections.rst:1078 +#: ../Doc/library/collections.rst:1077 msgid ":class:`OrderedDict` Examples and Recipes" -msgstr "" +msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" -#: ../Doc/library/collections.rst:1080 +#: ../Doc/library/collections.rst:1079 msgid "" "Since an ordered dictionary remembers its insertion order, it can be used in " "conjunction with sorting to make a sorted dictionary::" msgstr "" +"Puisqu'un dictionnaire ordonné mémorise l'ordre d'insertion de ses éléments, il peut " +"être utilisé conjointement avec un classement pour créer un dictionnaire trié : ::" -#: ../Doc/library/collections.rst:1098 +#: ../Doc/library/collections.rst:1097 msgid "" -"The new sorted dictionaries maintain their sort order when entries are " -"deleted. But when new keys are added, the keys are appended to the end and " -"the sort is not maintained." +"The new sorted dictionaries maintain their sort order when entries are deleted. But " +"when new keys are added, the keys are appended to the end and the sort is not " +"maintained." msgstr "" +"Les nouveaux dictionnaires triés gardent leur classement quand des entrées sont " +"supprimées, mais si de nouvelles clés sont ajoutées, celles-ci sont ajoutée à la fin et " +"le classement est perdu." -#: ../Doc/library/collections.rst:1102 +#: ../Doc/library/collections.rst:1101 msgid "" -"It is also straight-forward to create an ordered dictionary variant that " -"remembers the order the keys were *last* inserted. If a new entry overwrites " -"an existing entry, the original insertion position is changed and moved to " -"the end::" +"It is also straight-forward to create an ordered dictionary variant that remembers the " +"order the keys were *last* inserted. If a new entry overwrites an existing entry, the " +"original insertion position is changed and moved to the end::" msgstr "" +"Il est également facile de créer une variante de dictionnaire ordonné qui retient " +"l'ordre dans lequel les clés ont été insérées *en dernier*. Si une nouvelle entrée " +"écrase une existante, la position d'insertion d'origine est modifiée et déplacée à la " +"fin : ::" -#: ../Doc/library/collections.rst:1115 +#: ../Doc/library/collections.rst:1114 msgid "" -"An ordered dictionary can be combined with the :class:`Counter` class so " -"that the counter remembers the order elements are first encountered::" +"An ordered dictionary can be combined with the :class:`Counter` class so that the " +"counter remembers the order elements are first encountered::" msgstr "" +"Un dictionnaire ordonné peut être combiné avec la classe :class:`Counter` afin de " +"mémoriser l'ordre dans lequel les éléments ont été ajoutés pour la première fois : ::" -#: ../Doc/library/collections.rst:1129 +#: ../Doc/library/collections.rst:1128 msgid ":class:`UserDict` objects" -msgstr "" +msgstr "Objets :class:`UserDict`" -#: ../Doc/library/collections.rst:1131 +#: ../Doc/library/collections.rst:1130 msgid "" -"The class, :class:`UserDict` acts as a wrapper around dictionary objects. " -"The need for this class has been partially supplanted by the ability to " -"subclass directly from :class:`dict`; however, this class can be easier to " -"work with because the underlying dictionary is accessible as an attribute." +"The class, :class:`UserDict` acts as a wrapper around dictionary objects. The need for " +"this class has been partially supplanted by the ability to subclass directly from :" +"class:`dict`; however, this class can be easier to work with because the underlying " +"dictionary is accessible as an attribute." msgstr "" +"La classe :class:`UserDict` se comporte comme une surcouche autour des dictionnaires. " +"L'utilité de cette classe est réduite car on peut maintenant hériter directement de :" +"class:`dict`. Cependant, il peut être plus facile de travailler avec celle-ci car le " +"dictionnaire sous-jacent est accessible comme attribut." -#: ../Doc/library/collections.rst:1139 +#: ../Doc/library/collections.rst:1138 msgid "" -"Class that simulates a dictionary. The instance's contents are kept in a " -"regular dictionary, which is accessible via the :attr:`data` attribute of :" -"class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is " -"initialized with its contents; note that a reference to *initialdata* will " -"not be kept, allowing it be used for other purposes." +"Class that simulates a dictionary. The instance's contents are kept in a regular " +"dictionary, which is accessible via the :attr:`data` attribute of :class:`UserDict` " +"instances. If *initialdata* is provided, :attr:`data` is initialized with its " +"contents; note that a reference to *initialdata* will not be kept, allowing it be used " +"for other purposes." msgstr "" +"Classe simulant un dictionnaire. Les instances de :class:`UserDict` possèdent un " +"attribut :attr:`data` où est stocké leur contenu sous forme de dictionnaire natif. Si " +"*initialdata* est spécifié, alors :attr:`data` est initialisé avec son contenu. " +"Remarquez qu'une référence vers *initialdata* n'est pas conservée, ce qui permet de " +"l'utiliser pour d'autres tâches." -#: ../Doc/library/collections.rst:1145 +#: ../Doc/library/collections.rst:1144 msgid "" -"In addition to supporting the methods and operations of mappings, :class:" -"`UserDict` instances provide the following attribute:" +"In addition to supporting the methods and operations of mappings, :class:`UserDict` " +"instances provide the following attribute:" msgstr "" +"En plus de gérer les méthodes et opérations des dictionnaires, les instance de :class:" +"`UserDict` fournissent l'attribut suivant :" -#: ../Doc/library/collections.rst:1150 -msgid "" -"A real dictionary used to store the contents of the :class:`UserDict` class." -msgstr "" +#: ../Doc/library/collections.rst:1149 +msgid "A real dictionary used to store the contents of the :class:`UserDict` class." +msgstr "Un dictionnaire natif où est stocké le contenu de la classe :class:`UserDict`." -#: ../Doc/library/collections.rst:1156 +#: ../Doc/library/collections.rst:1155 msgid ":class:`UserList` objects" -msgstr "" +msgstr "Objets :class:`UserList`" -#: ../Doc/library/collections.rst:1158 +#: ../Doc/library/collections.rst:1157 msgid "" -"This class acts as a wrapper around list objects. It is a useful base class " -"for your own list-like classes which can inherit from them and override " -"existing methods or add new ones. In this way, one can add new behaviors to " -"lists." +"This class acts as a wrapper around list objects. It is a useful base class for your " +"own list-like classes which can inherit from them and override existing methods or add " +"new ones. In this way, one can add new behaviors to lists." msgstr "" +"Cette classe agit comme une surcouche autour des objets ``list``. C'est une classe mère " +"utile pour vos classes listes-compatibles qui peuvent en hériter et surcharger les " +"méthodes existantes ou en ajouter de nouvelles. Ainsi, on peut ajouter de nouveaux " +"comportements aux listes." -#: ../Doc/library/collections.rst:1163 +#: ../Doc/library/collections.rst:1162 msgid "" -"The need for this class has been partially supplanted by the ability to " -"subclass directly from :class:`list`; however, this class can be easier to " -"work with because the underlying list is accessible as an attribute." +"The need for this class has been partially supplanted by the ability to subclass " +"directly from :class:`list`; however, this class can be easier to work with because the " +"underlying list is accessible as an attribute." msgstr "" +"L'utilité de cette classe a été partiellement réduite par la possibilité d'hériter " +"directement de :class:`list`. Cependant, il peut être plus facile de travailler avec " +"cette classe car la liste sous-jacente est accessible via un attribut." -#: ../Doc/library/collections.rst:1169 +#: ../Doc/library/collections.rst:1168 msgid "" -"Class that simulates a list. The instance's contents are kept in a regular " -"list, which is accessible via the :attr:`data` attribute of :class:" -"`UserList` instances. The instance's contents are initially set to a copy " -"of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, " -"for example a real Python list or a :class:`UserList` object." +"Class that simulates a list. The instance's contents are kept in a regular list, which " +"is accessible via the :attr:`data` attribute of :class:`UserList` instances. The " +"instance's contents are initially set to a copy of *list*, defaulting to the empty list " +"``[]``. *list* can be any iterable, for example a real Python list or a :class:" +"`UserList` object." msgstr "" +"Classe simulant une liste. Les instances de :class:`UserList` possèdent un attribut :" +"attr:`UserList` où est stocké leur contenu sous forme de liste native. Il est " +"initialement une copie de *list*, ou ``[]`` par défaut. *list* peut être un itérable, " +"par exemple une liste native ou un objet :class:`UserList`." -#: ../Doc/library/collections.rst:1175 +#: ../Doc/library/collections.rst:1174 msgid "" -"In addition to supporting the methods and operations of mutable sequences, :" -"class:`UserList` instances provide the following attribute:" +"In addition to supporting the methods and operations of mutable sequences, :class:" +"`UserList` instances provide the following attribute:" msgstr "" +"En plus de gérer les méthodes et opérations des séquences muables, les instances de :" +"class:`UserList` possèdent l'attribut suivant :" -#: ../Doc/library/collections.rst:1180 +#: ../Doc/library/collections.rst:1179 msgid "" -"A real :class:`list` object used to store the contents of the :class:" -"`UserList` class." +"A real :class:`list` object used to store the contents of the :class:`UserList` class." msgstr "" +"Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :class:" +"`UserList`." -#: ../Doc/library/collections.rst:1183 +#: ../Doc/library/collections.rst:1182 msgid "" -"**Subclassing requirements:** Subclasses of :class:`UserList` are expected " -"to offer a constructor which can be called with either no arguments or one " -"argument. List operations which return a new sequence attempt to create an " -"instance of the actual implementation class. To do so, it assumes that the " -"constructor can be called with a single parameter, which is a sequence " -"object used as a data source." +"**Subclassing requirements:** Subclasses of :class:`UserList` are expected to offer a " +"constructor which can be called with either no arguments or one argument. List " +"operations which return a new sequence attempt to create an instance of the actual " +"implementation class. To do so, it assumes that the constructor can be called with a " +"single parameter, which is a sequence object used as a data source." msgstr "" +"**Prérequis pour l'héritage :** Les sous-classe de :class:`UserList` doivent " +"implémenter un constructeur qui peut être appelé avec zéro ou un argument. Les " +"opérations sur les listes qui renvoient une nouvelle séquence essayent de créer une " +"instance de la classe courante. C'est pour cela que le constructeur doit pouvoir être " +"appelé avec un unique paramètre, un objet séquence utilisé comme source de données." -#: ../Doc/library/collections.rst:1190 +#: ../Doc/library/collections.rst:1189 msgid "" -"If a derived class does not wish to comply with this requirement, all of the " -"special methods supported by this class will need to be overridden; please " -"consult the sources for information about the methods which need to be " -"provided in that case." +"If a derived class does not wish to comply with this requirement, all of the special " +"methods supported by this class will need to be overridden; please consult the sources " +"for information about the methods which need to be provided in that case." msgstr "" +"Si une classe fille ne remplit pas cette condition, toutes les méthodes spéciales " +"gérées par cette classe devront être implémentées à nouveau. Merci de consulter les " +"sources pour obtenir des informations sur les méthodes qui doivent être fournies dans " +"ce cas." -#: ../Doc/library/collections.rst:1196 +#: ../Doc/library/collections.rst:1195 msgid ":class:`UserString` objects" -msgstr "" +msgstr "Objets :class:`UserString`" -#: ../Doc/library/collections.rst:1198 +#: ../Doc/library/collections.rst:1197 msgid "" -"The class, :class:`UserString` acts as a wrapper around string objects. The " -"need for this class has been partially supplanted by the ability to subclass " -"directly from :class:`str`; however, this class can be easier to work with " -"because the underlying string is accessible as an attribute." +"The class, :class:`UserString` acts as a wrapper around string objects. The need for " +"this class has been partially supplanted by the ability to subclass directly from :" +"class:`str`; however, this class can be easier to work with because the underlying " +"string is accessible as an attribute." msgstr "" +"La classe :class:`UserString` agit comme une surcouche autour des objets ``str``. " +"L'utilité de cette classe a été partiellement réduite par la possibilité d'hériter " +"directement de :class:`str`. Cependant, il peut être plus facile de travailler avec " +"cette classe car la chaîne de caractère sous-jacente est accessible via un attribut." -#: ../Doc/library/collections.rst:1206 +#: ../Doc/library/collections.rst:1205 msgid "" -"Class that simulates a string object. The instance's content is kept in a " -"regular string object, which is accessible via the :attr:`data` attribute " -"of :class:`UserString` instances. The instance's contents are initially set " -"to a copy of *seq*. The *seq* argument can be any object which can be " -"converted into a string using the built-in :func:`str` function." +"Class that simulates a string object. The instance's content is kept in a regular " +"string object, which is accessible via the :attr:`data` attribute of :class:" +"`UserString` instances. The instance's contents are initially set to a copy of *seq*. " +"The *seq* argument can be any object which can be converted into a string using the " +"built-in :func:`str` function." msgstr "" +"Classe simulant une chaîne de caractères. Les instances de :class:`UserString` " +"possèdent un attribut :attr:`data` où est stocké leur contenu sous forme de chaîne de " +"caractères native. Le contenu de l'instance est initialement une copie de *seq*, qui " +"peut être n'importe quel objet convertible en chaîne de caractère avec la fonction " +"native :func:`str`." -#: ../Doc/library/collections.rst:1213 +#: ../Doc/library/collections.rst:1212 msgid "" -"In addition to supporting the methods and operations of strings, :class:" -"`UserString` instances provide the following attribute:" +"In addition to supporting the methods and operations of strings, :class:`UserString` " +"instances provide the following attribute:" msgstr "" +"En plus de gérer les méthodes et opérations sur les chaînes de caractères, les " +"instances de :class:`UserString` possèdent l'attribut suivant :" -#: ../Doc/library/collections.rst:1218 +#: ../Doc/library/collections.rst:1217 msgid "" -"A real :class:`str` object used to store the contents of the :class:" -"`UserString` class." +"A real :class:`str` object used to store the contents of the :class:`UserString` class." msgstr "" +"Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :class:" +"`UserString`." -#: ../Doc/library/collections.rst:1221 +#: ../Doc/library/collections.rst:1220 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." msgstr "" +"Nouvelles méthodes ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " +"``isprintable`` et ``maketrans``."