@@ -16,7 +16,7 @@ msgstr ""
16
16
17
17
#: ../Doc/extending/newtypes.rst:5
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:9
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:47
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:52
79
84
msgid "Finalization and De-allocation"
80
- msgstr ""
85
+ msgstr "Finalisation et de-allocation "
81
86
82
87
#: ../Doc/extending/newtypes.rst:64
83
88
msgid ""
@@ -125,11 +130,11 @@ msgstr ""
125
130
126
131
#: ../Doc/extending/newtypes.rst:134
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:141
131
136
msgid "Object Presentation"
132
- msgstr ""
137
+ msgstr "Présentation de l'objet "
133
138
134
139
#: ../Doc/extending/newtypes.rst:143
135
140
msgid ""
@@ -165,11 +170,11 @@ msgstr ""
165
170
166
171
#: ../Doc/extending/newtypes.rst:174
167
172
msgid "Here is a simple example::"
168
- msgstr ""
173
+ msgstr "Voici un exemple simple :: "
169
174
170
175
#: ../Doc/extending/newtypes.rst:186
171
176
msgid "Attribute Management"
172
- msgstr ""
177
+ msgstr "Gestion des attributs "
173
178
174
179
#: ../Doc/extending/newtypes.rst:188
175
180
msgid ""
@@ -203,7 +208,7 @@ msgstr ""
203
208
204
209
#: ../Doc/extending/newtypes.rst:217
205
210
msgid "Generic Attribute Management"
206
- msgstr ""
211
+ msgstr "Gestion des attributs génériques "
207
212
208
213
#: ../Doc/extending/newtypes.rst:219
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:225
221
228
msgid ""
@@ -244,6 +251,7 @@ msgstr ""
244
251
#: ../Doc/extending/newtypes.rst:239
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:245
249
257
msgid ""
@@ -295,35 +303,35 @@ msgstr "Signification"
295
303
296
304
#: ../Doc/extending/newtypes.rst:286
297
305
msgid ":const:`READONLY`"
298
- msgstr ""
306
+ msgstr ":const:`READONLY` "
299
307
300
308
#: ../Doc/extending/newtypes.rst:286
301
309
msgid "Never writable."
302
- msgstr ""
310
+ msgstr "Jamais disponible en écriture. "
303
311
304
312
#: ../Doc/extending/newtypes.rst:288
305
313
msgid ":const:`READ_RESTRICTED`"
306
- msgstr ""
314
+ msgstr ":const:`READ_RESTRICTED` "
307
315
308
316
#: ../Doc/extending/newtypes.rst:288
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:290
313
321
msgid ":const:`WRITE_RESTRICTED`"
314
- msgstr ""
322
+ msgstr ":const:`WRITE_RESTRICTED` "
315
323
316
324
#: ../Doc/extending/newtypes.rst:290
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:292
321
329
msgid ":const:`RESTRICTED`"
322
- msgstr ""
330
+ msgstr ":const:`RESTRICTED` "
323
331
324
332
#: ../Doc/extending/newtypes.rst:292
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:301
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:307
339
354
msgid ""
@@ -343,7 +358,7 @@ msgstr ""
343
358
344
359
#: ../Doc/extending/newtypes.rst:321
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:323
349
364
msgid ""
@@ -379,7 +394,7 @@ msgstr ""
379
394
380
395
#: ../Doc/extending/newtypes.rst:365
381
396
msgid "Object Comparison"
382
- msgstr ""
397
+ msgstr "Comparaison des objets "
383
398
384
399
#: ../Doc/extending/newtypes.rst:371
385
400
msgid ""
@@ -408,7 +423,7 @@ msgstr ""
408
423
409
424
#: ../Doc/extending/newtypes.rst:414
410
425
msgid "Abstract Protocol Support"
411
- msgstr ""
426
+ msgstr "Support pour le protocole abstrait "
412
427
413
428
#: ../Doc/extending/newtypes.rst:416
414
429
msgid ""
@@ -466,7 +481,7 @@ msgstr ""
466
481
467
482
#: ../Doc/extending/newtypes.rst:470
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:472
472
487
msgid ""
@@ -491,7 +506,7 @@ msgstr ""
491
506
492
507
#: ../Doc/extending/newtypes.rst:484
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:510
497
512
msgid ""
@@ -509,13 +524,20 @@ msgid ""
509
524
"tp_iter` handler, which must return an :term:`iterator` object. Here the "
510
525
"same guidelines apply as for Python classes:"
511
526
msgstr ""
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* :"
512
531
513
532
#: ../Doc/extending/newtypes.rst:521
514
533
msgid ""
515
534
"For collections (such as lists and tuples) which can support multiple "
516
535
"independent iterators, a new iterator should be created and returned by each "
517
536
"call to :c:member:`~PyTypeObject.tp_iter`."
518
537
msgstr ""
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`."
519
541
520
542
#: ../Doc/extending/newtypes.rst:524
521
543
msgid ""
@@ -541,24 +563,30 @@ msgstr ""
541
563
542
564
#: ../Doc/extending/newtypes.rst:545
543
565
msgid "Weak Reference Support"
544
- msgstr ""
566
+ msgstr "Prise en charge de la référence faible "
545
567
546
568
#: ../Doc/extending/newtypes.rst:547
547
569
msgid ""
548
570
"One of the goals of Python's weak reference implementation is to allow any "
549
571
"type to participate in the weak reference mechanism without incurring the "
550
572
"overhead on performance-critical objects (such as numbers)."
551
573
msgstr ""
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."
552
578
553
579
#: ../Doc/extending/newtypes.rst:552
554
580
msgid "Documentation for the :mod:`weakref` module."
555
- msgstr ""
581
+ msgstr "Documentation pour le module :mod:`weakref`. "
556
582
557
583
#: ../Doc/extending/newtypes.rst:554
558
584
msgid ""
559
585
"For an object to be weakly referencable, the extension type must do two "
560
586
"things:"
561
587
msgstr ""
588
+ "Pour qu'un objet soit faiblement référençable, le type d'extension doit "
589
+ "faire deux choses :"
562
590
563
591
#: ../Doc/extending/newtypes.rst:556
564
592
msgid ""
@@ -574,16 +602,23 @@ msgid ""
574
602
"offset of the aforementioned field in the C object structure, so that the "
575
603
"interpreter knows how to access and modify that field."
576
604
msgstr ""
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."
577
609
578
610
#: ../Doc/extending/newtypes.rst:565
579
611
msgid ""
580
612
"Concretely, here is how a trivial object structure would be augmented with "
581
613
"the required field::"
582
614
msgstr ""
615
+ "Concrètement, voici comment une structure d'objet simple serait complétée "
616
+ "par le champ requis ::"
583
617
584
618
#: ../Doc/extending/newtypes.rst:573
585
619
msgid "And the corresponding member in the statically-declared type object::"
586
620
msgstr ""
621
+ "Et le membre correspondant dans l'objet de type déclaré statiquement ::"
587
622
588
623
#: ../Doc/extending/newtypes.rst:581
589
624
msgid ""
@@ -594,7 +629,7 @@ msgstr ""
594
629
595
630
#: ../Doc/extending/newtypes.rst:597
596
631
msgid "More Suggestions"
597
- msgstr ""
632
+ msgstr "Plus de suggestions "
598
633
599
634
#: ../Doc/extending/newtypes.rst:599
600
635
msgid ""
@@ -604,30 +639,40 @@ msgid ""
604
639
"want (for example, ``tp_richcompare``). You will find examples of the "
605
640
"function you want to implement."
606
641
msgstr ""
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."
607
648
608
649
#: ../Doc/extending/newtypes.rst:605
609
650
msgid ""
610
651
"When you need to verify that an object is a concrete instance of the type "
611
652
"you are implementing, use the :c:func:`PyObject_TypeCheck` function. A "
612
653
"sample of its use might be something like the following::"
613
654
msgstr ""
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 ::"
614
658
615
659
#: ../Doc/extending/newtypes.rst:616
616
660
msgid "Download CPython source releases."
617
- msgstr ""
661
+ msgstr "Télécharger les versions sources de *CPython*. "
618
662
619
663
#: ../Doc/extending/newtypes.rst:616
620
664
msgid "https://www.python.org/downloads/source/"
621
- msgstr ""
665
+ msgstr "https://www.python.org/downloads/source/ "
622
666
623
667
#: ../Doc/extending/newtypes.rst:618
624
668
msgid ""
625
669
"The CPython project on GitHub, where the CPython source code is developed."
626
670
msgstr ""
671
+ "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*."
627
672
628
673
#: ../Doc/extending/newtypes.rst:619
629
674
msgid "https://github.com/python/cpython"
630
- msgstr ""
675
+ msgstr "https://github.com/python/cpython "
631
676
632
677
#~ msgid "Footnotes"
633
678
#~ msgstr "Notes"
0 commit comments