-
-
Notifications
You must be signed in to change notification settings - Fork 211
/
Copy path3.4.po
3668 lines (3151 loc) · 133 KB
/
3.4.po
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-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-05 00:13+0000\n"
"PO-Revision-Date: 2018-05-23 16:20+0000\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../whatsnew/3.4.rst:3
msgid "What's New In Python 3.4"
msgstr "Python 3.4 有什麼新功能"
#: ../../whatsnew/3.4.rst:0
msgid "Author"
msgstr "作者"
#: ../../whatsnew/3.4.rst:5
msgid "R. David Murray <[email protected]> (Editor)"
msgstr "R. David Murray <[email protected]> (編輯者)"
#: ../../whatsnew/3.4.rst:63
msgid ""
"This article explains the new features in Python 3.4, compared to 3.3. "
"Python 3.4 was released on March 16, 2014. For full details, see the "
"`changelog <https://docs.python.org/3.4/whatsnew/changelog.html>`_."
msgstr ""
"本文介紹了 Python 3.4 與 3.3 相比多了哪些新功能。Python 3.1 已於 2014 年 3 "
"月 16 日發布。完整詳情請見 `changelog <https://docs.python.org/3.4/whatsnew/"
"changelog.html>`_。"
#: ../../whatsnew/3.4.rst:70
msgid ":pep:`429` -- Python 3.4 Release Schedule"
msgstr ":pep:`429` - Python 3.4 發佈時程"
#: ../../whatsnew/3.4.rst:75
msgid "Summary -- Release Highlights"
msgstr "發布重點摘要"
#: ../../whatsnew/3.4.rst:80
msgid "New syntax features:"
msgstr "新增語法特性:"
#: ../../whatsnew/3.4.rst:82
msgid "No new syntax features were added in Python 3.4."
msgstr ""
#: ../../whatsnew/3.4.rst:84
msgid "Other new features:"
msgstr ""
#: ../../whatsnew/3.4.rst:86
msgid ":ref:`pip should always be available <whatsnew-pep-453>` (:pep:`453`)."
msgstr ""
#: ../../whatsnew/3.4.rst:87
msgid ""
":ref:`Newly created file descriptors are non-inheritable <whatsnew-pep-446>` "
"(:pep:`446`)."
msgstr ""
#: ../../whatsnew/3.4.rst:89
msgid ""
"command line option for :ref:`isolated mode <whatsnew-isolated-mode>` (:"
"issue:`16499`)."
msgstr ""
#: ../../whatsnew/3.4.rst:91
msgid ""
":ref:`improvements in the handling of codecs <codec-handling-improvements>` "
"that are not text encodings (multiple issues)."
msgstr ""
#: ../../whatsnew/3.4.rst:93
msgid ""
":ref:`A ModuleSpec Type <whatsnew-pep-451>` for the Import System (:pep:"
"`451`). (Affects importer authors.)"
msgstr ""
#: ../../whatsnew/3.4.rst:95
msgid ""
"The :mod:`marshal` format has been made :ref:`more compact and efficient "
"<whatsnew-marshal-3>` (:issue:`16475`)."
msgstr ""
#: ../../whatsnew/3.4.rst:98
msgid "New library modules:"
msgstr "新的函式庫模組:"
#: ../../whatsnew/3.4.rst:100
msgid ""
":mod:`asyncio`: :ref:`New provisional API for asynchronous IO <whatsnew-"
"asyncio>` (:pep:`3156`)."
msgstr ""
#: ../../whatsnew/3.4.rst:102
msgid ""
":mod:`ensurepip`: :ref:`Bootstrapping the pip installer <whatsnew-"
"ensurepip>` (:pep:`453`)."
msgstr ""
#: ../../whatsnew/3.4.rst:104
msgid ""
":mod:`enum`: :ref:`Support for enumeration types <whatsnew-enum>` (:pep:"
"`435`)."
msgstr ""
#: ../../whatsnew/3.4.rst:106
msgid ""
":mod:`pathlib`: :ref:`Object-oriented filesystem paths <whatsnew-pathlib>` (:"
"pep:`428`)."
msgstr ""
#: ../../whatsnew/3.4.rst:108
msgid ""
":mod:`selectors`: :ref:`High-level and efficient I/O multiplexing <whatsnew-"
"selectors>`, built upon the :mod:`select` module primitives (part of :pep:"
"`3156`)."
msgstr ""
#: ../../whatsnew/3.4.rst:111
msgid ""
":mod:`statistics`: A basic :ref:`numerically stable statistics library "
"<whatsnew-statistics>` (:pep:`450`)."
msgstr ""
#: ../../whatsnew/3.4.rst:113
msgid ""
":mod:`tracemalloc`: :ref:`Trace Python memory allocations <whatsnew-"
"tracemalloc>` (:pep:`454`)."
msgstr ""
#: ../../whatsnew/3.4.rst:116
msgid "Significantly improved library modules:"
msgstr ""
#: ../../whatsnew/3.4.rst:118
msgid ""
":ref:`Single-dispatch generic functions <whatsnew-singledispatch>` in :mod:"
"`functools` (:pep:`443`)."
msgstr ""
#: ../../whatsnew/3.4.rst:120
msgid ""
"New :mod:`pickle` :ref:`protocol 4 <whatsnew-protocol-4>` (:pep:`3154`)."
msgstr ""
#: ../../whatsnew/3.4.rst:121
msgid ""
":mod:`multiprocessing` now has :ref:`an option to avoid using os.fork on "
"Unix <whatsnew-multiprocessing-no-fork>` (:issue:`8713`)."
msgstr ""
#: ../../whatsnew/3.4.rst:123
msgid ""
":mod:`email` has a new submodule, :mod:`~email.contentmanager`, and a new :"
"mod:`~email.message.Message` subclass (:class:`~email.contentmanager."
"EmailMessage`) that :ref:`simplify MIME handling "
"<whatsnew_email_contentmanager>` (:issue:`18891`)."
msgstr ""
#: ../../whatsnew/3.4.rst:127
msgid ""
"The :mod:`inspect` and :mod:`pydoc` modules are now capable of correct "
"introspection of a much wider variety of callable objects, which improves "
"the output of the Python :func:`help` system."
msgstr ""
#: ../../whatsnew/3.4.rst:130
msgid "The :mod:`ipaddress` module API has been declared stable"
msgstr ""
#: ../../whatsnew/3.4.rst:132
msgid "Security improvements:"
msgstr "安全性改進:"
#: ../../whatsnew/3.4.rst:134
msgid ""
":ref:`Secure and interchangeable hash algorithm <whatsnew-pep-456>` (:pep:"
"`456`)."
msgstr ""
#: ../../whatsnew/3.4.rst:136
msgid ""
":ref:`Make newly created file descriptors non-inheritable <whatsnew-"
"pep-446>` (:pep:`446`) to avoid leaking file descriptors to child processes."
msgstr ""
#: ../../whatsnew/3.4.rst:138
msgid ""
"New command line option for :ref:`isolated mode <whatsnew-isolated-mode>`, (:"
"issue:`16499`)."
msgstr ""
#: ../../whatsnew/3.4.rst:140
msgid ""
":mod:`multiprocessing` now has :ref:`an option to avoid using os.fork on "
"Unix <whatsnew-multiprocessing-no-fork>`. *spawn* and *forkserver* are more "
"secure because they avoid sharing data with child processes."
msgstr ""
#: ../../whatsnew/3.4.rst:143
msgid ""
":mod:`multiprocessing` child processes on Windows no longer inherit all of "
"the parent's inheritable handles, only the necessary ones."
msgstr ""
#: ../../whatsnew/3.4.rst:145
msgid ""
"A new :func:`hashlib.pbkdf2_hmac` function provides the `PKCS#5 password-"
"based key derivation function 2 <https://en.wikipedia.org/wiki/PBKDF2>`_."
msgstr ""
#: ../../whatsnew/3.4.rst:148
msgid ":ref:`TLSv1.1 and TLSv1.2 support <whatsnew-tls-11-12>` for :mod:`ssl`."
msgstr ""
#: ../../whatsnew/3.4.rst:149
msgid ""
":ref:`Retrieving certificates from the Windows system cert store support "
"<whatsnew34-win-cert-store>` for :mod:`ssl`."
msgstr ""
#: ../../whatsnew/3.4.rst:151
msgid ""
":ref:`Server-side SNI (Server Name Indication) support <whatsnew34-sni>` "
"for :mod:`ssl`."
msgstr ""
#: ../../whatsnew/3.4.rst:153
msgid ""
"The :class:`ssl.SSLContext` class has a :ref:`lot of improvements "
"<whatsnew34-sslcontext>`."
msgstr ""
#: ../../whatsnew/3.4.rst:155
msgid ""
"All modules in the standard library that support SSL now support server "
"certificate verification, including hostname matching (:func:`ssl."
"match_hostname`) and CRLs (Certificate Revocation lists, see :func:`ssl."
"SSLContext.load_verify_locations`)."
msgstr ""
#: ../../whatsnew/3.4.rst:160
msgid "CPython implementation improvements:"
msgstr ""
#: ../../whatsnew/3.4.rst:162
msgid ":ref:`Safe object finalization <whatsnew-pep-442>` (:pep:`442`)."
msgstr ""
#: ../../whatsnew/3.4.rst:163
msgid ""
"Leveraging :pep:`442`, in most cases :ref:`module globals are no longer set "
"to None during finalization <whatsnew-pep-442>` (:issue:`18214`)."
msgstr ""
#: ../../whatsnew/3.4.rst:165
msgid ":ref:`Configurable memory allocators <whatsnew-pep-445>` (:pep:`445`)."
msgstr ""
#: ../../whatsnew/3.4.rst:166
msgid ":ref:`Argument Clinic <whatsnew-pep-436>` (:pep:`436`)."
msgstr ""
#: ../../whatsnew/3.4.rst:168
msgid ""
"Please read on for a comprehensive list of user-facing changes, including "
"many other smaller improvements, CPython optimizations, deprecations, and "
"potential porting issues."
msgstr ""
#: ../../whatsnew/3.4.rst:175
msgid "New Features"
msgstr "新增功能"
#: ../../whatsnew/3.4.rst:180
msgid "PEP 453: Explicit Bootstrapping of PIP in Python Installations"
msgstr ""
#: ../../whatsnew/3.4.rst:183
msgid "Bootstrapping pip By Default"
msgstr ""
#: ../../whatsnew/3.4.rst:185
msgid ""
"The new :mod:`ensurepip` module (defined in :pep:`453`) provides a standard "
"cross-platform mechanism to bootstrap the pip installer into Python "
"installations and virtual environments. The version of ``pip`` included with "
"Python 3.4.0 is ``pip`` 1.5.4, and future 3.4.x maintenance releases will "
"update the bundled version to the latest version of ``pip`` that is "
"available at the time of creating the release candidate."
msgstr ""
#: ../../whatsnew/3.4.rst:192
msgid ""
"By default, the commands ``pipX`` and ``pipX.Y`` will be installed on all "
"platforms (where X.Y stands for the version of the Python installation), "
"along with the ``pip`` Python package and its dependencies. On Windows and "
"in virtual environments on all platforms, the unversioned ``pip`` command "
"will also be installed. On other platforms, the system wide unversioned "
"``pip`` command typically refers to the separately installed Python 2 "
"version."
msgstr ""
#: ../../whatsnew/3.4.rst:200
msgid ""
"The ``pyvenv`` command line utility and the :mod:`venv` module make use of "
"the :mod:`ensurepip` module to make ``pip`` readily available in virtual "
"environments. When using the command line utility, ``pip`` is installed by "
"default, while when using the :mod:`venv` module :ref:`venv-api` "
"installation of ``pip`` must be requested explicitly."
msgstr ""
#: ../../whatsnew/3.4.rst:206
msgid ""
"For CPython :ref:`source builds on POSIX systems <building-python-on-unix>`, "
"the ``make install`` and ``make altinstall`` commands bootstrap ``pip`` by "
"default. This behaviour can be controlled through configure options, and "
"overridden through Makefile options."
msgstr ""
#: ../../whatsnew/3.4.rst:211
msgid ""
"On Windows and Mac OS X, the CPython installers now default to installing "
"``pip`` along with CPython itself (users may opt out of installing it during "
"the installation process). Window users will need to opt in to the automatic "
"``PATH`` modifications to have ``pip`` available from the command line by "
"default, otherwise it can still be accessed through the Python launcher for "
"Windows as ``py -m pip``."
msgstr ""
#: ../../whatsnew/3.4.rst:218
msgid ""
"As :pep:`discussed in the PEP <0453#recommendations-for-downstream-"
"distributors>` platform packagers may choose not to install these commands "
"by default, as long as, when invoked, they provide clear and simple "
"directions on how to install them on that platform (usually using the system "
"package manager)."
msgstr ""
#: ../../whatsnew/3.4.rst:226
msgid ""
"To avoid conflicts between parallel Python 2 and Python 3 installations, "
"only the versioned ``pip3`` and ``pip3.4`` commands are bootstrapped by "
"default when ``ensurepip`` is invoked directly - the ``--default-pip`` "
"option is needed to also request the unversioned ``pip`` command. ``pyvenv`` "
"and the Windows installer ensure that the unqualified ``pip`` command is "
"made available in those environments, and ``pip`` can always be invoked via "
"the ``-m`` switch rather than directly to avoid ambiguity on systems with "
"multiple Python installations."
msgstr ""
#: ../../whatsnew/3.4.rst:237
msgid "Documentation Changes"
msgstr ""
#: ../../whatsnew/3.4.rst:239
msgid ""
"As part of this change, the :ref:`installing-index` and :ref:`distributing-"
"index` sections of the documentation have been completely redesigned as "
"short getting started and FAQ documents. Most packaging documentation has "
"now been moved out to the Python Packaging Authority maintained `Python "
"Packaging User Guide <https://packaging.python.org>`__ and the documentation "
"of the individual projects."
msgstr ""
#: ../../whatsnew/3.4.rst:247
msgid ""
"However, as this migration is currently still incomplete, the legacy "
"versions of those guides remaining available as :ref:`install-index` and :"
"ref:`setuptools-index`."
msgstr ""
#: ../../whatsnew/3.4.rst:253
msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations"
msgstr ""
#: ../../whatsnew/3.4.rst:254
msgid ""
"PEP written by Donald Stufft and Nick Coghlan, implemented by Donald Stufft, "
"Nick Coghlan, Martin von Löwis and Ned Deily."
msgstr ""
#: ../../whatsnew/3.4.rst:261
msgid "PEP 446: Newly Created File Descriptors Are Non-Inheritable"
msgstr ""
#: ../../whatsnew/3.4.rst:263
msgid ""
":pep:`446` makes newly created file descriptors :ref:`non-inheritable "
"<fd_inheritance>`. In general, this is the behavior an application will "
"want: when launching a new process, having currently open files also open in "
"the new process can lead to all sorts of hard to find bugs, and potentially "
"to security issues."
msgstr ""
#: ../../whatsnew/3.4.rst:269
msgid ""
"However, there are occasions when inheritance is desired. To support these "
"cases, the following new functions and methods are available:"
msgstr ""
#: ../../whatsnew/3.4.rst:272
msgid ":func:`os.get_inheritable`, :func:`os.set_inheritable`"
msgstr ":func:`os.get_inheritable`, :func:`os.set_inheritable`"
#: ../../whatsnew/3.4.rst:273
msgid ":func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`"
msgstr ":func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`"
#: ../../whatsnew/3.4.rst:274
msgid ""
":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`"
msgstr ""
":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`"
#: ../../whatsnew/3.4.rst:278
msgid ":pep:`446` -- Make newly created file descriptors non-inheritable"
msgstr ""
#: ../../whatsnew/3.4.rst:279 ../../whatsnew/3.4.rst:1811
msgid "PEP written and implemented by Victor Stinner."
msgstr "由 Victor Stinner 撰寫 PEP 與實作。"
#: ../../whatsnew/3.4.rst:285
msgid "Improvements to Codec Handling"
msgstr ""
#: ../../whatsnew/3.4.rst:287
msgid ""
"Since it was first introduced, the :mod:`codecs` module has always been "
"intended to operate as a type-neutral dynamic encoding and decoding system. "
"However, its close coupling with the Python text model, especially the type "
"restricted convenience methods on the builtin :class:`str`, :class:`bytes` "
"and :class:`bytearray` types, has historically obscured that fact."
msgstr ""
#: ../../whatsnew/3.4.rst:294
msgid ""
"As a key step in clarifying the situation, the :meth:`codecs.encode` and :"
"meth:`codecs.decode` convenience functions are now properly documented in "
"Python 2.7, 3.3 and 3.4. These functions have existed in the :mod:`codecs` "
"module (and have been covered by the regression test suite) since Python "
"2.4, but were previously only discoverable through runtime introspection."
msgstr ""
#: ../../whatsnew/3.4.rst:300
msgid ""
"Unlike the convenience methods on :class:`str`, :class:`bytes` and :class:"
"`bytearray`, the :mod:`codecs` convenience functions support arbitrary "
"codecs in both Python 2 and Python 3, rather than being limited to Unicode "
"text encodings (in Python 3) or ``basestring`` <-> ``basestring`` "
"conversions (in Python 2)."
msgstr ""
#: ../../whatsnew/3.4.rst:306
msgid ""
"In Python 3.4, the interpreter is able to identify the known non-text "
"encodings provided in the standard library and direct users towards these "
"general purpose convenience functions when appropriate::"
msgstr ""
#: ../../whatsnew/3.4.rst:310
msgid ""
">>> b\"abcdef\".decode(\"hex\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'hex' is not a text encoding; use codecs.decode() to handle "
"arbitrary codecs\n"
"\n"
">>> \"hello\".encode(\"rot13\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'rot13' is not a text encoding; use codecs.encode() to handle "
"arbitrary codecs\n"
"\n"
">>> open(\"foo.txt\", encoding=\"hex\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'hex' is not a text encoding; use codecs.open() to handle "
"arbitrary codecs"
msgstr ""
">>> b\"abcdef\".decode(\"hex\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'hex' is not a text encoding; use codecs.decode() to handle "
"arbitrary codecs\n"
"\n"
">>> \"hello\".encode(\"rot13\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'rot13' is not a text encoding; use codecs.encode() to handle "
"arbitrary codecs\n"
"\n"
">>> open(\"foo.txt\", encoding=\"hex\")\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"LookupError: 'hex' is not a text encoding; use codecs.open() to handle "
"arbitrary codecs"
#: ../../whatsnew/3.4.rst:325
msgid ""
"In a related change, whenever it is feasible without breaking backwards "
"compatibility, exceptions raised during encoding and decoding operations are "
"wrapped in a chained exception of the same type that mentions the name of "
"the codec responsible for producing the error::"
msgstr ""
#: ../../whatsnew/3.4.rst:330
msgid ""
">>> import codecs\n"
"\n"
">>> codecs.decode(b\"abcdefgh\", \"hex\")\n"
"Traceback (most recent call last):\n"
" File \"/usr/lib/python3.4/encodings/hex_codec.py\", line 20, in "
"hex_decode\n"
" return (binascii.a2b_hex(input), len(input))\n"
"binascii.Error: Non-hexadecimal digit found\n"
"\n"
"The above exception was the direct cause of the following exception:\n"
"\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"binascii.Error: decoding with 'hex' codec failed (Error: Non-hexadecimal "
"digit found)\n"
"\n"
">>> codecs.encode(\"hello\", \"bz2\")\n"
"Traceback (most recent call last):\n"
" File \"/usr/lib/python3.4/encodings/bz2_codec.py\", line 17, in "
"bz2_encode\n"
" return (bz2.compress(input), len(input))\n"
" File \"/usr/lib/python3.4/bz2.py\", line 498, in compress\n"
" return comp.compress(data) + comp.flush()\n"
"TypeError: 'str' does not support the buffer interface\n"
"\n"
"The above exception was the direct cause of the following exception:\n"
"\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"TypeError: encoding with 'bz2' codec failed (TypeError: 'str' does not "
"support the buffer interface)"
msgstr ""
#: ../../whatsnew/3.4.rst:358
msgid ""
"Finally, as the examples above show, these improvements have permitted the "
"restoration of the convenience aliases for the non-Unicode codecs that were "
"themselves restored in Python 3.2. This means that encoding binary data to "
"and from its hexadecimal representation (for example) can now be written as::"
msgstr ""
#: ../../whatsnew/3.4.rst:364
msgid ""
">>> from codecs import encode, decode\n"
">>> encode(b\"hello\", \"hex\")\n"
"b'68656c6c6f'\n"
">>> decode(b\"68656c6c6f\", \"hex\")\n"
"b'hello'"
msgstr ""
#: ../../whatsnew/3.4.rst:370
msgid ""
"The binary and text transforms provided in the standard library are detailed "
"in :ref:`binary-transforms` and :ref:`text-transforms`."
msgstr ""
#: ../../whatsnew/3.4.rst:373
msgid ""
"(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`, :issue:"
"`17828` and :issue:`19619`.)"
msgstr ""
"(由 Nick Coghlan 在 :issue:`7475`、:issue:`17827`、:issue:`17828` 和 :issue:"
"`19619` 中貢獻。)"
#: ../../whatsnew/3.4.rst:380
msgid "PEP 451: A ModuleSpec Type for the Import System"
msgstr ""
#: ../../whatsnew/3.4.rst:382
msgid ""
":pep:`451` provides an encapsulation of the information about a module that "
"the import machinery will use to load it (that is, a module specification). "
"This helps simplify both the import implementation and several import-"
"related APIs. The change is also a stepping stone for `several future import-"
"related improvements`__."
msgstr ""
#: ../../whatsnew/3.4.rst:390
msgid ""
"The public-facing changes from the PEP are entirely backward-compatible. "
"Furthermore, they should be transparent to everyone but importer authors. "
"Key finder and loader methods have been deprecated, but they will continue "
"working. New importers should use the new methods described in the PEP. "
"Existing importers should be updated to implement the new methods. See the :"
"ref:`deprecated-3.4` section for a list of methods that should be replaced "
"and their replacements."
msgstr ""
#: ../../whatsnew/3.4.rst:400
msgid "Other Language Changes"
msgstr "其他語言更動"
#: ../../whatsnew/3.4.rst:402
msgid "Some smaller changes made to the core Python language are:"
msgstr ""
#: ../../whatsnew/3.4.rst:404
msgid "Unicode database updated to UCD version 6.3."
msgstr ""
#: ../../whatsnew/3.4.rst:406
msgid ""
":func:`min` and :func:`max` now accept a *default* keyword-only argument "
"that can be used to specify the value they return if the iterable they are "
"evaluating has no elements. (Contributed by Julian Berman in :issue:"
"`18111`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:411
msgid "Module objects are now :ref:`weakly referenceable <mod-weakref>`."
msgstr ""
#: ../../whatsnew/3.4.rst:413
msgid ""
"Module ``__file__`` attributes (and related values) should now always "
"contain absolute paths by default, with the sole exception of ``__main__."
"__file__`` when a script has been executed directly using a relative path. "
"(Contributed by Brett Cannon in :issue:`18416`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:418
msgid ""
"All the UTF-\\* codecs (except UTF-7) now reject surrogates during both "
"encoding and decoding unless the ``surrogatepass`` error handler is used, "
"with the exception of the UTF-16 decoder (which accepts valid surrogate "
"pairs) and the UTF-16 encoder (which produces them while encoding non-BMP "
"characters). (Contributed by Victor Stinner, Kang-Hao (Kenny) Lu and Serhiy "
"Storchaka in :issue:`12892`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:425
msgid ""
"New German EBCDIC :ref:`codec <standard-encodings>` ``cp273``. (Contributed "
"by Michael Bierenfeld and Andrew Kuchling in :issue:`1097797`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:428
msgid ""
"New Ukrainian :ref:`codec <standard-encodings>` ``cp1125``. (Contributed by "
"Serhiy Storchaka in :issue:`19668`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:431
msgid ""
":class:`bytes`.join() and :class:`bytearray`.join() now accept arbitrary "
"buffer objects as arguments. (Contributed by Antoine Pitrou in :issue:"
"`15958`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:435
msgid ""
"The :class:`int` constructor now accepts any object that has an "
"``__index__`` method for its *base* argument. (Contributed by Mark "
"Dickinson in :issue:`16772`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:439
msgid ""
"Frame objects now have a :func:`~frame.clear` method that clears all "
"references to local variables from the frame. (Contributed by Antoine "
"Pitrou in :issue:`17934`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:443
msgid ""
":class:`memoryview` is now registered as a :class:`Sequence <collections."
"abc>`, and supports the :func:`reversed` builtin. (Contributed by Nick "
"Coghlan and Claudiu Popa in :issue:`18690` and :issue:`19078`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:447
msgid ""
"Signatures reported by :func:`help` have been modified and improved in "
"several cases as a result of the introduction of Argument Clinic and other "
"changes to the :mod:`inspect` and :mod:`pydoc` modules."
msgstr ""
#: ../../whatsnew/3.4.rst:451
msgid ""
":meth:`~object.__length_hint__` is now part of the formal language "
"specification (see :pep:`424`). (Contributed by Armin Ronacher in :issue:"
"`16148`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:457
msgid "New Modules"
msgstr "新模組"
#: ../../whatsnew/3.4.rst:463
msgid "asyncio"
msgstr "asyncio"
#: ../../whatsnew/3.4.rst:465
msgid ""
"The new :mod:`asyncio` module (defined in :pep:`3156`) provides a standard "
"pluggable event loop model for Python, providing solid asynchronous IO "
"support in the standard library, and making it easier for other event loop "
"implementations to interoperate with the standard library and each other."
msgstr ""
#: ../../whatsnew/3.4.rst:470 ../../whatsnew/3.4.rst:533
msgid "For Python 3.4, this module is considered a :term:`provisional API`."
msgstr ""
#: ../../whatsnew/3.4.rst:474
msgid ":pep:`3156` -- Asynchronous IO Support Rebooted: the \"asyncio\" Module"
msgstr ""
#: ../../whatsnew/3.4.rst:475
msgid "PEP written and implementation led by Guido van Rossum."
msgstr "由 Guido van Rossum 撰寫 PEP 與帶領實作。"
#: ../../whatsnew/3.4.rst:481
msgid "ensurepip"
msgstr "ensurepip"
#: ../../whatsnew/3.4.rst:483
msgid ""
"The new :mod:`ensurepip` module is the primary infrastructure for the :pep:"
"`453` implementation. In the normal course of events end users will not "
"need to interact with this module, but it can be used to manually bootstrap "
"``pip`` if the automated bootstrapping into an installation or virtual "
"environment was declined."
msgstr ""
#: ../../whatsnew/3.4.rst:489
msgid ""
":mod:`ensurepip` includes a bundled copy of ``pip``, up-to-date as of the "
"first release candidate of the release of CPython with which it ships (this "
"applies to both maintenance releases and feature releases). ``ensurepip`` "
"does not access the internet. If the installation has internet access, "
"after ``ensurepip`` is run the bundled ``pip`` can be used to upgrade "
"``pip`` to a more recent release than the bundled one. (Note that such an "
"upgraded version of ``pip`` is considered to be a separately installed "
"package and will not be removed if Python is uninstalled.)"
msgstr ""
#: ../../whatsnew/3.4.rst:498
msgid ""
"The module is named *ensure*\\ pip because if called when ``pip`` is already "
"installed, it does nothing. It also has an ``--upgrade`` option that will "
"cause it to install the bundled copy of ``pip`` if the existing installed "
"version of ``pip`` is older than the bundled copy."
msgstr ""
#: ../../whatsnew/3.4.rst:507
msgid "enum"
msgstr "enum"
#: ../../whatsnew/3.4.rst:509
msgid ""
"The new :mod:`enum` module (defined in :pep:`435`) provides a standard "
"implementation of enumeration types, allowing other modules (such as :mod:"
"`socket`) to provide more informative error messages and better debugging "
"support by replacing opaque integer constants with backwards compatible "
"enumeration values."
msgstr ""
#: ../../whatsnew/3.4.rst:517
msgid ":pep:`435` -- Adding an Enum type to the Python standard library"
msgstr ""
#: ../../whatsnew/3.4.rst:518
msgid ""
"PEP written by Barry Warsaw, Eli Bendersky and Ethan Furman, implemented by "
"Ethan Furman."
msgstr ""
#: ../../whatsnew/3.4.rst:525
msgid "pathlib"
msgstr "pathlib"
#: ../../whatsnew/3.4.rst:527
msgid ""
"The new :mod:`pathlib` module offers classes representing filesystem paths "
"with semantics appropriate for different operating systems. Path classes "
"are divided between *pure paths*, which provide purely computational "
"operations without I/O, and *concrete paths*, which inherit from pure paths "
"but also provide I/O operations."
msgstr ""
#: ../../whatsnew/3.4.rst:537
msgid ":pep:`428` -- The pathlib module -- object-oriented filesystem paths"
msgstr ""
#: ../../whatsnew/3.4.rst:538 ../../whatsnew/3.4.rst:1834
msgid "PEP written and implemented by Antoine Pitrou."
msgstr "由 Antoine Pitrou 撰寫 PEP 與實作。"
#: ../../whatsnew/3.4.rst:544
msgid "selectors"
msgstr "selectors"
#: ../../whatsnew/3.4.rst:546
msgid ""
"The new :mod:`selectors` module (created as part of implementing :pep:"
"`3156`) allows high-level and efficient I/O multiplexing, built upon the :"
"mod:`select` module primitives."
msgstr ""
#: ../../whatsnew/3.4.rst:554
msgid "statistics"
msgstr "statistics"
#: ../../whatsnew/3.4.rst:556
msgid ""
"The new :mod:`statistics` module (defined in :pep:`450`) offers some core "
"statistics functionality directly in the standard library. This module "
"supports calculation of the mean, median, mode, variance and standard "
"deviation of a data series."
msgstr ""
#: ../../whatsnew/3.4.rst:563
msgid ":pep:`450` -- Adding A Statistics Module To The Standard Library"
msgstr ""
#: ../../whatsnew/3.4.rst:564
msgid "PEP written and implemented by Steven D'Aprano"
msgstr "由 Steven D'Aprano 撰寫 PEP 與實作"
#: ../../whatsnew/3.4.rst:570
msgid "tracemalloc"
msgstr "tracemalloc"
#: ../../whatsnew/3.4.rst:572
msgid ""
"The new :mod:`tracemalloc` module (defined in :pep:`454`) is a debug tool to "
"trace memory blocks allocated by Python. It provides the following "
"information:"
msgstr ""
#: ../../whatsnew/3.4.rst:575
msgid "Trace where an object was allocated"
msgstr ""
#: ../../whatsnew/3.4.rst:576
msgid ""
"Statistics on allocated memory blocks per filename and per line number: "
"total size, number and average size of allocated memory blocks"
msgstr ""
#: ../../whatsnew/3.4.rst:578
msgid "Compute the differences between two snapshots to detect memory leaks"
msgstr ""
#: ../../whatsnew/3.4.rst:582
msgid ""
":pep:`454` -- Add a new tracemalloc module to trace Python memory allocations"
msgstr ""
#: ../../whatsnew/3.4.rst:583
msgid "PEP written and implemented by Victor Stinner"
msgstr "由 Victor Stinner 撰寫 PEP 與實作"
#: ../../whatsnew/3.4.rst:588
msgid "Improved Modules"
msgstr "改進的模組"
#: ../../whatsnew/3.4.rst:592
msgid "abc"
msgstr "abc"
#: ../../whatsnew/3.4.rst:594
msgid ""
"New function :func:`abc.get_cache_token` can be used to know when to "
"invalidate caches that are affected by changes in the object graph. "
"(Contributed by Łukasz Langa in :issue:`16832`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:598
msgid ""
"New class :class:`~abc.ABC` has :class:`~abc.ABCMeta` as its meta class. "
"Using ``ABC`` as a base class has essentially the same effect as specifying "
"``metaclass=abc.ABCMeta``, but is simpler to type and easier to read. "
"(Contributed by Bruno Dupuis in :issue:`16049`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:605
msgid "aifc"
msgstr "aifc"
#: ../../whatsnew/3.4.rst:607
msgid ""
"The :meth:`!getparams` method now returns a namedtuple rather than a plain "
"tuple. (Contributed by Claudiu Popa in :issue:`17818`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:610
msgid ""
":func:`!aifc.open` now supports the context management protocol: when used "
"in a :keyword:`with` block, the :meth:`!close` method of the returned object "
"will be called automatically at the end of the block. (Contributed by "
"Serhiy Storchacha in :issue:`16486`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:615 ../../whatsnew/3.4.rst:1542
msgid ""
"The :meth:`!writeframesraw` and :meth:`!writeframes` methods now accept any :"
"term:`bytes-like object`. (Contributed by Serhiy Storchaka in :issue:"
"`8311`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:621
msgid "argparse"
msgstr "argparse"
#: ../../whatsnew/3.4.rst:623
msgid ""
"The :class:`~argparse.FileType` class now accepts *encoding* and *errors* "
"arguments, which are passed through to :func:`open`. (Contributed by Lucas "
"Maystre in :issue:`11175`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:629
msgid "audioop"
msgstr "audioop"
#: ../../whatsnew/3.4.rst:631
msgid ""
":mod:`!audioop` now supports 24-bit samples. (Contributed by Serhiy "
"Storchaka in :issue:`12866`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:634
msgid ""
"New :func:`!byteswap` function converts big-endian samples to little-endian "
"and vice versa. (Contributed by Serhiy Storchaka in :issue:`19641`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:638
msgid ""
"All :mod:`!audioop` functions now accept any :term:`bytes-like object`. "
"Strings are not accepted: they didn't work before, now they raise an error "
"right away. (Contributed by Serhiy Storchaka in :issue:`16685`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:644
msgid "base64"
msgstr "base64"
#: ../../whatsnew/3.4.rst:646
msgid ""
"The encoding and decoding functions in :mod:`base64` now accept any :term:"
"`bytes-like object` in cases where it previously required a :class:`bytes` "
"or :class:`bytearray` instance. (Contributed by Nick Coghlan in :issue:"
"`17839`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:651
msgid ""
"New functions :func:`~base64.a85encode`, :func:`~base64.a85decode`, :func:"
"`~base64.b85encode`, and :func:`~base64.b85decode` provide the ability to "
"encode and decode binary data from and to ``Ascii85`` and the git/mercurial "
"``Base85`` formats, respectively. The ``a85`` functions have options that "
"can be used to make them compatible with the variants of the ``Ascii85`` "
"encoding, including the Adobe variant. (Contributed by Martin Morrison, the "
"Mercurial project, Serhiy Storchaka, and Antoine Pitrou in :issue:`17618`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:661
msgid "collections"
msgstr "collections"
#: ../../whatsnew/3.4.rst:663
msgid ""
"The :meth:`.ChainMap.new_child` method now accepts an *m* argument "
"specifying the child map to add to the chain. This allows an existing "
"mapping and/or a custom mapping type to be used for the child. (Contributed "
"by Vinay Sajip in :issue:`16613`.)"
msgstr ""
#: ../../whatsnew/3.4.rst:670
msgid "colorsys"
msgstr "colorsys"
#: ../../whatsnew/3.4.rst:672
msgid ""
"The number of digits in the coefficients for the RGB --- YIQ conversions "
"have been expanded so that they match the FCC NTSC versions. The change in "