-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy path2.7.po
More file actions
3506 lines (3043 loc) · 145 KB
/
2.7.po
File metadata and controls
3506 lines (3043 loc) · 145 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) 2001-2017, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-19 18:31+0900\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"
"Generated-By: Babel 2.7.0\n"
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:3
msgid "What's New in Python 2.7"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst
msgid "Author"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:5
msgid "A.M. Kuchling (amk at amk.ca)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:52
msgid ""
"This article explains the new features in Python 2.7. Python 2.7 was "
"released on July 3, 2010."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:55
msgid ""
"Numeric handling has been improved in many ways, for both floating-point "
"numbers and for the :class:`~decimal.Decimal` class. There are some "
"useful additions to the standard library, such as a greatly enhanced "
":mod:`unittest` module, the :mod:`argparse` module for parsing command-"
"line options, convenient :class:`~collections.OrderedDict` and "
":class:`~collections.Counter` classes in the :mod:`collections` module, "
"and many other improvements."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:63
msgid ""
"Python 2.7 is planned to be the last of the 2.x releases, so we worked on"
" making it a good release for the long term. To help with porting to "
"Python 3, several new features from the Python 3.x series have been "
"included in 2.7."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:68
msgid ""
"This article doesn't attempt to provide a complete specification of the "
"new features, but instead provides a convenient overview. For full "
"details, you should refer to the documentation for Python 2.7 at "
"https://docs.python.org. If you want to understand the rationale for the "
"design and implementation, refer to the PEP for a particular new feature "
"or the issue on https://bugs.python.org in which a change was discussed."
" Whenever possible, \"What's New in Python\" links to the bug/patch item"
" for each change."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:80
msgid "The Future for Python 2.x"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:82
msgid ""
"Python 2.7 is the last major release in the 2.x series, as the Python "
"maintainers have shifted the focus of their new feature development "
"efforts to the Python 3.x series. This means that while Python 2 "
"continues to receive bug fixes, and to be updated to build correctly on "
"new hardware and versions of supported operated systems, there will be no"
" new full feature releases for the language or standard library."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:89
msgid ""
"However, while there is a large common subset between Python 2.7 and "
"Python 3, and many of the changes involved in migrating to that common "
"subset, or directly to Python 3, can be safely automated, some other "
"changes (notably those associated with Unicode handling) may require "
"careful consideration, and preferably robust automated regression test "
"suites, to migrate effectively."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:96
msgid ""
"This means that Python 2.7 will remain in place for a long time, "
"providing a stable and supported base platform for production systems "
"that have not yet been ported to Python 3. The full expected lifecycle of"
" the Python 2.7 series is detailed in :pep:`373`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:101
msgid "Some key consequences of the long-term significance of 2.7 are:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:103
msgid ""
"As noted above, the 2.7 release has a much longer period of maintenance "
"when compared to earlier 2.x versions. Python 2.7 is currently expected "
"to remain supported by the core development team (receiving security "
"updates and other bug fixes) until at least 2020 (10 years after its "
"initial release, compared to the more typical support period of 18--24 "
"months)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:109
msgid ""
"As the Python 2.7 standard library ages, making effective use of the "
"Python Package Index (either directly or via a redistributor) becomes "
"more important for Python 2 users. In addition to a wide variety of third"
" party packages for various tasks, the available packages include "
"backports of new modules and features from the Python 3 standard library "
"that are compatible with Python 2, as well as various tools and libraries"
" that can make it easier to migrate to Python 3. The `Python Packaging "
"User Guide <https://packaging.python.org>`__ provides guidance on "
"downloading and installing software from the Python Package Index."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:119
msgid ""
"While the preferred approach to enhancing Python 2 is now the publication"
" of new packages on the Python Package Index, this approach doesn't "
"necessarily work in all cases, especially those related to network "
"security. In exceptional cases that cannot be handled adequately by "
"publishing new or updated packages on PyPI, the Python Enhancement "
"Proposal process may be used to make the case for adding new features "
"directly to the Python 2 standard library. Any such additions, and the "
"maintenance releases where they were added, will be noted in the "
":ref:`py27-maintenance-enhancements` section below."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:129
msgid ""
"For projects wishing to migrate from Python 2 to Python 3, or for library"
" and framework developers wishing to support users on both Python 2 and "
"Python 3, there are a variety of tools and guides available to help "
"decide on a suitable approach and manage some of the technical details "
"involved. The recommended starting point is the :ref:`pyporting-howto` "
"HOWTO guide."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:137
msgid "Changes to the Handling of Deprecation Warnings"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:139
msgid ""
"For Python 2.7, a policy decision was made to silence warnings only of "
"interest to developers by default. :exc:`DeprecationWarning` and its "
"descendants are now ignored unless otherwise requested, preventing users "
"from seeing warnings triggered by an application. This change was also "
"made in the branch that became Python 3.2. (Discussed on stdlib-sig and "
"carried out in :issue:`7319`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:146
msgid ""
"In previous releases, :exc:`DeprecationWarning` messages were enabled by "
"default, providing Python developers with a clear indication of where "
"their code may break in a future major version of Python."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:151
msgid ""
"However, there are increasingly many users of Python-based applications "
"who are not directly involved in the development of those applications. "
":exc:`DeprecationWarning` messages are irrelevant to such users, making "
"them worry about an application that's actually working correctly and "
"burdening application developers with responding to these concerns."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:158
msgid ""
"You can re-enable display of :exc:`DeprecationWarning` messages by "
"running Python with the :option:`-Wdefault <-W>` (short form: "
":option:`-Wd <-W>`) switch, or by setting the :envvar:`PYTHONWARNINGS` "
"environment variable to ``\"default\"`` (or ``\"d\"``) before running "
"Python. Python code can also re-enable them by calling "
"``warnings.simplefilter('default')``."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:165
msgid ""
"The ``unittest`` module also automatically reenables deprecation warnings"
" when running tests."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:170
msgid "Python 3.1 Features"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:172
msgid ""
"Much as Python 2.6 incorporated features from Python 3.0, version 2.7 "
"incorporates some of the new features in Python 3.1. The 2.x series "
"continues to provide tools for migrating to the 3.x series."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:177
msgid "A partial list of 3.1 features that were backported to 2.7:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:179
msgid "The syntax for set literals (``{1,2,3}`` is a mutable set)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:180
msgid "Dictionary and set comprehensions (``{i: i*2 for i in range(3)}``)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:181
msgid "Multiple context managers in a single :keyword:`with` statement."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:182
msgid "A new version of the :mod:`io` library, rewritten in C for performance."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:183
msgid "The ordered-dictionary type described in :ref:`pep-0372`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:184
msgid "The new ``\",\"`` format specifier described in :ref:`pep-0378`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:185
msgid "The :class:`memoryview` object."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:186
msgid ""
"A small subset of the :mod:`importlib` module, `described below "
"<#importlib-section>`__."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:188
msgid ""
"The :func:`repr` of a float ``x`` is shorter in many cases: it's now "
"based on the shortest decimal string that's guaranteed to round back to "
"``x``. As in previous versions of Python, it's guaranteed that "
"``float(repr(x))`` recovers ``x``."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:192
msgid ""
"Float-to-string and string-to-float conversions are correctly rounded. "
"The :func:`round` function is also now correctly rounded."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:194
msgid ""
"The :c:type:`PyCapsule` type, used to provide a C API for extension "
"modules."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:195
msgid "The :c:func:`PyLong_AsLongAndOverflow` C API function."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:197
msgid "Other new Python3-mode warnings include:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:199
msgid ""
":func:`operator.isCallable` and :func:`operator.sequenceIncludes`, which "
"are not supported in 3.x, now trigger warnings."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:201
msgid ""
"The :option:`!-3` switch now automatically enables the :option:`!-Qwarn` "
"switch that causes warnings about using classic division with integers "
"and long integers."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:214
msgid "PEP 372: Adding an Ordered Dictionary to collections"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:216
msgid ""
"Regular Python dictionaries iterate over key/value pairs in arbitrary "
"order. Over the years, a number of authors have written alternative "
"implementations that remember the order that the keys were originally "
"inserted. Based on the experiences from those implementations, 2.7 "
"introduces a new :class:`~collections.OrderedDict` class in the "
":mod:`collections` module."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:222
msgid ""
"The :class:`~collections.OrderedDict` API provides the same interface as "
"regular dictionaries but iterates over keys and values in a guaranteed "
"order depending on when a key was first inserted::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:233
msgid ""
"If a new entry overwrites an existing entry, the original insertion "
"position is left unchanged::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:240
msgid "Deleting an entry and reinserting it will move it to the end::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:247
msgid ""
"The :meth:`~collections.OrderedDict.popitem` method has an optional "
"*last* argument that defaults to ``True``. If *last* is true, the most "
"recently added key is returned and removed; if it's false, the oldest key"
" is selected::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:262
msgid ""
"Comparing two ordered dictionaries checks both the keys and values, and "
"requires that the insertion order was the same::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:278
msgid ""
"Comparing an :class:`~collections.OrderedDict` with a regular dictionary "
"ignores the insertion order and just compares the keys and values."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:281
msgid ""
"How does the :class:`~collections.OrderedDict` work? It maintains a "
"doubly-linked list of keys, appending new keys to the list as they're "
"inserted. A secondary dictionary maps keys to their corresponding list "
"node, so deletion doesn't have to traverse the entire linked list and "
"therefore remains O(1)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:287
msgid ""
"The standard library now supports use of ordered dictionaries in several "
"modules."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:290
msgid ""
"The :mod:`ConfigParser` module uses them by default, meaning that "
"configuration files can now be read, modified, and then written back in "
"their original order."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:294
msgid ""
"The :meth:`~collections.somenamedtuple._asdict()` method for "
":func:`collections.namedtuple` now returns an ordered dictionary with the"
" values appearing in the same order as the underlying tuple indices."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:298
msgid ""
"The :mod:`json` module's :class:`~json.JSONDecoder` class constructor was"
" extended with an *object_pairs_hook* parameter to allow "
":class:`OrderedDict` instances to be built by the decoder. Support was "
"also added for third-party tools like `PyYAML <http://pyyaml.org/>`_."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:307
msgid ":pep:`372` - Adding an ordered dictionary to collections"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:307
msgid ""
"PEP written by Armin Ronacher and Raymond Hettinger; implemented by "
"Raymond Hettinger."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:313
msgid "PEP 378: Format Specifier for Thousands Separator"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:315
msgid ""
"To make program output more readable, it can be useful to add separators "
"to large numbers, rendering them as 18,446,744,073,709,551,616 instead of"
" 18446744073709551616."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:319
msgid ""
"The fully general solution for doing this is the :mod:`locale` module, "
"which can use different separators (\",\" in North America, \".\" in "
"Europe) and different grouping sizes, but :mod:`locale` is complicated to"
" use and unsuitable for multi-threaded applications where different "
"threads are producing output for different locales."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:325
msgid ""
"Therefore, a simple comma-grouping mechanism has been added to the mini-"
"language used by the :meth:`str.format` method. When formatting a "
"floating-point number, simply include a comma between the width and the "
"precision::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:333
msgid "When formatting an integer, include the comma after the width:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:338
msgid ""
"This mechanism is not adaptable at all; commas are always used as the "
"separator and the grouping is always into three-digit groups. The comma-"
"formatting mechanism isn't as general as the :mod:`locale` module, but "
"it's easier to use."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:345
msgid ":pep:`378` - Format Specifier for Thousands Separator"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:346
msgid "PEP written by Raymond Hettinger; implemented by Eric Smith."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:349
msgid "PEP 389: The argparse Module for Parsing Command Lines"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:351
msgid ""
"The :mod:`argparse` module for parsing command-line arguments was added "
"as a more powerful replacement for the :mod:`optparse` module."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:355
msgid ""
"This means Python now supports three different modules for parsing "
"command-line arguments: :mod:`getopt`, :mod:`optparse`, and "
":mod:`argparse`. The :mod:`getopt` module closely resembles the C "
"library's :c:func:`getopt` function, so it remains useful if you're "
"writing a Python prototype that will eventually be rewritten in C. "
":mod:`optparse` becomes redundant, but there are no plans to remove it "
"because there are many scripts still using it, and there's no automated "
"way to update these scripts. (Making the :mod:`argparse` API consistent "
"with :mod:`optparse`'s interface was discussed but rejected as too messy "
"and difficult.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:366
msgid ""
"In short, if you're writing a new script and don't need to worry about "
"compatibility with earlier versions of Python, use :mod:`argparse` "
"instead of :mod:`optparse`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:370
msgid "Here's an example::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:393
msgid ""
"Unless you override it, :option:`!-h` and :option:`!--help` switches are "
"automatically added, and produce neatly formatted output::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:410
msgid ""
"As with :mod:`optparse`, the command-line switches and arguments are "
"returned as an object with attributes named by the *dest* parameters::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:425
msgid ""
":mod:`argparse` has much fancier validation than :mod:`optparse`; you can"
" specify an exact number of arguments as an integer, 0 or more arguments "
"by passing ``'*'``, 1 or more by passing ``'+'``, or an optional argument"
" with ``'?'``. A top-level parser can contain sub-parsers to define "
"subcommands that have different sets of switches, as in ``svn commit``, "
"``svn checkout``, etc. You can specify an argument's type as "
":class:`~argparse.FileType`, which will automatically open files for you "
"and understands that ``'-'`` means standard input or output."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:438
msgid ":mod:`argparse` documentation"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:438
msgid "The documentation page of the argparse module."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:442
msgid ":ref:`upgrading-optparse-code`"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:441
msgid ""
"Part of the Python documentation, describing how to convert code that "
"uses :mod:`optparse`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:444
msgid ":pep:`389` - argparse - New Command Line Parsing Module"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:445
msgid "PEP written and implemented by Steven Bethard."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:448
msgid "PEP 391: Dictionary-Based Configuration For Logging"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:450
msgid ""
"The :mod:`logging` module is very flexible; applications can define a "
"tree of logging subsystems, and each logger in this tree can filter out "
"certain messages, format them differently, and direct messages to a "
"varying number of handlers."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:455
msgid ""
"All this flexibility can require a lot of configuration. You can write "
"Python statements to create objects and set their properties, but a "
"complex set-up requires verbose but boring code. :mod:`logging` also "
"supports a :func:`~logging.fileConfig` function that parses a file, but "
"the file format doesn't support configuring filters, and it's messier to "
"generate programmatically."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:462
msgid ""
"Python 2.7 adds a :func:`~logging.dictConfig` function that uses a "
"dictionary to configure logging. There are many ways to produce a "
"dictionary from different sources: construct one with code; parse a file "
"containing JSON; or use a YAML parsing library if one is installed. For "
"more information see :ref:`logging-config-api`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:468
msgid ""
"The following example configures two loggers, the root logger and a "
"logger named \"network\". Messages sent to the root logger will be sent "
"to the system log using the syslog protocol, and messages to the "
"\"network\" logger will be written to a :file:`network.log` file that "
"will be rotated once the log reaches 1MB."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:518
msgid ""
"Three smaller enhancements to the :mod:`logging` module, all implemented "
"by Vinay Sajip, are:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:523
msgid ""
"The :class:`~logging.handlers.SysLogHandler` class now supports "
"syslogging over TCP. The constructor has a *socktype* parameter giving "
"the type of socket to use, either :const:`socket.SOCK_DGRAM` for UDP or "
":const:`socket.SOCK_STREAM` for TCP. The default protocol remains UDP."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:529
msgid ""
":class:`~logging.Logger` instances gained a "
":meth:`~logging.Logger.getChild` method that retrieves a descendant "
"logger using a relative path. For example, once you retrieve a logger by "
"doing ``log = getLogger('app')``, calling "
"``log.getChild('network.listen')`` is equivalent to "
"``getLogger('app.network.listen')``."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:535
msgid ""
"The :class:`~logging.LoggerAdapter` class gained an "
":meth:`~logging.LoggerAdapter.isEnabledFor` method that takes a *level* "
"and returns whether the underlying logger would process a message of that"
" level of importance."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:544
msgid ":pep:`391` - Dictionary-Based Configuration For Logging"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:545
msgid "PEP written and implemented by Vinay Sajip."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:548
msgid "PEP 3106: Dictionary Views"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:550
msgid ""
"The dictionary methods :meth:`~dict.keys`, :meth:`~dict.values`, and "
":meth:`~dict.items` are different in Python 3.x. They return an object "
"called a :dfn:`view` instead of a fully materialized list."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:554
msgid ""
"It's not possible to change the return values of :meth:`~dict.keys`, "
":meth:`~dict.values`, and :meth:`~dict.items` in Python 2.7 because too "
"much code would break. Instead the 3.x versions were added under the new"
" names :meth:`~dict.viewkeys`, :meth:`~dict.viewvalues`, and "
":meth:`~dict.viewitems`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:568
msgid ""
"Views can be iterated over, but the key and item views also behave like "
"sets. The ``&`` operator performs intersection, and ``|`` performs a "
"union::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:579
msgid ""
"The view keeps track of the dictionary and its contents change as the "
"dictionary is modified::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:589
msgid ""
"However, note that you can't add or remove keys while you're iterating "
"over the view::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:599
msgid ""
"You can use the view methods in Python 2.x code, and the 2to3 converter "
"will change them to the standard :meth:`~dict.keys`, "
":meth:`~dict.values`, and :meth:`~dict.items` methods."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:606
msgid ":pep:`3106` - Revamping dict.keys(), .values() and .items()"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:606
msgid ""
"PEP written by Guido van Rossum. Backported to 2.7 by Alexandre "
"Vassalotti; :issue:`1967`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:611
msgid "PEP 3137: The memoryview Object"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:613
msgid ""
"The :class:`memoryview` object provides a view of another object's memory"
" content that matches the :class:`bytes` type's interface."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:631
msgid ""
"The content of the view can be converted to a string of bytes or a list "
"of integers:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:643
msgid ""
":class:`memoryview` objects allow modifying the underlying object if it's"
" a mutable object."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:666
msgid ":pep:`3137` - Immutable Bytes and Mutable Buffer"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:665
msgid ""
"PEP written by Guido van Rossum. Implemented by Travis Oliphant, Antoine "
"Pitrou and others. Backported to 2.7 by Antoine Pitrou; :issue:`2396`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:672
msgid "Other Language Changes"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:674
msgid "Some smaller changes made to the core Python language are:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:676
msgid ""
"The syntax for set literals has been backported from Python 3.x. Curly "
"brackets are used to surround the contents of the resulting mutable set; "
"set literals are distinguished from dictionaries by not containing colons"
" and values. ``{}`` continues to represent an empty dictionary; use "
"``set()`` for an empty set."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:693
msgid "Backported by Alexandre Vassalotti; :issue:`2335`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:695
msgid ""
"Dictionary and set comprehensions are another feature backported from "
"3.x, generalizing list/generator comprehensions to use the literal syntax"
" for sets and dictionaries."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:707
msgid "Backported by Alexandre Vassalotti; :issue:`2333`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:709
msgid ""
"The :keyword:`with` statement can now use multiple context managers in "
"one statement. Context managers are processed from left to right and "
"each one is treated as beginning a new :keyword:`!with` statement. This "
"means that::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:717
msgid "is equivalent to::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:723
msgid ""
"The :func:`contextlib.nested` function provides a very similar function, "
"so it's no longer necessary and has been deprecated."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:726
msgid ""
"(Proposed in https://codereview.appspot.com/53094; implemented by Georg "
"Brandl.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:729
msgid ""
"Conversions between floating-point numbers and strings are now correctly "
"rounded on most platforms. These conversions occur in many different "
"places: :func:`str` on floats and complex numbers; the :class:`float` and"
" :class:`complex` constructors; numeric formatting; serializing and "
"deserializing floats and complex numbers using the :mod:`marshal`, "
":mod:`pickle` and :mod:`json` modules; parsing of float and imaginary "
"literals in Python code; and :class:`~decimal.Decimal`-to-float "
"conversion."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:741
msgid ""
"Related to this, the :func:`repr` of a floating-point number *x* now "
"returns a result based on the shortest decimal string that's guaranteed "
"to round back to *x* under correct rounding (with round-half-to-even "
"rounding mode). Previously it gave a string based on rounding x to 17 "
"decimal digits."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:749
msgid ""
"The rounding library responsible for this improvement works on Windows "
"and on Unix platforms using the gcc, icc, or suncc compilers. There may "
"be a small number of platforms where correct operation of this code "
"cannot be guaranteed, so the code is not used on such systems. You can "
"find out which code is being used by checking "
":data:`sys.float_repr_style`, which will be ``short`` if the new code is"
" in use and ``legacy`` if it isn't."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:757
msgid ""
"Implemented by Eric Smith and Mark Dickinson, using David Gay's "
":file:`dtoa.c` library; :issue:`7117`."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:760
msgid ""
"Conversions from long integers and regular integers to floating point now"
" round differently, returning the floating-point number closest to the "
"number. This doesn't matter for small integers that can be converted "
"exactly, but for large numbers that will unavoidably lose precision, "
"Python 2.7 now approximates more closely. For example, Python 2.6 "
"computed the following::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:773
msgid ""
"Python 2.7's floating-point result is larger, but much closer to the true"
" value::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:782
msgid "(Implemented by Mark Dickinson; :issue:`3166`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:784
msgid ""
"Integer division is also more accurate in its rounding behaviours. (Also"
" implemented by Mark Dickinson; :issue:`1811`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:787
msgid ""
"Implicit coercion for complex numbers has been removed; the interpreter "
"will no longer ever attempt to call a :meth:`__coerce__` method on "
"complex objects. (Removed by Meador Inge and Mark Dickinson; "
":issue:`5211`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:791
#, python-format
msgid ""
"The :meth:`str.format` method now supports automatic numbering of the "
"replacement fields. This makes using :meth:`str.format` more closely "
"resemble using ``%s`` formatting::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:800
msgid ""
"The auto-numbering takes the fields from left to right, so the first "
"``{...}`` specifier will use the first argument to :meth:`str.format`, "
"the next specifier will use the next argument, and so on. You can't mix "
"auto-numbering and explicit numbering -- either number all of your "
"specifier fields or none of them -- but you can mix auto-numbering and "
"named fields, as in the second example above. (Contributed by Eric "
"Smith; :issue:`5237`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:807
msgid ""
"Complex numbers now correctly support usage with :func:`format`, and "
"default to being right-aligned. Specifying a precision or comma-"
"separation applies to both the real and imaginary parts of the number, "
"but a specified field width and alignment is applied to the whole of the "
"resulting ``1.5+3j`` output. (Contributed by Eric Smith; :issue:`1588` "
"and :issue:`7988`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:814
msgid ""
"The 'F' format code now always formats its output using uppercase "
"characters, so it will now produce 'INF' and 'NAN'. (Contributed by Eric "
"Smith; :issue:`3382`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:818
msgid ""
"A low-level change: the :meth:`object.__format__` method now triggers a "
":exc:`PendingDeprecationWarning` if it's passed a format string, because "
"the :meth:`__format__` method for :class:`object` converts the object to "
"a string representation and formats that. Previously the method silently"
" applied the format string to the string representation, but that could "
"hide mistakes in Python code. If you're supplying formatting information"
" such as an alignment or precision, presumably you're expecting the "
"formatting to be applied in some object-specific way. (Fixed by Eric "
"Smith; :issue:`7994`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:828
msgid ""
"The :func:`int` and :func:`long` types gained a ``bit_length`` method "
"that returns the number of bits necessary to represent its argument in "
"binary::"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:843
msgid "(Contributed by Fredrik Johansson and Victor Stinner; :issue:`3439`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:845
msgid ""
"The :keyword:`import` statement will no longer try an absolute import if "
"a relative import (e.g. ``from .os import sep``) fails. This fixes a "
"bug, but could possibly break certain :keyword:`!import` statements that "
"were only working by accident. (Fixed by Meador Inge; :issue:`7902`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:851
msgid ""
"It's now possible for a subclass of the built-in :class:`unicode` type to"
" override the :meth:`__unicode__` method. (Implemented by Victor "
"Stinner; :issue:`1583863`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:855
msgid ""
"The :class:`bytearray` type's :meth:`~bytearray.translate` method now "
"accepts ``None`` as its first argument. (Fixed by Georg Brandl; "
":issue:`4759`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:861
msgid ""
"When using ``@classmethod`` and ``@staticmethod`` to wrap methods as "
"class or static methods, the wrapper object now exposes the wrapped "
"function as their :attr:`__func__` attribute. (Contributed by Amaury "
"Forgeot d'Arc, after a suggestion by George Sakkis; :issue:`5982`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:867
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:2462
msgid ""
"When a restricted set of attributes were set using ``__slots__``, "
"deleting an unset attribute would not raise :exc:`AttributeError` as you "
"would expect. Fixed by Benjamin Peterson; :issue:`7604`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:871
msgid ""
"Two new encodings are now supported: \"cp720\", used primarily for Arabic"
" text; and \"cp858\", a variant of CP 850 that adds the euro symbol. "
"(CP720 contributed by Alexander Belchenko and Amaury Forgeot d'Arc in "
":issue:`1616979`; CP858 contributed by Tim Hatch in :issue:`8016`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:877
msgid ""
"The :class:`file` object will now set the :attr:`filename` attribute on "
"the :exc:`IOError` exception when trying to open a directory on POSIX "
"platforms (noted by Jan Kaliszewski; :issue:`4764`), and now explicitly "
"checks for and forbids writing to read-only file objects instead of "
"trusting the C library to catch and report the error (fixed by Stefan "
"Krah; :issue:`5677`)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:884
msgid ""
"The Python tokenizer now translates line endings itself, so the "
":func:`compile` built-in function now accepts code using any line-ending "
"convention. Additionally, it no longer requires that the code end in a "
"newline."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:889
msgid ""
"Extra parentheses in function definitions are illegal in Python 3.x, "
"meaning that you get a syntax error from ``def f((x)): pass``. In "
"Python3-warning mode, Python 2.7 will now warn about this odd usage. "
"(Noted by James Lingard; :issue:`7362`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:894
msgid ""
"It's now possible to create weak references to old-style class objects. "
"New-style classes were always weak-referenceable. (Fixed by Antoine "
"Pitrou; :issue:`8268`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:898
msgid ""
"When a module object is garbage-collected, the module's dictionary is now"
" only cleared if no one else is holding a reference to the dictionary "
"(:issue:`7140`)."
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:907
msgid "Interpreter Changes"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:909
msgid ""
"A new environment variable, :envvar:`PYTHONWARNINGS`, allows controlling "
"warnings. It should be set to a string containing warning settings, "
"equivalent to those used with the :option:`-W` switch, separated by "
"commas. (Contributed by Brian Curtin; :issue:`7301`.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:915
msgid ""
"For example, the following setting will print warnings every time they "
"occur, but turn warnings from the :mod:`Cookie` module into an error. "
"(The exact syntax for setting an environment variable varies across "
"operating systems and shells.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:928
msgid "Optimizations"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:930
msgid "Several performance enhancements have been added:"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:932
msgid ""
"A new opcode was added to perform the initial setup for :keyword:`with` "
"statements, looking up the :meth:`__enter__` and :meth:`__exit__` "
"methods. (Contributed by Benjamin Peterson.)"
msgstr ""
#: /Users/flowdas/works/docs/python/src/Doc/whatsnew/2.7.rst:936
#, python-format
msgid ""
"The garbage collector now performs better for one common usage pattern: "
"when many objects are being allocated without deallocating any of them. "
"This would previously take quadratic time for garbage collection, but now"