forked from AFPy/python-docs-fr
198 lines
8.3 KiB
Plaintext
198 lines
8.3 KiB
Plaintext
# Copyright (C) 2001-2018, Python Software Foundation
|
||
# For licence information, see README file.
|
||
#
|
||
msgid ""
|
||
msgstr ""
|
||
"Project-Id-Version: Python 3.6\n"
|
||
"Report-Msgid-Bugs-To: \n"
|
||
"POT-Creation-Date: 2018-11-29 16:06+0100\n"
|
||
"PO-Revision-Date: 2019-02-21 17:18+0100\n"
|
||
"Last-Translator: \n"
|
||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||
"Language: fr\n"
|
||
"MIME-Version: 1.0\n"
|
||
"Content-Type: text/plain; charset=UTF-8\n"
|
||
"Content-Transfer-Encoding: 8bit\n"
|
||
"X-Generator: Poedit 2.0.2\n"
|
||
|
||
#: ../Doc/library/copy.rst:2
|
||
msgid ":mod:`copy` --- Shallow and deep copy operations"
|
||
msgstr ":mod:`copy` — Opérations de copie superficielle et récursive"
|
||
|
||
#: ../Doc/library/copy.rst:7
|
||
msgid "**Source code:** :source:`Lib/copy.py`"
|
||
msgstr "**Code source :** :source:`Lib/copy.py`"
|
||
|
||
#: ../Doc/library/copy.rst:11
|
||
msgid ""
|
||
"Assignment statements in Python do not copy objects, they create bindings "
|
||
"between a target and an object. For collections that are mutable or contain "
|
||
"mutable items, a copy is sometimes needed so one can change one copy without "
|
||
"changing the other. This module provides generic shallow and deep copy "
|
||
"operations (explained below)."
|
||
msgstr ""
|
||
"Les instructions d'affectation en Python ne copient pas les objets, elles "
|
||
"créent des liens entre la cible et l'objet. Concernant les collections qui "
|
||
"sont muables ou contiennent des éléments muables, une copie est parfois "
|
||
"nécessaire, pour pouvoir modifier une copie sans modifier l'autre. Ce module "
|
||
"met à disposition des opérations de copie génériques superficielle et "
|
||
"récursive (comme expliqué ci-dessous)."
|
||
|
||
#: ../Doc/library/copy.rst:18
|
||
msgid "Interface summary:"
|
||
msgstr "Résumé de l'interface :"
|
||
|
||
#: ../Doc/library/copy.rst:22
|
||
msgid "Return a shallow copy of *x*."
|
||
msgstr "Renvoie une copie superficielle de *x*."
|
||
|
||
#: ../Doc/library/copy.rst:27
|
||
msgid "Return a deep copy of *x*."
|
||
msgstr "Renvoie une copie récursive de *x*."
|
||
|
||
#: ../Doc/library/copy.rst:32
|
||
msgid "Raised for module specific errors."
|
||
msgstr "Levée pour les erreurs spécifiques au module."
|
||
|
||
#: ../Doc/library/copy.rst:35
|
||
msgid ""
|
||
"The difference between shallow and deep copying is only relevant for "
|
||
"compound objects (objects that contain other objects, like lists or class "
|
||
"instances):"
|
||
msgstr ""
|
||
"La différence entre copie superficielle et récursive n'est pertinente que "
|
||
"pour les objets composés (objets contenant d'autres objets, comme des listes "
|
||
"ou des instances de classe) :"
|
||
|
||
#: ../Doc/library/copy.rst:38
|
||
msgid ""
|
||
"A *shallow copy* constructs a new compound object and then (to the extent "
|
||
"possible) inserts *references* into it to the objects found in the original."
|
||
msgstr ""
|
||
"Une *copie superficielle* construit un nouvel objet composé puis (dans la "
|
||
"mesure du possible) insère dans l'objet composé des *références* aux objets "
|
||
"trouvés dans l'original."
|
||
|
||
#: ../Doc/library/copy.rst:41
|
||
msgid ""
|
||
"A *deep copy* constructs a new compound object and then, recursively, "
|
||
"inserts *copies* into it of the objects found in the original."
|
||
msgstr ""
|
||
"Une *copie récursive (ou profonde)* construit un nouvel objet composé puis, "
|
||
"récursivement, insère dans l'objet composé des *copies* des objets trouvés "
|
||
"dans l'objet original."
|
||
|
||
#: ../Doc/library/copy.rst:44
|
||
msgid ""
|
||
"Two problems often exist with deep copy operations that don't exist with "
|
||
"shallow copy operations:"
|
||
msgstr ""
|
||
"On rencontre souvent deux problèmes avec les opérations de copie récursive "
|
||
"qui n'existent pas avec les opérations de copie superficielle :"
|
||
|
||
#: ../Doc/library/copy.rst:47
|
||
msgid ""
|
||
"Recursive objects (compound objects that, directly or indirectly, contain a "
|
||
"reference to themselves) may cause a recursive loop."
|
||
msgstr ""
|
||
"Les objets récursifs (objets composés qui, directement ou indirectement, "
|
||
"contiennent une référence à eux-mêmes) peuvent causer une boucle récursive."
|
||
|
||
#: ../Doc/library/copy.rst:50
|
||
msgid ""
|
||
"Because deep copy copies everything it may copy too much, such as data which "
|
||
"is intended to be shared between copies."
|
||
msgstr ""
|
||
"Comme une copie récursive copie tout, elle peut en copier trop, par exemple "
|
||
"des données qui sont destinées à être partagées entre différentes copies."
|
||
|
||
#: ../Doc/library/copy.rst:53
|
||
msgid "The :func:`deepcopy` function avoids these problems by:"
|
||
msgstr "La fonction :func:`deepcopy` évite ces problèmes en :"
|
||
|
||
#: ../Doc/library/copy.rst:55
|
||
msgid ""
|
||
"keeping a ``memo`` dictionary of objects already copied during the current "
|
||
"copying pass; and"
|
||
msgstr ""
|
||
"gardant en mémoire dans un dictionnaire ``memo`` les objets déjà copiés "
|
||
"durant la phase de copie actuelle ; et"
|
||
|
||
#: ../Doc/library/copy.rst:58
|
||
msgid ""
|
||
"letting user-defined classes override the copying operation or the set of "
|
||
"components copied."
|
||
msgstr ""
|
||
"laissant les classes créées par l'utilisateur écraser l'opération de copie "
|
||
"ou l'ensemble de composants copiés."
|
||
|
||
#: ../Doc/library/copy.rst:61
|
||
msgid ""
|
||
"This module does not copy types like module, method, stack trace, stack "
|
||
"frame, file, socket, window, array, or any similar types. It does \"copy\" "
|
||
"functions and classes (shallow and deeply), by returning the original object "
|
||
"unchanged; this is compatible with the way these are treated by the :mod:"
|
||
"`pickle` module."
|
||
msgstr ""
|
||
"Ce module ne copie pas les types tels que module, méthode, trace d'appels, "
|
||
"cadre de pile, fichier, socket, fenêtre, tableau, ou tout autre type "
|
||
"similaire. Il \"copie\" les fonctions et les classes (superficiellement et "
|
||
"récursivement), en retournant l'objet original inchangé ; c'est compatible "
|
||
"avec la manière dont ils sont traités par le module :mod:`pickle`."
|
||
|
||
#: ../Doc/library/copy.rst:66
|
||
msgid ""
|
||
"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of "
|
||
"lists by assigning a slice of the entire list, for example, ``copied_list = "
|
||
"original_list[:]``."
|
||
msgstr ""
|
||
"Les copies superficielles de dictionnaires peuvent être faites en utilisant :"
|
||
"meth:`dict.copy`, et de listes en affectant un ``slice`` de la liste, par "
|
||
"exemple, ``copied_list = original_list[:]``."
|
||
|
||
#: ../Doc/library/copy.rst:72
|
||
msgid ""
|
||
"Classes can use the same interfaces to control copying that they use to "
|
||
"control pickling. See the description of module :mod:`pickle` for "
|
||
"information on these methods. In fact, the :mod:`copy` module uses the "
|
||
"registered pickle functions from the :mod:`copyreg` module."
|
||
msgstr ""
|
||
"Les classes peuvent utiliser les mêmes interfaces de contrôle que celles "
|
||
"utilisées pour la sérialisation. Voir la description du module :mod:`pickle` "
|
||
"pour plus d'informations sur ces méthodes. En effet, le module :mod:`copy` "
|
||
"utilise les fonctions de sérialisation enregistrées à partir du module :mod:"
|
||
"`copyreg`."
|
||
|
||
#: ../Doc/library/copy.rst:81
|
||
msgid ""
|
||
"In order for a class to define its own copy implementation, it can define "
|
||
"special methods :meth:`__copy__` and :meth:`__deepcopy__`. The former is "
|
||
"called to implement the shallow copy operation; no additional arguments are "
|
||
"passed. The latter is called to implement the deep copy operation; it is "
|
||
"passed one argument, the ``memo`` dictionary. If the :meth:`__deepcopy__` "
|
||
"implementation needs to make a deep copy of a component, it should call the :"
|
||
"func:`deepcopy` function with the component as first argument and the memo "
|
||
"dictionary as second argument."
|
||
msgstr ""
|
||
"Afin qu'une classe définisse sa propre implémentation de copie, elle peut "
|
||
"définir les méthodes spéciales :meth:`__copy__` et :meth:`__deepcopy__`. La "
|
||
"première est appelée pour implémenter l'opération de copie superficielle ; "
|
||
"aucun argument supplémentaire n'est passé. La seconde est appelée pour "
|
||
"implémenter l'opération de copie récursive ; elle reçoit un argument, le "
|
||
"dictionnaire ``memo``. Si l'implémentation de :meth:`__deepcopy__` a besoin "
|
||
"de faire une copie récursive d'un composant, elle doit appeler la fonction :"
|
||
"func:`deepcopy` avec le composant comme premier argument et le dictionnaire "
|
||
"*memo* comme second argument."
|
||
|
||
#: ../Doc/library/copy.rst:93
|
||
msgid "Module :mod:`pickle`"
|
||
msgstr "Module :mod:`pickle`"
|
||
|
||
#: ../Doc/library/copy.rst:93
|
||
msgid ""
|
||
"Discussion of the special methods used to support object state retrieval and "
|
||
"restoration."
|
||
msgstr ""
|
||
"Discussion sur les méthodes spéciales utilisées pour gérer la récupération "
|
||
"et la restauration de l'état d'un objet."
|