@@ -261,12 +261,16 @@ msgid ""
261261"Note, the iteration order of a :class:`ChainMap()` is determined by scanning "
262262"the mappings last to first::"
263263msgstr ""
264+ "Notez que l'itération de :class:`ChainMap()` se fait en parcourant les "
265+ "tableaux de correspondances du dernier jusqu'au premier ::"
264266
265267#: ../Doc/library/collections.rst:111
266268msgid ""
267269"This gives the same ordering as a series of :meth:`dict.update` calls "
268270"starting with the last mapping::"
269271msgstr ""
272+ "Cela produit le même ordre qu'une suite d'appels à :meth:`dict.update` en "
273+ "commençant par le dernier tableau de correspondances ::"
270274
271275#: ../Doc/library/collections.rst:121
272276msgid ""
@@ -1246,13 +1250,12 @@ msgstr ""
12461250"séquence ou d'un itérable existant."
12471251
12481252#: ../Doc/library/collections.rst:905
1249- #, fuzzy
12501253msgid ""
12511254"Return a new :class:`dict` which maps field names to their corresponding "
12521255"values:"
12531256msgstr ""
1254- "Renvoie un nouvel :class:`OrderedDict ` qui associe chaque nom de champ à sa "
1255- "valeur correspondante :"
1257+ "Renvoie un nouveau :class:`dict ` qui associe chaque nom de champ à sa valeur "
1258+ "correspondante :"
12561259
12571260#: ../Doc/library/collections.rst:914
12581261msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`."
@@ -1347,14 +1350,14 @@ msgstr ""
13471350"`~somenamedtuple._replace` pour personnaliser une instance prototype :"
13481351
13491352#: ../Doc/library/collections.rst:1019
1350- #, fuzzy
13511353msgid ""
13521354"See :class:`typing.NamedTuple` for a way to add type hints for named "
13531355"tuples. It also provides an elegant notation using the :keyword:`class` "
13541356"keyword::"
13551357msgstr ""
13561358"Voir :meth:`typing.NamedTuple` pour un moyen d'ajouter des indications de "
1357- "type pour les tuples nommés."
1359+ "type pour les tuples nommés. Cela fournit aussi une notation élégante en "
1360+ "utilisant le mot-clé :keyword:`class` ::"
13581361
13591362#: ../Doc/library/collections.rst:1028
13601363msgid ""
@@ -1369,6 +1372,9 @@ msgid ""
13691372"The :mod:`dataclasses` module provides a decorator and functions for "
13701373"automatically adding generated special methods to user-defined classes."
13711374msgstr ""
1375+ "Le module :mod:`dataclasses` fournit un décorateur et des fonctions pour "
1376+ "ajouter automatiquement des méthodes spéciales aux classes définies par "
1377+ "l'utilisateur."
13721378
13731379#: ../Doc/library/collections.rst:1036
13741380msgid ":class:`OrderedDict` objects"
@@ -1381,23 +1387,33 @@ msgid ""
13811387"important now that the built-in :class:`dict` class gained the ability to "
13821388"remember insertion order (this new behavior became guaranteed in Python 3.7)."
13831389msgstr ""
1390+ "Les dictionnaires ordonnés sont des dictionnaires comme les autres mais "
1391+ "possèdent des capacités supplémentaires pour s'ordonner. Ils sont maintenant "
1392+ "moins importants puisque la classe native :class:`dict` sait se souvenir de "
1393+ "l'ordre d'insertion (cette fonctionnalité a été garantie par Python 3.7)."
13841394
13851395#: ../Doc/library/collections.rst:1044
13861396msgid "Some differences from :class:`dict` still remain:"
1387- msgstr ""
1397+ msgstr "Quelques différences persistent vis-à-vis de :class:`dict` : "
13881398
13891399#: ../Doc/library/collections.rst:1046
13901400msgid ""
13911401"The regular :class:`dict` was designed to be very good at mapping "
13921402"operations. Tracking insertion order was secondary."
13931403msgstr ""
1404+ "Les :class:`dict` classiques ont été conçus pour être performants dans les "
1405+ "opérations de correspondance. Garder une trace de l'ordre d'insertion était "
1406+ "secondaire."
13941407
13951408#: ../Doc/library/collections.rst:1049
13961409msgid ""
13971410"The :class:`OrderedDict` was designed to be good at reordering operations. "
13981411"Space efficiency, iteration speed, and the performance of update operations "
13991412"were secondary."
14001413msgstr ""
1414+ "Les :class:`OrderedDict` ont été conçus pour être performants dans les "
1415+ "opérations de ré-arrangement. L'occupation mémoire, la vitesse de parcours "
1416+ "et les performances de mise à jour étaient secondaires."
14011417
14021418#: ../Doc/library/collections.rst:1053
14031419msgid ""
@@ -1406,33 +1422,47 @@ msgid ""
14061422"recent accesses (for example in an `LRU cache <https://medium.com/"
14071423"@krishankantsinghal/my-first-blog-on-medium-583159139237>`_)."
14081424msgstr ""
1425+ "Algorithmiquement, :class:`OrderedDict` gère mieux les ré-arrangements "
1426+ "fréquents que :class:`dict`. Ceci la rend adaptée pour suivre les accès les "
1427+ "plus récents (par exemple pour implémenter un `cache LRU <https://medium."
1428+ "com/@krishankantsinghal/my-first-blog-on-medium-583159139237>`_ pour *Least "
1429+ "Recently Used* en anglais)."
14091430
14101431#: ../Doc/library/collections.rst:1058
14111432msgid ""
14121433"The equality operation for :class:`OrderedDict` checks for matching order."
14131434msgstr ""
1435+ "Le test d'égalité de :class:`OrderedDict` vérifie si l'ordre correspond."
14141436
14151437#: ../Doc/library/collections.rst:1060
14161438msgid ""
14171439"The :meth:`popitem` method of :class:`OrderedDict` has a different "
14181440"signature. It accepts an optional argument to specify which item is popped."
14191441msgstr ""
1442+ "La méthode :meth:`popitem` de :class:`OrderedDict` possède une signature "
1443+ "différente. Elle accepte un argument optionnel pour spécifier quel élément "
1444+ "doit être enlevé."
14201445
14211446#: ../Doc/library/collections.rst:1063
14221447msgid ""
14231448":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently "
14241449"reposition an element to an endpoint."
14251450msgstr ""
1451+ ":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer "
1452+ "efficacement un élément à la fin."
14261453
14271454#: ../Doc/library/collections.rst:1066
14281455msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method."
14291456msgstr ""
1457+ "Avant Python 3.8, :class:`dict` n'a pas de méthode :meth:`__reversed__`."
14301458
14311459#: ../Doc/library/collections.rst:1071
14321460msgid ""
14331461"Return an instance of a :class:`dict` subclass that has methods specialized "
14341462"for rearranging dictionary order."
14351463msgstr ""
1464+ "Renvoie une instance d'une sous-classe de :class:`dict` qui possède des "
1465+ "méthodes spécialisées pour redéfinir l'ordre du dictionnaire."
14361466
14371467#: ../Doc/library/collections.rst:1078
14381468msgid ""
@@ -1506,23 +1536,24 @@ msgid ":class:`OrderedDict` Examples and Recipes"
15061536msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`"
15071537
15081538#: ../Doc/library/collections.rst:1122
1509- #, fuzzy
15101539msgid ""
15111540"It is straightforward to create an ordered dictionary variant that remembers "
15121541"the order the keys were *last* inserted. If a new entry overwrites an "
15131542"existing entry, the original insertion position is changed and moved to the "
15141543"end::"
15151544msgstr ""
1516- "Il est également facile de créer une variante de dictionnaire ordonné qui "
1517- "retient l'ordre dans lequel les clés ont été insérées *en dernier*. Si une "
1518- "nouvelle entrée écrase une existante, la position d'insertion d'origine est "
1519- "modifiée et déplacée à la fin : ::"
1545+ "Il est facile de créer une variante de dictionnaire ordonné qui retient "
1546+ "l'ordre dans lequel les clés ont été insérées *en dernier*. Si une nouvelle "
1547+ "entrée écrase une existante, la position d'insertion d'origine est modifiée "
1548+ "et déplacée à la fin : ::"
15201549
15211550#: ../Doc/library/collections.rst:1134
15221551msgid ""
15231552"An :class:`OrderedDict` would also be useful for implementing variants of :"
15241553"func:`functools.lru_cache`::"
15251554msgstr ""
1555+ "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes "
1556+ "de :func:`functools.lru_cache` ::"
15261557
15271558#: ../Doc/library/collections.rst:1157
15281559msgid ":class:`UserDict` objects"
0 commit comments