From a2b66f2e71ee1cf30eedf16913a48cefac3e44e5 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 4 Jun 2021 13:47:25 +0200 Subject: [PATCH] Make merge (#1655) --- c-api/gcsupport.po | 68 ++-- c-api/type.po | 104 ++--- faq/gui.po | 5 +- faq/programming.po | 734 +++++++++++++++++----------------- faq/windows.po | 57 ++- library/ast.po | 358 ++++++++--------- library/asyncio-eventloop.po | 10 +- library/configparser.po | 4 +- library/contextlib.po | 173 ++++---- library/functions.po | 429 ++++++++++---------- library/importlib.metadata.po | 78 ++-- library/importlib.po | 4 +- library/platform.po | 4 +- library/stdtypes.po | 580 ++++++++++++++------------- library/timeit.po | 5 +- library/types.po | 4 +- library/unittest.mock.po | 5 +- reference/expressions.po | 610 ++++++++++++++-------------- whatsnew/3.9.po | 18 +- 19 files changed, 1664 insertions(+), 1586 deletions(-) diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index da2c4fea..7d02c6de 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -60,26 +60,44 @@ msgid "" "initialized, it must call :c:func:`PyObject_GC_Track`." msgstr "" -#: c-api/gcsupport.rst:39 +#: c-api/gcsupport.rst:37 +msgid "" +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" +"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " +"subclass or subclasses." +msgstr "" + +#: c-api/gcsupport.rst:41 +msgid "" +"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " +"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " +"interpreter will automatically populate the :c:member:`~PyTypeObject." +"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " +"implements the garbage collector protocol and the child class does *not* " +"include the :const:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +#: c-api/gcsupport.rst:51 msgid "" "Analogous to :c:func:`PyObject_New` but for container objects with the :" "const:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: c-api/gcsupport.rst:45 +#: c-api/gcsupport.rst:57 msgid "" "Analogous to :c:func:`PyObject_NewVar` but for container objects with the :" "const:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: c-api/gcsupport.rst:51 +#: c-api/gcsupport.rst:63 msgid "" "Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the " "resized object or ``NULL`` on failure. *op* must not be tracked by the " "collector yet." msgstr "" -#: c-api/gcsupport.rst:57 +#: c-api/gcsupport.rst:69 msgid "" "Adds the object *op* to the set of container objects tracked by the " "collector. The collector can run at unexpected times so objects must be " @@ -88,62 +106,62 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: c-api/gcsupport.rst:66 +#: c-api/gcsupport.rst:78 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" -#: c-api/gcsupport.rst:69 +#: c-api/gcsupport.rst:81 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" -#: c-api/gcsupport.rst:74 +#: c-api/gcsupport.rst:86 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:77 +#: c-api/gcsupport.rst:89 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: c-api/gcsupport.rst:84 +#: c-api/gcsupport.rst:96 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:87 +#: c-api/gcsupport.rst:99 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: c-api/gcsupport.rst:91 +#: c-api/gcsupport.rst:103 msgid "" "Similarly, the deallocator for the object must conform to a similar pair of " "rules:" msgstr "" -#: c-api/gcsupport.rst:94 +#: c-api/gcsupport.rst:106 msgid "" "Before fields which refer to other containers are invalidated, :c:func:" "`PyObject_GC_UnTrack` must be called." msgstr "" -#: c-api/gcsupport.rst:97 +#: c-api/gcsupport.rst:109 msgid "" "The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." msgstr "" -#: c-api/gcsupport.rst:102 +#: c-api/gcsupport.rst:114 msgid "" "Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" "func:`PyObject_GC_NewVar`." msgstr "" -#: c-api/gcsupport.rst:108 +#: c-api/gcsupport.rst:120 msgid "" "Remove the object *op* from the set of container objects tracked by the " "collector. Note that :c:func:`PyObject_GC_Track` can be called again on " @@ -153,19 +171,19 @@ msgid "" "handler become invalid." msgstr "" -#: c-api/gcsupport.rst:117 +#: c-api/gcsupport.rst:129 msgid "" "The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -#: c-api/gcsupport.rst:120 +#: c-api/gcsupport.rst:132 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" -#: c-api/gcsupport.rst:125 +#: c-api/gcsupport.rst:137 msgid "" "Type of the visitor function passed to the :c:member:`~PyTypeObject." "tp_traverse` handler. The function should be called with an object to " @@ -175,13 +193,13 @@ msgid "" "users will need to write their own visitor functions." msgstr "" -#: c-api/gcsupport.rst:132 +#: c-api/gcsupport.rst:144 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" -#: c-api/gcsupport.rst:137 +#: c-api/gcsupport.rst:149 msgid "" "Traversal function for a container object. Implementations must call the " "*visit* function for each object directly contained by *self*, with the " @@ -191,7 +209,7 @@ msgid "" "returned immediately." msgstr "" -#: c-api/gcsupport.rst:144 +#: c-api/gcsupport.rst:156 msgid "" "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" "func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" @@ -199,20 +217,20 @@ msgid "" "exactly *visit* and *arg*:" msgstr "" -#: c-api/gcsupport.rst:151 +#: c-api/gcsupport.rst:163 msgid "" "If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " "*arg*. If *visit* returns a non-zero value, then return it. Using this " "macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" msgstr "" -#: c-api/gcsupport.rst:164 +#: c-api/gcsupport.rst:176 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." msgstr "" -#: c-api/gcsupport.rst:170 +#: c-api/gcsupport.rst:182 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " diff --git a/c-api/type.po b/c-api/type.po index 00971c6d..171ab67b 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -110,7 +110,17 @@ msgid "" "and sets an exception on error." msgstr "" -#: c-api/type.rst:102 +#: c-api/type.rst:101 +msgid "" +"If some of the base classes implements the GC protocol and the provided type " +"does not include the :const:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " +"protocol will be automatically implemented from its parents. On the " +"contrary, if the type being created does include :const:`Py_TPFLAGS_HAVE_GC` " +"in its flags then it **must** implement the GC protocol itself by at least " +"implementing the :c:member:`~PyTypeObject.tp_traverse` handle." +msgstr "" + +#: c-api/type.rst:111 msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " @@ -118,28 +128,28 @@ msgid "" "result pointer into the appropriate function type." msgstr "" -#: c-api/type.rst:108 +#: c-api/type.rst:117 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: c-api/type.rst:110 +#: c-api/type.rst:119 msgid "An exception is raised if *type* is not a heap type." msgstr "" -#: c-api/type.rst:116 +#: c-api/type.rst:125 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/type.rst:137 +#: c-api/type.rst:146 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: c-api/type.rst:122 +#: c-api/type.rst:131 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " @@ -149,49 +159,49 @@ msgid "" "defines the method." msgstr "" -#: c-api/type.rst:133 +#: c-api/type.rst:142 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" -#: c-api/type.rst:140 +#: c-api/type.rst:149 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: c-api/type.rst:147 +#: c-api/type.rst:156 msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:149 +#: c-api/type.rst:158 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: c-api/type.rst:154 +#: c-api/type.rst:163 msgid "" "Creates and returns a heap type object from the *spec* (:const:" "`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: c-api/type.rst:157 +#: c-api/type.rst:166 msgid "" "If *bases* is a tuple, the created heap type contains all types contained in " "it as base types." msgstr "" -#: c-api/type.rst:160 +#: c-api/type.rst:169 msgid "" "If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. If that also " "is ``NULL``, the *Py_tp_base* slot is used instead. If that also is " "``NULL``, the new type derives from :class:`object`." msgstr "" -#: c-api/type.rst:164 +#: c-api/type.rst:173 msgid "" "The *module* argument can be used to record the module in which the new " "class is defined. It must be a module object or ``NULL``. If not ``NULL``, " @@ -200,59 +210,59 @@ msgid "" "subclasses; it must be specified for each class individually." msgstr "" -#: c-api/type.rst:171 +#: c-api/type.rst:180 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:177 +#: c-api/type.rst:186 msgid "Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``." msgstr "" -#: c-api/type.rst:183 +#: c-api/type.rst:192 msgid "Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``." msgstr "" -#: c-api/type.rst:187 +#: c-api/type.rst:196 msgid "Structure defining a type's behavior." msgstr "" -#: c-api/type.rst:191 +#: c-api/type.rst:200 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: c-api/type.rst:196 +#: c-api/type.rst:205 msgid "" "Size of the instance in bytes, used to set :c:member:`PyTypeObject." "tp_basicsize` and :c:member:`PyTypeObject.tp_itemsize`." msgstr "" -#: c-api/type.rst:202 +#: c-api/type.rst:211 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:204 +#: c-api/type.rst:213 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:209 +#: c-api/type.rst:218 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: c-api/type.rst:214 +#: c-api/type.rst:223 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: c-api/type.rst:219 +#: c-api/type.rst:228 msgid "A slot ID." msgstr "" -#: c-api/type.rst:221 +#: c-api/type.rst:230 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -260,97 +270,97 @@ msgid "" "prefix. For example, use:" msgstr "" -#: c-api/type.rst:227 +#: c-api/type.rst:236 msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/type.rst:228 +#: c-api/type.rst:237 msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: c-api/type.rst:229 +#: c-api/type.rst:238 msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: c-api/type.rst:231 +#: c-api/type.rst:240 msgid "" "The following fields cannot be set at all using :c:type:`PyType_Spec` and :c:" "type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:234 +#: c-api/type.rst:243 msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" -#: c-api/type.rst:235 +#: c-api/type.rst:244 msgid ":c:member:`~PyTypeObject.tp_mro`" msgstr "" -#: c-api/type.rst:236 +#: c-api/type.rst:245 msgid ":c:member:`~PyTypeObject.tp_cache`" msgstr "" -#: c-api/type.rst:237 +#: c-api/type.rst:246 msgid ":c:member:`~PyTypeObject.tp_subclasses`" msgstr "" -#: c-api/type.rst:238 +#: c-api/type.rst:247 msgid ":c:member:`~PyTypeObject.tp_weaklist`" msgstr "" -#: c-api/type.rst:239 +#: c-api/type.rst:248 msgid ":c:member:`~PyTypeObject.tp_vectorcall`" msgstr "" -#: c-api/type.rst:240 +#: c-api/type.rst:249 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:242 +#: c-api/type.rst:251 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (see :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:244 +#: c-api/type.rst:253 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:247 +#: c-api/type.rst:256 msgid "" "The following fields cannot be set using :c:type:`PyType_Spec` and :c:type:" "`PyType_Slot` under the limited API:" msgstr "" -#: c-api/type.rst:250 +#: c-api/type.rst:259 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" -#: c-api/type.rst:251 +#: c-api/type.rst:260 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" -#: c-api/type.rst:253 +#: c-api/type.rst:262 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " "some platforms. To avoid issues, use the *bases* argument of :py:func:" "`PyType_FromSpecWithBases` instead." msgstr "" -#: c-api/type.rst:260 +#: c-api/type.rst:269 msgid "Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API." msgstr "" -#: c-api/type.rst:264 +#: c-api/type.rst:273 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: c-api/type.rst:267 +#: c-api/type.rst:276 msgid "May not be ``NULL``." msgstr "" diff --git a/faq/gui.po b/faq/gui.po index 5c0c5f0a..e2ca4183 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2019-09-04 11:44+0200\n" "Last-Translator: Zepmanbc \n" "Language-Team: FRENCH \n" @@ -192,10 +192,11 @@ msgid "FLTK" msgstr "*FLTK*" #: faq/gui.rst:93 +#, fuzzy msgid "" "Python bindings for `the FLTK toolkit `_, a simple yet " "powerful and mature cross-platform windowing system, are available from `the " -"PyFLTK project `_." +"PyFLTK project `_." msgstr "" "Les liaisons Python pour `the FLTK toolkit `_, un " "système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " diff --git a/faq/programming.po b/faq/programming.po index 1edece02..8fa145f7 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-05-19 22:42+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -155,11 +155,11 @@ msgstr "" "pytype>`_ peuvent vérifier les indications de type dans du code source " "Python." -#: faq/programming.rst:70 +#: faq/programming.rst:72 msgid "How can I create a stand-alone binary from a Python script?" msgstr "Comment créer un binaire autonome à partir d'un script Python ?" -#: faq/programming.rst:72 +#: faq/programming.rst:74 msgid "" "You don't need the ability to compile Python to C code if all you want is a " "stand-alone program that users can download and run without having to " @@ -174,7 +174,7 @@ msgstr "" "requis par un programme et lient ces modules avec un binaire Python pour " "produire un seul exécutable." -#: faq/programming.rst:78 +#: faq/programming.rst:80 msgid "" "One is to use the freeze tool, which is included in the Python source tree " "as ``Tools/freeze``. It converts Python byte code to C arrays; a C compiler " @@ -187,7 +187,7 @@ msgstr "" "vos modules dans un nouveau programme, qui est ensuite lié aux modules " "standards Python." -#: faq/programming.rst:83 +#: faq/programming.rst:85 msgid "" "It works by scanning your source recursively for import statements (in both " "forms) and looking for the modules in the standard Python path as well as in " @@ -210,38 +210,46 @@ msgstr "" "généré et le lie au reste de l'interpréteur Python pour former un binaire " "autonome qui fait exactement la même chose que le script." -#: faq/programming.rst:92 -#, fuzzy +#: faq/programming.rst:94 msgid "" -"Obviously, freeze requires a C compiler. There are several other utilities " -"which don't:" -msgstr "" -"Bien évidemment, *freeze* nécessite un compilateur C. Il existe d'autres " -"outils qui peuvent s'en passer. Un de ceux-ci est py2exe de Thomas Heller " -"(pour Windows uniquement) disponible sur" - -#: faq/programming.rst:95 -msgid "`py2exe `_ for Windows binaries" -msgstr "" - -#: faq/programming.rst:96 -msgid "" -"`py2app `_ for Mac OS X binaries" +"The following packages can help with the creation of console and GUI " +"executables:" msgstr "" #: faq/programming.rst:97 +msgid "`Nuitka `_ (Cross-platform)" +msgstr "" + +#: faq/programming.rst:98 +msgid "`PyInstaller `_ (Cross-platform)" +msgstr "" + +#: faq/programming.rst:99 msgid "" -"`cx_Freeze `_ for cross-" -"platform binaries" +"`PyOxidizer `_ (Cross-platform)" +msgstr "" + +#: faq/programming.rst:100 +msgid "" +"`cx_Freeze `_ (Cross-platform)" +msgstr "" + +#: faq/programming.rst:101 +msgid "`py2app `_ (macOS only)" msgstr "" #: faq/programming.rst:102 +#, fuzzy +msgid "`py2exe `_ (Windows only)" +msgstr "http://www.py2exe.org/" + +#: faq/programming.rst:105 msgid "Are there coding standards or a style guide for Python programs?" msgstr "" "Existe-t-il des normes de développement ou un guide de style pour écrire des " "programmes Python ?" -#: faq/programming.rst:104 +#: faq/programming.rst:107 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." @@ -249,16 +257,16 @@ msgstr "" "Oui. Le style de développement que les modules de la bibliothèque standard " "doivent obligatoirement respecter est documenté dans la :pep:`8`." -#: faq/programming.rst:109 +#: faq/programming.rst:112 msgid "Core Language" msgstr "Fondamentaux" -#: faq/programming.rst:112 +#: faq/programming.rst:115 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "" "Pourquoi une UnboundLocalError est levée alors qu'une variable a une valeur ?" -#: faq/programming.rst:114 +#: faq/programming.rst:117 msgid "" "It can be a surprise to get the UnboundLocalError in previously working code " "when it is modified by adding an assignment statement somewhere in the body " @@ -268,19 +276,19 @@ msgstr "" "jusqu'à présent correct, quand celui-ci est modifié en ajoutant une " "instruction d'affectation quelque part dans le corps d'une fonction." -#: faq/programming.rst:118 +#: faq/programming.rst:121 msgid "This code:" msgstr "Le code suivant :" -#: faq/programming.rst:126 +#: faq/programming.rst:129 msgid "works, but this code:" msgstr "fonctionne, mais le suivant :" -#: faq/programming.rst:133 +#: faq/programming.rst:136 msgid "results in an UnboundLocalError:" msgstr "lève une UnboundLocalError :" -#: faq/programming.rst:140 +#: faq/programming.rst:143 msgid "" "This is because when you make an assignment to a variable in a scope, that " "variable becomes local to that scope and shadows any similarly named " @@ -296,7 +304,7 @@ msgstr "" "nouvelle variable. Par conséquent, quand le ``print(x)`` essaye d'afficher " "la variable non initialisée, une erreur se produit." -#: faq/programming.rst:147 +#: faq/programming.rst:150 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" @@ -304,7 +312,7 @@ msgstr "" "Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " "en la déclarant globale :" -#: faq/programming.rst:158 +#: faq/programming.rst:161 msgid "" "This explicit declaration is required in order to remind you that (unlike " "the superficially analogous situation with class and instance variables) you " @@ -315,7 +323,7 @@ msgstr "" "d'instance), c'est la valeur de la variable du contexte appelant qui est " "modifiée :" -#: faq/programming.rst:165 +#: faq/programming.rst:168 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" @@ -323,12 +331,12 @@ msgstr "" "Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" "keyword:`nonlocal` :" -#: faq/programming.rst:182 +#: faq/programming.rst:185 msgid "What are the rules for local and global variables in Python?" msgstr "" "Quelles sont les règles pour les variables locales et globales en Python ?" -#: faq/programming.rst:184 +#: faq/programming.rst:187 msgid "" "In Python, variables that are only referenced inside a function are " "implicitly global. If a variable is assigned a value anywhere within the " @@ -340,7 +348,7 @@ msgstr "" "valeur lui est affectée, elle est considérée locale (sauf si elle est " "explicitement déclarée globale)." -#: faq/programming.rst:188 +#: faq/programming.rst:191 msgid "" "Though a bit surprising at first, a moment's consideration explains this. " "On one hand, requiring :keyword:`global` for assigned variables provides a " @@ -359,7 +367,7 @@ msgstr "" "importé. Le codé serait alors truffé de déclarations ``global``, ce qui " "nuirait à leur raison d'être : identifier les effets de bords." -#: faq/programming.rst:198 +#: faq/programming.rst:201 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" @@ -367,7 +375,7 @@ msgstr "" "Pourquoi des expressions lambda définies dans une boucle avec des valeurs " "différentes retournent-elles le même résultat ?" -#: faq/programming.rst:200 +#: faq/programming.rst:203 msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " "functions), e.g.::" @@ -375,7 +383,7 @@ msgstr "" "Supposons que l'on utilise une boucle itérative pour définir des expressions " "lambda (voire même des fonctions) différentes, par exemple ::" -#: faq/programming.rst:207 +#: faq/programming.rst:210 msgid "" "This gives you a list that contains 5 lambdas that calculate ``x**2``. You " "might expect that, when called, they would return, respectively, ``0``, " @@ -386,7 +394,7 @@ msgstr "" "chacune ``x**2``. En les exécutant, on pourrait s'attendre à obtenir ``0``, " "``1``, ``4``, ``9`` et ``16``. Elles renvoient en réalité toutes ``16`` ::" -#: faq/programming.rst:217 +#: faq/programming.rst:220 msgid "" "This happens because ``x`` is not local to the lambdas, but is defined in " "the outer scope, and it is accessed when the lambda is called --- not when " @@ -401,7 +409,7 @@ msgstr "" "renvoient ``4*2``, c.-à-d. ``16``. Ceci se vérifie également en changeant la " "valeur de ``x`` et en constatant que les résultats sont modifiés ::" -#: faq/programming.rst:227 +#: faq/programming.rst:230 msgid "" "In order to avoid this, you need to save the values in variables local to " "the lambdas, so that they don't rely on the value of the global ``x``::" @@ -410,7 +418,7 @@ msgstr "" "variables locales aux expressions lambda pour que celles-ci ne se basent " "plus sur la variable globale ``x`` ::" -#: faq/programming.rst:234 +#: faq/programming.rst:237 msgid "" "Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed " "when the lambda is defined so that it has the same value that ``x`` had at " @@ -425,7 +433,7 @@ msgstr "" "troisième et ainsi de suite. Chaque expression lambda renvoie donc le " "résultat correct ::" -#: faq/programming.rst:245 +#: faq/programming.rst:248 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." @@ -433,11 +441,11 @@ msgstr "" "Ce comportement n'est pas propre aux expressions lambda, mais s'applique " "aussi aux fonctions normales." -#: faq/programming.rst:250 +#: faq/programming.rst:253 msgid "How do I share global variables across modules?" msgstr "Comment partager des variables globales entre modules ?" -#: faq/programming.rst:252 +#: faq/programming.rst:255 msgid "" "The canonical way to share information across modules within a single " "program is to create a special module (often called config or cfg). Just " @@ -453,19 +461,19 @@ msgstr "" "de chaque module, tout changement dans l'instance est propagé partout. Par " "exemple :" -#: faq/programming.rst:258 +#: faq/programming.rst:261 msgid "config.py::" msgstr "*config.py* ::" -#: faq/programming.rst:262 +#: faq/programming.rst:265 msgid "mod.py::" msgstr "*mod.py* ::" -#: faq/programming.rst:267 +#: faq/programming.rst:270 msgid "main.py::" msgstr "*main.py* ::" -#: faq/programming.rst:273 +#: faq/programming.rst:276 msgid "" "Note that using a module is also the basis for implementing the Singleton " "design pattern, for the same reason." @@ -473,12 +481,12 @@ msgstr "" "Pour les mêmes raisons, l'utilisation d'un module est aussi à la base de " "l'implémentation du patron de conception singleton." -#: faq/programming.rst:278 +#: faq/programming.rst:281 msgid "What are the \"best practices\" for using import in a module?" msgstr "" "Quelles sont les « bonnes pratiques » pour utiliser import dans un module ?" -#: faq/programming.rst:280 +#: faq/programming.rst:283 msgid "" "In general, don't use ``from modulename import *``. Doing so clutters the " "importer's namespace, and makes it much harder for linters to detect " @@ -488,7 +496,7 @@ msgstr "" "encombre l'espace de nommage de l'importateur et rend la détection de noms " "non-définis beaucoup plus ardue pour les analyseurs de code." -#: faq/programming.rst:284 +#: faq/programming.rst:287 msgid "" "Import modules at the top of a file. Doing so makes it clear what other " "modules your code requires and avoids questions of whether the module name " @@ -501,17 +509,17 @@ msgstr "" "rend l'ajout et la suppression d'une importation de module plus aisé, mais " "importer plusieurs modules sur une même ligne prend moins d'espace." -#: faq/programming.rst:289 +#: faq/programming.rst:292 msgid "It's good practice if you import modules in the following order:" msgstr "Il est recommandé d'importer les modules dans l'ordre suivant :" -#: faq/programming.rst:291 +#: faq/programming.rst:294 msgid "standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``" msgstr "" "les modules de la bibliothèque standard — e.g. ``sys``, ``os``, ``getopt``, " "``re``" -#: faq/programming.rst:292 +#: faq/programming.rst:295 msgid "" "third-party library modules (anything installed in Python's site-packages " "directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc." @@ -519,11 +527,11 @@ msgstr "" "les modules externes (tout ce qui est installé dans le dossier *site-" "packages* de Python) — e.g. *mx.DateTime, ZODB, PIL.Image*, etc." -#: faq/programming.rst:294 +#: faq/programming.rst:297 msgid "locally-developed modules" msgstr "les modules développés en local" -#: faq/programming.rst:296 +#: faq/programming.rst:299 msgid "" "It is sometimes necessary to move imports to a function or class to avoid " "problems with circular imports. Gordon McMillan says:" @@ -532,7 +540,7 @@ msgstr "" "une classe pour éviter les problèmes d'importations circulaires. Comme le " "souligne Gordon McMillan :" -#: faq/programming.rst:299 +#: faq/programming.rst:302 msgid "" "Circular imports are fine where both modules use the \"import \" " "form of import. They fail when the 2nd module wants to grab a name out of " @@ -547,7 +555,7 @@ msgstr "" "fichier. Les noms du premier module ne sont en effet pas encore disponibles " "car le premier module est occupé à importer le second." -#: faq/programming.rst:305 +#: faq/programming.rst:308 msgid "" "In this case, if the second module is only used in one function, then the " "import can easily be moved into that function. By the time the import is " @@ -559,7 +567,7 @@ msgstr "" "où l'importation sera appelée, le premier module aura fini de s'initialiser " "et le second pourra faire son importation." -#: faq/programming.rst:310 +#: faq/programming.rst:313 msgid "" "It may also be necessary to move imports out of the top level of code if " "some of the modules are platform-specific. In that case, it may not even be " @@ -574,7 +582,7 @@ msgstr "" "recommandé d'importer les modules adéquats dans le code spécifique à la " "machine." -#: faq/programming.rst:315 +#: faq/programming.rst:318 msgid "" "Only move imports into a local scope, such as inside a function definition, " "if it's necessary to solve a problem such as avoiding a circular import or " @@ -600,11 +608,11 @@ msgstr "" "dictionnaire. Même si le nom du module est sorti du contexte courant, le " "module est probablement disponible dans :data:`sys.modules`." -#: faq/programming.rst:328 +#: faq/programming.rst:331 msgid "Why are default values shared between objects?" msgstr "Pourquoi les arguments par défaut sont-ils partagés entre les objets ?" -#: faq/programming.rst:330 +#: faq/programming.rst:333 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" @@ -612,7 +620,7 @@ msgstr "" "C'est un problème que rencontrent souvent les programmeurs débutants. " "Examinons la fonction suivante ::" -#: faq/programming.rst:337 +#: faq/programming.rst:340 msgid "" "The first time you call this function, ``mydict`` contains a single item. " "The second time, ``mydict`` contains two items because when ``foo()`` begins " @@ -622,7 +630,7 @@ msgstr "" "élément. Au second appel, ``mydict`` contient deux éléments car quand " "``foo()`` commence son exécution, ``mydict`` contient déjà un élément." -#: faq/programming.rst:341 +#: faq/programming.rst:344 msgid "" "It is often expected that a function call creates new objects for default " "values. This is not what happens. Default values are created exactly once, " @@ -636,7 +644,7 @@ msgstr "" "définie. Si l'objet est modifié, comme le dictionnaire dans cet exemple, les " "appels suivants à cette fonction font référence à l'objet ainsi modifié." -#: faq/programming.rst:346 +#: faq/programming.rst:349 msgid "" "By definition, immutable objects such as numbers, strings, tuples, and " "``None``, are safe from change. Changes to mutable objects such as " @@ -647,7 +655,7 @@ msgstr "" "sur des objets modifiables comme les dictionnaires, les listes et les " "instances de classe peuvent porter à confusion." -#: faq/programming.rst:350 +#: faq/programming.rst:353 msgid "" "Because of this feature, it is good programming practice to not use mutable " "objects as default values. Instead, use ``None`` as the default value and " @@ -660,11 +668,11 @@ msgstr "" "est à ``None`` et créer une nouvelle liste, dictionnaire ou autre, le cas " "échéant. Par exemple, il ne faut pas écrire ::" -#: faq/programming.rst:358 +#: faq/programming.rst:361 msgid "but::" msgstr "mais plutôt ::" -#: faq/programming.rst:364 +#: faq/programming.rst:367 msgid "" "This feature can be useful. When you have a function that's time-consuming " "to compute, a common technique is to cache the parameters and the resulting " @@ -678,7 +686,7 @@ msgstr "" "appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " "s'implémente de la manière suivante ::" -#: faq/programming.rst:379 +#: faq/programming.rst:382 msgid "" "You could use a global variable containing a dictionary instead of the " "default value; it's a matter of taste." @@ -686,13 +694,13 @@ msgstr "" "Il est possible d'utiliser une variable globale contenant un dictionnaire à " "la place de la valeur par défaut ; ce n'est qu'une question de goût." -#: faq/programming.rst:384 +#: faq/programming.rst:387 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" "Comment passer des paramètres optionnels ou nommés d'une fonction à l'autre ?" -#: faq/programming.rst:386 +#: faq/programming.rst:389 msgid "" "Collect the arguments using the ``*`` and ``**`` specifiers in the " "function's parameter list; this gives you the positional arguments as a " @@ -705,11 +713,11 @@ msgstr "" "de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " "utilisant ``*`` et ``**`` ::" -#: faq/programming.rst:405 +#: faq/programming.rst:408 msgid "What is the difference between arguments and parameters?" msgstr "Quelle est la différence entre les arguments et les paramètres ?" -#: faq/programming.rst:407 +#: faq/programming.rst:410 msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " @@ -723,7 +731,7 @@ msgstr "" "ci. Les paramètres définissent les types des arguments qu'une fonction " "accepte. Ainsi, avec la définition de fonction suivante ::" -#: faq/programming.rst:415 +#: faq/programming.rst:418 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" @@ -731,30 +739,30 @@ msgstr "" "*foo*, *bar* et *kwargs* sont des paramètres de ``func``. Mais à l'appel de " "``func`` avec, par exemple ::" -#: faq/programming.rst:420 +#: faq/programming.rst:423 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "les valeurs ``42``, ``314``, et ``somevar`` sont des arguments." -#: faq/programming.rst:424 +#: faq/programming.rst:427 msgid "Why did changing list 'y' also change list 'x'?" msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" -#: faq/programming.rst:426 +#: faq/programming.rst:429 msgid "If you wrote code like::" msgstr "Si vous avez écrit du code comme ::" -#: faq/programming.rst:436 +#: faq/programming.rst:439 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" "vous vous demandez peut-être pourquoi l'ajout d'un élément à ``y`` a aussi " "changé ``x``." -#: faq/programming.rst:438 +#: faq/programming.rst:441 msgid "There are two factors that produce this result:" msgstr "Il y a deux raisons qui conduisent à ce comportement :" -#: faq/programming.rst:440 +#: faq/programming.rst:443 msgid "" "Variables are simply names that refer to objects. Doing ``y = x`` doesn't " "create a copy of the list -- it creates a new variable ``y`` that refers to " @@ -766,14 +774,14 @@ msgstr "" "variable ``y`` qui pointe sur le même objet que ``x``. Ceci signifie qu'il " "n'existe qu'un seul objet (la liste) auquel ``x`` et ``y`` font référence." -#: faq/programming.rst:444 +#: faq/programming.rst:447 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" "Les listes sont des :term:`muable`, ce qui signifie que leur contenu peut " "être modifié." -#: faq/programming.rst:446 +#: faq/programming.rst:449 msgid "" "After the call to :meth:`~list.append`, the content of the mutable object " "has changed from ``[]`` to ``[10]``. Since both the variables refer to the " @@ -784,11 +792,11 @@ msgstr "" "objet, il est possible d'accéder à la valeur modifiée ``[10]`` avec chacun " "des noms." -#: faq/programming.rst:450 +#: faq/programming.rst:453 msgid "If we instead assign an immutable object to ``x``::" msgstr "Si au contraire, on affecte un objet immuable à ``x`` ::" -#: faq/programming.rst:460 +#: faq/programming.rst:463 msgid "" "we can see that in this case ``x`` and ``y`` are not equal anymore. This is " "because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " @@ -807,7 +815,7 @@ msgstr "" "(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " "``5``)." -#: faq/programming.rst:468 +#: faq/programming.rst:471 msgid "" "Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " "object, whereas superficially similar operations (for example ``y = y + " @@ -827,7 +835,7 @@ msgstr "" "obtenir une copie triée de ``y`` donne ``None``, ce qui conduit très souvent " "le programme à générer une erreur facile à diagnostiquer." -#: faq/programming.rst:477 +#: faq/programming.rst:480 msgid "" "However, there is one class of operations where the same operation sometimes " "has different behaviors with different types: the augmented assignment " @@ -843,11 +851,11 @@ msgstr "" "alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` créent de " "nouveaux objets)." -#: faq/programming.rst:484 +#: faq/programming.rst:487 msgid "In other words:" msgstr "En d'autres termes :" -#: faq/programming.rst:486 +#: faq/programming.rst:489 msgid "" "If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " "etc.), we can use some specific operations to mutate it and all the " @@ -857,7 +865,7 @@ msgstr "" "class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables qui " "y font référence verront le changement." -#: faq/programming.rst:489 +#: faq/programming.rst:492 msgid "" "If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " "etc.), all the variables that refer to it will always see the same value, " @@ -869,7 +877,7 @@ msgstr "" "opérations qui transforment cette valeur en une nouvelle valeur renvoient " "toujours un nouvel objet." -#: faq/programming.rst:494 +#: faq/programming.rst:497 msgid "" "If you want to know if two variables refer to the same object or not, you " "can use the :keyword:`is` operator, or the built-in function :func:`id`." @@ -877,13 +885,13 @@ msgstr "" "L'opérateur :keyword:`is` ou la fonction native :func:`id` permettent de " "savoir si deux variables font référence au même objet." -#: faq/programming.rst:499 +#: faq/programming.rst:502 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" "Comment écrire une fonction qui modifie ses paramètres ? (passage par " "référence)" -#: faq/programming.rst:501 +#: faq/programming.rst:504 msgid "" "Remember that arguments are passed by assignment in Python. Since " "assignment just creates references to objects, there's no alias between an " @@ -896,15 +904,15 @@ msgstr "" "de passage par référence en soi. Il y a cependant plusieurs façons d'en " "émuler un." -#: faq/programming.rst:506 +#: faq/programming.rst:509 msgid "By returning a tuple of the results::" msgstr "En renvoyant un *n*-uplet de résultats ::" -#: faq/programming.rst:517 +#: faq/programming.rst:520 msgid "This is almost always the clearest solution." msgstr "C'est presque toujours la meilleure solution." -#: faq/programming.rst:519 +#: faq/programming.rst:522 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" @@ -912,33 +920,33 @@ msgstr "" "des contextes à plusieurs fils d'exécution (elle n'est pas *thread-safe*), " "et n'est donc pas recommandée." -#: faq/programming.rst:521 +#: faq/programming.rst:524 msgid "By passing a mutable (changeable in-place) object::" msgstr "En passant un objet muable (modifiable sur place) ::" -#: faq/programming.rst:532 +#: faq/programming.rst:535 msgid "By passing in a dictionary that gets mutated::" msgstr "En passant un dictionnaire, qui sera modifié ::" -#: faq/programming.rst:543 +#: faq/programming.rst:546 msgid "Or bundle up values in a class instance::" msgstr "Ou regrouper les valeurs dans une instance de classe ::" -#: faq/programming.rst:560 +#: faq/programming.rst:563 msgid "There's almost never a good reason to get this complicated." msgstr "Faire quelque chose d'aussi compliqué est rarement une bonne idée." -#: faq/programming.rst:562 +#: faq/programming.rst:565 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" "La meilleure option reste de renvoyer un *n*-uplet contenant les différents " "résultats." -#: faq/programming.rst:566 +#: faq/programming.rst:569 msgid "How do you make a higher order function in Python?" msgstr "Comment construire une fonction d'ordre supérieur en Python ?" -#: faq/programming.rst:568 +#: faq/programming.rst:571 msgid "" "You have two choices: you can use nested scopes or you can use callable " "objects. For example, suppose you wanted to define ``linear(a,b)`` which " @@ -950,19 +958,19 @@ msgstr "" "``linear(a, b)`` qui renvoie une fonction ``f(x)`` qui calcule la valeur " "``a*x+b``. En utilisant les portées imbriquées ::" -#: faq/programming.rst:577 +#: faq/programming.rst:580 msgid "Or using a callable object::" msgstr "Ou en utilisant un objet appelable ::" -#: faq/programming.rst:587 +#: faq/programming.rst:590 msgid "In both cases, ::" msgstr "Dans les deux cas ::" -#: faq/programming.rst:591 +#: faq/programming.rst:594 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "donne un objet appelable où ``taxes(10e6) == 0.3 * 10e6 + 2``." -#: faq/programming.rst:593 +#: faq/programming.rst:596 msgid "" "The callable object approach has the disadvantage that it is a bit slower " "and results in slightly longer code. However, note that a collection of " @@ -973,11 +981,11 @@ msgstr "" "collection d'objet appelables peuvent partager leurs signatures par " "héritage ::" -#: faq/programming.rst:602 +#: faq/programming.rst:605 msgid "Object can encapsulate state for several methods::" msgstr "Les objets peuvent encapsuler un état pour plusieurs méthodes ::" -#: faq/programming.rst:620 +#: faq/programming.rst:623 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." @@ -985,11 +993,11 @@ msgstr "" "Ici ``inc()``, ``dec()`` et ``reset()`` agissent comme des fonctions " "partageant une même variable compteur." -#: faq/programming.rst:625 +#: faq/programming.rst:628 msgid "How do I copy an object in Python?" msgstr "Comment copier un objet en Python ?" -#: faq/programming.rst:627 +#: faq/programming.rst:630 msgid "" "In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " "case. Not all objects can be copied, but most can." @@ -997,7 +1005,7 @@ msgstr "" "En général, essayez :func:`copy.copy` ou :func:`copy.deepcopy`. Tous les " "objets ne peuvent pas être copiés, mais la plupart le peuvent." -#: faq/programming.rst:630 +#: faq/programming.rst:633 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" @@ -1005,15 +1013,15 @@ msgstr "" "Certains objets peuvent être copiés plus facilement que d'autres. Les " "dictionnaires ont une méthode :meth:`~dict.copy` ::" -#: faq/programming.rst:635 +#: faq/programming.rst:638 msgid "Sequences can be copied by slicing::" msgstr "Les séquences peuvent être copiées via la syntaxe des tranches ::" -#: faq/programming.rst:641 +#: faq/programming.rst:644 msgid "How can I find the methods or attributes of an object?" msgstr "Comment récupérer les méthodes ou les attributs d'un objet ?" -#: faq/programming.rst:643 +#: faq/programming.rst:646 msgid "" "For an instance x of a user-defined class, ``dir(x)`` returns an " "alphabetized list of the names containing the instance attributes and " @@ -1023,11 +1031,11 @@ msgstr "" "renvoie une liste alphabétique des noms contenants les attributs de " "l'instance, et les attributs et méthodes définies par sa classe." -#: faq/programming.rst:649 +#: faq/programming.rst:652 msgid "How can my code discover the name of an object?" msgstr "Comment un code peut-il obtenir le nom d'un objet ?" -#: faq/programming.rst:651 +#: faq/programming.rst:654 msgid "" "Generally speaking, it can't, because objects don't really have names. " "Essentially, assignment always binds a name to a value; the same is true of " @@ -1040,7 +1048,7 @@ msgstr "" "différence près que, dans ce cas, la valeur est un appelable. Par exemple, " "dans le code suivant ::" -#: faq/programming.rst:667 +#: faq/programming.rst:670 msgid "" "Arguably the class has a name: even though it is bound to two names and " "invoked through the name B the created instance is still reported as an " @@ -1053,7 +1061,7 @@ msgstr "" "dire si le nom de l'instance est a ou b, les deux noms étant attachés à la " "même valeur." -#: faq/programming.rst:672 +#: faq/programming.rst:675 msgid "" "Generally speaking it should not be necessary for your code to \"know the " "names\" of particular values. Unless you are deliberately writing " @@ -1065,7 +1073,7 @@ msgstr "" "train d'écrire un programme introspectif, c'est souvent l'indication qu'un " "changement d'approche serait bénéfique." -#: faq/programming.rst:677 +#: faq/programming.rst:680 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" @@ -1073,7 +1081,7 @@ msgstr "" "Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " "analogie pour répondre à cette question :" -#: faq/programming.rst:680 +#: faq/programming.rst:683 msgid "" "The same way as you get the name of that cat you found on your porch: the " "cat (object) itself cannot tell you its name, and it doesn't really care -- " @@ -1085,7 +1093,7 @@ msgstr "" "­– alors le meilleur moyen de savoir comment il s'appelle est de demander à " "tous vos voisins (espaces de nommage) si c'est leur chat (objet)…" -#: faq/programming.rst:685 +#: faq/programming.rst:688 msgid "" "....and don't be surprised if you'll find that it's known by many names, or " "no name at all!" @@ -1093,16 +1101,16 @@ msgstr "" "…et ne soyez pas surpris si vous découvrez qu'il est connu sous plusieurs " "noms, ou s'il n'a pas de nom du tout !" -#: faq/programming.rst:690 +#: faq/programming.rst:693 msgid "What's up with the comma operator's precedence?" msgstr "Qu'en est-il de la précédence de l'opérateur virgule ?" -#: faq/programming.rst:692 +#: faq/programming.rst:695 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" "La virgule n'est pas un opérateur en Python. Observez le code suivant ::" -#: faq/programming.rst:697 +#: faq/programming.rst:700 msgid "" "Since the comma is not an operator, but a separator between expressions the " "above is evaluated as if you had entered::" @@ -1111,11 +1119,11 @@ msgstr "" "expressions, l'expression ci-dessus est évaluée de la même façon que si vous " "aviez écrit ::" -#: faq/programming.rst:702 +#: faq/programming.rst:705 msgid "not::" msgstr "et non ::" -#: faq/programming.rst:706 +#: faq/programming.rst:709 msgid "" "The same is true of the various assignment operators (``=``, ``+=`` etc). " "They are not truly operators but syntactic delimiters in assignment " @@ -1125,15 +1133,15 @@ msgstr "" "ne sont pas vraiment des opérateurs mais plutôt des délimiteurs syntaxiques " "dans les instructions d'affectation." -#: faq/programming.rst:711 +#: faq/programming.rst:714 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "Existe-t-il un équivalent à l'opérateur ternaire \"?:\" du C ?" -#: faq/programming.rst:713 +#: faq/programming.rst:716 msgid "Yes, there is. The syntax is as follows::" msgstr "Oui. Sa syntaxe est la suivante ::" -#: faq/programming.rst:720 +#: faq/programming.rst:723 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" @@ -1141,7 +1149,7 @@ msgstr "" "Avant l'introduction de cette syntaxe dans Python 2.5, il était courant " "d'utiliser les opérateurs de logique ::" -#: faq/programming.rst:725 +#: faq/programming.rst:728 msgid "" "However, this idiom is unsafe, as it can give wrong results when *on_true* " "has a false boolean value. Therefore, it is always better to use the ``... " @@ -1151,13 +1159,13 @@ msgstr "" "la valeur booléenne fausse. Il faut donc toujours utiliser la forme ``... " "if ... else ...``." -#: faq/programming.rst:731 +#: faq/programming.rst:734 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" "Est-il possible d'écrire des programmes obscurcis (*obfuscated*) d'une ligne " "en Python ?" -#: faq/programming.rst:733 +#: faq/programming.rst:736 msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" "lambda`. See the following three examples, due to Ulf Bartelt::" @@ -1166,17 +1174,17 @@ msgstr "" "keyword:`!lambda`. Par exemple les trois morceaux de code suivants, créés " "par Ulf Bartelt ::" -#: faq/programming.rst:760 +#: faq/programming.rst:763 msgid "Don't try this at home, kids!" msgstr "Les enfants, ne faites pas ça chez vous !" -#: faq/programming.rst:766 +#: faq/programming.rst:769 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" "Que signifie la barre oblique (/) dans la liste des paramètres d'une " "fonction ?" -#: faq/programming.rst:768 +#: faq/programming.rst:771 msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " @@ -1194,7 +1202,7 @@ msgstr "" "que des paramètres uniquement positionnels. Sa documentation est la " "suivante ::" -#: faq/programming.rst:781 +#: faq/programming.rst:784 msgid "" "The slash at the end of the parameter list means that both parameters are " "positional-only. Thus, calling :func:`divmod` with keyword arguments would " @@ -1204,15 +1212,15 @@ msgstr "" "paramètres sont uniquement positionnels. Et donc, appeler :func:`divmod` " "avec des arguments nommés provoque une erreur ::" -#: faq/programming.rst:792 +#: faq/programming.rst:795 msgid "Numbers and strings" msgstr "Nombres et chaînes de caractères" -#: faq/programming.rst:795 +#: faq/programming.rst:798 msgid "How do I specify hexadecimal and octal integers?" msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" -#: faq/programming.rst:797 +#: faq/programming.rst:800 msgid "" "To specify an octal digit, precede the octal value with a zero, and then a " "lower or uppercase \"o\". For example, to set the variable \"a\" to the " @@ -1222,7 +1230,7 @@ msgstr "" "puis un \"o\" majuscule ou minuscule. Par exemple pour affecter la valeur " "octale \"10\" (8 en décimal) à la variable \"a\", tapez ::" -#: faq/programming.rst:805 +#: faq/programming.rst:808 msgid "" "Hexadecimal is just as easy. Simply precede the hexadecimal number with a " "zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " @@ -1233,11 +1241,11 @@ msgstr "" "peuvent être écrits en majuscules ou en minuscules. Par exemple, dans " "l'interpréteur Python ::" -#: faq/programming.rst:818 +#: faq/programming.rst:821 msgid "Why does -22 // 10 return -3?" msgstr "Pourquoi ``-22 // 10`` donne-t-il ``-3`` ?" -#: faq/programming.rst:820 +#: faq/programming.rst:823 msgid "" "It's primarily driven by the desire that ``i % j`` have the same sign as " "``j``. If you want that, and also want::" @@ -1245,7 +1253,7 @@ msgstr "" "Cela est principalement dû à la volonté que ``i % j`` ait le même signe que " "j. Si vous voulez en plus que ::" -#: faq/programming.rst:825 +#: faq/programming.rst:828 msgid "" "then integer division has to return the floor. C also requires that " "identity to hold, and then compilers that truncate ``i // j`` need to make " @@ -1255,7 +1263,7 @@ msgstr "" "également que cette égalité soit vérifiée, et donc les compilateurs qui " "tronquent ``i // j`` ont besoin que ``i % j`` ait le même signe que ``i``." -#: faq/programming.rst:829 +#: faq/programming.rst:832 msgid "" "There are few real use cases for ``i % j`` when ``j`` is negative. When " "``j`` is positive, there are many, and in virtually all of them it's more " @@ -1269,11 +1277,11 @@ msgstr "" "10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " "est utile ; ``-190 % 12 == -10`` est un bogue en puissance." -#: faq/programming.rst:837 +#: faq/programming.rst:840 msgid "How do I convert a string to a number?" msgstr "Comment convertir une chaîne de caractères en nombre ?" -#: faq/programming.rst:839 +#: faq/programming.rst:842 msgid "" "For integers, use the built-in :func:`int` type constructor, e.g. " "``int('144') == 144``. Similarly, :func:`float` converts to floating-point, " @@ -1283,7 +1291,7 @@ msgstr "" "``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " "flottante, par exemple ``float('144') == 144.0``." -#: faq/programming.rst:843 +#: faq/programming.rst:846 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -1299,7 +1307,7 @@ msgstr "" "donnée est 0, le nombre est interprété selon les règles Python : un préfixe " "``0o`` indique de l'octal et ``0x`` indique de l'hexadécimal." -#: faq/programming.rst:850 +#: faq/programming.rst:853 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -1315,7 +1323,7 @@ msgstr "" "pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " "effacerait votre répertoire personnel." -#: faq/programming.rst:857 +#: faq/programming.rst:860 msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " "expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " @@ -1326,11 +1334,11 @@ msgstr "" "parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " "l'exception du nombre '0')." -#: faq/programming.rst:863 +#: faq/programming.rst:866 msgid "How do I convert a number to a string?" msgstr "Comment convertir un nombre en chaîne de caractères ?" -#: faq/programming.rst:865 +#: faq/programming.rst:868 msgid "" "To convert, e.g., the number 144 to the string '144', use the built-in type " "constructor :func:`str`. If you want a hexadecimal or octal representation, " @@ -1347,11 +1355,11 @@ msgstr "" "`formatstrings`, e.g. ``\"{:04d}\".format(144)`` produit ``'0144'`` et ``" "\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." -#: faq/programming.rst:874 +#: faq/programming.rst:877 msgid "How do I modify a string in place?" msgstr "Comment modifier une chaîne de caractères « sur place » ?" -#: faq/programming.rst:876 +#: faq/programming.rst:879 msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " @@ -1365,17 +1373,17 @@ msgstr "" "capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " "un objet :class:`io.StringIO` ou le module :mod:`array` ::" -#: faq/programming.rst:906 +#: faq/programming.rst:909 msgid "How do I use strings to call functions/methods?" msgstr "" "Comment utiliser des chaînes de caractères pour appeler des fonctions/" "méthodes ?" -#: faq/programming.rst:908 +#: faq/programming.rst:911 msgid "There are various techniques." msgstr "Il y a plusieurs façons de faire." -#: faq/programming.rst:910 +#: faq/programming.rst:913 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -1388,11 +1396,11 @@ msgstr "" "fonctions. C'est aussi la façon principale d'imiter la construction \"case" "\" ::" -#: faq/programming.rst:925 +#: faq/programming.rst:928 msgid "Use the built-in function :func:`getattr`::" msgstr "Utiliser la fonction :func:`getattr` ::" -#: faq/programming.rst:930 +#: faq/programming.rst:933 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -1400,17 +1408,17 @@ msgstr "" "Notez que :func:`getattr` marche sur n'importe quel objet, ceci inclut les " "classes, les instances de classes, les modules et ainsi de suite." -#: faq/programming.rst:933 +#: faq/programming.rst:936 msgid "This is used in several places in the standard library, like this::" msgstr "" "Ceci est utilisé à plusieurs reprises dans la bibliothèque standard, de " "cette façon ::" -#: faq/programming.rst:946 +#: faq/programming.rst:949 msgid "Use :func:`locals` to resolve the function name::" msgstr "Utilisez :func:`locals` pour résoudre le nom de la fonction ::" -#: faq/programming.rst:958 +#: faq/programming.rst:961 msgid "" "Is there an equivalent to Perl's chomp() for removing trailing newlines from " "strings?" @@ -1418,7 +1426,7 @@ msgstr "" "Existe-t-il un équivalent à la fonction ``chomp()`` de Perl, pour retirer " "les caractères de fin de ligne d'une chaîne de caractères ?" -#: faq/programming.rst:960 +#: faq/programming.rst:963 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -1432,7 +1440,7 @@ msgstr "" "représente plus d'une ligne, avec plusieurs lignes vides, les marqueurs de " "fin de ligne de chaque ligne vide seront retirés ::" -#: faq/programming.rst:972 +#: faq/programming.rst:975 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." @@ -1440,15 +1448,15 @@ msgstr "" "Vu que cela ne sert presque qu'à lire un texte ligne à ligne, utiliser ``S." "rstrip()`` de cette manière fonctionne correctement." -#: faq/programming.rst:977 +#: faq/programming.rst:980 msgid "Is there a scanf() or sscanf() equivalent?" msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" -#: faq/programming.rst:979 +#: faq/programming.rst:982 msgid "Not as such." msgstr "Pas exactement." -#: faq/programming.rst:981 +#: faq/programming.rst:984 msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " @@ -1465,7 +1473,7 @@ msgstr "" "paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " "que des espaces comme séparateurs." -#: faq/programming.rst:987 +#: faq/programming.rst:990 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's :c:func:`sscanf` and better suited for the task." @@ -1474,24 +1482,24 @@ msgstr "" "puissantes que la fonction :c:func:`sscanf` de C et mieux adaptées à la " "tâche." -#: faq/programming.rst:992 +#: faq/programming.rst:995 msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" msgstr "" "Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" -#: faq/programming.rst:994 +#: faq/programming.rst:997 msgid "See the :ref:`unicode-howto`." msgstr "Voir :ref:`unicode-howto`." -#: faq/programming.rst:998 +#: faq/programming.rst:1001 msgid "Performance" msgstr "Performances" -#: faq/programming.rst:1001 +#: faq/programming.rst:1004 msgid "My program is too slow. How do I speed it up?" msgstr "Mon programme est trop lent. Comment l'accélérer ?" -#: faq/programming.rst:1003 +#: faq/programming.rst:1006 msgid "" "That's a tough one, in general. First, here are a list of things to " "remember before diving further:" @@ -1499,7 +1507,7 @@ msgstr "" "Question difficile en général. Il faut garder en tête les points suivants " "avant d'aller plus loin :" -#: faq/programming.rst:1006 +#: faq/programming.rst:1009 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -1507,7 +1515,7 @@ msgstr "" "Les performances varient en fonction des implémentations de Python. Cette " "FAQ ne traite que de :term:`CPython`." -#: faq/programming.rst:1008 +#: faq/programming.rst:1011 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -1516,7 +1524,7 @@ msgstr "" "tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " "multiples." -#: faq/programming.rst:1010 +#: faq/programming.rst:1013 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." @@ -1525,7 +1533,7 @@ msgstr "" "programme *avant* d'essayer d'optimiser du code (voir le module :mod:" "`profile`)." -#: faq/programming.rst:1012 +#: faq/programming.rst:1015 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -1533,7 +1541,7 @@ msgstr "" "Écrire des scripts d'évaluation de performances permet de progresser " "rapidement dans la recherche d'améliorations (voir le module :mod:`timeit`)." -#: faq/programming.rst:1014 +#: faq/programming.rst:1017 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " @@ -1543,7 +1551,7 @@ msgstr "" "des tests unitaires ou autre) avant d'ajouter des erreurs dans des " "optimisations sophistiquées." -#: faq/programming.rst:1018 +#: faq/programming.rst:1021 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " @@ -1553,7 +1561,7 @@ msgstr "" "Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " "de performance satisfaisants :" -#: faq/programming.rst:1022 +#: faq/programming.rst:1025 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " @@ -1563,7 +1571,7 @@ msgstr "" "produire de bien meilleurs résultats que d'optimiser ça et là de petites " "portions du code." -#: faq/programming.rst:1026 +#: faq/programming.rst:1029 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -1571,7 +1579,7 @@ msgstr "" "Utiliser les structures de données adaptées. Se référer à la documentation " "des :ref:`bltin-types` et du module :mod:`collections`." -#: faq/programming.rst:1029 +#: faq/programming.rst:1032 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " @@ -1590,7 +1598,7 @@ msgstr "" "référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " "courante)." -#: faq/programming.rst:1037 +#: faq/programming.rst:1040 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -1604,7 +1612,7 @@ msgstr "" "éviter trop d'indirections, en particulier sous la forme de fonctions ou " "méthodes trop petites (qui nuisent aussi souvent à la clarté du code)." -#: faq/programming.rst:1043 +#: faq/programming.rst:1046 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -1625,7 +1633,7 @@ msgstr "" "vous pouvez aussi :ref:`écrire un module d'extension en C` " "vous-même." -#: faq/programming.rst:1053 +#: faq/programming.rst:1056 msgid "" "The wiki page devoted to `performance tips `_." @@ -1633,13 +1641,13 @@ msgstr "" "La page wiki dédiée aux `astuces de performance `_." -#: faq/programming.rst:1059 +#: faq/programming.rst:1062 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" "Quelle est la manière la plus efficace de concaténer un grand nombre de " "chaînes de caractères ?" -#: faq/programming.rst:1061 +#: faq/programming.rst:1064 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1652,7 +1660,7 @@ msgstr "" "général, la complexité est quadratique par rapport à la taille totale de la " "chaîne." -#: faq/programming.rst:1066 +#: faq/programming.rst:1069 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" @@ -1661,13 +1669,13 @@ msgstr "" "recommandée consiste à toutes les mettre dans une liste et appeler la " "méthode :meth:`str.join` à la fin ::" -#: faq/programming.rst:1074 +#: faq/programming.rst:1077 msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" msgstr "" "(une autre technique relativement efficace consiste à utiliser :class:`io." "StringIO`)" -#: faq/programming.rst:1076 +#: faq/programming.rst:1079 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " @@ -1677,15 +1685,15 @@ msgstr "" "recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " "concaténation en-place (l'opérateur ``+=``) ::" -#: faq/programming.rst:1085 +#: faq/programming.rst:1088 msgid "Sequences (Tuples/Lists)" msgstr "Séquences (*n*-uplets / listes)" -#: faq/programming.rst:1088 +#: faq/programming.rst:1091 msgid "How do I convert between tuples and lists?" msgstr "Comment convertir les listes en *n*-uplets et inversement ?" -#: faq/programming.rst:1090 +#: faq/programming.rst:1093 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." @@ -1694,7 +1702,7 @@ msgstr "" "précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " "même ordre." -#: faq/programming.rst:1093 +#: faq/programming.rst:1096 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -1707,7 +1715,7 @@ msgstr "" "fonction économique à appeler quand vous ne savez pas si votre objet est " "déjà un *n*-uplet." -#: faq/programming.rst:1098 +#: faq/programming.rst:1101 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -1720,11 +1728,11 @@ msgstr "" "``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " "même façon que ``seq[:]``." -#: faq/programming.rst:1105 +#: faq/programming.rst:1108 msgid "What's a negative index?" msgstr "Qu'est-ce qu'un index négatif ?" -#: faq/programming.rst:1107 +#: faq/programming.rst:1110 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -1738,7 +1746,7 @@ msgstr "" "dernier index, ``-2`` est le pénultième (avant-dernier), et ainsi de suite. " "On peut aussi dire que ``seq[-n]`` est équivalent à ``seq[len(seq)-n]``." -#: faq/programming.rst:1112 +#: faq/programming.rst:1115 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " @@ -1749,15 +1757,15 @@ msgstr "" "caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " "la fin d'une chaîne." -#: faq/programming.rst:1118 +#: faq/programming.rst:1121 msgid "How do I iterate over a sequence in reverse order?" msgstr "Comment itérer à rebours sur une séquence ?" -#: faq/programming.rst:1120 +#: faq/programming.rst:1123 msgid "Use the :func:`reversed` built-in function::" msgstr "Utilisez la fonction native :func:`reversed` ::" -#: faq/programming.rst:1125 +#: faq/programming.rst:1128 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -1765,21 +1773,21 @@ msgstr "" "Cela ne modifie pas la séquence initiale, mais construit à la place une " "copie en ordre inverse pour itérer dessus." -#: faq/programming.rst:1130 +#: faq/programming.rst:1133 msgid "How do you remove duplicates from a list?" msgstr "Comment retirer les doublons d'une liste ?" -#: faq/programming.rst:1132 +#: faq/programming.rst:1135 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" "Lisez le « livre de recettes » Python pour trouver une longue discussion sur " "les nombreuses approches possibles :" -#: faq/programming.rst:1134 +#: faq/programming.rst:1137 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1136 +#: faq/programming.rst:1139 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" @@ -1788,7 +1796,7 @@ msgstr "" "celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " "trouvés en chemin ::" -#: faq/programming.rst:1148 +#: faq/programming.rst:1151 msgid "" "If all elements of the list may be used as set keys (i.e. they are all :term:" "`hashable`) this is often faster ::" @@ -1797,7 +1805,7 @@ msgstr "" "dictionnaire (c'est à dire, qu'elles sont toutes :term:`hachables " "`) ceci est souvent plus rapide ::" -#: faq/programming.rst:1153 +#: faq/programming.rst:1156 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -1805,11 +1813,11 @@ msgstr "" "Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " "doublons, puis la transforme à nouveau en liste." -#: faq/programming.rst:1158 +#: faq/programming.rst:1161 msgid "How do you remove multiple items from a list" msgstr "Comment retirer les doublons d'une liste" -#: faq/programming.rst:1160 +#: faq/programming.rst:1163 msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " @@ -1821,19 +1829,19 @@ msgstr "" "plus rapide d’utiliser le remplacement des tranches par une itération avant, " "implicite ou explicite. Voici trois variantes. ::" -#: faq/programming.rst:1169 +#: faq/programming.rst:1172 msgid "The list comprehension may be fastest." msgstr "La liste en compréhension est peut-être la plus rapide ::" -#: faq/programming.rst:1173 +#: faq/programming.rst:1176 msgid "How do you make an array in Python?" msgstr "Comment construire un tableau en Python ?" -#: faq/programming.rst:1175 +#: faq/programming.rst:1178 msgid "Use a list::" msgstr "Utilisez une liste ::" -#: faq/programming.rst:1179 +#: faq/programming.rst:1182 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " @@ -1843,7 +1851,7 @@ msgstr "" "principale différence est qu'une liste Python peut contenir des objets de " "différents types." -#: faq/programming.rst:1182 +#: faq/programming.rst:1185 msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " @@ -1856,14 +1864,14 @@ msgstr "" "fournissent différentes structures de type tableaux, avec des " "caractéristiques différentes." -#: faq/programming.rst:1187 +#: faq/programming.rst:1190 msgid "" "To get Lisp-style linked lists, you can emulate cons cells using tuples::" msgstr "" "Pour obtenir des listes chaînées à la sauce Lisp, vous pouvez émuler les " "*cons cells* en utilisant des *n*-uplets ::" -#: faq/programming.rst:1191 +#: faq/programming.rst:1194 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is " @@ -1876,27 +1884,27 @@ msgstr "" "ceci que si vous êtes réellement sûr d'en avoir besoin, cette méthode est en " "général bien plus lente que les listes Python." -#: faq/programming.rst:1200 +#: faq/programming.rst:1203 msgid "How do I create a multidimensional list?" msgstr "Comment créer une liste à plusieurs dimensions ?" -#: faq/programming.rst:1202 +#: faq/programming.rst:1205 msgid "You probably tried to make a multidimensional array like this::" msgstr "" "Vous avez probablement essayé de créer une liste à plusieurs dimensions de " "cette façon ::" -#: faq/programming.rst:1206 +#: faq/programming.rst:1209 msgid "This looks correct if you print it:" msgstr "Elle semble correcte si on l'affiche :" -#: faq/programming.rst:1217 +#: faq/programming.rst:1220 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" "Mais quand vous affectez une valeur, celle-ci apparaît à plusieurs " "endroits ::" -#: faq/programming.rst:1229 +#: faq/programming.rst:1232 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -1909,7 +1917,7 @@ msgstr "" "dans une colonne apparaîtra donc dans toutes les colonnes, ce qui n'est très " "probablement pas ce que vous souhaitiez." -#: faq/programming.rst:1234 +#: faq/programming.rst:1237 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" @@ -1917,7 +1925,7 @@ msgstr "" "L'approche suggérée est d'abord de créer une liste de la longueur désirée, " "puis de remplir tous les éléments avec une nouvelle chaîne ::" -#: faq/programming.rst:1241 +#: faq/programming.rst:1244 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -1926,7 +1934,7 @@ msgstr "" "longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " "compréhension ::" -#: faq/programming.rst:1247 +#: faq/programming.rst:1250 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy `_ is the best known." @@ -1934,22 +1942,22 @@ msgstr "" "Vous pouvez aussi utiliser une extension qui fournit un type matriciel " "natif ; `NumPy `_ est la plus répandue." -#: faq/programming.rst:1252 +#: faq/programming.rst:1255 msgid "How do I apply a method to a sequence of objects?" msgstr "Comment appliquer une méthode à une séquence d'objets ?" -#: faq/programming.rst:1254 +#: faq/programming.rst:1257 msgid "Use a list comprehension::" msgstr "Utilisez une liste en compréhension ::" -#: faq/programming.rst:1261 +#: faq/programming.rst:1264 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" "Pourquoi ``a_tuple[i] += ['item']`` lève-t-il une exception alors que " "l'addition fonctionne ?" -#: faq/programming.rst:1263 +#: faq/programming.rst:1266 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " @@ -1959,7 +1967,7 @@ msgstr "" "d'affectation incrémentaux sont des opérateurs d'*affectation* et à la " "différence entre les objets muables et immuables en Python." -#: faq/programming.rst:1267 +#: faq/programming.rst:1270 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " @@ -1969,11 +1977,11 @@ msgstr "" "incrémentale sont appliqués aux éléments d'un *n*-uplet qui pointe sur des " "objets muables, mais on prendra ``list`` et ``+=`` comme exemple." -#: faq/programming.rst:1271 +#: faq/programming.rst:1274 msgid "If you wrote::" msgstr "Si vous écrivez ::" -#: faq/programming.rst:1279 +#: faq/programming.rst:1282 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -1987,7 +1995,7 @@ msgstr "" "l'élément ``0`` du *n*-uplet, on obtient une erreur car il est impossible de " "modifier la cible sur laquelle pointe un élément d'un *n*-uplet." -#: faq/programming.rst:1285 +#: faq/programming.rst:1288 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -1995,7 +2003,7 @@ msgstr "" "Sous le capot, une instruction d'affectation incrémentale fait à peu près " "ceci ::" -#: faq/programming.rst:1294 +#: faq/programming.rst:1297 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -2003,11 +2011,11 @@ msgstr "" "C'est la partie de l'affectation de l'opération qui génère l'erreur, vu " "qu'un *n*-uplet est immuable." -#: faq/programming.rst:1297 +#: faq/programming.rst:1300 msgid "When you write something like::" msgstr "Quand vous écrivez un code du style ::" -#: faq/programming.rst:1305 +#: faq/programming.rst:1308 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" @@ -2015,7 +2023,7 @@ msgstr "" "L'exception est un peu plus surprenante et, chose encore plus étrange, " "malgré l'erreur, l'ajout a fonctionné ::" -#: faq/programming.rst:1311 +#: faq/programming.rst:1314 msgid "" "To see why this happens, you need to know that (a) if an object implements " "an ``__iadd__`` magic method, it gets called when the ``+=`` augmented " @@ -2032,11 +2040,11 @@ msgstr "" "renvoyer celle-ci. C'est pour cette raison que l'on dit que pour les listes, " "``+=`` est un \"raccourci\" pour ``list.extend`` ::" -#: faq/programming.rst:1323 +#: faq/programming.rst:1326 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: faq/programming.rst:1328 +#: faq/programming.rst:1331 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -2048,13 +2056,13 @@ msgstr "" "change rien, puisque c'est un pointeur vers le même objet que sur lequel " "pointait ``a_list``, mais l'affectation a tout de même lieu." -#: faq/programming.rst:1333 +#: faq/programming.rst:1336 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" "Donc, dans notre exemple avec un *n*-uplet, il se passe quelque chose " "équivalent à ::" -#: faq/programming.rst:1341 +#: faq/programming.rst:1344 msgid "" "The ``__iadd__`` succeeds, and thus the list is extended, but even though " "``result`` points to the same object that ``a_tuple[0]`` already points to, " @@ -2065,7 +2073,7 @@ msgstr "" "``result`` pointe sur le même objet que ``a_tuple[0]``, l'affectation finale " "échoue car les *n*-uplets ne sont pas muables." -#: faq/programming.rst:1347 +#: faq/programming.rst:1350 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" @@ -2073,7 +2081,7 @@ msgstr "" "Je souhaite faire un classement compliqué : peut on faire une transformation " "de Schwartz en Python ?" -#: faq/programming.rst:1349 +#: faq/programming.rst:1352 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -2085,11 +2093,11 @@ msgstr "" "chaque élément à sa \"valeur de tri\". En Python, ceci est géré par " "l'argument ``key`` de la méthode :meth:`list.sort` ::" -#: faq/programming.rst:1358 +#: faq/programming.rst:1361 msgid "How can I sort one list by values from another list?" msgstr "Comment ordonner une liste en fonction des valeurs d'une autre liste ?" -#: faq/programming.rst:1360 +#: faq/programming.rst:1363 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " "pick out the element you want. ::" @@ -2097,15 +2105,15 @@ msgstr "" "Fusionnez-les dans un itérateur de *n*-uplets, ordonnez la liste obtenue, " "puis choisissez l'élément que vous voulez ::" -#: faq/programming.rst:1375 +#: faq/programming.rst:1378 msgid "Objects" msgstr "Objets" -#: faq/programming.rst:1378 +#: faq/programming.rst:1381 msgid "What is a class?" msgstr "Qu'est-ce qu'une classe ?" -#: faq/programming.rst:1380 +#: faq/programming.rst:1383 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -2117,7 +2125,7 @@ msgstr "" "créer des objets, qui incarnent à la fois les données (attributs) et le code " "(méthodes) spécifiques à un type de données." -#: faq/programming.rst:1384 +#: faq/programming.rst:1387 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -2135,11 +2143,11 @@ msgstr "" "``MaildirMailbox``, ``OutlookMailbox`` qui gèrent les plusieurs formats " "spécifiques de boîtes aux lettres." -#: faq/programming.rst:1393 +#: faq/programming.rst:1396 msgid "What is a method?" msgstr "Qu'est-ce qu'une méthode ?" -#: faq/programming.rst:1395 +#: faq/programming.rst:1398 msgid "" "A method is a function on some object ``x`` that you normally call as ``x." "name(arguments...)``. Methods are defined as functions inside the class " @@ -2149,11 +2157,11 @@ msgstr "" "générale sous la forme ``x.name(arguments…)``. Les méthodes sont définies " "comme des fonctions à l'intérieur de la définition de classe ::" -#: faq/programming.rst:1405 +#: faq/programming.rst:1408 msgid "What is self?" msgstr "Qu'est-ce que self ?" -#: faq/programming.rst:1407 +#: faq/programming.rst:1410 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -2166,11 +2174,11 @@ msgstr "" "est définie ; tout se passe comme si la méthode était appelée comme " "``meth(x, a, b, c)``." -#: faq/programming.rst:1412 +#: faq/programming.rst:1415 msgid "See also :ref:`why-self`." msgstr "Voir aussi :ref:`why-self`." -#: faq/programming.rst:1416 +#: faq/programming.rst:1419 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" @@ -2178,7 +2186,7 @@ msgstr "" "Comment vérifier si un objet est une instance d'une classe donnée ou d'une " "sous-classe de celle-ci ?" -#: faq/programming.rst:1418 +#: faq/programming.rst:1421 msgid "" "Use the built-in function ``isinstance(obj, cls)``. You can check if an " "object is an instance of any of a number of classes by providing a tuple " @@ -2193,7 +2201,7 @@ msgstr "" "l'un des types natifs de Python, par exemple ``isinstance(obj, str)`` ou " "``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1424 +#: faq/programming.rst:1427 msgid "" "Note that :func:`isinstance` also checks for virtual inheritance from an :" "term:`abstract base class`. So, the test will return ``True`` for a " @@ -2201,7 +2209,7 @@ msgid "" "To test for \"true inheritance\", scan the :term:`MRO` of the class:" msgstr "" -#: faq/programming.rst:1459 +#: faq/programming.rst:1462 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -2217,7 +2225,7 @@ msgstr "" "plutôt que de vérifier la classe de l'objet et de faire un traitement ad-" "hoc. Par exemple, si vous avez une fonction qui fait quelque chose ::" -#: faq/programming.rst:1473 +#: faq/programming.rst:1476 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -2225,11 +2233,11 @@ msgstr "" "Une meilleure approche est de définir une méthode ``search()`` dans toutes " "les classes et qu'il suffit d'appeler de la manière suivante ::" -#: faq/programming.rst:1488 +#: faq/programming.rst:1491 msgid "What is delegation?" msgstr "Qu'est-ce que la délégation ?" -#: faq/programming.rst:1490 +#: faq/programming.rst:1493 msgid "" "Delegation is an object oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " @@ -2244,7 +2252,7 @@ msgstr "" "dans l'évolution et qui délègue toute autre méthode à la méthode " "correspondante de ``x``." -#: faq/programming.rst:1496 +#: faq/programming.rst:1499 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " @@ -2254,7 +2262,7 @@ msgstr "" "Par exemple, la classe suivante implémente une classe qui se comporte comme " "un fichier, mais convertit toutes les données écrites en majuscules ::" -#: faq/programming.rst:1511 +#: faq/programming.rst:1514 msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " "argument string to uppercase before calling the underlying ``self._outfile." @@ -2271,7 +2279,7 @@ msgstr "" "` pour plus d'informations sur la personnalisation de " "l’accès aux attributs." -#: faq/programming.rst:1518 +#: faq/programming.rst:1521 msgid "" "Note that for more general cases delegation can get trickier. When " "attributes must be set as well as retrieved, the class must define a :meth:" @@ -2285,7 +2293,7 @@ msgstr "" "et il doit le faire avec soin. La mise en œuvre basique de la méthode :meth:" "`__setattr__` est à peu près équivalent à ce qui suit ::" -#: faq/programming.rst:1529 +#: faq/programming.rst:1532 msgid "" "Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to " "store local state for self without causing an infinite recursion." @@ -2294,7 +2302,7 @@ msgstr "" "``self.__dict__`` pour stocker l'état local de self sans provoquer une " "récursion infinie." -#: faq/programming.rst:1534 +#: faq/programming.rst:1537 msgid "" "How do I call a method defined in a base class from a derived class that " "overrides it?" @@ -2302,11 +2310,11 @@ msgstr "" "Comment appeler une méthode définie dans une classe de base depuis une " "classe dérivée qui la surcharge ?" -#: faq/programming.rst:1536 +#: faq/programming.rst:1539 msgid "Use the built-in :func:`super` function::" msgstr "Utilisez la fonction native :func:`super` ::" -#: faq/programming.rst:1542 +#: faq/programming.rst:1545 msgid "" "For version prior to 3.0, you may be using classic classes: For a class " "definition such as ``class Derived(Base): ...`` you can call method " @@ -2321,13 +2329,13 @@ msgstr "" "arguments...)``. Ici, ``Base.meth`` est une méthode non liée, il faut donc " "fournir l'argument ``self``." -#: faq/programming.rst:1550 +#: faq/programming.rst:1553 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" "Comment organiser un code pour permettre de changer la classe de base plus " "facilement ?" -#: faq/programming.rst:1552 +#: faq/programming.rst:1555 msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " @@ -2340,13 +2348,13 @@ msgstr "" "dynamiquement (par exemple en fonction de la disponibilité de certaines " "ressources) la classe de base à utiliser. Exemple ::" -#: faq/programming.rst:1567 +#: faq/programming.rst:1570 msgid "How do I create static class data and static class methods?" msgstr "" "Comment créer des données statiques de classe et des méthodes statiques de " "classe ?" -#: faq/programming.rst:1569 +#: faq/programming.rst:1572 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -2354,7 +2362,7 @@ msgstr "" "Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " "prises en charge en Python." -#: faq/programming.rst:1572 +#: faq/programming.rst:1575 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" @@ -2363,7 +2371,7 @@ msgstr "" "attribuer une nouvelle valeur à l'attribut, vous devez explicitement " "utiliser le nom de classe dans l'affectation ::" -#: faq/programming.rst:1584 +#: faq/programming.rst:1587 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " @@ -2374,7 +2382,7 @@ msgstr "" "une classe sur le chemin de recherche de classe de base de ``c.__class__`` " "jusqu'à ``C``." -#: faq/programming.rst:1588 +#: faq/programming.rst:1591 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " @@ -2387,11 +2395,11 @@ msgstr "" "de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " "d'une méthode ou non ::" -#: faq/programming.rst:1595 +#: faq/programming.rst:1598 msgid "Static methods are possible::" msgstr "Il est possible d'utiliser des méthodes statiques ::" -#: faq/programming.rst:1603 +#: faq/programming.rst:1606 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" @@ -2399,7 +2407,7 @@ msgstr "" "Cependant, d'une manière beaucoup plus simple pour obtenir l'effet d'une " "méthode statique se fait par une simple fonction au niveau du module ::" -#: faq/programming.rst:1609 +#: faq/programming.rst:1612 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." @@ -2408,11 +2416,11 @@ msgstr "" "hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " "souhaitée." -#: faq/programming.rst:1614 +#: faq/programming.rst:1617 msgid "How can I overload constructors (or methods) in Python?" msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" -#: faq/programming.rst:1616 +#: faq/programming.rst:1619 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -2420,11 +2428,11 @@ msgstr "" "Cette réponse s'applique en fait à toutes les méthodes, mais la question se " "pose généralement dans le contexte des constructeurs." -#: faq/programming.rst:1619 +#: faq/programming.rst:1622 msgid "In C++ you'd write" msgstr "En C++, on écrirait" -#: faq/programming.rst:1628 +#: faq/programming.rst:1631 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -2432,29 +2440,29 @@ msgstr "" "En Python, vous devez écrire un constructeur unique qui considère tous les " "cas en utilisant des arguments par défaut. Par exemple ::" -#: faq/programming.rst:1638 +#: faq/programming.rst:1641 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" "Ce n'est pas tout à fait équivalent, mais suffisamment proche dans la " "pratique." -#: faq/programming.rst:1640 +#: faq/programming.rst:1643 msgid "You could also try a variable-length argument list, e.g. ::" msgstr "" "Vous pouvez aussi utiliser une liste d'arguments de longueur variable, par " "exemple ::" -#: faq/programming.rst:1645 +#: faq/programming.rst:1648 msgid "The same approach works for all method definitions." msgstr "La même approche fonctionne pour toutes les définitions de méthode." -#: faq/programming.rst:1649 +#: faq/programming.rst:1652 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" "J'essaie d'utiliser ``__spam`` et j'obtiens une erreur à propos de " "``_SomeClassName__spam``." -#: faq/programming.rst:1651 +#: faq/programming.rst:1654 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -2470,7 +2478,7 @@ msgstr "" "remplacé par ``_classname__spam``, où ``classname`` est le nom de la classe " "en cours sans les éventuels tirets bas du début." -#: faq/programming.rst:1657 +#: faq/programming.rst:1660 msgid "" "This doesn't guarantee privacy: an outside user can still deliberately " "access the \"_classname__spam\" attribute, and private values are visible in " @@ -2482,17 +2490,17 @@ msgstr "" "privées sont visibles dans l'objet ``__dict__``. De nombreux programmeurs " "Python ne prennent jamais la peine d'utiliser des noms de variable privés." -#: faq/programming.rst:1664 +#: faq/programming.rst:1667 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" "Ma classe définit ``__del__`` mais elle n'est pas appelée lorsque je " "supprime l'objet." -#: faq/programming.rst:1666 +#: faq/programming.rst:1669 msgid "There are several possible reasons for this." msgstr "Il y a plusieurs explications possibles." -#: faq/programming.rst:1668 +#: faq/programming.rst:1671 msgid "" "The del statement does not necessarily call :meth:`__del__` -- it simply " "decrements the object's reference count, and if this reaches zero :meth:" @@ -2502,7 +2510,7 @@ msgstr "" "simplement le compteur de références de l'objet et, si celui-ci arrive à " "zéro, :meth:`__del__` est appelée." -#: faq/programming.rst:1672 +#: faq/programming.rst:1675 msgid "" "If your data structures contain circular links (e.g. a tree where each child " "has a parent reference and each parent has a list of children) the reference " @@ -2528,7 +2536,7 @@ msgstr "" "miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " "les objets ne seront jamais nettoyés." -#: faq/programming.rst:1683 +#: faq/programming.rst:1686 msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " "``close()`` method on objects to be called whenever you're done with them. " @@ -2545,7 +2553,7 @@ msgstr "" "`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " "être appelée plusieurs fois sur le même objet." -#: faq/programming.rst:1690 +#: faq/programming.rst:1693 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -2558,7 +2566,7 @@ msgstr "" "d'arbres devraient utiliser des références faibles entre pères et fils (si " "nécessaire !)." -#: faq/programming.rst:1703 +#: faq/programming.rst:1706 msgid "" "Finally, if your :meth:`__del__` method raises an exception, a warning " "message is printed to :data:`sys.stderr`." @@ -2566,11 +2574,11 @@ msgstr "" "Enfin, si la méthode :meth:`__del__` lève une exception, un message " "d'avertissement s'affiche dans :data:`sys.stderr`." -#: faq/programming.rst:1708 +#: faq/programming.rst:1711 msgid "How do I get a list of all instances of a given class?" msgstr "Comment obtenir toutes les instances d'une classe ?" -#: faq/programming.rst:1710 +#: faq/programming.rst:1713 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " @@ -2581,13 +2589,13 @@ msgstr "" "constructeur de la classe de façon à tenir un tel registre, en maintenant " "une liste de références faibles vers chaque instance." -#: faq/programming.rst:1716 +#: faq/programming.rst:1719 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" "Pourquoi le résultat de ``id()`` peut-il être le même pour deux objets " "différents ?" -#: faq/programming.rst:1718 +#: faq/programming.rst:1721 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -2601,7 +2609,7 @@ msgstr "" "à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " "Comme l'illustre le code suivant :" -#: faq/programming.rst:1729 +#: faq/programming.rst:1732 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -2613,17 +2621,17 @@ msgstr "" "objets dont on veut examiner les identifiants sont toujours en vie, créons " "une nouvelle référence à l'objet :" -#: faq/programming.rst:1742 +#: faq/programming.rst:1745 msgid "When can I rely on identity tests with the *is* operator?" msgstr "" -#: faq/programming.rst:1744 +#: faq/programming.rst:1747 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." msgstr "" -#: faq/programming.rst:1747 +#: faq/programming.rst:1750 msgid "" "The most important property of an identity test is that an object is always " "identical to itself, ``a is a`` always returns ``True``. Identity tests are " @@ -2631,34 +2639,34 @@ msgid "" "tests are guaranteed to return a boolean ``True`` or ``False``." msgstr "" -#: faq/programming.rst:1752 +#: faq/programming.rst:1755 msgid "" "However, identity tests can *only* be substituted for equality tests when " "object identity is assured. Generally, there are three circumstances where " "identity is guaranteed:" msgstr "" -#: faq/programming.rst:1756 +#: faq/programming.rst:1759 msgid "" "1) Assignments create new names but do not change object identity. After " "the assignment ``new = old``, it is guaranteed that ``new is old``." msgstr "" -#: faq/programming.rst:1759 +#: faq/programming.rst:1762 msgid "" "2) Putting an object in a container that stores object references does not " "change object identity. After the list assignment ``s[0] = x``, it is " "guaranteed that ``s[0] is x``." msgstr "" -#: faq/programming.rst:1763 +#: faq/programming.rst:1766 msgid "" "3) If an object is a singleton, it means that only one instance of that " "object can exist. After the assignments ``a = None`` and ``b = None``, it " "is guaranteed that ``a is b`` because ``None`` is a singleton." msgstr "" -#: faq/programming.rst:1767 +#: faq/programming.rst:1770 msgid "" "In most other circumstances, identity tests are inadvisable and equality " "tests are preferred. In particular, identity tests should not be used to " @@ -2666,17 +2674,17 @@ msgid "" "guaranteed to be singletons::" msgstr "" -#: faq/programming.rst:1784 +#: faq/programming.rst:1787 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" -#: faq/programming.rst:1791 +#: faq/programming.rst:1794 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" msgstr "" -#: faq/programming.rst:1794 +#: faq/programming.rst:1797 msgid "" "1) As recommended by :pep:`8`, an identity test is the preferred way to " "check for ``None``. This reads like plain English in code and avoids " @@ -2684,7 +2692,7 @@ msgid "" "false." msgstr "" -#: faq/programming.rst:1798 +#: faq/programming.rst:1801 msgid "" "2) Detecting optional arguments can be tricky when ``None`` is a valid input " "value. In those situations, you can create an singleton sentinel object " @@ -2692,28 +2700,28 @@ msgid "" "implement a method that behaves like :meth:`dict.pop`::" msgstr "" -#: faq/programming.rst:1814 +#: faq/programming.rst:1817 msgid "" "3) Container implementations sometimes need to augment equality tests with " "identity tests. This prevents the code from being confused by objects such " "as ``float('NaN')`` that are not equal to themselves." msgstr "" -#: faq/programming.rst:1818 +#: faq/programming.rst:1821 msgid "" "For example, here is the implementation of :meth:`collections.abc.Sequence." "__contains__`::" msgstr "" -#: faq/programming.rst:1829 +#: faq/programming.rst:1832 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:1832 +#: faq/programming.rst:1835 msgid "How do I create a .pyc file?" msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:1834 +#: faq/programming.rst:1837 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -2731,7 +2739,7 @@ msgstr "" "centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " "pour de plus amples précisions)." -#: faq/programming.rst:1842 +#: faq/programming.rst:1845 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -2746,7 +2754,7 @@ msgstr "" "utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " "par exemple pour tester un serveur Web." -#: faq/programming.rst:1847 +#: faq/programming.rst:1850 msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " @@ -2760,7 +2768,7 @@ msgstr "" "sous-répertoire, à moins que la variable d'environnement :envvar:" "`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:1852 +#: faq/programming.rst:1855 msgid "" "Running Python on a top level script is not considered an import and no ``." "pyc`` will be created. For example, if you have a top-level module ``foo." @@ -2776,7 +2784,7 @@ msgstr "" "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:1859 +#: faq/programming.rst:1862 msgid "" "If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." "pyc`` file for a module that is not imported -- you can, using the :mod:" @@ -2786,7 +2794,7 @@ msgstr "" "``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" "`py_compile` et :mod:`compileall`." -#: faq/programming.rst:1863 +#: faq/programming.rst:1866 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" @@ -2795,7 +2803,7 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:1869 +#: faq/programming.rst:1872 msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " @@ -2805,7 +2813,7 @@ msgstr "" "de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " "comportement)." -#: faq/programming.rst:1873 +#: faq/programming.rst:1876 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -2817,11 +2825,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:1882 +#: faq/programming.rst:1885 msgid "How do I find the current module name?" msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:1884 +#: faq/programming.rst:1887 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -2836,62 +2844,62 @@ msgstr "" "interface en ligne de commande ou un test automatique. Ils n'exécutent cette " "portion du code qu'après avoir vérifié la valeur de ``__name__`` ::" -#: faq/programming.rst:1899 +#: faq/programming.rst:1902 msgid "How can I have modules that mutually import each other?" msgstr "Comment avoir des modules qui s'importent mutuellement ?" -#: faq/programming.rst:1901 +#: faq/programming.rst:1904 msgid "Suppose you have the following modules:" msgstr "Considérons les modules suivants :" -#: faq/programming.rst:1903 +#: faq/programming.rst:1906 msgid "foo.py::" msgstr "*foo.py* ::" -#: faq/programming.rst:1908 +#: faq/programming.rst:1911 msgid "bar.py::" msgstr "*bar.py* ::" -#: faq/programming.rst:1913 +#: faq/programming.rst:1916 msgid "The problem is that the interpreter will perform the following steps:" msgstr "Le problème réside dans les étapes que l'interpréteur va réaliser :" -#: faq/programming.rst:1915 +#: faq/programming.rst:1918 msgid "main imports foo" msgstr "*main* importe *foo*" -#: faq/programming.rst:1916 +#: faq/programming.rst:1919 msgid "Empty globals for foo are created" msgstr "Les variables globales (vides) de *foo* sont créées" -#: faq/programming.rst:1917 +#: faq/programming.rst:1920 msgid "foo is compiled and starts executing" msgstr "*foo* est compilé et commence à s'exécuter" -#: faq/programming.rst:1918 +#: faq/programming.rst:1921 msgid "foo imports bar" msgstr "*foo* importe *bar*" -#: faq/programming.rst:1919 +#: faq/programming.rst:1922 msgid "Empty globals for bar are created" msgstr "Les variables globales (vides) de *bar* sont créées" -#: faq/programming.rst:1920 +#: faq/programming.rst:1923 msgid "bar is compiled and starts executing" msgstr "*bar* est compilé et commence à s'exécuter" -#: faq/programming.rst:1921 +#: faq/programming.rst:1924 msgid "" "bar imports foo (which is a no-op since there already is a module named foo)" msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " "appelé *foo*)" -#: faq/programming.rst:1922 +#: faq/programming.rst:1925 msgid "bar.foo_var = foo.foo_var" msgstr "bar.foo_var = foo.foo_var" -#: faq/programming.rst:1924 +#: faq/programming.rst:1927 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." @@ -2899,7 +2907,7 @@ msgstr "" "La dernière étape échoue car Python n'a pas fini d'interpréter ``foo`` et le " "dictionnaire global des symboles de ``foo`` est encore vide." -#: faq/programming.rst:1927 +#: faq/programming.rst:1930 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." @@ -2907,11 +2915,11 @@ msgstr "" "Le même phénomène arrive quand on utilise ``import foo``, et qu'on essaye " "ensuite d'accéder à ``foo.foo_var`` dans le code global." -#: faq/programming.rst:1930 +#: faq/programming.rst:1933 msgid "There are (at least) three possible workarounds for this problem." msgstr "Il y a (au moins) trois façons de contourner ce problème." -#: faq/programming.rst:1932 +#: faq/programming.rst:1935 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -2925,14 +2933,14 @@ msgstr "" "des fonctions natives. Ceci implique que tout ce qui est fourni par un " "module soit référencé par ``.``." -#: faq/programming.rst:1937 +#: faq/programming.rst:1940 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" "Jim Roskind recommande d'effectuer les étapes suivantes dans cet ordre dans " "chaque module :" -#: faq/programming.rst:1939 +#: faq/programming.rst:1942 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -2940,18 +2948,18 @@ msgstr "" "les exportations (variables globales, fonctions et les classes qui ne " "nécessitent d'importer des classes de base)" -#: faq/programming.rst:1941 +#: faq/programming.rst:1944 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:1942 +#: faq/programming.rst:1945 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" "le code (avec les variables globales qui sont initialisées à partir de " "valeurs importées)." -#: faq/programming.rst:1944 +#: faq/programming.rst:1947 msgid "" "van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." @@ -2959,7 +2967,7 @@ msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:1947 +#: faq/programming.rst:1950 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -2967,16 +2975,16 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:1950 +#: faq/programming.rst:1953 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:1954 +#: faq/programming.rst:1957 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" "``__import__('x.y.z')`` renvoie ```` ; comment accéder à ``z`` ?" -#: faq/programming.rst:1956 +#: faq/programming.rst:1959 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -2984,7 +2992,7 @@ msgstr "" "Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" "`importlib` ::" -#: faq/programming.rst:1963 +#: faq/programming.rst:1966 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -2992,7 +3000,7 @@ msgstr "" "Quand j'édite un module et que je le réimporte, je ne vois pas les " "changements. Pourquoi ?" -#: faq/programming.rst:1965 +#: faq/programming.rst:1968 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -3007,7 +3015,7 @@ msgstr "" "ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " "module, il faut faire ::" -#: faq/programming.rst:1975 +#: faq/programming.rst:1978 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" @@ -3015,7 +3023,7 @@ msgstr "" "Attention, cette technique ne marche pas systématiquement. En particulier, " "les modules qui contiennent des instructions comme ::" -#: faq/programming.rst:1980 +#: faq/programming.rst:1983 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -3027,7 +3035,7 @@ msgstr "" "celle-ci ne sont *pas* mises à jour avec la nouvelle définition de la " "classe. Ceci peut conduire au comportement paradoxal suivant ::" -#: faq/programming.rst:1993 +#: faq/programming.rst:1996 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" @@ -3035,6 +3043,15 @@ msgstr "" "La nature du problème apparaît clairement en affichant « l'identité » des " "objets de la classe ::" +#, fuzzy +#~ msgid "" +#~ "Obviously, freeze requires a C compiler. There are several other " +#~ "utilities which don't:" +#~ msgstr "" +#~ "Bien évidemment, *freeze* nécessite un compilateur C. Il existe d'autres " +#~ "outils qui peuvent s'en passer. Un de ceux-ci est py2exe de Thomas Heller " +#~ "(pour Windows uniquement) disponible sur" + #~ msgid "" #~ "Pydb is a version of the standard Python debugger pdb, modified for use " #~ "with DDD (Data Display Debugger), a popular graphical debugger front " @@ -3049,9 +3066,6 @@ msgstr "" #~ msgid "Komodo IDE (https://komodoide.com/)" #~ msgstr "Komodo IDE (https://komodoide.com/)" -#~ msgid "http://www.py2exe.org/" -#~ msgstr "http://www.py2exe.org/" - #~ msgid "" #~ "Another tool is Anthony Tuininga's `cx_Freeze `_." diff --git a/faq/windows.po b/faq/windows.po index 8e2077ad..8bcf421a 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-01-28 16:02+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -230,16 +230,15 @@ msgstr "Comment construire un exécutable depuis un script Python ?" #: faq/windows.rst:143 msgid "" -"See `cx_Freeze `_ and `py2exe " -"`_, both are distutils extensions that allow you to " -"create console and GUI executables from Python code." +"See :ref:`faq-create-standalone-binary` for a list of tools that can be used " +"to make executables." msgstr "" -#: faq/windows.rst:149 +#: faq/windows.rst:148 msgid "Is a ``*.pyd`` file the same as a DLL?" msgstr "Est-ce qu'un fichier ``*.pyd`` est la même chose qu'une DLL ?" -#: faq/windows.rst:151 +#: faq/windows.rst:150 msgid "" "Yes, .pyd files are dll's, but there are a few differences. If you have a " "DLL named ``foo.pyd``, then it must have a function ``PyInit_foo()``. You " @@ -256,7 +255,7 @@ msgstr "" "l'initialiser. Ne liez pas votre *.exe* avec *foo.lib* car dans ce cas " "Windows aura besoin de la DLL." -#: faq/windows.rst:158 +#: faq/windows.rst:157 msgid "" "Note that the search path for foo.pyd is PYTHONPATH, not the same as the " "path that Windows uses to search for foo.dll. Also, foo.pyd need not be " @@ -275,11 +274,11 @@ msgstr "" "``__declspec(dllexport)``. Dans un *.pyd* la liaison est définie dans une " "liste de fonctions disponibles." -#: faq/windows.rst:167 +#: faq/windows.rst:166 msgid "How can I embed Python into a Windows application?" msgstr "Comment puis-je intégrer Python dans une application Windows ?" -#: faq/windows.rst:169 +#: faq/windows.rst:168 msgid "" "Embedding the Python interpreter in a Windows app can be summarized as " "follows:" @@ -287,7 +286,7 @@ msgstr "" "L'intégration de l'interpréteur Python dans une application Windows peut se " "résumer comme suit :" -#: faq/windows.rst:171 +#: faq/windows.rst:170 msgid "" "Do _not_ build Python into your .exe file directly. On Windows, Python must " "be a DLL to handle importing modules that are themselves DLL's. (This is " @@ -302,7 +301,7 @@ msgstr "" "est généralement placé dans ``C:\\Windows\\System``. *NN* étant la version " "Python, par exemple « 33 » pour Python 3.3." -#: faq/windows.rst:177 +#: faq/windows.rst:176 msgid "" "You can link to Python in two different ways. Load-time linking means " "linking against :file:`python{NN}.lib`, while run-time linking means linking " @@ -317,7 +316,7 @@ msgstr "" "lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " "liens symboliques pour l'éditeur de liens.)" -#: faq/windows.rst:183 +#: faq/windows.rst:182 msgid "" "Run-time linking greatly simplifies link options; everything happens at run " "time. Your code must load :file:`python{NN}.dll` using the Windows " @@ -336,7 +335,7 @@ msgstr "" "peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " "appelle des routines dans l'API C de Python." -#: faq/windows.rst:190 +#: faq/windows.rst:189 msgid "" "Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." "exe first." @@ -344,7 +343,7 @@ msgstr "" "Note Borland : convertir :file:`python{NN}.lib` au format OMF en utilisant " "*Coff2Omf.exe* en premier." -#: faq/windows.rst:195 +#: faq/windows.rst:194 msgid "" "If you use SWIG, it is easy to create a Python \"extension module\" that " "will make the app's data and methods available to Python. SWIG will handle " @@ -359,7 +358,7 @@ msgstr "" "n'avez **pas** besoin de créer un fichier DLL, et cela simplifie également " "la liaison." -#: faq/windows.rst:201 +#: faq/windows.rst:200 msgid "" "SWIG will create an init function (a C function) whose name depends on the " "name of the extension module. For example, if the name of the module is " @@ -374,7 +373,7 @@ msgstr "" "appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible " "utilisée par la classe *shadow*." -#: faq/windows.rst:207 +#: faq/windows.rst:206 msgid "" "The reason you can link the C code in step 2 into your .exe file is that " "calling the initialization function is equivalent to importing the module " @@ -384,7 +383,7 @@ msgstr "" "*fichier.exe* est que l'appel de la fonction d'initialisation équivaut à " "importer le module dans Python ! (C'est le deuxième fait clé non documenté.)" -#: faq/windows.rst:211 +#: faq/windows.rst:210 msgid "" "In short, you can use the following code to initialize the Python " "interpreter with your extension module." @@ -392,7 +391,7 @@ msgstr "" "En bref, vous pouvez utiliser le code suivant pour initialiser " "l'interpréteur Python avec votre module d'extension." -#: faq/windows.rst:222 +#: faq/windows.rst:221 msgid "" "There are two problems with Python's C API which will become apparent if you " "use a compiler other than MSVC, the compiler used to build pythonNN.dll." @@ -401,7 +400,7 @@ msgstr "" "utilisez un compilateur autre que MSVC, le compilateur utilisé pour " "construire *pythonNN.dll*." -#: faq/windows.rst:225 +#: faq/windows.rst:224 msgid "" "Problem 1: The so-called \"Very High Level\" functions that take FILE * " "arguments will not work in a multi-compiler environment because each " @@ -414,7 +413,7 @@ msgstr "" "structure de FILE. Du point de vue de l'implémentation, il s'agit de " "fonctions de très bas niveau." -#: faq/windows.rst:230 +#: faq/windows.rst:229 msgid "" "Problem 2: SWIG generates the following code when generating wrappers to " "void functions:" @@ -422,7 +421,7 @@ msgstr "" "Problème 2 : SWIG génère le code suivant lors de la génération " "*d'encapsuleurs* pour annuler les fonctions :" -#: faq/windows.rst:239 +#: faq/windows.rst:238 msgid "" "Alas, Py_None is a macro that expands to a reference to a complex data " "structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will " @@ -433,7 +432,7 @@ msgstr "" "une fois, ce code échouera dans un environnement multi-compilateur. " "Remplacez ce code par :" -#: faq/windows.rst:247 +#: faq/windows.rst:246 msgid "" "It may be possible to use SWIG's ``%typemap`` command to make the change " "automatically, though I have not been able to get this to work (I'm a " @@ -443,7 +442,7 @@ msgstr "" "le changement automatiquement, bien que je n'ai pas réussi à le faire " "fonctionner (je suis un débutant complet avec SWIG)." -#: faq/windows.rst:251 +#: faq/windows.rst:250 msgid "" "Using a Python shell script to put up a Python interpreter window from " "inside your Windows app is not a good idea; the resulting window will be " @@ -464,13 +463,13 @@ msgstr "" "dont vous avez besoin est un objet Python (défini dans votre module " "d'extension) qui contient les méthodes *read()* et *write()*." -#: faq/windows.rst:260 +#: faq/windows.rst:259 msgid "How do I keep editors from inserting tabs into my Python source?" msgstr "" "Comment empêcher mon éditeur d'utiliser des tabulations dans mes fichiers " "Python ?" -#: faq/windows.rst:262 +#: faq/windows.rst:261 msgid "" "The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, " "recommends 4 spaces for distributed Python code; this is also the Emacs " @@ -481,7 +480,7 @@ msgstr "" "dans les codes Python. C'est aussi le comportement par défaut d'Emacs avec " "Python." -#: faq/windows.rst:266 +#: faq/windows.rst:265 msgid "" "Under any editor, mixing tabs and spaces is a bad idea. MSVC is no " "different in this respect, and is easily configured to use spaces: Take :" @@ -495,7 +494,7 @@ msgstr "" "Tabs` et pour le type de fichier par défaut, vous devez mettre *Tab size* et " "*Indent size* à 4, puis sélectionner *Insert spaces*." -#: faq/windows.rst:271 +#: faq/windows.rst:270 msgid "" "Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and " "spaces are causing problems in leading whitespace. You may also run the :mod:" @@ -505,13 +504,13 @@ msgstr "" "tabulation et d’indentation pose problème en début de ligne. Vous pouvez " "aussi utiliser le module :mod:`tabnanny` pour détecter ces erreurs." -#: faq/windows.rst:278 +#: faq/windows.rst:277 msgid "How do I check for a keypress without blocking?" msgstr "" "Comment puis-je vérifier de manière non bloquante qu'une touche a été " "pressée ?" -#: faq/windows.rst:280 +#: faq/windows.rst:279 msgid "" "Use the :mod:`msvcrt` module. This is a standard Windows-specific extension " "module. It defines a function ``kbhit()`` which checks whether a keyboard " diff --git a/library/ast.po b/library/ast.po index 49ec4d1f..15e08588 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2018-09-11 07:42+0200\n" "Last-Translator: Julien VITARD \n" "Language-Team: FRENCH \n" @@ -131,10 +131,10 @@ msgstr "" #, fuzzy msgid "" "Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have :attr:" -"`lineno`, :attr:`col_offset`, :attr:`lineno`, and :attr:`col_offset` " +"`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and :attr:`end_col_offset` " "attributes. The :attr:`lineno` and :attr:`end_lineno` are the first and " -"last line numbers of source text span (1-indexed so the first line is line " -"1) and the :attr:`col_offset` and :attr:`end_col_offset` are the " +"last line numbers of the source text span (1-indexed so the first line is " +"line 1), and the :attr:`col_offset` and :attr:`end_col_offset` are the " "corresponding UTF-8 byte offsets of the first and last tokens that generated " "the node. The UTF-8 offset is recorded because the parser uses UTF-8 " "internally." @@ -147,7 +147,7 @@ msgstr "" "nœud. Le décalage UTF-8 est enregistré parce que l'analyseur syntaxique " "utilise l'UTF-8 en interne." -#: library/ast.rst:90 +#: library/ast.rst:91 msgid "" "Note that the end positions are not required by the compiler and are " "therefore optional. The end offset is *after* the last symbol, for example " @@ -155,14 +155,14 @@ msgid "" "``source_line[node.col_offset : node.end_col_offset]``." msgstr "" -#: library/ast.rst:95 +#: library/ast.rst:96 msgid "" "The constructor of a class :class:`ast.T` parses its arguments as follows:" msgstr "" "Le constructeur d'une classe :class:`ast.T` analyse ses arguments comme " "suit :" -#: library/ast.rst:97 +#: library/ast.rst:98 msgid "" "If there are positional arguments, there must be as many as there are items " "in :attr:`T._fields`; they will be assigned as attributes of these names." @@ -170,7 +170,7 @@ msgstr "" "S'il y a des arguments positionnels, il doit y avoir autant de termes dans :" "attr:`T._fields`; ils sont assignés comme attributs portant ces noms." -#: library/ast.rst:99 +#: library/ast.rst:100 msgid "" "If there are keyword arguments, they will set the attributes of the same " "names to the given values." @@ -178,7 +178,7 @@ msgstr "" "S'il y a des arguments nommés, ils définissent les attributs de mêmes noms " "avec les valeurs données." -#: library/ast.rst:102 +#: library/ast.rst:103 msgid "" "For example, to create and populate an :class:`ast.UnaryOp` node, you could " "use ::" @@ -186,21 +186,21 @@ msgstr "" "Par exemple, pour créer et peupler un nœud :class:`ast.UnaryOp`, on peut " "utiliser ::" -#: library/ast.rst:114 +#: library/ast.rst:115 msgid "or the more compact ::" msgstr "ou, plus compact ::" -#: library/ast.rst:121 +#: library/ast.rst:122 msgid "Class :class:`ast.Constant` is now used for all constants." msgstr "" -#: library/ast.rst:125 +#: library/ast.rst:126 msgid "" "Simple indices are represented by their value, extended slices are " "represented as tuples." msgstr "" -#: library/ast.rst:130 +#: library/ast.rst:131 msgid "" "Old classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:" "`ast.NameConstant` and :class:`ast.Ellipsis` are still available, but they " @@ -208,25 +208,25 @@ msgid "" "them will return an instance of a different class." msgstr "" -#: library/ast.rst:137 +#: library/ast.rst:138 msgid "" "Old classes :class:`ast.Index` and :class:`ast.ExtSlice` are still " "available, but they will be removed in future Python releases. In the " "meantime, instantiating them will return an instance of a different class." msgstr "" -#: library/ast.rst:143 +#: library/ast.rst:144 msgid "" "The descriptions of the specific node classes displayed here were initially " "adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." msgstr "" -#: library/ast.rst:149 +#: library/ast.rst:150 msgid "Literals" msgstr "" -#: library/ast.rst:153 +#: library/ast.rst:154 msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " "contains the Python object it represents. The values represented can be " @@ -235,106 +235,106 @@ msgid "" "constant." msgstr "" -#: library/ast.rst:167 +#: library/ast.rst:168 msgid "" "Node representing a single formatting field in an f-string. If the string " "contains a single formatting field and nothing else the node can be isolated " "otherwise it appears in :class:`JoinedStr`." msgstr "" -#: library/ast.rst:171 +#: library/ast.rst:172 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." msgstr "" -#: library/ast.rst:173 +#: library/ast.rst:174 msgid "``conversion`` is an integer:" msgstr "" -#: library/ast.rst:175 +#: library/ast.rst:176 msgid "-1: no formatting" msgstr "" -#: library/ast.rst:176 +#: library/ast.rst:177 msgid "115: ``!s`` string formatting" msgstr "" -#: library/ast.rst:177 +#: library/ast.rst:178 msgid "114: ``!r`` repr formatting" msgstr "" -#: library/ast.rst:178 +#: library/ast.rst:179 msgid "97: ``!a`` ascii formatting" msgstr "" -#: library/ast.rst:180 +#: library/ast.rst:181 msgid "" "``format_spec`` is a :class:`JoinedStr` node representing the formatting of " "the value, or ``None`` if no format was specified. Both ``conversion`` and " "``format_spec`` can be set at the same time." msgstr "" -#: library/ast.rst:187 +#: library/ast.rst:188 msgid "" "An f-string, comprising a series of :class:`FormattedValue` and :class:" "`Constant` nodes." msgstr "" -#: library/ast.rst:216 +#: library/ast.rst:217 msgid "" "A list or tuple. ``elts`` holds a list of nodes representing the elements. " "``ctx`` is :class:`Store` if the container is an assignment target (i.e. " "``(x,y)=something``), and :class:`Load` otherwise." msgstr "" -#: library/ast.rst:242 +#: library/ast.rst:243 msgid "A set. ``elts`` holds a list of nodes representing the set's elements." msgstr "" -#: library/ast.rst:257 +#: library/ast.rst:258 msgid "" "A dictionary. ``keys`` and ``values`` hold lists of nodes representing the " "keys and the values respectively, in matching order (what would be returned " "when calling :code:`dictionary.keys()` and :code:`dictionary.values()`)." msgstr "" -#: library/ast.rst:261 +#: library/ast.rst:262 msgid "" "When doing dictionary unpacking using dictionary literals the expression to " "be expanded goes in the ``values`` list, with a ``None`` at the " "corresponding position in ``keys``." msgstr "" -#: library/ast.rst:279 +#: library/ast.rst:280 msgid "Variables" msgstr "" -#: library/ast.rst:283 +#: library/ast.rst:284 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." msgstr "" -#: library/ast.rst:291 +#: library/ast.rst:292 msgid "" "Variable references can be used to load the value of a variable, to assign a " "new value to it, or to delete it. Variable references are given a context to " "distinguish these cases." msgstr "" -#: library/ast.rst:324 +#: library/ast.rst:325 msgid "" "A ``*var`` variable reference. ``value`` holds the variable, typically a :" "class:`Name` node. This type must be used when building a :class:`Call` node " "with ``*args``." msgstr "" -#: library/ast.rst:347 +#: library/ast.rst:348 msgid "Expressions" msgstr "" -#: library/ast.rst:351 +#: library/ast.rst:352 msgid "" "When an expression, such as a function call, appears as a statement by " "itself with its return value not used or stored, it is wrapped in this " @@ -343,29 +343,29 @@ msgid "" "`YieldFrom` node." msgstr "" -#: library/ast.rst:370 +#: library/ast.rst:371 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." msgstr "" -#: library/ast.rst:379 +#: library/ast.rst:380 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." msgstr "" -#: library/ast.rst:393 +#: library/ast.rst:394 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." msgstr "" -#: library/ast.rst:420 +#: library/ast.rst:421 msgid "Binary operator tokens." msgstr "" -#: library/ast.rst:425 +#: library/ast.rst:426 msgid "" "A boolean operation, 'or' or 'and'. ``op`` is :class:`Or` or :class:`And`. " "``values`` are the values involved. Consecutive operations with the same " @@ -373,60 +373,60 @@ msgid "" "values." msgstr "" -#: library/ast.rst:430 +#: library/ast.rst:431 msgid "This doesn't include ``not``, which is a :class:`UnaryOp`." msgstr "" -#: library/ast.rst:446 +#: library/ast.rst:447 msgid "Boolean operator tokens." msgstr "" -#: library/ast.rst:451 +#: library/ast.rst:452 msgid "" "A comparison of two or more values. ``left`` is the first value in the " "comparison, ``ops`` the list of operators, and ``comparators`` the list of " "values after the first element in the comparison." msgstr "" -#: library/ast.rst:480 +#: library/ast.rst:481 msgid "Comparison operator tokens." msgstr "" -#: library/ast.rst:485 +#: library/ast.rst:486 msgid "" "A function call. ``func`` is the function, which will often be a :class:" "`Name` or :class:`Attribute` object. Of the arguments:" msgstr "" -#: library/ast.rst:488 +#: library/ast.rst:489 msgid "``args`` holds a list of the arguments passed by position." msgstr "" -#: library/ast.rst:489 +#: library/ast.rst:490 msgid "" "``keywords`` holds a list of :class:`keyword` objects representing arguments " "passed by keyword." msgstr "" -#: library/ast.rst:492 +#: library/ast.rst:493 msgid "" "When creating a ``Call`` node, ``args`` and ``keywords`` are required, but " "they can be empty lists. ``starargs`` and ``kwargs`` are optional." msgstr "" -#: library/ast.rst:516 +#: library/ast.rst:517 msgid "" "A keyword argument to a function call or class definition. ``arg`` is a raw " "string of the parameter name, ``value`` is a node to pass in." msgstr "" -#: library/ast.rst:522 +#: library/ast.rst:523 msgid "" "An expression such as ``a if b else c``. Each field holds a single node, so " "in the following example, all three are :class:`Name` nodes." msgstr "" -#: library/ast.rst:537 +#: library/ast.rst:538 msgid "" "Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a :class:" "`Name`. ``attr`` is a bare string giving the name of the attribute, and " @@ -434,7 +434,7 @@ msgid "" "the attribute is acted on." msgstr "" -#: library/ast.rst:554 +#: library/ast.rst:555 msgid "" "A named expression. This AST node is produced by the assignment expressions " "operator (also known as the walrus operator). As opposed to the :class:" @@ -442,11 +442,11 @@ msgid "" "case both ``target`` and ``value`` must be single nodes." msgstr "" -#: library/ast.rst:569 +#: library/ast.rst:570 msgid "Subscripting" msgstr "" -#: library/ast.rst:573 +#: library/ast.rst:574 msgid "" "A subscript, such as ``l[1]``. ``value`` is the subscripted object (usually " "sequence or mapping). ``slice`` is an index, slice or key. It can be a :" @@ -454,29 +454,29 @@ msgid "" "`Store` or :class:`Del` according to the action performed with the subscript." msgstr "" -#: library/ast.rst:597 +#: library/ast.rst:598 msgid "" "Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can " "occur only inside the *slice* field of :class:`Subscript`, either directly " "or as an element of :class:`Tuple`." msgstr "" -#: library/ast.rst:614 +#: library/ast.rst:615 msgid "Comprehensions" msgstr "" -#: library/ast.rst:621 +#: library/ast.rst:622 msgid "" "List and set comprehensions, generator expressions, and dictionary " "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " "representing the part that will be evaluated for each item." msgstr "" -#: library/ast.rst:625 +#: library/ast.rst:626 msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "" -#: library/ast.rst:667 +#: library/ast.rst:668 msgid "" "One ``for`` clause in a comprehension. ``target`` is the reference to use " "for each element - typically a :class:`Name` or :class:`Tuple` node. " @@ -484,35 +484,35 @@ msgid "" "expressions: each ``for`` clause can have multiple ``ifs``." msgstr "" -#: library/ast.rst:672 +#: library/ast.rst:673 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." msgstr "" -#: library/ast.rst:738 +#: library/ast.rst:739 msgid "Statements" msgstr "" -#: library/ast.rst:742 +#: library/ast.rst:743 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." msgstr "" -#: library/ast.rst:744 +#: library/ast.rst:745 msgid "" "Multiple nodes in ``targets`` represents assigning the same value to each. " "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " "``targets``." msgstr "" -#: library/ast.rst:1037 library/ast.rst:1263 +#: library/ast.rst:1038 library/ast.rst:1264 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" -#: library/ast.rst:780 +#: library/ast.rst:781 msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " "a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`. " @@ -522,7 +522,7 @@ msgid "" "appear in between parenthesis and are hence pure names and not expressions." msgstr "" -#: library/ast.rst:835 +#: library/ast.rst:836 msgid "" "Augmented assignment, such as ``a += 1``. In the following example, " "``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` " @@ -530,50 +530,50 @@ msgid "" "value for 1." msgstr "" -#: library/ast.rst:840 +#: library/ast.rst:841 msgid "" "The ``target`` attribute connot be of class :class:`Tuple` or :class:`List`, " "unlike the targets of :class:`Assign`." msgstr "" -#: library/ast.rst:857 +#: library/ast.rst:858 msgid "" "A ``raise`` statement. ``exc`` is the exception object to be raised, " "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " "``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``." msgstr "" -#: library/ast.rst:874 +#: library/ast.rst:875 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." msgstr "" -#: library/ast.rst:890 +#: library/ast.rst:891 msgid "" "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" "class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "" -#: library/ast.rst:908 +#: library/ast.rst:909 msgid "A ``pass`` statement." msgstr "" -#: library/ast.rst:919 +#: library/ast.rst:920 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." msgstr "" -#: library/ast.rst:923 +#: library/ast.rst:924 msgid "Imports" msgstr "" -#: library/ast.rst:927 +#: library/ast.rst:928 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "" -#: library/ast.rst:944 +#: library/ast.rst:945 msgid "" "Represents ``from x import y``. ``module`` is a raw string of the 'from' " "name, without any leading dots, or ``None`` for statements such as ``from . " @@ -581,36 +581,36 @@ msgid "" "import (0 means absolute import)." msgstr "" -#: library/ast.rst:966 +#: library/ast.rst:967 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." msgstr "" -#: library/ast.rst:983 +#: library/ast.rst:984 msgid "Control flow" msgstr "" -#: library/ast.rst:986 +#: library/ast.rst:987 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." msgstr "" -#: library/ast.rst:991 +#: library/ast.rst:992 msgid "" "An ``if`` statement. ``test`` holds a single node, such as a :class:" "`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." msgstr "" -#: library/ast.rst:994 +#: library/ast.rst:995 msgid "" "``elif`` clauses don't have a special representation in the AST, but rather " "appear as extra :class:`If` nodes within the ``orelse`` section of the " "previous one." msgstr "" -#: library/ast.rst:1029 +#: library/ast.rst:1030 msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " "single :class:`Name`, :class:`Tuple` or :class:`List` node. ``iter`` holds " @@ -619,23 +619,23 @@ msgid "" "loop finishes normally, rather than via a ``break`` statement." msgstr "" -#: library/ast.rst:1063 +#: library/ast.rst:1064 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." msgstr "" -#: library/ast.rst:1090 +#: library/ast.rst:1091 msgid "The ``break`` and ``continue`` statements." msgstr "" -#: library/ast.rst:1125 +#: library/ast.rst:1126 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." msgstr "" -#: library/ast.rst:1171 +#: library/ast.rst:1172 msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " @@ -643,14 +643,14 @@ msgid "" "``None`` if the clause doesn't have ``as foo``. ``body`` is a list of nodes." msgstr "" -#: library/ast.rst:1205 +#: library/ast.rst:1206 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " "the context." msgstr "" -#: library/ast.rst:1215 +#: library/ast.rst:1216 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " "context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" @@ -658,158 +658,158 @@ msgid "" "if that isn't used." msgstr "" -#: library/ast.rst:1248 +#: library/ast.rst:1249 msgid "Function and class definitions" msgstr "" -#: library/ast.rst:1252 +#: library/ast.rst:1253 msgid "A function definition." msgstr "" -#: library/ast.rst:1254 +#: library/ast.rst:1255 msgid "``name`` is a raw string of the function name." msgstr "" -#: library/ast.rst:1255 +#: library/ast.rst:1256 msgid "``args`` is a :class:`arguments` node." msgstr "" -#: library/ast.rst:1256 +#: library/ast.rst:1257 msgid "``body`` is the list of nodes inside the function." msgstr "" -#: library/ast.rst:1257 +#: library/ast.rst:1258 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." msgstr "" -#: library/ast.rst:1259 +#: library/ast.rst:1260 msgid "``returns`` is the return annotation." msgstr "" -#: library/ast.rst:1268 +#: library/ast.rst:1269 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." msgstr "" -#: library/ast.rst:1292 +#: library/ast.rst:1293 msgid "The arguments for a function." msgstr "" -#: library/ast.rst:1294 +#: library/ast.rst:1295 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" -#: library/ast.rst:1295 +#: library/ast.rst:1296 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." msgstr "" -#: library/ast.rst:1297 +#: library/ast.rst:1298 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." msgstr "" -#: library/ast.rst:1299 +#: library/ast.rst:1300 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " "arguments." msgstr "" -#: library/ast.rst:1306 +#: library/ast.rst:1307 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name, " "``annotation`` is its annotation, such as a :class:`Str` or :class:`Name` " "node." msgstr "" -#: library/ast.rst:1312 +#: library/ast.rst:1313 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" -#: library/ast.rst:1356 +#: library/ast.rst:1357 msgid "A ``return`` statement." msgstr "" -#: library/ast.rst:1371 +#: library/ast.rst:1372 msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " "they must be wrapped in a :class:`Expr` node if the value sent back is not " "used." msgstr "" -#: library/ast.rst:1396 +#: library/ast.rst:1397 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" -#: library/ast.rst:1423 +#: library/ast.rst:1424 msgid "A class definition." msgstr "" -#: library/ast.rst:1425 +#: library/ast.rst:1426 msgid "``name`` is a raw string for the class name" msgstr "" -#: library/ast.rst:1426 +#: library/ast.rst:1427 msgid "``bases`` is a list of nodes for explicitly specified base classes." msgstr "" -#: library/ast.rst:1427 +#: library/ast.rst:1428 msgid "" "``keywords`` is a list of :class:`keyword` nodes, principally for " "'metaclass'. Other keywords will be passed to the metaclass, as per " "`PEP-3115 `_." msgstr "" -#: library/ast.rst:1430 +#: library/ast.rst:1431 msgid "" "``starargs`` and ``kwargs`` are each a single node, as in a function call. " "starargs will be expanded to join the list of base classes, and kwargs will " "be passed to the metaclass." msgstr "" -#: library/ast.rst:1433 +#: library/ast.rst:1434 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "" -#: library/ast.rst:1435 +#: library/ast.rst:1436 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" -#: library/ast.rst:1464 +#: library/ast.rst:1465 msgid "Async and await" msgstr "" -#: library/ast.rst:1468 +#: library/ast.rst:1469 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." msgstr "" -#: library/ast.rst:1474 +#: library/ast.rst:1475 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" -#: library/ast.rst:1507 +#: library/ast.rst:1508 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" -#: library/ast.rst:1512 +#: library/ast.rst:1513 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -818,11 +818,11 @@ msgid "" "same value (e.g. :class:`ast.Add`)." msgstr "" -#: library/ast.rst:1520 +#: library/ast.rst:1521 msgid ":mod:`ast` Helpers" msgstr "Outils du module :mod:`ast`" -#: library/ast.rst:1522 +#: library/ast.rst:1523 msgid "" "Apart from the node classes, the :mod:`ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" @@ -830,7 +830,7 @@ msgstr "" "À part la classe nœud, le module :mod:`ast` définit ces fonctions et classes " "utilitaires pour traverser les arbres syntaxiques abstraits :" -#: library/ast.rst:1527 +#: library/ast.rst:1528 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, ast.PyCF_ONLY_AST)``." @@ -838,7 +838,7 @@ msgstr "" "Analyse le code source en un nœud AST. Équivalent à ``compile(source, " "filename, mode, ast.PyCF_ONLY_AST)``." -#: library/ast.rst:1530 +#: library/ast.rst:1531 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -851,14 +851,14 @@ msgid "" "empty list)." msgstr "" -#: library/ast.rst:1540 +#: library/ast.rst:1541 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " "List[str]``." msgstr "" -#: library/ast.rst:1544 +#: library/ast.rst:1545 msgid "" "Also, setting ``feature_version`` to a tuple ``(major, minor)`` will attempt " "to parse using that Python version's grammar. Currently ``major`` must equal " @@ -867,7 +867,7 @@ msgid "" "version is ``(3, 4)``; the highest is ``sys.version_info[0:2]``." msgstr "" -#: library/ast.rst:1591 +#: library/ast.rst:1592 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." @@ -876,31 +876,31 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " "la limitation de la profondeur de la pile d'appels." -#: library/ast.rst:1556 +#: library/ast.rst:1557 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" -#: library/ast.rst:1562 +#: library/ast.rst:1563 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" "func:`ast.parse`." msgstr "" -#: library/ast.rst:1567 +#: library/ast.rst:1568 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " "optimizations, such as constant tuples/frozensets)." msgstr "" -#: library/ast.rst:1572 +#: library/ast.rst:1573 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "" -#: library/ast.rst:1580 +#: library/ast.rst:1581 msgid "" "Safely evaluate an expression node or a string containing a Python literal " "or container display. The string or node provided may only consist of the " @@ -913,7 +913,7 @@ msgstr "" "Python suivants : chaînes de caractères, bytes, nombres, *n*-uplets, listes, " "dictionnaires, ensembles, booléens, et ``None``." -#: library/ast.rst:1585 +#: library/ast.rst:1586 msgid "" "This can be used for safely evaluating strings containing Python values from " "untrusted sources without the need to parse the values oneself. It is not " @@ -926,15 +926,15 @@ msgstr "" "d'évaluer des expressions complexes arbitraires, par exemple impliquant des " "opérateurs ou de l'indexation." -#: library/ast.rst:1595 +#: library/ast.rst:1596 msgid "Now allows bytes and set literals." msgstr "Accepte maintenant les littéraux suivants *bytes* et *sets*." -#: library/ast.rst:1598 +#: library/ast.rst:1599 msgid "Now supports creating empty sets with ``'set()'``." msgstr "" -#: library/ast.rst:1604 +#: library/ast.rst:1605 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -947,24 +947,24 @@ msgstr "" "cette fonction nettoie l'indentation de la *docstring* avec :func:`inspect." "cleandoc`." -#: library/ast.rst:1610 +#: library/ast.rst:1611 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` est maintenant gérée" -#: library/ast.rst:1616 +#: library/ast.rst:1617 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`lineno`, :attr:`end_lineno`, :attr:" "`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``." msgstr "" -#: library/ast.rst:1620 +#: library/ast.rst:1621 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." msgstr "" -#: library/ast.rst:1628 +#: library/ast.rst:1629 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`lineno` and :attr:`col_offset` attributes for every node that supports " @@ -979,7 +979,7 @@ msgstr "" "ils ne sont pas déjà définis, en les définissant comme les valeurs du nœud " "parent. Elle fonctionne récursivement en démarrant de *node*." -#: library/ast.rst:1637 +#: library/ast.rst:1638 #, fuzzy msgid "" "Increment the line number and end line number of each node in the tree " @@ -990,7 +990,7 @@ msgstr "" "commençant par le nœud *node*. C'est utile pour \"déplacer du code\" à un " "endroit différent dans un fichier." -#: library/ast.rst:1644 +#: library/ast.rst:1645 #, fuzzy msgid "" "Copy source location (:attr:`lineno`, :attr:`col_offset`, :attr:" @@ -1001,7 +1001,7 @@ msgstr "" "*old_node* vers le nouveau nœud *new_node* si possible, et renvoie " "*new_node*." -#: library/ast.rst:1651 +#: library/ast.rst:1652 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -1009,7 +1009,7 @@ msgstr "" "Produit un *n*-uplet de ``(fieldname, value)`` pour chaque champ de ``node." "_fields`` qui est présent dans *node*." -#: library/ast.rst:1657 +#: library/ast.rst:1658 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." @@ -1018,7 +1018,7 @@ msgstr "" "champs qui sont des nœuds et tous les éléments des champs qui sont des " "listes de nœuds." -#: library/ast.rst:1663 +#: library/ast.rst:1664 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -1029,7 +1029,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:1670 +#: library/ast.rst:1671 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -1040,7 +1040,7 @@ msgstr "" "Cette fonction peut renvoyer une valeur qui est transmise par la méthode :" "meth:`visit`." -#: library/ast.rst:1674 +#: library/ast.rst:1675 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1048,7 +1048,7 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:1679 +#: library/ast.rst:1680 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " @@ -1058,12 +1058,12 @@ msgstr "" "visit_{classname}` où *classname* représente le nom de la classe du nœud, " "ou :meth:`generic_visit` si cette méthode n'existe pas." -#: library/ast.rst:1685 +#: library/ast.rst:1686 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "" "Le visiteur appelle la méthode :meth:`visit` de tous les enfants du nœud." -#: library/ast.rst:1687 +#: library/ast.rst:1688 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." @@ -1072,7 +1072,7 @@ msgstr "" "seront pas visités à moins que le visiteur n'appelle la méthode :meth:" "`generic_visit` ou ne les visite lui-même." -#: library/ast.rst:1691 +#: library/ast.rst:1692 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" @@ -1082,7 +1082,7 @@ msgstr "" "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:1697 +#: library/ast.rst:1698 msgid "" "Methods :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :meth:" "`visit_NameConstant` and :meth:`visit_Ellipsis` are deprecated now and will " @@ -1090,7 +1090,7 @@ msgid "" "method to handle all constant nodes." msgstr "" -#: library/ast.rst:1705 +#: library/ast.rst:1706 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -1098,7 +1098,7 @@ msgstr "" "Une sous-classe :class:`NodeVisitor` qui traverse l'arbre syntaxique " "abstrait et permet les modifications des nœuds." -#: library/ast.rst:1708 +#: library/ast.rst:1709 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -1113,7 +1113,7 @@ msgstr "" "valeur de retour peut être le nœud original et dans ce cas, il n'y a pas de " "remplacement. " -#: library/ast.rst:1714 +#: library/ast.rst:1715 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -1121,7 +1121,7 @@ msgstr "" "Voici un exemple du *transformer* qui réécrit les occurrences du " "dictionnaire (``foo``) en ``data['foo']`` ::" -#: library/ast.rst:1726 +#: library/ast.rst:1727 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`generic_visit` " @@ -1131,7 +1131,7 @@ msgstr "" "enfants, vous devez transformer également ces nœuds enfant vous-même ou " "appeler d'abord la méthode :meth:`generic_visit` sur le nœud." -#: library/ast.rst:1730 +#: library/ast.rst:1731 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " @@ -1141,7 +1141,7 @@ msgstr "" "s'applique à tous les nœuds instruction), le visiteur peut aussi renvoyer la " "liste des nœuds plutôt qu'un seul nœud." -#: library/ast.rst:1734 +#: library/ast.rst:1735 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:" @@ -1149,11 +1149,11 @@ msgid "" "tree to recalculate the location information::" msgstr "" -#: library/ast.rst:1742 +#: library/ast.rst:1743 msgid "Usually you use the transformer like this::" msgstr "Utilisation typique du *transformer* ::" -#: library/ast.rst:1749 +#: library/ast.rst:1750 #, fuzzy msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " @@ -1172,7 +1172,7 @@ msgstr "" "colonne ne sont pas récupérés par défaut. Si l'on souhaite les récupérer, " "l'option *include_attributes* peut être définie comme ``True``." -#: library/ast.rst:1757 +#: library/ast.rst:1758 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " "pretty-printed with that indent level. An indent level of 0, negative, or ``" @@ -1182,81 +1182,81 @@ msgid "" "string is used to indent each level." msgstr "" -#: library/ast.rst:1764 +#: library/ast.rst:1765 msgid "Added the *indent* option." msgstr "" -#: library/ast.rst:1771 +#: library/ast.rst:1772 msgid "Compiler Flags" msgstr "" -#: library/ast.rst:1773 +#: library/ast.rst:1774 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "" -#: library/ast.rst:1778 +#: library/ast.rst:1779 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." msgstr "" -#: library/ast.rst:1785 +#: library/ast.rst:1786 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" -#: library/ast.rst:1790 +#: library/ast.rst:1791 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." msgstr "" -#: library/ast.rst:1799 +#: library/ast.rst:1800 msgid "Command-Line Usage" msgstr "" -#: library/ast.rst:1803 +#: library/ast.rst:1804 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" -#: library/ast.rst:1810 +#: library/ast.rst:1811 msgid "The following options are accepted:" msgstr "" -#: library/ast.rst:1816 +#: library/ast.rst:1817 msgid "Show the help message and exit." msgstr "" -#: library/ast.rst:1821 +#: library/ast.rst:1822 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "" -#: library/ast.rst:1826 +#: library/ast.rst:1827 msgid "Don't parse type comments." msgstr "" -#: library/ast.rst:1830 +#: library/ast.rst:1831 msgid "Include attributes such as line numbers and column offsets." msgstr "" -#: library/ast.rst:1835 +#: library/ast.rst:1836 msgid "Indentation of nodes in AST (number of spaces)." msgstr "" -#: library/ast.rst:1837 +#: library/ast.rst:1838 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." msgstr "" -#: library/ast.rst:1843 +#: library/ast.rst:1844 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -1265,7 +1265,7 @@ msgstr "" "ressource documentaire externe, qui possède plus de détails pour travailler " "avec des ASTs Python." -#: library/ast.rst:1846 +#: library/ast.rst:1847 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -1273,21 +1273,21 @@ msgid "" "transformations." msgstr "" -#: library/ast.rst:1851 +#: library/ast.rst:1852 msgid "" "`leoAst.py `_ unifies the " "token-based and parse-tree-based views of python programs by inserting two-" "way links between tokens and ast nodes." msgstr "" -#: library/ast.rst:1855 +#: library/ast.rst:1856 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " "useful for building automated refactoring (codemod) applications and linters." msgstr "" -#: library/ast.rst:1860 +#: library/ast.rst:1861 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index fb25af62..ca6d33a0 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2019-06-10 15:50+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -580,8 +580,8 @@ msgstr "" #: library/asyncio-eventloop.rst:442 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " -"the socket to locally. The *local_host* and *local_port* are looked up " -"using ``getaddrinfo()``, similarly to *host* and *port*." +"the socket locally. The *local_host* and *local_port* are looked up using " +"``getaddrinfo()``, similarly to *host* and *port*." msgstr "" #: library/asyncio-eventloop.rst:446 library/asyncio-eventloop.rst:799 @@ -683,8 +683,8 @@ msgstr "" #: library/asyncio-eventloop.rst:520 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " -"the socket to locally. The *local_host* and *local_port* are looked up " -"using :meth:`getaddrinfo`." +"the socket locally. The *local_host* and *local_port* are looked up using :" +"meth:`getaddrinfo`." msgstr "" #: library/asyncio-eventloop.rst:524 diff --git a/library/configparser.po b/library/configparser.po index 4dbb36ae..ad008a0b 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,14 +5,14 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-05-17 13:06+0200\n" +"Last-Translator: Dimitri Merejkowsky \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: Dimitri Merejkowsky \n" "X-Generator: Poedit 2.4.3\n" #: library/configparser.rst:2 diff --git a/library/contextlib.po b/library/contextlib.po index 1ee20233..530dd164 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-05-23 14:41-0400\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -258,7 +258,7 @@ msgstr "Par exemple ::" msgid "This code is equivalent to::" msgstr "Ce code est équivalent à ::" -#: library/contextlib.rst:263 library/contextlib.rst:273 +#: library/contextlib.rst:264 library/contextlib.rst:274 msgid "This context manager is :ref:`reentrant `." msgstr "Ce gestionnaire de contexte est :ref:`réentrant `." @@ -279,16 +279,19 @@ msgstr "" "existantes dont la sortie est envoyée vers la sortie standard." #: library/contextlib.rst:237 +#, fuzzy msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " "You can capture that output in a string by redirecting the output to an :" -"class:`io.StringIO` object::" +"class:`io.StringIO` object. The replacement stream is returned from the " +"``__enter__`` method and so is available as the target of the :keyword:" +"`with` statement::" msgstr "" "Par exemple, la sortie de :func:`help` est normalement envoyée vers *sys." "stdout*. Vous pouvez capturer cette sortie dans une chaîne de caractères en " "la redirigeant vers un objet :class:`io.StringIO` ::" -#: library/contextlib.rst:246 +#: library/contextlib.rst:247 msgid "" "To send the output of :func:`help` to a file on disk, redirect the output to " "a regular file::" @@ -296,11 +299,11 @@ msgstr "" "Pour envoyer la sortie de :func:`help` vers un fichier sur le disque, " "redirigez-la sur un fichier normal ::" -#: library/contextlib.rst:253 +#: library/contextlib.rst:254 msgid "To send the output of :func:`help` to *sys.stderr*::" msgstr "Pour envoyer la sortie de :func:`help` sur *sys.stderr* ::" -#: library/contextlib.rst:258 +#: library/contextlib.rst:259 msgid "" "Note that the global side effect on :data:`sys.stdout` means that this " "context manager is not suitable for use in library code and most threaded " @@ -314,7 +317,7 @@ msgstr "" "Cependant, cela reste une approche utile pour beaucoup de scripts " "utilitaires." -#: library/contextlib.rst:270 +#: library/contextlib.rst:271 msgid "" "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." "stderr` to another file or file-like object." @@ -322,14 +325,14 @@ msgstr "" "Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." "stderr` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:280 +#: library/contextlib.rst:281 msgid "" "A base class that enables a context manager to also be used as a decorator." msgstr "" "Une classe mère qui permet à un gestionnaire de contexte d'être aussi " "utilisé comme décorateur." -#: library/contextlib.rst:282 +#: library/contextlib.rst:283 msgid "" "Context managers inheriting from ``ContextDecorator`` have to implement " "``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " @@ -340,7 +343,7 @@ msgstr "" "conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " "décorateur." -#: library/contextlib.rst:286 +#: library/contextlib.rst:287 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." @@ -348,22 +351,22 @@ msgstr "" "``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " "bénéficiez automatiquement de cette fonctionnalité." -#: library/contextlib.rst:289 +#: library/contextlib.rst:290 msgid "Example of ``ContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:318 +#: library/contextlib.rst:319 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" "Ce changement est simplement un sucre syntaxique pour les constructions de " "la forme suivante ::" -#: library/contextlib.rst:324 +#: library/contextlib.rst:325 msgid "``ContextDecorator`` lets you instead write::" msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" -#: library/contextlib.rst:330 +#: library/contextlib.rst:331 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." @@ -372,7 +375,7 @@ msgstr "" "seulement à un morceau en particulier (et gagner un niveau d'indentation est " "toujours appréciable)." -#: library/contextlib.rst:333 +#: library/contextlib.rst:334 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" @@ -380,7 +383,7 @@ msgstr "" "Les gestionnaires de contexte existants qui ont déjà une classe mère peuvent " "être étendus en utilisant ``ContextDecorator`` comme une *mixin* ::" -#: library/contextlib.rst:346 +#: library/contextlib.rst:347 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -393,7 +396,7 @@ msgstr "" "construction d'origine avec de multiples instructions :keyword:`!with` au " "sein de la fonction doit être utilisée." -#: library/contextlib.rst:356 +#: library/contextlib.rst:357 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " @@ -404,7 +407,7 @@ msgstr "" "nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " "données d'entrée." -#: library/contextlib.rst:360 +#: library/contextlib.rst:361 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" @@ -412,7 +415,7 @@ msgstr "" "Par exemple, un ensemble de fichiers peut facilement être géré dans une " "unique instruction *with* comme suit ::" -#: library/contextlib.rst:369 +#: library/contextlib.rst:370 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -425,7 +428,7 @@ msgstr "" "que ces fonctions ne sont *pas* invoquées implicitement quand l'instance de " "la pile de contextes est collectée par le ramasse-miettes." -#: library/contextlib.rst:374 +#: library/contextlib.rst:375 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " @@ -435,7 +438,7 @@ msgstr "" "acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " "objets-fichiers) puissent être gérés correctement." -#: library/contextlib.rst:378 +#: library/contextlib.rst:379 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -451,7 +454,7 @@ msgstr "" "de rappel intérieure supprime ou remplace une exception, alors les fonctions " "extérieures reçoivent des arguments basés sur ce nouvel état." -#: library/contextlib.rst:385 +#: library/contextlib.rst:386 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -463,7 +466,7 @@ msgstr "" "pour des gestionnaires de contexte de plus haut niveau qui manipulent la " "pile de sortie de manière spécifique à l'application." -#: library/contextlib.rst:394 +#: library/contextlib.rst:395 msgid "" "Enters a new context manager and adds its :meth:`__exit__` method to the " "callback stack. The return value is the result of the context manager's own :" @@ -473,7 +476,7 @@ msgstr "" "`__exit__` à la pile d'appels. La valeur de retour est le résultat de la " "méthode :meth:`__enter__` du gestionnaire de contexte donné." -#: library/contextlib.rst:398 +#: library/contextlib.rst:399 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." @@ -482,13 +485,13 @@ msgstr "" "feraient normalement s'ils étaient utilisés directement derrière une " "instruction :keyword:`with`." -#: library/contextlib.rst:403 +#: library/contextlib.rst:404 msgid "Adds a context manager's :meth:`__exit__` method to the callback stack." msgstr "" "Ajoute la méthode :meth:`__exit__` d'un gestionnaire de contexte à la pile " "d'appels." -#: library/contextlib.rst:405 +#: library/contextlib.rst:406 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`__enter__` implementation with a context manager's own :meth:" @@ -498,7 +501,7 @@ msgstr "" "pour couvrir une partie de l'implémentation de :meth:`__enter__` avec la " "propre méthode :meth:`__exit__` d'un gestionnaire de contexte." -#: library/contextlib.rst:409 +#: library/contextlib.rst:410 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`__exit__` " @@ -509,7 +512,7 @@ msgstr "" "meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " "la pile d'appels." -#: library/contextlib.rst:413 +#: library/contextlib.rst:414 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`__exit__` methods can." @@ -518,7 +521,7 @@ msgstr "" "exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " "des gestionnaires de contexte." -#: library/contextlib.rst:416 +#: library/contextlib.rst:417 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." @@ -526,7 +529,7 @@ msgstr "" "L'objet passé en paramètre est renvoyé par la fonction, ce qui permet à la " "méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:421 +#: library/contextlib.rst:422 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." @@ -534,7 +537,7 @@ msgstr "" "Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " "fonctions de rappel." -#: library/contextlib.rst:424 +#: library/contextlib.rst:425 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." @@ -543,7 +546,7 @@ msgstr "" "cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " "reçoivent jamais les détails de l'exception)." -#: library/contextlib.rst:427 +#: library/contextlib.rst:428 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." @@ -551,7 +554,7 @@ msgstr "" "La fonction passée en paramètre est renvoyée par la méthode, ce qui permet à " "la méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:432 +#: library/contextlib.rst:433 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -563,7 +566,7 @@ msgstr "" "la place, elles sont dorénavant invoquées quand la nouvelle pile sera close " "(soit explicitement soit implicitement à la fin d'un bloc :keyword:`with`)." -#: library/contextlib.rst:437 +#: library/contextlib.rst:438 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" @@ -571,7 +574,7 @@ msgstr "" "Par exemple, un groupe de fichiers peut être ouvert comme une opération " "« tout ou rien » comme suit ::" -#: library/contextlib.rst:451 +#: library/contextlib.rst:452 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " @@ -582,7 +585,7 @@ msgstr "" "et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " "exception n'est survenue." -#: library/contextlib.rst:458 +#: library/contextlib.rst:459 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " @@ -593,7 +596,7 @@ msgstr "" "de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " "pour la logique de nettoyage." -#: library/contextlib.rst:463 +#: library/contextlib.rst:464 msgid "" "The :meth:`close` method is not implemented, :meth:`aclose` must be used " "instead." @@ -601,14 +604,14 @@ msgstr "" "La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " "être utilisée." -#: library/contextlib.rst:468 +#: library/contextlib.rst:469 msgid "" "Similar to :meth:`enter_context` but expects an asynchronous context manager." msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:473 +#: library/contextlib.rst:474 msgid "" "Similar to :meth:`push` but expects either an asynchronous context manager " "or a coroutine function." @@ -616,24 +619,24 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:478 +#: library/contextlib.rst:479 msgid "Similar to :meth:`callback` but expects a coroutine function." msgstr "Similaire à :meth:`callback` mais attend une fonction coroutine." -#: library/contextlib.rst:482 +#: library/contextlib.rst:483 msgid "Similar to :meth:`close` but properly handles awaitables." msgstr "" "Similaire à :meth:`close` mais gère correctement les tâches asynchrones." -#: library/contextlib.rst:484 +#: library/contextlib.rst:485 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:496 +#: library/contextlib.rst:497 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:498 +#: library/contextlib.rst:499 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." @@ -641,11 +644,11 @@ msgstr "" "Cette section décrit quelques exemples et recettes pour décrire une " "utilisation réelle des outils fournis par :mod:`contextlib`." -#: library/contextlib.rst:503 +#: library/contextlib.rst:504 msgid "Supporting a variable number of context managers" msgstr "Gérer un nombre variable de gestionnaires de contexte" -#: library/contextlib.rst:505 +#: library/contextlib.rst:506 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -662,7 +665,7 @@ msgstr "" "collection spécifique de fichiers de l'utilisateur), ou de certains " "gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:520 +#: library/contextlib.rst:521 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " @@ -672,11 +675,11 @@ msgstr "" "instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " "gèrent pas nativement le protocole des gestionnaires de contexte." -#: library/contextlib.rst:526 +#: library/contextlib.rst:527 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:528 +#: library/contextlib.rst:529 msgid "" "It is occasionally desirable to catch exceptions from an ``__enter__`` " "method implementation, *without* inadvertently catching exceptions from the :" @@ -691,7 +694,7 @@ msgstr "" "`ExitStack`, les étapes du protocole des gestionnaires de contexte peuvent " "être légèrement séparées pour permettre le code suivant ::" -#: library/contextlib.rst:543 +#: library/contextlib.rst:544 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -710,11 +713,11 @@ msgstr "" "gestion de plusieurs situations qui ne peuvent pas être traitées directement " "dans une instruction :keyword:`with`." -#: library/contextlib.rst:553 +#: library/contextlib.rst:554 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:555 +#: library/contextlib.rst:556 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" @@ -724,7 +727,7 @@ msgstr "" "peut être utile pour nettoyer une ressource déjà allouée si les dernières " "étapes de l'implémentation de :meth:`__enter__` échouent." -#: library/contextlib.rst:559 +#: library/contextlib.rst:560 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " @@ -734,11 +737,11 @@ msgstr "" "d'acquisition de ressources et de libération, avec une méthode de validation " "optionnelle, et qui les adapte au protocole des gestionnaires de contexte ::" -#: library/contextlib.rst:599 +#: library/contextlib.rst:600 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "Remplacer un ``try-finally`` avec une option variable" -#: library/contextlib.rst:601 +#: library/contextlib.rst:602 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -750,7 +753,7 @@ msgstr "" "ou non. Dans sa forme la plus simple (qui ne peut pas déjà être gérée avec " "juste une clause ``except``), cela ressemble à ::" -#: library/contextlib.rst:615 +#: library/contextlib.rst:616 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " @@ -761,7 +764,7 @@ msgstr "" "codes d'installation et de nettoyage peuvent finir par être séparés par des " "sections de code arbitrairement longues." -#: library/contextlib.rst:619 +#: library/contextlib.rst:620 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " @@ -771,7 +774,7 @@ msgstr "" "rappel pour être exécutée à la fin d'une instruction ``with``, et décider " "ensuite de passer l'exécution de cet appel ::" -#: library/contextlib.rst:631 +#: library/contextlib.rst:632 msgid "" "This allows the intended cleanup up behaviour to be made explicit up front, " "rather than requiring a separate flag variable." @@ -779,7 +782,7 @@ msgstr "" "Cela permet de rendre explicite dès le départ le comportement de nettoyage " "attendu, plutôt que de nécessiter une option séparée." -#: library/contextlib.rst:634 +#: library/contextlib.rst:635 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" @@ -787,7 +790,7 @@ msgstr "" "Si une application particulière utilise beaucoup ce modèle, cela peut-être " "simplifié encore plus au moyen d'une petite classe d'aide ::" -#: library/contextlib.rst:652 +#: library/contextlib.rst:653 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" @@ -798,7 +801,7 @@ msgstr "" "`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " "avance ::" -#: library/contextlib.rst:667 +#: library/contextlib.rst:668 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " @@ -809,12 +812,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:673 +#: library/contextlib.rst:674 msgid "Using a context manager as a function decorator" msgstr "" "Utiliser un gestionnaire de contexte en tant que décorateur de fonction" -#: library/contextlib.rst:675 +#: library/contextlib.rst:676 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." @@ -823,7 +826,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:678 +#: library/contextlib.rst:679 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -838,17 +841,17 @@ msgstr "" "`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:699 +#: library/contextlib.rst:700 msgid "Instances of this class can be used as both a context manager::" msgstr "" "Les instances de cette classe peuvent être utilisées comme gestionnaires de " "contexte ::" -#: library/contextlib.rst:705 +#: library/contextlib.rst:706 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:712 +#: library/contextlib.rst:713 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -860,11 +863,11 @@ msgstr "" "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:720 +#: library/contextlib.rst:721 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:720 +#: library/contextlib.rst:721 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." @@ -872,11 +875,11 @@ msgstr "" "La spécification, les motivations et des exemples de l'instruction :keyword:" "`with` en Python." -#: library/contextlib.rst:726 +#: library/contextlib.rst:727 msgid "Single use, reusable and reentrant context managers" msgstr "Gestionnaires de contexte à usage unique, réutilisables et réentrants" -#: library/contextlib.rst:728 +#: library/contextlib.rst:729 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -889,7 +892,7 @@ msgstr "" "chaque fois qu'ils sont utilisés — tenter de les utiliser une seconde fois " "lève une exception ou ne fonctionne pas correctement." -#: library/contextlib.rst:734 +#: library/contextlib.rst:735 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " @@ -900,7 +903,7 @@ msgstr "" "`with` où ils sont utilisés (comme montré dans tous les exemples " "d'utilisation au-dessus)." -#: library/contextlib.rst:738 +#: library/contextlib.rst:739 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " @@ -911,7 +914,7 @@ msgstr "" "`with` ferme le fichier, empêchant d'autres opérations d'entrée/sortie " "d'être exécutées sur ce fichier." -#: library/contextlib.rst:742 +#: library/contextlib.rst:743 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " @@ -921,11 +924,11 @@ msgstr "" "usage unique, et se plaindront du fait que le générateur sous-jacent ne " "produise plus de valeur si vous essayez de les utiliser une seconde fois ::" -#: library/contextlib.rst:770 +#: library/contextlib.rst:771 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:772 +#: library/contextlib.rst:773 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -938,7 +941,7 @@ msgstr "" "l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " "gestionnaire de contexte." -#: library/contextlib.rst:777 +#: library/contextlib.rst:778 msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " "are :func:`suppress` and :func:`redirect_stdout`. Here's a very simple " @@ -948,7 +951,7 @@ msgstr "" "réentrant, comme le sont aussi :func:`suppress` et :func:`redirect_stdout`. " "Voici un très simple exemple d'utilisation réentrante ::" -#: library/contextlib.rst:796 +#: library/contextlib.rst:797 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " @@ -958,7 +961,7 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:800 +#: library/contextlib.rst:801 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -970,11 +973,11 @@ msgstr "" "puisqu'il effectue des changements globaux sur l'état du système en " "branchant :data:`sys.stdout` sur différents flux." -#: library/contextlib.rst:809 +#: library/contextlib.rst:810 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:811 +#: library/contextlib.rst:812 msgid "" "Distinct from both single use and reentrant context managers are \"reusable" "\" context managers (or, to be completely explicit, \"reusable, but not " @@ -992,7 +995,7 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:818 +#: library/contextlib.rst:819 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" @@ -1002,7 +1005,7 @@ msgstr "" "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:822 +#: library/contextlib.rst:823 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " @@ -1013,7 +1016,7 @@ msgstr "" "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:853 +#: library/contextlib.rst:854 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -1025,7 +1028,7 @@ msgstr "" "imbriquer fait que la pile est vidée à la fin du *with* le plus imbriqué, ce " "qui n'est probablement pas le comportement voulu." -#: library/contextlib.rst:858 +#: library/contextlib.rst:859 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/library/functions.po b/library/functions.po index 3efb9847..da6653e7 100644 --- a/library/functions.po +++ b/library/functions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2020-08-30 23:21+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: French \n" @@ -362,7 +362,7 @@ msgstr "" "Pour contrôler l'affichage du préfixe ``0b``, vous pouvez utiliser les " "moyens suivants." -#: library/functions.rst:750 library/functions.rst:1037 +#: library/functions.rst:757 library/functions.rst:1044 msgid "See also :func:`format` for more information." msgstr "Voir aussi :func:`format` pour plus d'informations." @@ -383,7 +383,7 @@ msgstr "" "ses seules instances sont ``False`` et ``True`` (voir :ref:`bltin-boolean-" "values`)." -#: library/functions.rst:625 library/functions.rst:834 +#: library/functions.rst:625 library/functions.rst:841 msgid "*x* is now a positional-only parameter." msgstr "*x* est désormais un argument exclusivement optionnel." @@ -829,7 +829,7 @@ msgstr "" msgid "The complex type is described in :ref:`typesnumeric`." msgstr "Le type complexe est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:622 library/functions.rst:831 +#: library/functions.rst:622 library/functions.rst:838 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" "les chiffres peuvent être groupés avec des tirets bas comme dans les " @@ -1370,7 +1370,15 @@ msgstr "" "que *default* est fourni, celui-ci est renvoyé. Sinon l'exception :exc:" "`AttributeError` est levée." -#: library/functions.rst:682 +#: library/functions.rst:681 +msgid "" +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes " +"with two leading underscores) name in order to retrieve it with :func:" +"`getattr`." +msgstr "" + +#: library/functions.rst:689 msgid "" "Return a dictionary representing the current global symbol table. This is " "always the dictionary of the current module (inside a function or method, " @@ -1382,7 +1390,7 @@ msgstr "" "fonction ou méthode, c'est le module où elle est définie, et non le module " "d'où elle est appelée)." -#: library/functions.rst:689 +#: library/functions.rst:696 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1394,7 +1402,7 @@ msgstr "" "``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " "une exception :exc:`AttributeError` a été levée)." -#: library/functions.rst:697 +#: library/functions.rst:704 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1407,7 +1415,7 @@ msgstr "" "ont la même valeur de hachage (même si leurs types sont différents, comme " "pour ``1`` et ``1.0``)." -#: library/functions.rst:704 +#: library/functions.rst:711 msgid "" "For objects with custom :meth:`__hash__` methods, note that :func:`hash` " "truncates the return value based on the bit width of the host machine. See :" @@ -1417,7 +1425,7 @@ msgstr "" "func:`hash` tronque la valeur donnée en fonction du nombre de bits de la " "machine hôte. Voir :meth:`__hash__` pour plus d'information." -#: library/functions.rst:710 +#: library/functions.rst:717 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1434,7 +1442,7 @@ msgstr "" "la console. Si l'argument est d'un autre type, une page d'aide sur cet objet " "est générée." -#: library/functions.rst:717 +#: library/functions.rst:724 msgid "" "Note that if a slash(/) appears in the parameter list of a function, when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1447,14 +1455,14 @@ msgstr "" "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:722 +#: library/functions.rst:729 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" "Cette fonction est ajoutée à l'espace de nommage natif par le module :mod:" "`site`." -#: library/functions.rst:724 +#: library/functions.rst:731 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1462,7 +1470,7 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:731 +#: library/functions.rst:738 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" @@ -1472,7 +1480,7 @@ msgstr "" "pas un :class:`int`, il doit définir une méthode :meth:`__index__` qui " "renvoie un entier. Quelques exemples :" -#: library/functions.rst:740 +#: library/functions.rst:747 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1482,7 +1490,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:752 +#: library/functions.rst:759 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1490,7 +1498,7 @@ msgstr "" "Voir aussi :func:`int` pour convertir une chaîne hexadécimale en un entier " "(en affectant 16 à l'argument *base*)." -#: library/functions.rst:757 +#: library/functions.rst:764 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." @@ -1498,7 +1506,7 @@ msgstr "" "Pour obtenir une représentation hexadécimale sous forme de chaîne d'un " "nombre à virgule flottante, utilisez la méthode :meth:`float.hex`." -#: library/functions.rst:763 +#: library/functions.rst:770 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1509,7 +1517,7 @@ msgstr "" "constant pour cet objet durant sa durée de vie. Deux objets dont les durées " "de vie ne se chevauchent pas peuvent partager le même :func:`id`." -#: library/functions.rst:770 +#: library/functions.rst:777 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " @@ -1518,7 +1526,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:775 +#: library/functions.rst:782 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1530,7 +1538,7 @@ msgstr "" "standard et la convertit en chaîne (supprimant le retour à la ligne final) " "quelle renvoie. Lorsque EOF est lu, :exc:`EOFError` est levée. Exemple ::" -#: library/functions.rst:785 +#: library/functions.rst:792 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1538,7 +1546,7 @@ msgstr "" "Si le module :mod:`readline` est chargé, :func:`input` l'utilisera pour " "fournir des fonctionnalités d'édition et d'historique élaborées." -#: library/functions.rst:788 +#: library/functions.rst:795 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " @@ -1547,7 +1555,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " "``prompt`` avant de lire l'entrée." -#: library/functions.rst:790 +#: library/functions.rst:797 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1555,7 +1563,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " "``prompt`` avant de lire l'entrée." -#: library/functions.rst:793 +#: library/functions.rst:800 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " @@ -1564,7 +1572,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:795 +#: library/functions.rst:802 msgid "" "Raises an auditing event ``builtins.input/result`` with the result after " "successfully reading input." @@ -1572,7 +1580,7 @@ msgstr "" "Lève un événement d'audit ``builtins.input/result`` avec le résultat après " "avoir lu avec succès l'entrée." -#: library/functions.rst:802 +#: library/functions.rst:809 msgid "" "Return an integer object constructed from a number or string *x*, or return " "``0`` if no arguments are given. If *x* defines :meth:`__int__`, ``int(x)`` " @@ -1587,7 +1595,7 @@ msgstr "" "``int(x)`` renvoie ``x.__trunc__()``. Les nombres à virgule flottante sont " "tronqués vers zéro." -#: library/functions.rst:809 +#: library/functions.rst:816 msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" "class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer " @@ -1616,11 +1624,11 @@ msgstr "" "0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " "8)``." -#: library/functions.rst:822 +#: library/functions.rst:829 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "Le type des entiers est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:824 +#: library/functions.rst:831 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1633,11 +1641,11 @@ msgstr "" "meth:`base.__int__ ` au lieu de :meth:`base.__index__ " "`." -#: library/functions.rst:837 +#: library/functions.rst:844 msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." msgstr "revient à :meth:`__index__` si :meth:`__int__` n'est pas défini." -#: library/functions.rst:843 +#: library/functions.rst:850 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect or :term:`virtual `) of *classinfo*. A class is considered a subclass of " @@ -1670,7 +1678,7 @@ msgstr "" "classes, dans ce cas la vérification sera faite pour chaque classe de " "*classinfo*. Dans tous les autres cas, :exc:`TypeError` est levée." -#: library/functions.rst:864 +#: library/functions.rst:871 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1695,11 +1703,11 @@ msgstr "" "de :meth:`~iterator.__next__`. Si la valeur reçue est égale à *sentinel* :" "exc:`StopIteration` est levée, sinon la valeur est renvoyée." -#: library/functions.rst:877 +#: library/functions.rst:884 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:879 +#: library/functions.rst:886 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " @@ -1709,7 +1717,7 @@ msgstr "" "construire un lecteur par blocs. Par exemple, lire des blocs de taille fixe " "d'une base de donnée binaire jusqu'à ce que la fin soit atteinte ::" -#: library/functions.rst:891 +#: library/functions.rst:898 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1720,13 +1728,13 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:897 +#: library/functions.rst:904 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: library/functions.rst:905 +#: library/functions.rst:912 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1735,7 +1743,7 @@ msgstr "" "type séquentiel muable, comme décrit dans :ref:`typesseq-list` et :ref:" "`typesseq`." -#: library/functions.rst:911 +#: library/functions.rst:918 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1748,7 +1756,7 @@ msgstr "" "corps d'une classe. Notez qu’au niveau d’un module, :func:`locals` et :func:" "`globals` sont le même dictionnaire." -#: library/functions.rst:917 +#: library/functions.rst:924 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1757,7 +1765,7 @@ msgstr "" "n'affectent pas les valeurs des variables locales ou libres utilisées par " "l'interpréteur." -#: library/functions.rst:922 +#: library/functions.rst:929 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterable* arguments are passed, " @@ -1774,7 +1782,7 @@ msgstr "" "où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" "`itertools.starmap`." -#: library/functions.rst:933 +#: library/functions.rst:940 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -1782,7 +1790,7 @@ msgstr "" "Renvoie le plus grand élément d'un itérable, ou l'argument le plus grand " "parmi au moins deux arguments." -#: library/functions.rst:936 +#: library/functions.rst:943 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1793,7 +1801,7 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:978 +#: library/functions.rst:985 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1807,7 +1815,7 @@ msgstr "" "fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" "exc:`ValueError` est levée." -#: library/functions.rst:947 +#: library/functions.rst:954 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1819,15 +1827,15 @@ msgstr "" "stabilité lors du tri, tels que ``sorted(iterable, key=keyfunc, reverse=True)" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." -#: library/functions.rst:989 +#: library/functions.rst:996 msgid "The *default* keyword-only argument." msgstr "L'argument nommé (et seulement donné par son nom) *default*." -#: library/functions.rst:992 +#: library/functions.rst:999 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:963 +#: library/functions.rst:970 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1835,7 +1843,7 @@ msgstr "" "Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" "ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:970 +#: library/functions.rst:977 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -1843,7 +1851,7 @@ msgstr "" "Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " "arguments." -#: library/functions.rst:973 +#: library/functions.rst:980 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1853,7 +1861,7 @@ msgstr "" "plus petit élément de l'itérable est renvoyé. Si au moins deux arguments " "positionnels sont fournis, le plus petit argument positionnel est renvoyé." -#: library/functions.rst:984 +#: library/functions.rst:991 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1865,7 +1873,7 @@ msgstr "" "du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." "nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:998 +#: library/functions.rst:1005 msgid "" "Retrieve the next item from the *iterator* by calling its :meth:`~iterator." "__next__` method. If *default* is given, it is returned if the iterator is " @@ -1875,7 +1883,7 @@ msgstr "" "__next__`. Si *default* est fourni, il sera renvoyé si l'itérateur est " "épuisé, sinon :exc:`StopIteration` est levée." -#: library/functions.rst:1005 +#: library/functions.rst:1012 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has the methods that are common to all instances of Python classes. This " @@ -1885,7 +1893,7 @@ msgstr "" "classes. C'est elle qui porte les méthodes communes à toutes les instances " "de classes en Python. Cette fonction n'accepte aucun argument." -#: library/functions.rst:1011 +#: library/functions.rst:1018 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1894,7 +1902,7 @@ msgstr "" "pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" "`object`." -#: library/functions.rst:1017 +#: library/functions.rst:1024 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1906,7 +1914,7 @@ msgstr "" "objet :class:`int`, il doit définir une méthode :meth:`__index__` qui donne " "un entier, par exemple :" -#: library/functions.rst:1027 +#: library/functions.rst:1034 msgid "" "If you want to convert an integer number to octal string either with prefix " "\"0o\" or not, you can use either of the following ways." @@ -1914,7 +1922,7 @@ msgstr "" "Si vous voulez convertir un nombre entier en chaîne octale, avec ou sans le " "préfixe ``0o``, vous pouvez utiliser l'une des méthodes suivantes." -#: library/functions.rst:1044 +#: library/functions.rst:1051 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -1924,7 +1932,7 @@ msgstr "" "Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. Voir :" "ref:`tut-files` pour plus d'exemple d'utilisation de cette fonction." -#: library/functions.rst:1048 +#: library/functions.rst:1055 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -1938,7 +1946,7 @@ msgstr "" "descripteur de fichier est donné, il sera fermé en même temps que l'objet " "d'entrée-sortie renvoyé, sauf si *closefd* est mis à ``False``)." -#: library/functions.rst:1054 +#: library/functions.rst:1061 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -1965,71 +1973,71 @@ msgstr "" "mode binaire sans préciser *encoding* non spécifié). Les modes disponibles " "sont :" -#: library/functions.rst:1071 +#: library/functions.rst:1078 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1071 +#: library/functions.rst:1078 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1073 +#: library/functions.rst:1080 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1073 +#: library/functions.rst:1080 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1074 +#: library/functions.rst:1081 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1074 +#: library/functions.rst:1081 msgid "open for writing, truncating the file first" msgstr "ouvre en écriture, en effaçant le contenu du fichier" -#: library/functions.rst:1075 +#: library/functions.rst:1082 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1075 +#: library/functions.rst:1082 msgid "open for exclusive creation, failing if the file already exists" msgstr "ouvre pour une création exclusive, échouant si le fichier existe déjà" -#: library/functions.rst:1076 +#: library/functions.rst:1083 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1076 +#: library/functions.rst:1083 msgid "open for writing, appending to the end of the file if it exists" msgstr "ouvre en écriture, ajoutant à la fin du fichier s'il existe" -#: library/functions.rst:1077 +#: library/functions.rst:1084 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1077 +#: library/functions.rst:1084 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1078 +#: library/functions.rst:1085 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1078 +#: library/functions.rst:1085 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1079 +#: library/functions.rst:1086 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1079 +#: library/functions.rst:1086 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1082 +#: library/functions.rst:1089 msgid "" "The default mode is ``'r'`` (open for reading text, synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2039,7 +2047,7 @@ msgstr "" "``'rt'``). Les modes ``'w+'`` et ``'w+b'`` ouvrent et vident le fichier. Les " "modes ``'r+'`` et ``'r+b'`` ouvrent le fichier sans le vider." -#: library/functions.rst:1086 +#: library/functions.rst:1093 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2057,7 +2065,7 @@ msgstr "" "octets ayant été décodés au préalable en utilisant un encodage déduit de " "l'environnement ou *encoding* s'il est donné." -#: library/functions.rst:1094 +#: library/functions.rst:1101 msgid "" "There is an additional mode character permitted, ``'U'``, which no longer " "has any effect, and is considered deprecated. It previously enabled :term:" @@ -2072,7 +2080,7 @@ msgstr "" "documentation du paramètre :ref:`newline ` pour plus " "de détails." -#: library/functions.rst:1102 +#: library/functions.rst:1109 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " @@ -2082,7 +2090,7 @@ msgstr "" "jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " "indépendant de la plate-forme." -#: library/functions.rst:1106 +#: library/functions.rst:1113 msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " @@ -2097,7 +2105,7 @@ msgstr "" "en octets d'un tampon de taille fixe. Sans l'argument *buffering*, les " "comportements par défaut sont les suivants :" -#: library/functions.rst:1112 +#: library/functions.rst:1119 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2110,7 +2118,7 @@ msgstr "" "DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon sera de 4096 ou " "8192 octets." -#: library/functions.rst:1117 +#: library/functions.rst:1124 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " @@ -2120,7 +2128,7 @@ msgstr "" "isatty` renvoie ``True``) utilisent un tampon par lignes. Les autres " "fichiers texte sont traités comme les fichiers binaires." -#: library/functions.rst:1121 +#: library/functions.rst:1128 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2135,7 +2143,7 @@ msgstr "" "par Python peut être utilisé. Voir :mod:`codecs` pour une liste des " "encodages pris en charge." -#: library/functions.rst:1128 +#: library/functions.rst:1135 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2150,7 +2158,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1136 +#: library/functions.rst:1143 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." @@ -2158,7 +2166,7 @@ msgstr "" "``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage est " "rencontrée. La valeur par défaut, ``None``, a le même effet." -#: library/functions.rst:1140 +#: library/functions.rst:1147 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." @@ -2166,7 +2174,7 @@ msgstr "" "``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " "peut mener à des pertes de données." -#: library/functions.rst:1143 +#: library/functions.rst:1150 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." @@ -2174,7 +2182,7 @@ msgstr "" "``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " "des données mal formées." -#: library/functions.rst:1146 +#: library/functions.rst:1153 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as code points in " "the Unicode Private Use Area ranging from U+DC80 to U+DCFF. These private " @@ -2189,7 +2197,7 @@ msgstr "" "l'écriture de la donnée. C'est utile pour traiter des fichiers d'un encodage " "inconnu." -#: library/functions.rst:1153 +#: library/functions.rst:1160 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " @@ -2199,7 +2207,7 @@ msgstr "" "fichier. Les caractères non gérés par l'encodage sont remplacés par une " "entité XML de la forme ``&#nnn;``." -#: library/functions.rst:1157 +#: library/functions.rst:1164 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." @@ -2207,7 +2215,7 @@ msgstr "" "``'backslashreplace'`` remplace les données mal formées par des séquences " "d'échappement Python (utilisant des barres obliques inverses)." -#: library/functions.rst:1160 +#: library/functions.rst:1167 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." @@ -2215,7 +2223,7 @@ msgstr "" "``'namereplace'`` (aussi supporté lors de l'écriture) remplace les " "caractères non gérés par des séquences d'échappement ``\\N{...}``." -#: library/functions.rst:1168 +#: library/functions.rst:1175 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " @@ -2226,7 +2234,7 @@ msgstr "" "``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " "suit :" -#: library/functions.rst:1172 +#: library/functions.rst:1179 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2244,7 +2252,7 @@ msgstr "" "valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " "qui est rendue telle quelle." -#: library/functions.rst:1180 +#: library/functions.rst:1187 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2258,7 +2266,7 @@ msgstr "" "*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " "la chaîne donnée." -#: library/functions.rst:1186 +#: library/functions.rst:1193 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2270,7 +2278,7 @@ msgstr "" "le fichier sera fermé. Si un nom de fichier est donné, *closefd* doit rester " "``True`` (la valeur par défaut) sans quoi une erreur est levée." -#: library/functions.rst:1191 +#: library/functions.rst:1198 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2284,13 +2292,13 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1197 +#: library/functions.rst:1204 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" "Il n'est :ref:`pas possible d'hériter du fichier ` " "nouvellement créé." -#: library/functions.rst:1199 +#: library/functions.rst:1206 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2298,7 +2306,7 @@ msgstr "" "L'exemple suivant utilise le paramètre :ref:`dir_fd ` de la " "fonction :func:`os.open` pour ouvrir un fichier relatif au dossier courant ::" -#: library/functions.rst:1212 +#: library/functions.rst:1219 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2324,7 +2332,7 @@ msgstr "" "BufferedRandom`. Lorsque le tampon est désactivé, le flux brut, une classe " "fille de :class:`io.RawIOBase`, :class:`io.FileIO` est renvoyée." -#: library/functions.rst:1233 +#: library/functions.rst:1240 msgid "" "See also the file handling modules, such as, :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2334,7 +2342,7 @@ msgstr "" "`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." "path`, :mod:`tmpfile`, et :mod:`shutil`." -#: library/functions.rst:1237 +#: library/functions.rst:1244 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." @@ -2342,7 +2350,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``open`` avec les arguments " "``file``, ``mode``, ``flags``." -#: library/functions.rst:1239 +#: library/functions.rst:1246 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2350,21 +2358,21 @@ msgstr "" "Les arguments ``mode`` et ``flags`` peuvent avoir été modifiés ou déduits de " "l'appel original." -#: library/functions.rst:1245 +#: library/functions.rst:1252 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." -#: library/functions.rst:1246 +#: library/functions.rst:1253 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1247 +#: library/functions.rst:1254 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" ":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" "`OSError`." -#: library/functions.rst:1248 +#: library/functions.rst:1255 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2372,15 +2380,15 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1254 +#: library/functions.rst:1261 msgid "The file is now non-inheritable." msgstr "Il n'est plus possible d'hériter de *file*." -#: library/functions.rst:1258 +#: library/functions.rst:1265 msgid "The ``'U'`` mode." msgstr "Le mode ``'U'``." -#: library/functions.rst:1263 +#: library/functions.rst:1270 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2390,15 +2398,15 @@ msgstr "" "aucune exception, la fonction réessaye l'appel système au lieu de lever une :" "exc:`InterruptedError` (voir la :pep:`475` pour la justification)." -#: library/functions.rst:1266 +#: library/functions.rst:1273 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." -#: library/functions.rst:1271 +#: library/functions.rst:1278 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "prise en charge des objets implémentant :class:`os.PathLike`." -#: library/functions.rst:1272 +#: library/functions.rst:1279 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2406,7 +2414,7 @@ msgstr "" "Sous Windows, ouvrir un *buffer* du terminal peut renvoyer une sous-classe " "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." -#: library/functions.rst:1277 +#: library/functions.rst:1284 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2418,7 +2426,7 @@ msgstr "" "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "l'inverse de :func:`chr`." -#: library/functions.rst:1285 +#: library/functions.rst:1292 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2430,7 +2438,7 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1290 +#: library/functions.rst:1297 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2447,7 +2455,7 @@ msgstr "" "convertis en ``float``, et le résultat sera un ``float`` aussi. Par exemple, " "``10**2`` donne ``100``, alors que ``10**-2`` donne ``0.01``." -#: library/functions.rst:1297 +#: library/functions.rst:1304 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2461,11 +2469,11 @@ msgstr "" "être premiers entre eux. Dans ce cas, ``pow(inv_base, -exp, mod)`` est " "renvoyé, où *inv_base* est un inverse de *base* modulo *mod*." -#: library/functions.rst:1303 +#: library/functions.rst:1310 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "Voici un exemple de calcul d'un inverse de ``38`` modulo ``97`` ::" -#: library/functions.rst:1310 +#: library/functions.rst:1317 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." @@ -2474,14 +2482,14 @@ msgstr "" "permet maintenant au deuxième argument d'être négatif, permettant le calcul " "des inverses modulaires." -#: library/functions.rst:1315 +#: library/functions.rst:1322 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" "Autorise les arguments par mots-clés. Auparavant, seuls les arguments " "positionnels étaient autorisés." -#: library/functions.rst:1322 +#: library/functions.rst:1329 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as " @@ -2491,7 +2499,7 @@ msgstr "" "*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " "doivent être nommés." -#: library/functions.rst:1326 +#: library/functions.rst:1333 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2505,7 +2513,7 @@ msgstr "" "les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écris " "seulement *end*." -#: library/functions.rst:1332 +#: library/functions.rst:1339 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2518,7 +2526,7 @@ msgstr "" "peut pas être utilisé avec des fichiers ouverts en mode binaire. Pour ceux-" "ci utilisez plutôt ``file.write(...)``." -#: library/functions.rst:1337 +#: library/functions.rst:1344 msgid "" "Whether output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." @@ -2526,15 +2534,15 @@ msgstr "" "Que la sortie utilise un *buffer* ou non est souvent décidé par *file*, mais " "si l'argument *flush* est vrai, le tampon du flux est vidé explicitement." -#: library/functions.rst:1340 +#: library/functions.rst:1347 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1346 +#: library/functions.rst:1353 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1348 +#: library/functions.rst:1355 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " @@ -2545,11 +2553,11 @@ msgstr "" "supprimer la valeur d'un attribut, et *doc* créé une *docstring* pour " "l'attribut." -#: library/functions.rst:1352 +#: library/functions.rst:1359 msgid "A typical use is to define a managed attribute ``x``::" msgstr "Une utilisation courante : définir un attribut managé ``x`` ::" -#: library/functions.rst:1369 +#: library/functions.rst:1376 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter and ``del c.x`` the deleter." @@ -2558,7 +2566,7 @@ msgstr "" "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1372 +#: library/functions.rst:1379 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2570,7 +2578,7 @@ msgstr "" "création de propriétés en lecture seule en utilisant simplement :func:" "`property` comme un :term:`décorateur ` ::" -#: library/functions.rst:1385 +#: library/functions.rst:1392 msgid "" "The ``@property`` decorator turns the :meth:`voltage` method into a \"getter" "\" for a read-only attribute with the same name, and it sets the docstring " @@ -2580,7 +2588,7 @@ msgstr "" "*getter* d'un attribut du même nom, et donne *\"Get the current voltage\"* " "comme *docstring* de *voltage*." -#: library/functions.rst:1389 +#: library/functions.rst:1396 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2592,7 +2600,7 @@ msgstr "" "une copie de la propriété avec les accesseurs correspondants définis par la " "fonction de décoration. C'est plus clair avec un exemple ::" -#: library/functions.rst:1411 +#: library/functions.rst:1418 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " @@ -2602,7 +2610,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1415 +#: library/functions.rst:1422 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -2610,11 +2618,11 @@ msgstr "" "L'objet propriété renvoyé à aussi les attributs ``fget``, ``fset`` et " "``fdel`` correspondants aux arguments du constructeur." -#: library/functions.rst:1418 +#: library/functions.rst:1425 msgid "The docstrings of property objects are now writeable." msgstr "Les *docstrings* des objets propriété peuvent maintenant être écrits." -#: library/functions.rst:1427 +#: library/functions.rst:1434 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." @@ -2623,7 +2631,7 @@ msgstr "" "type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" "`typesseq`." -#: library/functions.rst:1433 +#: library/functions.rst:1440 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2641,7 +2649,7 @@ msgstr "" "l'adresse de l'objet. Une classe peut contrôler ce que cette fonction " "renvoie pour ses instances en définissant une méthode :meth:`__repr__`." -#: library/functions.rst:1444 +#: library/functions.rst:1451 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2653,7 +2661,7 @@ msgstr "" "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1452 +#: library/functions.rst:1459 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " @@ -2663,7 +2671,7 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1456 +#: library/functions.rst:1463 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2681,7 +2689,7 @@ msgstr "" "zéro, ou négatif). La valeur renvoyée est un entier si *ndigits* n'est pas " "donné, (ou est ``None``). Sinon elle est du même type que *number*." -#: library/functions.rst:1465 +#: library/functions.rst:1472 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." @@ -2689,7 +2697,7 @@ msgstr "" "Pour tout autre objet Python ``number``, ``round`` délègue à ``number." "__round__``." -#: library/functions.rst:1470 +#: library/functions.rst:1477 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2703,7 +2711,7 @@ msgstr "" "fractions de décimaux ne peuvent pas être représentés exactement en nombre a " "virgule flottante. Voir :ref:`tut-fp-issues` pour plus d'information." -#: library/functions.rst:1481 +#: library/functions.rst:1488 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" @@ -2713,7 +2721,7 @@ msgstr "" "d'*iterable*. ``set`` est une classe native. Voir :class:`set` et :ref:" "`types-set` pour la documentation de cette classe." -#: library/functions.rst:1485 +#: library/functions.rst:1492 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " @@ -2722,7 +2730,7 @@ msgstr "" "D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" "class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." -#: library/functions.rst:1492 +#: library/functions.rst:1499 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string and an arbitrary value. The string may name an existing attribute or " @@ -2736,7 +2744,14 @@ msgstr "" "si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', 123)`` équivaut à " "``x.foobar = 123``." -#: library/functions.rst:1504 +#: library/functions.rst:1507 +msgid "" +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes " +"with two leading underscores) name in order to set it with :func:`setattr`." +msgstr "" + +#: library/functions.rst:1518 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -2761,16 +2776,16 @@ msgstr "" "Voir :func:`itertools.islice` pour une version alternative renvoyant un " "itérateur." -#: library/functions.rst:1517 +#: library/functions.rst:1531 msgid "Return a new sorted list from the items in *iterable*." msgstr "Renvoie une nouvelle liste triée depuis les éléments d'*iterable*." -#: library/functions.rst:1519 +#: library/functions.rst:1533 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "A deux arguments optionnels qui doivent être nommés." -#: library/functions.rst:1521 +#: library/functions.rst:1535 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." @@ -2781,7 +2796,7 @@ msgstr "" "lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1525 +#: library/functions.rst:1539 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -2789,7 +2804,7 @@ msgstr "" "*reverse*, une valeur booléenne. Si elle est ``True``, la liste d'éléments " "est triée comme si toutes les comparaisons étaient inversées." -#: library/functions.rst:1528 +#: library/functions.rst:1542 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -2797,7 +2812,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1531 +#: library/functions.rst:1545 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2809,17 +2824,17 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par département " "puis par salaire)." -#: library/functions.rst:1536 +#: library/functions.rst:1550 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`." -#: library/functions.rst:1540 +#: library/functions.rst:1554 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1542 +#: library/functions.rst:1556 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -2827,7 +2842,7 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voilà " "comment déclarer une méthode statique ::" -#: library/functions.rst:1549 +#: library/functions.rst:1563 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2835,7 +2850,7 @@ msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1552 +#: library/functions.rst:1566 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``)." @@ -2843,7 +2858,7 @@ msgstr "" "Une méthode statique peut être appelée sur une classe (par exemple, ``C." "f()``) comme sur une instance (par exemple, ``C().f()``)." -#: library/functions.rst:1555 +#: library/functions.rst:1569 msgid "" "Static methods in Python are similar to those found in Java or C++. Also " "see :func:`classmethod` for a variant that is useful for creating alternate " @@ -2853,7 +2868,7 @@ msgstr "" "ou en C++. Consultez :func:`classmethod` pour une variante utile pour créer " "des constructeurs alternatifs." -#: library/functions.rst:1559 +#: library/functions.rst:1573 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2867,19 +2882,19 @@ msgstr "" "depuis le corps d'une classe, et souhaiteriez éviter sa transformation en " "méthode d'instance. Pour ces cas, faites comme suit ::" -#: library/functions.rst:1568 +#: library/functions.rst:1582 msgid "For more information on static methods, see :ref:`types`." msgstr "" "Pour plus d'informations sur les méthodes statiques, consultez :ref:`types`." -#: library/functions.rst:1579 +#: library/functions.rst:1593 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" "Renvoie une version d'*object* sous forme de :class:`str`. Voir :func:`str` " "pour plus de détails." -#: library/functions.rst:1581 +#: library/functions.rst:1595 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -2887,7 +2902,7 @@ msgstr "" "``str`` est la :term:`classe ` native des chaînes de caractères. Pour " "des informations générales à propos des chaînes, consultez :ref:`textseq`." -#: library/functions.rst:1587 +#: library/functions.rst:1601 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " @@ -2897,7 +2912,7 @@ msgstr "" "donne le total. Les éléments de l'*iterable* sont normalement des nombres, " "et la valeur de *start* ne peut pas être une chaîne de caractères." -#: library/functions.rst:1591 +#: library/functions.rst:1605 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2911,11 +2926,11 @@ msgstr "" "meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " "d'itérables, utilisez plutôt :func:`itertools.chain`." -#: library/functions.rst:1597 +#: library/functions.rst:1611 msgid "The *start* parameter can be specified as a keyword argument." msgstr "le paramètre *start* peut être passé comme un argument nommé." -#: library/functions.rst:1602 +#: library/functions.rst:1616 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " @@ -2925,7 +2940,7 @@ msgstr "" "de méthode à une classe parente ou sœur de *type*. C'est utile pour accéder " "aux méthodes héritées qui ont été remplacées dans une classe." -#: library/functions.rst:1606 +#: library/functions.rst:1620 msgid "" "The *object-or-type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." @@ -2934,7 +2949,7 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1610 +#: library/functions.rst:1624 msgid "" "For example, if :attr:`~class.__mro__` of *object-or-type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " @@ -2944,7 +2959,7 @@ msgstr "" "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1614 +#: library/functions.rst:1628 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2956,7 +2971,7 @@ msgstr "" "`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " "d'héritage est modifiée." -#: library/functions.rst:1619 +#: library/functions.rst:1633 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2968,7 +2983,7 @@ msgstr "" "le second argument est un type, ``issubclass(type2, type)`` doit être vrai " "(c'est utile pour les méthodes de classe)." -#: library/functions.rst:1624 +#: library/functions.rst:1638 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2981,7 +2996,7 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:1629 +#: library/functions.rst:1643 #, fuzzy msgid "" "The second use case is to support cooperative multiple inheritance in a " @@ -3005,12 +3020,12 @@ msgstr "" "dans la hiérarchie, et parce que l'ordre peut inclure des classes sœurs " "inconnues avant l'exécution)." -#: library/functions.rst:1639 +#: library/functions.rst:1653 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" "Dans tous les cas, un appel typique à une classe parente ressemble à ::" -#: library/functions.rst:1646 +#: library/functions.rst:1660 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " @@ -3020,7 +3035,7 @@ msgstr "" "la recherche d'attributs. Un cas d'utilisation possible est l'appel d'un :" "term:`descripteur ` d'une classe parente ou sœur." -#: library/functions.rst:1650 +#: library/functions.rst:1664 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -3037,7 +3052,7 @@ msgstr "" "n'est pas défini pour les recherches implicites via des instructions ou des " "opérateurs tels que ``super()[name]``." -#: library/functions.rst:1657 +#: library/functions.rst:1671 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -3054,7 +3069,7 @@ msgstr "" "propos de la classe en cours de définition, ainsi qu'accéder à l'instance " "courante pour les méthodes ordinaires." -#: library/functions.rst:1664 +#: library/functions.rst:1678 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." -#: library/functions.rst:1673 +#: library/functions.rst:1687 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." @@ -3072,7 +3087,7 @@ msgstr "" "Plutôt qu'être une fonction, :class:`tuple` est en fait un type de séquence " "immuable, comme documenté dans :ref:`typesseq-tuple` et :ref:`typesseq`." -#: library/functions.rst:1682 +#: library/functions.rst:1696 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." @@ -3082,7 +3097,7 @@ msgstr "" "objet type et généralement la même que la valeur de l'attribut :attr:`object." "__class__ `." -#: library/functions.rst:1686 +#: library/functions.rst:1700 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." @@ -3090,7 +3105,7 @@ msgstr "" "La fonction native :func:`isinstance` est recommandée pour tester le type " "d'un objet, car elle prend en compte l'héritage." -#: library/functions.rst:1690 +#: library/functions.rst:1704 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3113,11 +3128,11 @@ msgstr "" "exemple, les deux instructions suivantes créent deux instances identiques " "de :class:`type` :" -#: library/functions.rst:1705 +#: library/functions.rst:1719 msgid "See also :ref:`bltin-type-objects`." msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:1707 +#: library/functions.rst:1721 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -3125,12 +3140,12 @@ msgid "" "would." msgstr "" -#: library/functions.rst:1712 +#: library/functions.rst:1726 #, fuzzy msgid "See also :ref:`class-customization`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:1714 +#: library/functions.rst:1728 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." @@ -3139,7 +3154,7 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:1720 +#: library/functions.rst:1734 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." @@ -3148,7 +3163,7 @@ msgstr "" "instance ou de n'importe quel objet avec un attribut :attr:`~object." "__dict__`." -#: library/functions.rst:1723 +#: library/functions.rst:1737 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -3161,7 +3176,7 @@ msgstr "" "exemple, les classes utilisent un :class:`types.MappingProxyType` pour " "éviter les modifications directes du dictionnaire)." -#: library/functions.rst:1728 +#: library/functions.rst:1742 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " @@ -3171,18 +3186,18 @@ msgstr "" "dictionnaire des variables locales n'est utile qu'en lecture, car ses " "écritures sont ignorées." -#: library/functions.rst:1732 +#: library/functions.rst:1746 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: library/functions.rst:1738 +#: library/functions.rst:1752 msgid "Make an iterator that aggregates elements from each of the iterables." msgstr "Construit un itérateur agrégeant les éléments de tous les itérables." -#: library/functions.rst:1740 +#: library/functions.rst:1754 msgid "" "Returns an iterator of tuples, where the *i*-th tuple contains the *i*-th " "element from each of the argument sequences or iterables. The iterator " @@ -3196,7 +3211,7 @@ msgstr "" "un seul argument itérable, elle renvoie un itérateur sur des *n*-uplets d'un " "élément. Sans argument, elle renvoie un itérateur vide. Équivalent à ::" -#: library/functions.rst:1759 +#: library/functions.rst:1773 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -3211,7 +3226,7 @@ msgstr "" "l'itérateur. Cela a pour effet de diviser la séquence en morceaux de taille " "*n*." -#: library/functions.rst:1765 +#: library/functions.rst:1779 msgid "" ":func:`zip` should only be used with unequal length inputs when you don't " "care about trailing, unmatched values from the longer iterables. If those " @@ -3222,7 +3237,7 @@ msgstr "" "peuvent être ignorées. Si ces valeurs sont importantes, utilisez plutôt :" "func:`itertools.zip_longest`." -#: library/functions.rst:1769 +#: library/functions.rst:1783 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3230,7 +3245,7 @@ msgstr "" ":func:`zip` peut être utilisée conjointement avec l'opérateur ``*`` pour " "dézipper une liste ::" -#: library/functions.rst:1790 +#: library/functions.rst:1804 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3238,7 +3253,7 @@ msgstr "" "C'est une fonction avancée qui n'est pas fréquemment nécessaire, " "contrairement à :func:`importlib.import_module`." -#: library/functions.rst:1793 +#: library/functions.rst:1807 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3258,7 +3273,7 @@ msgstr "" "à trouver l'implémentation par défaut. L'usage direct de :func:`__import__` " "est aussi déconseillé en faveur de :func:`importlib.import_module`." -#: library/functions.rst:1802 +#: library/functions.rst:1816 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3274,7 +3289,7 @@ msgstr "" "l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " "du paquet de l'instruction :keyword:`import`." -#: library/functions.rst:1809 +#: library/functions.rst:1823 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3287,7 +3302,7 @@ msgstr "" "positive indique le nombre de dossiers parents relativement au dossier du " "module appelant :func:`__import__` (voir la :pep:`328`)." -#: library/functions.rst:1815 +#: library/functions.rst:1829 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3299,7 +3314,7 @@ msgstr "" "et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " "*fromlist* est fourni, le module nommé par *name* est renvoyé." -#: library/functions.rst:1820 +#: library/functions.rst:1834 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -3307,11 +3322,11 @@ msgstr "" "Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " "(*bytecode* en anglais) ressemblant au code suivant ::" -#: library/functions.rst:1825 +#: library/functions.rst:1839 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:1829 +#: library/functions.rst:1843 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." @@ -3319,7 +3334,7 @@ msgstr "" "Notez comment :func:`__import__` renvoie ici le module de plus haut niveau " "parce que c'est l'objet lié à un nom par l'instruction :keyword:`import`." -#: library/functions.rst:1832 +#: library/functions.rst:1846 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -3327,7 +3342,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:1839 +#: library/functions.rst:1853 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " @@ -3336,7 +3351,7 @@ msgstr "" "Ici le module ``spam.ham`` est renvoyé par :func:`__import__`. De cet objet, " "les noms à importer sont récupérés et assignés à leurs noms respectifs." -#: library/functions.rst:1843 +#: library/functions.rst:1857 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -3344,7 +3359,7 @@ msgstr "" "Si vous voulez simplement importer un module (potentiellement dans un " "paquet) par son nom, utilisez :func:`importlib.import_module`." -#: library/functions.rst:1846 +#: library/functions.rst:1860 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -3352,7 +3367,7 @@ msgstr "" "les valeurs négatives pour *level* ne sont plus prises en charge (et sa " "valeur par défaut est 0)." -#: library/functions.rst:1850 +#: library/functions.rst:1864 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." @@ -3360,11 +3375,11 @@ msgstr "" "quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " "de commande, la variable d'environnement :envvar:`PYTHONCASEOK` est ignorée." -#: library/functions.rst:1855 +#: library/functions.rst:1869 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:1856 +#: library/functions.rst:1870 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index 43943409..9ddfe9ea 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2019-09-04 11:42+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,13 +18,13 @@ msgstr "" msgid "Using :mod:`!importlib.metadata`" msgstr "" -#: library/importlib.metadata.rst:10 +#: library/importlib.metadata.rst:13 msgid "" "This functionality is provisional and may deviate from the usual version " "semantics of the standard library." msgstr "" -#: library/importlib.metadata.rst:13 +#: library/importlib.metadata.rst:16 msgid "" "``importlib.metadata`` is a library that provides for access to installed " "package metadata. Built in part on Python's import system, this library " @@ -35,7 +35,7 @@ msgid "" "efficient ``pkg_resources`` package." msgstr "" -#: library/importlib.metadata.rst:22 +#: library/importlib.metadata.rst:25 msgid "" "By \"installed package\" we generally mean a third-party package installed " "into Python's ``site-packages`` directory via tools such as `pip ` objects." msgstr "" -#: library/importlib.metadata.rst:58 +#: library/importlib.metadata.rst:61 msgid "You can get the :ref:`metadata for a distribution `::" msgstr "" -#: library/importlib.metadata.rst:63 +#: library/importlib.metadata.rst:66 msgid "" "You can also get a :ref:`distribution's version number `, list its :" "ref:`constituent files `, and get a list of the distribution's :ref:" "`requirements`." msgstr "" -#: library/importlib.metadata.rst:69 +#: library/importlib.metadata.rst:72 msgid "Functional API" msgstr "API par fonction" -#: library/importlib.metadata.rst:71 +#: library/importlib.metadata.rst:74 msgid "This package provides the following functionality via its public API." msgstr "" -#: library/importlib.metadata.rst:77 +#: library/importlib.metadata.rst:80 msgid "Entry points" msgstr "" -#: library/importlib.metadata.rst:79 +#: library/importlib.metadata.rst:82 msgid "" "The ``entry_points()`` function returns a dictionary of all entry points, " "keyed by group. Entry points are represented by ``EntryPoint`` instances; " @@ -101,7 +101,7 @@ msgid "" "value`` attribute::" msgstr "" -#: library/importlib.metadata.rst:103 +#: library/importlib.metadata.rst:106 msgid "" "The ``group`` and ``name`` are arbitrary values defined by the package " "author and usually a client will wish to resolve all entry points for a " @@ -110,37 +110,37 @@ msgid "" "for more information on entry points, their definition, and usage." msgstr "" -#: library/importlib.metadata.rst:113 +#: library/importlib.metadata.rst:116 msgid "Distribution metadata" msgstr "" -#: library/importlib.metadata.rst:115 +#: library/importlib.metadata.rst:118 msgid "" "Every distribution includes some metadata, which you can extract using the " "``metadata()`` function::" msgstr "" -#: library/importlib.metadata.rst:120 +#: library/importlib.metadata.rst:123 msgid "" "The keys of the returned data structure [#f1]_ name the metadata keywords, " "and their values are returned unparsed from the distribution metadata::" msgstr "" -#: library/importlib.metadata.rst:130 +#: library/importlib.metadata.rst:133 msgid "Distribution versions" msgstr "" -#: library/importlib.metadata.rst:132 +#: library/importlib.metadata.rst:135 msgid "" "The ``version()`` function is the quickest way to get a distribution's " "version number, as a string::" msgstr "" -#: library/importlib.metadata.rst:142 +#: library/importlib.metadata.rst:145 msgid "Distribution files" msgstr "" -#: library/importlib.metadata.rst:144 +#: library/importlib.metadata.rst:147 msgid "" "You can also get the full set of files contained within a distribution. The " "``files()`` function takes a distribution package name and returns all of " @@ -150,11 +150,11 @@ msgid "" "For example::" msgstr "" -#: library/importlib.metadata.rst:160 +#: library/importlib.metadata.rst:163 msgid "Once you have the file, you can also read its contents::" msgstr "" -#: library/importlib.metadata.rst:171 +#: library/importlib.metadata.rst:174 msgid "" "In the case where the metadata file listing files (RECORD or SOURCES.txt) is " "missing, ``files()`` will return ``None``. The caller may wish to wrap calls " @@ -164,22 +164,22 @@ msgid "" "present." msgstr "" -#: library/importlib.metadata.rst:182 +#: library/importlib.metadata.rst:185 msgid "Distribution requirements" msgstr "" -#: library/importlib.metadata.rst:184 +#: library/importlib.metadata.rst:187 msgid "" "To get the full set of requirements for a distribution, use the " "``requires()`` function::" msgstr "" -#: library/importlib.metadata.rst:192 +#: library/importlib.metadata.rst:195 #, fuzzy msgid "Distributions" msgstr "Distribution" -#: library/importlib.metadata.rst:194 +#: library/importlib.metadata.rst:197 msgid "" "While the above API is the most common and convenient usage, you can get all " "of that information from the ``Distribution`` class. A ``Distribution`` is " @@ -187,29 +187,29 @@ msgid "" "can get the ``Distribution`` instance::" msgstr "" -#: library/importlib.metadata.rst:202 +#: library/importlib.metadata.rst:205 msgid "" "Thus, an alternative way to get the version number is through the " "``Distribution`` instance::" msgstr "" -#: library/importlib.metadata.rst:208 +#: library/importlib.metadata.rst:211 msgid "" "There are all kinds of additional metadata available on the ``Distribution`` " "instance::" msgstr "" -#: library/importlib.metadata.rst:216 +#: library/importlib.metadata.rst:219 msgid "" "The full set of available metadata is not described here. See :pep:`566` " "for additional details." msgstr "" -#: library/importlib.metadata.rst:221 +#: library/importlib.metadata.rst:224 msgid "Extending the search algorithm" msgstr "" -#: library/importlib.metadata.rst:223 +#: library/importlib.metadata.rst:226 msgid "" "Because package metadata is not available through :data:`sys.path` searches, " "or package loaders directly, the metadata for a package is found through " @@ -218,14 +218,14 @@ msgid "" "path finders ` on :data:`sys.meta_path`." msgstr "" -#: library/importlib.metadata.rst:229 +#: library/importlib.metadata.rst:232 msgid "" "The default ``PathFinder`` for Python includes a hook that calls into " "``importlib.metadata.MetadataPathFinder`` for finding distributions loaded " "from typical file-system-based paths." msgstr "" -#: library/importlib.metadata.rst:233 +#: library/importlib.metadata.rst:236 msgid "" "The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the " "interface expected of finders by Python's import system. ``importlib." @@ -235,14 +235,14 @@ msgid "" "base class, which defines this abstract method::" msgstr "" -#: library/importlib.metadata.rst:247 +#: library/importlib.metadata.rst:250 msgid "" "The ``DistributionFinder.Context`` object provides ``.path`` and ``.name`` " "properties indicating the path to search and name to match and may supply " "other relevant context." msgstr "" -#: library/importlib.metadata.rst:251 +#: library/importlib.metadata.rst:254 msgid "" "What this means in practice is that to support finding distribution package " "metadata in locations other than the file system, subclass ``Distribution`` " @@ -251,11 +251,11 @@ msgid "" "method." msgstr "" -#: library/importlib.metadata.rst:264 +#: library/importlib.metadata.rst:267 msgid "Footnotes" msgstr "Notes" -#: library/importlib.metadata.rst:265 +#: library/importlib.metadata.rst:268 msgid "" "Technically, the returned distribution metadata object is an :class:`email." "message.EmailMessage` instance, but this is an implementation detail, and " diff --git a/library/importlib.po b/library/importlib.po index d4fb51ac..cd16941b 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2018-07-04 11:26+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -654,7 +654,7 @@ msgid "The import machinery now takes care of this automatically." msgstr "" #: library/importlib.rst:484 -msgid "*Superseded by TraversableReader*" +msgid "*Superseded by TraversableResources*" msgstr "" #: library/importlib.rst:486 diff --git a/library/platform.po b/library/platform.po index dcfe936d..953f44bd 100644 --- a/library/platform.po +++ b/library/platform.po @@ -5,14 +5,14 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-05-28 17:46+0200\n" +"Last-Translator: Stephan Michaud \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: Stephan Michaud \n" "X-Generator: Poedit 2.3\n" #: library/platform.rst:2 diff --git a/library/stdtypes.po b/library/stdtypes.po index e40e063a..44e4b82f 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2020-08-09 15:32+0200\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" @@ -5256,21 +5256,23 @@ msgstr "" "`." #: library/stdtypes.rst:3614 +#, fuzzy msgid "" -"Create a :class:`memoryview` that references *obj*. *obj* must support the " -"buffer protocol. Built-in objects that support the buffer protocol include :" -"class:`bytes` and :class:`bytearray`." +"Create a :class:`memoryview` that references *object*. *object* must " +"support the buffer protocol. Built-in objects that support the buffer " +"protocol include :class:`bytes` and :class:`bytearray`." msgstr "" "Crée une :class:`memoryview` faisant référence à *obj*. *obj* doit supporter " "le *buffer protocol*. Les objets natifs prenant en charge le *buffer " "protocol* sont :class:`bytes` et :class:`bytearray`." #: library/stdtypes.rst:3618 +#, fuzzy msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " -"memory unit handled by the originating object *obj*. For many simple types " -"such as :class:`bytes` and :class:`bytearray`, an element is a single byte, " -"but other types such as :class:`array.array` may have bigger elements." +"memory unit handled by the originating *object*. For many simple types such " +"as :class:`bytes` and :class:`bytearray`, an element is a single byte, but " +"other types such as :class:`array.array` may have bigger elements." msgstr "" "Une :class:`memoryview` a la notion d'*element*, qui est l'unité de mémoire " "atomique géré par l'objet *obj* d'origine. Pour de nombreux types simples " @@ -5278,7 +5280,7 @@ msgstr "" "d'autres types tels que :class:`array.array` les éléments peuvent être plus " "grands." -#: library/stdtypes.rst:3624 +#: library/stdtypes.rst:3623 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If " "``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is " @@ -5294,7 +5296,7 @@ msgstr "" "L'attribut :class:`~memoryview.itemsize` vous donnera la taille en octets " "d'un élément." -#: library/stdtypes.rst:3631 +#: library/stdtypes.rst:3630 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" @@ -5302,7 +5304,7 @@ msgstr "" "Une :class:`memoryview` autorise le découpage et l'indiçage de ses données. " "Découper sur une dimension donnera une sous-vue ::" -#: library/stdtypes.rst:3644 +#: library/stdtypes.rst:3643 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -5321,11 +5323,11 @@ msgstr "" "Les *memoryviews* à zéro dimension peuvent être indexées avec un *n*-uplet " "vide." -#: library/stdtypes.rst:3653 +#: library/stdtypes.rst:3652 msgid "Here is an example with a non-byte format::" msgstr "Voici un exemple avec un autre format que *byte* ::" -#: library/stdtypes.rst:3665 +#: library/stdtypes.rst:3664 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" @@ -5334,7 +5336,7 @@ msgstr "" "autorisera les assignations de tranches à une dimension. Redimensionner " "n'est cependant pas autorisé ::" -#: library/stdtypes.rst:3686 +#: library/stdtypes.rst:3685 msgid "" "One-dimensional memoryviews of hashable (read-only) types with formats 'B', " "'b' or 'c' are also hashable. The hash is defined as ``hash(m) == hash(m." @@ -5344,7 +5346,7 @@ msgstr "" "les formats 'B', 'b', ou 'c' sont aussi hachables. La fonction de hachage " "est définie tel que ``hash(m) == hash(m.tobytes())`` ::" -#: library/stdtypes.rst:3698 +#: library/stdtypes.rst:3697 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." @@ -5353,7 +5355,7 @@ msgstr "" "*memoryviews* à une dimension avec les formats 'B', 'b', ou 'c' sont " "maintenant hachables." -#: library/stdtypes.rst:3702 +#: library/stdtypes.rst:3701 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" @@ -5361,16 +5363,16 @@ msgstr "" "*memoryview* est maintenant enregistrée automatiquement avec :class:" "`collections.abc.Sequence`" -#: library/stdtypes.rst:3706 +#: library/stdtypes.rst:3705 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" "les *memoryviews* peut maintenant être indexées par un *n*-uplet d'entiers." -#: library/stdtypes.rst:3709 +#: library/stdtypes.rst:3708 msgid ":class:`memoryview` has several methods:" msgstr "La :class:`memoryview` dispose de plusieurs méthodes :" -#: library/stdtypes.rst:3713 +#: library/stdtypes.rst:3712 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " @@ -5381,7 +5383,7 @@ msgstr "" "égales, le format respectifs des opérandes étant interprétés en utilisant la " "syntaxe de :mod:`struct`." -#: library/stdtypes.rst:3717 +#: library/stdtypes.rst:3716 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" @@ -5389,7 +5391,7 @@ msgstr "" "Pour le sous-ensemble des formats de :mod:`struct` supportés par :meth:" "`tolist`, ``v`` et ``w`` sont égaux si ``v.tolist() ==w.tolist()`` ::" -#: library/stdtypes.rst:3736 +#: library/stdtypes.rst:3735 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " @@ -5399,7 +5401,7 @@ msgstr "" "objets seront toujours considérés différents (même si les formats et les " "valeurs contenues sont identiques) ::" -#: library/stdtypes.rst:3752 +#: library/stdtypes.rst:3751 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." @@ -5407,7 +5409,7 @@ msgstr "" "Notez que pour les *memoryview*, comme pour les nombres à virgule flottante, " "``v is w`` *n'implique pas* ``v == w``." -#: library/stdtypes.rst:3755 +#: library/stdtypes.rst:3754 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." @@ -5415,7 +5417,7 @@ msgstr "" "Les versions précédentes comparaient la mémoire brute sans tenir compte du " "format de l'objet ni de sa structure logique." -#: library/stdtypes.rst:3761 +#: library/stdtypes.rst:3760 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" @@ -5423,7 +5425,7 @@ msgstr "" "Renvoie les données du *buffer* sous forme de *bytes*. Cela équivaut à " "appeler le constructeur :class:`bytes` sur le *memoryview*. ::" -#: library/stdtypes.rst:3770 +#: library/stdtypes.rst:3769 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -5435,7 +5437,7 @@ msgstr "" "`tobytes` supporte toutes les chaînes de format, y compris celles qui ne " "sont pas connues du module :mod:`struct`." -#: library/stdtypes.rst:3775 +#: library/stdtypes.rst:3774 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -5450,7 +5452,7 @@ msgstr "" "contiguës, les données sont d'abord converties en C. `order=None` est " "identique à `order='C'`." -#: library/stdtypes.rst:3784 +#: library/stdtypes.rst:3783 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" @@ -5458,7 +5460,7 @@ msgstr "" "Renvoie une chaîne contenant deux chiffres hexadécimaux pour chaque octet de " "la mémoire. ::" -#: library/stdtypes.rst:3793 +#: library/stdtypes.rst:3792 #, fuzzy msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " @@ -5469,12 +5471,12 @@ msgstr "" "et *bytes_per_sep* pour insérer des séparateurs entre les octets dans la " "sortie hexadécimale." -#: library/stdtypes.rst:3800 +#: library/stdtypes.rst:3799 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" "Renvoie les données de la mémoire sous la forme d'une liste d'éléments. ::" -#: library/stdtypes.rst:3810 +#: library/stdtypes.rst:3809 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." @@ -5482,7 +5484,7 @@ msgstr "" ":meth:`tolist` prend désormais en charge tous les formats d'un caractère du " "module :mod:`struct` ainsi que des représentations multidimensionnelles." -#: library/stdtypes.rst:3817 +#: library/stdtypes.rst:3816 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" @@ -5490,7 +5492,7 @@ msgstr "" "Renvoie une version en lecture seule de l'objet *memoryview*. Cet objet " "original *memoryview* est inchangé. ::" -#: library/stdtypes.rst:3836 +#: library/stdtypes.rst:3835 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -5505,7 +5507,7 @@ msgstr "" "lever ces restrictions (et en libérer les ressources liées) aussi tôt que " "possible." -#: library/stdtypes.rst:3842 +#: library/stdtypes.rst:3841 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release()` itself which can be called " @@ -5515,7 +5517,7 @@ msgstr "" "*view* lève une :class:`ValueError` (sauf :meth:`release()` elle-même qui " "peut être appelée plusieurs fois) ::" -#: library/stdtypes.rst:3853 +#: library/stdtypes.rst:3852 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" @@ -5523,7 +5525,7 @@ msgstr "" "Le protocole de gestion de contexte peut être utilisé pour obtenir un effet " "similaire, via l'instruction ``with`` ::" -#: library/stdtypes.rst:3869 +#: library/stdtypes.rst:3868 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -5537,7 +5539,7 @@ msgstr "" "mais la mémoire elle-même n'est pas copiée. Les changements supportés sont " "une dimension vers C-:term:`contiguous` et *C-contiguous* vers une dimension." -#: library/stdtypes.rst:3875 +#: library/stdtypes.rst:3874 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " @@ -5548,37 +5550,37 @@ msgstr "" "'c'). La longueur du résultat en octets doit être la même que la longueur " "initiale." -#: library/stdtypes.rst:3880 +#: library/stdtypes.rst:3879 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "Transforme *1D/long* en *1D/unsigned bytes* ::" -#: library/stdtypes.rst:3903 +#: library/stdtypes.rst:3902 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "Transforme *1D/unsigned bytes* en *1D/char* ::" -#: library/stdtypes.rst:3916 +#: library/stdtypes.rst:3915 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "Transforme *1D/bytes* en *3D/ints* en *1D/signed char* ::" -#: library/stdtypes.rst:3942 +#: library/stdtypes.rst:3941 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "Transforme *1D/unsigned char* en *2D/unsigned long* ::" -#: library/stdtypes.rst:3956 +#: library/stdtypes.rst:3955 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" "Le format de la source n'est plus restreint lors de la transformation vers " "une vue d'octets." -#: library/stdtypes.rst:3959 +#: library/stdtypes.rst:3958 msgid "There are also several readonly attributes available:" msgstr "Plusieurs attributs en lecture seule sont également disponibles :" -#: library/stdtypes.rst:3963 +#: library/stdtypes.rst:3962 msgid "The underlying object of the memoryview::" msgstr "L'objet sous-jacent de la *memoryview* ::" -#: library/stdtypes.rst:3974 +#: library/stdtypes.rst:3973 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " @@ -5588,15 +5590,15 @@ msgstr "" "l'espace que la liste utiliserait en octets, dans une représentation " "contiguë. Ce n'est pas nécessairement égale à ``len(m)`` ::" -#: library/stdtypes.rst:3993 +#: library/stdtypes.rst:3992 msgid "Multi-dimensional arrays::" msgstr "Tableaux multidimensionnels ::" -#: library/stdtypes.rst:4010 +#: library/stdtypes.rst:4009 msgid "A bool indicating whether the memory is read only." msgstr "Un booléen indiquant si la mémoire est en lecture seule." -#: library/stdtypes.rst:4014 +#: library/stdtypes.rst:4013 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -5608,7 +5610,7 @@ msgstr "" "de formats arbitraires, mais certaines méthodes (comme :meth:`tolist`) sont " "limitées aux formats natifs à un seul élément." -#: library/stdtypes.rst:4019 +#: library/stdtypes.rst:4018 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." @@ -5616,11 +5618,11 @@ msgstr "" "le format ``'B'`` est maintenant traité selon la syntaxe du module *struct*. " "Cela signifie que ``memoryview(b'abc')[0] == b'abc'[0] == 97``." -#: library/stdtypes.rst:4025 +#: library/stdtypes.rst:4024 msgid "The size in bytes of each element of the memoryview::" msgstr "La taille en octets de chaque élément d'une *memoryview* ::" -#: library/stdtypes.rst:4038 +#: library/stdtypes.rst:4037 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." @@ -5628,7 +5630,7 @@ msgstr "" "Un nombre entier indiquant le nombre de dimensions d'un tableau multi-" "dimensionnel représenté par la *memoryview*." -#: library/stdtypes.rst:4043 +#: library/stdtypes.rst:4042 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." @@ -5636,11 +5638,11 @@ msgstr "" "Un *n*-uplet d'entiers de longueur :attr:`ndim` donnant la forme de la " "*memoryview* sous forme d'un tableau à N dimensions." -#: library/stdtypes.rst:4054 +#: library/stdtypes.rst:4053 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "Un *n*-uplet vide au lieu de ``None`` lorsque *ndim = 0*." -#: library/stdtypes.rst:4051 +#: library/stdtypes.rst:4050 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." @@ -5648,29 +5650,29 @@ msgstr "" "Un *n*-uplet d'entiers de longueur :attr:`ndim` donnant la taille en octets " "permettant d'accéder à chaque dimensions du tableau." -#: library/stdtypes.rst:4059 +#: library/stdtypes.rst:4058 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" "Détail de l'implémentation des *PIL-style arrays*. La valeur n'est donné " "qu'a titre d'information." -#: library/stdtypes.rst:4063 +#: library/stdtypes.rst:4062 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "Un booléen indiquant si la mémoire est C-:term:`contiguous`." -#: library/stdtypes.rst:4069 +#: library/stdtypes.rst:4068 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "Un booléen indiquant si la mémoire est Fortran :term:`contiguous`." -#: library/stdtypes.rst:4075 +#: library/stdtypes.rst:4074 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "Un booléen indiquant si la mémoire est :term:`contiguous`." -#: library/stdtypes.rst:4083 +#: library/stdtypes.rst:4082 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "Types d'ensembles — :class:`set`, :class:`frozenset`" -#: library/stdtypes.rst:4087 +#: library/stdtypes.rst:4086 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -5686,7 +5688,7 @@ msgstr "" "(Pour les autres conteneurs, voir les classes natives :class:`dict`, :class:" "`list`, et :class:`tuple`, ainsi que le module :mod:`collections`.)" -#: library/stdtypes.rst:4094 +#: library/stdtypes.rst:4093 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -5699,7 +5701,7 @@ msgstr "" "d'insertion. En conséquence, les *sets* n'autorisent ni l'indexation, ni le " "découpage, ou tout autre comportement de séquence." -#: library/stdtypes.rst:4099 +#: library/stdtypes.rst:4098 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -5719,7 +5721,7 @@ msgstr "" "--- son contenu ne peut être modifié après sa création, il peut ainsi être " "utilisé comme clef de dictionnaire ou élément d'un autre *set*." -#: library/stdtypes.rst:4107 +#: library/stdtypes.rst:4106 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " @@ -5729,11 +5731,11 @@ msgstr "" "d'éléments séparés par des virgules et entre accolades, par exemple : " "``{'jack', 'sjoerd'}``, en plus du constructeur de la classe :class:`set`." -#: library/stdtypes.rst:4111 +#: library/stdtypes.rst:4110 msgid "The constructors for both classes work the same:" msgstr "Les constructeurs des deux classes fonctionnent pareil :" -#: library/stdtypes.rst:4116 +#: library/stdtypes.rst:4115 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -5746,23 +5748,23 @@ msgstr "" "class:`frozenset`. Si *iterable* n'est pas spécifié, un nouveau *set* vide " "est renvoyé." -#: library/stdtypes.rst:4122 +#: library/stdtypes.rst:4121 #, fuzzy msgid "Sets can be created by several means:" msgstr "Les listes peuvent être construites de différentes manières :" -#: library/stdtypes.rst:4124 +#: library/stdtypes.rst:4123 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: library/stdtypes.rst:4125 +#: library/stdtypes.rst:4124 #, fuzzy msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "En utilisant une liste en compréhension : ``[x for x in iterable]``" -#: library/stdtypes.rst:4126 +#: library/stdtypes.rst:4125 #, fuzzy msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " @@ -5770,7 +5772,7 @@ msgid "" msgstr "" "En utilisant le constructeur du type : ``list()`` ou ``list(iterable)``" -#: library/stdtypes.rst:4128 +#: library/stdtypes.rst:4127 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" @@ -5778,19 +5780,19 @@ msgstr "" "Les instances de :class:`set` et :class:`frozenset` fournissent les " "opérations suivantes :" -#: library/stdtypes.rst:4133 +#: library/stdtypes.rst:4132 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "Donne le nombre d'éléments dans le *set* *s* (cardinalité de *s*)." -#: library/stdtypes.rst:4137 +#: library/stdtypes.rst:4136 msgid "Test *x* for membership in *s*." msgstr "Test d'appartenance de *x* dans *s*." -#: library/stdtypes.rst:4141 +#: library/stdtypes.rst:4140 msgid "Test *x* for non-membership in *s*." msgstr "Test de non-appartenance de *x* dans *s*." -#: library/stdtypes.rst:4145 +#: library/stdtypes.rst:4144 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." @@ -5799,11 +5801,11 @@ msgstr "" "Les ensembles sont disjoints si et seulement si leurs intersection est un " "ensemble vide." -#: library/stdtypes.rst:4151 +#: library/stdtypes.rst:4150 msgid "Test whether every element in the set is in *other*." msgstr "Teste si tous les éléments du set sont dans *other*." -#: library/stdtypes.rst:4155 +#: library/stdtypes.rst:4154 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." @@ -5811,11 +5813,11 @@ msgstr "" "Teste si l'ensemble est un sous-ensemble de *other*, c'est-à-dire, ``set <= " "other and set != other``." -#: library/stdtypes.rst:4161 +#: library/stdtypes.rst:4160 msgid "Test whether every element in *other* is in the set." msgstr "Teste si tous les éléments de *other* sont dans l'ensemble." -#: library/stdtypes.rst:4165 +#: library/stdtypes.rst:4164 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." @@ -5823,36 +5825,36 @@ msgstr "" "Teste si l'ensemble est un sur-ensemble de *other*, c'est-à-dire, ``set >= " "other and set != other``." -#: library/stdtypes.rst:4171 +#: library/stdtypes.rst:4170 msgid "Return a new set with elements from the set and all others." msgstr "" "Renvoie un nouvel ensemble dont les éléments viennent de l'ensemble et de " "tous les autres." -#: library/stdtypes.rst:4176 +#: library/stdtypes.rst:4175 msgid "Return a new set with elements common to the set and all others." msgstr "" "Renvoie un nouvel ensemble dont les éléments sont commun à l'ensemble et à " "tous les autres." -#: library/stdtypes.rst:4181 +#: library/stdtypes.rst:4180 msgid "Return a new set with elements in the set that are not in the others." msgstr "" "Renvoie un nouvel ensemble dont les éléments sont dans l'ensemble mais ne " "sont dans aucun des autres." -#: library/stdtypes.rst:4186 +#: library/stdtypes.rst:4185 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" "Renvoie un nouvel ensemble dont les éléments sont soit dans l'ensemble, soit " "dans les autres, mais pas dans les deux." -#: library/stdtypes.rst:4190 +#: library/stdtypes.rst:4189 msgid "Return a shallow copy of the set." msgstr "Renvoie une copie de surface du dictionnaire." -#: library/stdtypes.rst:4193 +#: library/stdtypes.rst:4192 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, and :meth:`symmetric_difference`, :meth:`issubset`, and :" @@ -5869,7 +5871,7 @@ msgstr "" "typiques d'erreurs, en faveur d'une construction plus lisible : ``set('abc')." "intersection('cbs')``." -#: library/stdtypes.rst:4200 +#: library/stdtypes.rst:4199 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -5887,7 +5889,7 @@ msgstr "" "autre ensemble si et seulement si le premier est un sur-ensemble du second " "(est un sur-ensemble mais n'est pas égal)." -#: library/stdtypes.rst:4207 +#: library/stdtypes.rst:4206 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " @@ -5898,7 +5900,7 @@ msgstr "" "frozenset('abc')`` envoie ``True``, ainsi que ``set('abc') in " "set([frozenset('abc')])``." -#: library/stdtypes.rst:4211 +#: library/stdtypes.rst:4210 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -5910,7 +5912,7 @@ msgstr "" "vides ne sont ni égaux et ni des sous-ensembles l'un de l'autre, donc toutes " "ces comparaisons donnent ``False`` : ``ab``." -#: library/stdtypes.rst:4216 +#: library/stdtypes.rst:4215 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." @@ -5919,13 +5921,13 @@ msgstr "" "de sous-ensembles), la sortie de la méthode :meth:`list.sort` n'est pas " "définie pour des listes d'ensembles." -#: library/stdtypes.rst:4219 +#: library/stdtypes.rst:4218 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" "Les éléments des *sets*, comme les clefs de dictionnaires, doivent être :" "term:`hashable`." -#: library/stdtypes.rst:4221 +#: library/stdtypes.rst:4220 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " @@ -5935,7 +5937,7 @@ msgstr "" "`frozenset` renvoient le type de la première opérande. Par exemple : " "``frozenset('ab') | set('bc')`` renvoie une instance de :class:`frozenset`." -#: library/stdtypes.rst:4225 +#: library/stdtypes.rst:4224 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" @@ -5943,32 +5945,32 @@ msgstr "" "La table suivante liste les opérations disponibles pour les :class:`set` " "mais qui ne s'appliquent pas aux instances de :class:`frozenset` :" -#: library/stdtypes.rst:4231 +#: library/stdtypes.rst:4230 msgid "Update the set, adding elements from all others." msgstr "Met à jour l'ensemble, ajoutant les éléments de tous les autres." -#: library/stdtypes.rst:4236 +#: library/stdtypes.rst:4235 msgid "Update the set, keeping only elements found in it and all others." msgstr "" "Met à jour l'ensemble, ne gardant que les éléments trouvés dans tous les " "autres." -#: library/stdtypes.rst:4241 +#: library/stdtypes.rst:4240 msgid "Update the set, removing elements found in others." msgstr "Met à jour l'ensemble, retirant les éléments trouvés dans les autres." -#: library/stdtypes.rst:4246 +#: library/stdtypes.rst:4245 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" "Met à jour le set, ne gardant que les éléments trouvés dans un des ensembles " "mais pas dans les deux." -#: library/stdtypes.rst:4250 +#: library/stdtypes.rst:4249 msgid "Add element *elem* to the set." msgstr "Ajoute l'élément *elem* au set." -#: library/stdtypes.rst:4254 +#: library/stdtypes.rst:4253 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." @@ -5976,11 +5978,11 @@ msgstr "" "Retire l'élément *elem* de l'ensemble. Lève une exception :exc:`KeyError` si " "*elem* n'est pas dans l'ensemble." -#: library/stdtypes.rst:4259 +#: library/stdtypes.rst:4258 msgid "Remove element *elem* from the set if it is present." msgstr "Retire l'élément *elem* de l'ensemble s'il y est." -#: library/stdtypes.rst:4263 +#: library/stdtypes.rst:4262 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." @@ -5988,11 +5990,11 @@ msgstr "" "Retire et renvoie un élément arbitraire de l'ensemble. Lève une exception :" "exc:`KeyError` si l'ensemble est vide." -#: library/stdtypes.rst:4268 +#: library/stdtypes.rst:4267 msgid "Remove all elements from the set." msgstr "Supprime tous les éléments du *set*." -#: library/stdtypes.rst:4271 +#: library/stdtypes.rst:4270 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -6004,7 +6006,7 @@ msgstr "" "`symmetric_difference_update` acceptent n'importe quel itérable comme " "argument." -#: library/stdtypes.rst:4276 +#: library/stdtypes.rst:4275 msgid "" "Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :" "meth:`discard` methods may be a set. To support searching for an equivalent " @@ -6015,11 +6017,11 @@ msgstr "" "recherche d'un *frozenset* équivalent, un *frozenset* temporaire est crée " "depuis *elem*." -#: library/stdtypes.rst:4284 +#: library/stdtypes.rst:4283 msgid "Mapping Types --- :class:`dict`" msgstr "Les types de correspondances — :class:`dict`" -#: library/stdtypes.rst:4294 +#: library/stdtypes.rst:4293 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -6033,7 +6035,7 @@ msgstr "" "(Pour les autres conteneurs, voir les types natifs :class:`list`, :class:" "`set`, et :class:`tuple`, ainsi que le module :mod:`collections`.)" -#: library/stdtypes.rst:4300 +#: library/stdtypes.rst:4299 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -6056,7 +6058,7 @@ msgstr "" "d'approximations, il est généralement imprudent de les utiliser comme clefs " "de dictionnaires.)" -#: library/stdtypes.rst:4309 +#: library/stdtypes.rst:4308 msgid "" "Dictionaries can be created by placing a comma-separated list of ``key: " "value`` pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` " @@ -6067,7 +6069,7 @@ msgstr "" "``{'jack': 4098, 'sjoerd': 4127}`` ou ``{4098: 'jack', 4127: 'sjoerd'}``, ou " "en utilisant le constructeur de :class:`dict`." -#: library/stdtypes.rst:4317 +#: library/stdtypes.rst:4316 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." @@ -6075,12 +6077,12 @@ msgstr "" "Renvoie un nouveau dictionnaire initialisé depuis un argument positionnel " "optionnel, et un ensemble (vide ou non) d'arguments par mot clef." -#: library/stdtypes.rst:4320 +#: library/stdtypes.rst:4319 #, fuzzy msgid "Dictionaries can be created by several means:" msgstr "Les listes peuvent être construites de différentes manières :" -#: library/stdtypes.rst:4322 +#: library/stdtypes.rst:4321 #, fuzzy msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " @@ -6091,18 +6093,18 @@ msgstr "" "``{'jack': 4098, 'sjoerd': 4127}`` ou ``{4098: 'jack', 4127: 'sjoerd'}``, ou " "en utilisant le constructeur de :class:`dict`." -#: library/stdtypes.rst:4324 +#: library/stdtypes.rst:4323 #, fuzzy msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "En utilisant une liste en compréhension : ``[x for x in iterable]``" -#: library/stdtypes.rst:4325 +#: library/stdtypes.rst:4324 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: library/stdtypes.rst:4328 +#: library/stdtypes.rst:4327 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -6124,7 +6126,7 @@ msgstr "" "pour cette clef devient la valeur correspondante à cette clef dans le " "nouveau dictionnaire." -#: library/stdtypes.rst:4338 +#: library/stdtypes.rst:4337 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -6135,7 +6137,7 @@ msgstr "" "depuis l'argument positionnel. Si une clef est déjà présente, la valeur de " "l'argument nommé remplace la valeur reçue par l'argument positionnel." -#: library/stdtypes.rst:4343 +#: library/stdtypes.rst:4342 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" @@ -6143,7 +6145,7 @@ msgstr "" "Typiquement, les exemples suivants renvoient tous un dictionnaire valant " "``{\"one\": 1, \"two\": 2, \"three\": 3}`` ::" -#: library/stdtypes.rst:4355 +#: library/stdtypes.rst:4354 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." @@ -6152,7 +6154,7 @@ msgstr "" "pour des clefs qui sont des identifiants valide en Python. Dans les autres " "cas, toutes les clefs valides sont utilisables." -#: library/stdtypes.rst:4359 +#: library/stdtypes.rst:4358 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" @@ -6160,16 +6162,16 @@ msgstr "" "Voici les opérations gérées par les dictionnaires, (par conséquent, d'autres " "types de *mapping* peuvent les gérer aussi) :" -#: library/stdtypes.rst:4364 +#: library/stdtypes.rst:4363 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" "Renvoie une liste de toutes les clés utilisées dans le dictionnaire *d*." -#: library/stdtypes.rst:4368 +#: library/stdtypes.rst:4367 msgid "Return the number of items in the dictionary *d*." msgstr "Renvoie le nombre d'éléments dans le dictionnaire *d*." -#: library/stdtypes.rst:4372 +#: library/stdtypes.rst:4371 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." @@ -6177,7 +6179,7 @@ msgstr "" "Donne l'élément de *d* dont la clef est *key*. Lève une exception :exc:" "`KeyError` si *key* n'est pas dans le dictionnaire." -#: library/stdtypes.rst:4377 +#: library/stdtypes.rst:4376 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -6196,7 +6198,7 @@ msgstr "" "meth:`__missing__` doit être une méthode; ça ne peut être une variable " "d'instance ::" -#: library/stdtypes.rst:4395 +#: library/stdtypes.rst:4394 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." @@ -6206,11 +6208,11 @@ msgstr "" "`collections.Counter`. :class:`collections.defaultdict` implémente aussi " "``__missing__``." -#: library/stdtypes.rst:4401 +#: library/stdtypes.rst:4400 msgid "Set ``d[key]`` to *value*." msgstr "Assigne ``d[key]`` à *value*." -#: library/stdtypes.rst:4405 +#: library/stdtypes.rst:4404 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." @@ -6218,15 +6220,15 @@ msgstr "" "Supprime ``d[key]`` de *d*. Lève une exception :exc:`KeyError` si *key* " "n'est pas dans le dictionnaire." -#: library/stdtypes.rst:4410 +#: library/stdtypes.rst:4409 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "Renvoie ``True`` si *d* a la clef *key*, sinon ``False``." -#: library/stdtypes.rst:4414 +#: library/stdtypes.rst:4413 msgid "Equivalent to ``not key in d``." msgstr "Équivalent à ``not key in d``." -#: library/stdtypes.rst:4418 +#: library/stdtypes.rst:4417 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." @@ -6234,22 +6236,22 @@ msgstr "" "Renvoie un itérateur sur les clefs du dictionnaire. C'est un raccourci pour " "``iter(d.keys())``." -#: library/stdtypes.rst:4423 +#: library/stdtypes.rst:4422 msgid "Remove all items from the dictionary." msgstr "Supprime tous les éléments du dictionnaire." -#: library/stdtypes.rst:4427 +#: library/stdtypes.rst:4426 msgid "Return a shallow copy of the dictionary." msgstr "Renvoie une copie de surface du dictionnaire." -#: library/stdtypes.rst:4431 +#: library/stdtypes.rst:4430 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" "Crée un nouveau dictionnaire avec les clefs de *iterable* et les valeurs à " "*value*." -#: library/stdtypes.rst:4433 +#: library/stdtypes.rst:4432 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -6263,7 +6265,7 @@ msgstr "" "*value* soit un objet mutable comme une liste vide. Pour avoir des valeurs " "distinctes, utiliser plutôt une :ref:`compréhension de dictionnaire `." -#: library/stdtypes.rst:4441 +#: library/stdtypes.rst:4440 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " @@ -6273,7 +6275,7 @@ msgstr "" "*default*. Si *default* n'est pas donné, il vaut ``None`` par défaut, de " "manière à ce que cette méthode ne lève jamais :exc:`KeyError`." -#: library/stdtypes.rst:4447 +#: library/stdtypes.rst:4446 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." @@ -6281,7 +6283,7 @@ msgstr "" "Renvoie une nouvelle vue des éléments du dictionnaire (paires de ``(key, " "value)``). Voir la :ref:`documentation des vues `." -#: library/stdtypes.rst:4452 +#: library/stdtypes.rst:4451 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." @@ -6289,7 +6291,7 @@ msgstr "" "Renvoie une nouvelle vue des clefs du dictionnaire. Voir la :ref:" "`documentation des vues `." -#: library/stdtypes.rst:4457 +#: library/stdtypes.rst:4456 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" @@ -6299,7 +6301,7 @@ msgstr "" "renvoyée, sinon renvoie *default*. Si *default* n'est pas donné et que " "*key* n'est pas dans le dictionnaire, une :exc:`KeyError` est levée." -#: library/stdtypes.rst:4463 +#: library/stdtypes.rst:4462 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." @@ -6307,7 +6309,7 @@ msgstr "" "Supprime et renvoie une paire ``(key, value)`` du dictionnaire. Les paires " "sont renvoyées dans un ordre :abbr:`LIFO (dernière entrée, prenière sortie)`." -#: library/stdtypes.rst:4466 +#: library/stdtypes.rst:4465 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" @@ -6317,7 +6319,7 @@ msgstr "" "destructive, comme souvent dans les algorithmes sur les ensembles. Si le " "dictionnaire est vide, appeler :meth:`popitem` lève une :exc:`KeyError`." -#: library/stdtypes.rst:4470 +#: library/stdtypes.rst:4469 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." @@ -6326,7 +6328,7 @@ msgstr "" "les versions précédentes, :meth:`popitem` renvoyait une paire clé/valeur " "arbitraire." -#: library/stdtypes.rst:4476 +#: library/stdtypes.rst:4475 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." @@ -6334,7 +6336,7 @@ msgstr "" "Renvoie un itérateur inversé sur les clés du dictionnaire. C'est un " "raccourci pour ``reversed(d.keys())``." -#: library/stdtypes.rst:4483 +#: library/stdtypes.rst:4482 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." @@ -6343,7 +6345,7 @@ msgstr "" "*key* avec comme valeur *default* et renvoie *default*. *default* vaut " "``None`` par défaut." -#: library/stdtypes.rst:4489 +#: library/stdtypes.rst:4488 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." @@ -6351,7 +6353,7 @@ msgstr "" "Met à jour le dictionnaire avec les paires de clef/valeur d'*other*, " "écrasant les clefs existantes. Renvoie ``None``." -#: library/stdtypes.rst:4492 +#: library/stdtypes.rst:4491 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -6364,7 +6366,7 @@ msgstr "" "ensuite mis à jour avec ces pairs de clef/valeurs : ``d.update(red=1, " "blue=2)``." -#: library/stdtypes.rst:4499 +#: library/stdtypes.rst:4498 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." @@ -6372,7 +6374,7 @@ msgstr "" "Renvoie une nouvelle vue des valeurs du dictionnaire. Voir la :ref:" "`documentation des vues `." -#: library/stdtypes.rst:4502 +#: library/stdtypes.rst:4501 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " @@ -6382,21 +6384,21 @@ msgstr "" "renvoie toujours ``False``. Cela s'applique aussi lorsque l'on compare " "``dict.values()`` à lui-même ::" -#: library/stdtypes.rst:4512 +#: library/stdtypes.rst:4511 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: library/stdtypes.rst:4520 +#: library/stdtypes.rst:4519 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: library/stdtypes.rst:4526 +#: library/stdtypes.rst:4525 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -6406,7 +6408,7 @@ msgstr "" "clé-valeur (``(key, value)``, peu importe leur ordre). Les comparaisons " "d'ordre (``<``, ``<=``, ``>=``, ``>``) lèvent une :exc:`TypeError`." -#: library/stdtypes.rst:4530 +#: library/stdtypes.rst:4529 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" @@ -6415,7 +6417,7 @@ msgstr "" "clé n'affecte pas l'ordre. Les clés ajoutées après un effacement sont " "insérées à la fin. ::" -#: library/stdtypes.rst:4548 +#: library/stdtypes.rst:4547 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." @@ -6424,16 +6426,16 @@ msgstr "" "comportement était un détail d'implémentation de CPython depuis la version " "3.6." -#: library/stdtypes.rst:4552 +#: library/stdtypes.rst:4551 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "Les dictionnaires et les vues de dictionnaires sont réversibles. ::" # suit un ':' ("changed in version X.Y") -#: library/stdtypes.rst:4564 +#: library/stdtypes.rst:4563 msgid "Dictionaries are now reversible." msgstr "les dictionnaires sont maintenant réversibles." -#: library/stdtypes.rst:4569 +#: library/stdtypes.rst:4568 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." @@ -6441,11 +6443,11 @@ msgstr "" ":class:`types.MappingProxyType` peut être utilisé pour créer une vue en " "lecture seule d'un :class:`dict`." -#: library/stdtypes.rst:4576 +#: library/stdtypes.rst:4575 msgid "Dictionary view objects" msgstr "Les vues de dictionnaires" -#: library/stdtypes.rst:4578 +#: library/stdtypes.rst:4577 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -6457,7 +6459,7 @@ msgstr "" "éléments du dictionnaire, ce qui signifie que si le dictionnaire change, la " "vue reflète ces changements." -#: library/stdtypes.rst:4583 +#: library/stdtypes.rst:4582 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" @@ -6465,11 +6467,11 @@ msgstr "" "Les vues de dictionnaires peuvent être itérées et ainsi renvoyer les données " "du dictionnaire, elle gèrent aussi les tests de présence :" -#: library/stdtypes.rst:4588 +#: library/stdtypes.rst:4587 msgid "Return the number of entries in the dictionary." msgstr "Renvoie le nombre d'entrées du dictionnaire." -#: library/stdtypes.rst:4592 +#: library/stdtypes.rst:4591 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." @@ -6477,7 +6479,7 @@ msgstr "" "Renvoie un itérateur sur les clefs, les valeurs, ou les éléments " "(représentés par des paires ``(key, value)`` du dictionnaire." -#: library/stdtypes.rst:4595 +#: library/stdtypes.rst:4594 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -6489,7 +6491,7 @@ msgstr "" "``pairs = zip(d.values(), d.keys())``. Un autre moyen de construire la même " "liste est ``pairs = [(v, k) for (k, v) in d.items()]``." -#: library/stdtypes.rst:4600 +#: library/stdtypes.rst:4599 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." @@ -6498,11 +6500,11 @@ msgstr "" "dictionnaire peut lever une :exc:`RuntimeError` ou ne pas fournir toutes les " "entrées." -#: library/stdtypes.rst:4603 +#: library/stdtypes.rst:4602 msgid "Dictionary order is guaranteed to be insertion order." msgstr "L'ordre d'un dictionnaire est toujours l'ordre des insertions." -#: library/stdtypes.rst:4608 +#: library/stdtypes.rst:4607 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." @@ -6511,7 +6513,7 @@ msgstr "" "dictionnaire sous-jacent (dans le dernier cas, *x* doit être une paire " "``(key, value)``)." -#: library/stdtypes.rst:4613 +#: library/stdtypes.rst:4612 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." @@ -6520,11 +6522,11 @@ msgstr "" "dictionnaire. La vue est itérée dans l'ordre inverse d'insertion." # suit un ':' ("changed in version X.Y") -#: library/stdtypes.rst:4616 +#: library/stdtypes.rst:4615 msgid "Dictionary views are now reversible." msgstr "les vues de dictionnaires sont dorénavant réversibles." -#: library/stdtypes.rst:4620 +#: library/stdtypes.rst:4619 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -6543,15 +6545,15 @@ msgstr "" "abstraite :class:`collections.abc.Set` sont disponibles (comme ``==``, " "``<``, ou ``^``)." -#: library/stdtypes.rst:4627 +#: library/stdtypes.rst:4626 msgid "An example of dictionary view usage::" msgstr "Exemple d'utilisation de vue de dictionnaire ::" -#: library/stdtypes.rst:4662 +#: library/stdtypes.rst:4661 msgid "Context Manager Types" msgstr "Le type gestionnaire de contexte" -#: library/stdtypes.rst:4669 +#: library/stdtypes.rst:4668 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -6564,7 +6566,7 @@ msgstr "" "entré avant l'exécution du corps de l'instruction, et qui est quitté lorsque " "l'instruction se termine :" -#: library/stdtypes.rst:4677 +#: library/stdtypes.rst:4676 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -6576,7 +6578,7 @@ msgstr "" "cette méthode est liée à l'identifiant donné au :keyword:`!as` de " "l'instruction :keyword:`with` utilisant ce gestionnaire de contexte." -#: library/stdtypes.rst:4682 +#: library/stdtypes.rst:4681 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" @@ -6587,7 +6589,7 @@ msgstr "" "autorisent :func:`open` à être utilisé comme contexte à une instruction :" "keyword:`with`." -#: library/stdtypes.rst:4686 +#: library/stdtypes.rst:4685 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -6602,7 +6604,7 @@ msgstr "" "renvoyée. Ça permet de changer le contexte courant dans le corps du :keyword:" "`with` sans affecter le code en dehors de l'instruction :keyword:`!with`." -#: library/stdtypes.rst:4696 +#: library/stdtypes.rst:4695 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -6616,7 +6618,7 @@ msgstr "" "l'exception, sa valeur, et la trace de la pile (*traceback*). Sinon les " "trois arguments valent ``None``." -#: library/stdtypes.rst:4701 +#: library/stdtypes.rst:4700 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -6633,7 +6635,7 @@ msgstr "" "pendant l'exécution de cette méthode remplaceront toute exception qui s'est " "produite dans le corps du :keyword:`!with`." -#: library/stdtypes.rst:4708 +#: library/stdtypes.rst:4707 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -6647,7 +6649,7 @@ msgstr "" "Ceci permet au code de gestion du contexte de comprendre si une méthode :" "meth:`__exit__` a échoué." -#: library/stdtypes.rst:4714 +#: library/stdtypes.rst:4713 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -6662,7 +6664,7 @@ msgstr "" "protocole de gestion du contexte. Voir les exemples dans la documentation du " "module :mod:`contextlib`." -#: library/stdtypes.rst:4720 +#: library/stdtypes.rst:4719 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -6678,7 +6680,7 @@ msgstr "" "`__enter__` et :meth:`__exit__`, plutôt que l'itérateur produit par un " "générateur non décoré." -#: library/stdtypes.rst:4727 +#: library/stdtypes.rst:4726 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -6693,19 +6695,19 @@ msgstr "" "d'exécution, les le coût d'un accès au dictionnaire d'une classe unique est " "négligeable." -#: library/stdtypes.rst:4737 +#: library/stdtypes.rst:4736 #, fuzzy msgid "Generic Alias Type" msgstr "Types générateurs" -#: library/stdtypes.rst:4743 +#: library/stdtypes.rst:4742 msgid "" "``GenericAlias`` objects are created by subscripting a class (usually a " "container), such as ``list[int]``. They are intended primarily for :term:" "`type annotations `." msgstr "" -#: library/stdtypes.rst:4747 +#: library/stdtypes.rst:4746 msgid "" "Usually, the :ref:`subscription ` of container objects calls " "the method :meth:`__getitem__` of the object. However, the subscription of " @@ -6714,35 +6716,35 @@ msgid "" "return a ``GenericAlias`` object." msgstr "" -#: library/stdtypes.rst:4754 +#: library/stdtypes.rst:4753 msgid "" "If the :meth:`__getitem__` of the class' metaclass is present, it will take " "precedence over the :meth:`__class_getitem__` defined in the class (see :pep:" "`560` for more details)." msgstr "" -#: library/stdtypes.rst:4758 +#: library/stdtypes.rst:4757 msgid "" "The ``GenericAlias`` object acts as a proxy for :term:`generic types " "`, implementing *parameterized generics* - a specific instance " "of a generic which provides the types for container elements." msgstr "" -#: library/stdtypes.rst:4762 +#: library/stdtypes.rst:4761 msgid "" "The user-exposed type for the ``GenericAlias`` object can be accessed from :" "class:`types.GenericAlias` and used for :func:`isinstance` checks. It can " "also be used to create ``GenericAlias`` objects directly." msgstr "" -#: library/stdtypes.rst:4768 +#: library/stdtypes.rst:4767 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` containing elements of " "types *X*, *Y*, and more depending on the ``T`` used. For example, a " "function expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: library/stdtypes.rst:4776 +#: library/stdtypes.rst:4775 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -6750,13 +6752,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: library/stdtypes.rst:4784 +#: library/stdtypes.rst:4783 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: library/stdtypes.rst:4792 +#: library/stdtypes.rst:4791 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating an " @@ -6765,25 +6767,25 @@ msgid "" "without errors::" msgstr "" -#: library/stdtypes.rst:4802 +#: library/stdtypes.rst:4801 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: library/stdtypes.rst:4813 +#: library/stdtypes.rst:4812 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: library/stdtypes.rst:4821 +#: library/stdtypes.rst:4820 msgid "" "The :meth:`__getitem__` method of generics will raise an exception to " "disallow mistakes like ``dict[str][str]``::" msgstr "" -#: library/stdtypes.rst:4829 +#: library/stdtypes.rst:4828 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " @@ -6791,208 +6793,208 @@ msgid "" "__args__>`. ::" msgstr "" -#: library/stdtypes.rst:4840 +#: library/stdtypes.rst:4839 msgid "Standard Generic Collections" msgstr "" -#: library/stdtypes.rst:4842 +#: library/stdtypes.rst:4841 msgid "These standard library collections support parameterized generics." msgstr "" -#: library/stdtypes.rst:4844 +#: library/stdtypes.rst:4843 msgid ":class:`tuple`" msgstr "" -#: library/stdtypes.rst:4845 +#: library/stdtypes.rst:4844 msgid ":class:`list`" msgstr "" -#: library/stdtypes.rst:4846 +#: library/stdtypes.rst:4845 msgid ":class:`dict`" msgstr "" -#: library/stdtypes.rst:4847 +#: library/stdtypes.rst:4846 msgid ":class:`set`" msgstr "" -#: library/stdtypes.rst:4848 +#: library/stdtypes.rst:4847 msgid ":class:`frozenset`" msgstr "" -#: library/stdtypes.rst:4849 +#: library/stdtypes.rst:4848 msgid ":class:`type`" msgstr "" -#: library/stdtypes.rst:4850 +#: library/stdtypes.rst:4849 msgid ":class:`collections.deque`" msgstr "" -#: library/stdtypes.rst:4851 +#: library/stdtypes.rst:4850 msgid ":class:`collections.defaultdict`" msgstr "" -#: library/stdtypes.rst:4852 +#: library/stdtypes.rst:4851 msgid ":class:`collections.OrderedDict`" msgstr "" -#: library/stdtypes.rst:4853 +#: library/stdtypes.rst:4852 msgid ":class:`collections.Counter`" msgstr "" -#: library/stdtypes.rst:4854 +#: library/stdtypes.rst:4853 msgid ":class:`collections.ChainMap`" msgstr "" -#: library/stdtypes.rst:4855 +#: library/stdtypes.rst:4854 msgid ":class:`collections.abc.Awaitable`" msgstr "" -#: library/stdtypes.rst:4856 +#: library/stdtypes.rst:4855 msgid ":class:`collections.abc.Coroutine`" msgstr "" -#: library/stdtypes.rst:4857 +#: library/stdtypes.rst:4856 msgid ":class:`collections.abc.AsyncIterable`" msgstr "" -#: library/stdtypes.rst:4858 +#: library/stdtypes.rst:4857 msgid ":class:`collections.abc.AsyncIterator`" msgstr "" -#: library/stdtypes.rst:4859 +#: library/stdtypes.rst:4858 msgid ":class:`collections.abc.AsyncGenerator`" msgstr "" -#: library/stdtypes.rst:4860 +#: library/stdtypes.rst:4859 msgid ":class:`collections.abc.Iterable`" msgstr "" -#: library/stdtypes.rst:4861 +#: library/stdtypes.rst:4860 msgid ":class:`collections.abc.Iterator`" msgstr "" -#: library/stdtypes.rst:4862 +#: library/stdtypes.rst:4861 msgid ":class:`collections.abc.Generator`" msgstr "" -#: library/stdtypes.rst:4863 +#: library/stdtypes.rst:4862 msgid ":class:`collections.abc.Reversible`" msgstr "" -#: library/stdtypes.rst:4864 +#: library/stdtypes.rst:4863 msgid ":class:`collections.abc.Container`" msgstr "" -#: library/stdtypes.rst:4865 +#: library/stdtypes.rst:4864 msgid ":class:`collections.abc.Collection`" msgstr "" -#: library/stdtypes.rst:4866 +#: library/stdtypes.rst:4865 msgid ":class:`collections.abc.Callable`" msgstr "" -#: library/stdtypes.rst:4867 +#: library/stdtypes.rst:4866 msgid ":class:`collections.abc.Set`" msgstr "" -#: library/stdtypes.rst:4868 +#: library/stdtypes.rst:4867 msgid ":class:`collections.abc.MutableSet`" msgstr "" -#: library/stdtypes.rst:4869 +#: library/stdtypes.rst:4868 msgid ":class:`collections.abc.Mapping`" msgstr "" -#: library/stdtypes.rst:4870 +#: library/stdtypes.rst:4869 msgid ":class:`collections.abc.MutableMapping`" msgstr "" -#: library/stdtypes.rst:4871 +#: library/stdtypes.rst:4870 msgid ":class:`collections.abc.Sequence`" msgstr "" -#: library/stdtypes.rst:4872 +#: library/stdtypes.rst:4871 msgid ":class:`collections.abc.MutableSequence`" msgstr "" -#: library/stdtypes.rst:4873 +#: library/stdtypes.rst:4872 msgid ":class:`collections.abc.ByteString`" msgstr "" -#: library/stdtypes.rst:4874 +#: library/stdtypes.rst:4873 msgid ":class:`collections.abc.MappingView`" msgstr "" -#: library/stdtypes.rst:4875 +#: library/stdtypes.rst:4874 msgid ":class:`collections.abc.KeysView`" msgstr "" -#: library/stdtypes.rst:4876 +#: library/stdtypes.rst:4875 msgid ":class:`collections.abc.ItemsView`" msgstr "" -#: library/stdtypes.rst:4877 +#: library/stdtypes.rst:4876 msgid ":class:`collections.abc.ValuesView`" msgstr "" -#: library/stdtypes.rst:4878 +#: library/stdtypes.rst:4877 msgid ":class:`contextlib.AbstractContextManager`" msgstr "" -#: library/stdtypes.rst:4879 +#: library/stdtypes.rst:4878 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr "" -#: library/stdtypes.rst:4880 +#: library/stdtypes.rst:4879 msgid ":ref:`re.Pattern `" msgstr "" -#: library/stdtypes.rst:4881 +#: library/stdtypes.rst:4880 msgid ":ref:`re.Match `" msgstr "" -#: library/stdtypes.rst:4885 +#: library/stdtypes.rst:4884 #, fuzzy msgid "Special Attributes of Generic Alias" msgstr "Attributs spéciaux" -#: library/stdtypes.rst:4887 +#: library/stdtypes.rst:4886 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: library/stdtypes.rst:4891 +#: library/stdtypes.rst:4890 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: library/stdtypes.rst:4899 +#: library/stdtypes.rst:4898 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`__class_getitem__` of the generic container::" msgstr "" -#: library/stdtypes.rst:4909 +#: library/stdtypes.rst:4908 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: library/stdtypes.rst:4921 +#: library/stdtypes.rst:4920 msgid ":pep:`585` -- \"Type Hinting Generics In Standard Collections\"" msgstr "" -#: library/stdtypes.rst:4922 +#: library/stdtypes.rst:4921 msgid ":meth:`__class_getitem__` -- Used to implement parameterized generics." msgstr "" -#: library/stdtypes.rst:4923 +#: library/stdtypes.rst:4922 msgid ":ref:`generics` -- Generics in the :mod:`typing` module." msgstr "" -#: library/stdtypes.rst:4931 +#: library/stdtypes.rst:4930 msgid "Other Built-in Types" msgstr "Autres types natifs" -#: library/stdtypes.rst:4933 +#: library/stdtypes.rst:4932 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." @@ -7000,11 +7002,11 @@ msgstr "" "L'interpréteur gère aussi d'autres types d'objets, la plupart ne supportant " "cependant qu'une ou deux opérations." -#: library/stdtypes.rst:4940 +#: library/stdtypes.rst:4939 msgid "Modules" msgstr "Modules" -#: library/stdtypes.rst:4942 +#: library/stdtypes.rst:4941 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -7022,7 +7024,7 @@ msgstr "" "objet module nommé *foo* existe, il nécessite cependant une *définition* " "(externe) d'un module nommé *foo* quelque part.)" -#: library/stdtypes.rst:4949 +#: library/stdtypes.rst:4948 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -7040,7 +7042,7 @@ msgstr "" "vous ne pouvez pas écrire ``m.__dict__ = {}``). Modifier :attr:`~object." "__dict__` directement n'est pas recommandé." -#: library/stdtypes.rst:4957 +#: library/stdtypes.rst:4956 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````. S'ils sont chargés depuis un fichier, ils sont représentés " "````." -#: library/stdtypes.rst:4965 +#: library/stdtypes.rst:4964 msgid "Classes and Class Instances" msgstr "Les classes et instances de classes" -#: library/stdtypes.rst:4967 +#: library/stdtypes.rst:4966 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "Voir :ref:`objects` et :ref:`class`." -#: library/stdtypes.rst:4973 +#: library/stdtypes.rst:4972 msgid "Functions" msgstr "Fonctions" -#: library/stdtypes.rst:4975 +#: library/stdtypes.rst:4974 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." @@ -7071,7 +7073,7 @@ msgstr "" "opération applicable à un objet fonction est de l'appeler : ``func(argument-" "list)``." -#: library/stdtypes.rst:4978 +#: library/stdtypes.rst:4977 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -7083,15 +7085,15 @@ msgstr "" "opérations (l'appel à la fonction), mais leur implémentation est différente, " "d'où les deux types distincts." -#: library/stdtypes.rst:4982 +#: library/stdtypes.rst:4981 msgid "See :ref:`function` for more information." msgstr "Voir :ref:`function` pour plus d'information." -#: library/stdtypes.rst:4988 +#: library/stdtypes.rst:4987 msgid "Methods" msgstr "Méthodes" -#: library/stdtypes.rst:4992 +#: library/stdtypes.rst:4991 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -7103,7 +7105,7 @@ msgstr "" "listes), et les méthodes d'instances de classes. Les méthodes natives sont " "représentées avec le type qui les supporte." -#: library/stdtypes.rst:4997 +#: library/stdtypes.rst:4996 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -7124,7 +7126,7 @@ msgstr "" "n)`` est tout à fait équivalent à appeler ``m.__func__(m.__self__, arg-1, " "arg-2, …, arg-n)``." -#: library/stdtypes.rst:5006 +#: library/stdtypes.rst:5005 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -7141,15 +7143,15 @@ msgstr "" "`AttributeError`. Pour affecter l'attribut, vous devrez explicitement " "l'affecter à sa fonction sous-jacente ::" -#: library/stdtypes.rst:5057 +#: library/stdtypes.rst:5056 msgid "See :ref:`types` for more information." msgstr "Voir :ref:`types` pour plus d'information." -#: library/stdtypes.rst:5034 +#: library/stdtypes.rst:5033 msgid "Code Objects" msgstr "Objets code" -#: library/stdtypes.rst:5040 +#: library/stdtypes.rst:5039 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -7165,13 +7167,13 @@ msgstr "" "fonction native :func:`compile` et peuvent être obtenus des objets fonction " "via leur attribut :attr:`__code__`. Voir aussi le module :mod:`code`." -#: library/stdtypes.rst:5047 +#: library/stdtypes.rst:5046 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: library/stdtypes.rst:5054 +#: library/stdtypes.rst:5053 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." @@ -7180,11 +7182,11 @@ msgstr "" "d'une chaîne contenant du code) aux fonction natives :func:`exec` ou :func:" "`eval`." -#: library/stdtypes.rst:5063 +#: library/stdtypes.rst:5062 msgid "Type Objects" msgstr "Objets type" -#: library/stdtypes.rst:5069 +#: library/stdtypes.rst:5068 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -7196,15 +7198,15 @@ msgstr "" "opération spéciale sur les types. Le module standard :mod:`types` définit " "les noms de tous les types natifs." -#: library/stdtypes.rst:5074 +#: library/stdtypes.rst:5073 msgid "Types are written like this: ````." msgstr "Les types sont représentés : ````." -#: library/stdtypes.rst:5080 +#: library/stdtypes.rst:5079 msgid "The Null Object" msgstr "L'objet Null" -#: library/stdtypes.rst:5082 +#: library/stdtypes.rst:5081 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " @@ -7214,15 +7216,15 @@ msgstr "" "valeur. Il ne supporte aucune opération spéciale. Il existe exactement un " "objet *null* nommé ``None`` (c'est un nom natif). ``type(None)()``." -#: library/stdtypes.rst:5086 +#: library/stdtypes.rst:5085 msgid "It is written as ``None``." msgstr "C'est écrit ``None``." -#: library/stdtypes.rst:5093 +#: library/stdtypes.rst:5092 msgid "The Ellipsis Object" msgstr "L'objet points de suspension" -#: library/stdtypes.rst:5095 +#: library/stdtypes.rst:5094 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -7234,15 +7236,15 @@ msgstr "" "objet *ellipsis*, nommé :const:`Ellipsis` (un nom natif). ``type(Ellipsis)" "()`` produit le *singleton* :const:`Ellipsis`." -#: library/stdtypes.rst:5100 +#: library/stdtypes.rst:5099 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "C'est écrit ``Ellipsis`` ou ``...``." -#: library/stdtypes.rst:5106 +#: library/stdtypes.rst:5105 msgid "The NotImplemented Object" msgstr "L'objet *NotImplemented*" -#: library/stdtypes.rst:5108 +#: library/stdtypes.rst:5107 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -7254,15 +7256,15 @@ msgstr "" "pour plus d'informations. Il n'y a qu'un seul objet ``NotImplemented``. " "``type(NotImplemented)()`` renvoie un *singleton*." -#: library/stdtypes.rst:5113 +#: library/stdtypes.rst:5112 msgid "It is written as ``NotImplemented``." msgstr "C'est écrit ``NotImplemented``." -#: library/stdtypes.rst:5119 +#: library/stdtypes.rst:5118 msgid "Boolean Values" msgstr "Valeurs booléennes" -#: library/stdtypes.rst:5121 +#: library/stdtypes.rst:5120 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -7281,15 +7283,15 @@ msgstr "" "valeur en booléen tant que la valeur peut être interprétée en une valeur de " "vérité (voir :ref:`truth` au dessus)." -#: library/stdtypes.rst:5134 +#: library/stdtypes.rst:5133 msgid "They are written as ``False`` and ``True``, respectively." msgstr "Ils s'écrivent ``False`` et ``True``, respectivement." -#: library/stdtypes.rst:5140 +#: library/stdtypes.rst:5139 msgid "Internal Objects" msgstr "Objets internes" -#: library/stdtypes.rst:5142 +#: library/stdtypes.rst:5141 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." @@ -7297,11 +7299,11 @@ msgstr "" "Voir :ref:`types`. Ils décrivent les objets *stack frame*, *traceback*, et " "*slice*." -#: library/stdtypes.rst:5149 +#: library/stdtypes.rst:5148 msgid "Special Attributes" msgstr "Attributs spéciaux" -#: library/stdtypes.rst:5151 +#: library/stdtypes.rst:5150 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" @@ -7311,7 +7313,7 @@ msgstr "" "certains types, lorsque ça a du sens. Certains ne sont *pas* listés par la " "fonction native :func:`dir`." -#: library/stdtypes.rst:5158 +#: library/stdtypes.rst:5157 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." @@ -7319,20 +7321,20 @@ msgstr "" "Un dictionnaire ou un autre *mapping object* utilisé pour stocker les " "attributs (modifiables) de l'objet." -#: library/stdtypes.rst:5164 +#: library/stdtypes.rst:5163 msgid "The class to which a class instance belongs." msgstr "La classe de l'instance de classe." -#: library/stdtypes.rst:5169 +#: library/stdtypes.rst:5168 msgid "The tuple of base classes of a class object." msgstr "Le *n*-uplet des classes parentes d'un objet classe." -#: library/stdtypes.rst:5174 +#: library/stdtypes.rst:5173 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "Le nom de la classe, fonction, méthode, descripteur, ou générateur." -#: library/stdtypes.rst:5180 +#: library/stdtypes.rst:5179 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." @@ -7340,7 +7342,7 @@ msgstr "" "Le :term:`qualified name` de la classe, fonction, méthode, descripteur, ou " "générateur." -#: library/stdtypes.rst:5188 +#: library/stdtypes.rst:5187 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." @@ -7348,7 +7350,7 @@ msgstr "" "Cet attribut est un *n*-uplet contenant les classes parents prises en compte " "lors de la résolution de méthode." -#: library/stdtypes.rst:5194 +#: library/stdtypes.rst:5193 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " @@ -7359,7 +7361,7 @@ msgstr "" "la l'initialisation de la classe, et son résultat est stocké dans " "l'attribut :attr:`~class.__mro__`." -#: library/stdtypes.rst:5201 +#: library/stdtypes.rst:5200 #, fuzzy msgid "" "Each class keeps a list of weak references to its immediate subclasses. " @@ -7370,11 +7372,11 @@ msgstr "" "immédiates. Cette méthode renvoie la liste de toutes ces références encore " "valables. Exemple ::" -#: library/stdtypes.rst:5210 +#: library/stdtypes.rst:5209 msgid "Footnotes" msgstr "Notes" -#: library/stdtypes.rst:5211 +#: library/stdtypes.rst:5210 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." @@ -7382,7 +7384,7 @@ msgstr "" "Plus d'informations sur ces méthodes spéciales peuvent être trouvées dans le " "*Python Reference Manual* (:ref:`customization`)." -#: library/stdtypes.rst:5214 +#: library/stdtypes.rst:5213 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." @@ -7390,13 +7392,13 @@ msgstr "" "Par conséquent, la liste ``[1, 2]`` est considérée égale à ``[1.0, 2.0]``. " "Idem avec des *n*-uplets." -#: library/stdtypes.rst:5217 +#: library/stdtypes.rst:5216 msgid "They must have since the parser can't tell the type of the operands." msgstr "" "Nécessairement, puisque l'analyseur ne peut pas discerner le type des " "opérandes." -#: library/stdtypes.rst:5219 +#: library/stdtypes.rst:5218 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " @@ -7406,7 +7408,7 @@ msgstr "" "category* est soit \"Lu\" (pour *Letter*, *uppercase*), soit \"Ll\" (pour " "*Letter*, *lowercase*), soit \"Lt\" (pour *Letter*, *titlecase*)." -#: library/stdtypes.rst:5222 +#: library/stdtypes.rst:5221 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/library/timeit.po b/library/timeit.po index 488ef7af..ed2c0806 100644 --- a/library/timeit.po +++ b/library/timeit.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-03-20 18:04+0100\n" "Last-Translator: Loc Cosnier \n" "Language-Team: French \n" @@ -25,12 +25,13 @@ msgid "**Source code:** :source:`Lib/timeit.py`" msgstr "**Code source :** :source:`Lib/timeit.py`" #: library/timeit.rst:15 +#, fuzzy msgid "" "This module provides a simple way to time small bits of Python code. It has " "both a :ref:`timeit-command-line-interface` as well as a :ref:`callable " "` one. It avoids a number of common traps for measuring " "execution times. See also Tim Peters' introduction to the \"Algorithms\" " -"chapter in the *Python Cookbook*, published by O'Reilly." +"chapter in the second edition of *Python Cookbook*, published by O'Reilly." msgstr "" "Ce module fournit une façon simple de mesurer le temps d'exécution de " "fragments de code Python. Il expose une :ref:`timeit-command-line-interface` " diff --git a/library/types.po b/library/types.po index d79bff6b..c85c197c 100644 --- a/library/types.po +++ b/library/types.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2018-09-28 10:04+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -327,7 +327,7 @@ msgstr "" #: library/types.rst:267 msgid "" -"A record of the the module's import-system-related state. Expected to be an " +"A record of the module's import-system-related state. Expected to be an " "instance of :class:`importlib.machinery.ModuleSpec`." msgstr "" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 2f2f6e24..1ed0b356 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2019-04-22 12:07+0200\n" "Last-Translator: Bousquié Pierre \n" "Language-Team: FRENCH \n" @@ -446,8 +446,9 @@ msgstr "" "d'une manière particulière ::" #: library/unittest.mock.rst:330 +#, fuzzy msgid "" -"Assert that the mock was called exactly once and that that call was with the " +"Assert that the mock was called exactly once and that call was with the " "specified arguments." msgstr "" "Asserter que le simulacre a été appelé exactement une fois et que cet appel " diff --git a/reference/expressions.po b/reference/expressions.po index 61f0ba6a..18c0a0d0 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2021-04-10 16:57+0200\n" "Last-Translator: Samuel Giffard \n" "Language-Team: FRENCH \n" @@ -128,7 +128,7 @@ msgstr "" "Quand le nom n'est pas lié, toute tentative de l'évaluer lève une exception :" "exc:`NameError`." -#: reference/expressions.rst:84 +#: reference/expressions.rst:86 msgid "" "**Private name mangling:** When an identifier that textually occurs in a " "class definition begins with two or more underscore characters and does not " @@ -158,17 +158,17 @@ msgstr "" "tronquer. Si le nom de la classe est constitué uniquement de traits de " "soulignement, aucune transformation n'est effectuée." -#: reference/expressions.rst:100 +#: reference/expressions.rst:102 msgid "Literals" msgstr "Littéraux" -#: reference/expressions.rst:104 +#: reference/expressions.rst:106 msgid "Python supports string and bytes literals and various numeric literals:" msgstr "" "Python gère les littéraux de chaînes de caractères, de chaînes d'octets et " "de plusieurs autres types numériques :" -#: reference/expressions.rst:110 +#: reference/expressions.rst:112 msgid "" "Evaluation of a literal yields an object of the given type (string, bytes, " "integer, floating point number, complex number) with the given value. The " @@ -181,7 +181,7 @@ msgstr "" "des nombres à virgule flottante et des nombres imaginaires (complexes). " "Reportez-vous à la section :ref:`literals` pour les détails." -#: reference/expressions.rst:119 +#: reference/expressions.rst:121 msgid "" "All literals correspond to immutable data types, and hence the object's " "identity is less important than its value. Multiple evaluations of literals " @@ -195,18 +195,18 @@ msgstr "" "soit une autre occurrence) résultent dans le même objet ou un objet " "différent avec la même valeur." -#: reference/expressions.rst:129 +#: reference/expressions.rst:131 msgid "Parenthesized forms" msgstr "Formes parenthésées" -#: reference/expressions.rst:135 +#: reference/expressions.rst:137 msgid "" "A parenthesized form is an optional expression list enclosed in parentheses:" msgstr "" "Une forme parenthésée est une liste d'expressions (cette liste est en fait " "optionnelle) placée à l'intérieur de parenthèses :" -#: reference/expressions.rst:140 +#: reference/expressions.rst:142 msgid "" "A parenthesized expression list yields whatever that expression list yields: " "if the list contains at least one comma, it yields a tuple; otherwise, it " @@ -217,7 +217,7 @@ msgstr "" "produit un *n*-uplet (type *n*-uplet) ; sinon, elle produit l'expression " "elle-même (qui constitue donc elle-même la liste d'expressions)." -#: reference/expressions.rst:146 +#: reference/expressions.rst:148 msgid "" "An empty pair of parentheses yields an empty tuple object. Since tuples are " "immutable, the same rules as for literals apply (i.e., two occurrences of " @@ -228,7 +228,7 @@ msgstr "" "(c'est-à-dire que deux occurrences du *n*-uplet vide peuvent, ou pas, " "produire le même objet)." -#: reference/expressions.rst:154 +#: reference/expressions.rst:156 msgid "" "Note that tuples are not formed by the parentheses, but rather by use of the " "comma operator. The exception is the empty tuple, for which parentheses " @@ -241,11 +241,11 @@ msgstr "" "parenthésé dans les expressions aurait généré des ambigüités et aurait " "permis à certaines coquilles de passer inaperçu)." -#: reference/expressions.rst:163 +#: reference/expressions.rst:165 msgid "Displays for lists, sets and dictionaries" msgstr "Agencements des listes, ensembles et dictionnaires" -#: reference/expressions.rst:167 +#: reference/expressions.rst:169 msgid "" "For constructing a list, a set or a dictionary Python provides special " "syntax called \"displays\", each of them in two flavors:" @@ -254,11 +254,11 @@ msgstr "" "des syntaxes spéciales dites « agencements » (*displays* en anglais), chaque " "agencement comportant deux variantes :" -#: reference/expressions.rst:170 +#: reference/expressions.rst:172 msgid "either the container contents are listed explicitly, or" msgstr "soit le contenu du conteneur est listé explicitement," -#: reference/expressions.rst:172 +#: reference/expressions.rst:174 msgid "" "they are computed via a set of looping and filtering instructions, called a :" "dfn:`comprehension`." @@ -267,13 +267,13 @@ msgstr "" "d'instructions de filtrage, appelée une :dfn:`compréhension` (dans le sens " "de ce qui sert à définir un concept, par opposition à *extension*)." -#: reference/expressions.rst:180 +#: reference/expressions.rst:182 msgid "Common syntax elements for comprehensions are:" msgstr "" "Les compréhensions sont constituées des éléments de syntaxe communs " "suivants :" -#: reference/expressions.rst:188 +#: reference/expressions.rst:190 msgid "" "The comprehension consists of a single expression followed by at least one :" "keyword:`!for` clause and zero or more :keyword:`!for` or :keyword:`!if` " @@ -290,7 +290,7 @@ msgstr "" "droite, et évalué l'expression pour produire un élément à chaque fois que le " "bloc le plus imbriqué était atteint." -#: reference/expressions.rst:195 +#: reference/expressions.rst:197 msgid "" "However, aside from the iterable expression in the leftmost :keyword:`!for` " "clause, the comprehension is executed in a separate implicitly nested scope. " @@ -302,7 +302,7 @@ msgstr "" "implicitement imbriquée. Ceci assure que les noms assignés dans la liste " "cible ne « fuient » pas en dehors de cette portée." -#: reference/expressions.rst:199 +#: reference/expressions.rst:201 msgid "" "The iterable expression in the leftmost :keyword:`!for` clause is evaluated " "directly in the enclosing scope and then passed as an argument to the " @@ -319,7 +319,7 @@ msgstr "" "peuvent dépendre de valeurs obtenues à partir de l'itérable le plus à " "gauche. Par exemple : ``[x*y for x in range(10) for y in range(x, x+10)]``." -#: reference/expressions.rst:206 +#: reference/expressions.rst:208 msgid "" "To ensure the comprehension always results in a container of the appropriate " "type, ``yield`` and ``yield from`` expressions are prohibited in the " @@ -329,7 +329,7 @@ msgstr "" "approprié, les expressions ``yield`` et ``yield from`` sont interdites dans " "la portée implicite imbriquée." -#: reference/expressions.rst:213 +#: reference/expressions.rst:215 msgid "" "Since Python 3.6, in an :keyword:`async def` function, an :keyword:`!async " "for` clause may be used to iterate over a :term:`asynchronous iterator`. A " @@ -354,21 +354,21 @@ msgstr "" "l'exécution de la fonction coroutine dans laquelle elle apparaît. Voir aussi " "la :pep:`530`." -#: reference/expressions.rst:225 +#: reference/expressions.rst:227 msgid "Asynchronous comprehensions were introduced." msgstr "Les compréhensions asynchrones ont été introduites." -#: reference/expressions.rst:401 +#: reference/expressions.rst:403 msgid "``yield`` and ``yield from`` prohibited in the implicitly nested scope." msgstr "" "``yield`` et ``yield from`` sont interdites dans la portée implicite " "imbriquée." -#: reference/expressions.rst:235 +#: reference/expressions.rst:237 msgid "List displays" msgstr "Agencements de listes" -#: reference/expressions.rst:245 +#: reference/expressions.rst:247 msgid "" "A list display is a possibly empty series of expressions enclosed in square " "brackets:" @@ -376,7 +376,7 @@ msgstr "" "Un agencement de liste est une suite (possiblement vide) d'expressions à " "l'intérieur de crochets :" -#: reference/expressions.rst:251 +#: reference/expressions.rst:253 msgid "" "A list display yields a new list object, the contents being specified by " "either a list of expressions or a comprehension. When a comma-separated " @@ -393,11 +393,11 @@ msgstr "" "fournie, la liste est construite à partir des éléments produits par la " "compréhension." -#: reference/expressions.rst:261 +#: reference/expressions.rst:263 msgid "Set displays" msgstr "Agencements d'ensembles" -#: reference/expressions.rst:270 +#: reference/expressions.rst:272 msgid "" "A set display is denoted by curly braces and distinguishable from dictionary " "displays by the lack of colons separating keys and values:" @@ -406,7 +406,7 @@ msgstr "" "distingue de l'agencement d'un dictionnaire par le fait qu'il n'y a pas de " "« deux points » ``:`` pour séparer les clés et les valeurs :" -#: reference/expressions.rst:276 +#: reference/expressions.rst:278 msgid "" "A set display yields a new mutable set object, the contents being specified " "by either a sequence of expressions or a comprehension. When a comma-" @@ -422,7 +422,7 @@ msgstr "" "et ajoutés à l'objet ensemble. Quand une compréhension est fournie, " "l'ensemble est construit à partir des éléments produits par la compréhension." -#: reference/expressions.rst:282 +#: reference/expressions.rst:284 msgid "" "An empty set cannot be constructed with ``{}``; this literal constructs an " "empty dictionary." @@ -430,11 +430,11 @@ msgstr "" "Un ensemble vide ne peut pas être construit par ``{}`` ; cette écriture " "construit un dictionnaire vide." -#: reference/expressions.rst:289 +#: reference/expressions.rst:291 msgid "Dictionary displays" msgstr "Agencements de dictionnaires" -#: reference/expressions.rst:300 +#: reference/expressions.rst:302 msgid "" "A dictionary display is a possibly empty series of key/datum pairs enclosed " "in curly braces:" @@ -442,11 +442,11 @@ msgstr "" "Un agencement de dictionnaire est une série (possiblement vide) de couples " "clés-valeurs entourée par des accolades :" -#: reference/expressions.rst:309 +#: reference/expressions.rst:311 msgid "A dictionary display yields a new dictionary object." msgstr "Un agencement de dictionnaire produit un nouvel objet dictionnaire." -#: reference/expressions.rst:311 +#: reference/expressions.rst:313 msgid "" "If a comma-separated sequence of key/datum pairs is given, they are " "evaluated from left to right to define the entries of the dictionary: each " @@ -463,7 +463,7 @@ msgstr "" "plusieurs fois dans la liste des couples clés-valeurs et, dans ce cas, la " "valeur finalement stockée dans le dictionnaire est la dernière donnée." -#: reference/expressions.rst:321 +#: reference/expressions.rst:323 msgid "" "A double asterisk ``**`` denotes :dfn:`dictionary unpacking`. Its operand " "must be a :term:`mapping`. Each mapping item is added to the new " @@ -477,13 +477,13 @@ msgstr "" "couples clés-valeurs antérieurs ou par d'autres dépaquetages de " "dictionnaires antérieurs." -#: reference/expressions.rst:326 +#: reference/expressions.rst:328 msgid "Unpacking into dictionary displays, originally proposed by :pep:`448`." msgstr "" "le dépaquetage peut se faire vers un agencement de dictionnaire, proposé à " "l'origine par la :pep:`448`." -#: reference/expressions.rst:329 +#: reference/expressions.rst:331 msgid "" "A dict comprehension, in contrast to list and set comprehensions, needs two " "expressions separated with a colon followed by the usual \"for\" and \"if\" " @@ -496,7 +496,7 @@ msgstr "" "est exécutée, les éléments clés-valeurs sont insérés dans le nouveau " "dictionnaire dans l'ordre dans lequel ils sont produits." -#: reference/expressions.rst:337 +#: reference/expressions.rst:339 msgid "" "Restrictions on the types of the key values are listed earlier in section :" "ref:`types`. (To summarize, the key type should be :term:`hashable`, which " @@ -511,7 +511,7 @@ msgstr "" "apparaît le plus à droite dans l'agencement) stockée prévaut pour une clé " "donnée." -#: reference/expressions.rst:343 +#: reference/expressions.rst:345 msgid "" "Prior to Python 3.8, in dict comprehensions, the evaluation order of key and " "value was not well-defined. In CPython, the value was evaluated before the " @@ -523,17 +523,17 @@ msgstr "" "CPython, la valeur était évaluée avant la clé. À partir de la version 3.8, " "la clé est évaluée avant la valeur, comme proposé par la :pep:`572`." -#: reference/expressions.rst:353 +#: reference/expressions.rst:355 msgid "Generator expressions" msgstr "Expressions génératrices" -#: reference/expressions.rst:360 +#: reference/expressions.rst:362 msgid "A generator expression is a compact generator notation in parentheses:" msgstr "" "Une expression génératrice est une notation concise pour un générateur, " "entourée de parenthèses :" -#: reference/expressions.rst:365 +#: reference/expressions.rst:367 msgid "" "A generator expression yields a new generator object. Its syntax is the " "same as for comprehensions, except that it is enclosed in parentheses " @@ -543,7 +543,7 @@ msgstr "" "est la même que celle des compréhensions, sauf qu'elle est entourée de " "parenthèses au lieu de crochets ou d'accolades." -#: reference/expressions.rst:369 +#: reference/expressions.rst:371 msgid "" "Variables used in the generator expression are evaluated lazily when the :" "meth:`~generator.__next__` method is called for the generator object (in the " @@ -568,7 +568,7 @@ msgstr "" "valeurs obtenues à partir de boucles :keyword:`!for` plus à gauche. Par " "exemple, ``(x*y for x in range(10) for y in range(x, x+10))``." -#: reference/expressions.rst:380 +#: reference/expressions.rst:382 msgid "" "The parentheses can be omitted on calls with only one argument. See " "section :ref:`calls` for details." @@ -576,7 +576,7 @@ msgstr "" "Les parenthèses peuvent être omises pour les appels qui ne possèdent qu'un " "seul argument. Voir la section :ref:`calls` pour les détails." -#: reference/expressions.rst:383 +#: reference/expressions.rst:385 msgid "" "To avoid interfering with the expected operation of the generator expression " "itself, ``yield`` and ``yield from`` expressions are prohibited in the " @@ -586,7 +586,7 @@ msgstr "" "génératrice elle-même, les expressions ``yield`` et ``yield from`` sont " "interdites dans les générateurs définis de manière implicite." -#: reference/expressions.rst:387 +#: reference/expressions.rst:389 msgid "" "If a generator expression contains either :keyword:`!async for` clauses or :" "keyword:`await` expressions it is called an :dfn:`asynchronous generator " @@ -600,11 +600,11 @@ msgstr "" "génératrice asynchrone produit un nouvel objet générateur asynchrone qui est " "un itérateur asynchrone (voir :ref:`async-iterators`)." -#: reference/expressions.rst:393 +#: reference/expressions.rst:395 msgid "Asynchronous generator expressions were introduced." msgstr "les expressions génératrices asynchrones ont été introduites." -#: reference/expressions.rst:396 +#: reference/expressions.rst:398 msgid "" "Prior to Python 3.7, asynchronous generator expressions could only appear " "in :keyword:`async def` coroutines. Starting with 3.7, any function can use " @@ -615,11 +615,11 @@ msgstr "" "version 3.7, toute fonction peut utiliser des expressions génératrices " "asynchrones." -#: reference/expressions.rst:408 +#: reference/expressions.rst:410 msgid "Yield expressions" msgstr "Expressions ``yield``" -#: reference/expressions.rst:420 +#: reference/expressions.rst:422 msgid "" "The yield expression is used when defining a :term:`generator` function or " "an :term:`asynchronous generator` function and thus can only be used in the " @@ -636,7 +636,7 @@ msgstr "" "utilisation dans le corps d'une fonction :keyword:`async def` entraine que " "cette fonction coroutine devient un générateur asynchrone. Par exemple ::" -#: reference/expressions.rst:433 +#: reference/expressions.rst:435 msgid "" "Due to their side effects on the containing scope, ``yield`` expressions are " "not permitted as part of the implicitly defined scopes used to implement " @@ -646,7 +646,7 @@ msgstr "" "``yield`` ne sont pas autorisées dans la portée implicite utilisée dans " "l'implémentation des compréhensions et des expressions génératrices." -#: reference/expressions.rst:437 +#: reference/expressions.rst:439 msgid "" "Yield expressions prohibited in the implicitly nested scopes used to " "implement comprehensions and generator expressions." @@ -655,7 +655,7 @@ msgstr "" "utilisée dans l'implémentation des compréhensions et des expressions " "génératrices." -#: reference/expressions.rst:441 +#: reference/expressions.rst:443 msgid "" "Generator functions are described below, while asynchronous generator " "functions are described separately in section :ref:`asynchronous-generator-" @@ -665,7 +665,7 @@ msgstr "" "générateurs asynchrones sont décrites séparément dans la section :ref:" "`asynchronous-generator-functions`." -#: reference/expressions.rst:445 +#: reference/expressions.rst:447 msgid "" "When a generator function is called, it returns an iterator known as a " "generator. That generator then controls the execution of the generator " @@ -702,7 +702,7 @@ msgstr "" "`~generator.send` qui a été utilisée, alors le résultat est la valeur " "transmise à cette méthode." -#: reference/expressions.rst:464 +#: reference/expressions.rst:466 msgid "" "All of this makes generator functions quite similar to coroutines; they " "yield multiple times, they have more than one entry point and their " @@ -717,7 +717,7 @@ msgstr "" "contrôler où l'exécution doit se poursuivre après une instruction " "``yield`` ; ce contrôle est toujours du ressort de l'appelant au générateur." -#: reference/expressions.rst:470 +#: reference/expressions.rst:472 msgid "" "Yield expressions are allowed anywhere in a :keyword:`try` construct. If " "the generator is not resumed before it is finalized (by reaching a zero " @@ -732,7 +732,7 @@ msgstr "" "close` du générateur-itérateur est appelée, ce qui permet l'exécution de " "toutes les clauses :keyword:`finally` en attente." -#: reference/expressions.rst:479 +#: reference/expressions.rst:481 msgid "" "When ``yield from `` is used, the supplied expression must be an " "iterable. The values produced by iterating that iterable are passed directly " @@ -752,7 +752,7 @@ msgstr "" "`AttributeError` ou une :exc:`TypeError`, alors que :meth:`~generator.throw` " "ne fait que propager l'exception immédiatement." -#: reference/expressions.rst:488 +#: reference/expressions.rst:490 msgid "" "When the underlying iterator is complete, the :attr:`~StopIteration.value` " "attribute of the raised :exc:`StopIteration` instance becomes the value of " @@ -766,13 +766,13 @@ msgstr "" "quand vous levez :exc:`StopIteration` ou automatiquement que le sous-" "itérateur est un générateur (en renvoyant une valeur par le sous-générateur)." -#: reference/expressions.rst:494 +#: reference/expressions.rst:496 msgid "Added ``yield from `` to delegate control flow to a subiterator." msgstr "" "``yield from `` a été ajoutée pour déléguer le contrôle du flot " "d'exécution à un sous-itérateur." -#: reference/expressions.rst:497 +#: reference/expressions.rst:499 msgid "" "The parentheses may be omitted when the yield expression is the sole " "expression on the right hand side of an assignment statement." @@ -780,11 +780,11 @@ msgstr "" "Les parenthèses peuvent être omises quand l'expression ``yield`` est la " "seule expression à droite de l'instruction de l'instruction d'assignation." -#: reference/expressions.rst:503 +#: reference/expressions.rst:505 msgid ":pep:`255` - Simple Generators" msgstr ":pep:`255` : générateurs simples" -#: reference/expressions.rst:503 +#: reference/expressions.rst:505 msgid "" "The proposal for adding generators and the :keyword:`yield` statement to " "Python." @@ -792,11 +792,11 @@ msgstr "" "La proposition d'ajouter à Python des générateurs et l'instruction :keyword:" "`yield`." -#: reference/expressions.rst:507 +#: reference/expressions.rst:509 msgid ":pep:`342` - Coroutines via Enhanced Generators" msgstr ":pep:`342` -- Coroutines *via* des générateurs améliorés" -#: reference/expressions.rst:506 +#: reference/expressions.rst:508 msgid "" "The proposal to enhance the API and syntax of generators, making them usable " "as simple coroutines." @@ -804,11 +804,11 @@ msgstr "" "Proposition d'améliorer l'API et la syntaxe des générateurs, de manière à " "pouvoir les utiliser comme de simples coroutines." -#: reference/expressions.rst:511 +#: reference/expressions.rst:513 msgid ":pep:`380` - Syntax for Delegating to a Subgenerator" msgstr ":pep:`380` -- Syntaxe pour déléguer à un sous-générateur" -#: reference/expressions.rst:510 +#: reference/expressions.rst:512 msgid "" "The proposal to introduce the :token:`yield_from` syntax, making delegation " "to subgenerators easy." @@ -816,11 +816,11 @@ msgstr "" "Proposition d'introduire la syntaxe :token:`yield_from`, de manière à " "déléguer facilement l'exécution à un sous-générateur." -#: reference/expressions.rst:514 +#: reference/expressions.rst:516 msgid ":pep:`525` - Asynchronous Generators" msgstr ":pep:`525` : Générateurs asynchrones" -#: reference/expressions.rst:514 +#: reference/expressions.rst:516 msgid "" "The proposal that expanded on :pep:`492` by adding generator capabilities to " "coroutine functions." @@ -828,11 +828,11 @@ msgstr "" "La proposition qui a amélioré la :pep:`492` en ajoutant des capacités de " "générateur pour les coroutines." -#: reference/expressions.rst:521 +#: reference/expressions.rst:523 msgid "Generator-iterator methods" msgstr "Méthodes des générateurs-itérateurs" -#: reference/expressions.rst:523 +#: reference/expressions.rst:525 msgid "" "This subsection describes the methods of a generator iterator. They can be " "used to control the execution of a generator function." @@ -840,7 +840,7 @@ msgstr "" "Cette sous-section décrit les méthodes des générateurs-itérateurs. Elles " "peuvent être utilisées pour contrôler l'exécution des fonctions générateurs." -#: reference/expressions.rst:526 +#: reference/expressions.rst:528 msgid "" "Note that calling any of the generator methods below when the generator is " "already executing raises a :exc:`ValueError` exception." @@ -849,7 +849,7 @@ msgstr "" "générateur est déjà en cours d'exécution lève une exception :exc:" "`ValueError`." -#: reference/expressions.rst:534 +#: reference/expressions.rst:536 msgid "" "Starts the execution of a generator function or resumes it at the last " "executed yield expression. When a generator function is resumed with a :" @@ -869,7 +869,7 @@ msgstr "" "`__next__` de l'appelant. Si le générateur termine sans donner une autre " "valeur, une exception :exc:`StopIteration` est levée." -#: reference/expressions.rst:543 +#: reference/expressions.rst:545 msgid "" "This method is normally called implicitly, e.g. by a :keyword:`for` loop, or " "by the built-in :func:`next` function." @@ -877,7 +877,7 @@ msgstr "" "Cette méthode est normalement appelée implicitement, par exemple par une " "boucle :keyword:`for` ou par la fonction native :func:`next`." -#: reference/expressions.rst:549 +#: reference/expressions.rst:551 msgid "" "Resumes the execution and \"sends\" a value into the generator function. " "The *value* argument becomes the result of the current yield expression. " @@ -895,7 +895,7 @@ msgstr "" "le générateur, elle doit avoir :const:`None` comme argument, car il n'y a " "aucune expression ``yield`` qui peut recevoir la valeur." -#: reference/expressions.rst:560 +#: reference/expressions.rst:562 msgid "" "Raises an exception of type ``type`` at the point where the generator was " "paused, and returns the next value yielded by the generator function. If " @@ -911,7 +911,7 @@ msgstr "" "l'exception passée ou lève une autre exception, alors cette exception est " "propagée vers l'appelant." -#: reference/expressions.rst:571 +#: reference/expressions.rst:573 msgid "" "Raises a :exc:`GeneratorExit` at the point where the generator function was " "paused. If the generator function then exits gracefully, is already closed, " @@ -929,11 +929,11 @@ msgstr "" "est propagée à l'appelant. La méthode :meth:`close` ne fait rien si le " "générateur a déjà terminé en raison d'une exception ou d'une fin normale." -#: reference/expressions.rst:582 +#: reference/expressions.rst:584 msgid "Examples" msgstr "Exemples" -#: reference/expressions.rst:584 +#: reference/expressions.rst:586 msgid "" "Here is a simple example that demonstrates the behavior of generators and " "generator functions::" @@ -941,7 +941,7 @@ msgstr "" "Voici un exemple simple qui montre le comportement des générateurs et des " "fonctions génératrices ::" -#: reference/expressions.rst:611 +#: reference/expressions.rst:613 msgid "" "For examples using ``yield from``, see :ref:`pep-380` in \"What's New in " "Python.\"" @@ -949,11 +949,11 @@ msgstr "" "Pour des exemples d'utilisation de ``yield from``, lisez la :ref:`pep-380` " "dans « Les nouveautés de Python »." -#: reference/expressions.rst:617 +#: reference/expressions.rst:619 msgid "Asynchronous generator functions" msgstr "Fonctions génératrices asynchrones" -#: reference/expressions.rst:619 +#: reference/expressions.rst:621 msgid "" "The presence of a yield expression in a function or method defined using :" "keyword:`async def` further defines the function as an :term:`asynchronous " @@ -963,7 +963,7 @@ msgstr "" "définie en utilisant :keyword:`async def` transforme cette fonction en " "fonction :term:`générateur asynchrone `." -#: reference/expressions.rst:623 +#: reference/expressions.rst:625 msgid "" "When an asynchronous generator function is called, it returns an " "asynchronous iterator known as an asynchronous generator object. That object " @@ -979,7 +979,7 @@ msgstr "" "à l'intérieur d'une fonction coroutine de la même manière qu'un objet " "générateur serait utilisé dans une instruction :keyword:`for`." -#: reference/expressions.rst:630 +#: reference/expressions.rst:632 msgid "" "Calling one of the asynchronous generator's methods returns an :term:" "`awaitable` object, and the execution starts when this object is awaited on. " @@ -1013,7 +1013,7 @@ msgstr "" "alors le résultat est :const:`None`. Sinon, si c'est :meth:`~agen.asend` qui " "a été utilisée, alors le résultat est la valeur transmise à cette méthode." -#: reference/expressions.rst:646 +#: reference/expressions.rst:648 msgid "" "In an asynchronous generator function, yield expressions are allowed " "anywhere in a :keyword:`try` construct. However, if an asynchronous " @@ -1038,7 +1038,7 @@ msgstr "" "générateur asynchrone et d'exécuter l'objet coroutine résultant, permettant " "ainsi à toute clause :keyword:`!finally` en attente d'être exécutée." -#: reference/expressions.rst:657 +#: reference/expressions.rst:659 msgid "" "To take care of finalization, an event loop should define a *finalizer* " "function which takes an asynchronous generator-iterator and presumably " @@ -1059,7 +1059,7 @@ msgstr "" "*finalizer*, regardez l'implémentation de ``asyncio.Loop." "shutdown_asyncgens`` dans :source:`Lib/asyncio/base_events.py`." -#: reference/expressions.rst:666 +#: reference/expressions.rst:668 msgid "" "The expression ``yield from `` is a syntax error when used in an " "asynchronous generator function." @@ -1067,11 +1067,11 @@ msgstr "" "L'expression ``yield from `` produit une erreur de syntaxe quand elle " "est utilisée dans une fonction génératrice asynchrone." -#: reference/expressions.rst:673 +#: reference/expressions.rst:675 msgid "Asynchronous generator-iterator methods" msgstr "Méthodes des générateurs-itérateurs asynchrones" -#: reference/expressions.rst:675 +#: reference/expressions.rst:677 msgid "" "This subsection describes the methods of an asynchronous generator iterator, " "which are used to control the execution of a generator function." @@ -1080,7 +1080,7 @@ msgstr "" "asynchrones. Elles sont utilisées pour contrôler l’exécution des fonctions " "génératrices." -#: reference/expressions.rst:683 +#: reference/expressions.rst:685 msgid "" "Returns an awaitable which when run starts to execute the asynchronous " "generator or resumes it at the last executed yield expression. When an " @@ -1105,14 +1105,14 @@ msgstr "" "lève une exception :exc:`StopAsyncIteration` qui signale que l'itération " "asynchrone est terminée." -#: reference/expressions.rst:695 +#: reference/expressions.rst:697 msgid "" "This method is normally called implicitly by a :keyword:`async for` loop." msgstr "" "Cette méthode est normalement appelée implicitement par une boucle :keyword:" "`async for`." -#: reference/expressions.rst:700 +#: reference/expressions.rst:702 msgid "" "Returns an awaitable which when run resumes the execution of the " "asynchronous generator. As with the :meth:`~generator.send()` method for a " @@ -1137,7 +1137,7 @@ msgstr "" "appelée pour démarrer le générateur asynchrone, l'argument doit être :const:" "`None` car il n'y a pas d'expression ``yield`` pour recevoir la valeur." -#: reference/expressions.rst:715 +#: reference/expressions.rst:717 msgid "" "Returns an awaitable that raises an exception of type ``type`` at the point " "where the asynchronous generator was paused, and returns the next value " @@ -1157,7 +1157,7 @@ msgstr "" "l'exception reçue ou lève une autre exception alors, quand le *awaitable* " "est lancé, cette exception est propagée vers l'appelant du *awaitable*." -#: reference/expressions.rst:730 +#: reference/expressions.rst:732 msgid "" "Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " "the asynchronous generator function at the point where it was paused. If the " @@ -1185,11 +1185,11 @@ msgstr "" "déjà terminé (soit par une exception, soit normalement), alors tout nouvel " "appel à :meth:`aclose` renvoie un *awaitable* qui ne fait rien." -#: reference/expressions.rst:746 +#: reference/expressions.rst:748 msgid "Primaries" msgstr "Primaires" -#: reference/expressions.rst:750 +#: reference/expressions.rst:752 msgid "" "Primaries represent the most tightly bound operations of the language. Their " "syntax is:" @@ -1198,17 +1198,17 @@ msgstr "" "les opérations qui se lient au plus proche dans le langage. Leur syntaxe " "est :" -#: reference/expressions.rst:760 +#: reference/expressions.rst:762 msgid "Attribute references" msgstr "Références à des attributs" -#: reference/expressions.rst:766 +#: reference/expressions.rst:768 msgid "An attribute reference is a primary followed by a period and a name:" msgstr "" "Une référence à un attribut (*attributeref* dans la grammaire formelle ci-" "dessous) est une primaire suivie par un point et un nom :" -#: reference/expressions.rst:776 +#: reference/expressions.rst:778 msgid "" "The primary must evaluate to an object of a type that supports attribute " "references, which most objects do. This object is then asked to produce the " @@ -1227,11 +1227,11 @@ msgstr "" "l'objet. Plusieurs évaluations successives d'une référence à un même " "attribut peuvent produire différents objets." -#: reference/expressions.rst:788 +#: reference/expressions.rst:790 msgid "Subscriptions" msgstr "Sélections" -#: reference/expressions.rst:803 +#: reference/expressions.rst:805 msgid "" "Subscription of a sequence (string, tuple or list) or mapping (dictionary) " "object usually selects an item from the collection:" @@ -1240,7 +1240,7 @@ msgstr "" "objet séquence (chaîne, *n*-uplet ou liste) ou tableau associatif " "(dictionnaire) désigne un élément dans cette séquence :" -#: reference/expressions.rst:809 +#: reference/expressions.rst:811 msgid "" "The primary must evaluate to an object that supports subscription (lists or " "dictionaries for example). User-defined objects can support subscription by " @@ -1250,13 +1250,13 @@ msgstr "" "ou un dictionnaire par exemple). Les objets définis par l'utilisateur " "peuvent gérer les sélections en définissant une méthode :meth:`__getitem__`." -#: reference/expressions.rst:813 +#: reference/expressions.rst:815 msgid "" "For built-in objects, there are two types of objects that support " "subscription:" msgstr "Pour les objets natifs, deux types d'objets gèrent la sélection :" -#: reference/expressions.rst:815 +#: reference/expressions.rst:817 msgid "" "If the primary is a mapping, the expression list must evaluate to an object " "whose value is one of the keys of the mapping, and the subscription selects " @@ -1270,7 +1270,7 @@ msgstr "" "(la liste d'expressions est un *n*-uplet sauf si elle comporte exactement un " "élément)." -#: reference/expressions.rst:820 +#: reference/expressions.rst:822 msgid "" "If the primary is a sequence, the expression list must evaluate to an " "integer or a slice (as discussed in the following section)." @@ -1279,7 +1279,7 @@ msgstr "" "dans la grammaire) doit pouvoir être évaluée comme un entier ou une tranche " "(comme expliqué dans la section suivante)." -#: reference/expressions.rst:823 +#: reference/expressions.rst:825 msgid "" "The formal syntax makes no special provision for negative indices in " "sequences; however, built-in sequences all provide a :meth:`__getitem__` " @@ -1303,7 +1303,7 @@ msgstr "" "surchargent cette méthode doivent aussi savoir les gérer, de manière " "explicite." -#: reference/expressions.rst:837 +#: reference/expressions.rst:839 msgid "" "A string's items are characters. A character is not a separate data type " "but a string of exactly one character." @@ -1311,7 +1311,7 @@ msgstr "" "Les éléments des chaînes sont des caractères. Un caractère n'est pas un type " "en tant que tel, c'est une chaîne de longueur un." -#: reference/expressions.rst:840 +#: reference/expressions.rst:842 msgid "" "Subscription of certain :term:`classes ` or :term:`types ` " "creates a :ref:`generic alias `. In this case, user-" @@ -1323,11 +1323,11 @@ msgstr "" "classes définies par l'utilisateur peuvent gérer la sélection en fournissant " "une méthode de classe :meth:`__class_getitem__`." -#: reference/expressions.rst:849 +#: reference/expressions.rst:851 msgid "Slicings" msgstr "Tranches" -#: reference/expressions.rst:863 +#: reference/expressions.rst:865 msgid "" "A slicing selects a range of items in a sequence object (e.g., a string, " "tuple or list). Slicings may be used as expressions or as targets in " @@ -1340,7 +1340,7 @@ msgstr "" "les assignations ou les instructions :keyword:`del`. La syntaxe est la " "suivante :" -#: reference/expressions.rst:876 +#: reference/expressions.rst:878 msgid "" "There is ambiguity in the formal syntax here: anything that looks like an " "expression list also looks like a slice list, so any subscription can be " @@ -1359,7 +1359,7 @@ msgstr "" "que tranche (c'est le cas si la liste de tranches (*slice_list*) ne contient " "aucune tranche en tant que telle)." -#: reference/expressions.rst:888 +#: reference/expressions.rst:890 msgid "" "The semantics for a slicing are as follows. The primary is indexed (using " "the same :meth:`__getitem__` method as normal subscription) with a key that " @@ -1388,11 +1388,11 @@ msgstr "" "la grammaire) et le pas (*stride* dans la grammaire), respectivement. En cas " "d'expression manquante, la valeur par défaut est ``None``." -#: reference/expressions.rst:912 +#: reference/expressions.rst:914 msgid "Calls" msgstr "Appels" -#: reference/expressions.rst:914 +#: reference/expressions.rst:916 msgid "" "A call calls a callable object (e.g., a :term:`function`) with a possibly " "empty series of :term:`arguments `:" @@ -1401,7 +1401,7 @@ msgstr "" "(par exemple, une :term:`fonction `) avec, possiblement, une liste " "d'\\ :term:`arguments ` :" -#: reference/expressions.rst:931 +#: reference/expressions.rst:933 msgid "" "An optional trailing comma may be present after the positional and keyword " "arguments but does not affect the semantics." @@ -1409,7 +1409,7 @@ msgstr "" "Une virgule finale (optionnelle) peut être présente, après les arguments " "positionnels et nommés, mais elle n'affecte pas la sémantique." -#: reference/expressions.rst:937 +#: reference/expressions.rst:939 msgid "" "The primary must evaluate to a callable object (user-defined functions, " "built-in functions, methods of built-in objects, class objects, methods of " @@ -1426,7 +1426,7 @@ msgstr "" "section :ref:`function` pour la syntaxe des listes de :term:`paramètres " "` formels." -#: reference/expressions.rst:945 +#: reference/expressions.rst:947 msgid "" "If keyword arguments are present, they are first converted to positional " "arguments, as follows. First, a list of unfilled slots is created for the " @@ -1467,7 +1467,7 @@ msgstr "" "n'est définie, une exception :exc:`TypeError` est levée. Sinon, la liste des " "*slots* remplie est utilisée en tant que liste des arguments pour l'appel." -#: reference/expressions.rst:965 +#: reference/expressions.rst:967 msgid "" "An implementation may provide built-in functions whose positional parameters " "do not have names, even if they are 'named' for the purpose of " @@ -1481,7 +1481,7 @@ msgstr "" "CPython, les fonctions implémentées en C qui utilisent :c:func:" "`PyArg_ParseTuple` pour analyser leurs arguments en font partie." -#: reference/expressions.rst:971 +#: reference/expressions.rst:973 msgid "" "If there are more positional arguments than there are formal parameter " "slots, a :exc:`TypeError` exception is raised, unless a formal parameter " @@ -1495,7 +1495,7 @@ msgstr "" "reçoit un *n*-uplet contenant les arguments positionnels en supplément (ou " "un *n*-uplet vide s'il n'y avait pas d'argument positionnel en trop)." -#: reference/expressions.rst:977 +#: reference/expressions.rst:979 msgid "" "If any keyword argument does not correspond to a formal parameter name, a :" "exc:`TypeError` exception is raised, unless a formal parameter using the " @@ -1512,7 +1512,7 @@ msgstr "" "dictionnaire), ou un (nouveau) dictionnaire vide s'il n'y a pas d'argument " "par mot-clé en trop." -#: reference/expressions.rst:988 +#: reference/expressions.rst:990 msgid "" "If the syntax ``*expression`` appears in the function call, ``expression`` " "must evaluate to an :term:`iterable`. Elements from these iterables are " @@ -1528,7 +1528,7 @@ msgstr "" "s'évalue comme une séquence *y1* … *yM*, c'est équivalent à un appel avec M" "+4 arguments positionnels *x1*, *x2*, *y1* … *yM*, *x3*, *x4*." -#: reference/expressions.rst:995 +#: reference/expressions.rst:997 msgid "" "A consequence of this is that although the ``*expression`` syntax may appear " "*after* explicit keyword arguments, it is processed *before* the keyword " @@ -1539,7 +1539,7 @@ msgstr "" "*avant* les arguments nommés (et avant tout argument ``**expression`` -- " "voir ci-dessous). Ainsi ::" -#: reference/expressions.rst:1011 +#: reference/expressions.rst:1013 msgid "" "It is unusual for both keyword arguments and the ``*expression`` syntax to " "be used in the same call, so in practice this confusion does not arise." @@ -1548,7 +1548,7 @@ msgstr "" "``*expression`` soient utilisés simultanément dans un même appel, ce qui " "fait que la confusion reste hypothétique." -#: reference/expressions.rst:1017 +#: reference/expressions.rst:1019 msgid "" "If the syntax ``**expression`` appears in the function call, ``expression`` " "must evaluate to a :term:`mapping`, the contents of which are treated as " @@ -1563,7 +1563,7 @@ msgstr "" "qu'argument par mot-clé explicite, ou venant d'un autre dépaquetage), une " "exception :exc:`TypeError` est levée." -#: reference/expressions.rst:1023 +#: reference/expressions.rst:1025 msgid "" "Formal parameters using the syntax ``*identifier`` or ``**identifier`` " "cannot be used as positional argument slots or as keyword argument names." @@ -1572,7 +1572,7 @@ msgstr "" "``**identifier`` ne peuvent pas être utilisés comme arguments positionnels " "ou comme noms d'arguments par mots-clés." -#: reference/expressions.rst:1026 +#: reference/expressions.rst:1028 msgid "" "Function calls accept any number of ``*`` and ``**`` unpackings, positional " "arguments may follow iterable unpackings (``*``), and keyword arguments may " @@ -1584,7 +1584,7 @@ msgstr "" "dépaquetages de dictionnaires (``**``). Proposé pour la première fois par " "la :pep:`448`." -#: reference/expressions.rst:1032 +#: reference/expressions.rst:1034 msgid "" "A call always returns some value, possibly ``None``, unless it raises an " "exception. How this value is computed depends on the type of the callable " @@ -1594,15 +1594,15 @@ msgstr "" "ne lève une exception. La façon dont celle valeur est calculée dépend du " "type de l'objet appelable." -#: reference/expressions.rst:1036 +#: reference/expressions.rst:1038 msgid "If it is---" msgstr "Si c'est ---" -#: reference/expressions.rst:1049 +#: reference/expressions.rst:1051 msgid "a user-defined function:" msgstr "une fonction définie par l'utilisateur :" -#: reference/expressions.rst:1045 +#: reference/expressions.rst:1047 msgid "" "The code block for the function is executed, passing it the argument list. " "The first thing the code block will do is bind the formal parameters to the " @@ -1616,11 +1616,11 @@ msgstr "" "`function`. Quand le bloc de code exécute l'instruction :keyword:`return`, " "cela spécifie la valeur de retour de l'appel de la fonction." -#: reference/expressions.rst:1063 +#: reference/expressions.rst:1065 msgid "a built-in function or method:" msgstr "une fonction ou une méthode native :" -#: reference/expressions.rst:1062 +#: reference/expressions.rst:1064 msgid "" "The result is up to the interpreter; see :ref:`built-in-funcs` for the " "descriptions of built-in functions and methods." @@ -1628,19 +1628,19 @@ msgstr "" "le résultat dépend de l'interpréteur ; lisez :ref:`built-in-funcs` pour une " "description des fonctions et méthodes natives." -#: reference/expressions.rst:1070 +#: reference/expressions.rst:1072 msgid "a class object:" msgstr "un objet classe :" -#: reference/expressions.rst:1070 +#: reference/expressions.rst:1072 msgid "A new instance of that class is returned." msgstr "une nouvelle instance de cette classe est renvoyée." -#: reference/expressions.rst:1080 +#: reference/expressions.rst:1082 msgid "a class instance method:" msgstr "une méthode d'instance de classe :" -#: reference/expressions.rst:1078 +#: reference/expressions.rst:1080 msgid "" "The corresponding user-defined function is called, with an argument list " "that is one longer than the argument list of the call: the instance becomes " @@ -1650,11 +1650,11 @@ msgstr "" "liste d'arguments qui est plus grande d'un élément que la liste des " "arguments de l'appel : l'instance est placée en tête des arguments." -#: reference/expressions.rst:1089 +#: reference/expressions.rst:1091 msgid "a class instance:" msgstr "une instance de classe :" -#: reference/expressions.rst:1087 +#: reference/expressions.rst:1089 msgid "" "The class must define a :meth:`__call__` method; the effect is then the same " "as if that method was called." @@ -1662,11 +1662,11 @@ msgstr "" "la classe doit définir une méthode :meth:`__call__` ; l'effet est le même " "que si cette méthode était appelée." -#: reference/expressions.rst:1833 +#: reference/expressions.rst:1835 msgid "Await expression" msgstr "Expression ``await``" -#: reference/expressions.rst:1097 +#: reference/expressions.rst:1099 msgid "" "Suspend the execution of :term:`coroutine` on an :term:`awaitable` object. " "Can only be used inside a :term:`coroutine function`." @@ -1674,11 +1674,11 @@ msgstr "" "Suspend l'exécution de la :term:`coroutine` sur un objet :term:`awaitable`. " "Ne peut être utilisée qu'à l'intérieur d'une :term:`coroutine function`." -#: reference/expressions.rst:1109 +#: reference/expressions.rst:1111 msgid "The power operator" msgstr "L'opérateur puissance" -#: reference/expressions.rst:1115 +#: reference/expressions.rst:1117 msgid "" "The power operator binds more tightly than unary operators on its left; it " "binds less tightly than unary operators on its right. The syntax is:" @@ -1687,7 +1687,7 @@ msgstr "" "gauche ; il est moins prioritaire que les opérateurs unaires sur sa droite. " "La syntaxe est :" -#: reference/expressions.rst:1121 +#: reference/expressions.rst:1123 msgid "" "Thus, in an unparenthesized sequence of power and unary operators, the " "operators are evaluated from right to left (this does not constrain the " @@ -1697,7 +1697,7 @@ msgstr "" "unaires, les opérateurs sont évalués de droite à gauche (ceci ne contraint " "pas l'ordre d'évaluation des opérandes) : ``-1**2`` donne ``-1``." -#: reference/expressions.rst:1125 +#: reference/expressions.rst:1127 msgid "" "The power operator has the same semantics as the built-in :func:`pow` " "function, when called with two arguments: it yields its left argument raised " @@ -1710,7 +1710,7 @@ msgstr "" "arguments numériques sont d'abord convertis vers un type commun et le " "résultat est de ce type." -#: reference/expressions.rst:1130 +#: reference/expressions.rst:1132 msgid "" "For int operands, the result has the same type as the operands unless the " "second argument is negative; in that case, all arguments are converted to " @@ -1723,7 +1723,7 @@ msgstr "" "virgule flottante. Par exemple, ``10**2`` renvoie ``100`` mais ``10**-2`` " "renvoie ``0.01``." -#: reference/expressions.rst:1135 +#: reference/expressions.rst:1137 msgid "" "Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`. " "Raising a negative number to a fractional power results in a :class:" @@ -1734,28 +1734,28 @@ msgstr "" "renvoie un nombre :class:`complexe ` (dans les versions " "antérieures, cela levait une :exc:`ValueError`)." -#: reference/expressions.rst:1143 +#: reference/expressions.rst:1145 msgid "Unary arithmetic and bitwise operations" msgstr "Arithmétique unaire et opérations sur les bits" -#: reference/expressions.rst:1149 +#: reference/expressions.rst:1151 msgid "All unary arithmetic and bitwise operations have the same priority:" msgstr "" "Toute l'arithmétique unaire et les opérations sur les bits ont la même " "priorité :" -#: reference/expressions.rst:1160 +#: reference/expressions.rst:1162 msgid "" "The unary ``-`` (minus) operator yields the negation of its numeric argument." msgstr "" "L'opérateur unaire ``-`` (moins) produit l'opposé de son argument numérique." -#: reference/expressions.rst:1167 +#: reference/expressions.rst:1169 msgid "The unary ``+`` (plus) operator yields its numeric argument unchanged." msgstr "" "L'opérateur unaire ``+`` (plus) produit son argument numérique inchangé." -#: reference/expressions.rst:1173 +#: reference/expressions.rst:1175 msgid "" "The unary ``~`` (invert) operator yields the bitwise inversion of its " "integer argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. " @@ -1765,7 +1765,7 @@ msgstr "" "argument entier. L'inversion bit à bit de ``x`` est définie comme ``-(x" "+1)``. Elle s'applique uniquement aux nombres entiers." -#: reference/expressions.rst:1179 +#: reference/expressions.rst:1181 msgid "" "In all three cases, if the argument does not have the proper type, a :exc:" "`TypeError` exception is raised." @@ -1773,11 +1773,11 @@ msgstr "" "Dans ces trois cas, si l'argument n'est pas du bon type, une exception :exc:" "`TypeError` est levée." -#: reference/expressions.rst:1186 +#: reference/expressions.rst:1188 msgid "Binary arithmetic operations" msgstr "Opérations arithmétiques binaires" -#: reference/expressions.rst:1190 +#: reference/expressions.rst:1192 msgid "" "The binary arithmetic operations have the conventional priority levels. " "Note that some of these operations also apply to certain non-numeric types. " @@ -1790,7 +1790,7 @@ msgstr "" "niveaux, le premier pour les opérateurs multiplicatifs et le second pour les " "opérateurs additifs :" -#: reference/expressions.rst:1205 +#: reference/expressions.rst:1207 msgid "" "The ``*`` (multiplication) operator yields the product of its arguments. " "The arguments must either both be numbers, or one argument must be an " @@ -1806,7 +1806,7 @@ msgstr "" "Dans le dernier cas, la séquence est répétée ; une répétition négative " "produit une séquence vide." -#: reference/expressions.rst:1215 +#: reference/expressions.rst:1217 msgid "" "The ``@`` (at) operator is intended to be used for matrix multiplication. " "No builtin Python types implement this operator." @@ -1814,7 +1814,7 @@ msgstr "" "L'opérateur ``@`` (prononcé *at* en anglais) a vocation à multiplier des " "matrices. Aucun type Python natif n'implémente cet opérateur." -#: reference/expressions.rst:1226 +#: reference/expressions.rst:1228 msgid "" "The ``/`` (division) and ``//`` (floor division) operators yield the " "quotient of their arguments. The numeric arguments are first converted to a " @@ -1831,7 +1831,7 @@ msgstr "" "mathématique suivie de la fonction ``floor`` appliquée au résultat. Une " "division par zéro lève une exception :exc:`ZeroDivisionError`." -#: reference/expressions.rst:1237 +#: reference/expressions.rst:1239 msgid "" "The ``%`` (modulo) operator yields the remainder from the division of the " "first argument by the second. The numeric arguments are first converted to " @@ -1851,7 +1851,7 @@ msgstr "" "même signe que le second opérande (ou zéro) ; la valeur absolue du résultat " "est strictement inférieure à la valeur absolue du second opérande [#]_." -#: reference/expressions.rst:1246 +#: reference/expressions.rst:1248 msgid "" "The floor division and modulo operators are connected by the following " "identity: ``x == (x//y)*y + (x%y)``. Floor division and modulo are also " @@ -1863,7 +1863,7 @@ msgstr "" "aussi liés à la fonction native :func:`divmod` : ``divmod(x, y) == (x//y, x" "%y)`` [#]_." -#: reference/expressions.rst:1251 +#: reference/expressions.rst:1253 msgid "" "In addition to performing the modulo operation on numbers, the ``%`` " "operator is also overloaded by string objects to perform old-style string " @@ -1877,7 +1877,7 @@ msgstr "" "décrit dans la référence de la bibliothèque Python, dans la section :ref:" "`old-string-formatting`." -#: reference/expressions.rst:1256 +#: reference/expressions.rst:1258 msgid "" "The floor division operator, the modulo operator, and the :func:`divmod` " "function are not defined for complex numbers. Instead, convert to a " @@ -1888,7 +1888,7 @@ msgstr "" "pouvez, si cela a du sens pour ce que vous voulez faire, les convertir vers " "des nombres à virgule flottante en utilisant la fonction :func:`abs`." -#: reference/expressions.rst:1265 +#: reference/expressions.rst:1267 msgid "" "The ``+`` (addition) operator yields the sum of its arguments. The " "arguments must either both be numbers or both be sequences of the same " @@ -1901,7 +1901,7 @@ msgstr "" "puis sont additionnés entre eux. Dans le dernier cas, les séquences sont " "concaténées." -#: reference/expressions.rst:1275 +#: reference/expressions.rst:1277 msgid "" "The ``-`` (subtraction) operator yields the difference of its arguments. " "The numeric arguments are first converted to a common type." @@ -1909,18 +1909,18 @@ msgstr "" "L'opérateur ``-`` (soustraction) produit la différence entre ses arguments. " "Les arguments numériques sont d'abord convertis vers un type commun." -#: reference/expressions.rst:1282 +#: reference/expressions.rst:1284 msgid "Shifting operations" msgstr "Opérations de décalage" -#: reference/expressions.rst:1289 +#: reference/expressions.rst:1291 msgid "" "The shifting operations have lower priority than the arithmetic operations:" msgstr "" "Les opérations de décalage sont moins prioritaires que les opérations " "arithmétiques :" -#: reference/expressions.rst:1294 +#: reference/expressions.rst:1296 msgid "" "These operators accept integers as arguments. They shift the first argument " "to the left or right by the number of bits given by the second argument." @@ -1929,7 +1929,7 @@ msgstr "" "argument vers la gauche ou vers la droite du nombre de bits donné par le " "deuxième argument." -#: reference/expressions.rst:1299 +#: reference/expressions.rst:1301 msgid "" "A right shift by *n* bits is defined as floor division by ``pow(2,n)``. A " "left shift by *n* bits is defined as multiplication with ``pow(2,n)``." @@ -1938,17 +1938,17 @@ msgstr "" "``pow(2,n)``. Un décalage à gauche de *n* bits est défini comme la " "multiplication par ``pow(2,n)``." -#: reference/expressions.rst:1306 +#: reference/expressions.rst:1308 msgid "Binary bitwise operations" msgstr "Opérations binaires bit à bit" -#: reference/expressions.rst:1310 +#: reference/expressions.rst:1312 msgid "Each of the three bitwise operations has a different priority level:" msgstr "" "Chacune des trois opérations binaires bit à bit possède une priorité " "différente :" -#: reference/expressions.rst:1321 +#: reference/expressions.rst:1323 msgid "" "The ``&`` operator yields the bitwise AND of its arguments, which must be " "integers." @@ -1956,7 +1956,7 @@ msgstr "" "L'opérateur ``&`` produit le ET logique de ses arguments, qui doivent être " "des entiers." -#: reference/expressions.rst:1329 +#: reference/expressions.rst:1331 msgid "" "The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, " "which must be integers." @@ -1964,7 +1964,7 @@ msgstr "" "L'opérateur ``^`` produit le OU EXCLUSIF (XOR) logique de ses arguments, qui " "doivent être des entiers." -#: reference/expressions.rst:1337 +#: reference/expressions.rst:1339 msgid "" "The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which " "must be integers." @@ -1972,11 +1972,11 @@ msgstr "" "L'opérateur ``|`` produit le OU logique de ses arguments, qui doivent être " "des entiers." -#: reference/expressions.rst:1344 +#: reference/expressions.rst:1346 msgid "Comparisons" msgstr "Comparaisons" -#: reference/expressions.rst:1356 +#: reference/expressions.rst:1358 msgid "" "Unlike C, all comparison operations in Python have the same priority, which " "is lower than that of any arithmetic, shifting or bitwise operation. Also " @@ -1989,12 +1989,12 @@ msgstr "" "les expressions telles que ``a < b < c`` sont interprétées comme elles le " "seraient conventionnellement en mathématiques :" -#: reference/expressions.rst:1366 +#: reference/expressions.rst:1368 msgid "Comparisons yield boolean values: ``True`` or ``False``." msgstr "" "Les comparaisons produisent des valeurs booléennes : ``True`` ou ``False``." -#: reference/expressions.rst:1370 +#: reference/expressions.rst:1372 msgid "" "Comparisons can be chained arbitrarily, e.g., ``x < y <= z`` is equivalent " "to ``x < y and y <= z``, except that ``y`` is evaluated only once (but in " @@ -2006,7 +2006,7 @@ msgstr "" "seulement une fois (mais dans les deux cas, ``z`` n'est pas évalué du tout " "si ``x < y`` s'avère être faux)." -#: reference/expressions.rst:1374 +#: reference/expressions.rst:1376 msgid "" "Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*, " "*op2*, ..., *opN* are comparison operators, then ``a op1 b op2 c ... y opN " @@ -2018,7 +2018,7 @@ msgstr "" "opN z`` est équivalent à ``a op1 b and b op2 c and … y opN z``, sauf que " "chaque expression est évaluée au maximum une fois." -#: reference/expressions.rst:1379 +#: reference/expressions.rst:1381 msgid "" "Note that ``a op1 b op2 c`` doesn't imply any kind of comparison between *a* " "and *c*, so that, e.g., ``x < y > z`` is perfectly legal (though perhaps not " @@ -2028,11 +2028,11 @@ msgstr "" "Ainsi, par exemple, ``x < y > z`` est parfaitement légal (mais peut-être pas " "très élégant)." -#: reference/expressions.rst:1384 +#: reference/expressions.rst:1386 msgid "Value comparisons" msgstr "Comparaisons de valeurs" -#: reference/expressions.rst:1386 +#: reference/expressions.rst:1388 msgid "" "The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the " "values of two objects. The objects do not need to have the same type." @@ -2040,7 +2040,7 @@ msgstr "" "Les opérateurs ``<``, ``>``, ``==``, ``>=``, ``<=`` et ``!=`` comparent les " "valeurs de deux objets. Les objets n'ont pas besoin d'être du même type." -#: reference/expressions.rst:1389 +#: reference/expressions.rst:1391 msgid "" "Chapter :ref:`objects` states that objects have a value (in addition to type " "and identity). The value of an object is a rather abstract notion in " @@ -2061,7 +2061,7 @@ msgstr "" "d'un objet. Vous pouvez vous le représenter comme une définition indirecte " "de la valeur d'un objet, *via* l'implémentation de leur comparaison." -#: reference/expressions.rst:1398 +#: reference/expressions.rst:1400 msgid "" "Because all types are (direct or indirect) subtypes of :class:`object`, they " "inherit the default comparison behavior from :class:`object`. Types can " @@ -2074,7 +2074,7 @@ msgstr "" "des comparaisons en implémentant des :dfn:`méthodes de comparaisons riches`, " "comme :meth:`__lt__`, décrites dans :ref:`customization`." -#: reference/expressions.rst:1404 +#: reference/expressions.rst:1406 msgid "" "The default behavior for equality comparison (``==`` and ``!=``) is based on " "the identity of the objects. Hence, equality comparison of instances with " @@ -2090,7 +2090,7 @@ msgstr "" "choix est que Python souhaite que tous les objets soient réflexifs, c'est-à-" "dire que ``x is y`` implique ``x == y``." -#: reference/expressions.rst:1411 +#: reference/expressions.rst:1413 msgid "" "A default order comparison (``<``, ``>``, ``<=``, and ``>=``) is not " "provided; an attempt raises :exc:`TypeError`. A motivation for this default " @@ -2100,7 +2100,7 @@ msgstr "" "défaut ; une tentative se solde par une :exc:`TypeError`. La raison de ce " "choix est qu'il n'existe pas d'invariant similaire à celui de l'égalité." -#: reference/expressions.rst:1415 +#: reference/expressions.rst:1417 msgid "" "The behavior of the default equality comparison, that instances with " "different identities are always unequal, may be in contrast to what types " @@ -2115,7 +2115,7 @@ msgstr "" "personnaliser leurs tests de comparaison et, en fait, c'est ce qu'ont fait " "un certain nombre de types natifs." -#: reference/expressions.rst:1421 +#: reference/expressions.rst:1423 msgid "" "The following list describes the comparison behavior of the most important " "built-in types." @@ -2123,7 +2123,7 @@ msgstr "" "La liste suivante décrit le comportement des tests d'égalité pour les types " "natifs les plus importants." -#: reference/expressions.rst:1424 +#: reference/expressions.rst:1426 msgid "" "Numbers of built-in numeric types (:ref:`typesnumeric`) and of the standard " "library types :class:`fractions.Fraction` and :class:`decimal.Decimal` can " @@ -2140,7 +2140,7 @@ msgstr "" "des types concernés, la comparaison mathématique équivaut à la comparaison " "algorithmique, sans perte de précision." -#: reference/expressions.rst:1431 +#: reference/expressions.rst:1433 msgid "" "The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are " "special. Any ordered comparison of a number to a not-a-number value is " @@ -2157,7 +2157,7 @@ msgstr "" "sont toutes fausses, mais l’expression ``x != x`` est vraie. Ce comportement " "est en accord avec IEEE 754." -#: reference/expressions.rst:1438 +#: reference/expressions.rst:1440 msgid "" "``None`` and ``NotImplemented`` are singletons. :PEP:`8` advises that " "comparisons for singletons should always be done with ``is`` or ``is not``, " @@ -2167,7 +2167,7 @@ msgstr "" "toujours comparer les singletons en utilisant soit ``is`` soit ``is not``, " "jamais les autres opérateurs." -#: reference/expressions.rst:1442 +#: reference/expressions.rst:1444 msgid "" "Binary sequences (instances of :class:`bytes` or :class:`bytearray`) can be " "compared within and across their types. They compare lexicographically " @@ -2178,7 +2178,7 @@ msgstr "" "La comparaison est lexicographique, en utilisant la valeur numérique des " "éléments." -#: reference/expressions.rst:1446 +#: reference/expressions.rst:1448 msgid "" "Strings (instances of :class:`str`) compare lexicographically using the " "numerical Unicode code points (the result of the built-in function :func:" @@ -2188,13 +2188,13 @@ msgstr "" "lexicographique en utilisant la valeur Unicode (le résultat de la fonction " "native :func:`ord`) des caractères [#]_." -#: reference/expressions.rst:1450 +#: reference/expressions.rst:1452 msgid "Strings and binary sequences cannot be directly compared." msgstr "" "Les chaînes de caractères et les séquences binaires ne peuvent pas être " "comparées directement." -#: reference/expressions.rst:1452 +#: reference/expressions.rst:1454 msgid "" "Sequences (instances of :class:`tuple`, :class:`list`, or :class:`range`) " "can be compared only within each of their types, with the restriction that " @@ -2208,7 +2208,7 @@ msgstr "" "d'égalité entre ces types renvoie faux et une comparaison entre instances de " "types différents lève une :exc:`TypeError`." -#: reference/expressions.rst:1458 +#: reference/expressions.rst:1460 msgid "" "Sequences compare lexicographically using comparison of corresponding " "elements. The built-in containers typically assume identical objects are " @@ -2221,13 +2221,13 @@ msgstr "" "d’égalité pour des objets identiques afin d’améliorer les performances et de " "conserver leurs invariants internes." -#: reference/expressions.rst:1463 +#: reference/expressions.rst:1465 msgid "" "Lexicographical comparison between built-in collections works as follows:" msgstr "" "L'ordre lexicographique pour les collections natives fonctionne comme suit :" -#: reference/expressions.rst:1465 +#: reference/expressions.rst:1467 msgid "" "For two collections to compare equal, they must be of the same type, have " "the same length, and each pair of corresponding elements must compare equal " @@ -2237,7 +2237,7 @@ msgstr "" "longueur et si les éléments correspondants de chaque paire sont égaux. Par " "exemple, ``[1,2] == (1,2)`` est faux car les types sont différents." -#: reference/expressions.rst:1470 +#: reference/expressions.rst:1472 msgid "" "Collections that support order comparison are ordered the same as their " "first unequal elements (for example, ``[1,2,x] <= [1,2,y]`` has the same " @@ -2251,7 +2251,7 @@ msgstr "" "collection la plus courte est la plus petite (par exemple, ``[1,2] < " "[1,2,3]`` est vrai)." -#: reference/expressions.rst:1476 +#: reference/expressions.rst:1478 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " "equal `(key, value)` pairs. Equality comparison of the keys and values " @@ -2261,13 +2261,13 @@ msgstr "" "et seulement si toutes leurs paires `(clé, valeur)` sont égales. L'égalité " "des clés et des valeurs met en œuvre la réflexivité." -#: reference/expressions.rst:1480 +#: reference/expressions.rst:1482 msgid "" "Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`." msgstr "" "Les comparaisons (``<``, ``>``, ``<=`` et ``>=``) lèvent :exc:`TypeError`." -#: reference/expressions.rst:1482 +#: reference/expressions.rst:1484 msgid "" "Sets (instances of :class:`set` or :class:`frozenset`) can be compared " "within and across their types." @@ -2275,7 +2275,7 @@ msgstr "" "Les ensembles (instances de :class:`set` ou :class:`frozenset`) peuvent être " "comparés au sein de leur propre type et entre types différents." -#: reference/expressions.rst:1485 +#: reference/expressions.rst:1487 msgid "" "They define order comparison operators to mean subset and superset tests. " "Those relations do not define total orderings (for example, the two sets " @@ -2293,11 +2293,11 @@ msgstr "" "exemple, les fonctions :func:`min`, :func:`max` et :func:`sorted` produisent " "des résultats indéfinis si on leur donne des listes d'ensembles en entrée)." -#: reference/expressions.rst:1493 +#: reference/expressions.rst:1495 msgid "Comparison of sets enforces reflexivity of its elements." msgstr "La comparaison des ensembles met en œuvre la réflexivité des éléments." -#: reference/expressions.rst:1495 +#: reference/expressions.rst:1497 msgid "" "Most other built-in types have no comparison methods implemented, so they " "inherit the default comparison behavior." @@ -2305,7 +2305,7 @@ msgstr "" "La plupart des autres types natifs n'implémentent pas de méthodes de " "comparaisons, ils héritent donc du comportement par défaut." -#: reference/expressions.rst:1498 +#: reference/expressions.rst:1500 msgid "" "User-defined classes that customize their comparison behavior should follow " "some consistency rules, if possible:" @@ -2313,7 +2313,7 @@ msgstr "" "Les classes allogènes qui particularisent les opérations de comparaison " "doivent, si possible, respecter quelques règles pour la cohérence :" -#: reference/expressions.rst:1501 +#: reference/expressions.rst:1503 msgid "" "Equality comparison should be reflexive. In other words, identical objects " "should compare equal:" @@ -2321,11 +2321,11 @@ msgstr "" "Le test d'égalité doit être réflexif. En d'autres termes, des objets " "identiques doivent être égaux :" -#: reference/expressions.rst:1504 +#: reference/expressions.rst:1506 msgid "``x is y`` implies ``x == y``" msgstr "``x is y`` implique ``x == y``" -#: reference/expressions.rst:1506 +#: reference/expressions.rst:1508 msgid "" "Comparison should be symmetric. In other words, the following expressions " "should have the same result:" @@ -2333,23 +2333,23 @@ msgstr "" "La comparaison doit être symétrique. En d'autres termes, les expressions " "suivantes doivent donner le même résultat :" -#: reference/expressions.rst:1509 +#: reference/expressions.rst:1511 msgid "``x == y`` and ``y == x``" msgstr "``x == y`` et ``y == x``" -#: reference/expressions.rst:1511 +#: reference/expressions.rst:1513 msgid "``x != y`` and ``y != x``" msgstr "``x != y`` et ``y != x``" -#: reference/expressions.rst:1513 +#: reference/expressions.rst:1515 msgid "``x < y`` and ``y > x``" msgstr "``x < y`` et ``y > x``" -#: reference/expressions.rst:1515 +#: reference/expressions.rst:1517 msgid "``x <= y`` and ``y >= x``" msgstr "``x <= y`` et ``y >= x``" -#: reference/expressions.rst:1517 +#: reference/expressions.rst:1519 msgid "" "Comparison should be transitive. The following (non-exhaustive) examples " "illustrate that:" @@ -2357,15 +2357,15 @@ msgstr "" "La comparaison doit être transitive. Les exemples suivants (liste non " "exhaustive) illustrent ce concept :" -#: reference/expressions.rst:1520 +#: reference/expressions.rst:1522 msgid "``x > y and y > z`` implies ``x > z``" msgstr "``x > y and y > z`` implique ``x > z``" -#: reference/expressions.rst:1522 +#: reference/expressions.rst:1524 msgid "``x < y and y <= z`` implies ``x < z``" msgstr "``x < y and y <= z`` implique ``x < z``" -#: reference/expressions.rst:1524 +#: reference/expressions.rst:1526 msgid "" "Inverse comparison should result in the boolean negation. In other words, " "the following expressions should have the same result:" @@ -2374,19 +2374,19 @@ msgstr "" "booléenne. En d'autres termes, les expressions suivantes doivent produire le " "même résultat :" -#: reference/expressions.rst:1527 +#: reference/expressions.rst:1529 msgid "``x == y`` and ``not x != y``" msgstr "``x == y`` et ``not x != y``" -#: reference/expressions.rst:1529 +#: reference/expressions.rst:1531 msgid "``x < y`` and ``not x >= y`` (for total ordering)" msgstr "``x < y`` et ``not x >= y`` (pour une relation d'ordre total)" -#: reference/expressions.rst:1531 +#: reference/expressions.rst:1533 msgid "``x > y`` and ``not x <= y`` (for total ordering)" msgstr "``x > y`` et ``not x <= y`` (pour une relation d'ordre total)" -#: reference/expressions.rst:1533 +#: reference/expressions.rst:1535 msgid "" "The last two expressions apply to totally ordered collections (e.g. to " "sequences, but not to sets or mappings). See also the :func:`~functools." @@ -2397,7 +2397,7 @@ msgstr "" "de correspondances). Regardez aussi le décorateur :func:`~functools." "total_ordering`." -#: reference/expressions.rst:1537 +#: reference/expressions.rst:1539 msgid "" "The :func:`hash` result should be consistent with equality. Objects that are " "equal should either have the same hash value, or be marked as unhashable." @@ -2406,7 +2406,7 @@ msgstr "" "qui sont égaux doivent avoir la même empreinte ou être marqués comme non-" "hachables." -#: reference/expressions.rst:1541 +#: reference/expressions.rst:1543 msgid "" "Python does not enforce these consistency rules. In fact, the not-a-number " "values are an example for not following these rules." @@ -2414,11 +2414,11 @@ msgstr "" "Python ne vérifie pas ces règles de cohérence. En fait, l'utilisation de " "valeurs non numériques est un exemple de non-respect de ces règles." -#: reference/expressions.rst:1550 +#: reference/expressions.rst:1552 msgid "Membership test operations" msgstr "Opérations de tests d’appartenance à un ensemble" -#: reference/expressions.rst:1552 +#: reference/expressions.rst:1554 msgid "" "The operators :keyword:`in` and :keyword:`not in` test for membership. ``x " "in s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` " @@ -2438,7 +2438,7 @@ msgstr "" "*collections.deque*, l’expression ``x in y`` est équivalente à ``any(x is e " "or x == e for e in y)``." -#: reference/expressions.rst:1560 +#: reference/expressions.rst:1562 msgid "" "For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is " "a substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty " @@ -2450,7 +2450,7 @@ msgstr "" "``y.find(x) != -1``. Une chaîne vide est considérée comme une sous-chaîne de " "toute autre chaîne, ainsi ``\"\" in \"abc\"`` renvoie ``True``." -#: reference/expressions.rst:1565 +#: reference/expressions.rst:1567 msgid "" "For user-defined classes which define the :meth:`__contains__` method, ``x " "in y`` returns ``True`` if ``y.__contains__(x)`` returns a true value, and " @@ -2460,7 +2460,7 @@ msgstr "" "``x in y`` renvoie ``True`` si ``y.__contains__(x)`` renvoie vrai, et " "``False`` sinon." -#: reference/expressions.rst:1569 +#: reference/expressions.rst:1571 msgid "" "For user-defined classes which do not define :meth:`__contains__` but do " "define :meth:`__iter__`, ``x in y`` is ``True`` if some value ``z``, for " @@ -2474,7 +2474,7 @@ msgstr "" "de l'itération sur ``y``. Si une exception est levée pendant l'itération, " "c'est comme si :keyword:`in` avait levé cette exception." -#: reference/expressions.rst:1575 +#: reference/expressions.rst:1577 msgid "" "Lastly, the old-style iteration protocol is tried: if a class defines :meth:" "`__getitem__`, ``x in y`` is ``True`` if and only if there is a non-negative " @@ -2489,7 +2489,7 @@ msgstr "" "`IndexError` (si toute autre exception est levée, c'est comme si :keyword:" "`in` avait levé cette exception)." -#: reference/expressions.rst:1587 +#: reference/expressions.rst:1589 msgid "" "The operator :keyword:`not in` is defined to have the inverse truth value " "of :keyword:`in`." @@ -2497,11 +2497,11 @@ msgstr "" "L'opérateur :keyword:`not in` est défini comme produisant le contraire de :" "keyword:`in`." -#: reference/expressions.rst:1600 +#: reference/expressions.rst:1602 msgid "Identity comparisons" msgstr "Comparaisons d'identifiants" -#: reference/expressions.rst:1602 +#: reference/expressions.rst:1604 msgid "" "The operators :keyword:`is` and :keyword:`is not` test for an object's " "identity: ``x is y`` is true if and only if *x* and *y* are the same " @@ -2514,11 +2514,11 @@ msgstr "" "fonction :meth:`id`. ``x is not y`` renvoie le résultat contraire de " "l'égalité des identifiants [#]_." -#: reference/expressions.rst:1614 +#: reference/expressions.rst:1616 msgid "Boolean operations" msgstr "Opérations booléennes" -#: reference/expressions.rst:1625 +#: reference/expressions.rst:1627 msgid "" "In the context of Boolean operations, and also when expressions are used by " "control flow statements, the following values are interpreted as false: " @@ -2537,7 +2537,7 @@ msgstr "" "allogènes peuvent personnaliser leur table de vérité en implémentant une " "méthode :meth:`__bool__`." -#: reference/expressions.rst:1634 +#: reference/expressions.rst:1636 msgid "" "The operator :keyword:`not` yields ``True`` if its argument is false, " "``False`` otherwise." @@ -2545,7 +2545,7 @@ msgstr "" "L'opérateur :keyword:`not` produit ``True`` si son argument est faux, " "``False`` sinon." -#: reference/expressions.rst:1639 +#: reference/expressions.rst:1641 msgid "" "The expression ``x and y`` first evaluates *x*; if *x* is false, its value " "is returned; otherwise, *y* is evaluated and the resulting value is returned." @@ -2554,7 +2554,7 @@ msgstr "" "valeur est renvoyée ; sinon, *y* est évalué et la valeur résultante est " "renvoyée." -#: reference/expressions.rst:1644 +#: reference/expressions.rst:1646 msgid "" "The expression ``x or y`` first evaluates *x*; if *x* is true, its value is " "returned; otherwise, *y* is evaluated and the resulting value is returned." @@ -2563,7 +2563,7 @@ msgstr "" "valeur est renvoyée ; sinon, *y* est évalué et la valeur résultante est " "renvoyée." -#: reference/expressions.rst:1647 +#: reference/expressions.rst:1649 msgid "" "Note that neither :keyword:`and` nor :keyword:`or` restrict the value and " "type they return to ``False`` and ``True``, but rather return the last " @@ -2582,11 +2582,11 @@ msgstr "" "de son argument (par exemple, ``not 'truc'`` produit ``False`` plutôt que " "``''``." -#: reference/expressions.rst:1657 +#: reference/expressions.rst:1659 msgid "Assignment expressions" msgstr "Expressions d'affectation" -#: reference/expressions.rst:1662 +#: reference/expressions.rst:1664 msgid "" "An assignment expression (sometimes also called a \"named expression\" or " "\"walrus\") assigns an :token:`expression` to an :token:`identifier`, while " @@ -2596,26 +2596,26 @@ msgstr "" "« expression morse ») affecte l':token:`expression` à un :token:" "`identifiant` et renvoie la valeur de l':token:`expression`." -#: reference/expressions.rst:1666 +#: reference/expressions.rst:1668 msgid "One common use case is when handling matched regular expressions:" msgstr "" "Une utilisation classique concerne les correspondances d'expressions " "rationnelles :" -#: reference/expressions.rst:1673 +#: reference/expressions.rst:1675 msgid "Or, when processing a file stream in chunks:" msgstr "Ou lorsqu'on traite le contenu d'un fichier par morceaux :" -#: reference/expressions.rst:1680 +#: reference/expressions.rst:1682 msgid "See :pep:`572` for more details about assignment expressions." msgstr "" "Voir la :pep:`572` pour plus de détails sur les expressions d’affectation." -#: reference/expressions.rst:1687 +#: reference/expressions.rst:1689 msgid "Conditional expressions" msgstr "Expressions conditionnelles" -#: reference/expressions.rst:1699 +#: reference/expressions.rst:1701 msgid "" "Conditional expressions (sometimes called a \"ternary operator\") have the " "lowest priority of all Python operations." @@ -2623,7 +2623,7 @@ msgstr "" "Les expressions conditionnelles (parfois appelées « opérateur ternaire ») " "sont les moins prioritaires de toutes les opérations Python." -#: reference/expressions.rst:1702 +#: reference/expressions.rst:1704 msgid "" "The expression ``x if C else y`` first evaluates the condition, *C* rather " "than *x*. If *C* is true, *x* is evaluated and its value is returned; " @@ -2633,16 +2633,16 @@ msgstr "" "est vrai, alors *x* est évalué et sa valeur est renvoyée ; sinon, *y* est " "évalué et sa valeur est renvoyée." -#: reference/expressions.rst:1706 +#: reference/expressions.rst:1708 msgid "See :pep:`308` for more details about conditional expressions." msgstr "" "Voir la :pep:`308` pour plus de détails sur les expressions conditionnelles." -#: reference/expressions.rst:1713 +#: reference/expressions.rst:1715 msgid "Lambdas" msgstr "Expressions lambda" -#: reference/expressions.rst:1724 +#: reference/expressions.rst:1726 msgid "" "Lambda expressions (sometimes called lambda forms) are used to create " "anonymous functions. The expression ``lambda parameters: expression`` yields " @@ -2653,7 +2653,7 @@ msgstr "" "L'expression ``lambda parameters: expression`` produit un objet fonction. " "Cet objet anonyme se comporte comme un objet fonction défini par :" -#: reference/expressions.rst:1733 +#: reference/expressions.rst:1735 msgid "" "See section :ref:`function` for the syntax of parameter lists. Note that " "functions created with lambda expressions cannot contain statements or " @@ -2663,11 +2663,11 @@ msgstr "" "Notez que les fonctions créées par des expressions lambda ne peuvent pas " "contenir d'instructions ou d'annotations." -#: reference/expressions.rst:1741 +#: reference/expressions.rst:1743 msgid "Expression lists" msgstr "Listes d'expressions" -#: reference/expressions.rst:1755 +#: reference/expressions.rst:1757 msgid "" "Except when part of a list or set display, an expression list containing at " "least one comma yields a tuple. The length of the tuple is the number of " @@ -2678,7 +2678,7 @@ msgstr "" "La longueur du *n*-uplet est le nombre d'expressions dans la liste. Les " "expressions sont évaluées de la gauche vers la droite." -#: reference/expressions.rst:1764 +#: reference/expressions.rst:1766 msgid "" "An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be " "an :term:`iterable`. The iterable is expanded into a sequence of items, " @@ -2690,14 +2690,14 @@ msgstr "" "L'itérable est développé en une séquence d'éléments qui sont inclus dans un " "nouvel objet *n*-uplet, liste ou ensemble à l'emplacement du dépaquetage." -#: reference/expressions.rst:1769 +#: reference/expressions.rst:1771 msgid "" "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "" "dépaquetage d'itérables dans les listes d'expressions, proposé à l'origine " "par la :pep:`448`." -#: reference/expressions.rst:1774 +#: reference/expressions.rst:1776 msgid "" "The trailing comma is required only to create a single tuple (a.k.a. a " "*singleton*); it is optional in all other cases. A single expression " @@ -2711,11 +2711,11 @@ msgstr "" "produit la valeur de cette expression (pour créer un *n*-uplet vide, " "utilisez une paire de parenthèses vide : ``()``)." -#: reference/expressions.rst:1784 +#: reference/expressions.rst:1786 msgid "Evaluation order" msgstr "Ordre d'évaluation" -#: reference/expressions.rst:1788 +#: reference/expressions.rst:1790 msgid "" "Python evaluates expressions from left to right. Notice that while " "evaluating an assignment, the right-hand side is evaluated before the left-" @@ -2725,7 +2725,7 @@ msgstr "" "lors de l'évaluation d'une assignation, la partie droite de l'assignation " "est évaluée avant la partie gauche." -#: reference/expressions.rst:1791 +#: reference/expressions.rst:1793 msgid "" "In the following lines, expressions will be evaluated in the arithmetic " "order of their suffixes::" @@ -2733,11 +2733,11 @@ msgstr "" "Dans les lignes qui suivent, les expressions sont évaluées suivant l'ordre " "arithmétique de leurs suffixes ::" -#: reference/expressions.rst:1805 +#: reference/expressions.rst:1807 msgid "Operator precedence" msgstr "Priorités des opérateurs" -#: reference/expressions.rst:1810 +#: reference/expressions.rst:1812 #, fuzzy msgid "" "The following table summarizes the operator precedence in Python, from " @@ -2753,7 +2753,7 @@ msgstr "" "la gauche vers la droite (sauf pour la puissance qui regroupe de la droite " "vers la gauche)." -#: reference/expressions.rst:1816 +#: reference/expressions.rst:1818 msgid "" "Note that comparisons, membership tests, and identity tests, all have the " "same precedence and have a left-to-right chaining feature as described in " @@ -2763,23 +2763,23 @@ msgstr "" "d'identifiants possèdent tous la même priorité et s'enchaînent de la gauche " "vers la droite comme décrit dans la section :ref:`comparisons`." -#: reference/expressions.rst:1822 +#: reference/expressions.rst:1824 msgid "Operator" msgstr "Opérateur" -#: reference/expressions.rst:1822 +#: reference/expressions.rst:1824 msgid "Description" msgstr "Description" -#: reference/expressions.rst:1824 +#: reference/expressions.rst:1826 msgid "``(expressions...)``," msgstr "``(expressions…)``," -#: reference/expressions.rst:1826 +#: reference/expressions.rst:1828 msgid "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" msgstr "``[expressions…]``, ``{key: value…}``, ``{expressions…}``" -#: reference/expressions.rst:1824 +#: reference/expressions.rst:1826 msgid "" "Binding or parenthesized expression, list display, dictionary display, set " "display" @@ -2787,39 +2787,39 @@ msgstr "" "Expression de liaison ou parenthèse, affichage de liste, affichage de " "dictionnaire, affichage de *set*" -#: reference/expressions.rst:1830 +#: reference/expressions.rst:1832 msgid "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" msgstr "``x[indice]``, ``x[indice:indice]``, ``x(arguments…)``, ``x.attribut``" -#: reference/expressions.rst:1830 +#: reference/expressions.rst:1832 msgid "Subscription, slicing, call, attribute reference" msgstr "indiçage, tranches, appel, référence à un attribut" -#: reference/expressions.rst:1833 +#: reference/expressions.rst:1835 msgid ":keyword:`await` ``x``" msgstr ":keyword:`await` ``x``" -#: reference/expressions.rst:1835 +#: reference/expressions.rst:1837 msgid "``**``" msgstr "``**``" -#: reference/expressions.rst:1835 +#: reference/expressions.rst:1837 msgid "Exponentiation [#]_" msgstr "Puissance [#]_" -#: reference/expressions.rst:1837 +#: reference/expressions.rst:1839 msgid "``+x``, ``-x``, ``~x``" msgstr "``+x``, ``-x``, ``~x``" -#: reference/expressions.rst:1837 +#: reference/expressions.rst:1839 msgid "Positive, negative, bitwise NOT" msgstr "NOT (positif, négatif, bit à bit)" -#: reference/expressions.rst:1839 +#: reference/expressions.rst:1841 msgid "``*``, ``@``, ``/``, ``//``, ``%``" msgstr "``*``, ``@``, ``/``, ``//``, ``%``" -#: reference/expressions.rst:1839 +#: reference/expressions.rst:1841 msgid "" "Multiplication, matrix multiplication, division, floor division, remainder " "[#]_" @@ -2827,47 +2827,47 @@ msgstr "" "Multiplication, multiplication de matrices, division, division entière, " "reste [#]_" -#: reference/expressions.rst:1843 +#: reference/expressions.rst:1845 msgid "``+``, ``-``" msgstr "``+``, ``-``" -#: reference/expressions.rst:1843 +#: reference/expressions.rst:1845 msgid "Addition and subtraction" msgstr "Addition et soustraction" -#: reference/expressions.rst:1845 +#: reference/expressions.rst:1847 msgid "``<<``, ``>>``" msgstr "``<<``, ``>>``" -#: reference/expressions.rst:1845 +#: reference/expressions.rst:1847 msgid "Shifts" msgstr "décalages" -#: reference/expressions.rst:1847 +#: reference/expressions.rst:1849 msgid "``&``" msgstr "``&``" -#: reference/expressions.rst:1847 +#: reference/expressions.rst:1849 msgid "Bitwise AND" msgstr "AND (bit à bit)" -#: reference/expressions.rst:1849 +#: reference/expressions.rst:1851 msgid "``^``" msgstr "``^``" -#: reference/expressions.rst:1849 +#: reference/expressions.rst:1851 msgid "Bitwise XOR" msgstr "XOR (bit à bit)" -#: reference/expressions.rst:1851 +#: reference/expressions.rst:1853 msgid "``|``" msgstr "``|``" -#: reference/expressions.rst:1851 +#: reference/expressions.rst:1853 msgid "Bitwise OR" msgstr "OR (bit à bit)" -#: reference/expressions.rst:1853 +#: reference/expressions.rst:1855 msgid "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" @@ -2875,64 +2875,64 @@ msgstr "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" -#: reference/expressions.rst:1853 +#: reference/expressions.rst:1855 msgid "Comparisons, including membership tests and identity tests" msgstr "" "Comparaisons, y compris les tests d'appartenance et les tests d'identifiants" -#: reference/expressions.rst:1857 +#: reference/expressions.rst:1859 msgid ":keyword:`not` ``x``" msgstr ":keyword:`not` ``x``" -#: reference/expressions.rst:1857 +#: reference/expressions.rst:1859 msgid "Boolean NOT" msgstr "NOT (booléen)" -#: reference/expressions.rst:1859 +#: reference/expressions.rst:1861 msgid ":keyword:`and`" msgstr ":keyword:`and`" -#: reference/expressions.rst:1859 +#: reference/expressions.rst:1861 msgid "Boolean AND" msgstr "AND (booléen)" -#: reference/expressions.rst:1861 +#: reference/expressions.rst:1863 msgid ":keyword:`or`" msgstr ":keyword:`or`" -#: reference/expressions.rst:1861 +#: reference/expressions.rst:1863 msgid "Boolean OR" msgstr "OR (booléen)" -#: reference/expressions.rst:1863 +#: reference/expressions.rst:1865 msgid ":keyword:`if ` -- :keyword:`!else`" msgstr ":keyword:`if ` -- :keyword:`!else`" -#: reference/expressions.rst:1863 +#: reference/expressions.rst:1865 msgid "Conditional expression" msgstr "Expressions conditionnelles" -#: reference/expressions.rst:1865 +#: reference/expressions.rst:1867 msgid ":keyword:`lambda`" msgstr ":keyword:`lambda`" -#: reference/expressions.rst:1865 +#: reference/expressions.rst:1867 msgid "Lambda expression" msgstr "Expression lambda" -#: reference/expressions.rst:1867 +#: reference/expressions.rst:1869 msgid "``:=``" msgstr "``:=``" -#: reference/expressions.rst:1867 +#: reference/expressions.rst:1869 msgid "Assignment expression" msgstr "Expression d'affectation" -#: reference/expressions.rst:1872 +#: reference/expressions.rst:1874 msgid "Footnotes" msgstr "Notes" -#: reference/expressions.rst:1873 +#: reference/expressions.rst:1875 msgid "" "While ``abs(x%y) < abs(y)`` is true mathematically, for floats it may not be " "true numerically due to roundoff. For example, and assuming a platform on " @@ -2953,7 +2953,7 @@ msgstr "" "argument, c'est-à-dire ``-1e-100`` dans ce cas. La meilleure approche dépend " "de l'application." -#: reference/expressions.rst:1882 +#: reference/expressions.rst:1884 msgid "" "If x is very close to an exact integer multiple of y, it's possible for ``x//" "y`` to be one larger than ``(x-x%y)//y`` due to rounding. In such cases, " @@ -2965,7 +2965,7 @@ msgstr "" "Dans de tels cas, Python renvoie le second résultat afin d'avoir ``divmod(x," "y)[0] * y + x % y`` le plus proche de ``x``." -#: reference/expressions.rst:1887 +#: reference/expressions.rst:1889 msgid "" "The Unicode standard distinguishes between :dfn:`code points` (e.g. U+0041) " "and :dfn:`abstract characters` (e.g. \"LATIN CAPITAL LETTER A\"). While most " @@ -2990,7 +2990,7 @@ msgstr "" "*U+0043* (LATIN CAPITAL LETTER C) du code, suivi par un :dfn:`caractère " "combiné` à la position *U+0327* (*COMBINING CEDILLA*) du code." -#: reference/expressions.rst:1898 +#: reference/expressions.rst:1900 msgid "" "The comparison operators on strings compare at the level of Unicode code " "points. This may be counter-intuitive to humans. For example, ``\"\\u00C7\" " @@ -3003,7 +3003,7 @@ msgstr "" "chaînes représentent le même caractère abstrait \"LATIN CAPITAL LETTER C " "WITH CEDILLA\"." -#: reference/expressions.rst:1903 +#: reference/expressions.rst:1905 msgid "" "To compare strings at the level of abstract characters (that is, in a way " "intuitive to humans), use :func:`unicodedata.normalize`." @@ -3012,7 +3012,7 @@ msgstr "" "quelque chose d'intuitif pour les humains), utilisez :func:`unicodedata." "normalize`." -#: reference/expressions.rst:1906 +#: reference/expressions.rst:1908 msgid "" "Due to automatic garbage-collection, free lists, and the dynamic nature of " "descriptors, you may notice seemingly unusual behaviour in certain uses of " @@ -3025,7 +3025,7 @@ msgstr "" "cela implique des comparaisons entre des méthodes d'instances ou des " "constantes. Allez vérifier dans la documentation pour plus d'informations." -#: reference/expressions.rst:1911 +#: reference/expressions.rst:1913 msgid "" "The power operator ``**`` binds less tightly than an arithmetic or bitwise " "unary operator on its right, that is, ``2**-1`` is ``0.5``." @@ -3033,7 +3033,7 @@ msgstr "" "L'opérateur puissance ``**`` est moins prioritaire qu'un opérateur unaire " "arithmétique ou bit à bit sur sa droite. Ainsi, ``2**-1`` vaut ``0.5``." -#: reference/expressions.rst:1914 +#: reference/expressions.rst:1916 msgid "" "The ``%`` operator is also used for string formatting; the same precedence " "applies." diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index bc14e077..dfccda35 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2021-05-29 16:33+0200\n" "PO-Revision-Date: 2020-08-06 00:39+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -2319,7 +2319,7 @@ msgid "" "Python 3.10. (Contributed by Ken Jin in :issue:`42195`.)" msgstr "" -#: whatsnew/3.9.rst:1543 +#: whatsnew/3.9.rst:1568 msgid "urllib.parse" msgstr "urllib.parse" @@ -2348,6 +2348,20 @@ msgid "" "instance to ``True``. (See :issue:`43285`)" msgstr "" +#: whatsnew/3.9.rst:1565 +msgid "Notable changes in Python 3.9.5" +msgstr "" + +#: whatsnew/3.9.rst:1570 +msgid "" +"The presence of newline or tab characters in parts of a URL allows for some " +"forms of attacks. Following the WHATWG specification that updates :rfc:" +"`3986`, ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` characters are " +"stripped from the URL by the parser in :mod:`urllib.parse` preventing such " +"attacks. The removal characters are controlled by a new module level " +"variable ``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :issue:`43882`)" +msgstr "" + #~ msgid "" #~ "This article explains the new features in Python 3.9, compared to 3.8." #~ msgstr ""