-
-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathexpressions.po
More file actions
1832 lines (1597 loc) · 77.1 KB
/
expressions.po
File metadata and controls
1832 lines (1597 loc) · 77.1 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/expressions.rst:6
msgid "Expressions"
msgstr "Expressions"
#: ../Doc/reference/expressions.rst:10
msgid ""
"This chapter explains the meaning of the elements of expressions in Python."
msgstr ""
"Ce chapitre explique la signification des éléments des expressions en Python."
#: ../Doc/reference/expressions.rst:14
msgid ""
"**Syntax Notes:** In this and the following chapters, extended BNF notation "
"will be used to describe syntax, not lexical analysis. When (one "
"alternative of) a syntax rule has the form"
msgstr ""
"**Notes sur la syntaxe :** dans ce chapitre et le suivant, nous utilisons la "
"notation BNF étendue pour décrire la syntaxe, pas l'analyse lexicale. Quand "
"une règle de syntaxe est de la forme"
#: ../Doc/reference/expressions.rst:23
msgid ""
"and no semantics are given, the semantics of this form of ``name`` are the "
"same as for ``othername``."
msgstr ""
"et qu'aucune sémantique n'est donnée, la sémantique de ``name`` est la même "
"que celle de ``othername``."
#: ../Doc/reference/expressions.rst:30
msgid "Arithmetic conversions"
msgstr "Conversions arithmétiques"
#: ../Doc/reference/expressions.rst:34
msgid ""
"When a description of an arithmetic operator below uses the phrase \"the "
"numeric arguments are converted to a common type,\" the arguments are "
"coerced using the coercion rules listed at :ref:`coercion-rules`. If both "
"arguments are standard numeric types, the following coercions are applied:"
msgstr ""
#: ../Doc/reference/expressions.rst:39
msgid ""
"If either argument is a complex number, the other is converted to complex;"
msgstr ""
"Si l'un des deux arguments est du type nombre complexe, l'autre est converti "
"en nombre complexe ;"
#: ../Doc/reference/expressions.rst:41
msgid ""
"otherwise, if either argument is a floating point number, the other is "
"converted to floating point;"
msgstr ""
"sinon, si l'un des arguments est un nombre à virgule flottante, l'autre est "
"converti en nombre à virgule flottante ;"
#: ../Doc/reference/expressions.rst:44
msgid ""
"otherwise, if either argument is a long integer, the other is converted to "
"long integer;"
msgstr ""
#: ../Doc/reference/expressions.rst:47
msgid "otherwise, both must be plain integers and no conversion is necessary."
msgstr ""
#: ../Doc/reference/expressions.rst:49
msgid ""
"Some additional rules apply for certain operators (e.g., a string left "
"argument to the '%' operator). Extensions can define their own coercions."
msgstr ""
#: ../Doc/reference/expressions.rst:56
msgid "Atoms"
msgstr "Atomes"
#: ../Doc/reference/expressions.rst:60
msgid ""
"Atoms are the most basic elements of expressions. The simplest atoms are "
"identifiers or literals. Forms enclosed in reverse quotes or in "
"parentheses, brackets or braces are also categorized syntactically as "
"atoms. The syntax for atoms is:"
msgstr ""
#: ../Doc/reference/expressions.rst:75
msgid "Identifiers (Names)"
msgstr "Identifiants (noms)"
#: ../Doc/reference/expressions.rst:81
msgid ""
"An identifier occurring as an atom is a name. See section :ref:"
"`identifiers` for lexical definition and section :ref:`naming` for "
"documentation of naming and binding."
msgstr ""
"Un identifiant qui apparaît en tant qu'atome est un nom. Lisez la section :"
"ref:`identifiers` pour la définition lexicale et la section :ref:`naming` "
"pour la documentation sur les noms et les liaisons afférentes."
#: ../Doc/reference/expressions.rst:87
msgid ""
"When the name is bound to an object, evaluation of the atom yields that "
"object. When a name is not bound, an attempt to evaluate it raises a :exc:"
"`NameError` exception."
msgstr ""
"Quand un nom est lié à un objet, l'évaluation de l'atome produit cet objet. "
"Quand le nom n'est pas lié, toute tentative de l'évaluer lève une exception :"
"exc:`NameError`."
#: ../Doc/reference/expressions.rst:95
msgid ""
"**Private name mangling:** When an identifier that textually occurs in a "
"class definition begins with two or more underscore characters and does not "
"end in two or more underscores, it is considered a :dfn:`private name` of "
"that class. Private names are transformed to a longer form before code is "
"generated for them. The transformation inserts the class name, with leading "
"underscores removed and a single underscore inserted, in front of the name. "
"For example, the identifier ``__spam`` occurring in a class named ``Ham`` "
"will be transformed to ``_Ham__spam``. This transformation is independent "
"of the syntactical context in which the identifier is used. If the "
"transformed name is extremely long (longer than 255 characters), "
"implementation defined truncation may happen. If the class name consists "
"only of underscores, no transformation is done."
msgstr ""
"**Transformation des noms privés :** lorsqu'un identificateur qui apparaît "
"textuellement dans la définition d'une classe commence par deux (ou plus) "
"caractères de soulignement et ne se termine pas par deux (ou plus) "
"caractères de soulignement, il est considéré comme un :dfn:`nom privé "
"<private name>` de cette classe. Les noms privés sont transformés en une "
"forme plus longue avant que le code ne soit généré pour eux. La "
"transformation insère le nom de la classe, avec les soulignés enlevés et un "
"seul souligné inséré devant le nom. Par exemple, l'identificateur "
"``__spam`` apparaissant dans une classe nommée ``Ham`` est transformé en "
"``_Ham__spam``. Cette transformation est indépendante du contexte syntaxique "
"dans lequel l'identificateur est utilisé. Si le nom transformé est "
"extrêmement long (plus de 255 caractères), l'implémentation peut le "
"tronquer. Si le nom de la classe est constitué uniquement de traits de "
"soulignement, aucune transformation n'est effectuée."
#: ../Doc/reference/expressions.rst:112
msgid "Literals"
msgstr "Littéraux"
#: ../Doc/reference/expressions.rst:116
msgid "Python supports string literals and various numeric literals:"
msgstr ""
#: ../Doc/reference/expressions.rst:122
msgid ""
"Evaluation of a literal yields an object of the given type (string, integer, "
"long integer, floating point number, complex number) with the given value. "
"The value may be approximated in the case of floating point and imaginary "
"(complex) literals. See section :ref:`literals` for details."
msgstr ""
#: ../Doc/reference/expressions.rst:131
msgid ""
"All literals correspond to immutable data types, and hence the object's "
"identity is less important than its value. Multiple evaluations of literals "
"with the same value (either the same occurrence in the program text or a "
"different occurrence) may obtain the same object or a different object with "
"the same value."
msgstr ""
"Tous les littéraux sont de types immuables et donc l'identifiant de l'objet "
"est moins important que sa valeur. Des évaluations multiples de littéraux "
"avec la même valeur (soit la même occurrence dans le texte du programme, "
"soit une autre occurrence) résultent dans le même objet ou un objet "
"différent avec la même valeur."
#: ../Doc/reference/expressions.rst:141
msgid "Parenthesized forms"
msgstr "Formes parenthésées"
#: ../Doc/reference/expressions.rst:145
msgid ""
"A parenthesized form is an optional expression list enclosed in parentheses:"
msgstr ""
"Une forme parenthésée est une liste d'expressions (cette liste est en fait "
"optionnelle) placée à l'intérieur de parenthèses :"
#: ../Doc/reference/expressions.rst:150
msgid ""
"A parenthesized expression list yields whatever that expression list yields: "
"if the list contains at least one comma, it yields a tuple; otherwise, it "
"yields the single expression that makes up the expression list."
msgstr ""
"Une liste d'expressions entre parenthèses produit ce que la liste de ces "
"expressions produirait : si la liste contient au moins une virgule, elle "
"produit un n-uplet (type *tuple*) ; sinon, elle produit l'expression elle-"
"même (qui constitue donc elle-même la liste d'expressions)."
#: ../Doc/reference/expressions.rst:156
msgid ""
"An empty pair of parentheses yields an empty tuple object. Since tuples are "
"immutable, the rules for literals apply (i.e., two occurrences of the empty "
"tuple may or may not yield the same object)."
msgstr ""
"Une paire de parenthèses vide produit un objet *tuple* vide. Comme les "
"*tuples* sont immuables, la règle pour les littéraux s'applique (c'est-à-"
"dire que deux occurrences du *tuple* vide peuvent, ou pas, produire le même "
"objet)."
#: ../Doc/reference/expressions.rst:164
msgid ""
"Note that tuples are not formed by the parentheses, but rather by use of the "
"comma operator. The exception is the empty tuple, for which parentheses "
"*are* required --- allowing unparenthesized \"nothing\" in expressions would "
"cause ambiguities and allow common typos to pass uncaught."
msgstr ""
"Notez que les *tuples* ne sont pas créés par les parenthèses mais par "
"l'utilisation de la virgule. L'exception est le tuple vide, pour lequel les "
"parenthèses *sont requises* (autoriser que \"rien\" ne soit pas parenthésé "
"dans les expressions aurait généré des ambigüités et aurait permis à "
"certaines coquilles de passer inaperçu)."
#: ../Doc/reference/expressions.rst:173
msgid "List displays"
msgstr "Agencements de listes"
#: ../Doc/reference/expressions.rst:179
msgid ""
"A list display is a possibly empty series of expressions enclosed in square "
"brackets:"
msgstr ""
"Un agencement de liste est une suite (possiblement vide) d'expressions à "
"l'intérieur de crochets :"
#: ../Doc/reference/expressions.rst:196
msgid ""
"A list display yields a new list object. Its contents are specified by "
"providing either a list of expressions or a list comprehension. When a "
"comma-separated list of expressions is supplied, its elements are evaluated "
"from left to right and placed into the list object in that order. When a "
"list comprehension is supplied, it consists of a single expression followed "
"by at least one :keyword:`for` clause and zero or more :keyword:`for` or :"
"keyword:`if` clauses. In this case, the elements of the new list are those "
"that would be produced by considering each of the :keyword:`for` or :keyword:"
"`if` clauses a block, nesting from left to right, and evaluating the "
"expression to produce a list element each time the innermost block is "
"reached [#]_."
msgstr ""
#: ../Doc/reference/expressions.rst:211
msgid "Displays for sets and dictionaries"
msgstr ""
#: ../Doc/reference/expressions.rst:213
msgid ""
"For constructing a set or a dictionary Python provides special syntax called "
"\"displays\", each of them in two flavors:"
msgstr ""
#: ../Doc/reference/expressions.rst:216
msgid "either the container contents are listed explicitly, or"
msgstr "soit le contenu du conteneur est listé explicitement,"
#: ../Doc/reference/expressions.rst:218
msgid ""
"they are computed via a set of looping and filtering instructions, called a :"
"dfn:`comprehension`."
msgstr ""
"soit il est calculé à l'aide de la combinaison d'une boucle et "
"d'instructions de filtrage, appelée une :dfn:`compréhension` (dans le sens "
"de ce qui sert à définir un concept, par opposition à *extension*)."
#: ../Doc/reference/expressions.rst:221
msgid "Common syntax elements for comprehensions are:"
msgstr ""
"Les compréhensions sont constituées des éléments de syntaxe communs "
"suivants :"
#: ../Doc/reference/expressions.rst:229
msgid ""
"The comprehension consists of a single expression followed by at least one :"
"keyword:`for` clause and zero or more :keyword:`for` or :keyword:`if` "
"clauses. In this case, the elements of the new container are those that "
"would be produced by considering each of the :keyword:`for` or :keyword:`if` "
"clauses a block, nesting from left to right, and evaluating the expression "
"to produce an element each time the innermost block is reached."
msgstr ""
"Une compréhension est constituée par une seule expression suivie par au "
"moins une clause :keyword:`for` et zéro ou plus clauses :keyword:`for` ou :"
"keyword:`if`. Dans ce cas, les éléments du nouveau conteneur sont ceux qui "
"auraient été produits si l'on avait considéré toutes les clauses :keyword:"
"`for` ou :keyword:`if` comme des blocs, imbriqués de la gauche vers la "
"droite, et évalué l'expression pour produire un élément à chaque fois que le "
"bloc le plus imbriqué était atteint."
#: ../Doc/reference/expressions.rst:236
msgid ""
"Note that the comprehension is executed in a separate scope, so names "
"assigned to in the target list don't \"leak\" in the enclosing scope."
msgstr ""
#: ../Doc/reference/expressions.rst:243
msgid "Generator expressions"
msgstr "Générateurs (expressions)"
#: ../Doc/reference/expressions.rst:248
msgid "A generator expression is a compact generator notation in parentheses:"
msgstr ""
"Une expression générateur est une notation concise pour un générateur, "
"entourée de parenthèses :"
#: ../Doc/reference/expressions.rst:253
msgid ""
"A generator expression yields a new generator object. Its syntax is the "
"same as for comprehensions, except that it is enclosed in parentheses "
"instead of brackets or curly braces."
msgstr ""
"Une expression générateur produit un nouvel objet générateur. Sa syntaxe est "
"la même que celle des compréhensions, sauf qu'elle est entourée de "
"parenthèses au lieu de crochets ou d'accolades."
#: ../Doc/reference/expressions.rst:257
msgid ""
"Variables used in the generator expression are evaluated lazily when the :"
"meth:`__next__` method is called for generator object (in the same fashion "
"as normal generators). However, the leftmost :keyword:`for` clause is "
"immediately evaluated, so that an error produced by it can be seen before "
"any other possible error in the code that handles the generator expression. "
"Subsequent :keyword:`for` clauses cannot be evaluated immediately since they "
"may depend on the previous :keyword:`for` loop. For example: ``(x*y for x in "
"range(10) for y in bar(x))``."
msgstr ""
#: ../Doc/reference/expressions.rst:266
msgid ""
"The parentheses can be omitted on calls with only one argument. See "
"section :ref:`calls` for the detail."
msgstr ""
#: ../Doc/reference/expressions.rst:272
msgid "Dictionary displays"
msgstr "Agencements de dictionnaires"
#: ../Doc/reference/expressions.rst:278
msgid ""
"A dictionary display is a possibly empty series of key/datum pairs enclosed "
"in curly braces:"
msgstr ""
"Un agencement de dictionnaire est une série (possiblement vide) de couples "
"clés-valeurs entourée par des accolades :"
#: ../Doc/reference/expressions.rst:287
msgid "A dictionary display yields a new dictionary object."
msgstr "Un agencement de dictionnaire produit un nouvel objet dictionnaire."
#: ../Doc/reference/expressions.rst:289
msgid ""
"If a comma-separated sequence of key/datum pairs is given, they are "
"evaluated from left to right to define the entries of the dictionary: each "
"key object is used as a key into the dictionary to store the corresponding "
"datum. This means that you can specify the same key multiple times in the "
"key/datum list, and the final dictionary's value for that key will be the "
"last one given."
msgstr ""
"Si une séquence (dont les éléments sont séparés par des virgules) de couples "
"clés-valeurs est fournie, les couples sont évalués de la gauche vers la "
"droite pour définir les entrées du dictionnaire : chaque objet clé est "
"utilisé comme clé dans le dictionnaire pour stocker la donnée "
"correspondante. Cela signifie que vous pouvez spécifier la même clé "
"plusieurs fois dans la liste des couples clés-valeurs et, dans ce cas, la "
"valeur finalement stockée dans le dictionnaire est la dernière donnée."
#: ../Doc/reference/expressions.rst:295
msgid ""
"A dict comprehension, in contrast to list and set comprehensions, needs two "
"expressions separated with a colon followed by the usual \"for\" and \"if\" "
"clauses. When the comprehension is run, the resulting key and value elements "
"are inserted in the new dictionary in the order they are produced."
msgstr ""
"Une compréhension de dictionnaire, au contraire des compréhensions de listes "
"ou d'ensembles, requiert deux expressions séparées par une virgule et "
"suivies par les clauses usuelles \"for\" et \"if\". Quand la compréhension "
"est exécutée, les éléments clés-valeurs sont insérés dans le nouveau "
"dictionnaire dans l'ordre dans lequel ils sont produits."
#: ../Doc/reference/expressions.rst:303
msgid ""
"Restrictions on the types of the key values are listed earlier in section :"
"ref:`types`. (To summarize, the key type should be :term:`hashable`, which "
"excludes all mutable objects.) Clashes between duplicate keys are not "
"detected; the last datum (textually rightmost in the display) stored for a "
"given key value prevails."
msgstr ""
"Les restrictions relatives aux types des clés sont données dans la section :"
"ref:`types` (pour résumer, le type de la clé doit être :term:`hachable "
"<hashable>`, ce qui exclut tous les objets muables). Les collisions entre "
"les clés dupliquées ne sont pas détectées ; la dernière valeur (celle qui "
"apparaît le plus à droite dans l'agencement) stockée prévaut pour une clé "
"donnée."
#: ../Doc/reference/expressions.rst:313
msgid "Set displays"
msgstr "Agencements d'ensembles"
#: ../Doc/reference/expressions.rst:318
msgid ""
"A set display is denoted by curly braces and distinguishable from dictionary "
"displays by the lack of colons separating keys and values:"
msgstr ""
"Un agencement d'ensemble (type *set*) est délimité par des accolades et se "
"distingue de l'agencement d'un dictionnaire par le fait qu'il n'y a pas de "
"\"deux points\" ``:`` pour séparer les clés et les valeurs :"
#: ../Doc/reference/expressions.rst:324
msgid ""
"A set display yields a new mutable set object, the contents being specified "
"by either a sequence of expressions or a comprehension. When a comma-"
"separated list of expressions is supplied, its elements are evaluated from "
"left to right and added to the set object. When a comprehension is "
"supplied, the set is constructed from the elements resulting from the "
"comprehension."
msgstr ""
"Un agencement d'ensemble produit un nouvel objet ensemble muable, le contenu "
"étant spécifié soit par une séquence d'expression, soit par une "
"compréhension. Quand une liste (dont les éléments sont séparés par des "
"virgules) est fournie, ses éléments sont évalués de la gauche vers la droite "
"et ajoutés à l'objet ensemble. Quand une compréhension est fournie, "
"l'ensemble est construit à partir des éléments produits par la compréhension."
#: ../Doc/reference/expressions.rst:330
msgid ""
"An empty set cannot be constructed with ``{}``; this literal constructs an "
"empty dictionary."
msgstr ""
"Un ensemble vide ne peut pas être construit par ``{}`` ; cette écriture "
"construit un dictionnaire vide."
#: ../Doc/reference/expressions.rst:337
msgid "String conversions"
msgstr ""
#: ../Doc/reference/expressions.rst:345
msgid ""
"A string conversion is an expression list enclosed in reverse (a.k.a. "
"backward) quotes:"
msgstr ""
#: ../Doc/reference/expressions.rst:351
msgid ""
"A string conversion evaluates the contained expression list and converts the "
"resulting object into a string according to rules specific to its type."
msgstr ""
#: ../Doc/reference/expressions.rst:354
msgid ""
"If the object is a string, a number, ``None``, or a tuple, list or "
"dictionary containing only objects whose type is one of these, the resulting "
"string is a valid Python expression which can be passed to the built-in "
"function :func:`eval` to yield an expression with the same value (or an "
"approximation, if floating point numbers are involved)."
msgstr ""
#: ../Doc/reference/expressions.rst:360
msgid ""
"(In particular, converting a string adds quotes around it and converts "
"\"funny\" characters to escape sequences that are safe to print.)"
msgstr ""
#: ../Doc/reference/expressions.rst:365
msgid ""
"Recursive objects (for example, lists or dictionaries that contain a "
"reference to themselves, directly or indirectly) use ``...`` to indicate a "
"recursive reference, and the result cannot be passed to :func:`eval` to get "
"an equal value (:exc:`SyntaxError` will be raised instead)."
msgstr ""
#: ../Doc/reference/expressions.rst:374
msgid ""
"The built-in function :func:`repr` performs exactly the same conversion in "
"its argument as enclosing it in parentheses and reverse quotes does. The "
"built-in function :func:`str` performs a similar but more user-friendly "
"conversion."
msgstr ""
#: ../Doc/reference/expressions.rst:382
msgid "Yield expressions"
msgstr "Expressions ``yield``"
#: ../Doc/reference/expressions.rst:395
msgid ""
"The :keyword:`yield` expression is only used when defining a generator "
"function, and can only be used in the body of a function definition. Using "
"a :keyword:`yield` expression in a function definition is sufficient to "
"cause that definition to create a generator function instead of a normal "
"function."
msgstr ""
#: ../Doc/reference/expressions.rst:400
msgid ""
"When a generator function is called, it returns an iterator known as a "
"generator. That generator then controls the execution of a generator "
"function. The execution starts when one of the generator's methods is "
"called. At that time, the execution proceeds to the first :keyword:`yield` "
"expression, where it is suspended again, returning the value of :token:"
"`expression_list` to generator's caller. By suspended we mean that all "
"local state is retained, including the current bindings of local variables, "
"the instruction pointer, and the internal evaluation stack. When the "
"execution is resumed by calling one of the generator's methods, the function "
"can proceed exactly as if the :keyword:`yield` expression was just another "
"external call. The value of the :keyword:`yield` expression after resuming "
"depends on the method which resumed the execution."
msgstr ""
#: ../Doc/reference/expressions.rst:415
msgid ""
"All of this makes generator functions quite similar to coroutines; they "
"yield multiple times, they have more than one entry point and their "
"execution can be suspended. The only difference is that a generator "
"function cannot control where should the execution continue after it yields; "
"the control is always transferred to the generator's caller."
msgstr ""
#: ../Doc/reference/expressions.rst:425
msgid "Generator-iterator methods"
msgstr "Méthodes des générateurs-itérateurs"
#: ../Doc/reference/expressions.rst:427
msgid ""
"This subsection describes the methods of a generator iterator. They can be "
"used to control the execution of a generator function."
msgstr ""
"Cette sous-section décrit les méthodes des générateurs-itérateurs. Elles "
"peuvent être utilisées pour contrôler l'exécution des fonctions générateurs."
#: ../Doc/reference/expressions.rst:430
msgid ""
"Note that calling any of the generator methods below when the generator is "
"already executing raises a :exc:`ValueError` exception."
msgstr ""
"Notez que l'appel à une méthode ci-dessous d'un générateur alors que le "
"générateur est déjà en cours d'exécution lève une exception :exc:"
"`ValueError`."
#: ../Doc/reference/expressions.rst:438
msgid ""
"Starts the execution of a generator function or resumes it at the last "
"executed :keyword:`yield` expression. When a generator function is resumed "
"with a :meth:`~generator.next` method, the current :keyword:`yield` "
"expression always evaluates to :const:`None`. The execution then continues "
"to the next :keyword:`yield` expression, where the generator is suspended "
"again, and the value of the :token:`expression_list` is returned to :meth:"
"`~generator.next`'s caller. If the generator exits without yielding another "
"value, a :exc:`StopIteration` exception is raised."
msgstr ""
#: ../Doc/reference/expressions.rst:451
msgid ""
"Resumes the execution and \"sends\" a value into the generator function. "
"The ``value`` argument becomes the result of the current :keyword:`yield` "
"expression. The :meth:`send` method returns the next value yielded by the "
"generator, or raises :exc:`StopIteration` if the generator exits without "
"yielding another value. When :meth:`send` is called to start the generator, "
"it must be called with :const:`None` as the argument, because there is no :"
"keyword:`yield` expression that could receive the value."
msgstr ""
#: ../Doc/reference/expressions.rst:462
msgid ""
"Raises an exception of type ``type`` at the point where generator was "
"paused, and returns the next value yielded by the generator function. If "
"the generator exits without yielding another value, a :exc:`StopIteration` "
"exception is raised. If the generator function does not catch the passed-in "
"exception, or raises a different exception, then that exception propagates "
"to the caller."
msgstr ""
#: ../Doc/reference/expressions.rst:473
msgid ""
"Raises a :exc:`GeneratorExit` at the point where the generator function was "
"paused. If the generator function then raises :exc:`StopIteration` (by "
"exiting normally, or due to already being closed) or :exc:`GeneratorExit` "
"(by not catching the exception), close returns to its caller. If the "
"generator yields a value, a :exc:`RuntimeError` is raised. If the generator "
"raises any other exception, it is propagated to the caller. :meth:`close` "
"does nothing if the generator has already exited due to an exception or "
"normal exit."
msgstr ""
#: ../Doc/reference/expressions.rst:481
msgid ""
"Here is a simple example that demonstrates the behavior of generators and "
"generator functions::"
msgstr ""
"Voici un exemple simple qui montre le comportement des générateurs et des "
"fonctions générateurs ::"
#: ../Doc/reference/expressions.rst:512
msgid ":pep:`342` - Coroutines via Enhanced Generators"
msgstr ":pep:`342` -- Coroutines *via* des générateurs améliorés"
#: ../Doc/reference/expressions.rst:512
msgid ""
"The proposal to enhance the API and syntax of generators, making them usable "
"as simple coroutines."
msgstr ""
"Proposition d'améliorer l'API et la syntaxe des générateurs, de manière à "
"pouvoir les utiliser comme de simples coroutines."
#: ../Doc/reference/expressions.rst:519
msgid "Primaries"
msgstr "Primaires"
#: ../Doc/reference/expressions.rst:523
msgid ""
"Primaries represent the most tightly bound operations of the language. Their "
"syntax is:"
msgstr ""
"Les primaires (*primary* dans la grammaire formelle ci-dessous) représentent "
"les opérations qui se lient au plus proche dans le langage. Leur syntaxe "
"est :"
#: ../Doc/reference/expressions.rst:533
msgid "Attribute references"
msgstr "Références à des attributs"
#: ../Doc/reference/expressions.rst:537
msgid "An attribute reference is a primary followed by a period and a name:"
msgstr ""
"Une référence à un attribut (*attributeref* dans la grammaire formelle ci-"
"dessous) est une primaire suivie par un point et un nom :"
#: ../Doc/reference/expressions.rst:547
msgid ""
"The primary must evaluate to an object of a type that supports attribute "
"references, e.g., a module, list, or an instance. This object is then asked "
"to produce the attribute whose name is the identifier. If this attribute is "
"not available, the exception :exc:`AttributeError` is raised. Otherwise, the "
"type and value of the object produced is determined by the object. Multiple "
"evaluations of the same attribute reference may yield different objects."
msgstr ""
#: ../Doc/reference/expressions.rst:558
msgid "Subscriptions"
msgstr "Sélections"
#: ../Doc/reference/expressions.rst:571
msgid ""
"A subscription selects an item of a sequence (string, tuple or list) or "
"mapping (dictionary) object:"
msgstr ""
"Une sélection (*subscription* dans la grammaire formelle ci-dessous) désigne "
"un élément dans un objet séquence (chaîne, n-uplet ou liste) ou tableau de "
"correspondances (dictionnaire) :"
#: ../Doc/reference/expressions.rst:577
msgid "The primary must evaluate to an object of a sequence or mapping type."
msgstr ""
#: ../Doc/reference/expressions.rst:579
msgid ""
"If the primary is a mapping, the expression list must evaluate to an object "
"whose value is one of the keys of the mapping, and the subscription selects "
"the value in the mapping that corresponds to that key. (The expression list "
"is a tuple except if it has exactly one item.)"
msgstr ""
"Si la primaire est un tableau de correspondances, la liste d'expressions "
"(*expression_list* dans la grammaire formelle ci-dessous) doit pouvoir être "
"évaluée comme un objet dont la valeur est une des clés du tableau de "
"correspondances et la sélection désigne la valeur qui correspond à cette clé "
"(la liste d'expressions est un n-uplet sauf si elle comporte exactement un "
"élément)."
#: ../Doc/reference/expressions.rst:584
msgid ""
"If the primary is a sequence, the expression (list) must evaluate to a plain "
"integer. If this value is negative, the length of the sequence is added to "
"it (so that, e.g., ``x[-1]`` selects the last item of ``x``.) The resulting "
"value must be a nonnegative integer less than the number of items in the "
"sequence, and the subscription selects the item whose index is that value "
"(counting from zero)."
msgstr ""
#: ../Doc/reference/expressions.rst:595
msgid ""
"A string's items are characters. A character is not a separate data type "
"but a string of exactly one character."
msgstr ""
"Les éléments des chaînes sont des caractères. Un caractère n'est pas un type "
"en tant que tel, c'est une chaîne de longueur un."
#: ../Doc/reference/expressions.rst:602
msgid "Slicings"
msgstr "Tranches"
#: ../Doc/reference/expressions.rst:614
msgid ""
"A slicing selects a range of items in a sequence object (e.g., a string, "
"tuple or list). Slicings may be used as expressions or as targets in "
"assignment or :keyword:`del` statements. The syntax for a slicing:"
msgstr ""
"Une tranche (*slicing* dans la grammaire formelle ci-dessous) sélectionne un "
"intervalle d'éléments d'un objet séquence (par exemple une chaîne, un n-"
"uplet ou une liste, respectivement les types *string*, *tuple* et *list*). "
"Les tranches peuvent être utilisées comme des expressions ou des cibles dans "
"les assignations ou les instructions :keyword:`del`. La syntaxe est la "
"suivante :"
#: ../Doc/reference/expressions.rst:634
msgid ""
"There is ambiguity in the formal syntax here: anything that looks like an "
"expression list also looks like a slice list, so any subscription can be "
"interpreted as a slicing. Rather than further complicating the syntax, this "
"is disambiguated by defining that in this case the interpretation as a "
"subscription takes priority over the interpretation as a slicing (this is "
"the case if the slice list contains no proper slice nor ellipses). "
"Similarly, when the slice list has exactly one short slice and no trailing "
"comma, the interpretation as a simple slicing takes priority over that as an "
"extended slicing."
msgstr ""
#: ../Doc/reference/expressions.rst:643
msgid ""
"The semantics for a simple slicing are as follows. The primary must "
"evaluate to a sequence object. The lower and upper bound expressions, if "
"present, must evaluate to plain integers; defaults are zero and the ``sys."
"maxint``, respectively. If either bound is negative, the sequence's length "
"is added to it. The slicing now selects all items with index *k* such that "
"``i <= k < j`` where *i* and *j* are the specified lower and upper bounds. "
"This may be an empty sequence. It is not an error if *i* or *j* lie outside "
"the range of valid indexes (such items don't exist so they aren't selected)."
msgstr ""
#: ../Doc/reference/expressions.rst:657
msgid ""
"The semantics for an extended slicing are as follows. The primary must "
"evaluate to a mapping object, and it is indexed with a key that is "
"constructed from the slice list, as follows. If the slice list contains at "
"least one comma, the key is a tuple containing the conversion of the slice "
"items; otherwise, the conversion of the lone slice item is the key. The "
"conversion of a slice item that is an expression is that expression. The "
"conversion of an ellipsis slice item is the built-in ``Ellipsis`` object. "
"The conversion of a proper slice is a slice object (see section :ref:"
"`types`) whose :attr:`~slice.start`, :attr:`~slice.stop` and :attr:`~slice."
"step` attributes are the values of the expressions given as lower bound, "
"upper bound and stride, respectively, substituting ``None`` for missing "
"expressions."
msgstr ""
#: ../Doc/reference/expressions.rst:678
msgid "Calls"
msgstr "Appels"
#: ../Doc/reference/expressions.rst:680
msgid ""
"A call calls a callable object (e.g., a :term:`function`) with a possibly "
"empty series of :term:`arguments <argument>`:"
msgstr ""
"Un appel (*call* dans la grammaire ci-dessous) appelle un objet appelable "
"(par exemple, une :term:`fonction <function>`) avec, possiblement, une liste "
"d'\\ :term:`arguments <argument>` :"
#: ../Doc/reference/expressions.rst:697
msgid ""
"A trailing comma may be present after the positional and keyword arguments "
"but does not affect the semantics."
msgstr ""
#: ../Doc/reference/expressions.rst:703
msgid ""
"The primary must evaluate to a callable object (user-defined functions, "
"built-in functions, methods of built-in objects, class objects, methods of "
"class instances, and certain class instances themselves are callable; "
"extensions may define additional callable object types). All argument "
"expressions are evaluated before the call is attempted. Please refer to "
"section :ref:`function` for the syntax of formal :term:`parameter` lists."
msgstr ""
#: ../Doc/reference/expressions.rst:710
msgid ""
"If keyword arguments are present, they are first converted to positional "
"arguments, as follows. First, a list of unfilled slots is created for the "
"formal parameters. If there are N positional arguments, they are placed in "
"the first N slots. Next, for each keyword argument, the identifier is used "
"to determine the corresponding slot (if the identifier is the same as the "
"first formal parameter name, the first slot is used, and so on). If the "
"slot is already filled, a :exc:`TypeError` exception is raised. Otherwise, "
"the value of the argument is placed in the slot, filling it (even if the "
"expression is ``None``, it fills the slot). When all arguments have been "
"processed, the slots that are still unfilled are filled with the "
"corresponding default value from the function definition. (Default values "
"are calculated, once, when the function is defined; thus, a mutable object "
"such as a list or dictionary used as default value will be shared by all "
"calls that don't specify an argument value for the corresponding slot; this "
"should usually be avoided.) If there are any unfilled slots for which no "
"default value is specified, a :exc:`TypeError` exception is raised. "
"Otherwise, the list of filled slots is used as the argument list for the "
"call."
msgstr ""
"Si des arguments par mots-clés sont présents, ils sont d'abord convertis en "
"arguments positionnels, comme suit. Pour commencer, une liste de *slots* "
"vides est créée pour les paramètres formels. S'il y a N arguments "
"positionnels, ils sont placés dans les N premiers *slots*. Ensuite, pour "
"chaque argument par mot-clé, l'identifiant est utilisé pour déterminer le "
"*slot* correspondant (si l'identifiant est le même que le nom du premier "
"paramètre formel, le premier *slot* est utilisé, et ainsi de suite). Si le "
"*slot* est déjà rempli, une exception :exc:`TypeError` est levée. Sinon, la "
"valeur de l'argument est placée dans le *slot*, ce qui le remplit (même si "
"l'expression est ``None``, cela remplit le *slot*). Quand tous les arguments "
"ont été traités, les *slots* qui sont toujours vides sont remplis avec la "
"valeur par défaut correspondante dans la définition de la fonction (les "
"valeurs par défaut sont calculées, une seule fois, lorsque la fonction est "
"définie ; ainsi, un objet mutable tel qu'une liste ou un dictionnaire "
"utilisé en tant valeur par défaut sera partagé entre tous les appels qui ne "
"spécifient pas de valeur d argument pour ce *slot* ; on évite généralement "
"de faire ça). S'il reste des *slots* pour lesquels aucune valeur par défaut "
"n'est définie, une exception :exc:`TypeError` est levée. Sinon, la liste des "
"*slots* remplie est utilisée en tant que liste des arguments pour l'appel."
#: ../Doc/reference/expressions.rst:730
msgid ""
"An implementation may provide built-in functions whose positional parameters "
"do not have names, even if they are 'named' for the purpose of "
"documentation, and which therefore cannot be supplied by keyword. In "
"CPython, this is the case for functions implemented in C that use :c:func:"
"`PyArg_ParseTuple` to parse their arguments."
msgstr ""
"Une implémentation peut fournir des fonctions natives dont les paramètres "
"positionnels n'ont pas de nom, même s'ils sont \"nommés\" pour les besoins "
"de la documentation. Ils ne peuvent donc pas être spécifiés par mot-clé. En "
"CPython, les fonctions implémentées en C qui utilisent :c:func:"
"`PyArg_ParseTuple` pour analyser leurs arguments en font partie."
#: ../Doc/reference/expressions.rst:736
msgid ""
"If there are more positional arguments than there are formal parameter "
"slots, a :exc:`TypeError` exception is raised, unless a formal parameter "
"using the syntax ``*identifier`` is present; in this case, that formal "
"parameter receives a tuple containing the excess positional arguments (or an "
"empty tuple if there were no excess positional arguments)."
msgstr ""
"S'il y a plus d'arguments positionnels que de *slots* de paramètres formels, "
"une exception :exc:`TypeError` est levée, à moins qu'un paramètre formel "
"n'utilise la syntaxe ``*identifier`` ; dans ce cas, le paramètre formel "
"reçoit un n-uplet contenant les arguments positionnels en supplément (ou un "
"n-uplet vide s'il n'y avait pas d'arguments positionnel en trop)."
#: ../Doc/reference/expressions.rst:742
msgid ""
"If any keyword argument does not correspond to a formal parameter name, a :"
"exc:`TypeError` exception is raised, unless a formal parameter using the "
"syntax ``**identifier`` is present; in this case, that formal parameter "
"receives a dictionary containing the excess keyword arguments (using the "
"keywords as keys and the argument values as corresponding values), or a "
"(new) empty dictionary if there were no excess keyword arguments."
msgstr ""
"Si un argument par mot-clé ne correspond à aucun nom de paramètre formel, "
"une exception :exc:`TypeError` est levée, à moins qu'un paramètre formel "
"n'utilise la syntaxe ``**identifier`` ; dans ce cas, le paramètre formel "
"reçoit un dictionnaire contenant les arguments par mot-clé en trop (en "
"utilisant les mots-clés comme clés et les arguments comme valeurs pour ce "
"dictionnaire), ou un (nouveau) dictionnaire vide s'il n'y a pas d'argument "
"par mot-clé en trop."
#: ../Doc/reference/expressions.rst:752
msgid ""
"If the syntax ``*expression`` appears in the function call, ``expression`` "
"must evaluate to an iterable. Elements from this iterable are treated as if "
"they were additional positional arguments; if there are positional arguments "
"*x1*, ..., *xN*, and ``expression`` evaluates to a sequence *y1*, ..., *yM*, "
"this is equivalent to a call with M+N positional arguments *x1*, ..., *xN*, "
"*y1*, ..., *yM*."
msgstr ""
#: ../Doc/reference/expressions.rst:759
msgid ""
"A consequence of this is that although the ``*expression`` syntax may appear "
"*after* some keyword arguments, it is processed *before* the keyword "
"arguments (and the ``**expression`` argument, if any -- see below). So::"
msgstr ""
#: ../Doc/reference/expressions.rst:775
msgid ""
"It is unusual for both keyword arguments and the ``*expression`` syntax to "
"be used in the same call, so in practice this confusion does not arise."
msgstr ""
"Il est inhabituel que les syntaxes d'arguments par mots-clés et "
"``*expression`` soient utilisés simultanément dans un même appel, ce qui "
"fait que la confusion reste hypothétique."
#: ../Doc/reference/expressions.rst:781
msgid ""
"If the syntax ``**expression`` appears in the function call, ``expression`` "
"must evaluate to a mapping, the contents of which are treated as additional "
"keyword arguments. In the case of a keyword appearing in both "
"``expression`` and as an explicit keyword argument, a :exc:`TypeError` "
"exception is raised."
msgstr ""
#: ../Doc/reference/expressions.rst:786
msgid ""
"Formal parameters using the syntax ``*identifier`` or ``**identifier`` "
"cannot be used as positional argument slots or as keyword argument names. "
"Formal parameters using the syntax ``(sublist)`` cannot be used as keyword "
"argument names; the outermost sublist corresponds to a single unnamed "
"argument slot, and the argument value is assigned to the sublist using the "
"usual tuple assignment rules after all other parameter processing is done."
msgstr ""
#: ../Doc/reference/expressions.rst:793
msgid ""
"A call always returns some value, possibly ``None``, unless it raises an "
"exception. How this value is computed depends on the type of the callable "
"object."
msgstr ""
"Un appel renvoie toujours une valeur, possiblement ``None``, à moins qu'il "
"ne lève une exception. La façon dont celle valeur est calculée dépend du "
"type de l'objet appelable."
#: ../Doc/reference/expressions.rst:797
msgid "If it is---"
msgstr "Si c'est ---"
#: ../Doc/reference/expressions.rst:810
msgid "a user-defined function:"
msgstr "une fonction définie par l'utilisateur :"
#: ../Doc/reference/expressions.rst:806
msgid ""
"The code block for the function is executed, passing it the argument list. "
"The first thing the code block will do is bind the formal parameters to the "
"arguments; this is described in section :ref:`function`. When the code "
"block executes a :keyword:`return` statement, this specifies the return "
"value of the function call."
msgstr ""
"le bloc de code de la fonction est exécuté, il reçoit la liste des "
"arguments. La première chose que le bloc de code fait est de lier les "
"paramètres formels aux arguments ; ceci est décrit dans la section :ref:"
"`function`. Quand le bloc de code exécute l'instruction :keyword:`return`, "
"cela spécifie la valeur de retour de l'appel de la fonction."
#: ../Doc/reference/expressions.rst:824
msgid "a built-in function or method:"
msgstr "une fonction ou une méthode native :"
#: ../Doc/reference/expressions.rst:823
msgid ""
"The result is up to the interpreter; see :ref:`built-in-funcs` for the "
"descriptions of built-in functions and methods."
msgstr ""
"le résultat dépend de l'interpréteur ; lisez :ref:`built-in-funcs` pour une "
"description des fonctions et méthodes natives."
#: ../Doc/reference/expressions.rst:831
msgid "a class object:"
msgstr "un objet classe :"
#: ../Doc/reference/expressions.rst:831
msgid "A new instance of that class is returned."
msgstr "une nouvelle instance de cette classe est renvoyée."
#: ../Doc/reference/expressions.rst:841
msgid "a class instance method:"
msgstr "une méthode d'instance de classe :"
#: ../Doc/reference/expressions.rst:839
msgid ""
"The corresponding user-defined function is called, with an argument list "
"that is one longer than the argument list of the call: the instance becomes "
"the first argument."
msgstr ""
"la fonction correspondante définie par l'utilisateur est appelée, avec la "
"liste d'arguments qui est plus grande d'un élément que la liste des "
"arguments de l'appel : l'instance est placée en tête des arguments."
#: ../Doc/reference/expressions.rst:850
msgid "a class instance:"
msgstr "une instance de classe :"
#: ../Doc/reference/expressions.rst:848
msgid ""
"The class must define a :meth:`__call__` method; the effect is then the same "
"as if that method was called."
msgstr ""
"la classe doit définir une méthode :meth:`__call__` ; l'effet est le même "
"que si cette méthode était appelée."
#: ../Doc/reference/expressions.rst:855
msgid "The power operator"
msgstr "L'opérateur puissance"
#: ../Doc/reference/expressions.rst:857