@@ -16,7 +16,7 @@ msgstr ""
16
16
17
17
#: ../Doc/extending/newtypes.rst:7
18
18
msgid "Defining Extension Types: Assorted Topics"
19
- msgstr ""
19
+ msgstr "Définir les types d'extension : divers sujets "
20
20
21
21
#: ../Doc/extending/newtypes.rst:11
22
22
msgid ""
@@ -68,16 +68,21 @@ msgid ""
68
68
"Here you can put a string (or its address) that you want returned when the "
69
69
"Python script references ``obj.__doc__`` to retrieve the doc string."
70
70
msgstr ""
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*."
71
74
72
75
#: ../Doc/extending/newtypes.rst:49
73
76
msgid ""
74
77
"Now we come to the basic type methods -- the ones most extension types will "
75
78
"implement."
76
79
msgstr ""
80
+ "Nous en arrivons maintenant aux méthodes de type basiques -- celles que la "
81
+ "plupart des types d'extension mettront en œuvre."
77
82
78
83
#: ../Doc/extending/newtypes.rst:54
79
84
msgid "Finalization and De-allocation"
80
- msgstr ""
85
+ msgstr "Finalisation et de-allocation "
81
86
82
87
#: ../Doc/extending/newtypes.rst:66
83
88
msgid ""
@@ -125,11 +130,11 @@ msgstr ""
125
130
126
131
#: ../Doc/extending/newtypes.rst:136
127
132
msgid ":pep:`442` explains the new finalization scheme."
128
- msgstr ""
133
+ msgstr ":pep:`442` explique le nouveau schéma de finalisation. "
129
134
130
135
#: ../Doc/extending/newtypes.rst:143
131
136
msgid "Object Presentation"
132
- msgstr ""
137
+ msgstr "Présentation de l'objet "
133
138
134
139
#: ../Doc/extending/newtypes.rst:145
135
140
msgid ""
@@ -165,11 +170,11 @@ msgstr ""
165
170
166
171
#: ../Doc/extending/newtypes.rst:176
167
172
msgid "Here is a simple example::"
168
- msgstr ""
173
+ msgstr "Voici un exemple simple :: "
169
174
170
175
#: ../Doc/extending/newtypes.rst:188
171
176
msgid "Attribute Management"
172
- msgstr ""
177
+ msgstr "Gestion des attributs "
173
178
174
179
#: ../Doc/extending/newtypes.rst:190
175
180
msgid ""
@@ -203,7 +208,7 @@ msgstr ""
203
208
204
209
#: ../Doc/extending/newtypes.rst:219
205
210
msgid "Generic Attribute Management"
206
- msgstr ""
211
+ msgstr "Gestion des attributs génériques "
207
212
208
213
#: ../Doc/extending/newtypes.rst:221
209
214
msgid ""
@@ -216,6 +221,8 @@ msgid ""
216
221
"The name of the attributes must be known when :c:func:`PyType_Ready` is "
217
222
"called."
218
223
msgstr ""
224
+ "Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:"
225
+ "`PyType_Ready`."
219
226
220
227
#: ../Doc/extending/newtypes.rst:227
221
228
msgid ""
@@ -244,6 +251,7 @@ msgstr ""
244
251
#: ../Doc/extending/newtypes.rst:241
245
252
msgid "The tables are declared as three fields of the type object::"
246
253
msgstr ""
254
+ "Les tables sont déclarées sous la forme de trois champs de type objet ::"
247
255
248
256
#: ../Doc/extending/newtypes.rst:247
249
257
msgid ""
@@ -295,35 +303,35 @@ msgstr "Signification"
295
303
296
304
#: ../Doc/extending/newtypes.rst:288
297
305
msgid ":const:`READONLY`"
298
- msgstr ""
306
+ msgstr ":const:`READONLY` "
299
307
300
308
#: ../Doc/extending/newtypes.rst:288
301
309
msgid "Never writable."
302
- msgstr ""
310
+ msgstr "Jamais disponible en écriture. "
303
311
304
312
#: ../Doc/extending/newtypes.rst:290
305
313
msgid ":const:`READ_RESTRICTED`"
306
- msgstr ""
314
+ msgstr ":const:`READ_RESTRICTED` "
307
315
308
316
#: ../Doc/extending/newtypes.rst:290
309
317
msgid "Not readable in restricted mode."
310
- msgstr ""
318
+ msgstr "Non disponible en lecture, dans le mode restreint. "
311
319
312
320
#: ../Doc/extending/newtypes.rst:292
313
321
msgid ":const:`WRITE_RESTRICTED`"
314
- msgstr ""
322
+ msgstr ":const:`WRITE_RESTRICTED` "
315
323
316
324
#: ../Doc/extending/newtypes.rst:292
317
325
msgid "Not writable in restricted mode."
318
- msgstr ""
326
+ msgstr "Non disponible en écriture dans le mode restreint. "
319
327
320
328
#: ../Doc/extending/newtypes.rst:294
321
329
msgid ":const:`RESTRICTED`"
322
- msgstr ""
330
+ msgstr ":const:`RESTRICTED` "
323
331
324
332
#: ../Doc/extending/newtypes.rst:294
325
333
msgid "Not readable or writable in restricted mode."
326
- msgstr ""
334
+ msgstr "Non disponible en lecture ou écriture, en mode restreint. "
327
335
328
336
#: ../Doc/extending/newtypes.rst:303
329
337
msgid ""
@@ -334,6 +342,13 @@ msgid ""
334
342
"the descriptor from the class object, and get the doc string using its :attr:"
335
343
"`__doc__` attribute."
336
344
msgstr ""
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*."
337
352
338
353
#: ../Doc/extending/newtypes.rst:309
339
354
msgid ""
@@ -343,7 +358,7 @@ msgstr ""
343
358
344
359
#: ../Doc/extending/newtypes.rst:323
345
360
msgid "Type-specific Attribute Management"
346
- msgstr ""
361
+ msgstr "Gestion des attributs de type spécifiques "
347
362
348
363
#: ../Doc/extending/newtypes.rst:325
349
364
msgid ""
@@ -379,7 +394,7 @@ msgstr ""
379
394
380
395
#: ../Doc/extending/newtypes.rst:367
381
396
msgid "Object Comparison"
382
- msgstr ""
397
+ msgstr "Comparaison des objets "
383
398
384
399
#: ../Doc/extending/newtypes.rst:373
385
400
msgid ""
@@ -408,7 +423,7 @@ msgstr ""
408
423
409
424
#: ../Doc/extending/newtypes.rst:416
410
425
msgid "Abstract Protocol Support"
411
- msgstr ""
426
+ msgstr "Support pour le protocole abstrait "
412
427
413
428
#: ../Doc/extending/newtypes.rst:418
414
429
msgid ""
@@ -466,7 +481,7 @@ msgstr ""
466
481
467
482
#: ../Doc/extending/newtypes.rst:472
468
483
msgid "This function takes three arguments:"
469
- msgstr ""
484
+ msgstr "Cette fonction prend trois arguments : "
470
485
471
486
#: ../Doc/extending/newtypes.rst:474
472
487
msgid ""
@@ -491,7 +506,7 @@ msgstr ""
491
506
492
507
#: ../Doc/extending/newtypes.rst:486
493
508
msgid "Here is a toy ``tp_call`` implementation::"
494
- msgstr ""
509
+ msgstr "Ceci est une implémentation ``tp_call`` très simple :: "
495
510
496
511
#: ../Doc/extending/newtypes.rst:512
497
512
msgid ""
@@ -510,13 +525,20 @@ msgid ""
510
525
"tp_iter` handler, which must return an :term:`iterator` object. Here the "
511
526
"same guidelines apply as for Python classes:"
512
527
msgstr ""
528
+ "Tout objet :term:`iterable` doit implémenter le gestionnaire :c:member:"
529
+ "`~PyTypeObject.tp_iter`, qui doit renvoyer un objet de type :term:"
530
+ "`iterator`. Ici, les mêmes directives s'appliquent de la même façon que "
531
+ "pour les classes *Python* :"
513
532
514
533
#: ../Doc/extending/newtypes.rst:523
515
534
msgid ""
516
535
"For collections (such as lists and tuples) which can support multiple "
517
536
"independent iterators, a new iterator should be created and returned by each "
518
537
"call to :c:member:`~PyTypeObject.tp_iter`."
519
538
msgstr ""
539
+ "Pour les collections (telles que les listes et les n-uplets) qui peuvent "
540
+ "implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être "
541
+ "créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`."
520
542
521
543
#: ../Doc/extending/newtypes.rst:526
522
544
msgid ""
@@ -543,24 +565,30 @@ msgstr ""
543
565
544
566
#: ../Doc/extending/newtypes.rst:547
545
567
msgid "Weak Reference Support"
546
- msgstr ""
568
+ msgstr "Prise en charge de la référence faible "
547
569
548
570
#: ../Doc/extending/newtypes.rst:549
549
571
msgid ""
550
572
"One of the goals of Python's weak reference implementation is to allow any "
551
573
"type to participate in the weak reference mechanism without incurring the "
552
574
"overhead on performance-critical objects (such as numbers)."
553
575
msgstr ""
576
+ "L'un des objectifs de l'implémentation de la référence faible de *Python* "
577
+ "est de permettre à tout type d'objet de participer au mécanisme de référence "
578
+ "faible sans avoir à supporter le surcoût de la performance critique des "
579
+ "certains objets, tels que les nombres."
554
580
555
581
#: ../Doc/extending/newtypes.rst:554
556
582
msgid "Documentation for the :mod:`weakref` module."
557
- msgstr ""
583
+ msgstr "Documentation pour le module :mod:`weakref`. "
558
584
559
585
#: ../Doc/extending/newtypes.rst:556
560
586
msgid ""
561
587
"For an object to be weakly referencable, the extension type must do two "
562
588
"things:"
563
589
msgstr ""
590
+ "Pour qu'un objet soit faiblement référençable, le type d'extension doit "
591
+ "faire deux choses :"
564
592
565
593
#: ../Doc/extending/newtypes.rst:558
566
594
msgid ""
@@ -569,34 +597,48 @@ msgid ""
569
597
"``NULL`` (which is automatic when using the default :c:member:`~PyTypeObject."
570
598
"tp_alloc`)."
571
599
msgstr ""
600
+ "Inclure un champ :c:type:`PyObject\\ *` dans la structure d'objet C dédiée au "
601
+ "mécanisme de référence faible. Le constructeur de l'objet doit le laisser à "
602
+ "la valeur ``NULL`` (ce qui est automatique lorsque l'on utilise le champ par "
603
+ "défaut :c:member:`~PyTypeObject.tp_alloc`)."
572
604
573
605
#: ../Doc/extending/newtypes.rst:563
574
606
msgid ""
575
607
"Set the :c:member:`~PyTypeObject.tp_weaklistoffset` type member to the "
576
608
"offset of the aforementioned field in the C object structure, so that the "
577
609
"interpreter knows how to access and modify that field."
578
610
msgstr ""
611
+ "Définissez le membre de type :c:member:`~PyTypeObject.tp_weaklistoffset` à "
612
+ "la valeur de décalage (*offset*) du champ susmentionné dans la structure de "
613
+ "l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le "
614
+ "modifier."
579
615
580
616
#: ../Doc/extending/newtypes.rst:567
581
617
msgid ""
582
618
"Concretely, here is how a trivial object structure would be augmented with "
583
619
"the required field::"
584
620
msgstr ""
621
+ "Concrètement, voici comment une structure d'objet simple serait complétée "
622
+ "par le champ requis ::"
585
623
586
624
#: ../Doc/extending/newtypes.rst:575
587
625
msgid "And the corresponding member in the statically-declared type object::"
588
626
msgstr ""
627
+ "Et le membre correspondant dans l'objet de type déclaré statiquement ::"
589
628
590
629
#: ../Doc/extending/newtypes.rst:583
591
630
msgid ""
592
631
"The only further addition is that ``tp_dealloc`` needs to clear any weak "
593
632
"references (by calling :c:func:`PyObject_ClearWeakRefs`) if the field is non-"
594
633
"``NULL``::"
595
634
msgstr ""
635
+ "Le seul ajout supplémentaire est que ``tp_dealloc`` doit effacer toute "
636
+ "référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ "
637
+ "est non ``NULL`` ::"
596
638
597
639
#: ../Doc/extending/newtypes.rst:599
598
640
msgid "More Suggestions"
599
- msgstr ""
641
+ msgstr "Plus de suggestions "
600
642
601
643
#: ../Doc/extending/newtypes.rst:601
602
644
msgid ""
@@ -606,30 +648,40 @@ msgid ""
606
648
"want (for example, ``tp_richcompare``). You will find examples of the "
607
649
"function you want to implement."
608
650
msgstr ""
651
+ "Pour savoir comment mettre en œuvre une méthode spécifique pour votre "
652
+ "nouveau type de données, téléchargez le code source :term:`CPython`. Allez "
653
+ "dans le répertoire :file:`Objects`, puis cherchez dans les fichiers sources "
654
+ "*C* la fonction ``tp_`` plus la fonction que vous voulez (par exemple, "
655
+ "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous "
656
+ "voulez implémenter."
609
657
610
658
#: ../Doc/extending/newtypes.rst:607
611
659
msgid ""
612
660
"When you need to verify that an object is a concrete instance of the type "
613
661
"you are implementing, use the :c:func:`PyObject_TypeCheck` function. A "
614
662
"sample of its use might be something like the following::"
615
663
msgstr ""
664
+ "Lorsque vous avez besoin de vérifier qu'un objet est une instance concrète "
665
+ "du type que vous implémentez, utilisez la fonction :c:func:"
666
+ "`PyObject_TypeCheck`. Voici un exemple de son utilisation ::"
616
667
617
668
#: ../Doc/extending/newtypes.rst:618
618
669
msgid "Download CPython source releases."
619
- msgstr ""
670
+ msgstr "Télécharger les versions sources de *CPython*. "
620
671
621
672
#: ../Doc/extending/newtypes.rst:618
622
673
msgid "https://www.python.org/downloads/source/"
623
- msgstr ""
674
+ msgstr "https://www.python.org/downloads/source/ "
624
675
625
676
#: ../Doc/extending/newtypes.rst:620
626
677
msgid ""
627
678
"The CPython project on GitHub, where the CPython source code is developed."
628
679
msgstr ""
680
+ "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*."
629
681
630
682
#: ../Doc/extending/newtypes.rst:621
631
683
msgid "https://github.com/python/cpython"
632
- msgstr ""
684
+ msgstr "https://github.com/python/cpython "
633
685
634
686
#~ msgid "Footnotes"
635
687
#~ msgstr "Notes"
0 commit comments