forked from AFPy/python-docs-fr
Make merge (#21)
J'ai juste exécuté `python merge.py 3.11`. Reviewed-on: AFPy/python-docs-fr#21 Co-authored-by: Julien Palard <julien@palard.fr> Co-committed-by: Julien Palard <julien@palard.fr>
This commit is contained in:
parent 423ff1c51d
commit 26c991fc20
281 changed files with 36271 additions and 29299 deletions
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2021-12-31 11:33+0100\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2022-05-12 09:43+0200\n" | ||||
"Last-Translator: ZepmanBC <zepman@gmail.com>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -125,12 +125,20 @@ msgstr "" | |||
"`getattr` avec trois arguments, par exemple ``getattr(o, '__annotations__', " | ||||
"None)``." | ||||
| ||||
#: howto/annotations.rst:62 | ||||
#: howto/annotations.rst:60 | ||||
msgid "" | ||||
"Before Python 3.10, accessing ``__annotations__`` on a class that defines no " | ||||
"annotations but that has a parent class with annotations would return the " | ||||
"parent's ``__annotations__``. In Python 3.10 and newer, the child class's " | ||||
"annotations will be an empty dict instead." | ||||
msgstr "" | ||||
| ||||
#: howto/annotations.rst:68 | ||||
msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" | ||||
msgstr "" | ||||
"Accès au dictionnaire des annotations d'un objet en Python 3.9 et antérieur" | ||||
| ||||
#: howto/annotations.rst:64 | ||||
#: howto/annotations.rst:70 | ||||
msgid "" | ||||
"In Python 3.9 and older, accessing the annotations dict of an object is much " | ||||
"more complicated than in newer versions. The problem is a design flaw in " | ||||
| | @ -141,7 +149,7 @@ msgstr "" | |||
"problème est dû à un défaut de conception de ces anciennes versions de " | ||||
"Python, notamment en ce qui concerne les annotations de classe." | ||||
| ||||
#: howto/annotations.rst:69 | ||||
#: howto/annotations.rst:75 | ||||
msgid "" | ||||
"Best practice for accessing the annotations dict of other objects--" | ||||
"functions, other callables, and modules--is the same as best practice for " | ||||
| | @ -155,7 +163,7 @@ msgstr "" | |||
"vous devez utiliser la forme à trois arguments de :func:`getattr` pour " | ||||
"accéder à l'attribut ``__annotations__`` de l'objet." | ||||
| ||||
#: howto/annotations.rst:76 | ||||
#: howto/annotations.rst:82 | ||||
msgid "" | ||||
"Unfortunately, this isn't best practice for classes. The problem is that, " | ||||
"since ``__annotations__`` is optional on classes, and because classes can " | ||||
| | @ -170,12 +178,12 @@ msgstr "" | |||
"renvoyer le dictionnaire d'annotations d'une *classe de base.* Par " | ||||
"exemple : ::" | ||||
| ||||
#: howto/annotations.rst:92 | ||||
#: howto/annotations.rst:98 | ||||
msgid "This will print the annotations dict from ``Base``, not ``Derived``." | ||||
msgstr "" | ||||
"Ceci affiche le dictionnaire d'annotations de ``Base``, pas de ``Derived``." | ||||
| ||||
#: howto/annotations.rst:95 | ||||
#: howto/annotations.rst:101 | ||||
msgid "" | ||||
"Your code will have to have a separate code path if the object you're " | ||||
"examining is a class (``isinstance(o, type)``). In that case, best practice " | ||||
| | @ -192,7 +200,7 @@ msgstr "" | |||
"annotations définies, la bonne pratique est d'appeler la méthode ``get`` sur " | ||||
"le dictionnaire de la classe." | ||||
| ||||
#: howto/annotations.rst:103 | ||||
#: howto/annotations.rst:109 | ||||
msgid "" | ||||
"To put it all together, here is some sample code that safely accesses the " | ||||
"``__annotations__`` attribute on an arbitrary object in Python 3.9 and " | ||||
| | @ -202,7 +210,7 @@ msgstr "" | |||
"l'attribut ``__annotations__`` d'un objet quelconque en Python 3.9 et " | ||||
"antérieur : ::" | ||||
| ||||
#: howto/annotations.rst:112 | ||||
#: howto/annotations.rst:118 | ||||
msgid "" | ||||
"After running this code, ``ann`` should be either a dictionary or ``None``. " | ||||
"You're encouraged to double-check the type of ``ann`` using :func:" | ||||
| | @ -212,7 +220,7 @@ msgstr "" | |||
"``None``. Nous vous conseillons de vérifier le type de ``ann`` en " | ||||
"utilisant :func:`isinstance` avant de poursuivre l'analyse." | ||||
| ||||
#: howto/annotations.rst:117 | ||||
#: howto/annotations.rst:123 | ||||
msgid "" | ||||
"Note that some exotic or malformed type objects may not have a ``__dict__`` " | ||||
"attribute, so for extra safety you may also wish to use :func:`getattr` to " | ||||
| | @ -222,12 +230,12 @@ msgstr "" | |||
"d'attribut ``__dict__`` donc, pour plus de sécurité, vous pouvez également " | ||||
"utiliser :func:`getattr` pour accéder à ``__dict__``." | ||||
| ||||
#: howto/annotations.rst:123 | ||||
#: howto/annotations.rst:129 | ||||
msgid "Manually Un-Stringizing Stringized Annotations" | ||||
msgstr "" | ||||
"Conversion manuelle des annotations contenues dans une chaîne de caractères" | ||||
| ||||
#: howto/annotations.rst:125 | ||||
#: howto/annotations.rst:131 | ||||
msgid "" | ||||
"In situations where some annotations may be \"stringized\", and you wish to " | ||||
"evaluate those strings to produce the Python values they represent, it " | ||||
| | @ -240,7 +248,7 @@ msgstr "" | |||
"préférable d'appeler :func:`inspect.get_annotations` pour faire ce travail à " | ||||
"votre place." | ||||
| ||||
#: howto/annotations.rst:131 | ||||
#: howto/annotations.rst:137 | ||||
msgid "" | ||||
"If you're using Python 3.9 or older, or if for some reason you can't use :" | ||||
"func:`inspect.get_annotations`, you'll need to duplicate its logic. You're " | ||||
| | @ -253,7 +261,7 @@ msgstr "" | |||
"l'implémentation de :func:`inspect.get_annotations` dans la version actuelle " | ||||
"de Python et à suivre une approche similaire." | ||||
| ||||
#: howto/annotations.rst:137 | ||||
#: howto/annotations.rst:143 | ||||
msgid "" | ||||
"In a nutshell, if you wish to evaluate a stringized annotation on an " | ||||
"arbitrary object ``o``:" | ||||
| | @ -261,7 +269,7 @@ msgstr "" | |||
"En bref, si vous souhaitez évaluer une annotation empaquetée en chaîne de " | ||||
"caractères sur un objet arbitraire ``o`` :" | ||||
| ||||
#: howto/annotations.rst:140 | ||||
#: howto/annotations.rst:146 | ||||
msgid "" | ||||
"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" | ||||
"func:`eval`." | ||||
| | @ -269,7 +277,7 @@ msgstr "" | |||
"Si ``o`` est un module, utilisez ``o.__dict__`` pour accéder aux noms " | ||||
"``globals`` lors de l'appel à :func:`eval`." | ||||
| ||||
#: howto/annotations.rst:142 | ||||
#: howto/annotations.rst:148 | ||||
msgid "" | ||||
"If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` as the " | ||||
"``globals``, and ``dict(vars(o))`` as the ``locals``, when calling :func:" | ||||
| | @ -279,7 +287,7 @@ msgstr "" | |||
"pour désigner les noms ``globals``, et ``dict(vars(o))`` pour désigner les " | ||||
"``locals``, lorsque vous appelez :func:`eval`." | ||||
| ||||
#: howto/annotations.rst:145 | ||||
#: howto/annotations.rst:151 | ||||
msgid "" | ||||
"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :func:" | ||||
"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " | ||||
| | @ -291,7 +299,7 @@ msgstr "" | |||
"encapsulez-le itérativement en accédant à ``o.__wrapped__`` ou ``o.func`` " | ||||
"selon le cas, jusqu'à ce que vous ayez trouvé la fonction racine." | ||||
| ||||
#: howto/annotations.rst:149 | ||||
#: howto/annotations.rst:155 | ||||
msgid "" | ||||
"If ``o`` is a callable (but not a class), use ``o.__globals__`` as the " | ||||
"globals when calling :func:`eval`." | ||||
| | @ -299,7 +307,7 @@ msgstr "" | |||
"Si ``o`` est un objet appelable (mais pas une classe), utilisez ``o." | ||||
"__globals__`` pour désigner les globales lors de l'appel de :func:`eval`." | ||||
| ||||
#: howto/annotations.rst:152 | ||||
#: howto/annotations.rst:158 | ||||
msgid "" | ||||
"However, not all string values used as annotations can be successfully " | ||||
"turned into Python values by :func:`eval`. String values could theoretically " | ||||
| | @ -314,7 +322,7 @@ msgstr "" | |||
"indications de type qui nécessitent d'annoter avec des valeurs de chaîne qui " | ||||
"*ne peuvent pas* être évaluées. Par exemple :" | ||||
| ||||
#: howto/annotations.rst:159 | ||||
#: howto/annotations.rst:165 | ||||
msgid "" | ||||
":pep:`604` union types using ``|``, before support for this was added to " | ||||
"Python 3.10." | ||||
| | @ -322,7 +330,7 @@ msgstr "" | |||
"Les types d'union de style :pep:`604` avec ``|``, avant que cette prise en " | ||||
"charge ne soit ajoutée à Python 3.10." | ||||
| ||||
#: howto/annotations.rst:161 | ||||
#: howto/annotations.rst:167 | ||||
msgid "" | ||||
"Definitions that aren't needed at runtime, only imported when :const:`typing." | ||||
"TYPE_CHECKING` is true." | ||||
| | @ -330,7 +338,7 @@ msgstr "" | |||
"Les définitions qui ne sont pas nécessaires à l'exécution, importées " | ||||
"uniquement lorsque :const:`typing.TYPE_CHECKING` est vrai." | ||||
| ||||
#: howto/annotations.rst:164 | ||||
#: howto/annotations.rst:170 | ||||
msgid "" | ||||
"If :func:`eval` attempts to evaluate such values, it will fail and raise an " | ||||
"exception. So, when designing a library API that works with annotations, " | ||||
| | @ -342,12 +350,12 @@ msgstr "" | |||
"fonctionnant avec des annotations, il est recommandé de ne tenter d'évaluer " | ||||
"des valeurs de type chaîne que si l'appelant le demande explicitement." | ||||
| ||||
#: howto/annotations.rst:172 | ||||
#: howto/annotations.rst:178 | ||||
msgid "Best Practices For ``__annotations__`` In Any Python Version" | ||||
msgstr "" | ||||
"Bonnes pratiques pour ``__annotations__`` dans toutes les versions de Python" | ||||
| ||||
#: howto/annotations.rst:174 | ||||
#: howto/annotations.rst:180 | ||||
msgid "" | ||||
"You should avoid assigning to the ``__annotations__`` member of objects " | ||||
"directly. Let Python manage setting ``__annotations__``." | ||||
| | @ -355,7 +363,7 @@ msgstr "" | |||
"Évitez d'assigner directement des objets à l'élément ``__annotations__``. " | ||||
"Laissez Python gérer le paramétrage de ``__annotations__``." | ||||
| ||||
#: howto/annotations.rst:177 | ||||
#: howto/annotations.rst:183 | ||||
msgid "" | ||||
"If you do assign directly to the ``__annotations__`` member of an object, " | ||||
"you should always set it to a ``dict`` object." | ||||
| | @ -363,7 +371,7 @@ msgstr "" | |||
"Si vous assignez directement à l'élément ``__annotations__`` d'un objet, " | ||||
"vous devez toujours le définir comme un ``dict``." | ||||
| ||||
#: howto/annotations.rst:180 | ||||
#: howto/annotations.rst:186 | ||||
msgid "" | ||||
"If you directly access the ``__annotations__`` member of an object, you " | ||||
"should ensure that it's a dictionary before attempting to examine its " | ||||
| | @ -373,20 +381,20 @@ msgstr "" | |||
"devez vous assurer qu'il s'agit d'un dictionnaire avant de tenter d'examiner " | ||||
"son contenu." | ||||
| ||||
#: howto/annotations.rst:184 | ||||
#: howto/annotations.rst:190 | ||||
msgid "You should avoid modifying ``__annotations__`` dicts." | ||||
msgstr "Évitez de modifier les dictionnaires ``__annotations__``." | ||||
| ||||
#: howto/annotations.rst:186 | ||||
#: howto/annotations.rst:192 | ||||
msgid "" | ||||
"You should avoid deleting the ``__annotations__`` attribute of an object." | ||||
msgstr "Évitez de supprimer l'attribut ``__annotations__`` d'un objet." | ||||
| ||||
#: howto/annotations.rst:191 | ||||
#: howto/annotations.rst:197 | ||||
msgid "``__annotations__`` Quirks" | ||||
msgstr "Les curiosités concernant ``__annotations__``" | ||||
| ||||
#: howto/annotations.rst:193 | ||||
#: howto/annotations.rst:199 | ||||
msgid "" | ||||
"In all versions of Python 3, function objects lazy-create an annotations " | ||||
"dict if no annotations are defined on that object. You can delete the " | ||||
| | @ -408,7 +416,7 @@ msgstr "" | |||
"``AttributeError`` ; si vous utilisez ``del fn.__annotations__`` deux fois " | ||||
"de suite, vous êtes sûr de toujours obtenir ``AttributeError``." | ||||
| ||||
#: howto/annotations.rst:203 | ||||
#: howto/annotations.rst:209 | ||||
msgid "" | ||||
"Everything in the above paragraph also applies to class and module objects " | ||||
"in Python 3.10 and newer." | ||||
| | @ -416,7 +424,7 @@ msgstr "" | |||
"Tout ce qui est dit dans le paragraphe précédent s'applique également aux " | ||||
"objets de type classe et module en Python 3.10 et suivants." | ||||
| ||||
#: howto/annotations.rst:206 | ||||
#: howto/annotations.rst:212 | ||||
msgid "" | ||||
"In all versions of Python 3, you can set ``__annotations__`` on a function " | ||||
"object to ``None``. However, subsequently accessing the annotations on that " | ||||
| | @ -435,7 +443,7 @@ msgstr "" | |||
"objets permettent de définir ``__annotations__`` à n'importe quelle valeur " | ||||
"Python, et conserveront la valeur définie." | ||||
| ||||
#: howto/annotations.rst:214 | ||||
#: howto/annotations.rst:220 | ||||
msgid "" | ||||
"If Python stringizes your annotations for you (using ``from __future__ " | ||||
"import annotations``), and you specify a string as an annotation, the string " | ||||
| | @ -447,7 +455,7 @@ msgstr "" | |||
"caractères comme annotation, la chaîne sera elle-même entre guillemets. En " | ||||
"fait, l'annotation est mise entre guillemets *deux fois*. Par exemple : ::" | ||||
| ||||
#: howto/annotations.rst:225 | ||||
#: howto/annotations.rst:231 | ||||
msgid "" | ||||
"This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a " | ||||
"\"quirk\"; it's mentioned here simply because it might be surprising." | ||||
| | | |||
853 howto/clinic.po
853
howto/clinic.po File diff suppressed because it is too large Load diff
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-05-22 23:13+0200\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2022-12-16 14:42+0100\n" | ||||
"Last-Translator: Khaïs COLIN <kh.col@orange.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -1041,8 +1041,9 @@ msgstr "" | |||
"comment soumettre des améliorations à Python." | ||||
| ||||
#: howto/curses.rst:539 | ||||
#, fuzzy | ||||
msgid "" | ||||
"`Writing Programs with NCURSES <http://invisible-island.net/ncurses/ncurses-" | ||||
"`Writing Programs with NCURSES <https://invisible-island.net/ncurses/ncurses-" | ||||
"intro.html>`_: a lengthy tutorial for C programmers." | ||||
msgstr "" | ||||
"`Writing Programs with NCURSES <http://invisible-island.net/ncurses/ncurses-" | ||||
| | @ -1054,8 +1055,9 @@ msgid "`The ncurses man page <https://linux.die.net/man/3/ncurses>`_" | |||
msgstr "`La page de manuel ncurses <https://linux.die.net/man/3/ncurses>`_" | ||||
| ||||
#: howto/curses.rst:542 | ||||
#, fuzzy | ||||
msgid "" | ||||
"`The ncurses FAQ <http://invisible-island.net/ncurses/ncurses.faq.html>`_" | ||||
"`The ncurses FAQ <https://invisible-island.net/ncurses/ncurses.faq.html>`_" | ||||
msgstr "" | ||||
"`La FAQ ncurses <http://invisible-island.net/ncurses/ncurses.faq.html>`_ " | ||||
"(ressource en anglais)" | ||||
| | @ -1071,10 +1073,11 @@ msgstr "" | |||
"gestion des terminaux à l'aide de *curses* et *Urwid* (vidéo en anglais)." | ||||
| ||||
#: howto/curses.rst:545 | ||||
#, fuzzy | ||||
msgid "" | ||||
"`\"Console Applications with Urwid\" <http://www.pyvideo.org/video/1568/" | ||||
"console-applications-with-urwid>`_: video of a PyCon CA 2012 talk " | ||||
"demonstrating some applications written using Urwid." | ||||
"`\"Console Applications with Urwid\" <https://pyvideo.org/video/1568/console-" | ||||
"applications-with-urwid>`_: video of a PyCon CA 2012 talk demonstrating some " | ||||
"applications written using Urwid." | ||||
msgstr "" | ||||
"`\"Console Applications with Urwid\" <http://www.pyvideo.org/video/1568/" | ||||
"console-applications-with-urwid>`_ : vidéo d'une conférence lors de PyCon CA " | ||||
| | | |||
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-05-22 23:13+0200\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2023-01-14 19:47+0100\n" | ||||
"Last-Translator: Mathieu Dupuy <deronnax@gmail.com>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -703,7 +703,7 @@ 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:699 | ||||
#: howto/descriptor.rst:719 | ||||
msgid "" | ||||
"Note, there is no :meth:`__getattr__` hook in the :meth:`__getattribute__` " | ||||
"code. That is why calling :meth:`__getattribute__` directly or with " | ||||
| | @ -714,7 +714,7 @@ msgstr "" | |||
"directement ou avec ``super().__getattribute__`` contourne entièrement :meth:" | ||||
"`__getattr__`." | ||||
| ||||
#: howto/descriptor.rst:703 | ||||
#: howto/descriptor.rst:723 | ||||
msgid "" | ||||
"Instead, it is the dot operator and the :func:`getattr` function that are " | ||||
"responsible for invoking :meth:`__getattr__` whenever :meth:" | ||||
| | @ -726,11 +726,11 @@ msgstr "" | |||
"`__getattribute__` déclenche une :exc:`AttributeError`. Cette logique est " | ||||
"présentée encapsulée dans une fonction utilitaire :" | ||||
| ||||
#: howto/descriptor.rst:753 | ||||
#: howto/descriptor.rst:773 | ||||
msgid "Invocation from a class" | ||||
msgstr "Appel depuis une classe" | ||||
| ||||
#: howto/descriptor.rst:755 | ||||
#: howto/descriptor.rst:775 | ||||
msgid "" | ||||
"The logic for a dotted lookup such as ``A.x`` is in :meth:`type." | ||||
"__getattribute__`. The steps are similar to those for :meth:`object." | ||||
| | @ -743,12 +743,12 @@ msgstr "" | |||
"d'instance est remplacée par une recherche suivant l':term:`ordre de " | ||||
"résolution des méthodes <method resolution order>` de la classe." | ||||
| ||||
#: howto/descriptor.rst:760 | ||||
#: 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:762 | ||||
#: 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`." | ||||
| | @ -756,11 +756,11 @@ 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:767 | ||||
#: howto/descriptor.rst:787 | ||||
msgid "Invocation from super" | ||||
msgstr "Appel depuis super" | ||||
| ||||
#: howto/descriptor.rst:769 | ||||
#: howto/descriptor.rst:789 | ||||
msgid "" | ||||
"The logic for super's dotted lookup is in the :meth:`__getattribute__` " | ||||
"method for object returned by :class:`super()`." | ||||
| | @ -768,7 +768,7 @@ 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:772 | ||||
#: howto/descriptor.rst:792 | ||||
msgid "" | ||||
"A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__." | ||||
"__mro__`` for the base class ``B`` immediately following ``A`` and then " | ||||
| | @ -780,7 +780,7 @@ msgstr "" | |||
"__dict__['m'].__get__(obj, A)``. Si ce n'est pas un descripteur, ``m`` est " | ||||
"renvoyé inchangé." | ||||
| ||||
#: howto/descriptor.rst:777 | ||||
#: howto/descriptor.rst:797 | ||||
msgid "" | ||||
"The full C implementation can be found in :c:func:`super_getattro()` in :" | ||||
"source:`Objects/typeobject.c`. A pure Python equivalent can be found in " | ||||
| | @ -792,11 +792,11 @@ msgstr "" | |||
"`Guido's Tutorial <https://www.python.org/download/releases/2.2.3/descrintro/" | ||||
"#cooperation>`_ (page en anglais)." | ||||
| ||||
#: howto/descriptor.rst:784 | ||||
#: howto/descriptor.rst:804 | ||||
msgid "Summary of invocation logic" | ||||
msgstr "Résumé de la logique d'appel" | ||||
| ||||
#: howto/descriptor.rst:786 | ||||
#: howto/descriptor.rst:806 | ||||
msgid "" | ||||
"The mechanism for descriptors is embedded in the :meth:`__getattribute__()` " | ||||
"methods for :class:`object`, :class:`type`, and :func:`super`." | ||||
| | @ -804,16 +804,16 @@ msgstr "" | |||
"Le fonctionnement des descripteurs se trouve dans les méthodes :meth:" | ||||
"`__getattribute__()` de :class:`object`, :class:`type` et :func:`super`." | ||||
| ||||
#: howto/descriptor.rst:789 | ||||
#: howto/descriptor.rst:809 | ||||
msgid "The important points to remember are:" | ||||
msgstr "Les points importants à retenir sont :" | ||||
| ||||
#: howto/descriptor.rst:791 | ||||
#: howto/descriptor.rst:811 | ||||
msgid "Descriptors are invoked by the :meth:`__getattribute__` method." | ||||
msgstr "" | ||||
"les descripteurs sont appelés par la méthode :meth:`__getattribute__` ;" | ||||
| ||||
#: howto/descriptor.rst:793 | ||||
#: howto/descriptor.rst:813 | ||||
msgid "" | ||||
"Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" | ||||
"`super`." | ||||
| | @ -821,7 +821,7 @@ msgstr "" | |||
"les classes héritent ce mécanisme de :class:`object`, :class:`type` ou :func:" | ||||
"`super` ;" | ||||
| ||||
#: howto/descriptor.rst:796 | ||||
#: howto/descriptor.rst:816 | ||||
msgid "" | ||||
"Overriding :meth:`__getattribute__` prevents automatic descriptor calls " | ||||
"because all the descriptor logic is in that method." | ||||
| | @ -829,7 +829,7 @@ msgstr "" | |||
"redéfinir :meth:`__getattribute____` empêche les appels automatiques de " | ||||
"descripteur car toute la logique des descripteurs est dans cette méthode ;" | ||||
| ||||
#: howto/descriptor.rst:799 | ||||
#: howto/descriptor.rst:819 | ||||
msgid "" | ||||
":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " | ||||
"different calls to :meth:`__get__`. The first includes the instance and may " | ||||
| | @ -841,23 +841,23 @@ msgstr "" | |||
"inclure la classe. La seconde met ``None`` pour l'instance et inclut " | ||||
"toujours la classe ;" | ||||
| ||||
#: howto/descriptor.rst:804 | ||||
#: howto/descriptor.rst:824 | ||||
msgid "Data descriptors always override instance dictionaries." | ||||
msgstr "" | ||||
"les descripteurs de données sont toujours prioritaires sur les dictionnaires " | ||||
"d'instances." | ||||
| ||||
#: howto/descriptor.rst:806 | ||||
#: howto/descriptor.rst:826 | ||||
msgid "Non-data descriptors may be overridden by instance dictionaries." | ||||
msgstr "" | ||||
"les descripteurs hors-données peuvent céder la priorité aux dictionnaires " | ||||
"d'instance." | ||||
| ||||
#: howto/descriptor.rst:810 | ||||
#: howto/descriptor.rst:830 | ||||
msgid "Automatic name notification" | ||||
msgstr "Notification automatique des noms" | ||||
| ||||
#: howto/descriptor.rst:812 | ||||
#: howto/descriptor.rst:832 | ||||
msgid "" | ||||
"Sometimes it is desirable for a descriptor to know what class variable name " | ||||
"it was assigned to. When a new class is created, the :class:`type` " | ||||
| | @ -874,7 +874,7 @@ msgstr "" | |||
"(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:819 | ||||
#: howto/descriptor.rst:839 | ||||
msgid "" | ||||
"The implementation details are in :c:func:`type_new()` and :c:func:" | ||||
"`set_names()` in :source:`Objects/typeobject.c`." | ||||
| | @ -882,7 +882,7 @@ msgstr "" | |||
"Les détails d'implémentation sont dans :c:func:`type_new()` et :c:func:" | ||||
"`set_names()` dans :source:`Objects/typeobject.c`." | ||||
| ||||
#: howto/descriptor.rst:822 | ||||
#: howto/descriptor.rst:842 | ||||
msgid "" | ||||
"Since the update logic is in :meth:`type.__new__`, notifications only take " | ||||
"place at the time of class creation. If descriptors are added to the class " | ||||
| | @ -893,22 +893,23 @@ msgstr "" | |||
"descripteurs sont ajoutés à la classe par la suite, :meth:`__set_name__` " | ||||
"doit être appelée manuellement." | ||||
| ||||
#: howto/descriptor.rst:828 | ||||
#: howto/descriptor.rst:848 | ||||
msgid "ORM example" | ||||
msgstr "Exemple d'ORM" | ||||
| ||||
#: howto/descriptor.rst:830 | ||||
#: howto/descriptor.rst:850 | ||||
#, fuzzy | ||||
msgid "" | ||||
"The following code is simplified skeleton showing how data descriptors could " | ||||
"be used to implement an `object relational mapping <https://en.wikipedia.org/" | ||||
"wiki/Object%E2%80%93relational_mapping>`_." | ||||
"The following code is a simplified skeleton showing how data descriptors " | ||||
"could be used to implement an `object relational mapping <https://en." | ||||
"wikipedia.org/wiki/Object%E2%80%93relational_mapping>`_." | ||||
msgstr "" | ||||
"Le code suivant est une ossature simplifiée montrant comment les " | ||||
"descripteurs de données peuvent être utilisés pour implémenter une " | ||||
"`correspondance objet-relationnel <https://fr.wikipedia.org/wiki/" | ||||
"Mapping_objet-relationnel>`_." | ||||
| ||||
#: howto/descriptor.rst:834 | ||||
#: howto/descriptor.rst:854 | ||||
msgid "" | ||||
"The essential idea is that the data is stored in an external database. The " | ||||
"Python instances only hold keys to the database's tables. Descriptors take " | ||||
| | @ -919,7 +920,7 @@ msgstr "" | |||
"de la base de données. Les descripteurs s'occupent des recherches et des " | ||||
"mises à jour :" | ||||
| ||||
#: howto/descriptor.rst:853 | ||||
#: howto/descriptor.rst:873 | ||||
msgid "" | ||||
"We can use the :class:`Field` class to define `models <https://en.wikipedia." | ||||
"org/wiki/Database_model>`_ that describe the schema for each table in a " | ||||
| | @ -929,12 +930,12 @@ msgstr "" | |||
"<https://en.wikipedia.org/wiki/Database_model>`_ qui décrivent le schéma de " | ||||
"chaque table d'une base de données :" | ||||
| ||||
#: howto/descriptor.rst:878 | ||||
#: 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:883 | ||||
#: howto/descriptor.rst:903 | ||||
msgid "" | ||||
"An interactive session shows how data is retrieved from the database and how " | ||||
"it can be updated:" | ||||
| | @ -942,16 +943,16 @@ 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:928 | ||||
#: howto/descriptor.rst:948 | ||||
msgid "Pure Python Equivalents" | ||||
msgstr "Équivalents en Python pur" | ||||
| ||||
#: howto/descriptor.rst:930 | ||||
#: howto/descriptor.rst:950 | ||||
msgid "" | ||||
"The descriptor protocol is simple and offers exciting possibilities. " | ||||
"Several use cases are so common that they have been prepackaged into built-" | ||||
"in tools. Properties, bound methods, static methods, class methods, and \\_" | ||||
"\\_slots\\_\\_ are all based on the descriptor protocol." | ||||
"in tools. Properties, bound methods, static methods, class methods, and " | ||||
"\\_\\_slots\\_\\_ are all based on the descriptor protocol." | ||||
msgstr "" | ||||
"Le protocole descripteur est simple et offre des possibilités très " | ||||
"intéressantes. Plusieurs cas d'utilisation sont si courants qu'ils ont été " | ||||
| | @ -959,11 +960,11 @@ msgstr "" | |||
"méthodes statiques et les méthodes de classe sont toutes basées sur le " | ||||
"protocole descripteur." | ||||
| ||||
#: howto/descriptor.rst:937 | ||||
#: howto/descriptor.rst:957 | ||||
msgid "Properties" | ||||
msgstr "Propriétés" | ||||
| ||||
#: howto/descriptor.rst:939 | ||||
#: howto/descriptor.rst:959 | ||||
msgid "" | ||||
"Calling :func:`property` is a succinct way of building a data descriptor " | ||||
"that triggers a function call upon access to an attribute. Its signature " | ||||
| | @ -973,14 +974,14 @@ msgstr "" | |||
"données qui déclenche un appel de fonction lors de l'accès à un attribut. Sa " | ||||
"signature est ::" | ||||
| ||||
#: howto/descriptor.rst:944 | ||||
#: howto/descriptor.rst:964 | ||||
msgid "" | ||||
"The documentation shows a typical use to define a managed attribute ``x``:" | ||||
msgstr "" | ||||
"La documentation montre une utilisation caractéristique pour définir un " | ||||
"attribut géré ``x`` ::" | ||||
| ||||
#: howto/descriptor.rst:968 | ||||
#: howto/descriptor.rst:988 | ||||
msgid "" | ||||
"To see how :func:`property` is implemented in terms of the descriptor " | ||||
"protocol, here is a pure Python equivalent:" | ||||
| | @ -988,7 +989,7 @@ msgstr "" | |||
"Pour voir comment :func:`property` est implémentée dans le protocole du " | ||||
"descripteur, voici un équivalent en Python pur ::" | ||||
| ||||
#: howto/descriptor.rst:1071 | ||||
#: howto/descriptor.rst:1091 | ||||
msgid "" | ||||
"The :func:`property` builtin helps whenever a user interface has granted " | ||||
"attribute access and then subsequent changes require the intervention of a " | ||||
| | @ -998,7 +999,7 @@ msgstr "" | |||
"utilisateur a accordé l'accès à un attribut et que des modifications " | ||||
"ultérieures nécessitent l'intervention d'une méthode." | ||||
| ||||
#: howto/descriptor.rst:1075 | ||||
#: howto/descriptor.rst:1095 | ||||
msgid "" | ||||
"For instance, a spreadsheet class may grant access to a cell value through " | ||||
"``Cell('b10').value``. Subsequent improvements to the program require the " | ||||
| | @ -1014,7 +1015,7 @@ msgstr "" | |||
"directement à l'attribut. La solution consiste à envelopper l'accès à " | ||||
"l'attribut *value* dans un descripteur de données ::" | ||||
| ||||
#: howto/descriptor.rst:1092 | ||||
#: howto/descriptor.rst:1112 | ||||
msgid "" | ||||
"Either the built-in :func:`property` or our :func:`Property` equivalent " | ||||
"would work in this example." | ||||
| | @ -1022,11 +1023,11 @@ msgstr "" | |||
"Soit la :func:`property` native, soit notre équivalent :func:`Property` " | ||||
"fonctionnent dans cet exemple." | ||||
| ||||
#: howto/descriptor.rst:1097 | ||||
#: howto/descriptor.rst:1117 | ||||
msgid "Functions and methods" | ||||
msgstr "Fonctions et méthodes" | ||||
| ||||
#: howto/descriptor.rst:1099 | ||||
#: howto/descriptor.rst:1119 | ||||
msgid "" | ||||
"Python's object oriented features are built upon a function based " | ||||
"environment. Using non-data descriptors, the two are merged seamlessly." | ||||
| | @ -1035,7 +1036,7 @@ msgstr "" | |||
"environnement basé sur des fonctions. À l'aide de descripteurs hors-données, " | ||||
"les deux sont fusionnés de façon transparente." | ||||
| ||||
#: howto/descriptor.rst:1102 | ||||
#: howto/descriptor.rst:1122 | ||||
msgid "" | ||||
"Functions stored in class dictionaries get turned into methods when invoked. " | ||||
"Methods only differ from regular functions in that the object instance is " | ||||
| | @ -1049,7 +1050,7 @@ msgstr "" | |||
"*self*, bien qu'il soit possible de l'appeler *this* ou tout autre nom de " | ||||
"variable." | ||||
| ||||
#: howto/descriptor.rst:1107 | ||||
#: howto/descriptor.rst:1127 | ||||
msgid "" | ||||
"Methods can be created manually with :class:`types.MethodType` which is " | ||||
"roughly equivalent to:" | ||||
| | @ -1057,7 +1058,7 @@ msgstr "" | |||
"Les méthodes peuvent être créées manuellement avec :class:`types." | ||||
"MethodType`, qui équivaut à peu près à :" | ||||
| ||||
#: howto/descriptor.rst:1124 | ||||
#: howto/descriptor.rst:1144 | ||||
msgid "" | ||||
"To support automatic creation of methods, functions include the :meth:" | ||||
"`__get__` method for binding methods during attribute access. This means " | ||||
| | @ -1070,7 +1071,7 @@ msgstr "" | |||
"hors-données qui renvoient des méthodes liées au cours d'une recherche " | ||||
"d'attribut d'une instance. Cela fonctionne ainsi ::" | ||||
| ||||
#: howto/descriptor.rst:1140 | ||||
#: howto/descriptor.rst:1160 | ||||
msgid "" | ||||
"Running the following class in the interpreter shows how the function " | ||||
"descriptor works in practice:" | ||||
| | @ -1078,14 +1079,14 @@ msgstr "" | |||
"L'exécution de la classe suivante dans l'interpréteur montre comment le " | ||||
"descripteur de fonction se comporte en pratique ::" | ||||
| ||||
#: howto/descriptor.rst:1149 | ||||
#: howto/descriptor.rst:1169 | ||||
msgid "" | ||||
"The function has a :term:`qualified name` attribute to support introspection:" | ||||
msgstr "" | ||||
"La fonction possède un attribut `__qualname__` (:term:`nom " | ||||
"qualifié<qualified name>`) pour prendre en charge l'introspection :" | ||||
| ||||
#: howto/descriptor.rst:1156 | ||||
#: 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::" | ||||
| | @ -1094,7 +1095,7 @@ msgstr "" | |||
"`__get__`. À la place, il renvoie simplement l'objet de fonction sous-" | ||||
"jacent ::" | ||||
| ||||
#: howto/descriptor.rst:1162 | ||||
#: howto/descriptor.rst:1182 | ||||
msgid "" | ||||
"Dotted access from a class calls :meth:`__get__` which just returns the " | ||||
"underlying function unchanged::" | ||||
| | @ -1102,7 +1103,7 @@ msgstr "" | |||
"La recherche d'attribut depuis une classe appelle :meth:`__get__`, qui " | ||||
"renvoie simplement la fonction sous-jacente inchangée ::" | ||||
| ||||
#: howto/descriptor.rst:1168 | ||||
#: 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::" | ||||
| | @ -1111,7 +1112,7 @@ msgstr "" | |||
"partir d'une instance. La recherche d'attribut appelle :meth:`__get__` qui " | ||||
"renvoie un objet « méthode liée » ::" | ||||
| ||||
#: howto/descriptor.rst:1175 | ||||
#: howto/descriptor.rst:1195 | ||||
msgid "" | ||||
"Internally, the bound method stores the underlying function and the bound " | ||||
"instance::" | ||||
| | @ -1119,7 +1120,7 @@ msgstr "" | |||
"En interne, la méthode liée stocke la fonction sous-jacente et l'instance " | ||||
"liée ::" | ||||
| ||||
#: howto/descriptor.rst:1184 | ||||
#: 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!" | ||||
| | @ -1127,11 +1128,11 @@ 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:1189 | ||||
#: howto/descriptor.rst:1209 | ||||
msgid "Kinds of methods" | ||||
msgstr "Types de méthodes" | ||||
| ||||
#: howto/descriptor.rst:1191 | ||||
#: howto/descriptor.rst:1211 | ||||
msgid "" | ||||
"Non-data descriptors provide a simple mechanism for variations on the usual " | ||||
"patterns of binding functions into methods." | ||||
| | @ -1139,7 +1140,7 @@ msgstr "" | |||
"Les descripteurs hors-données constituent un moyen simple pour modifier le " | ||||
"modèle usuel de transformation des fonctions en méthodes." | ||||
| ||||
#: howto/descriptor.rst:1194 | ||||
#: howto/descriptor.rst:1214 | ||||
msgid "" | ||||
"To recap, functions have a :meth:`__get__` method so that they can be " | ||||
"converted to a method when accessed as attributes. The non-data descriptor " | ||||
| | @ -1151,57 +1152,57 @@ msgstr "" | |||
"descripteur hors-données transforme un appel ``obj.f(*args)`` en ``f(obj, " | ||||
"*args)``. L'appel ``cls.f(*args)`` devient ``f(*args)``." | ||||
| ||||
#: howto/descriptor.rst:1199 | ||||
#: howto/descriptor.rst:1219 | ||||
msgid "This chart summarizes the binding and its two most useful variants:" | ||||
msgstr "" | ||||
"Ce tableau résume le lien classique (*binding*) et ses deux variantes les " | ||||
"plus utiles ::" | ||||
| ||||
#: howto/descriptor.rst:1202 | ||||
#: howto/descriptor.rst:1222 | ||||
msgid "Transformation" | ||||
msgstr "Transformation" | ||||
| ||||
#: howto/descriptor.rst:1202 | ||||
#: howto/descriptor.rst:1222 | ||||
msgid "Called from an object" | ||||
msgstr "Appelée depuis un objet" | ||||
| ||||
#: howto/descriptor.rst:1202 | ||||
#: howto/descriptor.rst:1222 | ||||
msgid "Called from a class" | ||||
msgstr "Appelée depuis une classe" | ||||
| ||||
#: howto/descriptor.rst:1205 | ||||
#: howto/descriptor.rst:1225 | ||||
msgid "function" | ||||
msgstr "fonction" | ||||
| ||||
#: howto/descriptor.rst:1205 | ||||
#: howto/descriptor.rst:1225 | ||||
msgid "f(obj, \\*args)" | ||||
msgstr "f(obj, \\*args)" | ||||
| ||||
#: howto/descriptor.rst:1207 | ||||
#: howto/descriptor.rst:1227 | ||||
msgid "f(\\*args)" | ||||
msgstr "f(\\*args)" | ||||
| ||||
#: howto/descriptor.rst:1207 | ||||
#: howto/descriptor.rst:1227 | ||||
msgid "staticmethod" | ||||
msgstr "méthode statique" | ||||
| ||||
#: howto/descriptor.rst:1209 | ||||
#: howto/descriptor.rst:1229 | ||||
msgid "classmethod" | ||||
msgstr "méthode de classe" | ||||
| ||||
#: howto/descriptor.rst:1209 | ||||
#: howto/descriptor.rst:1229 | ||||
msgid "f(type(obj), \\*args)" | ||||
msgstr "f(type(obj), \\*args)" | ||||
| ||||
#: howto/descriptor.rst:1209 | ||||
#: howto/descriptor.rst:1229 | ||||
msgid "f(cls, \\*args)" | ||||
msgstr "f(cls, \\*args)" | ||||
| ||||
#: howto/descriptor.rst:1214 | ||||
#: howto/descriptor.rst:1234 | ||||
msgid "Static methods" | ||||
msgstr "Méthodes statiques" | ||||
| ||||
#: howto/descriptor.rst:1216 | ||||
#: howto/descriptor.rst:1236 | ||||
msgid "" | ||||
"Static methods return the underlying function without changes. Calling " | ||||
"either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object." | ||||
| | @ -1211,11 +1212,11 @@ msgid "" | |||
msgstr "" | ||||
"Les méthodes statiques renvoient la fonction sous-jacente sans modification. " | ||||
"Appeler ``c.f`` ou ``C.f`` est l'équivalent d'une recherche directe dans " | ||||
"``objet.__getattribute__(c, \"f\")`` ou ``objet.__getattribute__(C, \"f" | ||||
"\")``. Par conséquent, l'accès à la fonction devient identique que ce soit à " | ||||
"partir d'un objet ou d'une classe." | ||||
"``objet.__getattribute__(c, \"f\")`` ou ``objet.__getattribute__(C, " | ||||
"\"f\")``. Par conséquent, l'accès à la fonction devient identique que ce " | ||||
"soit à partir d'un objet ou d'une classe." | ||||
| ||||
#: howto/descriptor.rst:1222 | ||||
#: howto/descriptor.rst:1242 | ||||
msgid "" | ||||
"Good candidates for static methods are methods that do not reference the " | ||||
"``self`` variable." | ||||
| | @ -1223,7 +1224,7 @@ msgstr "" | |||
"Les bonnes candidates pour être méthode statique sont des méthodes qui ne " | ||||
"font pas référence à la variable ``self``." | ||||
| ||||
#: howto/descriptor.rst:1225 | ||||
#: howto/descriptor.rst:1245 | ||||
msgid "" | ||||
"For instance, a statistics package may include a container class for " | ||||
"experimental data. The class provides normal methods for computing the " | ||||
| | @ -1245,7 +1246,7 @@ msgstr "" | |||
"partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou ``Sample." | ||||
"erf(1.5) --> .9332``." | ||||
| ||||
#: howto/descriptor.rst:1234 | ||||
#: howto/descriptor.rst:1254 | ||||
msgid "" | ||||
"Since static methods return the underlying function with no changes, the " | ||||
"example calls are unexciting:" | ||||
| | @ -1253,7 +1254,7 @@ msgstr "" | |||
"Puisque les méthodes statiques renvoient la fonction sous-jacente sans " | ||||
"changement, les exemples d’appels sont d'une grande banalité ::" | ||||
| ||||
#: howto/descriptor.rst:1251 | ||||
#: howto/descriptor.rst:1271 | ||||
msgid "" | ||||
"Using the non-data descriptor protocol, a pure Python version of :func:" | ||||
"`staticmethod` would look like this:" | ||||
| | @ -1261,11 +1262,11 @@ msgstr "" | |||
"En utilisant le protocole de descripteur hors-données, une version Python " | ||||
"pure de :func:`staticmethod` ressemblerait à ceci ::" | ||||
| ||||
#: howto/descriptor.rst:1290 | ||||
#: howto/descriptor.rst:1310 | ||||
msgid "Class methods" | ||||
msgstr "Méthodes de classe" | ||||
| ||||
#: howto/descriptor.rst:1292 | ||||
#: howto/descriptor.rst:1312 | ||||
msgid "" | ||||
"Unlike static methods, class methods prepend the class reference to the " | ||||
"argument list before calling the function. This format is the same for " | ||||
| | @ -1275,7 +1276,7 @@ msgstr "" | |||
"référence de classe en tête de la liste d'arguments, avant d'appeler la " | ||||
"fonction. C'est le même format que l'appelant soit un objet ou une classe ::" | ||||
| ||||
#: howto/descriptor.rst:1310 | ||||
#: howto/descriptor.rst:1330 | ||||
msgid "" | ||||
"This behavior is useful whenever the method only needs to have a class " | ||||
"reference and does not rely on data stored in a specific instance. One use " | ||||
| | @ -1290,13 +1291,13 @@ msgstr "" | |||
"func:`dict.fromkeys` crée un nouveau dictionnaire à partir d'une liste de " | ||||
"clés. L'équivalent Python pur est ::" | ||||
| ||||
#: howto/descriptor.rst:1327 | ||||
#: howto/descriptor.rst:1347 | ||||
msgid "Now a new dictionary of unique keys can be constructed like this:" | ||||
msgstr "" | ||||
"Maintenant un nouveau dictionnaire de clés uniques peut être construit comme " | ||||
"ceci :" | ||||
| ||||
#: howto/descriptor.rst:1337 | ||||
#: howto/descriptor.rst:1357 | ||||
msgid "" | ||||
"Using the non-data descriptor protocol, a pure Python version of :func:" | ||||
"`classmethod` would look like this:" | ||||
| | @ -1304,7 +1305,7 @@ msgstr "" | |||
"En utilisant le protocole de descripteur hors-données, une version Python " | ||||
"pure de :func:`classmethod` ressemblerait à ceci :" | ||||
| ||||
#: howto/descriptor.rst:1388 | ||||
#: howto/descriptor.rst:1408 | ||||
msgid "" | ||||
"The code path for ``hasattr(type(self.f), '__get__')`` was added in Python " | ||||
"3.9 and makes it possible for :func:`classmethod` to support chained " | ||||
| | @ -1317,11 +1318,11 @@ msgstr "" | |||
"être chaîné à un décorateur « propriété ». Dans Python 3.11, cette " | ||||
"fonctionnalité est devenue obsolète." | ||||
| ||||
#: howto/descriptor.rst:1408 | ||||
#: howto/descriptor.rst:1428 | ||||
msgid "Member objects and __slots__" | ||||
msgstr "Objets membres et *__slots__*" | ||||
| ||||
#: howto/descriptor.rst:1410 | ||||
#: howto/descriptor.rst:1430 | ||||
msgid "" | ||||
"When a class defines ``__slots__``, it replaces instance dictionaries with a " | ||||
"fixed-length array of slot values. From a user point of view that has " | ||||
| | @ -1331,7 +1332,7 @@ msgstr "" | |||
"d'instance par un tableau de longueur fixe de créneaux prédéfinis. D'un " | ||||
"point de vue utilisateur, cela :" | ||||
| ||||
#: howto/descriptor.rst:1414 | ||||
#: howto/descriptor.rst:1434 | ||||
msgid "" | ||||
"1. Provides immediate detection of bugs due to misspelled attribute " | ||||
"assignments. Only attribute names specified in ``__slots__`` are allowed:" | ||||
| | @ -1340,7 +1341,7 @@ msgstr "" | |||
"d'attributs mal orthographiés. Seuls les noms d'attribut spécifiés dans " | ||||
"``__slots__`` sont autorisés :" | ||||
| ||||
#: howto/descriptor.rst:1430 | ||||
#: howto/descriptor.rst:1450 | ||||
msgid "" | ||||
"2. Helps create immutable objects where descriptors manage access to private " | ||||
"attributes stored in ``__slots__``:" | ||||
| | @ -1348,7 +1349,7 @@ 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:1465 | ||||
#: howto/descriptor.rst:1485 | ||||
msgid "" | ||||
"3. Saves memory. On a 64-bit Linux build, an instance with two attributes " | ||||
"takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight " | ||||
| | @ -1361,7 +1362,7 @@ msgstr "" | |||
"mouche_(patron_de_conception)>`_ n'a probablement d'importance que si un " | ||||
"grand nombre d'instances doivent être créées ;" | ||||
| ||||
#: howto/descriptor.rst:1470 | ||||
#: howto/descriptor.rst:1490 | ||||
msgid "" | ||||
"4. Improves speed. Reading instance variables is 35% faster with " | ||||
"``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." | ||||
| | @ -1370,7 +1371,7 @@ msgstr "" | |||
"rapide avec ``__slots__`` (mesure effectuée avec Python 3.10 sur un " | ||||
"processeur Apple M1) ;" | ||||
| ||||
#: howto/descriptor.rst:1473 | ||||
#: howto/descriptor.rst:1493 | ||||
msgid "" | ||||
"5. Blocks tools like :func:`functools.cached_property` which require an " | ||||
"instance dictionary to function correctly:" | ||||
| | @ -1378,7 +1379,7 @@ msgstr "" | |||
"5/ bloque les outils comme :func:`functools.cached_property` qui nécessitent " | ||||
"un dictionnaire d'instance pour fonctionner correctement :" | ||||
| ||||
#: howto/descriptor.rst:1495 | ||||
#: howto/descriptor.rst:1515 | ||||
msgid "" | ||||
"It is not possible to create an exact drop-in pure Python version of " | ||||
"``__slots__`` because it requires direct access to C structures and control " | ||||
| | @ -1395,7 +1396,7 @@ msgstr "" | |||
"écritures dans cette structure privée sont gérées par des descripteurs de " | ||||
"membres :" | ||||
| ||||
#: howto/descriptor.rst:1538 | ||||
#: howto/descriptor.rst:1560 | ||||
msgid "" | ||||
"The :meth:`type.__new__` method takes care of adding member objects to class " | ||||
"variables:" | ||||
| | @ -1403,7 +1404,7 @@ msgstr "" | |||
"La méthode :meth:`type.__new__` s'occupe d'ajouter des objets membres aux " | ||||
"variables de classe :" | ||||
| ||||
#: howto/descriptor.rst:1554 | ||||
#: howto/descriptor.rst:1576 | ||||
msgid "" | ||||
"The :meth:`object.__new__` method takes care of creating instances that have " | ||||
"slots instead of an instance dictionary. Here is a rough simulation in pure " | ||||
| | @ -1413,7 +1414,7 @@ msgstr "" | |||
"des *slots* au lieu d'un dictionnaire d'instances. Voici une simulation " | ||||
"approximative en Python pur :" | ||||
| ||||
#: howto/descriptor.rst:1589 | ||||
#: howto/descriptor.rst:1611 | ||||
msgid "" | ||||
"To use the simulation in a real class, just inherit from :class:`Object` and " | ||||
"set the :term:`metaclass` to :class:`Type`:" | ||||
| | @ -1422,13 +1423,13 @@ msgstr "" | |||
"class:`Object` et définissez la :term:`métaclasse <metaclass>` à :class:" | ||||
"`Type` :" | ||||
| ||||
#: howto/descriptor.rst:1603 | ||||
#: howto/descriptor.rst:1625 | ||||
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:1624 | ||||
#: howto/descriptor.rst:1646 | ||||
msgid "" | ||||
"When instances are created, they have a ``slot_values`` list where the " | ||||
"attributes are stored:" | ||||
| | @ -1436,7 +1437,7 @@ msgstr "" | |||
"Lorsque les instances sont créées, elles ont une liste ``slot_values`` où " | ||||
"les attributs sont stockés :" | ||||
| ||||
#: howto/descriptor.rst:1636 | ||||
#: howto/descriptor.rst:1658 | ||||
msgid "Misspelled or unassigned attributes will raise an exception:" | ||||
msgstr "" | ||||
"Les attributs mal orthographiés ou non attribués lèvent une exception :" | ||||
| | | |||
444 howto/enum.po
444
howto/enum.po File diff suppressed because it is too large Load diff
File diff suppressed because it is too large Load diff
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-03-23 18:39+0100\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2021-11-06 19:31+0100\n" | ||||
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -141,9 +141,10 @@ msgstr "" | |||
"métadonnées ::" | ||||
| ||||
#: howto/instrumentation.rst:125 | ||||
#, fuzzy | ||||
msgid "" | ||||
"The above metadata contains information for SystemTap describing how it can " | ||||
"patch strategically-placed machine code instructions to enable the tracing " | ||||
"patch strategically placed machine code instructions to enable the tracing " | ||||
"hooks used by a SystemTap script." | ||||
msgstr "" | ||||
"Les métadonnées ci-dessus contiennent des informations pour *SystemTap* " | ||||
| | @ -421,9 +422,10 @@ msgstr "" | |||
"statiques ::" | ||||
| ||||
#: howto/instrumentation.rst:412 | ||||
#, fuzzy | ||||
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 " | ||||
"running CPython code, showing the top 20 most frequently entered bytecode " | ||||
"frames, each second, across the whole system:" | ||||
msgstr "" | ||||
"Le script suivant utilise le *tapset* ci-dessus pour fournir une vue de " | ||||
| | | |||
632 howto/isolating-extensions.po Normal file
632
howto/isolating-extensions.po Normal file | | @ -0,0 +1,632 @@ | |||
# SOME DESCRIPTIVE TITLE. | ||||
# Copyright (C) 2001-2023, Python Software Foundation | ||||
# This file is distributed under the same license as the Python package. | ||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||||
# | ||||
#, fuzzy | ||||
msgid "" | ||||
msgstr "" | ||||
"Project-Id-Version: Python 3.11\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
| ||||
#: howto/isolating-extensions.rst:5 | ||||
msgid "Isolating Extension Modules" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:None | ||||
msgid "Abstract" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:9 | ||||
msgid "" | ||||
"Traditionally, state belonging to Python extension modules was kept in C " | ||||
"``static`` variables, which have process-wide scope. This document describes " | ||||
"problems of such per-process state and shows a safer way: per-module state." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:14 | ||||
msgid "" | ||||
"The document also describes how to switch to per-module state where " | ||||
"possible. This transition involves allocating space for that state, " | ||||
"potentially switching from static types to heap types, and—perhaps most " | ||||
"importantly—accessing per-module state from code." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:21 | ||||
msgid "Who should read this" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:23 | ||||
msgid "" | ||||
"This guide is written for maintainers of :ref:`C-API <c-api-index>` " | ||||
"extensions who would like to make that extension safer to use in " | ||||
"applications where Python itself is used as a library." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:29 | ||||
msgid "Background" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:31 | ||||
msgid "" | ||||
"An *interpreter* is the context in which Python code runs. It contains " | ||||
"configuration (e.g. the import path) and runtime state (e.g. the set of " | ||||
"imported modules)." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:35 | ||||
msgid "" | ||||
"Python supports running multiple interpreters in one process. There are two " | ||||
"cases to think about—users may run interpreters:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:38 | ||||
msgid "" | ||||
"in sequence, with several :c:func:`Py_InitializeEx`/:c:func:`Py_FinalizeEx` " | ||||
"cycles, and" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:40 | ||||
msgid "" | ||||
"in parallel, managing \"sub-interpreters\" using :c:func:" | ||||
"`Py_NewInterpreter`/:c:func:`Py_EndInterpreter`." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:43 | ||||
msgid "" | ||||
"Both cases (and combinations of them) would be most useful when embedding " | ||||
"Python within a library. Libraries generally shouldn't make assumptions " | ||||
"about the application that uses them, which include assuming a process-wide " | ||||
"\"main Python interpreter\"." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:48 | ||||
msgid "" | ||||
"Historically, Python extension modules don't handle this use case well. Many " | ||||
"extension modules (and even some stdlib modules) use *per-process* global " | ||||
"state, because C ``static`` variables are extremely easy to use. Thus, data " | ||||
"that should be specific to an interpreter ends up being shared between " | ||||
"interpreters. Unless the extension developer is careful, it is very easy to " | ||||
"introduce edge cases that lead to crashes when a module is loaded in more " | ||||
"than one interpreter in the same process." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:56 | ||||
msgid "" | ||||
"Unfortunately, *per-interpreter* state is not easy to achieve. Extension " | ||||
"authors tend to not keep multiple interpreters in mind when developing, and " | ||||
"it is currently cumbersome to test the behavior." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:61 | ||||
msgid "Enter Per-Module State" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:63 | ||||
msgid "" | ||||
"Instead of focusing on per-interpreter state, Python's C API is evolving to " | ||||
"better support the more granular *per-module* state. This means that C-level " | ||||
"data is be attached to a *module object*. Each interpreter creates its own " | ||||
"module object, keeping the data separate. For testing the isolation, " | ||||
"multiple module objects corresponding to a single extension can even be " | ||||
"loaded in a single interpreter." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:70 | ||||
msgid "" | ||||
"Per-module state provides an easy way to think about lifetime and resource " | ||||
"ownership: the extension module will initialize when a module object is " | ||||
"created, and clean up when it's freed. In this regard, a module is just like " | ||||
"any other :c:expr:`PyObject *`; there are no \"on interpreter shutdown\" " | ||||
"hooks to think—or forget—about." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:76 | ||||
msgid "" | ||||
"Note that there are use cases for different kinds of \"globals\": per-" | ||||
"process, per-interpreter, per-thread or per-task state. With per-module " | ||||
"state as the default, these are still possible, but you should treat them as " | ||||
"exceptional cases: if you need them, you should give them additional care " | ||||
"and testing. (Note that this guide does not cover them.)" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:85 | ||||
msgid "Isolated Module Objects" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:87 | ||||
msgid "" | ||||
"The key point to keep in mind when developing an extension module is that " | ||||
"several module objects can be created from a single shared library. For " | ||||
"example:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:101 | ||||
msgid "" | ||||
"As a rule of thumb, the two modules should be completely independent. All " | ||||
"objects and state specific to the module should be encapsulated within the " | ||||
"module object, not shared with other module objects, and cleaned up when the " | ||||
"module object is deallocated. Since this just is a rule of thumb, exceptions " | ||||
"are possible (see `Managing Global State`_), but they will need more thought " | ||||
"and attention to edge cases." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:109 | ||||
msgid "" | ||||
"While some modules could do with less stringent restrictions, isolated " | ||||
"modules make it easier to set clear expectations and guidelines that work " | ||||
"across a variety of use cases." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:115 | ||||
msgid "Surprising Edge Cases" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:117 | ||||
msgid "" | ||||
"Note that isolated modules do create some surprising edge cases. Most " | ||||
"notably, each module object will typically not share its classes and " | ||||
"exceptions with other similar modules. Continuing from the `example above " | ||||
"<Isolated Module Objects_>`__, note that ``old_binascii.Error`` and " | ||||
"``binascii.Error`` are separate objects. In the following code, the " | ||||
"exception is *not* caught:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:137 | ||||
msgid "" | ||||
"This is expected. Notice that pure-Python modules behave the same way: it is " | ||||
"a part of how Python works." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:140 | ||||
msgid "" | ||||
"The goal is to make extension modules safe at the C level, not to make hacks " | ||||
"behave intuitively. Mutating ``sys.modules`` \"manually\" counts as a hack." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:146 | ||||
msgid "Making Modules Safe with Multiple Interpreters" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:150 | ||||
msgid "Managing Global State" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:152 | ||||
msgid "" | ||||
"Sometimes, the state associated with a Python module is not specific to that " | ||||
"module, but to the entire process (or something else \"more global\" than a " | ||||
"module). For example:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:156 | ||||
msgid "The ``readline`` module manages *the* terminal." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:157 | ||||
msgid "" | ||||
"A module running on a circuit board wants to control *the* on-board LED." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:160 | ||||
msgid "" | ||||
"In these cases, the Python module should provide *access* to the global " | ||||
"state, rather than *own* it. If possible, write the module so that multiple " | ||||
"copies of it can access the state independently (along with other libraries, " | ||||
"whether for Python or other languages). If that is not possible, consider " | ||||
"explicit locking." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:166 | ||||
msgid "" | ||||
"If it is necessary to use process-global state, the simplest way to avoid " | ||||
"issues with multiple interpreters is to explicitly prevent a module from " | ||||
"being loaded more than once per process—see `Opt-Out: Limiting to One Module " | ||||
"Object per Process`_." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:173 | ||||
msgid "Managing Per-Module State" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:175 | ||||
msgid "" | ||||
"To use per-module state, use :ref:`multi-phase extension module " | ||||
"initialization <multi-phase-initialization>`. This signals that your module " | ||||
"supports multiple interpreters correctly." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:179 | ||||
msgid "" | ||||
"Set ``PyModuleDef.m_size`` to a positive number to request that many bytes " | ||||
"of storage local to the module. Usually, this will be set to the size of " | ||||
"some module-specific ``struct``, which can store all of the module's C-level " | ||||
"state. In particular, it is where you should put pointers to classes " | ||||
"(including exceptions, but excluding static types) and settings (e.g. " | ||||
"``csv``'s :py:data:`~csv.field_size_limit`) which the C code needs to " | ||||
"function." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:188 | ||||
msgid "" | ||||
"Another option is to store state in the module's ``__dict__``, but you must " | ||||
"avoid crashing when users modify ``__dict__`` from Python code. This usually " | ||||
"means error- and type-checking at the C level, which is easy to get wrong " | ||||
"and hard to test sufficiently." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:193 | ||||
msgid "" | ||||
"However, if module state is not needed in C code, storing it in ``__dict__`` " | ||||
"only is a good idea." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:196 | ||||
msgid "" | ||||
"If the module state includes ``PyObject`` pointers, the module object must " | ||||
"hold references to those objects and implement the module-level hooks " | ||||
"``m_traverse``, ``m_clear`` and ``m_free``. These work like ``tp_traverse``, " | ||||
"``tp_clear`` and ``tp_free`` of a class. Adding them will require some work " | ||||
"and make the code longer; this is the price for modules which can be " | ||||
"unloaded cleanly." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:203 | ||||
msgid "" | ||||
"An example of a module with per-module state is currently available as " | ||||
"`xxlimited <https://github.com/python/cpython/blob/master/Modules/xxlimited." | ||||
"c>`__; example module initialization shown at the bottom of the file." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:209 | ||||
msgid "Opt-Out: Limiting to One Module Object per Process" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:211 | ||||
msgid "" | ||||
"A non-negative ``PyModuleDef.m_size`` signals that a module supports " | ||||
"multiple interpreters correctly. If this is not yet the case for your " | ||||
"module, you can explicitly make your module loadable only once per process. " | ||||
"For example::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:232 | ||||
msgid "Module State Access from Functions" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:234 | ||||
msgid "" | ||||
"Accessing the state from module-level functions is straightforward. " | ||||
"Functions get the module object as their first argument; for extracting the " | ||||
"state, you can use ``PyModule_GetState``::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:249 | ||||
msgid "" | ||||
"``PyModule_GetState`` may return ``NULL`` without setting an exception if " | ||||
"there is no module state, i.e. ``PyModuleDef.m_size`` was zero. In your own " | ||||
"module, you're in control of ``m_size``, so this is easy to prevent." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:256 | ||||
msgid "Heap Types" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:258 | ||||
msgid "" | ||||
"Traditionally, types defined in C code are *static*; that is, ``static " | ||||
"PyTypeObject`` structures defined directly in code and initialized using " | ||||
"``PyType_Ready()``." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:262 | ||||
msgid "" | ||||
"Such types are necessarily shared across the process. Sharing them between " | ||||
"module objects requires paying attention to any state they own or access. To " | ||||
"limit the possible issues, static types are immutable at the Python level: " | ||||
"for example, you can't set ``str.myattribute = 123``." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:268 | ||||
msgid "" | ||||
"Sharing truly immutable objects between interpreters is fine, as long as " | ||||
"they don't provide access to mutable objects. However, in CPython, every " | ||||
"Python object has a mutable implementation detail: the reference count. " | ||||
"Changes to the refcount are guarded by the GIL. Thus, code that shares any " | ||||
"Python objects across interpreters implicitly depends on CPython's current, " | ||||
"process-wide GIL." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:275 | ||||
msgid "" | ||||
"Because they are immutable and process-global, static types cannot access " | ||||
"\"their\" module state. If any method of such a type requires access to " | ||||
"module state, the type must be converted to a *heap-allocated type*, or " | ||||
"*heap type* for short. These correspond more closely to classes created by " | ||||
"Python's ``class`` statement." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:282 | ||||
msgid "For new modules, using heap types by default is a good rule of thumb." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:286 | ||||
msgid "Changing Static Types to Heap Types" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:288 | ||||
msgid "" | ||||
"Static types can be converted to heap types, but note that the heap type API " | ||||
"was not designed for \"lossless\" conversion from static types—that is, " | ||||
"creating a type that works exactly like a given static type. So, when " | ||||
"rewriting the class definition in a new API, you are likely to " | ||||
"unintentionally change a few details (e.g. pickleability or inherited " | ||||
"slots). Always test the details that are important to you." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:297 | ||||
msgid "" | ||||
"Watch out for the following two points in particular (but note that this is " | ||||
"not a comprehensive list):" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:300 | ||||
msgid "" | ||||
"Unlike static types, heap type objects are mutable by default. Use the :c:" | ||||
"data:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:302 | ||||
msgid "" | ||||
"Heap types inherit :c:member:`~PyTypeObject.tp_new` by default, so it may " | ||||
"become possible to instantiate them from Python code. You can prevent this " | ||||
"with the :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:308 | ||||
msgid "Defining Heap Types" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:310 | ||||
msgid "" | ||||
"Heap types can be created by filling a :c:struct:`PyType_Spec` structure, a " | ||||
"description or \"blueprint\" of a class, and calling :c:func:" | ||||
"`PyType_FromModuleAndSpec` to construct a new class object." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:315 | ||||
msgid "" | ||||
"Other functions, like :c:func:`PyType_FromSpec`, can also create heap types, " | ||||
"but :c:func:`PyType_FromModuleAndSpec` associates the module with the class, " | ||||
"allowing access to the module state from methods." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:319 | ||||
msgid "" | ||||
"The class should generally be stored in *both* the module state (for safe " | ||||
"access from C) and the module's ``__dict__`` (for access from Python code)." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:325 | ||||
msgid "Garbage-Collection Protocol" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:327 | ||||
msgid "" | ||||
"Instances of heap types hold a reference to their type. This ensures that " | ||||
"the type isn't destroyed before all its instances are, but may result in " | ||||
"reference cycles that need to be broken by the garbage collector." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:332 | ||||
msgid "" | ||||
"To avoid memory leaks, instances of heap types must implement the garbage " | ||||
"collection protocol. That is, heap types should:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:336 | ||||
msgid "Have the :c:data:`Py_TPFLAGS_HAVE_GC` flag." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:337 | ||||
msgid "" | ||||
"Define a traverse function using ``Py_tp_traverse``, which visits the type " | ||||
"(e.g. using :c:expr:`Py_VISIT(Py_TYPE(self))`)." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:340 | ||||
msgid "" | ||||
"Please refer to the :ref:`the documentation <type-structs>` of :c:data:" | ||||
"`Py_TPFLAGS_HAVE_GC` and :c:member:`~PyTypeObject.tp_traverse` for " | ||||
"additional considerations." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:344 | ||||
msgid "" | ||||
"If your traverse function delegates to the ``tp_traverse`` of its base class " | ||||
"(or another type), ensure that ``Py_TYPE(self)`` is visited only once. Note " | ||||
"that only heap type are expected to visit the type in ``tp_traverse``." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:348 | ||||
msgid "For example, if your traverse function includes::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:352 | ||||
msgid "...and ``base`` may be a static type, then it should also include::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:360 | ||||
msgid "" | ||||
"It is not necessary to handle the type's reference count in ``tp_new`` and " | ||||
"``tp_clear``." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:365 | ||||
msgid "Module State Access from Classes" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:367 | ||||
msgid "" | ||||
"If you have a type object defined with :c:func:`PyType_FromModuleAndSpec`, " | ||||
"you can call :c:func:`PyType_GetModule` to get the associated module, and " | ||||
"then :c:func:`PyModule_GetState` to get the module's state." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:371 | ||||
msgid "" | ||||
"To save a some tedious error-handling boilerplate code, you can combine " | ||||
"these two steps with :c:func:`PyType_GetModuleState`, resulting in::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:381 | ||||
msgid "Module State Access from Regular Methods" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:383 | ||||
msgid "" | ||||
"Accessing the module-level state from methods of a class is somewhat more " | ||||
"complicated, but is possible thanks to API introduced in Python 3.9. To get " | ||||
"the state, you need to first get the *defining class*, and then get the " | ||||
"module state from it." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:388 | ||||
msgid "" | ||||
"The largest roadblock is getting *the class a method was defined in*, or " | ||||
"that method's \"defining class\" for short. The defining class can have a " | ||||
"reference to the module it is part of." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:392 | ||||
msgid "" | ||||
"Do not confuse the defining class with :c:expr:`Py_TYPE(self)`. If the " | ||||
"method is called on a *subclass* of your type, ``Py_TYPE(self)`` will refer " | ||||
"to that subclass, which may be defined in different module than yours." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:397 | ||||
msgid "" | ||||
"The following Python code can illustrate the concept. ``Base." | ||||
"get_defining_class`` returns ``Base`` even if ``type(self) == Sub``:" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:413 | ||||
msgid "" | ||||
"For a method to get its \"defining class\", it must use the :data:" | ||||
"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS` :c:type:`calling convention " | ||||
"<PyMethodDef>` and the corresponding :c:type:`PyCMethod` signature::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:425 | ||||
msgid "" | ||||
"Once you have the defining class, call :c:func:`PyType_GetModuleState` to " | ||||
"get the state of its associated module." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:428 | ||||
msgid "For example::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:456 | ||||
msgid "Module State Access from Slot Methods, Getters and Setters" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:460 | ||||
msgid "This is new in Python 3.11." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:468 | ||||
msgid "" | ||||
"Slot methods—the fast C equivalents for special methods, such as :c:member:" | ||||
"`~PyNumberMethods.nb_add` for :py:attr:`~object.__add__` or :c:member:" | ||||
"`~PyType.tp_new` for initialization—have a very simple API that doesn't " | ||||
"allow passing in the defining class, unlike with :c:type:`PyCMethod`. The " | ||||
"same goes for getters and setters defined with :c:type:`PyGetSetDef`." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:475 | ||||
msgid "" | ||||
"To access the module state in these cases, use the :c:func:" | ||||
"`PyType_GetModuleByDef` function, and pass in the module definition. Once " | ||||
"you have the module, call :c:func:`PyModule_GetState` to get the state::" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:486 | ||||
msgid "" | ||||
"``PyType_GetModuleByDef`` works by searching the :term:`method resolution " | ||||
"order` (i.e. all superclasses) for the first superclass that has a " | ||||
"corresponding module." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:492 | ||||
msgid "" | ||||
"In very exotic cases (inheritance chains spanning multiple modules created " | ||||
"from the same definition), ``PyType_GetModuleByDef`` might not return the " | ||||
"module of the true defining class. However, it will always return a module " | ||||
"with the same definition, ensuring a compatible C memory layout." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:500 | ||||
msgid "Lifetime of the Module State" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:502 | ||||
msgid "" | ||||
"When a module object is garbage-collected, its module state is freed. For " | ||||
"each pointer to (a part of) the module state, you must hold a reference to " | ||||
"the module object." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:506 | ||||
msgid "" | ||||
"Usually this is not an issue, because types created with :c:func:" | ||||
"`PyType_FromModuleAndSpec`, and their instances, hold a reference to the " | ||||
"module. However, you must be careful in reference counting when you " | ||||
"reference module state from other places, such as callbacks for external " | ||||
"libraries." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:515 | ||||
msgid "Open Issues" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:517 | ||||
msgid "Several issues around per-module state and heap types are still open." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:519 | ||||
msgid "" | ||||
"Discussions about improving the situation are best held on the `capi-sig " | ||||
"mailing list <https://mail.python.org/mailman3/lists/capi-sig.python.org/" | ||||
">`__." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:524 | ||||
msgid "Per-Class Scope" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:526 | ||||
msgid "" | ||||
"It is currently (as of Python 3.11) not possible to attach state to " | ||||
"individual *types* without relying on CPython implementation details (which " | ||||
"may change in the future—perhaps, ironically, to allow a proper solution for " | ||||
"per-class scope)." | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:533 | ||||
msgid "Lossless Conversion to Heap Types" | ||||
msgstr "" | ||||
| ||||
#: howto/isolating-extensions.rst:535 | ||||
msgid "" | ||||
"The heap type API was not designed for \"lossless\" conversion from static " | ||||
"types; that is, creating a type that works exactly like a given static type." | ||||
msgstr "" | ||||
File diff suppressed because it is too large Load diff
390 howto/logging.po
390
howto/logging.po File diff suppressed because it is too large Load diff
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-05-22 23:13+0200\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2022-12-16 21:12+0100\n" | ||||
"Last-Translator: Nabil Bendafi <nabil@bendafi.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -271,9 +271,9 @@ msgstr "" | |||
"équivalent à la classe ``[a-zA-Z0-9_]``. Si l'expression régulière est une " | ||||
"chaîne de caractères, ``\\w`` correspond à tous les caractères identifiés " | ||||
"comme lettre dans la base de données Unicode fournie par le module :mod:" | ||||
"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de ``" | ||||
"\\w`` dans un motif exprimé en chaîne de caractères en spécifiant l'option :" | ||||
"const:`re.ASCII` lors de la compilation de l'expression régulière." | ||||
"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de " | ||||
"``\\w`` dans un motif exprimé en chaîne de caractères en spécifiant " | ||||
"l'option :const:`re.ASCII` lors de la compilation de l'expression régulière." | ||||
| ||||
#: howto/regex.rst:123 | ||||
msgid "" | ||||
| | @ -318,8 +318,8 @@ msgstr "``\\s``" | |||
| ||||
#: howto/regex.rst:137 | ||||
msgid "" | ||||
"Matches any whitespace character; this is equivalent to the class ``[ \\t\\n" | ||||
"\\r\\f\\v]``." | ||||
"Matches any whitespace character; this is equivalent to the class " | ||||
"``[ \\t\\n\\r\\f\\v]``." | ||||
msgstr "" | ||||
"Correspond à n'importe quel caractère « blanc » ; équivalent à la classe " | ||||
"``[ \\t\\n\\r\\f\\v]``." | ||||
| | @ -1193,8 +1193,8 @@ msgid "" | |||
"Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " | ||||
"on ASCII characters with the respective property." | ||||
msgstr "" | ||||
"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et ``" | ||||
"\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " | ||||
"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et " | ||||
"``\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " | ||||
"ayant la propriété demandée." | ||||
| ||||
#: howto/regex.rst:543 | ||||
| | @ -1246,6 +1246,7 @@ msgstr "" | |||
"et compréhensible." | ||||
| ||||
#: howto/regex.rst:562 | ||||
#, fuzzy | ||||
msgid "" | ||||
"Perform case-insensitive matching; character class and literal strings will " | ||||
"match letters by ignoring case. For example, ``[A-Z]`` will match lowercase " | ||||
| | @ -1254,8 +1255,8 @@ msgid "" | |||
"z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " | ||||
"they will match the 52 ASCII letters and 4 additional non-ASCII letters: " | ||||
"'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " | ||||
"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U" | ||||
"+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " | ||||
"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and " | ||||
"'K' (U+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " | ||||
"``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " | ||||
"lowercasing doesn't take the current locale into account; it will if you " | ||||
"also set the :const:`LOCALE` flag." | ||||
| | @ -1315,13 +1316,13 @@ msgstr "" | |||
"certaines fonctions C diront à votre programme que l'octet codant ``é`` doit " | ||||
"être considéré comme une lettre. Définir l'option :const:`LOCALE` lors de la " | ||||
"compilation d'une expression régulière fait que l'objet compilé résultant " | ||||
"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à ``" | ||||
"\\w+`` de correspondre avec les mots français tel qu'attendu. L'utilisation " | ||||
"de cette option est déconseillée en Python 3 car le mécanisme de locale est " | ||||
"très peu fiable, il ne gère qu'une seule « culture » à la fois et il ne " | ||||
"fonctionne qu'avec des locales 8 bits. La correspondance Unicode est déjà " | ||||
"activée par défaut dans Python 3 pour les motifs Unicode (type *str*) et " | ||||
"elle est capable de gérer différentes configurations de régions." | ||||
"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à " | ||||
"``\\w+`` de correspondre avec les mots français tel qu'attendu. " | ||||
"L'utilisation de cette option est déconseillée en Python 3 car le mécanisme " | ||||
"de locale est très peu fiable, il ne gère qu'une seule « culture » à la fois " | ||||
"et il ne fonctionne qu'avec des locales 8 bits. La correspondance Unicode " | ||||
"est déjà activée par défaut dans Python 3 pour les motifs Unicode (type " | ||||
"*str*) et elle est capable de gérer différentes configurations de régions." | ||||
| ||||
#: howto/regex.rst:605 | ||||
msgid "" | ||||
| | @ -1594,8 +1595,8 @@ msgstr "" | |||
msgid "" | ||||
"There are two subtleties you should remember when using this special " | ||||
"sequence. First, this is the worst collision between Python's string " | ||||
"literals and regular expression sequences. In Python's string literals, ``" | ||||
"\\b`` is the backspace character, ASCII value 8. If you're not using raw " | ||||
"literals and regular expression sequences. In Python's string literals, " | ||||
"``\\b`` is the backspace character, ASCII value 8. If you're not using raw " | ||||
"strings, then Python will convert the ``\\b`` to a backspace, and your RE " | ||||
"won't match as you expect it to. The following example looks the same as our " | ||||
"previous RE, but omits the ``'r'`` in front of the RE string. ::" | ||||
| | @ -1612,8 +1613,8 @@ msgstr "" | |||
| ||||
#: howto/regex.rst:774 | ||||
msgid "" | ||||
"Second, inside a character class, where there's no use for this assertion, ``" | ||||
"\\b`` represents the backspace character, for compatibility with Python's " | ||||
"Second, inside a character class, where there's no use for this assertion, " | ||||
"``\\b`` represents the backspace character, for compatibility with Python's " | ||||
"string literals." | ||||
msgstr "" | ||||
"Ensuite, dans une classe de caractères, où cette assertion n'a pas lieu " | ||||
| | @ -1789,8 +1790,8 @@ msgstr "" | |||
msgid "" | ||||
"Perl 5 is well known for its powerful additions to standard regular " | ||||
"expressions. For these new features the Perl developers couldn't choose new " | ||||
"single-keystroke metacharacters or new special sequences beginning with ``" | ||||
"\\`` without making Perl's regular expressions confusingly different from " | ||||
"single-keystroke metacharacters or new special sequences beginning with " | ||||
"``\\`` without making Perl's regular expressions confusingly different from " | ||||
"standard REs. If they chose ``&`` as a new metacharacter, for example, old " | ||||
"expressions would be assuming that ``&`` was a regular character and " | ||||
"wouldn't have escaped it by writing ``\\&`` or ``[&]``." | ||||
| | @ -1917,8 +1918,9 @@ msgstr "" | |||
"meth:`~re.Match.groupdict` ::" | ||||
| ||||
#: howto/regex.rst:952 | ||||
#, fuzzy | ||||
msgid "" | ||||
"Named groups are handy because they let you use easily-remembered names, " | ||||
"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::" | ||||
msgstr "" | ||||
| | @ -1940,8 +1942,8 @@ msgid "" | |||
"name instead of the number. This is another Python extension: ``(?P=name)`` " | ||||
"indicates that the contents of the group called *name* should again be " | ||||
"matched at the current point. The regular expression for finding doubled " | ||||
"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?P<word>\\w+)\\s" | ||||
"+(?P=word)\\b``::" | ||||
"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?" | ||||
"P<word>\\w+)\\s+(?P=word)\\b``::" | ||||
msgstr "" | ||||
"La syntaxe des renvois dans une expression telle que ``(....)\\1`` fait " | ||||
"référence au numéro du groupe. Il y a naturellement une variante qui utilise " | ||||
| | @ -2110,11 +2112,11 @@ msgstr "Une assertion prédictive négative supprime toute cette confusion :" | |||
#: 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" | ||||
"$`` does match, the whole pattern will fail. The trailing ``$`` is required " | ||||
"to ensure that something like ``sample.batch``, where the extension only " | ||||
"starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that the " | ||||
"pattern works when there are multiple dots in the filename." | ||||
"``bat`` doesn't match at this point, try the rest of the pattern; if " | ||||
"``bat$`` does match, the whole pattern will fail. The trailing ``$`` is " | ||||
"required to ensure that something like ``sample.batch``, where the extension " | ||||
"only starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that " | ||||
"the pattern works when there are multiple dots in the filename." | ||||
msgstr "" | ||||
"``.*[.](?!bat$)[^.]*$`` Cette assertion prédictive négative signifie : si " | ||||
"l'expression ``bat`` ne correspond pas à cet emplacement, essaie le reste du " | ||||
| | @ -2320,9 +2322,9 @@ msgstr "" | |||
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 " | ||||
"converted to a carriage return, and so forth. Unknown escapes such as ``" | ||||
"\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with the " | ||||
"substring matched by the corresponding group in the RE. This lets you " | ||||
"converted to a carriage return, and so forth. Unknown escapes such as " | ||||
"``\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with " | ||||
"the substring matched by the corresponding group in the RE. This lets you " | ||||
"incorporate portions of the original text in the resulting replacement " | ||||
"string." | ||||
msgstr "" | ||||
| | @ -2357,9 +2359,9 @@ msgstr "" | |||
"par la syntaxe ``(?P<nom>....)``. ``\\g<nom>`` utilise la sous-chaîne " | ||||
"correspondante au groupe nommé ``nom`` et ``\\g<numéro>`` utilise le numéro " | ||||
"de groupe correspondant. ``\\g<2>`` est donc l'équivalent de ``\\2``, mais " | ||||
"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` (``" | ||||
"\\20`` serait interprété comme une référence au groupe 20 et non comme une " | ||||
"référence au groupe 2 suivie du caractère littéral ``'0'``). Les " | ||||
"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` " | ||||
"(``\\20`` serait interprété comme une référence au groupe 20 et non comme " | ||||
"une référence au groupe 2 suivie du caractère littéral ``'0'``). Les " | ||||
"substitutions suivantes sont toutes équivalentes mais utilisent les trois " | ||||
"variantes de la chaîne de remplacement. ::" | ||||
| ||||
| | | |||
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-03-23 18:39+0100\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2022-10-18 12:27+0200\n" | ||||
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -472,13 +472,22 @@ msgstr "Données binaires" | |||
msgid "" | ||||
"It is perfectly possible to send binary data over a socket. The major " | ||||
"problem is that not all machines use the same formats for binary data. For " | ||||
"example, a Motorola chip will represent a 16 bit integer with the value 1 as " | ||||
"the two hex bytes 00 01. Intel and DEC, however, are byte-reversed - that " | ||||
"same 1 is 01 00. Socket libraries have calls for converting 16 and 32 bit " | ||||
"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and " | ||||
"\"h\" means *host*, \"s\" means *short* and \"l\" means *long*. Where " | ||||
"network order is host order, these do nothing, but where the machine is byte-" | ||||
"reversed, these swap the bytes around appropriately." | ||||
"example, `network byte order <https://en.wikipedia.org/wiki/" | ||||
"Endianness#Networking>`_ is big-endian, with the most significant byte " | ||||
"first, so a 16 bit integer with the value ``1`` would be the two hex bytes " | ||||
"``00 01``. However, most common processors (x86/AMD64, ARM, RISC-V), are " | ||||
"little-endian, with the least significant byte first - that same ``1`` would " | ||||
"be ``01 00``." | ||||
msgstr "" | ||||
| ||||
#: howto/sockets.rst:262 | ||||
#, fuzzy | ||||
msgid "" | ||||
"Socket libraries have calls for converting 16 and 32 bit integers - ``ntohl, " | ||||
"htonl, ntohs, htons`` where \"n\" means *network* and \"h\" means *host*, " | ||||
"\"s\" means *short* and \"l\" means *long*. Where network order is host " | ||||
"order, these do nothing, but where the machine is byte-reversed, these swap " | ||||
"the bytes around appropriately." | ||||
msgstr "" | ||||
"Il est parfaitement possible d’envoyer des données binaires sur un " | ||||
"connecteur. Le gros problème est que toutes les machines n’utilisent pas les " | ||||
| | @ -493,13 +502,15 @@ msgstr "" | |||
"utilise l’ordre d’octets inverse, ceux-ci échangent les octets de manière " | ||||
"appropriée." | ||||
| ||||
#: howto/sockets.rst:264 | ||||
#: howto/sockets.rst:268 | ||||
#, fuzzy | ||||
msgid "" | ||||
"In these days of 32 bit machines, the ascii representation of binary data is " | ||||
"In these days of 64-bit machines, the ASCII representation of binary data is " | ||||
"frequently smaller than the binary representation. That's because a " | ||||
"surprising amount of the time, all those longs have the value 0, or maybe 1. " | ||||
"The string \"0\" would be two bytes, while binary is four. Of course, this " | ||||
"doesn't fit well with fixed-length messages. Decisions, decisions." | ||||
"surprising amount of the time, most integers have the value 0, or maybe 1. " | ||||
"The string ``\"0\"`` would be two bytes, while a full 64-bit integer would " | ||||
"be 8. Of course, this doesn't fit well with fixed-length messages. " | ||||
"Decisions, decisions." | ||||
msgstr "" | ||||
"De nos jours, avec les machines 32 bits, la représentation *ASCII* des " | ||||
"données binaires est souvent plus compacte que la représentation binaire. " | ||||
| | @ -509,11 +520,11 @@ msgstr "" | |||
"très bien avec les messages de longueur fixe. Ah, les décisions, les " | ||||
"décisions…" | ||||
| ||||
#: howto/sockets.rst:272 | ||||
#: howto/sockets.rst:277 | ||||
msgid "Disconnecting" | ||||
msgstr "Déconnexion" | ||||
| ||||
#: howto/sockets.rst:274 | ||||
#: howto/sockets.rst:279 | ||||
msgid "" | ||||
"Strictly speaking, you're supposed to use ``shutdown`` on a socket before " | ||||
"you ``close`` it. The ``shutdown`` is an advisory to the socket at the " | ||||
| | @ -534,7 +545,7 @@ msgstr "" | |||
"un ``close`` est équivalent à ``shutdown() ; close()``. Ainsi, dans la " | ||||
"plupart des situations, un ``shutdown`` explicite n’est pas nécessaire." | ||||
| ||||
#: howto/sockets.rst:282 | ||||
#: howto/sockets.rst:287 | ||||
msgid "" | ||||
"One way to use ``shutdown`` effectively is in an HTTP-like exchange. The " | ||||
"client sends a request and then does a ``shutdown(1)``. This tells the " | ||||
| | @ -551,7 +562,7 @@ msgstr "" | |||
"serveur envoie une réponse. Si le ``send`` se termine avec succès, alors, en " | ||||
"effet, le client était encore en train de recevoir." | ||||
| ||||
#: howto/sockets.rst:289 | ||||
#: howto/sockets.rst:294 | ||||
msgid "" | ||||
"Python takes the automatic shutdown a step further, and says that when a " | ||||
"socket is garbage collected, it will automatically do a ``close`` if it's " | ||||
| | @ -568,11 +579,11 @@ msgstr "" | |||
"suspendu indéfiniment, pensant que vous êtes juste lent. Fermez vos " | ||||
"connecteurs quand vous avez terminé *s’il vous plaît*." | ||||
| ||||
#: howto/sockets.rst:297 | ||||
#: howto/sockets.rst:302 | ||||
msgid "When Sockets Die" | ||||
msgstr "Quand les connecteurs meurent" | ||||
| ||||
#: howto/sockets.rst:299 | ||||
#: howto/sockets.rst:304 | ||||
msgid "" | ||||
"Probably the worst thing about using blocking sockets is what happens when " | ||||
"the other side comes down hard (without doing a ``close``). Your socket is " | ||||
| | @ -600,11 +611,11 @@ msgstr "" | |||
"ressources. En d'autres termes, si vous parvenez à tuer le fil, tout votre " | ||||
"processus risque d'être foutu." | ||||
| ||||
#: howto/sockets.rst:313 | ||||
#: howto/sockets.rst:318 | ||||
msgid "Non-blocking Sockets" | ||||
msgstr "Connecteurs non bloquants" | ||||
| ||||
#: howto/sockets.rst:315 | ||||
#: howto/sockets.rst:320 | ||||
msgid "" | ||||
"If you've understood the preceding, you already know most of what you need " | ||||
"to know about the mechanics of using sockets. You'll still use the same " | ||||
| | @ -616,7 +627,7 @@ msgstr "" | |||
"toujours les mêmes appels, de la même façon. Il n’y que ça. Si vous le " | ||||
"faites bien, c’est presque dans la poche." | ||||
| ||||
#: howto/sockets.rst:320 | ||||
#: howto/sockets.rst:325 | ||||
msgid "" | ||||
"In Python, you use ``socket.setblocking(False)`` to make it non-blocking. In " | ||||
"C, it's more complex, (for one thing, you'll need to choose between the BSD " | ||||
| | @ -633,7 +644,7 @@ msgstr "" | |||
"avoir créé le connecteur mais avant de l’utiliser (en fait, si vous êtes " | ||||
"fou, vous pouvez alterner)." | ||||
| ||||
#: howto/sockets.rst:327 | ||||
#: howto/sockets.rst:332 | ||||
msgid "" | ||||
"The major mechanical difference is that ``send``, ``recv``, ``connect`` and " | ||||
"``accept`` can return without having done anything. You have (of course) a " | ||||
| | @ -650,11 +661,11 @@ msgstr "" | |||
"vampiriser le processeur. Alors, évitons les solutions vouées à l’échec dès " | ||||
"le départ et faisons les choses correctement." | ||||
| ||||
#: howto/sockets.rst:334 | ||||
#: howto/sockets.rst:339 | ||||
msgid "Use ``select``." | ||||
msgstr "Utilisation de ``select``." | ||||
| ||||
#: howto/sockets.rst:336 | ||||
#: howto/sockets.rst:341 | ||||
msgid "" | ||||
"In C, coding ``select`` is fairly complex. In Python, it's a piece of cake, " | ||||
"but it's close enough to the C version that if you understand ``select`` in " | ||||
| | @ -664,7 +675,7 @@ msgstr "" | |||
"mais c'est assez proche de la version C ; aussi, si vous comprenez " | ||||
"``select`` en Python, vous aurez peu de problèmes en C ::" | ||||
| ||||
#: howto/sockets.rst:347 | ||||
#: howto/sockets.rst:352 | ||||
msgid "" | ||||
"You pass ``select`` three lists: the first contains all sockets that you " | ||||
"might want to try reading; the second all the sockets you might want to try " | ||||
| | @ -684,7 +695,7 @@ msgstr "" | |||
"d'attente (disons une minute), à moins que vous n'ayez une bonne raison de " | ||||
"ne pas le faire." | ||||
| ||||
#: howto/sockets.rst:355 | ||||
#: howto/sockets.rst:360 | ||||
msgid "" | ||||
"In return, you will get three lists. They contain the sockets that are " | ||||
"actually readable, writable and in error. Each of these lists is a subset " | ||||
| | @ -695,7 +706,7 @@ msgstr "" | |||
"est un sous-ensemble (éventuellement vide) de la liste correspondante que " | ||||
"vous avez transmise." | ||||
| ||||
#: howto/sockets.rst:359 | ||||
#: howto/sockets.rst:364 | ||||
msgid "" | ||||
"If a socket is in the output readable list, you can be as-close-to-certain-" | ||||
"as-we-ever-get-in-this-business that a ``recv`` on that socket will return " | ||||
| | @ -713,7 +724,7 @@ msgstr "" | |||
"des connecteurs inscriptibles — cela signifie simplement que l'espace tampon " | ||||
"réseau sortant est disponible)." | ||||
| ||||
#: howto/sockets.rst:366 | ||||
#: howto/sockets.rst:371 | ||||
msgid "" | ||||
"If you have a \"server\" socket, put it in the potential_readers list. If it " | ||||
"comes out in the readable list, your ``accept`` will (almost certainly) " | ||||
| | @ -730,7 +741,7 @@ msgstr "" | |||
"dans la liste renvoyée des connecteurs sur lesquels vous pouvez écrire, vous " | ||||
"avez une bonne chance qu'il se soit connecté." | ||||
| ||||
#: howto/sockets.rst:372 | ||||
#: howto/sockets.rst:377 | ||||
msgid "" | ||||
"Actually, ``select`` can be handy even with blocking sockets. It's one way " | ||||
"of determining whether you will block - the socket returns as readable when " | ||||
| | @ -744,7 +755,7 @@ msgstr "" | |||
"Cependant, cela n'aide pas encore à déterminer si l'autre extrémité a " | ||||
"terminé, ou si elle est simplement occupée par autre chose." | ||||
| ||||
#: howto/sockets.rst:377 | ||||
#: howto/sockets.rst:382 | ||||
msgid "" | ||||
"**Portability alert**: On Unix, ``select`` works both with the sockets and " | ||||
"files. Don't try this on Windows. On Windows, ``select`` works with sockets " | ||||
| | | |||
162 howto/sorting.po
162
howto/sorting.po | | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-05-22 23:13+0200\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2022-12-11 19:25+0100\n" | ||||
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -231,7 +231,8 @@ msgstr "" | |||
"avantage de l'ordre existant dans un jeu de données." | ||||
| ||||
#: howto/sorting.rst:190 | ||||
msgid "The Old Way Using Decorate-Sort-Undecorate" | ||||
#, fuzzy | ||||
msgid "Decorate-Sort-Undecorate" | ||||
msgstr "La méthode traditionnelle utilisant Decorate-Sort-Undecorate" | ||||
| ||||
#: howto/sorting.rst:192 | ||||
| | @ -323,88 +324,57 @@ msgstr "" | |||
"Maintenant que le tri Python fournit des fonctions-clef, cette technique " | ||||
"n'est plus souvent utilisée." | ||||
| ||||
#: howto/sorting.rst:231 | ||||
msgid "The Old Way Using the *cmp* Parameter" | ||||
msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*" | ||||
#: howto/sorting.rst:230 | ||||
#, fuzzy | ||||
msgid "Comparison Functions" | ||||
msgstr "Fonctions du module *operator*" | ||||
| ||||
#: howto/sorting.rst:233 | ||||
#: howto/sorting.rst:232 | ||||
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 " | ||||
"arguments. Instead, all of the Py2.x versions supported a *cmp* parameter to " | ||||
"handle user specified comparison functions." | ||||
"Unlike key functions that return an absolute value for sorting, a comparison " | ||||
"function computes the relative ordering for two inputs." | ||||
msgstr "" | ||||
"Plusieurs construction données dans ce guide se basent sur Python 2.4 ou " | ||||
"plus. Avant cela, il n'y avait pas la fonction :func:`sorted` et la méthode :" | ||||
"meth:`list.sort` ne prenait pas d'arguments nommés. À la place, toutes les " | ||||
"versions Python 2.x utilisaient un paramètre *cmp* pour prendre en charge " | ||||
"les fonctions de comparaisons définies par les utilisateurs." | ||||
| ||||
#: howto/sorting.rst:238 | ||||
#: howto/sorting.rst:235 | ||||
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 " | ||||
"rich comparisons and the :meth:`__cmp__` magic method)." | ||||
"For example, a `balance scale <https://upload.wikimedia.org/wikipedia/" | ||||
"commons/1/17/Balance_à_tabac_1850.JPG>`_ compares two samples giving a " | ||||
"relative ordering: lighter, equal, or heavier. Likewise, a comparison " | ||||
"function such as ``cmp(a, b)`` will return a negative value for less-than, " | ||||
"zero if the inputs are equal, or a positive value for greater-than." | ||||
msgstr "" | ||||
"En Py3.0, le paramètre *cmp* à été supprimé complètement (dans le cadre d'un " | ||||
"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__`)." | ||||
| ||||
#: howto/sorting.rst:242 | ||||
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 " | ||||
"then return a negative value for less-than, return zero if they are equal, " | ||||
"or return a positive value for greater-than. For example, we can do:" | ||||
"It is common to encounter comparison functions when translating algorithms " | ||||
"from other languages. Also, some libraries provide comparison functions as " | ||||
"part of their API. For example, :func:`locale.strcoll` is a comparison " | ||||
"function." | ||||
msgstr "" | ||||
"En Python 2.x, le tri permettait en paramètre une fonction optionnelle qui " | ||||
"peut être appelée pour faire des comparaisons. Cette fonction devrait " | ||||
"prendre deux arguments à comparer pour renvoyer une valeur négative pour " | ||||
"inférieur-à, renvoyer zéro si ils sont égaux, ou renvoyer une valeur " | ||||
"positive pour supérieur-à. Par exemple, nous pouvons faire :" | ||||
| ||||
#: howto/sorting.rst:254 | ||||
msgid "Or you can reverse the order of comparison with:" | ||||
msgstr "Ou nous pouvons inverser l'ordre de comparaison avec :" | ||||
| ||||
#: howto/sorting.rst:263 | ||||
#: howto/sorting.rst:246 | ||||
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 " | ||||
"to a key function. The following wrapper makes that easy to do:" | ||||
"To accommodate those situations, Python provides :class:`functools." | ||||
"cmp_to_key` to wrap the comparison function to make it usable as a key " | ||||
"function::" | ||||
msgstr "" | ||||
"En portant du code depuis Python 2.X vers 3.x, des problèmes peuvent " | ||||
"survenir quand des utilisateurs fournissent une fonction de comparaison et " | ||||
"qu'il faut convertir cette fonction en une fonction-clef. La fonction " | ||||
"d'encapsulation suivante rend cela plus facile à faire ::" | ||||
| ||||
#: howto/sorting.rst:294 | ||||
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 :" | ||||
| ||||
#: howto/sorting.rst:305 | ||||
msgid "" | ||||
"In Python 3.2, the :func:`functools.cmp_to_key` function was added to the :" | ||||
"mod:`functools` module in the standard library." | ||||
msgstr "" | ||||
"En Python 3.2, la fonction :func:`functools.cmp_to_key` à été ajoutée au " | ||||
"module :mod:`functools` dans la librairie standard." | ||||
| ||||
#: howto/sorting.rst:309 | ||||
#: howto/sorting.rst:253 | ||||
msgid "Odds and Ends" | ||||
msgstr "Et n'oublions pas" | ||||
| ||||
#: howto/sorting.rst:311 | ||||
#: howto/sorting.rst:255 | ||||
#, fuzzy | ||||
msgid "" | ||||
"For locale aware sorting, use :func:`locale.strxfrm` for a key function or :" | ||||
"func:`locale.strcoll` for a comparison function." | ||||
"func:`locale.strcoll` for a comparison function. This is necessary because " | ||||
"\"alphabetical\" sort orderings can vary across cultures even if the " | ||||
"underlying alphabet is the same." | ||||
msgstr "" | ||||
"Pour du tri de texte localisé, utilisez :func:`locale.strxfrm` en tant que " | ||||
"fonction clef ou :func:`locale.strcoll` comme fonction de comparaison." | ||||
| ||||
#: howto/sorting.rst:314 | ||||
#: howto/sorting.rst:260 | ||||
msgid "" | ||||
"The *reverse* parameter still maintains sort stability (so that records with " | ||||
"equal keys retain the original order). Interestingly, that effect can be " | ||||
| | @ -416,7 +386,7 @@ msgstr "" | |||
"cet effet peut être simulé sans le paramètre en utilisant la fonction " | ||||
"native :func:`reversed` deux fois :" | ||||
| ||||
#: howto/sorting.rst:328 | ||||
#: howto/sorting.rst:274 | ||||
msgid "" | ||||
"The sort routines use ``<`` when making comparisons between two objects. So, " | ||||
"it is easy to add a standard sort order to a class by defining an :meth:" | ||||
| | @ -426,7 +396,7 @@ msgstr "" | |||
"utilisent l'opérateur ``<``. Il est donc facile d'ajouter un ordre de tri " | ||||
"standard à une classe en définissant sa méthode :meth:`__lt__` ::" | ||||
| ||||
#: howto/sorting.rst:338 | ||||
#: howto/sorting.rst:284 | ||||
msgid "" | ||||
"However, note that ``<`` can fall back to using :meth:`__gt__` if :meth:" | ||||
"`__lt__` is not implemented (see :func:`object.__lt__`)." | ||||
| | @ -435,7 +405,7 @@ msgstr "" | |||
"`__gt__` si :meth:`__lt__` n'est pas implémentée ; voir :func:`object." | ||||
"__lt__`." | ||||
| ||||
#: howto/sorting.rst:341 | ||||
#: howto/sorting.rst:287 | ||||
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 " | ||||
| | @ -447,3 +417,67 @@ msgstr "" | |||
"l'occurrence, si les grades des étudiants sont stockés dans un dictionnaire, " | ||||
"ils peuvent être utilisés pour trier une liste différentes de noms " | ||||
"d'étudiants :" | ||||
| ||||
#~ msgid "The Old Way Using the *cmp* Parameter" | ||||
#~ msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*" | ||||
| ||||
#~ 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 arguments. Instead, all of the Py2.x versions supported a *cmp* " | ||||
#~ "parameter to handle user specified comparison functions." | ||||
#~ msgstr "" | ||||
#~ "Plusieurs construction données dans ce guide se basent sur Python 2.4 ou " | ||||
#~ "plus. Avant cela, il n'y avait pas la fonction :func:`sorted` et la " | ||||
#~ "méthode :meth:`list.sort` ne prenait pas d'arguments nommés. À la place, " | ||||
#~ "toutes les versions Python 2.x utilisaient un paramètre *cmp* pour " | ||||
#~ "prendre en charge les fonctions de comparaisons définies par les " | ||||
#~ "utilisateurs." | ||||
| ||||
#~ 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 rich comparisons and the :meth:`__cmp__` magic method)." | ||||
#~ msgstr "" | ||||
#~ "En Py3.0, le paramètre *cmp* à été supprimé complètement (dans le cadre " | ||||
#~ "d'un 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__`)." | ||||
| ||||
#~ 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 then return a negative value for less-than, return zero if they are " | ||||
#~ "equal, or return a positive value for greater-than. For example, we can " | ||||
#~ "do:" | ||||
#~ msgstr "" | ||||
#~ "En Python 2.x, le tri permettait en paramètre une fonction optionnelle " | ||||
#~ "qui peut être appelée pour faire des comparaisons. Cette fonction devrait " | ||||
#~ "prendre deux arguments à comparer pour renvoyer une valeur négative pour " | ||||
#~ "inférieur-à, renvoyer zéro si ils sont égaux, ou renvoyer une valeur " | ||||
#~ "positive pour supérieur-à. Par exemple, nous pouvons faire :" | ||||
| ||||
#~ msgid "Or you can reverse the order of comparison with:" | ||||
#~ msgstr "Ou nous pouvons inverser l'ordre de comparaison avec :" | ||||
| ||||
#~ 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 to a key function. The following wrapper makes that easy to do:" | ||||
#~ msgstr "" | ||||
#~ "En portant du code depuis Python 2.X vers 3.x, des problèmes peuvent " | ||||
#~ "survenir quand des utilisateurs fournissent une fonction de comparaison " | ||||
#~ "et qu'il faut convertir cette fonction en une fonction-clef. La fonction " | ||||
#~ "d'encapsulation suivante rend cela plus facile à faire ::" | ||||
| ||||
#~ 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 :" | ||||
| ||||
#~ msgid "" | ||||
#~ "In Python 3.2, the :func:`functools.cmp_to_key` function was added to " | ||||
#~ "the :mod:`functools` module in the standard library." | ||||
#~ msgstr "" | ||||
#~ "En Python 3.2, la fonction :func:`functools.cmp_to_key` à été ajoutée au " | ||||
#~ "module :mod:`functools` dans la librairie standard." | ||||
| | | |||
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-03-23 18:39+0100\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\n" | ||||
"PO-Revision-Date: 2021-12-11 17:16+0100\n" | ||||
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -357,9 +357,10 @@ msgstr "" | |||
"v=MijmeoH9LT4>`_ (9 minutes et 36 secondes)." | ||||
| ||||
#: howto/unicode.rst:169 | ||||
#, fuzzy | ||||
msgid "" | ||||
"To help understand the standard, Jukka Korpela has written `an introductory " | ||||
"guide <http://jkorpela.fi/unicode/guide.html>`_ to reading the Unicode " | ||||
"guide <https://jkorpela.fi/unicode/guide.html>`_ to reading the Unicode " | ||||
"character tables." | ||||
msgstr "" | ||||
"Pour aider à comprendre le standard, Jukka Korpela a écrit `un guide " | ||||
| | @ -835,8 +836,9 @@ msgstr "" | |||
"sont :" | ||||
| ||||
#: howto/unicode.rst:520 | ||||
#, fuzzy | ||||
msgid "" | ||||
"`Processing Text Files in Python 3 <http://python-notes.curiousefficiency." | ||||
"`Processing Text Files in Python 3 <https://python-notes.curiousefficiency." | ||||
"org/en/latest/python3/text_file_processing.html>`_, by Nick Coghlan." | ||||
msgstr "" | ||||
"`Processing Text Files in Python 3 <http://python-notes.curiousefficiency." | ||||
| | @ -1238,8 +1240,9 @@ msgstr "" | |||
"données et les réécrire." | ||||
| ||||
#: howto/unicode.rst:737 | ||||
#, fuzzy | ||||
msgid "" | ||||
"One section of `Mastering Python 3 Input/Output <http://pyvideo.org/" | ||||
"One section of `Mastering Python 3 Input/Output <https://pyvideo.org/" | ||||
"video/289/pycon-2010--mastering-python-3-i-o>`_, a PyCon 2010 talk by David " | ||||
"Beazley, discusses text processing and binary data handling." | ||||
msgstr "" | ||||
| | @ -1264,8 +1267,9 @@ msgstr "" | |||
"diapositives ne couvrent que Python 2.x." | ||||
| ||||
#: howto/unicode.rst:747 | ||||
#, fuzzy | ||||
msgid "" | ||||
"`The Guts of Unicode in Python <http://pyvideo.org/video/1768/the-guts-of-" | ||||
"`The Guts of Unicode in Python <https://pyvideo.org/video/1768/the-guts-of-" | ||||
"unicode-in-python>`_ is a PyCon 2013 talk by Benjamin Peterson that " | ||||
"discusses the internal Unicode representation in Python 3.3." | ||||
msgstr "" | ||||
| | | |||
| | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2022-03-23 18:39+0100\n" | ||||
"POT-Creation-Date: 2023-01-15 22:33+0100\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" | ||||
| | @ -24,14 +24,15 @@ msgid "Author" | |||
msgstr "Auteur" | ||||
| ||||
#: howto/urllib2.rst:7 | ||||
msgid "`Michael Foord <http://www.voidspace.org.uk/python/index.shtml>`_" | ||||
msgid "`Michael Foord <https://agileabstractions.com/>`_" | ||||
msgstr "" | ||||
| ||||
#: howto/urllib2.rst:11 | ||||
msgid "" | ||||
"There is a French translation of an earlier revision of this HOWTO, " | ||||
"available at `urllib2 - Le Manuel manquant <http://www.voidspace.org.uk/" | ||||
"python/articles/urllib2_francais.shtml>`_." | ||||
"available at `urllib2 - Le Manuel manquant <https://web.archive.org/" | ||||
"web/20200910051922/http://www.voidspace.org.uk/python/articles/" | ||||
"urllib2_francais.shtml>`_." | ||||
msgstr "" | ||||
| ||||
#: howto/urllib2.rst:18 | ||||
| | @ -46,8 +47,8 @@ msgstr "" | |||
| ||||
#: howto/urllib2.rst:25 | ||||
msgid "" | ||||
"`Basic Authentication <http://www.voidspace.org.uk/python/articles/" | ||||
"authentication.shtml>`_" | ||||
"`Basic Authentication <https://web.archive.org/web/20201215133350/http://www." | ||||
"voidspace.org.uk/python/articles/authentication.shtml>`_" | ||||
msgstr "" | ||||
| ||||
#: howto/urllib2.rst:27 | ||||
| | @ -355,7 +356,7 @@ msgstr "" | |||
#: howto/urllib2.rst:413 | ||||
msgid "" | ||||
"Typical headers include 'Content-length', 'Content-type', and so on. See the " | ||||
"`Quick Reference to HTTP Headers <http://jkorpela.fi/http.html>`_ for a " | ||||
"`Quick Reference to HTTP Headers <https://jkorpela.fi/http.html>`_ for a " | ||||
"useful listing of HTTP headers with brief explanations of their meaning and " | ||||
"use." | ||||
msgstr "" | ||||
| | @ -367,7 +368,7 @@ msgstr "" | |||
#: howto/urllib2.rst:422 | ||||
msgid "" | ||||
"When you fetch a URL you use an opener (an instance of the perhaps " | ||||
"confusingly-named :class:`urllib.request.OpenerDirector`). Normally we have " | ||||
"confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " | ||||
"been using the default opener - via ``urlopen`` - but you can create custom " | ||||
"openers. Openers use handlers. All the \"heavy lifting\" is done by the " | ||||
"handlers. Each handler knows how to open URLs for a particular URL scheme " | ||||
| | | |||
Loading…
Add table
Add a link
Reference in a new issue