Skip to content

Commit 98a4bdb

Browse files
authoredMay 24, 2024
Sync with CPython 3.12 (#895)
1 parent 29fd773 commit 98a4bdb

File tree

17 files changed

+2581
-2571
lines changed

17 files changed

+2581
-2571
lines changed
 

‎.scripts/poetry.lock

Lines changed: 139 additions & 156 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎library/dataclasses.po

Lines changed: 138 additions & 134 deletions
Large diffs are not rendered by default.

‎library/functions.po

Lines changed: 296 additions & 289 deletions
Large diffs are not rendered by default.

‎library/functools.po

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
10+
"POT-Creation-Date: 2024-05-14 00:03+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:02+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -551,20 +551,20 @@ msgid ""
551551
"corresponding attributes from the original function. The default values for "
552552
"these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` "
553553
"(which assigns to the wrapper function's ``__module__``, ``__name__``, "
554-
"``__qualname__``, ``__annotations__`` and ``__doc__``, the documentation "
555-
"string) and ``WRAPPER_UPDATES`` (which updates the wrapper function's "
556-
"``__dict__``, i.e. the instance dictionary)."
554+
"``__qualname__``, ``__annotations__``, ``__type_params__``, and ``__doc__``, "
555+
"the documentation string) and ``WRAPPER_UPDATES`` (which updates the wrapper "
556+
"function's ``__dict__``, i.e. the instance dictionary)."
557557
msgstr ""
558558

559-
#: ../../library/functools.rst:651
559+
#: ../../library/functools.rst:652
560560
msgid ""
561561
"To allow access to the original function for introspection and other "
562562
"purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), "
563563
"this function automatically adds a ``__wrapped__`` attribute to the wrapper "
564564
"that refers to the function being wrapped."
565565
msgstr ""
566566

567-
#: ../../library/functools.rst:656
567+
#: ../../library/functools.rst:657
568568
msgid ""
569569
"The main intended use for this function is in :term:`decorator` functions "
570570
"which wrap the decorated function and return the wrapper. If the wrapper "
@@ -573,7 +573,7 @@ msgid ""
573573
"is typically less than helpful."
574574
msgstr ""
575575

576-
#: ../../library/functools.rst:662
576+
#: ../../library/functools.rst:663
577577
msgid ""
578578
":func:`update_wrapper` may be used with callables other than functions. Any "
579579
"attributes named in *assigned* or *updated* that are missing from the object "
@@ -582,64 +582,68 @@ msgid ""
582582
"wrapper function itself is missing any attributes named in *updated*."
583583
msgstr ""
584584

585-
#: ../../library/functools.rst:668
585+
#: ../../library/functools.rst:669
586586
msgid ""
587587
"The ``__wrapped__`` attribute is now automatically added. The "
588588
"``__annotations__`` attribute is now copied by default. Missing attributes "
589589
"no longer trigger an :exc:`AttributeError`."
590590
msgstr ""
591591

592-
#: ../../library/functools.rst:673
592+
#: ../../library/functools.rst:674
593593
msgid ""
594594
"The ``__wrapped__`` attribute now always refers to the wrapped function, "
595595
"even if that function defined a ``__wrapped__`` attribute. (see :issue:"
596596
"`17482`)"
597597
msgstr ""
598598

599-
#: ../../library/functools.rst:681
599+
#: ../../library/functools.rst:679
600+
msgid "The ``__type_params__`` attribute is now copied by default."
601+
msgstr ""
602+
603+
#: ../../library/functools.rst:685
600604
msgid ""
601605
"This is a convenience function for invoking :func:`update_wrapper` as a "
602606
"function decorator when defining a wrapper function. It is equivalent to "
603607
"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, "
604608
"updated=updated)``. For example::"
605609
msgstr ""
606610

607-
#: ../../library/functools.rst:707
611+
#: ../../library/functools.rst:711
608612
msgid ""
609613
"Without the use of this decorator factory, the name of the example function "
610614
"would have been ``'wrapper'``, and the docstring of the original :func:"
611615
"`example` would have been lost."
612616
msgstr ""
613617

614-
#: ../../library/functools.rst:715
618+
#: ../../library/functools.rst:719
615619
msgid ":class:`partial` Objects"
616620
msgstr ":class:`partial` 物件"
617621

618-
#: ../../library/functools.rst:717
622+
#: ../../library/functools.rst:721
619623
msgid ""
620624
":class:`partial` objects are callable objects created by :func:`partial`. "
621625
"They have three read-only attributes:"
622626
msgstr ""
623627

624-
#: ../../library/functools.rst:723
628+
#: ../../library/functools.rst:727
625629
msgid ""
626630
"A callable object or function. Calls to the :class:`partial` object will be "
627631
"forwarded to :attr:`func` with new arguments and keywords."
628632
msgstr ""
629633

630-
#: ../../library/functools.rst:729
634+
#: ../../library/functools.rst:733
631635
msgid ""
632636
"The leftmost positional arguments that will be prepended to the positional "
633637
"arguments provided to a :class:`partial` object call."
634638
msgstr ""
635639

636-
#: ../../library/functools.rst:735
640+
#: ../../library/functools.rst:739
637641
msgid ""
638642
"The keyword arguments that will be supplied when the :class:`partial` object "
639643
"is called."
640644
msgstr ""
641645

642-
#: ../../library/functools.rst:738
646+
#: ../../library/functools.rst:742
643647
msgid ""
644648
":class:`partial` objects are like :class:`function` objects in that they are "
645649
"callable, weak referenceable, and can have attributes. There are some "

‎library/hashlib.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
10+
"POT-Creation-Date: 2024-05-23 00:03+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:03+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -351,8 +351,9 @@ msgstr ""
351351

352352
#: ../../library/hashlib.rst:331
353353
msgid ""
354-
"*dklen* is the length of the derived key. If *dklen* is ``None`` then the "
355-
"digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512."
354+
"*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` "
355+
"then the digest size of the hash algorithm *hash_name* is used, e.g. 64 for "
356+
"SHA-512."
356357
msgstr ""
357358

358359
#: ../../library/hashlib.rst:340
@@ -383,7 +384,7 @@ msgstr ""
383384
msgid ""
384385
"*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization "
385386
"factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). "
386-
"*dklen* is the length of the derived key."
387+
"*dklen* is the length of the derived key in bytes."
387388
msgstr ""
388389

389390
#: ../../library/hashlib.rst:366

‎library/itertools.po

Lines changed: 63 additions & 69 deletions
Large diffs are not rendered by default.

‎library/marshal.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.12\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
13+
"POT-Creation-Date: 2024-05-20 00:04+0000\n"
1414
"PO-Revision-Date: 2023-04-24 21:28+0800\n"
1515
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -31,13 +31,13 @@ msgid ""
3131
"This module contains functions that can read and write Python values in a "
3232
"binary format. The format is specific to Python, but independent of machine "
3333
"architecture issues (e.g., you can write a Python value to a file on a PC, "
34-
"transport the file to a Sun, and read it back there). Details of the format "
34+
"transport the file to a Mac, and read it back there). Details of the format "
3535
"are undocumented on purpose; it may change between Python versions (although "
3636
"it rarely does). [#]_"
3737
msgstr ""
3838
"此 module(模組)包含一個能以二進位制格式來讀寫 Python 值的函式。這種格式是 "
3939
"Python 專屬但獨立於機器架構的(例如,你可以在一臺 PC 上寫入某個 Python 值,再"
40-
"將檔案傳到一臺 Sun 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明"
40+
"將檔案傳到一臺 Mac 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明"
4141
"的;它可能在不同 Python 版本中被改變(雖然這種情況極少發生)。\\ [#]_"
4242

4343
#: ../../library/marshal.rst:21

‎library/os.po

Lines changed: 625 additions & 614 deletions
Large diffs are not rendered by default.

‎library/pathlib.po

Lines changed: 186 additions & 180 deletions
Large diffs are not rendered by default.

‎library/secrets.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
11+
"POT-Creation-Date: 2024-05-11 00:03+0000\n"
1212
"PO-Revision-Date: 2022-11-30 13:42+0800\n"
1313
"Last-Translator: \n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -75,8 +75,8 @@ msgid "Return a randomly chosen element from a non-empty sequence."
7575
msgstr "從一非空序列中,回傳一個隨機選取的元素。"
7676

7777
#: ../../library/secrets.rst:51
78-
msgid "Return a random int in the range [0, *n*)."
79-
msgstr "回傳一個 [0, *n*) 範圍之內的隨機整數。"
78+
msgid "Return a random int in the range [0, *exclusive_upper_bound*)."
79+
msgstr "回傳一個 [0, *exclusive_upper_bound*) 範圍之內的隨機整數。"
8080

8181
#: ../../library/secrets.rst:55
8282
msgid "Return an int with *k* random bits."

‎library/shutil.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.12\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
9+
"POT-Creation-Date: 2024-05-14 00:03+0000\n"
1010
"PO-Revision-Date: 2018-05-23 16:10+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -442,8 +442,8 @@ msgid ""
442442
msgstr ""
443443

444444
#: ../../library/shutil.rst:340
445-
msgid "The *dir_fd* parameter."
446-
msgstr "*dir_fd* 參數。"
445+
msgid "Added the *dir_fd* parameter."
446+
msgstr "新增 *dir_fd* 參數。"
447447

448448
#: ../../library/shutil.rst:343
449449
msgid "Added the *onexc* parameter, deprecated *onerror*."

‎library/socket.po

Lines changed: 91 additions & 91 deletions
Large diffs are not rendered by default.

‎library/threading.po

Lines changed: 173 additions & 130 deletions
Large diffs are not rendered by default.

‎library/unittest.mock.po

Lines changed: 84 additions & 88 deletions
Large diffs are not rendered by default.

‎tutorial/inputoutput.po

Lines changed: 160 additions & 204 deletions
Large diffs are not rendered by default.

‎tutorial/venv.po

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-08-18 00:03+0000\n"
10+
"POT-Creation-Date: 2024-05-19 00:03+0000\n"
1111
"PO-Revision-Date: 2022-10-16 05:35+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -82,14 +82,13 @@ msgstr "建立虛擬環境"
8282
#: ../../tutorial/venv.rst:38
8383
msgid ""
8484
"The module used to create and manage virtual environments is called :mod:"
85-
"`venv`. :mod:`venv` will usually install the most recent version of Python "
86-
"that you have available. If you have multiple versions of Python on your "
87-
"system, you can select a specific Python version by running ``python3`` or "
88-
"whichever version you want."
85+
"`venv`. :mod:`venv` will install the Python version from which the command "
86+
"was run (as reported by the :option:`--version` option). For instance, "
87+
"excuting the command with ``python3.12`` will install version 3.12."
8988
msgstr ""
90-
"用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 通常會安裝你能夠取"
91-
"得的最新版本的 Python。要是你的系統有不同版本的 Python,你可以透過 "
92-
"``python3`` 這個指令選擇特定或是任意版本的 Python。"
89+
"用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 將安裝執行命令的 "
90+
"Python 版本(如 :option:`--version` 選項所報告的)。例如使用 ``python3.12`` "
91+
"執行命令將安裝 3.12 版本。"
9392

9493
#: ../../tutorial/venv.rst:44
9594
msgid ""
@@ -98,9 +97,7 @@ msgid ""
9897
"path::"
9998
msgstr ""
10099
"在建立虛擬環境的時候,在你決定要放該虛擬環境的資料夾之後,以腳本 (script) 執"
101-
"行 :mod:`venv` 模組並且給定資料夾路徑:\n"
102-
"\n"
103-
"::"
100+
"行 :mod:`venv` 模組並且給定資料夾路徑: ::"
104101

105102
#: ../../tutorial/venv.rst:49
106103
msgid ""
@@ -129,17 +126,11 @@ msgstr "一旦你建立了一個虛擬環境,你可以啟動它。"
129126

130127
#: ../../tutorial/venv.rst:61
131128
msgid "On Windows, run::"
132-
msgstr ""
133-
"在 Windows 系統中,使用:\n"
134-
"\n"
135-
"::"
129+
msgstr "在 Windows 系統中,使用: ::"
136130

137131
#: ../../tutorial/venv.rst:65
138132
msgid "On Unix or MacOS, run::"
139-
msgstr ""
140-
"在 Unix 或 MacOS 系統,使用:\n"
141-
"\n"
142-
"::"
133+
msgstr "在 Unix 或 MacOS 系統,使用: ::"
143134

144135
#: ../../tutorial/venv.rst:69
145136
msgid ""
@@ -162,10 +153,7 @@ msgstr ""
162153

163154
#: ../../tutorial/venv.rst:91
164155
msgid "To deactivate a virtual environment, type::"
165-
msgstr ""
166-
"要停用虛擬環境,輸入:\n"
167-
"\n"
168-
"::"
156+
msgstr "要停用虛擬環境,輸入: ::"
169157

170158
#: ../../tutorial/venv.rst:95
171159
msgid "into the terminal."
@@ -192,7 +180,7 @@ msgid ""
192180
"etc. (Consult the :ref:`installing-index` guide for complete documentation "
193181
"for ``pip``.)"
194182
msgstr ""
195-
"``pip`` 有好幾個子指令\"install\"\"uninstall\"\"freeze\" 等等。(可以參"
183+
"``pip`` 有好幾個子命令\"install\"\"uninstall\"\"freeze\" 等等。(可以參"
196184
"考\\ :ref:`installing-index`\\ 指南,來取得 ``pip`` 的完整說明文件。)"
197185

198186
#: ../../tutorial/venv.rst:109
@@ -214,7 +202,7 @@ msgid ""
214202
"number to get that version, or you can run ``python -m pip install --"
215203
"upgrade`` to upgrade the package to the latest version:"
216204
msgstr ""
217-
"要是你重新執行此指令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以"
205+
"要是你重新執行此命令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以"
218206
"提供不同的版本號碼來取得該版本,或是可以執行 ``python -m pip install --"
219207
"upgrade`` 來把套件升級到最新的版本:"
220208

‎whatsnew/3.12.po

Lines changed: 578 additions & 561 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.