forked from python/python-docs-fr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatamodel.po
More file actions
3310 lines (2944 loc) · 152 KB
/
datamodel.po
File metadata and controls
3310 lines (2944 loc) · 152 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2016, 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 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-30 10:44+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"
#: ../Doc/reference/datamodel.rst:6
msgid "Data model"
msgstr "Modèle de données"
#: ../Doc/reference/datamodel.rst:12
msgid "Objects, values and types"
msgstr "Objets, valeurs et types"
#: ../Doc/reference/datamodel.rst:18
msgid ""
":dfn:`Objects` are Python's abstraction for data. All data in a Python "
"program is represented by objects or by relations between objects. (In a "
"sense, and in conformance to Von Neumann's model of a \"stored program "
"computer,\" code is also represented by objects.)"
msgstr ""
"En Python, les données sont représentées sous forme :dfn:`d'objets`. Toutes "
"les données d'un programme Python sont représentées par des objets ou par "
"des relations entre les objets (dans un certain sens, et en conformité avec "
"le modèle de Von Neumann \"d'ordinateur à programme enregistré\", le code "
"est aussi représenté par des objets)."
#: ../Doc/reference/datamodel.rst:32
msgid ""
"Every object has an identity, a type and a value. An object's *identity* "
"never changes once it has been created; you may think of it as the object's "
"address in memory. The ':keyword:`is`' operator compares the identity of "
"two objects; the :func:`id` function returns an integer representing its "
"identity (currently implemented as its address). An object's :dfn:`type` is "
"also unchangeable. [#]_ An object's type determines the operations that the "
"object supports (e.g., \"does it have a length?\") and also defines the "
"possible values for objects of that type. The :func:`type` function returns "
"an object's type (which is an object itself). The *value* of some objects "
"can change. Objects whose value can change are said to be *mutable*; "
"objects whose value is unchangeable once they are created are called "
"*immutable*. (The value of an immutable container object that contains a "
"reference to a mutable object can change when the latter's value is changed; "
"however the container is still considered immutable, because the collection "
"of objects it contains cannot be changed. So, immutability is not strictly "
"the same as having an unchangeable value, it is more subtle.) An object's "
"mutability is determined by its type; for instance, numbers, strings and "
"tuples are immutable, while dictionaries and lists are mutable."
msgstr ""
#: ../Doc/reference/datamodel.rst:55
msgid ""
"Objects are never explicitly destroyed; however, when they become "
"unreachable they may be garbage-collected. An implementation is allowed to "
"postpone garbage collection or omit it altogether --- it is a matter of "
"implementation quality how garbage collection is implemented, as long as no "
"objects are collected that are still reachable."
msgstr ""
"Un objet n'est jamais explicitement détruit ; cependant, lorsqu'il ne peut "
"plus être atteint, il a vocation à être supprimé par le ramasse-miettes "
"(*garbage-collector* en anglais). L'implémentation peut retarder cette "
"opération ou même ne pas la faire du tout --- la façon dont fonctionne le "
"ramasse-miette est particulière à chaque implémentation, l'important étant "
"qu'il ne supprime pas d'objet qui peut encore être atteint."
#: ../Doc/reference/datamodel.rst:63
msgid ""
"CPython currently uses a reference-counting scheme with (optional) delayed "
"detection of cyclically linked garbage, which collects most objects as soon "
"as they become unreachable, but is not guaranteed to collect garbage "
"containing circular references. See the documentation of the :mod:`gc` "
"module for information on controlling the collection of cyclic garbage. "
"Other implementations act differently and CPython may change. Do not depend "
"on immediate finalization of objects when they become unreachable (ex: "
"always close files)."
msgstr ""
#: ../Doc/reference/datamodel.rst:72
msgid ""
"Note that the use of the implementation's tracing or debugging facilities "
"may keep objects alive that would normally be collectable. Also note that "
"catching an exception with a ':keyword:`try`...\\ :keyword:`except`' "
"statement may keep objects alive."
msgstr ""
"Notez que si vous utilisez les fonctionnalités de débogage ou de trace de "
"l'implémentation, il est possible que des références qui seraient "
"normalement supprimées soient toujours présentes. Notez aussi que capturer "
"une exception avec l'instruction :keyword:`try`...\\ :keyword:`except` peut "
"conserver des objets en vie."
#: ../Doc/reference/datamodel.rst:77
msgid ""
"Some objects contain references to \"external\" resources such as open files "
"or windows. It is understood that these resources are freed when the object "
"is garbage-collected, but since garbage collection is not guaranteed to "
"happen, such objects also provide an explicit way to release the external "
"resource, usually a :meth:`close` method. Programs are strongly recommended "
"to explicitly close such objects. The ':keyword:`try`...\\ :keyword:"
"`finally`' statement provides a convenient way to do this."
msgstr ""
#: ../Doc/reference/datamodel.rst:87
msgid ""
"Some objects contain references to other objects; these are called "
"*containers*. Examples of containers are tuples, lists and dictionaries. "
"The references are part of a container's value. In most cases, when we talk "
"about the value of a container, we imply the values, not the identities of "
"the contained objects; however, when we talk about the mutability of a "
"container, only the identities of the immediately contained objects are "
"implied. So, if an immutable container (like a tuple) contains a reference "
"to a mutable object, its value changes if that mutable object is changed."
msgstr ""
"Certains objets contiennent des références à d'autres objets ; on les "
"appelle *conteneurs*. Comme exemples de conteneurs, nous pouvons citer les "
"tuples, les listes et les dictionnaires. Les références sont parties "
"intégrantes de la valeur d'un conteneur. Dans la plupart des cas, lorsque "
"nous parlons de la valeur d'un conteneur, nous parlons des valeurs, pas des "
"identifiants des objets contenus ; cependant, lorsque nous parlons de la "
"muabilité d'un conteneur, seuls les identifiants des objets immédiatement "
"contenus sont concernés. Ainsi, si un conteneur immuable (comme un tuple) "
"contient une référence à un objet muable, sa valeur change si cet objet "
"muable est modifié."
#: ../Doc/reference/datamodel.rst:96
msgid ""
"Types affect almost all aspects of object behavior. Even the importance of "
"object identity is affected in some sense: for immutable types, operations "
"that compute new values may actually return a reference to any existing "
"object with the same type and value, while for mutable objects this is not "
"allowed. E.g., after ``a = 1; b = 1``, ``a`` and ``b`` may or may not refer "
"to the same object with the value one, depending on the implementation, but "
"after ``c = []; d = []``, ``c`` and ``d`` are guaranteed to refer to two "
"different, unique, newly created empty lists. (Note that ``c = d = []`` "
"assigns the same object to both ``c`` and ``d``.)"
msgstr ""
"Presque tous les comportements d'un objet dépendent du type de l'objet. Même "
"son identifiant est concerné dans un certain sens : pour les types "
"immuables, les opérations qui calculent de nouvelles valeurs peuvent en fait "
"renvoyer une référence à n'importe quel objet existant avec le même type et "
"la même valeur, alors que pour les objets muables cela n'est pas autorisé. "
"Par exemple, après ``a = 1 ; b = 1``, ``a`` et ``b`` peuvent ou non se "
"référer au même objet avec la valeur un, en fonction de l'implémentation. "
"Mais après ``c = [] ; d = []``, il est garanti que ``c`` et ``d`` font "
"référence à deux listes vides distinctes nouvellement créées. Notez que ``c "
"= d = []`` attribue le même objet à ``c`` et ``d``."
#: ../Doc/reference/datamodel.rst:110
msgid "The standard type hierarchy"
msgstr "Hiérarchie des types standards"
#: ../Doc/reference/datamodel.rst:119
msgid ""
"Below is a list of the types that are built into Python. Extension modules "
"(written in C, Java, or other languages, depending on the implementation) "
"can define additional types. Future versions of Python may add types to the "
"type hierarchy (e.g., rational numbers, efficiently stored arrays of "
"integers, etc.)."
msgstr ""
#: ../Doc/reference/datamodel.rst:129
msgid ""
"Some of the type descriptions below contain a paragraph listing 'special "
"attributes.' These are attributes that provide access to the implementation "
"and are not intended for general use. Their definition may change in the "
"future."
msgstr ""
"Quelques descriptions des types ci-dessous contiennent un paragraphe listant "
"des \"attributs spéciaux\". Ces attributs donnent accès à l'implémentation "
"et n'ont, en général, pas vocation à être utilisés. Leur définition peut "
"changer dans le futur."
#: ../Doc/reference/datamodel.rst:139
msgid "None"
msgstr "*None*"
#: ../Doc/reference/datamodel.rst:136
msgid ""
"This type has a single value. There is a single object with this value. "
"This object is accessed through the built-in name ``None``. It is used to "
"signify the absence of a value in many situations, e.g., it is returned from "
"functions that don't explicitly return anything. Its truth value is false."
msgstr ""
"Ce type ne possède qu'une seule valeur. Il n'existe qu'un seul objet avec "
"cette valeur. Vous accédez à cet objet avec le nom natif ``None``. Il est "
"utilisé pour signifier l'absence de valeur dans de nombreux cas, par exemple "
"pour des fonctions qui ne retournent rien explicitement. Sa valeur booléenne "
"est fausse."
#: ../Doc/reference/datamodel.rst:149
msgid "NotImplemented"
msgstr "NotImplemented"
#: ../Doc/reference/datamodel.rst:144
msgid ""
"This type has a single value. There is a single object with this value. "
"This object is accessed through the built-in name ``NotImplemented``. "
"Numeric methods and rich comparison methods may return this value if they do "
"not implement the operation for the operands provided. (The interpreter "
"will then try the reflected operation, or some other fallback, depending on "
"the operator.) Its truth value is true."
msgstr ""
#: ../Doc/reference/datamodel.rst:157
msgid "Ellipsis"
msgstr "Ellipse"
#: ../Doc/reference/datamodel.rst:154
msgid ""
"This type has a single value. There is a single object with this value. "
"This object is accessed through the built-in name ``Ellipsis``. It is used "
"to indicate the presence of the ``...`` syntax in a slice. Its truth value "
"is true."
msgstr ""
#: ../Doc/reference/datamodel.rst:249
msgid ":class:`numbers.Number`"
msgstr ":class:`numbers.Number`"
#: ../Doc/reference/datamodel.rst:162
msgid ""
"These are created by numeric literals and returned as results by arithmetic "
"operators and arithmetic built-in functions. Numeric objects are immutable; "
"once created their value never changes. Python numbers are of course "
"strongly related to mathematical numbers, but subject to the limitations of "
"numerical representation in computers."
msgstr ""
"Ces objets sont créés par les littéraux numériques et renvoyés en tant que "
"résultats par les opérateurs et les fonctions arithmétiques natives. Les "
"objets numériques sont immuables ; une fois créés, leur valeur ne change "
"pas. Les nombres Python sont bien sûr très fortement corrélés aux nombres "
"mathématiques mais ils sont soumis aux limitations des représentations "
"numériques par les ordinateurs."
#: ../Doc/reference/datamodel.rst:168
msgid ""
"Python distinguishes between integers, floating point numbers, and complex "
"numbers:"
msgstr ""
"Python distingue les entiers, les nombres à virgule flottante et les nombres "
"complexes :"
#: ../Doc/reference/datamodel.rst:224
msgid ":class:`numbers.Integral`"
msgstr ":class:`numbers.Integral`"
#: ../Doc/reference/datamodel.rst:174
msgid ""
"These represent elements from the mathematical set of integers (positive and "
"negative)."
msgstr ""
"Ils représentent des éléments de l'ensemble mathématique des entiers "
"(positifs ou négatifs)."
#: ../Doc/reference/datamodel.rst:177
msgid "There are three types of integers:"
msgstr ""
#: ../Doc/reference/datamodel.rst:192
msgid "Plain integers"
msgstr ""
#: ../Doc/reference/datamodel.rst:184
msgid ""
"These represent numbers in the range -2147483648 through 2147483647. (The "
"range may be larger on machines with a larger natural word size, but not "
"smaller.) When the result of an operation would fall outside this range, "
"the result is normally returned as a long integer (in some cases, the "
"exception :exc:`OverflowError` is raised instead). For the purpose of shift "
"and mask operations, integers are assumed to have a binary, 2's complement "
"notation using 32 or more bits, and hiding no bits from the user (i.e., all "
"4294967296 different bit patterns correspond to different values)."
msgstr ""
#: ../Doc/reference/datamodel.rst:201
msgid "Long integers"
msgstr ""
#: ../Doc/reference/datamodel.rst:197
msgid ""
"These represent numbers in an unlimited range, subject to available "
"(virtual) memory only. For the purpose of shift and mask operations, a "
"binary representation is assumed, and negative numbers are represented in a "
"variant of 2's complement which gives the illusion of an infinite string of "
"sign bits extending to the left."
msgstr ""
"Ils représentent les nombres, sans limite de taille, sous réserve de pouvoir "
"être stockés en mémoire (virtuelle). Afin de pouvoir effectuer des décalages "
"et appliquer des masques, on considère qu'ils ont une représentation "
"binaire. Les nombres négatifs sont représentés comme une variante du "
"complément à 2, qui donne l'illusion d'une chaîne infinie de bits de signe "
"s'étendant vers la gauche."
#: ../Doc/reference/datamodel.rst:214
msgid "Booleans"
msgstr ""
#: ../Doc/reference/datamodel.rst:209
msgid ""
"These represent the truth values False and True. The two objects "
"representing the values ``False`` and ``True`` are the only Boolean objects. "
"The Boolean type is a subtype of plain integers, and Boolean values behave "
"like the values 0 and 1, respectively, in almost all contexts, the exception "
"being that when converted to a string, the strings ``\"False\"`` or ``\"True"
"\"`` are returned, respectively."
msgstr ""
#: ../Doc/reference/datamodel.rst:218
msgid ""
"The rules for integer representation are intended to give the most "
"meaningful interpretation of shift and mask operations involving negative "
"integers and the least surprises when switching between the plain and long "
"integer domains. Any operation, if it yields a result in the plain integer "
"domain, will yield the same result in the long integer domain or when using "
"mixed operands. The switch between domains is transparent to the programmer."
msgstr ""
#: ../Doc/reference/datamodel.rst:239
msgid ":class:`numbers.Real` (:class:`float`)"
msgstr ":class:`numbers.Real` (:class:`float`)"
#: ../Doc/reference/datamodel.rst:233
msgid ""
"These represent machine-level double precision floating point numbers. You "
"are at the mercy of the underlying machine architecture (and C or Java "
"implementation) for the accepted range and handling of overflow. Python does "
"not support single-precision floating point numbers; the savings in "
"processor and memory usage that are usually the reason for using these are "
"dwarfed by the overhead of using objects in Python, so there is no reason to "
"complicate the language with two kinds of floating point numbers."
msgstr ""
"Ils représentent les nombres à virgule flottante en double précision, tels "
"que manipulés directement par la machine. Vous dépendez donc de "
"l'architecture machine sous-jacente (et de l'implémentation C ou Java) pour "
"les intervalles gérés et le traitement des débordements. Python ne gère pas "
"les nombres à virgule flottante en précision simple ; les gains en puissance "
"de calcul et mémoire, qui sont généralement la raison de l'utilisation des "
"nombres en simple précision, sont annihilés par le fait que Python encapsule "
"de toute façon ces nombres dans des objets. Il n'y a donc aucune raison de "
"compliquer le langage avec deux types de nombres à virgule flottante."
#: ../Doc/reference/datamodel.rst:249
msgid ":class:`numbers.Complex`"
msgstr ""
#: ../Doc/reference/datamodel.rst:246
msgid ""
"These represent complex numbers as a pair of machine-level double precision "
"floating point numbers. The same caveats apply as for floating point "
"numbers. The real and imaginary parts of a complex number ``z`` can be "
"retrieved through the read-only attributes ``z.real`` and ``z.imag``."
msgstr ""
"Ils représentent les nombres complexes, sous la forme d'un couple de nombres "
"à virgule flottante en double précision, tels que manipulés directement par "
"la machine. Les mêmes restrictions s'appliquent que pour les nombres à "
"virgule flottante. La partie réelle et la partie imaginaire d'un nombre "
"complexe ``z`` peuvent être demandées par les attributs en lecture seule ``z."
"real`` et ``z.imag``."
#: ../Doc/reference/datamodel.rst:386
msgid "Sequences"
msgstr "Séquences"
#: ../Doc/reference/datamodel.rst:259
msgid ""
"These represent finite ordered sets indexed by non-negative numbers. The "
"built-in function :func:`len` returns the number of items of a sequence. "
"When the length of a sequence is *n*, the index set contains the numbers 0, "
"1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``."
msgstr ""
"Ils représentent des ensembles de taille finie indicés par des entiers "
"positifs ou nuls. La fonction native :func:`len` renvoie le nombre "
"d'éléments de la séquence. Quand la longueur d'une séquence est *n*, "
"l'ensemble des indices contient les entiers 0, 1 ..., *n-1*. On accède à "
"l'élément d'indice *i* de la séquence *a* par ``a[i]``."
#: ../Doc/reference/datamodel.rst:266
msgid ""
"Sequences also support slicing: ``a[i:j]`` selects all items with index *k* "
"such that *i* ``<=`` *k* ``<`` *j*. When used as an expression, a slice is "
"a sequence of the same type. This implies that the index set is renumbered "
"so that it starts at 0."
msgstr ""
"Les séquences peuvent aussi être découpées en tranches (*slicing* en "
"anglais) : ``a[i:j]`` sélectionne tous les éléments d'indice *k* tel que *i* "
"``<=`` *k* ``<`` *j*. Quand on l'utilise dans une expression, la tranche est "
"du même type que la séquence. Ceci veut dire que l'ensemble des indices de "
"la tranche est renuméroté de manière à partir de 0."
#: ../Doc/reference/datamodel.rst:273
msgid ""
"Some sequences also support \"extended slicing\" with a third \"step\" "
"parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = "
"i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*."
msgstr ""
"Quelques séquences gèrent le \"découpage étendu\" (*extended slicing* en "
"anglais) avec un troisième paramètre : ``a[i:j:k]`` sélectionne tous les "
"éléments de *a* d'indice *x* où ``x = i + n*k``, avec *n* ``>=`` ``0`` et "
"*i* ``<=`` *x* ``<`` *j*."
#: ../Doc/reference/datamodel.rst:277
msgid "Sequences are distinguished according to their mutability:"
msgstr "Les séquences se différencient en fonction de leur muabilité :"
#: ../Doc/reference/datamodel.rst:352
msgid "Immutable sequences"
msgstr "Séquences immuables"
#: ../Doc/reference/datamodel.rst:284
msgid ""
"An object of an immutable sequence type cannot change once it is created. "
"(If the object contains references to other objects, these other objects may "
"be mutable and may be changed; however, the collection of objects directly "
"referenced by an immutable object cannot change.)"
msgstr ""
"Un objet de type de séquence immuable ne peut pas être modifié une fois "
"qu'il a été créé. Si l'objet contient des références à d'autres objets, ces "
"autres objets peuvent être muables et peuvent être modifiés ; cependant, les "
"objets directement référencés par un objet immuable ne peuvent pas être "
"modifiés."
#: ../Doc/reference/datamodel.rst:289
msgid "The following types are immutable sequences:"
msgstr "Les types suivants sont des séquences immuables :"
#: ../Doc/reference/datamodel.rst:319
msgid "Strings"
msgstr "Chaînes de caractères"
#: ../Doc/reference/datamodel.rst:300
msgid ""
"The items of a string are characters. There is no separate character type; "
"a character is represented by a string of one item. Characters represent (at "
"least) 8-bit bytes. The built-in functions :func:`chr` and :func:`ord` "
"convert between characters and nonnegative integers representing the byte "
"values. Bytes with the values 0-127 usually represent the corresponding "
"ASCII values, but the interpretation of values is up to the program. The "
"string data type is also used to represent arrays of bytes, e.g., to hold "
"data read from a file."
msgstr ""
#: ../Doc/reference/datamodel.rst:316
msgid ""
"(On systems whose native character set is not ASCII, strings may use EBCDIC "
"in their internal representation, provided the functions :func:`chr` and :"
"func:`ord` implement a mapping between ASCII and EBCDIC, and string "
"comparison preserves the ASCII order. Or perhaps someone can propose a "
"better rule?)"
msgstr ""
#: ../Doc/reference/datamodel.rst:340
msgid "Unicode"
msgstr "Unicode"
#: ../Doc/reference/datamodel.rst:331
msgid ""
"The items of a Unicode object are Unicode code units. A Unicode code unit "
"is represented by a Unicode object of one item and can hold either a 16-bit "
"or 32-bit value representing a Unicode ordinal (the maximum value for the "
"ordinal is given in ``sys.maxunicode``, and depends on how Python is "
"configured at compile time). Surrogate pairs may be present in the Unicode "
"object, and will be reported as two separate items. The built-in functions :"
"func:`unichr` and :func:`ord` convert between code units and nonnegative "
"integers representing the Unicode ordinals as defined in the Unicode "
"Standard 3.0. Conversion from and to other encodings are possible through "
"the Unicode method :meth:`encode` and the built-in function :func:`unicode`."
msgstr ""
#: ../Doc/reference/datamodel.rst:352
msgid "Tuples"
msgstr "Tuples"
#: ../Doc/reference/datamodel.rst:348
msgid ""
"The items of a tuple are arbitrary Python objects. Tuples of two or more "
"items are formed by comma-separated lists of expressions. A tuple of one "
"item (a 'singleton') can be formed by affixing a comma to an expression (an "
"expression by itself does not create a tuple, since parentheses must be "
"usable for grouping of expressions). An empty tuple can be formed by an "
"empty pair of parentheses."
msgstr ""
"Les éléments d'un tuple sont n'importe quels objets Python. Les tuples de "
"deux ou plus éléments sont formés par une liste d'expressions dont les "
"éléments sont séparés par des virgules. Un tuple composé d'un seul élément "
"(un \"singleton\") est formé en suffixant une expression avec une virgule "
"(une expression en tant que telle ne crée pas un tuple car les parenthèses "
"doivent rester disponibles pour grouper les expressions). Un tuple vide peut "
"être formé à l'aide d'une paire de parenthèses vide."
#: ../Doc/reference/datamodel.rst:386
msgid "Mutable sequences"
msgstr "Séquences muables"
#: ../Doc/reference/datamodel.rst:362
msgid ""
"Mutable sequences can be changed after they are created. The subscription "
"and slicing notations can be used as the target of assignment and :keyword:"
"`del` (delete) statements."
msgstr ""
"Les séquences muables peuvent être modifiées après leur création. Les "
"notations de tranches et de sous-ensembles peuvent être utilisées en tant "
"que cibles d'une assignation ou de l'instruction :keyword:`del` "
"(suppression)."
#: ../Doc/reference/datamodel.rst:366
msgid "There are currently two intrinsic mutable sequence types:"
msgstr "Il existe aujourd'hui deux types intrinsèques de séquences muables :"
#: ../Doc/reference/datamodel.rst:373
msgid "Lists"
msgstr "Listes"
#: ../Doc/reference/datamodel.rst:371
msgid ""
"The items of a list are arbitrary Python objects. Lists are formed by "
"placing a comma-separated list of expressions in square brackets. (Note that "
"there are no special cases needed to form lists of length 0 or 1.)"
msgstr ""
"N'importe quel objet Python peut être élément d'une liste. Les listes sont "
"créées en plaçant entre crochets une liste d'expressions dont les éléments "
"sont séparés par des virgules (notez que les listes de longueur 0 ou 1 ne "
"sont pas des cas particuliers)."
#: ../Doc/reference/datamodel.rst:381
msgid "Byte Arrays"
msgstr "Tableaux d'octets"
#: ../Doc/reference/datamodel.rst:378
msgid ""
"A bytearray object is a mutable array. They are created by the built-in :"
"func:`bytearray` constructor. Aside from being mutable (and hence "
"unhashable), byte arrays otherwise provide the same interface and "
"functionality as immutable bytes objects."
msgstr ""
#: ../Doc/reference/datamodel.rst:385
msgid ""
"The extension module :mod:`array` provides an additional example of a "
"mutable sequence type."
msgstr ""
#: ../Doc/reference/datamodel.rst:420
msgid "Set types"
msgstr "Ensembles"
#: ../Doc/reference/datamodel.rst:393
msgid ""
"These represent unordered, finite sets of unique, immutable objects. As "
"such, they cannot be indexed by any subscript. However, they can be iterated "
"over, and the built-in function :func:`len` returns the number of items in a "
"set. Common uses for sets are fast membership testing, removing duplicates "
"from a sequence, and computing mathematical operations such as intersection, "
"union, difference, and symmetric difference."
msgstr ""
"Ils représentent les ensembles d'objets, non ordonnés, finis et dont les "
"éléments sont uniques. Tels quels, ils ne peuvent pas être indicés. "
"Cependant, il est possible d'itérer dessus et la fonction native :func:`len` "
"renvoie le nombre d'éléments de l'ensemble. Les utilisations classiques des "
"ensembles sont les tests d'appartenance rapides, la suppression de doublons "
"dans une séquence et le calcul d'opérations mathématiques telles que "
"l'intersection, l'union, la différence et le complémentaire."
#: ../Doc/reference/datamodel.rst:400
msgid ""
"For set elements, the same immutability rules apply as for dictionary keys. "
"Note that numeric types obey the normal rules for numeric comparison: if two "
"numbers compare equal (e.g., ``1`` and ``1.0``), only one of them can be "
"contained in a set."
msgstr ""
"Pour les éléments des ensembles, les mêmes règles concernant l'immuabilité "
"s'appliquent que pour les clés de dictionnaires. Notez que les types "
"numériques obéissent aux règles normales pour les comparaisons numériques : "
"si deux nombres sont égaux (pour l'opération de comparaison, par exemple "
"``1`` et ``1.0``), un seul élément est conservé dans l'ensemble."
#: ../Doc/reference/datamodel.rst:405
msgid "There are currently two intrinsic set types:"
msgstr "Actuellement, il existe deux types d'ensembles natifs :"
#: ../Doc/reference/datamodel.rst:412
msgid "Sets"
msgstr "Ensembles"
#: ../Doc/reference/datamodel.rst:410
msgid ""
"These represent a mutable set. They are created by the built-in :func:`set` "
"constructor and can be modified afterwards by several methods, such as :meth:"
"`~set.add`."
msgstr ""
"Ils représentent les ensembles muables. Un ensemble est créé par la fonction "
"native constructeur :func:`set` et peut être modifié par la suite à l'aide "
"de différentes méthodes, par exemple :meth:`~set.add`."
#: ../Doc/reference/datamodel.rst:420
msgid "Frozen sets"
msgstr "Ensembles gelés"
#: ../Doc/reference/datamodel.rst:417
msgid ""
"These represent an immutable set. They are created by the built-in :func:"
"`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, "
"it can be used again as an element of another set, or as a dictionary key."
msgstr ""
"Ils représentent les ensembles immuables. Ils sont créés par la fonction "
"native constructeur :func:`frozenset`. Comme un ensemble gelé est immuable "
"et :term:`hachable`, il peut être utilisé comme élément d'un autre ensemble "
"ou comme clé de dictionnaire."
#: ../Doc/reference/datamodel.rst:457
msgid "Mappings"
msgstr "Tableaux de correspondances"
#: ../Doc/reference/datamodel.rst:428
msgid ""
"These represent finite sets of objects indexed by arbitrary index sets. The "
"subscript notation ``a[k]`` selects the item indexed by ``k`` from the "
"mapping ``a``; this can be used in expressions and as the target of "
"assignments or :keyword:`del` statements. The built-in function :func:`len` "
"returns the number of items in a mapping."
msgstr ""
"Ils représentent les ensembles finis d'objets indicés par des ensembles "
"index arbitraires. La notation ``a[k]`` sélectionne l'élément indicé par "
"``k`` dans le tableau de correspondance ``a`` ; elle peut être utilisée dans "
"des expressions, comme cible d'une assignation ou avec l'instruction :"
"keyword:`del`. La fonction native :func:`len` renvoie le nombre d'éléments "
"du tableau de correspondances."
#: ../Doc/reference/datamodel.rst:434
msgid "There is currently a single intrinsic mapping type:"
msgstr ""
"Il n'existe actuellement qu'un seul type natif pour les tableaux de "
"correspondances :"
#: ../Doc/reference/datamodel.rst:457
msgid "Dictionaries"
msgstr "Dictionnaires"
#: ../Doc/reference/datamodel.rst:439
msgid ""
"These represent finite sets of objects indexed by nearly arbitrary values. "
"The only types of values not acceptable as keys are values containing lists "
"or dictionaries or other mutable types that are compared by value rather "
"than by object identity, the reason being that the efficient implementation "
"of dictionaries requires a key's hash value to remain constant. Numeric "
"types used for keys obey the normal rules for numeric comparison: if two "
"numbers compare equal (e.g., ``1`` and ``1.0``) then they can be used "
"interchangeably to index the same dictionary entry."
msgstr ""
"Ils représentent les ensembles finis d'objets indicés par des valeurs "
"presque arbitraires. Les seuls types de valeurs non reconnus comme clés sont "
"les valeurs contenant des listes, des dictionnaires ou les autres types "
"muables qui sont comparés par valeur plutôt que par l'identifiant de "
"l'objet. La raison de cette limitation est qu'une implémentation efficace de "
"dictionnaire requiert que l'empreinte par hachage des clés reste constante "
"dans le temps. Les types numériques obéissent aux règles normales pour les "
"comparaisons numériques : si deux nombres sont égaux pour l'opération de "
"comparaison, par exemple ``1`` et ``1.0``, alors ces deux nombres peuvent "
"être utilisés indifféremment pour désigner la même entrée du dictionnaire."
#: ../Doc/reference/datamodel.rst:448
msgid ""
"Dictionaries are mutable; they can be created by the ``{...}`` notation (see "
"section :ref:`dict`)."
msgstr ""
"Les dictionnaires sont muables : ils peuvent être créés par la notation "
"``{...}`` (reportez-vous à la section :ref:`dict`)."
#: ../Doc/reference/datamodel.rst:456
msgid ""
"The extension modules :mod:`dbm`, :mod:`gdbm`, and :mod:`bsddb` provide "
"additional examples of mapping types."
msgstr ""
#: ../Doc/reference/datamodel.rst:727
msgid "Callable types"
msgstr "Types appelables"
#: ../Doc/reference/datamodel.rst:466
msgid ""
"These are the types to which the function call operation (see section :ref:"
"`calls`) can be applied:"
msgstr ""
"Ce sont les types sur lesquels on peut faire un appel de fonction (lisez la "
"section :ref:`calls`) :"
#: ../Doc/reference/datamodel.rst:560
msgid "User-defined functions"
msgstr "Fonctions allogènes"
#: ../Doc/reference/datamodel.rst:475
msgid ""
"A user-defined function object is created by a function definition (see "
"section :ref:`function`). It should be called with an argument list "
"containing the same number of items as the function's formal parameter list."
msgstr ""
"Un objet fonction allogène (ou fonction définie par l'utilisateur, mais ce "
"n'est pas forcément l'utilisateur courant qui a défini cette fonction) est "
"créé par la définition d'une fonction (voir la section :ref:`function`). Il "
"doit être appelé avec une liste d'arguments contenant le même nombre "
"d'éléments que la liste des paramètres formels de la fonction."
#: ../Doc/reference/datamodel.rst:480
msgid "Special attributes:"
msgstr "Attributs spéciaux :"
#: ../Doc/reference/datamodel.rst:503
msgid "Attribute"
msgstr "Attribut"
#: ../Doc/reference/datamodel.rst:503
msgid "Meaning"
msgstr "Signification"
#: ../Doc/reference/datamodel.rst:505
msgid ":attr:`__doc__` :attr:`func_doc`"
msgstr ""
#: ../Doc/reference/datamodel.rst:505
msgid "The function's documentation string, or ``None`` if unavailable."
msgstr ""
#: ../Doc/reference/datamodel.rst:505 ../Doc/reference/datamodel.rst:509
#: ../Doc/reference/datamodel.rst:513 ../Doc/reference/datamodel.rst:517
#: ../Doc/reference/datamodel.rst:523 ../Doc/reference/datamodel.rst:533
msgid "Writable"
msgstr "Accessible en écriture"
#: ../Doc/reference/datamodel.rst:509
msgid ":attr:`~definition.\\ __name__` :attr:`func_name`"
msgstr ""
#: ../Doc/reference/datamodel.rst:509
msgid "The function's name"
msgstr "Nom de la fonction"
#: ../Doc/reference/datamodel.rst:513
msgid ":attr:`__module__`"
msgstr ":attr:`__module__`"
#: ../Doc/reference/datamodel.rst:513
msgid ""
"The name of the module the function was defined in, or ``None`` if "
"unavailable."
msgstr ""
"Nom du module où la fonction est définie ou ``None`` si ce nom n'est pas "
"disponible."
#: ../Doc/reference/datamodel.rst:517
msgid ":attr:`__defaults__` :attr:`func_defaults`"
msgstr ""
#: ../Doc/reference/datamodel.rst:517
msgid ""
"A tuple containing default argument values for those arguments that have "
"defaults, or ``None`` if no arguments have a default value."
msgstr ""
"Tuple contenant les valeurs des arguments par défaut pour ceux qui en sont "
"dotés ou ``None`` si aucun argument n'a de valeur par défaut."
#: ../Doc/reference/datamodel.rst:523
msgid ":attr:`__code__` :attr:`func_code`"
msgstr ""
#: ../Doc/reference/datamodel.rst:523
msgid "The code object representing the compiled function body."
msgstr "Objet code représentant le corps de la fonction compilée."
#: ../Doc/reference/datamodel.rst:526
msgid ":attr:`__globals__` :attr:`func_globals`"
msgstr ""
#: ../Doc/reference/datamodel.rst:526
msgid ""
"A reference to the dictionary that holds the function's global variables --- "
"the global namespace of the module in which the function was defined."
msgstr ""
"Référence pointant vers le dictionnaire contenant les variables globales de "
"la fonction -- l'espace de noms global du module dans lequel la fonction est "
"définie."
#: ../Doc/reference/datamodel.rst:526 ../Doc/reference/datamodel.rst:537
msgid "Read-only"
msgstr "Accessible en lecture seule"
#: ../Doc/reference/datamodel.rst:533
msgid ":attr:`~object.\\ __dict__` :attr:`func_dict`"
msgstr ""
#: ../Doc/reference/datamodel.rst:533
msgid "The namespace supporting arbitrary function attributes."
msgstr "Espace de noms accueillant les attributs de la fonction."
#: ../Doc/reference/datamodel.rst:537
msgid ":attr:`__closure__` :attr:`func_closure`"
msgstr ""
#: ../Doc/reference/datamodel.rst:537
msgid ""
"``None`` or a tuple of cells that contain bindings for the function's free "
"variables."
msgstr ""
"``None`` ou tuple de cellules qui contient un lien pour chaque variable "
"libre de la fonction."
#: ../Doc/reference/datamodel.rst:542
msgid ""
"Most of the attributes labelled \"Writable\" check the type of the assigned "
"value."
msgstr ""
"La plupart des attributs étiquetés \"Accessible en écriture\" vérifient le "
"type de la valeur qu'on leur assigne."
#: ../Doc/reference/datamodel.rst:544
msgid "``func_name`` is now writable."
msgstr ""
#: ../Doc/reference/datamodel.rst:547
msgid ""
"The double-underscore attributes ``__closure__``, ``__code__``, "
"``__defaults__``, and ``__globals__`` were introduced as aliases for the "
"corresponding ``func_*`` attributes for forwards compatibility with Python 3."
msgstr ""
#: ../Doc/reference/datamodel.rst:553
msgid ""
"Function objects also support getting and setting arbitrary attributes, "
"which can be used, for example, to attach metadata to functions. Regular "
"attribute dot-notation is used to get and set such attributes. *Note that "
"the current implementation only supports function attributes on user-defined "
"functions. Function attributes on built-in functions may be supported in the "
"future.*"
msgstr ""
"Les objets fonctions acceptent également l'assignation et la lecture "
"d'attributs arbitraires. Vous pouvez utiliser cette fonctionnalité pour, par "
"exemple, associer des métadonnées aux fonctions. La notation classique par "
"point est utilisée pour définir et lire de tels attributs. *Notez que "
"l'implémentation actuelle accepte seulement les attributs de fonction sur "
"les fonctions définies par l'utilisateur. Les attributs de fonction pour les "
"fonctions natives seront peut-être acceptés dans le futur.*"
#: ../Doc/reference/datamodel.rst:559
msgid ""
"Additional information about a function's definition can be retrieved from "
"its code object; see the description of internal types below."
msgstr ""
"Vous trouvez davantage d'informations sur la définition de fonctions dans le "
"code de cet objet ; la description des types internes est donnée plus bas."
#: ../Doc/reference/datamodel.rst:658
msgid "User-defined methods"
msgstr ""
#: ../Doc/reference/datamodel.rst:568
msgid ""
"A user-defined method object combines a class, a class instance (or "
"``None``) and any callable object (normally a user-defined function)."
msgstr ""
#: ../Doc/reference/datamodel.rst:571
msgid ""
"Special read-only attributes: :attr:`im_self` is the class instance object, :"
"attr:`im_func` is the function object; :attr:`im_class` is the class of :"
"attr:`im_self` for bound methods or the class that asked for the method for "
"unbound methods; :attr:`__doc__` is the method's documentation (same as "
"``im_func.__doc__``); :attr:`~definition.__name__` is the method name (same "
"as ``im_func.__name__``); :attr:`__module__` is the name of the module the "
"method was defined in, or ``None`` if unavailable."
msgstr ""
#: ../Doc/reference/datamodel.rst:579
msgid ":attr:`im_self` used to refer to the class that defined the method."
msgstr ""
#: ../Doc/reference/datamodel.rst:582
msgid ""
"For Python 3 forward-compatibility, :attr:`im_func` is also available as :"
"attr:`__func__`, and :attr:`im_self` as :attr:`__self__`."
msgstr ""
#: ../Doc/reference/datamodel.rst:593
msgid ""
"Methods also support accessing (but not setting) the arbitrary function "
"attributes on the underlying function object."
msgstr ""
"Les méthodes savent aussi accéder (mais pas modifier) les attributs de la "
"fonction de l'objet fonction sous-jacent."
#: ../Doc/reference/datamodel.rst:596
msgid ""
"User-defined method objects may be created when getting an attribute of a "
"class (perhaps via an instance of that class), if that attribute is a user-"
"defined function object, an unbound user-defined method object, or a class "
"method object. When the attribute is a user-defined method object, a new "
"method object is only created if the class from which it is being retrieved "
"is the same as, or a derived class of, the class stored in the original "
"method object; otherwise, the original method object is used as it is."
msgstr ""
#: ../Doc/reference/datamodel.rst:609
msgid ""
"When a user-defined method object is created by retrieving a user-defined "
"function object from a class, its :attr:`im_self` attribute is ``None`` and "
"the method object is said to be unbound. When one is created by retrieving a "
"user-defined function object from a class via one of its instances, its :"
"attr:`im_self` attribute is the instance, and the method object is said to "
"be bound. In either case, the new method's :attr:`im_class` attribute is the "
"class from which the retrieval takes place, and its :attr:`im_func` "
"attribute is the original function object."
msgstr ""
#: ../Doc/reference/datamodel.rst:620
msgid ""
"When a user-defined method object is created by retrieving another method "
"object from a class or instance, the behaviour is the same as for a function "
"object, except that the :attr:`im_func` attribute of the new instance is not "
"the original method object but its :attr:`im_func` attribute."
msgstr ""
#: ../Doc/reference/datamodel.rst:630
msgid ""
"When a user-defined method object is created by retrieving a class method "
"object from a class or instance, its :attr:`im_self` attribute is the class "
"itself, and its :attr:`im_func` attribute is the function object underlying "
"the class method."
msgstr ""
#: ../Doc/reference/datamodel.rst:634
msgid ""
"When an unbound user-defined method object is called, the underlying "
"function (:attr:`im_func`) is called, with the restriction that the first "
"argument must be an instance of the proper class (:attr:`im_class`) or of a "
"derived class thereof."
msgstr ""
#: ../Doc/reference/datamodel.rst:639
msgid ""
"When a bound user-defined method object is called, the underlying function (:"
"attr:`im_func`) is called, inserting the class instance (:attr:`im_self`) in "
"front of the argument list. For instance, when :class:`C` is a class which "
"contains a definition for a function :meth:`f`, and ``x`` is an instance of :"
"class:`C`, calling ``x.f(1)`` is equivalent to calling ``C.f(x, 1)``."
msgstr ""
#: ../Doc/reference/datamodel.rst:645
msgid ""
"When a user-defined method object is derived from a class method object, the "
"\"class instance\" stored in :attr:`im_self` will actually be the class "
"itself, so that calling either ``x.f(1)`` or ``C.f(1)`` is equivalent to "
"calling ``f(C,1)`` where ``f`` is the underlying function."
msgstr ""
#: ../Doc/reference/datamodel.rst:650
msgid ""
"Note that the transformation from function object to (unbound or bound) "
"method object happens each time the attribute is retrieved from the class or "
"instance. In some cases, a fruitful optimization is to assign the attribute "
"to a local variable and call that local variable. Also notice that this "
"transformation only happens for user-defined functions; other callable "
"objects (and all non-callable objects) are retrieved without "
"transformation. It is also important to note that user-defined functions "
"which are attributes of a class instance are not converted to bound methods; "
"this *only* happens when the function is an attribute of the class."
msgstr ""
#: ../Doc/reference/datamodel.rst:674
msgid "Generator functions"
msgstr "Fonctions générateurs"
#: ../Doc/reference/datamodel.rst:665
msgid ""
"A function or method which uses the :keyword:`yield` statement (see section :"
"ref:`yield`) is called a :dfn:`generator function`. Such a function, when "
"called, always returns an iterator object which can be used to execute the "
"body of the function: calling the iterator's :meth:`~iterator.next` method "
"will cause the function to execute until it provides a value using the :"
"keyword:`yield` statement. When the function executes a :keyword:`return` "
"statement or falls off the end, a :exc:`StopIteration` exception is raised "
"and the iterator will have reached the end of the set of values to be "
"returned."
msgstr ""
#: ../Doc/reference/datamodel.rst:689
msgid "Built-in functions"
msgstr "Fonctions natives"
#: ../Doc/reference/datamodel.rst:682
msgid ""
"A built-in function object is a wrapper around a C function. Examples of "
"built-in functions are :func:`len` and :func:`math.sin` (:mod:`math` is a "
"standard built-in module). The number and type of the arguments are "