diff --git a/bugs.po b/bugs.po index 367deef9..ac22018c 100644 --- a/bugs.po +++ b/bugs.po @@ -188,13 +188,15 @@ msgstr "" #: bugs.rst:67 msgid "The submission form has two fields, \"Title\" and \"Comment\"." -msgstr "" +msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*." #: bugs.rst:69 msgid "" "For the \"Title\" field, enter a *very* short description of the problem; " "less than ten words is good." msgstr "" +"Dans le champ *Title*, entrez une *très* brève description du problème " +"rencontré ; tâchez de vous limiter à dix mots." #: bugs.rst:72 msgid "" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index f2e2cf67..dd041266 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -24,11 +24,16 @@ msgid "" "correspond to the version code is **built** with, not necessarily the " "version used at **run time**." msgstr "" +"CPython révèle son numéro de version dans les macros suivantes. À noter " +"qu'ils correspondent au code de la version **compilée** avec, pas " +"nécessairement la version utilisée à l'**exécution**." #: c-api/apiabiversion.rst:13 msgid "" "See :ref:`stable` for a discussion of API and ABI stability across versions." msgstr "" +"Voir :ref:`stable` pour une discussion sur la stabilité des API et ABI entre " +"(ou en fonction) de la version." #: c-api/apiabiversion.rst:17 #, fuzzy @@ -92,7 +97,7 @@ msgstr "Signification" #: c-api/apiabiversion.rst:45 msgid "Value for ``3.4.1a2``" -msgstr "" +msgstr "Valeur pour ``3.4.1a2``" #: c-api/apiabiversion.rst:47 msgid "1" @@ -105,11 +110,11 @@ msgstr "``1-8``" #: c-api/apiabiversion.rst:47 msgid "``PY_MAJOR_VERSION``" -msgstr "" +msgstr "``PY_MAJOR_VERSION``" #: c-api/apiabiversion.rst:47 msgid "``0x03``" -msgstr "" +msgstr "``0x03``" #: c-api/apiabiversion.rst:49 msgid "2" @@ -122,11 +127,11 @@ msgstr "``9-16``" #: c-api/apiabiversion.rst:49 msgid "``PY_MINOR_VERSION``" -msgstr "" +msgstr "``PY_MINOR_VERSION``" #: c-api/apiabiversion.rst:49 msgid "``0x04``" -msgstr "" +msgstr "``0x04``" #: c-api/apiabiversion.rst:51 msgid "3" @@ -139,11 +144,11 @@ msgstr "``17-24``" #: c-api/apiabiversion.rst:51 msgid "``PY_MICRO_VERSION``" -msgstr "" +msgstr "``PY_MICRO_VERSION``" #: c-api/apiabiversion.rst:51 msgid "``0x01``" -msgstr "" +msgstr "``0x01``" #: c-api/apiabiversion.rst:53 msgid "4" @@ -156,11 +161,11 @@ msgstr "``25-28``" #: c-api/apiabiversion.rst:53 msgid "``PY_RELEASE_LEVEL``" -msgstr "" +msgstr "``PY_RELEASE_LEVEL``" #: c-api/apiabiversion.rst:53 msgid "``0xA``" -msgstr "" +msgstr "``0xA``" #: c-api/apiabiversion.rst:55 #, fuzzy @@ -169,11 +174,11 @@ msgstr "``29-32``" #: c-api/apiabiversion.rst:55 msgid "``PY_RELEASE_SERIAL``" -msgstr "" +msgstr "``PY_RELEASE_SERIAL``" #: c-api/apiabiversion.rst:55 msgid "``0x2``" -msgstr "" +msgstr "``0x2``" #: c-api/apiabiversion.rst:58 #, fuzzy diff --git a/c-api/call.po b/c-api/call.po index edecd967..37f5609e 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -261,7 +261,7 @@ msgstr "Fonction" #: c-api/call.rst:189 msgid "callable" -msgstr "" +msgstr "appelable (*callable*)" #: c-api/call.rst:189 msgid "args" diff --git a/c-api/function.po b/c-api/function.po index e708bc7c..2dedf0c2 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -20,11 +20,11 @@ msgstr "Objets fonctions" #: c-api/function.rst:10 msgid "There are a few functions specific to Python functions." -msgstr "" +msgstr "Certaines fonctions sont spécifiques aux fonctions Python." #: c-api/function.rst:15 msgid "The C structure used for functions." -msgstr "" +msgstr "La structure C utilisée pour les fonctions." #: c-api/function.rst:22 msgid "" @@ -32,6 +32,8 @@ msgid "" "function type. It is exposed to Python programmers as ``types." "FunctionType``." msgstr "" +"C'est une instance de :c:type:`PyTypeObject` et représente le type fonction " +"en Python. Il est exposé aux développeurs comme ``types.FunctionType``." #: c-api/function.rst:28 msgid "" @@ -39,6 +41,9 @@ msgid "" "`PyFunction_Type`). The parameter must not be ``NULL``. This function " "always succeeds." msgstr "" +"Renvoie vrai si *o* est un objet de type fonction (a comme type :c:data:" +"`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. Cette fonction " +"réussit toujours." #: c-api/function.rst:34 msgid "" @@ -46,6 +51,8 @@ msgid "" "*globals* must be a dictionary with the global variables accessible to the " "function." msgstr "" +"Renvoie une nouvelle fonction associée avec l'objet *code*. *globals* doit " +"être un dictionnaire avec les variables globales accessibles à la fonction." #: c-api/function.rst:37 msgid "" @@ -65,60 +72,77 @@ msgstr "" #: c-api/function.rst:54 msgid "Return the code object associated with the function object *op*." -msgstr "" +msgstr "Renvoie l'objet code associé avec l'objet de la fonction *op*." #: c-api/function.rst:59 msgid "Return the globals dictionary associated with the function object *op*." msgstr "" +"Renvoie le dictionnaire global associé avec l'objet de la fonction *op*." #: c-api/function.rst:64 msgid "" "Return a :term:`borrowed reference` to the *__module__* attribute of the " "function object *op*. It can be *NULL*." msgstr "" +"Renvoie un :term:`borrowed reference` à l'attribut ``__module__`` de l'objet " +"fonction *op*. Il peut être *NULL*." #: c-api/function.rst:67 msgid "" "This is normally a string containing the module name, but can be set to any " "other object by Python code." msgstr "" +"C'est typiquement une chaîne de caractère contenant le nom du module, mais " +"il peut être changé par du code Python pour n'importe quel autre objet." #: c-api/function.rst:73 msgid "" "Return the argument default values of the function object *op*. This can be " "a tuple of arguments or ``NULL``." msgstr "" +"Renvoie les valeurs par défaut de l'argument de l'objet de la fonction *op*. " +"Cela peut être un tuple d'arguments ou ``NULL``." #: c-api/function.rst:79 msgid "" "Set the argument default values for the function object *op*. *defaults* " "must be ``Py_None`` or a tuple." msgstr "" +"Définir les valeurs par défaut de l'argument pour l'objet de la fonction " +"*op*. *defaults* doit être ``Py_None`` ou un tuple." #: c-api/function.rst:96 c-api/function.rst:110 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." -msgstr "" +msgstr "Lève :exc:`SystemError` et renvoie ``-1`` en cas de d'échec." #: c-api/function.rst:87 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." msgstr "" +"Renvoie la fermeture associée avec l'objet de la fonction *op*. Cela peut " +"être ``NULL`` ou un tuple d'objets cellule." #: c-api/function.rst:93 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." msgstr "" +"Définir la fermeture associée avec l'objet de la fonction *op*. *closure* " +"doit être ``Py_None`` ou un tuple d'objets cellule." #: c-api/function.rst:101 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." msgstr "" +"Renvoie les annotations de l'objet de la fonction *op*. Cela peut être un " +"dictionnaire mutable ou ``NULL``." #: c-api/function.rst:107 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." msgstr "" +"Définir les annotations pour l'objet de la fonction *op*. *annotations* doit " +"être un dictionnaire ou ``Py_None``." diff --git a/c-api/refcounting.po b/c-api/refcounting.po index bfef5d86..cafe2078 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -23,10 +23,12 @@ msgid "" "The macros in this section are used for managing reference counts of Python " "objects." msgstr "" +"Les macros dans cette section permettent de gérer le compteur de références " +"des objets Python." #: c-api/refcounting.rst:16 msgid "Increment the reference count for object *o*." -msgstr "" +msgstr "Incrémente le compteur de références de l'objet *o*." #: c-api/refcounting.rst:18 msgid "" @@ -34,40 +36,54 @@ msgid "" "term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " "used to create a new :term:`strong reference`." msgstr "" +"Cette fonction est souvent utilisée pour convertir une :term:`référence " +"empruntée` en une :term:`référence forte` *sur place*. La fonction :c:func:" +"`Py_NewRef` peut être utilisée pour créer une nouvelle :term:`référence " +"forte`." #: c-api/refcounting.rst:22 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XINCREF`." msgstr "" +"L'objet ne doit pas être ``NULL``, la fonction :c:func:`Py_XINCREF` doit " +"être utilisée s'il est possible qu'il soit ``NULL``." #: c-api/refcounting.rst:28 msgid "" "Increment the reference count for object *o*. The object may be ``NULL``, " "in which case the macro has no effect." msgstr "" +"Incrémente le compteur de références de l'objet *o*. La macro n'a pas " +"d'effet si l'objet est ``NULL``." #: c-api/refcounting.rst:31 msgid "See also :c:func:`Py_XNewRef`." -msgstr "" +msgstr "Voir aussi :c:func:`Py_XNewRef`." #: c-api/refcounting.rst:36 msgid "" "Create a new :term:`strong reference` to an object: increment the reference " "count of the object *o* and return the object *o*." msgstr "" +"Créer une nouvelle :term:`référence forte` d'un objet : incrémente le " +"compteur de référence de l'objet *o* et renvoie l'objet *o*." #: c-api/refcounting.rst:39 msgid "" "When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " "should be called on it to decrement the object reference count." msgstr "" +":c:func:`Py_DECREF` doit être appelée quand la :term:`référence forte` n'est " +"plus utilisée pour décrémenter le compteur de références de l'objet." #: c-api/refcounting.rst:42 msgid "" "The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " "``NULL``." msgstr "" +"L'objet *o* ne doit pas être ``NULL`` et la fonction :c:func:`Py_XNewRef` " +"doit être utilisée si *o* peut être ``NULL``." #: c-api/refcounting.rst:45 msgid "For example::" @@ -75,41 +91,47 @@ msgstr "Par exemple ::" #: c-api/refcounting.rst:50 msgid "can be written as::" -msgstr "" +msgstr "peut s'écrire ::" #: c-api/refcounting.rst:54 msgid "See also :c:func:`Py_INCREF`." -msgstr "" +msgstr "Voir aussi :c:func:`Py_INCREF`." #: c-api/refcounting.rst:61 msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." -msgstr "" +msgstr "Semblable à :c:func:`Py_NewRef` mais l'objet *o* peut être ``NULL``." #: c-api/refcounting.rst:63 msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." -msgstr "" +msgstr "Cette fonction renvoie ``NULL`` si l'objet *o* est ``NULL``." #: c-api/refcounting.rst:70 msgid "Decrement the reference count for object *o*." -msgstr "" +msgstr "Décrémente le compteur de références de l'objet *o*." #: c-api/refcounting.rst:72 msgid "" "If the reference count reaches zero, the object's type's deallocation " "function (which must not be ``NULL``) is invoked." msgstr "" +"Si le compteur de références atteint zéro, la fonction de dés-allocation du " +"type de l'objet (qui ne doit pas être ``NULL``) est invoquée." #: c-api/refcounting.rst:75 msgid "" "This function is usually used to delete a :term:`strong reference` before " "exiting its scope." msgstr "" +"Cette fonction est généralement utilisée pour supprimer une :term:`référence " +"forte` avant qu'elle ne soit plus accessible." #: c-api/refcounting.rst:78 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XDECREF`." msgstr "" +"L'objet en argument ne doit pas être ``NULL``. :c:func:`Py_XDECREF` doit " +"être utilisée si l'objet peut être ``NULL``." #: c-api/refcounting.rst:83 msgid "" @@ -123,6 +145,15 @@ msgid "" "update the list data structure, and then call :c:func:`Py_DECREF` for the " "temporary variable." msgstr "" +"La fonction de dés-allocation peut invoquer du code Python arbitraire (par " +"exemple quand une instance d'une classe avec une méthode :meth:`__del__` est " +"supprimée). Le code exécuté a accès à toutes les variables Python globales " +"mais les exceptions lors de l'exécution de ce code ne sont pas propagées. " +"Tous les objets qui peuvent être atteints à partir d'une variable globale " +"doivent être dans un état cohérent avant d'appeler :c:func:`Py_DECREF`. Par " +"exemple le code pour supprimer un élément d'une liste doit copier une " +"référence à l'objet dans une variable temporaire, mettre à jour la liste, et " +"enfin appeler :c:func:`Py_DECREF` avec la variable temporaire." #: c-api/refcounting.rst:95 msgid "" @@ -130,6 +161,10 @@ msgid "" "in which case the macro has no effect; otherwise the effect is the same as " "for :c:func:`Py_DECREF`, and the same warning applies." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF` et les mêmes avertissements " +"sont de rigueur." #: c-api/refcounting.rst:102 msgid "" @@ -140,24 +175,38 @@ msgid "" "object passed because the macro carefully uses a temporary variable and sets " "the argument to ``NULL`` before decrementing its reference count." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF`, puis l'argument est mis à " +"``NULL``. L'avertissement au sujet de l'objet passé en argument à :c:func:" +"`Py_DECREF` ne s'applique pas car la macro utilise une variable temporaire " +"et met l'objet à ``NULL`` avant de décrémenter le compteur de références." #: c-api/refcounting.rst:109 msgid "" "It is a good idea to use this macro whenever decrementing the reference " "count of an object that might be traversed during garbage collection." msgstr "" +"Il est recommandé d'utiliser cette macro lorsqu'on décrémente le compteur de " +"référence d'un objet qui peut être parcouru par le ramasse-miette." #: c-api/refcounting.rst:114 msgid "" "Increment the reference count for object *o*. A function version of :c:func:" "`Py_XINCREF`. It can be used for runtime dynamic embedding of Python." msgstr "" +"Incrémente le compteur de références de l'objet *o*. C'est la version " +"fonctionnelle de :c:func:`Py_XINCREF`. Elle peut être utilisée lorsque " +"Python est embarqué dynamiquement dans une application." #: c-api/refcounting.rst:120 msgid "" "Decrement the reference count for object *o*. A function version of :c:func:" "`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." msgstr "" +"Décrémente le compteur de références de l'objet *o*. C'est la version " +"fonctionnelle de :c:func:`Py_XDECREF`. Elle peut être utilisée lorsque " +"Python est embarqué dynamiquement dans une application." #: c-api/refcounting.rst:124 msgid "" @@ -165,3 +214,7 @@ msgid "" "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:" "`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`." msgstr "" +"Les fonctions ou macros suivantes doivent être uniquement utilisées au sein " +"de l'interpréteur et ne font pas partie de l'API publique : :c:func:" +"`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, " +"ainsi que la variable globale :c:data:`_Py_RefTotal`." diff --git a/c-api/reflection.po b/c-api/reflection.po index a59ac82b..d04aea96 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -60,12 +60,14 @@ msgstr "" #: c-api/reflection.rst:36 msgid "Get the *frame* next outer frame." -msgstr "" +msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." #: c-api/reflection.rst:38 msgid "" "Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." msgstr "" +"Renvoie un :term:`strong reference`, ou ``NULL`` si *frame* n'a pas de " +"*frame* encadrante." #: c-api/reflection.rst:60 msgid "*frame* must not be ``NULL``." @@ -73,11 +75,11 @@ msgstr "" #: c-api/reflection.rst:47 msgid "Get the *frame* code." -msgstr "" +msgstr "Obtenir le code *frame*." #: c-api/reflection.rst:49 msgid "Return a :term:`strong reference`." -msgstr "" +msgstr "Renvoie un :term:`strong reference`." #: c-api/reflection.rst:51 msgid "" diff --git a/c-api/stable.po b/c-api/stable.po index 0e0c2607..14dc6a3e 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -16,7 +16,7 @@ msgstr "" #: c-api/stable.rst:7 msgid "C API Stability" -msgstr "" +msgstr "Stabilité de l’API C" #: c-api/stable.rst:9 #, fuzzy @@ -40,12 +40,20 @@ msgid "" "work on 3.10.8 and vice versa, but will need to be compiled separately for " "3.9.x and 3.10.x." msgstr "" +"L’interface binaire de CPython (ABI) est entièrement compatible au sein " +"d’une version mineure (à condition que la compilation soit toujours faite de " +"même manière, comme indiqué dans :ref:`stable-abi-platform` ci-dessous). " +"Ainsi le code compilé pour Python 3.10.0 fonctionnera avec Python 3.10.8 et " +"inversement, mais il devra être compilé séparément pour 3.9.x et 3.10.x." #: c-api/stable.rst:21 msgid "" "Names prefixed by an underscore, such as ``_Py_InternalState``, are private " "API that can change without notice even in patch releases." msgstr "" +"Les noms commençant par un caractère souligné, comme ``_Py_InternalState``, " +"font partie de l’API privée et peuvent changer sans préavis même dans une " +"version de correctif." #: c-api/stable.rst:26 msgid "Stable Application Binary Interface" @@ -58,6 +66,11 @@ msgid "" "multiple versions of Python. Contents of the Limited API are :ref:`listed " "below `." msgstr "" +"Le concept d’*API restreinte*, un sous-ensemble de l’API C de Python, existe " +"depuis Python 3.2. Les extensions qui utilisent uniquement l’API restreinte " +"peuvent être compilées une seule fois et fonctionner avec plusieurs versions " +"de Python. Les objets faisant partie de l’API restreinte sont :ref:" +"`documentés ci-dessous `." #: c-api/stable.rst:33 msgid "" @@ -66,6 +79,11 @@ msgid "" "symbols exposed in the Limited API, but also other ones – for example, " "functions necessary to support older versions of the Limited API." msgstr "" +"Python a aussi une *ABI stable* : un ensemble de symboles qui sont " +"compatibles avec l’ensemble des versions Python 3.x. L’ABI stable contient " +"les symboles utilisés par l’API restreinte, mais pas seulement — par exemple " +"les fonctions nécessaires pour supporter les versions précédentes de l’API " +"restreinte en font aussi partie." #: c-api/stable.rst:38 msgid "" @@ -73,12 +91,17 @@ msgid "" "and Stable ABI work the same way for all uses of the API – for example, " "embedding Python.)" msgstr "" +"(Par simplicité ce document parle *d’extensions*, mais l’API restreinte et " +"l’ABI stable fonctionnent de la même manière pour tous les cas d’usages de " +"l’API — par exemple pour embarquer Python.)" #: c-api/stable.rst:44 msgid "" "Define this macro before including ``Python.h`` to opt in to only use the " "Limited API, and to select the Limited API version." msgstr "" +"Définissez cette macro avant d’inclure ``Python.h`` pour n’inclure que l’API " +"restreinte et indiquer sa version." #: c-api/stable.rst:47 msgid "" @@ -88,6 +111,11 @@ msgid "" "the specified one onward, and can use Limited API introduced up to that " "version." msgstr "" +"Définissez ``Py_LIMITED_API`` à la valeur de :c:data:`PY_VERSION_HEX` " +"correspond à la version minimale de Python que votre extension supporte. " +"Cette extension fonctionnera sans re-compilation avec toutes les versions " +"futures de Python 3, et peut utiliser l’ensemble des éléments de l’API " +"restreinte présent dans cette version." #: c-api/stable.rst:53 msgid "" @@ -95,12 +123,19 @@ msgid "" "minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " "compiling with future Python versions." msgstr "" +"Il est recommandé de renseigner une version mineure minimale (par exemple " +"``0x030A0000`` pour Python 3.10) plutôt que d’utiliser directement la macro " +"``PY_VERSION_HEX`` pour ne pas dépendre de la version de Python utilisée " +"lors de la compilation." #: c-api/stable.rst:57 msgid "" "You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " "``0x03020000`` (Python 3.2, the version that introduced Limited API)." msgstr "" +"Vous pouvez aussi définir ``Py_LIMITED_API`` à ``3``. Cette valeur est " +"équivalente à ``0x03020000`` correspondant à Python 3.2, la première version " +"à supporter l’API restreinte." #: c-api/stable.rst:60 msgid "" @@ -108,6 +143,9 @@ msgid "" "``python3.dll`` rather than a version-specific library such as ``python39." "dll``." msgstr "" +"Sur Windows les extensions qui utilisent l’ABI stable doivent être liées " +"avec ``python3.dll`` et non pas avec une bibliothèque spécifique à une " +"version comme ``python39.dll``." #: c-api/stable.rst:64 msgid "" @@ -117,6 +155,12 @@ msgid "" "to ensure that, for example, extensions built with the 3.10+ Limited API are " "not installed for lower versions of Python." msgstr "" +"Sur certaines plateformes Python essaiera de charger une bibliothèque " +"partagée dont le nom contient ``abi3`` (par exemple ``mymodule.abi3.so``). " +"Il ne vérifie pas si ces extensions respectent l’ABI stable. L’utilisateur " +"(ou ses outils d’administration) doit s’assurer que les extensions compilées " +"avec une version donnée de l’API restreinte, par exemple 3.10+, ne sont pas " +"utilisées avec des versions plus anciennes de Python." #: c-api/stable.rst:71 msgid "" @@ -124,16 +168,23 @@ msgid "" "library, not solely as macros. This makes them usable from languages that " "don't use the C preprocessor." msgstr "" +"Toutes les fonctions de l’ABI stable sont présentes dans la bibliothèque " +"dynamique de Python en tant que fonction, et pas uniquement comme macro. " +"Elles peuvent donc être utilisées avec des langages qui n’utilisent pas le " +"pré-processeur C." #: c-api/stable.rst:77 msgid "Limited API Scope and Performance" -msgstr "" +msgstr "Porté de l’API restreinte et performance" #: c-api/stable.rst:79 msgid "" "The goal for the Limited API is to allow everything that is possible with " "the full C API, but possibly with a performance penalty." msgstr "" +"L’objectif de l’API restreinte est de permettre l’ensemble des opérations " +"possibles avec l’API C étendue, mais peut avoir un impact sur les " +"performances." #: c-api/stable.rst:82 msgid "" @@ -141,6 +192,10 @@ msgid "" "variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " "can rely on version-specific implementation details of the list object." msgstr "" +"Par exemple la fonction :c:func:`PyList_GetItem` est disponible, mais la " +"macro « dangereuse » :c:func:`PyList_GET_ITEM` ne l’est pas. Cette macro " +"peut être plus rapide car elle dépend de détails d’implémentation spécifique " +"à l’objet ``list``." #: c-api/stable.rst:87 msgid "" @@ -149,6 +204,11 @@ msgid "" "allowing stability as Python's data structures are improved, but possibly " "reducing performance." msgstr "" +"Si ``Py_LIMITED_API`` n’est pas défini certaines fonctions de l’API C seront " +"remplacées par des macros ou une version en-ligne. Définir " +"``Py_LIMITED_API`` désactive cette optimisation, permettant de se garantir " +"contre les évolutions des structures de données utilisées par Python, et " +"peut réduire les performances." #: c-api/stable.rst:92 msgid "" @@ -159,10 +219,17 @@ msgid "" "where a version-specific one is not available – for example, for prereleases " "of an upcoming Python version." msgstr "" +"En omettant la définition de ``Py_LIMITED_API`` il est possible de compiler " +"une extension utilisant l’API restreinte avec une version spécifique de " +"l’ABI. Les performances seront meilleures pour cette version de Python, mais " +"la compatibilité sera réduite. Compiler en définissant ``Py_LIMITED_API`` " +"produira une extension qui peut être utilisée quand une variante spécifique " +"à une version n’est pas disponible — par exemple pour une version alpha de " +"Python." #: c-api/stable.rst:101 msgid "Limited API Caveats" -msgstr "" +msgstr "Inconvénients de l’API restreinte" #: c-api/stable.rst:103 msgid "" @@ -171,6 +238,10 @@ msgid "" "only covers definitions, but an API also includes other issues, such as " "expected semantics." msgstr "" +"Compiler avec ``Py_LIMITED_API`` *n’est pas* une garantie absolue que le " +"code est conforme à l’API restreinte ou à l’ABI stable. ``Py_LIMITED_API`` " +"ne concerne que la définition des objets, mais une API inclut aussi d’autres " +"spécificités comme le comportement attendu." #: c-api/stable.rst:108 msgid "" @@ -181,18 +252,31 @@ msgid "" "the argument will be used directly, causing a ``NULL`` dereference and " "crash. A similar argument works for fields of structs." msgstr "" +"Une des limitations est que ``Py_LIMITED_API`` ne protège pas contre l’appel " +"d’une fonction avec des arguments qui sont invalides pour une version de " +"Python plus ancienne. Par exemple considérons une fonction qui accepte " +"``NULL`` comme argument à partir de 3.9. ``NULL`` permet maintenant " +"d’utiliser le comportement par défaut, mais Python 3.8 essayera d’accéder à " +"l’objet pointé et dé-référencera ``NULL``, causant un crash. Des problèmes " +"similaires peuvent se produire avec les attributs des structures." #: c-api/stable.rst:115 msgid "" "Another issue is that some struct fields are currently not hidden when " "``Py_LIMITED_API`` is defined, even though they're part of the Limited API." msgstr "" +"Un autre problème est que certains attributs ne sont pas encore cachés " +"lorsque ``Py_LIMITED_API`` est défini, même s’ils ne font pas partie de " +"l’API restreinte." #: c-api/stable.rst:118 msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " "versions it supports, and preferably to build with the *lowest* such version." msgstr "" +"Pour ces raisons il est recommandé de tester une extension avec *l’ensemble " +"des versions mineures* supportées de Python, et généralement de la compiler " +"avec la plus *ancienne* de ces versions." #: c-api/stable.rst:121 msgid "" @@ -201,6 +285,11 @@ msgid "" "few private declarations are exposed for technical reasons (or even " "unintentionally, as bugs)." msgstr "" +"Il est aussi recommandé de vérifier la documentation de toutes les API " +"utilisées pour vérifier qu’elles fassent bien partie de l’API restreinte. " +"Même lorsque ``Py_LIMITED_API`` est défini quelques fonctions privées " +"peuvent être exposées aux utilisateurs pour des raisons techniques, ou par " +"erreur." #: c-api/stable.rst:126 msgid "" @@ -210,10 +299,15 @@ msgid "" "particular, parts of the Limited API may be deprecated and removed, provided " "that the Stable ABI stays stable." msgstr "" +"Notez aussi que l’API restreinte n’est pas forcément stable : compiler avec " +"Python 3.8 en définissant ``Py_LIMITED_API`` garanti que l’extension " +"fonctionnera avec Python 3.12, mais pas qu’elle pourra *être compilée* avec " +"Python 3.12. En particulier certaines parties de l’API restreinte peuvent " +"être dépréciées et retirées tant que l’ABI stable n’est pas modifiée." #: c-api/stable.rst:136 msgid "Platform Considerations" -msgstr "" +msgstr "Considérations relatives aux plateformes" #: c-api/stable.rst:138 msgid "" @@ -222,6 +316,11 @@ msgid "" "ABI, these details define a “platform”. They usually depend on the OS type " "and processor architecture" msgstr "" +"La stabilité de l’ABI ne dépend pas que de Python mais aussi du compilateur " +"utilisé, des bibliothèques systèmes et des options du compilateur. " +"L’ensemble de ces détails correspondent à ce que l’ABI stable appelle une " +"« plateforme ». Ils dépendent généralement du système d’exploitation et de " +"l’architecture du processeur." #: c-api/stable.rst:143 msgid "" @@ -230,14 +329,19 @@ msgid "" "does not break the Stable ABI. This is the case with Windows and macOS " "releases from ``python.org`` and many third-party distributors." msgstr "" +"Les distributeurs de Python doivent s’assurer que toutes les versions de " +"Python pour une plateforme donnée sont compilées de manière à ne pas rompre " +"la compatibilité de l’ABI stable. C’est le cas des versions produites pour " +"Windows et macOS de ``python.org`` et de la plupart des distributions " +"tierces." #: c-api/stable.rst:153 msgid "Contents of Limited API" -msgstr "" +msgstr "Contenu de l’API restreinte" #: c-api/stable.rst:156 msgid "Currently, the Limited API includes the following items:" -msgstr "" +msgstr "Pour le moment l’API restreinte inclut les éléments suivants :" #~ msgid "" #~ "Unfortunately, the API compatibility does not extend to binary " diff --git a/c-api/structures.po b/c-api/structures.po index 2a3ea931..d102639b 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -644,7 +644,7 @@ msgstr "" #: c-api/structures.rst:493 msgid "name" -msgstr "" +msgstr "nom" #: c-api/structures.rst:493 msgid "attribute name" diff --git a/c-api/unicode.po b/c-api/unicode.po index be87d162..e9bbe291 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -16,11 +16,11 @@ msgstr "" #: c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" -msgstr "" +msgstr "Objets Unicode et Codecs" #: c-api/unicode.rst:12 msgid "Unicode Objects" -msgstr "" +msgstr "Objets Unicode" #: c-api/unicode.rst:14 msgid "" @@ -31,6 +31,12 @@ msgid "" "65536; otherwise, code points must be below 1114112 (which is the full " "Unicode range)." msgstr "" +"Depuis l'implémentation de :pep:`393` dans Python 3.3, les objets Unicode " +"utilisent une variété de représentations internes, pour permettre de gérer " +"l'intervalle complet des caractères Unicode en restant efficace en termes de " +"mémoire. Il y a des cas spéciaux pour les chaînes où tous les points de code " +"sont inférieurs à 128, 256, ou 65536 ; sinon, les points de code doivent " +"être inférieurs à 1114112 (qui est l'intervalle Unicode complet)." #: c-api/unicode.rst:20 msgid "" @@ -38,12 +44,18 @@ msgid "" "cached in the Unicode object. The :c:expr:`Py_UNICODE*` representation is " "deprecated and inefficient." msgstr "" +"Des représentations :c:expr:`Py_UNICODE*` et UTF-8 sont créées à la demande " +"et mises en cache dans l'objet Unicode. La représentation :c:expr:" +"`Py_UNICODE*` est dépréciée et inefficace." #: c-api/unicode.rst:24 msgid "" "Due to the transition between the old APIs and the new APIs, Unicode objects " "can internally be in two states depending on how they were created:" msgstr "" +"En raison de la transition des anciennes APIs vers les nouvelles APIs, les " +"objets Unicode peuvent être dans deux états internes selon comment ils ont " +"été créés :" #: c-api/unicode.rst:27 msgid "" @@ -51,6 +63,9 @@ msgid "" "Unicode API. They use the most efficient representation allowed by the " "implementation." msgstr "" +"Les objets Unicode « canoniques » sont tous les objets créés par une API " +"Unicode non-dépréciée. Ils utilisent la représentation la plus efficace " +"permise par l'implémentation." #: c-api/unicode.rst:31 msgid "" @@ -59,6 +74,10 @@ msgid "" "`Py_UNICODE*` representation; you will have to call :c:func:" "`PyUnicode_READY` on them before calling any other API." msgstr "" +"Les objets Unicode « historiques » ont été créés via une des APIs dépréciées " +"(typiquement :c:func:`PyUnicode_FromUnicode`) et supportent uniquement la " +"représentation :c:expr:`Py_UNICODE*`; vous devrez appeler :c:func:" +"`PyUnicode_READY` sur eux avant d'appeler n'importe quelle autre API." #: c-api/unicode.rst:37 msgid "" @@ -66,16 +85,21 @@ msgid "" "APIs. All Unicode objects will be \"canonical\" since then. See :pep:`623` " "for more information." msgstr "" +"Les objets Unicode « historiques » vont être supprimés de Python 3.12 avec " +"les APIs dépréciées. Tous les objets Unicode vont être « canoniques » à " +"partir de là. Voir :pep:`623` pour plus d'information." #: c-api/unicode.rst:43 msgid "Unicode Type" -msgstr "" +msgstr "Type Unicode" #: c-api/unicode.rst:45 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" msgstr "" +"Voici les types d'objets Unicode utilisés pour l'implémentation Unicode en " +"Python :" #: c-api/unicode.rst:52 msgid "" @@ -83,12 +107,17 @@ msgid "" "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " "single Unicode characters, use :c:type:`Py_UCS4`." msgstr "" +"Voici les *typedefs* pour les types entiers non signés suffisamment large " +"pour contenir des caractères de 32 bits, 16 bits et 8 bits, respectivement. " +"Pour traiter des caractères uniques, utilisez :c:type:`Py_UCS4`." #: c-api/unicode.rst:61 msgid "" "This is a typedef of :c:expr:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform." msgstr "" +"Ceci est un *typedef* de :c:expr:`wchar_t`, qui est un type 16-bit ou un " +"type 32-bit selon la plateforme." #: c-api/unicode.rst:64 msgid "" @@ -96,6 +125,9 @@ msgid "" "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" +"Dans les versions précédentes, ceci était un type 16-bit ou un type 32-bit " +"selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " +"à la compilation." #: c-api/unicode.rst:74 msgid "" diff --git a/glossary.po b/glossary.po index f887e664..56a59d6f 100644 --- a/glossary.po +++ b/glossary.po @@ -345,6 +345,11 @@ msgid "" "using a dotted expression, and would instead need to be retrieved with :func:" "`getattr`." msgstr "" +"Il est possible de donner à un objet un attribut dont le nom n'est pas un " +"identifiant tel que défini pour les :ref:`identifiers`, par exemple en " +"utilisant :func:`setattr`, si l'objet le permet. Un tel attribut ne sera pas " +"accessible à l'aide d'une expression pointée et on devra y accéder avec :" +"func:`getattr`." #: glossary.rst:149 msgid "awaitable" @@ -511,6 +516,8 @@ msgid "" "A callable is an object that can be called, possibly with a set of arguments " "(see :term:`argument`), with the following syntax::" msgstr "" +"Un appelable est un objet qui peut être appelé, éventuellement avec un " +"ensemble d'arguments (voir :term:`argument`), avec la syntaxe suivante ::" #: glossary.rst:219 msgid "" @@ -518,6 +525,9 @@ msgid "" "instance of a class that implements the :meth:`~object.__call__` method is " "also a callable." msgstr "" +"Une :term:`fonction `, et par extension une :term:`méthode " +"`, est un appelable. Une instance d'une classe qui implémente la " +"méthode :meth:`~object.__call__` est également un appelable." #: glossary.rst:222 msgid "callback" @@ -1034,6 +1044,11 @@ msgid "" "filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" "c:type:`PyConfig`." msgstr "" +"L':term:`encodage du système de fichiers et gestionnaire d'erreurs associé " +"` sont configurés au démarrage de " +"Python par la fonction :c:func:`PyConfig_Read` : regardez :c:member:" +"`~PyConfig.filesystem_encoding` et :c:member:`~PyConfig.filesystem_errors` " +"dans les membres de :c:type:`PyConfig`." #: glossary.rst:437 msgid "See also the :term:`locale encoding`." @@ -2715,18 +2730,27 @@ msgid "" "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " "serialized as a sequence of bytes." msgstr "" +"Une chaîne de caractères en Python est une suite de points de code Unicode " +"(dans l'intervalle ``U+0000``--``U+10FFFF``). Pour stocker ou transmettre " +"une chaîne, il est nécessaire de la sérialiser en suite d'octets." #: glossary.rst:1160 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." msgstr "" +"Sérialiser une chaîne de caractères en une suite d'octets s'appelle " +"« encoder » et recréer la chaîne à partir de la suite d'octets s'appelle " +"« décoder »." #: glossary.rst:1163 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" +"Il existe de multiples :ref:`codecs ` pour la " +"sérialisation de texte, que l'on regroupe sous l'expression « encodages de " +"texte »." #: glossary.rst:1166 msgid "text file" diff --git a/howto/curses.po b/howto/curses.po index 9a054a96..19f6013c 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -141,6 +141,9 @@ msgid "" "ported version called `UniCurses `_ is " "available." msgstr "" +"La version Windows de Python n'inclut pas le module :mod:`curses`. Une " +"version portée appelée `UniCurses `_ est " +"disponible." #: howto/curses.rst:62 msgid "The Python curses module" diff --git a/howto/descriptor.po b/howto/descriptor.po index 06ceed9b..e498e200 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -44,22 +44,29 @@ msgid "" ":term:`Descriptors ` let objects customize attribute lookup, " "storage, and deletion." msgstr "" +"Les :term:`descripteurs ` permettent de personnaliser la " +"recherche, le stockage et la suppression des attributs des objets." #: howto/descriptor.rst:16 msgid "This guide has four major sections:" -msgstr "" +msgstr "Ce guide comporte quatre parties principales :" #: howto/descriptor.rst:18 msgid "" "The \"primer\" gives a basic overview, moving gently from simple examples, " "adding one feature at a time. Start here if you're new to descriptors." msgstr "" +"l'« introduction » donne un premier aperçu, en partant d'exemples simples, " +"puis en ajoutant une fonctionnalité à la fois. Commencez par là si vous " +"débutez avec les descripteurs ;" #: howto/descriptor.rst:21 msgid "" "The second section shows a complete, practical descriptor example. If you " "already know the basics, start there." msgstr "" +"la deuxième partie montre un exemple de descripteur complet et pratique. Si " +"vous connaissez déjà les bases, commencez par là ;" #: howto/descriptor.rst:24 msgid "" @@ -67,6 +74,9 @@ msgid "" "detailed mechanics of how descriptors work. Most people don't need this " "level of detail." msgstr "" +"la troisième partie fournit un didacticiel plus technique qui décrit de " +"manière détaillée comment fonctionnent les descripteurs. La plupart des gens " +"n'ont pas besoin de ce niveau de détail ;" #: howto/descriptor.rst:28 msgid "" @@ -75,38 +85,51 @@ msgid "" "bound methods or about the implementation of common tools like :func:" "`classmethod`, :func:`staticmethod`, :func:`property`, and :term:`__slots__`." msgstr "" +"la dernière partie contient des équivalents en pur Python des descripteurs " +"natifs écrits en C. Lisez ceci si vous êtes curieux de savoir comment les " +"fonctions se transforment en méthodes liées ou si vous voulez connaître " +"l'implémentation d'outils courants comme :func:`classmethod`, :func:" +"`staticmethod`, :func:`property` et :term:`__slots__`." #: howto/descriptor.rst:36 msgid "Primer" -msgstr "" +msgstr "Introduction" #: howto/descriptor.rst:38 msgid "" "In this primer, we start with the most basic possible example and then we'll " "add new capabilities one by one." msgstr "" +"Dans cette introduction, nous commençons par l'exemple le plus simple " +"possible, puis nous ajoutons de nouvelles fonctionnalités une par une." #: howto/descriptor.rst:43 msgid "Simple example: A descriptor that returns a constant" -msgstr "" +msgstr "Un exemple simple : un descripteur qui renvoie une constante" #: howto/descriptor.rst:45 msgid "" "The :class:`Ten` class is a descriptor whose :meth:`__get__` method always " "returns the constant ``10``:" msgstr "" +"La classe :class:`Ten` est un descripteur dont la méthode :meth:`__get__` " +"renvoie toujours la constante ``10`` :" #: howto/descriptor.rst:54 msgid "" "To use the descriptor, it must be stored as a class variable in another " "class:" msgstr "" +"Pour utiliser le descripteur, il doit être stocké en tant que variable de " +"classe dans une autre classe :" #: howto/descriptor.rst:62 msgid "" "An interactive session shows the difference between normal attribute lookup " "and descriptor lookup:" msgstr "" +"Une session interactive montre la différence entre la recherche d'attribut " +"normale et la recherche *via* un descripteur :" #: howto/descriptor.rst:73 msgid "" @@ -115,39 +138,55 @@ msgid "" "descriptor instance, recognized by its ``__get__`` method. Calling that " "method returns ``10``." msgstr "" +"Dans la recherche d'attribut ``a.x``, l'opérateur « point » trouve ``'x': " +"5`` dans le dictionnaire de classe. Dans la recherche ``a.y``, l'opérateur " +"« point » trouve une instance de descripteur, reconnue par sa méthode " +"``__get__``. L'appel de cette méthode renvoie ``10``." #: howto/descriptor.rst:78 msgid "" "Note that the value ``10`` is not stored in either the class dictionary or " "the instance dictionary. Instead, the value ``10`` is computed on demand." msgstr "" +"Notez que la valeur ``10`` n'est stockée ni dans le dictionnaire de classe " +"ni dans le dictionnaire d'instance. Non, la valeur ``10`` est calculée à la " +"demande." #: howto/descriptor.rst:81 msgid "" "This example shows how a simple descriptor works, but it isn't very useful. " "For retrieving constants, normal attribute lookup would be better." msgstr "" +"Cet exemple montre comment fonctionne un descripteur simple, mais il n'est " +"pas très utile. Pour récupérer des constantes, une recherche d'attribut " +"normale est préférable." #: howto/descriptor.rst:84 msgid "" "In the next section, we'll create something more useful, a dynamic lookup." msgstr "" +"Dans la section suivante, nous allons créer quelque chose de plus utile, une " +"recherche dynamique." #: howto/descriptor.rst:88 msgid "Dynamic lookups" -msgstr "" +msgstr "Recherches dynamiques" #: howto/descriptor.rst:90 msgid "" "Interesting descriptors typically run computations instead of returning " "constants:" msgstr "" +"Les descripteurs intéressants exécutent généralement des calculs au lieu de " +"renvoyer des constantes :" #: howto/descriptor.rst:109 msgid "" "An interactive session shows that the lookup is dynamic — it computes " "different, updated answers each time::" msgstr "" +"Une session interactive montre que la recherche est dynamique — elle calcule " +"des réponses différentes, mises à jour à chaque fois ::" #: howto/descriptor.rst:122 msgid "" @@ -158,10 +197,16 @@ msgid "" "that lets the :meth:`__get__` method learn the target directory. The " "*objtype* parameter is the class *Directory*." msgstr "" +"En plus de montrer comment les descripteurs peuvent exécuter des calculs, " +"cet exemple révèle également le but des paramètres de :meth:`__get__`. Le " +"paramètre *self* est *size*, une instance de *DirectorySize*. Le paramètre " +"*obj* est soit *g* soit *s*, une instance de *Directory*. C'est le paramètre " +"*obj* qui permet à la méthode :meth:`__get__` de connaître le répertoire " +"cible. Le paramètre *objtype* est la classe *Directory*." #: howto/descriptor.rst:131 msgid "Managed attributes" -msgstr "" +msgstr "Attributs gérés" #: howto/descriptor.rst:133 msgid "" @@ -171,6 +216,12 @@ msgid "" "dictionary. The descriptor's :meth:`__get__` and :meth:`__set__` methods " "are triggered when the public attribute is accessed." msgstr "" +"Une utilisation courante des descripteurs est la gestion de l'accès aux " +"données d'instances. Le descripteur est affecté à un attribut public dans le " +"dictionnaire de classe tandis que les données réelles sont stockées en tant " +"qu'attribut privé dans le dictionnaire d'instance. Les méthodes :meth:" +"`__get__` et :meth:`__set__` du descripteur sont déclenchées lors de l'accès " +"à l'attribut public." #: howto/descriptor.rst:139 msgid "" @@ -178,12 +229,18 @@ msgid "" "private attribute. When the public attribute is accessed, the descriptor " "logs the lookup or update:" msgstr "" +"Dans l'exemple qui suit, *age* est l'attribut public et *_age* est " +"l'attribut privé. Lors de l'accès à l'attribut public, le descripteur " +"journalise la recherche ou la mise à jour :" #: howto/descriptor.rst:172 msgid "" "An interactive session shows that all access to the managed attribute *age* " "is logged, but that the regular attribute *name* is not logged:" msgstr "" +"Une session interactive montre que tous les accès à l'attribut géré *age* " +"sont consignés, mais que rien n'est journalisé pour l'attribut normal " +"*name* :" #: howto/descriptor.rst:206 msgid "" @@ -192,16 +249,22 @@ msgid "" "only have one logged attribute and that its name is unchangeable. In the " "next example, we'll fix that problem." msgstr "" +"Un problème majeur avec cet exemple est que le nom privé *_age* est écrit en " +"dur dans la classe *LoggedAgeAccess*. Cela signifie que chaque instance ne " +"peut avoir qu'un seul attribut journalisé et que son nom est immuable. Dans " +"l'exemple suivant, nous allons résoudre ce problème." #: howto/descriptor.rst:213 msgid "Customized names" -msgstr "" +msgstr "Noms personnalisés" #: howto/descriptor.rst:215 msgid "" "When a class uses descriptors, it can inform each descriptor about which " "variable name was used." msgstr "" +"Lorsqu'une classe utilise des descripteurs, elle peut informer chaque " +"descripteur du nom de variable utilisé." #: howto/descriptor.rst:218 msgid "" @@ -211,6 +274,11 @@ msgid "" "can be recorded, giving each descriptor its own *public_name* and " "*private_name*:" msgstr "" +"Dans cet exemple, la classe :class:`Person` a deux instances de " +"descripteurs, *name* et *age*. Lorsque la classe :class:`Person` est " +"définie, :meth:`__set_name__` est appelée automatiquement dans " +"*LoggedAccess* afin que les noms de champs puissent être enregistrés, en " +"donnant à chaque descripteur ses propres *public_name* et *private_name* :" #: howto/descriptor.rst:256 msgid "" @@ -218,24 +286,30 @@ msgid "" "`__set_name__` so that the field names would be recorded. Here we call :" "func:`vars` to look up the descriptor without triggering it:" msgstr "" +"Une session interactive montre que la classe :class:`Person` a appelé :meth:" +"`__set_name__` pour que les noms des champs soient enregistrés. Ici, nous " +"appelons :func:`vars` pour rechercher le descripteur sans le déclencher :" #: howto/descriptor.rst:267 msgid "The new class now logs access to both *name* and *age*:" msgstr "" +"La nouvelle classe enregistre désormais l'accès à la fois à *name* et *age* :" #: howto/descriptor.rst:284 msgid "The two *Person* instances contain only the private names:" -msgstr "" +msgstr "Les deux instances de *Person* ne contiennent que les noms privés :" #: howto/descriptor.rst:295 msgid "Closing thoughts" -msgstr "" +msgstr "Réflexions finales" #: howto/descriptor.rst:297 msgid "" "A :term:`descriptor` is what we call any object that defines :meth:" "`__get__`, :meth:`__set__`, or :meth:`__delete__`." msgstr "" +"Nous appelons :term:`descripteur ` tout objet qui définit :meth:" +"`__get__`, :meth:`__set__` ou :meth:`__delete__`." #: howto/descriptor.rst:300 msgid "" @@ -244,6 +318,11 @@ msgid "" "it was created or the name of class variable it was assigned to. (This " "method, if present, is called even if the class is not a descriptor.)" msgstr "" +"Facultativement, les descripteurs peuvent avoir une méthode :meth:" +"`__set_name__`. Elle n'est utile que dans les cas où un descripteur doit " +"connaître soit la classe dans laquelle il a été créé, soit le nom de la " +"variable de classe à laquelle il a été affecté (cette méthode, si elle est " +"présente, est appelée même si la classe n'est pas un descripteur)." #: howto/descriptor.rst:305 msgid "" @@ -251,18 +330,28 @@ msgid "" "descriptor is accessed indirectly with ``vars(some_class)" "[descriptor_name]``, the descriptor instance is returned without invoking it." msgstr "" +"Les descripteurs sont invoqués par l'opérateur « point » lors de la " +"recherche d'attribut. Si on accède indirectement au descripteur avec " +"``vars(some_class)[descriptor_name]``, l'instance du descripteur est " +"renvoyée sans l'invoquer." #: howto/descriptor.rst:309 msgid "" "Descriptors only work when used as class variables. When put in instances, " "they have no effect." msgstr "" +"Les descripteurs ne fonctionnent que lorsqu'ils sont utilisés comme " +"variables de classe. Lorsqu'ils sont placés dans des instances, ils n'ont " +"aucun effet." #: howto/descriptor.rst:312 msgid "" "The main motivation for descriptors is to provide a hook allowing objects " "stored in class variables to control what happens during attribute lookup." msgstr "" +"La principale raison d'être des descripteurs est de fournir un point " +"d'entrée permettant aux objets stockés dans des variables de classe de " +"contrôler ce qui se passe lors de la recherche d'attributs." #: howto/descriptor.rst:315 msgid "" @@ -270,6 +359,9 @@ msgid "" "Descriptors invert that relationship and allow the data being looked-up to " "have a say in the matter." msgstr "" +"Traditionnellement, la classe appelante contrôle ce qui se passe pendant la " +"recherche. Les descripteurs inversent cette relation et permettent aux " +"données recherchées d'avoir leur mot à dire." #: howto/descriptor.rst:319 msgid "" @@ -278,20 +370,26 @@ msgid "" "`staticmethod`, :func:`property`, and :func:`functools.cached_property` are " "all implemented as descriptors." msgstr "" +"Les descripteurs sont utilisés partout dans le langage. C'est ainsi que les " +"fonctions se transforment en méthodes liées. Les outils courants tels que :" +"func:`classmethod`, :func:`staticmethod`, :func:`property` et :func:" +"`functools.cached_property` sont tous implémentés en tant que descripteurs." #: howto/descriptor.rst:326 msgid "Complete Practical Example" -msgstr "" +msgstr "Exemple complet pratique" #: howto/descriptor.rst:328 msgid "" "In this example, we create a practical and powerful tool for locating " "notoriously hard to find data corruption bugs." msgstr "" +"Dans cet exemple, nous créons un outil pratique et puissant pour localiser " +"les bogues de corruption de données notoirement difficiles à trouver." #: howto/descriptor.rst:333 msgid "Validator class" -msgstr "" +msgstr "Classe « validateur »" #: howto/descriptor.rst:335 msgid "" @@ -300,31 +398,43 @@ msgid "" "restrictions. If those restrictions aren't met, it raises an exception to " "prevent data corruption at its source." msgstr "" +"Un validateur est un descripteur pour l'accès aux attributs gérés. Avant de " +"stocker des données, il vérifie que la nouvelle valeur respecte différentes " +"restrictions de type et de plage. Si ces restrictions ne sont pas " +"respectées, il lève une exception pour empêcher la corruption des données à " +"la source." #: howto/descriptor.rst:340 msgid "" "This :class:`Validator` class is both an :term:`abstract base class` and a " "managed attribute descriptor:" msgstr "" +"Cette classe :class:`Validator` est à la fois une :term:`classe mère " +"abstraite ` et un descripteur d'attributs gérés :" #: howto/descriptor.rst:363 msgid "" "Custom validators need to inherit from :class:`Validator` and must supply a :" "meth:`validate` method to test various restrictions as needed." msgstr "" +"Les validateurs personnalisés doivent hériter de :class:`Validator` et " +"doivent fournir une méthode :meth:`validate` pour tester diverses " +"restrictions adaptées aux besoins." #: howto/descriptor.rst:368 msgid "Custom validators" -msgstr "" +msgstr "Validateurs personnalisés" #: howto/descriptor.rst:370 msgid "Here are three practical data validation utilities:" -msgstr "" +msgstr "Voici trois utilitaires concrets de validation de données :" #: howto/descriptor.rst:372 msgid "" ":class:`OneOf` verifies that a value is one of a restricted set of options." msgstr "" +":class:`OneOf` vérifie qu'une valeur fait partie d'un ensemble limité de " +"valeurs ;" #: howto/descriptor.rst:374 msgid "" @@ -332,6 +442,9 @@ msgid "" "`float`. Optionally, it verifies that a value is between a given minimum or " "maximum." msgstr "" +":class:`Number` vérifie qu'une valeur est soit un :class:`int` soit un :" +"class:`float`. Facultativement, il vérifie qu'une valeur se situe entre un " +"minimum ou un maximum donnés ;" #: howto/descriptor.rst:378 msgid "" @@ -340,28 +453,36 @@ msgid "" "`predicate `_ " "as well." msgstr "" +":class:`String` vérifie qu'une valeur est une :class:`chaîne de caractères " +"`. Éventuellement, il valide les longueurs minimale ou maximale " +"données. Il peut également valider un `prédicat `_ défini par l'utilisateur." #: howto/descriptor.rst:437 msgid "Practical application" -msgstr "" +msgstr "Application pratique" #: howto/descriptor.rst:439 msgid "Here's how the data validators can be used in a real class:" msgstr "" +"Voici comment les validateurs de données peuvent être utilisés par une " +"classe réelle :" #: howto/descriptor.rst:454 msgid "The descriptors prevent invalid instances from being created:" -msgstr "" +msgstr "Les descripteurs empêchent la création d'instances non valides :" #: howto/descriptor.rst:481 msgid "Technical Tutorial" -msgstr "" +msgstr "Tutoriel technique" #: howto/descriptor.rst:483 msgid "" "What follows is a more technical tutorial for the mechanics and details of " "how descriptors work." msgstr "" +"Ce qui suit est un tutoriel plus technique relatif aux mécanismes et détails " +"de fonctionnement des descripteurs." #: howto/descriptor.rst:488 msgid "Abstract" @@ -372,6 +493,9 @@ msgid "" "Defines descriptors, summarizes the protocol, and shows how descriptors are " "called. Provides an example showing how object relational mappings work." msgstr "" +"Ce tutoriel définit des descripteurs, résume le protocole et montre comment " +"les descripteurs sont appelés. Il fournit un exemple montrant comment " +"fonctionnent les correspondances relationnelles entre objets." #: howto/descriptor.rst:493 #, fuzzy @@ -512,7 +636,7 @@ msgstr "" #: howto/descriptor.rst:552 msgid "Overview of descriptor invocation" -msgstr "" +msgstr "Présentation de l'appel de descripteur" #: howto/descriptor.rst:554 #, fuzzy @@ -528,6 +652,8 @@ msgid "" "But it is more common for a descriptor to be invoked automatically from " "attribute access." msgstr "" +"Mais il est plus courant qu'un descripteur soit invoqué automatiquement à " +"partir d'un accès à un attribut." #: howto/descriptor.rst:560 msgid "" @@ -536,6 +662,10 @@ msgid "" "instance ``__dict__``, its :meth:`__get__` method is invoked according to " "the precedence rules listed below." msgstr "" +"L'expression ``obj.x`` recherche l'attribut ``x`` dans les espaces de noms " +"pour ``obj``. Si la recherche trouve un descripteur en dehors de l'instance " +"``__dict__``, sa méthode :meth:`__get__` est appelée selon les règles de " +"priorité listées ci-dessous." #: howto/descriptor.rst:565 #, fuzzy @@ -548,7 +678,7 @@ msgstr "" #: howto/descriptor.rst:570 msgid "Invocation from an instance" -msgstr "" +msgstr "Appel depuis une instance" #: howto/descriptor.rst:572 msgid "" @@ -557,18 +687,26 @@ msgid "" "descriptors, then class variables, and lastly :meth:`__getattr__` if it is " "provided." msgstr "" +"La recherche d'instance consiste à parcourir la liste d'espaces de noms en " +"donnant aux descripteurs de données la priorité la plus élevée, suivis des " +"variables d'instance, puis des descripteurs hors-données, puis des variables " +"de classe, et enfin :meth:`__getattr__` s'il est fourni." #: howto/descriptor.rst:577 msgid "" "If a descriptor is found for ``a.x``, then it is invoked with: ``desc." "__get__(a, type(a))``." msgstr "" +"Si un descripteur est trouvé pour ``a.x``, alors il est appelé par ``desc." +"__get__(a, type(a))``." #: howto/descriptor.rst:580 msgid "" "The logic for a dotted lookup is in :meth:`object.__getattribute__`. Here " "is a pure Python equivalent:" msgstr "" +"La logique d'une recherche « après un point » se trouve dans :meth:`object." +"__getattribute__`. Voici un équivalent en Python pur :" #: howto/descriptor.rst:719 msgid "" @@ -576,6 +714,10 @@ msgid "" "code. That is why calling :meth:`__getattribute__` directly or with " "``super().__getattribute__`` will bypass :meth:`__getattr__` entirely." msgstr "" +"Notez qu'il n'y a pas d'appel vers :meth:`__getattr__` dans le code de :meth:" +"`__getattribute__`. C'est pourquoi appeler :meth:`__getattribute__` " +"directement ou avec ``super().__getattribute__`` contourne entièrement :meth:" +"`__getattr__`." #: howto/descriptor.rst:723 msgid "" @@ -584,6 +726,10 @@ msgid "" "`__getattribute__` raises an :exc:`AttributeError`. Their logic is " "encapsulated in a helper function:" msgstr "" +"Au lieu, c'est l'opérateur « point » et la fonction :func:`getattr` qui sont " +"responsables de l'appel de :meth:`__getattr__` chaque fois que :meth:" +"`__getattribute__` déclenche une :exc:`AttributeError`. Cette logique est " +"présentée encapsulée dans une fonction utilitaire :" #: howto/descriptor.rst:773 #, fuzzy @@ -597,26 +743,36 @@ msgid "" "__getattribute__` but the instance dictionary lookup is replaced by a search " "through the class's :term:`method resolution order`." msgstr "" +"La logique pour une recherche « après un point » telle que ``A.x`` se trouve " +"dans :meth:`type.__getattribute__`. Les étapes sont similaires à celles de :" +"meth:`object.__getattribute__` mais la recherche dans le dictionnaire " +"d'instance est remplacée par une recherche suivant l':term:`ordre de " +"résolution des méthodes ` de la classe." #: howto/descriptor.rst:780 msgid "If a descriptor is found, it is invoked with ``desc.__get__(None, A)``." msgstr "" +"Si un descripteur est trouvé, il est appelé par ``desc.__get__(None, A)``." #: howto/descriptor.rst:782 msgid "" "The full C implementation can be found in :c:func:`type_getattro()` and :c:" "func:`_PyType_Lookup()` in :source:`Objects/typeobject.c`." msgstr "" +"L'implémentation C complète peut être trouvée dans :c:func:`type_getattro()` " +"et :c:func:`_PyType_Lookup()` dans :source:`Objects/typeobject.c`." #: howto/descriptor.rst:787 msgid "Invocation from super" -msgstr "" +msgstr "Appel depuis super" #: howto/descriptor.rst:789 msgid "" "The logic for super's dotted lookup is in the :meth:`__getattribute__` " "method for object returned by :class:`super()`." msgstr "" +"La logique de la recherche « après un point » de super se trouve dans la " +"méthode :meth:`__getattribute__` de l'objet renvoyé par :class:`super()`." #: howto/descriptor.rst:792 #, fuzzy @@ -648,13 +804,15 @@ msgstr "" #: howto/descriptor.rst:804 msgid "Summary of invocation logic" -msgstr "" +msgstr "Résumé de la logique d'appel" #: howto/descriptor.rst:806 msgid "" "The mechanism for descriptors is embedded in the :meth:`__getattribute__()` " "methods for :class:`object`, :class:`type`, and :func:`super`." msgstr "" +"Le fonctionnement des descripteurs se trouve dans les méthodes :meth:" +"`__getattribute__()` de :class:`object`, :class:`type` et :func:`super`." #: howto/descriptor.rst:809 msgid "The important points to remember are:" @@ -670,6 +828,8 @@ msgid "" "Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" "`super`." msgstr "" +"les classes héritent ce mécanisme de :class:`object`, :class:`type` ou :func:" +"`super` ;" #: howto/descriptor.rst:816 #, fuzzy @@ -707,7 +867,7 @@ msgstr "" #: howto/descriptor.rst:830 msgid "Automatic name notification" -msgstr "" +msgstr "Notification automatique des noms" #: howto/descriptor.rst:832 msgid "" @@ -718,6 +878,13 @@ msgid "" "with two arguments. The *owner* is the class where the descriptor is used, " "and the *name* is the class variable the descriptor was assigned to." msgstr "" +"Il est parfois souhaitable qu'un descripteur sache à quel nom de variable de " +"classe il a été affecté. Lorsqu'une nouvelle classe est créée, la " +"métaclasse :class:`type` parcourt le dictionnaire de la nouvelle classe. Si " +"l'une des entrées est un descripteur et si elle définit :meth:" +"`__set_name__`, cette méthode est appelée avec deux arguments : *owner* " +"(propriétaire) est la classe où le descripteur est utilisé, et *name* est la " +"variable de classe à laquelle le descripteur a été assigné." #: howto/descriptor.rst:839 #, fuzzy @@ -735,10 +902,14 @@ msgid "" "place at the time of class creation. If descriptors are added to the class " "afterwards, :meth:`__set_name__` will need to be called manually." msgstr "" +"Comme la logique de mise à jour est dans :meth:`type.__new__`, les " +"notifications n'ont lieu qu'au moment de la création de la classe. Si des " +"descripteurs sont ajoutés à la classe par la suite, :meth:`__set_name__` " +"doit être appelée manuellement." #: howto/descriptor.rst:848 msgid "ORM example" -msgstr "" +msgstr "Exemple d'ORM" #: howto/descriptor.rst:850 msgid "" @@ -753,6 +924,10 @@ msgid "" "Python instances only hold keys to the database's tables. Descriptors take " "care of lookups or updates:" msgstr "" +"L'idée essentielle est que les données sont stockées dans une base de " +"données externe. Les instances Python ne contiennent que les clés des tables " +"de la base de données. Les descripteurs s'occupent des recherches et des " +"mises à jour :" #: howto/descriptor.rst:873 msgid "" @@ -760,20 +935,26 @@ msgid "" "org/wiki/Database_model>`_ that describe the schema for each table in a " "database:" msgstr "" +"Nous pouvons utiliser la classe :class:`Field` pour définir des `modèles " +"`_ qui décrivent le schéma de " +"chaque table d'une base de données :" #: howto/descriptor.rst:898 msgid "To use the models, first connect to the database::" msgstr "" +"Pour utiliser les modèles, connectons-nous d'abord à la base de données ::" #: howto/descriptor.rst:903 msgid "" "An interactive session shows how data is retrieved from the database and how " "it can be updated:" msgstr "" +"Une session interactive montre comment les données sont extraites de la base " +"de données et comment elles peuvent être mises à jour :" #: howto/descriptor.rst:948 msgid "Pure Python Equivalents" -msgstr "" +msgstr "Équivalents en Python pur" #: howto/descriptor.rst:950 #, fuzzy @@ -853,6 +1034,8 @@ msgid "" "Either the built-in :func:`property` or our :func:`Property` equivalent " "would work in this example." msgstr "" +"Soit la :func:`property` native, soit notre équivalent :func:`Property` " +"fonctionnent dans cet exemple." #: howto/descriptor.rst:1117 #, fuzzy @@ -889,6 +1072,8 @@ msgid "" "Methods can be created manually with :class:`types.MethodType` which is " "roughly equivalent to:" msgstr "" +"Les méthodes peuvent être créées manuellement avec :class:`types." +"MethodType`, qui équivaut à peu près à :" #: howto/descriptor.rst:1144 #, fuzzy @@ -917,36 +1102,50 @@ msgstr "" msgid "" "The function has a :term:`qualified name` attribute to support introspection:" msgstr "" +"La fonction possède un attribut ``__qualname__`` (:term:`nom " +"qualifié`) pour prendre en charge l'introspection :" #: howto/descriptor.rst:1176 msgid "" "Accessing the function through the class dictionary does not invoke :meth:" "`__get__`. Instead, it just returns the underlying function object::" msgstr "" +"L'accès à la fonction *via* le dictionnaire de classe n'invoque pas :meth:" +"`__get__`. À la place, il renvoie simplement l'objet de fonction sous-" +"jacent ::" #: howto/descriptor.rst:1182 msgid "" "Dotted access from a class calls :meth:`__get__` which just returns the " "underlying function unchanged::" msgstr "" +"La recherche d'attribut depuis une classe appelle :meth:`__get__`, qui " +"renvoie simplement la fonction sous-jacente inchangée ::" #: howto/descriptor.rst:1188 msgid "" "The interesting behavior occurs during dotted access from an instance. The " "dotted lookup calls :meth:`__get__` which returns a bound method object::" msgstr "" +"Le comportement intéressant se produit lors d'une recherche d'attribut à " +"partir d'une instance. La recherche d'attribut appelle :meth:`__get__` qui " +"renvoie un objet « méthode liée » ::" #: howto/descriptor.rst:1195 msgid "" "Internally, the bound method stores the underlying function and the bound " "instance::" msgstr "" +"En interne, la méthode liée stocke la fonction sous-jacente et l'instance " +"liée ::" #: howto/descriptor.rst:1204 msgid "" "If you have ever wondered where *self* comes from in regular methods or " "where *cls* comes from in class methods, this is it!" msgstr "" +"Si vous vous êtes déjà demandé d'où vient *self* dans les méthodes " +"ordinaires ou d'où vient *cls* dans les méthodes de classe, c'est ça !" #: howto/descriptor.rst:1209 #, fuzzy @@ -1147,7 +1346,7 @@ msgstr "" #: howto/descriptor.rst:1426 msgid "Member objects and __slots__" -msgstr "" +msgstr "Objets membres et *__slots__*" #: howto/descriptor.rst:1428 msgid "" @@ -1155,18 +1354,26 @@ msgid "" "fixed-length array of slot values. From a user point of view that has " "several effects:" msgstr "" +"Lorsqu'une classe définit ``__slots__``, Python remplace le dictionnaire " +"d'instance par un tableau de longueur fixe de créneaux prédéfinis. D'un " +"point de vue utilisateur, cela :" #: howto/descriptor.rst:1432 msgid "" "1. Provides immediate detection of bugs due to misspelled attribute " "assignments. Only attribute names specified in ``__slots__`` are allowed:" msgstr "" +"1/ permet une détection immédiate des bogues dus à des affectations " +"d'attributs mal orthographiés. Seuls les noms d'attribut spécifiés dans " +"``__slots__`` sont autorisés :" #: howto/descriptor.rst:1448 msgid "" "2. Helps create immutable objects where descriptors manage access to private " "attributes stored in ``__slots__``:" msgstr "" +"2/ aide à créer des objets immuables où les descripteurs gèrent l'accès aux " +"attributs privés stockés dans ``__slots__`` :" #: howto/descriptor.rst:1483 msgid "" @@ -1175,18 +1382,28 @@ msgid "" "design pattern `_ likely " "only matters when a large number of instances are going to be created." msgstr "" +"3/ économise de la mémoire. Sur une version Linux 64 bits, une instance avec " +"deux attributs prend 48 octets avec ``__slots__`` et 152 octets sans. Ce " +"patron de conception `poids mouche `_ n'a probablement d'importance que si un " +"grand nombre d'instances doivent être créées ;" #: howto/descriptor.rst:1488 msgid "" "4. Improves speed. Reading instance variables is 35% faster with " "``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." msgstr "" +"4/ améliore la vitesse. La lecture des variables d'instance est 35 % plus " +"rapide avec ``__slots__`` (mesure effectuée avec Python 3.10 sur un " +"processeur Apple M1) ;" #: howto/descriptor.rst:1491 msgid "" "5. Blocks tools like :func:`functools.cached_property` which require an " "instance dictionary to function correctly:" msgstr "" +"5/ bloque les outils comme :func:`functools.cached_property` qui nécessitent " +"un dictionnaire d'instance pour fonctionner correctement :" #: howto/descriptor.rst:1513 msgid "" @@ -1197,12 +1414,21 @@ msgid "" "``_slotvalues`` list. Reads and writes to that private structure are " "managed by member descriptors:" msgstr "" +"Il n'est pas possible de créer une version Python pure exacte de " +"``__slots__`` car il faut un accès direct aux structures C et un contrôle " +"sur l'allocation de la mémoire des objets. Cependant, nous pouvons " +"construire une simulation presque fidèle où la structure C réelle pour les " +"*slots* est émulée par une liste privée ``_slotvalues``. Les lectures et " +"écritures dans cette structure privée sont gérées par des descripteurs de " +"membres :" #: howto/descriptor.rst:1558 msgid "" "The :meth:`type.__new__` method takes care of adding member objects to class " "variables:" msgstr "" +"La méthode :meth:`type.__new__` s'occupe d'ajouter des objets membres aux " +"variables de classe :" #: howto/descriptor.rst:1574 msgid "" @@ -1210,27 +1436,37 @@ msgid "" "slots instead of an instance dictionary. Here is a rough simulation in pure " "Python:" msgstr "" +"La méthode :meth:`object.__new__` s'occupe de créer des instances qui ont " +"des *slots* au lieu d'un dictionnaire d'instances. Voici une simulation " +"approximative en Python pur :" #: howto/descriptor.rst:1609 msgid "" "To use the simulation in a real class, just inherit from :class:`Object` and " "set the :term:`metaclass` to :class:`Type`:" msgstr "" +"Pour utiliser la simulation dans une classe réelle, héritez simplement de :" +"class:`Object` et définissez la :term:`métaclasse ` à :class:" +"`Type` :" #: howto/descriptor.rst:1623 msgid "" "At this point, the metaclass has loaded member objects for *x* and *y*::" msgstr "" +"À ce stade, la métaclasse a chargé des objets membres pour *x* et *y* ::" #: howto/descriptor.rst:1644 msgid "" "When instances are created, they have a ``slot_values`` list where the " "attributes are stored:" msgstr "" +"Lorsque les instances sont créées, elles ont une liste ``slot_values`` où " +"les attributs sont stockés :" #: howto/descriptor.rst:1656 msgid "Misspelled or unassigned attributes will raise an exception:" msgstr "" +"Les attributs mal orthographiés ou non attribués lèvent une exception :" #~ msgid "" #~ "Defines descriptors, summarizes the protocol, and shows how descriptors " diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 70c84db7..57256dec 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -202,10 +202,16 @@ msgid "" "the directory exists and that you have the permissions to create and update " "files in it." msgstr "" +"Notez que le choix du nom de fichier journal ``/tmp/myapp.log`` ci-dessus " +"implique l'utilisation d'un emplacement standard pour les fichiers " +"temporaires sur les systèmes POSIX. Sous Windows, vous devrez peut-être " +"choisir un nom de répertoire différent pour le journal – assurez-vous " +"simplement que le répertoire existe et que vous disposez des autorisations " +"nécessaires pour créer et mettre à jour des fichiers dans celui-ci." #: howto/logging-cookbook.rst:282 msgid "Custom handling of levels" -msgstr "" +msgstr "Personnalisation du niveau de journalisation" #: howto/logging-cookbook.rst:284 msgid "" @@ -214,22 +220,33 @@ msgid "" "get processed by a handler. To do this, you need to use filters. Let's look " "at a scenario where you want to arrange things as follows:" msgstr "" +"Il peut arriver que vous souhaitiez que vos gestionnaires journalisent " +"légèrement différemment de la gestion standard des niveaux, où tous les " +"niveaux au-dessus d'un seuil sont traités par un gestionnaire. Pour ce " +"faire, vous devez utiliser des filtres. Examinons un scénario dans lequel " +"vous souhaitez organiser les choses comme suit :" #: howto/logging-cookbook.rst:289 msgid "Send messages of severity ``INFO`` and ``WARNING`` to ``sys.stdout``" msgstr "" +"envoyer les messages de niveau ``INFO`` et ``WARNING`` à ``sys.stdout`` ;" #: howto/logging-cookbook.rst:290 msgid "Send messages of severity ``ERROR`` and above to ``sys.stderr``" msgstr "" +"envoyer les messages de niveau ``ERROR`` et au-dessus à ``sys.stderr`` ;" #: howto/logging-cookbook.rst:291 msgid "Send messages of severity ``DEBUG`` and above to file ``app.log``" msgstr "" +"envoyer les messages de niveau ``DEBUG`` et au-dessus vers le fichier ``app." +"log``." #: howto/logging-cookbook.rst:293 msgid "Suppose you configure logging with the following JSON:" msgstr "" +"Supposons que vous configurez la journalisation avec le contenu au format " +"JSON suivant :" #: howto/logging-cookbook.rst:335 msgid "" @@ -239,16 +256,26 @@ msgid "" "those messages and add it to the relevant handler. This can be configured by " "adding a ``filters`` section parallel to ``formatters`` and ``handlers``:" msgstr "" +"Cette configuration fait *presque* ce que nous voulons, sauf que ``sys." +"stdout`` affiche les messages de gravité ``ERROR`` et supérieurs ainsi que " +"les messages ``INFO`` et ``WARNING``. Pour éviter cela, nous pouvons " +"configurer un filtre qui exclut ces messages et l'ajouter au gestionnaire " +"approprié. Effectuons la configuration en ajoutant une section ``filters`` " +"parallèle à ``formatters`` et ``handlers`` :" #: howto/logging-cookbook.rst:350 msgid "and changing the section on the ``stdout`` handler to add it:" msgstr "" +"et en changeant la section du gestionnaire ``stdout`` pour ajouter le " +"filtre :" #: howto/logging-cookbook.rst:362 msgid "" "A filter is just a function, so we can define the ``filter_maker`` (a " "factory function) as follows:" msgstr "" +"Un filtre n'est qu'une fonction, nous pouvons donc définir un " +"``filter_maker`` (une fonction fabrique) comme suit :" #: howto/logging-cookbook.rst:375 msgid "" @@ -260,18 +287,28 @@ msgid "" "filter_maker`` in the filter configuration. You will need to change that if " "you define it in a different module." msgstr "" +"Elle convertit la chaîne transmise en argument vers un niveau numérique puis " +"renvoie une fonction qui ne renvoie ``True`` que si le niveau de " +"l'enregistrement transmis est inférieur ou égal au niveau spécifié. Notez " +"que dans cet exemple, nous avons défini ``filter_maker`` dans un script de " +"test ``main.py`` qui est exécuté depuis la ligne de commande, donc son " +"module est ``__main__`` – d'où le ``__main__.filter_maker`` dans la " +"configuration du filtre. Vous devez le changer si vous la définissez dans un " +"module différent." #: howto/logging-cookbook.rst:383 msgid "With the filter added, we can run ``main.py``, which in full is:" msgstr "" +"Avec le filtre, nous pouvons exécuter ``main.py`` dont voici la version " +"complète :" #: howto/logging-cookbook.rst:453 msgid "And after running it like this:" -msgstr "" +msgstr "Et après l'avoir exécuté comme ceci :" #: howto/logging-cookbook.rst:459 msgid "We can see the results are as expected:" -msgstr "" +msgstr "Nous obtenons le résultat attendu :" #: howto/logging-cookbook.rst:485 msgid "Configuration server example" @@ -406,6 +443,16 @@ msgid "" "application, to use the above approach for logging, so that any blocking " "code runs only in the ``QueueListener`` thread." msgstr "" +"bien que la discussion précédente n'aborde pas spécifiquement l'utilisation " +"de code asynchrone, mais concerne les gestionnaires de journalisation lents, " +"notez que lors de la journalisation à partir de code asynchrone, les " +"gestionnaires qui écrivent vers le réseau ou même dans des fichiers peuvent " +"entraîner des problèmes (blocage de la boucle d'événements) car une certaine " +"journalisation est faite à partir du code natif de :mod:`asyncio`. Il peut " +"être préférable, si un code asynchrone est utilisé dans une application, " +"d'utiliser l'approche ci-dessus pour la journalisation, de sorte que tout ce " +"qui utilise du code bloquant ne s'exécute que dans le thread " +"``QueueListener``." #: howto/logging-cookbook.rst:615 msgid "" @@ -751,6 +798,11 @@ msgid "" "handlers, you can use a filter that returns a new :class:`~LogRecord` " "instead of modifying it in-place, as shown in the following script::" msgstr "" +"Chaque :class:`~Handler` possède sa propre chaîne de filtres. Si vous " +"souhaitez ajouter des informations contextuelles à un :class:`LogRecord` " +"sans impacter d'autres gestionnaires, vous pouvez utiliser un filtre qui " +"renvoie un nouveau :class:`~LogRecord` au lieu de le modifier sur place, " +"comme dans le script suivant ::" #: howto/logging-cookbook.rst:1189 msgid "Logging to a single file from multiple processes" @@ -1137,7 +1189,7 @@ msgstr "" #: howto/logging-cookbook.rst:1707 msgid "Customizing ``LogRecord``" -msgstr "" +msgstr "Personnalisation de ``LogRecord``" #: howto/logging-cookbook.rst:1709 msgid "" @@ -1149,12 +1201,22 @@ msgid "" "disabled). Before Python 3.2, there were only two places where this creation " "was done:" msgstr "" +"Chaque événement de journalisation est représenté par une instance :class:" +"`LogRecord`. Lorsqu’un événement est enregistré et non filtré en raison du " +"niveau d’un enregistreur, un :class:`LogRecord` est créé, rempli avec les " +"informations de l’événement, puis transmis aux gestionnaires de cet " +"enregistreur (et ses ancêtres, jusqu’à et y compris l’enregistreur où la " +"propagation vers le haut de la hiérarchie est désactivée). Avant Python 3.2, " +"il n’y avait que deux endroits où cette création était effectuée :" #: howto/logging-cookbook.rst:1716 msgid "" ":meth:`Logger.makeRecord`, which is called in the normal process of logging " "an event. This invoked :class:`LogRecord` directly to create an instance." msgstr "" +":meth:`Logger.makeRecord`, qui est appelée dans le processus normal de " +"journalisation d’un événement. Elle appelait :class:`LogRecord` directement " +"pour créer une instance." #: howto/logging-cookbook.rst:1719 msgid "" @@ -1164,12 +1226,20 @@ msgid "" "via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:" "`~handlers.HTTPHandler`)." msgstr "" +":func:`makeLogRecord`, qui est appelée avec un dictionnaire contenant des " +"attributs à ajouter au *LogRecord*. Elle est généralement invoquée lorsqu’un " +"dictionnaire approprié a été reçu par le réseau (par exemple, sous forme de " +"*pickle* *via* un :class:`~handlers.SocketHandler`, ou sous format JSON " +"*via* un :class:`~handlers.HTTPHandler`)." #: howto/logging-cookbook.rst:1725 msgid "" "This has usually meant that if you need to do anything special with a :class:" "`LogRecord`, you've had to do one of the following." msgstr "" +"Cela signifiait généralement que, si vous deviez faire quelque chose de " +"spécial avec un :class:`LogRecord`, vous deviez faire l’une des choses " +"suivantes." #: howto/logging-cookbook.rst:1728 msgid "" @@ -1177,6 +1247,9 @@ msgid "" "makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " "loggers that you care about are instantiated." msgstr "" +"Créer votre propre sous-classe :class:`Logger`, surchargeant :meth:`Logger." +"makeRecord`, et la personnaliser à l’aide de :func:`~logging.setLoggerClass` " +"avant que les enregistreurs qui vous intéressaient ne soient instanciés." #: howto/logging-cookbook.rst:1731 msgid "" @@ -1184,6 +1257,9 @@ msgid "" "special manipulation you need when its :meth:`~Filter.filter` method is " "called." msgstr "" +"Ajouter un :class:`Filter` à un enregistreur ou un gestionnaire, qui " +"effectuait la manipulation spéciale nécessaire dont vous aviez besoin " +"lorsque sa méthode :meth:`~Filter.filter` était appelée." #: howto/logging-cookbook.rst:1735 msgid "" @@ -1192,6 +1268,10 @@ msgid "" "attempt to set its own :class:`Logger` subclass, and the one which did this " "last would win." msgstr "" +"La première approche est un peu lourde dans le scénario où (disons) " +"plusieurs bibliothèques différentes veulent faire des choses différentes. " +"Chacun essaie de définir sa propre sous-classe :class:`Logger`, et celui qui " +"l’a fait en dernier gagne." #: howto/logging-cookbook.rst:1740 msgid "" @@ -1201,6 +1281,12 @@ msgid "" "to remember to do this every time they introduced a new logger (which they " "would do simply by adding new packages or modules and doing ::" msgstr "" +"La seconde approche fonctionne raisonnablement bien dans de nombreux cas, " +"mais ne vous permet pas, par exemple, d’utiliser une sous-classe spécialisée " +"de :class:`LogRecord`. Les développeurs de bibliothèques peuvent définir un " +"filtre approprié sur leurs enregistreurs, mais ils doivent se rappeler de le " +"faire chaque fois qu’ils introduisent un nouvel enregistreur (ce qu’ils font " +"simplement en ajoutant de nouveaux paquets ou modules et en écrivant ::" #: howto/logging-cookbook.rst:1748 msgid "" @@ -1211,6 +1297,13 @@ msgid "" "so output from that handler would not reflect the intentions of the library " "developer." msgstr "" +"au niveau des modules). C’est probablement trop de choses auxquelles penser. " +"Les développeurs pourraient également ajouter le filtre à un :class:" +"`~logging.NullHandler` attaché à leur enregistreur de niveau supérieur, mais " +"cela ne serait pas invoqué si un développeur d’application attachait un " +"gestionnaire à un enregistreur de bibliothèque de niveau inférieur — donc la " +"sortie de ce gestionnaire ne refléterait pas les intentions du développeur " +"de la bibliothèque." #: howto/logging-cookbook.rst:1754 msgid "" @@ -1221,6 +1314,13 @@ msgid "" "signature as the :class:`~logging.LogRecord` constructor, as :class:" "`LogRecord` is the default setting for the factory." msgstr "" +"Dans Python 3.2 et ultérieurs, la création de :class:`~logging.LogRecord` " +"est effectuée via une fabrique, que vous pouvez spécifier. La fabrique est " +"juste un appelable que vous pouvez définir avec :func:`~logging." +"setLogRecordFactory`, et interroger avec :func:`~logging." +"getLogRecordFactory`. La fabrique est invoquée avec la même signature que le " +"constructeur :class:`~logging.LogRecord`, car :class:`LogRecord` est le " +"paramètre par défaut de la fabrique." #: howto/logging-cookbook.rst:1761 msgid "" @@ -1229,6 +1329,10 @@ msgid "" "additional attributes to the record once created, using a pattern similar to " "this::" msgstr "" +"Cette approche permet à une fabrique personnalisée de contrôler tous les " +"aspects de la création d’un *LogRecord*. Par exemple, vous pouvez renvoyer " +"une sous-classe ou simplement ajouter des attributs supplémentaires à " +"l’enregistrement une fois créé, en utilisant un modèle similaire à celui-ci :" #: howto/logging-cookbook.rst:1774 msgid "" @@ -1239,10 +1343,18 @@ msgid "" "time overhead to all logging operations, and the technique should only be " "used when the use of a :class:`Filter` does not provide the desired result." msgstr "" +"Ce modèle permet à différentes bibliothèques d’enchaîner des fabriques, et " +"tant qu’elles n’écrasent pas les attributs des autres ou n’écrasent pas " +"involontairement les attributs fournis en standard, il ne devrait pas y " +"avoir de surprise. Cependant, il faut garder à l’esprit que chaque maillon " +"de la chaîne ajoute une surcharge d’exécution à toutes les opérations de " +"journalisation, et la technique ne doit être utilisée que lorsque " +"l’utilisation d’un :class:`Filter` ne permet pas d’obtenir le résultat " +"souhaité." #: howto/logging-cookbook.rst:1785 msgid "Subclassing QueueHandler - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" #: howto/logging-cookbook.rst:1787 msgid "" @@ -1250,22 +1362,31 @@ msgid "" "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " "socket is created separately and passed to the handler (as its 'queue')::" msgstr "" +"Vous pouvez utiliser une sous-classe :class:`QueueHandler` pour envoyer des " +"messages à d’autres types de files d’attente, par exemple un connecteur " +"*ZeroMQ publish*. Dans l’exemple ci-dessous, le connecteur est créé " +"séparément et transmis au gestionnaire (en tant que file d’attente) ::" #: howto/logging-cookbook.rst:1806 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" msgstr "" +"Bien sûr, il existe d’autres manières de faire, par exemple en transmettant " +"les données nécessaires au gestionnaire pour créer le connecteur ::" #: howto/logging-cookbook.rst:1824 msgid "Subclassing QueueListener - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueListener* – un exemple de *ZeroMQ*" #: howto/logging-cookbook.rst:1826 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" +"Vous pouvez également dériver :class:`QueueListener` pour obtenir des " +"messages d’autres types de files d’attente, par exemple un connecteur " +"*ZeroMQ subscribe*. Voici un exemple ::" #: howto/logging-cookbook.rst:1845 howto/logging-cookbook.rst:3803 msgid "Module :mod:`logging`" @@ -1294,14 +1415,18 @@ msgstr "Gestionnaires utiles inclus avec le module de journalisation." #: howto/logging-cookbook.rst:1853 msgid ":ref:`A basic logging tutorial `" msgstr "" +":ref:`Les bases de l’utilisation du module de journalisation `" #: howto/logging-cookbook.rst:1855 msgid ":ref:`A more advanced logging tutorial `" msgstr "" +":ref:`Utilisation avancée du module de journalisation `" #: howto/logging-cookbook.rst:1859 msgid "An example dictionary-based configuration" -msgstr "" +msgstr "Exemple de configuration basée sur un dictionnaire" #: howto/logging-cookbook.rst:1861 msgid "" @@ -1310,6 +1435,11 @@ msgid "" "stable/topics/logging/#configuring-logging>`_. This dictionary is passed to :" "func:`~config.dictConfig` to put the configuration into effect::" msgstr "" +"Vous trouverez ci-dessous un exemple de dictionnaire de configuration de " +"journalisation ­– il est tiré de la `documentation du projet Django `_. Ce " +"dictionnaire est passé à :func:`~config.dictConfig` pour activer la " +"configuration ::" #: howto/logging-cookbook.rst:1917 msgid "" @@ -1317,10 +1447,15 @@ msgid "" "section `_ of the Django documentation." msgstr "" +"Pour plus d’informations sur cette configuration, vous pouvez consulter la " +"`section correspondante `_ de la documentation de *Django*." #: howto/logging-cookbook.rst:1924 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" +"Utilisation d’un rotateur et d’un nom pour personnaliser la rotation des " +"journaux" #: howto/logging-cookbook.rst:1926 msgid "" @@ -1337,7 +1472,7 @@ msgstr "" #: howto/logging-cookbook.rst:1949 msgid "A more elaborate multiprocessing example" -msgstr "" +msgstr "Exemple plus élaboré avec traitement en parallèle" #: howto/logging-cookbook.rst:1951 msgid "" @@ -1346,6 +1481,11 @@ msgid "" "simple, but serve to illustrate how more complex ones could be implemented " "in a real multiprocessing scenario." msgstr "" +"L’exemple suivant que nous allons étudier montre comment la journalisation " +"peut être utilisée, à l’aide de fichiers de configuration, pour un programme " +"effectuant des traitements parallèles. Les configurations sont assez " +"simples, mais servent à illustrer comment des configurations plus complexes " +"pourraient être implémentées dans un scénario multi-processus réel." #: howto/logging-cookbook.rst:1956 msgid "" @@ -1359,16 +1499,30 @@ msgid "" "purely illustrative, but you should be able to adapt this example to your " "own scenario." msgstr "" +"Dans l’exemple, le processus principal génère un processus d’écoute et des " +"processus de travail. Chacun des processus, le principal, l’auditeur " +"(*listener_process* dans l’exemple) et les processus de travail " +"(*worker_process* dans l’exemple) ont trois configurations distinctes (les " +"processus de travail partagent tous la même configuration). Nous pouvons " +"voir la journalisation dans le processus principal, comment les processus de " +"travail se connectent à un *QueueHandler* et comment l’auditeur implémente " +"un *QueueListener* avec une configuration de journalisation plus complexe, " +"et s’arrange pour envoyer les événements reçus *via* la file d’attente aux " +"gestionnaires spécifiés dans la configuration. Notez que ces configurations " +"sont purement illustratives, mais vous devriez pouvoir adapter cet exemple à " +"votre propre scénario." #: howto/logging-cookbook.rst:1966 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" +"Voici le script – les chaines de documentation et les commentaires " +"expliquent (en anglais), le principe de fonctionnement ::" #: howto/logging-cookbook.rst:2178 msgid "Inserting a BOM into messages sent to a SysLogHandler" -msgstr "" +msgstr "Insertion d’une *BOM* dans les messages envoyés à un *SysLogHandler*" #: howto/logging-cookbook.rst:2180 msgid "" @@ -1378,6 +1532,11 @@ msgid "" "encoded using UTF-8. (See the :rfc:`relevant section of the specification " "<5424#section-6>`.)" msgstr "" +"La :rfc:`5424` requiert qu’un message Unicode soit envoyé à un démon " +"*syslog* sous la forme d’un ensemble d’octets ayant la structure suivante : " +"un composant ASCII pur facultatif, suivi d’une marque d’ordre d’octet (*BOM* " +"pour *Byte Order Mark* en anglais) UTF-8, suivie de contenu Unicode UTF-8 " +"(voir la :rfc:`la spécification correspondante <5424#section-6>`)." #: howto/logging-cookbook.rst:2186 msgid "" @@ -1386,6 +1545,10 @@ msgid "" "incorrectly, with the BOM appearing at the beginning of the message and " "hence not allowing any pure-ASCII component to appear before it." msgstr "" +"Dans Python 3.1, du code a été ajouté à :class:`~logging.handlers." +"SysLogHandler` pour insérer une *BOM* dans le message mais, malheureusement, " +"il a été implémenté de manière incorrecte, la *BOM* apparaissant au début du " +"message et n’autorisant donc aucun composant ASCII pur à être placé devant." #: howto/logging-cookbook.rst:2192 msgid "" @@ -1395,18 +1558,28 @@ msgid "" "an optional pure-ASCII sequence before it and arbitrary Unicode after it, " "encoded using UTF-8, then you need to do the following:" msgstr "" +"Comme ce comportement est inadéquat, le code incorrect d’insertion de la " +"*BOM* a été supprimé de Python 3.2.4 et ultérieurs. Cependant, il n’est pas " +"remplacé et, si vous voulez produire des messages conformes :rfc:`5424` qui " +"incluent une *BOM*, une séquence facultative en ASCII pur avant et un " +"Unicode arbitraire après, encodé en UTF-8, alors vous devez appliquer ce qui " +"suit :" #: howto/logging-cookbook.rst:2198 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" +"Adjoignez une instance :class:`~logging.Formatter` à votre instance :class:" +"`~logging.handlers.SysLogHandler`, avec une chaîne de format telle que ::" #: howto/logging-cookbook.rst:2204 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" +"Le point de code Unicode U+FEFF, lorsqu’il est encodé en UTF-8, est encodé " +"comme une *BOM* UTF-8 – la chaîne d’octets ``b'\\xef\\xbb\\xbf'``." #: howto/logging-cookbook.rst:2207 msgid "" @@ -1414,6 +1587,9 @@ msgid "" "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" +"Remplacez la section ASCII par les caractères de votre choix, mais assurez-" +"vous que les données qui y apparaissent après la substitution sont toujours " +"ASCII (ainsi elles resteront inchangées après l’encodage UTF-8)." #: howto/logging-cookbook.rst:2211 msgid "" @@ -1421,6 +1597,10 @@ msgid "" "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" +"Remplacez la section Unicode par le contenu de votre choix ; si les données " +"qui y apparaissent après la substitution contiennent des caractères en " +"dehors de la plage ASCII, c’est pris en charge – elles seront encodées en " +"UTF-8." #: howto/logging-cookbook.rst:2215 msgid "" @@ -1430,10 +1610,15 @@ msgid "" "complain, but your messages will not be RFC 5424-compliant, and your syslog " "daemon may complain." msgstr "" +"Le message formaté *sera* encodé en UTF-8 par ``SysLogHandler``. Si vous " +"suivez les règles ci-dessus, vous devriez pouvoir produire des messages " +"conformes à la :rfc:`5424`. Si vous ne le faites pas, la journalisation ne " +"se plaindra peut-être pas, mais vos messages ne seront pas conformes à la " +"RFC 5424 et votre démon *syslog* est susceptible de se plaindre." #: howto/logging-cookbook.rst:2222 msgid "Implementing structured logging" -msgstr "" +msgstr "Journalisation structurée" #: howto/logging-cookbook.rst:2224 msgid "" @@ -1446,30 +1631,42 @@ msgid "" "following is a simple approach which uses JSON to serialise the event in a " "machine-parseable manner::" msgstr "" +"Bien que la plupart des messages de journalisation soient destinés à être " +"lus par des humains, et donc difficilement analysables par la machine, il " +"peut arriver que vous souhaitiez produire des messages dans un format " +"structuré dans le but d’être analysé par un programme (sans avoir besoin " +"d’expressions régulières complexes pour analyser le message du journal). " +"C’est simple à réaliser en utilisant le paquet de journalisation. Il existe " +"plusieurs façons d’y parvenir et voici une approche simple qui utilise JSON " +"pour sérialiser l’événement de manière à être analysable par une machine ::" #: howto/logging-cookbook.rst:2248 msgid "If the above script is run, it prints:" -msgstr "" +msgstr "Si vous lancez le script ci-dessus, il imprime :" #: howto/logging-cookbook.rst:2254 howto/logging-cookbook.rst:2296 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" +"Notez que l’ordre des éléments peut être différent en fonction de la version " +"de Python utilisée." #: howto/logging-cookbook.rst:2257 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" +"Si vous avez besoin d’un traitement plus spécifique, vous pouvez utiliser un " +"encodeur JSON personnalisé, comme dans l’exemple complet suivant :" #: howto/logging-cookbook.rst:2290 msgid "When the above script is run, it prints:" -msgstr "" +msgstr "Quand vous exécutez le script ci-dessus, il imprime :" #: howto/logging-cookbook.rst:2305 msgid "Customizing handlers with :func:`dictConfig`" -msgstr "" +msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" #: howto/logging-cookbook.rst:2307 msgid "" @@ -1480,12 +1677,23 @@ msgid "" "the file handlers in the stdlib don't offer built-in support. You can " "customize handler creation using a plain function such as::" msgstr "" +"Il arrive de souhaiter personnaliser les gestionnaires de journalisation " +"d’une manière particulière et, en utilisant :func:`dictConfig`, vous pourrez " +"peut-être le faire sans avoir à dériver les classes mères. Par exemple, " +"supposons que vous souhaitiez définir le propriétaire d’un fichier journal. " +"Dans un environnement POSIX, cela se fait facilement en utilisant :func:" +"`shutil.chown`, mais les gestionnaires de fichiers de la bibliothèque " +"standard n’offrent pas cette gestion nativement. Vous pouvez personnaliser " +"la création du gestionnaire à l’aide d’une fonction simple telle que ::" #: howto/logging-cookbook.rst:2321 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" +"Vous pouvez ensuite spécifier, dans une configuration de journalisation " +"transmise à :func:`dictConfig`, qu’un gestionnaire de journalisation soit " +"créé en appelant cette fonction ::" #: howto/logging-cookbook.rst:2354 msgid "" @@ -1493,10 +1701,14 @@ msgid "" "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" +"Dans cet exemple, nous définissons le propriétaire à l’utilisateur et au " +"groupe ``pulse``, uniquement à des fins d’illustration. Rassemblons le tout " +"dans un script ``chowntest.py`` ::" #: howto/logging-cookbook.rst:2401 msgid "To run this, you will probably need to run as ``root``:" msgstr "" +"Pour l’exécuter, vous devrez probablement le faire en tant que ``root`` :" #: howto/logging-cookbook.rst:2411 msgid "" @@ -1506,16 +1718,25 @@ msgid "" "With pre-3.3 versions, you would need to implement the actual ownership " "change using e.g. :func:`os.chown`." msgstr "" +"Notez que cet exemple utilise Python 3.3 car c’est là que :func:`shutil." +"chown` fait son apparition. Cette approche devrait fonctionner avec " +"n’importe quelle version de Python prenant en charge :func:`dictConfig` – à " +"savoir, Python 2.7, 3.2 ou version ultérieure. Avec les versions antérieures " +"à la 3.3, vous devrez implémenter le changement de propriétaire réel en " +"utilisant par exemple :func:`os.chown`." #: howto/logging-cookbook.rst:2417 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" +"En pratique, la fonction de création de gestionnaire peut être située dans " +"un module utilitaire ailleurs dans votre projet. Au lieu de cette ligne dans " +"la configuration ::" #: howto/logging-cookbook.rst:2422 msgid "you could use e.g.::" -msgstr "" +msgstr "vous pouvez écrire par exemple ::" #: howto/logging-cookbook.rst:2426 msgid "" @@ -1524,6 +1745,11 @@ msgid "" "__main__.owned_file_handler'`` should work. Here, the actual callable is " "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" +"où ``project.util`` peut être remplacé par le nom réel du paquet où réside " +"la fonction. Dans le script étudié ci-dessus, l’utilisation de ``'ext://" +"__main__.owned_file_handler'`` devrait fonctionner. Dans le cas présent, " +"l’appelable réel est résolu par :func:`dictConfig` à partir de la " +"spécification ``ext://``." #: howto/logging-cookbook.rst:2431 msgid "" @@ -1531,6 +1757,9 @@ msgid "" "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" +"Nous espérons qu'à partir de cet exemple vous saurez implémenter d’autres " +"types de modification de fichier – par ex. définir des bits d’autorisation " +"POSIX spécifiques – de la même manière, en utilisant :func:`os.chmod`." #: howto/logging-cookbook.rst:2435 msgid "" @@ -1538,6 +1767,10 @@ msgid "" "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" +"Bien sûr, l’approche pourrait également être étendue à des types de " +"gestionnaires autres qu’un :class:`~logging.FileHandler` – par exemple, l’un " +"des gestionnaires à roulement de fichiers ou un autre type de gestionnaire " +"complètement différent." #: howto/logging-cookbook.rst:2445 msgid "Using particular formatting styles throughout your application" @@ -2252,12 +2485,12 @@ msgstr "" #: howto/logging-cookbook.rst:3798 msgid "Other resources" -msgstr "" +msgstr "Autres ressources" #: howto/logging-cookbook.rst:3811 msgid ":ref:`Basic Tutorial `" -msgstr "" +msgstr ":ref:`Tutoriel de découverte `" #: howto/logging-cookbook.rst:3813 msgid ":ref:`Advanced Tutorial `" -msgstr "" +msgstr ":ref:`Tutoriel avancé `" diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 81b21cec..89a1fdec 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -226,7 +226,7 @@ msgstr "" #: library/asyncio-api-index.rst:115 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." #: library/asyncio-api-index.rst:117 msgid "``await`` :func:`create_subprocess_shell`" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 24c8dde0..7978ffb7 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -281,6 +281,9 @@ msgid "" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" +"L'argument nommé optionnel *context* permet de spécifier une classe :class:" +"`contextvars.Context` personnalisée dans laquelle la fonction de rappel " +"s’exécutera. Le contexte actuel est utilisé si *context* n'est pas fourni." #: library/asyncio-eventloop.rst:211 msgid "" @@ -318,6 +321,7 @@ msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" +"Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails." #: library/asyncio-eventloop.rst:236 msgid "" diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index 9eabf7b3..5c43bcfe 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -813,7 +813,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:411 msgid "Protocols" -msgstr "" +msgstr "Protocoles" #: library/asyncio-llapi-index.rst:413 msgid "Protocol classes can implement the following **callback methods**:" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index d850f627..97041e1a 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -324,6 +324,8 @@ msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" +"Instancier un sous-processus avec un observateur enfant actuel *inactif* " +"lève l'exception :exc:`RuntimeError`." #: library/asyncio-policy.rst:212 msgid "Close the watcher." diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index e6f1766d..2fe627aa 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -585,7 +585,7 @@ msgstr "" #: library/asyncio-protocol.rst:436 msgid "Protocols" -msgstr "" +msgstr "Protocoles" #: library/asyncio-protocol.rst:438 msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 15c7e942..ad7836ef 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -69,6 +69,8 @@ msgstr "Le paramètre *loop*." #: library/asyncio-queue.rst:43 msgid "This class is :ref:`not thread safe `." msgstr "" +"Cette classe n'est :ref:`pas conçue pour un contexte multi-fils `." #: library/asyncio-queue.rst:47 msgid "Number of items allowed in the queue." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 8100073c..69d88065 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -89,7 +89,7 @@ msgstr "" #: library/asyncio-stream.rst:121 library/asyncio-stream.rst:176 msgid "Removed the *loop* parameter." -msgstr "" +msgstr "Suppression du paramètre *loop*." #: library/asyncio-stream.rst:94 msgid "Start a socket server." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index 4f662713..297f55a8 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -29,12 +29,16 @@ msgid "" "This section describes high-level async/await asyncio APIs to create and " "manage subprocesses." msgstr "" +"Cette section décrit des API de haut niveau de *asyncio* pour créer et gérer " +"des sous-processus via ``async``/``await``." #: library/asyncio-subprocess.rst:19 msgid "" "Here's an example of how asyncio can run a shell command and obtain its " "result::" msgstr "" +"Voici un exemple de comment *asyncio* peut lancer une commande shell et " +"obtenir son résultat ::" #: library/asyncio-subprocess.rst:40 #, fuzzy @@ -51,15 +55,15 @@ msgstr "" #: library/asyncio-subprocess.rst:58 msgid "See also the `Examples`_ subsection." -msgstr "" +msgstr "Voir également la section `Exemples`_." #: library/asyncio-subprocess.rst:62 msgid "Creating Subprocesses" -msgstr "" +msgstr "Créer des sous-processus" #: library/asyncio-subprocess.rst:67 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." #: library/asyncio-subprocess.rst:69 library/asyncio-subprocess.rst:87 msgid "" @@ -67,15 +71,21 @@ msgid "" "wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :attr:" "`subprocess.PIPE` is passed to *stdout* and *stderr* arguments)." msgstr "" +"Le paramètre *limit* définit la taille maximale du tampon pour les instances " +"de :class:`StreamReader` encapsulant :attr:`Process.stdout` et :attr:" +"`Process.stderr` (Si :attr:`subprocess.PIPE` est passé aux paramètres " +"*stdout* et *stderr*)." #: library/asyncio-subprocess.rst:73 library/asyncio-subprocess.rst:91 msgid "Return a :class:`~asyncio.subprocess.Process` instance." -msgstr "" +msgstr "Renvoie une instance de :class:`~asyncio.subprocess.Process`." #: library/asyncio-subprocess.rst:75 msgid "" "See the documentation of :meth:`loop.subprocess_exec` for other parameters." msgstr "" +"Voir la documentation de :meth:`loop.subprocess_exec` pour d'autres " +"paramètres." #: library/asyncio-subprocess.rst:78 library/asyncio-subprocess.rst:105 #, fuzzy @@ -90,6 +100,8 @@ msgstr "Exécute la commande *cmd* dans un *shell*." msgid "" "See the documentation of :meth:`loop.subprocess_shell` for other parameters." msgstr "" +"Voir la documentation de :meth:`loop.subprocess_shell` pour d'autres " +"paramètres." #: library/asyncio-subprocess.rst:98 msgid "" @@ -100,6 +112,13 @@ msgid "" "escape whitespace and special shell characters in strings that are going to " "be used to construct shell commands." msgstr "" +"Il est de la responsabilité de l'application de s'assurer que tous les " +"espaces et les caractères spéciaux sont correctement mis entre guillemets " +"pour éviter les vulnérabilités de type `injection de code `_. La fonction :func:" +"`shlex.quote` peut être utilisée pour l’échappement des espaces et " +"caractères spéciaux dans les chaînes utilisées pour construire des commandes " +"shell." #: library/asyncio-subprocess.rst:110 msgid "" @@ -107,6 +126,9 @@ msgid "" "used. See :ref:`Subprocess Support on Windows ` " "for details." msgstr "" +"Les sous-processus sont disponibles pour Windows si un :class:" +"`ProactorEventLoop` est utilisé. Voir :ref:`Support des sous-processus sous " +"Windows ` pour plus de précisions." #: library/asyncio-subprocess.rst:116 msgid "" @@ -123,7 +145,7 @@ msgstr "Constantes" #: library/asyncio-subprocess.rst:129 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." -msgstr "" +msgstr "Peut être passé aux paramètres *stdin*, *stdout* ou *stderr*." #: library/asyncio-subprocess.rst:131 msgid "" @@ -131,6 +153,9 @@ msgid "" "subprocess.Process.stdin>` attribute will point to a :class:`StreamWriter` " "instance." msgstr "" +"Si *PIPE* est passé au paramètre *stdin*, l'attribut :attr:`Process.stdin " +"` ne pointera pas vers une instance de :" +"class:`StreamWriter`." #: library/asyncio-subprocess.rst:135 msgid "" @@ -139,12 +164,18 @@ msgid "" "` attributes will point to :class:" "`StreamReader` instances." msgstr "" +"Si *PIPE* est passé au paramètre *stdout* ou *stderr* , l'attribut :attr:" +"`Process.stdout ` et :attr:`Process." +"stderr ` pointeront vers des instances " +"de :class:`StreamReader`." #: library/asyncio-subprocess.rst:143 msgid "" "Special value that can be used as the *stderr* argument and indicates that " "standard error should be redirected into standard output." msgstr "" +"Une valeur spéciale qui peut être passée au paramètre *stderr* et qui " +"indique que la sortie d'erreur doit être redirigée vers la sortie standard." #: library/asyncio-subprocess.rst:149 msgid "" @@ -152,10 +183,13 @@ msgid "" "to process creation functions. It indicates that the special file :data:`os." "devnull` will be used for the corresponding subprocess stream." msgstr "" +"Une valeur spéciale qui peut être passée à l'argument *stdin*, *stdout* ou " +"*stderr* des fonctions créant des processus. Elle implique l'utilisation du " +"fichier :data:`os.devnull` pour le flux correspondant du processus." #: library/asyncio-subprocess.rst:155 msgid "Interacting with Subprocesses" -msgstr "" +msgstr "Interagir avec les sous-processus" #: library/asyncio-subprocess.rst:157 msgid "" @@ -199,11 +233,13 @@ msgstr "" #: library/asyncio-subprocess.rst:184 msgid "the *universal_newlines* parameter is not supported." -msgstr "" +msgstr "le paramètre *universal_newlines* n'est pas pris en charge." #: library/asyncio-subprocess.rst:186 msgid "This class is :ref:`not thread safe `." msgstr "" +"Cette classe n'est :ref:`pas conçue pour un contexte multi-fils `." #: library/asyncio-subprocess.rst:188 msgid "" @@ -215,11 +251,11 @@ msgstr "" #: library/asyncio-subprocess.rst:193 msgid "Wait for the child process to terminate." -msgstr "" +msgstr "Attend que le sous processus s'arrête." #: library/asyncio-subprocess.rst:195 msgid "Set and return the :attr:`returncode` attribute." -msgstr "" +msgstr "Définit et renvoie l'attribut :attr:`returncode`." #: library/asyncio-subprocess.rst:199 msgid "" @@ -228,32 +264,41 @@ msgid "" "pipe buffer to accept more data. Use the :meth:`communicate` method when " "using pipes to avoid this condition." msgstr "" +"Cette méthode peut générer un interblocage quand ``stdout=PIPE`` ou " +"``stderr=PIPE`` est utilisé et que le sous-processus génère tellement de " +"sorties qu'il se bloque, dans l'attente que le tampon du tube côté OS " +"accepte des données supplémentaires. Pour éviter cette situation, choisissez " +"la méthode :meth:`communicate` quand vous utilisez des tubes." #: library/asyncio-subprocess.rst:207 msgid "Interact with process:" -msgstr "" +msgstr "Interagit avec le processus :" #: library/asyncio-subprocess.rst:209 msgid "send data to *stdin* (if *input* is not ``None``);" -msgstr "" +msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``);" #: library/asyncio-subprocess.rst:210 msgid "read data from *stdout* and *stderr*, until EOF is reached;" msgstr "" +"lit les données sur *stdout* et *stderr*, jusqu'à ce que le EOF soit " +"atteint ;" #: library/asyncio-subprocess.rst:211 msgid "wait for process to terminate." -msgstr "" +msgstr "attend que le processus s'arrête." #: library/asyncio-subprocess.rst:213 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." msgstr "" +"Le paramètre optionnel *input* (objet de type :class:`bytes`) représente les " +"données transmises au sous-processus." #: library/asyncio-subprocess.rst:216 msgid "Return a tuple ``(stdout_data, stderr_data)``." -msgstr "" +msgstr "Renvoie un tuple ``(stdout_data, stderr_data)``." #: library/asyncio-subprocess.rst:218 msgid "" @@ -327,7 +372,7 @@ msgstr "" #: library/asyncio-subprocess.rst:260 msgid "On Windows this method is an alias for :meth:`terminate`." -msgstr "" +msgstr "Sous Windows, cette méthode est un alias pour :meth:`terminate`." #: library/asyncio-subprocess.rst:264 msgid "" @@ -358,6 +403,8 @@ msgstr "" #: library/asyncio-subprocess.rst:288 msgid "Process identification number (PID)." msgstr "" +"Numéro d'identification du processus (PID, pour *Process Identification " +"Number* en anglais)." #: library/asyncio-subprocess.rst:290 msgid "" @@ -367,7 +414,7 @@ msgstr "" #: library/asyncio-subprocess.rst:295 msgid "Return code of the process when it exits." -msgstr "" +msgstr "Code de retour du processus quand il se termine." #: library/asyncio-subprocess.rst:297 msgid "A ``None`` value indicates that the process has not terminated yet." @@ -414,18 +461,25 @@ msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" +"Instancier un sous-processus avec un observateur enfant actuel *inactif* " +"lève l'exception :exc:`RuntimeError`." #: library/asyncio-subprocess.rst:326 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." msgstr "" +"Notez que ces implémentations alternatives de la boucle d'événements peuvent " +"comporter leurs propres limitations. Veuillez vous référer à leur " +"documentation." #: library/asyncio-subprocess.rst:331 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" +"La section :ref:`Exécution concurrente et multi-fils d'exécution `." #: library/asyncio-subprocess.rst:336 msgid "Examples" @@ -437,14 +491,20 @@ msgid "" "subprocess and the :class:`StreamReader` class to read from its standard " "output." msgstr "" +"Un exemple utilisant la classe :class:`~asyncio.subprocess.Process` pour " +"contrôler un sous-processus et la classe :class:`StreamReader` pour lire sa " +"sortie standard." #: library/asyncio-subprocess.rst:344 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" +"Le sous-processus est créé par la fonction :func:`create_subprocess_exec` ::" #: library/asyncio-subprocess.rst:371 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." msgstr "" +"Voir également :ref:`le même exemple `, " +"écrit en utilisant des API de bas niveau." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 54dde68d..fb62e066 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -986,6 +986,8 @@ msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" +"Un ``DeprecationWarning`` est levé si *loop* n'est pas spécifié et s'il n'y " +"a pas de boucle d'évènements en cours d'exécution." #: library/asyncio-task.rst:850 msgid "Request the Task to be cancelled." diff --git a/library/audit_events.po b/library/audit_events.po index 7fae9950..202a1431 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -55,6 +55,8 @@ msgid "" "The following events are raised internally and do not correspond to any " "public API of CPython:" msgstr "" +"Les évènements suivants sont levés en interne et ne correspondent à aucune " +"API publique de CPython:" #: library/audit_events.rst:27 #, fuzzy @@ -67,61 +69,63 @@ msgstr "Arguments" #: library/audit_events.rst:29 msgid "_winapi.CreateFile" -msgstr "" +msgstr "_winapi.CreateFile" #: library/audit_events.rst:29 msgid "" "``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " "``flags_and_attributes``" msgstr "" +"``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " +"``flags_and_attributes``" #: library/audit_events.rst:33 msgid "_winapi.CreateJunction" -msgstr "" +msgstr "_winapi.CreateJunction" #: library/audit_events.rst:33 msgid "``src_path``, ``dst_path``" -msgstr "" +msgstr "``src_path``, ``dst_path``" #: library/audit_events.rst:35 msgid "_winapi.CreateNamedPipe" -msgstr "" +msgstr "_winapi.CreateNamedPipe" #: library/audit_events.rst:35 msgid "``name``, ``open_mode``, ``pipe_mode``" -msgstr "" +msgstr "``name``, ``open_mode``, ``pipe_mode``" #: library/audit_events.rst:37 msgid "_winapi.CreatePipe" -msgstr "" +msgstr "_winapi.CreatePipe" #: library/audit_events.rst:39 msgid "_winapi.CreateProcess" -msgstr "" +msgstr "_winapi.CreateProcess" #: library/audit_events.rst:39 msgid "``application_name``, ``command_line``, ``current_directory``" -msgstr "" +msgstr "``application_name``, ``command_line``, ``current_directory``" #: library/audit_events.rst:42 msgid "_winapi.OpenProcess" -msgstr "" +msgstr "_winapi.OpenProcess" #: library/audit_events.rst:42 msgid "``process_id``, ``desired_access``" -msgstr "" +msgstr "``process_id``, ``desired_access``" #: library/audit_events.rst:44 msgid "_winapi.TerminateProcess" -msgstr "" +msgstr "_winapi.TerminateProcess" #: library/audit_events.rst:44 msgid "``handle``, ``exit_code``" -msgstr "" +msgstr "``handle``, ``exit_code``" #: library/audit_events.rst:46 msgid "ctypes.PyObj_FromPtr" -msgstr "" +msgstr "ctypes.PyObj_FromPtr" #: library/audit_events.rst:46 msgid "``obj``" diff --git a/library/dataclasses.po b/library/dataclasses.po index 252d3417..41efd387 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -600,10 +600,14 @@ msgstr "" #: library/dataclasses.rst:330 msgid "Example of using :func:`asdict` on nested dataclasses::" msgstr "" +"Exemple d'utilisation de :func:`asdict` sur des classes de données " +"imbriquées ::" #: library/dataclasses.rst:367 msgid "To create a shallow copy, the following workaround may be used::" msgstr "" +"Pour créer une copie superficielle, la solution de contournement suivante " +"peut être utilisée ::" #: library/dataclasses.rst:351 #, fuzzy diff --git a/library/functions.po b/library/functions.po index fb9a5673..20102189 100644 --- a/library/functions.po +++ b/library/functions.po @@ -30,7 +30,7 @@ msgstr "" #: library/functions.rst:0 msgid "**A**" -msgstr "" +msgstr "**A**" #: library/functions.rst:0 msgid ":func:`abs`" @@ -58,7 +58,7 @@ msgstr ":func:`ascii`" #: library/functions.rst:0 msgid "**B**" -msgstr "" +msgstr "**B**" #: library/functions.rst:0 msgid ":func:`bin`" @@ -82,7 +82,7 @@ msgstr "|func-bytes|_" #: library/functions.rst:0 msgid "**C**" -msgstr "" +msgstr "*C**" #: library/functions.rst:0 msgid ":func:`callable`" @@ -106,7 +106,7 @@ msgstr ":func:`complex`" #: library/functions.rst:0 msgid "**D**" -msgstr "" +msgstr "**D**" #: library/functions.rst:0 msgid ":func:`delattr`" @@ -126,7 +126,7 @@ msgstr ":func:`divmod`" #: library/functions.rst:0 msgid "**E**" -msgstr "" +msgstr "**E**" #: library/functions.rst:0 msgid ":func:`enumerate`" @@ -142,7 +142,7 @@ msgstr ":func:`exec`" #: library/functions.rst:0 msgid "**F**" -msgstr "" +msgstr "**F**" #: library/functions.rst:0 msgid ":func:`filter`" @@ -162,7 +162,7 @@ msgstr "|func-frozenset|_" #: library/functions.rst:0 msgid "**G**" -msgstr "" +msgstr "**G**" #: library/functions.rst:0 msgid ":func:`getattr`" @@ -174,7 +174,7 @@ msgstr ":func:`globals`" #: library/functions.rst:0 msgid "**H**" -msgstr "" +msgstr "**H**" #: library/functions.rst:0 msgid ":func:`hasattr`" @@ -194,7 +194,7 @@ msgstr ":func:`hex`" #: library/functions.rst:0 msgid "**I**" -msgstr "" +msgstr "**I**" #: library/functions.rst:0 msgid ":func:`id`" @@ -222,7 +222,7 @@ msgstr ":func:`iter`" #: library/functions.rst:0 msgid "**L**" -msgstr "" +msgstr "**L**" #: library/functions.rst:0 msgid ":func:`len`" @@ -238,7 +238,7 @@ msgstr ":func:`locals`" #: library/functions.rst:0 msgid "**M**" -msgstr "" +msgstr "**M**" #: library/functions.rst:0 msgid ":func:`map`" @@ -258,7 +258,7 @@ msgstr ":func:`min`" #: library/functions.rst:0 msgid "**N**" -msgstr "" +msgstr "**N**" #: library/functions.rst:0 msgid ":func:`next`" @@ -266,7 +266,7 @@ msgstr ":func:`next`" #: library/functions.rst:0 msgid "**O**" -msgstr "" +msgstr "**O**" #: library/functions.rst:0 msgid ":func:`object`" @@ -286,7 +286,7 @@ msgstr ":func:`ord`" #: library/functions.rst:0 msgid "**P**" -msgstr "" +msgstr "**P**" #: library/functions.rst:0 msgid ":func:`pow`" @@ -302,7 +302,7 @@ msgstr ":func:`property`" #: library/functions.rst:0 msgid "**R**" -msgstr "" +msgstr "**R**" #: library/functions.rst:0 msgid "|func-range|_" @@ -322,7 +322,7 @@ msgstr ":func:`round`" #: library/functions.rst:0 msgid "**S**" -msgstr "" +msgstr "**S**" #: library/functions.rst:0 msgid "|func-set|_" @@ -358,7 +358,7 @@ msgstr ":func:`super`" #: library/functions.rst:0 msgid "**T**" -msgstr "" +msgstr "**T**" #: library/functions.rst:0 msgid "|func-tuple|_" @@ -370,7 +370,7 @@ msgstr ":func:`type`" #: library/functions.rst:0 msgid "**V**" -msgstr "" +msgstr "**V**" #: library/functions.rst:0 msgid ":func:`vars`" @@ -378,7 +378,7 @@ msgstr ":func:`vars`" #: library/functions.rst:0 msgid "**Z**" -msgstr "" +msgstr "**Z**" #: library/functions.rst:0 msgid ":func:`zip`" @@ -386,7 +386,7 @@ msgstr ":func:`zip`" #: library/functions.rst:0 msgid "**_**" -msgstr "" +msgstr "**_**" #: library/functions.rst:0 msgid ":func:`__import__`" @@ -407,10 +407,15 @@ msgid "" "Return an :term:`asynchronous iterator` for an :term:`asynchronous " "iterable`. Equivalent to calling ``x.__aiter__()``." msgstr "" +"Renvoie un :term:`itérateur asynchrone ` pour l':term:" +"`itérable asynchrone ` donné. Équivaut à appeler ``x." +"__aiter__()``." #: library/functions.rst:69 msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." msgstr "" +"Remarque : contrairement à :func:`iter`, :func:`aiter` n'a pas de variante à " +"2 arguments." #: library/functions.rst:75 msgid "" @@ -425,11 +430,16 @@ msgid "" "When awaited, return the next item from the given :term:`asynchronous " "iterator`, or *default* if given and the iterator is exhausted." msgstr "" +"Lorsqu'il est attendu, renvoie l'élément suivant à partir de l':term:" +"`itérateur asynchrone ` donné, ou *default* s'il est " +"fourni et que l'itérateur est épuisé." #: library/functions.rst:90 msgid "" "This is the async variant of the :func:`next` builtin, and behaves similarly." msgstr "" +"Il s'agit de la variante asynchrone de la fonction native :func:`next` et " +"elle se comporte de la même manière." #: library/functions.rst:93 #, fuzzy @@ -743,6 +753,9 @@ msgid "" "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and " "have a new ``__wrapped__`` attribute." msgstr "" +"les méthodes de classe peuvent maintenant hériter des attributs des méthodes " +"(``__module__``, ``__name__``, ``__qualname__``, ``__doc__`` et " +"``__annotations__``) et ont un nouvel attribut ``__wrapped__``." #: library/functions.rst:278 msgid "" @@ -1224,6 +1237,8 @@ msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." msgstr "" +"Si la source donnée est une chaîne, les espaces de début et de fin et les " +"tabulations sont supprimées." #: library/functions.rst:543 msgid "" @@ -1535,6 +1550,10 @@ msgid "" "with two leading underscores) name in order to retrieve it with :func:" "`getattr`." msgstr "" +"étant donné que la :ref:`transformation des noms privés ` se produit au moment de la compilation, il faut modifier " +"manuellement le nom d'un attribut privé (attributs avec deux traits de " +"soulignement en tête) afin de le récupérer avec :func:`getattr`." #: library/functions.rst:740 #, fuzzy @@ -1678,7 +1697,7 @@ msgstr "" #: library/functions.rst:826 msgid "This is the address of the object in memory." -msgstr "" +msgstr "c'est l'adresse de l'objet en mémoire." #: library/functions.rst:828 #, fuzzy diff --git a/library/graphlib.po b/library/graphlib.po index 976c7d25..be33335b 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -17,14 +17,18 @@ msgstr "" #: library/graphlib.rst:2 msgid ":mod:`graphlib` --- Functionality to operate with graph-like structures" msgstr "" +":mod:`graphlib` — Fonctionnalités pour travailler avec des structures de " +"type graphe" #: library/graphlib.rst:8 msgid "**Source code:** :source:`Lib/graphlib.py`" -msgstr "" +msgstr "**Code source:** :source:`Lib/graphlib.py`" #: library/graphlib.rst:20 msgid "Provides functionality to topologically sort a graph of hashable nodes." msgstr "" +"Fournit les fonctionnalités pour trier topologiquement un graphe de nœuds " +"hachables." #: library/graphlib.rst:22 msgid "" @@ -37,6 +41,14 @@ msgid "" "topological ordering is possible if and only if the graph has no directed " "cycles, that is, if it is a directed acyclic graph." msgstr "" +"L'ordre topologique est un ordre linéaire des sommets d'un graphe afin que " +"pour chaque arête u → v d'un sommet u à un sommet v, cet ordre va placer le " +"sommet u avant le sommet v. Par exemple, les sommets d'un graphe peuvent " +"représenter une tâche à faire et une arête peut représenter la contrainte " +"comme quoi telle tâche doit être réalisée avant telle autre. Dans cet " +"exemple, un ordre topologique est simplement une séquence valide pour ces " +"tâches. Cet ordre n'est possible que si le graphe n'a pas de circuit, c'est-" +"à-dire si c'est un graphe orienté acyclique." #: library/graphlib.rst:31 msgid "" @@ -46,26 +58,35 @@ msgid "" "nodes that have edges that point to the value in the key). Additional nodes " "can be added to the graph using the :meth:`~TopologicalSorter.add` method." msgstr "" +"Si l'argument optionnel *graph* est fourni, cela doit être un dictionnaire " +"représentant un graphe acyclique avec comme clés les nœuds et comme valeurs " +"des itérables sur les prédécesseurs de ces nœuds dans le graphe (les nœuds " +"qui ont des arêtes qui pointent vers la valeur de la clé). Les nœuds " +"s'ajoutent en utilisant la méthode :meth:`~TopologicalSorter.add`" #: library/graphlib.rst:37 msgid "" "In the general case, the steps required to perform the sorting of a given " "graph are as follows:" msgstr "" +"De manière générale, les étapes nécessaires pour trier un graphe donné sont " +"les suivantes :" #: library/graphlib.rst:40 msgid "" "Create an instance of the :class:`TopologicalSorter` with an optional " "initial graph." msgstr "" +"créer une instance de la classe :class:`TopologicalSorter` avec " +"éventuellement un graphe initial ;" #: library/graphlib.rst:42 msgid "Add additional nodes to the graph." -msgstr "" +msgstr "ajouter d'autres nœuds au graphe ;" #: library/graphlib.rst:43 msgid "Call :meth:`~TopologicalSorter.prepare` on the graph." -msgstr "" +msgstr "appeler :meth:`~TopologicalSorter.prepare` sur le graphe ;" #: library/graphlib.rst:44 msgid "" @@ -73,6 +94,10 @@ msgid "" "nodes returned by :meth:`~TopologicalSorter.get_ready` and process them. " "Call :meth:`~TopologicalSorter.done` on each node as it finishes processing." msgstr "" +"tant que :meth:`~TopologicalSorter.is_active` est à ``True``, itérer sur les " +"nœuds renvoyés par :meth:`~TopologicalSorter.get_ready` pour les traiter. " +"Appeler :meth:`~TopologicalSorter.done` sur chaque nœud une fois le " +"traitement terminé." #: library/graphlib.rst:49 msgid "" @@ -80,24 +105,34 @@ msgid "" "no parallelism is involved, the convenience method :meth:`TopologicalSorter." "static_order` can be used directly:" msgstr "" +"Si vous souhaitez simplement trier des nœuds du graphe sans parallélisme, la " +"méthode :meth:`TopologicalSorter.static_order` peut être utilisée " +"directement :" #: library/graphlib.rst:60 msgid "" "The class is designed to easily support parallel processing of the nodes as " "they become ready. For instance::" msgstr "" +"La classe est conçue pour prendre facilement en charge le traitement en " +"parallèle des nœuds quand ils deviennent disponibles. Par exemple ::" #: library/graphlib.rst:87 msgid "" "Add a new node and its predecessors to the graph. Both the *node* and all " "elements in *predecessors* must be hashable." msgstr "" +"Ajoute un nouveau nœud et son prédécesseur dans le graphe. Le *node* ainsi " +"que tous les éléments dans *predecessors* doivent être hachables." #: library/graphlib.rst:90 msgid "" "If called multiple times with the same node argument, the set of " "dependencies will be the union of all dependencies passed in." msgstr "" +"S'il est appelé plusieurs fois avec le même nœud en tant qu'argument, " +"l'ensemble des dépendances sera l'union de toutes les dépendances qui auront " +"été transmises." #: library/graphlib.rst:93 msgid "" @@ -106,11 +141,17 @@ msgid "" "provided before is included among *predecessors* it will be automatically " "added to the graph with no predecessors of its own." msgstr "" +"Il est possible d'ajouter un nœud sans dépendance (*predecessors* n'est pas " +"fourni) ou de fournir une dépendance deux fois. Si un nœud qui n'a jamais " +"été fourni auparavant est inclus dans *predecessors* il sera automatiquement " +"ajouté au graphe sans prédécesseur lui-même." #: library/graphlib.rst:98 msgid "" "Raises :exc:`ValueError` if called after :meth:`~TopologicalSorter.prepare`." msgstr "" +"Lève une :exc:`ValueError` si appelée après :meth:`~TopologicalSorter." +"prepare`." #: library/graphlib.rst:102 msgid "" @@ -121,6 +162,12 @@ msgid "" "be modified, and therefore no more nodes can be added using :meth:" "`~TopologicalSorter.add`." msgstr "" +"Indique que le graphe est terminé et vérifie les circuits du graphe. Si un " +"circuit est détecté, une :exc:`CycleError` est levée mais :meth:" +"`~TopologicalSorter.get_ready` peut encore être utilisée pour obtenir autant " +"de nœuds que possible avant que les circuits ne bloquent la progression. " +"Après un appel de cette fonction, le graphe ne peut pas être modifié, et " +"donc aucun nœud ne peut être ajouté avec :meth:`~TopologicalSorter.add`." #: library/graphlib.rst:111 msgid "" @@ -131,22 +178,32 @@ msgid "" "`TopologicalSorter.done` is less than the number that have been returned by :" "meth:`TopologicalSorter.get_ready`." msgstr "" +"Renvoie ``True`` si une progression peut être faite et ``False`` dans le cas " +"contraire. La progression est possible si des circuits ne bloquent pas la " +"résolution ou qu'il reste des nœuds prêts qui n'ont pas encore été renvoyés " +"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds marqués :" +"meth:`TopologicalSorter.done` est inférieur au nombre qui a été renvoyé par :" +"meth:`TopologicalSorter.get_ready`." #: library/graphlib.rst:118 msgid "" "The :meth:`~TopologicalSorter.__bool__` method of this class defers to this " "function, so instead of::" msgstr "" +"La méthode :meth:`~TopologicalSorter.__bool__` de cette classe renvoie à " +"cette fonction donc au lieu de ::" #: library/graphlib.rst:124 msgid "it is possible to simply do::" -msgstr "" +msgstr "il est plus simple de faire ::" #: library/graphlib.rst:152 msgid "" "Raises :exc:`ValueError` if called without calling :meth:`~TopologicalSorter." "prepare` previously." msgstr "" +"Lève une :exc:`ValueError` si l'appel à :meth:`~TopologicalSorter.prepare` " +"n'a pas été fait au préalable." #: library/graphlib.rst:134 msgid "" @@ -154,6 +211,9 @@ msgid "" "processed, unblocking any successor of each node in *nodes* for being " "returned in the future by a call to :meth:`TopologicalSorter.get_ready`." msgstr "" +"Marque un ensemble de nœuds renvoyé par :meth:`TopologicalSorter.get_ready` " +"comme traités, permettant aux successeurs de chaque nœud de *nodes* d'être " +"renvoyés lors d'un prochain appel à :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:138 msgid "" @@ -163,6 +223,11 @@ msgid "" "meth:`~TopologicalSorter.prepare` or if node has not yet been returned by :" "meth:`~TopologicalSorter.get_ready`." msgstr "" +"Lève une :exc:`ValueError` si n'importe quel nœud dans *nodes* a déjà été " +"marqué comme traité par un précédent appel à cette méthode ou si un nœud n'a " +"pas été ajouté au graphe en utilisant :meth:`TopologicalSorter.add`, si " +"l'appel est fait sans appel à :meth:`~TopologicalSorter.prepare` ou si le " +"nœud n'a pas encore été renvoyé par :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:146 msgid "" @@ -172,6 +237,11 @@ msgid "" "nodes that have all their predecessors already processed. Once no more " "progress can be made, empty tuples are returned." msgstr "" +"Renvoie un *n*-uplet avec tous les nœuds prêts. Renvoie d'abord tous les " +"nœuds sans prédécesseurs, et une fois marqués comme traités avec un appel " +"de :meth:`TopologicalSorter.done`, les autres appels renvoient tous les " +"nouveaux nœuds dont tous les prédécesseurs sont traités. Une fois que la " +"progression n'est plus possible, des tuples vides sont renvoyés." #: library/graphlib.rst:157 msgid "" @@ -186,6 +256,8 @@ msgid "" "The particular order that is returned may depend on the specific order in " "which the items were inserted in the graph. For example:" msgstr "" +"Le tri obtenu peut dépendre de l'ordre dans lequel les éléments ont été " +"ajoutés dans le graphe. Par exemple :" #: library/graphlib.rst:186 msgid "" @@ -194,10 +266,14 @@ msgid "" "`~TopologicalSorter.get_ready`) and the order between them is determined by " "the order of insertion." msgstr "" +"Ceci est dû au fait que \"0\" et \"2\" sont au même niveau dans le graphe " +"(ils auraient été renvoyés dans le même appel à :meth:`~TopologicalSorter." +"get_ready`) et l'ordre entre eux est déterminé par l'ordre lors de " +"l'insertion." #: library/graphlib.rst:192 msgid "If any cycle is detected, :exc:`CycleError` will be raised." -msgstr "" +msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." #: library/graphlib.rst:198 msgid "Exceptions" @@ -205,7 +281,7 @@ msgstr "Exceptions" #: library/graphlib.rst:199 msgid "The :mod:`graphlib` module defines the following exception classes:" -msgstr "" +msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" #: library/graphlib.rst:203 msgid "" @@ -213,6 +289,9 @@ msgid "" "cycles exist in the working graph. If multiple cycles exist, only one " "undefined choice among them will be reported and included in the exception." msgstr "" +"Une classe héritant de :exc:`ValueError` levée par :meth:`TopologicalSorter." +"prepare` si un circuit existe dans le graphe courant. Si plusieurs circuits " +"existent, un seul est inclus dans l'exception." #: library/graphlib.rst:207 msgid "" @@ -222,3 +301,8 @@ msgid "" "predecessor of the next node in the list. In the reported list, the first " "and the last node will be the same, to make it clear that it is cyclic." msgstr "" +"On accède au circuit détecté via le second élément de l'attribut :attr:" +"`~CycleError.args` de l'instance de l'exception. Cet attribut est une liste " +"de nœuds où chaque nœud est, dans le graphe, un prédécesseur immédiat du " +"nœud suivant de la liste. Dans la liste renvoyée, le premier et le dernier " +"nœud sont les mêmes afin de bien indiquer que c'est un circuit." diff --git a/library/http.server.po b/library/http.server.po index c1562769..30c693b7 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -671,7 +671,7 @@ msgstr "" #: library/http.server.rst:495 msgid "Security Considerations" -msgstr "" +msgstr "Considérations de sécurité" #: library/http.server.rst:499 msgid "" diff --git a/library/idle.po b/library/idle.po index c7f9024c..6c91319b 100644 --- a/library/idle.po +++ b/library/idle.po @@ -1129,7 +1129,7 @@ msgstr "" #: library/idle.rst:478 msgid "Search and Replace" -msgstr "" +msgstr "Recherche et substitution" #: library/idle.rst:480 msgid "" diff --git a/library/importlib.po b/library/importlib.po index ecc100a7..13266548 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -710,10 +710,11 @@ msgstr "" #: library/importlib.rst:531 msgid "If the resource cannot be found, :exc:`FileNotFoundError` is raised." msgstr "" +"Si la ressource ne peut pas être trouvée, :exc:`FileNotFoundError` est levée." #: library/importlib.rst:536 msgid "Returns the file system path to the *resource*." -msgstr "" +msgstr "Renvoie le chemin de *resource* dans le système de fichiers." #: library/importlib.rst:538 msgid "" diff --git a/library/inspect.po b/library/inspect.po index 86e15ef4..fa2dfdde 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -17,7 +17,7 @@ msgstr "" #: library/inspect.rst:2 msgid ":mod:`inspect` --- Inspect live objects" -msgstr "" +msgstr ":mod:`inspect` — Inspection d'objets" #: library/inspect.rst:10 msgid "**Source code:** :source:`Lib/inspect.py`" @@ -32,6 +32,13 @@ msgid "" "extract and format the argument list for a function, or get all the " "information you need to display a detailed traceback." msgstr "" +"Le module :mod:`inspect` implémente plusieurs fonctions permettant d'obtenir " +"de l'information à propos d'objets tels que les modules, classes, méthodes, " +"fonctions, traces de piles, cadres d'exécution et objets code. Par exemple, " +"il permet d'inspecter le contenu d'une classe, de retrouver le code source " +"d'une méthode, d'extraire et de mettre en forme une liste d'arguments pour " +"une fonction, ou obtenir toute l'information nécessaire pour afficher une " +"pile d'appels détaillée." #: library/inspect.rst:21 msgid "" @@ -39,10 +46,13 @@ msgid "" "checking, getting source code, inspecting classes and functions, and " "examining the interpreter stack." msgstr "" +"Ce module donne accès à 4 types de services : vérification de typage, " +"obtention de code source, inspection de classes et de fonctions et examen de " +"la pile d'exécution." #: library/inspect.rst:29 msgid "Types and members" -msgstr "" +msgstr "Types et membres" #: library/inspect.rst:31 msgid "" @@ -75,7 +85,7 @@ msgstr "__doc__" #: library/inspect.rst:48 library/inspect.rst:76 library/inspect.rst:234 msgid "documentation string" -msgstr "" +msgstr "texte de documentation" #: library/inspect.rst:45 msgid "__file__" @@ -83,7 +93,7 @@ msgstr "__file__" #: library/inspect.rst:45 msgid "filename (missing for built-in modules)" -msgstr "" +msgstr "nom de fichier (inexistant pour les fonctions natives)" #: library/inspect.rst:48 msgid "class" @@ -95,7 +105,7 @@ msgstr "__name__" #: library/inspect.rst:50 msgid "name with which this class was defined" -msgstr "" +msgstr "nom de la classe lors de sa définition" #: library/inspect.rst:63 library/inspect.rst:205 library/inspect.rst:239 msgid "__qualname__" @@ -111,7 +121,7 @@ msgstr "__module__" #: library/inspect.rst:55 msgid "name of module in which this class was defined" -msgstr "" +msgstr "nom du module contenant la classe lors de sa définition" #: library/inspect.rst:58 msgid "method" @@ -119,7 +129,7 @@ msgstr "méthode" #: library/inspect.rst:60 msgid "name with which this method was defined" -msgstr "" +msgstr "nom de la méthode lors de sa définition" #: library/inspect.rst:65 msgid "__func__" @@ -127,7 +137,7 @@ msgstr "__func__" #: library/inspect.rst:65 msgid "function object containing implementation of method" -msgstr "" +msgstr "objet fonction contenant l'implémentation de la méthode" #: library/inspect.rst:241 msgid "__self__" @@ -135,11 +145,11 @@ msgstr "__self__" #: library/inspect.rst:69 msgid "instance to which this method is bound, or ``None``" -msgstr "" +msgstr "instance à laquelle cette méthode est liée, ou ``None``" #: library/inspect.rst:73 msgid "name of module in which this method was defined" -msgstr "" +msgstr "nom du module contenant la méthode lors de sa définition" #: library/inspect.rst:76 msgid "function" @@ -147,7 +157,7 @@ msgstr "fonction" #: library/inspect.rst:78 msgid "name with which this function was defined" -msgstr "" +msgstr "nom de la fonction lors de sa définition" #: library/inspect.rst:83 msgid "__code__" @@ -156,6 +166,8 @@ msgstr "__code__" #: library/inspect.rst:83 msgid "code object containing compiled function :term:`bytecode`" msgstr "" +"objet code contenant le :term:`code intermédiaire ` d'une fonction " +"compilée" #: library/inspect.rst:87 msgid "__defaults__" @@ -163,7 +175,7 @@ msgstr "__defaults__" #: library/inspect.rst:87 msgid "tuple of any default values for positional or keyword parameters" -msgstr "" +msgstr "*n*-uplet de valeurs par défaut pour arguments positionnels ou nommés" #: library/inspect.rst:91 msgid "__kwdefaults__" @@ -172,6 +184,7 @@ msgstr "__kwdefaults__" #: library/inspect.rst:91 msgid "mapping of any default values for keyword-only parameters" msgstr "" +"tableau de correspondance de valeurs par défaut pour les paramètres nommés" #: library/inspect.rst:95 msgid "__globals__" @@ -179,7 +192,7 @@ msgstr "__globals__" #: library/inspect.rst:95 msgid "global namespace in which this function was defined" -msgstr "" +msgstr "espace de nommage global lors de la définition de la fonction" #: library/inspect.rst:98 msgid "__builtins__" @@ -198,10 +211,12 @@ msgid "" "mapping of parameters names to annotations; ``\"return\"`` key is reserved " "for return annotations." msgstr "" +"tableau de correspondance des paramètres à leur annotation ; ``\"return\"`` " +"est un mot-clé réservé pour les annotations de type renvoyé." #: library/inspect.rst:106 msgid "name of module in which this function was defined" -msgstr "" +msgstr "nom du module contenant la fonction lors de sa définition" #: library/inspect.rst:109 msgid "traceback" @@ -213,7 +228,7 @@ msgstr "tb_frame" #: library/inspect.rst:109 msgid "frame object at this level" -msgstr "" +msgstr "objet cadre à ce niveau" #: library/inspect.rst:112 msgid "tb_lasti" @@ -222,6 +237,8 @@ msgstr "tb_lasti" #: library/inspect.rst:134 msgid "index of last attempted instruction in bytecode" msgstr "" +"index de la dernière instruction lancée dans le code intermédiaire " +"(``bytecode``)" #: library/inspect.rst:115 msgid "tb_lineno" @@ -229,7 +246,7 @@ msgstr "tb_lineno" #: library/inspect.rst:137 msgid "current line number in Python source code" -msgstr "" +msgstr "numéro de ligne courant dans le code source Python" #: library/inspect.rst:118 msgid "tb_next" @@ -237,11 +254,11 @@ msgstr "tb_next" #: library/inspect.rst:118 msgid "next inner traceback object (called by this level)" -msgstr "" +msgstr "trace de pile interne suivante (appel par le cadre courant)" #: library/inspect.rst:207 library/inspect.rst:224 msgid "frame" -msgstr "" +msgstr "cadre" #: library/inspect.rst:122 msgid "f_back" @@ -250,6 +267,7 @@ msgstr "f_back" #: library/inspect.rst:122 msgid "next outer frame object (this frame's caller)" msgstr "" +"trace d'exécution externe suivante (le contexte appelant du cadre courant)" #: library/inspect.rst:125 msgid "f_builtins" @@ -257,7 +275,7 @@ msgstr "f_builtins" #: library/inspect.rst:125 msgid "builtins namespace seen by this frame" -msgstr "" +msgstr "espace de nommage natif du cadre courant" #: library/inspect.rst:128 msgid "f_code" @@ -265,7 +283,7 @@ msgstr "f_code" #: library/inspect.rst:128 msgid "code object being executed in this frame" -msgstr "" +msgstr "objet code exécuté dans le cadre courant" #: library/inspect.rst:131 msgid "f_globals" @@ -273,7 +291,7 @@ msgstr "f_globals" #: library/inspect.rst:131 msgid "global namespace seen by this frame" -msgstr "" +msgstr "espace de nommage global tel que vu par cadre courant" #: library/inspect.rst:134 msgid "f_lasti" @@ -289,7 +307,7 @@ msgstr "f_locals" #: library/inspect.rst:140 msgid "local namespace seen by this frame" -msgstr "" +msgstr "espace de nommage local du cadre courant" #: library/inspect.rst:143 msgid "f_trace" @@ -297,11 +315,11 @@ msgstr "f_trace" #: library/inspect.rst:143 msgid "tracing function for this frame, or ``None``" -msgstr "" +msgstr "fonction de traçage du cadre courant, ou ``None``" #: library/inspect.rst:211 library/inspect.rst:228 msgid "code" -msgstr "" +msgstr "code" #: library/inspect.rst:146 msgid "co_argcount" @@ -312,6 +330,7 @@ msgid "" "number of arguments (not including keyword only arguments, \\* or \\*\\* " "args)" msgstr "" +"nombre d'arguments (excluant les arguments *keyword-only*, \\* ou \\*\\*)" #: library/inspect.rst:151 msgid "co_code" @@ -319,15 +338,16 @@ msgstr "co_code" #: library/inspect.rst:151 msgid "string of raw compiled bytecode" -msgstr "" +msgstr "texte du code intermédiaire compilé" #: library/inspect.rst:154 msgid "co_cellvars" -msgstr "" +msgstr "co_cellvars" #: library/inspect.rst:154 msgid "tuple of names of cell variables (referenced by containing scopes)" msgstr "" +"*n*-uplet du nom des cellules variables (référencées par leur contexte)" #: library/inspect.rst:158 msgid "co_consts" @@ -336,6 +356,7 @@ msgstr "co_consts" #: library/inspect.rst:158 msgid "tuple of constants used in the bytecode" msgstr "" +"*n*-uplet des constantes utilisées dans le code intermédiaire (``bytecode``)" #: library/inspect.rst:161 msgid "co_filename" @@ -343,7 +364,7 @@ msgstr "co_filename" #: library/inspect.rst:161 msgid "name of file in which this code object was created" -msgstr "" +msgstr "nom du fichier dans lequel cet objet code a été créé" #: library/inspect.rst:165 msgid "co_firstlineno" @@ -351,7 +372,7 @@ msgstr "co_firstlineno" #: library/inspect.rst:165 msgid "number of first line in Python source code" -msgstr "" +msgstr "numéro de la première ligne dans le code source Python" #: library/inspect.rst:168 msgid "co_flags" @@ -361,6 +382,8 @@ msgstr "co_flags" msgid "" "bitmap of ``CO_*`` flags, read more :ref:`here `" msgstr "" +"**bitmap** des options ``CO_*``, voir plus :ref:`ici `" #: library/inspect.rst:172 msgid "co_lnotab" @@ -369,6 +392,8 @@ msgstr "co_lnotab" #: library/inspect.rst:172 msgid "encoded mapping of line numbers to bytecode indices" msgstr "" +"tableau de correspondance encodée des numéros de ligne aux numéros d'indices " +"du code intermédiaire (``bytecode``)" #: library/inspect.rst:176 msgid "co_freevars" @@ -377,6 +402,8 @@ msgstr "co_freevars" #: library/inspect.rst:176 msgid "tuple of names of free variables (referenced via a function's closure)" msgstr "" +"*n*-uplet des noms de variables libres (référencées par la fermeture " +"(*closure* en anglais) d'une fonction)" #: library/inspect.rst:180 msgid "co_posonlyargcount" @@ -384,7 +411,7 @@ msgstr "co_posonlyargcount" #: library/inspect.rst:180 msgid "number of positional only arguments" -msgstr "" +msgstr "nombre d'arguments positionnels" #: library/inspect.rst:183 msgid "co_kwonlyargcount" @@ -392,7 +419,7 @@ msgstr "co_kwonlyargcount" #: library/inspect.rst:183 msgid "number of keyword only arguments (not including \\*\\* arg)" -msgstr "" +msgstr "nombre d'arguments *keywords-only* (excluant les arguments \\*\\*)" #: library/inspect.rst:187 msgid "co_name" @@ -400,7 +427,7 @@ msgstr "co_name" #: library/inspect.rst:187 msgid "name with which this code object was defined" -msgstr "" +msgstr "nom de l'objet code lors de sa définition" #: library/inspect.rst:190 msgid "co_names" @@ -416,7 +443,7 @@ msgstr "co_nlocals" #: library/inspect.rst:194 msgid "number of local variables" -msgstr "" +msgstr "nombre de variables locales" #: library/inspect.rst:196 msgid "co_stacksize" @@ -424,7 +451,7 @@ msgstr "co_stacksize" #: library/inspect.rst:196 msgid "virtual machine stack space required" -msgstr "" +msgstr "espace requis pour la pile de la machine virtuelle" #: library/inspect.rst:199 msgid "co_varnames" @@ -432,7 +459,7 @@ msgstr "co_varnames" #: library/inspect.rst:199 msgid "tuple of names of arguments and local variables" -msgstr "" +msgstr "*n*-uplet des noms des arguments et variables locales" #: library/inspect.rst:203 msgid "generator" @@ -440,7 +467,7 @@ msgstr "générateur" #: library/inspect.rst:217 msgid "name" -msgstr "" +msgstr "nom" #: library/inspect.rst:207 msgid "gi_frame" @@ -452,7 +479,7 @@ msgstr "gi_running" #: library/inspect.rst:209 msgid "is the generator running?" -msgstr "" +msgstr "est-ce que le générateur est en cours d'exécution ?" #: library/inspect.rst:211 msgid "gi_code" @@ -464,7 +491,7 @@ msgstr "gi_yieldfrom" #: library/inspect.rst:213 msgid "object being iterated by ``yield from``, or ``None``" -msgstr "" +msgstr "objet pointé par l'itérateur ``yield from``, ou ``None``" #: library/inspect.rst:217 msgid "coroutine" @@ -476,7 +503,7 @@ msgstr "cr_await" #: library/inspect.rst:221 msgid "object being awaited on, or ``None``" -msgstr "" +msgstr "objet sur lequel on attend (*await*) présentement, ou ``None``" #: library/inspect.rst:224 msgid "cr_frame" @@ -488,7 +515,7 @@ msgstr "cr_running" #: library/inspect.rst:226 msgid "is the coroutine running?" -msgstr "" +msgstr "est-ce que la coroutine est en cours d'exécution ?" #: library/inspect.rst:228 msgid "cr_code" @@ -496,37 +523,41 @@ msgstr "cr_code" #: library/inspect.rst:230 msgid "cr_origin" -msgstr "" +msgstr "cr_origin" #: library/inspect.rst:230 msgid "where coroutine was created, or ``None``. See |coroutine-origin-link|" msgstr "" +"lieu de création de la coroutine, ou ``None``. Voir |coroutine-origin-link|" #: library/inspect.rst:234 msgid "builtin" -msgstr "" +msgstr "builtin" #: library/inspect.rst:236 msgid "original name of this function or method" -msgstr "" +msgstr "nom originel de cette fonction ou méthode" #: library/inspect.rst:241 msgid "instance to which a method is bound, or ``None``" -msgstr "" +msgstr "instance à laquelle est liée une méthode, ou ``None``" #: library/inspect.rst:248 msgid "Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators." msgstr "" +"ajout des attributs ``__qualname`` et ``gi_yieldfrom`` aux générateurs." #: library/inspect.rst:250 msgid "" "The ``__name__`` attribute of generators is now set from the function name, " "instead of the code name, and it can now be modified." msgstr "" +"L'attribut ``__name__`` du générateur est maintenant déterminé par le nom de " +"la fonction, plutôt que le nom du code, et peut maintenant être modifié." #: library/inspect.rst:255 msgid "Add ``cr_origin`` attribute to coroutines." -msgstr "" +msgstr "Ajout de l'attribut ``cr_origin`` aux coroutines." #: library/inspect.rst:259 msgid "Add ``__builtins__`` attribute to functions." @@ -539,6 +570,10 @@ msgid "" "with the ``value`` object of each member—is supplied, only members for which " "the predicate returns a true value are included." msgstr "" +"Renvoie tous les membres d'un objet sous la forme d'une liste de paires " +"``(nom, valeur)``, ordonnée par nom. Si l'argument *predicate* (qui sera " +"appelé avec la ``valeur`` de chaque membre) est fourni, seuls les membres " +"pour lequel le prédicat est vrai seront inclus." #: library/inspect.rst:270 msgid "" @@ -546,6 +581,10 @@ msgid "" "metaclass when the argument is a class and those attributes have been listed " "in the metaclass' custom :meth:`__dir__`." msgstr "" +":func:`getmembers` renvoie les attributs de classe définis dans la " +"métaclasse seulement lorsque l'argument est une classe et que ces attributs " +"ont été listés dans la méthode personnalisée :meth:`__dir__` de cette " +"métaclasse." #: library/inspect.rst:277 msgid "" @@ -555,6 +594,11 @@ msgid "" "the final path component is returned with the extension removed. Otherwise, " "``None`` is returned." msgstr "" +"Renvoie le nom du module indiqué par le fichier *path*, excluant le nom des " +"paquets englobants. L'extension du fichier est vérifiée parmi toutes les " +"entrées renvoyées par :func:`importlib.machinery.all_suffixes`. S'il y a une " +"correspondance, le chemin final est renvoyé, sans l'extension. Autrement, " +"``None`` est renvoyé." #: library/inspect.rst:283 msgid "" @@ -562,119 +606,151 @@ msgid "" "modules - paths that potentially refer to Python packages will still return " "``None``." msgstr "" +"Notez que cette fonction renvoie un nom significatif *seulement* pour les " +"modules Python - les chemins qui réfèrent à des paquets Python donnent " +"toujours ``None``." #: library/inspect.rst:287 msgid "The function is based directly on :mod:`importlib`." -msgstr "" +msgstr "La fonction est basée directement sur :mod:`importlib`." #: library/inspect.rst:293 msgid "Return ``True`` if the object is a module." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un module." #: library/inspect.rst:298 msgid "" "Return ``True`` if the object is a class, whether built-in or created in " "Python code." msgstr "" +"Renvoie ``True`` si l'objet est une classe, qu'il s'agisse d'un objet natif " +"ou qu'elle soit écrite en Python." #: library/inspect.rst:304 msgid "Return ``True`` if the object is a bound method written in Python." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est une méthode liée écrite en Python." #: library/inspect.rst:309 msgid "" "Return ``True`` if the object is a Python function, which includes functions " "created by a :term:`lambda` expression." msgstr "" +"Renvoie ``True`` si l'objet est une fonction Python, ce qui inclut les " +"fonctions créées par une expression :term:`lambda `." #: library/inspect.rst:315 msgid "Return ``True`` if the object is a Python generator function." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un générateur." #: library/inspect.rst:317 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a Python generator function." msgstr "" +"les fonctions englobées dans :func:`functools.partial` renvoient maintenant " +"``True`` si la fonction englobée est un générateur Python." #: library/inspect.rst:324 msgid "Return ``True`` if the object is a generator." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un générateur." #: library/inspect.rst:329 msgid "" "Return ``True`` if the object is a :term:`coroutine function` (a function " "defined with an :keyword:`async def` syntax)." msgstr "" +"Renvoie ``True`` si l'objet est une :term:`fonction coroutine ` (une fonction définie avec une syntaxe :keyword:`async def`)." #: library/inspect.rst:334 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`coroutine function`." msgstr "" +"les fonctions englobées par :func:`functools.partial` renvoient maintenant " +"``True`` si la fonction englobée est une :term:`coroutine `." #: library/inspect.rst:341 msgid "" "Return ``True`` if the object is a :term:`coroutine` created by an :keyword:" "`async def` function." msgstr "" +"Renvoie ``True`` si l'objet est une :term:`coroutine ` créée par " +"une fonction :keyword:`async def`." #: library/inspect.rst:349 msgid "" "Return ``True`` if the object can be used in :keyword:`await` expression." msgstr "" +"Renvoie ``True`` si l'objet peut être utilisé par une expression :keyword:" +"`await`." #: library/inspect.rst:351 msgid "" "Can also be used to distinguish generator-based coroutines from regular " "generators::" msgstr "" +"Peut aussi être utilisé pour distinguer les coroutines basées sur un " +"générateur des générateurs normaux ::" #: library/inspect.rst:368 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator` function, " "for example::" msgstr "" +"Renvoie ``True`` si l'objet est un :term:`générateur asynchrone " +"`, par exemple ::" #: library/inspect.rst:379 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`asynchronous generator` function." msgstr "" +"les fonctions englobées par :func:`functools.partial` renvoient maintenant " +"``True`` si la fonction englobée est une fonction :term:`génératrice " +"asynchrone `." #: library/inspect.rst:386 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator iterator` " "created by an :term:`asynchronous generator` function." msgstr "" +"Renvoie ``True`` si l'objet est un :term:`itérateur de générateur asynchrone " +"` créé par une fonction :term:`génératrice " +"asynchrone `." #: library/inspect.rst:393 msgid "Return ``True`` if the object is a traceback." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est une trace d'exécution." #: library/inspect.rst:398 msgid "Return ``True`` if the object is a frame." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un cadre." #: library/inspect.rst:403 msgid "Return ``True`` if the object is a code." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un code." #: library/inspect.rst:408 msgid "" "Return ``True`` if the object is a built-in function or a bound built-in " "method." msgstr "" +"Renvoie ``True`` si l'objet est une fonction native ou une méthode liée " +"native." #: library/inspect.rst:413 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "" +"Renvoie ``True`` si l'objet est une fonction, qu'elle soit définie par " +"l'utilisateur, native, ou une méthode." #: library/inspect.rst:418 msgid "Return ``True`` if the object is an abstract base class." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est une classe de base abstraite." #: library/inspect.rst:423 msgid "" @@ -682,6 +758,9 @@ msgid "" "`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " "true." msgstr "" +"Renvoie ``True`` si l'objet est un descripteur de méthode sauf si :func:" +"`ismethod`, :func:`isclass`, :func:`isfunction` ou :func:`isbuiltin` sont " +"vrais (``True``)." #: library/inspect.rst:427 msgid "" @@ -690,6 +769,10 @@ msgid "" "method, but beyond that the set of attributes varies. A :attr:`~definition." "__name__` attribute is usually sensible, and :attr:`__doc__` often is." msgstr "" +"Cela est par exemple vrai pour ``int.__add__``. Un objet qui passe ce test a " +"une méthode :meth:`~object.__get__`, pas de méthode :meth:`~object.__set__`, " +"sans être regardant sur les autres les attributs. Un attribut :attr:" +"`~definition.__name__` sera souvent présent et :attr:`__doc__` également." #: library/inspect.rst:433 msgid "" @@ -698,10 +781,15 @@ msgid "" "the other tests promise more -- you can, e.g., count on having the :attr:" "`__func__` attribute (etc) when an object passes :func:`ismethod`." msgstr "" +"Les méthodes implémentées via descripteurs et qui passent l'un ou l'autre " +"des tests renvoie ``False`` pour :func:`ismethoddescriptor`, simplement " +"parce que les autres tests garantissent davantage — vous pouvez supposer " +"l'existence d'un attribut :attr:`__func__` (etc.) lorsqu'un objet renvoie " +"``True`` pour :func:`ismethod` ." #: library/inspect.rst:441 msgid "Return ``True`` if the object is a data descriptor." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un descripteur de données." #: library/inspect.rst:443 msgid "" @@ -713,10 +801,18 @@ msgid "" "`~definition.__name__` and :attr:`__doc__` attributes (properties, getsets, " "and members have both of these attributes), but this is not guaranteed." msgstr "" +"Les descripteurs de données ont une méthode :attr:`~object.__set__` ou :attr:" +"`~object.__delete__`. Par exemple les propriétés (définies en Python), " +"*getsets* et les membres. Les 2 derniers sont définis en C et il existe des " +"tests plus spécifiques disponibles pour ceux-ci qui sont robustes à travers " +"les implémentations Python. Normalement, les descripteurs de données auront " +"aussi les attributs :attr:`~definition.__name__` et :attr:`~definition." +"__doc__` (les propriétés, *getsets* et membres auront les deux), mais cela " +"n'est pas garanti." #: library/inspect.rst:454 msgid "Return ``True`` if the object is a getset descriptor." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un descripteur *getset*." #: library/inspect.rst:458 msgid "" @@ -724,10 +820,13 @@ msgid "" "`PyGetSetDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" +"*getsets* sont des attributs définis dans des extensions de modules via des " +"structures :c:type:`PyGetSetDef`. Pour les implémentations Python ne " +"possédant pas ces types, cette méthode renvoie toujours ``False``." #: library/inspect.rst:465 msgid "Return ``True`` if the object is a member descriptor." -msgstr "" +msgstr "Renvoie ``True`` si l'objet est un membre descripteur." #: library/inspect.rst:469 msgid "" @@ -735,10 +834,13 @@ msgid "" "`PyMemberDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" +"Les membres descripteurs sont des attributs définis dans des extensions de " +"modules via des structures :c:type:`PyMemberDef`. Pour les implémentations " +"Python ne possédant pas ces types, cette méthode renvoie toujours ``False``." #: library/inspect.rst:477 msgid "Retrieving source code" -msgstr "" +msgstr "Récupération du code source" #: library/inspect.rst:481 msgid "" @@ -752,6 +854,8 @@ msgstr "" #: library/inspect.rst:487 msgid "Documentation strings are now inherited if not overridden." msgstr "" +"les chaînes de documentation sont maintenant héritées si elles ne sont pas " +"surchargées." #: library/inspect.rst:493 msgid "" @@ -761,6 +865,12 @@ msgid "" "code is unavailable, return ``None``. This could happen if the object has " "been defined in C or the interactive shell." msgstr "" +"Renvoie en une chaîne de caractères toute ligne de commentaire qui précède " +"immédiatement le code source de l'objet (pour une classe, fonction ou " +"méthode) ou en début d'un fichier de code source Python (si l'objet est un " +"module). Si le code source de l'objet n'est pas disponible, renvoie " +"``None``. Cela peut se produire si l'objet a été défini en C ou dans un " +"interpréteur interactif." #: library/inspect.rst:502 msgid "" @@ -768,6 +878,9 @@ msgid "" "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" +"Renvoie le nom du fichier (texte ou binaire) dans lequel un objet a été " +"défini. Cette méthode échoue avec :exc:`TypeError` si l'objet est un module, " +"une classe ou une fonction native." #: library/inspect.rst:509 msgid "" @@ -791,12 +904,20 @@ msgid "" "the first line of code was found. An :exc:`OSError` is raised if the source " "code cannot be retrieved." msgstr "" +"Renvoie une liste de lignes du code source et le numéro de la première ligne " +"d'un objet. L'argument peut être un module, classe, méthode, fonction, trace " +"d'exécution, cadre ou objet code. Le code source est renvoyé comme une liste " +"des lignes correspondant à l'objet, et le numéro de ligne indique la " +"position à laquelle la première ligne de code a été trouvée. Une :exc:" +"`OSError` est levée si le code source ne peut être retrouvé." #: library/inspect.rst:542 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" +":exc:`OSError` est levé plutôt que :exc:`IOError`, qui est maintenant un " +"alias de ce premier." #: library/inspect.rst:537 msgid "" @@ -805,12 +926,18 @@ msgid "" "source code is returned as a single string. An :exc:`OSError` is raised if " "the source code cannot be retrieved." msgstr "" +"Renvoie le texte du code source pour un objet. L'argument peut être un " +"module, classe, méthode, fonction, trace de pile, cadre ou objet code. Le " +"code source est renvoyé comme une seule chaîne de caractères. :exc:`OSError` " +"est levé si le code source ne peut être retrouvé." #: library/inspect.rst:549 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" +"Nettoie les indentations des chaînes de documentation qui sont indentées de " +"manières à s'aligner avec les blocs de code." #: library/inspect.rst:552 msgid "" @@ -819,10 +946,15 @@ msgid "" "removed. Empty lines at the beginning and end are subsequently removed. " "Also, all tabs are expanded to spaces." msgstr "" +"Enlève tous les espaces blancs en début de ligne à partir de la première. " +"Tout espace blanc en début de ligne qui puisse être enlevé de manière " +"uniforme à partir de la seconde ligne le sera. Les lignes vides en début et " +"en fin de document seront ensuite enlevées. Les tabulations seront " +"converties en espaces." #: library/inspect.rst:561 msgid "Introspecting callables with the Signature object" -msgstr "" +msgstr "Introspection des appelables avec l'objet Signature" #: library/inspect.rst:565 msgid "" @@ -830,16 +962,21 @@ msgid "" "its return annotation. To retrieve a Signature object, use the :func:" "`signature` function." msgstr "" +"L'objet Signature représente la signature de l'appel et de la valeur " +"renvoyée d'un objet appelable. Utilisez la fonction :func:`signature` pour " +"obtenir ces signatures." #: library/inspect.rst:571 msgid "Return a :class:`Signature` object for the given ``callable``::" -msgstr "" +msgstr "Renvoie un objet :class:`Signature` pour un ``appelable`` ::" #: library/inspect.rst:588 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" +"La fonction accepte une grande étendue d'appelables Python, des fonctions et " +"classes jusqu'aux objets :func:`functools.partials`." #: library/inspect.rst:591 msgid "" @@ -867,6 +1004,10 @@ msgid "" "to it are positional-only. For more info, see :ref:`the FAQ entry on " "positional-only parameters `." msgstr "" +"Une barre oblique (``/``) dans la signature d'une fonction dénote que les " +"paramètres qui précèdent sont exclusivement positionnels. Pour plus " +"d'information, voir :ref:`l'entrée de la FAQ sur les arguments exclusivement " +"positionnels `." #: library/inspect.rst:610 msgid "" @@ -874,6 +1015,9 @@ msgid "" "``callable`` specifically (``callable.__wrapped__`` will not be used to " "unwrap decorated callables.)" msgstr "" +"paramètre ``follow_wrapped``. Passez ``False`` pour obtenir une signature " +"``callable`` plus spécifiquement (``callable.__wrapped__`` ne sera pas " +"utilisé pour dépouiller un appelable décoré.)" #: library/inspect.rst:615 msgid "``globals``, ``locals``, and ``eval_str`` parameters." @@ -885,6 +1029,9 @@ msgid "" "Python. For example, in CPython, some built-in functions defined in C " "provide no metadata about their arguments." msgstr "" +"Certains appelables ne peuvent bénéficier d'introspection dans certains " +"environnements Python. Par exemple, en CPython, certaines fonctions natives " +"définies en C ne fournissent aucune métadonnée sur leurs arguments." #: library/inspect.rst:627 msgid "" @@ -892,6 +1039,9 @@ msgid "" "return annotation. For each parameter accepted by the function it stores a :" "class:`Parameter` object in its :attr:`parameters` collection." msgstr "" +"L'objet Signature représente la signature d'appel d'une fonction et son " +"annotation de type. Pour chaque paramètre accepté par une fonction, il " +"conserve un objet :class:`Parameter` dans sa collection :attr:`parameters`." #: library/inspect.rst:631 msgid "" @@ -901,26 +1051,39 @@ msgid "" "positional-only first, then positional-or-keyword, and that parameters with " "defaults follow parameters without defaults." msgstr "" +"L'argument optionnel *parameters* est une séquence d'objets :class:" +"`Parameters`, qui permet de vérifier qu'il n'y a pas de duplication de noms " +"de paramètres, que les paramètres sont dans le bon ordre (positionnels " +"d'abord, positionnels ou nommés ensuite et que les paramètres avec valeurs " +"par défaut sont placés après ceux qui n'en ont pas)." #: library/inspect.rst:637 msgid "" "The optional *return_annotation* argument, can be an arbitrary Python " "object, is the \"return\" annotation of the callable." msgstr "" +"L'argument optionnel *return_annotation* pouvant être un objet Python " +"arbitraire, est l'annotation du type renvoyé par appelable." #: library/inspect.rst:640 msgid "" "Signature objects are *immutable*. Use :meth:`Signature.replace` to make a " "modified copy." msgstr "" +"Les objets Signatures sont *immuables*. Utilisez :meth:`Signature.replace` " +"pour en faire une copie modifiée." #: library/inspect.rst:643 msgid "Signature objects are picklable and hashable." msgstr "" +"les objets Signature sont *pickable* (sérialisables avec Pickle) et " +"hachables." #: library/inspect.rst:648 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" +"Un marqueur spécial, accessible via ``Signature.empty``, indiquant l'absence " +"d'une annotation de type renvoyé." #: library/inspect.rst:652 msgid "" @@ -928,6 +1091,9 @@ msgid "" "`Parameter` objects. Parameters appear in strict definition order, " "including keyword-only parameters." msgstr "" +"Une table de correspondance ordonnée des noms de paramètres avec les objets :" +"class:`Parameter`. Les paramètres apparaissent dans l'ordre strict de leur " +"définition, incluant les paramètres exclusivement nommés." #: library/inspect.rst:1000 msgid "" @@ -935,12 +1101,17 @@ msgid "" "keyword-only parameters as of version 3.7, although in practice this order " "had always been preserved in Python 3." msgstr "" +"Python ne garantit explicitement la préservation de l'ordre des paramètres " +"exclusivement nommés que depuis la version 3.7, bien qu'en pratique cet " +"ordre a toujours été préservé sous Python 3." #: library/inspect.rst:663 msgid "" "The \"return\" annotation for the callable. If the callable has no " "\"return\" annotation, this attribute is set to :attr:`Signature.empty`." msgstr "" +"L'annotation du type renvoyé par l'appelable. Si l'appelable n'a pas " +"d'annotation de type, cet attribut est évalué à :attr:`Signature.empty`." #: library/inspect.rst:668 msgid "" @@ -948,6 +1119,10 @@ msgid "" "Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the " "signature, or raises a :exc:`TypeError`." msgstr "" +"Crée une table de correspondance entre les arguments positionnels et nommés " +"avec les paramètres. Renvoie :class:`BoundArguments` si ``*args`` et " +"``**kwargs`` concordent avec la signature, autrement lève une :exc:" +"`TypeError`." #: library/inspect.rst:674 msgid "" @@ -956,6 +1131,10 @@ msgid "" "Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the passed " "arguments do not match the signature." msgstr "" +"Fonctionne de manière similaire à :meth:`Signature.bind`, mais permet " +"l'omission de certains arguments (semblable au comportement de :func:" +"`functools.partial`). Renvoie :class:`BoundArguments`, ou lève une :exc:" +"`TypeError` si l'argument passé ne correspond pas à la signature." #: library/inspect.rst:681 msgid "" @@ -965,6 +1144,11 @@ msgid "" "signature. To remove return_annotation from the copied Signature, pass in :" "attr:`Signature.empty`." msgstr "" +"Crée une nouvelle instance de Signature sur la base de l'instance sur " +"laquelle la méthode est invoquée. Il est possible de passer différents " +"paramètres et/ou annotations de type pour remplacer les propriétés " +"correspondantes de la signature de base. Pour enlever les annotations de " +"type de la copie de la Signature, lui passer :attr:`Signature.empty`." #: library/inspect.rst:698 msgid "" @@ -976,7 +1160,7 @@ msgstr "" #: library/inspect.rst:703 msgid "This method simplifies subclassing of :class:`Signature`::" -msgstr "" +msgstr "Cette méthode simplifie l'héritage de :class:`Signature` ::" #: library/inspect.rst:712 msgid "``globalns`` and ``localns`` parameters." @@ -987,51 +1171,71 @@ msgid "" "Parameter objects are *immutable*. Instead of modifying a Parameter object, " "you can use :meth:`Parameter.replace` to create a modified copy." msgstr "" +"Les objets *Parameter* sont *immuables*. Utilisez :meth:`Parameter.replace` " +"pour créer une copie modifiée." #: library/inspect.rst:721 msgid "Parameter objects are picklable and hashable." msgstr "" +"les objets *Parameters* sont *pickable* (sérialisables avec Pickle) et " +"hachable." #: library/inspect.rst:726 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" +"Un marqueur spécial, accessible via ``Parameters.empty`` indiquant l'absence " +"de valeurs par défaut et d'annotations." #: library/inspect.rst:731 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" +"Le nom du paramètre (chaîne de caractères). Le nom doit être un identifiant " +"Python valide." #: library/inspect.rst:736 msgid "" "CPython generates implicit parameter names of the form ``.0`` on the code " "objects used to implement comprehensions and generator expressions." msgstr "" +"CPython génère un nom de paramètre implicite de forme ``.0`` sur les objets " +"de code utilisés pour implémenter les compréhensions et expressions " +"génératrices." #: library/inspect.rst:740 msgid "" "These parameter names are exposed by this module as names like ``implicit0``." msgstr "" +"ces paramètres sont exposés par ce module par des noms de forme " +"``implicit0``." #: library/inspect.rst:746 msgid "" "The default value for the parameter. If the parameter has no default value, " "this attribute is set to :attr:`Parameter.empty`." msgstr "" +"La valeur par défaut de ce paramètre. Si le paramètre n'a pas de valeur par " +"défaut, cet attribut vaut :attr:`Parameter.empty`." #: library/inspect.rst:751 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" +"L'annotation du paramètre. Si le paramètre n'a pas d'annotation, cet " +"attribut est défini à :attr:`Parameter.empty`." #: library/inspect.rst:756 msgid "" "Describes how argument values are bound to the parameter. Possible values " "(accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):" msgstr "" +"Décrit comment les valeurs d'argument sont liées au paramètre. Les valeurs " +"possibles (accessibles par :class:`Parameter`, tel que ``Parameter." +"KEYWORD_ONLY``) :" #: library/inspect.rst:762 msgid "Name" @@ -1043,7 +1247,7 @@ msgstr "Signification" #: library/inspect.rst:764 msgid "*POSITIONAL_ONLY*" -msgstr "" +msgstr "*POSITIONAL_ONLY*" #: library/inspect.rst:764 msgid "" @@ -1051,30 +1255,39 @@ msgid "" "are those which appear before a ``/`` entry (if present) in a Python " "function definition." msgstr "" +"La valeur doit être donnée comme argument positionnel. Les arguments " +"exclusivement positionnels sont ceux qui apparaissent avant une entrée ``/`` " +"(si présente) dans une définition de fonction Python." #: library/inspect.rst:769 msgid "*POSITIONAL_OR_KEYWORD*" -msgstr "" +msgstr "*POSITIONAL_OR_KEYWORD*" #: library/inspect.rst:769 msgid "" "Value may be supplied as either a keyword or positional argument (this is " "the standard binding behaviour for functions implemented in Python.)" msgstr "" +"La valeur peut être donnée comme argument nommé ou positionnel (ce qui est " +"l'affectation de variable standard pour les fonctions implémentées en " +"Python)." #: library/inspect.rst:774 msgid "*VAR_POSITIONAL*" -msgstr "" +msgstr "*VAR_POSITIONAL*" #: library/inspect.rst:774 msgid "" "A tuple of positional arguments that aren't bound to any other parameter. " "This corresponds to a ``*args`` parameter in a Python function definition." msgstr "" +"Un *n*-uplet d'arguments positionnels qui ne sont affectés à aucun autre " +"paramètre. Cela correspond à un paramètre ``*args`` dans une définition de " +"fonction Python." #: library/inspect.rst:779 msgid "*KEYWORD_ONLY*" -msgstr "" +msgstr "*KEYWORD_ONLY*" #: library/inspect.rst:779 msgid "" @@ -1082,28 +1295,36 @@ msgid "" "those which appear after a ``*`` or ``*args`` entry in a Python function " "definition." msgstr "" +"La valeur doit être donnée comme argument nommé. Les arguments exclusivement " +"nommés sont ceux qui apparaissent après un ``*`` ou ``*args`` dans une " +"définition de fonction Python." #: library/inspect.rst:784 msgid "*VAR_KEYWORD*" -msgstr "" +msgstr "*VAR_KEYWORD*" #: library/inspect.rst:784 msgid "" "A dict of keyword arguments that aren't bound to any other parameter. This " "corresponds to a ``**kwargs`` parameter in a Python function definition." msgstr "" +"Un dictionnaire d'arguments nommés qui ne sont liés à aucun autre paramètre. " +"Cela correspond à une expression ``**kwargs`` dans une définition de " +"fonction Python." #: library/inspect.rst:790 msgid "Example: print all keyword-only arguments without default values::" msgstr "" +"Exemple : afficher tous les arguments exclusivement nommés sans valeur par " +"défaut :" #: library/inspect.rst:804 msgid "Describes a enum value of Parameter.kind." -msgstr "" +msgstr "Décrit une énumération de valeurs de ``Parameter.kind``." #: library/inspect.rst:808 msgid "Example: print all descriptions of arguments::" -msgstr "" +msgstr "Exemple : afficher toutes les descriptions d'arguments ::" #: library/inspect.rst:823 msgid "" @@ -1112,6 +1333,11 @@ msgid "" "argument. To remove a default value or/and an annotation from a Parameter, " "pass :attr:`Parameter.empty`." msgstr "" +"Crée une nouvelle instance de *Parameter* sur la base de l'instance sur " +"laquelle la méthode est invoquée. Pour redéfinir un attribut :class:" +"`Parameter`, lui passer l'argument correspondant. Pour enlever les valeurs " +"par défaut et/ou les annotations de retour de la copie du Parameter, lui " +"passer :attr:`Parameter.empty`." #: library/inspect.rst:841 msgid "" @@ -1119,12 +1345,17 @@ msgid "" "``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no longer " "permitted." msgstr "" +"en Python 3.3, un objet Parameter pouvait avoir ``name`` à ``None`` si son " +"attribut ``kind`` valait ``POSITIONAL_ONLY``. Cela n'est plus possible." #: library/inspect.rst:848 msgid "" "Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call. " "Holds the mapping of arguments to the function's parameters." msgstr "" +"Le résultat d'un appel à :meth:`Signature.bind` ou :meth:`Signature." +"bind_partial`. Contient la correspondance entre les arguments et les " +"paramètres de la fonction." #: library/inspect.rst:853 msgid "" @@ -1132,12 +1363,18 @@ msgid "" "explicitly bound arguments. Changes in :attr:`arguments` will reflect in :" "attr:`args` and :attr:`kwargs`." msgstr "" +"Une correspondance muable entre les noms de paramètres et les valeurs des " +"arguments. Contient seulement les arguments liés explicitement. Les " +"changements dans :attr:`arguments` sont reflétés dans :attr:`args` et :attr:" +"`kwargs`." #: library/inspect.rst:857 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" +"Doit être utilisé en combinaison avec :attr:`Signature.parameters` pour le " +"traitement d'arguments." #: library/inspect.rst:862 msgid "" @@ -1145,56 +1382,71 @@ msgid "" "relied on a default value are skipped. However, if needed, use :meth:" "`BoundArguments.apply_defaults` to add them." msgstr "" +"Les arguments pour lesquels :meth:`Signature.bind` ou :meth:`Signature." +"bind_partial` supposent une valeur par défaut sont ignorés. Au besoin, " +"utiliser :meth:`BoundArguments.apply_defaults` pour les inclure." #: library/inspect.rst:867 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" +":attr:`arguments` est maintenant de type :class:`dict`. Anciennement, il " +"était de type :class:`collections.OrderedDict`." #: library/inspect.rst:873 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" +"Un *n*-uplets des valeurs d'arguments positionnels. Évalué dynamiquement à " +"partir de l'attribut :attr:`arguments`." #: library/inspect.rst:878 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" +"Un dictionnaire des valeurs des arguments nommés. Évalué dynamiquement à " +"partir de l'attribut :attr:`arguments`." #: library/inspect.rst:883 msgid "A reference to the parent :class:`Signature` object." -msgstr "" +msgstr "Une référence à l'objet :class:`Signature` de la classe parente." #: library/inspect.rst:887 msgid "Set default values for missing arguments." -msgstr "" +msgstr "Assigne les valeurs par défaut pour les arguments manquants." #: library/inspect.rst:889 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" +"Pour les arguments positionnels variables (``*args``) la valeur par défaut " +"est un *n*-uplet vide." #: library/inspect.rst:892 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" +"Pour les arguments nommés variables (``**kwargs``) la valeur par défaut est " +"un dictionnaire vide." #: library/inspect.rst:905 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions::" msgstr "" +"Les propriétés :attr:`args` et :attr:`kwargs` peuvent être utilisées pour " +"l'appel de fonctions ::" #: library/inspect.rst:918 msgid ":pep:`362` - Function Signature Object." -msgstr "" +msgstr ":pep:`362` — *Function Signature Object*." #: library/inspect.rst:919 msgid "The detailed specification, implementation details and examples." -msgstr "" +msgstr "La spécification détaillée, détails d'implémentation et exemples." #: library/inspect.rst:925 msgid "Classes and functions" @@ -1210,6 +1462,14 @@ msgid "" "list. Otherwise, classes using multiple inheritance and their descendants " "will appear multiple times." msgstr "" +"Organise la liste de classes donnée en une hiérarchie de listes imbriquées. " +"Lorsqu'une liste imbriquée apparaît, elle contient les classes dérivées de " +"la classe dont l'entrée précède immédiatement cette liste. Chaque entrée est " +"une paire contenant la classe et un *n*-uplet de ses classes de base. Si " +"l'argument *unique* est vrai, exactement une entrée apparaît dans la " +"structure renvoyée pour chaque classe de la liste donnée en argument. " +"Autrement, les classes utilisant l'héritage multiple et ses descendantes " +"apparaissent plusieurs fois." #: library/inspect.rst:940 msgid "" @@ -1241,12 +1501,16 @@ msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" +"Obtenir les noms et les valeurs par défaut des paramètres de fonction " +"Python. Un :term:`n-uplet nommé ` est renvoyé :" #: library/inspect.rst:963 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" +"``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " +"annotations)``" #: library/inspect.rst:966 msgid "" @@ -1262,6 +1526,19 @@ msgid "" "parameter names to annotations. The special key ``\"return\"`` is used to " "report the function return value annotation (if any)." msgstr "" +"*args* est une liste de noms de paramètres positionnels. *varargs* est le " +"nom du paramètre ``*`` ou ``None`` si les arguments positionnels arbitraires " +"ne sont pas acceptés. *varkw* est le nom du paramètre ``**``, ou ``None`` si " +"les paramètres arbitraires nommés ne sont pas acceptés. *defaults* est un " +"*n*-uplet des valeurs des arguments par défaut correspondant aux derniers " +"*n* arguments positionnels, ou ``None`` si aucun défaut n'est défini. " +"*kwonlyargs* est une liste d'arguments exclusivement nommés, ordonnée selon " +"l'ordre de déclaration. *kwonlydefaults* est un dictionnaire de " +"correspondance entre les noms de paramètres de *kwonlyargs* et les valeurs " +"par défaut utilisées si aucun argument n'est donné. *annotations* est un " +"dictionnaire de correspondance entre les noms de paramètres et les " +"annotations. La clef spéciale ``\"return\"`` est utilisée pour obtenir la " +"valeur de retour de l'annotation la fonction (si elle existe)." #: library/inspect.rst:981 msgid "" @@ -1272,6 +1549,12 @@ msgid "" "for use in code that needs to maintain compatibility with the Python 2 " "``inspect`` module API." msgstr "" +"Notez que :func:`signature` et :ref:`Signature Object ` fournissent l'API recommandé pour l’introspection d'appelables et " +"prennent en charge des comportements additionnels (comme les arguments " +"exclusivement positionnels) qui sont parfois rencontrés dans les APIs des " +"modules d'extension. Cette fonction et maintenue principalement pour " +"maintenir la compatibilité avec l'API du module ``inspect`` de Python 2." #: library/inspect.rst:988 msgid "" @@ -1279,6 +1562,9 @@ msgid "" "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" +"cette fonction est maintenant basée sur :func:`signature`, mais ignore " +"toujours les attributs ``_wrapped_`` et inclue le premier paramètre (déjà " +"lié) dans la signature des méthodes liées." #: library/inspect.rst:993 msgid "" @@ -1287,6 +1573,10 @@ msgid "" "restore a clearly supported standard interface for single-source Python 2/3 " "code migrating away from the legacy :func:`getargspec` API." msgstr "" +"cette méthode fût précédemment documentée comme dépréciée en faveur de :func:" +"`signature` en Python 3.5, mais cette décision fût renversée afin de ré-" +"introduire une interface standard clairement supportée pour du code unifié " +"Python 2/3 migrant pour se départir de l'API :func:`getargspec`." #: library/inspect.rst:1008 msgid "" @@ -1296,10 +1586,15 @@ msgid "" "names of the ``*`` and ``**`` arguments or ``None``. *locals* is the locals " "dictionary of the given frame." msgstr "" +"Obtenir de l'information sur les arguments passés à un cadre particulier. " +"Un :term:`n-uplet nommé ` ``ArgInfo(args, varargs, keywords, " +"locals)`` est renvoyé. *args* est une liste de noms d'arguments. *varags* et " +"*keywords* sont les noms des arguments ``*`` et ``**`` ou ``None``. *locals* " +"est le dictionnaire des variables locales du cadre courant." #: library/inspect.rst:1052 msgid "This function was inadvertently marked as deprecated in Python 3.5." -msgstr "" +msgstr "Cette fonction fût dépréciée par inadvertance en Python 3.5." #: library/inspect.rst:1020 msgid "" @@ -1336,6 +1631,9 @@ msgid "" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" +"Formatage lisible des quatre valeurs renvoyées par :func:`getargvalues`. Les " +"arguments format\\* sont des fonctions de formatage optionnelles qui sont " +"appelées pour convertir les noms et valeurs en chaînes de caractères." #: library/inspect.rst:1057 msgid "" @@ -1344,6 +1642,12 @@ msgid "" "the method resolution order depends on cls's type. Unless a very peculiar " "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" +"Renvoie un *n*-uplet des classes de base de *cls*, incluant *cls*, selon le " +"l'ordre de résolution des méthodes (*method resolution order*). Aucune " +"classe n'apparaît plus d'une fois dans ce *n*-uplet. Notez que le l'ordre de " +"résolution des méthodes dépend du type de *cls*. Exception faite d'une " +"utilisation très particulière de la métaclasse définie par l'usager, *cls* " +"sera toujours le premier élément du tuple." #: library/inspect.rst:1065 msgid "" @@ -1357,10 +1661,20 @@ msgid "" "exception of the same type and the same or similar message is raised. For " "example::" msgstr "" +"Lie *args* et *kwds* aux arguments nommés de la fonction ou méthode Python " +"*func*, comme si elle était appelée avec ceux-ci. Pour les méthodes liées, " +"lie aussi le premier argument (normalement appelé ``self``) à l'instance " +"associée. Un dictionnaire est renvoyé, une correspondance entre les noms des " +"arguments (incluant les noms des arguments ``*`` et ``**``, s'ils existent) " +"et leurs valeurs obtenues de *args* et *kwds*. Lors d'une invocation " +"incorrecte de *func*, i.e. lorsque ``func(*args, **kwds)`` lèverait une " +"exception en raison de signature incompatible, une exception du même type et " +"de message identique ou similaire est levée. Par exemple ::" #: library/inspect.rst:1088 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "" +"utilisez plutôt :meth:`Signature.bind` et :meth:`Signature.bind_partial`." #: library/inspect.rst:1094 msgid "" @@ -1373,17 +1687,29 @@ msgid "" "that could not be resolved at all given the current module globals and " "builtins." msgstr "" +"Obtenir la correspondance de nom de références externes d'une fonction ou " +"méthode Python *func* avec leur valeur courante. Un :term:`n-uplet nommé " +"` ``ClosureVars(nonlocals, globals, builtins, unbound)`` est " +"renvoyé. *nonlocals* établit une correspondance des noms capturés par les " +"fermetures lexicales, *globals* au module de la fonction et *builtins* aux " +"noms natifs visibles depuis le corps de la fonction. *unbound* est un " +"ensemble de noms référencés dans la fonction ne trouvant aucune résolution " +"dans les valeurs globales du module courant ni à travers le lexique natif." #: library/inspect.rst:1103 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "" +":exc:`TypeError` est levée si *func* n'est ni une fonction ni une méthode " +"Python." #: library/inspect.rst:1110 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" +"Obtenir l'objet englobé par *func*. Suit une chaîne d'attributs de :attr:" +"`__wrapped__`, renvoyant le dernier objet de la chaîne." #: library/inspect.rst:1113 msgid "" @@ -1394,10 +1720,17 @@ msgid "" "`signature` uses this to stop unwrapping if any object in the chain has a " "``__signature__`` attribute defined." msgstr "" +"*stop* est une fonction de *callback* optionnelle qui accepte un objet de la " +"chaîne englobée comme son seul argument et permet d'arrêter le déballage " +"avant la fin si la fonction de *callback* renvoie une valeur vraie. Si la " +"fonction *callback* ne renvoie jamais une valeur vraie, le dernier objet de " +"la chaîne est renvoyé comme d'habitude. Par exemple, :func:`signature` " +"utilise ceci pour arrêter le déballage si un objet dans la chaîne définit un " +"attribut ``__signature__``." #: library/inspect.rst:1120 msgid ":exc:`ValueError` is raised if a cycle is encountered." -msgstr "" +msgstr ":exc:`ValueError` est levée si un cycle est rencontré." #: library/inspect.rst:1127 msgid "Compute the annotations dict for an object." @@ -1503,7 +1836,7 @@ msgstr "" #: library/inspect.rst:1184 msgid "The interpreter stack" -msgstr "" +msgstr "La pile d'interpréteur" #: library/inspect.rst:1186 msgid "" @@ -1530,6 +1863,15 @@ msgid "" "broken to avoid the delayed destruction of objects and increased memory " "consumption which occurs." msgstr "" +"Conserver des références à des objets cadre, tel que trouvé dans le 1er " +"élément des enregistrements de cadres que ces fonctions renvoient, peut " +"créer des cycles de référence dans votre programme. Lorsqu'un cycle de " +"référence a été créé, la durée de vie de tous les objets pouvant être " +"accessibles par ces objets peut être grandement augmentée, même si le " +"détecteur de cycle (optionnel) de Python est activé. Si ces cycles doivent " +"être créés, il est important de s'assurer qu'ils soient explicitement brisés " +"pour éviter la destruction reportée des objets et l'augmentation résultante " +"de l'utilisation de la mémoire." #: library/inspect.rst:1207 msgid "" @@ -1538,6 +1880,11 @@ msgid "" "keyword:`finally` clause. This is also important if the cycle detector was " "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" +"Bien que le détecteur trouvera ces cycles, la destruction des cadres (et " +"variables locales) peut être fait de manière déterministe en enlevant les " +"cycles dans une clause :keyword:`finally`. Cela est important si le " +"détecteur de cycle a été désactivé lors de la compilation du code Python ou " +"en utilisant :func:`gc.disable`. Par exemple ::" #: library/inspect.rst:1219 msgid "" @@ -1545,6 +1892,9 @@ msgid "" "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" +"Pour conserver ces cadres (par exemple pour imprimer une trace d'exécution " +"plus tard), vous pouvez briser ces cycles de référence en utilisant la " +"méthode :meth:`frame.clear`." #: library/inspect.rst:1223 msgid "" @@ -1552,6 +1902,9 @@ msgid "" "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" +"L'argument optionnel *context* supporté par la plupart de ces méthodes " +"spécifie le nombre de lignes de contexte à renvoyer, qui sera centré autour " +"de la ligne courante." #: library/inspect.rst:1230 msgid "" @@ -1572,6 +1925,8 @@ msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" +"une liste de :term:`n-uplet nommé ` ``FrameInfo(frame, " +"filename, lineno, function, code_context, index)`` est renvoyée." #: library/inspect.rst:1249 msgid "" @@ -1583,7 +1938,7 @@ msgstr "" #: library/inspect.rst:1262 msgid "Return the frame object for the caller's stack frame." -msgstr "" +msgstr "Renvoie l'objet cadre de la pile pour le cadre de l’appelant." #: library/inspect.rst:1266 msgid "" @@ -1592,6 +1947,10 @@ msgid "" "an implementation without Python stack frame support this function returns " "``None``." msgstr "" +"cette fonction nécessite que l'interpréteur Python implémente une pile de " +"cadres d'appel, ce qui n'est pas forcément le cas de toutes les " +"implémentations Python. Si le code s'exécute dans une implémentation Python " +"n'implémentant pas la pile de cadres, cette fonction renvoie ``None``." #: library/inspect.rst:1274 msgid "" @@ -1610,7 +1969,7 @@ msgstr "" #: library/inspect.rst:1298 msgid "Fetching attributes statically" -msgstr "" +msgstr "Recherche dynamique d'attributs" #: library/inspect.rst:1300 msgid "" @@ -1619,6 +1978,10 @@ msgid "" "properties, will be invoked and :meth:`__getattr__` and :meth:" "`__getattribute__` may be called." msgstr "" +":func:`getattr` et :func:`hasattr` peuvent tous deux engendrer l'exécution " +"de code lors la recherche ou vérification de l'existence d'attributs. Les " +"descripteurs, comme les propriétés, seront invoqués et :meth:`__getattr__` " +"et :meth:`__getattribute__` peuvent être appelés." #: library/inspect.rst:1305 msgid "" @@ -1626,12 +1989,18 @@ msgid "" "this can be inconvenient. :func:`getattr_static` has the same signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" +"Pour les cas où une introspection passive est désirée, comme des outils de " +"documentation, cela peut être inconvenable. :func:`getattr_static` possède " +"la même signature que :func:`getattr`, mais évite l'exécution de code lors " +"de la recherche d'attributs." #: library/inspect.rst:1311 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`__getattr__` or :meth:`__getattribute__`." msgstr "" +"Retrouve des attributs sans lancer une recherche dynamique via le protocole " +"descripteur, :meth:`__getattr__` ou :meth:`__getattribute__`." #: library/inspect.rst:1314 msgid "" @@ -1640,6 +2009,11 @@ msgid "" "getattr can't (like descriptors that raise AttributeError). It can also " "return descriptors objects instead of instance members." msgstr "" +"Note : cette fonction ne retrouve pas forcément tous les attributs renvoyés " +"par *getattr* (tel que des attributs générés dynamiquement) et pourrait " +"retrouver des attributs non retrouvés par *getattr* (tel que des " +"descripteurs qui lèvent un *AttributeError*). Elle peut aussi donner des " +"objets descripteurs, plutôt que des membres d'instance." #: library/inspect.rst:1320 msgid "" @@ -1647,6 +2021,9 @@ msgid "" "example a property) then this function will be unable to find instance " "members." msgstr "" +"Si l'instance :attr:`~object.__dict__` est cachée (*shadowed*) par un autre " +"membre (par exemple une propriété), cette fonction ne pourra pas retrouver " +"les membres de l'instance." #: library/inspect.rst:1326 msgid "" @@ -1654,16 +2031,22 @@ msgid "" "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" +":func:`getattr_static` ne résout pas les descripteurs, par exemple *slot " +"descriptors* ou les descripteurs *getset* des objets implémentés en C. Le " +"descripteur de l'objet est renvoyé plutôt que l'attribut sous-jacent." #: library/inspect.rst:1330 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" +"Vous pouvez gérer ces cas à l'aide du code suivant. Notez que pour des " +"descripteurs arbitraires *getset* les invoquant, de l'exécution de code " +"pourrait être lancée :" #: library/inspect.rst:1356 msgid "Current State of Generators and Coroutines" -msgstr "" +msgstr "État courant de Générateurs et Coroutines" #: library/inspect.rst:1358 msgid "" @@ -1673,30 +2056,35 @@ msgid "" "terminated. :func:`getgeneratorstate` allows the current state of a " "generator to be determined easily." msgstr "" +"Lors de l'implémentation d'ordonnanceur de coroutine et autres utilisations " +"avancées de générateurs, il est utile de déterminer si un générateur est " +"présentement en cours d'exécution, en attente de démarrage ou de " +"continuation, ou s'il a déjà terminé. :func:`getgeneratorstate` permet " +"d'aisément déterminer l'état courant d'un générateur." #: library/inspect.rst:1366 msgid "Get current state of a generator-iterator." -msgstr "" +msgstr "Donne l'état courant d'un générateur-itérateur." #: library/inspect.rst:1387 msgid "Possible states are:" -msgstr "" +msgstr "Les états possibles :" #: library/inspect.rst:1369 msgid "GEN_CREATED: Waiting to start execution." -msgstr "" +msgstr "GEN_CREATED : En attente de démarrage d'exécution." #: library/inspect.rst:1370 msgid "GEN_RUNNING: Currently being executed by the interpreter." -msgstr "" +msgstr "GEN_RUNNING : En cours d'exécution par l'interpréteur." #: library/inspect.rst:1371 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." -msgstr "" +msgstr "GEN_SUSPENDED : Présentement suspendu à une expression *yield*." #: library/inspect.rst:1372 msgid "GEN_CLOSED: Execution has completed." -msgstr "" +msgstr "GEN_CLOSED : L'exécution est complétée." #: library/inspect.rst:1378 msgid "" @@ -1705,22 +2093,26 @@ msgid "" "will accept any coroutine-like object that has ``cr_running`` and " "``cr_frame`` attributes." msgstr "" +"Donne l'état courant d'un objet coroutine. L'utilisation est prévue avec des " +"objets coroutine créés avec des fonctions :keyword:`async def`, mais accepte " +"n'importe quel objet semblable à une coroutine qui définisse des attributs " +"``cr_running`` ``cr_frame``." #: library/inspect.rst:1384 msgid "CORO_CREATED: Waiting to start execution." -msgstr "" +msgstr "CORO_CREATED : En attente de démarrage d'exécution." #: library/inspect.rst:1385 msgid "CORO_RUNNING: Currently being executed by the interpreter." -msgstr "" +msgstr "CORO_RUNNING : En cours d'exécution par l'interpréteur." #: library/inspect.rst:1386 msgid "CORO_SUSPENDED: Currently suspended at an await expression." -msgstr "" +msgstr "CORO_SUSPENDED : Suspendu à une expression *await*." #: library/inspect.rst:1387 msgid "CORO_CLOSED: Execution has completed." -msgstr "" +msgstr "CORO_CLOSED : Exécution complétée." #: library/inspect.rst:1391 msgid "" @@ -1728,6 +2120,9 @@ msgid "" "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" +"L'état courant interne du générateur peut aussi être vérifié. Ceci est utile " +"pour des tests, afin d'assurer que l'état interne est mise à jour tel que " +"prévu :" #: library/inspect.rst:1397 msgid "" @@ -1736,6 +2131,11 @@ msgid "" "This is the equivalent of calling :func:`locals` in the body of the " "generator, and all the same caveats apply." msgstr "" +"Donne une correspondance de variables locales dans *generator* avec les " +"valeurs courantes. Un dictionnaire est renvoyé, établissant la " +"correspondance entre variables et valeurs. Ceci est équivalent à appeler :" +"func:`locals` dans le corps du générateur et les mêmes restrictions " +"s'appliquent." #: library/inspect.rst:1402 msgid "" @@ -1743,6 +2143,9 @@ msgid "" "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" +"Si *generator* est un :term:`générateur ` sans cadre courant " +"associé, alors un dictionnaire vide est renvoyé. :exc:`TypeError` est levé " +"sir *generator* n'est pas un objet générateur Python." #: library/inspect.rst:1408 msgid "" @@ -1751,50 +2154,68 @@ msgid "" "of Python. In such cases, this function will always return an empty " "dictionary." msgstr "" +"Cette fonction repose sur l'exposition d'une pile de cadres Python par le " +"générateur pour l'introspection, ce qui n'est pas garanti dans toutes les " +"implémentations Python. Dans un tel cas, cette fonction renvoie toujours un " +"dictionnaire vide." #: library/inspect.rst:1417 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" +"Cette fonction est semblable à :func:`~inspect.getgeneratorlocals`, mais " +"fonctionne pour des objets coroutines créés avec des fonctions :keyword:" +"`async def`." #: library/inspect.rst:1426 msgid "Code Objects Bit Flags" -msgstr "" +msgstr "Bit d'option des objets code" #: library/inspect.rst:1428 msgid "" "Python code objects have a ``co_flags`` attribute, which is a bitmap of the " "following flags:" msgstr "" +"Les objets de code Python ont un attribut ``co_flags``, ce qui est un " +"*bitmap* des valeurs suivantes :" #: library/inspect.rst:1433 msgid "The code object is optimized, using fast locals." -msgstr "" +msgstr "L'objet code est optimisé, utilisant des variables locales rapides." #: library/inspect.rst:1437 msgid "" "If set, a new dict will be created for the frame's ``f_locals`` when the " "code object is executed." msgstr "" +"Si défini, un nouveau dictionnaire sera créé pour le ``f_locals`` du cadre " +"courant lorsque l'objet code est exécuté." #: library/inspect.rst:1442 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" +"L'objet code possède un paramètre de variable positionnel (``*args`` ou " +"semblable)." #: library/inspect.rst:1446 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" +"L'objet code possède une paramètre par mot-clé variable (``**kwargs`` ou " +"semblable)." #: library/inspect.rst:1450 msgid "The flag is set when the code object is a nested function." -msgstr "" +msgstr "L'option est définie lorsque le code est une fonction imbriquée." #: library/inspect.rst:1454 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" +"L'option est définie lorsque l'objet code est une fonction génératrice, " +"c'est-à-dire qu'un objet générateur est renvoyé lorsque le code objet est " +"exécuté." #: library/inspect.rst:1459 msgid "The flag is set if there are no free or cell variables." @@ -1806,6 +2227,9 @@ msgid "" "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" +"L'option est définie lorsque le code objet est une fonction coroutine. Lors " +"que le code objet est exécuté, il renvoie un objet coroutine. Voir :pep:" +"`492` pour plus de détails." #: library/inspect.rst:1471 msgid "" @@ -1813,6 +2237,10 @@ msgid "" "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" +"L'option est utilisée pour transformer un générateur en une coroutine basée " +"sur un générateur. Les objets générateurs avec cette option peuvent être " +"utilisés dans une expression ``await`` et un objet coroutine ``yield from``. " +"Voir :pep:`492` pour plus de détails." #: library/inspect.rst:1480 msgid "" @@ -1820,6 +2248,9 @@ msgid "" "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" +"L'option est définie lorsque l'objet code est une fonction génératrice " +"asynchrone. Lorsque l'objet code est exécuté, il renvoie un objet générateur " +"asynchrone. Voir :pep:`525` pour les détails." #: library/inspect.rst:1487 msgid "" @@ -1828,6 +2259,11 @@ msgid "" "can be removed or deprecated in future Python releases. It's recommended to " "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" +"Ces options sont spécifiques à CPython et pourraient ne pas être définies " +"dans d'autres implémentations Python. De plus, les options constituent des " +"détails d'implémentation et pourraient être enlevées ou dépréciées dans des " +"versions ultérieures. Il est recommandé d'utiliser les APIs publiques de :" +"mod:`inspect` pour tous les besoins d'introspection." #: library/inspect.rst:1497 msgid "Command Line Interface" @@ -1838,6 +2274,8 @@ msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" +"Le module :mod:`inspect` fournit également des capacités d'introspection de " +"base en ligne de commande." #: library/inspect.rst:1504 msgid "" @@ -1845,8 +2283,13 @@ msgid "" "module. A class or function within the module can be printed instead by " "appended a colon and the qualified name of the target object." msgstr "" +"Par défaut, il accepte le nom d'un module et affiche la source de ce module. " +"Une classe ou fonction à l'intérieur du module peut également être affichée " +"en ajoutant un \":\" et le nom qualifié de l'objet désiré." #: library/inspect.rst:1510 msgid "" "Print information about the specified object rather than the source code" msgstr "" +"Affiche de l'information à propos de l'objet spécifié plutôt que du code " +"source." diff --git a/library/io.po b/library/io.po index 13d2400b..f5734121 100644 --- a/library/io.po +++ b/library/io.po @@ -227,6 +227,8 @@ msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" +"Lève un :ref:`événement d'audit ` ``open`` avec les arguments " +"``path``, ``mode``, ``flags``." #: library/io.rst:175 msgid "" diff --git a/library/logging.po b/library/logging.po index 9e274e11..dbea1713 100644 --- a/library/logging.po +++ b/library/logging.po @@ -1520,7 +1520,7 @@ msgstr "" #: library/logging.rst:0 msgid "name" -msgstr "" +msgstr "nom" #: library/logging.rst:928 msgid "``%(name)s``" diff --git a/library/msvcrt.po b/library/msvcrt.po index 8bdb0c73..d57b9f9a 100644 --- a/library/msvcrt.po +++ b/library/msvcrt.po @@ -25,6 +25,11 @@ msgid "" "Windows implementations of their services. For example, the :mod:`getpass` " "module uses this in the implementation of the :func:`getpass` function." msgstr "" +"Ces fonctions permettent d'accéder à certaines capacités utiles sur les " +"plateformes Windows. Certains modules de plus haut niveau utilisent ces " +"fonctions pour construire les implémentations Windows de leurs services. " +"Par exemple, le module :mod:`getpass` les utilise dans l'implémentation de " +"la fonction :func:`getpass`." #: library/msvcrt.rst:17 msgid "" @@ -45,10 +50,12 @@ msgid "" "Operations in this module now raise :exc:`OSError` where :exc:`IOError` was " "raised." msgstr "" +"Les opérations de ce module lèvent désormais :exc:`OSError` au lieu de :exc:" +"`IOError`." #: library/msvcrt.rst:33 msgid "File Operations" -msgstr "" +msgstr "Opérations sur les fichiers" #: library/msvcrt.rst:38 msgid "" @@ -73,16 +80,24 @@ msgid "" "immediately tries again after 1 second. If, after 10 attempts, the bytes " "cannot be locked, :exc:`OSError` is raised." msgstr "" +"Verrouille les octets spécifiés. Si les octets ne peuvent pas être " +"verrouillés, le programme réessaie immédiatement après 1 seconde. Si, après " +"10 tentatives, les octets ne peuvent pas être verrouillés, :exc:`OSError` " +"est levée." #: library/msvcrt.rst:59 msgid "" "Locks the specified bytes. If the bytes cannot be locked, :exc:`OSError` is " "raised." msgstr "" +"Verrouille les octets spécifiés. Si les octets ne peuvent pas être " +"verrouillés, :exc:`OSError` est levée." #: library/msvcrt.rst:65 msgid "Unlocks the specified bytes, which must have been previously locked." msgstr "" +"Déverrouille les octets spécifiés, qui doivent avoir été précédemment " +"verrouillés." #: library/msvcrt.rst:70 msgid "" @@ -119,11 +134,11 @@ msgstr "" #: library/msvcrt.rst:96 msgid "Console I/O" -msgstr "" +msgstr "Entrées-sorties sur un terminal" #: library/msvcrt.rst:101 msgid "Return ``True`` if a keypress is waiting to be read." -msgstr "" +msgstr "Renvoie ``True`` si une touche est en attente de lecture." #: library/msvcrt.rst:106 msgid "" @@ -138,6 +153,8 @@ msgstr "" #: library/msvcrt.rst:116 msgid "Wide char variant of :func:`getch`, returning a Unicode value." msgstr "" +"Variante de :func:`getch` qui lit un caractère large et renvoie une valeur " +"Unicode." #: library/msvcrt.rst:121 msgid "" @@ -148,6 +165,8 @@ msgstr "" #: library/msvcrt.rst:127 msgid "Wide char variant of :func:`getche`, returning a Unicode value." msgstr "" +"Variante de :func:`getche` qui lit un caractère large et renvoie une valeur " +"Unicode." #: library/msvcrt.rst:132 msgid "Print the byte string *char* to the console without buffering." @@ -156,6 +175,8 @@ msgstr "" #: library/msvcrt.rst:137 msgid "Wide char variant of :func:`putch`, accepting a Unicode value." msgstr "" +"Variante de :func:`putch` qui accepte une valeur Unicode et l'écrit comme " +"caractère large." #: library/msvcrt.rst:142 msgid "" @@ -166,6 +187,8 @@ msgstr "" #: library/msvcrt.rst:148 msgid "Wide char variant of :func:`ungetch`, accepting a Unicode value." msgstr "" +"Variante de :func:`ungetch` qui accepte une valeur Unicode et l'écrit comme " +"caractère large." #: library/msvcrt.rst:154 #, fuzzy diff --git a/library/nntplib.po b/library/nntplib.po index 194be931..fcad87fd 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -137,7 +137,7 @@ msgstr "" #: library/nntplib.rst:150 msgid "Exception raised when an unexpected reply is received from the server." -msgstr "" +msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." #: library/nntplib.rst:155 msgid "" diff --git a/library/os.po b/library/os.po index 81fa5141..a4c4331c 100644 --- a/library/os.po +++ b/library/os.po @@ -156,6 +156,11 @@ msgid "" "filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" "c:type:`PyConfig`." msgstr "" +"L':term:`encodage du système de fichiers et gestionnaire d'erreurs associé " +"` sont configurés au démarrage de " +"Python par la fonction :c:func:`PyConfig_Read` : regardez :c:member:" +"`~PyConfig.filesystem_encoding` et :c:member:`~PyConfig.filesystem_errors` " +"dans les membres de :c:type:`PyConfig`." #: library/os.rst:79 msgid "" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 916e0b90..612e9eae 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -37,6 +37,8 @@ msgid "" "Operations in this module now raise :exc:`OSError` where :exc:`IOError` was " "raised." msgstr "" +"Les opérations de ce module lèvent désormais :exc:`OSError` au lieu de :exc:" +"`IOError`." #: library/ossaudiodev.rst:55 msgid "" diff --git a/library/pathlib.po b/library/pathlib.po index 6d17b94e..163300dc 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -359,6 +359,8 @@ msgid "" "If the path starts with more than two successive slashes, :class:`~pathlib." "PurePosixPath` collapses them::" msgstr "" +"Si le chemin commence par plus de deux slashes successifs, :class:`~pathlib." +"PurePosixPath` n'en conserve qu'un ::" #: library/pathlib.rst:330 msgid "" @@ -366,6 +368,9 @@ msgid "" "paragraph `4.11 Pathname Resolution `_:" msgstr "" +"Ce comportement se conforme au paragraphe 4.11 `Pathname Resolution `_ des *Open Group Base Specifications* version 6 :" #: library/pathlib.rst:334 msgid "" diff --git a/library/pyexpat.po b/library/pyexpat.po index 65001e4b..31b1d53a 100644 --- a/library/pyexpat.po +++ b/library/pyexpat.po @@ -127,7 +127,7 @@ msgstr "" #: library/pyexpat.rst:122 msgid "XMLParser Objects" -msgstr "" +msgstr "Objets XMLParser" #: library/pyexpat.rst:124 msgid ":class:`xmlparser` objects have the following methods:" diff --git a/library/re.po b/library/re.po index afe0a159..f1f550bb 100644 --- a/library/re.po +++ b/library/re.po @@ -1389,7 +1389,7 @@ msgstr "Correspond à l'option de groupe ``(?x)``." #: library/re.rst:723 msgid "Functions" -msgstr "" +msgstr "Fonctions" #: library/re.rst:727 msgid "" @@ -1754,7 +1754,7 @@ msgstr "Vide le cache d'expressions rationnelles." #: library/re.rst:989 msgid "Exceptions" -msgstr "" +msgstr "Exceptions" #: library/re.rst:993 msgid "" diff --git a/library/socket.po b/library/socket.po index 5abc7f48..01b11dad 100644 --- a/library/socket.po +++ b/library/socket.po @@ -1568,7 +1568,7 @@ msgstr "" #: library/socket.rst:0 msgid "platform" -msgstr "" +msgstr "``platform``" #: library/socket.rst:1360 msgid "Windows" diff --git a/library/sqlite3.po b/library/sqlite3.po index 3a521667..03c8f75f 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -52,27 +52,35 @@ msgstr "" #: library/sqlite3.rst:34 msgid "This document includes four main sections:" -msgstr "" +msgstr "Ce document inclus 4 sections principales :" #: library/sqlite3.rst:36 msgid ":ref:`sqlite3-tutorial` teaches how to use the :mod:`!sqlite3` module." msgstr "" +":ref:`tutoriel sqlite3 ` explique comment utiliser le " +"module :mod:`!sqlite3`." #: library/sqlite3.rst:37 msgid "" ":ref:`sqlite3-reference` describes the classes and functions this module " "defines." msgstr "" +":ref:`référence sqlite3 ` décrit les classes et les " +"fonctions que ce module définit." #: library/sqlite3.rst:39 msgid ":ref:`sqlite3-howtos` details how to handle specific tasks." msgstr "" +":ref:`guide sqlite3 ` détaille comment gérer des tâches " +"spécifiques." #: library/sqlite3.rst:40 msgid "" ":ref:`sqlite3-explanation` provides in-depth background on transaction " "control." msgstr "" +":ref:`explications sqlite3 ` propose un contexte " +"détaillé du contrôle de transaction." #: library/sqlite3.rst:47 msgid "https://www.sqlite.org" @@ -104,7 +112,7 @@ msgstr "PEP écrite par Marc-André Lemburg." #: library/sqlite3.rst:66 msgid "Tutorial" -msgstr "" +msgstr "Tutoriel" #: library/sqlite3.rst:68 msgid "" @@ -112,6 +120,10 @@ msgid "" "basic :mod:`!sqlite3` functionality. It assumes a fundamental understanding " "of database concepts, including `cursors`_ and `transactions`_." msgstr "" +"Dans ce tutoriel, vous allez créer une base de données des films des Monty " +"Python en utilisant les fonctionnalités de base de :mod:`!sqlite3`. Cela " +"nécessite une compréhension élémentaire des concepts des bases de données, " +"notamment les `curseurs`_ et les `transactions`_." #: library/sqlite3.rst:73 msgid "" @@ -120,12 +132,19 @@ msgid "" "create a connection to the database :file:`tutorial.db` in the current " "working directory, implicitly creating it if it does not exist:" msgstr "" +"Tout d’abord, nous devons créer une nouvelle base de données et ouvrir une " +"connexion à la base de données pour permettre à :mod:`!sqlite3` de " +"travailler avec elle. Appelez :func:`sqlite3.connect` pour créer une " +"connexion à la base de données :file:`tutorial.db` dans le répertoire de " +"travail actuel, en la créant implicitement si elle n’existe pas :" #: library/sqlite3.rst:84 msgid "" "The returned :class:`Connection` object ``con`` represents the connection to " "the on-disk database." msgstr "" +"L’objet :class:`Connection` renvoyé — ``con`` — représente la connexion à la " +"base de données sur disque." #: library/sqlite3.rst:87 msgid "" @@ -133,6 +152,9 @@ msgid "" "will need to use a database cursor. Call :meth:`con.cursor() ` to create the :class:`Cursor`:" msgstr "" +"Afin d’exécuter les instructions SQL et de récupérer les résultats des " +"requêtes SQL, nous devrons utiliser un curseur de base de données. Appelez :" +"meth:`con.cursor() ` pour créer la :class:`Cursor` :" #: library/sqlite3.rst:95 msgid "" @@ -143,6 +165,14 @@ msgid "" "types is optional. Execute the ``CREATE TABLE`` statement by calling :meth:" "`cur.execute(...) `:" msgstr "" +"Maintenant que nous avons une connexion à la base de données et un curseur, " +"nous pouvons créer une table ``movie`` avec des colonnes pour le titre, " +"l’année de sortie et la note de la critique. Pour plus de simplicité, nous " +"pouvons simplement utiliser les noms des colonnes dans la déclaration de la " +"table — grâce à la fonctionnalité de `typage flexible `_ " +"de SQLite, spécifier les types de données est facultatif. Exécutez " +"l’instruction ``CREATE TABLE`` en appelant :meth:`cur.execute(…) ` :" #: library/sqlite3.rst:111 msgid "" @@ -153,6 +183,13 @@ msgid "" "execute>`, assign the result to ``res``, and call :meth:`res.fetchone() " "` to fetch the resulting row:" msgstr "" +"Nous pouvons vérifier que la nouvelle table a été créée en interrogeant la " +"table ``sqlite_master`` intégrée à SQLite, qui devrait maintenant contenir " +"une entrée pour la définition de la table ``movie`` (voir `le schéma Table " +"`_ pour plus de détails). Exécutez cette requête en " +"appelant :meth:`cur.execute(…) `, affectez le résultat à " +"``res``, et appelez :meth:`res.fetchone() ` pour récupérer " +"la ligne résultante :" #: library/sqlite3.rst:125 msgid "" @@ -160,6 +197,10 @@ msgid "" "`tuple` containing the table's name. If we query ``sqlite_master`` for a non-" "existent table ``spam``, :meth:`!res.fetchone()` will return ``None``:" msgstr "" +"Nous pouvons voir que la table a été créée, puisque la requête retourne un :" +"class:`tuple` contenant le nom de la table. Si nous interrogeons " +"``sqlite_master`` pour une table ``spam`` inexistante, :meth:`!res." +"fetchone()`` retournera ``None`` :" #: library/sqlite3.rst:136 msgid "" @@ -167,6 +208,9 @@ msgid "" "``INSERT`` statement, once again by calling :meth:`cur.execute(...) `:" msgstr "" +"Maintenant, ajoutez deux lignes de données en tant que littéraux SQL en " +"exécutant une instruction ``INSERT``, une fois encore en appelant :meth:`cur." +"execute(…) ` :" #: library/sqlite3.rst:148 msgid "" @@ -175,6 +219,11 @@ msgid "" "controlling-transactions` for details). Call :meth:`con.commit() ` on the connection object to commit the transaction:" msgstr "" +"L’instruction ``INSERT`` ouvre implicitement une transaction, qui doit être " +"validée avant que les modifications ne soient enregistrées dans la base de " +"données (voir :ref:`contrôle des transactions SQL ` pour plus de détails). Appelez :meth:`con.commit() " +"` sur l’objet de connexion pour valider la transaction :" #: library/sqlite3.rst:158 msgid "" @@ -183,18 +232,27 @@ msgid "" "assign the result to ``res``, and call :meth:`res.fetchall() ` to return all resulting rows:" msgstr "" +"Nous pouvons vérifier que les données ont été insérées correctement en " +"exécutant une requête ``SELECT``. Utilisez la désormais familière :meth:`cur." +"execute(…) ` pour affecter le résultat à ``res``, et " +"appelez :meth:`res.fetchall() ` pour retourner toutes les " +"lignes résultantes :" #: library/sqlite3.rst:170 msgid "" "The result is a :class:`list` of two :class:`!tuple`\\s, one per row, each " "containing that row's ``score`` value." msgstr "" +"Le résultat est une :class:`liste ` de deux :class:`!tuple`\\s, une " +"par ligne, chacun contenant la valeur ``score`` de cette ligne." #: library/sqlite3.rst:173 msgid "" "Now, insert three more rows by calling :meth:`cur.executemany(...) `:" msgstr "" +"Maintenant, insérez trois lignes supplémentaires en appelant :meth:`cur." +"executemany(…) ` :" #: library/sqlite3.rst:186 msgid "" @@ -203,18 +261,28 @@ msgid "" "to bind Python values to SQL statements, to avoid `SQL injection attacks`_ " "(see :ref:`sqlite3-placeholders` for more details)." msgstr "" +"Remarquez que les marqueurs ``?`` sont utilisés pour lier les ``data`` à la " +"requête. Utilisez toujours les marqueurs au lieu d’:ref:`expressions " +"formatées ` pour lier les valeurs Python aux instructions " +"SQL, afin d’éviter les `injections SQL`_ (voir :ref:`placeholder SQL " +"` pour plus de détails)." #: library/sqlite3.rst:192 msgid "" "We can verify that the new rows were inserted by executing a ``SELECT`` " "query, this time iterating over the results of the query:" msgstr "" +"Nous pouvons vérifier que les nouvelles lignes ont été insérées en exécutant " +"une requête ``SELECT``, cette fois-ci en itérant sur les résultats de la " +"requête :" #: library/sqlite3.rst:206 msgid "" "Each row is a two-item :class:`tuple` of ``(year, title)``, matching the " "columns selected in the query." msgstr "" +"Chaque ligne est un :class:`tuple` de deux éléments ``(année, titre)``, " +"correspondant aux colonnes sélectionnées dans la requête." #: library/sqlite3.rst:209 msgid "" @@ -222,41 +290,51 @@ msgid "" "`con.close() ` to close the existing connection, opening a " "new one, creating a new cursor, then querying the database:" msgstr "" +"Enfin, vérifiez que la base de données a été écrite sur le disque en " +"appelant :meth:`con.close() ` pour fermer la connexion " +"existante, en ouvrir une nouvelle, créer un nouveau curseur, puis interroger " +"la base de données :" #: library/sqlite3.rst:224 msgid "" "You've now created an SQLite database using the :mod:`!sqlite3` module, " "inserted data and retrieved values from it in multiple ways." msgstr "" +"Vous avez maintenant créé une base de données SQLite à l’aide du module :mod:" +"`!sqlite3`, inséré des données et récupéré des valeurs de plusieurs façons." #: library/sqlite3.rst:236 msgid ":ref:`sqlite3-howtos` for further reading:" -msgstr "" +msgstr ":ref:`guide sqlite3 ` pour une lecture plus poussée:" #: library/sqlite3.rst:238 msgid ":ref:`sqlite3-placeholders`" -msgstr "" +msgstr ":ref:`placeholders sqlite3 `" #: library/sqlite3.rst:239 msgid ":ref:`sqlite3-adapters`" -msgstr "" +msgstr ":ref:`adaptateurs sqlite3 `" #: library/sqlite3.rst:240 msgid ":ref:`sqlite3-converters`" -msgstr "" +msgstr ":ref:`convertisseurs sqlite3 `" #: library/sqlite3.rst:514 msgid ":ref:`sqlite3-connection-context-manager`" msgstr "" +":ref:`gestionnaire de contexte de connexion sqlite3 `" #: library/sqlite3.rst:243 msgid "" ":ref:`sqlite3-explanation` for in-depth background on transaction control." msgstr "" +":ref:`explications sqlite3 ` pour un contexte détaillé " +"du contrôle de transaction." #: library/sqlite3.rst:248 msgid "Reference" -msgstr "" +msgstr "Référence" #: library/sqlite3.rst:256 #, fuzzy @@ -265,17 +343,20 @@ msgstr "Fonctions et constantes du module" #: library/sqlite3.rst:263 msgid "Open a connection to an SQLite database." -msgstr "" +msgstr "Ouvrez une connexion à une base de données SQLite." #: library/sqlite3.rst:0 msgid "Parameters" -msgstr "" +msgstr "Paramètres" #: library/sqlite3.rst:265 msgid "" "The path to the database file to be opened. Pass ``\":memory:\"`` to open a " "connection to a database that is in RAM instead of on disk." msgstr "" +"Le chemin d’accès au fichier de la base de données à ouvrir. Passez ``\":" +"memory:\"`` pour ouvrir une connexion à une base de données qui est dans la " +"RAM plutôt que sur le disque." #: library/sqlite3.rst:271 msgid "" @@ -284,6 +365,11 @@ msgid "" "transaction to modify the database, it will be locked until that transaction " "is committed. Default five seconds." msgstr "" +"Le temps (en secondes) que la connexion doit attendre avant de lever une " +"exception, si la base de données est verrouillée par une autre connexion. Si " +"une autre connexion ouvre une transaction pour modifier la base de données, " +"celle-ci sera verrouillée jusqu’à ce que cette transaction soit validée. Par " +"défaut, cinq secondes." #: library/sqlite3.rst:278 msgid "" @@ -297,6 +383,17 @@ msgid "" "class:`str` will be returned instead. By default (``0``), type detection is " "disabled." msgstr "" +"Contrôle si et comment les types de données non :ref:`nativement pris en " +"charge par SQLite ` sont recherchés pour être convertis en " +"types Python, en utilisant les convertisseurs enregistrés avec :func:" +"`register_converter`. Définissez-le à n’importe quelle combinaison (en " +"utilisant ``|``, opérateurs bit-à-bit OR) de :const:`PARSE_DECLTYPES` et :" +"const:`PARSE_COLNAMES` pour activer ceci. Les noms de colonnes ont la " +"priorité sur les types déclarés si les deux drapeaux sont activés. Les types " +"ne peuvent pas être détectés pour les champs générés (par exemple " +"``max(data)``), même si le paramètre *detect_types* est activé ; :class:" +"`str` sera retourné à la place. Par défaut (``0``), la détection des types " +"est désactivée." #: library/sqlite3.rst:292 msgid "" @@ -306,6 +403,12 @@ msgid "" "opening transactions implicitly. See :ref:`sqlite3-controlling-transactions` " "for more." msgstr "" +"L’attribut :attr:`~Connection.isolation_level` de la connexion, contrôlant " +"si et comment les transactions sont ouvertes implicitement. Peut être " +"``\"DEFERRED\"`` (par défaut), ``\"EXCLUSIVE\"`` ou ``\"IMMEDIATE\"`` ; ou " +"``None`` pour désactiver l’ouverture implicite des transactions. Voir :ref:" +"`contrôle des transactions sqlite3 ` pour " +"en savoir plus." #: library/sqlite3.rst:300 msgid "" @@ -319,6 +422,8 @@ msgid "" "A custom subclass of :class:`Connection` to create the connection with, if " "not the default :class:`Connection` class." msgstr "" +"Une sous-classe personnalisée de :class:`Connection` pour créer la " +"connexion, si ce n’est pas la classe par défaut :class:`Connection`." #: library/sqlite3.rst:310 msgid "" @@ -334,6 +439,12 @@ msgid "" "absolute. The query string allows passing parameters to SQLite, enabling " "various :ref:`sqlite3-uri-tricks`." msgstr "" +"Si elle a pour valeur ``True``, la base de données est interprétée comme un :" +"abbr:`URI (Uniform Resource Identifier)` avec un chemin d’accès au fichier " +"et une chaîne de requête facultative. La partie schéma *doit* être ``\"file:" +"\"``, et le chemin peut être relatif ou absolu. La chaîne d’interrogation " +"permet de passer des paramètres à SQLite, ce qui permet d’activer diverses :" +"ref:`astuces d’URI sqlite3 `." #: library/sqlite3.rst:0 #, fuzzy @@ -360,6 +471,8 @@ msgstr "" msgid "" "*database* can now also be a :term:`path-like object`, not only a string." msgstr "" +"*database* peut maintenant aussi être un :term:`objet de type chemin `, et pas seulement une chaîne de caractères." #: library/sqlite3.rst:335 msgid "The ``sqlite3.connect/handle`` auditing event." @@ -372,6 +485,11 @@ msgid "" "performed, other than checking that there are no unclosed string literals " "and the statement is terminated by a semicolon." msgstr "" +"Renvoie ``True`` si la déclaration de la chaîne semble contenir une ou " +"plusieurs déclarations SQL complètes. Aucune vérification syntaxique ou " +"analyse syntaxique d’aucune sorte n’est effectuée, si ce n’est la " +"vérification qu’il n’y a pas de chaîne littérale non fermée et que " +"l’instruction se termine par un point-virgule." #: library/sqlite3.rst:346 #, fuzzy @@ -384,6 +502,10 @@ msgid "" "entered text seems to form a complete SQL statement, or if additional input " "is needed before calling :meth:`~Cursor.execute`." msgstr "" +"Cette fonction peut être utile pendant la saisie en ligne de commande pour " +"déterminer si le texte saisi semble former une instruction SQL complète, ou " +"si une saisie supplémentaire est nécessaire avant d’appeler :meth:`~Cursor." +"execute`." #: library/sqlite3.rst:361 msgid "" @@ -401,6 +523,10 @@ msgid "" "its sole argument, and must return a value of a :ref:`type that SQLite " "natively understands `." msgstr "" +"Enregistre un *adaptateur* appelable pour adapter le type Python *type* en " +"un type SQLite. L’adaptateur est appelé avec un objet Python de type *type* " +"comme unique argument, et doit retourner une valeur d’un :ref:`type que " +"SQLite comprend nativement `." #: library/sqlite3.rst:378 msgid "" @@ -411,12 +537,20 @@ msgid "" "parameter *detect_types* of :func:`connect` for information regarding how " "type detection works." msgstr "" +"Enregistre le *convertisseur* appelable pour convertir les objets SQLite de " +"type *typename* en un objet Python d’un type spécifique. Le convertisseur " +"est invoqué pour toutes les valeurs SQLite de type *typename* ; on lui passe " +"un objet :class:`bytes` et il doit retourner un objet du type Python désiré. " +"Consultez le paramètre *detect_types* de :func:`connect` pour des " +"informations sur le fonctionnement de la détection des types." #: library/sqlite3.rst:386 msgid "" "Note: *typename* and the name of the type in your query are matched case-" "insensitively." msgstr "" +"Remarque : *typename* et le nom du type dans votre requête sont comparés " +"sans tenir compte de la casse." #: library/sqlite3.rst:393 #, fuzzy @@ -1287,7 +1421,7 @@ msgstr "SQLite type" #: library/sqlite3.rst:1378 msgid "``None``" -msgstr "" +msgstr "``None``" #: library/sqlite3.rst:1378 msgid "``NULL``" diff --git a/library/stdtypes.po b/library/stdtypes.po index 9a1c479b..ee6e4bfa 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -7180,6 +7180,9 @@ msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" +"Documentation sur la manière d'implémenter des classes génériques qui " +"peuvent être paramétrées à l'exécution et comprises par les vérificateurs " +"statiques de types." #: library/stdtypes.rst:5031 #, fuzzy diff --git a/library/sys.po b/library/sys.po index 38e4a57d..8e9883f0 100644 --- a/library/sys.po +++ b/library/sys.po @@ -72,10 +72,13 @@ msgstr "" "l'interpréteur en cours d'exécution." #: library/sys.rst:38 +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " "arguments." msgstr "" +"Déclenche un :ref:`événement d'audit ` ``sys.addaudithook`` sans " +"arguments." #: library/sys.rst:40 #, fuzzy @@ -97,6 +100,9 @@ msgid "" "See the :ref:`audit events table ` for all events raised by " "CPython, and :pep:`578` for the original design discussion." msgstr "" +"Voir la :ref:`table d'évenements d'audit ` pour tous les " +"événements levés par CPython et :pep:`578` pour la discussion originale de " +"ce design." #: library/sys.rst:54 msgid "" @@ -177,6 +183,8 @@ msgid "" "For example, one auditing event is named ``os.chdir``. This event has one " "argument called *path* that will contain the requested new working directory." msgstr "" +"Par exemple, un événement d'audit est nommé ``os.chdir``. Cet événement à un " +"argument appelé *path* qui contiendras le nouveau répertoire de travail." #: library/sys.rst:100 msgid "" @@ -187,24 +195,38 @@ msgid "" "implementations to decide how to respond to particular events: they can " "merely log the event or abort the operation by raising an exception." msgstr "" +":func:`sys.audit` appellera les point d'entrées (*hooks* en anglais) " +"d'audits existants, en passant le nom de l'événement et ses arguments, et " +"lèvera à nouveau la première exception de n'importe quel point d'entrée. En " +"général, si une exception est levée, elle ne devrais pas être gérée et le " +"processus devrait être terminé aussi rapidement que possible. Cela permet " +"que les implémentations des points d'entrées décident comment répondre à des " +"événements particuliers : Ils peuvent simplement *logger* l'événement ou " +"arrêter l'opération en levant une exception." #: library/sys.rst:108 msgid "" "Hooks are added using the :func:`sys.addaudithook` or :c:func:" "`PySys_AddAuditHook` functions." msgstr "" +"Les points d'entrées sont ajoutés en utilisant les fonctions :func:`sys." +"addaudithook` ou :c:func:`PySys_AddAuditHook`." #: library/sys.rst:111 msgid "" "The native equivalent of this function is :c:func:`PySys_Audit`. Using the " "native function is preferred when possible." msgstr "" +"L'équivalent natif de cette fonction est :c:func:`PySys_Audit`. " +"L'utilisation de la fonction native est encouragée lorsque c'est possible." #: library/sys.rst:114 msgid "" "See the :ref:`audit events table ` for all events raised by " "CPython." msgstr "" +"Voir le :ref:`tableau d'événements d'audit ` pour tous les " +"événements levés par CPython." #: library/sys.rst:122 #, fuzzy @@ -337,6 +359,8 @@ msgid "" "Raises an :ref:`auditing event ` ``sys._current_frames`` with no " "arguments." msgstr "" +"Lève un :ref:`événement d'audit ` ``sys._current_frames`` sans " +"arguments." #: library/sys.rst:203 #, fuzzy @@ -531,7 +555,7 @@ msgstr "" #: library/sys.rst:327 msgid "" "A relative path is interpreted relative to the current working directory." -msgstr "" +msgstr "Un chemin relatif est interprété relativement au répertoire courant." #: library/sys.rst:329 msgid "" @@ -540,6 +564,11 @@ msgid "" "`PYTHONPYCACHEPREFIX` environment variable (command-line takes precedence). " "If neither are set, it is ``None``." msgstr "" +"Cette valeur est initialement définie basée sur la valeur de l'option de " +"ligne de commande :option:`-X` ``pycache_prefix=PATH`` ou la variable " +"d'environnement :envvar:`PYTHONPYCACHEPREFIX` (La ligne de commande est " +"prioritaire). Si aucune des deux options n'est définie, alors la valeur est " +"``None``." #: library/sys.rst:339 msgid "" @@ -571,6 +600,8 @@ msgid "" "Raises an :ref:`auditing event ` ``sys.excepthook`` with arguments " "``hook``, ``type``, ``value``, ``traceback``." msgstr "" +"Lève un :ref:`événement d'audit ` ``sys.excepthook`` avec les " +"arguments ``hook``, ``type``, ``value``, ``traceback``." #: library/sys.rst:350 msgid "" @@ -581,6 +612,13 @@ msgid "" "Otherwise, the audit hook exception will be reported as unraisable and ``sys." "excepthook`` will be called." msgstr "" +"Lève un événement d'audit ``sys.excepthook`` avec les arguments ``hook``, " +"``type``, ``value``, ``traceback`` lorsqu'une exception non interceptée se " +"produit. Si aucun point d'entrée n'a été défini, ``hook`` peut être " +"``None``. Si n'importe quel point d'entrée lève une exception dérivée de :" +"class:`RuntimeError`, l'appel au point d'entrée sera supprimé. Autrement, " +"l'exception du point d'entrée d'audit sera reporté comme *non levable* " +"(**unraisable** en anglais) et ``sys.excepthook`` sera appelé." #: library/sys.rst:359 msgid "" @@ -588,6 +626,9 @@ msgid "" "the :func:`threading.excepthook` function handles exception raised by :func:" "`threading.Thread.run`." msgstr "" +"La fonction :func:`sys.unraisablehook` gère les exceptions *non-levables* et " +"la fonction :func:`threading.excepthook` gère les exceptions levées par :" +"func:`threading.Thread.run`." #: library/sys.rst:369 msgid "" @@ -876,7 +917,7 @@ msgstr ":const:`dev_mode`" #: library/sys.rst:479 msgid ":option:`-X dev <-X>` (:ref:`Python Development Mode `)" -msgstr "" +msgstr ":option:`-X dev <-X>` (:ref:`Python en mode développement `)" #: library/sys.rst:480 msgid ":const:`utf8_mode`" @@ -1074,6 +1115,8 @@ msgid "" "Use :func:`math.ulp(0.0) ` to get the smallest positive " "*denormalized* representable float." msgstr "" +"Utilisez :func:`math.ulp(0.0) ` pour obtenir le plus petit nombre " +"a virgule positif *dénormalisé* représentable." #: library/sys.rst:544 msgid ":const:`min_exp`" @@ -1274,6 +1317,11 @@ msgid "" "filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" "c:type:`PyConfig`." msgstr "" +"L':term:`encodage du système de fichiers et gestionnaire d'erreurs associé " +"` sont configurés au démarrage de " +"Python par la fonction :c:func:`PyConfig_Read` : regardez :c:member:" +"`~PyConfig.filesystem_encoding` et :c:member:`~PyConfig.filesystem_errors` " +"dans les membres de :c:type:`PyConfig`." #: library/sys.rst:654 msgid ":func:`getfilesystemencoding` result cannot be ``None`` anymore." @@ -1782,6 +1830,8 @@ msgid "" "The addition of new required attributes must go through the normal PEP " "process. See :pep:`421` for more information." msgstr "" +"L'addition de nouveaux attributs requis doivent passer par le processus de " +"**PEP** classique. Voir :pep:`421` pour plus d'informations." #: library/sys.rst:959 msgid "" @@ -1864,12 +1914,17 @@ msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with argument ``hook``." msgstr "" +"Lève un :ref:`évènement d'audit ` ``cpython.run_interactivehook`` " +"avec comme argument ``hook``." #: library/sys.rst:1000 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with the hook object as the argument when the hook is called on startup." msgstr "" +"Lève un :ref:`évènement d'audit ` ``cpython.run_interactivehook`` " +"avec l'objet de point d'entrée comme argument lorsqu'il est appelé au " +"démarrage." #: library/sys.rst:1009 msgid "" @@ -2254,6 +2309,9 @@ msgid "" "Name of the platform-specific library directory. It is used to build the " "path of standard library and the paths of installed extension modules." msgstr "" +"Nom du dossier de la bibliothèque spécifique à la plateforme. Il est utilisé " +"pour construire le chemin de vers la bibliothèque standard et les chemins " +"vers les modules d'extensions installés." #: library/sys.rst:1221 msgid "" @@ -2261,12 +2319,18 @@ msgid "" "equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys." "path`` paths (where ``X.Y`` is the Python ``major.minor`` version):" msgstr "" +"C'est égal à ``\"lib\"`` sur la plupart des plateformes. Sur Fedora et SuSE, " +"c'est égal à ``\"lib64\"`` sur les plateformes 64-bits qui renvoient les " +"chemins ``sys.path`` suivants (où ``X.Y`` et la version ``majeure.mineur`` " +"de Python) :" #: library/sys.rst:1225 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" +"``/usr/lib64/pythonX.Y/`` : Bibliothèque standard (comme ``os.py`` du " +"module :mod:`os`)" #: library/sys.rst:1227 msgid "" @@ -2274,18 +2338,25 @@ msgid "" "library (like the :mod:`errno` module, the exact filename is platform " "specific)" msgstr "" +"``/usr/lib64/pythonX.Y/lib-dynload/`` : Modules d'extension C de la " +"bibliothèque standard (comme le module :mod:`errno`, le nom du fichier exact " +"est spécifique à la plateforme)" #: library/sys.rst:1230 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" +"``/usr/lib/pythonX.Y/site-packages/`` (toujours utiliser ``lib``, et non :" +"data:`sys.platlibdir`) : modules tiers" #: library/sys.rst:1232 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" +"``/usr/lib64/pythonX.Y/site-packages/`` : Modules d'extension C de paquets " +"tiers" #: library/sys.rst:1240 #, fuzzy @@ -2406,6 +2477,8 @@ msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "" +"Lève un :ref:`évènement d'audit ` ``sys.setprofile`` sans " +"arguments." #: library/sys.rst:1394 msgid "The events have the following meaning:" @@ -2675,6 +2748,17 @@ msgid "" "tracing function that simply returns ``None`` to disable itself immediately " "on each frame)." msgstr "" +"Pour une utilisation plus fine, il est possible de définir une fonction de " +"traçage en assignant ``frame.f_trace = tracefunc`` explicitement, plutôt que " +"de s'appuyer sur le fait qu'elle soit définie indirectement par la valeur de " +"retour d'une fonction trace déjà installée. Cela est aussi demandé pour " +"l'activation de la fonction de traçage dans le cadre, ce que :func:" +"`settrace` ne fait pas. Notez que pour que cela fonctionne, une fonction " +"globale de traçage doit avoir été installée avec :func:`settrace` afin " +"d'activer le mécanisme de traçage au moment de l'exécution, mais il n'est " +"pas nécessaire que ce soit la même fonction de traçage (Par exemple, cela " +"pourrait être une fonction de traçage avec peu de surcharge qui retourne " +"simplement ``None`` pour se désactiver immédiatement à chaque cadre)." #: library/sys.rst:1443 msgid "For more information on code and frame objects, refer to :ref:`types`." @@ -2687,6 +2771,7 @@ msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" +"Lève un :ref:`évènement d'audit ` ``sys.settrace`` sans arguments." #: library/sys.rst:1449 msgid "" @@ -2728,18 +2813,24 @@ msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" +"Lève un :ref:`évènement d'audit ` ``sys." +"set_asyncgen_hooks_firstiter`` sans arguments." #: library/sys.rst:1469 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." msgstr "" +"Lève un :ref:`événement d'audit ` ``sys." +"set_asyncgen_hooks_finalizer`` sans arguments." #: library/sys.rst:1471 msgid "" "Two auditing events are raised because the underlying API consists of two " "calls, each of which must raise its own event." msgstr "" +"Deux événements d'audit sont levés car l'API sous-jacente consiste de deux " +"appels, dont chacun doit lever son propre événement." #: library/sys.rst:1474 msgid "" @@ -2919,6 +3010,8 @@ msgstr "" msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" +"Le ``stderr`` non interactif est maintenant mis en mémoire-tampon ligne par " +"ligne plutôt qu'entièrement." #: library/sys.rst:1575 msgid "" @@ -3081,7 +3174,7 @@ msgstr "" #: library/sys.rst:1665 msgid "Handle an unraisable exception." -msgstr "" +msgstr "Gère une exception *non levable* (**unraisable** en anglais)" #: library/sys.rst:1667 msgid "" @@ -3089,6 +3182,9 @@ msgid "" "handle it. For example, when a destructor raises an exception or during " "garbage collection (:func:`gc.collect`)." msgstr "" +"Appelé lorsqu'une exception s'est produite mais qu'il n'y a aucun moyen pour " +"Python de la gérer. Par exemple, lorsqu'un destructeur lève une exception ou " +"durant le passage du ramasse-miettes (:func:`gc.collect`)." #: library/sys.rst:1671 msgid "The *unraisable* argument has the following attributes:" @@ -3109,23 +3205,28 @@ msgstr "" #: library/sys.rst:1676 msgid "*err_msg*: Error message, can be ``None``." -msgstr "" +msgstr "*err_msg* : Message d'erreur, peut être ``None``." #: library/sys.rst:1677 msgid "*object*: Object causing the exception, can be ``None``." -msgstr "" +msgstr "*object* : Objet causant l'exception, peut être ``None``." #: library/sys.rst:1679 msgid "" "The default hook formats *err_msg* and *object* as: ``f'{err_msg}: {object!" "r}'``; use \"Exception ignored in\" error message if *err_msg* is ``None``." msgstr "" +"Le point d'entrée par défaut formate *err_msg* et *object* de la façon " +"suivante : ``f'{err_msg}: {object!r}'``; sinon utilise \"*Exception ignored " +"in*\" dans le message d'erreur si *err_msg* est à ``None``." #: library/sys.rst:1683 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" +":func:`sys.unraisablehook` peut être remplacé pour contrôler comment les " +"exceptions *non levables* (**unraisable** en anglais) sont gérées." #: library/sys.rst:1686 msgid "" @@ -3151,7 +3252,7 @@ msgstr "" #: library/sys.rst:1694 msgid "See also :func:`excepthook` which handles uncaught exceptions." -msgstr "" +msgstr "Voir aussi :func:`excepthook` qui gère les exceptions *non levables*." #: library/sys.rst:1696 msgid "" @@ -3166,6 +3267,10 @@ msgid "" "``unraisable`` object is the same as what will be passed to the hook. If no " "hook has been set, ``hook`` may be ``None``." msgstr "" +"Lève un événement d'audit ``sys.unraisablehook`` avec comme arguments " +"``hook``, ``unraisable`` lorsqu'une exception qui ne peut être gérée se " +"produit. L'objet ``unraisable`` est le même qui sera passé au point " +"d'entrée. Si aucun point d'entrée n'est défini, ``hook`` peut être ``None``." #: library/sys.rst:1707 msgid "" diff --git a/library/typing.po b/library/typing.po index df98a8f5..78d8b9c4 100644 --- a/library/typing.po +++ b/library/typing.po @@ -72,6 +72,10 @@ msgid "" "`typing_extensions `_ package " "provides backports of these new features to older versions of Python." msgstr "" +"Le module ``typing`` est fréquemment enrichi de nouvelles fonctionnalités. " +"Le package `typing_extensions `_ fournit des rétro-portages de ces fonctionnalités vers les anciennes " +"versions de Python." #: library/typing.rst:41 msgid "" @@ -79,10 +83,15 @@ msgid "" "reference for type system features, useful typing related tools and typing " "best practices." msgstr "" +"La documentation https://typing.readthedocs.io/ est une référence utile pour " +"les fonctionnalités du système de types, les outils liés au typage et les " +"bonnes pratiques de typage.La documentation sur https://typing.readthedocs." +"io/ sert de référence pour les fonctionnalités, les outils utiles et les " +"meilleures pratiques liés au système de typage." #: library/typing.rst:47 msgid "Relevant PEPs" -msgstr "" +msgstr "PEPs pertinentes" #: library/typing.rst:49 msgid "" @@ -90,87 +99,102 @@ msgid "" "number of PEPs have modified and enhanced Python's framework for type " "annotations. These include:" msgstr "" +"Depuis l'introduction initiale des annotations de type dans les :pep:`484` " +"et :pep:`483`, plusieurs PEPs ont modifié et amélioré le framework " +"d'annotation de type. Cela inclut :" #: library/typing.rst:54 msgid ":pep:`526`: Syntax for Variable Annotations" -msgstr "" +msgstr ":pep:`526` : Syntaxe pour les Annotations de Variables" #: library/typing.rst:54 msgid "" "*Introducing* syntax for annotating variables outside of function " "definitions, and :data:`ClassVar`" msgstr "" +"*Introduction* d'une syntaxe permettant d'annoter les variables autrement " +"qu'au sein de la définition d'une fonction et de :data:`ClassVar`" #: library/typing.rst:57 msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)" msgstr "" +":pep:`544`: Protocoles : Sous-typage Structurel (*duck-typing* statique)" #: library/typing.rst:57 msgid "" "*Introducing* :class:`Protocol` and the :func:" "`@runtime_checkable` decorator" msgstr "" +"*Ajout* de :class:`Protocol` et du décorateur :func:" +"`@runtime_checkable`" #: library/typing.rst:60 msgid ":pep:`585`: Type Hinting Generics In Standard Collections" -msgstr "" +msgstr ":pep:`585`: Annotations de Type Générique dans les Collections Natives" #: library/typing.rst:60 msgid "" "*Introducing* :class:`types.GenericAlias` and the ability to use standard " "library classes as :ref:`generic types`" msgstr "" +"*Ajout* de :class:`types.GenericAlias` et de la possibilité d'utiliser les " +"classes de bibliothèques natives comme les :ref:`types génériques`" #: library/typing.rst:62 msgid ":pep:`586`: Literal Types" -msgstr "" +msgstr ":pep:`586`: Types Littéraux" #: library/typing.rst:63 msgid "*Introducing* :data:`Literal`" -msgstr "" +msgstr "*Ajout* de :data:`Literal`" #: library/typing.rst:64 msgid "" ":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys" msgstr "" +":pep:`589`: TypedDict: Annotations de Type pour les Dictionnaires ayant un " +"Ensemble Fixe de Clés" #: library/typing.rst:65 msgid "*Introducing* :class:`TypedDict`" -msgstr "" +msgstr "*Ajout* de :class:`TypedDict`" #: library/typing.rst:66 msgid ":pep:`591`: Adding a final qualifier to typing" -msgstr "" +msgstr ":pep:`591`: Ajout d'un qualificatif final au typage" #: library/typing.rst:67 msgid "*Introducing* :data:`Final` and the :func:`@final` decorator" -msgstr "" +msgstr "*Ajout* de :data:`Final` et du décorateur :func:`@final`" #: library/typing.rst:68 msgid ":pep:`593`: Flexible function and variable annotations" -msgstr "" +msgstr ":pep:`593`: fonction Flexible et annotations de variables" #: library/typing.rst:69 msgid "*Introducing* :data:`Annotated`" -msgstr "" +msgstr "*Ajout* de :data:`Annotated`" #: library/typing.rst:72 msgid ":pep:`604`: Allow writing union types as ``X | Y``" -msgstr "" +msgstr ":pep:`604`: Permettre l'écriture de types union tels que ``X | Y``" #: library/typing.rst:71 msgid "" "*Introducing* :data:`types.UnionType` and the ability to use the binary-or " "operator ``|`` to signify a :ref:`union of types`" msgstr "" +"*Ajout* de :data:`types.UnionType` et la possibilité d'utiliser l'opérateur " +"binaire ``|`` (*ou*) pour signifier :ref:`union of types`" #: library/typing.rst:74 msgid ":pep:`612`: Parameter Specification Variables" -msgstr "" +msgstr ":pep:`612`: Variables de Spécification de Paramètre" #: library/typing.rst:75 msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`" -msgstr "" +msgstr "*Ajout* de :class:`ParamSpec` et de :data:`Concatenate`" #: library/typing.rst:76 #, fuzzy @@ -179,15 +203,15 @@ msgstr "Voir la :pep:`484` pour plus de détails." #: library/typing.rst:77 msgid "*Introducing* :data:`TypeAlias`" -msgstr "" +msgstr "*Ajout* de :data:`TypeAlias`" #: library/typing.rst:79 msgid ":pep:`647`: User-Defined Type Guards" -msgstr "" +msgstr ":pep:`647`: Gardes de Types Définies par l'Utilisateur" #: library/typing.rst:79 msgid "*Introducing* :data:`TypeGuard`" -msgstr "" +msgstr "*Ajout* de :data:`TypeGuard`" #: library/typing.rst:84 msgid "Type aliases" @@ -277,7 +301,7 @@ msgstr "" #: library/typing.rst:159 msgid "It is invalid to create a subtype of ``Derived``::" -msgstr "" +msgstr "La création d'un sous-type de ``Derived`` est invalide:" #: library/typing.rst:168 #, fuzzy @@ -332,6 +356,9 @@ msgid "" "runtime cost when calling ``NewType`` over a regular function. However, " "this cost will be reduced in 3.11.0." msgstr "" +"``NewType`` est maintenant une classe (plutôt qu'une fonction). Cela " +"entraine un coût supplémentaire en temps d'exécution lors d'un appel. " +"Cependant, ce coût sera réduit dans la version 3.11.0." #: library/typing.rst:203 msgid "Callable" @@ -370,18 +397,29 @@ msgid "" "``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " "ReturnType]`` respectively." msgstr "" +"Les appelables qui prennent en argument d'autres appelables peuvent indiquer " +"que leurs types de paramètres dépendent les uns des autres en utilisant :" +"class:`ParamSpec`. De plus, si un appelable ajoute ou supprime des arguments " +"d'autres appelables, l'opérateur :data:`Concatenate` peut être utilisé. Ils " +"prennent la forme ``Callable[ParamSpecVariable, ReturnType]`` et " +"``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " +"ReturnType]`` respectivement." #: library/typing.rst:726 msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." msgstr "" +"``Callable`` prend désormais en charge :class:`ParamSpec` et :data:" +"`Concatenate`. Voir :pep:`612` pour plus de détails." #: library/typing.rst:240 msgid "" "The documentation for :class:`ParamSpec` and :class:`Concatenate` provides " "examples of usage in ``Callable``." msgstr "" +"La documentation pour :class:`ParamSpec` et :class:`Concatenate` fournit des " +"exemples d'utilisation dans ``Callable``." #: library/typing.rst:246 msgid "Generics" @@ -1983,7 +2021,7 @@ msgstr "Classe de base abstraite pour les types génériques." #: library/typing.rst:1752 msgid "Corresponding to collections in :mod:`collections.abc`" -msgstr "" +msgstr "Correspond aux collections au sein de :mod:`collections.abc`" #: library/typing.rst:1756 msgid "A generic version of :class:`collections.abc.Set`." @@ -2164,7 +2202,7 @@ msgstr "" #: library/typing.rst:1871 msgid "Corresponding to other types in :mod:`collections.abc`" -msgstr "" +msgstr "Correspond aux autres types au sein de :mod:`collections.abc`." #: library/typing.rst:1875 msgid "A generic version of :class:`collections.abc.Iterable`." @@ -2256,7 +2294,7 @@ msgstr "Un alias pour :class:`collections.abc.Sized`" #: library/typing.rst:1941 msgid "Asynchronous programming" -msgstr "" +msgstr "Programmation asynchrone" #: library/typing.rst:1945 msgid "" @@ -2356,7 +2394,7 @@ msgstr "" #: library/typing.rst:2030 msgid "Context manager types" -msgstr "" +msgstr "Types associés aux gestionnaires de contexte" #: library/typing.rst:2034 msgid "A generic version of :class:`contextlib.AbstractContextManager`." @@ -2385,11 +2423,11 @@ msgstr "" #: library/typing.rst:2055 msgid "Protocols" -msgstr "" +msgstr "Protocoles" #: library/typing.rst:2057 msgid "These protocols are decorated with :func:`runtime_checkable`." -msgstr "" +msgstr "Ces protocoles sont décorés par :func:`runtime_checkable`." #: library/typing.rst:2061 msgid "" @@ -2551,7 +2589,7 @@ msgstr "" #: library/typing.rst:2192 msgid "Introspection helpers" -msgstr "" +msgstr "Utilitaires d'introspection" #: library/typing.rst:2196 msgid "" @@ -2584,6 +2622,9 @@ msgid "" "unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " "more information). For example::" msgstr "" +"La fonction remplace récursivement tous les ``Annotated[T, ...]`` avec " +"``T``, sauf si la valeur de ``include_extras`` est définie à ``True`` (voir :" +"class:`Annotated` pour plus d'information). Par exemple ::" #: library/typing.rst:2222 msgid "" @@ -2591,10 +2632,14 @@ msgid "" "aliases>` that include forward references. Enabling postponed evaluation of " "annotations (:pep:`563`) may remove the need for most forward references." msgstr "" +":func:`get_type_hints` ne fonctionne pas avec les :ref:`alias de type ` importés contenant des références postérieures. L'activation " +"d'évaluation différée des annotations (:pep:`563`) permet de supprimer le " +"besoin de références postérieures supplémentaires." #: library/typing.rst:2227 msgid "Added ``include_extras`` parameter as part of :pep:`593`." -msgstr "" +msgstr "Ajout du paramètre ``include_extras`` comme énoncé dans la :pep:`593`." #: library/typing.rst:2233 msgid "Provide basic introspection for generic types and special typing forms." @@ -2620,7 +2665,7 @@ msgstr "" #: library/typing.rst:2254 msgid "Check if a type is a :class:`TypedDict`." -msgstr "" +msgstr "Vérifier si un type est un :class:`TypedDict`." #: library/typing.rst:2269 #, fuzzy @@ -2643,6 +2688,9 @@ msgid "" "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" +"Les types :pep:`585` tels que ``list[\"SomeClass\"]`` ne seront pas " +"implicitement transformés en ``list[ForwardRef(\"SomeClass\")]`` et ne " +"seront donc pas automatiquement résolus en ``list[SomeClass]``." #: library/typing.rst:2282 msgid "Constant" @@ -2678,6 +2726,11 @@ msgid "" "in ``__annotations__``. This makes it unnecessary to use quotes around the " "annotation (see :pep:`563`)." msgstr "" +"Si ``from __future__ import annotations`` est utilisé, les annotations ne " +"sont pas évaluées au moment de la définition de fonction. Elles sont alors " +"stockées comme des chaînes de caractères dans ``__annotations__``, ce qui " +"rend inutile l'utilisation de guillemets autour de l'annotation (Voir :pep:" +"`563`)." #~ msgid "" #~ "The latter example's signature is essentially the overloading of ``(str, " diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po index 55b93e99..dfa16182 100644 --- a/library/xml.etree.elementtree.po +++ b/library/xml.etree.elementtree.po @@ -16,25 +16,28 @@ msgstr "" #: library/xml.etree.elementtree.rst:2 msgid ":mod:`xml.etree.ElementTree` --- The ElementTree XML API" -msgstr "" +msgstr ":mod:`xml.etree.ElementTree` — L'API ElementTree XML" #: library/xml.etree.elementtree.rst:9 msgid "**Source code:** :source:`Lib/xml/etree/ElementTree.py`" -msgstr "" +msgstr "**Code Source:** :source:`Lib/xml/etree/ElementTree.py`" #: library/xml.etree.elementtree.rst:13 msgid "" "The :mod:`xml.etree.ElementTree` module implements a simple and efficient " "API for parsing and creating XML data." msgstr "" +"Le module :mod:`xml.etree.ElementTree` implémente une API simple et " +"efficace pour analyser et créer des données XML." #: library/xml.etree.elementtree.rst:16 msgid "This module will use a fast implementation whenever available." msgstr "" +"Ce module utilise une implémentation rapide chaque fois que c'est possible." #: library/xml.etree.elementtree.rst:19 msgid "The :mod:`xml.etree.cElementTree` module is deprecated." -msgstr "" +msgstr "Le module :mod:`xml.etree.cElementTree` est obsolète." #: library/xml.etree.elementtree.rst:25 #, fuzzy @@ -57,10 +60,13 @@ msgid "" "short). The goal is to demonstrate some of the building blocks and basic " "concepts of the module." msgstr "" +"Ceci est un petit tutoriel pour utiliser :mod:`xml.etree.ElementTree` " +"(``ET``). Le but est de démontrer quelques composants et les concepts " +"basiques du module." #: library/xml.etree.elementtree.rst:37 msgid "XML tree and elements" -msgstr "" +msgstr "Arborescence et éléments XML" #: library/xml.etree.elementtree.rst:39 msgid "" @@ -72,24 +78,33 @@ msgid "" "class:`ElementTree` level. Interactions with a single XML element and its " "sub-elements are done on the :class:`Element` level." msgstr "" +"XML est un format de données fondamentalement hiérarchique et la façon la " +"plus naturelle de la représenter est avec un arbre. ``ET`` a deux classes " +"pour ce but- :class:`ElementTree` représente l'ensemble du document XML " +"comme un arbre et :class:`Element` est représenté en tant que nœud dans cet " +"arbre. Les interactions (lire et écrire vers/depuis des fichiers) sur le " +"document sont habituellement effectués au niveau de :class:`ElementTree`. " +"Les interactions sur un seul élément XML et ses sous-éléments sont effectués " +"au niveau de :class:`Element`." #: library/xml.etree.elementtree.rst:50 msgid "Parsing XML" -msgstr "" +msgstr "Analyse XML" #: library/xml.etree.elementtree.rst:52 msgid "" "We'll be using the following XML document as the sample data for this " "section:" msgstr "" +"Nous utilisons le document XML suivant comme exemple pour cette section :" #: library/xml.etree.elementtree.rst:80 msgid "We can import this data by reading from a file::" -msgstr "" +msgstr "Nous pouvons importer cette donnée en lisant un fichier ::" #: library/xml.etree.elementtree.rst:86 msgid "Or directly from a string::" -msgstr "" +msgstr "Ou depuis une chaîne de caractères ::" #: library/xml.etree.elementtree.rst:90 msgid "" @@ -98,19 +113,27 @@ msgid "" "functions may create an :class:`ElementTree`. Check the documentation to be " "sure." msgstr "" +":func:`fromstring` analyse le XML depuis une chaîne de caractères vers un :" +"class:`Element`, ce dernier est l'élément racine de l'arbre analysé. " +"D'Autres fonctions d'analyse peuvent créer un :class:`ElementTree`. " +"Vérifier la documentation pour être sûr." #: library/xml.etree.elementtree.rst:94 msgid "" "As an :class:`Element`, ``root`` has a tag and a dictionary of attributes::" msgstr "" +"Comme :class:`Element`, ``root`` a une balise et un dictionnaire " +"d'attributs ::" #: library/xml.etree.elementtree.rst:101 msgid "It also has children nodes over which we can iterate::" -msgstr "" +msgstr "Il contient aussi des nœuds enfants que nous pouvons itérer ::" #: library/xml.etree.elementtree.rst:110 msgid "Children are nested, and we can access specific child nodes by index::" msgstr "" +"Les enfants sont imbriqués et nous pouvons accéder aux nœuds enfants " +"spécifiques via un index ::" #: library/xml.etree.elementtree.rst:118 msgid "" @@ -123,10 +146,19 @@ msgid "" "passing a custom :class:`TreeBuilder` instance to the :class:`XMLParser` " "constructor." msgstr "" +"Les éléments du XML d'entrée ne sont pas tous considérés comme des éléments " +"de l'arborescence. Souvent, le module ignore les commentaires XML, les " +"instructions de traitements et la déclaration du type de document dans " +"l'entrée. Néanmoins, les arborescences sont construites en utilisant l'API " +"du module plutôt que d'analyser depuis un texte XML qui peut contenir des " +"commentaires et des instructions de traitements ; ils peuvent être inclus " +"lors de la génération du XML de sortie. Le type de déclaration du document " +"est accessible en passant par une instance de :class:`TreeBuilder` dans le " +"constructeur de :class:`XMLParser`." #: library/xml.etree.elementtree.rst:132 msgid "Pull API for non-blocking parsing" -msgstr "" +msgstr "API à flux tiré" #: library/xml.etree.elementtree.rst:134 msgid "" @@ -166,7 +198,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:169 msgid "Finding interesting elements" -msgstr "" +msgstr "Trouver les éléments d'intérêt" #: library/xml.etree.elementtree.rst:171 msgid "" @@ -174,6 +206,9 @@ msgid "" "all the sub-tree below it (its children, their children, and so on). For " "example, :meth:`Element.iter`::" msgstr "" +":class:`Element` a quelques méthodes très utiles qui aident à parcourir " +"récursivement tous les sous-arbres (ses enfants, leurs enfants et ainsi de " +"suite). Par exemple, :meth:`Element.iter` ::" #: library/xml.etree.elementtree.rst:184 msgid "" @@ -182,6 +217,11 @@ msgid "" "child with a particular tag, and :attr:`Element.text` accesses the element's " "text content. :meth:`Element.get` accesses the element's attributes::" msgstr "" +":meth:`Element.findall` récupère seulement les éléments avec une balise qui " +"sont les descendants directs de l'élément courant. :meth:`Element.find` " +"récupère le *premier* élément avec une balise particulière et :attr:`Element." +"text` accède au contenu textuel de l'élément. :meth:`Element.get` accède " +"aux attributs de l'élément ::" #: library/xml.etree.elementtree.rst:198 msgid "" @@ -191,7 +231,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:202 msgid "Modifying an XML File" -msgstr "" +msgstr "Modification d'un fichier XML" #: library/xml.etree.elementtree.rst:204 msgid "" @@ -215,7 +255,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:222 library/xml.etree.elementtree.rst:266 msgid "Our XML now looks like this:" -msgstr "" +msgstr "Maintenant, notre XML ressemble à ceci :" #: library/xml.etree.elementtree.rst:250 msgid "" @@ -233,7 +273,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:288 msgid "Building XML documents" -msgstr "" +msgstr "Création de documents XML" #: library/xml.etree.elementtree.rst:290 msgid "" @@ -243,7 +283,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:301 msgid "Parsing XML with Namespaces" -msgstr "" +msgstr "Analyse d'un XML avec des espaces de noms" #: library/xml.etree.elementtree.rst:303 msgid "" @@ -276,11 +316,11 @@ msgstr "" #: library/xml.etree.elementtree.rst:355 msgid "These two approaches both output::" -msgstr "" +msgstr "Ces deux approches donnent le même résultat ::" #: library/xml.etree.elementtree.rst:369 msgid "XPath support" -msgstr "" +msgstr "Prise en charge de XPath" #: library/xml.etree.elementtree.rst:371 msgid "" @@ -309,7 +349,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:410 msgid "Supported XPath syntax" -msgstr "" +msgstr "Prise en charge de la syntaxe XPath" #: library/xml.etree.elementtree.rst:415 msgid "Syntax" @@ -332,6 +372,13 @@ msgid "" "``spam`` in any (or no) namespace, and ``{}*`` only selects tags that are " "not in a namespace." msgstr "" +"Sélectionne tous les éléments enfants avec une balise donnée. Par exemple, " +"``spam`` sélectionne tous les éléments enfants nommés ``spam`` et ``spam/" +"egg`` sélectionne tous les petits-enfants nommés ``egg`` dans les enfants " +"nommés ``spam``. ``{namespace}*`` sélectionne toutes les balises dans " +"l'espace de nom donné, ``{*}spam`` sélectionne les balises nommées ``spam`` " +"dans n'importe quel (ou aucun) espace de nom et ``{}*`` sélectionne " +"seulement les balises qui ne sont pas dans un espace de nom." #: library/xml.etree.elementtree.rst:426 msgid "Support for star-wildcards was added." @@ -488,6 +535,7 @@ msgstr "Fonctions" #: library/xml.etree.elementtree.rst:502 msgid "`C14N 2.0 `_ transformation function." msgstr "" +"`C14N 2.0 `_ fonction de transformation." #: library/xml.etree.elementtree.rst:504 msgid "" @@ -514,11 +562,13 @@ msgstr "Usage typique ::" #: library/xml.etree.elementtree.rst:528 msgid "The configuration *options* are as follows:" -msgstr "" +msgstr "Les *options* de configuration sont les suivantes :" #: library/xml.etree.elementtree.rst:530 msgid "*with_comments*: set to true to include comments (default: false)" msgstr "" +"*with_comments* : attribue à vrai pour inclure les commentaires (par " +"défaut : faux)" #: library/xml.etree.elementtree.rst:531 msgid "" @@ -527,7 +577,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:532 library/xml.etree.elementtree.rst:534 msgid "(default: false)" -msgstr "" +msgstr "(par défaut : faux)" #: library/xml.etree.elementtree.rst:533 msgid "" @@ -593,7 +643,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:569 msgid "*elem* is an element tree or an individual element." -msgstr "" +msgstr "*elem* est un élément de l'arborescence ou un élément individuel." #: library/xml.etree.elementtree.rst:571 msgid "" @@ -671,11 +721,11 @@ msgstr "" #: library/xml.etree.elementtree.rst:641 msgid "The *parser* argument." -msgstr "" +msgstr "L'argument *parser*." #: library/xml.etree.elementtree.rst:644 library/xml.etree.elementtree.rst:1473 msgid "The ``comment`` and ``pi`` events were added." -msgstr "" +msgstr "Les évènements ``comment`` et ``pi`` ont été ajoutés." #: library/xml.etree.elementtree.rst:650 msgid "" @@ -744,7 +794,7 @@ msgstr "Le paramètre *short_empty_elements*." #: library/xml.etree.elementtree.rst:708 library/xml.etree.elementtree.rst:735 msgid "The *xml_declaration* and *default_namespace* parameters." -msgstr "" +msgstr "Les paramètres *xml_declaration* et *default_namespace*." #: library/xml.etree.elementtree.rst:711 msgid "" @@ -791,7 +841,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:763 msgid "XInclude support" -msgstr "" +msgstr "Prise en charge de XInclude" #: library/xml.etree.elementtree.rst:765 msgid "" @@ -888,6 +938,8 @@ msgid "" "Element class. This class defines the Element interface, and provides a " "reference implementation of this interface." msgstr "" +"Classe Element. Cette classe définit l'interface Element et fournit une " +"implémentation de référence de cette interface." #: library/xml.etree.elementtree.rst:870 msgid "" @@ -944,6 +996,8 @@ msgstr "" #: library/xml.etree.elementtree.rst:916 msgid "The following dictionary-like methods work on the element attributes." msgstr "" +"Les méthodes dictionnaire-compatibles suivantes traitent les attributs de " +"l'élément." #: library/xml.etree.elementtree.rst:921 msgid "" @@ -953,18 +1007,22 @@ msgstr "" #: library/xml.etree.elementtree.rst:927 msgid "Gets the element attribute named *key*." -msgstr "" +msgstr "Accède à l'attribut de l'élément nommé *key*." #: library/xml.etree.elementtree.rst:929 msgid "" "Returns the attribute value, or *default* if the attribute was not found." msgstr "" +"Renvoie la valeur de l'attribut ou *default* si l'attribut n'a pas été " +"trouvé." #: library/xml.etree.elementtree.rst:934 msgid "" "Returns the element attributes as a sequence of (name, value) pairs. The " "attributes are returned in an arbitrary order." msgstr "" +"Renvoie les attributs de l'élément comme une séquence de paire (nom, " +"valeur). Les attributs sont renvoyés un l'ordre arbitraire." #: library/xml.etree.elementtree.rst:940 msgid "" @@ -974,11 +1032,11 @@ msgstr "" #: library/xml.etree.elementtree.rst:946 msgid "Set the attribute *key* on the element to *value*." -msgstr "" +msgstr "Change l'attribut *key* à l'élément *value*." #: library/xml.etree.elementtree.rst:948 msgid "The following methods work on the element's children (subelements)." -msgstr "" +msgstr "Les méthodes suivantes traitent les éléments enfants (sous-éléments)." #: library/xml.etree.elementtree.rst:953 msgid "" @@ -1110,7 +1168,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1094 msgid "ElementTree Objects" -msgstr "" +msgstr "Objets ElementTree" #: library/xml.etree.elementtree.rst:1099 msgid "" @@ -1134,7 +1192,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1116 msgid "Same as :meth:`Element.find`, starting at the root of the tree." -msgstr "" +msgstr "Comme :meth:`Element.find`, commence à la racine de l'arbre." #: library/xml.etree.elementtree.rst:1121 msgid "Same as :meth:`Element.findall`, starting at the root of the tree." @@ -1146,7 +1204,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1131 msgid "Returns the root element for this tree." -msgstr "" +msgstr "Renvoie l'élément racine de l'arbre." #: library/xml.etree.elementtree.rst:1136 msgid "" @@ -1210,7 +1268,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1220 msgid "QName Objects" -msgstr "" +msgstr "Objets QName" #: library/xml.etree.elementtree.rst:1225 msgid "" @@ -1224,7 +1282,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1237 msgid "TreeBuilder Objects" -msgstr "" +msgstr "Objets TreeBuilder" #: library/xml.etree.elementtree.rst:1243 msgid "" @@ -1262,12 +1320,16 @@ msgid "" "Adds text to the current element. *data* is a string. This should be " "either a bytestring, or a Unicode string." msgstr "" +"Ajoute du texte à l'élément courant. *data* est une chaîne de caractères. " +"Cela peut être une chaîne d'octets ou une chaîne Unicode." #: library/xml.etree.elementtree.rst:1273 msgid "" "Closes the current element. *tag* is the element name. Returns the closed " "element." msgstr "" +"Ferme l'élément courant. *tag* est le nom de l'élément. Renvoie l'élément " +"fermé." #: library/xml.etree.elementtree.rst:1279 msgid "" @@ -1325,7 +1387,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1344 msgid "XMLParser Objects" -msgstr "" +msgstr "Objets XMLParser" #: library/xml.etree.elementtree.rst:1349 msgid "" @@ -1368,7 +1430,7 @@ msgstr "" #: library/xml.etree.elementtree.rst:1417 msgid "XMLPullParser Objects" -msgstr "" +msgstr "Objets XMLPullParser" #: library/xml.etree.elementtree.rst:1421 msgid "" @@ -1461,6 +1523,8 @@ msgstr "" msgid "" "A tuple of *line*, *column* numbers, specifying where the error occurred." msgstr "" +"Un *n*-uplet de numéro de *ligne*, de *colonne* indiquant le lieu " +"d'apparition de l'erreur." #: library/xml.etree.elementtree.rst:1497 msgid "Footnotes" @@ -1473,3 +1537,7 @@ msgid "" "https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and https://" "www.iana.org/assignments/character-sets/character-sets.xhtml." msgstr "" +"La chaîne de caractères encodée inclue dans la sortie XML doit être conforme " +"aux standards. Par exemple, « UTF-8 » est valide, mais pas « UTF8 ». Voir " +"https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl et https://" +"www.iana.org/assignments/character-sets/character-sets.xhtml." diff --git a/reference/datamodel.po b/reference/datamodel.po index 83dc0e2a..af280821 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -3365,6 +3365,8 @@ msgstr "" #: reference/datamodel.rst:1880 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" +"Tout :term:`itérable `, sauf les chaînes de caractères, peuvent " +"être affectés à *__slots__*." #: reference/datamodel.rst:1882 msgid "" @@ -3373,6 +3375,11 @@ msgid "" "can be used to provide per-attribute docstrings that will be recognised by :" "func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" +"Si vous affectez *__slots__* à un :class:`dictionnaire `, les clés du " +"dictionnaires seront les noms du *slot*. Les valeurs du dictionnaire peuvent " +"être utilisées en tant que chaines de description (*docstrings*) et sont " +"reconnues par :func:`inspect.getdoc` qui les affiche dans la sortie de :func:" +"`help`." #: reference/datamodel.rst:1887 #, fuzzy @@ -3939,6 +3946,11 @@ msgid "" "notation. For example, the annotation ``list[int]`` might be used to signify " "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" +"Lors de l'utilisation d':term:`annotations de types`, il est " +"souvent utile de *paramètrer* un :term:`type générique ` en se " +"servant de la notation crochets de Python. Par exemple, l'annotation " +"``list[int]`` peut être utilisée pour signifier une :class:`liste ` " +"dans laquelle tous les éléments sont de type :class:`entiers `." #: reference/datamodel.rst:2208 #, fuzzy @@ -3947,33 +3959,43 @@ msgstr ":pep:`343` — L'instruction ``with``" #: reference/datamodel.rst:2208 msgid "Introducing Python's framework for type annotations" -msgstr "" +msgstr "Introduction à l'annotation de types en Python (document en anglais)" #: reference/datamodel.rst:2211 msgid ":ref:`Generic Alias Types`" -msgstr "" +msgstr ":ref:`Types alias génériques `" #: reference/datamodel.rst:2211 msgid "Documentation for objects representing parameterized generic classes" msgstr "" +"Documentation pour les objets qui représentent des classes génériques " +"paramétrées" #: reference/datamodel.rst:2214 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" +":ref:`Generics`, :ref:`Types génériques définis par l'utilisateur ` et classe :class:`typing.Generic (classe de base " +"abstraite pour les types génériques) `" #: reference/datamodel.rst:2214 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" +"Documentation sur la manière d'implémenter des classes génériques qui " +"peuvent être paramétrées à l'exécution et comprises par les vérificateurs " +"statiques de types." #: reference/datamodel.rst:2217 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" +"*Généralement*, une classe ne peut être paramétrée que si elle définit une " +"méthode spéciale de classe ``__class_getitem__()``." #: reference/datamodel.rst:2222 msgid "" @@ -3989,10 +4011,13 @@ msgid "" "method. As such, there is no need for it to be decorated with :func:" "`@classmethod` when it is defined." msgstr "" +"Lorsqu'elle est définie dans une classe, ``__class_getitem__()`` est " +"automatiquement une méthode de classe. Ainsi, il est superflu de la décorer " +"avec :func:`@classmethod` lors de sa définition." #: reference/datamodel.rst:2231 msgid "The purpose of *__class_getitem__*" -msgstr "" +msgstr "Intention de *__class_getitem__*" #: reference/datamodel.rst:2233 msgid "" @@ -4000,6 +4025,10 @@ msgid "" "parameterization of standard-library generic classes in order to more easily " "apply :term:`type hints` to these classes." msgstr "" +"Le but de :meth:`~object.__class_getitem__` est de permettre la " +"paramétrisation à l'exécution des classes génériques de la bibliothèque " +"standard de façon à pouvoir appliquer plus facilement des :term:`annotations " +"de type ` à ces classes." #: reference/datamodel.rst:2237 msgid "" @@ -4009,6 +4038,11 @@ msgid "" "__class_getitem__`, or inherit from :class:`typing.Generic`, which has its " "own implementation of ``__class_getitem__()``." msgstr "" +"Pour implémenter des classes génériques particularisées pouvant être " +"paramétrées à l'exécution, et comprises par les vérificateurs statiques de " +"type, vous pouvez soit hériter d'une classe de la bibliothèque standard qui " +"implémente déjà :meth:`~object.__class_getitem__`, ou hériter de :class:" +"`typing.Generic`, qui a sa propre implémentation de ``__class_getitem__()``." #: reference/datamodel.rst:2243 msgid "" @@ -4017,10 +4051,15 @@ msgid "" "type-checkers such as mypy. Using ``__class_getitem__()`` on any class for " "purposes other than type hinting is discouraged." msgstr "" +"Les implémentations particularisées de :meth:`~object.__class_getitem__` sur " +"des classes définies ailleurs que la bibliothèque standard peuvent ne pas " +"être comprises par des vérificateurs de types tiers tels que *mypy*. " +"L'utilisation de ``__class_getitem__()`` pour tout autre objectif que " +"l'annotation de type n'est pas conseillée." #: reference/datamodel.rst:2253 msgid "*__class_getitem__* versus *__getitem__*" -msgstr "" +msgstr "*__class_getitem__* contre *__getitem__*" #: reference/datamodel.rst:2255 msgid "" @@ -4031,6 +4070,13 @@ msgid "" "instead. ``__class_getitem__()`` should return a :ref:`GenericAlias` object if it is properly defined." msgstr "" +"D'habitude, l':ref:`indiçage ` d'un objet en utilisant des " +"crochets appelle la méthode :meth:`~object.__getitem__` de l'instance, " +"définie dans la classe de l'objet. Cependant, si l'objet dont on cherche un " +"indice est lui-même une classe, la méthode de classe :meth:`~object." +"__class_getitem__` peut être appelée à la place. ``__class_getitem__()`` " +"doit renvoyer un objet :ref:`GenericAlias` si elle est " +"correctement définie." #: reference/datamodel.rst:2262 msgid "" @@ -4038,6 +4084,9 @@ msgid "" "follows something like the following process to decide whether :meth:" "`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" msgstr "" +"Lorsqu'on lui présente l':term:`expression` ``obj[x]``, l'interpréteur " +"Python suit une sorte de processus suivant pour décider s'il faut appeler :" +"meth:`~object.__getitem__` ou :meth:`~object.__class_getitem__` ::" #: reference/datamodel.rst:2290 msgid "" @@ -4048,6 +4097,12 @@ msgid "" "``dict[str, float]`` and ``tuple[str, bytes]`` all result in :meth:`~object." "__class_getitem__` being called::" msgstr "" +"En Python, toutes les classes sont des instances d'autres classes. La classe " +"d'une classe est appelée la :term:`métaclasse ` de la classe et " +"la plupart des classes ont la classe :class:`type` comme métaclasse. :class:" +"`type` ne définit pas :meth:`~object.__getitem__`, ce qui veut dire que des " +"expressions telles que ``list[int]``, ``dict[str, float]`` et ``tuple[str, " +"bytes]`` aboutissent toutes à l'appel de :meth:`~object.__class_getitem__` ::" #: reference/datamodel.rst:2309 msgid "" @@ -4055,6 +4110,10 @@ msgid "" "__getitem__`, subscribing the class may result in different behaviour. An " "example of this can be found in the :mod:`enum` module::" msgstr "" +"Cependant, si une classe a une métaclasse particularisée qui définit :meth:" +"`~object.__getitem__`, l'indiçage de la classe peut conduire à un " +"comportement différent. Un exemple peut être trouvé dans le module :mod:" +"`enum` ::" #: reference/datamodel.rst:2334 #, fuzzy @@ -4068,6 +4127,9 @@ msgid "" "`subscription` results in ``__class_getitem__()`` being " "called instead of :meth:`~object.__getitem__`" msgstr "" +"Introduction de :meth:`~object.__class_getitem__`, et présentation des cas " +"où un :ref:`indiçage` conduit à l'appel de " +"``__class_getitem__()`` au lieu de :meth:`~object.__getitem__`" #: reference/datamodel.rst:2341 msgid "Emulating callable objects" @@ -4253,6 +4315,10 @@ msgid "" "meth:`~object.__class_getitem__` may be called instead of ``__getitem__()``. " "See :ref:`classgetitem-versus-getitem` for more details." msgstr "" +"quand on vous :ref:`spécifiez un indice ` pour une *classe*, " +"la méthode de classe spéciale :meth:`~object.__class_getitem__` peut être " +"appelée au lieu de ``__getitem__()``. Reportez-vous à :ref:`classgetitem-" +"versus-getitem` pour plus de détails." #: reference/datamodel.rst:2465 msgid "" @@ -4548,6 +4614,8 @@ msgid "" "The built-in function :func:`int` falls back to :meth:`__trunc__` if " "neither :meth:`__int__` nor :meth:`__index__` is defined." msgstr "" +"La fonction native :func:`int` se replie sur :meth:`__trunc__` dans le cas " +"où ni :meth:`__int__` ni :meth:`__index__` ne sont définies." #: reference/datamodel.rst:2699 msgid "With Statement Context Managers" diff --git a/reference/executionmodel.po b/reference/executionmodel.po index 02181a43..3a965213 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -79,33 +79,35 @@ msgstr "" #: reference/executionmodel.rst:59 msgid "The following constructs bind names:" -msgstr "" +msgstr "Les noms sont liés *via* les constructions suivantes :" #: reference/executionmodel.rst:61 msgid "formal parameters to functions," -msgstr "" +msgstr "paramètres formels de fonctions," #: reference/executionmodel.rst:62 msgid "class definitions," -msgstr "" +msgstr "définitions de classes," #: reference/executionmodel.rst:63 msgid "function definitions," -msgstr "" +msgstr "définitions de fonctions," #: reference/executionmodel.rst:64 msgid "assignment expressions," -msgstr "" +msgstr "expressions d'affectation," #: reference/executionmodel.rst:65 msgid "" ":ref:`targets ` that are identifiers if occurring in an " "assignment:" msgstr "" +":ref:`cibles ` qui sont des identifiants, lorsque c'est une " +"affectation :" #: reference/executionmodel.rst:68 msgid ":keyword:`for` loop header," -msgstr "" +msgstr "de l'entête d'une boucle :keyword:`for`," #: reference/executionmodel.rst:69 msgid "" @@ -115,11 +117,11 @@ msgstr "" #: reference/executionmodel.rst:71 msgid "in a capture pattern in structural pattern matching" -msgstr "" +msgstr "dans un champ de recherche d'un filtrage par motifs" #: reference/executionmodel.rst:73 msgid ":keyword:`import` statements." -msgstr "" +msgstr "des instructions :keyword:`import`." #: reference/executionmodel.rst:75 msgid "" @@ -127,6 +129,10 @@ msgid "" "names defined in the imported module, except those beginning with an " "underscore. This form may only be used at the module level." msgstr "" +"L'instruction :keyword:`!import` sous la forme ``from ... import *`` lie " +"tous les noms définis dans le module importé, sauf ceux qui commencent par " +"le caractère souligné. Cette écriture ne peut être utilisée qu'au niveau du " +"module." #: reference/executionmodel.rst:79 msgid "" diff --git a/reference/expressions.po b/reference/expressions.po index 5f081dc4..1271e7e7 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -920,6 +920,8 @@ msgid "" "In typical use, this is called with a single exception instance similar to " "the way the :keyword:`raise` keyword is used." msgstr "" +"Dans son utilisation typique, elle est appelée avec une seule instance " +"d'exception, de façon similaire à l'utilisation du mot-clé :keyword:`raise`." #: reference/expressions.rst:571 msgid "" @@ -1047,6 +1049,16 @@ msgid "" "the async generator by calling :meth:`~agen.aclose` method to finalize the " "generator and ultimately detach it from the event loop." msgstr "" +"Si un générateur asynchrone se termine précipitamment en raison d'un :" +"keyword:`break`, de l'annulation de la tâche de l'appelant ou d'une " +"exception, le code de nettoyage du générateur asynchrone est exécuté et lève " +"possiblement des exceptions, accède à des variables de contexte dans un " +"contexte inattendu — peut-être parce que la tâche de laquelle il dépend est " +"finie, ou pendant la fermeture de la boucle d'événements quand le point " +"d'entrée du ramasse-miettes a déjà été appelé. Afin d'éviter cette " +"situation, l'appelant doit explicitement fermer le générateur asynchrone en " +"appelant la méthode :meth:`~agen.aclose` pour « finaliser » le générateur et " +"le détacher de la boucle d'événements." #: reference/expressions.rst:669 msgid "" @@ -1277,12 +1289,18 @@ msgid "" "term:`generic class ` will generally return a :ref:" "`GenericAlias ` object." msgstr "" +"L'indiçage d'une instance de :ref:`classe containeur ` " +"sélectionne généralement un élément du conteneur. L'indiçage d'une :term:" +"`classe générique ` renvoie généralement un objet :ref:" +"`GenericAlias `." #: reference/expressions.rst:834 msgid "" "When an object is subscripted, the interpreter will evaluate the primary and " "the expression list." msgstr "" +"Lorsqu'on accède à l'indice d'un objet, l'interpréteur évalue la primaire et " +"la liste d'expressions." #: reference/expressions.rst:837 msgid "" @@ -1293,6 +1311,13 @@ msgid "" "one of these methods. For more details on when ``__class_getitem__`` is " "called instead of ``__getitem__``, see :ref:`classgetitem-versus-getitem`." msgstr "" +"L'évaluation de la primaire doit produire un objet qui gère l'indiçage. Un " +"objet est susceptible de gérer l'indiçage s'il définit la ou les deux " +"méthodes :meth:`~object.__getitem__` et :meth:`~object.__class_getitem__`. " +"Quand on spécifie un indice du primaire, le résultat de l'évaluation de la " +"liste d'expression est passé à l'une de ces méthodes. Pour plus de détails " +"sur le choix de ``__class_getitem__`` ou ``__getitem__`` pour l'appel, " +"lisez :ref:`classgetitem-versus-getitem`." #: reference/expressions.rst:844 msgid "" @@ -1300,6 +1325,10 @@ msgid "" "class:`tuple` containing the items of the expression list. Otherwise, the " "expression list will evaluate to the value of the list's sole member." msgstr "" +"Si la liste d'expressions contient au moins une virgule, elle est considérée " +"comme un :class:`n-uplet ` contenant les éléments de la liste " +"d'expressions. Sinon, la liste d'expressions est évaluée à la valeur du seul " +"membre de la liste." #: reference/expressions.rst:848 #, fuzzy diff --git a/reference/import.po b/reference/import.po index f5dbb0a1..7d3cabc8 100644 --- a/reference/import.po +++ b/reference/import.po @@ -650,6 +650,8 @@ msgid "" "Use of :meth:`~importlib.abc.MetaPathFinder.find_module` by the import " "system now raises :exc:`ImportWarning`." msgstr "" +"l'utilisation de :meth:`~importlib.abc.MetaPathFinder.find_module` par le " +"système d'importation lève maintenant un :exc:`ImportWarning`." #: reference/import.rst:338 msgid "Loading" @@ -904,7 +906,7 @@ msgstr "" #: reference/import.rst:477 msgid "Use of ``load_module()`` will raise :exc:`ImportWarning`." -msgstr "" +msgstr "l'utilisation de ``load_module()`` lève un :exc:`ImportWarning`." #: reference/import.rst:481 msgid "Submodules" @@ -1314,6 +1316,10 @@ msgid "" "``__file__``. Use of :meth:`~importlib.abc.Loader.module_repr` is slated to " "stop in Python 3.12." msgstr "" +"l'appel à :meth:`~importlib.abc.Loader.module_repr` a maintenant lieu après " +"avoir essayé d'utiliser l'attribut ``__spec__`` du module mais avant de se " +"rabattre vers ``__file__``. L'utilisation de :meth:`~importlib.abc.Loader." +"module_repr` est prévue d'être arrêtée dans Python 3.12." #: reference/import.rst:693 msgid "Cached bytecode invalidation" diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 639b2b17..f401cb86 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -587,6 +587,12 @@ msgid "" "statement, but this distinction is done at the parser level, not when " "tokenizing." msgstr "" +"Certains identifiants ne sont réservés que dans des contextes particuliers. " +"Ils sont appelés *mots-clés ad hoc*. Les identifiants ``match``, ``case`` et " +"``_`` peuvent être interprétés en tant que mots-clés dans le contexte " +"d'instructions de filtrage par motifs, mais cette distinction est effectuée " +"au niveau de l'analyseur syntaxique (*parser* en anglais), pas lors de " +"l'analyse lexicale (*tokenization* en anglais)." #: reference/lexical_analysis.rst:369 msgid "" @@ -594,6 +600,9 @@ msgid "" "preserving compatibility with existing code that uses ``match``, ``case`` " "and ``_`` as identifier names." msgstr "" +"En tant que mots-clés ad hoc, leur utilisation dans le filtrage par motifs " +"est possible tout en conservant la compatibilité avec du code existant qui " +"utilise ``match``, ``case`` et ``_`` comme identifiants." #: reference/lexical_analysis.rst:380 msgid "Reserved classes of identifiers" @@ -615,11 +624,11 @@ msgstr "``_*``" #: reference/lexical_analysis.rst:387 msgid "Not imported by ``from module import *``." -msgstr "" +msgstr "N'est pas importé par ``from module import *``." #: reference/lexical_analysis.rst:408 msgid "``_``" -msgstr "" +msgstr "``_``" #: reference/lexical_analysis.rst:390 msgid "" @@ -627,6 +636,9 @@ msgid "" "`soft keyword ` that denotes a :ref:`wildcard `." msgstr "" +"Dans un motif ``case`` d'une instruction :keyword:`match`, ``_`` est un :ref:" +"`mot-clé ad hoc ` qui décrit un motif :ref:`attrape-tout " +"`." #: reference/lexical_analysis.rst:394 msgid "" @@ -634,12 +646,18 @@ msgid "" "evaluation available in the variable ``_``. (It is stored in the :mod:" "`builtins` module, alongside built-in functions like ``print``.)" msgstr "" +"De son côté, l'interpréteur interactif place le résultat de la dernière " +"évaluation dans la variable ``-`` (son emplacement se situe dans le module :" +"mod:`builtins`, avec les fonctions natives telles que ``print``)." #: reference/lexical_analysis.rst:399 msgid "" "Elsewhere, ``_`` is a regular identifier. It is often used to name " "\"special\" items, but it is not special to Python itself." msgstr "" +"Ailleurs, ``_`` est un identifiant comme un autre. Il est souvent utilisé " +"pour désigner des éléments « spéciaux », mais il n'est pas spécial pour " +"Python en tant que tel." #: reference/lexical_analysis.rst:404 msgid "" @@ -654,6 +672,8 @@ msgstr "" #: reference/lexical_analysis.rst:408 msgid "It is also commonly used for unused variables." msgstr "" +"Il est aussi communément utilisé pour signifier que la variable n'est pas " +"utilisée." #: reference/lexical_analysis.rst:416 msgid "``__*__``" @@ -861,7 +881,7 @@ msgstr "barre oblique inversée et retour à la ligne ignorés" #: reference/lexical_analysis.rst:555 msgid "\\(1)" -msgstr "" +msgstr "\\(1)" #: reference/lexical_analysis.rst:557 msgid "``\\\\``" @@ -1007,7 +1027,7 @@ msgstr "caractère dont le code est *xxxxxxxx* en hexadécimal sur 32 bits" #: reference/lexical_analysis.rst:594 msgid "\\(7)" -msgstr "" +msgstr "\\(7)" #: reference/lexical_analysis.rst:598 msgid "Notes:" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index ea54b89b..00ec0ab5 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -136,7 +136,7 @@ msgstr "" #: reference/simple_stmts.rst:127 msgid "Else:" -msgstr "" +msgstr "Sinon :" #: reference/simple_stmts.rst:129 msgid "" diff --git a/tutorial/errors.po b/tutorial/errors.po index 5895d012..9c2e4922 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -376,12 +376,18 @@ msgid "" "will have the exception being handled attached to it and included in the " "error message::" msgstr "" +"Si une exception non gérée se produit à l'intérieur d'une section :keyword:" +"`except`, l'exception en cours de traitement est jointe à l'exception non " +"gérée et incluse dans le message d'erreur ::" #: tutorial/errors.rst:297 msgid "" "To indicate that an exception is a direct consequence of another, the :" "keyword:`raise` statement allows an optional :keyword:`from` clause::" msgstr "" +"Pour indiquer qu'une exception est la conséquence directe d'une autre, " +"l'instruction :keyword:`raise` autorise une clause facultative :keyword:" +"`from` ::" #: tutorial/errors.rst:303 msgid "This can be useful when you are transforming exceptions. For example::" @@ -393,6 +399,8 @@ msgid "" "It also allows disabling automatic exception chaining using the ``from " "None`` idiom::" msgstr "" +"Cela permet également de désactiver le chaînage automatique des exceptions à " +"l'aide de l'idiome ``from None`` ::" #: tutorial/errors.rst:336 msgid "" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index 6585b9bf..91276e57 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -192,6 +192,9 @@ msgid "" "expression, an equal sign, then the representation of the evaluated " "expression:" msgstr "" +"Le spécificateur ``=`` peut être utilisé pour développer une expression en " +"« texte de l'expression, un signe égal, puis la représentation de " +"l'expression évaluée » :" #: tutorial/inputoutput.rst:145 #, fuzzy diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index 0e520636..905a7817 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -88,6 +88,9 @@ msgid "" "https://www.python.org: The major Python web site. It contains code, " "documentation, and pointers to Python-related pages around the web." msgstr "" +"https://www.python.org : le site principal pour Python. Il contient du code, " +"de la documentation, des liens vers d'autres sites traitant de Python " +"partout sur Internet." #: tutorial/whatnow.rst:36 msgid "https://docs.python.org: Fast access to Python's documentation." diff --git a/using/configure.po b/using/configure.po index 45f0cd66..632cbf60 100644 --- a/using/configure.po +++ b/using/configure.po @@ -16,47 +16,57 @@ msgstr "" #: using/configure.rst:3 msgid "Configure Python" -msgstr "" +msgstr "Configurer Python" #: using/configure.rst:8 msgid "Configure Options" -msgstr "" +msgstr "Options de configuration" #: using/configure.rst:10 msgid "List all ``./configure`` script options using::" msgstr "" +"Il est possible d'obtenir toutes les options de ``./configure`` avec ::" #: using/configure.rst:14 msgid "" "See also the :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution." msgstr "" +"Voir aussi le fichier :file:`Misc/SpecialBuilds.txt` dans la distribution " +"des sources Python." #: using/configure.rst:17 msgid "General Options" -msgstr "" +msgstr "Options générales" #: using/configure.rst:21 msgid "" "Support loadable extensions in the :mod:`_sqlite` extension module (default " "is no)." msgstr "" +"Active la prise en charge des extensions chargeables dans le module " +"d'extension :mod:`_sqlite` (désactivé par défaut)." #: using/configure.rst:24 msgid "" "See the :meth:`sqlite3.Connection.enable_load_extension` method of the :mod:" "`sqlite3` module." msgstr "" +"Voir la méthode :meth:`sqlite3.Connection.enable_load_extension` du module :" +"mod:`sqlite3`." #: using/configure.rst:31 msgid "" "Disable IPv6 support (enabled by default if supported), see the :mod:" "`socket` module." msgstr "" +"Désactive la prise en charge d'IPv6 (activé par défaut si géré), voir le " +"module :mod:`socket`." #: using/configure.rst:36 msgid "Define the size in bits of Python :class:`int` digits: 15 or 30 bits." msgstr "" +"Définit la taille en bits des chiffres Python :class:`int` : 15 ou 30 bits." #: using/configure.rst:38 msgid "" @@ -66,21 +76,24 @@ msgstr "" #: using/configure.rst:41 msgid "Define the ``PYLONG_BITS_IN_DIGIT`` to ``15`` or ``30``." -msgstr "" +msgstr "Définit ``PYLONG_BITS_IN_DIGIT`` à ``15`` ou ``30``." #: using/configure.rst:43 msgid "See :data:`sys.int_info.bits_per_digit `." -msgstr "" +msgstr "Voir :data:`sys.int_info.bits_per_digit `." #: using/configure.rst:48 msgid "" "Compile the Python ``main()`` function and link Python executable with C++ " "compiler: ``$CXX``, or *COMPILER* if specified." msgstr "" +"Utilise le compilateur C++ (``$CXX``, ou *COMPILER* si spécifié) pour " +"compiler la fonction Python ``main()`` et l'édition des liens de " +"l'exécutable Python." #: using/configure.rst:53 msgid "Set the Python executable suffix to *SUFFIX*." -msgstr "" +msgstr "Définit à *SUFFIX* le suffixe de l'exécutable Python." #: using/configure.rst:55 msgid "" @@ -94,77 +107,93 @@ msgid "" "the :ref:`Compile-time configuration ` of " "the :mod:`zoneinfo` module." msgstr "" +"Définit le chemin par défaut de recherche des fuseaux horaires pour :data:" +"`zoneinfo.TZPATH`. Voir la :ref:`Configuration à la compilation " +"` du module :mod:`zoneinfo`." #: using/configure.rst:64 msgid "" "Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/" "etc/zoneinfo``." msgstr "" +"Par défaut : ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/" +"zoneinfo:/etc/zoneinfo``." #: using/configure.rst:66 msgid "See :data:`os.pathsep` path separator." -msgstr "" +msgstr "Voir le séparateur de chemins :data:`os.pathsep`." #: using/configure.rst:72 msgid "" "Build the ``_decimal`` extension module using a thread-local context rather " "than a coroutine-local context (default), see the :mod:`decimal` module." msgstr "" +"Compile le module d'extension ``_decimal`` en utilisant un contexte local au " +"fil d'exécution plutôt qu'un contexte local de coroutine (défaut). Voir le " +"module :mod:`decimal`." #: using/configure.rst:75 msgid "See :data:`decimal.HAVE_CONTEXTVAR` and the :mod:`contextvars` module." -msgstr "" +msgstr "Voir :data:`decimal.HAVE_CONTEXTVAR` et le module :mod:`contextvars`." #: using/configure.rst:81 msgid "Override order to check db backends for the :mod:`dbm` module" msgstr "" +"Change l'ordre de détection des implémentations de base de données pour le " +"module :mod:`dbm`." #: using/configure.rst:83 msgid "" "A valid value is a colon (``:``) separated string with the backend names:" msgstr "" +"Une valeur valide est une chaîne de noms d'implémentations séparés par des " +"deux-points (``:``)." #: using/configure.rst:85 msgid "``ndbm``;" -msgstr "" +msgstr "``ndbm`` ;" #: using/configure.rst:86 msgid "``gdbm``;" -msgstr "" +msgstr "``gdbm`` ;" #: using/configure.rst:87 msgid "``bdb``." -msgstr "" +msgstr "``bdb``." #: using/configure.rst:91 msgid "Disable C locale coercion to a UTF-8 based locale (enabled by default)." msgstr "" +"Désactive le forçage des paramètres régionaux C pour un paramètre régional " +"basé sur UTF-8 (activé par défaut)." #: using/configure.rst:93 msgid "Don't define the ``PY_COERCE_C_LOCALE`` macro." -msgstr "" +msgstr "Ne pas définir la macro ``PY_COERCE_C_LOCALE``." #: using/configure.rst:95 msgid "See :envvar:`PYTHONCOERCECLOCALE` and the :pep:`538`." -msgstr "" +msgstr "Voir :envvar:`PYTHONCOERCECLOCALE` et la :pep:`538`." #: using/configure.rst:99 msgid "Python library directory name (default is ``lib``)." -msgstr "" +msgstr "Nom du dossier de bibliothèques Python (par défaut : ``lib``)." #: using/configure.rst:101 msgid "Fedora and SuSE use ``lib64`` on 64-bit platforms." -msgstr "" +msgstr "Fedora et SuSE utilisent ``lib64`` sur les systèmes 64-bit." #: using/configure.rst:103 msgid "See :data:`sys.platlibdir`." -msgstr "" +msgstr "Voir :data:`sys.platlibdir`." #: using/configure.rst:109 msgid "" "Directory of wheel packages used by the :mod:`ensurepip` module (none by " "default)." msgstr "" +"Dossier de paquets *wheel* utilisé par le module :mod:`ensurepip` (par " +"défaut : aucun)." #: using/configure.rst:112 msgid "" @@ -173,56 +202,75 @@ msgid "" "share/python-wheels/`` directory and don't install the :mod:`ensurepip." "_bundled` package." msgstr "" +"La politique de paquets de certaines distributions Linux déconseille " +"l'inclusion des dépendances. Par exemple, Fedora installe les paquets " +"*wheel* dans le répertoire ``/usr/share/python-wheels/`` et n'installe pas " +"le paquet :mod:`ensurepip._bundled`." #: using/configure.rst:121 msgid "Install Options" -msgstr "" +msgstr "Options d'installation" #: using/configure.rst:125 msgid "" "Don't build nor install test modules, like the :mod:`test` package or the :" "mod:`_testcapi` extension module (built and installed by default)." msgstr "" +"Désactive la compilation et l'installation des modules de test, comme le " +"paquet :mod:`test` et le module d'extension :mod:`_testcapi` (compilés et " +"installés par défaut)." #: using/configure.rst:132 msgid "Select the :mod:`ensurepip` command run on Python installation:" msgstr "" +"Sélectionne la commande :mod:`ensurepip` exécutée à l'installation de " +"Python :" #: using/configure.rst:134 msgid "" "``upgrade`` (default): run ``python -m ensurepip --altinstall --upgrade`` " "command." msgstr "" +"``upgrade`` (défaut) : exécute la commande ``python -m ensurepip --" +"altinstall --upgrade`` ;" #: using/configure.rst:136 msgid "``install``: run ``python -m ensurepip --altinstall`` command;" msgstr "" +"``install`` : exécute la commande ``python -m ensurepip --altinstall`` ;" #: using/configure.rst:137 msgid "``no``: don't run ensurepip;" -msgstr "" +msgstr "``no`` : n'exécute pas *ensurepip*." #: using/configure.rst:143 msgid "Performance options" -msgstr "" +msgstr "Options de performance" #: using/configure.rst:145 msgid "" "Configuring Python using ``--enable-optimizations --with-lto`` (PGO + LTO) " "is recommended for best performance." msgstr "" +"Pour de meilleures performances, il est recommandé de configurer Python avec " +"``--enable-optimizations --with-lto`` (*PGO* + *LTO*)." #: using/configure.rst:150 msgid "" "Enable Profile Guided Optimization (PGO) using :envvar:`PROFILE_TASK` " "(disabled by default)." msgstr "" +"Active l'optimisation guidée par profilage (*Profile Guided Optimization*, " +"PGO) en utilisant :envvar:`PROFILE_TASK` (désactivé par défaut)." #: using/configure.rst:153 msgid "" "The C compiler Clang requires ``llvm-profdata`` program for PGO. On macOS, " "GCC also requires it: GCC is just an alias to Clang on macOS." msgstr "" +"L'utilisation de PGO avec le compilateur C Clang nécessite ``llvm-" +"profdata``. Sur macOS, GCC est juste un alias vers Clang et partage donc " +"cette contrainte." #: using/configure.rst:156 msgid "" @@ -230,100 +278,120 @@ msgid "" "GCC is used: add ``-fno-semantic-interposition`` to the compiler and linker " "flags." msgstr "" +"Désactive également l'interposition sémantique dans *libpython* si GCC est " +"utilisé avec ``--enable-shared`` : ajoute l'option ``-fno-semantic-" +"interposition`` à la compilation et à l'édition des liens." #: using/configure.rst:162 msgid "Use ``-fno-semantic-interposition`` on GCC." -msgstr "" +msgstr "Utilisation de ``-fno-semantic-interposition`` avec GCC." #: using/configure.rst:167 msgid "" "Environment variable used in the Makefile: Python command line arguments for " "the PGO generation task." msgstr "" +"Variable d'environnement utilisée dans le ``Makefile`` : arguments Python " +"utilisés pour la tâche de préparation de la PGO." #: using/configure.rst:170 msgid "Default: ``-m test --pgo --timeout=$(TESTTIMEOUT)``." -msgstr "" +msgstr "Par défaut : ``-m test --pgo --timeout=$(TESTTIMEOUT)``." #: using/configure.rst:176 msgid "Enable Link Time Optimization (LTO) in any build (disabled by default)." msgstr "" +"Active l'optimisation à l'édition des liens (*Link Time Optimization*, LTO) " +"à la compilation (désactivé par défaut)." #: using/configure.rst:178 msgid "" "The C compiler Clang requires ``llvm-ar`` for LTO (``ar`` on macOS), as well " "as an LTO-aware linker (``ld.gold`` or ``lld``)." msgstr "" +"Le compilateur C Clang nécessite ``llvm-ar`` pour la LTO (``ar`` sur macOS), " +"ainsi qu'un éditeur de liens implémentant la LTO (``ld.gold`` ou ``lld``)." #: using/configure.rst:185 msgid "" "Enable computed gotos in evaluation loop (enabled by default on supported " "compilers)." msgstr "" +"Autorise les *gotos* calculés dans les boucles (activé par défaut pour les " +"compilateurs qui le gèrent)." #: using/configure.rst:190 msgid "" "Disable the specialized Python memory allocator :ref:`pymalloc ` " "(enabled by default)." msgstr "" +"Désactive l'allocateur spécialisé de mémoire de Python :ref:`pymalloc " +"` (activé par défaut)." #: using/configure.rst:193 msgid "See also :envvar:`PYTHONMALLOC` environment variable." -msgstr "" +msgstr "Voir aussi la variable d'environnement :envvar:`PYTHONMALLOC`." #: using/configure.rst:197 msgid "" "Disable static documentation strings to reduce the memory footprint (enabled " "by default). Documentation strings defined in Python are not affected." msgstr "" +"Désactive les chaînes de documentation statiques pour réduire l'empreinte " +"mémoire (activé par défaut). Les chaînes définies dans Python ne sont pas " +"affectées." #: using/configure.rst:200 msgid "Don't define the ``WITH_DOC_STRINGS`` macro." -msgstr "" +msgstr "Ne définit pas la macro ``WITH_DOC_STRINGS``." #: using/configure.rst:202 msgid "See the ``PyDoc_STRVAR()`` macro." -msgstr "" +msgstr "Voir la macro ``PyDoc_STRVAR()``." #: using/configure.rst:206 msgid "Enable C-level code profiling with ``gprof`` (disabled by default)." -msgstr "" +msgstr "Active le profilage du code C avec ``gprof`` (désactivé par défaut)." #: using/configure.rst:212 msgid "Python Debug Build" -msgstr "" +msgstr "Compilation de Python en mode débogage" #: using/configure.rst:214 msgid "" "A debug build is Python built with the :option:`--with-pydebug` configure " "option." msgstr "" +"Une compilation de Python en mode débogage se fait avec l'option de " +"configuration :option:`--with-pydebug`." #: using/configure.rst:217 msgid "Effects of a debug build:" -msgstr "" +msgstr "Effets du mode débogage :" #: using/configure.rst:219 msgid "" "Display all warnings by default: the list of default warning filters is " "empty in the :mod:`warnings` module." msgstr "" +"Affichage de tous les avertissements par défaut : le filtre par défaut des " +"avertissements est vide dans le module :mod:`warnings`." #: using/configure.rst:221 msgid "Add ``d`` to :data:`sys.abiflags`." -msgstr "" +msgstr "Ajout de ``d`` à :data:`sys.abiflags`." #: using/configure.rst:222 msgid "Add :func:`sys.gettotalrefcount` function." -msgstr "" +msgstr "Ajout de la fonction :func:`sys.gettotalrefcount`." #: using/configure.rst:223 msgid "Add :option:`-X showrefcount <-X>` command line option." -msgstr "" +msgstr "Ajout de l'option de ligne de commande :option:`-X showrefcount <-X>`." #: using/configure.rst:224 msgid "Add :envvar:`PYTHONTHREADDEBUG` environment variable." -msgstr "" +msgstr "Ajout de la variable d'environnement :envvar:`PYTHONTHREADDEBUG`." #: using/configure.rst:225 msgid "" @@ -336,10 +404,13 @@ msgid "" "Install :ref:`debug hooks on memory allocators ` " "to detect buffer overflow and other memory errors." msgstr "" +"Installation des :ref:`debug hooks on memory allocators ` pour détecter les débordements de mémoire tampon et autres " +"erreurs de mémoire." #: using/configure.rst:229 msgid "Define ``Py_DEBUG`` and ``Py_REF_DEBUG`` macros." -msgstr "" +msgstr "Définition des macros ``Py_DEBUG`` et ``Py_REF_DEBUG``." #: using/configure.rst:230 msgid "" @@ -351,37 +422,48 @@ msgstr "" #: using/configure.rst:235 msgid "Add sanity checks on the function arguments." -msgstr "" +msgstr "Ajout des contrôles d'intégrité sur les arguments de fonction." #: using/configure.rst:236 msgid "" "Unicode and int objects are created with their memory filled with a pattern " "to detect usage of uninitialized objects." msgstr "" +"Les objets ``unicode`` et ``int`` sont créés avec un motif particulier à " +"l'initialisation de leur mémoire afin de détecter l'usage d'objets non " +"initialisés." #: using/configure.rst:238 msgid "" "Ensure that functions which can clear or replace the current exception are " "not called with an exception raised." msgstr "" +"S'assurer que les fonctions qui peuvent effacer ou remplacer l'exception " +"courante ne sont pas appelées avec une exception levée." #: using/configure.rst:240 msgid "" "The garbage collector (:func:`gc.collect` function) runs some basic checks " "on objects consistency." msgstr "" +"Le ramasse-miettes (la fonction :func:`gc.collect`) effectue quelques tests " +"basiques relatifs à la cohérence des objets." #: using/configure.rst:242 msgid "" "The :c:macro:`Py_SAFE_DOWNCAST()` macro checks for integer underflow and " "overflow when downcasting from wide types to narrow types." msgstr "" +"La macro :c:macro:`Py_SAFE_DOWNCAST()` vérifie s'il y a des débordements " +"d'entier lors du passage de types grands vers des types plus petits." #: using/configure.rst:245 msgid "" "See also the :ref:`Python Development Mode ` and the :option:`--" "with-trace-refs` configure option." msgstr "" +"Voir aussi le :ref:`mode de développement Python ` et l'option de " +"configuration :option:`--with-trace-refs`." #: using/configure.rst:248 msgid "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 7f8d0159..753f48f0 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -485,7 +485,8 @@ msgstr "La syntaxe générique du filtrage par motifs est ::" # Lexique pour cette section: # "pattern": "motif du filtre" # "match": "comparaison" action de tester si il y a un match -# "match": "bloc ``match``" ou "instruction ``match`` pour l'élément syntaxique +# "match": "bloc ``match``" ou "instruction ``match`` pour l'élément +# syntaxique # "match": "appariement" comparaison réussie # "wildcard": "attrape-tout" # "guard": "garde" @@ -1837,6 +1838,8 @@ msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" +"Applique la coloration syntaxique aux fichiers ``.pyi`` (contribution " +"d'*Alex Waygood* et de *Terry Jan Reedy* dans :issue:`45447`)." #: whatsnew/3.10.rst:1178 msgid "" diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 5c912138..33e1daba 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -1632,7 +1632,7 @@ msgstr "(Contribution par Victor Stinner)" #: whatsnew/3.2.rst:1539 msgid "shutil" -msgstr "" +msgstr "``shutils``" #: whatsnew/3.2.rst:1541 msgid "The :func:`shutil.copytree` function has two new options:" @@ -2267,7 +2267,7 @@ msgstr "(Contribution par Tarek Ziadé; :issue:`6693`.)" #: whatsnew/3.2.rst:2044 msgid "sysconfig" -msgstr "" +msgstr "``sysconfig``" #: whatsnew/3.2.rst:2046 msgid "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index f63cc434..0774da93 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -2472,7 +2472,7 @@ msgstr "" #: whatsnew/3.3.rst:1734 msgid "re" -msgstr "" +msgstr "``re``" #: whatsnew/3.3.rst:1736 msgid "" @@ -2548,7 +2548,7 @@ msgstr "" #: whatsnew/3.3.rst:1786 msgid "shutil" -msgstr "" +msgstr "``shutils``" #: whatsnew/3.3.rst:1788 msgid "New functions:" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 4e323e38..591af165 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -1553,7 +1553,7 @@ msgstr "" #: whatsnew/3.4.rst:1158 msgid "operator" -msgstr "" +msgstr "``operator``" #: whatsnew/3.4.rst:1160 msgid "" @@ -1756,7 +1756,7 @@ msgstr "" #: whatsnew/3.4.rst:1301 msgid "re" -msgstr "" +msgstr "``re``" #: whatsnew/3.4.rst:1303 msgid "" @@ -1836,7 +1836,7 @@ msgstr "" #: whatsnew/3.4.rst:1360 msgid "shutil" -msgstr "" +msgstr "``shutils``" #: whatsnew/3.4.rst:1362 msgid "" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index 769cb37f..46343ae1 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -1070,7 +1070,7 @@ msgstr "" #: whatsnew/3.5.rst:893 msgid "code" -msgstr "" +msgstr "code" #: whatsnew/3.5.rst:895 msgid "" @@ -1770,7 +1770,7 @@ msgstr "" #: whatsnew/3.5.rst:1468 msgid "operator" -msgstr "" +msgstr "``operator``" #: whatsnew/3.5.rst:1470 msgid "" @@ -1921,7 +1921,7 @@ msgstr "" #: whatsnew/3.5.rst:1584 msgid "re" -msgstr "" +msgstr "``re``" #: whatsnew/3.5.rst:1586 msgid "" @@ -1981,7 +1981,7 @@ msgstr "" #: whatsnew/3.5.rst:1639 msgid "shutil" -msgstr "" +msgstr "``shutils``" #: whatsnew/3.5.rst:1641 msgid "" @@ -2305,7 +2305,7 @@ msgstr "" #: whatsnew/3.5.rst:1880 msgid "sysconfig" -msgstr "" +msgstr "``sysconfig``" #: whatsnew/3.5.rst:1882 msgid "" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 17905d14..ed36e24d 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -1707,7 +1707,7 @@ msgstr "" #: whatsnew/3.6.rst:2025 msgid "re" -msgstr "" +msgstr "``re``" #: whatsnew/3.6.rst:1347 msgid "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index fc9f9d9b..23028fbc 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -1731,7 +1731,7 @@ msgstr "" #: whatsnew/3.7.rst:1237 msgid "re" -msgstr "" +msgstr "``re``" #: whatsnew/3.7.rst:1239 msgid "" @@ -2702,7 +2702,7 @@ msgstr "" #: whatsnew/3.7.rst:1890 msgid "Other CPython Implementation Changes" -msgstr "" +msgstr "Autres changements à l'implémentation de CPython" #: whatsnew/3.7.rst:1892 msgid "" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 9b45e770..71131a8e 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -1448,7 +1448,7 @@ msgstr "" #: whatsnew/3.8.rst:1152 msgid "shutil" -msgstr "" +msgstr "``shutils``" #: whatsnew/3.8.rst:1154 msgid "" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 33f52a72..d4ab26dc 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -977,6 +977,8 @@ msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" +"Applique la coloration syntaxique aux fichiers ``.pyi`` (contribution " +"d'*Alex Waygood* et de *Terry Jan Reedy* dans :issue:`45447`)." #: whatsnew/3.9.rst:507 msgid "imaplib" @@ -998,7 +1000,8 @@ msgstr "" "et :class:`~imaplib.IMAP4_stream` appliquent ce changement (contribution de " "*Dong-hee Na* dans :issue:`38615`)." -# "Return" n'est pas un renvoi de fonction, c'est un retour à un état précédent. +# "Return" n'est pas un renvoi de fonction, c'est un retour à un état +# précédent. #: whatsnew/3.9.rst:516 msgid "" ":meth:`imaplib.IMAP4.unselect` is added. :meth:`imaplib.IMAP4.unselect` "