forked from AFPy/python-docs-fr
Traduction de extending/extending.po 10011628 (#1439)
Co-authored-by: Julien Palard <julien@palard.fr> Co-authored-by: Jules Lasne <jules.lasne@gmail.com>
This commit is contained in:
parent 619a7709bb
commit 3f4e08fcba
2 changed files with 495 additions and 119 deletions
File diff suppressed because it is too large Load diff
| | @ -6,17 +6,18 @@ msgstr "" | |||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2020-08-24 09:01+0200\n" | ||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
"PO-Revision-Date: 2021-02-07 20:03+0100\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
"Language: fr\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
"Last-Translator: \n" | ||||
"X-Generator: Poedit 2.3\n" | ||||
| ||||
#: extending/newtypes.rst:7 | ||||
msgid "Defining Extension Types: Assorted Topics" | ||||
msgstr "" | ||||
msgstr "Définir les types d'extension : divers sujets" | ||||
| ||||
#: extending/newtypes.rst:11 | ||||
msgid "" | ||||
| | @ -68,16 +69,21 @@ msgid "" | |||
"Here you can put a string (or its address) that you want returned when the " | ||||
"Python script references ``obj.__doc__`` to retrieve the doc string." | ||||
msgstr "" | ||||
"Ici vous pouvez mettre une chaîne (ou son adresse) que vous voulez renvoyer " | ||||
"lorsque le script Python référence ``obj.__doc__`` pour récupérer le " | ||||
"*docstring*." | ||||
| ||||
#: extending/newtypes.rst:49 | ||||
msgid "" | ||||
"Now we come to the basic type methods -- the ones most extension types will " | ||||
"implement." | ||||
msgstr "" | ||||
"Nous en arrivons maintenant aux méthodes de type basiques -- celles que la " | ||||
"plupart des types d'extension mettront en œuvre." | ||||
| ||||
#: extending/newtypes.rst:54 | ||||
msgid "Finalization and De-allocation" | ||||
msgstr "" | ||||
msgstr "Finalisation et de-allocation" | ||||
| ||||
#: extending/newtypes.rst:66 | ||||
msgid "" | ||||
| | @ -125,11 +131,11 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:136 | ||||
msgid ":pep:`442` explains the new finalization scheme." | ||||
msgstr "" | ||||
msgstr ":pep:`442` explique le nouveau schéma de finalisation." | ||||
| ||||
#: extending/newtypes.rst:143 | ||||
msgid "Object Presentation" | ||||
msgstr "" | ||||
msgstr "Présentation de l'objet" | ||||
| ||||
#: extending/newtypes.rst:145 | ||||
msgid "" | ||||
| | @ -165,11 +171,11 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:176 | ||||
msgid "Here is a simple example::" | ||||
msgstr "" | ||||
msgstr "Voici un exemple simple ::" | ||||
| ||||
#: extending/newtypes.rst:188 | ||||
msgid "Attribute Management" | ||||
msgstr "" | ||||
msgstr "Gestion des attributs" | ||||
| ||||
#: extending/newtypes.rst:190 | ||||
msgid "" | ||||
| | @ -203,7 +209,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:219 | ||||
msgid "Generic Attribute Management" | ||||
msgstr "" | ||||
msgstr "Gestion des attributs génériques" | ||||
| ||||
#: extending/newtypes.rst:221 | ||||
msgid "" | ||||
| | @ -216,6 +222,8 @@ msgid "" | |||
"The name of the attributes must be known when :c:func:`PyType_Ready` is " | ||||
"called." | ||||
msgstr "" | ||||
"Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:" | ||||
"`PyType_Ready`." | ||||
| ||||
#: extending/newtypes.rst:227 | ||||
msgid "" | ||||
| | @ -244,6 +252,7 @@ msgstr "" | |||
#: extending/newtypes.rst:241 | ||||
msgid "The tables are declared as three fields of the type object::" | ||||
msgstr "" | ||||
"Les tables sont déclarées sous la forme de trois champs de type objet ::" | ||||
| ||||
#: extending/newtypes.rst:247 | ||||
msgid "" | ||||
| | @ -295,35 +304,35 @@ msgstr "Signification" | |||
| ||||
#: extending/newtypes.rst:288 | ||||
msgid ":const:`READONLY`" | ||||
msgstr "" | ||||
msgstr ":const:`READONLY`" | ||||
| ||||
#: extending/newtypes.rst:288 | ||||
msgid "Never writable." | ||||
msgstr "" | ||||
msgstr "Jamais disponible en écriture." | ||||
| ||||
#: extending/newtypes.rst:290 | ||||
msgid ":const:`READ_RESTRICTED`" | ||||
msgstr "" | ||||
msgstr ":const:`READ_RESTRICTED`" | ||||
| ||||
#: extending/newtypes.rst:290 | ||||
msgid "Not readable in restricted mode." | ||||
msgstr "" | ||||
msgstr "Non disponible en lecture, dans le mode restreint." | ||||
| ||||
#: extending/newtypes.rst:292 | ||||
msgid ":const:`WRITE_RESTRICTED`" | ||||
msgstr "" | ||||
msgstr ":const:`WRITE_RESTRICTED`" | ||||
| ||||
#: extending/newtypes.rst:292 | ||||
msgid "Not writable in restricted mode." | ||||
msgstr "" | ||||
msgstr "Non disponible en écriture dans le mode restreint." | ||||
| ||||
#: extending/newtypes.rst:294 | ||||
msgid ":const:`RESTRICTED`" | ||||
msgstr "" | ||||
msgstr ":const:`RESTRICTED`" | ||||
| ||||
#: extending/newtypes.rst:294 | ||||
msgid "Not readable or writable in restricted mode." | ||||
msgstr "" | ||||
msgstr "Non disponible en lecture ou écriture, en mode restreint." | ||||
| ||||
#: extending/newtypes.rst:303 | ||||
msgid "" | ||||
| | @ -334,6 +343,13 @@ msgid "" | |||
"the descriptor from the class object, and get the doc string using its :attr:" | ||||
"`__doc__` attribute." | ||||
msgstr "" | ||||
"Un avantage intéressant de l'utilisation de la table :c:member:" | ||||
"`~PyTypeObject.tp_members` pour construire les descripteurs qui sont " | ||||
"utilisés à l'exécution, est que à tout attribut défini de cette façon on " | ||||
"peut associer un *docstring*, en écrivant simplement le texte dans la table. " | ||||
"Une application peut utiliser l'API d'introspection pour récupérer le " | ||||
"descripteur de l'objet de classe, et utiliser son attribut :attr:`__doc__` " | ||||
"pour renvoyer le *docstring*." | ||||
| ||||
#: extending/newtypes.rst:309 | ||||
msgid "" | ||||
| | @ -343,7 +359,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:323 | ||||
msgid "Type-specific Attribute Management" | ||||
msgstr "" | ||||
msgstr "Gestion des attributs de type spécifiques" | ||||
| ||||
#: extending/newtypes.rst:325 | ||||
msgid "" | ||||
| | @ -379,7 +395,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:367 | ||||
msgid "Object Comparison" | ||||
msgstr "" | ||||
msgstr "Comparaison des objets" | ||||
| ||||
#: extending/newtypes.rst:373 | ||||
msgid "" | ||||
| | @ -408,7 +424,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:416 | ||||
msgid "Abstract Protocol Support" | ||||
msgstr "" | ||||
msgstr "Support pour le protocole abstrait" | ||||
| ||||
#: extending/newtypes.rst:418 | ||||
msgid "" | ||||
| | @ -466,7 +482,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:472 | ||||
msgid "This function takes three arguments:" | ||||
msgstr "" | ||||
msgstr "Cette fonction prend trois arguments :" | ||||
| ||||
#: extending/newtypes.rst:474 | ||||
msgid "" | ||||
| | @ -491,7 +507,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:486 | ||||
msgid "Here is a toy ``tp_call`` implementation::" | ||||
msgstr "" | ||||
msgstr "Ceci est une implémentation ``tp_call`` très simple ::" | ||||
| ||||
#: extending/newtypes.rst:512 | ||||
msgid "" | ||||
| | @ -510,6 +526,10 @@ msgid "" | |||
"tp_iter` handler, which must return an :term:`iterator` object. Here the " | ||||
"same guidelines apply as for Python classes:" | ||||
msgstr "" | ||||
"Tout objet :term:`iterable` doit implémenter le gestionnaire :c:member:" | ||||
"`~PyTypeObject.tp_iter`, qui doit renvoyer un objet de type :term:" | ||||
"`iterator`. Ici, les mêmes directives s'appliquent de la même façon que " | ||||
"pour les classes *Python* :" | ||||
| ||||
#: extending/newtypes.rst:523 | ||||
msgid "" | ||||
| | @ -517,6 +537,9 @@ msgid "" | |||
"independent iterators, a new iterator should be created and returned by each " | ||||
"call to :c:member:`~PyTypeObject.tp_iter`." | ||||
msgstr "" | ||||
"Pour les collections (telles que les listes et les n-uplets) qui peuvent " | ||||
"implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être " | ||||
"créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`." | ||||
| ||||
#: extending/newtypes.rst:526 | ||||
msgid "" | ||||
| | @ -543,7 +566,7 @@ msgstr "" | |||
| ||||
#: extending/newtypes.rst:547 | ||||
msgid "Weak Reference Support" | ||||
msgstr "" | ||||
msgstr "Prise en charge de la référence faible" | ||||
| ||||
#: extending/newtypes.rst:549 | ||||
msgid "" | ||||
| | @ -551,16 +574,22 @@ msgid "" | |||
"type to participate in the weak reference mechanism without incurring the " | ||||
"overhead on performance-critical objects (such as numbers)." | ||||
msgstr "" | ||||
"L'un des objectifs de l'implémentation de la référence faible de *Python* " | ||||
"est de permettre à tout type d'objet de participer au mécanisme de référence " | ||||
"faible sans avoir à supporter le surcoût de la performance critique des " | ||||
"certains objets, tels que les nombres." | ||||
| ||||
#: extending/newtypes.rst:554 | ||||
msgid "Documentation for the :mod:`weakref` module." | ||||
msgstr "" | ||||
msgstr "Documentation pour le module :mod:`weakref`." | ||||
| ||||
#: extending/newtypes.rst:556 | ||||
msgid "" | ||||
"For an object to be weakly referencable, the extension type must do two " | ||||
"things:" | ||||
msgstr "" | ||||
"Pour qu'un objet soit faiblement référençable, le type d'extension doit " | ||||
"faire deux choses :" | ||||
| ||||
#: extending/newtypes.rst:558 | ||||
msgid "" | ||||
| | @ -569,6 +598,10 @@ msgid "" | |||
"``NULL`` (which is automatic when using the default :c:member:`~PyTypeObject." | ||||
"tp_alloc`)." | ||||
msgstr "" | ||||
"Inclure un champ :c:type:`PyObject\\*` dans la structure d'objet C dédiée au " | ||||
"mécanisme de référence faible. Le constructeur de l'objet doit le laisser à " | ||||
"la valeur ``NULL`` (ce qui est automatique lorsque l'on utilise le champ par " | ||||
"défaut :c:member:`~PyTypeObject.tp_alloc`)." | ||||
| ||||
#: extending/newtypes.rst:563 | ||||
msgid "" | ||||
| | @ -576,16 +609,23 @@ msgid "" | |||
"offset of the aforementioned field in the C object structure, so that the " | ||||
"interpreter knows how to access and modify that field." | ||||
msgstr "" | ||||
"Définissez le membre de type :c:member:`~PyTypeObject.tp_weaklistoffset` à " | ||||
"la valeur de décalage (*offset*) du champ susmentionné dans la structure de " | ||||
"l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le " | ||||
"modifier." | ||||
| ||||
#: extending/newtypes.rst:567 | ||||
msgid "" | ||||
"Concretely, here is how a trivial object structure would be augmented with " | ||||
"the required field::" | ||||
msgstr "" | ||||
"Concrètement, voici comment une structure d'objet simple serait complétée " | ||||
"par le champ requis ::" | ||||
| ||||
#: extending/newtypes.rst:575 | ||||
msgid "And the corresponding member in the statically-declared type object::" | ||||
msgstr "" | ||||
"Et le membre correspondant dans l'objet de type déclaré statiquement ::" | ||||
| ||||
#: extending/newtypes.rst:583 | ||||
msgid "" | ||||
| | @ -593,10 +633,13 @@ msgid "" | |||
"references (by calling :c:func:`PyObject_ClearWeakRefs`) if the field is non-" | ||||
"``NULL``::" | ||||
msgstr "" | ||||
"Le seul ajout supplémentaire est que ``tp_dealloc`` doit effacer toute " | ||||
"référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " | ||||
"est non ``NULL`` ::" | ||||
| ||||
#: extending/newtypes.rst:599 | ||||
msgid "More Suggestions" | ||||
msgstr "" | ||||
msgstr "Plus de suggestions" | ||||
| ||||
#: extending/newtypes.rst:601 | ||||
msgid "" | ||||
| | @ -606,6 +649,12 @@ msgid "" | |||
"want (for example, ``tp_richcompare``). You will find examples of the " | ||||
"function you want to implement." | ||||
msgstr "" | ||||
"Pour savoir comment mettre en œuvre une méthode spécifique pour votre " | ||||
"nouveau type de données, téléchargez le code source :term:`CPython`. Allez " | ||||
"dans le répertoire :file:`Objects`, puis cherchez dans les fichiers sources " | ||||
"*C* la fonction ``tp_`` plus la fonction que vous voulez (par exemple, " | ||||
"``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " | ||||
"voulez implémenter." | ||||
| ||||
#: extending/newtypes.rst:607 | ||||
msgid "" | ||||
| | @ -613,20 +662,24 @@ msgid "" | |||
"you are implementing, use the :c:func:`PyObject_TypeCheck` function. A " | ||||
"sample of its use might be something like the following::" | ||||
msgstr "" | ||||
"Lorsque vous avez besoin de vérifier qu'un objet est une instance concrète " | ||||
"du type que vous implémentez, utilisez la fonction :c:func:" | ||||
"`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" | ||||
| ||||
#: extending/newtypes.rst:618 | ||||
msgid "Download CPython source releases." | ||||
msgstr "" | ||||
msgstr "Télécharger les versions sources de *CPython*." | ||||
| ||||
#: extending/newtypes.rst:618 | ||||
msgid "https://www.python.org/downloads/source/" | ||||
msgstr "" | ||||
msgstr "https://www.python.org/downloads/source/" | ||||
| ||||
#: extending/newtypes.rst:620 | ||||
msgid "" | ||||
"The CPython project on GitHub, where the CPython source code is developed." | ||||
msgstr "" | ||||
"Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*." | ||||
| ||||
#: extending/newtypes.rst:621 | ||||
msgid "https://github.com/python/cpython" | ||||
msgstr "" | ||||
msgstr "https://github.com/python/cpython" | ||||
| | | |||
Loading…
Add table
Add a link
Reference in a new issue