-
-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy path2.0.po
More file actions
1770 lines (1588 loc) · 81 KB
/
2.0.po
File metadata and controls
1770 lines (1588 loc) · 81 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
# Copyright (C) 2001-2018, Python Software Foundation
# For licence information, see README file.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-23 14:38+0200\n"
"PO-Revision-Date: 2019-11-01 11:43+0100\n"
"Last-Translator: Melançon Victor <victor.melancon0@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
#: whatsnew/2.0.rst:3
msgid "What's New in Python 2.0"
msgstr "Nouveautés de Python 2.0"
#: whatsnew/2.0.rst:0
msgid "Author"
msgstr "Auteur"
#: whatsnew/2.0.rst:5
msgid "A.M. Kuchling and Moshe Zadka"
msgstr "A.M. Kuchling et Moshe Zadka"
#: whatsnew/2.0.rst:13
msgid "Introduction"
msgstr "Introduction"
#: whatsnew/2.0.rst:15
msgid ""
"A new release of Python, version 2.0, was released on October 16, 2000. This "
"article covers the exciting new features in 2.0, highlights some other "
"useful changes, and points out a few incompatible changes that may require "
"rewriting code."
msgstr ""
"Une nouvelle version de Python, la version 2.0, est sortie le 16 octobre "
"2000. Cet article traite des nouvelles fonctionnalités intéressantes de "
"cette version, met en évidence d'autres changements utiles, et souligne "
"quelques incompatibilités qui peuvent nécessiter la réécriture du code."
#: whatsnew/2.0.rst:20
#, fuzzy
msgid ""
"Python's development never completely stops between releases, and a steady "
"flow of bug fixes and improvements are always being submitted. A host of "
"minor fixes, a few optimizations, additional docstrings, and better error "
"messages went into 2.0; to list them all would be impossible, but they're "
"certainly significant. Consult the publicly available CVS logs if you want "
"to see the full list. This progress is due to the five developers working "
"for PythonLabs are now getting paid to spend their days fixing bugs, and "
"also due to the improved communication resulting from moving to SourceForge."
msgstr ""
"Le développement de Python ne s'arrête jamais complètement entre les "
"versions, et un flux constant de corrections de bogues et d'améliorations "
"sont soumis en permanence. Une foule de corrections mineures, quelques "
"optimisations, des *docstrings* supplémentaires, et de meilleurs messages "
"d'erreur sont apparus avec l'arrivée de la version 2.0; tous les énumérer "
"serait impossible, mais ils sont certainement significatif. Consultez les "
"journaux CVS publics disponibles pour obtenir la liste complète. Ce progrès "
"est dû aux cinq développeurs travaillant pour PythonLabs qui sont désormais "
"payés pour passer leurs journées à corriger les bugs, mais aussi en raison "
"de l'amélioration de la communication résultant du passage à SourceForge."
#: whatsnew/2.0.rst:33
msgid "What About Python 1.6?"
msgstr "À propos de Python 1.6."
#: whatsnew/2.0.rst:35
msgid ""
"Python 1.6 can be thought of as the Contractual Obligations Python release. "
"After the core development team left CNRI in May 2000, CNRI requested that a "
"1.6 release be created, containing all the work on Python that had been "
"performed at CNRI. Python 1.6 therefore represents the state of the CVS "
"tree as of May 2000, with the most significant new feature being Unicode "
"support. Development continued after May, of course, so the 1.6 tree "
"received a few fixes to ensure that it's forward-compatible with Python "
"2.0. 1.6 is therefore part of Python's evolution, and not a side branch."
msgstr ""
"Python 1.6 peut être vu comme la version des obligations contractuelles. "
"Après que l’équipe de développement eût quitté le CNRI en mai 2000, celui-ci "
"a demandé la création d’une version 1.6, contenant tout le travail sur "
"Python réalisé au CNRI. Python 1.6 représente de ce fait l’état de l’arbre "
"*CVS* tel qu’il était en mai 2000, la nouvelle fonctionnalité la plus "
"remarquable étant le support d’Unicode. Le développement a continué après "
"mai bien sûr, donc la branche 1.6 a reçu quelques corrections pour être sûr "
"qu’elle soit compatible avec Python 2.0. La version 1.6 fait donc partie de "
"l’évolution de Python, ce n’est pas une branche séparée."
#: whatsnew/2.0.rst:44
msgid ""
"So, should you take much interest in Python 1.6? Probably not. The "
"1.6final and 2.0beta1 releases were made on the same day (September 5, "
"2000), the plan being to finalize Python 2.0 within a month or so. If you "
"have applications to maintain, there seems little point in breaking things "
"by moving to 1.6, fixing them, and then having another round of breakage "
"within a month by moving to 2.0; you're better off just going straight to "
"2.0. Most of the really interesting features described in this document are "
"only in 2.0, because a lot of work was done between May and September."
msgstr ""
"Alors, devriez-vous vous intéresser à Python 1.6 ? Probablement pas. Les "
"versions *1.6final* et *2.0beta1* sont sorties le même jour (5 septembre "
"2000), le plan étant de finaliser Python 2.0 environ un mois plus tard. Si "
"vous avez des applications à maintenir, il n’y a pas vraiment d’intérêt à "
"casser des choses en migrant sur la version 1.6, les réparer, puis avoir de "
"nouveau des choses cassées à peine un mois plus tard en passant à la 2.0; il "
"vaut mieux partir directement de la 2.0. La plupart des fonctionnalités "
"vraiment intéressantes décrites dans ce document sont seulement dans la 2.0, "
"parce que beaucoup de travail a été réalisé entre mai et septembre."
#: whatsnew/2.0.rst:57
msgid "New Development Process"
msgstr "Nouveau processus de développement"
#: whatsnew/2.0.rst:59
msgid ""
"The most important change in Python 2.0 may not be to the code at all, but "
"to how Python is developed: in May 2000 the Python developers began using "
"the tools made available by SourceForge for storing source code, tracking "
"bug reports, and managing the queue of patch submissions. To report bugs or "
"submit patches for Python 2.0, use the bug tracking and patch manager tools "
"available from Python's project page, located at https://sourceforge.net/"
"projects/python/."
msgstr ""
"Le changement le plus important dans Python 2.0 ne concerne peut-être pas le "
"code, mais le développement de Python : en mai 2000, les développeurs Python "
"ont commencé à utiliser les outils mis à disposition par SourceForge pour "
"stocker le code source, suivre les rapports de bogues et gérer la file "
"d’attente des soumissions de correctifs. Pour signaler des bogues ou "
"soumettre des correctifs pour Python 2.0, utilisez les outils de suivi des "
"bogues et de gestion des correctifs disponibles sur la page du projet "
"Python, à l’adresse https://sourceforge.net/projects/python/."
#: whatsnew/2.0.rst:66
msgid ""
"The most important of the services now hosted at SourceForge is the Python "
"CVS tree, the version-controlled repository containing the source code for "
"Python. Previously, there were roughly 7 or so people who had write access "
"to the CVS tree, and all patches had to be inspected and checked in by one "
"of the people on this short list. Obviously, this wasn't very scalable. By "
"moving the CVS tree to SourceForge, it became possible to grant write access "
"to more people; as of September 2000 there were 27 people able to check in "
"changes, a fourfold increase. This makes possible large-scale changes that "
"wouldn't be attempted if they'd have to be filtered through the small group "
"of core developers. For example, one day Peter Schneider-Kamp took it into "
"his head to drop K&R C compatibility and convert the C source for Python to "
"ANSI C. After getting approval on the python-dev mailing list, he launched "
"into a flurry of checkins that lasted about a week, other developers joined "
"in to help, and the job was done. If there were only 5 people with write "
"access, probably that task would have been viewed as \"nice, but not worth "
"the time and effort needed\" and it would never have gotten done."
msgstr ""
"Le plus important des services maintenant hébergé chez SourceForge est "
"l’arborescence CVS Python, le référentiel sous contrôle de version contenant "
"le code source de Python. Auparavant, environ 7 personnes avaient un accès "
"en écriture à l’arborescence CVS et tous les correctifs devaient être "
"inspectés et archivés par l’une des personnes figurant sur cette liste "
"restreinte. Évidemment, ce n’était pas très évolutif. En déplaçant "
"l’arborescence CVS vers SourceForge, il est devenu possible d’accorder un "
"accès en écriture à davantage de personnes ; en septembre 2000, 27 personnes "
"pouvaient enregistrer les modifications, soit quatre fois plus. Cela rend "
"possible des modifications à grande échelle qui ne seraient pas tentées si "
"elles devaient être filtrées par le petit groupe de développeurs principaux. "
"Par exemple, un jour, Peter Schneider-Kamp a eu l’idée de supprimer la "
"compatibilité K&R C et de convertir le code source C de Python en ANSI C. "
"Après avoir obtenu l’approbation de la liste de diffusion *python-dev*, il "
"s’est lancé dans une série d’archives qui ont duré environ une semaine, "
"d’autres développeurs l'ont rejoint et le travail a été fait. S’il n’y avait "
"eut que 5 personnes ayant un accès en écriture, cette tâche aurait "
"probablement été considérée comme « agréable, mais ne valant pas le temps ni "
"les efforts nécessaires » et cela ne se serait jamais fait."
#: whatsnew/2.0.rst:83
msgid ""
"The shift to using SourceForge's services has resulted in a remarkable "
"increase in the speed of development. Patches now get submitted, commented "
"on, revised by people other than the original submitter, and bounced back "
"and forth between people until the patch is deemed worth checking in. Bugs "
"are tracked in one central location and can be assigned to a specific person "
"for fixing, and we can count the number of open bugs to measure progress. "
"This didn't come without a cost: developers now have more e-mail to deal "
"with, more mailing lists to follow, and special tools had to be written for "
"the new environment. For example, SourceForge sends default patch and bug "
"notification e-mail messages that are completely unhelpful, so Ka-Ping Yee "
"wrote an HTML screen-scraper that sends more useful messages."
msgstr ""
"Le passage à l’utilisation des services de SourceForge a entraîné une "
"augmentation remarquable du rythme de développement. Les correctifs sont "
"maintenant soumis, commentés, révisés par des personnes autres que l’auteur "
"d’origine et échangés entre les personnes jusqu’à ce que le correctif soit "
"jugé utile. Les bogues sont suivis dans un emplacement central et peuvent "
"être attribués à une personne spécifique pour être corrigés. , et nous "
"pouvons compter le nombre de bogues ouverts pour mesurer les progrès. Cela "
"n’a pas coûté cher: les développeurs ont désormais plus de courrier "
"électronique à traiter, davantage de listes de diffusion à suivre et des "
"outils spéciaux ont dû être créés pour le nouvel environnement. Par exemple, "
"SourceForge envoie des messages électroniques de correctif et de "
"notification de bogues par défaut qui ne sont d’aucune utilité, Ka-Ping Yee "
"a donc créé un *scraper* HTML qui envoie des messages plus utiles."
#: whatsnew/2.0.rst:95
msgid ""
"The ease of adding code caused a few initial growing pains, such as code was "
"checked in before it was ready or without getting clear agreement from the "
"developer group. The approval process that has emerged is somewhat similar "
"to that used by the Apache group. Developers can vote +1, +0, -0, or -1 on a "
"patch; +1 and -1 denote acceptance or rejection, while +0 and -0 mean the "
"developer is mostly indifferent to the change, though with a slight positive "
"or negative slant. The most significant change from the Apache model is "
"that the voting is essentially advisory, letting Guido van Rossum, who has "
"Benevolent Dictator For Life status, know what the general opinion is. He "
"can still ignore the result of a vote, and approve or reject a change even "
"if the community disagrees with him."
msgstr ""
"La facilité d’ajout de code a provoqué quelques problèmes de croissance "
"initiaux, tels que le code a été archivé avant qu’il ne soit prêt ou sans "
"l’accord clair du groupe de développeurs. Le processus d’approbation qui a "
"émergé est quelque peu similaire à celui utilisé par le groupe Apache. Les "
"développeurs peuvent voter *+1*, *+0*, *-0* ou *-1* sur un patch; *+1* et "
"*-1* indiquent une acceptation ou un rejet, tandis que *+0* et *-0* "
"signifient que le développeur est généralement indifférent au changement, "
"bien qu’il présente une légère inclinaison positive ou négative. Le "
"changement le plus important par rapport au modèle Apache est que le vote "
"est essentiellement consultatif, permettant à Guido van Rossum, détenteur du "
"statut de « dictateur bienveillant à vie », de connaître l’opinion générale. "
"Il peut toujours ignorer le résultat d’un vote et approuver ou rejeter un "
"changement même si la communauté n’est pas d’accord avec lui."
#: whatsnew/2.0.rst:106
msgid ""
"Producing an actual patch is the last step in adding a new feature, and is "
"usually easy compared to the earlier task of coming up with a good design. "
"Discussions of new features can often explode into lengthy mailing list "
"threads, making the discussion hard to follow, and no one can read every "
"posting to python-dev. Therefore, a relatively formal process has been set "
"up to write Python Enhancement Proposals (PEPs), modelled on the internet "
"RFC process. PEPs are draft documents that describe a proposed new feature, "
"and are continually revised until the community reaches a consensus, either "
"accepting or rejecting the proposal. Quoting from the introduction to :pep:"
"`1`, \"PEP Purpose and Guidelines\":"
msgstr ""
#: whatsnew/2.0.rst:120
msgid ""
"PEP stands for Python Enhancement Proposal. A PEP is a design document "
"providing information to the Python community, or describing a new feature "
"for Python. The PEP should provide a concise technical specification of the "
"feature and a rationale for the feature."
msgstr ""
"PEP signifie *Python Enhancement Proposition*. Une PEP est un document de "
"conception fournissant des informations à la communauté Python ou décrivant "
"une nouvelle fonctionnalité de Python. La PEP devrait fournir une "
"spécification technique concise de la fonctionnalité et une justification de "
"celle-ci."
#: whatsnew/2.0.rst:125
msgid ""
"We intend PEPs to be the primary mechanisms for proposing new features, for "
"collecting community input on an issue, and for documenting the design "
"decisions that have gone into Python. The PEP author is responsible for "
"building consensus within the community and documenting dissenting opinions."
msgstr ""
"Nous souhaitons que les PEP soient les principaux mécanismes permettant de "
"proposer de nouvelles fonctionnalités, de recueillir les commentaires de la "
"communauté sur un problème et de documenter les décisions de conception "
"prises dans Python. L’auteur du PPE est chargé de créer un consensus au sein "
"de la communauté et de documenter les opinions divergentes."
#: whatsnew/2.0.rst:130
#, fuzzy
msgid ""
"Read the rest of :pep:`1` for the details of the PEP editorial process, "
"style, and format. PEPs are kept in the Python CVS tree on SourceForge, "
"though they're not part of the Python 2.0 distribution, and are also "
"available in HTML form from https://peps.python.org/. As of September 2000, "
"there are 25 PEPS, ranging from :pep:`201`, \"Lockstep Iteration\", to PEP "
"225, \"Elementwise/Objectwise Operators\"."
msgstr ""
"Lisez le reste de :pep:`1` pour plus de détails sur le processus éditorial, "
"le style et le format de PEP. Les PEP sont conservés dans l’arborescence CVS "
"Python de SourceForge, bien qu’ils ne fassent pas partie de la distribution "
"Python 2.0 et qu’ils soient également disponibles au format HTML à l’adresse "
"https://www.python.org/dev/peps/. En septembre 2000, il existait 25 PEPS, "
"allant de :pep:`201`, \"Lockstep Iteration\", à PEP 225, \"Elementwise/"
"Objectwise Operators\"."
#: whatsnew/2.0.rst:141
msgid "Unicode"
msgstr "Unicode"
#: whatsnew/2.0.rst:143
msgid ""
"The largest new feature in Python 2.0 is a new fundamental data type: "
"Unicode strings. Unicode uses 16-bit numbers to represent characters "
"instead of the 8-bit number used by ASCII, meaning that 65,536 distinct "
"characters can be supported."
msgstr ""
"La plus grande nouveauté de Python 2.0 est un nouveau type de données "
"fondamental: les chaînes Unicode. Unicode utilise des nombres à 16 bits pour "
"représenter des caractères au lieu du nombre à 8 bits utilisé par ASCII, ce "
"qui signifie que 65 536 caractères distincts peuvent être pris en charge."
#: whatsnew/2.0.rst:148
msgid ""
"The final interface for Unicode support was arrived at through countless "
"often-stormy discussions on the python-dev mailing list, and mostly "
"implemented by Marc-André Lemburg, based on a Unicode string type "
"implementation by Fredrik Lundh. A detailed explanation of the interface "
"was written up as :pep:`100`, \"Python Unicode Integration\". This article "
"will simply cover the most significant points about the Unicode interfaces."
msgstr ""
"La dernière interface de prise en charge Unicode a été mise au point après "
"de nombreuses discussions souvent houleuses sur la liste de diffusion "
"*python-dev*, et principalement implémentée par Marc-André Lemburg, basée "
"sur une implémentation de type chaîne Unicode de Fredrik Lundh. Une "
"explication détaillée de l’interface a été écrite ainsi :pep:"
"`100`, \"Intégration Python Unicode\". Cet article couvrira simplement les "
"points les plus significatifs sur les interfaces Unicode."
#: whatsnew/2.0.rst:155
msgid ""
"In Python source code, Unicode strings are written as ``u\"string\"``. "
"Arbitrary Unicode characters can be written using a new escape sequence, "
"``\\uHHHH``, where *HHHH* is a 4-digit hexadecimal number from 0000 to "
"FFFF. The existing ``\\xHHHH`` escape sequence can also be used, and octal "
"escapes can be used for characters up to U+01FF, which is represented by "
"``\\777``."
msgstr ""
"Dans le code source Python, les chaînes Unicode sont écrites sous la forme "
"``u\"string\"``. Les caractères Unicode arbitraires peuvent être écrits en "
"utilisant une nouvelle séquence d'échappement, ``\\uHHHH``, où *HHHH* est un "
"nombre hexadécimal à 4 chiffres de 0000 à FFFF. La séquence d'échappement "
"``\\xHHHH`` peut également être utilisée, et les échappements octaux peuvent "
"être utilisés pour les caractères allant jusqu'à U+01FF, représenté par "
"``\\777``."
#: whatsnew/2.0.rst:161
msgid ""
"Unicode strings, just like regular strings, are an immutable sequence type. "
"They can be indexed and sliced, but not modified in place. Unicode strings "
"have an ``encode( [encoding] )`` method that returns an 8-bit string in the "
"desired encoding. Encodings are named by strings, such as ``'ascii'``, "
"``'utf-8'``, ``'iso-8859-1'``, or whatever. A codec API is defined for "
"implementing and registering new encodings that are then available "
"throughout a Python program. If an encoding isn't specified, the default "
"encoding is usually 7-bit ASCII, though it can be changed for your Python "
"installation by calling the ``sys.setdefaultencoding(encoding)`` function in "
"a customized version of :file:`site.py`."
msgstr ""
"Les chaînes Unicode, tout comme les chaînes ordinaires, sont un type de "
"séquence immuable. Ils peuvent être indexés et tranchés, mais pas modifiés "
"en place. Les chaînes Unicode ont une méthode ``encoder([encoding])`` qui "
"renvoie une chaîne de 8 bits dans l’encodage souhaité. Les codages sont "
"nommés par des chaînes, telles que ``’ascii’``, ``’utf-8’``, "
"``’iso-8859-1’``, ou autre chose. Une API de codec est définie pour "
"l’implémentation et l’enregistrement de nouveaux codages disponibles dans "
"tout un programme Python. Si aucun codage n’est spécifié, le codage par "
"défaut est généralement du code ASCII 7-bits, bien qu’il puisse être modifié "
"pour votre installation Python en appelant la fonction ``sys."
"setdefaultencoding (encoding)`` dans une version personnalisée de :file:"
"`site.py`."
#: whatsnew/2.0.rst:172
msgid ""
"Combining 8-bit and Unicode strings always coerces to Unicode, using the "
"default ASCII encoding; the result of ``'a' + u'bc'`` is ``u'abc'``."
msgstr ""
"La combinaison de chaînes 8 bits et Unicode est toujours forcée en Unicode, "
"à l’aide du codage ASCII par défaut; le résultat de ``’a’ + u’bc’`` est "
"``u’abc’``."
#: whatsnew/2.0.rst:175
msgid ""
"New built-in functions have been added, and existing built-ins modified to "
"support Unicode:"
msgstr ""
"De nouvelles fonctions primitives ont été ajoutées, et des fonctions "
"existantes ont été modifiées pour supporter Unicode :"
#: whatsnew/2.0.rst:178
msgid ""
"``unichr(ch)`` returns a Unicode string 1 character long, containing the "
"character *ch*."
msgstr ""
"``unichr(ch)`` renvoie une chaîne Unicode de longueur 1, contenant le "
"caractère *ch*."
#: whatsnew/2.0.rst:181
msgid ""
"``ord(u)``, where *u* is a 1-character regular or Unicode string, returns "
"the number of the character as an integer."
msgstr ""
"``ord(u)``, quand *u* est une chaîne normale ou Unicode de longueur 1, "
"renvoie un entier représentant le nombre de caractères."
#: whatsnew/2.0.rst:184
msgid ""
"``unicode(string [, encoding] [, errors] )`` creates a Unicode string from "
"an 8-bit string. ``encoding`` is a string naming the encoding to use. The "
"``errors`` parameter specifies the treatment of characters that are invalid "
"for the current encoding; passing ``'strict'`` as the value causes an "
"exception to be raised on any encoding error, while ``'ignore'`` causes "
"errors to be silently ignored and ``'replace'`` uses U+FFFD, the official "
"replacement character, in case of any problems."
msgstr ""
"``unicode(string [, encoding] [, errors] )`` crée une chaîne Unicode à "
"partir d’une chaîne de 8 bits. ``encoding`` est une chaîne nommant le codage "
"à utiliser. Le paramètre ``errors`` spécifie le traitement des caractères "
"non valides pour l’ encodage en cours; en passant ``’strict’`` comme valeur, "
"une exception est générée pour toute erreur de codage, alors que "
"``’ignore’`` fait en sorte que les erreurs soient ignorées en silence et que "
"``’replace’`` utilise U+FFFD, caractère de remplacement officiel, en cas de "
"problème."
#: whatsnew/2.0.rst:192
msgid ""
"The ``exec`` statement, and various built-ins such as ``eval()``, "
"``getattr()``, and ``setattr()`` will also accept Unicode strings as well as "
"regular strings. (It's possible that the process of fixing this missed some "
"built-ins; if you find a built-in function that accepts strings but doesn't "
"accept Unicode strings at all, please report it as a bug.)"
msgstr ""
"L’instruction ``exec`` et divers éléments intégrés tels que ``eval()``, "
"``getattr()`` et ``setattr()`` accepteront également les chaînes Unicode "
"ainsi que les chaînes ordinaires. (Il est possible que le processus de "
"résolution de ce problème ait échappé à certaines fonctions intégrées ; si "
"vous trouvez une fonction intégrée qui accepte les chaînes mais n’accepte "
"pas les chaînes Unicode, signalez-la comme un bogue.)"
#: whatsnew/2.0.rst:198
msgid ""
"A new module, :mod:`unicodedata`, provides an interface to Unicode character "
"properties. For example, ``unicodedata.category(u'A')`` returns the 2-"
"character string 'Lu', the 'L' denoting it's a letter, and 'u' meaning that "
"it's uppercase. ``unicodedata.bidirectional(u'\\u0660')`` returns 'AN', "
"meaning that U+0660 is an Arabic number."
msgstr ""
"Un nouveau module, :mod:`unicodedata`, fournit une interface aux propriétés "
"de caractère Unicode. Par exemple, ``unicodedata.category(u'A')`` renvoie la "
"chaîne de 2 caractères « Lu », le « L » désignant une lettre et « u » "
"signifiant qu’il s’agit d’une majuscule. ``unicodedata."
"bidirectional(u'\\u0660')`` renvoie « AN », ce qui signifie que U+0660 est "
"un nombre arabe."
#: whatsnew/2.0.rst:204
msgid ""
"The :mod:`codecs` module contains functions to look up existing encodings "
"and register new ones. Unless you want to implement a new encoding, you'll "
"most often use the ``codecs.lookup(encoding)`` function, which returns a 4-"
"element tuple: ``(encode_func, decode_func, stream_reader, stream_writer)``."
msgstr ""
"Le module :mod:`codecs` contient des fonctions pour rechercher les codages "
"existants et en enregistrer de nouveaux. À moins que vous ne souhaitiez "
"implémenter un nouvel encodage, vous utiliserez le plus souvent la fonction "
"``codecs.lookup(encoding)``, qui renvoie un quadruplet : ``(encode_func, "
"decode_func, stream_reader, stream_writer)``."
#: whatsnew/2.0.rst:209
msgid ""
"*encode_func* is a function that takes a Unicode string, and returns a 2-"
"tuple ``(string, length)``. *string* is an 8-bit string containing a "
"portion (perhaps all) of the Unicode string converted into the given "
"encoding, and *length* tells you how much of the Unicode string was "
"converted."
msgstr ""
"*encode_func* est une fonction qui prend une chaîne Unicode, et renvoie un n-"
"uplet de longueur 2 ``(string, length)``. *string* est une chaîne de "
"caractères à 8 bits contenant une partie (ou la totalité) de la chaîne "
"Unicode convertie en codage donné, et *length* vous indique le nombre de "
"caractères de la chaîne qui ont été convertis."
#: whatsnew/2.0.rst:214
msgid ""
"*decode_func* is the opposite of *encode_func*, taking an 8-bit string and "
"returning a 2-tuple ``(ustring, length)``, consisting of the resulting "
"Unicode string *ustring* and the integer *length* telling how much of the 8-"
"bit string was consumed."
msgstr ""
"*decode_func* est l’opposé de *encode_func*, en prenant une chaîne de "
"caractères à 8 bits et le retour d’une paire ``(ustring, longueur)``, "
"composé de la chaîne Unicode résultante *ustring* et l’entier *length* "
"indiquant combien de caractères de la chaîne de caractères à 8 bits ont été "
"consommés."
#: whatsnew/2.0.rst:219
msgid ""
"*stream_reader* is a class that supports decoding input from a stream. "
"*stream_reader(file_obj)* returns an object that supports the :meth:`read`, :"
"meth:`readline`, and :meth:`readlines` methods. These methods will all "
"translate from the given encoding and return Unicode strings."
msgstr ""
"*stream_reader* est une classe qui prend en charge le décodage de l’entrée "
"d’un flux. *stream_reader(file_obj)* renvoie un objet qui prend en charge "
"les méthodes :meth:`read`, :meth:`readline` et :meth:`readlines`. Ces "
"méthodes se traduisent toutes à partir de l’encodage donné et retourneront "
"une chaînes de caractère Unicode."
#: whatsnew/2.0.rst:224
msgid ""
"*stream_writer*, similarly, is a class that supports encoding output to a "
"stream. *stream_writer(file_obj)* returns an object that supports the :meth:"
"`write` and :meth:`writelines` methods. These methods expect Unicode "
"strings, translating them to the given encoding on output."
msgstr ""
"De même, *stream_writer* est une classe qui prend en charge le codage de "
"sortie d’un flux. *stream_writer(file_obj)* renvoie un objet qui prend en "
"charge les méthodes :meth:`write` et :meth:`writelines`. Ces méthodes "
"prennent en entrée des chaînes Unicode, qu'elles renvoient, traduites à "
"l'encodage donné, sur la sortie."
#: whatsnew/2.0.rst:229
msgid ""
"For example, the following code writes a Unicode string into a file, "
"encoding it as UTF-8::"
msgstr ""
"Par exemple, le code suivant écrit une chaîne Unicode dans un fichier, en "
"l’encodant en UTF-8 ::"
#: whatsnew/2.0.rst:243
msgid "The following code would then read UTF-8 input from the file::"
msgstr "Le code suivant lirait ensuite le texte UTF-8 du fichier ::"
#: whatsnew/2.0.rst:249
msgid ""
"Unicode-aware regular expressions are available through the :mod:`re` "
"module, which has a new underlying implementation called SRE written by "
"Fredrik Lundh of Secret Labs AB."
msgstr ""
"Des expressions rationnelles supportant l’Unicode sont disponibles dans le "
"module :mod:`re`, qui a une implémentation sous-jacente appelée SRE écrite "
"par Fredrik Lundh de Secret Labs AB."
#: whatsnew/2.0.rst:253
msgid ""
"A ``-U`` command line option was added which causes the Python compiler to "
"interpret all string literals as Unicode string literals. This is intended "
"to be used in testing and future-proofing your Python code, since some "
"future version of Python may drop support for 8-bit strings and provide only "
"Unicode strings."
msgstr ""
"Une option de ligne de commande ``-U`` a été ajoutée, ce qui fait que le "
"compilateur Python interprète toutes les chaînes de caractères comme des "
"chaînes de caractères Unicode. Ceci est destiné à être utilisé dans les "
"tests et rendre votre code Python compatible avec les versions futures, car "
"une version future de Python peut abandonner la prise en charge des chaînes "
"de caractères 8-bits et fournir uniquement des chaînes de caractères Unicode."
#: whatsnew/2.0.rst:262
msgid "List Comprehensions"
msgstr "Compréhensions de listes"
#: whatsnew/2.0.rst:264
msgid ""
"Lists are a workhorse data type in Python, and many programs manipulate a "
"list at some point. Two common operations on lists are to loop over them, "
"and either pick out the elements that meet a certain criterion, or apply "
"some function to each element. For example, given a list of strings, you "
"might want to pull out all the strings containing a given substring, or "
"strip off trailing whitespace from each line."
msgstr ""
"Les listes sont un type de données crucial dans Python, et de nombreux "
"programmes manipulent une liste à un moment donné. Deux opérations communes "
"sur les listes sont de boucler sur elles, soit de choisir les éléments qui "
"répondent à un certain critère, ou d’appliquer une certaine fonction à "
"chaque élément. Par exemple, à partir d’une liste de chaînes de caractères, "
"vous pouvez retirer toutes les chaînes contenant une sous-chaîne donnée, ou "
"enlever les espaces de chaque ligne."
#: whatsnew/2.0.rst:271
msgid ""
"The existing :func:`map` and :func:`filter` functions can be used for this "
"purpose, but they require a function as one of their arguments. This is "
"fine if there's an existing built-in function that can be passed directly, "
"but if there isn't, you have to create a little function to do the required "
"work, and Python's scoping rules make the result ugly if the little function "
"needs additional information. Take the first example in the previous "
"paragraph, finding all the strings in the list containing a given "
"substring. You could write the following to do it::"
msgstr ""
"Les fonctions existantes :func:`map` et :func:`filter` peuvent être "
"utilisées à cette fin, mais elles nécessitent une fonction en leurs "
"arguments. C’est très bien s’il y a une fonction intégrée existante qui "
"peut être passé directement, mais s’il n’y a pas, vous devez créer une "
"petite fonction pour faire le travail requis, et les règles de portée de "
"Python rendent le résultat laid si la petite fonction a besoin "
"d’informations supplémentaires. Prenons le premier exemple du paragraphe "
"précédent, en trouvant toutes les chaînes de la liste contenant une sous-"
"chaîne donnée. Vous pouvez écrire ce qui suit pour le faire ::"
#: whatsnew/2.0.rst:286
msgid ""
"Because of Python's scoping rules, a default argument is used so that the "
"anonymous function created by the :keyword:`lambda` expression knows what "
"substring is being searched for. List comprehensions make this cleaner::"
msgstr ""
"En raison des règles de portée de Python, un argument par défaut est utilisé "
"de sorte que la fonction anonyme créée par l’expression :keyword:`lambda` "
"sait quelle sous-chaîne est recherchée. Les listes en compréhension rendent "
"ceci plus propre ::"
#: whatsnew/2.0.rst:292
msgid "List comprehensions have the form::"
msgstr "Les compréhensions de liste sont de la forme suivante ::"
#: whatsnew/2.0.rst:299
msgid ""
"The :keyword:`!for`...\\ :keyword:`!in` clauses contain the sequences to be "
"iterated over. The sequences do not have to be the same length, because "
"they are *not* iterated over in parallel, but from left to right; this is "
"explained more clearly in the following paragraphs. The elements of the "
"generated list will be the successive values of *expression*. The final :"
"keyword:`!if` clause is optional; if present, *expression* is only evaluated "
"and added to the result if *condition* is true."
msgstr ""
"Le :keyword:`!for`…\\ :keyword:`!in` clauses contiennent les séquences à "
"itérer. Les séquences n’ont pas à être de la même longueur, parce qu’elles "
"ne sont *pas* itérées en parallèle, mais de gauche à droite; cela est "
"expliqué plus clairement dans les paragraphes suivants. Les éléments de la "
"liste générée seront les valeurs successives de l’expression. La clause "
"finale :keyword:`!if` clause est facultative ; si présent, l’*expression* "
"n’est évaluée et ajoutée au résultat que si la *condition* est vraie."
#: whatsnew/2.0.rst:307
msgid ""
"To make the semantics very clear, a list comprehension is equivalent to the "
"following Python code::"
msgstr ""
"Pour que la sémantique soit très claire, une compréhension de liste est "
"équivalente au code Python suivant ::"
#: whatsnew/2.0.rst:319
msgid ""
"This means that when there are multiple :keyword:`!for`...\\ :keyword:`!in` "
"clauses, the resulting list will be equal to the product of the lengths of "
"all the sequences. If you have two lists of length 3, the output list is 9 "
"elements long::"
msgstr ""
"Cela signifie que lorsqu’il y a plusieurs :keyword:`!for`…\\ :keyword:`!in` "
"clauses, la liste résultante sera égale au produit des longueurs de toutes "
"les séquences. Si vous avez deux listes de longueur 3, la liste de sortie "
"est de longueur 9 ::"
#: whatsnew/2.0.rst:330
msgid ""
"To avoid introducing an ambiguity into Python's grammar, if *expression* is "
"creating a tuple, it must be surrounded with parentheses. The first list "
"comprehension below is a syntax error, while the second one is correct::"
msgstr ""
"Afin de ne pas introduire une ambiguïté dans la grammaire de Python, "
"*expression* doit être encadrée par des parenthèses si elle produit un n-"
"uplet. La première compréhension de liste ci-dessous n'est pas valide "
"syntaxiquement, tandis que la seconde l'est ::"
#: whatsnew/2.0.rst:339
msgid ""
"The idea of list comprehensions originally comes from the functional "
"programming language Haskell (https://www.haskell.org). Greg Ewing argued "
"most effectively for adding them to Python and wrote the initial list "
"comprehension patch, which was then discussed for a seemingly endless time "
"on the python-dev mailing list and kept up-to-date by Skip Montanaro."
msgstr ""
"Le concept des liste en compréhension provient à l’origine du langage de "
"programmation fonctionnelle Haskell (https://www.haskell.org). Greg Ewing a "
"plaidé le plus efficacement pour les ajouter à Python et a écrit le patch de "
"compréhension de liste initiale, qui a ensuite été discuté pendant un temps "
"apparemment sans fin sur la liste de diffusion *python-dev* et maintenu à "
"jour par Skip Montanaro."
#: whatsnew/2.0.rst:349
msgid "Augmented Assignment"
msgstr "Opérateurs d’affectation augmentées"
#: whatsnew/2.0.rst:351
msgid ""
"Augmented assignment operators, another long-requested feature, have been "
"added to Python 2.0. Augmented assignment operators include ``+=``, ``-=``, "
"``*=``, and so forth. For example, the statement ``a += 2`` increments the "
"value of the variable ``a`` by 2, equivalent to the slightly lengthier ``a "
"= a + 2``."
msgstr ""
"Les opérateurs d’affectation soudées, une autre fonctionnalité demandée "
"depuis longtemps, ont été ajoutés à Python 2.0. Les opérateurs "
"d’affectations augmentées comprennent ``+=``, ``-=``, ``*=`` et ainsi de "
"suite. Par exemple, l’instruction ``a += 2`` incrémente la valeur de la "
"variable ``a`` par 2, équivalente à l’opération ``a = a + 2`` ."
#: whatsnew/2.0.rst:356
msgid ""
"The full list of supported assignment operators is ``+=``, ``-=``, ``*=``, "
"``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, and ``<<=``. "
"Python classes can override the augmented assignment operators by defining "
"methods named :meth:`__iadd__`, :meth:`__isub__`, etc. For example, the "
"following :class:`Number` class stores a number and supports using += to "
"create a new instance with an incremented value."
msgstr ""
"La liste complète des opérateurs d’affectations pris en charge est ``+=``, "
"``-=``, ``*=``, ``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, et "
"``<<=``. Les classes Python peuvent remplacer les opérateurs d’affectations "
"augmentées en définissant des méthodes nommées :meth:`__iadd__`, :meth:"
"`__isub__`, etc. Par exemple, la classe :class:`Number` stocke un nombre et "
"prend en charge l’utilisation de += en créant une nouvelle instance avec une "
"valeur incrémentée."
#: whatsnew/2.0.rst:377
msgid ""
"The :meth:`__iadd__` special method is called with the value of the "
"increment, and should return a new instance with an appropriately modified "
"value; this return value is bound as the new value of the variable on the "
"left-hand side."
msgstr ""
"La méthode spéciale :meth:`__iadd__` est appelée avec la valeur de "
"l’incrément, et doit renvoyer une nouvelle instance avec une valeur "
"correctement modifiée ; cette valeur de rendement est liée comme la nouvelle "
"valeur de la variable sur le côté gauche."
#: whatsnew/2.0.rst:381
msgid ""
"Augmented assignment operators were first introduced in the C programming "
"language, and most C-derived languages, such as :program:`awk`, C++, Java, "
"Perl, and PHP also support them. The augmented assignment patch was "
"implemented by Thomas Wouters."
msgstr ""
#: whatsnew/2.0.rst:390
msgid "String Methods"
msgstr "Méthodes de chaînes de caractères"
#: whatsnew/2.0.rst:392
msgid ""
"Until now string-manipulation functionality was in the :mod:`string` module, "
"which was usually a front-end for the :mod:`strop` module written in C. The "
"addition of Unicode posed a difficulty for the :mod:`strop` module, because "
"the functions would all need to be rewritten in order to accept either 8-bit "
"or Unicode strings. For functions such as :func:`string.replace`, which "
"takes 3 string arguments, that means eight possible permutations, and "
"correspondingly complicated code."
msgstr ""
#: whatsnew/2.0.rst:400
msgid ""
"Instead, Python 2.0 pushes the problem onto the string type, making string "
"manipulation functionality available through methods on both 8-bit strings "
"and Unicode strings. ::"
msgstr ""
#: whatsnew/2.0.rst:411
msgid ""
"One thing that hasn't changed, a noteworthy April Fools' joke "
"notwithstanding, is that Python strings are immutable. Thus, the string "
"methods return new strings, and do not modify the string on which they "
"operate."
msgstr ""
#: whatsnew/2.0.rst:415
msgid ""
"The old :mod:`string` module is still around for backwards compatibility, "
"but it mostly acts as a front-end to the new string methods."
msgstr ""
#: whatsnew/2.0.rst:418
msgid ""
"Two methods which have no parallel in pre-2.0 versions, although they did "
"exist in JPython for quite some time, are :meth:`startswith` and :meth:"
"`endswith`. ``s.startswith(t)`` is equivalent to ``s[:len(t)] == t``, while "
"``s.endswith(t)`` is equivalent to ``s[-len(t):] == t``."
msgstr ""
#: whatsnew/2.0.rst:423
msgid ""
"One other method which deserves special mention is :meth:`join`. The :meth:"
"`join` method of a string receives one parameter, a sequence of strings, and "
"is equivalent to the :func:`string.join` function from the old :mod:`string` "
"module, with the arguments reversed. In other words, ``s.join(seq)`` is "
"equivalent to the old ``string.join(seq, s)``."
msgstr ""
#: whatsnew/2.0.rst:433
msgid "Garbage Collection of Cycles"
msgstr ""
#: whatsnew/2.0.rst:435
msgid ""
"The C implementation of Python uses reference counting to implement garbage "
"collection. Every Python object maintains a count of the number of "
"references pointing to itself, and adjusts the count as references are "
"created or destroyed. Once the reference count reaches zero, the object is "
"no longer accessible, since you need to have a reference to an object to "
"access it, and if the count is zero, no references exist any longer."
msgstr ""
#: whatsnew/2.0.rst:442
msgid ""
"Reference counting has some pleasant properties: it's easy to understand and "
"implement, and the resulting implementation is portable, fairly fast, and "
"reacts well with other libraries that implement their own memory handling "
"schemes. The major problem with reference counting is that it sometimes "
"doesn't realise that objects are no longer accessible, resulting in a memory "
"leak. This happens when there are cycles of references."
msgstr ""
#: whatsnew/2.0.rst:449
msgid ""
"Consider the simplest possible cycle, a class instance which has a "
"reference to itself::"
msgstr ""
#: whatsnew/2.0.rst:455
msgid ""
"After the above two lines of code have been executed, the reference count of "
"``instance`` is 2; one reference is from the variable named ``'instance'``, "
"and the other is from the ``myself`` attribute of the instance."
msgstr ""
#: whatsnew/2.0.rst:459
msgid ""
"If the next line of code is ``del instance``, what happens? The reference "
"count of ``instance`` is decreased by 1, so it has a reference count of 1; "
"the reference in the ``myself`` attribute still exists. Yet the instance is "
"no longer accessible through Python code, and it could be deleted. Several "
"objects can participate in a cycle if they have references to each other, "
"causing all of the objects to be leaked."
msgstr ""
#: whatsnew/2.0.rst:466
msgid ""
"Python 2.0 fixes this problem by periodically executing a cycle detection "
"algorithm which looks for inaccessible cycles and deletes the objects "
"involved. A new :mod:`gc` module provides functions to perform a garbage "
"collection, obtain debugging statistics, and tuning the collector's "
"parameters."
msgstr ""
#: whatsnew/2.0.rst:471
msgid ""
"Running the cycle detection algorithm takes some time, and therefore will "
"result in some additional overhead. It is hoped that after we've gotten "
"experience with the cycle collection from using 2.0, Python 2.1 will be able "
"to minimize the overhead with careful tuning. It's not yet obvious how much "
"performance is lost, because benchmarking this is tricky and depends "
"crucially on how often the program creates and destroys objects. The "
"detection of cycles can be disabled when Python is compiled, if you can't "
"afford even a tiny speed penalty or suspect that the cycle collection is "
"buggy, by specifying the :option:`!--without-cycle-gc` switch when running "
"the :program:`configure` script."
msgstr ""
#: whatsnew/2.0.rst:482
msgid ""
"Several people tackled this problem and contributed to a solution. An early "
"implementation of the cycle detection approach was written by Toby Kelsey. "
"The current algorithm was suggested by Eric Tiedemann during a visit to "
"CNRI, and Guido van Rossum and Neil Schemenauer wrote two different "
"implementations, which were later integrated by Neil. Lots of other people "
"offered suggestions along the way; the March 2000 archives of the python-dev "
"mailing list contain most of the relevant discussion, especially in the "
"threads titled \"Reference cycle collection for Python\" and \"Finalization "
"again\"."
msgstr ""
#: whatsnew/2.0.rst:495
msgid "Other Core Changes"
msgstr ""
#: whatsnew/2.0.rst:497
msgid ""
"Various minor changes have been made to Python's syntax and built-in "
"functions. None of the changes are very far-reaching, but they're handy "
"conveniences."
msgstr ""
#: whatsnew/2.0.rst:502
msgid "Minor Language Changes"
msgstr "Changements mineurs du langage"
#: whatsnew/2.0.rst:504
msgid ""
"A new syntax makes it more convenient to call a given function with a tuple "
"of arguments and/or a dictionary of keyword arguments. In Python 1.5 and "
"earlier, you'd use the :func:`apply` built-in function: ``apply(f, args, "
"kw)`` calls the function :func:`f` with the argument tuple *args* and the "
"keyword arguments in the dictionary *kw*. :func:`apply` is the same in "
"2.0, but thanks to a patch from Greg Ewing, ``f(*args, **kw)`` is a shorter "
"and clearer way to achieve the same effect. This syntax is symmetrical with "
"the syntax for defining functions::"
msgstr ""
#: whatsnew/2.0.rst:518
msgid ""
"The ``print`` statement can now have its output directed to a file-like "
"object by following the ``print`` with ``>> file``, similar to the "
"redirection operator in Unix shells. Previously you'd either have to use "
"the :meth:`write` method of the file-like object, which lacks the "
"convenience and simplicity of ``print``, or you could assign a new value to "
"``sys.stdout`` and then restore the old value. For sending output to "
"standard error, it's much easier to write this::"
msgstr ""
#: whatsnew/2.0.rst:528
msgid ""
"Modules can now be renamed on importing them, using the syntax ``import "
"module as name`` or ``from module import name as othername``. The patch was "
"submitted by Thomas Wouters."
msgstr ""
#: whatsnew/2.0.rst:532
msgid ""
"A new format style is available when using the ``%`` operator; '%r' will "
"insert the :func:`repr` of its argument. This was also added from symmetry "
"considerations, this time for symmetry with the existing '%s' format style, "
"which inserts the :func:`str` of its argument. For example, ``'%r %s' % "
"('abc', 'abc')`` returns a string containing ``'abc' abc``."
msgstr ""
#: whatsnew/2.0.rst:538
msgid ""
"Previously there was no way to implement a class that overrode Python's "
"built-in :keyword:`in` operator and implemented a custom version. ``obj in "
"seq`` returns true if *obj* is present in the sequence *seq*; Python "
"computes this by simply trying every index of the sequence until either "
"*obj* is found or an :exc:`IndexError` is encountered. Moshe Zadka "
"contributed a patch which adds a :meth:`__contains__` magic method for "
"providing a custom implementation for :keyword:`!in`. Additionally, new "
"built-in objects written in C can define what :keyword:`!in` means for them "
"via a new slot in the sequence protocol."
msgstr ""
#: whatsnew/2.0.rst:547
msgid ""
"Earlier versions of Python used a recursive algorithm for deleting objects. "
"Deeply nested data structures could cause the interpreter to fill up the C "
"stack and crash; Christian Tismer rewrote the deletion logic to fix this "
"problem. On a related note, comparing recursive objects recursed infinitely "
"and crashed; Jeremy Hylton rewrote the code to no longer crash, producing a "
"useful result instead. For example, after this code::"
msgstr ""
#: whatsnew/2.0.rst:559
msgid ""
"The comparison ``a==b`` returns true, because the two recursive data "
"structures are isomorphic. See the thread \"trashcan and PR#7\" in the April "
"2000 archives of the python-dev mailing list for the discussion leading up "
"to this implementation, and some useful relevant links. Note that "
"comparisons can now also raise exceptions. In earlier versions of Python, a "
"comparison operation such as ``cmp(a,b)`` would always produce an answer, "
"even if a user-defined :meth:`__cmp__` method encountered an error, since "
"the resulting exception would simply be silently swallowed."
msgstr ""
#: whatsnew/2.0.rst:571
msgid ""
"Work has been done on porting Python to 64-bit Windows on the Itanium "
"processor, mostly by Trent Mick of ActiveState. (Confusingly, ``sys."
"platform`` is still ``'win32'`` on Win64 because it seems that for ease of "
"porting, MS Visual C++ treats code as 32 bit on Itanium.) PythonWin also "
"supports Windows CE; see the Python CE page at https://pythonce.sourceforge."
"net/ for more information."
msgstr ""
#: whatsnew/2.0.rst:577
msgid ""
"Another new platform is Darwin/MacOS X; initial support for it is in Python "
"2.0. Dynamic loading works, if you specify \"configure --with-dyld --with-"
"suffix=.x\". Consult the README in the Python source distribution for more "
"instructions."
msgstr ""
#: whatsnew/2.0.rst:581
msgid ""
"An attempt has been made to alleviate one of Python's warts, the often-"
"confusing :exc:`NameError` exception when code refers to a local variable "
"before the variable has been assigned a value. For example, the following "
"code raises an exception on the ``print`` statement in both 1.5.2 and 2.0; "
"in 1.5.2 a :exc:`NameError` exception is raised, while 2.0 raises a new :exc:"
"`UnboundLocalError` exception. :exc:`UnboundLocalError` is a subclass of :"
"exc:`NameError`, so any existing code that expects :exc:`NameError` to be "
"raised should still work. ::"
msgstr ""
#: whatsnew/2.0.rst:595
msgid ""
"Two new exceptions, :exc:`TabError` and :exc:`IndentationError`, have been "
"introduced. They're both subclasses of :exc:`SyntaxError`, and are raised "
"when Python code is found to be improperly indented."
msgstr ""
#: whatsnew/2.0.rst:601
msgid "Changes to Built-in Functions"
msgstr "Changements concernant les fonctions primitives"
#: whatsnew/2.0.rst:603
msgid ""
"A new built-in, ``zip(seq1, seq2, ...)``, has been added. :func:`zip` "
"returns a list of tuples where each tuple contains the i-th element from "
"each of the argument sequences. The difference between :func:`zip` and "
"``map(None, seq1, seq2)`` is that :func:`map` pads the sequences with "
"``None`` if the sequences aren't all of the same length, while :func:`zip` "