Merge from 3.8 rst files.

This commit is contained in:
Julien Palard 2019-09-04 11:35:23 +02:00
commit fd9b2ebdc5

File diff suppressed because it is too large Load diff

View file

@ -4,266 +4,272 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-10 11:27+0200\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2019-07-19 23:34+0200\n"
"Last-Translator: Andy Kwok <andy.kwok.work@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Andy Kwok <andy.kwok.work@gmail.com>\n"
"X-Generator: Poedit 2.2.3\n"
#: ../Doc/howto/cporting.rst:7
msgid "Porting Extension Modules to Python 3"
msgstr "Portage des modules d'extension vers Python 3"
#: ../Doc/howto/cporting.rst:0
msgid "author"
msgstr "auteur"
#: ../Doc/howto/cporting.rst:9
msgid "Benjamin Peterson"
msgstr "Benjamin Peterson"
#: ../Doc/howto/cporting.rst:None
msgid "Abstract"
msgstr "Résumé"
#: ../Doc/howto/cporting.rst:14
msgid ""
"Although changing the C-API was not one of Python 3's objectives, the many "
"Python-level changes made leaving Python 2's API intact impossible. In "
"fact, some changes such as :func:`int` and :func:`long` unification are more "
"obvious on the C level. This document endeavors to document "
"incompatibilities and how they can be worked around."
"We recommend the following resources for porting extension modules to Python "
"3:"
msgstr ""
"Changer l'API C n'était pas l'un des objectifs de Python 3, cependant les "
"nombreux changements au niveau Python ont rendu impossible de garder l'API "
"de Python 2 comme elle était. Certains changements tels que l'unification "
"de :func:`int` et :func:`long` sont plus apparents au niveau C. Ce document "
"s'efforce de documenter les incompatibilités et la façon dont elles peuvent "
"être contournées."
#: ../Doc/howto/cporting.rst:23
msgid "Conditional compilation"
msgstr "Compilation conditionnelle"
#: ../Doc/howto/cporting.rst:25
#: ../Doc/howto/cporting.rst:11
msgid ""
"The easiest way to compile only some code for Python 3 is to check if :c:"
"macro:`PY_MAJOR_VERSION` is greater than or equal to 3. ::"
"The `Migrating C extensions`_ chapter from *Supporting Python 3: An in-depth "
"guide*, a book on moving from Python 2 to Python 3 in general, guides the "
"reader through porting an extension module."
msgstr ""
"La façon la plus simple de compiler seulement une section de code pour "
"Python 3 est de vérifier si :c:macro:`PY_MAJOR_VERSION` est supérieur ou "
"égal à 3. ::"
#: ../Doc/howto/cporting.rst:32
#: ../Doc/howto/cporting.rst:15
msgid ""
"API functions that are not present can be aliased to their equivalents "
"within conditional blocks."
"The `Porting guide`_ from the *py3c* project provides opinionated "
"suggestions with supporting code."
msgstr ""
"Les fonctions manquantes dans l'API peuvent être remplacées par des alias à "
"leurs équivalents dans des blocs conditionnels."
#: ../Doc/howto/cporting.rst:37
msgid "Changes to Object APIs"
msgstr "Modifications apportées aux API des objets"
#: ../Doc/howto/cporting.rst:39
#: ../Doc/howto/cporting.rst:17
msgid ""
"Python 3 merged together some types with similar functions while cleanly "
"separating others."
"The `Cython`_ and `CFFI`_ libraries offer abstractions over Python's C API. "
"Extensions generally need to be re-written to use one of them, but the "
"library then handles differences between various Python versions and "
"implementations."
msgstr ""
"Python 3 a fusionné certains types avec des fonctions identiques tout en "
"séparant de façon propre, d'autres."
#: ../Doc/howto/cporting.rst:44
msgid "str/unicode Unification"
msgstr "Unification de *str* et *unicode*"
#~ msgid "author"
#~ msgstr "auteur"
#: ../Doc/howto/cporting.rst:46
msgid ""
"Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; the "
"C functions are called ``PyUnicode_*`` for both. The old 8-bit string type "
"has become :func:`bytes`, with C functions called ``PyBytes_*``. Python 2.6 "
"and later provide a compatibility header, :file:`bytesobject.h`, mapping "
"``PyBytes`` names to ``PyString`` ones. For best compatibility with Python "
"3, :c:type:`PyUnicode` should be used for textual data and :c:type:`PyBytes` "
"for binary data. It's also important to remember that :c:type:`PyBytes` "
"and :c:type:`PyUnicode` in Python 3 are not interchangeable like :c:type:"
"`PyString` and :c:type:`PyUnicode` are in Python 2. The following example "
"shows best practices with regards to :c:type:`PyUnicode`, :c:type:"
"`PyString`, and :c:type:`PyBytes`. ::"
msgstr ""
"Le type :func:`str` de Python 3 est l'équivalent de :func:`unicode` sous "
"Python 2 ; Les fonctions C sont appelées ``PyUnicode_*`` pour les deux "
"versions. L'ancien type de chaîne de caractères de 8 bits est devenue :func:"
"`bytes`, avec des fonctions C nommées ``PyBytes_*``. Python 2.6 et toutes "
"les versions supérieures fournissent un en-tête de compatibilité, :file:"
"`bytesobject.h`, faisant correspondre les noms ``PyBytes`` aux ``PyString``. "
"Pour une meilleure compatibilité avec Python 3, :c:type:`PyUnicode` doit "
"être utilisé seulement pour des données textuelles et :c:type:`PyBytes` pour "
"des données binaires. Il est important de noter que :c:type:`PyBytes` et :c:"
"type:`PyUnicode` en Python 3 ne sont pas remplaçables contrairement à :c:"
"type:`PyString` et :c:type:`PyUnicode` dans Python 2. L'exemple suivant "
"montre l'utilisation optimale de :c:type:`PyUnicode`, :c:type:`PyString`, "
"et :c:type:`PyBytes`. ::"
#~ msgid "Benjamin Peterson"
#~ msgstr "Benjamin Peterson"
#: ../Doc/howto/cporting.rst:95
msgid "long/int Unification"
msgstr "Unification de *long* et *int*"
#~ msgid "Abstract"
#~ msgstr "Résumé"
#: ../Doc/howto/cporting.rst:97
msgid ""
"Python 3 has only one integer type, :func:`int`. But it actually "
"corresponds to Python 2's :func:`long` type—the :func:`int` type used in "
"Python 2 was removed. In the C-API, ``PyInt_*`` functions are replaced by "
"their ``PyLong_*`` equivalents."
msgstr ""
"Python 3 n'a qu'un type d'entier, :func:`int`. Mais il correspond au type :"
"func:`long` de Python 2 — le type :func:`int` utilisé dans Python 2 a été "
"supprimé. Dans l'API C, les fonctions ``PyInt_*`` sont remplacées par leurs "
"équivalents ``PyLong_*``."
#~ msgid ""
#~ "Although changing the C-API was not one of Python 3's objectives, the "
#~ "many Python-level changes made leaving Python 2's API intact impossible. "
#~ "In fact, some changes such as :func:`int` and :func:`long` unification "
#~ "are more obvious on the C level. This document endeavors to document "
#~ "incompatibilities and how they can be worked around."
#~ msgstr ""
#~ "Changer l'API C n'était pas l'un des objectifs de Python 3, cependant les "
#~ "nombreux changements au niveau Python ont rendu impossible de garder "
#~ "l'API de Python 2 comme elle était. Certains changements tels que "
#~ "l'unification de :func:`int` et :func:`long` sont plus apparents au "
#~ "niveau C. Ce document s'efforce de documenter les incompatibilités et la "
#~ "façon dont elles peuvent être contournées."
#: ../Doc/howto/cporting.rst:104
msgid "Module initialization and state"
msgstr "Initialisation et état du module"
#~ msgid "Conditional compilation"
#~ msgstr "Compilation conditionnelle"
#: ../Doc/howto/cporting.rst:106
msgid ""
"Python 3 has a revamped extension module initialization system. (See :pep:"
"`3121`.) Instead of storing module state in globals, they should be stored "
"in an interpreter specific structure. Creating modules that act correctly "
"in both Python 2 and Python 3 is tricky. The following simple example "
"demonstrates how. ::"
msgstr ""
"Python 3 a remanié son système d'initialisation des modules d'extension "
"(Voir :pep:`3121`.). Au lieu de stocker les états de module dans les "
"variables globales, les états doivent être stockés dans une structure "
"spécifique à l'interpréteur. Créer des modules qui ont un fonctionnement "
"correct en Python 2 et Python 3 est délicat. L'exemple suivant montre "
"comment. ::"
#~ msgid ""
#~ "The easiest way to compile only some code for Python 3 is to check if :c:"
#~ "macro:`PY_MAJOR_VERSION` is greater than or equal to 3. ::"
#~ msgstr ""
#~ "La façon la plus simple de compiler seulement une section de code pour "
#~ "Python 3 est de vérifier si :c:macro:`PY_MAJOR_VERSION` est supérieur ou "
#~ "égal à 3. ::"
#: ../Doc/howto/cporting.rst:197
msgid "CObject replaced with Capsule"
msgstr "CObject remplacé par Capsule"
#~ msgid ""
#~ "API functions that are not present can be aliased to their equivalents "
#~ "within conditional blocks."
#~ msgstr ""
#~ "Les fonctions manquantes dans l'API peuvent être remplacées par des alias "
#~ "à leurs équivalents dans des blocs conditionnels."
#: ../Doc/howto/cporting.rst:199
msgid ""
"The :c:type:`Capsule` object was introduced in Python 3.1 and 2.7 to "
"replace :c:type:`CObject`. CObjects were useful, but the :c:type:`CObject` "
"API was problematic: it didn't permit distinguishing between valid CObjects, "
"which allowed mismatched CObjects to crash the interpreter, and some of its "
"APIs relied on undefined behavior in C. (For further reading on the "
"rationale behind Capsules, please see :issue:`5630`.)"
msgstr ""
"L'objet :c:type:`Capsule` a été introduit dans Python 3.1 et 2.7 pour "
"remplacer :c:type:`CObject`. Le type :c:type:`CObject` était utile, mais son "
"API posait des soucis : elle ne permettait pas la distinction entre les "
"objets C valides, ce qui permettait aux objets C assortis incorrectement de "
"planter l'interpréteur, et certaines des API s'appuyaient sur un "
"comportement indéfini en C. (Pour plus de détails sur la logique de "
"Capsules, veuillez consulter :issue:`5630`)."
#~ msgid "Changes to Object APIs"
#~ msgstr "Modifications apportées aux API des objets"
#: ../Doc/howto/cporting.rst:206
msgid ""
"If you're currently using CObjects, and you want to migrate to 3.1 or newer, "
"you'll need to switch to Capsules. :c:type:`CObject` was deprecated in 3.1 "
"and 2.7 and completely removed in Python 3.2. If you only support 2.7, or "
"3.1 and above, you can simply switch to :c:type:`Capsule`. If you need to "
"support Python 3.0, or versions of Python earlier than 2.7, you'll have to "
"support both CObjects and Capsules. (Note that Python 3.0 is no longer "
"supported, and it is not recommended for production use.)"
msgstr ""
"Si vous utilisez actuellement CObjects et que vous voulez migrer vers la "
"version 3.1 ou plus récente, vous devrez passer à Capsules. :c:type:"
"`CObject` est déprécié dans 3.1 et 2.7 et est supprimé dans Python 3.2. Si "
"vous ne gérez que les versions 2.7, ou 3.1 et supérieures, vous pouvez "
"simplement passer à :c:type:`Capsule`. Si vous avez besoin de gérer Python "
"3.0, ou des versions de Python antérieures à 2.7, vous devez gérer CObjects "
"et Capsules. (Notez que Python 3.0 n'est plus maintenu, et qu'il n'est pas "
"recommandé pour une utilisation en production)."
#~ msgid ""
#~ "Python 3 merged together some types with similar functions while cleanly "
#~ "separating others."
#~ msgstr ""
#~ "Python 3 a fusionné certains types avec des fonctions identiques tout en "
#~ "séparant de façon propre, d'autres."
#: ../Doc/howto/cporting.rst:216
msgid ""
"The following example header file :file:`capsulethunk.h` may solve the "
"problem for you. Simply write your code against the :c:type:`Capsule` API "
"and include this header file after :file:`Python.h`. Your code will "
"automatically use Capsules in versions of Python with Capsules, and switch "
"to CObjects when Capsules are unavailable."
msgstr ""
"L'exemple suivant d'en-tête de fichier :file:`capsulethunk.h` peut résoudre "
"le problème. Il suffit d'écrire votre code dans l'API :c:type:`Capsule` et "
"d'inclure ce fichier d'en-tête après :file:`Python.h`. Votre code utilisera "
"automatiquement Capsules dans les versions de Python avec Capsules, et "
"passera à CObjects lorsque les Capsules ne sont pas disponibles."
#~ msgid "str/unicode Unification"
#~ msgstr "Unification de *str* et *unicode*"
#: ../Doc/howto/cporting.rst:223
msgid ""
":file:`capsulethunk.h` simulates Capsules using CObjects. However, :c:type:"
"`CObject` provides no place to store the capsule's \"name\". As a result "
"the simulated :c:type:`Capsule` objects created by :file:`capsulethunk.h` "
"behave slightly differently from real Capsules. Specifically:"
msgstr ""
":file:`capsulethunk.h` reproduit le fonctionnement de Capsules en utilisant "
"CObjects. Cependant, :c:type:`CObject` ne permet pas de stocker le \"nom\" "
"de la capsule. Les objets simulés :c:type:`Capsule` créés par :file:"
"`capsulethunk.h` se comportent légèrement différemment des véritables "
"Capsules. Ainsi :"
#~ msgid ""
#~ "Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; "
#~ "the C functions are called ``PyUnicode_*`` for both. The old 8-bit "
#~ "string type has become :func:`bytes`, with C functions called "
#~ "``PyBytes_*``. Python 2.6 and later provide a compatibility header, :"
#~ "file:`bytesobject.h`, mapping ``PyBytes`` names to ``PyString`` ones. "
#~ "For best compatibility with Python 3, :c:type:`PyUnicode` should be used "
#~ "for textual data and :c:type:`PyBytes` for binary data. It's also "
#~ "important to remember that :c:type:`PyBytes` and :c:type:`PyUnicode` in "
#~ "Python 3 are not interchangeable like :c:type:`PyString` and :c:type:"
#~ "`PyUnicode` are in Python 2. The following example shows best practices "
#~ "with regards to :c:type:`PyUnicode`, :c:type:`PyString`, and :c:type:"
#~ "`PyBytes`. ::"
#~ msgstr ""
#~ "Le type :func:`str` de Python 3 est l'équivalent de :func:`unicode` sous "
#~ "Python 2 ; Les fonctions C sont appelées ``PyUnicode_*`` pour les deux "
#~ "versions. L'ancien type de chaîne de caractères de 8 bits est devenue :"
#~ "func:`bytes`, avec des fonctions C nommées ``PyBytes_*``. Python 2.6 et "
#~ "toutes les versions supérieures fournissent un en-tête de compatibilité, :"
#~ "file:`bytesobject.h`, faisant correspondre les noms ``PyBytes`` aux "
#~ "``PyString``. Pour une meilleure compatibilité avec Python 3, :c:type:"
#~ "`PyUnicode` doit être utilisé seulement pour des données textuelles et :c:"
#~ "type:`PyBytes` pour des données binaires. Il est important de noter que :"
#~ "c:type:`PyBytes` et :c:type:`PyUnicode` en Python 3 ne sont pas "
#~ "remplaçables contrairement à :c:type:`PyString` et :c:type:`PyUnicode` "
#~ "dans Python 2. L'exemple suivant montre l'utilisation optimale de :c:type:"
#~ "`PyUnicode`, :c:type:`PyString`, et :c:type:`PyBytes`. ::"
#: ../Doc/howto/cporting.rst:228
msgid "The name parameter passed in to :c:func:`PyCapsule_New` is ignored."
msgstr "Le paramètre *name* passé à :c:func:`PyCapsule_New` est ignoré."
#~ msgid "long/int Unification"
#~ msgstr "Unification de *long* et *int*"
#: ../Doc/howto/cporting.rst:230
msgid ""
"The name parameter passed in to :c:func:`PyCapsule_IsValid` and :c:func:"
"`PyCapsule_GetPointer` is ignored, and no error checking of the name is "
"performed."
msgstr ""
"Le paramètre *name* passé à :c:func:`PyCapsule_IsValid` et :c:func:"
"`PyCapsule_GetPointer` est ignoré et il n'y a pas de vérification d'erreur "
"du nom."
#~ msgid ""
#~ "Python 3 has only one integer type, :func:`int`. But it actually "
#~ "corresponds to Python 2's :func:`long` type—the :func:`int` type used in "
#~ "Python 2 was removed. In the C-API, ``PyInt_*`` functions are replaced "
#~ "by their ``PyLong_*`` equivalents."
#~ msgstr ""
#~ "Python 3 n'a qu'un type d'entier, :func:`int`. Mais il correspond au "
#~ "type :func:`long` de Python 2 — le type :func:`int` utilisé dans Python 2 "
#~ "a été supprimé. Dans l'API C, les fonctions ``PyInt_*`` sont remplacées "
#~ "par leurs équivalents ``PyLong_*``."
#: ../Doc/howto/cporting.rst:234
msgid ":c:func:`PyCapsule_GetName` always returns NULL."
msgstr ":c:func:`PyCapsule_GetName` renvoie toujours un NULL."
#~ msgid "Module initialization and state"
#~ msgstr "Initialisation et état du module"
#: ../Doc/howto/cporting.rst:236
msgid ""
":c:func:`PyCapsule_SetName` always raises an exception and returns failure. "
"(Since there's no way to store a name in a CObject, noisy failure of :c:func:"
"`PyCapsule_SetName` was deemed preferable to silent failure here. If this "
"is inconvenient, feel free to modify your local copy as you see fit.)"
msgstr ""
":c:func:`PyCapsule_SetName` lève toujours une exception et renvoie un échec. "
"Note : Puisqu'il n'y a aucun moyen de stocker un nom dans un CObject, "
"l'échec verbeux de :c:func:`PyCapsule_SetName` a été jugé préférable à un "
"échec non-verbeux dans ce cas. Si cela ne vous convenait pas, vous pouvez "
"modifier votre copie locale selon vos besoins."
#~ msgid ""
#~ "Python 3 has a revamped extension module initialization system. (See :"
#~ "pep:`3121`.) Instead of storing module state in globals, they should be "
#~ "stored in an interpreter specific structure. Creating modules that act "
#~ "correctly in both Python 2 and Python 3 is tricky. The following simple "
#~ "example demonstrates how. ::"
#~ msgstr ""
#~ "Python 3 a remanié son système d'initialisation des modules d'extension "
#~ "(Voir :pep:`3121`.). Au lieu de stocker les états de module dans les "
#~ "variables globales, les états doivent être stockés dans une structure "
#~ "spécifique à l'interpréteur. Créer des modules qui ont un fonctionnement "
#~ "correct en Python 2 et Python 3 est délicat. L'exemple suivant montre "
#~ "comment. ::"
#: ../Doc/howto/cporting.rst:243
msgid ""
"You can find :file:`capsulethunk.h` in the Python source distribution as :"
"source:`Doc/includes/capsulethunk.h`. We also include it here for your "
"convenience:"
msgstr ""
"Vous pouvez trouver :file:`capsulethunk.h` dans la distribution source de "
"Python comme :source:`Doc/includes/capsulethunk.h`. Nous l'incluons ici pour "
"votre confort :"
#~ msgid "CObject replaced with Capsule"
#~ msgstr "CObject remplacé par Capsule"
#: ../Doc/howto/cporting.rst:252
msgid "Other options"
msgstr "Autres options"
#~ msgid ""
#~ "The :c:type:`Capsule` object was introduced in Python 3.1 and 2.7 to "
#~ "replace :c:type:`CObject`. CObjects were useful, but the :c:type:"
#~ "`CObject` API was problematic: it didn't permit distinguishing between "
#~ "valid CObjects, which allowed mismatched CObjects to crash the "
#~ "interpreter, and some of its APIs relied on undefined behavior in C. (For "
#~ "further reading on the rationale behind Capsules, please see :issue:"
#~ "`5630`.)"
#~ msgstr ""
#~ "L'objet :c:type:`Capsule` a été introduit dans Python 3.1 et 2.7 pour "
#~ "remplacer :c:type:`CObject`. Le type :c:type:`CObject` était utile, mais "
#~ "son API posait des soucis : elle ne permettait pas la distinction entre "
#~ "les objets C valides, ce qui permettait aux objets C assortis "
#~ "incorrectement de planter l'interpréteur, et certaines des API "
#~ "s'appuyaient sur un comportement indéfini en C. (Pour plus de détails sur "
#~ "la logique de Capsules, veuillez consulter :issue:`5630`)."
#: ../Doc/howto/cporting.rst:254
msgid ""
"If you are writing a new extension module, you might consider `Cython "
"<http://cython.org/>`_. It translates a Python-like language to C. The "
"extension modules it creates are compatible with Python 3 and Python 2."
msgstr ""
"Si vous écrivez un nouveau module d'extension, vous pouvez envisager "
"d'utiliser `Cython <http://cython.org/>`_. Il traduit un langage de type "
"Python en C. Les modules d'extension qu'il crée sont compatibles avec Python "
"3 et Python 2."
#~ msgid ""
#~ "If you're currently using CObjects, and you want to migrate to 3.1 or "
#~ "newer, you'll need to switch to Capsules. :c:type:`CObject` was "
#~ "deprecated in 3.1 and 2.7 and completely removed in Python 3.2. If you "
#~ "only support 2.7, or 3.1 and above, you can simply switch to :c:type:"
#~ "`Capsule`. If you need to support Python 3.0, or versions of Python "
#~ "earlier than 2.7, you'll have to support both CObjects and Capsules. "
#~ "(Note that Python 3.0 is no longer supported, and it is not recommended "
#~ "for production use.)"
#~ msgstr ""
#~ "Si vous utilisez actuellement CObjects et que vous voulez migrer vers la "
#~ "version 3.1 ou plus récente, vous devrez passer à Capsules. :c:type:"
#~ "`CObject` est déprécié dans 3.1 et 2.7 et est supprimé dans Python 3.2. "
#~ "Si vous ne gérez que les versions 2.7, ou 3.1 et supérieures, vous pouvez "
#~ "simplement passer à :c:type:`Capsule`. Si vous avez besoin de gérer "
#~ "Python 3.0, ou des versions de Python antérieures à 2.7, vous devez gérer "
#~ "CObjects et Capsules. (Notez que Python 3.0 n'est plus maintenu, et qu'il "
#~ "n'est pas recommandé pour une utilisation en production)."
#~ msgid ""
#~ "The following example header file :file:`capsulethunk.h` may solve the "
#~ "problem for you. Simply write your code against the :c:type:`Capsule` "
#~ "API and include this header file after :file:`Python.h`. Your code will "
#~ "automatically use Capsules in versions of Python with Capsules, and "
#~ "switch to CObjects when Capsules are unavailable."
#~ msgstr ""
#~ "L'exemple suivant d'en-tête de fichier :file:`capsulethunk.h` peut "
#~ "résoudre le problème. Il suffit d'écrire votre code dans l'API :c:type:"
#~ "`Capsule` et d'inclure ce fichier d'en-tête après :file:`Python.h`. Votre "
#~ "code utilisera automatiquement Capsules dans les versions de Python avec "
#~ "Capsules, et passera à CObjects lorsque les Capsules ne sont pas "
#~ "disponibles."
#~ msgid ""
#~ ":file:`capsulethunk.h` simulates Capsules using CObjects. However, :c:"
#~ "type:`CObject` provides no place to store the capsule's \"name\". As a "
#~ "result the simulated :c:type:`Capsule` objects created by :file:"
#~ "`capsulethunk.h` behave slightly differently from real Capsules. "
#~ "Specifically:"
#~ msgstr ""
#~ ":file:`capsulethunk.h` reproduit le fonctionnement de Capsules en "
#~ "utilisant CObjects. Cependant, :c:type:`CObject` ne permet pas de stocker "
#~ "le \"nom\" de la capsule. Les objets simulés :c:type:`Capsule` créés par :"
#~ "file:`capsulethunk.h` se comportent légèrement différemment des "
#~ "véritables Capsules. Ainsi :"
#~ msgid "The name parameter passed in to :c:func:`PyCapsule_New` is ignored."
#~ msgstr "Le paramètre *name* passé à :c:func:`PyCapsule_New` est ignoré."
#~ msgid ""
#~ "The name parameter passed in to :c:func:`PyCapsule_IsValid` and :c:func:"
#~ "`PyCapsule_GetPointer` is ignored, and no error checking of the name is "
#~ "performed."
#~ msgstr ""
#~ "Le paramètre *name* passé à :c:func:`PyCapsule_IsValid` et :c:func:"
#~ "`PyCapsule_GetPointer` est ignoré et il n'y a pas de vérification "
#~ "d'erreur du nom."
#~ msgid ":c:func:`PyCapsule_GetName` always returns NULL."
#~ msgstr ":c:func:`PyCapsule_GetName` renvoie toujours un NULL."
#~ msgid ""
#~ ":c:func:`PyCapsule_SetName` always raises an exception and returns "
#~ "failure. (Since there's no way to store a name in a CObject, noisy "
#~ "failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent "
#~ "failure here. If this is inconvenient, feel free to modify your local "
#~ "copy as you see fit.)"
#~ msgstr ""
#~ ":c:func:`PyCapsule_SetName` lève toujours une exception et renvoie un "
#~ "échec. Note : Puisqu'il n'y a aucun moyen de stocker un nom dans un "
#~ "CObject, l'échec verbeux de :c:func:`PyCapsule_SetName` a été jugé "
#~ "préférable à un échec non-verbeux dans ce cas. Si cela ne vous convenait "
#~ "pas, vous pouvez modifier votre copie locale selon vos besoins."
#~ msgid ""
#~ "You can find :file:`capsulethunk.h` in the Python source distribution as :"
#~ "source:`Doc/includes/capsulethunk.h`. We also include it here for your "
#~ "convenience:"
#~ msgstr ""
#~ "Vous pouvez trouver :file:`capsulethunk.h` dans la distribution source de "
#~ "Python comme :source:`Doc/includes/capsulethunk.h`. Nous l'incluons ici "
#~ "pour votre confort :"
#~ msgid "Other options"
#~ msgstr "Autres options"
#~ msgid ""
#~ "If you are writing a new extension module, you might consider `Cython "
#~ "<http://cython.org/>`_. It translates a Python-like language to C. The "
#~ "extension modules it creates are compatible with Python 3 and Python 2."
#~ msgstr ""
#~ "Si vous écrivez un nouveau module d'extension, vous pouvez envisager "
#~ "d'utiliser `Cython <http://cython.org/>`_. Il traduit un langage de type "
#~ "Python en C. Les modules d'extension qu'il crée sont compatibles avec "
#~ "Python 3 et Python 2."

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-12 18:59+0200\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2019-06-20 19:13+0200\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -150,11 +150,12 @@ msgstr ""
"comportement par défaut lorsqu'il est recherché comme un attribut."
#: ../Doc/howto/descriptor.rst:61
#, fuzzy
msgid ""
"If an object defines both :meth:`__get__` and :meth:`__set__`, it is "
"considered a data descriptor. Descriptors that only define :meth:`__get__` "
"are called non-data descriptors (they are typically used for methods but "
"other uses are possible)."
"If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered "
"a data descriptor. Descriptors that only define :meth:`__get__` are called "
"non-data descriptors (they are typically used for methods but other uses are "
"possible)."
msgstr ""
"Si un objet définit à la fois :meth:`__get__` et :meth:`__set__`, il est "
"considéré comme un descripteur de données. Les descripteurs qui ne "
@ -288,13 +289,15 @@ msgstr ""
"d'instance."
#: ../Doc/howto/descriptor.rst:119
#, fuzzy
msgid ""
"The object returned by ``super()`` also has a custom :meth:"
"`__getattribute__` method for invoking descriptors. The call ``super(B, "
"obj).m()`` searches ``obj.__class__.__mro__`` for the base class ``A`` "
"immediately following ``B`` and then returns ``A.__dict__['m'].__get__(obj, "
"B)``. If not a descriptor, ``m`` is returned unchanged. If not in the "
"dictionary, ``m`` reverts to a search using :meth:`object.__getattribute__`."
"`__getattribute__` method for invoking descriptors. The attribute lookup "
"``super(B, obj).m`` searches ``obj.__class__.__mro__`` for the base class "
"``A`` immediately following ``B`` and then returns ``A.__dict__['m']."
"__get__(obj, B)``. If not a descriptor, ``m`` is returned unchanged. If "
"not in the dictionary, ``m`` reverts to a search using :meth:`object."
"__getattribute__`."
msgstr ""
"L'objet retourné par ``super()`` a aussi une méthode personnalisée :meth:"
"`__getattribute__` pour appeler les descripteurs. L'appel ``super(B, obj)."

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-15 21:52+0200\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -269,34 +269,41 @@ msgid ""
"the module name, ``arg1`` indicates if module was successfully loaded."
msgstr ""
#: ../Doc/howto/instrumentation.rst:336
#: ../Doc/howto/instrumentation.rst:337
msgid ""
"Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is "
"the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a "
"tuple object."
msgstr ""
#: ../Doc/howto/instrumentation.rst:345
msgid "SystemTap Tapsets"
msgstr ""
#: ../Doc/howto/instrumentation.rst:338
#: ../Doc/howto/instrumentation.rst:347
msgid ""
"The higher-level way to use the SystemTap integration is to use a \"tapset"
"\": SystemTap's equivalent of a library, which hides some of the lower-level "
"details of the static markers."
msgstr ""
#: ../Doc/howto/instrumentation.rst:342
#: ../Doc/howto/instrumentation.rst:351
msgid "Here is a tapset file, based on a non-shared build of CPython:"
msgstr ""
#: ../Doc/howto/instrumentation.rst:365
#: ../Doc/howto/instrumentation.rst:374
msgid ""
"If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/"
"systemtap/tapset``), then these additional probepoints become available:"
msgstr ""
#: ../Doc/howto/instrumentation.rst:371
#: ../Doc/howto/instrumentation.rst:380
msgid ""
"This probe point indicates that execution of a Python function has begun. It "
"is only triggered for pure-Python (bytecode) functions."
msgstr ""
#: ../Doc/howto/instrumentation.rst:376
#: ../Doc/howto/instrumentation.rst:385
msgid ""
"This probe point is the converse of :c:func:`python.function.return`, and "
"indicates that execution of a Python function has ended (either via "
@ -304,18 +311,18 @@ msgid ""
"(bytecode) functions."
msgstr ""
#: ../Doc/howto/instrumentation.rst:383
#: ../Doc/howto/instrumentation.rst:392
msgid "Examples"
msgstr "Exemples"
#: ../Doc/howto/instrumentation.rst:384
#: ../Doc/howto/instrumentation.rst:393
msgid ""
"This SystemTap script uses the tapset above to more cleanly implement the "
"example given above of tracing the Python function-call hierarchy, without "
"needing to directly name the static markers:"
msgstr ""
#: ../Doc/howto/instrumentation.rst:403
#: ../Doc/howto/instrumentation.rst:412
msgid ""
"The following script uses the tapset above to provide a top-like view of all "
"running CPython code, showing the top 20 most frequently-entered bytecode "

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-11 12:59+0100\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2019-03-26 22:48+0100\n"
"Last-Translator: Nabil Bendafi <nabil@bendafi.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -871,12 +871,12 @@ msgstr ""
"documentation :mod:`re` pour la liste complète."
#: ../Doc/howto/regex.rst:360 ../Doc/howto/regex.rst:418
#: ../Doc/howto/regex.rst:1057
#: ../Doc/howto/regex.rst:1064
msgid "Method/Attribute"
msgstr "Méthode/Attribut"
#: ../Doc/howto/regex.rst:360 ../Doc/howto/regex.rst:418
#: ../Doc/howto/regex.rst:1057
#: ../Doc/howto/regex.rst:1064
msgid "Purpose"
msgstr "Objectif"
@ -1910,6 +1910,12 @@ msgstr ""
#: ../Doc/howto/regex.rst:945
msgid ""
"Additionally, you can retrieve named groups as a dictionary with :meth:`~re."
"Match.groupdict`::"
msgstr ""
#: ../Doc/howto/regex.rst:952
msgid ""
"Named groups are handy because they let you use easily-remembered names, "
"instead of having to remember numbers. Here's an example RE from the :mod:"
"`imaplib` module::"
@ -1917,7 +1923,7 @@ msgstr ""
"Les groupes nommés sont pratiques car il est plus facile de se rappeler un "
"nom qu'un numéro. Voici un exemple de RE tirée du module :mod:`imaplib` ::"
#: ../Doc/howto/regex.rst:956
#: ../Doc/howto/regex.rst:963
msgid ""
"It's obviously much easier to retrieve ``m.group('zonem')``, instead of "
"having to remember to retrieve group 9."
@ -1925,7 +1931,7 @@ msgstr ""
"Il est évidemment plus facile de récupérer ``m.group('zonem')`` que de se "
"rappeler de récupérer le groupe 9."
#: ../Doc/howto/regex.rst:959
#: ../Doc/howto/regex.rst:966
msgid ""
"The syntax for backreferences in an expression such as ``(...)\\1`` refers "
"to the number of the group. There's naturally a variant that uses the group "
@ -1943,11 +1949,11 @@ msgstr ""
"mots doublés, ``\\b(\\w+)\\s+\\1\\b`` peut ainsi être ré-écrite en ``\\b(?"
"P<mot>\\w+)\\s+(?P=mot)\\b`` ::"
#: ../Doc/howto/regex.rst:972
#: ../Doc/howto/regex.rst:979
msgid "Lookahead Assertions"
msgstr "Assertions prédictives"
#: ../Doc/howto/regex.rst:974
#: ../Doc/howto/regex.rst:981
msgid ""
"Another zero-width assertion is the lookahead assertion. Lookahead "
"assertions are available in both positive and negative form, and look like "
@ -1957,11 +1963,11 @@ msgstr ""
"assertion prédictive peut s'exprimer sous deux formes, la positive et la "
"négative, comme ceci :"
#: ../Doc/howto/regex.rst:982
#: ../Doc/howto/regex.rst:989
msgid "``(?=...)``"
msgstr "``(?=...)``"
#: ../Doc/howto/regex.rst:978
#: ../Doc/howto/regex.rst:985
msgid ""
"Positive lookahead assertion. This succeeds if the contained regular "
"expression, represented here by ``...``, successfully matches at the current "
@ -1976,11 +1982,11 @@ msgstr ""
"n'avance pas ; le reste du motif est testé à l'endroit même où l'assertion a "
"commencé."
#: ../Doc/howto/regex.rst:987
#: ../Doc/howto/regex.rst:994
msgid "``(?!...)``"
msgstr "``(?!...)``"
#: ../Doc/howto/regex.rst:985
#: ../Doc/howto/regex.rst:992
msgid ""
"Negative lookahead assertion. This is the opposite of the positive "
"assertion; it succeeds if the contained expression *doesn't* match at the "
@ -1990,7 +1996,7 @@ msgstr ""
"elle réussit si l'expression régulière contenue *ne* correspond *pas* à "
"l'emplacement courant dans la chaine."
#: ../Doc/howto/regex.rst:989
#: ../Doc/howto/regex.rst:996
msgid ""
"To make this concrete, let's look at a case where a lookahead is useful. "
"Consider a simple pattern to match a filename and split it apart into a base "
@ -2003,15 +2009,15 @@ msgstr ""
"exemple, dans ``news.rc``, ``news`` est le nom de base et ``rc`` est "
"l'extension du nom de fichier."
#: ../Doc/howto/regex.rst:994
#: ../Doc/howto/regex.rst:1001
msgid "The pattern to match this is quite simple:"
msgstr "Le motif de correspondance est plutôt simple :"
#: ../Doc/howto/regex.rst:996
#: ../Doc/howto/regex.rst:1003
msgid "``.*[.].*$``"
msgstr "``.*[.].*$``"
#: ../Doc/howto/regex.rst:998
#: ../Doc/howto/regex.rst:1005
msgid ""
"Notice that the ``.`` needs to be treated specially because it's a "
"metacharacter, so it's inside a character class to only match that specific "
@ -2027,7 +2033,7 @@ msgstr ""
"bien inclus dans l'extension. Cette expression régulière fait correspondre "
"``truc.bar``, ``autoexec.bat``, ``sendmail.cf`` et ``printers.conf``."
#: ../Doc/howto/regex.rst:1005
#: ../Doc/howto/regex.rst:1012
msgid ""
"Now, consider complicating the problem a bit; what if you want to match "
"filenames where the extension is not ``bat``? Some incorrect attempts:"
@ -2036,7 +2042,7 @@ msgstr ""
"correspondre les noms de fichiers dont l'extension n'est pas ``bat`` ? voici "
"quelques tentatives incorrectes :"
#: ../Doc/howto/regex.rst:1008
#: ../Doc/howto/regex.rst:1015
msgid ""
"``.*[.][^b].*$`` The first attempt above tries to exclude ``bat`` by "
"requiring that the first character of the extension is not a ``b``. This is "
@ -2046,11 +2052,11 @@ msgstr ""
"spécifiant que le premier caractère de l'extension ne doit pas être ``b``. "
"Cela ne fonctionne pas, car le motif n'accepte pas ``truc.bar``."
#: ../Doc/howto/regex.rst:1012
#: ../Doc/howto/regex.rst:1019
msgid "``.*[.]([^b]..|.[^a].|..[^t])$``"
msgstr "``.*[.]([^b]..|.[^a].|..[^t])$``"
#: ../Doc/howto/regex.rst:1014
#: ../Doc/howto/regex.rst:1021
msgid ""
"The expression gets messier when you try to patch up the first solution by "
"requiring one of the following cases to match: the first character of the "
@ -2069,11 +2075,11 @@ msgstr ""
"``sendmail.cf``. Compliquons encore une fois le motif pour essayer de le "
"réparer."
#: ../Doc/howto/regex.rst:1022
#: ../Doc/howto/regex.rst:1029
msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``"
msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``"
#: ../Doc/howto/regex.rst:1024
#: ../Doc/howto/regex.rst:1031
msgid ""
"In the third attempt, the second and third letters are all made optional in "
"order to allow matching extensions shorter than three characters, such as "
@ -2083,7 +2089,7 @@ msgstr ""
"devenues facultatives afin de permettre la correspondance avec des "
"extensions plus courtes que trois caractères, comme ``sendmail.cf``."
#: ../Doc/howto/regex.rst:1028
#: ../Doc/howto/regex.rst:1035
msgid ""
"The pattern's getting really complicated now, which makes it hard to read "
"and understand. Worse, if the problem changes and you want to exclude both "
@ -2095,11 +2101,11 @@ msgstr ""
"à la fois ``bat`` et ``exe`` en tant qu'extensions, le modèle deviendra "
"encore plus compliqué et confus."
#: ../Doc/howto/regex.rst:1033
#: ../Doc/howto/regex.rst:1040
msgid "A negative lookahead cuts through all this confusion:"
msgstr "Une assertion prédictive négative supprime toute cette confusion :"
#: ../Doc/howto/regex.rst:1035
#: ../Doc/howto/regex.rst:1042
msgid ""
"``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression "
"``bat`` doesn't match at this point, try the rest of the pattern; if ``bat"
@ -2116,7 +2122,7 @@ msgstr ""
"``[^...]*`` s'assure que le motif fonctionne lorsqu'il y a plusieurs points "
"dans le nom de fichier."
#: ../Doc/howto/regex.rst:1042
#: ../Doc/howto/regex.rst:1049
msgid ""
"Excluding another filename extension is now easy; simply add it as an "
"alternative inside the assertion. The following pattern excludes filenames "
@ -2126,15 +2132,15 @@ msgstr ""
"suffit de l'ajouter comme alternative à l'intérieur de l'assertion. Le motif "
"suivant exclut les noms de fichiers qui se terminent par ``bat`` ou ``exe`` :"
#: ../Doc/howto/regex.rst:1046
#: ../Doc/howto/regex.rst:1053
msgid "``.*[.](?!bat$|exe$)[^.]*$``"
msgstr "``.*[.](?!bat$|exe$)[^.]*$``"
#: ../Doc/howto/regex.rst:1050
#: ../Doc/howto/regex.rst:1057
msgid "Modifying Strings"
msgstr "Modification de chaînes"
#: ../Doc/howto/regex.rst:1052
#: ../Doc/howto/regex.rst:1059
msgid ""
"Up to this point, we've simply performed searches against a static string. "
"Regular expressions are also commonly used to modify strings in various "
@ -2145,21 +2151,21 @@ msgstr ""
"pour modifier les chaînes de caractères de diverses manières, en utilisant "
"les méthodes suivantes des motifs :"
#: ../Doc/howto/regex.rst:1059
#: ../Doc/howto/regex.rst:1066
msgid "``split()``"
msgstr "``split()``"
#: ../Doc/howto/regex.rst:1059
#: ../Doc/howto/regex.rst:1066
msgid "Split the string into a list, splitting it wherever the RE matches"
msgstr ""
"Découpe la chaîne de caractère en liste, la découpant partout où la RE "
"correspond"
#: ../Doc/howto/regex.rst:1062
#: ../Doc/howto/regex.rst:1069
msgid "``sub()``"
msgstr "``sub()``"
#: ../Doc/howto/regex.rst:1062
#: ../Doc/howto/regex.rst:1069
msgid ""
"Find all substrings where the RE matches, and replace them with a different "
"string"
@ -2167,11 +2173,11 @@ msgstr ""
"Recherche toutes les sous-chaînes de caractères où la RE correspond et les "
"substitue par une chaîne de caractères différente"
#: ../Doc/howto/regex.rst:1065
#: ../Doc/howto/regex.rst:1072
msgid "``subn()``"
msgstr "``subn()``"
#: ../Doc/howto/regex.rst:1065
#: ../Doc/howto/regex.rst:1072
msgid ""
"Does the same thing as :meth:`!sub`, but returns the new string and the "
"number of replacements"
@ -2179,11 +2185,11 @@ msgstr ""
"Fait la même chose que :meth:`!sub`, mais renvoie la nouvelle chaîne et le "
"nombre de remplacements effectués"
#: ../Doc/howto/regex.rst:1072
#: ../Doc/howto/regex.rst:1079
msgid "Splitting Strings"
msgstr "Découpage de chaînes"
#: ../Doc/howto/regex.rst:1074
#: ../Doc/howto/regex.rst:1081
msgid ""
"The :meth:`~re.Pattern.split` method of a pattern splits a string apart "
"wherever the RE matches, returning a list of the pieces. It's similar to "
@ -2200,7 +2206,7 @@ msgstr ""
"\"blancs\" ou suivant une chaîne définie. Comme vous pouvez vous y attendre, "
"il y a aussi une fonction :func:`re.split` de niveau module."
#: ../Doc/howto/regex.rst:1085
#: ../Doc/howto/regex.rst:1092
msgid ""
"Split *string* by the matches of the regular expression. If capturing "
"parentheses are used in the RE, then their contents will also be returned as "
@ -2212,7 +2218,7 @@ msgstr ""
"également renvoyé dans la liste résultante. Si *maxsplit* n'est pas nul, au "
"plus *maxsplit* découpages sont effectués."
#: ../Doc/howto/regex.rst:1090
#: ../Doc/howto/regex.rst:1097
msgid ""
"You can limit the number of splits made, by passing a value for *maxsplit*. "
"When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the "
@ -2226,7 +2232,7 @@ msgstr ""
"élément de la liste. Dans l'exemple suivant, le délimiteur est toute "
"séquence de caractères non alphanumériques. ::"
#: ../Doc/howto/regex.rst:1102
#: ../Doc/howto/regex.rst:1109
msgid ""
"Sometimes you're not only interested in what the text between delimiters is, "
"but also need to know what the delimiter was. If capturing parentheses are "
@ -2238,7 +2244,7 @@ msgstr ""
"la RE, leurs valeurs sont également renvoyées dans la liste. Comparons les "
"appels suivants ::"
#: ../Doc/howto/regex.rst:1114
#: ../Doc/howto/regex.rst:1121
msgid ""
"The module-level function :func:`re.split` adds the RE to be used as the "
"first argument, but is otherwise the same. ::"
@ -2246,11 +2252,11 @@ msgstr ""
"La fonction de niveau module :func:`re.split` ajoute la RE à utiliser comme "
"premier argument, mais est par ailleurs identique. ::"
#: ../Doc/howto/regex.rst:1126
#: ../Doc/howto/regex.rst:1133
msgid "Search and Replace"
msgstr "Recherche et substitution"
#: ../Doc/howto/regex.rst:1128
#: ../Doc/howto/regex.rst:1135
msgid ""
"Another common task is to find all the matches for a pattern, and replace "
"them with a different string. The :meth:`~re.Pattern.sub` method takes a "
@ -2262,7 +2268,7 @@ msgstr ""
"Pattern.sub` prend une valeur de substitution, qui peut être une chaîne de "
"caractères ou une fonction, et la chaîne à traiter."
#: ../Doc/howto/regex.rst:1135
#: ../Doc/howto/regex.rst:1142
msgid ""
"Returns the string obtained by replacing the leftmost non-overlapping "
"occurrences of the RE in *string* by the replacement *replacement*. If the "
@ -2272,7 +2278,7 @@ msgstr ""
"les plus à gauche de la RE dans *string* par la substitution *replacement*. "
"Si le motif n'est pas trouvé, *string* est renvoyée inchangée."
#: ../Doc/howto/regex.rst:1139
#: ../Doc/howto/regex.rst:1146
msgid ""
"The optional argument *count* is the maximum number of pattern occurrences "
"to be replaced; *count* must be a non-negative integer. The default value "
@ -2282,7 +2288,7 @@ msgstr ""
"remplacer ; *count* doit être un entier positif ou nul. La valeur par défaut "
"de 0 signifie qu'il faut remplacer toutes les occurrences."
#: ../Doc/howto/regex.rst:1143
#: ../Doc/howto/regex.rst:1150
msgid ""
"Here's a simple example of using the :meth:`~re.Pattern.sub` method. It "
"replaces colour names with the word ``colour``::"
@ -2290,7 +2296,7 @@ msgstr ""
"Voici un exemple simple utilisant la méthode :meth:`~re.Pattern.sub`. Nous "
"remplaçons les noms des couleurs par le mot ``colour`` ::"
#: ../Doc/howto/regex.rst:1152
#: ../Doc/howto/regex.rst:1159
msgid ""
"The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-"
"tuple containing the new string value and the number of replacements that "
@ -2300,7 +2306,7 @@ msgstr ""
"couple contenant la nouvelle valeur de la chaîne de caractères et le nombre "
"de remplacements effectués ::"
#: ../Doc/howto/regex.rst:1161
#: ../Doc/howto/regex.rst:1168
msgid ""
"Empty matches are replaced only when they're not adjacent to a previous "
"empty match. ::"
@ -2308,7 +2314,7 @@ msgstr ""
"Les correspondances vides ne sont remplacées que lorsqu'elles ne sont pas "
"adjacentes à une correspondance vide précédente. ::"
#: ../Doc/howto/regex.rst:1168
#: ../Doc/howto/regex.rst:1175
msgid ""
"If *replacement* is a string, any backslash escapes in it are processed. "
"That is, ``\\n`` is converted to a single newline character, ``\\r`` is "
@ -2326,7 +2332,7 @@ msgstr ""
"correspondante au groupe dans le RE. Ceci vous permet d'incorporer des "
"parties du texte original dans la chaîne de remplacement résultante."
#: ../Doc/howto/regex.rst:1175
#: ../Doc/howto/regex.rst:1182
msgid ""
"This example matches the word ``section`` followed by a string enclosed in "
"``{``, ``}``, and changes ``section`` to ``subsection``::"
@ -2334,7 +2340,7 @@ msgstr ""
"Cet exemple fait correspondre le mot ``section`` suivi par une chaîne "
"encadrée par ``{`` et ``}``, et modifie ``section`` en ``subsection`` ::"
#: ../Doc/howto/regex.rst:1182
#: ../Doc/howto/regex.rst:1189
msgid ""
"There's also a syntax for referring to named groups as defined by the ``(?"
"P<name>...)`` syntax. ``\\g<name>`` will use the substring matched by the "
@ -2355,7 +2361,7 @@ msgstr ""
"substitutions suivantes sont toutes équivalentes mais utilisent les trois "
"variantes de la chaîne de remplacement. ::"
#: ../Doc/howto/regex.rst:1199
#: ../Doc/howto/regex.rst:1206
msgid ""
"*replacement* can also be a function, which gives you even more control. If "
"*replacement* is a function, the function is called for every non-"
@ -2370,7 +2376,7 @@ msgstr ""
"fonction, qui peut utiliser cette information pour calculer la chaîne de "
"remplacement désirée et la renvoyer."
#: ../Doc/howto/regex.rst:1205
#: ../Doc/howto/regex.rst:1212
msgid ""
"In the following example, the replacement function translates decimals into "
"hexadecimal::"
@ -2378,7 +2384,7 @@ msgstr ""
"Dans l'exemple suivant, la fonction de substitution convertit un nombre "
"décimal en hexadécimal ::"
#: ../Doc/howto/regex.rst:1217
#: ../Doc/howto/regex.rst:1224
msgid ""
"When using the module-level :func:`re.sub` function, the pattern is passed "
"as the first argument. The pattern may be provided as an object or as a "
@ -2395,11 +2401,11 @@ msgstr ""
"chaîne de caractères, par exemple ``sub(\"(?i)b+\", \"x\", \"bbbb BBBBB"
"\")```renvoie ``'x x'``."
#: ../Doc/howto/regex.rst:1225
#: ../Doc/howto/regex.rst:1232
msgid "Common Problems"
msgstr "Problèmes classiques"
#: ../Doc/howto/regex.rst:1227
#: ../Doc/howto/regex.rst:1234
msgid ""
"Regular expressions are a powerful tool for some applications, but in some "
"ways their behaviour isn't intuitive and at times they don't behave the way "
@ -2411,11 +2417,11 @@ msgstr ""
"et, parfois, elles ne se comportent pas comme vous pouvez vous y attendre. "
"Cette section met en évidence certains des pièges les plus courants."
#: ../Doc/howto/regex.rst:1233
#: ../Doc/howto/regex.rst:1240
msgid "Use String Methods"
msgstr "Utilisez les méthodes du type *string*"
#: ../Doc/howto/regex.rst:1235
#: ../Doc/howto/regex.rst:1242
msgid ""
"Sometimes using the :mod:`re` module is a mistake. If you're matching a "
"fixed string, or a single character class, and you're not using any :mod:"
@ -2435,7 +2441,7 @@ msgstr ""
"que l'implémentation est une seule petite boucle C qui a été optimisée, au "
"lieu du gros moteur d'expressions régulières plus généraliste."
#: ../Doc/howto/regex.rst:1243
#: ../Doc/howto/regex.rst:1250
msgid ""
"One example might be replacing a single fixed string with another one; for "
"example, you might replace ``word`` with ``deed``. :func:`re.sub` seems "
@ -2457,7 +2463,7 @@ msgstr ""
"de mot d'un côté et de l'autre ; c'est au-delà des capacités de la méthode :"
"meth:`!replace`)."
#: ../Doc/howto/regex.rst:1252
#: ../Doc/howto/regex.rst:1259
msgid ""
"Another common task is deleting every occurrence of a single character from "
"a string or replacing it with another single character. You might do this "
@ -2471,7 +2477,7 @@ msgstr ""
"sub('\\n', ' ', S)``, mais :meth:`~str.translate` en est capable et est plus "
"rapide que n'importe quelle opération d'expression régulière."
#: ../Doc/howto/regex.rst:1258
#: ../Doc/howto/regex.rst:1265
msgid ""
"In short, before turning to the :mod:`re` module, consider whether your "
"problem can be solved with a faster and simpler string method."
@ -2479,11 +2485,11 @@ msgstr ""
"Bref, avant de passer au module :mod:`re`, évaluez d'abord si votre problème "
"peut être résolu avec une méthode de chaîne plus rapide et plus simple."
#: ../Doc/howto/regex.rst:1263
#: ../Doc/howto/regex.rst:1270
msgid "match() versus search()"
msgstr "*match()* contre *search()*"
#: ../Doc/howto/regex.rst:1265
#: ../Doc/howto/regex.rst:1272
msgid ""
"The :func:`~re.match` function only checks if the RE matches at the "
"beginning of the string while :func:`~re.search` will scan forward through "
@ -2499,7 +2505,7 @@ msgstr ""
"correspondance qui commence à 0 ; si la correspondance commence plus loin, :"
"func:`!match` *ne la trouve pas*. ::"
#: ../Doc/howto/regex.rst:1276
#: ../Doc/howto/regex.rst:1283
msgid ""
"On the other hand, :func:`~re.search` will scan forward through the string, "
"reporting the first match it finds. ::"
@ -2507,7 +2513,7 @@ msgstr ""
"D'un autre côté, :func:`~re.search` balaie la chaîne de caractères, "
"rapportant la première correspondance qu'elle trouve. ::"
#: ../Doc/howto/regex.rst:1284
#: ../Doc/howto/regex.rst:1291
msgid ""
"Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``."
"*`` to the front of your RE. Resist this temptation and use :func:`re."
@ -2528,7 +2534,7 @@ msgstr ""
"rapidement la chaîne de caractères à la recherche du caractère de départ, "
"n'essayant la correspondance complète que si un \"C\" a déjà été trouvé."
#: ../Doc/howto/regex.rst:1293
#: ../Doc/howto/regex.rst:1300
msgid ""
"Adding ``.*`` defeats this optimization, requiring scanning to the end of "
"the string and then backtracking to find a match for the rest of the RE. "
@ -2539,11 +2545,11 @@ msgstr ""
"une correspondance pour le reste de la RE. Préférez l'utilisation :func:`re."
"search`."
#: ../Doc/howto/regex.rst:1299
#: ../Doc/howto/regex.rst:1306
msgid "Greedy versus Non-Greedy"
msgstr "Glouton contre non-glouton"
#: ../Doc/howto/regex.rst:1301
#: ../Doc/howto/regex.rst:1308
msgid ""
"When repeating a regular expression, as in ``a*``, the resulting action is "
"to consume as much of the pattern as possible. This fact often bites you "
@ -2558,7 +2564,7 @@ msgstr ""
"pour faire correspondre une seule balise HTML ne fonctionne pas en raison de "
"la nature gloutonne de ``.*``. ::"
#: ../Doc/howto/regex.rst:1315
#: ../Doc/howto/regex.rst:1322
msgid ""
"The RE matches the ``'<'`` in ``'<html>'``, and the ``.*`` consumes the rest "
"of the string. There's still more left in the RE, though, and the ``>`` "
@ -2575,7 +2581,7 @@ msgstr ""
"correspondance finale s'étend du ``'<'`` de ``'<html>'`` au ``'>'`` de ``'</"
"title>'``, ce qui n'est pas ce que vous voulez."
#: ../Doc/howto/regex.rst:1322
#: ../Doc/howto/regex.rst:1329
msgid ""
"In this case, the solution is to use the non-greedy qualifiers ``*?``, ``+?"
"``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the "
@ -2590,7 +2596,7 @@ msgstr ""
"échoue, le moteur avance caractère par caractère, ré-essayant ``'>'`` à "
"chaque pas. Nous obtenons alors le bon résultat ::"
#: ../Doc/howto/regex.rst:1331
#: ../Doc/howto/regex.rst:1338
msgid ""
"(Note that parsing HTML or XML with regular expressions is painful. Quick-"
"and-dirty patterns will handle common cases, but HTML and XML have special "
@ -2606,11 +2612,11 @@ msgstr ""
"traite tous les cas possibles, les motifs seront *très* compliqués. "
"Utilisez un module d'analyse HTML ou XML pour de telles tâches."
#: ../Doc/howto/regex.rst:1339
#: ../Doc/howto/regex.rst:1346
msgid "Using re.VERBOSE"
msgstr "Utilisez *re.VERBOSE*"
#: ../Doc/howto/regex.rst:1341
#: ../Doc/howto/regex.rst:1348
msgid ""
"By now you've probably noticed that regular expressions are a very compact "
"notation, but they're not terribly readable. REs of moderate complexity can "
@ -2623,7 +2629,7 @@ msgstr ""
"obliques inverses, de parenthèses et de métacaractères, ce qui la rend "
"difficile à lire et à comprendre."
#: ../Doc/howto/regex.rst:1346
#: ../Doc/howto/regex.rst:1353
msgid ""
"For such REs, specifying the :const:`re.VERBOSE` flag when compiling the "
"regular expression can be helpful, because it allows you to format the "
@ -2633,7 +2639,7 @@ msgstr ""
"l'expression régulière peut être utile ; cela vous permet de formater "
"l'expression régulière de manière plus claire."
#: ../Doc/howto/regex.rst:1350
#: ../Doc/howto/regex.rst:1357
msgid ""
"The ``re.VERBOSE`` flag has several effects. Whitespace in the regular "
"expression that *isn't* inside a character class is ignored. This means "
@ -2653,15 +2659,15 @@ msgstr ""
"ligne suivante. Lorsque vous l'utilisez avec des chaînes à triple "
"guillemets, cela permet aux RE d'être formatées plus proprement ::"
#: ../Doc/howto/regex.rst:1367
#: ../Doc/howto/regex.rst:1374
msgid "This is far more readable than::"
msgstr "Ceci est beaucoup plus lisible que::"
#: ../Doc/howto/regex.rst:1373
#: ../Doc/howto/regex.rst:1380
msgid "Feedback"
msgstr "Vos commentaires"
#: ../Doc/howto/regex.rst:1375
#: ../Doc/howto/regex.rst:1382
msgid ""
"Regular expressions are a complicated topic. Did this document help you "
"understand them? Were there parts that were unclear, or Problems you "
@ -2673,7 +2679,7 @@ msgstr ""
"problèmes que vous avez rencontrés ne sont pas traités ici ? Si tel est le "
"cas, merci d'envoyer vos suggestions d'améliorations à l'auteur."
#: ../Doc/howto/regex.rst:1380
#: ../Doc/howto/regex.rst:1387
msgid ""
"The most complete book on regular expressions is almost certainly Jeffrey "
"Friedl's Mastering Regular Expressions, published by O'Reilly. "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-13 22:28+0200\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2018-07-31 18:40+0200\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -211,6 +211,12 @@ msgstr ""
#: ../Doc/howto/sorting.rst:148
msgid ""
"This can be abstracted out into a wrapper function that can take a list and "
"tuples of field and order to sort them on multiple passes."
msgstr ""
#: ../Doc/howto/sorting.rst:159
msgid ""
"The `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ algorithm used in "
"Python does multiple sorts efficiently because it can take advantage of any "
"ordering already present in a dataset."
@ -219,17 +225,17 @@ msgstr ""
"Python effectue de multiples tris efficacement parce qu'il peut tirer "
"avantage de n'importe quel ordre de existant dans un jeu de données."
#: ../Doc/howto/sorting.rst:153
#: ../Doc/howto/sorting.rst:164
msgid "The Old Way Using Decorate-Sort-Undecorate"
msgstr "La méthode traditionnelle utilisant Decorate-Sort-Undecorate"
#: ../Doc/howto/sorting.rst:155
#: ../Doc/howto/sorting.rst:166
msgid "This idiom is called Decorate-Sort-Undecorate after its three steps:"
msgstr ""
"Cette technique est appelée Decorate-Sort-Undecorate et se base sur trois "
"étapes :"
#: ../Doc/howto/sorting.rst:157
#: ../Doc/howto/sorting.rst:168
msgid ""
"First, the initial list is decorated with new values that control the sort "
"order."
@ -237,11 +243,11 @@ msgstr ""
"Premièrement, la liste de départ est décorée avec les nouvelles valeurs qui "
"contrôlent l'ordre du tri."
#: ../Doc/howto/sorting.rst:159
#: ../Doc/howto/sorting.rst:170
msgid "Second, the decorated list is sorted."
msgstr "En second lieu, la liste décorée est triée."
#: ../Doc/howto/sorting.rst:161
#: ../Doc/howto/sorting.rst:172
msgid ""
"Finally, the decorations are removed, creating a list that contains only the "
"initial values in the new order."
@ -249,14 +255,14 @@ msgstr ""
"Enfin, la décoration est supprimée, créant ainsi une liste qui contient "
"seulement la valeur initiale dans le nouvel ordre."
#: ../Doc/howto/sorting.rst:164
#: ../Doc/howto/sorting.rst:175
msgid ""
"For example, to sort the student data by *grade* using the DSU approach:"
msgstr ""
"Par exemple, pour trier les données étudiant par *grade* en utilisant "
"l'approche DSU :"
#: ../Doc/howto/sorting.rst:171
#: ../Doc/howto/sorting.rst:182
msgid ""
"This idiom works because tuples are compared lexicographically; the first "
"items are compared; if they are the same then the second items are compared, "
@ -266,7 +272,7 @@ msgstr ""
"lexicographique; les premiers objets sont comparés; si il y a des objets "
"identiques, alors l'objet suivant est comparé, et ainsi de suite."
#: ../Doc/howto/sorting.rst:175
#: ../Doc/howto/sorting.rst:186
msgid ""
"It is not strictly necessary in all cases to include the index *i* in the "
"decorated list, but including it gives two benefits:"
@ -274,7 +280,7 @@ msgstr ""
"Il n'est pas strictement nécessaire dans tous les cas dinclure l'indice *i* "
"dans la liste décorée, mais l'inclure donne deux avantages :"
#: ../Doc/howto/sorting.rst:178
#: ../Doc/howto/sorting.rst:189
msgid ""
"The sort is stable -- if two items have the same key, their order will be "
"preserved in the sorted list."
@ -282,7 +288,7 @@ msgstr ""
"Le tri est stable -- si deux objets on la même clef, leur ordre sera "
"préservé dans la liste triée."
#: ../Doc/howto/sorting.rst:181
#: ../Doc/howto/sorting.rst:192
msgid ""
"The original items do not have to be comparable because the ordering of the "
"decorated tuples will be determined by at most the first two items. So for "
@ -294,7 +300,7 @@ msgstr ""
"exemple la liste originale pourrait contenir des nombres complexes qui "
"pourraient ne pas être triés directement."
#: ../Doc/howto/sorting.rst:186
#: ../Doc/howto/sorting.rst:197
msgid ""
"Another name for this idiom is `Schwartzian transform <https://en.wikipedia."
"org/wiki/Schwartzian_transform>`_\\, after Randal L. Schwartz, who "
@ -304,7 +310,7 @@ msgstr ""
"wikipedia.org/wiki/Schwartzian_transform>`_\\, après que Randal L. Schwartz "
"l'ait popularisé chez les développeurs Perl."
#: ../Doc/howto/sorting.rst:190
#: ../Doc/howto/sorting.rst:201
msgid ""
"Now that Python sorting provides key-functions, this technique is not often "
"needed."
@ -312,11 +318,11 @@ msgstr ""
"Maintenant que le tri Python fournit des fonctions-clef, cette technique "
"n'est plus souvent utilisée."
#: ../Doc/howto/sorting.rst:194
#: ../Doc/howto/sorting.rst:205
msgid "The Old Way Using the *cmp* Parameter"
msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*"
#: ../Doc/howto/sorting.rst:196
#: ../Doc/howto/sorting.rst:207
msgid ""
"Many constructs given in this HOWTO assume Python 2.4 or later. Before that, "
"there was no :func:`sorted` builtin and :meth:`list.sort` took no keyword "
@ -329,7 +335,7 @@ msgstr ""
"versions Python 2.x utilisaient un paramètre *cmp* pour prendre en charge "
"les fonctions de comparaisons définies par les utilisateurs."
#: ../Doc/howto/sorting.rst:201
#: ../Doc/howto/sorting.rst:212
msgid ""
"In Py3.0, the *cmp* parameter was removed entirely (as part of a larger "
"effort to simplify and unify the language, eliminating the conflict between "
@ -339,7 +345,7 @@ msgstr ""
"effort plus général pour simplifier et unifier le langage, en éliminant le "
"conflit entre les comparaisons riches et la méthode magique :meth:`__cmp__`)."
#: ../Doc/howto/sorting.rst:205
#: ../Doc/howto/sorting.rst:216
msgid ""
"In Py2.x, sort allowed an optional function which can be called for doing "
"the comparisons. That function should take two arguments to be compared and "
@ -352,11 +358,11 @@ msgstr ""
"inférieur-à, renvoyer zéro si ils sont égaux, ou renvoyer une valeur "
"positive pour supérieur-à. Par exemple, nous pouvons faire :"
#: ../Doc/howto/sorting.rst:215
#: ../Doc/howto/sorting.rst:226
msgid "Or you can reverse the order of comparison with:"
msgstr "Ou nous pouvons inverser l'ordre de comparaison avec :"
#: ../Doc/howto/sorting.rst:222
#: ../Doc/howto/sorting.rst:233
msgid ""
"When porting code from Python 2.x to 3.x, the situation can arise when you "
"have the user supplying a comparison function and you need to convert that "
@ -367,13 +373,13 @@ msgstr ""
"qu'il faut convertir cette fonction en une fonction-clef. La fonction "
"d'encapsulation suivante rend cela plus facile à faire : ::"
#: ../Doc/howto/sorting.rst:245
#: ../Doc/howto/sorting.rst:256
msgid "To convert to a key function, just wrap the old comparison function:"
msgstr ""
"Pour convertir une fonction clef, ils suffit d'encapsuler l'ancienne "
"fonction de comparaison :"
#: ../Doc/howto/sorting.rst:256
#: ../Doc/howto/sorting.rst:267
msgid ""
"In Python 3.2, the :func:`functools.cmp_to_key` function was added to the :"
"mod:`functools` module in the standard library."
@ -381,11 +387,11 @@ msgstr ""
"En Python 3.2, la fonction :func:`functools.cmp_to_key` à été ajoutée au "
"module :mod:`functools` dans la librairie standard."
#: ../Doc/howto/sorting.rst:260
#: ../Doc/howto/sorting.rst:271
msgid "Odd and Ends"
msgstr "Curiosités et conclusion"
#: ../Doc/howto/sorting.rst:262
#: ../Doc/howto/sorting.rst:273
msgid ""
"For locale aware sorting, use :func:`locale.strxfrm` for a key function or :"
"func:`locale.strcoll` for a comparison function."
@ -393,7 +399,7 @@ msgstr ""
"Pour du tri de texte localisé, utilisez :func:`locale.strxfrm` en tant que "
"fonction clef ou :func:`locale.strcoll` comme fonction de comparaison."
#: ../Doc/howto/sorting.rst:265
#: ../Doc/howto/sorting.rst:276
msgid ""
"The *reverse* parameter still maintains sort stability (so that records with "
"equal keys retain the original order). Interestingly, that effect can be "
@ -405,7 +411,7 @@ msgstr ""
"cet effet peut être simulé sans le paramètre en utilisant la fonction "
"native :func:`reversed` deux fois :"
#: ../Doc/howto/sorting.rst:277
#: ../Doc/howto/sorting.rst:288
msgid ""
"The sort routines are guaranteed to use :meth:`__lt__` when making "
"comparisons between two objects. So, it is easy to add a standard sort order "
@ -416,7 +422,7 @@ msgstr ""
"facile d'ajouter un ordre de tri standard à une classe en définissant sa "
"méthode :meth:`__lt__` : ::"
#: ../Doc/howto/sorting.rst:285
#: ../Doc/howto/sorting.rst:296
msgid ""
"Key functions need not depend directly on the objects being sorted. A key "
"function can also access external resources. For instance, if the student "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-23 16:48+0200\n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2019-06-08 10:54+0200\n"
"Last-Translator: Mathieu Dupuy <deronnax@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -345,9 +345,10 @@ msgstr ""
"développement de lUnicode est également disponible sur le site."
#: ../Doc/howto/unicode.rst:164
#, fuzzy
msgid ""
"On the Computerphile Youtube channel, Tom Scott briefly `discusses the "
"history of Unicode and UTF-8 <https://www.youtube.com/watch?v=MijmeoH9LT4>` "
"history of Unicode and UTF-8 <https://www.youtube.com/watch?v=MijmeoH9LT4>`_ "
"(9 minutes 36 seconds)."
msgstr ""
"Sur la chaîne Youtube *Computerphile*, Tom Scott parle brièvement de "