@@ -16,7 +16,7 @@ msgstr ""
1616
1717#: ../Doc/extending/newtypes.rst:5
1818msgid "Defining Extension Types: Assorted Topics"
19- msgstr ""
19+ msgstr "Définir les types d'extension : divers sujets "
2020
2121#: ../Doc/extending/newtypes.rst:9
2222msgid ""
@@ -68,16 +68,21 @@ msgid ""
6868"Here you can put a string (or its address) that you want returned when the "
6969"Python script references ``obj.__doc__`` to retrieve the doc string."
7070msgstr ""
71+ "Ici vous pouvez mettre une chaîne (ou son adresse) que vous voulez renvoyer "
72+ "lorsque le script Python référence ``obj.__doc__`` pour récupérer le "
73+ "*docstring*."
7174
7275#: ../Doc/extending/newtypes.rst:47
7376msgid ""
7477"Now we come to the basic type methods -- the ones most extension types will "
7578"implement."
7679msgstr ""
80+ "Nous en arrivons maintenant aux méthodes de type basiques -- celles que la "
81+ "plupart des types d'extension mettront en œuvre."
7782
7883#: ../Doc/extending/newtypes.rst:52
7984msgid "Finalization and De-allocation"
80- msgstr ""
85+ msgstr "Finalisation et de-allocation "
8186
8287#: ../Doc/extending/newtypes.rst:64
8388msgid ""
@@ -125,11 +130,11 @@ msgstr ""
125130
126131#: ../Doc/extending/newtypes.rst:134
127132msgid ":pep:`442` explains the new finalization scheme."
128- msgstr ""
133+ msgstr ":pep:`442` explique le nouveau schéma de finalisation. "
129134
130135#: ../Doc/extending/newtypes.rst:141
131136msgid "Object Presentation"
132- msgstr ""
137+ msgstr "Présentation de l'objet "
133138
134139#: ../Doc/extending/newtypes.rst:143
135140msgid ""
@@ -165,11 +170,11 @@ msgstr ""
165170
166171#: ../Doc/extending/newtypes.rst:174
167172msgid "Here is a simple example::"
168- msgstr ""
173+ msgstr "Voici un exemple simple :: "
169174
170175#: ../Doc/extending/newtypes.rst:186
171176msgid "Attribute Management"
172- msgstr ""
177+ msgstr "Gestion des attributs "
173178
174179#: ../Doc/extending/newtypes.rst:188
175180msgid ""
@@ -203,7 +208,7 @@ msgstr ""
203208
204209#: ../Doc/extending/newtypes.rst:217
205210msgid "Generic Attribute Management"
206- msgstr ""
211+ msgstr "Gestion des attributs génériques "
207212
208213#: ../Doc/extending/newtypes.rst:219
209214msgid ""
@@ -216,6 +221,8 @@ msgid ""
216221"The name of the attributes must be known when :c:func:`PyType_Ready` is "
217222"called."
218223msgstr ""
224+ "Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:"
225+ "`PyType_Ready`."
219226
220227#: ../Doc/extending/newtypes.rst:225
221228msgid ""
@@ -244,6 +251,7 @@ msgstr ""
244251#: ../Doc/extending/newtypes.rst:239
245252msgid "The tables are declared as three fields of the type object::"
246253msgstr ""
254+ "Les tables sont déclarées sous la forme de trois champs de type objet ::"
247255
248256#: ../Doc/extending/newtypes.rst:245
249257msgid ""
@@ -295,35 +303,35 @@ msgstr "Signification"
295303
296304#: ../Doc/extending/newtypes.rst:286
297305msgid ":const:`READONLY`"
298- msgstr ""
306+ msgstr ":const:`READONLY` "
299307
300308#: ../Doc/extending/newtypes.rst:286
301309msgid "Never writable."
302- msgstr ""
310+ msgstr "Jamais disponible en écriture. "
303311
304312#: ../Doc/extending/newtypes.rst:288
305313msgid ":const:`READ_RESTRICTED`"
306- msgstr ""
314+ msgstr ":const:`READ_RESTRICTED` "
307315
308316#: ../Doc/extending/newtypes.rst:288
309317msgid "Not readable in restricted mode."
310- msgstr ""
318+ msgstr "Non disponible en lecture, dans le mode restreint. "
311319
312320#: ../Doc/extending/newtypes.rst:290
313321msgid ":const:`WRITE_RESTRICTED`"
314- msgstr ""
322+ msgstr ":const:`WRITE_RESTRICTED` "
315323
316324#: ../Doc/extending/newtypes.rst:290
317325msgid "Not writable in restricted mode."
318- msgstr ""
326+ msgstr "Non disponible en écriture dans le mode restreint. "
319327
320328#: ../Doc/extending/newtypes.rst:292
321329msgid ":const:`RESTRICTED`"
322- msgstr ""
330+ msgstr ":const:`RESTRICTED` "
323331
324332#: ../Doc/extending/newtypes.rst:292
325333msgid "Not readable or writable in restricted mode."
326- msgstr ""
334+ msgstr "Non disponible en lecture ou écriture, en mode restreint. "
327335
328336#: ../Doc/extending/newtypes.rst:301
329337msgid ""
@@ -334,6 +342,13 @@ msgid ""
334342"the descriptor from the class object, and get the doc string using its :attr:"
335343"`__doc__` attribute."
336344msgstr ""
345+ "Un avantage intéressant de l'utilisation de la table :c:member:"
346+ "`~PyTypeObject.tp_members` pour construire les descripteurs qui sont "
347+ "utilisés à l'exécution, est que à tout attribut défini de cette façon on "
348+ "peut associer un *docstring*, en écrivant simplement le texte dans la table. "
349+ "Une application peut utiliser l'API d'introspection pour récupérer le "
350+ "descripteur de l'objet de classe, et utiliser son attribut :attr:`__doc__` "
351+ "pour renvoyer le *docstring*."
337352
338353#: ../Doc/extending/newtypes.rst:307
339354msgid ""
@@ -343,7 +358,7 @@ msgstr ""
343358
344359#: ../Doc/extending/newtypes.rst:321
345360msgid "Type-specific Attribute Management"
346- msgstr ""
361+ msgstr "Gestion des attributs de type spécifiques "
347362
348363#: ../Doc/extending/newtypes.rst:323
349364msgid ""
@@ -379,7 +394,7 @@ msgstr ""
379394
380395#: ../Doc/extending/newtypes.rst:365
381396msgid "Object Comparison"
382- msgstr ""
397+ msgstr "Comparaison des objets "
383398
384399#: ../Doc/extending/newtypes.rst:371
385400msgid ""
@@ -408,7 +423,7 @@ msgstr ""
408423
409424#: ../Doc/extending/newtypes.rst:414
410425msgid "Abstract Protocol Support"
411- msgstr ""
426+ msgstr "Support pour le protocole abstrait "
412427
413428#: ../Doc/extending/newtypes.rst:416
414429msgid ""
@@ -466,7 +481,7 @@ msgstr ""
466481
467482#: ../Doc/extending/newtypes.rst:470
468483msgid "This function takes three arguments:"
469- msgstr ""
484+ msgstr "Cette fonction prend trois arguments : "
470485
471486#: ../Doc/extending/newtypes.rst:472
472487msgid ""
@@ -491,7 +506,7 @@ msgstr ""
491506
492507#: ../Doc/extending/newtypes.rst:484
493508msgid "Here is a toy ``tp_call`` implementation::"
494- msgstr ""
509+ msgstr "Ceci est une implémentation ``tp_call`` très simple :: "
495510
496511#: ../Doc/extending/newtypes.rst:510
497512msgid ""
@@ -509,13 +524,20 @@ msgid ""
509524"tp_iter` handler, which must return an :term:`iterator` object. Here the "
510525"same guidelines apply as for Python classes:"
511526msgstr ""
527+ "Tout objet :term:`iterable` doit implémenter le gestionnaire :c:member:"
528+ "`~PyTypeObject.tp_iter`, qui doit renvoyer un objet de type :term:"
529+ "`iterator`. Ici, les mêmes directives s'appliquent de la même façon que "
530+ "pour les classes *Python* :"
512531
513532#: ../Doc/extending/newtypes.rst:521
514533msgid ""
515534"For collections (such as lists and tuples) which can support multiple "
516535"independent iterators, a new iterator should be created and returned by each "
517536"call to :c:member:`~PyTypeObject.tp_iter`."
518537msgstr ""
538+ "Pour les collections (telles que les listes et les n-uplets) qui peuvent "
539+ "implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être "
540+ "créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`."
519541
520542#: ../Doc/extending/newtypes.rst:524
521543msgid ""
@@ -541,24 +563,30 @@ msgstr ""
541563
542564#: ../Doc/extending/newtypes.rst:545
543565msgid "Weak Reference Support"
544- msgstr ""
566+ msgstr "Prise en charge de la référence faible "
545567
546568#: ../Doc/extending/newtypes.rst:547
547569msgid ""
548570"One of the goals of Python's weak reference implementation is to allow any "
549571"type to participate in the weak reference mechanism without incurring the "
550572"overhead on performance-critical objects (such as numbers)."
551573msgstr ""
574+ "L'un des objectifs de l'implémentation de la référence faible de *Python* "
575+ "est de permettre à tout type d'objet de participer au mécanisme de référence "
576+ "faible sans avoir à supporter le surcoût de la performance critique des "
577+ "certains objets, tels que les nombres."
552578
553579#: ../Doc/extending/newtypes.rst:552
554580msgid "Documentation for the :mod:`weakref` module."
555- msgstr ""
581+ msgstr "Documentation pour le module :mod:`weakref`. "
556582
557583#: ../Doc/extending/newtypes.rst:554
558584msgid ""
559585"For an object to be weakly referencable, the extension type must do two "
560586"things:"
561587msgstr ""
588+ "Pour qu'un objet soit faiblement référençable, le type d'extension doit "
589+ "faire deux choses :"
562590
563591#: ../Doc/extending/newtypes.rst:556
564592msgid ""
@@ -574,16 +602,23 @@ msgid ""
574602"offset of the aforementioned field in the C object structure, so that the "
575603"interpreter knows how to access and modify that field."
576604msgstr ""
605+ "Définissez le membre de type :c:member:`~PyTypeObject.tp_weaklistoffset` à "
606+ "la valeur de décalage (*offset*) du champ susmentionné dans la structure de "
607+ "l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le "
608+ "modifier."
577609
578610#: ../Doc/extending/newtypes.rst:565
579611msgid ""
580612"Concretely, here is how a trivial object structure would be augmented with "
581613"the required field::"
582614msgstr ""
615+ "Concrètement, voici comment une structure d'objet simple serait complétée "
616+ "par le champ requis ::"
583617
584618#: ../Doc/extending/newtypes.rst:573
585619msgid "And the corresponding member in the statically-declared type object::"
586620msgstr ""
621+ "Et le membre correspondant dans l'objet de type déclaré statiquement ::"
587622
588623#: ../Doc/extending/newtypes.rst:581
589624msgid ""
@@ -594,7 +629,7 @@ msgstr ""
594629
595630#: ../Doc/extending/newtypes.rst:597
596631msgid "More Suggestions"
597- msgstr ""
632+ msgstr "Plus de suggestions "
598633
599634#: ../Doc/extending/newtypes.rst:599
600635msgid ""
@@ -604,30 +639,40 @@ msgid ""
604639"want (for example, ``tp_richcompare``). You will find examples of the "
605640"function you want to implement."
606641msgstr ""
642+ "Pour savoir comment mettre en œuvre une méthode spécifique pour votre "
643+ "nouveau type de données, téléchargez le code source :term:`CPython`. Allez "
644+ "dans le répertoire :file:`Objects`, puis cherchez dans les fichiers sources "
645+ "*C* la fonction ``tp_`` plus la fonction que vous voulez (par exemple, "
646+ "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous "
647+ "voulez implémenter."
607648
608649#: ../Doc/extending/newtypes.rst:605
609650msgid ""
610651"When you need to verify that an object is a concrete instance of the type "
611652"you are implementing, use the :c:func:`PyObject_TypeCheck` function. A "
612653"sample of its use might be something like the following::"
613654msgstr ""
655+ "Lorsque vous avez besoin de vérifier qu'un objet est une instance concrète "
656+ "du type que vous implémentez, utilisez la fonction :c:func:"
657+ "`PyObject_TypeCheck`. Voici un exemple de son utilisation ::"
614658
615659#: ../Doc/extending/newtypes.rst:616
616660msgid "Download CPython source releases."
617- msgstr ""
661+ msgstr "Télécharger les versions sources de *CPython*. "
618662
619663#: ../Doc/extending/newtypes.rst:616
620664msgid "https://www.python.org/downloads/source/"
621- msgstr ""
665+ msgstr "https://www.python.org/downloads/source/ "
622666
623667#: ../Doc/extending/newtypes.rst:618
624668msgid ""
625669"The CPython project on GitHub, where the CPython source code is developed."
626670msgstr ""
671+ "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*."
627672
628673#: ../Doc/extending/newtypes.rst:619
629674msgid "https://github.com/python/cpython"
630- msgstr ""
675+ msgstr "https://github.com/python/cpython "
631676
632677#~ msgid "Footnotes"
633678#~ msgstr "Notes"
0 commit comments