diff --git a/bugs.po b/bugs.po index 4269ebaa0d..91f6670bc0 100644 --- a/bugs.po +++ b/bugs.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-05 09:50+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-08-31 12:34+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -82,7 +82,7 @@ msgstr "" "(程式碼執行的錯誤可以寄到 python-list@python.org)。「docs@」是一個由志工們" "所運行的郵寄清單;您的請求會被注意到,但可能需要一些時間才會被處理。" -#: ../../bugs.rst:33 +#: ../../bugs.rst:32 msgid "`Documentation bugs`_" msgstr "`說明文件錯誤`_" @@ -92,7 +92,7 @@ msgid "" "tracker." msgstr "一系列已被提交至 Python 問題追蹤系統的有關說明文件的錯誤。" -#: ../../bugs.rst:36 +#: ../../bugs.rst:35 msgid "`Issue Tracking `_" msgstr "`問題追蹤系統 `_" @@ -101,7 +101,7 @@ msgid "" "Overview of the process involved in reporting an improvement on the tracker." msgstr "在追蹤系統上回報改進建議的過程簡介。" -#: ../../bugs.rst:39 +#: ../../bugs.rst:38 msgid "" "`Helping with Documentation `_" @@ -209,7 +209,7 @@ msgstr "" "每一份問題報告都會被一位開發人員查核,並由他決定要做出什麼變更來修正這個問" "題。每當該問題有修正動作時,您會收到更新回報。" -#: ../../bugs.rst:89 +#: ../../bugs.rst:87 msgid "" "`How to Report Bugs Effectively `_" @@ -225,7 +225,7 @@ msgstr "" "這篇文章詳細說明如何建立一份有用的錯誤報告。它描述了什麼樣的資訊是有用的,以" "及這些資訊為什麼有用。" -#: ../../bugs.rst:92 +#: ../../bugs.rst:91 msgid "" "`Bug Writing Guidelines `_" diff --git a/c-api/arg.po b/c-api/arg.po index f70d871cf2..e4ce6b4a56 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-09 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-10-16 03:21+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -123,7 +123,7 @@ msgid "" "otherwise." msgstr "" -#: ../../c-api/arg.rst:98 +#: ../../c-api/arg.rst:80 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "``s`` (:class:`str`) [const char \\*]" @@ -151,7 +151,7 @@ msgid "" "encountered in the Python string." msgstr "" -#: ../../c-api/arg.rst:104 +#: ../../c-api/arg.rst:100 msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" msgstr "``s*``\\ (:class:`str` 或 :term:`bytes-like object`)[Py_buffer]" @@ -163,7 +163,7 @@ msgid "" "converted to C strings using ``'utf-8'`` encoding." msgstr "" -#: ../../c-api/arg.rst:111 +#: ../../c-api/arg.rst:106 msgid "" "``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" "c:type:`Py_ssize_t`]" @@ -178,7 +178,7 @@ msgid "" "encoding." msgstr "" -#: ../../c-api/arg.rst:115 ../../c-api/arg.rst:547 +#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:546 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z``\\ (:class:`str` 或 ``None``)[const char \\*]" @@ -188,7 +188,7 @@ msgid "" "pointer is set to ``NULL``." msgstr "" -#: ../../c-api/arg.rst:119 +#: ../../c-api/arg.rst:117 msgid "" "``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" msgstr "" @@ -201,7 +201,7 @@ msgid "" "``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." msgstr "" -#: ../../c-api/arg.rst:123 +#: ../../c-api/arg.rst:121 msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " "[const char \\*, :c:type:`Py_ssize_t`]" @@ -213,7 +213,7 @@ msgid "" "pointer is set to ``NULL``." msgstr "" -#: ../../c-api/arg.rst:134 +#: ../../c-api/arg.rst:125 msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" msgstr "``y``\\ (唯讀 :term:`bytes-like object`)[const char \\*]" @@ -231,7 +231,7 @@ msgid "" "encountered in the bytes buffer." msgstr "" -#: ../../c-api/arg.rst:139 +#: ../../c-api/arg.rst:136 msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" msgstr "``y*`` (:term:`bytes-like object`) [Py_buffer]" @@ -241,7 +241,7 @@ msgid "" "objects. **This is the recommended way to accept binary data.**" msgstr "" -#: ../../c-api/arg.rst:143 +#: ../../c-api/arg.rst:141 msgid "" "``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" "`Py_ssize_t`]" @@ -253,7 +253,7 @@ msgid "" "objects." msgstr "" -#: ../../c-api/arg.rst:148 +#: ../../c-api/arg.rst:145 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "``S`` (:class:`bytes`) [PyBytesObject \\*]" @@ -264,7 +264,7 @@ msgid "" "bytes object. The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" -#: ../../c-api/arg.rst:153 +#: ../../c-api/arg.rst:150 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" @@ -276,7 +276,7 @@ msgid "" "`PyObject*`." msgstr "" -#: ../../c-api/arg.rst:158 +#: ../../c-api/arg.rst:155 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "``U`` (:class:`str`) [PyObject \\*]" @@ -287,7 +287,7 @@ msgid "" "The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" -#: ../../c-api/arg.rst:164 +#: ../../c-api/arg.rst:160 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "``w*`` (可讀寫 :term:`bytes-like object`) [Py_buffer]" @@ -299,7 +299,7 @@ msgid "" "`PyBuffer_Release` when it is done with the buffer." msgstr "" -#: ../../c-api/arg.rst:181 +#: ../../c-api/arg.rst:166 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" @@ -328,7 +328,7 @@ msgid "" "`PyMem_Free` to free the allocated buffer after use." msgstr "" -#: ../../c-api/arg.rst:186 +#: ../../c-api/arg.rst:183 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" @@ -341,7 +341,7 @@ msgid "" "object uses the encoding passed in as parameter." msgstr "" -#: ../../c-api/arg.rst:217 +#: ../../c-api/arg.rst:188 msgid "" "``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" "`Py_ssize_t` \\*buffer_length]" @@ -395,7 +395,7 @@ msgid "" "without the trailing NUL byte." msgstr "" -#: ../../c-api/arg.rst:222 +#: ../../c-api/arg.rst:219 msgid "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" @@ -418,7 +418,7 @@ msgstr "" msgid "Numbers" msgstr "數字" -#: ../../c-api/arg.rst:234 +#: ../../c-api/arg.rst:232 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [unsigned char]" @@ -428,7 +428,7 @@ msgid "" "c:expr:`unsigned char`." msgstr "" -#: ../../c-api/arg.rst:238 ../../c-api/arg.rst:581 +#: ../../c-api/arg.rst:236 ../../c-api/arg.rst:580 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [unsigned char]" @@ -438,7 +438,7 @@ msgid "" "a C :c:expr:`unsigned char`." msgstr "" -#: ../../c-api/arg.rst:241 ../../c-api/arg.rst:575 +#: ../../c-api/arg.rst:240 ../../c-api/arg.rst:574 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [short int]" @@ -446,7 +446,7 @@ msgstr "``h`` (:class:`int`) [short int]" msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`short int`。" -#: ../../c-api/arg.rst:245 ../../c-api/arg.rst:584 +#: ../../c-api/arg.rst:243 ../../c-api/arg.rst:583 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [unsigned short int]" @@ -458,7 +458,7 @@ msgstr "" "將一個 Python 整數轉換成 C 的 :c:expr:`unsigned short int`,轉換過程無溢位檢" "查。" -#: ../../c-api/arg.rst:248 ../../c-api/arg.rst:569 +#: ../../c-api/arg.rst:247 ../../c-api/arg.rst:568 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [int]" @@ -466,7 +466,7 @@ msgstr "``i`` (:class:`int`) [int]" msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`int`。" -#: ../../c-api/arg.rst:252 ../../c-api/arg.rst:587 +#: ../../c-api/arg.rst:250 ../../c-api/arg.rst:586 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [unsigned int]" @@ -477,7 +477,7 @@ msgid "" msgstr "" "將一個 Python 整數轉換成 C 的 :c:expr:`unsigned int`,轉換過程無溢位檢查。" -#: ../../c-api/arg.rst:255 ../../c-api/arg.rst:578 +#: ../../c-api/arg.rst:254 ../../c-api/arg.rst:577 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [long int]" @@ -485,7 +485,7 @@ msgstr "``l`` (:class:`int`) [long int]" msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`long int`。" -#: ../../c-api/arg.rst:259 ../../c-api/arg.rst:590 +#: ../../c-api/arg.rst:257 ../../c-api/arg.rst:589 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [unsigned long]" @@ -496,7 +496,7 @@ msgid "" msgstr "" "將一個 Python 整數轉換成 C 的 :c:expr:`unsigned long`,轉換過程無溢位檢查。" -#: ../../c-api/arg.rst:262 ../../c-api/arg.rst:593 +#: ../../c-api/arg.rst:261 ../../c-api/arg.rst:592 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [long long]" @@ -504,7 +504,7 @@ msgstr "``L`` (:class:`int`) [long long]" msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`long long`。" -#: ../../c-api/arg.rst:266 ../../c-api/arg.rst:596 +#: ../../c-api/arg.rst:264 ../../c-api/arg.rst:595 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [unsigned long long]" @@ -516,7 +516,7 @@ msgstr "" "將一個 Python 整數轉換成 C 的 :c:expr:`unsigned long long`,轉換過程無溢位檢" "查。" -#: ../../c-api/arg.rst:269 ../../c-api/arg.rst:599 +#: ../../c-api/arg.rst:268 ../../c-api/arg.rst:598 msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" @@ -524,7 +524,7 @@ msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." msgstr "將一個 Python 整數轉換成 C 的 :c:type:`Py_ssize_t`。" -#: ../../c-api/arg.rst:276 +#: ../../c-api/arg.rst:271 msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" msgstr "``c``\\ (:class:`bytes` 或長度為 1 的 :class:`bytearray`)[char]" @@ -538,7 +538,7 @@ msgstr "" msgid "Allow :class:`bytearray` objects." msgstr "允許 :class:`bytearray` 物件。" -#: ../../c-api/arg.rst:280 ../../c-api/arg.rst:607 +#: ../../c-api/arg.rst:278 ../../c-api/arg.rst:605 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C``\\ (長度為 1 的 :class:`str`)[int]" @@ -548,7 +548,7 @@ msgid "" "1, to a C :c:expr:`int`." msgstr "" -#: ../../c-api/arg.rst:283 ../../c-api/arg.rst:613 +#: ../../c-api/arg.rst:282 ../../c-api/arg.rst:612 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [float]" @@ -556,7 +556,7 @@ msgstr "``f`` (:class:`float`) [float]" msgid "Convert a Python floating point number to a C :c:expr:`float`." msgstr "將一個 Python 浮點數轉換成 C 的 :c:type::c:expr:`float`。" -#: ../../c-api/arg.rst:286 ../../c-api/arg.rst:610 +#: ../../c-api/arg.rst:285 ../../c-api/arg.rst:609 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [double]" @@ -564,7 +564,7 @@ msgstr "``d`` (:class:`float`) [double]" msgid "Convert a Python floating point number to a C :c:expr:`double`." msgstr "將一個 Python 浮點數轉換成 C 的 :c:type::c:expr:`double`。" -#: ../../c-api/arg.rst:289 +#: ../../c-api/arg.rst:288 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [Py_complex]" @@ -576,7 +576,7 @@ msgstr "將一個 Python 複數轉換成 C 的 :c:type:`Py_complex` 結構。" msgid "Other objects" msgstr "其他物件" -#: ../../c-api/arg.rst:299 ../../c-api/arg.rst:626 +#: ../../c-api/arg.rst:294 ../../c-api/arg.rst:618 msgid "``O`` (object) [PyObject \\*]" msgstr "``O``\\ (物件)[PyObject \\*]" @@ -588,7 +588,7 @@ msgid "" "not increased). The pointer stored is not ``NULL``." msgstr "" -#: ../../c-api/arg.rst:306 +#: ../../c-api/arg.rst:301 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!``\\ (物件)[*typeobject*, PyObject \\*]" @@ -601,7 +601,7 @@ msgid "" "required type, :exc:`TypeError` is raised." msgstr "" -#: ../../c-api/arg.rst:331 ../../c-api/arg.rst:640 +#: ../../c-api/arg.rst:310 ../../c-api/arg.rst:636 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&``\\ (物件)[*converter*, *anything*]" @@ -636,7 +636,7 @@ msgstr "" msgid "``Py_CLEANUP_SUPPORTED`` was added." msgstr "加入 ``Py_CLEANUP_SUPPORTED``。" -#: ../../c-api/arg.rst:340 +#: ../../c-api/arg.rst:333 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [int]" @@ -649,7 +649,7 @@ msgid "" "how Python tests values for truth." msgstr "" -#: ../../c-api/arg.rst:345 ../../c-api/arg.rst:643 +#: ../../c-api/arg.rst:342 ../../c-api/arg.rst:642 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" @@ -675,7 +675,7 @@ msgid "" "occur inside nested parentheses. They are:" msgstr "" -#: ../../c-api/arg.rst:361 +#: ../../c-api/arg.rst:356 msgid "``|``" msgstr "``|``" @@ -688,7 +688,7 @@ msgid "" "corresponding C variable(s)." msgstr "" -#: ../../c-api/arg.rst:370 +#: ../../c-api/arg.rst:363 msgid "``$``" msgstr "``$``" @@ -700,7 +700,7 @@ msgid "" "be specified before ``$`` in the format string." msgstr "" -#: ../../c-api/arg.rst:375 +#: ../../c-api/arg.rst:372 msgid "``:``" msgstr "``:``" @@ -711,7 +711,7 @@ msgid "" "exception that :c:func:`PyArg_ParseTuple` raises)." msgstr "" -#: ../../c-api/arg.rst:380 +#: ../../c-api/arg.rst:377 msgid "``;``" msgstr "``;``" @@ -882,7 +882,7 @@ msgid "" "format strings a tad more readable." msgstr "" -#: ../../c-api/arg.rst:531 +#: ../../c-api/arg.rst:529 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s``\\ (:class:`str` 或 ``None``)[const char \\*]" @@ -892,7 +892,7 @@ msgid "" "``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." msgstr "" -#: ../../c-api/arg.rst:536 +#: ../../c-api/arg.rst:533 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" @@ -905,7 +905,7 @@ msgid "" "ignored and ``None`` is returned." msgstr "" -#: ../../c-api/arg.rst:540 +#: ../../c-api/arg.rst:538 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [const char \\*]" @@ -915,7 +915,7 @@ msgid "" "pointer is ``NULL``, ``None`` is returned." msgstr "" -#: ../../c-api/arg.rst:544 +#: ../../c-api/arg.rst:542 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" @@ -929,7 +929,7 @@ msgstr "" msgid "Same as ``s``." msgstr "和 ``s`` 相同。" -#: ../../c-api/arg.rst:550 +#: ../../c-api/arg.rst:549 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" @@ -939,7 +939,7 @@ msgstr "" msgid "Same as ``s#``." msgstr "和 ``s#`` 相同。" -#: ../../c-api/arg.rst:555 +#: ../../c-api/arg.rst:552 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [const wchar_t \\*]" @@ -950,7 +950,7 @@ msgid "" "``NULL``, ``None`` is returned." msgstr "" -#: ../../c-api/arg.rst:560 +#: ../../c-api/arg.rst:557 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" @@ -961,11 +961,11 @@ msgid "" "ignored and ``None`` is returned." msgstr "" -#: ../../c-api/arg.rst:563 +#: ../../c-api/arg.rst:562 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U``\\ (:class:`str` 或 ``None``)[const char \\*]" -#: ../../c-api/arg.rst:566 +#: ../../c-api/arg.rst:565 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" @@ -975,7 +975,7 @@ msgstr "" msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "將一個 C 的 :c:expr:`int` 轉換成 Python 整數物件。" -#: ../../c-api/arg.rst:572 +#: ../../c-api/arg.rst:571 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [char]" @@ -1019,7 +1019,7 @@ msgstr "將一個 C 的 :c:expr:`unsigned long long` 轉換成 Python 整數物 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "將一個 C 的 :c:type:`Py_ssize_t` 轉換成 Python 整數。" -#: ../../c-api/arg.rst:603 +#: ../../c-api/arg.rst:601 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c``\\ (長度為 1 的 :class:`bytes`)[char]" @@ -1047,7 +1047,7 @@ msgstr "將一個 C 的 :c:expr:`double` 轉換成 Python 浮點數。" msgid "Convert a C :c:expr:`float` to a Python floating point number." msgstr "將一個 C 的 :c:expr:`float` 轉換成 Python 浮點數。" -#: ../../c-api/arg.rst:616 +#: ../../c-api/arg.rst:615 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [Py_complex \\*]" @@ -1065,7 +1065,7 @@ msgid "" "no exception has been raised yet, :exc:`SystemError` is set." msgstr "" -#: ../../c-api/arg.rst:629 +#: ../../c-api/arg.rst:628 msgid "``S`` (object) [PyObject \\*]" msgstr "``S``\\ (物件)[PyObject \\*]" @@ -1073,7 +1073,7 @@ msgstr "``S``\\ (物件)[PyObject \\*]" msgid "Same as ``O``." msgstr "和 ``O`` 相同。" -#: ../../c-api/arg.rst:634 +#: ../../c-api/arg.rst:631 msgid "``N`` (object) [PyObject \\*]" msgstr "``N``\\ (物件)[PyObject \\*]" @@ -1098,7 +1098,7 @@ msgid "" "items." msgstr "" -#: ../../c-api/arg.rst:646 +#: ../../c-api/arg.rst:645 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" @@ -1108,7 +1108,7 @@ msgid "" "items." msgstr "" -#: ../../c-api/arg.rst:651 +#: ../../c-api/arg.rst:648 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" diff --git a/c-api/call.po b/c-api/call.po index 39b52ba338..356c6d6d30 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -146,7 +146,7 @@ msgstr "" msgid "*callable* is the object being called." msgstr "*callable* 是指被呼叫的物件。" -#: ../../c-api/call.rst:84 +#: ../../c-api/call.rst:83 msgid "" "*args* is a C array consisting of the positional arguments followed by the" msgstr "*args* 是一個 C 語言陣列 (array),包含位置引數與後面" @@ -157,7 +157,7 @@ msgid "" "arguments." msgstr "關鍵字引數的值。如果沒有引數,這個值可以是 *NULL*。" -#: ../../c-api/call.rst:88 +#: ../../c-api/call.rst:86 msgid "*nargsf* is the number of positional arguments plus possibly the" msgstr "*nargsf* 是位置引數的數量加上可能會有的" @@ -169,7 +169,7 @@ msgstr "" ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的" "位置引數數量,請使用 :c:func:`PyVectorcall_NARGS`。" -#: ../../c-api/call.rst:94 +#: ../../c-api/call.rst:90 msgid "*kwnames* is a tuple containing the names of the keyword arguments;" msgstr "*kwnames* 是一個包含所有關鍵字引數名稱的 tuple;" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index d0e0484023..3b4dbe2ec6 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -243,30 +243,31 @@ msgstr "" #: ../../c-api/exceptions.rst:211 msgid "" -"This is a convenience function to raise :exc:`WindowsError`. If called with " +"This is a convenience function to raise :exc:`OSError`. If called with " "*ierr* of ``0``, the error code returned by a call to :c:func:`!" "GetLastError` is used instead. It calls the Win32 function :c:func:`!" "FormatMessage` to retrieve the Windows description of error code given by " -"*ierr* or :c:func:`!GetLastError`, then it constructs a tuple object whose " -"first item is the *ierr* value and whose second item is the corresponding " -"error message (gotten from :c:func:`!FormatMessage`), and then calls " -"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always " -"returns ``NULL``." +"*ierr* or :c:func:`!GetLastError`, then it constructs a :exc:`OSError` " +"object with the :attr:`~OSError.winerror` attribute set to the error code, " +"the :attr:`~OSError.strerror` attribute set to the corresponding error " +"message (gotten from :c:func:`!FormatMessage`), and then calls " +"``PyErr_SetObject(PyExc_OSError, object)``. This function always returns " +"``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:220 ../../c-api/exceptions.rst:228 -#: ../../c-api/exceptions.rst:239 ../../c-api/exceptions.rst:249 -#: ../../c-api/exceptions.rst:257 ../../c-api/exceptions.rst:267 +#: ../../c-api/exceptions.rst:221 ../../c-api/exceptions.rst:229 +#: ../../c-api/exceptions.rst:240 ../../c-api/exceptions.rst:250 +#: ../../c-api/exceptions.rst:258 ../../c-api/exceptions.rst:268 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../c-api/exceptions.rst:225 +#: ../../c-api/exceptions.rst:226 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " "specifying the exception type to be raised." msgstr "" -#: ../../c-api/exceptions.rst:233 +#: ../../c-api/exceptions.rst:234 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " "that if *filename* is not ``NULL``, it is decoded from the filesystem " @@ -275,7 +276,7 @@ msgid "" "attribute of the exception instance." msgstr "" -#: ../../c-api/exceptions.rst:244 +#: ../../c-api/exceptions.rst:245 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional " "behavior that if *filename* is not ``NULL``, it is passed to the constructor " @@ -283,19 +284,19 @@ msgid "" "filename` attribute of the exception instance." msgstr "" -#: ../../c-api/exceptions.rst:254 +#: ../../c-api/exceptions.rst:255 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " "accepts a second filename object." msgstr "" -#: ../../c-api/exceptions.rst:264 +#: ../../c-api/exceptions.rst:265 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " "parameter specifying the exception type to be raised." msgstr "" -#: ../../c-api/exceptions.rst:272 +#: ../../c-api/exceptions.rst:273 msgid "" "This is a convenience function to raise :exc:`ImportError`. *msg* will be " "set as the exception's message string. *name* and *path*, both of which can " @@ -303,13 +304,13 @@ msgid "" "``path`` attributes." msgstr "" -#: ../../c-api/exceptions.rst:282 +#: ../../c-api/exceptions.rst:283 msgid "" "Much like :c:func:`PyErr_SetImportError` but this function allows for " "specifying a subclass of :exc:`ImportError` to raise." msgstr "" -#: ../../c-api/exceptions.rst:290 +#: ../../c-api/exceptions.rst:291 msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " @@ -317,19 +318,19 @@ msgid "" "is a :exc:`SyntaxError`." msgstr "" -#: ../../c-api/exceptions.rst:300 +#: ../../c-api/exceptions.rst:301 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../c-api/exceptions.rst:308 +#: ../../c-api/exceptions.rst:309 msgid "" "Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" -#: ../../c-api/exceptions.rst:314 +#: ../../c-api/exceptions.rst:315 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -337,11 +338,11 @@ msgid "" "use." msgstr "" -#: ../../c-api/exceptions.rst:321 +#: ../../c-api/exceptions.rst:322 msgid "Issuing warnings" msgstr "" -#: ../../c-api/exceptions.rst:323 +#: ../../c-api/exceptions.rst:324 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -357,7 +358,7 @@ msgid "" "return an error value)." msgstr "" -#: ../../c-api/exceptions.rst:338 +#: ../../c-api/exceptions.rst:339 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -367,7 +368,7 @@ msgid "" "`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" -#: ../../c-api/exceptions.rst:345 +#: ../../c-api/exceptions.rst:346 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -376,14 +377,14 @@ msgid "" "enumerated at :ref:`standardwarningcategories`." msgstr "" -#: ../../c-api/exceptions.rst:351 +#: ../../c-api/exceptions.rst:352 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" -#: ../../c-api/exceptions.rst:358 +#: ../../c-api/exceptions.rst:359 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." @@ -391,32 +392,32 @@ msgid "" "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" -#: ../../c-api/exceptions.rst:369 +#: ../../c-api/exceptions.rst:370 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " "*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" "`filesystem encoding and error handler`." msgstr "" -#: ../../c-api/exceptions.rst:376 +#: ../../c-api/exceptions.rst:377 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: ../../c-api/exceptions.rst:385 +#: ../../c-api/exceptions.rst:386 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :class:`!warnings." "WarningMessage`." msgstr "" -#: ../../c-api/exceptions.rst:392 +#: ../../c-api/exceptions.rst:393 msgid "Querying the error indicator" msgstr "" -#: ../../c-api/exceptions.rst:396 +#: ../../c-api/exceptions.rst:397 msgid "" "Test whether the error indicator is set. If set, return the exception " "*type* (the first argument to the last call to one of the ``PyErr_Set*`` " @@ -425,11 +426,11 @@ msgid "" "`Py_DECREF` it." msgstr "" -#: ../../c-api/exceptions.rst:402 +#: ../../c-api/exceptions.rst:403 msgid "The caller must hold the GIL." msgstr "" -#: ../../c-api/exceptions.rst:406 +#: ../../c-api/exceptions.rst:407 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -437,14 +438,14 @@ msgid "" "of a class exception, or it may be a subclass of the expected exception.)" msgstr "" -#: ../../c-api/exceptions.rst:414 +#: ../../c-api/exceptions.rst:415 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" -#: ../../c-api/exceptions.rst:421 +#: ../../c-api/exceptions.rst:422 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -452,43 +453,43 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" -#: ../../c-api/exceptions.rst:429 +#: ../../c-api/exceptions.rst:430 msgid "" "Return the exception currently being raised, clearing the error indicator at " "the same time. Return ``NULL`` if the error indicator is not set." msgstr "" -#: ../../c-api/exceptions.rst:432 +#: ../../c-api/exceptions.rst:433 msgid "" "This function is used by code that needs to catch exceptions, or code that " "needs to save and restore the error indicator temporarily." msgstr "" -#: ../../c-api/exceptions.rst:435 ../../c-api/exceptions.rst:479 +#: ../../c-api/exceptions.rst:436 ../../c-api/exceptions.rst:480 msgid "For example::" msgstr "" -#: ../../c-api/exceptions.rst:445 +#: ../../c-api/exceptions.rst:446 msgid "" ":c:func:`PyErr_GetHandledException`, to save the exception currently being " "handled." msgstr "" -#: ../../c-api/exceptions.rst:453 +#: ../../c-api/exceptions.rst:454 msgid "" "Set *exc* as the exception currently being raised, clearing the existing " "exception if one is set." msgstr "" -#: ../../c-api/exceptions.rst:458 +#: ../../c-api/exceptions.rst:459 msgid "This call steals a reference to *exc*, which must be a valid exception." msgstr "" -#: ../../c-api/exceptions.rst:467 +#: ../../c-api/exceptions.rst:468 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: ../../c-api/exceptions.rst:469 +#: ../../c-api/exceptions.rst:470 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -497,17 +498,17 @@ msgid "" "the type object is not." msgstr "" -#: ../../c-api/exceptions.rst:476 +#: ../../c-api/exceptions.rst:477 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" -#: ../../c-api/exceptions.rst:495 +#: ../../c-api/exceptions.rst:496 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: ../../c-api/exceptions.rst:497 +#: ../../c-api/exceptions.rst:498 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -520,20 +521,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" -#: ../../c-api/exceptions.rst:511 +#: ../../c-api/exceptions.rst:512 msgid "" "This function is normally only used by legacy code that needs to save and " "restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " "the current error indicator." msgstr "" -#: ../../c-api/exceptions.rst:520 +#: ../../c-api/exceptions.rst:521 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" -#: ../../c-api/exceptions.rst:523 +#: ../../c-api/exceptions.rst:524 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -543,14 +544,14 @@ msgid "" "improve performance." msgstr "" -#: ../../c-api/exceptions.rst:531 +#: ../../c-api/exceptions.rst:532 msgid "" "This function *does not* implicitly set the :attr:`~BaseException." "__traceback__` attribute on the exception value. If setting the traceback " "appropriately is desired, the following additional snippet is needed::" msgstr "" -#: ../../c-api/exceptions.rst:543 +#: ../../c-api/exceptions.rst:544 msgid "" "Retrieve the active exception instance, as would be returned by :func:`sys." "exception`. This refers to an exception that was *already caught*, not to an " @@ -558,7 +559,7 @@ msgid "" "or ``NULL``. Does not modify the interpreter's exception state." msgstr "" -#: ../../c-api/exceptions.rst:550 +#: ../../c-api/exceptions.rst:551 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -566,14 +567,14 @@ msgid "" "clear the exception state." msgstr "" -#: ../../c-api/exceptions.rst:559 +#: ../../c-api/exceptions.rst:560 msgid "" "Set the active exception, as known from ``sys.exception()``. This refers to " "an exception that was *already caught*, not to an exception that was freshly " "raised. To clear the exception state, pass ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:566 +#: ../../c-api/exceptions.rst:567 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -581,7 +582,7 @@ msgid "" "exception state." msgstr "" -#: ../../c-api/exceptions.rst:575 +#: ../../c-api/exceptions.rst:576 msgid "" "Retrieve the old-style representation of the exception info, as known from :" "func:`sys.exc_info`. This refers to an exception that was *already caught*, " @@ -591,7 +592,7 @@ msgid "" "using :c:func:`PyErr_GetHandledException`." msgstr "" -#: ../../c-api/exceptions.rst:584 +#: ../../c-api/exceptions.rst:585 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -599,7 +600,7 @@ msgid "" "exception state." msgstr "" -#: ../../c-api/exceptions.rst:594 +#: ../../c-api/exceptions.rst:595 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " @@ -609,7 +610,7 @@ msgid "" "`PyErr_SetHandledException`." msgstr "" -#: ../../c-api/exceptions.rst:603 +#: ../../c-api/exceptions.rst:604 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -617,22 +618,22 @@ msgid "" "state." msgstr "" -#: ../../c-api/exceptions.rst:610 +#: ../../c-api/exceptions.rst:611 msgid "" "The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " "The interpreter now derives them from the exception instance (the ``value`` " "argument). The function still steals references of all three arguments." msgstr "" -#: ../../c-api/exceptions.rst:618 +#: ../../c-api/exceptions.rst:619 msgid "Signal Handling" msgstr "" -#: ../../c-api/exceptions.rst:628 +#: ../../c-api/exceptions.rst:629 msgid "This function interacts with Python's signal handling." msgstr "" -#: ../../c-api/exceptions.rst:630 +#: ../../c-api/exceptions.rst:631 msgid "" "If the function is called from the main thread and under the main Python " "interpreter, it checks whether a signal has been sent to the processes and " @@ -640,7 +641,7 @@ msgid "" "module is supported, this can invoke a signal handler written in Python." msgstr "" -#: ../../c-api/exceptions.rst:635 +#: ../../c-api/exceptions.rst:636 msgid "" "The function attempts to handle all pending signals, and then returns ``0``. " "However, if a Python signal handler raises an exception, the error indicator " @@ -649,44 +650,44 @@ msgid "" "`PyErr_CheckSignals()` invocation)." msgstr "" -#: ../../c-api/exceptions.rst:641 +#: ../../c-api/exceptions.rst:642 msgid "" "If the function is called from a non-main thread, or under a non-main Python " "interpreter, it does nothing and returns ``0``." msgstr "" -#: ../../c-api/exceptions.rst:644 +#: ../../c-api/exceptions.rst:645 msgid "" "This function can be called by long-running C code that wants to be " "interruptible by user requests (such as by pressing Ctrl-C)." msgstr "" -#: ../../c-api/exceptions.rst:648 +#: ../../c-api/exceptions.rst:649 msgid "" "The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:" "`KeyboardInterrupt` exception." msgstr "" -#: ../../c-api/exceptions.rst:659 +#: ../../c-api/exceptions.rst:660 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: ../../c-api/exceptions.rst:663 ../../c-api/exceptions.rst:690 +#: ../../c-api/exceptions.rst:664 ../../c-api/exceptions.rst:691 msgid "" "This function is async-signal-safe. It can be called without the :term:" "`GIL` and from a C signal handler." msgstr "" -#: ../../c-api/exceptions.rst:673 +#: ../../c-api/exceptions.rst:674 msgid "" "Simulate the effect of a signal arriving. The next time :c:func:" "`PyErr_CheckSignals` is called, the Python signal handler for the given " "signal number will be called." msgstr "" -#: ../../c-api/exceptions.rst:677 +#: ../../c-api/exceptions.rst:678 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -694,27 +695,27 @@ msgid "" "interrupt an operation)." msgstr "" -#: ../../c-api/exceptions.rst:682 +#: ../../c-api/exceptions.rst:683 msgid "" "If the given signal isn't handled by Python (it was set to :py:const:`signal." "SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" -#: ../../c-api/exceptions.rst:685 +#: ../../c-api/exceptions.rst:686 msgid "" "If *signum* is outside of the allowed range of signal numbers, ``-1`` is " "returned. Otherwise, ``0`` is returned. The error indicator is never " "changed by this function." msgstr "" -#: ../../c-api/exceptions.rst:698 +#: ../../c-api/exceptions.rst:699 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" -#: ../../c-api/exceptions.rst:702 +#: ../../c-api/exceptions.rst:703 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -722,15 +723,15 @@ msgid "" "be called from the main thread." msgstr "" -#: ../../c-api/exceptions.rst:707 +#: ../../c-api/exceptions.rst:708 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: ../../c-api/exceptions.rst:712 +#: ../../c-api/exceptions.rst:713 msgid "Exception Classes" msgstr "例外類別" -#: ../../c-api/exceptions.rst:716 +#: ../../c-api/exceptions.rst:717 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -739,7 +740,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: ../../c-api/exceptions.rst:722 +#: ../../c-api/exceptions.rst:723 msgid "" "The :attr:`!__module__` attribute of the new class is set to the first part " "(up to the last dot) of the *name* argument, and the class name is set to " @@ -749,31 +750,31 @@ msgid "" "variables and methods." msgstr "" -#: ../../c-api/exceptions.rst:731 +#: ../../c-api/exceptions.rst:732 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" -#: ../../c-api/exceptions.rst:739 +#: ../../c-api/exceptions.rst:740 msgid "Exception Objects" msgstr "例外物件" -#: ../../c-api/exceptions.rst:743 +#: ../../c-api/exceptions.rst:744 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:751 +#: ../../c-api/exceptions.rst:752 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: ../../c-api/exceptions.rst:757 +#: ../../c-api/exceptions.rst:758 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -781,14 +782,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:765 +#: ../../c-api/exceptions.rst:766 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " "instance. This steals a reference to *ctx*." msgstr "" -#: ../../c-api/exceptions.rst:772 +#: ../../c-api/exceptions.rst:773 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -796,28 +797,28 @@ msgid "" "attribute." msgstr "" -#: ../../c-api/exceptions.rst:780 +#: ../../c-api/exceptions.rst:781 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " "exception instance or ``None``. This steals a reference to *cause*." msgstr "" -#: ../../c-api/exceptions.rst:784 +#: ../../c-api/exceptions.rst:785 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: ../../c-api/exceptions.rst:790 +#: ../../c-api/exceptions.rst:791 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../../c-api/exceptions.rst:795 +#: ../../c-api/exceptions.rst:796 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../../c-api/exceptions.rst:799 +#: ../../c-api/exceptions.rst:800 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " @@ -829,72 +830,72 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../../c-api/exceptions.rst:813 +#: ../../c-api/exceptions.rst:814 msgid "Unicode Exception Objects" msgstr "" -#: ../../c-api/exceptions.rst:815 +#: ../../c-api/exceptions.rst:816 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: ../../c-api/exceptions.rst:819 +#: ../../c-api/exceptions.rst:820 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: ../../c-api/exceptions.rst:826 +#: ../../c-api/exceptions.rst:827 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:832 +#: ../../c-api/exceptions.rst:833 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:838 +#: ../../c-api/exceptions.rst:839 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: ../../c-api/exceptions.rst:846 +#: ../../c-api/exceptions.rst:847 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:853 +#: ../../c-api/exceptions.rst:854 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: ../../c-api/exceptions.rst:861 +#: ../../c-api/exceptions.rst:862 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:868 +#: ../../c-api/exceptions.rst:869 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:874 +#: ../../c-api/exceptions.rst:875 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:881 +#: ../../c-api/exceptions.rst:882 msgid "Recursion Control" msgstr "" -#: ../../c-api/exceptions.rst:883 +#: ../../c-api/exceptions.rst:884 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -904,44 +905,44 @@ msgid "" "recursion handling." msgstr "" -#: ../../c-api/exceptions.rst:892 +#: ../../c-api/exceptions.rst:893 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: ../../c-api/exceptions.rst:894 +#: ../../c-api/exceptions.rst:895 msgid "" "If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS " "stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it " "sets a :exc:`MemoryError` and returns a nonzero value." msgstr "" -#: ../../c-api/exceptions.rst:898 +#: ../../c-api/exceptions.rst:899 msgid "" "The function then checks if the recursion limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: ../../c-api/exceptions.rst:902 +#: ../../c-api/exceptions.rst:903 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: ../../c-api/exceptions.rst:906 ../../c-api/exceptions.rst:914 +#: ../../c-api/exceptions.rst:907 ../../c-api/exceptions.rst:915 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: ../../c-api/exceptions.rst:911 +#: ../../c-api/exceptions.rst:912 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: ../../c-api/exceptions.rst:917 +#: ../../c-api/exceptions.rst:918 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -950,13 +951,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: ../../c-api/exceptions.rst:925 +#: ../../c-api/exceptions.rst:926 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: ../../c-api/exceptions.rst:928 +#: ../../c-api/exceptions.rst:929 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -964,30 +965,30 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: ../../c-api/exceptions.rst:934 +#: ../../c-api/exceptions.rst:935 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:938 +#: ../../c-api/exceptions.rst:939 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: ../../c-api/exceptions.rst:943 +#: ../../c-api/exceptions.rst:944 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: ../../c-api/exceptions.rst:950 +#: ../../c-api/exceptions.rst:951 msgid "Standard Exceptions" msgstr "" -#: ../../c-api/exceptions.rst:952 +#: ../../c-api/exceptions.rst:953 msgid "" "All standard Python exceptions are available as global variables whose names " "are ``PyExc_`` followed by the Python exception name. These have the type :" @@ -995,451 +996,451 @@ msgid "" "all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1013 ../../c-api/exceptions.rst:1146 -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1014 ../../c-api/exceptions.rst:1147 +#: ../../c-api/exceptions.rst:1192 msgid "C Name" msgstr "" -#: ../../c-api/exceptions.rst:1013 ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1014 ../../c-api/exceptions.rst:1192 msgid "Python Name" msgstr "" -#: ../../c-api/exceptions.rst:1013 ../../c-api/exceptions.rst:1146 -#: ../../c-api/exceptions.rst:1191 +#: ../../c-api/exceptions.rst:1014 ../../c-api/exceptions.rst:1147 +#: ../../c-api/exceptions.rst:1192 msgid "Notes" msgstr "註解" -#: ../../c-api/exceptions.rst:1015 +#: ../../c-api/exceptions.rst:1016 msgid ":c:data:`PyExc_BaseException`" msgstr ":c:data:`PyExc_BaseException`" -#: ../../c-api/exceptions.rst:1015 +#: ../../c-api/exceptions.rst:1016 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: ../../c-api/exceptions.rst:1015 ../../c-api/exceptions.rst:1017 -#: ../../c-api/exceptions.rst:1019 ../../c-api/exceptions.rst:1065 -#: ../../c-api/exceptions.rst:1077 +#: ../../c-api/exceptions.rst:1016 ../../c-api/exceptions.rst:1018 +#: ../../c-api/exceptions.rst:1020 ../../c-api/exceptions.rst:1066 +#: ../../c-api/exceptions.rst:1078 msgid "[1]_" msgstr "[1]_" -#: ../../c-api/exceptions.rst:1017 +#: ../../c-api/exceptions.rst:1018 msgid ":c:data:`PyExc_Exception`" msgstr ":c:data:`PyExc_Exception`" -#: ../../c-api/exceptions.rst:1017 +#: ../../c-api/exceptions.rst:1018 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: ../../c-api/exceptions.rst:1019 +#: ../../c-api/exceptions.rst:1020 msgid ":c:data:`PyExc_ArithmeticError`" msgstr ":c:data:`PyExc_ArithmeticError`" -#: ../../c-api/exceptions.rst:1019 +#: ../../c-api/exceptions.rst:1020 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: ../../c-api/exceptions.rst:1021 +#: ../../c-api/exceptions.rst:1022 msgid ":c:data:`PyExc_AssertionError`" msgstr ":c:data:`PyExc_AssertionError`" -#: ../../c-api/exceptions.rst:1021 +#: ../../c-api/exceptions.rst:1022 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: ../../c-api/exceptions.rst:1023 +#: ../../c-api/exceptions.rst:1024 msgid ":c:data:`PyExc_AttributeError`" msgstr ":c:data:`PyExc_AttributeError`" -#: ../../c-api/exceptions.rst:1023 +#: ../../c-api/exceptions.rst:1024 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: ../../c-api/exceptions.rst:1025 +#: ../../c-api/exceptions.rst:1026 msgid ":c:data:`PyExc_BlockingIOError`" msgstr ":c:data:`PyExc_BlockingIOError`" -#: ../../c-api/exceptions.rst:1025 +#: ../../c-api/exceptions.rst:1026 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: ../../c-api/exceptions.rst:1027 +#: ../../c-api/exceptions.rst:1028 msgid ":c:data:`PyExc_BrokenPipeError`" msgstr ":c:data:`PyExc_BrokenPipeError`" -#: ../../c-api/exceptions.rst:1027 +#: ../../c-api/exceptions.rst:1028 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: ../../c-api/exceptions.rst:1029 +#: ../../c-api/exceptions.rst:1030 msgid ":c:data:`PyExc_BufferError`" msgstr ":c:data:`PyExc_BufferError`" -#: ../../c-api/exceptions.rst:1029 +#: ../../c-api/exceptions.rst:1030 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: ../../c-api/exceptions.rst:1031 +#: ../../c-api/exceptions.rst:1032 msgid ":c:data:`PyExc_ChildProcessError`" msgstr ":c:data:`PyExc_ChildProcessError`" -#: ../../c-api/exceptions.rst:1031 +#: ../../c-api/exceptions.rst:1032 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: ../../c-api/exceptions.rst:1033 +#: ../../c-api/exceptions.rst:1034 msgid ":c:data:`PyExc_ConnectionAbortedError`" msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: ../../c-api/exceptions.rst:1033 +#: ../../c-api/exceptions.rst:1034 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: ../../c-api/exceptions.rst:1035 +#: ../../c-api/exceptions.rst:1036 msgid ":c:data:`PyExc_ConnectionError`" msgstr ":c:data:`PyExc_ConnectionError`" -#: ../../c-api/exceptions.rst:1035 +#: ../../c-api/exceptions.rst:1036 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: ../../c-api/exceptions.rst:1037 +#: ../../c-api/exceptions.rst:1038 msgid ":c:data:`PyExc_ConnectionRefusedError`" msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: ../../c-api/exceptions.rst:1037 +#: ../../c-api/exceptions.rst:1038 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: ../../c-api/exceptions.rst:1039 +#: ../../c-api/exceptions.rst:1040 msgid ":c:data:`PyExc_ConnectionResetError`" msgstr ":c:data:`PyExc_ConnectionResetError`" -#: ../../c-api/exceptions.rst:1039 +#: ../../c-api/exceptions.rst:1040 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: ../../c-api/exceptions.rst:1041 +#: ../../c-api/exceptions.rst:1042 msgid ":c:data:`PyExc_EOFError`" msgstr ":c:data:`PyExc_EOFError`" -#: ../../c-api/exceptions.rst:1041 +#: ../../c-api/exceptions.rst:1042 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: ../../c-api/exceptions.rst:1043 +#: ../../c-api/exceptions.rst:1044 msgid ":c:data:`PyExc_FileExistsError`" msgstr ":c:data:`PyExc_FileExistsError`" -#: ../../c-api/exceptions.rst:1043 +#: ../../c-api/exceptions.rst:1044 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: ../../c-api/exceptions.rst:1045 +#: ../../c-api/exceptions.rst:1046 msgid ":c:data:`PyExc_FileNotFoundError`" msgstr ":c:data:`PyExc_FileNotFoundError`" -#: ../../c-api/exceptions.rst:1045 +#: ../../c-api/exceptions.rst:1046 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: ../../c-api/exceptions.rst:1047 +#: ../../c-api/exceptions.rst:1048 msgid ":c:data:`PyExc_FloatingPointError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: ../../c-api/exceptions.rst:1047 +#: ../../c-api/exceptions.rst:1048 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: ../../c-api/exceptions.rst:1049 +#: ../../c-api/exceptions.rst:1050 msgid ":c:data:`PyExc_GeneratorExit`" msgstr ":c:data:`PyExc_GeneratorExit`" -#: ../../c-api/exceptions.rst:1049 +#: ../../c-api/exceptions.rst:1050 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: ../../c-api/exceptions.rst:1051 +#: ../../c-api/exceptions.rst:1052 msgid ":c:data:`PyExc_ImportError`" msgstr ":c:data:`PyExc_ImportError`" -#: ../../c-api/exceptions.rst:1051 +#: ../../c-api/exceptions.rst:1052 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: ../../c-api/exceptions.rst:1053 +#: ../../c-api/exceptions.rst:1054 msgid ":c:data:`PyExc_IndentationError`" msgstr ":c:data:`PyExc_IndentationError`" -#: ../../c-api/exceptions.rst:1053 +#: ../../c-api/exceptions.rst:1054 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: ../../c-api/exceptions.rst:1055 +#: ../../c-api/exceptions.rst:1056 msgid ":c:data:`PyExc_IndexError`" msgstr ":c:data:`PyExc_IndexError`" -#: ../../c-api/exceptions.rst:1055 +#: ../../c-api/exceptions.rst:1056 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: ../../c-api/exceptions.rst:1057 +#: ../../c-api/exceptions.rst:1058 msgid ":c:data:`PyExc_InterruptedError`" msgstr ":c:data:`PyExc_InterruptedError`" -#: ../../c-api/exceptions.rst:1057 +#: ../../c-api/exceptions.rst:1058 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: ../../c-api/exceptions.rst:1059 +#: ../../c-api/exceptions.rst:1060 msgid ":c:data:`PyExc_IsADirectoryError`" msgstr ":c:data:`PyExc_IsADirectoryError`" -#: ../../c-api/exceptions.rst:1059 +#: ../../c-api/exceptions.rst:1060 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: ../../c-api/exceptions.rst:1061 +#: ../../c-api/exceptions.rst:1062 msgid ":c:data:`PyExc_KeyError`" msgstr ":c:data:`PyExc_KeyError`" -#: ../../c-api/exceptions.rst:1061 +#: ../../c-api/exceptions.rst:1062 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: ../../c-api/exceptions.rst:1063 +#: ../../c-api/exceptions.rst:1064 msgid ":c:data:`PyExc_KeyboardInterrupt`" msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: ../../c-api/exceptions.rst:1063 +#: ../../c-api/exceptions.rst:1064 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: ../../c-api/exceptions.rst:1065 +#: ../../c-api/exceptions.rst:1066 msgid ":c:data:`PyExc_LookupError`" msgstr ":c:data:`PyExc_LookupError`" -#: ../../c-api/exceptions.rst:1065 +#: ../../c-api/exceptions.rst:1066 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: ../../c-api/exceptions.rst:1067 +#: ../../c-api/exceptions.rst:1068 msgid ":c:data:`PyExc_MemoryError`" msgstr ":c:data:`PyExc_MemoryError`" -#: ../../c-api/exceptions.rst:1067 +#: ../../c-api/exceptions.rst:1068 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: ../../c-api/exceptions.rst:1069 +#: ../../c-api/exceptions.rst:1070 msgid ":c:data:`PyExc_ModuleNotFoundError`" msgstr ":c:data:`PyExc_ModuleNotFoundError`" -#: ../../c-api/exceptions.rst:1069 +#: ../../c-api/exceptions.rst:1070 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: ../../c-api/exceptions.rst:1071 +#: ../../c-api/exceptions.rst:1072 msgid ":c:data:`PyExc_NameError`" msgstr ":c:data:`PyExc_NameError`" -#: ../../c-api/exceptions.rst:1071 +#: ../../c-api/exceptions.rst:1072 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: ../../c-api/exceptions.rst:1073 +#: ../../c-api/exceptions.rst:1074 msgid ":c:data:`PyExc_NotADirectoryError`" msgstr ":c:data:`PyExc_NotADirectoryError`" -#: ../../c-api/exceptions.rst:1073 +#: ../../c-api/exceptions.rst:1074 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: ../../c-api/exceptions.rst:1075 +#: ../../c-api/exceptions.rst:1076 msgid ":c:data:`PyExc_NotImplementedError`" msgstr ":c:data:`PyExc_NotImplementedError`" -#: ../../c-api/exceptions.rst:1075 +#: ../../c-api/exceptions.rst:1076 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: ../../c-api/exceptions.rst:1077 +#: ../../c-api/exceptions.rst:1078 msgid ":c:data:`PyExc_OSError`" msgstr ":c:data:`PyExc_OSError`" -#: ../../c-api/exceptions.rst:1077 +#: ../../c-api/exceptions.rst:1078 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: ../../c-api/exceptions.rst:1079 +#: ../../c-api/exceptions.rst:1080 msgid ":c:data:`PyExc_OverflowError`" msgstr ":c:data:`PyExc_OverflowError`" -#: ../../c-api/exceptions.rst:1079 +#: ../../c-api/exceptions.rst:1080 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: ../../c-api/exceptions.rst:1081 +#: ../../c-api/exceptions.rst:1082 msgid ":c:data:`PyExc_PermissionError`" msgstr ":c:data:`PyExc_PermissionError`" -#: ../../c-api/exceptions.rst:1081 +#: ../../c-api/exceptions.rst:1082 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: ../../c-api/exceptions.rst:1083 +#: ../../c-api/exceptions.rst:1084 msgid ":c:data:`PyExc_ProcessLookupError`" msgstr ":c:data:`PyExc_ProcessLookupError`" -#: ../../c-api/exceptions.rst:1083 +#: ../../c-api/exceptions.rst:1084 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: ../../c-api/exceptions.rst:1085 +#: ../../c-api/exceptions.rst:1086 msgid ":c:data:`PyExc_RecursionError`" msgstr ":c:data:`PyExc_RecursionError`" -#: ../../c-api/exceptions.rst:1085 +#: ../../c-api/exceptions.rst:1086 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: ../../c-api/exceptions.rst:1087 +#: ../../c-api/exceptions.rst:1088 msgid ":c:data:`PyExc_ReferenceError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: ../../c-api/exceptions.rst:1087 +#: ../../c-api/exceptions.rst:1088 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: ../../c-api/exceptions.rst:1089 +#: ../../c-api/exceptions.rst:1090 msgid ":c:data:`PyExc_RuntimeError`" msgstr ":c:data:`PyExc_RuntimeError`" -#: ../../c-api/exceptions.rst:1089 +#: ../../c-api/exceptions.rst:1090 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1092 msgid ":c:data:`PyExc_StopAsyncIteration`" msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1092 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: ../../c-api/exceptions.rst:1093 +#: ../../c-api/exceptions.rst:1094 msgid ":c:data:`PyExc_StopIteration`" msgstr ":c:data:`PyExc_StopIteration`" -#: ../../c-api/exceptions.rst:1093 +#: ../../c-api/exceptions.rst:1094 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: ../../c-api/exceptions.rst:1095 +#: ../../c-api/exceptions.rst:1096 msgid ":c:data:`PyExc_SyntaxError`" msgstr ":c:data:`PyExc_SyntaxError`" -#: ../../c-api/exceptions.rst:1095 +#: ../../c-api/exceptions.rst:1096 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: ../../c-api/exceptions.rst:1097 +#: ../../c-api/exceptions.rst:1098 msgid ":c:data:`PyExc_SystemError`" msgstr ":c:data:`PyExc_SystemError`" -#: ../../c-api/exceptions.rst:1097 +#: ../../c-api/exceptions.rst:1098 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: ../../c-api/exceptions.rst:1099 +#: ../../c-api/exceptions.rst:1100 msgid ":c:data:`PyExc_SystemExit`" msgstr ":c:data:`PyExc_SystemExit`" -#: ../../c-api/exceptions.rst:1099 +#: ../../c-api/exceptions.rst:1100 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: ../../c-api/exceptions.rst:1101 +#: ../../c-api/exceptions.rst:1102 msgid ":c:data:`PyExc_TabError`" msgstr ":c:data:`PyExc_TabError`" -#: ../../c-api/exceptions.rst:1101 +#: ../../c-api/exceptions.rst:1102 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: ../../c-api/exceptions.rst:1103 +#: ../../c-api/exceptions.rst:1104 msgid ":c:data:`PyExc_TimeoutError`" msgstr ":c:data:`PyExc_TimeoutError`" -#: ../../c-api/exceptions.rst:1103 +#: ../../c-api/exceptions.rst:1104 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: ../../c-api/exceptions.rst:1105 +#: ../../c-api/exceptions.rst:1106 msgid ":c:data:`PyExc_TypeError`" msgstr ":c:data:`PyExc_TypeError`" -#: ../../c-api/exceptions.rst:1105 +#: ../../c-api/exceptions.rst:1106 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: ../../c-api/exceptions.rst:1107 +#: ../../c-api/exceptions.rst:1108 msgid ":c:data:`PyExc_UnboundLocalError`" msgstr ":c:data:`PyExc_UnboundLocalError`" -#: ../../c-api/exceptions.rst:1107 +#: ../../c-api/exceptions.rst:1108 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: ../../c-api/exceptions.rst:1109 +#: ../../c-api/exceptions.rst:1110 msgid ":c:data:`PyExc_UnicodeDecodeError`" msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: ../../c-api/exceptions.rst:1109 +#: ../../c-api/exceptions.rst:1110 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: ../../c-api/exceptions.rst:1111 +#: ../../c-api/exceptions.rst:1112 msgid ":c:data:`PyExc_UnicodeEncodeError`" msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: ../../c-api/exceptions.rst:1111 +#: ../../c-api/exceptions.rst:1112 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: ../../c-api/exceptions.rst:1113 +#: ../../c-api/exceptions.rst:1114 msgid ":c:data:`PyExc_UnicodeError`" msgstr ":c:data:`PyExc_UnicodeError`" -#: ../../c-api/exceptions.rst:1113 +#: ../../c-api/exceptions.rst:1114 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: ../../c-api/exceptions.rst:1115 +#: ../../c-api/exceptions.rst:1116 msgid ":c:data:`PyExc_UnicodeTranslateError`" msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: ../../c-api/exceptions.rst:1115 +#: ../../c-api/exceptions.rst:1116 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: ../../c-api/exceptions.rst:1117 +#: ../../c-api/exceptions.rst:1118 msgid ":c:data:`PyExc_ValueError`" msgstr ":c:data:`PyExc_ValueError`" -#: ../../c-api/exceptions.rst:1117 +#: ../../c-api/exceptions.rst:1118 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: ../../c-api/exceptions.rst:1119 +#: ../../c-api/exceptions.rst:1120 msgid ":c:data:`PyExc_ZeroDivisionError`" msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: ../../c-api/exceptions.rst:1119 +#: ../../c-api/exceptions.rst:1120 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: ../../c-api/exceptions.rst:1122 +#: ../../c-api/exceptions.rst:1123 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1459,58 +1460,58 @@ msgstr "" "`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` 和 :c:data:" "`PyExc_TimeoutError` 是在 :pep:`3151` 被引入。" -#: ../../c-api/exceptions.rst:1132 +#: ../../c-api/exceptions.rst:1133 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" ":c:data:`PyExc_StopAsyncIteration` 和 :c:data:`PyExc_RecursionError`\\ 。" -#: ../../c-api/exceptions.rst:1135 +#: ../../c-api/exceptions.rst:1136 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`\\ 。" -#: ../../c-api/exceptions.rst:1138 +#: ../../c-api/exceptions.rst:1139 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" msgstr "" -#: ../../c-api/exceptions.rst:1148 +#: ../../c-api/exceptions.rst:1149 msgid ":c:data:`!PyExc_EnvironmentError`" msgstr ":c:data:`!PyExc_EnvironmentError`" -#: ../../c-api/exceptions.rst:1150 +#: ../../c-api/exceptions.rst:1151 msgid ":c:data:`!PyExc_IOError`" msgstr ":c:data:`!PyExc_IOError`" -#: ../../c-api/exceptions.rst:1152 +#: ../../c-api/exceptions.rst:1153 msgid ":c:data:`!PyExc_WindowsError`" msgstr ":c:data:`!PyExc_WindowsError`" -#: ../../c-api/exceptions.rst:1152 +#: ../../c-api/exceptions.rst:1153 msgid "[2]_" msgstr "[2]_" -#: ../../c-api/exceptions.rst:1155 +#: ../../c-api/exceptions.rst:1156 msgid "These aliases used to be separate exception types." msgstr "" -#: ../../c-api/exceptions.rst:1158 ../../c-api/exceptions.rst:1219 +#: ../../c-api/exceptions.rst:1159 ../../c-api/exceptions.rst:1220 msgid "Notes:" msgstr "註解:" -#: ../../c-api/exceptions.rst:1161 +#: ../../c-api/exceptions.rst:1162 msgid "This is a base class for other standard exceptions." msgstr "" -#: ../../c-api/exceptions.rst:1164 +#: ../../c-api/exceptions.rst:1165 msgid "" "Only defined on Windows; protect code that uses this by testing that the " "preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: ../../c-api/exceptions.rst:1170 +#: ../../c-api/exceptions.rst:1171 msgid "Standard Warning Categories" msgstr "" -#: ../../c-api/exceptions.rst:1172 +#: ../../c-api/exceptions.rst:1173 msgid "" "All standard Python warning categories are available as global variables " "whose names are ``PyExc_`` followed by the Python exception name. These have " @@ -1518,103 +1519,103 @@ msgid "" "here are all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1193 +#: ../../c-api/exceptions.rst:1194 msgid ":c:data:`PyExc_Warning`" msgstr ":c:data:`PyExc_Warning`" -#: ../../c-api/exceptions.rst:1193 +#: ../../c-api/exceptions.rst:1194 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: ../../c-api/exceptions.rst:1193 +#: ../../c-api/exceptions.rst:1194 msgid "[3]_" msgstr "[3]_" -#: ../../c-api/exceptions.rst:1195 +#: ../../c-api/exceptions.rst:1196 msgid ":c:data:`PyExc_BytesWarning`" msgstr ":c:data:`PyExc_BytesWarning`" -#: ../../c-api/exceptions.rst:1195 +#: ../../c-api/exceptions.rst:1196 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: ../../c-api/exceptions.rst:1197 +#: ../../c-api/exceptions.rst:1198 msgid ":c:data:`PyExc_DeprecationWarning`" msgstr ":c:data:`PyExc_DeprecationWarning`" -#: ../../c-api/exceptions.rst:1197 +#: ../../c-api/exceptions.rst:1198 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: ../../c-api/exceptions.rst:1199 +#: ../../c-api/exceptions.rst:1200 msgid ":c:data:`PyExc_FutureWarning`" msgstr ":c:data:`PyExc_FutureWarning`" -#: ../../c-api/exceptions.rst:1199 +#: ../../c-api/exceptions.rst:1200 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: ../../c-api/exceptions.rst:1201 +#: ../../c-api/exceptions.rst:1202 msgid ":c:data:`PyExc_ImportWarning`" msgstr ":c:data:`PyExc_ImportWarning`" -#: ../../c-api/exceptions.rst:1201 +#: ../../c-api/exceptions.rst:1202 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: ../../c-api/exceptions.rst:1203 +#: ../../c-api/exceptions.rst:1204 msgid ":c:data:`PyExc_PendingDeprecationWarning`" msgstr ":c:data:`PyExc_PendingDeprecationWarning`" -#: ../../c-api/exceptions.rst:1203 +#: ../../c-api/exceptions.rst:1204 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: ../../c-api/exceptions.rst:1205 +#: ../../c-api/exceptions.rst:1206 msgid ":c:data:`PyExc_ResourceWarning`" msgstr ":c:data:`PyExc_ResourceWarning`" -#: ../../c-api/exceptions.rst:1205 +#: ../../c-api/exceptions.rst:1206 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: ../../c-api/exceptions.rst:1207 +#: ../../c-api/exceptions.rst:1208 msgid ":c:data:`PyExc_RuntimeWarning`" msgstr ":c:data:`PyExc_RuntimeWarning`" -#: ../../c-api/exceptions.rst:1207 +#: ../../c-api/exceptions.rst:1208 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: ../../c-api/exceptions.rst:1209 +#: ../../c-api/exceptions.rst:1210 msgid ":c:data:`PyExc_SyntaxWarning`" msgstr ":c:data:`PyExc_SyntaxWarning`" -#: ../../c-api/exceptions.rst:1209 +#: ../../c-api/exceptions.rst:1210 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: ../../c-api/exceptions.rst:1211 +#: ../../c-api/exceptions.rst:1212 msgid ":c:data:`PyExc_UnicodeWarning`" msgstr ":c:data:`PyExc_UnicodeWarning`" -#: ../../c-api/exceptions.rst:1211 +#: ../../c-api/exceptions.rst:1212 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: ../../c-api/exceptions.rst:1213 +#: ../../c-api/exceptions.rst:1214 msgid ":c:data:`PyExc_UserWarning`" msgstr ":c:data:`PyExc_UserWarning`" -#: ../../c-api/exceptions.rst:1213 +#: ../../c-api/exceptions.rst:1214 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: ../../c-api/exceptions.rst:1216 +#: ../../c-api/exceptions.rst:1217 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: ../../c-api/exceptions.rst:1222 +#: ../../c-api/exceptions.rst:1223 msgid "This is a base class for other standard warning categories." msgstr "" @@ -1622,289 +1623,289 @@ msgstr "" msgid "strerror (C function)" msgstr "strerror(C 函式)" -#: ../../c-api/exceptions.rst:623 ../../c-api/exceptions.rst:654 -#: ../../c-api/exceptions.rst:669 +#: ../../c-api/exceptions.rst:624 ../../c-api/exceptions.rst:655 +#: ../../c-api/exceptions.rst:670 msgid "module" msgstr "module(模組)" -#: ../../c-api/exceptions.rst:623 ../../c-api/exceptions.rst:654 -#: ../../c-api/exceptions.rst:669 +#: ../../c-api/exceptions.rst:624 ../../c-api/exceptions.rst:655 +#: ../../c-api/exceptions.rst:670 msgid "signal" msgstr "signal(訊號)" -#: ../../c-api/exceptions.rst:623 ../../c-api/exceptions.rst:654 +#: ../../c-api/exceptions.rst:624 ../../c-api/exceptions.rst:655 msgid "SIGINT (C macro)" msgstr "SIGINT(C 巨集)" -#: ../../c-api/exceptions.rst:623 ../../c-api/exceptions.rst:654 -#: ../../c-api/exceptions.rst:669 +#: ../../c-api/exceptions.rst:624 ../../c-api/exceptions.rst:655 +#: ../../c-api/exceptions.rst:670 msgid "KeyboardInterrupt (built-in exception)" msgstr "KeyboardInterrupt(內建例外)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_BaseException (C var)" msgstr "PyExc_BaseException(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_Exception (C var)" msgstr "PyExc_Exception(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ArithmeticError (C var)" msgstr "PyExc_ArithmeticError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_AssertionError (C var)" msgstr "PyExc_AssertionError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_AttributeError (C var)" msgstr "PyExc_AttributeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_BlockingIOError (C var)" msgstr "PyExc_BlockingIOError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_BrokenPipeError (C var)" msgstr "PyExc_BrokenPipeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_BufferError (C var)" msgstr "PyExc_BufferError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ChildProcessError (C var)" msgstr "PyExc_ChildProcessError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ConnectionAbortedError (C var)" msgstr "PyExc_ConnectionAbortedError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ConnectionError (C var)" msgstr "PyExc_ConnectionError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ConnectionRefusedError (C var)" msgstr "PyExc_ConnectionRefusedError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ConnectionResetError (C var)" msgstr "PyExc_ConnectionResetError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_EOFError (C var)" msgstr "PyExc_EOFError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_FileExistsError (C var)" msgstr "PyExc_FileExistsError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_FileNotFoundError (C var)" msgstr "PyExc_FileNotFoundError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_FloatingPointError (C var)" msgstr "PyExc_FloatingPointError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_GeneratorExit (C var)" msgstr "PyExc_GeneratorExit(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ImportError (C var)" msgstr "PyExc_ImportError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_IndentationError (C var)" msgstr "PyExc_IndentationError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_IndexError (C var)" msgstr "PyExc_IndexError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_InterruptedError (C var)" msgstr "PyExc_InterruptedError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_IsADirectoryError (C var)" msgstr "PyExc_IsADirectoryError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_KeyError (C var)" msgstr "PyExc_KeyError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_KeyboardInterrupt (C var)" msgstr "PyExc_KeyboardInterrupt(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_LookupError (C var)" msgstr "PyExc_LookupError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_MemoryError (C var)" msgstr "PyExc_MemoryError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ModuleNotFoundError (C var)" msgstr "PyExc_ModuleNotFoundError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_NameError (C var)" msgstr "PyExc_NameError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_NotADirectoryError (C var)" msgstr "PyExc_NotADirectoryError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_NotImplementedError (C var)" msgstr "PyExc_NotImplementedError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_OSError (C var)" msgstr "PyExc_OSError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_OverflowError (C var)" msgstr "PyExc_OverflowError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_PermissionError (C var)" msgstr "PyExc_PermissionError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ProcessLookupError (C var)" msgstr "PyExc_ProcessLookupError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_RecursionError (C var)" msgstr "PyExc_RecursionError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ReferenceError (C var)" msgstr "PyExc_ReferenceError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_RuntimeError (C var)" msgstr "PyExc_RuntimeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_StopAsyncIteration (C var)" msgstr "PyExc_StopAsyncIteration(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_StopIteration (C var)" msgstr "PyExc_StopIteration(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_SyntaxError (C var)" msgstr "PyExc_SyntaxError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_SystemError (C var)" msgstr "PyExc_SystemError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_SystemExit (C var)" msgstr "PyExc_SystemExit(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_TabError (C var)" msgstr "PyExc_TabError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_TimeoutError (C var)" msgstr "PyExc_TimeoutError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_TypeError (C var)" msgstr "PyExc_TypeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_UnboundLocalError (C var)" msgstr "PyExc_UnboundLocalError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_UnicodeDecodeError (C var)" msgstr "PyExc_UnicodeDecodeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_UnicodeEncodeError (C var)" msgstr "PyExc_UnicodeEncodeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_UnicodeError (C var)" msgstr "PyExc_UnicodeError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_UnicodeTranslateError (C var)" msgstr "PyExc_UnicodeTranslateError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ValueError (C var)" msgstr "PyExc_ValueError(C 變數)" -#: ../../c-api/exceptions.rst:957 +#: ../../c-api/exceptions.rst:958 msgid "PyExc_ZeroDivisionError (C var)" msgstr "PyExc_ZeroDivisionError(C 變數)" -#: ../../c-api/exceptions.rst:1140 +#: ../../c-api/exceptions.rst:1141 msgid "PyExc_EnvironmentError (C var)" msgstr "PyExc_EnvironmentError(C 變數)" -#: ../../c-api/exceptions.rst:1140 +#: ../../c-api/exceptions.rst:1141 msgid "PyExc_IOError (C var)" msgstr "PyExc_IOError(C 變數)" -#: ../../c-api/exceptions.rst:1140 +#: ../../c-api/exceptions.rst:1141 msgid "PyExc_WindowsError (C var)" msgstr "PyExc_WindowsError(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_Warning (C var)" msgstr "PyExc_Warning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_BytesWarning (C var)" msgstr "PyExc_BytesWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_DeprecationWarning (C var)" msgstr "PyExc_DeprecationWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_FutureWarning (C var)" msgstr "PyExc_FutureWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_ImportWarning (C var)" msgstr "PyExc_ImportWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_PendingDeprecationWarning (C var)" msgstr "PyExc_PendingDeprecationWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_ResourceWarning (C var)" msgstr "PyExc_ResourceWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_RuntimeWarning (C var)" msgstr "PyExc_RuntimeWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_SyntaxWarning (C var)" msgstr "PyExc_SyntaxWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_UnicodeWarning (C var)" msgstr "PyExc_UnicodeWarning(C 變數)" -#: ../../c-api/exceptions.rst:1177 +#: ../../c-api/exceptions.rst:1178 msgid "PyExc_UserWarning (C var)" msgstr "PyExc_UserWarning(C 變數)" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 7dc8ed2ce2..e4b36b402c 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-14 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:31+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -41,7 +41,7 @@ msgid "" "implementation must also be provided." msgstr "" -#: ../../c-api/gcsupport.rst:24 +#: ../../c-api/gcsupport.rst:21 msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`" diff --git a/c-api/init.po b/c-api/init.po index f408a55892..d1e9b1068c 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2023-04-24 20:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -949,8 +949,7 @@ msgstr "" msgid "" "It is recommended that applications embedding the Python interpreter for " "purposes other than executing a single script pass ``0`` as *updatepath*, " -"and update :data:`sys.path` themselves if desired. See `CVE-2008-5983 " -"`_." +"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." msgstr "" #: ../../c-api/init.rst:765 diff --git a/c-api/memory.po b/c-api/memory.po index 379ce9be8c..359b00698e 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -819,7 +819,7 @@ msgid "" "from a Python slice):" msgstr "" -#: ../../c-api/memory.rst:563 +#: ../../c-api/memory.rst:562 msgid "``p[-2*S:-S]``" msgstr "``p[-2*S:-S]``" @@ -829,7 +829,7 @@ msgid "" "to read in a memory dump)." msgstr "" -#: ../../c-api/memory.rst:570 +#: ../../c-api/memory.rst:565 msgid "``p[-S]``" msgstr "``p[-S]``" @@ -849,7 +849,7 @@ msgstr "" msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: ../../c-api/memory.rst:573 +#: ../../c-api/memory.rst:572 msgid "``p[-S+1:0]``" msgstr "``p[-S+1:0]``" @@ -857,7 +857,7 @@ msgstr "``p[-S+1:0]``" msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: ../../c-api/memory.rst:582 +#: ../../c-api/memory.rst:575 msgid "``p[0:N]``" msgstr "``p[0:N]``" @@ -872,7 +872,7 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: ../../c-api/memory.rst:585 +#: ../../c-api/memory.rst:584 msgid "``p[N:N+S]``" msgstr "``p[N:N+S]``" @@ -880,7 +880,7 @@ msgstr "``p[N:N+S]``" msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: ../../c-api/memory.rst:596 +#: ../../c-api/memory.rst:587 msgid "``p[N+S:N+2*S]``" msgstr "``p[N+S:N+2*S]``" diff --git a/c-api/structures.po b/c-api/structures.po index dd50ff5bfe..9c279efad3 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -274,9 +274,9 @@ msgid "" "METH_KEYWORDS>`." msgstr "" -#: ../../c-api/structures.rst:288 +#: ../../c-api/structures.rst:282 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" -msgstr "" +msgstr ":c:expr:`METH_VARARGS | METH_KEYWORDS`" #: ../../c-api/structures.rst:283 msgid "" @@ -300,7 +300,7 @@ msgstr "" msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: ../../c-api/structures.rst:319 +#: ../../c-api/structures.rst:307 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" @@ -322,7 +322,7 @@ msgid "" "METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: ../../c-api/structures.rst:340 +#: ../../c-api/structures.rst:329 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" diff --git a/extending/embedding.po b/extending/embedding.po index eada804fa8..718cabe1a8 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,7 +65,7 @@ msgid "" "Python objects." msgstr "" -#: ../../extending/embedding.rst:42 +#: ../../extending/embedding.rst:41 msgid ":ref:`c-api-index`" msgstr ":ref:`c-api-index`" diff --git a/extending/index.po b/extending/index.po index 90d2e8c013..113566b730 100644 --- a/extending/index.po +++ b/extending/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 00:19+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2021-07-06 22:18+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -78,7 +78,7 @@ msgstr "" "org/>`_\\ ,提供了更為簡單及更為複雜的多種方法,來為 Python 建立 C 和 C ++ 擴" "充。" -#: ../../extending/index.rst:40 +#: ../../extending/index.rst:37 msgid "" "`Python Packaging User Guide: Binary Extensions `_" diff --git a/extending/newtypes.po b/extending/newtypes.po index 3743c97676..657f146dcb 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -567,7 +567,7 @@ msgid "" "sample of its use might be something like the following::" msgstr "" -#: ../../extending/newtypes.rst:595 +#: ../../extending/newtypes.rst:594 msgid "Download CPython source releases." msgstr "" diff --git a/faq/design.po b/faq/design.po index 9d6db0533b..333c79fcbf 100644 --- a/faq/design.po +++ b/faq/design.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-11 00:04+0000\n" +"POT-Creation-Date: 2024-03-14 00:03+0000\n" "PO-Revision-Date: 2023-08-31 11:34+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -463,14 +463,14 @@ msgstr "為什麼 Python 內沒有 switch 或 case 陳述式?" #: ../../faq/design.rst:262 msgid "" -"You can do this easily enough with a sequence of ``if... elif... elif... " -"else``. For literal values, or constants within a namespace, you can also " -"use a ``match ... case`` statement." +"In general, structured switch statements execute one block of code when an " +"expression has a particular value or set of values. Since Python 3.10 one " +"can easily match literal values, or constants within a namespace, with a " +"``match ... case`` statement. An older alternative is a sequence of ``if... " +"elif... elif... else``." msgstr "" -"你可以用一連串的 ``if... elif... elif... else`` 來輕易達成相同的效果。對於單" -"純的值或是在命名空間內的常數,你也可以使用 ``match ... case`` 陳述式。" -#: ../../faq/design.rst:266 +#: ../../faq/design.rst:268 msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " @@ -480,7 +480,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:277 +#: ../../faq/design.rst:279 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" @@ -490,7 +490,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:289 +#: ../../faq/design.rst:291 msgid "" "It's suggested that you use a prefix for the method names, such as " "``visit_`` in this example. Without such a prefix, if values are coming " @@ -502,11 +502,17 @@ msgstr "" #: ../../faq/design.rst:295 msgid "" +"Imitating switch with fallthrough, as with C's switch-case-default, is " +"possible, much harder, and less needed." +msgstr "" + +#: ../../faq/design.rst:300 +msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" msgstr "為何不能在直譯器上模擬執行緒,而要使用作業系統的特定實作方式?" -#: ../../faq/design.rst:297 +#: ../../faq/design.rst:302 msgid "" "Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " "for each Python stack frame. Also, extensions can call back into Python at " @@ -517,7 +523,7 @@ msgstr "" "的堆疊框。同時,擴充套件可以隨時呼叫 Python,因此完整的實作必須要支援 C 的執" "行緒。" -#: ../../faq/design.rst:302 +#: ../../faq/design.rst:307 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " @@ -526,11 +532,11 @@ msgstr "" "答案二:幸運地,`無堆疊 (Stackless) Python `_ 完全重新設計了直譯器迴圈,並避免了 C 堆疊。" -#: ../../faq/design.rst:307 +#: ../../faq/design.rst:312 msgid "Why can't lambda expressions contain statements?" msgstr "為何 lambda 運算式不能包含陳述式?" -#: ../../faq/design.rst:309 +#: ../../faq/design.rst:314 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -543,7 +549,7 @@ msgstr "" "立功能的 lambda,Python 的 lambda 只是一個在你懶得定義函式時可用的一個簡寫表" "達法。" -#: ../../faq/design.rst:315 +#: ../../faq/design.rst:320 msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " @@ -556,11 +562,11 @@ msgstr "" "宣告。因此唯一用 lambda 而非區域性的函式的優點就是你不需要多想一個函式名稱 — " "但這樣就會是一個區域變數被指定成函式物件(和 lambda 運算式的結果同類)!" -#: ../../faq/design.rst:323 +#: ../../faq/design.rst:328 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "Python 可以被編譯成機器語言、C 語言或其他種語言嗎?" -#: ../../faq/design.rst:325 +#: ../../faq/design.rst:330 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ " @@ -571,11 +577,11 @@ msgstr "" "本。 `Nuitka `_ 是一個有潛力編譯器,可以把 Python 編" "譯成 C++,他的目標是支援完整的 Python 語言。" -#: ../../faq/design.rst:332 +#: ../../faq/design.rst:337 msgid "How does Python manage memory?" msgstr "Python 如何管理記憶體?" -#: ../../faq/design.rst:334 +#: ../../faq/design.rst:339 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -591,7 +597,7 @@ msgstr "" "件。 :mod:`gc` 模組提供了可以執行垃圾收集、抓取除錯統計數據和調整收集器參數的" "函式。" -#: ../../faq/design.rst:342 +#: ../../faq/design.rst:347 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such " @@ -603,7 +609,7 @@ msgstr "" "www.pypy.org>`_)中,會使用像是成熟的垃圾收集器等不同機制。如果你的 Python 程" "式碼的表現取決於參照計次的實作,這個相異處會導致一些微小的移植問題。" -#: ../../faq/design.rst:348 +#: ../../faq/design.rst:353 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" @@ -613,7 +619,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:355 +#: ../../faq/design.rst:360 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to ``f`` closes the previous file. With a traditional GC, " @@ -624,7 +630,7 @@ msgstr "" "的新指派都會關閉前面打開的檔案。然而用傳統的垃圾回收 (GC) 的話,這些檔案物件" "只會在不固定且有可能很長的時間後被收集(並關閉)。" -#: ../../faq/design.rst:360 +#: ../../faq/design.rst:365 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " @@ -636,11 +642,11 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:370 +#: ../../faq/design.rst:375 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "為何 CPython 不使用更多傳統的垃圾回收機制?" -#: ../../faq/design.rst:372 +#: ../../faq/design.rst:377 msgid "" "For one thing, this is not a C standard feature and hence it's not portable. " "(Yes, we know about the Boehm GC library. It has bits of assembler code for " @@ -652,7 +658,7 @@ msgstr "" "庫。他有可相容於\\ *大多數*\\ 平台的組合語言程式碼,但依然不是全部,而即便它" "大多數是通透的,也並不完全,要讓它跟 Python 相容還是需要做一些修補。)" -#: ../../faq/design.rst:378 +#: ../../faq/design.rst:383 msgid "" "Traditional GC also becomes a problem when Python is embedded into other " "applications. While in a standalone Python it's fine to replace the " @@ -668,11 +674,11 @@ msgstr "" "free() 替代品,而不是用 Python 的。以現在來說,CPython 和實作 malloc() 和 " "free() 的程式相處融洽。" -#: ../../faq/design.rst:387 +#: ../../faq/design.rst:392 msgid "Why isn't all memory freed when CPython exits?" msgstr "當 CPython 結束時,為何所有的記憶體不會被釋放?" -#: ../../faq/design.rst:389 +#: ../../faq/design.rst:394 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -686,7 +692,7 @@ msgstr "" "(例如:像是 Purify 之類的工具會抱怨)。然而,Python 在關閉的時候會積極清理記" "憶體並嘗試刪除每個物件。" -#: ../../faq/design.rst:396 +#: ../../faq/design.rst:401 msgid "" "If you want to force Python to delete certain things on deallocation use " "the :mod:`atexit` module to run a function that will force those deletions." @@ -694,11 +700,11 @@ msgstr "" "如果你想要強迫 Python 在釋放記憶體時刪除特定的東西,你可以用 :mod:`atexit` 模" "組來執行會強制刪除的函式。" -#: ../../faq/design.rst:401 +#: ../../faq/design.rst:406 msgid "Why are there separate tuple and list data types?" msgstr "為何要把元組 (tuple) 和串列 (list) 分成兩個資料型態?" -#: ../../faq/design.rst:403 +#: ../../faq/design.rst:408 msgid "" "Lists and tuples, while similar in many respects, are generally used in " "fundamentally different ways. Tuples can be thought of as being similar to " @@ -712,7 +718,7 @@ msgstr "" "合,以一組為單位進行操作。舉例來說,一個笛卡兒坐標系可以適當地表示成一個有二" "或三個值的元組。" -#: ../../faq/design.rst:410 +#: ../../faq/design.rst:415 msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " @@ -726,7 +732,7 @@ msgstr "" "案,以包含字串的串列表示。如果你新增了幾個檔案到這個目錄,一般來說操作結果的" "函式也會正常運作。" -#: ../../faq/design.rst:418 +#: ../../faq/design.rst:423 msgid "" "Tuples are immutable, meaning that once a tuple has been created, you can't " "replace any of its elements with a new value. Lists are mutable, meaning " @@ -738,11 +744,11 @@ msgstr "" "可變,所以你可以改變裡面的元素。只有不可變的元素可以成為字典的鍵,所以只能把" "元組當成鍵,而串列則不行。" -#: ../../faq/design.rst:425 +#: ../../faq/design.rst:430 msgid "How are lists implemented in CPython?" msgstr "串列 (list) 在 CPython 中是怎麼實作的?" -#: ../../faq/design.rst:427 +#: ../../faq/design.rst:432 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -753,13 +759,13 @@ msgstr "" "接串列 (linked list)。實作上,他是一個連續的物件參照 (reference) 陣列,並把指" "向此陣列的指標 (pointer) 和陣列長度存在串列的標頭結構內。" -#: ../../faq/design.rst:431 +#: ../../faq/design.rst:436 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." msgstr "因此,用索引來找串列特定項 ``a[i]`` 的代價和串列大小或是索引值無關。" -#: ../../faq/design.rst:434 +#: ../../faq/design.rst:439 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -770,11 +776,11 @@ msgstr "" "用一些巧妙的方法,當陣列必須變大時,會多收集一些額外的空間,接下來幾次新增時" "就不需要再調整大小了。" -#: ../../faq/design.rst:441 +#: ../../faq/design.rst:446 msgid "How are dictionaries implemented in CPython?" msgstr "字典 (dictionaries) 在 CPython 中是怎麼實作的?" -#: ../../faq/design.rst:443 +#: ../../faq/design.rst:448 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -784,7 +790,7 @@ msgstr "" "CPython 的字典是用可調整大小的雜湊表 (hash table) 實作的。比起 B 樹 (B-" "tree),在搜尋(目前為止最常見的操作)方面有更好的表現,實作上也較為簡單。" -#: ../../faq/design.rst:447 +#: ../../faq/design.rst:452 msgid "" "Dictionaries work by computing a hash code for each key stored in the " "dictionary using the :func:`hash` built-in function. The hash code varies " @@ -802,11 +808,11 @@ msgstr "" "被用來計算值在內部陣列儲存的位置。假設你存的鍵都有不同的雜湊值,那字典只需要" "常數時間 — 用大 O 表示法 (Big-O notation) 就是 *O*\\ (1) — 來找任意一個鍵。" -#: ../../faq/design.rst:458 +#: ../../faq/design.rst:463 msgid "Why must dictionary keys be immutable?" msgstr "為何字典的鍵一定是不可變的?" -#: ../../faq/design.rst:460 +#: ../../faq/design.rst:465 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -824,7 +830,7 @@ msgstr "" "值不同的緣故,你找不到他。而如果你嘗試用舊的值去尋找,也一樣找不到,因為他的" "雜湊結果和原先物件不同。" -#: ../../faq/design.rst:469 +#: ../../faq/design.rst:474 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -834,11 +840,11 @@ msgstr "" "如果你想要用串列作為字典的索引,把他轉換成元組即可。``tuple(L)`` 函式會建立一" "個和串列 ``L`` 一樣內容的元組。而元組是不可變的,所以可以用來當成字典的鍵。" -#: ../../faq/design.rst:473 +#: ../../faq/design.rst:478 msgid "Some unacceptable solutions that have been proposed:" msgstr "也有人提出一些不能接受的方法:" -#: ../../faq/design.rst:475 +#: ../../faq/design.rst:480 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" @@ -848,7 +854,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:481 +#: ../../faq/design.rst:486 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " @@ -858,7 +864,7 @@ msgstr "" "這將會導致 :exc:`KeyError` 例外,因為 ``[1, 2]`` 的 id 在第一行和第二行是不同" "的。換句話說,字典的鍵應該要用 ``==`` 來做比較,而不是用 :keyword:`is`。" -#: ../../faq/design.rst:485 +#: ../../faq/design.rst:490 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " @@ -867,7 +873,7 @@ msgstr "" "複製一個串列作為鍵。這一樣不會成功,因為串列是可變的,他可以包含自己的參照," "所以複製會形成一個無窮迴圈。" -#: ../../faq/design.rst:489 +#: ../../faq/design.rst:494 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -878,7 +884,7 @@ msgstr "" "產生一種難以追蹤的 bug。他同時也違背了一項字典的重要定則:在 ``d.keys()`` 的" "每個值都可以當成字典的鍵。" -#: ../../faq/design.rst:494 +#: ../../faq/design.rst:499 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -891,7 +897,7 @@ msgstr "" "值,就像用元組包含串列來做為鍵。把一個物件當成鍵,需要將從他開始可以接觸到的" "所有物件都標記成只能讀取 — 所以再一次,自己參照自己的物件會導致無窮迴圈。" -#: ../../faq/design.rst:500 +#: ../../faq/design.rst:505 msgid "" "There is a trick to get around this if you need to, but use it at your own " "risk: You can wrap a mutable structure inside a class instance which has " @@ -907,7 +913,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:525 +#: ../../faq/design.rst:530 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " @@ -916,7 +922,7 @@ msgstr "" "請注意,雜湊的計算可能變得複雜,因為有串列成員不可雜湊 (unhashable) 和算術溢" "位的可能性。" -#: ../../faq/design.rst:529 +#: ../../faq/design.rst:534 msgid "" "Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." "__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " @@ -929,7 +935,7 @@ msgstr "" "__hash__()``),這個事實必須要成立。如果無法滿足這項限制,那字典和其他用雜湊" "為基底的結構會出現不正常的行為。" -#: ../../faq/design.rst:534 +#: ../../faq/design.rst:539 msgid "" "In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " "dictionary the wrapped list must not change to avoid anomalies. Don't do " @@ -940,11 +946,11 @@ msgstr "" "變以避免不正常的事情發生。除非你已經謹慎思考過你的需求和無法滿足條件的後果," "不然請不要這麼做。請自行注意。" -#: ../../faq/design.rst:541 +#: ../../faq/design.rst:546 msgid "Why doesn't list.sort() return the sorted list?" msgstr "為何 list.sort() 不是回傳排序過的串列?" -#: ../../faq/design.rst:543 +#: ../../faq/design.rst:548 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -957,7 +963,7 @@ msgstr "" "列裡做排序。為了提醒你這件事,他不會回傳排序過的串列。這樣一來,當你需要排序" "過和未排序過的串列時,你就不會被誤導而不小心覆蓋掉串列。" -#: ../../faq/design.rst:549 +#: ../../faq/design.rst:554 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " @@ -970,11 +976,11 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:559 +#: ../../faq/design.rst:564 msgid "How do you specify and enforce an interface spec in Python?" msgstr "如何在 Python 中指定和強制使用一個介面規範 (interface spec)?" -#: ../../faq/design.rst:561 +#: ../../faq/design.rst:566 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -984,7 +990,7 @@ msgstr "" "像是 C++ 和 Java 等語言提供了模組的介面規範,他描述了該模組的方法和函式的原" "型。很多人認為這種在編譯時強制執行的介面規範在建構大型程式時十分有幫助。" -#: ../../faq/design.rst:566 +#: ../../faq/design.rst:571 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " @@ -999,13 +1005,13 @@ msgstr "" "系列好用的抽象基底類別,像是 :class:`~collections.abc.Iterable`、:class:" "`~collections.abc.Container` 和 :class:`~collections.abc.MutableMapping`。" -#: ../../faq/design.rst:573 +#: ../../faq/design.rst:578 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." msgstr "對 Python 來說,很多介面規範的優點可以用對元件適當的測試規則來達到。" -#: ../../faq/design.rst:576 +#: ../../faq/design.rst:581 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " @@ -1022,7 +1028,7 @@ msgstr "" "模擬來獨立測試。:mod:`doctest` 和 :mod:`unittest` 模組或第三方的測試框架可以" "用來建構詳盡徹底的測試套件來測試模組裡的每一行程式碼。" -#: ../../faq/design.rst:584 +#: ../../faq/design.rst:589 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -1039,7 +1045,7 @@ msgstr "" "而介面規範沒辦法測試你的 :meth:`!list.append` 是不是真的有正確的實作,但這在" "測試套件裡是件很簡單的事。" -#: ../../faq/design.rst:592 +#: ../../faq/design.rst:597 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -1051,11 +1057,11 @@ msgstr "" "(test-driven development) 是一個越來越受歡迎的設計方法,他要求先完成部分的測" "試套件,再去撰寫真的要用的程式碼。當然 Python 也允許你草率地不寫任何測試。" -#: ../../faq/design.rst:600 +#: ../../faq/design.rst:605 msgid "Why is there no goto?" msgstr "為何沒有 goto 語法?" -#: ../../faq/design.rst:602 +#: ../../faq/design.rst:607 msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " @@ -1072,7 +1078,7 @@ msgstr "" "`while` 和 :keyword:`for` 陳述式,可能會有 :keyword:`continue` 和 :keyword:" "`break`)。" -#: ../../faq/design.rst:609 +#: ../../faq/design.rst:614 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -1085,18 +1091,18 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:625 +#: ../../faq/design.rst:630 msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " "considered an abuse of ``goto`` anyway. Use sparingly." msgstr "" "這依然不能讓你跳進迴圈內,這通常被認為是對 ``goto`` 的濫用。請小心使用。" -#: ../../faq/design.rst:630 +#: ../../faq/design.rst:635 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "為何純字串 (r-string) 不能以反斜線結尾?" -#: ../../faq/design.rst:632 +#: ../../faq/design.rst:637 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " @@ -1105,7 +1111,7 @@ msgstr "" "更精確地來說,他不能以奇數個反斜線結尾:尾端未配對的反斜線會使結尾的引號被轉" "義 (escapes),變成一個未結束的字串。" -#: ../../faq/design.rst:636 +#: ../../faq/design.rst:641 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -1119,7 +1125,7 @@ msgstr "" "此。相對地,他讓你用一個反斜線轉義引號。這些規則在他們預想的目的上正常地運" "作。" -#: ../../faq/design.rst:643 +#: ../../faq/design.rst:648 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" @@ -1128,7 +1134,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:648 +#: ../../faq/design.rst:653 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" @@ -1136,11 +1142,11 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:656 +#: ../../faq/design.rst:661 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "為何 Python 沒有屬性賦值的 with 陳述式?" -#: ../../faq/design.rst:658 +#: ../../faq/design.rst:663 msgid "" "Python has a :keyword:`with` statement that wraps the execution of a block, " "calling code on the entrance and exit from the block. Some languages have a " @@ -1151,11 +1157,11 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:666 +#: ../../faq/design.rst:671 msgid "In Python, such a construct would be ambiguous." msgstr "但在 Python,這種結構是模糊的。" -#: ../../faq/design.rst:668 +#: ../../faq/design.rst:673 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " @@ -1166,7 +1172,7 @@ msgstr "" "以清楚地知道是哪一個成員被指派值。這是靜態型別的重點 — 在編譯的時候,編譯器" "\\ *永遠*\\ 都知道每個變數的作用域 (scope)。" -#: ../../faq/design.rst:673 +#: ../../faq/design.rst:678 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1178,14 +1184,14 @@ msgstr "" "員屬性可能在執行時從物件中被新增或移除。這使得如果簡單來看的話,我們無法得知" "以下哪個屬性會被使用:區域的、全域的、或是成員屬性?" -#: ../../faq/design.rst:679 +#: ../../faq/design.rst:684 msgid "For instance, take the following incomplete snippet::" msgstr "" "以下列不完整的程式碼為例:\n" "\n" "::" -#: ../../faq/design.rst:685 +#: ../../faq/design.rst:690 msgid "" "The snippet assumes that ``a`` must have a member attribute called ``x``. " "However, there is nothing in Python that tells the interpreter this. What " @@ -1198,7 +1204,7 @@ msgstr "" "變數稱為 ``x``,那在這個 :keyword:`with` 區塊會被使用嗎?如你所見,Python 動" "態的天性使得這種選擇更加困難。" -#: ../../faq/design.rst:691 +#: ../../faq/design.rst:696 msgid "" "The primary benefit of :keyword:`with` and similar language features " "(reduction of code volume) can, however, easily be achieved in Python by " @@ -1209,14 +1215,14 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:698 +#: ../../faq/design.rst:703 msgid "write this::" msgstr "" "應該寫成這樣:\n" "\n" "::" -#: ../../faq/design.rst:705 +#: ../../faq/design.rst:710 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " @@ -1225,7 +1231,7 @@ msgstr "" "這也有提升執行速度的副作用,因為 Python 的名稱綁定解析會在執行的時候發生,而" "第二版只需要執行解析一次即可。" -#: ../../faq/design.rst:709 +#: ../../faq/design.rst:714 msgid "" "Similar proposals that would introduce syntax to further reduce code volume, " "such as using a 'leading dot', have been rejected in favour of explicitness " @@ -1235,11 +1241,11 @@ msgstr "" "dot)」,但這些提案已被捨棄,以維持程式的明確性(參閱 https://mail.python.org/" "pipermail/python-ideas/2016-May/040070.html)。" -#: ../../faq/design.rst:715 +#: ../../faq/design.rst:720 msgid "Why don't generators support the with statement?" msgstr "為何產生器 (generator) 不支援 with 陳述式?" -#: ../../faq/design.rst:717 +#: ../../faq/design.rst:722 msgid "" "For technical reasons, a generator used directly as a context manager would " "not work correctly. When, as is most common, a generator is used as an " @@ -1252,11 +1258,11 @@ msgstr "" "要的話,你可以在 :keyword:`with` 陳述式裡用 :func:`contextlib." "closing(generator) ` 來包裝他。" -#: ../../faq/design.rst:725 +#: ../../faq/design.rst:730 msgid "Why are colons required for the if/while/def/class statements?" msgstr "為何 if、while、def、class 陳述式裡需要冒號?" -#: ../../faq/design.rst:727 +#: ../../faq/design.rst:732 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" @@ -1265,14 +1271,14 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:733 +#: ../../faq/design.rst:738 msgid "versus ::" msgstr "" "以及:\n" "\n" "::" -#: ../../faq/design.rst:738 +#: ../../faq/design.rst:743 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " @@ -1281,7 +1287,7 @@ msgstr "" "注意第二個例子稍微易讀一些的原因。可以更進一步觀察,一個冒號是如何放在這個 " "FAQ 答案的例子裡的,這是標準的英文用法。" -#: ../../faq/design.rst:741 +#: ../../faq/design.rst:746 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1291,11 +1297,11 @@ msgstr "" "另一個小原因是冒號會使編輯器更容易做語法突顯,他們只需要看冒號的位置就可以決" "定是否需要更多縮排,而不用做更多繁複精密的程式碼剖析。" -#: ../../faq/design.rst:747 +#: ../../faq/design.rst:752 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "為何 Python 允許在串列和元組末端加上逗號?" -#: ../../faq/design.rst:749 +#: ../../faq/design.rst:754 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1304,11 +1310,11 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:760 +#: ../../faq/design.rst:765 msgid "There are several reasons to allow this." msgstr "這有許多原因可被允許。" -#: ../../faq/design.rst:762 +#: ../../faq/design.rst:767 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1318,7 +1324,7 @@ msgstr "" "當你要把串列、元組或字典的值寫成多行時,這樣做會讓你新增元素時較為方便,因為" "你不需要在前一行加上逗號。這幾行的值也可以被重新排序,而不會導致語法錯誤。" -#: ../../faq/design.rst:767 +#: ../../faq/design.rst:772 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" @@ -1327,7 +1333,7 @@ msgstr "" "\n" "::" -#: ../../faq/design.rst:777 +#: ../../faq/design.rst:782 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " @@ -1336,8 +1342,16 @@ msgstr "" "這個串列看起來有四個元素,但他其實只有三個:「fee」、「fiefoo」、「fum」。永" "遠記得加上逗號以避免這種錯誤。" -#: ../../faq/design.rst:780 +#: ../../faq/design.rst:785 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." msgstr "允許結尾逗號也讓生成的程式碼更容易產生。" + +#~ msgid "" +#~ "You can do this easily enough with a sequence of ``if... elif... elif... " +#~ "else``. For literal values, or constants within a namespace, you can also " +#~ "use a ``match ... case`` statement." +#~ msgstr "" +#~ "你可以用一連串的 ``if... elif... elif... else`` 來輕易達成相同的效果。對於" +#~ "單純的值或是在命名空間內的常數,你也可以使用 ``match ... case`` 陳述式。" diff --git a/faq/extending.po b/faq/extending.po index 35c8560543..bb23c222dc 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 10:36+0000\n" +"POT-Creation-Date: 2024-03-14 00:03+0000\n" "PO-Revision-Date: 2023-02-18 13:08+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -80,9 +80,9 @@ msgid "" "learn Python's C API." msgstr "" "`Cython `_ 及其相關的 `Pyrex `_ 是接受稍微修改Python形式並生成相" -"應的C程式碼。 Cython 和 Pyrex 使編寫擴充程式成為可能,而無需學習 Python 的 C " -"API。" +"canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ 是接受稍微修改 Python 形式並生成" +"相應的 C 程式碼。 Cython 和 Pyrex 使編寫擴充程式成為可能,而無需學習 Python " +"的 C API。" #: ../../faq/extending.rst:50 #, fuzzy @@ -90,17 +90,16 @@ msgid "" "If you need to interface to some C or C++ library for which no Python " "extension currently exists, you can try wrapping the library's data types " "and functions with a tool such as `SWIG `_. `SIP " -"`__, `CXX `_ `Boost `_, or `Weave `_ are also alternatives " -"for wrapping C++ libraries." +"`__, `CXX `_ `Boost `_, or `Weave " +"`_ are also alternatives for wrapping C++ " +"libraries." msgstr "" "如果你需要連接到當前不存在 Python 擴充的某些 C 或 C++ 函式庫,你可以嘗試使用 " -"`SWIG `_ 等工具包裝函式庫的資料型別和函式。 `SIP " -"`__, `CXX `_ `Boost `_ 或 `Weave `_ 也是包裝 C++ 函式庫的替" -"代方法。" +"`SWIG `_ 等工具包裝函式庫的資料型別和函式。`SIP " +"`__、`CXX `_ `Boost `_ 或 `Weave " +"`_ 也是包裝 C++ 函式庫的替代方法。" #: ../../faq/extending.rst:61 msgid "How can I execute arbitrary Python statements from C?" @@ -116,11 +115,11 @@ msgid "" "func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in " "``Python/pythonrun.c``." msgstr "" -"執行此操作的最高級別函式是:c:func:`PyRun_SimpleString`,它採用單個字串引數在" +"執行此操作的最高級別函式是 :c:func:`PyRun_SimpleString`,它採用單個字串引數在" "模組 ``__main__`` 的上下文中執行,並回傳 ``0`` 表示成功,``- 1`` 發生例外時" -"(包括:exc:`SyntaxError`)。如果你想要更多的控制,使用:c:func:" -"`PyRun_String`;在 ``Python/pythonrun.c`` 中查看 :c:func:`PyRun_SimpleString` " -"的源程式碼。" +"(包括 :exc:`SyntaxError`)。如果你想要更多的控制,使用 :c:func:" +"`PyRun_String`;在 ``Python/pythonrun.c`` 中查看 :c:func:" +"`PyRun_SimpleString` 的原始碼。" #: ../../faq/extending.rst:72 #, fuzzy @@ -210,9 +209,8 @@ msgid "" "the argument values::" msgstr "" ":c:func:`PyObject_CallMethod` 函式可用於呼叫物件的任意方法。參數是物件、要呼" -"叫的方法的名稱、與 :c:func:`Py_BuildValue` 一起使用的格式字串,以及引數值:\n" -"\n" -"::" +"叫的方法的名稱、與 :c:func:`Py_BuildValue` 一起使用的格式字串,以及引數" +"值: ::" #: ../../faq/extending.rst:121 #, fuzzy @@ -230,9 +228,7 @@ msgid "" "(assuming the file object pointer is \"f\")::" msgstr "" "例如,使用引數 10、0 呼叫檔案物件的 \"seek\" 方法(假設檔案物件指標為 " -"\"f\"):\n" -"\n" -"::" +"\"f\"): ::" #: ../../faq/extending.rst:135 #, fuzzy @@ -280,10 +276,7 @@ msgstr "如何從 C 存取用 Python 編寫的模組?" #: ../../faq/extending.rst:184 #, fuzzy msgid "You can get a pointer to the module object as follows::" -msgstr "" -"你可以獲得指向模組物件的指標,如下所示:\n" -"\n" -"::" +msgstr "你可以獲得指向模組物件的指標,如下所示: ::" #: ../../faq/extending.rst:188 #, fuzzy @@ -303,10 +296,7 @@ msgstr "" msgid "" "You can then access the module's attributes (i.e. any name defined in the " "module) as follows::" -msgstr "" -"然後,你可以存取模組的屬性(即模組中定義的任何名稱),如下所示:\n" -"\n" -"::" +msgstr "然後,你可以存取模組的屬性(即模組中定義的任何名稱),如下所示: ::" #: ../../faq/extending.rst:199 #, fuzzy diff --git a/faq/library.po b/faq/library.po index bc85469cc8..e22a9e883d 100644 --- a/faq/library.po +++ b/faq/library.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-21 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2023-02-18 13:22+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -34,7 +34,6 @@ msgid "General Library Questions" msgstr "常見函式問題" #: ../../faq/library.rst:15 -#, fuzzy msgid "How do I find a module or application to perform task X?" msgstr "我如何找到執行任務 X 的模組或應用程式?" @@ -94,10 +93,7 @@ msgstr "用 C 編寫並動態載入的模組(.dll、.pyd、.so、.sl 等); msgid "" "modules written in C and linked with the interpreter; to get a list of " "these, type::" -msgstr "" -"用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入:\n" -"\n" -"::" +msgstr "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入: ::" #: ../../faq/library.rst:47 msgid "How do I make a Python script executable on Unix?" @@ -127,10 +123,7 @@ msgstr "" msgid "" "The second can be done in a number of ways. The most straightforward way is " "to write ::" -msgstr "" -"第二個可以通過多種方式完成。最直接的方法是寫:\n" -"\n" -"::" +msgstr "第二個可以通過多種方式完成。最直接的方法是寫: ::" #: ../../faq/library.rst:61 #, fuzzy @@ -149,9 +142,7 @@ msgid "" msgstr "" "如果你希望腳本獨立於 Python 直譯器所在的位置,你可以使用 :program:`env` 程" "式。幾乎所有 Unix 變體都支援以下內容,假設 Python 直譯器位於使用者的 :envvar:" -"`PATH` 上的目錄中:\n" -"\n" -"::" +"`PATH` 上的目錄中: ::" #: ../../faq/library.rst:71 #, fuzzy @@ -179,9 +170,8 @@ msgid "" "The minor disadvantage is that this defines the script's __doc__ string. " "However, you can fix that by adding ::" msgstr "" -"次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問題:\n" -"\n" -"::" +"次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問" +"題: ::" #: ../../faq/library.rst:94 msgid "Is there a curses/termcap package for Python?" @@ -236,18 +226,12 @@ msgstr "為什麼我的信號處理程式不起作用?" msgid "" "The most common problem is that the signal handler is declared with the " "wrong argument list. It is called as ::" -msgstr "" -"最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為:\n" -"\n" -"::" +msgstr "最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為: ::" #: ../../faq/library.rst:125 #, fuzzy msgid "so it should be declared with two parameters::" -msgstr "" -"所以它應該用兩個參數聲明:\n" -"\n" -"::" +msgstr "所以它應該用兩個參數聲明: ::" #: ../../faq/library.rst:132 msgid "Common tasks" @@ -295,10 +279,7 @@ msgstr "" #: ../../faq/library.rst:152 #, fuzzy msgid "The \"global main logic\" of your program may be as simple as ::" -msgstr "" -"你程式的「全局主邏輯」可能像一樣簡單:\n" -"\n" -"::" +msgstr "你程式的「全局主邏輯」可能像一樣簡單: ::" #: ../../faq/library.rst:157 #, fuzzy @@ -328,10 +309,7 @@ msgstr "" msgid "" "\"Support modules\" that are not intended to be the main module of a program " "may include a self-test of the module. ::" -msgstr "" -"不打算成為程式主要模組的 \"支援模組\" 可能包括模組的自檢:\n" -"\n" -"::" +msgstr "不打算成為程式主要模組的 \"支援模組\" 可能包括模組的自檢: ::" #: ../../faq/library.rst:173 #, fuzzy @@ -411,9 +389,7 @@ msgid "" "A simple fix is to add a sleep to the end of the program that's long enough " "for all the threads to finish::" msgstr "" -"一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成:\n" -"\n" -"::" +"一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成: ::" #: ../../faq/library.rst:265 #, fuzzy @@ -429,10 +405,7 @@ msgstr "" #: ../../faq/library.rst:269 #, fuzzy msgid "A simple fix is to add a tiny sleep to the start of the run function::" -msgstr "" -"一個簡單的修復方法是在運行函式的開頭新增一個小睡眠:\n" -"\n" -"::" +msgstr "一個簡單的修復方法是在運行函式的開頭新增一個小睡眠: ::" #: ../../faq/library.rst:282 #, fuzzy @@ -479,10 +452,7 @@ msgstr "" #: ../../faq/library.rst:302 #, fuzzy msgid "Here's a trivial example::" -msgstr "" -"這是一個簡單的例子:\n" -"\n" -"::" +msgstr "這是一個簡單的例子: ::" #: ../../faq/library.rst:340 #, fuzzy @@ -538,17 +508,12 @@ msgid "" "D, D1, D2 are dicts, x, y are objects, i, j are ints)::" msgstr "" "例如,以下操作都是原子的(L、L1、L2 是列表,D、D1、D2 是字典,x、y 是物件," -"i、j 是整數):\n" -"\n" -"::" +"i、j 是整數): ::" #: ../../faq/library.rst:392 #, fuzzy msgid "These aren't::" -msgstr "" -"這些不是:\n" -"\n" -"::" +msgstr "這些不是: ::" #: ../../faq/library.rst:399 #, fuzzy @@ -767,9 +732,7 @@ msgid "" "integer in big-endian format from a file::" msgstr "" "例如,以下程式碼從一個檔案中以大端格式讀取兩個 2 位元組整數和一個 4 位元組整" -"數:\n" -"\n" -"::" +"數: ::" #: ../../faq/library.rst:512 #, fuzzy @@ -821,40 +784,39 @@ msgstr "" "型別相同。因此,要從使用 :func:`os.popen` 建立的管道 *p* 中讀取 *n* 個位元" "組,你需要使用 ``p.read(n)``。" -#: ../../faq/library.rst:618 +#: ../../faq/library.rst:617 msgid "How do I access the serial (RS232) port?" msgstr "如何存取序列 (RS232) 連接埠?" -#: ../../faq/library.rst:620 +#: ../../faq/library.rst:619 msgid "For Win32, OSX, Linux, BSD, Jython, IronPython:" msgstr "對於 Win32、OSX、Linux、BSD、Jython、IronPython:" -#: ../../faq/library.rst:622 -msgid "https://pypi.org/project/pyserial/" -msgstr "https://pypi.org/project/pyserial/" +#: ../../faq/library.rst:621 +msgid ":pypi:`pyserial`" +msgstr ":pypi:`pyserial`" -#: ../../faq/library.rst:624 +#: ../../faq/library.rst:623 msgid "For Unix, see a Usenet post by Mitch Chapman:" msgstr "對於 Unix,請參閱 Mitch Chapman 的 Usenet 貼文:" -#: ../../faq/library.rst:626 +#: ../../faq/library.rst:625 msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" -#: ../../faq/library.rst:630 +#: ../../faq/library.rst:629 #, fuzzy msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" msgstr "為什麼關閉 sys.stdout (stdin, stderr) 並沒有真正關閉它?" -#: ../../faq/library.rst:632 -#, fuzzy +#: ../../faq/library.rst:631 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." msgstr "" -"Python :term:`file objects ` 是低階 C 檔案描述器的高階抽象層。" +"Python :term:`檔案物件 `\\ 是低階 C 檔案描述器的高階抽象層。" -#: ../../faq/library.rst:635 +#: ../../faq/library.rst:634 #, fuzzy msgid "" "For most file objects you create in Python via the built-in :func:`open` " @@ -867,7 +829,7 @@ msgstr "" "close()`` 從 Python 的角度將 Python 檔案物件標記為已關閉,並安排關閉底層 C 檔" "案描述器。當 ``f`` 變成垃圾時,這也會自動發生在 ``f`` 的析構函式中。" -#: ../../faq/library.rst:641 +#: ../../faq/library.rst:640 #, fuzzy msgid "" "But stdin, stdout and stderr are treated specially by Python, because of the " @@ -879,7 +841,7 @@ msgstr "" "態。運行 ``sys.stdout.close()`` 將 Python 級檔案物件標記為已關閉,但是 * " "not* 關閉關聯的 C 檔案描述器。" -#: ../../faq/library.rst:646 +#: ../../faq/library.rst:645 #, fuzzy msgid "" "To close the underlying C file descriptor for one of these three, you should " @@ -887,24 +849,21 @@ msgid "" "extension modules trying to do I/O). If it is, use :func:`os.close`::" msgstr "" "要關閉這三個之一的底層 C 檔案描述器,你應該首先確定這是你真正想要做的(例如," -"你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`:\n" -"\n" -"::" +"你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`: ::" -#: ../../faq/library.rst:654 -#, fuzzy +#: ../../faq/library.rst:653 msgid "Or you can use the numeric constants 0, 1 and 2, respectively." msgstr "或者你可以分別使用數字常數 0、1 和 2。" -#: ../../faq/library.rst:658 +#: ../../faq/library.rst:657 msgid "Network/Internet Programming" msgstr "網路 (Network)/網際網路 (Internet) 程式" -#: ../../faq/library.rst:661 +#: ../../faq/library.rst:660 msgid "What WWW tools are there for Python?" msgstr "Python 有哪些 WWW 工具?" -#: ../../faq/library.rst:663 +#: ../../faq/library.rst:662 #, fuzzy msgid "" "See the chapters titled :ref:`internet` and :ref:`netdata` in the Library " @@ -912,9 +871,9 @@ msgid "" "side and client-side web systems." msgstr "" "請參閱函式庫參考手冊中標題為 :ref:`internet` 和 :ref:`netdata` 的章節。 " -"Python 有許多模組可以幫助你構建服務器端和客戶端 Web 系統。" +"Python 有許多模組可以幫助你構建伺服器端和用戶端 Web 系統。" -#: ../../faq/library.rst:669 +#: ../../faq/library.rst:668 #, fuzzy msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" @@ -923,7 +882,7 @@ msgstr "" "可用框架的摘要由 Paul Boddie 在 https://wiki.python.org/moin/" "WebProgramming\\ 維護。" -#: ../../faq/library.rst:672 +#: ../../faq/library.rst:671 #, fuzzy msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " @@ -934,11 +893,11 @@ msgstr "" "net/claird/comp.lang.python/web_python 維護著一組有用的關於 Python 網路技術的" "頁面。" -#: ../../faq/library.rst:677 +#: ../../faq/library.rst:676 msgid "How can I mimic CGI form submission (METHOD=POST)?" msgstr "如何模擬 CGI 表單送出 (submission) (METHOD=POST)?" -#: ../../faq/library.rst:679 +#: ../../faq/library.rst:678 #, fuzzy msgid "" "I would like to retrieve web pages that are the result of POSTing a form. Is " @@ -946,14 +905,11 @@ msgid "" msgstr "" "我想檢索作為發布表單結果的網頁。是否有現成的程式碼可以讓我輕鬆地做到這一點?" -#: ../../faq/library.rst:682 +#: ../../faq/library.rst:681 msgid "Yes. Here's a simple example that uses :mod:`urllib.request`::" -msgstr "" -"是的,這是一個 :mod:`urllib.request` 的簡單範例:\n" -"\n" -"::" +msgstr "是的,這是一個 :mod:`urllib.request` 的簡單範例: ::" -#: ../../faq/library.rst:697 +#: ../../faq/library.rst:696 #, fuzzy msgid "" "Note that in general for percent-encoded POST operations, query strings must " @@ -961,19 +917,17 @@ msgid "" "``name=Guy Steele, Jr.``::" msgstr "" "請注意,通常對於百分比編碼的 POST 操作,查詢字串必須使用 :func:`urllib.parse." -"urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``:\n" -"\n" -"::" +"urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``: ::" -#: ../../faq/library.rst:705 +#: ../../faq/library.rst:704 msgid ":ref:`urllib-howto` for extensive examples." msgstr ":ref:`urllib-howto` 內有大量範例。" -#: ../../faq/library.rst:709 +#: ../../faq/library.rst:708 msgid "What module should I use to help with generating HTML?" msgstr "我應該使用什麼模組來輔助產生 HTML?" -#: ../../faq/library.rst:713 +#: ../../faq/library.rst:712 #, fuzzy msgid "" "You can find a collection of useful links on the `Web Programming wiki page " @@ -982,26 +936,24 @@ msgstr "" "你可以在 \"Web 編寫程式維基頁面 \" 上找到一組有用的鏈接。" -#: ../../faq/library.rst:718 +#: ../../faq/library.rst:717 msgid "How do I send mail from a Python script?" msgstr "如何從 Python 腳本發送郵件?" -#: ../../faq/library.rst:720 +#: ../../faq/library.rst:719 msgid "Use the standard library module :mod:`smtplib`." msgstr "使用標準函式庫模組 :mod:`smtplib`。" -#: ../../faq/library.rst:722 +#: ../../faq/library.rst:721 #, fuzzy msgid "" "Here's a very simple interactive mail sender that uses it. This method will " "work on any host that supports an SMTP listener. ::" msgstr "" "這是一個使用它的非常簡單的交互式郵件發件人。此方法適用於任何支援 SMTP 偵聽器" -"的主機。:\n" -"\n" -"::" +"的主機。: ::" -#: ../../faq/library.rst:742 +#: ../../faq/library.rst:741 #, fuzzy msgid "" "A Unix-only alternative uses sendmail. The location of the sendmail program " @@ -1011,23 +963,20 @@ msgid "" msgstr "" "一個僅適用於 Unix 的替代方案使用 sendmail。 sendmail 程式的位置因係統而異;有" "時是 \"/usr/lib/sendmail\" ,有時是 \"/usr/sbin/sendmail\" 。 sendmail 手冊頁" -"將幫助你。這是一些示例程式碼:\n" -"\n" -"::" +"將幫助你。這是一些示例程式碼: ::" -#: ../../faq/library.rst:762 +#: ../../faq/library.rst:761 #, fuzzy msgid "How do I avoid blocking in the connect() method of a socket?" msgstr "如何避免阻塞 socket 的 connect() 方法?" -#: ../../faq/library.rst:764 -#, fuzzy +#: ../../faq/library.rst:763 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." msgstr ":mod:`select` 模組通常用於幫助處理 socket 上的非同步 I/O。" -#: ../../faq/library.rst:767 +#: ../../faq/library.rst:766 #, fuzzy msgid "" "To prevent the TCP connect from blocking, you can set the socket to non-" @@ -1043,7 +992,7 @@ msgstr "" "誤號 ``.errno``。 ``errno.EINPROGRESS`` 表示連接正在進行中,但尚未完成。不同" "的作業系統將回傳不同的值,因此你將不得不檢查系統回傳的內容。" -#: ../../faq/library.rst:775 +#: ../../faq/library.rst:774 #, fuzzy msgid "" "You can use the :meth:`~socket.socket.connect_ex` method to avoid creating " @@ -1053,11 +1002,11 @@ msgid "" "`select.select` to check if it's writable." msgstr "" "你可以使用 :meth:`socket.connect_ex` 方法來避免建立例外。它只會回傳 errno " -"值。要輪詢,你可以稍後再次呼叫:meth:`socket.connect_ex` - ``0`` 或 ``errno." -"EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給:meth:` select." -"select` 檢查它是否可寫。" +"值。要輪詢,你可以稍後再次呼叫 :meth:`socket.connect_ex` - ``0`` 或 ``errno." +"EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給 :meth:`select.select` " +"檢查它是否可寫。" -#: ../../faq/library.rst:783 +#: ../../faq/library.rst:782 msgid "" "The :mod:`asyncio` module provides a general purpose single-threaded and " "concurrent asynchronous library, which can be used for writing non-blocking " @@ -1068,19 +1017,19 @@ msgstr "" "網路程式碼。第三方 `Twisted `_ 函式庫是一種流行且功能豐" "富的替代方案。" -#: ../../faq/library.rst:791 +#: ../../faq/library.rst:790 msgid "Databases" msgstr "資料庫" -#: ../../faq/library.rst:794 +#: ../../faq/library.rst:793 msgid "Are there any interfaces to database packages in Python?" msgstr "Python 中是否有任何資料庫套件的介面?" -#: ../../faq/library.rst:796 +#: ../../faq/library.rst:795 msgid "Yes." msgstr "有的。" -#: ../../faq/library.rst:798 +#: ../../faq/library.rst:797 #, fuzzy msgid "" "Interfaces to disk-based hashes such as :mod:`DBM ` and :mod:`GDBM " @@ -1092,7 +1041,7 @@ msgstr "" "含在標準 Python 中。還有 :mod:`sqlite3` 模組,它提供了一個輕量級的基於磁盤的" "關係資料庫。" -#: ../../faq/library.rst:803 +#: ../../faq/library.rst:802 #, fuzzy msgid "" "Support for most relational databases is available. See the " @@ -1102,12 +1051,12 @@ msgstr "" "支援大多數關係資料庫。有關詳細資訊,請參閱`DatabaseProgramming 維基頁面 " "`_。" -#: ../../faq/library.rst:809 +#: ../../faq/library.rst:808 #, fuzzy msgid "How do you implement persistent objects in Python?" msgstr "你如何在 Python 中實作持久物件?" -#: ../../faq/library.rst:811 +#: ../../faq/library.rst:810 #, fuzzy msgid "" "The :mod:`pickle` library module solves this in a very general way (though " @@ -1119,58 +1068,55 @@ msgstr "" "如打開的檔案、socket 或窗口之類的東西),而 :mod:`shelve` 庫模組使用 pickle " "和 (g) dbm 建立包含任意 Python 物件的持久映射。" -#: ../../faq/library.rst:818 +#: ../../faq/library.rst:817 msgid "Mathematics and Numerics" msgstr "數學和數值" -#: ../../faq/library.rst:821 +#: ../../faq/library.rst:820 msgid "How do I generate random numbers in Python?" msgstr "如何在 Python 中生成隨機數?" -#: ../../faq/library.rst:823 +#: ../../faq/library.rst:822 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" -msgstr "" -"標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單:\n" -"\n" -"::" +msgstr "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單: ::" -#: ../../faq/library.rst:829 +#: ../../faq/library.rst:828 msgid "This returns a random floating point number in the range [0, 1)." msgstr "這將回傳 [0, 1) 範圍內的隨機浮點數。" -#: ../../faq/library.rst:831 +#: ../../faq/library.rst:830 msgid "" "There are also many other specialized generators in this module, such as:" msgstr "該模組中還有許多其他專用生成器,例如:" -#: ../../faq/library.rst:833 +#: ../../faq/library.rst:832 msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." msgstr "``randrange(a, b)`` 會選擇 [a, b) 範圍內的一個整數。" -#: ../../faq/library.rst:834 +#: ../../faq/library.rst:833 msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)." msgstr "``uniform(a, b)`` 會選擇 [a, b) 範圍內的浮點數。" -#: ../../faq/library.rst:835 +#: ../../faq/library.rst:834 msgid "" "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." msgstr "``normalvariate(mean, sdev)`` 對常態(高斯)分佈進行採樣 (sample)。" -#: ../../faq/library.rst:837 +#: ../../faq/library.rst:836 msgid "Some higher-level functions operate on sequences directly, such as:" msgstr "一些更高階的函式會直接對序列進行操作,例如:" -#: ../../faq/library.rst:839 +#: ../../faq/library.rst:838 msgid "``choice(S)`` chooses a random element from a given sequence." msgstr "``choice(S)`` 會從給定序列中選擇一個隨機元素。" -#: ../../faq/library.rst:840 +#: ../../faq/library.rst:839 msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly." msgstr "``shuffle(L)`` 會原地 (in-place) 打亂 list,即隨機排列它。" -#: ../../faq/library.rst:842 +#: ../../faq/library.rst:841 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." diff --git a/faq/programming.po b/faq/programming.po index 995084809e..e5b88197c5 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -1302,8 +1302,8 @@ msgid "" "identity to hold, and then compilers that truncate ``i // j`` need to make " "``i % j`` have the same sign as ``i``." msgstr "" -"那麼整數除法必須回傳向下取整的結果。 C 還要求保留​​該識別性,然後截斷 ``i // j`` 的編譯器需" -"要使 ``i % j`` 具有與 ``i`` 相同的符號。" +"那麼整數除法必須回傳向下取整的結果。 C 還要求保留​​該識別性,然後截斷 ``i // " +"j`` 的編譯器需要使 ``i % j`` 具有與 ``i`` 相同的符號。" #: ../../faq/programming.rst:840 #, fuzzy @@ -2837,15 +2837,16 @@ msgid "" "object identity is assured. Generally, there are three circumstances where " "identity is guaranteed:" msgstr "" -"然而,\\* 只有\\* 當物件識別性得到保證時,識別性測試才能代替相等性測試。一般來說,保" -"證識別性的情況有以下三種:" +"然而,\\* 只有\\* 當物件識別性得到保證時,識別性測試才能代替相等性測試。一般" +"來說,保證識別性的情況有以下三種:" #: ../../faq/programming.rst:1843 msgid "" "1) Assignments create new names but do not change object identity. After " "the assignment ``new = old``, it is guaranteed that ``new is old``." msgstr "" -"1) 賦值建立新名稱但不改變物件識別性。賦值``new = old``後,保證``new is old``。" +"1) 賦值建立新名稱但不改變物件識別性。賦值 ``new = old`` 後,保證 ``new is " +"old``。" #: ../../faq/programming.rst:1846 msgid "" @@ -2853,8 +2854,8 @@ msgid "" "change object identity. After the list assignment ``s[0] = x``, it is " "guaranteed that ``s[0] is x``." msgstr "" -"2) 將物件放入存儲物件參照的容器中不會改變物件識別性。在 list 賦值 ``s[0] = x`` 之" -"後,保證 ``s[0] 是 x``。" +"2) 將物件放入存儲物件參照的容器中不會改變物件識別性。在 list 賦值 ``s[0] = " +"x`` 之後,保證 ``s[0] 是 x``。" #: ../../faq/programming.rst:1850 #, fuzzy @@ -2873,8 +2874,8 @@ msgid "" "check constants such as :class:`int` and :class:`str` which aren't " "guaranteed to be singletons::" msgstr "" -"在大多數其他情況下,識別性測試是不可取的,相等性測試是首選。特別是,識別性測試不應" -"用於檢查常數,例如不能保證是單例的 :class:`int` 和 :class:`str`:\n" +"在大多數其他情況下,識別性測試是不可取的,相等性測試是首選。特別是,識別性測" +"試不應用於檢查常數,例如不能保證是單例的 :class:`int` 和 :class:`str`:\n" "\n" "::" @@ -2899,8 +2900,8 @@ msgid "" "confusion with other objects that may have boolean values that evaluate to " "false." msgstr "" -"1) 正如 :pep:`8` 所推薦的,識別性測試是檢查 ``None`` 的首選方法。這在程式碼中讀" -"起來像簡單的英語,並避免與其他可能具有評估為 false 的布林值的物件混淆。" +"1) 正如 :pep:`8` 所推薦的,識別性測試是檢查 ``None`` 的首選方法。這在程式碼中" +"讀起來像簡單的英語,並避免與其他可能具有評估為 false 的布林值的物件混淆。" #: ../../faq/programming.rst:1885 #, fuzzy diff --git a/glossary.po b/glossary.po index e522d73076..384a71e74d 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-04 00:03+0000\n" +"POT-Creation-Date: 2024-04-15 12:57+0000\n" "PO-Revision-Date: 2023-07-02 22:47+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1601,39 +1601,10 @@ msgstr "" "解決。" #: ../../glossary.rst:728 -msgid "locale encoding" -msgstr "locale encoding(區域編碼)" - -#: ../../glossary.rst:730 -msgid "" -"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" -"`locale.setlocale(locale.LC_CTYPE, new_locale) `." -msgstr "" -"在 Unix 上,它是 LC_CTYPE 區域設定的編碼。它可以用 :func:`locale." -"setlocale(locale.LC_CTYPE, new_locale) ` 來設定。" - -#: ../../glossary.rst:733 -msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." -msgstr "在 Windows 上,它是 ANSI 代碼頁(code page,例如 ``\"cp1252\"``\\ )。" - -#: ../../glossary.rst:735 -msgid "" -"On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." -msgstr "在 Android 和 VxWorks 上,Python 使用 ``\"utf-8\"`` 作為區域編碼。" - -#: ../../glossary.rst:737 -msgid "``locale.getencoding()`` can be used to get the locale encoding." -msgstr "``locale.getencoding()`` 可以用來取得區域編碼。" - -#: ../../glossary.rst:739 -msgid "See also the :term:`filesystem encoding and error handler`." -msgstr "也請參考 :term:`filesystem encoding and error handler`。" - -#: ../../glossary.rst:740 msgid "list" msgstr "list(串列)" -#: ../../glossary.rst:742 +#: ../../glossary.rst:730 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " @@ -1643,11 +1614,11 @@ msgstr "" "似其他語言中的一個陣列 (array) 而較不像一個鏈結串列 (linked list),因為存取元" "素的時間複雜度是 *O*\\ (1)。" -#: ../../glossary.rst:745 +#: ../../glossary.rst:733 msgid "list comprehension" msgstr "list comprehension(串列綜合運算)" -#: ../../glossary.rst:747 +#: ../../glossary.rst:735 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1661,11 +1632,11 @@ msgstr "" "keyword:`if` 子句是選擇性的。如果省略它,則 ``range(256)`` 中的所有元素都會被" "處理。" -#: ../../glossary.rst:753 +#: ../../glossary.rst:741 msgid "loader" msgstr "loader(載入器)" -#: ../../glossary.rst:755 +#: ../../glossary.rst:743 msgid "" "An object that loads a module. It must define a method named :meth:" "`load_module`. A loader is typically returned by a :term:`finder`. See :pep:" @@ -1677,6 +1648,35 @@ msgstr "" "`302`,關於 :term:`abstract base class`\\ (抽象基底類別),請參閱 :class:" "`importlib.abc.Loader`。" +#: ../../glossary.rst:747 +msgid "locale encoding" +msgstr "locale encoding(區域編碼)" + +#: ../../glossary.rst:749 +msgid "" +"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" +"`locale.setlocale(locale.LC_CTYPE, new_locale) `." +msgstr "" +"在 Unix 上,它是 LC_CTYPE 區域設定的編碼。它可以用 :func:`locale." +"setlocale(locale.LC_CTYPE, new_locale) ` 來設定。" + +#: ../../glossary.rst:752 +msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." +msgstr "在 Windows 上,它是 ANSI 代碼頁(code page,例如 ``\"cp1252\"``\\ )。" + +#: ../../glossary.rst:754 +msgid "" +"On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." +msgstr "在 Android 和 VxWorks 上,Python 使用 ``\"utf-8\"`` 作為區域編碼。" + +#: ../../glossary.rst:756 +msgid ":func:`locale.getencoding` can be used to get the locale encoding." +msgstr ":func:`locale.getencoding` 可以用來取得區域編碼。" + +#: ../../glossary.rst:758 +msgid "See also the :term:`filesystem encoding and error handler`." +msgstr "也請參考 :term:`filesystem encoding and error handler`。" + #: ../../glossary.rst:759 msgid "magic method" msgstr "magic method(魔術方法)" @@ -1776,19 +1776,17 @@ msgstr "method resolution order(方法解析順序)" #: ../../glossary.rst:801 msgid "" "Method Resolution Order is the order in which base classes are searched for " -"a member during lookup. See `The Python 2.3 Method Resolution Order `_ for details of the algorithm " -"used by the Python interpreter since the 2.3 release." +"a member during lookup. See :ref:`python_2.3_mro` for details of the " +"algorithm used by the Python interpreter since the 2.3 release." msgstr "" "方法解析順序是在查找某個成員的過程中,base class(基底類別)被搜尋的順序。關" -"於第 2.3 版至今,Python 直譯器所使用的演算法細節,請參閱 `Python 2.3 版方法解" -"析順序 `_。" +"於 Python 自 2.3 版直譯器所使用的演算法細節,請參閱 :ref:`python_2.3_mro`。" -#: ../../glossary.rst:805 +#: ../../glossary.rst:804 msgid "module" msgstr "module(模組)" -#: ../../glossary.rst:807 +#: ../../glossary.rst:806 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -1798,15 +1796,15 @@ msgstr "" "空間,它包含任意的 Python 物件。模組是藉由 :term:`importing` 的過程,被載入" "至 Python。" -#: ../../glossary.rst:811 +#: ../../glossary.rst:810 msgid "See also :term:`package`." msgstr "另請參閱 :term:`package`\\ (套件)。" -#: ../../glossary.rst:812 +#: ../../glossary.rst:811 msgid "module spec" msgstr "module spec(模組規格)" -#: ../../glossary.rst:814 +#: ../../glossary.rst:813 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1814,19 +1812,19 @@ msgstr "" "一個命名空間,它包含用於載入模組的 import 相關資訊。它是 :class:`importlib." "machinery.ModuleSpec` 的一個實例。" -#: ../../glossary.rst:816 +#: ../../glossary.rst:815 msgid "MRO" msgstr "MRO" -#: ../../glossary.rst:818 +#: ../../glossary.rst:817 msgid "See :term:`method resolution order`." msgstr "請參閱 :term:`method resolution order`\\ (方法解析順序)。" -#: ../../glossary.rst:819 +#: ../../glossary.rst:818 msgid "mutable" msgstr "mutable(可變物件)" -#: ../../glossary.rst:821 +#: ../../glossary.rst:820 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1834,11 +1832,11 @@ msgstr "" "可變物件可以改變它們的值,但維持它們的 :func:`id`。另請參閱 :term:" "`immutable`\\ (不可變物件)。" -#: ../../glossary.rst:823 +#: ../../glossary.rst:822 msgid "named tuple" msgstr "named tuple(附名元組)" -#: ../../glossary.rst:825 +#: ../../glossary.rst:824 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -1848,7 +1846,7 @@ msgstr "" "索引 (indexable) 元素也可以用附名屬性來存取。這些型別或 class 也可以具有其他" "的特性。" -#: ../../glossary.rst:829 +#: ../../glossary.rst:828 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -1857,21 +1855,22 @@ msgstr "" "有些內建型別是 named tuple,包括由 :func:`time.localtime` 和 :func:`os.stat` " "回傳的值。另一個例子是 :data:`sys.float_info`: ::" -#: ../../glossary.rst:840 +#: ../../glossary.rst:839 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " "that inherits from :class:`tuple` and that defines named fields. Such a " -"class can be written by hand or it can be created with the factory function :" -"func:`collections.namedtuple`. The latter technique also adds some extra " -"methods that may not be found in hand-written or built-in named tuples." +"class can be written by hand, or it can be created by inheriting :class:" +"`typing.NamedTuple`, or with the factory function :func:`collections." +"namedtuple`. The latter techniques also add some extra methods that may not " +"be found in hand-written or built-in named tuples." msgstr "" "有些 named tuple 是內建型別(如上例)。或者,一個 named tuple 也可以從一個正" "規的 class 定義來建立,只要該 class 是繼承自 :class:`tuple`,且定義了附名欄" -"位 (named field) 即可。這類的 class 可以手工編寫,也可以使用工廠函式 " -"(factory function) :func:`collections.namedtuple` 來建立。後者技術也增加了一" -"些額外的 method,這些 method 可能是在手寫或內建的 named tuple 中,無法找到" -"的。" +"位 (named field) 即可。這類的 class 可以手工編寫、可以繼承自 :class:`typing." +"NamedTuple` 來建立,也可以使用工廠函式 (factory function) :func:`collections." +"namedtuple` 來建立。後者技術也增加了一些額外的 method,這些 method 可能是在手" +"寫或內建的 named tuple 中,無法找到的。" #: ../../glossary.rst:847 msgid "namespace" diff --git a/howto/curses.po b/howto/curses.po index 76ed9f39c4..82f7853a4f 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 10:36+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -82,8 +82,7 @@ msgid "" "curses library will figure out what control codes need to be sent to the " "terminal to produce the right output. curses doesn't provide many user-" "interface concepts such as buttons, checkboxes, or dialogs; if you need such " -"features, consider a user interface library such as `Urwid `_." +"features, consider a user interface library such as :pypi:`Urwid`." msgstr "" #: ../../howto/curses.rst:48 @@ -102,15 +101,14 @@ msgstr "" #: ../../howto/curses.rst:58 msgid "" "The Windows version of Python doesn't include the :mod:`curses` module. A " -"ported version called `UniCurses `_ is " -"available." +"ported version called :pypi:`UniCurses` is available." msgstr "" -#: ../../howto/curses.rst:64 +#: ../../howto/curses.rst:63 msgid "The Python curses module" -msgstr "" +msgstr "Python curses 模組" -#: ../../howto/curses.rst:66 +#: ../../howto/curses.rst:65 msgid "" "The Python module is a fairly simple wrapper over the C functions provided " "by curses; if you're already familiar with curses programming in C, it's " @@ -121,7 +119,7 @@ msgid "" "this covered in more detail later." msgstr "" -#: ../../howto/curses.rst:74 +#: ../../howto/curses.rst:73 msgid "" "This HOWTO is an introduction to writing text-mode programs with curses and " "Python. It doesn't attempt to be a complete guide to the curses API; for " @@ -129,11 +127,11 @@ msgid "" "pages for ncurses. It will, however, give you the basic ideas." msgstr "" -#: ../../howto/curses.rst:81 +#: ../../howto/curses.rst:80 msgid "Starting and ending a curses application" msgstr "" -#: ../../howto/curses.rst:83 +#: ../../howto/curses.rst:82 msgid "" "Before doing anything, curses must be initialized. This is done by calling " "the :func:`~curses.initscr` function, which will determine the terminal " @@ -143,21 +141,21 @@ msgid "" "after the name of the corresponding C variable. ::" msgstr "" -#: ../../howto/curses.rst:94 +#: ../../howto/curses.rst:93 msgid "" "Usually curses applications turn off automatic echoing of keys to the " "screen, in order to be able to read keys and only display them under certain " "circumstances. This requires calling the :func:`~curses.noecho` function. ::" msgstr "" -#: ../../howto/curses.rst:101 +#: ../../howto/curses.rst:100 msgid "" "Applications will also commonly need to react to keys instantly, without " "requiring the Enter key to be pressed; this is called cbreak mode, as " "opposed to the usual buffered input mode. ::" msgstr "" -#: ../../howto/curses.rst:107 +#: ../../howto/curses.rst:106 msgid "" "Terminals usually return special keys, such as the cursor keys or navigation " "keys such as Page Up and Home, as a multibyte escape sequence. While you " @@ -167,20 +165,20 @@ msgid "" "keypad mode. ::" msgstr "" -#: ../../howto/curses.rst:116 +#: ../../howto/curses.rst:115 msgid "" "Terminating a curses application is much easier than starting one. You'll " "need to call::" msgstr "" -#: ../../howto/curses.rst:123 +#: ../../howto/curses.rst:122 msgid "" "to reverse the curses-friendly terminal settings. Then call the :func:" "`~curses.endwin` function to restore the terminal to its original operating " "mode. ::" msgstr "" -#: ../../howto/curses.rst:129 +#: ../../howto/curses.rst:128 msgid "" "A common problem when debugging a curses application is to get your terminal " "messed up when the application dies without restoring the terminal to its " @@ -189,13 +187,13 @@ msgid "" "you type them, for example, which makes using the shell difficult." msgstr "" -#: ../../howto/curses.rst:135 +#: ../../howto/curses.rst:134 msgid "" "In Python you can avoid these complications and make debugging much easier " "by importing the :func:`curses.wrapper` function and using it like this::" msgstr "" -#: ../../howto/curses.rst:154 +#: ../../howto/curses.rst:153 msgid "" "The :func:`~curses.wrapper` function takes a callable object and does the " "initializations described above, also initializing colors if color support " @@ -208,18 +206,18 @@ msgid "" "and traceback." msgstr "" -#: ../../howto/curses.rst:166 +#: ../../howto/curses.rst:165 msgid "Windows and Pads" msgstr "" -#: ../../howto/curses.rst:168 +#: ../../howto/curses.rst:167 msgid "" "Windows are the basic abstraction in curses. A window object represents a " "rectangular area of the screen, and supports methods to display text, erase " "it, allow the user to input strings, and so forth." msgstr "" -#: ../../howto/curses.rst:172 +#: ../../howto/curses.rst:171 msgid "" "The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " "window object that covers the entire screen. Many programs may need only " @@ -229,7 +227,7 @@ msgid "" "window object. ::" msgstr "" -#: ../../howto/curses.rst:183 +#: ../../howto/curses.rst:182 msgid "" "Note that the coordinate system used in curses is unusual. Coordinates are " "always passed in the order *y,x*, and the top-left corner of a window is " @@ -239,7 +237,7 @@ msgid "" "curses since it was first written, and it's too late to change things now." msgstr "" -#: ../../howto/curses.rst:191 +#: ../../howto/curses.rst:190 msgid "" "Your application can determine the size of the screen by using the :data:" "`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " @@ -247,14 +245,14 @@ msgid "" "- 1, curses.COLS - 1)``." msgstr "" -#: ../../howto/curses.rst:196 +#: ../../howto/curses.rst:195 msgid "" "When you call a method to display or erase text, the effect doesn't " "immediately show up on the display. Instead you must call the :meth:" "`~curses.window.refresh` method of window objects to update the screen." msgstr "" -#: ../../howto/curses.rst:201 +#: ../../howto/curses.rst:200 msgid "" "This is because curses was originally written with slow 300-baud terminal " "connections in mind; with these terminals, minimizing the time required to " @@ -265,7 +263,7 @@ msgid "" "because they're never visible." msgstr "" -#: ../../howto/curses.rst:210 +#: ../../howto/curses.rst:209 msgid "" "In practice, explicitly telling curses to redraw a window doesn't really " "complicate programming with curses much. Most programs go into a flurry of " @@ -275,7 +273,7 @@ msgid "" "stdscr.refresh` or the :meth:`!refresh` method of some other relevant window." msgstr "" -#: ../../howto/curses.rst:218 +#: ../../howto/curses.rst:217 msgid "" "A pad is a special case of a window; it can be larger than the actual " "display screen, and only a portion of the pad displayed at a time. Creating " @@ -284,7 +282,7 @@ msgid "" "will be displayed. ::" msgstr "" -#: ../../howto/curses.rst:239 +#: ../../howto/curses.rst:238 msgid "" "The :meth:`!refresh` call displays a section of the pad in the rectangle " "extending from coordinate (5,5) to coordinate (20,75) on the screen; the " @@ -293,36 +291,36 @@ msgid "" "the same methods." msgstr "" -#: ../../howto/curses.rst:245 +#: ../../howto/curses.rst:244 msgid "" "If you have multiple windows and pads on screen there is a more efficient " "way to update the screen and prevent annoying screen flicker as each part of " "the screen gets updated. :meth:`!refresh` actually does two things:" msgstr "" -#: ../../howto/curses.rst:250 +#: ../../howto/curses.rst:249 msgid "" "Calls the :meth:`~curses.window.noutrefresh` method of each window to update " "an underlying data structure representing the desired state of the screen." msgstr "" -#: ../../howto/curses.rst:253 +#: ../../howto/curses.rst:252 msgid "" "Calls the function :func:`~curses.doupdate` function to change the physical " "screen to match the desired state recorded in the data structure." msgstr "" -#: ../../howto/curses.rst:256 +#: ../../howto/curses.rst:255 msgid "" "Instead you can call :meth:`!noutrefresh` on a number of windows to update " "the data structure, and then call :func:`!doupdate` to update the screen." msgstr "" -#: ../../howto/curses.rst:262 +#: ../../howto/curses.rst:261 msgid "Displaying Text" msgstr "" -#: ../../howto/curses.rst:264 +#: ../../howto/curses.rst:263 msgid "" "From a C programmer's point of view, curses may sometimes look like a twisty " "maze of functions, all subtly different. For example, :c:func:`!addstr` " @@ -334,7 +332,7 @@ msgid "" "coordinate." msgstr "" -#: ../../howto/curses.rst:273 +#: ../../howto/curses.rst:272 msgid "" "Fortunately the Python interface hides all these details. ``stdscr`` is a " "window object like any other, and methods such as :meth:`~curses.window." @@ -342,58 +340,58 @@ msgid "" "forms." msgstr "" -#: ../../howto/curses.rst:279 +#: ../../howto/curses.rst:278 msgid "Form" msgstr "" -#: ../../howto/curses.rst:279 ../../howto/curses.rst:347 +#: ../../howto/curses.rst:278 ../../howto/curses.rst:346 msgid "Description" msgstr "描述" -#: ../../howto/curses.rst:281 +#: ../../howto/curses.rst:280 msgid "*str* or *ch*" msgstr "*str* 或 *ch*" -#: ../../howto/curses.rst:281 +#: ../../howto/curses.rst:280 msgid "Display the string *str* or character *ch* at the current position" msgstr "" -#: ../../howto/curses.rst:284 +#: ../../howto/curses.rst:283 msgid "*str* or *ch*, *attr*" msgstr "" -#: ../../howto/curses.rst:284 +#: ../../howto/curses.rst:283 msgid "" "Display the string *str* or character *ch*, using attribute *attr* at the " "current position" msgstr "" -#: ../../howto/curses.rst:288 +#: ../../howto/curses.rst:287 msgid "*y*, *x*, *str* or *ch*" msgstr "*y*、*x*、*str* 或 *ch*" -#: ../../howto/curses.rst:288 +#: ../../howto/curses.rst:287 msgid "Move to position *y,x* within the window, and display *str* or *ch*" msgstr "" -#: ../../howto/curses.rst:291 +#: ../../howto/curses.rst:290 msgid "*y*, *x*, *str* or *ch*, *attr*" msgstr "*y*、*x*、*str* 或 *ch*、*attr*" -#: ../../howto/curses.rst:291 +#: ../../howto/curses.rst:290 msgid "" "Move to position *y,x* within the window, and display *str* or *ch*, using " "attribute *attr*" msgstr "" -#: ../../howto/curses.rst:295 +#: ../../howto/curses.rst:294 msgid "" "Attributes allow displaying text in highlighted forms such as boldface, " "underline, reverse code, or in color. They'll be explained in more detail " "in the next subsection." msgstr "" -#: ../../howto/curses.rst:300 +#: ../../howto/curses.rst:299 msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " @@ -402,13 +400,13 @@ msgid "" "system encoding as returned by :func:`locale.getencoding`." msgstr "" -#: ../../howto/curses.rst:306 +#: ../../howto/curses.rst:305 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." msgstr "" -#: ../../howto/curses.rst:309 +#: ../../howto/curses.rst:308 msgid "" "Constants are provided for extension characters; these constants are " "integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " @@ -416,7 +414,7 @@ msgid "" "for drawing borders). You can also use the appropriate Unicode character." msgstr "" -#: ../../howto/curses.rst:315 +#: ../../howto/curses.rst:314 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -427,7 +425,7 @@ msgid "" "cursor blinking at some apparently random location." msgstr "" -#: ../../howto/curses.rst:323 +#: ../../howto/curses.rst:322 msgid "" "If your application doesn't need a blinking cursor at all, you can call " "``curs_set(False)`` to make it invisible. For compatibility with older " @@ -437,11 +435,11 @@ msgid "" "leaving it in odd locations." msgstr "" -#: ../../howto/curses.rst:332 +#: ../../howto/curses.rst:331 msgid "Attributes and Color" msgstr "" -#: ../../howto/curses.rst:334 +#: ../../howto/curses.rst:333 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -449,7 +447,7 @@ msgid "" "an attribute for each cell on the screen." msgstr "" -#: ../../howto/curses.rst:339 +#: ../../howto/curses.rst:338 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -459,72 +457,72 @@ msgid "" "attributes, listed here." msgstr "" -#: ../../howto/curses.rst:347 +#: ../../howto/curses.rst:346 msgid "Attribute" msgstr "屬性" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:348 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:348 msgid "Blinking text" msgstr "" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:350 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:350 msgid "Extra bright or bold text" msgstr "" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:352 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:352 msgid "Half bright text" msgstr "" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:354 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:354 msgid "Reverse-video text" msgstr "" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:356 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:356 msgid "The best highlighting mode available" msgstr "" -#: ../../howto/curses.rst:359 +#: ../../howto/curses.rst:358 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: ../../howto/curses.rst:359 +#: ../../howto/curses.rst:358 msgid "Underlined text" msgstr "" -#: ../../howto/curses.rst:362 +#: ../../howto/curses.rst:361 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" msgstr "" -#: ../../howto/curses.rst:369 +#: ../../howto/curses.rst:368 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " "color xterms." msgstr "" -#: ../../howto/curses.rst:373 +#: ../../howto/curses.rst:372 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -536,7 +534,7 @@ msgid "" "for the sake of these functions.)" msgstr "" -#: ../../howto/curses.rst:383 +#: ../../howto/curses.rst:382 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -546,11 +544,11 @@ msgid "" "work on all terminals." msgstr "" -#: ../../howto/curses.rst:390 +#: ../../howto/curses.rst:389 msgid "An example, which displays a line of text using color pair 1::" msgstr "" -#: ../../howto/curses.rst:395 +#: ../../howto/curses.rst:394 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -558,7 +556,7 @@ msgid "" "hard-wired to white on black, and cannot be changed." msgstr "" -#: ../../howto/curses.rst:400 +#: ../../howto/curses.rst:399 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -567,20 +565,20 @@ msgid "" "const:`curses.COLOR_RED`, and so forth." msgstr "" -#: ../../howto/curses.rst:406 +#: ../../howto/curses.rst:405 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" -#: ../../howto/curses.rst:411 +#: ../../howto/curses.rst:410 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " "color with::" msgstr "" -#: ../../howto/curses.rst:417 +#: ../../howto/curses.rst:416 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -592,23 +590,22 @@ msgid "" "your system's man pages for more information." msgstr "" -#: ../../howto/curses.rst:428 +#: ../../howto/curses.rst:427 msgid "User Input" -msgstr "" +msgstr "使用者輸入" -#: ../../howto/curses.rst:430 +#: ../../howto/curses.rst:429 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" -"`curses` module adds a basic text-input widget. (Other libraries such as " -"`Urwid `_ have more extensive collections " -"of widgets.)" +"`curses` module adds a basic text-input widget. (Other libraries such as :" +"pypi:`Urwid` have more extensive collections of widgets.)" msgstr "" -#: ../../howto/curses.rst:435 +#: ../../howto/curses.rst:433 msgid "There are two methods for getting input from a window:" msgstr "" -#: ../../howto/curses.rst:437 +#: ../../howto/curses.rst:435 msgid "" ":meth:`~curses.window.getch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " @@ -616,7 +613,7 @@ msgid "" "should be moved before pausing." msgstr "" -#: ../../howto/curses.rst:442 +#: ../../howto/curses.rst:440 msgid "" ":meth:`~curses.window.getkey` does the same thing but converts the integer " "to a string. Individual characters are returned as 1-character strings, and " @@ -624,7 +621,7 @@ msgid "" "name such as ``KEY_UP`` or ``^G``." msgstr "" -#: ../../howto/curses.rst:447 +#: ../../howto/curses.rst:445 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." "nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" @@ -636,7 +633,7 @@ msgid "" "tenths of a second), curses raises an exception." msgstr "" -#: ../../howto/curses.rst:457 +#: ../../howto/curses.rst:455 msgid "" "The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " "represents the ASCII code of the key pressed. Values greater than 255 are " @@ -646,7 +643,7 @@ msgid "" "program may look something like this::" msgstr "" -#: ../../howto/curses.rst:473 +#: ../../howto/curses.rst:471 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -656,7 +653,7 @@ msgid "" "returns the control character corresponding to its argument." msgstr "" -#: ../../howto/curses.rst:480 +#: ../../howto/curses.rst:478 msgid "" "There's also a method to retrieve an entire string, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " @@ -665,7 +662,7 @@ msgid "" "number of characters. ::" msgstr "" -#: ../../howto/curses.rst:491 +#: ../../howto/curses.rst:489 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -673,16 +670,16 @@ msgid "" "results either with or without trailing spaces. Here's an example::" msgstr "" -#: ../../howto/curses.rst:515 +#: ../../howto/curses.rst:513 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" -#: ../../howto/curses.rst:519 +#: ../../howto/curses.rst:517 msgid "For More Information" msgstr "" -#: ../../howto/curses.rst:521 +#: ../../howto/curses.rst:519 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -690,7 +687,7 @@ msgid "" "complete. You should browse it next." msgstr "" -#: ../../howto/curses.rst:526 +#: ../../howto/curses.rst:524 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -699,7 +696,7 @@ msgid "" "ref:`ACS_\\* ` characters available to you." msgstr "" -#: ../../howto/curses.rst:533 +#: ../../howto/curses.rst:531 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -709,30 +706,30 @@ msgid "" "org/>`_ to learn more about submitting patches to Python." msgstr "" -#: ../../howto/curses.rst:541 +#: ../../howto/curses.rst:539 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." msgstr "" -#: ../../howto/curses.rst:543 +#: ../../howto/curses.rst:541 msgid "`The ncurses man page `_" msgstr "`ncurses 使用者手冊 `_" -#: ../../howto/curses.rst:544 +#: ../../howto/curses.rst:542 msgid "" "`The ncurses FAQ `_" msgstr "" "`ncurses 問答集 `_" -#: ../../howto/curses.rst:545 +#: ../../howto/curses.rst:543 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " "curses or Urwid." msgstr "" -#: ../../howto/curses.rst:547 +#: ../../howto/curses.rst:545 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " diff --git a/howto/functional.po b/howto/functional.po index 12ddb77d69..cd1722c4e9 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -731,7 +731,7 @@ msgid "" "the features of generator expressions:" msgstr "" -#: ../../howto/functional.rst:640 +#: ../../howto/functional.rst:631 msgid "" ":func:`map(f, iterA, iterB, ...) ` returns an iterator over the sequence" msgstr "" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index fabf89e2ee..acaf42d09c 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-13 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1036,69 +1036,75 @@ msgid "" msgstr "" #: ../../howto/logging-cookbook.rst:1850 -msgid "Subclassing QueueHandler - a ZeroMQ example" +msgid "Subclassing QueueHandler and QueueListener- a ZeroMQ example" msgstr "" -#: ../../howto/logging-cookbook.rst:1852 +#: ../../howto/logging-cookbook.rst:1853 ../../howto/logging-cookbook.rst:1986 +msgid "Subclass ``QueueHandler``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1855 msgid "" "You can use a :class:`QueueHandler` subclass to send messages to other kinds " "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " "socket is created separately and passed to the handler (as its 'queue')::" msgstr "" -#: ../../howto/logging-cookbook.rst:1871 +#: ../../howto/logging-cookbook.rst:1874 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" msgstr "" -#: ../../howto/logging-cookbook.rst:1889 -msgid "Subclassing QueueListener - a ZeroMQ example" +#: ../../howto/logging-cookbook.rst:1892 ../../howto/logging-cookbook.rst:1922 +msgid "Subclass ``QueueListener``" msgstr "" -#: ../../howto/logging-cookbook.rst:1891 +#: ../../howto/logging-cookbook.rst:1894 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3950 -msgid "Module :mod:`logging`" -msgstr ":mod:`logging` 模組" - -#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:3950 -msgid "API reference for the logging module." +#: ../../howto/logging-cookbook.rst:1912 +msgid "Subclassing QueueHandler and QueueListener- a ``pynng`` example" msgstr "" -#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3953 -msgid "Module :mod:`logging.config`" -msgstr ":mod:`logging.config` 模組" - -#: ../../howto/logging-cookbook.rst:1913 ../../howto/logging-cookbook.rst:3953 -msgid "Configuration API for the logging module." +#: ../../howto/logging-cookbook.rst:1914 +msgid "" +"In a similar way to the above section, we can implement a listener and " +"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The following " +"snippets illustrate -- you can test them in an environment which has " +"``pynng`` installed. Just for variety, we present the listener first." msgstr "" -#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3956 -msgid "Module :mod:`logging.handlers`" -msgstr ":mod:`logging.handlers` 模組" +#: ../../howto/logging-cookbook.rst:2037 +msgid "" +"You can run the above two snippets in separate command shells. If we run the " +"listener in one shell and run the sender in two separate shells, we should " +"see something like the following. In the first sender shell:" +msgstr "" -#: ../../howto/logging-cookbook.rst:1916 ../../howto/logging-cookbook.rst:3956 -msgid "Useful handlers included with the logging module." +#: ../../howto/logging-cookbook.rst:2054 +msgid "In the second sender shell:" msgstr "" -#: ../../howto/logging-cookbook.rst:1918 -msgid ":ref:`A basic logging tutorial `" -msgstr ":ref:`基本的 logging 教學 `" +#: ../../howto/logging-cookbook.rst:2069 +msgid "In the listener shell:" +msgstr "" -#: ../../howto/logging-cookbook.rst:1920 -msgid ":ref:`A more advanced logging tutorial `" -msgstr ":ref:`進階的 logging 教學 `" +#: ../../howto/logging-cookbook.rst:2093 +msgid "" +"As you can see, the logging from the two sender processes is interleaved in " +"the listener's output." +msgstr "" -#: ../../howto/logging-cookbook.rst:1926 +#: ../../howto/logging-cookbook.rst:2098 msgid "An example dictionary-based configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:1928 +#: ../../howto/logging-cookbook.rst:2100 msgid "" "Below is an example of a logging configuration dictionary - it's taken from " "the `documentation on the Django project `_ of the Django documentation." msgstr "" -#: ../../howto/logging-cookbook.rst:1988 +#: ../../howto/logging-cookbook.rst:2160 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" -#: ../../howto/logging-cookbook.rst:1990 +#: ../../howto/logging-cookbook.rst:2162 msgid "" "An example of how you can define a namer and rotator is given in the " "following runnable script, which shows gzip compression of the log file::" msgstr "" -#: ../../howto/logging-cookbook.rst:2021 +#: ../../howto/logging-cookbook.rst:2193 msgid "" "After running this, you will see six new files, five of which are compressed:" msgstr "" -#: ../../howto/logging-cookbook.rst:2034 +#: ../../howto/logging-cookbook.rst:2206 msgid "A more elaborate multiprocessing example" msgstr "" -#: ../../howto/logging-cookbook.rst:2036 +#: ../../howto/logging-cookbook.rst:2208 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " @@ -1140,7 +1146,7 @@ msgid "" "in a real multiprocessing scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:2041 +#: ../../howto/logging-cookbook.rst:2213 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -1153,17 +1159,17 @@ msgid "" "own scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:2051 +#: ../../howto/logging-cookbook.rst:2223 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" -#: ../../howto/logging-cookbook.rst:2263 +#: ../../howto/logging-cookbook.rst:2435 msgid "Inserting a BOM into messages sent to a SysLogHandler" msgstr "" -#: ../../howto/logging-cookbook.rst:2265 +#: ../../howto/logging-cookbook.rst:2437 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -1172,7 +1178,7 @@ msgid "" "<5424#section-6>`.)" msgstr "" -#: ../../howto/logging-cookbook.rst:2271 +#: ../../howto/logging-cookbook.rst:2443 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " @@ -1180,7 +1186,7 @@ msgid "" "hence not allowing any pure-ASCII component to appear before it." msgstr "" -#: ../../howto/logging-cookbook.rst:2277 +#: ../../howto/logging-cookbook.rst:2449 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -1189,33 +1195,33 @@ msgid "" "encoded using UTF-8, then you need to do the following:" msgstr "" -#: ../../howto/logging-cookbook.rst:2283 +#: ../../howto/logging-cookbook.rst:2455 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:2289 +#: ../../howto/logging-cookbook.rst:2461 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" -#: ../../howto/logging-cookbook.rst:2292 +#: ../../howto/logging-cookbook.rst:2464 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" -#: ../../howto/logging-cookbook.rst:2296 +#: ../../howto/logging-cookbook.rst:2468 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" -#: ../../howto/logging-cookbook.rst:2300 +#: ../../howto/logging-cookbook.rst:2472 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -1224,11 +1230,11 @@ msgid "" "daemon may complain." msgstr "" -#: ../../howto/logging-cookbook.rst:2307 +#: ../../howto/logging-cookbook.rst:2479 msgid "Implementing structured logging" msgstr "" -#: ../../howto/logging-cookbook.rst:2309 +#: ../../howto/logging-cookbook.rst:2481 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -1240,31 +1246,31 @@ msgid "" "machine-parseable manner::" msgstr "" -#: ../../howto/logging-cookbook.rst:2333 +#: ../../howto/logging-cookbook.rst:2505 msgid "If the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:2339 ../../howto/logging-cookbook.rst:2381 +#: ../../howto/logging-cookbook.rst:2511 ../../howto/logging-cookbook.rst:2553 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" -#: ../../howto/logging-cookbook.rst:2342 +#: ../../howto/logging-cookbook.rst:2514 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2375 +#: ../../howto/logging-cookbook.rst:2547 msgid "When the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:2390 +#: ../../howto/logging-cookbook.rst:2562 msgid "Customizing handlers with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:2392 +#: ../../howto/logging-cookbook.rst:2564 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -1274,24 +1280,24 @@ msgid "" "customize handler creation using a plain function such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:2406 +#: ../../howto/logging-cookbook.rst:2578 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" -#: ../../howto/logging-cookbook.rst:2439 +#: ../../howto/logging-cookbook.rst:2611 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" -#: ../../howto/logging-cookbook.rst:2486 +#: ../../howto/logging-cookbook.rst:2658 msgid "To run this, you will probably need to run as ``root``:" msgstr "" -#: ../../howto/logging-cookbook.rst:2496 +#: ../../howto/logging-cookbook.rst:2668 msgid "" "Note that this example uses Python 3.3 because that's where :func:`shutil." "chown` makes an appearance. This approach should work with any Python " @@ -1300,17 +1306,17 @@ msgid "" "change using e.g. :func:`os.chown`." msgstr "" -#: ../../howto/logging-cookbook.rst:2502 +#: ../../howto/logging-cookbook.rst:2674 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" -#: ../../howto/logging-cookbook.rst:2507 +#: ../../howto/logging-cookbook.rst:2679 msgid "you could use e.g.::" msgstr "" -#: ../../howto/logging-cookbook.rst:2511 +#: ../../howto/logging-cookbook.rst:2683 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" @@ -1318,25 +1324,25 @@ msgid "" "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" -#: ../../howto/logging-cookbook.rst:2516 +#: ../../howto/logging-cookbook.rst:2688 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" -#: ../../howto/logging-cookbook.rst:2520 +#: ../../howto/logging-cookbook.rst:2692 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" -#: ../../howto/logging-cookbook.rst:2530 +#: ../../howto/logging-cookbook.rst:2702 msgid "Using particular formatting styles throughout your application" msgstr "" -#: ../../howto/logging-cookbook.rst:2532 +#: ../../howto/logging-cookbook.rst:2704 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1347,7 +1353,7 @@ msgid "" "is constructed." msgstr "" -#: ../../howto/logging-cookbook.rst:2539 +#: ../../howto/logging-cookbook.rst:2711 msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1362,7 +1368,7 @@ msgid "" "calls which are out there in existing code will be using %-format strings." msgstr "" -#: ../../howto/logging-cookbook.rst:2551 +#: ../../howto/logging-cookbook.rst:2723 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -1370,7 +1376,7 @@ msgid "" "formatting." msgstr "" -#: ../../howto/logging-cookbook.rst:2555 +#: ../../howto/logging-cookbook.rst:2727 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -1378,11 +1384,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: ../../howto/logging-cookbook.rst:2562 +#: ../../howto/logging-cookbook.rst:2734 msgid "Using LogRecord factories" msgstr "" -#: ../../howto/logging-cookbook.rst:2564 +#: ../../howto/logging-cookbook.rst:2736 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -1397,17 +1403,17 @@ msgid "" "implementation does." msgstr "" -#: ../../howto/logging-cookbook.rst:2575 +#: ../../howto/logging-cookbook.rst:2747 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` and :" "class:`LogRecord` for more information." msgstr "" -#: ../../howto/logging-cookbook.rst:2580 +#: ../../howto/logging-cookbook.rst:2752 msgid "Using custom message objects" msgstr "" -#: ../../howto/logging-cookbook.rst:2582 +#: ../../howto/logging-cookbook.rst:2754 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " "to construct your individual log messages. You may recall (from :ref:" @@ -1417,7 +1423,7 @@ msgid "" "following two classes::" msgstr "" -#: ../../howto/logging-cookbook.rst:2607 +#: ../../howto/logging-cookbook.rst:2779 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1428,17 +1434,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: ../../howto/logging-cookbook.rst:2615 +#: ../../howto/logging-cookbook.rst:2787 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2629 +#: ../../howto/logging-cookbook.rst:2801 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2636 +#: ../../howto/logging-cookbook.rst:2808 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -1450,11 +1456,11 @@ msgid "" "shown above." msgstr "" -#: ../../howto/logging-cookbook.rst:2650 +#: ../../howto/logging-cookbook.rst:2822 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:2652 +#: ../../howto/logging-cookbook.rst:2824 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " @@ -1469,22 +1475,22 @@ msgid "" "complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2705 +#: ../../howto/logging-cookbook.rst:2877 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: ../../howto/logging-cookbook.rst:2713 +#: ../../howto/logging-cookbook.rst:2885 msgid "which shows that the filter is working as configured." msgstr "" -#: ../../howto/logging-cookbook.rst:2715 +#: ../../howto/logging-cookbook.rst:2887 msgid "A couple of extra points to note:" msgstr "" -#: ../../howto/logging-cookbook.rst:2717 +#: ../../howto/logging-cookbook.rst:2889 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -1494,7 +1500,7 @@ msgid "" "the above example." msgstr "" -#: ../../howto/logging-cookbook.rst:2724 +#: ../../howto/logging-cookbook.rst:2896 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -1503,11 +1509,11 @@ msgid "" "above." msgstr "" -#: ../../howto/logging-cookbook.rst:2733 +#: ../../howto/logging-cookbook.rst:2905 msgid "Customized exception formatting" msgstr "" -#: ../../howto/logging-cookbook.rst:2735 +#: ../../howto/logging-cookbook.rst:2907 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -1515,22 +1521,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2776 +#: ../../howto/logging-cookbook.rst:2948 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: ../../howto/logging-cookbook.rst:2783 +#: ../../howto/logging-cookbook.rst:2955 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: ../../howto/logging-cookbook.rst:2790 +#: ../../howto/logging-cookbook.rst:2962 msgid "Speaking logging messages" msgstr "" -#: ../../howto/logging-cookbook.rst:2792 +#: ../../howto/logging-cookbook.rst:2964 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " @@ -1547,24 +1553,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: ../../howto/logging-cookbook.rst:2834 +#: ../../howto/logging-cookbook.rst:3006 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: ../../howto/logging-cookbook.rst:2836 +#: ../../howto/logging-cookbook.rst:3008 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: ../../howto/logging-cookbook.rst:2844 +#: ../../howto/logging-cookbook.rst:3016 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: ../../howto/logging-cookbook.rst:2846 +#: ../../howto/logging-cookbook.rst:3018 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -1574,7 +1580,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: ../../howto/logging-cookbook.rst:2853 +#: ../../howto/logging-cookbook.rst:3025 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -1587,7 +1593,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: ../../howto/logging-cookbook.rst:2863 +#: ../../howto/logging-cookbook.rst:3035 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -1596,7 +1602,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: ../../howto/logging-cookbook.rst:2869 +#: ../../howto/logging-cookbook.rst:3041 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " @@ -1608,30 +1614,30 @@ msgid "" "respectively." msgstr "" -#: ../../howto/logging-cookbook.rst:2877 +#: ../../howto/logging-cookbook.rst:3049 msgid "Here's the script::" msgstr "" -#: ../../howto/logging-cookbook.rst:2940 +#: ../../howto/logging-cookbook.rst:3112 msgid "When this script is run, the following output should be observed:" msgstr "" -#: ../../howto/logging-cookbook.rst:2970 +#: ../../howto/logging-cookbook.rst:3142 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: ../../howto/logging-cookbook.rst:2974 +#: ../../howto/logging-cookbook.rst:3146 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: ../../howto/logging-cookbook.rst:2984 +#: ../../howto/logging-cookbook.rst:3156 msgid "Sending logging messages to email, with buffering" msgstr "" -#: ../../howto/logging-cookbook.rst:2986 +#: ../../howto/logging-cookbook.rst:3158 msgid "" "To illustrate how you can send log messages via email, so that a set number " "of messages are sent per email, you can subclass :class:`~logging.handlers." @@ -1642,7 +1648,7 @@ msgid "" "argument to see the required and optional arguments.)" msgstr "" -#: ../../howto/logging-cookbook.rst:3058 +#: ../../howto/logging-cookbook.rst:3230 msgid "" "If you run this script and your SMTP server is correctly set up, you should " "find that it sends eleven emails to the addressee you specify. The first ten " @@ -1650,17 +1656,17 @@ msgid "" "messages. That makes up 102 messages as specified in the script." msgstr "" -#: ../../howto/logging-cookbook.rst:3066 +#: ../../howto/logging-cookbook.rst:3238 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:3068 +#: ../../howto/logging-cookbook.rst:3240 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as ``UTCFormatter``, shown below::" msgstr "" -#: ../../howto/logging-cookbook.rst:3077 +#: ../../howto/logging-cookbook.rst:3249 msgid "" "and you can then use the ``UTCFormatter`` in your code instead of :class:" "`~logging.Formatter`. If you want to do that via configuration, you can use " @@ -1668,21 +1674,21 @@ msgid "" "the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:3120 +#: ../../howto/logging-cookbook.rst:3292 msgid "When this script is run, it should print something like:" msgstr "" -#: ../../howto/logging-cookbook.rst:3127 +#: ../../howto/logging-cookbook.rst:3299 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: ../../howto/logging-cookbook.rst:3134 +#: ../../howto/logging-cookbook.rst:3306 msgid "Using a context manager for selective logging" msgstr "" -#: ../../howto/logging-cookbook.rst:3136 +#: ../../howto/logging-cookbook.rst:3308 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -1692,7 +1698,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: ../../howto/logging-cookbook.rst:3169 +#: ../../howto/logging-cookbook.rst:3341 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -1701,13 +1707,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: ../../howto/logging-cookbook.rst:3175 +#: ../../howto/logging-cookbook.rst:3347 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: ../../howto/logging-cookbook.rst:3193 +#: ../../howto/logging-cookbook.rst:3365 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -1720,56 +1726,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: ../../howto/logging-cookbook.rst:3203 +#: ../../howto/logging-cookbook.rst:3375 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: ../../howto/logging-cookbook.rst:3214 +#: ../../howto/logging-cookbook.rst:3386 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: ../../howto/logging-cookbook.rst:3222 +#: ../../howto/logging-cookbook.rst:3394 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: ../../howto/logging-cookbook.rst:3232 +#: ../../howto/logging-cookbook.rst:3404 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: ../../howto/logging-cookbook.rst:3234 +#: ../../howto/logging-cookbook.rst:3406 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: ../../howto/logging-cookbook.rst:3242 +#: ../../howto/logging-cookbook.rst:3414 msgid "A CLI application starter template" msgstr "" -#: ../../howto/logging-cookbook.rst:3244 +#: ../../howto/logging-cookbook.rst:3416 msgid "Here's an example which shows how you can:" msgstr "" -#: ../../howto/logging-cookbook.rst:3246 +#: ../../howto/logging-cookbook.rst:3418 msgid "Use a logging level based on command-line arguments" msgstr "" -#: ../../howto/logging-cookbook.rst:3247 +#: ../../howto/logging-cookbook.rst:3419 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: ../../howto/logging-cookbook.rst:3249 +#: ../../howto/logging-cookbook.rst:3421 msgid "Make use of simple, minimal configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:3251 +#: ../../howto/logging-cookbook.rst:3423 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " @@ -1780,61 +1786,61 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: ../../howto/logging-cookbook.rst:3300 +#: ../../howto/logging-cookbook.rst:3472 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: ../../howto/logging-cookbook.rst:3313 +#: ../../howto/logging-cookbook.rst:3485 msgid "and thus for stopping::" msgstr "" -#: ../../howto/logging-cookbook.rst:3334 +#: ../../howto/logging-cookbook.rst:3506 msgid "and similarly for restarting::" msgstr "" -#: ../../howto/logging-cookbook.rst:3355 +#: ../../howto/logging-cookbook.rst:3527 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: ../../howto/logging-cookbook.rst:3368 +#: ../../howto/logging-cookbook.rst:3540 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: ../../howto/logging-cookbook.rst:3371 +#: ../../howto/logging-cookbook.rst:3543 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: ../../howto/logging-cookbook.rst:3388 +#: ../../howto/logging-cookbook.rst:3560 msgid "And if we want less:" msgstr "" -#: ../../howto/logging-cookbook.rst:3396 +#: ../../howto/logging-cookbook.rst:3568 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: ../../howto/logging-cookbook.rst:3402 +#: ../../howto/logging-cookbook.rst:3574 msgid "A Qt GUI for logging" msgstr "" -#: ../../howto/logging-cookbook.rst:3404 +#: ../../howto/logging-cookbook.rst:3576 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt `_ framework is a popular cross-" -"platform UI framework with Python bindings using `PySide2 `_ or `PyQt5 `_ libraries." +"platform UI framework with Python bindings using :pypi:`PySide2` or :pypi:" +"`PyQt5` libraries." msgstr "" -#: ../../howto/logging-cookbook.rst:3410 +#: ../../howto/logging-cookbook.rst:3581 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -1844,26 +1850,26 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: ../../howto/logging-cookbook.rst:3417 +#: ../../howto/logging-cookbook.rst:3588 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: ../../howto/logging-cookbook.rst:3421 +#: ../../howto/logging-cookbook.rst:3592 msgid "" -"The code should work with recent releases of either ``PySide2`` or " -"``PyQt5``. You should be able to adapt the approach to earlier versions of " -"Qt. Please refer to the comments in the code snippet for more detailed " -"information." +"The code should work with recent releases of any of ``PySide6``, ``PyQt6``, " +"``PySide2`` or ``PyQt5``. You should be able to adapt the approach to " +"earlier versions of Qt. Please refer to the comments in the code snippet for " +"more detailed information." msgstr "" -#: ../../howto/logging-cookbook.rst:3635 +#: ../../howto/logging-cookbook.rst:3829 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: ../../howto/logging-cookbook.rst:3637 +#: ../../howto/logging-cookbook.rst:3831 msgid "" "Although :rfc:`5424` dates from 2009, most syslog servers are configured by " "default to use the older :rfc:`3164`, which hails from 2001. When " @@ -1873,14 +1879,14 @@ msgid "" "handlers.SysLogHandler` functionality has not been updated." msgstr "" -#: ../../howto/logging-cookbook.rst:3644 +#: ../../howto/logging-cookbook.rst:3838 msgid "" "RFC 5424 contains some useful features such as support for structured data, " "and if you need to be able to log to a syslog server with support for it, " "you can do so with a subclassed handler which looks something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3710 +#: ../../howto/logging-cookbook.rst:3904 msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " @@ -1889,11 +1895,11 @@ msgid "" "using something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3724 +#: ../../howto/logging-cookbook.rst:3918 msgid "How to treat a logger like an output stream" msgstr "" -#: ../../howto/logging-cookbook.rst:3726 +#: ../../howto/logging-cookbook.rst:3920 msgid "" "Sometimes, you need to interface to a third-party API which expects a file-" "like object to write to, but you want to direct the API's output to a " @@ -1901,17 +1907,17 @@ msgid "" "API. Here's a short script illustrating such a class:" msgstr "" -#: ../../howto/logging-cookbook.rst:3766 +#: ../../howto/logging-cookbook.rst:3960 msgid "When this script is run, it prints" msgstr "" -#: ../../howto/logging-cookbook.rst:3773 +#: ../../howto/logging-cookbook.rst:3967 msgid "" "You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." "stderr`` by doing something like this:" msgstr "" -#: ../../howto/logging-cookbook.rst:3783 +#: ../../howto/logging-cookbook.rst:3977 msgid "" "You should do this *after* configuring logging for your needs. In the above " "example, the :func:`~logging.basicConfig` call does this (using the ``sys." @@ -1919,25 +1925,25 @@ msgid "" "Then, you'd get this kind of result:" msgstr "" -#: ../../howto/logging-cookbook.rst:3796 +#: ../../howto/logging-cookbook.rst:3990 msgid "" "Of course, the examples above show output according to the format used by :" "func:`~logging.basicConfig`, but you can use a different formatter when you " "configure logging." msgstr "" -#: ../../howto/logging-cookbook.rst:3800 +#: ../../howto/logging-cookbook.rst:3994 msgid "" "Note that with the above scheme, you are somewhat at the mercy of buffering " "and the sequence of write calls which you are intercepting. For example, " "with the definition of ``LoggerWriter`` above, if you have the snippet" msgstr "" -#: ../../howto/logging-cookbook.rst:3809 +#: ../../howto/logging-cookbook.rst:4003 msgid "then running the script results in" msgstr "" -#: ../../howto/logging-cookbook.rst:3827 +#: ../../howto/logging-cookbook.rst:4021 msgid "" "As you can see, this output isn't ideal. That's because the underlying code " "which writes to ``sys.stderr`` makes multiple writes, each of which results " @@ -1947,17 +1953,17 @@ msgid "" "``LoggerWriter``:" msgstr "" -#: ../../howto/logging-cookbook.rst:3852 +#: ../../howto/logging-cookbook.rst:4046 msgid "" "This just buffers up stuff until a newline is seen, and then logs complete " "lines. With this approach, you get better output:" msgstr "" -#: ../../howto/logging-cookbook.rst:3868 +#: ../../howto/logging-cookbook.rst:4062 msgid "Patterns to avoid" msgstr "" -#: ../../howto/logging-cookbook.rst:3870 +#: ../../howto/logging-cookbook.rst:4064 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -1965,11 +1971,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: ../../howto/logging-cookbook.rst:3876 +#: ../../howto/logging-cookbook.rst:4070 msgid "Opening the same log file multiple times" msgstr "" -#: ../../howto/logging-cookbook.rst:3878 +#: ../../howto/logging-cookbook.rst:4072 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -1977,32 +1983,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: ../../howto/logging-cookbook.rst:3883 +#: ../../howto/logging-cookbook.rst:4077 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: ../../howto/logging-cookbook.rst:3886 +#: ../../howto/logging-cookbook.rst:4080 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: ../../howto/logging-cookbook.rst:3889 +#: ../../howto/logging-cookbook.rst:4083 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: ../../howto/logging-cookbook.rst:3893 +#: ../../howto/logging-cookbook.rst:4087 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: ../../howto/logging-cookbook.rst:3896 +#: ../../howto/logging-cookbook.rst:4090 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -2011,7 +2017,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: ../../howto/logging-cookbook.rst:3902 +#: ../../howto/logging-cookbook.rst:4096 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -2021,17 +2027,17 @@ msgid "" "being supposedly in place." msgstr "" -#: ../../howto/logging-cookbook.rst:3909 +#: ../../howto/logging-cookbook.rst:4103 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: ../../howto/logging-cookbook.rst:3913 +#: ../../howto/logging-cookbook.rst:4107 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: ../../howto/logging-cookbook.rst:3915 +#: ../../howto/logging-cookbook.rst:4109 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -2042,13 +2048,13 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: ../../howto/logging-cookbook.rst:3924 +#: ../../howto/logging-cookbook.rst:4118 msgid "" "Adding handlers other than :class:`~logging.NullHandler` to a logger in a " "library" msgstr "" -#: ../../howto/logging-cookbook.rst:3926 +#: ../../howto/logging-cookbook.rst:4120 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -2056,11 +2062,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: ../../howto/logging-cookbook.rst:3932 +#: ../../howto/logging-cookbook.rst:4126 msgid "Creating a lot of loggers" msgstr "" -#: ../../howto/logging-cookbook.rst:3934 +#: ../../howto/logging-cookbook.rst:4128 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -2071,14 +2077,44 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: ../../howto/logging-cookbook.rst:3945 +#: ../../howto/logging-cookbook.rst:4139 msgid "Other resources" msgstr "" -#: ../../howto/logging-cookbook.rst:3958 +#: ../../howto/logging-cookbook.rst:4143 +msgid "Module :mod:`logging`" +msgstr ":mod:`logging` 模組" + +#: ../../howto/logging-cookbook.rst:4144 +msgid "API reference for the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4146 +msgid "Module :mod:`logging.config`" +msgstr ":mod:`logging.config` 模組" + +#: ../../howto/logging-cookbook.rst:4147 +msgid "Configuration API for the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4149 +msgid "Module :mod:`logging.handlers`" +msgstr ":mod:`logging.handlers` 模組" + +#: ../../howto/logging-cookbook.rst:4150 +msgid "Useful handlers included with the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4152 msgid ":ref:`Basic Tutorial `" msgstr ":ref:`基礎教學 `" -#: ../../howto/logging-cookbook.rst:3960 +#: ../../howto/logging-cookbook.rst:4154 msgid ":ref:`Advanced Tutorial `" msgstr ":ref:`進階教學 `" + +#~ msgid ":ref:`A basic logging tutorial `" +#~ msgstr ":ref:`基本的 logging 教學 `" + +#~ msgid ":ref:`A more advanced logging tutorial `" +#~ msgstr ":ref:`進階的 logging 教學 `" diff --git a/howto/logging.po b/howto/logging.po index a8a3738ef3..8c35a9d66c 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -62,184 +62,198 @@ msgstr "什麼時候使用 logging" #: ../../howto/logging.rst:28 msgid "" -"Logging provides a set of convenience functions for simple logging usage. " -"These are :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :" -"func:`critical`. To determine when to use logging, see the table below, " -"which states, for each of a set of common tasks, the best tool to use for it." +"You can access logging functionality by creating a logger via ``logger = " +"getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :" +"meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :" +"meth:`~Logger.critical` methods. To determine when to use logging, and to " +"see which logger methods to use when, see the table below. It states, for " +"each of a set of common tasks, the best tool to use for that task." msgstr "" -#: ../../howto/logging.rst:34 +#: ../../howto/logging.rst:36 msgid "Task you want to perform" msgstr "" -#: ../../howto/logging.rst:34 +#: ../../howto/logging.rst:36 msgid "The best tool for the task" msgstr "" -#: ../../howto/logging.rst:36 +#: ../../howto/logging.rst:38 msgid "" "Display console output for ordinary usage of a command line script or program" msgstr "" -#: ../../howto/logging.rst:36 +#: ../../howto/logging.rst:38 msgid ":func:`print`" msgstr ":func:`print`" -#: ../../howto/logging.rst:40 +#: ../../howto/logging.rst:42 msgid "" "Report events that occur during normal operation of a program (e.g. for " "status monitoring or fault investigation)" msgstr "" -#: ../../howto/logging.rst:40 +#: ../../howto/logging.rst:42 msgid "" -":func:`logging.info` (or :func:`logging.debug` for very detailed output for " -"diagnostic purposes)" +"A logger's :meth:`~Logger.info` (or :meth:`~Logger.debug` method for very " +"detailed output for diagnostic purposes)" msgstr "" -#: ../../howto/logging.rst:45 +#: ../../howto/logging.rst:47 msgid "Issue a warning regarding a particular runtime event" msgstr "" -#: ../../howto/logging.rst:45 +#: ../../howto/logging.rst:47 msgid "" ":func:`warnings.warn` in library code if the issue is avoidable and the " "client application should be modified to eliminate the warning" msgstr "" -#: ../../howto/logging.rst:50 +#: ../../howto/logging.rst:52 msgid "" -":func:`logging.warning` if there is nothing the client application can do " -"about the situation, but the event should still be noted" +"A logger's :meth:`~Logger.warning` method if there is nothing the client " +"application can do about the situation, but the event should still be noted" msgstr "" -#: ../../howto/logging.rst:55 +#: ../../howto/logging.rst:58 msgid "Report an error regarding a particular runtime event" msgstr "" -#: ../../howto/logging.rst:55 +#: ../../howto/logging.rst:58 msgid "Raise an exception" msgstr "" -#: ../../howto/logging.rst:58 +#: ../../howto/logging.rst:61 msgid "" "Report suppression of an error without raising an exception (e.g. error " "handler in a long-running server process)" msgstr "" -#: ../../howto/logging.rst:58 +#: ../../howto/logging.rst:61 msgid "" -":func:`logging.error`, :func:`logging.exception` or :func:`logging.critical` " -"as appropriate for the specific error and application domain" +"A logger's :meth:`~Logger.error`, :meth:`~Logger.exception` or :meth:" +"`~Logger.critical` method as appropriate for the specific error and " +"application domain" msgstr "" -#: ../../howto/logging.rst:65 +#: ../../howto/logging.rst:68 msgid "" -"The logging functions are named after the level or severity of the events " -"they are used to track. The standard levels and their applicability are " -"described below (in increasing order of severity):" +"The logger methods are named after the level or severity of the events they " +"are used to track. The standard levels and their applicability are described " +"below (in increasing order of severity):" msgstr "" -#: ../../howto/logging.rst:72 ../../howto/logging.rst:866 +#: ../../howto/logging.rst:75 ../../howto/logging.rst:830 msgid "Level" msgstr "" -#: ../../howto/logging.rst:72 +#: ../../howto/logging.rst:75 msgid "When it's used" msgstr "" -#: ../../howto/logging.rst:74 ../../howto/logging.rst:876 +#: ../../howto/logging.rst:77 ../../howto/logging.rst:840 msgid "``DEBUG``" msgstr "``DEBUG``" -#: ../../howto/logging.rst:74 +#: ../../howto/logging.rst:77 msgid "" "Detailed information, typically of interest only when diagnosing problems." msgstr "" -#: ../../howto/logging.rst:77 ../../howto/logging.rst:874 +#: ../../howto/logging.rst:80 ../../howto/logging.rst:838 msgid "``INFO``" msgstr "``INFO``" -#: ../../howto/logging.rst:77 +#: ../../howto/logging.rst:80 msgid "Confirmation that things are working as expected." msgstr "" -#: ../../howto/logging.rst:80 ../../howto/logging.rst:872 +#: ../../howto/logging.rst:83 ../../howto/logging.rst:836 msgid "``WARNING``" msgstr "``WARNING``" -#: ../../howto/logging.rst:80 +#: ../../howto/logging.rst:83 msgid "" "An indication that something unexpected happened, or indicative of some " "problem in the near future (e.g. 'disk space low'). The software is still " "working as expected." msgstr "" -#: ../../howto/logging.rst:85 ../../howto/logging.rst:870 +#: ../../howto/logging.rst:88 ../../howto/logging.rst:834 msgid "``ERROR``" msgstr "``ERROR``" -#: ../../howto/logging.rst:85 +#: ../../howto/logging.rst:88 msgid "" "Due to a more serious problem, the software has not been able to perform " "some function." msgstr "" -#: ../../howto/logging.rst:88 ../../howto/logging.rst:868 +#: ../../howto/logging.rst:91 ../../howto/logging.rst:832 msgid "``CRITICAL``" msgstr "``CRITICAL``" -#: ../../howto/logging.rst:88 +#: ../../howto/logging.rst:91 msgid "" "A serious error, indicating that the program itself may be unable to " "continue running." msgstr "" -#: ../../howto/logging.rst:92 +#: ../../howto/logging.rst:95 msgid "" "The default level is ``WARNING``, which means that only events of this level " "and above will be tracked, unless the logging package is configured to do " "otherwise." msgstr "" -#: ../../howto/logging.rst:96 +#: ../../howto/logging.rst:99 msgid "" "Events that are tracked can be handled in different ways. The simplest way " "of handling tracked events is to print them to the console. Another common " "way is to write them to a disk file." msgstr "" -#: ../../howto/logging.rst:104 +#: ../../howto/logging.rst:107 msgid "A simple example" msgstr "一個簡單範例" -#: ../../howto/logging.rst:106 +#: ../../howto/logging.rst:109 msgid "A very simple example is::" msgstr "" "一個非常簡單的例子是:\n" "\n" "::" -#: ../../howto/logging.rst:112 +#: ../../howto/logging.rst:115 msgid "If you type these lines into a script and run it, you'll see:" msgstr "" -#: ../../howto/logging.rst:118 +#: ../../howto/logging.rst:121 msgid "" "printed out on the console. The ``INFO`` message doesn't appear because the " "default level is ``WARNING``. The printed message includes the indication of " "the level and the description of the event provided in the logging call, i." -"e. 'Watch out!'. Don't worry about the 'root' part for now: it will be " -"explained later. The actual output can be formatted quite flexibly if you " +"e. 'Watch out!'. The actual output can be formatted quite flexibly if you " "need that; formatting options will also be explained later." msgstr "" #: ../../howto/logging.rst:127 +msgid "" +"Notice that in this example, we use functions directly on the ``logging`` " +"module, like ``logging.debug``, rather than creating a logger and calling " +"functions on it. These functions operation on the root logger, but can be " +"useful as they will call :func:`~logging.basicConfig` for you if it has not " +"been called yet, like in this example. In larger programs you'll usually " +"want to control the logging configuration explicitly however - so for that " +"reason as well as others, it's better to create loggers and call their " +"methods." +msgstr "" + +#: ../../howto/logging.rst:136 msgid "Logging to a file" msgstr "" -#: ../../howto/logging.rst:129 +#: ../../howto/logging.rst:138 msgid "" "A very common situation is that of recording logging events in a file, so " "let's look at that next. Be sure to try the following in a newly started " @@ -247,7 +261,7 @@ msgid "" "above::" msgstr "" -#: ../../howto/logging.rst:140 +#: ../../howto/logging.rst:150 msgid "" "The *encoding* argument was added. In earlier Python versions, or if not " "specified, the encoding used is the default value used by :func:`open`. " @@ -256,47 +270,45 @@ msgid "" "values and the default, see the documentation for :func:`open`." msgstr "" -#: ../../howto/logging.rst:147 +#: ../../howto/logging.rst:157 msgid "" "And now if we open the file and look at what we have, we should find the log " "messages:" msgstr "" -#: ../../howto/logging.rst:157 +#: ../../howto/logging.rst:167 msgid "" "This example also shows how you can set the logging level which acts as the " "threshold for tracking. In this case, because we set the threshold to " "``DEBUG``, all of the messages were printed." msgstr "" -#: ../../howto/logging.rst:161 +#: ../../howto/logging.rst:171 msgid "" "If you want to set the logging level from a command-line option such as:" msgstr "" -#: ../../howto/logging.rst:167 +#: ../../howto/logging.rst:177 msgid "" "and you have the value of the parameter passed for ``--log`` in some " "variable *loglevel*, you can use::" msgstr "" -#: ../../howto/logging.rst:172 +#: ../../howto/logging.rst:182 msgid "" "to get the value which you'll pass to :func:`basicConfig` via the *level* " "argument. You may want to error check any user input value, perhaps as in " "the following example::" msgstr "" -#: ../../howto/logging.rst:184 +#: ../../howto/logging.rst:194 msgid "" -"The call to :func:`basicConfig` should come *before* any calls to :func:" -"`debug`, :func:`info`, etc. Otherwise, those functions will call :func:" -"`basicConfig` for you with the default options. As it's intended as a one-" -"off simple configuration facility, only the first call will actually do " -"anything: subsequent calls are effectively no-ops." +"The call to :func:`basicConfig` should come *before* any calls to a logger's " +"methods such as :meth:`~Logger.debug`, :meth:`~Logger.info`, etc. Otherwise, " +"that logging event may not be handled in the desired manner." msgstr "" -#: ../../howto/logging.rst:190 +#: ../../howto/logging.rst:198 msgid "" "If you run the above script several times, the messages from successive runs " "are appended to the file *example.log*. If you want each run to start " @@ -304,52 +316,27 @@ msgid "" "*filemode* argument, by changing the call in the above example to::" msgstr "" -#: ../../howto/logging.rst:197 +#: ../../howto/logging.rst:205 msgid "" "The output will be the same as before, but the log file is no longer " "appended to, so the messages from earlier runs are lost." msgstr "" -#: ../../howto/logging.rst:202 -msgid "Logging from multiple modules" -msgstr "" - -#: ../../howto/logging.rst:204 -msgid "" -"If your program consists of multiple modules, here's an example of how you " -"could organize logging in it::" -msgstr "" - -#: ../../howto/logging.rst:228 -msgid "If you run *myapp.py*, you should see this in *myapp.log*:" -msgstr "" - -#: ../../howto/logging.rst:236 -msgid "" -"which is hopefully what you were expecting to see. You can generalize this " -"to multiple modules, using the pattern in *mylib.py*. Note that for this " -"simple usage pattern, you won't know, by looking in the log file, *where* in " -"your application your messages came from, apart from looking at the event " -"description. If you want to track the location of your messages, you'll need " -"to refer to the documentation beyond the tutorial level -- see :ref:`logging-" -"advanced-tutorial`." -msgstr "" - -#: ../../howto/logging.rst:246 +#: ../../howto/logging.rst:210 msgid "Logging variable data" msgstr "" -#: ../../howto/logging.rst:248 +#: ../../howto/logging.rst:212 msgid "" "To log variable data, use a format string for the event description message " "and append the variable data as arguments. For example::" msgstr "" -#: ../../howto/logging.rst:254 +#: ../../howto/logging.rst:218 msgid "will display:" msgstr "" -#: ../../howto/logging.rst:260 +#: ../../howto/logging.rst:224 msgid "" "As you can see, merging of variable data into the event description message " "uses the old, %-style of string formatting. This is for backwards " @@ -359,21 +346,21 @@ msgid "" "tutorial: see :ref:`formatting-styles` for more information." msgstr "" -#: ../../howto/logging.rst:269 +#: ../../howto/logging.rst:233 msgid "Changing the format of displayed messages" msgstr "" -#: ../../howto/logging.rst:271 +#: ../../howto/logging.rst:235 msgid "" "To change the format which is used to display messages, you need to specify " "the format you want to use::" msgstr "" -#: ../../howto/logging.rst:280 +#: ../../howto/logging.rst:244 msgid "which would print:" msgstr "" -#: ../../howto/logging.rst:288 +#: ../../howto/logging.rst:252 msgid "" "Notice that the 'root' which appeared in earlier examples has disappeared. " "For a full set of things that can appear in format strings, you can refer to " @@ -383,42 +370,42 @@ msgid "" "This is described in the next section." msgstr "" -#: ../../howto/logging.rst:297 +#: ../../howto/logging.rst:261 msgid "Displaying the date/time in messages" msgstr "" -#: ../../howto/logging.rst:299 +#: ../../howto/logging.rst:263 msgid "" "To display the date and time of an event, you would place '%(asctime)s' in " "your format string::" msgstr "" -#: ../../howto/logging.rst:306 +#: ../../howto/logging.rst:270 msgid "which should print something like this:" msgstr "" -#: ../../howto/logging.rst:312 +#: ../../howto/logging.rst:276 msgid "" "The default format for date/time display (shown above) is like ISO8601 or :" "rfc:`3339`. If you need more control over the formatting of the date/time, " "provide a *datefmt* argument to ``basicConfig``, as in this example::" msgstr "" -#: ../../howto/logging.rst:320 +#: ../../howto/logging.rst:284 msgid "which would display something like this:" msgstr "" -#: ../../howto/logging.rst:326 +#: ../../howto/logging.rst:290 msgid "" "The format of the *datefmt* argument is the same as supported by :func:`time." "strftime`." msgstr "" -#: ../../howto/logging.rst:331 +#: ../../howto/logging.rst:295 msgid "Next Steps" msgstr "" -#: ../../howto/logging.rst:333 +#: ../../howto/logging.rst:297 msgid "" "That concludes the basic tutorial. It should be enough to get you up and " "running with logging. There's a lot more that the logging package offers, " @@ -427,7 +414,7 @@ msgid "" "of your favourite beverage and carry on." msgstr "" -#: ../../howto/logging.rst:339 +#: ../../howto/logging.rst:303 msgid "" "If your logging needs are simple, then use the above examples to incorporate " "logging into your own scripts, and if you run into problems or don't " @@ -436,50 +423,50 @@ msgid "" "should receive help before too long." msgstr "" -#: ../../howto/logging.rst:345 +#: ../../howto/logging.rst:309 msgid "" "Still here? You can carry on reading the next few sections, which provide a " "slightly more advanced/in-depth tutorial than the basic one above. After " "that, you can take a look at the :ref:`logging-cookbook`." msgstr "" -#: ../../howto/logging.rst:353 +#: ../../howto/logging.rst:317 msgid "Advanced Logging Tutorial" msgstr "" -#: ../../howto/logging.rst:355 +#: ../../howto/logging.rst:319 msgid "" "The logging library takes a modular approach and offers several categories " "of components: loggers, handlers, filters, and formatters." msgstr "" -#: ../../howto/logging.rst:358 +#: ../../howto/logging.rst:322 msgid "Loggers expose the interface that application code directly uses." msgstr "" -#: ../../howto/logging.rst:359 +#: ../../howto/logging.rst:323 msgid "" "Handlers send the log records (created by loggers) to the appropriate " "destination." msgstr "" -#: ../../howto/logging.rst:361 +#: ../../howto/logging.rst:325 msgid "" "Filters provide a finer grained facility for determining which log records " "to output." msgstr "" -#: ../../howto/logging.rst:363 +#: ../../howto/logging.rst:327 msgid "Formatters specify the layout of log records in the final output." msgstr "" -#: ../../howto/logging.rst:365 +#: ../../howto/logging.rst:329 msgid "" "Log event information is passed between loggers, handlers, filters and " "formatters in a :class:`LogRecord` instance." msgstr "" -#: ../../howto/logging.rst:368 +#: ../../howto/logging.rst:332 msgid "" "Logging is performed by calling methods on instances of the :class:`Logger` " "class (hereafter called :dfn:`loggers`). Each instance has a name, and they " @@ -490,19 +477,19 @@ msgid "" "originates." msgstr "" -#: ../../howto/logging.rst:375 +#: ../../howto/logging.rst:339 msgid "" "A good convention to use when naming loggers is to use a module-level " "logger, in each module which uses logging, named as follows::" msgstr "" -#: ../../howto/logging.rst:380 +#: ../../howto/logging.rst:344 msgid "" "This means that logger names track the package/module hierarchy, and it's " "intuitively obvious where events are logged just from the logger name." msgstr "" -#: ../../howto/logging.rst:383 +#: ../../howto/logging.rst:347 msgid "" "The root of the hierarchy of loggers is called the root logger. That's the " "logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :" @@ -511,7 +498,7 @@ msgid "" "root logger's name is printed as 'root' in the logged output." msgstr "" -#: ../../howto/logging.rst:389 +#: ../../howto/logging.rst:353 msgid "" "It is, of course, possible to log messages to different destinations. " "Support is included in the package for writing log messages to files, HTTP " @@ -522,7 +509,7 @@ msgid "" "built-in handler classes." msgstr "" -#: ../../howto/logging.rst:396 +#: ../../howto/logging.rst:360 msgid "" "By default, no destination is set for any logging messages. You can specify " "a destination (such as console or file) by using :func:`basicConfig` as in " @@ -534,32 +521,32 @@ msgid "" "message output." msgstr "" -#: ../../howto/logging.rst:404 +#: ../../howto/logging.rst:368 msgid "The default format set by :func:`basicConfig` for messages is:" msgstr "" -#: ../../howto/logging.rst:410 +#: ../../howto/logging.rst:374 msgid "" "You can change this by passing a format string to :func:`basicConfig` with " "the *format* keyword argument. For all options regarding how a format string " "is constructed, see :ref:`formatter-objects`." msgstr "" -#: ../../howto/logging.rst:415 +#: ../../howto/logging.rst:379 msgid "Logging Flow" msgstr "" -#: ../../howto/logging.rst:417 +#: ../../howto/logging.rst:381 msgid "" "The flow of log event information in loggers and handlers is illustrated in " "the following diagram." msgstr "" -#: ../../howto/logging.rst:424 +#: ../../howto/logging.rst:388 msgid "Loggers" msgstr "" -#: ../../howto/logging.rst:426 +#: ../../howto/logging.rst:390 msgid "" ":class:`Logger` objects have a threefold job. First, they expose several " "methods to application code so that applications can log messages at " @@ -569,17 +556,17 @@ msgid "" "handlers." msgstr "" -#: ../../howto/logging.rst:432 +#: ../../howto/logging.rst:396 msgid "" "The most widely used methods on logger objects fall into two categories: " "configuration and message sending." msgstr "" -#: ../../howto/logging.rst:435 +#: ../../howto/logging.rst:399 msgid "These are the most common configuration methods:" msgstr "" -#: ../../howto/logging.rst:437 +#: ../../howto/logging.rst:401 msgid "" ":meth:`Logger.setLevel` specifies the lowest-severity log message a logger " "will handle, where debug is the lowest built-in severity level and critical " @@ -588,32 +575,32 @@ msgid "" "messages and will ignore DEBUG messages." msgstr "" -#: ../../howto/logging.rst:443 +#: ../../howto/logging.rst:407 msgid "" ":meth:`Logger.addHandler` and :meth:`Logger.removeHandler` add and remove " "handler objects from the logger object. Handlers are covered in more detail " "in :ref:`handler-basic`." msgstr "" -#: ../../howto/logging.rst:447 +#: ../../howto/logging.rst:411 msgid "" ":meth:`Logger.addFilter` and :meth:`Logger.removeFilter` add and remove " "filter objects from the logger object. Filters are covered in more detail " "in :ref:`filter`." msgstr "" -#: ../../howto/logging.rst:451 +#: ../../howto/logging.rst:415 msgid "" "You don't need to always call these methods on every logger you create. See " "the last two paragraphs in this section." msgstr "" -#: ../../howto/logging.rst:454 +#: ../../howto/logging.rst:418 msgid "" "With the logger object configured, the following methods create log messages:" msgstr "" -#: ../../howto/logging.rst:456 +#: ../../howto/logging.rst:420 msgid "" ":meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:" "`Logger.error`, and :meth:`Logger.critical` all create log records with a " @@ -626,14 +613,14 @@ msgid "" "exception information." msgstr "" -#: ../../howto/logging.rst:466 +#: ../../howto/logging.rst:430 msgid "" ":meth:`Logger.exception` creates a log message similar to :meth:`Logger." "error`. The difference is that :meth:`Logger.exception` dumps a stack trace " "along with it. Call this method only from an exception handler." msgstr "" -#: ../../howto/logging.rst:470 +#: ../../howto/logging.rst:434 msgid "" ":meth:`Logger.log` takes a log level as an explicit argument. This is a " "little more verbose for logging messages than using the log level " @@ -641,7 +628,7 @@ msgid "" "levels." msgstr "" -#: ../../howto/logging.rst:474 +#: ../../howto/logging.rst:438 msgid "" ":func:`getLogger` returns a reference to a logger instance with the " "specified name if it is provided, or ``root`` if not. The names are period-" @@ -653,7 +640,7 @@ msgid "" "descendants of ``foo``." msgstr "" -#: ../../howto/logging.rst:482 +#: ../../howto/logging.rst:446 msgid "" "Loggers have a concept of *effective level*. If a level is not explicitly " "set on a logger, the level of its parent is used instead as its effective " @@ -665,7 +652,7 @@ msgid "" "handlers." msgstr "" -#: ../../howto/logging.rst:490 +#: ../../howto/logging.rst:454 msgid "" "Child loggers propagate messages up to the handlers associated with their " "ancestor loggers. Because of this, it is unnecessary to define and configure " @@ -675,11 +662,11 @@ msgid "" "attribute of a logger to ``False``.)" msgstr "" -#: ../../howto/logging.rst:501 +#: ../../howto/logging.rst:465 msgid "Handlers" msgstr "" -#: ../../howto/logging.rst:503 +#: ../../howto/logging.rst:467 msgid "" ":class:`~logging.Handler` objects are responsible for dispatching the " "appropriate log messages (based on the log messages' severity) to the " @@ -692,14 +679,14 @@ msgid "" "of a specific severity to a specific location." msgstr "" -#: ../../howto/logging.rst:513 +#: ../../howto/logging.rst:477 msgid "" "The standard library includes quite a few handler types (see :ref:`useful-" "handlers`); the tutorials use mainly :class:`StreamHandler` and :class:" "`FileHandler` in its examples." msgstr "" -#: ../../howto/logging.rst:517 +#: ../../howto/logging.rst:481 msgid "" "There are very few methods in a handler for application developers to " "concern themselves with. The only handler methods that seem relevant for " @@ -707,7 +694,7 @@ msgid "" "not creating custom handlers) are the following configuration methods:" msgstr "" -#: ../../howto/logging.rst:522 +#: ../../howto/logging.rst:486 msgid "" "The :meth:`~Handler.setLevel` method, just as in logger objects, specifies " "the lowest severity that will be dispatched to the appropriate destination. " @@ -717,19 +704,19 @@ msgid "" "send on." msgstr "" -#: ../../howto/logging.rst:528 +#: ../../howto/logging.rst:492 msgid "" ":meth:`~Handler.setFormatter` selects a Formatter object for this handler to " "use." msgstr "" -#: ../../howto/logging.rst:531 +#: ../../howto/logging.rst:495 msgid "" ":meth:`~Handler.addFilter` and :meth:`~Handler.removeFilter` respectively " "configure and deconfigure filter objects on handlers." msgstr "" -#: ../../howto/logging.rst:534 +#: ../../howto/logging.rst:498 msgid "" "Application code should not directly instantiate and use instances of :class:" "`Handler`. Instead, the :class:`Handler` class is a base class that defines " @@ -737,11 +724,11 @@ msgid "" "behavior that child classes can use (or override)." msgstr "" -#: ../../howto/logging.rst:541 +#: ../../howto/logging.rst:505 msgid "Formatters" msgstr "" -#: ../../howto/logging.rst:543 +#: ../../howto/logging.rst:507 msgid "" "Formatter objects configure the final order, structure, and contents of the " "log message. Unlike the base :class:`logging.Handler` class, application " @@ -751,20 +738,20 @@ msgid "" "string and a style indicator." msgstr "" -#: ../../howto/logging.rst:552 +#: ../../howto/logging.rst:516 msgid "" "If there is no message format string, the default is to use the raw " "message. If there is no date format string, the default date format is:" msgstr "" -#: ../../howto/logging.rst:559 +#: ../../howto/logging.rst:523 msgid "" "with the milliseconds tacked on at the end. The ``style`` is one of ``'%'``, " "``'{'``, or ``'$'``. If one of these is not specified, then ``'%'`` will be " "used." msgstr "" -#: ../../howto/logging.rst:562 +#: ../../howto/logging.rst:526 msgid "" "If the ``style`` is ``'%'``, the message format string uses ``%()s`` styled string substitution; the possible keys are documented in :" @@ -774,18 +761,18 @@ msgid "" "should conform to what is expected by :meth:`string.Template.substitute`." msgstr "" -#: ../../howto/logging.rst:569 +#: ../../howto/logging.rst:533 msgid "Added the ``style`` parameter." msgstr "新增 ``style`` 參數。" -#: ../../howto/logging.rst:572 +#: ../../howto/logging.rst:536 msgid "" "The following message format string will log the time in a human-readable " "format, the severity of the message, and the contents of the message, in " "that order::" msgstr "" -#: ../../howto/logging.rst:578 +#: ../../howto/logging.rst:542 msgid "" "Formatters use a user-configurable function to convert the creation time of " "a record to a tuple. By default, :func:`time.localtime` is used; to change " @@ -796,68 +783,68 @@ msgid "" "in the Formatter class (to ``time.gmtime`` for GMT display)." msgstr "" -#: ../../howto/logging.rst:588 +#: ../../howto/logging.rst:552 msgid "Configuring Logging" msgstr "" -#: ../../howto/logging.rst:592 +#: ../../howto/logging.rst:556 msgid "Programmers can configure logging in three ways:" msgstr "" -#: ../../howto/logging.rst:594 +#: ../../howto/logging.rst:558 msgid "" "Creating loggers, handlers, and formatters explicitly using Python code that " "calls the configuration methods listed above." msgstr "" -#: ../../howto/logging.rst:596 +#: ../../howto/logging.rst:560 msgid "" "Creating a logging config file and reading it using the :func:`fileConfig` " "function." msgstr "" -#: ../../howto/logging.rst:598 +#: ../../howto/logging.rst:562 msgid "" "Creating a dictionary of configuration information and passing it to the :" "func:`dictConfig` function." msgstr "" -#: ../../howto/logging.rst:601 +#: ../../howto/logging.rst:565 msgid "" "For the reference documentation on the last two options, see :ref:`logging-" "config-api`. The following example configures a very simple logger, a " "console handler, and a simple formatter using Python code::" msgstr "" -#: ../../howto/logging.rst:631 +#: ../../howto/logging.rst:595 msgid "" "Running this module from the command line produces the following output:" msgstr "" -#: ../../howto/logging.rst:642 +#: ../../howto/logging.rst:606 msgid "" "The following Python module creates a logger, handler, and formatter nearly " "identical to those in the example listed above, with the only difference " "being the names of the objects::" msgstr "" -#: ../../howto/logging.rst:661 +#: ../../howto/logging.rst:625 msgid "Here is the logging.conf file:" msgstr "" -#: ../../howto/logging.rst:693 +#: ../../howto/logging.rst:657 msgid "" "The output is nearly identical to that of the non-config-file-based example:" msgstr "" -#: ../../howto/logging.rst:704 +#: ../../howto/logging.rst:668 msgid "" "You can see that the config file approach has a few advantages over the " "Python code approach, mainly separation of configuration and code and the " "ability of noncoders to easily modify the logging properties." msgstr "" -#: ../../howto/logging.rst:708 +#: ../../howto/logging.rst:672 msgid "" "The :func:`fileConfig` function takes a default parameter, " "``disable_existing_loggers``, which defaults to ``True`` for reasons of " @@ -868,7 +855,7 @@ msgid "" "information, and specify ``False`` for this parameter if you wish." msgstr "" -#: ../../howto/logging.rst:716 +#: ../../howto/logging.rst:680 msgid "" "The dictionary passed to :func:`dictConfig` can also specify a Boolean value " "with key ``disable_existing_loggers``, which if not specified explicitly in " @@ -877,7 +864,7 @@ msgid "" "want - in which case, provide the key explicitly with a value of ``False``." msgstr "" -#: ../../howto/logging.rst:726 +#: ../../howto/logging.rst:690 msgid "" "Note that the class names referenced in config files need to be either " "relative to the logging module, or absolute values which can be resolved " @@ -888,7 +875,7 @@ msgid "" "path)." msgstr "" -#: ../../howto/logging.rst:734 +#: ../../howto/logging.rst:698 msgid "" "In Python 3.2, a new means of configuring logging has been introduced, using " "dictionaries to hold configuration information. This provides a superset of " @@ -903,30 +890,30 @@ msgid "" "a socket, or use whatever approach makes sense for your application." msgstr "" -#: ../../howto/logging.rst:746 +#: ../../howto/logging.rst:710 msgid "" "Here's an example of the same configuration as above, in YAML format for the " "new dictionary-based approach:" msgstr "" -#: ../../howto/logging.rst:770 +#: ../../howto/logging.rst:734 msgid "" "For more information about logging using a dictionary, see :ref:`logging-" "config-api`." msgstr "" -#: ../../howto/logging.rst:774 +#: ../../howto/logging.rst:738 msgid "What happens if no configuration is provided" msgstr "" -#: ../../howto/logging.rst:776 +#: ../../howto/logging.rst:740 msgid "" "If no logging configuration is provided, it is possible to have a situation " "where a logging event needs to be output, but no handlers can be found to " "output the event." msgstr "" -#: ../../howto/logging.rst:780 +#: ../../howto/logging.rst:744 msgid "" "The event is output using a 'handler of last resort', stored in :data:" "`lastResort`. This internal handler is not associated with any logger, and " @@ -938,32 +925,32 @@ msgid "" "severities will be output." msgstr "" -#: ../../howto/logging.rst:791 +#: ../../howto/logging.rst:755 msgid "For versions of Python prior to 3.2, the behaviour is as follows:" msgstr "" -#: ../../howto/logging.rst:793 +#: ../../howto/logging.rst:757 msgid "" "If :data:`raiseExceptions` is ``False`` (production mode), the event is " "silently dropped." msgstr "" -#: ../../howto/logging.rst:796 +#: ../../howto/logging.rst:760 msgid "" "If :data:`raiseExceptions` is ``True`` (development mode), a message 'No " "handlers could be found for logger X.Y.Z' is printed once." msgstr "" -#: ../../howto/logging.rst:799 +#: ../../howto/logging.rst:763 msgid "" "To obtain the pre-3.2 behaviour, :data:`lastResort` can be set to ``None``." msgstr "" -#: ../../howto/logging.rst:805 +#: ../../howto/logging.rst:769 msgid "Configuring Logging for a Library" msgstr "" -#: ../../howto/logging.rst:807 +#: ../../howto/logging.rst:771 msgid "" "When developing a library which uses logging, you should take care to " "document how the library uses logging - for example, the names of loggers " @@ -974,7 +961,7 @@ msgid "" "is regarded as the best default behaviour." msgstr "" -#: ../../howto/logging.rst:815 +#: ../../howto/logging.rst:779 msgid "" "If for some reason you *don't* want these messages printed in the absence of " "any logging configuration, you can attach a do-nothing handler to the top-" @@ -986,7 +973,7 @@ msgid "" "to those handlers, as normal." msgstr "" -#: ../../howto/logging.rst:824 +#: ../../howto/logging.rst:788 msgid "" "A do-nothing handler is included in the logging package: :class:`~logging." "NullHandler` (since Python 3.1). An instance of this handler could be added " @@ -997,14 +984,14 @@ msgid "" "etc. then the code::" msgstr "" -#: ../../howto/logging.rst:835 +#: ../../howto/logging.rst:799 msgid "" "should have the desired effect. If an organisation produces a number of " "libraries, then the logger name specified can be 'orgname.foo' rather than " "just 'foo'." msgstr "" -#: ../../howto/logging.rst:839 +#: ../../howto/logging.rst:803 msgid "" "It is strongly advised that you *do not log to the root logger* in your " "library. Instead, use a logger with a unique and easily identifiable name, " @@ -1014,7 +1001,7 @@ msgid "" "library as they wish." msgstr "" -#: ../../howto/logging.rst:846 +#: ../../howto/logging.rst:810 msgid "" "It is strongly advised that you *do not add any handlers other than* :class:" "`~logging.NullHandler` *to your library's loggers*. This is because the " @@ -1025,11 +1012,11 @@ msgid "" "carry out unit tests and deliver logs which suit their requirements." msgstr "" -#: ../../howto/logging.rst:857 +#: ../../howto/logging.rst:821 msgid "Logging Levels" msgstr "" -#: ../../howto/logging.rst:859 +#: ../../howto/logging.rst:823 msgid "" "The numeric values of logging levels are given in the following table. These " "are primarily of interest if you want to define your own levels, and need " @@ -1038,39 +1025,39 @@ msgid "" "value; the predefined name is lost." msgstr "" -#: ../../howto/logging.rst:866 +#: ../../howto/logging.rst:830 msgid "Numeric value" msgstr "" -#: ../../howto/logging.rst:868 +#: ../../howto/logging.rst:832 msgid "50" msgstr "50" -#: ../../howto/logging.rst:870 +#: ../../howto/logging.rst:834 msgid "40" msgstr "40" -#: ../../howto/logging.rst:872 +#: ../../howto/logging.rst:836 msgid "30" msgstr "30" -#: ../../howto/logging.rst:874 +#: ../../howto/logging.rst:838 msgid "20" msgstr "20" -#: ../../howto/logging.rst:876 +#: ../../howto/logging.rst:840 msgid "10" msgstr "10" -#: ../../howto/logging.rst:878 +#: ../../howto/logging.rst:842 msgid "``NOTSET``" msgstr "``NOTSET``" -#: ../../howto/logging.rst:878 +#: ../../howto/logging.rst:842 msgid "0" msgstr "0" -#: ../../howto/logging.rst:881 +#: ../../howto/logging.rst:845 msgid "" "Levels can also be associated with loggers, being set either by the " "developer or through loading a saved logging configuration. When a logging " @@ -1080,14 +1067,14 @@ msgid "" "basic mechanism controlling the verbosity of logging output." msgstr "" -#: ../../howto/logging.rst:888 +#: ../../howto/logging.rst:852 msgid "" "Logging messages are encoded as instances of the :class:`~logging.LogRecord` " "class. When a logger decides to actually log an event, a :class:`~logging." "LogRecord` instance is created from the logging message." msgstr "" -#: ../../howto/logging.rst:892 +#: ../../howto/logging.rst:856 msgid "" "Logging messages are subjected to a dispatch mechanism through the use of :" "dfn:`handlers`, which are instances of subclasses of the :class:`Handler` " @@ -1104,7 +1091,7 @@ msgid "" "at which point the passing to ancestor handlers stops)." msgstr "" -#: ../../howto/logging.rst:906 +#: ../../howto/logging.rst:870 msgid "" "Just as for loggers, handlers can have levels associated with them. A " "handler's level acts as a filter in the same way as a logger's level does. " @@ -1114,11 +1101,11 @@ msgid "" "`~Handler.emit`." msgstr "" -#: ../../howto/logging.rst:915 +#: ../../howto/logging.rst:879 msgid "Custom Levels" msgstr "" -#: ../../howto/logging.rst:917 +#: ../../howto/logging.rst:881 msgid "" "Defining your own levels is possible, but should not be necessary, as the " "existing levels have been chosen on the basis of practical experience. " @@ -1131,27 +1118,27 @@ msgid "" "given numeric value might mean different things for different libraries." msgstr "" -#: ../../howto/logging.rst:930 +#: ../../howto/logging.rst:894 msgid "Useful Handlers" msgstr "" -#: ../../howto/logging.rst:932 +#: ../../howto/logging.rst:896 msgid "" "In addition to the base :class:`Handler` class, many useful subclasses are " "provided:" msgstr "" -#: ../../howto/logging.rst:935 +#: ../../howto/logging.rst:899 msgid "" ":class:`StreamHandler` instances send messages to streams (file-like " "objects)." msgstr "" -#: ../../howto/logging.rst:938 +#: ../../howto/logging.rst:902 msgid ":class:`FileHandler` instances send messages to disk files." msgstr "" -#: ../../howto/logging.rst:940 +#: ../../howto/logging.rst:904 msgid "" ":class:`~handlers.BaseRotatingHandler` is the base class for handlers that " "rotate log files at a certain point. It is not meant to be instantiated " @@ -1159,61 +1146,61 @@ msgid "" "`~handlers.TimedRotatingFileHandler`." msgstr "" -#: ../../howto/logging.rst:945 +#: ../../howto/logging.rst:909 msgid "" ":class:`~handlers.RotatingFileHandler` instances send messages to disk " "files, with support for maximum log file sizes and log file rotation." msgstr "" -#: ../../howto/logging.rst:948 +#: ../../howto/logging.rst:912 msgid "" ":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk " "files, rotating the log file at certain timed intervals." msgstr "" -#: ../../howto/logging.rst:951 +#: ../../howto/logging.rst:915 msgid "" ":class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. " "Since 3.4, Unix domain sockets are also supported." msgstr "" -#: ../../howto/logging.rst:954 +#: ../../howto/logging.rst:918 msgid "" ":class:`~handlers.DatagramHandler` instances send messages to UDP sockets. " "Since 3.4, Unix domain sockets are also supported." msgstr "" -#: ../../howto/logging.rst:957 +#: ../../howto/logging.rst:921 msgid "" ":class:`~handlers.SMTPHandler` instances send messages to a designated email " "address." msgstr "" -#: ../../howto/logging.rst:960 +#: ../../howto/logging.rst:924 msgid "" ":class:`~handlers.SysLogHandler` instances send messages to a Unix syslog " "daemon, possibly on a remote machine." msgstr "" -#: ../../howto/logging.rst:963 +#: ../../howto/logging.rst:927 msgid "" ":class:`~handlers.NTEventLogHandler` instances send messages to a Windows " "NT/2000/XP event log." msgstr "" -#: ../../howto/logging.rst:966 +#: ../../howto/logging.rst:930 msgid "" ":class:`~handlers.MemoryHandler` instances send messages to a buffer in " "memory, which is flushed whenever specific criteria are met." msgstr "" -#: ../../howto/logging.rst:969 +#: ../../howto/logging.rst:933 msgid "" ":class:`~handlers.HTTPHandler` instances send messages to an HTTP server " "using either ``GET`` or ``POST`` semantics." msgstr "" -#: ../../howto/logging.rst:972 +#: ../../howto/logging.rst:936 msgid "" ":class:`~handlers.WatchedFileHandler` instances watch the file they are " "logging to. If the file changes, it is closed and reopened using the file " @@ -1221,13 +1208,13 @@ msgid "" "support the underlying mechanism used." msgstr "" -#: ../../howto/logging.rst:977 +#: ../../howto/logging.rst:941 msgid "" ":class:`~handlers.QueueHandler` instances send messages to a queue, such as " "those implemented in the :mod:`queue` or :mod:`multiprocessing` modules." msgstr "" -#: ../../howto/logging.rst:980 +#: ../../howto/logging.rst:944 msgid "" ":class:`NullHandler` instances do nothing with error messages. They are used " "by library developers who want to use logging, but want to avoid the 'No " @@ -1236,15 +1223,15 @@ msgid "" "more information." msgstr "" -#: ../../howto/logging.rst:986 +#: ../../howto/logging.rst:950 msgid "The :class:`NullHandler` class." msgstr "" -#: ../../howto/logging.rst:989 +#: ../../howto/logging.rst:953 msgid "The :class:`~handlers.QueueHandler` class." msgstr "" -#: ../../howto/logging.rst:992 +#: ../../howto/logging.rst:956 msgid "" "The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` " "classes are defined in the core logging package. The other handlers are " @@ -1252,14 +1239,14 @@ msgid "" "module, :mod:`logging.config`, for configuration functionality.)" msgstr "" -#: ../../howto/logging.rst:997 +#: ../../howto/logging.rst:961 msgid "" "Logged messages are formatted for presentation through instances of the :" "class:`Formatter` class. They are initialized with a format string suitable " "for use with the % operator and a dictionary." msgstr "" -#: ../../howto/logging.rst:1001 +#: ../../howto/logging.rst:965 msgid "" "For formatting multiple messages in a batch, instances of :class:" "`BufferingFormatter` can be used. In addition to the format string (which is " @@ -1267,7 +1254,7 @@ msgid "" "trailer format strings." msgstr "" -#: ../../howto/logging.rst:1006 +#: ../../howto/logging.rst:970 msgid "" "When filtering based on logger level and/or handler level is not enough, " "instances of :class:`Filter` can be added to both :class:`Logger` and :class:" @@ -1277,18 +1264,18 @@ msgid "" "value, the message is not processed further." msgstr "" -#: ../../howto/logging.rst:1013 +#: ../../howto/logging.rst:977 msgid "" "The basic :class:`Filter` functionality allows filtering by specific logger " "name. If this feature is used, messages sent to the named logger and its " "children are allowed through the filter, and all others dropped." msgstr "" -#: ../../howto/logging.rst:1021 +#: ../../howto/logging.rst:985 msgid "Exceptions raised during logging" msgstr "" -#: ../../howto/logging.rst:1023 +#: ../../howto/logging.rst:987 msgid "" "The logging package is designed to swallow exceptions which occur while " "logging in production. This is so that errors which occur while handling " @@ -1296,7 +1283,7 @@ msgid "" "errors - do not cause the application using logging to terminate prematurely." msgstr "" -#: ../../howto/logging.rst:1028 +#: ../../howto/logging.rst:992 msgid "" ":class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never " "swallowed. Other exceptions which occur during the :meth:`~Handler.emit` " @@ -1304,7 +1291,7 @@ msgid "" "handleError` method." msgstr "" -#: ../../howto/logging.rst:1033 +#: ../../howto/logging.rst:997 msgid "" "The default implementation of :meth:`~Handler.handleError` in :class:" "`Handler` checks to see if a module-level variable, :data:`raiseExceptions`, " @@ -1312,7 +1299,7 @@ msgid "" "the exception is swallowed." msgstr "" -#: ../../howto/logging.rst:1039 +#: ../../howto/logging.rst:1003 msgid "" "The default value of :data:`raiseExceptions` is ``True``. This is because " "during development, you typically want to be notified of any exceptions that " @@ -1320,11 +1307,11 @@ msgid "" "production usage." msgstr "" -#: ../../howto/logging.rst:1049 +#: ../../howto/logging.rst:1013 msgid "Using arbitrary objects as messages" msgstr "" -#: ../../howto/logging.rst:1051 +#: ../../howto/logging.rst:1015 msgid "" "In the preceding sections and examples, it has been assumed that the message " "passed when logging the event is a string. However, this is not the only " @@ -1336,11 +1323,11 @@ msgid "" "the wire." msgstr "" -#: ../../howto/logging.rst:1062 +#: ../../howto/logging.rst:1026 msgid "Optimization" msgstr "" -#: ../../howto/logging.rst:1064 +#: ../../howto/logging.rst:1028 msgid "" "Formatting of message arguments is deferred until it cannot be avoided. " "However, computing the arguments passed to the logging method can also be " @@ -1351,13 +1338,13 @@ msgid "" "code like this::" msgstr "" -#: ../../howto/logging.rst:1076 +#: ../../howto/logging.rst:1040 msgid "" "so that if the logger's threshold is set above ``DEBUG``, the calls to " "``expensive_func1`` and ``expensive_func2`` are never made." msgstr "" -#: ../../howto/logging.rst:1079 +#: ../../howto/logging.rst:1043 msgid "" "In some cases, :meth:`~Logger.isEnabledFor` can itself be more expensive " "than you'd like (e.g. for deeply nested loggers where an explicit level is " @@ -1369,7 +1356,7 @@ msgid "" "while the application is running (which is not all that common)." msgstr "" -#: ../../howto/logging.rst:1088 +#: ../../howto/logging.rst:1052 msgid "" "There are other optimizations which can be made for specific applications " "which need more precise control over what logging information is collected. " @@ -1377,94 +1364,94 @@ msgid "" "you don't need:" msgstr "" -#: ../../howto/logging.rst:1094 +#: ../../howto/logging.rst:1058 msgid "What you don't want to collect" msgstr "" -#: ../../howto/logging.rst:1094 +#: ../../howto/logging.rst:1058 msgid "How to avoid collecting it" msgstr "" -#: ../../howto/logging.rst:1096 +#: ../../howto/logging.rst:1060 msgid "Information about where calls were made from." msgstr "" -#: ../../howto/logging.rst:1096 +#: ../../howto/logging.rst:1060 msgid "" "Set ``logging._srcfile`` to ``None``. This avoids calling :func:`sys." "_getframe`, which may help to speed up your code in environments like PyPy " "(which can't speed up code that uses :func:`sys._getframe`)." msgstr "" -#: ../../howto/logging.rst:1102 +#: ../../howto/logging.rst:1066 msgid "Threading information." msgstr "" -#: ../../howto/logging.rst:1102 +#: ../../howto/logging.rst:1066 msgid "Set ``logging.logThreads`` to ``False``." msgstr "" -#: ../../howto/logging.rst:1104 +#: ../../howto/logging.rst:1068 msgid "Current process ID (:func:`os.getpid`)" msgstr "" -#: ../../howto/logging.rst:1104 +#: ../../howto/logging.rst:1068 msgid "Set ``logging.logProcesses`` to ``False``." msgstr "" -#: ../../howto/logging.rst:1106 +#: ../../howto/logging.rst:1070 msgid "" "Current process name when using ``multiprocessing`` to manage multiple " "processes." msgstr "" -#: ../../howto/logging.rst:1106 +#: ../../howto/logging.rst:1070 msgid "Set ``logging.logMultiprocessing`` to ``False``." msgstr "" -#: ../../howto/logging.rst:1109 +#: ../../howto/logging.rst:1073 msgid "Current :class:`asyncio.Task` name when using ``asyncio``." msgstr "" -#: ../../howto/logging.rst:1109 +#: ../../howto/logging.rst:1073 msgid "Set ``logging.logAsyncioTasks`` to ``False``." msgstr "" -#: ../../howto/logging.rst:1113 +#: ../../howto/logging.rst:1077 msgid "" "Also note that the core logging module only includes the basic handlers. If " "you don't import :mod:`logging.handlers` and :mod:`logging.config`, they " "won't take up any memory." msgstr "" -#: ../../howto/logging.rst:1120 +#: ../../howto/logging.rst:1084 msgid "Other resources" msgstr "" -#: ../../howto/logging.rst:1125 +#: ../../howto/logging.rst:1088 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../howto/logging.rst:1125 +#: ../../howto/logging.rst:1089 msgid "API reference for the logging module." msgstr "" -#: ../../howto/logging.rst:1128 +#: ../../howto/logging.rst:1091 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../howto/logging.rst:1128 +#: ../../howto/logging.rst:1092 msgid "Configuration API for the logging module." msgstr "" -#: ../../howto/logging.rst:1131 +#: ../../howto/logging.rst:1094 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../howto/logging.rst:1131 +#: ../../howto/logging.rst:1095 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../howto/logging.rst:1133 +#: ../../howto/logging.rst:1097 msgid ":ref:`A logging cookbook `" msgstr "" diff --git a/howto/mro.po b/howto/mro.po new file mode 100644 index 0000000000..0a3b4504f4 --- /dev/null +++ b/howto/mro.po @@ -0,0 +1,605 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2024, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.12\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-15 12:57+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../howto/mro.rst:4 +msgid "The Python 2.3 Method Resolution Order" +msgstr "" + +#: ../../howto/mro.rst:8 +msgid "" +"This is a historical document, provided as an appendix to the official " +"documentation. The Method Resolution Order discussed here was *introduced* " +"in Python 2.3, but it is still used in later versions -- including Python 3." +msgstr "" + +#: ../../howto/mro.rst:13 +msgid "By `Michele Simionato `__." +msgstr "" + +#: ../../howto/mro.rst:0 +msgid "Abstract" +msgstr "" + +#: ../../howto/mro.rst:17 +msgid "" +"*This document is intended for Python programmers who want to understand the " +"C3 Method Resolution Order used in Python 2.3. Although it is not intended " +"for newbies, it is quite pedagogical with many worked out examples. I am " +"not aware of other publicly available documents with the same scope, " +"therefore it should be useful.*" +msgstr "" + +#: ../../howto/mro.rst:23 +msgid "Disclaimer:" +msgstr "" + +#: ../../howto/mro.rst:25 +msgid "" +"*I donate this document to the Python Software Foundation, under the Python " +"2.3 license. As usual in these circumstances, I warn the reader that what " +"follows* should *be correct, but I don't give any warranty. Use it at your " +"own risk and peril!*" +msgstr "" + +#: ../../howto/mro.rst:30 +msgid "Acknowledgments:" +msgstr "" + +#: ../../howto/mro.rst:32 +msgid "" +"*All the people of the Python mailing list who sent me their support. Paul " +"Foley who pointed out various imprecisions and made me to add the part on " +"local precedence ordering. David Goodger for help with the formatting in " +"reStructuredText. David Mertz for help with the editing. Finally, Guido van " +"Rossum who enthusiastically added this document to the official Python 2.3 " +"home-page.*" +msgstr "" + +#: ../../howto/mro.rst:40 +msgid "The beginning" +msgstr "" + +#: ../../howto/mro.rst:42 +msgid "*Felix qui potuit rerum cognoscere causas* -- Virgilius" +msgstr "" + +#: ../../howto/mro.rst:44 +msgid "" +"Everything started with a post by Samuele Pedroni to the Python development " +"mailing list [#]_. In his post, Samuele showed that the Python 2.2 method " +"resolution order is not monotonic and he proposed to replace it with the C3 " +"method resolution order. Guido agreed with his arguments and therefore now " +"Python 2.3 uses C3. The C3 method itself has nothing to do with Python, " +"since it was invented by people working on Dylan and it is described in a " +"paper intended for lispers [#]_. The present paper gives a (hopefully) " +"readable discussion of the C3 algorithm for Pythonistas who want to " +"understand the reasons for the change." +msgstr "" + +#: ../../howto/mro.rst:55 +msgid "" +"First of all, let me point out that what I am going to say only applies to " +"the *new style classes* introduced in Python 2.2: *classic classes* " +"maintain their old method resolution order, depth first and then left to " +"right. Therefore, there is no breaking of old code for classic classes; and " +"even if in principle there could be breaking of code for Python 2.2 new " +"style classes, in practice the cases in which the C3 resolution order " +"differs from the Python 2.2 method resolution order are so rare that no real " +"breaking of code is expected. Therefore:" +msgstr "" + +#: ../../howto/mro.rst:64 +msgid "*Don't be scared!*" +msgstr "" + +#: ../../howto/mro.rst:66 +msgid "" +"Moreover, unless you make strong use of multiple inheritance and you have " +"non-trivial hierarchies, you don't need to understand the C3 algorithm, and " +"you can easily skip this paper. On the other hand, if you really want to " +"know how multiple inheritance works, then this paper is for you. The good " +"news is that things are not as complicated as you might expect." +msgstr "" + +#: ../../howto/mro.rst:73 +msgid "Let me begin with some basic definitions." +msgstr "" + +#: ../../howto/mro.rst:75 +msgid "" +"Given a class C in a complicated multiple inheritance hierarchy, it is a non-" +"trivial task to specify the order in which methods are overridden, i.e. to " +"specify the order of the ancestors of C." +msgstr "" + +#: ../../howto/mro.rst:79 +msgid "" +"The list of the ancestors of a class C, including the class itself, ordered " +"from the nearest ancestor to the furthest, is called the class precedence " +"list or the *linearization* of C." +msgstr "" + +#: ../../howto/mro.rst:83 +msgid "" +"The *Method Resolution Order* (MRO) is the set of rules that construct the " +"linearization. In the Python literature, the idiom \"the MRO of C\" is also " +"used as a synonymous for the linearization of the class C." +msgstr "" + +#: ../../howto/mro.rst:88 +msgid "" +"For instance, in the case of single inheritance hierarchy, if C is a " +"subclass of C1, and C1 is a subclass of C2, then the linearization of C is " +"simply the list [C, C1 , C2]. However, with multiple inheritance " +"hierarchies, the construction of the linearization is more cumbersome, since " +"it is more difficult to construct a linearization that respects *local " +"precedence ordering* and *monotonicity*." +msgstr "" + +#: ../../howto/mro.rst:96 +msgid "" +"I will discuss the local precedence ordering later, but I can give the " +"definition of monotonicity here. A MRO is monotonic when the following is " +"true: *if C1 precedes C2 in the linearization of C, then C1 precedes C2 in " +"the linearization of any subclass of C*. Otherwise, the innocuous operation " +"of deriving a new class could change the resolution order of methods, " +"potentially introducing very subtle bugs. Examples where this happens will " +"be shown later." +msgstr "" + +#: ../../howto/mro.rst:104 +msgid "" +"Not all classes admit a linearization. There are cases, in complicated " +"hierarchies, where it is not possible to derive a class such that its " +"linearization respects all the desired properties." +msgstr "" + +#: ../../howto/mro.rst:108 +msgid "Here I give an example of this situation. Consider the hierarchy" +msgstr "" + +#: ../../howto/mro.rst:116 +msgid "" +"which can be represented with the following inheritance graph, where I have " +"denoted with O the ``object`` class, which is the beginning of any hierarchy " +"for new style classes:" +msgstr "" + +#: ../../howto/mro.rst:133 +msgid "" +"In this case, it is not possible to derive a new class C from A and B, since " +"X precedes Y in A, but Y precedes X in B, therefore the method resolution " +"order would be ambiguous in C." +msgstr "" + +#: ../../howto/mro.rst:137 +msgid "" +"Python 2.3 raises an exception in this situation (TypeError: MRO conflict " +"among bases Y, X) forbidding the naive programmer from creating ambiguous " +"hierarchies. Python 2.2 instead does not raise an exception, but chooses an " +"*ad hoc* ordering (CABXYO in this case)." +msgstr "" + +#: ../../howto/mro.rst:143 +msgid "The C3 Method Resolution Order" +msgstr "" + +#: ../../howto/mro.rst:145 +msgid "" +"Let me introduce a few simple notations which will be useful for the " +"following discussion. I will use the shortcut notation::" +msgstr "" + +#: ../../howto/mro.rst:150 +msgid "to indicate the list of classes [C1, C2, ... , CN]." +msgstr "" + +#: ../../howto/mro.rst:152 +msgid "The *head* of the list is its first element::" +msgstr "" + +#: ../../howto/mro.rst:156 +msgid "whereas the *tail* is the rest of the list::" +msgstr "" + +#: ../../howto/mro.rst:160 +msgid "I shall also use the notation::" +msgstr "" + +#: ../../howto/mro.rst:164 +msgid "to denote the sum of the lists [C] + [C1, C2, ... ,CN]." +msgstr "" + +#: ../../howto/mro.rst:166 +msgid "Now I can explain how the MRO works in Python 2.3." +msgstr "" + +#: ../../howto/mro.rst:168 +msgid "" +"Consider a class C in a multiple inheritance hierarchy, with C inheriting " +"from the base classes B1, B2, ... , BN. We want to compute the " +"linearization L[C] of the class C. The rule is the following:" +msgstr "" + +#: ../../howto/mro.rst:173 +msgid "" +"*the linearization of C is the sum of C plus the merge of the linearizations " +"of the parents and the list of the parents.*" +msgstr "" + +#: ../../howto/mro.rst:176 +msgid "In symbolic notation::" +msgstr "" + +#: ../../howto/mro.rst:180 +msgid "" +"In particular, if C is the ``object`` class, which has no parents, the " +"linearization is trivial::" +msgstr "" + +#: ../../howto/mro.rst:185 +msgid "" +"However, in general one has to compute the merge according to the following " +"prescription:" +msgstr "" + +#: ../../howto/mro.rst:188 +msgid "" +"*take the head of the first list, i.e L[B1][0]; if this head is not in the " +"tail of any of the other lists, then add it to the linearization of C and " +"remove it from the lists in the merge, otherwise look at the head of the " +"next list and take it, if it is a good head. Then repeat the operation " +"until all the class are removed or it is impossible to find good heads. In " +"this case, it is impossible to construct the merge, Python 2.3 will refuse " +"to create the class C and will raise an exception.*" +msgstr "" + +#: ../../howto/mro.rst:197 +msgid "" +"This prescription ensures that the merge operation *preserves* the ordering, " +"if the ordering can be preserved. On the other hand, if the order cannot be " +"preserved (as in the example of serious order disagreement discussed above) " +"then the merge cannot be computed." +msgstr "" + +#: ../../howto/mro.rst:202 +msgid "" +"The computation of the merge is trivial if C has only one parent (single " +"inheritance); in this case::" +msgstr "" + +#: ../../howto/mro.rst:207 +msgid "" +"However, in the case of multiple inheritance things are more cumbersome and " +"I don't expect you can understand the rule without a couple of examples ;-)" +msgstr "" + +#: ../../howto/mro.rst:212 +msgid "Examples" +msgstr "範例" + +#: ../../howto/mro.rst:214 +msgid "First example. Consider the following hierarchy:" +msgstr "" + +#: ../../howto/mro.rst:224 +msgid "In this case the inheritance graph can be drawn as:" +msgstr "" + +#: ../../howto/mro.rst:251 +msgid "The linearizations of O,D,E and F are trivial::" +msgstr "" + +#: ../../howto/mro.rst:258 +msgid "The linearization of B can be computed as::" +msgstr "" + +#: ../../howto/mro.rst:262 +msgid "" +"We see that D is a good head, therefore we take it and we are reduced to " +"compute ``merge(O,EO,E)``. Now O is not a good head, since it is in the " +"tail of the sequence EO. In this case the rule says that we have to skip to " +"the next sequence. Then we see that E is a good head; we take it and we are " +"reduced to compute ``merge(O,O)`` which gives O. Therefore::" +msgstr "" + +#: ../../howto/mro.rst:270 +msgid "Using the same procedure one finds::" +msgstr "" + +#: ../../howto/mro.rst:277 +msgid "Now we can compute::" +msgstr "" + +#: ../../howto/mro.rst:287 +msgid "" +"In this example, the linearization is ordered in a pretty nice way according " +"to the inheritance level, in the sense that lower levels (i.e. more " +"specialized classes) have higher precedence (see the inheritance graph). " +"However, this is not the general case." +msgstr "" + +#: ../../howto/mro.rst:292 +msgid "" +"I leave as an exercise for the reader to compute the linearization for my " +"second example:" +msgstr "" + +#: ../../howto/mro.rst:303 +msgid "" +"The only difference with the previous example is the change B(D,E) --> B(E," +"D); however even such a little modification completely changes the ordering " +"of the hierarchy:" +msgstr "" + +#: ../../howto/mro.rst:332 +msgid "" +"Notice that the class E, which is in the second level of the hierarchy, " +"precedes the class C, which is in the first level of the hierarchy, i.e. E " +"is more specialized than C, even if it is in a higher level." +msgstr "" + +#: ../../howto/mro.rst:336 +msgid "" +"A lazy programmer can obtain the MRO directly from Python 2.2, since in this " +"case it coincides with the Python 2.3 linearization. It is enough to invoke " +"the .mro() method of class A:" +msgstr "" + +#: ../../howto/mro.rst:345 +msgid "" +"Finally, let me consider the example discussed in the first section, " +"involving a serious order disagreement. In this case, it is straightforward " +"to compute the linearizations of O, X, Y, A and B:" +msgstr "" + +#: ../../howto/mro.rst:357 +msgid "" +"However, it is impossible to compute the linearization for a class C that " +"inherits from A and B::" +msgstr "" + +#: ../../howto/mro.rst:364 +msgid "" +"At this point we cannot merge the lists XYO and YXO, since X is in the tail " +"of YXO whereas Y is in the tail of XYO: therefore there are no good heads " +"and the C3 algorithm stops. Python 2.3 raises an error and refuses to " +"create the class C." +msgstr "" + +#: ../../howto/mro.rst:370 +msgid "Bad Method Resolution Orders" +msgstr "" + +#: ../../howto/mro.rst:372 +msgid "" +"A MRO is *bad* when it breaks such fundamental properties as local " +"precedence ordering and monotonicity. In this section, I will show that " +"both the MRO for classic classes and the MRO for new style classes in Python " +"2.2 are bad." +msgstr "" + +#: ../../howto/mro.rst:377 +msgid "" +"It is easier to start with the local precedence ordering. Consider the " +"following example:" +msgstr "" + +#: ../../howto/mro.rst:384 +msgid "with inheritance diagram" +msgstr "" + +#: ../../howto/mro.rst:399 +msgid "" +"We see that class G inherits from F and E, with F *before* E: therefore we " +"would expect the attribute *G.remember2buy* to be inherited by *F." +"rembermer2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives" +msgstr "" + +#: ../../howto/mro.rst:407 +msgid "" +"This is a breaking of local precedence ordering since the order in the local " +"precedence list, i.e. the list of the parents of G, is not preserved in the " +"Python 2.2 linearization of G::" +msgstr "" + +#: ../../howto/mro.rst:413 +msgid "" +"One could argue that the reason why F follows E in the Python 2.2 " +"linearization is that F is less specialized than E, since F is the " +"superclass of E; nevertheless the breaking of local precedence ordering is " +"quite non-intuitive and error prone. This is particularly true since it is " +"a different from old style classes:" +msgstr "" + +#: ../../howto/mro.rst:425 +msgid "" +"In this case the MRO is GFEF and the local precedence ordering is preserved." +msgstr "" + +#: ../../howto/mro.rst:428 +msgid "" +"As a general rule, hierarchies such as the previous one should be avoided, " +"since it is unclear if F should override E or viceversa. Python 2.3 solves " +"the ambiguity by raising an exception in the creation of class G, " +"effectively stopping the programmer from generating ambiguous hierarchies. " +"The reason for that is that the C3 algorithm fails when the merge::" +msgstr "" + +#: ../../howto/mro.rst:437 +msgid "" +"cannot be computed, because F is in the tail of EFO and E is in the tail of " +"FE." +msgstr "" + +#: ../../howto/mro.rst:440 +msgid "" +"The real solution is to design a non-ambiguous hierarchy, i.e. to derive G " +"from E and F (the more specific first) and not from F and E; in this case " +"the MRO is GEF without any doubt." +msgstr "" + +#: ../../howto/mro.rst:456 +msgid "" +"Python 2.3 forces the programmer to write good hierarchies (or, at least, " +"less error-prone ones)." +msgstr "" + +#: ../../howto/mro.rst:459 +msgid "" +"On a related note, let me point out that the Python 2.3 algorithm is smart " +"enough to recognize obvious mistakes, as the duplication of classes in the " +"list of parents:" +msgstr "" + +#: ../../howto/mro.rst:469 +msgid "" +"Python 2.2 (both for classic classes and new style classes) in this " +"situation, would not raise any exception." +msgstr "" + +#: ../../howto/mro.rst:472 +msgid "" +"Finally, I would like to point out two lessons we have learned from this " +"example:" +msgstr "" + +#: ../../howto/mro.rst:475 +msgid "" +"despite the name, the MRO determines the resolution order of attributes, not " +"only of methods;" +msgstr "" + +#: ../../howto/mro.rst:478 +msgid "" +"the default food for Pythonistas is spam ! (but you already knew that ;-)" +msgstr "" + +#: ../../howto/mro.rst:481 +msgid "" +"Having discussed the issue of local precedence ordering, let me now consider " +"the issue of monotonicity. My goal is to show that neither the MRO for " +"classic classes nor that for Python 2.2 new style classes is monotonic." +msgstr "" + +#: ../../howto/mro.rst:486 +msgid "" +"To prove that the MRO for classic classes is non-monotonic is rather " +"trivial, it is enough to look at the diamond diagram:" +msgstr "" + +#: ../../howto/mro.rst:500 +msgid "One easily discerns the inconsistency::" +msgstr "" + +#: ../../howto/mro.rst:505 +msgid "" +"On the other hand, there are no problems with the Python 2.2 and 2.3 MROs, " +"they give both::" +msgstr "" + +#: ../../howto/mro.rst:510 +msgid "" +"Guido points out in his essay [#]_ that the classic MRO is not so bad in " +"practice, since one can typically avoids diamonds for classic classes. But " +"all new style classes inherit from ``object``, therefore diamonds are " +"unavoidable and inconsistencies shows up in every multiple inheritance graph." +msgstr "" + +#: ../../howto/mro.rst:516 +msgid "" +"The MRO of Python 2.2 makes breaking monotonicity difficult, but not " +"impossible. The following example, originally provided by Samuele Pedroni, " +"shows that the MRO of Python 2.2 is non-monotonic:" +msgstr "" + +#: ../../howto/mro.rst:530 +msgid "" +"Here are the linearizations according to the C3 MRO (the reader should " +"verify these linearizations as an exercise and draw the inheritance " +"diagram ;-) ::" +msgstr "" + +#: ../../howto/mro.rst:544 +msgid "" +"Python 2.2 gives exactly the same linearizations for A, B, C, D, E, K1, K2 " +"and K3, but a different linearization for Z::" +msgstr "" + +#: ../../howto/mro.rst:549 +msgid "" +"It is clear that this linearization is *wrong*, since A comes before D " +"whereas in the linearization of K3 A comes *after* D. In other words, in K3 " +"methods derived by D override methods derived by A, but in Z, which still is " +"a subclass of K3, methods derived by A override methods derived by D! This " +"is a violation of monotonicity. Moreover, the Python 2.2 linearization of Z " +"is also inconsistent with local precedence ordering, since the local " +"precedence list of the class Z is [K1, K2, K3] (K2 precedes K3), whereas in " +"the linearization of Z K2 *follows* K3. These problems explain why the 2.2 " +"rule has been dismissed in favor of the C3 rule." +msgstr "" + +#: ../../howto/mro.rst:561 +msgid "The end" +msgstr "" + +#: ../../howto/mro.rst:563 +msgid "" +"This section is for the impatient reader, who skipped all the previous " +"sections and jumped immediately to the end. This section is for the lazy " +"programmer too, who didn't want to exercise her/his brain. Finally, it is " +"for the programmer with some hubris, otherwise s/he would not be reading a " +"paper on the C3 method resolution order in multiple inheritance " +"hierarchies ;-) These three virtues taken all together (and *not* " +"separately) deserve a prize: the prize is a short Python 2.2 script that " +"allows you to compute the 2.3 MRO without risk to your brain. Simply change " +"the last line to play with the various examples I have discussed in this " +"paper.::" +msgstr "" + +#: ../../howto/mro.rst:656 +msgid "That's all folks," +msgstr "" + +#: ../../howto/mro.rst:658 +msgid "enjoy !" +msgstr "" + +#: ../../howto/mro.rst:662 +msgid "Resources" +msgstr "" + +#: ../../howto/mro.rst:664 +msgid "" +"The thread on python-dev started by Samuele Pedroni: https://mail.python.org/" +"pipermail/python-dev/2002-October/029035.html" +msgstr "" + +#: ../../howto/mro.rst:667 +msgid "" +"The paper *A Monotonic Superclass Linearization for Dylan*: https://doi." +"org/10.1145/236337.236343" +msgstr "" + +#: ../../howto/mro.rst:670 +msgid "" +"Guido van Rossum's essay, *Unifying types and classes in Python 2.2*: " +"https://web.archive.org/web/20140210194412/http://www.python.org/download/" +"releases/2.2.2/descrintro" +msgstr "" diff --git a/howto/regex.po b/howto/regex.po index ed4026b7e0..32e9cc6be4 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -202,7 +202,7 @@ msgid "" "character that's in the appropriate category in the Unicode database." msgstr "" -#: ../../howto/regex.rst:131 +#: ../../howto/regex.rst:130 msgid "``\\d``" msgstr "``\\d``" @@ -210,7 +210,7 @@ msgstr "``\\d``" msgid "Matches any decimal digit; this is equivalent to the class ``[0-9]``." msgstr "" -#: ../../howto/regex.rst:134 +#: ../../howto/regex.rst:133 msgid "``\\D``" msgstr "``\\D``" @@ -219,7 +219,7 @@ msgid "" "Matches any non-digit character; this is equivalent to the class ``[^0-9]``." msgstr "" -#: ../../howto/regex.rst:138 +#: ../../howto/regex.rst:136 msgid "``\\s``" msgstr "``\\s``" @@ -229,7 +229,7 @@ msgid "" "``[ \\t\\n\\r\\f\\v]``." msgstr "" -#: ../../howto/regex.rst:142 +#: ../../howto/regex.rst:140 msgid "``\\S``" msgstr "``\\S``" @@ -239,7 +239,7 @@ msgid "" "\\t\\n\\r\\f\\v]``." msgstr "" -#: ../../howto/regex.rst:146 +#: ../../howto/regex.rst:144 msgid "``\\w``" msgstr "``\\w``" @@ -249,7 +249,7 @@ msgid "" "Z0-9_]``." msgstr "" -#: ../../howto/regex.rst:150 +#: ../../howto/regex.rst:148 msgid "``\\W``" msgstr "``\\W``" @@ -922,13 +922,13 @@ msgid "" "letters, too. Full Unicode matching also works unless the :const:`ASCII` " "flag is used to disable non-ASCII matches. When the Unicode patterns ``[a-" "z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " -"they will match the 52 ASCII letters and 4 additional non-ASCII letters: 'İ' " -"(U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin small " -"letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U+212A, " -"Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, ``'spAM'``, or " -"``'ſpam'`` (the latter is matched only in Unicode mode). This lowercasing " -"doesn't take the current locale into account; it will if you also set the :" -"const:`LOCALE` flag." +"they will match the 52 ASCII letters and 4 additional non-ASCII letters: " +"'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " +"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and " +"'K' (U+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " +"``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " +"lowercasing doesn't take the current locale into account; it will if you " +"also set the :const:`LOCALE` flag." msgstr "" #: ../../howto/regex.rst:581 @@ -1048,7 +1048,7 @@ msgid "" "of times." msgstr "" -#: ../../howto/regex.rst:704 +#: ../../howto/regex.rst:696 msgid "``|``" msgstr "``|``" @@ -1068,7 +1068,7 @@ msgid "" "class, as in ``[|]``." msgstr "" -#: ../../howto/regex.rst:719 +#: ../../howto/regex.rst:706 msgid "``^``" msgstr "``^``" @@ -1090,7 +1090,7 @@ msgstr "" msgid "To match a literal ``'^'``, use ``\\^``." msgstr "" -#: ../../howto/regex.rst:733 +#: ../../howto/regex.rst:721 msgid "``$``" msgstr "``$``" @@ -1106,7 +1106,7 @@ msgid "" "class, as in ``[$]``." msgstr "" -#: ../../howto/regex.rst:739 +#: ../../howto/regex.rst:735 msgid "``\\A``" msgstr "``\\A``" @@ -1119,7 +1119,7 @@ msgid "" "newline character." msgstr "" -#: ../../howto/regex.rst:742 +#: ../../howto/regex.rst:741 msgid "``\\Z``" msgstr "``\\Z``" @@ -1127,7 +1127,7 @@ msgstr "``\\Z``" msgid "Matches only at the end of the string." msgstr "" -#: ../../howto/regex.rst:777 +#: ../../howto/regex.rst:744 msgid "``\\b``" msgstr "``\\b``" @@ -1163,7 +1163,7 @@ msgid "" "string literals." msgstr "" -#: ../../howto/regex.rst:782 +#: ../../howto/regex.rst:779 msgid "``\\B``" msgstr "``\\B``" @@ -1386,7 +1386,7 @@ msgid "" "this:" msgstr "" -#: ../../howto/regex.rst:990 +#: ../../howto/regex.rst:985 msgid "``(?=...)``" msgstr "``(?=...)``" @@ -1399,7 +1399,7 @@ msgid "" "is tried right where the assertion started." msgstr "" -#: ../../howto/regex.rst:995 +#: ../../howto/regex.rst:992 msgid "``(?!...)``" msgstr "``(?!...)``" diff --git a/library/__future__.po b/library/__future__.po index 52e8c9091e..9d7ddbb4d1 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-30 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2024-02-06 02:12+0000\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -308,7 +308,7 @@ msgstr "" "VIZEBX5EYMSYIJNDBF6DMUMZOCWHARSO/>`__)。目前還尚未做出決定。另請參閱 :pep:" "`563` 和 :pep:`649`。" -#: ../../library/__future__.rst:128 +#: ../../library/__future__.rst:127 msgid ":ref:`future`" msgstr ":ref:`future`" diff --git a/library/array.po b/library/array.po index 0ab347c24f..982540be81 100644 --- a/library/array.po +++ b/library/array.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-22 14:16+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2021-11-23 18:40+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -484,7 +484,7 @@ msgstr "" "過 ``from array import array`` 的方式引入,便能確保該字串表示能透過 :func:" "`eval` 轉換回一個擁有相同型別及數值的陣列。範例: ::" -#: ../../library/array.rst:268 +#: ../../library/array.rst:267 msgid "Module :mod:`struct`" msgstr ":mod:`struct` 模組" @@ -492,7 +492,7 @@ msgstr ":mod:`struct` 模組" msgid "Packing and unpacking of heterogeneous binary data." msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。" -#: ../../library/array.rst:272 +#: ../../library/array.rst:270 msgid "Module :mod:`xdrlib`" msgstr ":mod:`xdrlib` 模組" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index a4901ba503..2590371a0e 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1680,7 +1680,7 @@ msgstr "" msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1372 +#: ../../library/asyncio-eventloop.rst:1371 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" diff --git a/library/atexit.po b/library/atexit.po index 7f36e28b2b..3396a4501c 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-01-31 07:13+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -106,7 +106,7 @@ msgid "" "references do not need to have matching identities." msgstr "" -#: ../../library/atexit.rst:75 +#: ../../library/atexit.rst:74 msgid "Module :mod:`readline`" msgstr ":mod:`readline` 模組" diff --git a/library/base64.po b/library/base64.po index 3f854957d5..3f83d36e4d 100644 --- a/library/base64.po +++ b/library/base64.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -368,7 +368,7 @@ msgid "" "production." msgstr "" -#: ../../library/base64.rst:306 +#: ../../library/base64.rst:305 msgid "Module :mod:`binascii`" msgstr ":mod:`binascii` 模組" @@ -377,7 +377,7 @@ msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" -#: ../../library/base64.rst:309 +#: ../../library/base64.rst:308 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " diff --git a/library/binascii.po b/library/binascii.po index 8528897275..59943be527 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -207,7 +207,7 @@ msgid "" "errors, but may be handled by reading a little more data and trying again." msgstr "" -#: ../../library/binascii.rst:181 +#: ../../library/binascii.rst:179 msgid "Module :mod:`base64`" msgstr ":mod:`base64` 模組" @@ -216,7 +216,7 @@ msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" -#: ../../library/binascii.rst:184 +#: ../../library/binascii.rst:183 msgid "Module :mod:`uu`" msgstr ":mod:`uu` 模組" diff --git a/library/calendar.po b/library/calendar.po index b7913a2475..65963183bc 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-28 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -575,7 +575,7 @@ msgstr "" msgid "The invalid weekday number." msgstr "無效的週幾編號。" -#: ../../library/calendar.rst:495 +#: ../../library/calendar.rst:493 msgid "Module :mod:`datetime`" msgstr ":mod:`datetime` 模組" diff --git a/library/cgi.po b/library/cgi.po index 888e32feb2..b2ee19aca6 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2022-05-22 02:01+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -39,9 +39,8 @@ msgstr "" msgid "" "The :class:`FieldStorage` class can typically be replaced with :func:`urllib." "parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the :mod:`email." -"message` module or `multipart `_ for " -"``POST`` and ``PUT``. Most :ref:`utility functions ` have replacements." +"message` module or :pypi:`multipart` for ``POST`` and ``PUT``. Most :ref:" +"`utility functions ` have replacements." msgstr "" #: ../../library/cgi.rst:30 @@ -416,8 +415,7 @@ msgid "" "This function, like the rest of the :mod:`cgi` module, is deprecated. It can " "be replaced with the functionality in the :mod:`email` package (e.g. :class:" "`email.message.EmailMessage`/:class:`email.message.Message`) which " -"implements the same MIME RFCs, or with the `multipart `__ PyPI project." +"implements the same MIME RFCs, or with the :pypi:`multipart` PyPI project." msgstr "" #: ../../library/cgi.rst:342 diff --git a/library/code.po b/library/code.po index a6f31b3d9a..ee3f6b9810 100644 --- a/library/code.po +++ b/library/code.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 10:36+0000\n" +"POT-Creation-Date: 2024-04-09 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -56,10 +56,10 @@ msgid "" "instance of :class:`InteractiveConsole` and sets *readfunc* to be used as " "the :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is " "provided, it is passed to the :class:`InteractiveConsole` constructor for " -"use as the default namespace for the interpreter loop. The :meth:`interact` " -"method of the instance is then run with *banner* and *exitmsg* passed as the " -"banner and exit message to use, if provided. The console object is " -"discarded after use." +"use as the default namespace for the interpreter loop. The :meth:" +"`~InteractiveConsole.interact` method of the instance is then run with " +"*banner* and *exitmsg* passed as the banner and exit message to use, if " +"provided. The console object is discarded after use." msgstr "" #: ../../library/code.rst:44 diff --git a/library/codecs.po b/library/codecs.po index 888f41ce92..fcfbfa52ac 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 19:55+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2583,7 +2583,7 @@ msgstr "" #: ../../library/codecs.rst:1481 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " -"third-party `idna module `_." +"third-party :pypi:`idna` module." msgstr "" #: ../../library/codecs.rst:1484 diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 146b4780a1..3344d0e075 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-25 06:20+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-01-24 03:33+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -724,7 +724,7 @@ msgstr "" "`TimeoutError`。*timeout* 可以是整數或浮點數。如果未指定 *timeout* 或為 " "``None``,則等待時間就沒有限制。" -#: ../../library/concurrent.futures.rst:522 +#: ../../library/concurrent.futures.rst:521 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr ":pep:`3148` -- futures - 非同步地執行運算" diff --git a/library/configparser.po b/library/configparser.po index 01356ffc83..a93bc51daa 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -39,7 +39,7 @@ msgid "" "the Windows Registry extended version of INI syntax." msgstr "" -#: ../../library/configparser.rst:38 +#: ../../library/configparser.rst:36 msgid "Module :mod:`tomllib`" msgstr ":mod:`tomllib` 模組" @@ -49,7 +49,7 @@ msgid "" "specifically designed to be an improved version of INI." msgstr "" -#: ../../library/configparser.rst:42 +#: ../../library/configparser.rst:40 msgid "Module :mod:`shlex`" msgstr ":mod:`shlex` 模組" @@ -59,7 +59,7 @@ msgid "" "for application configuration files." msgstr "" -#: ../../library/configparser.rst:45 +#: ../../library/configparser.rst:44 msgid "Module :mod:`json`" msgstr ":mod:`json` 模組" diff --git a/library/contextlib.po b/library/contextlib.po index 5a7668df6a..26f925ebba 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-25 06:20+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -758,7 +758,7 @@ msgid "" "use an explicit ``with`` statement." msgstr "" -#: ../../library/contextlib.rst:888 +#: ../../library/contextlib.rst:887 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - \"with\" 陳述式" diff --git a/library/copy.po b/library/copy.po index aaf0f8253d..1a876091aa 100644 --- a/library/copy.po +++ b/library/copy.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-01-20 18:49+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -170,7 +170,7 @@ msgstr "" "`deepcopy` 函式並以該元件作為第一個引數、以該 memo 字典作為第二個引數。memo " "字典應當被當作不透明物件 (opaque object) 來處理。" -#: ../../library/copy.rst:95 +#: ../../library/copy.rst:94 msgid "Module :mod:`pickle`" msgstr ":mod:`pickle` 模組" diff --git a/library/crypt.po b/library/crypt.po index b8b1c2535c..7d1e2ec368 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-13 00:19+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -30,8 +30,8 @@ msgstr "**原始碼:**\\ :source:`Lib/crypt.py`" msgid "" "The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for " "details and alternatives). The :mod:`hashlib` module is a potential " -"replacement for certain use cases. The `passlib `_ package can replace all use cases of this module." +"replacement for certain use cases. The :pypi:`passlib` package can replace " +"all use cases of this module." msgstr "" #: ../../library/crypt.rst:27 diff --git a/library/ctypes.po b/library/ctypes.po index 1ac301a24a..993b8ddb37 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-27 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-04-26 02:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,7 +116,7 @@ msgstr "" msgid "Functions are accessed as attributes of dll objects::" msgstr "" -#: ../../library/ctypes.rst:109 +#: ../../library/ctypes.rst:108 msgid "" "Note that win32 system dlls like ``kernel32`` and ``user32`` often export " "ANSI as well as UNICODE versions of a function. The UNICODE version is " @@ -127,65 +127,65 @@ msgid "" "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" -#: ../../library/ctypes.rst:122 +#: ../../library/ctypes.rst:121 msgid "" "*windll* does not try to select one of them by magic, you must access the " "version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " "explicitly, and then call it with bytes or string objects respectively." msgstr "" -#: ../../library/ctypes.rst:126 +#: ../../library/ctypes.rst:125 msgid "" "Sometimes, dlls export functions with names which aren't valid Python " "identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" "`getattr` to retrieve the function::" msgstr "" -#: ../../library/ctypes.rst:134 +#: ../../library/ctypes.rst:133 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " "functions can be accessed by indexing the dll object with the ordinal " "number::" msgstr "" -#: ../../library/ctypes.rst:151 +#: ../../library/ctypes.rst:150 msgid "Calling functions" msgstr "" -#: ../../library/ctypes.rst:153 +#: ../../library/ctypes.rst:152 msgid "" "You can call these functions like any other Python callable. This example " "uses the ``rand()`` function, which takes no arguments and returns a pseudo-" "random integer::" msgstr "" -#: ../../library/ctypes.rst:159 +#: ../../library/ctypes.rst:158 msgid "" "On Windows, you can call the ``GetModuleHandleA()`` function, which returns " "a win32 module handle (passing ``None`` as single argument to call it with a " "``NULL`` pointer)::" msgstr "" -#: ../../library/ctypes.rst:166 +#: ../../library/ctypes.rst:165 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" -#: ../../library/ctypes.rst:181 +#: ../../library/ctypes.rst:180 msgid "" "To find out the correct calling convention you have to look into the C " "header file or the documentation for the function you want to call." msgstr "" -#: ../../library/ctypes.rst:184 +#: ../../library/ctypes.rst:183 msgid "" "On Windows, :mod:`ctypes` uses win32 structured exception handling to " "prevent crashes from general protection faults when functions are called " "with invalid argument values::" msgstr "" -#: ../../library/ctypes.rst:194 +#: ../../library/ctypes.rst:193 msgid "" "There are, however, enough ways to crash Python with :mod:`ctypes`, so you " "should be careful anyway. The :mod:`faulthandler` module can be helpful in " @@ -193,7 +193,7 @@ msgid "" "library calls)." msgstr "" -#: ../../library/ctypes.rst:199 +#: ../../library/ctypes.rst:198 msgid "" "``None``, integers, bytes objects and (unicode) strings are the only native " "Python objects that can directly be used as parameters in these function " @@ -204,259 +204,259 @@ msgid "" "the C type." msgstr "" -#: ../../library/ctypes.rst:206 +#: ../../library/ctypes.rst:205 msgid "" "Before we move on calling functions with other parameter types, we have to " "learn more about :mod:`ctypes` data types." msgstr "" -#: ../../library/ctypes.rst:213 ../../library/ctypes.rst:2199 +#: ../../library/ctypes.rst:212 ../../library/ctypes.rst:2198 msgid "Fundamental data types" msgstr "" -#: ../../library/ctypes.rst:215 +#: ../../library/ctypes.rst:214 msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" msgstr "" -#: ../../library/ctypes.rst:218 +#: ../../library/ctypes.rst:217 msgid "ctypes type" msgstr "" -#: ../../library/ctypes.rst:218 +#: ../../library/ctypes.rst:217 msgid "C type" msgstr "" -#: ../../library/ctypes.rst:218 +#: ../../library/ctypes.rst:217 msgid "Python type" msgstr "" -#: ../../library/ctypes.rst:220 +#: ../../library/ctypes.rst:219 msgid ":class:`c_bool`" msgstr ":class:`c_bool`" -#: ../../library/ctypes.rst:220 +#: ../../library/ctypes.rst:219 msgid ":c:expr:`_Bool`" msgstr ":c:expr:`_Bool`" -#: ../../library/ctypes.rst:220 +#: ../../library/ctypes.rst:219 msgid "bool (1)" msgstr "bool (1)" -#: ../../library/ctypes.rst:222 +#: ../../library/ctypes.rst:221 msgid ":class:`c_char`" msgstr ":class:`c_char`" -#: ../../library/ctypes.rst:222 ../../library/ctypes.rst:226 +#: ../../library/ctypes.rst:221 ../../library/ctypes.rst:225 msgid ":c:expr:`char`" msgstr ":c:expr:`char`" -#: ../../library/ctypes.rst:222 +#: ../../library/ctypes.rst:221 msgid "1-character bytes object" msgstr "" -#: ../../library/ctypes.rst:224 +#: ../../library/ctypes.rst:223 msgid ":class:`c_wchar`" msgstr ":class:`c_wchar`" -#: ../../library/ctypes.rst:224 +#: ../../library/ctypes.rst:223 msgid ":c:type:`wchar_t`" msgstr ":c:type:`wchar_t`" -#: ../../library/ctypes.rst:224 +#: ../../library/ctypes.rst:223 msgid "1-character string" msgstr "" -#: ../../library/ctypes.rst:226 +#: ../../library/ctypes.rst:225 msgid ":class:`c_byte`" msgstr ":class:`c_byte`" -#: ../../library/ctypes.rst:226 ../../library/ctypes.rst:228 -#: ../../library/ctypes.rst:230 ../../library/ctypes.rst:232 -#: ../../library/ctypes.rst:234 ../../library/ctypes.rst:236 -#: ../../library/ctypes.rst:238 ../../library/ctypes.rst:240 -#: ../../library/ctypes.rst:242 ../../library/ctypes.rst:244 -#: ../../library/ctypes.rst:247 ../../library/ctypes.rst:249 -#: ../../library/ctypes.rst:252 +#: ../../library/ctypes.rst:225 ../../library/ctypes.rst:227 +#: ../../library/ctypes.rst:229 ../../library/ctypes.rst:231 +#: ../../library/ctypes.rst:233 ../../library/ctypes.rst:235 +#: ../../library/ctypes.rst:237 ../../library/ctypes.rst:239 +#: ../../library/ctypes.rst:241 ../../library/ctypes.rst:243 +#: ../../library/ctypes.rst:246 ../../library/ctypes.rst:248 +#: ../../library/ctypes.rst:251 msgid "int" msgstr "int" -#: ../../library/ctypes.rst:228 +#: ../../library/ctypes.rst:227 msgid ":class:`c_ubyte`" msgstr ":class:`c_ubyte`" -#: ../../library/ctypes.rst:228 +#: ../../library/ctypes.rst:227 msgid ":c:expr:`unsigned char`" msgstr ":c:expr:`unsigned char`" -#: ../../library/ctypes.rst:230 +#: ../../library/ctypes.rst:229 msgid ":class:`c_short`" msgstr ":class:`c_short`" -#: ../../library/ctypes.rst:230 +#: ../../library/ctypes.rst:229 msgid ":c:expr:`short`" msgstr ":c:expr:`short`" -#: ../../library/ctypes.rst:232 +#: ../../library/ctypes.rst:231 msgid ":class:`c_ushort`" msgstr ":class:`c_ushort`" -#: ../../library/ctypes.rst:232 +#: ../../library/ctypes.rst:231 msgid ":c:expr:`unsigned short`" msgstr ":c:expr:`unsigned short`" -#: ../../library/ctypes.rst:234 +#: ../../library/ctypes.rst:233 msgid ":class:`c_int`" msgstr ":class:`c_int`" -#: ../../library/ctypes.rst:234 +#: ../../library/ctypes.rst:233 msgid ":c:expr:`int`" msgstr ":c:expr:`int`" -#: ../../library/ctypes.rst:236 +#: ../../library/ctypes.rst:235 msgid ":class:`c_uint`" msgstr ":class:`c_uint`" -#: ../../library/ctypes.rst:236 +#: ../../library/ctypes.rst:235 msgid ":c:expr:`unsigned int`" msgstr ":c:expr:`unsigned int`" -#: ../../library/ctypes.rst:238 +#: ../../library/ctypes.rst:237 msgid ":class:`c_long`" msgstr ":class:`c_long`" -#: ../../library/ctypes.rst:238 +#: ../../library/ctypes.rst:237 msgid ":c:expr:`long`" msgstr ":c:expr:`long`" -#: ../../library/ctypes.rst:240 +#: ../../library/ctypes.rst:239 msgid ":class:`c_ulong`" msgstr ":class:`c_ulong`" -#: ../../library/ctypes.rst:240 +#: ../../library/ctypes.rst:239 msgid ":c:expr:`unsigned long`" msgstr ":c:expr:`unsigned long`" -#: ../../library/ctypes.rst:242 +#: ../../library/ctypes.rst:241 msgid ":class:`c_longlong`" msgstr ":class:`c_longlong`" -#: ../../library/ctypes.rst:242 +#: ../../library/ctypes.rst:241 msgid ":c:expr:`__int64` or :c:expr:`long long`" msgstr ":c:expr:`__int64` 或 :c:expr:`long long`" -#: ../../library/ctypes.rst:244 +#: ../../library/ctypes.rst:243 msgid ":class:`c_ulonglong`" msgstr ":class:`c_ulonglong`" -#: ../../library/ctypes.rst:244 +#: ../../library/ctypes.rst:243 msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" msgstr ":c:expr:`unsigned __int64` 或 :c:expr:`unsigned long long`" -#: ../../library/ctypes.rst:247 +#: ../../library/ctypes.rst:246 msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" -#: ../../library/ctypes.rst:247 +#: ../../library/ctypes.rst:246 msgid ":c:type:`size_t`" msgstr ":c:type:`size_t`" -#: ../../library/ctypes.rst:249 +#: ../../library/ctypes.rst:248 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" -#: ../../library/ctypes.rst:249 +#: ../../library/ctypes.rst:248 msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" msgstr ":c:type:`ssize_t` 或 :c:expr:`Py_ssize_t`" -#: ../../library/ctypes.rst:252 +#: ../../library/ctypes.rst:251 msgid ":class:`c_time_t`" msgstr ":class:`c_time_t`" -#: ../../library/ctypes.rst:252 +#: ../../library/ctypes.rst:251 msgid ":c:type:`time_t`" msgstr ":c:type:`time_t`" -#: ../../library/ctypes.rst:254 +#: ../../library/ctypes.rst:253 msgid ":class:`c_float`" msgstr ":class:`c_float`" -#: ../../library/ctypes.rst:254 +#: ../../library/ctypes.rst:253 msgid ":c:expr:`float`" msgstr ":c:expr:`float`" -#: ../../library/ctypes.rst:254 ../../library/ctypes.rst:256 -#: ../../library/ctypes.rst:258 +#: ../../library/ctypes.rst:253 ../../library/ctypes.rst:255 +#: ../../library/ctypes.rst:257 msgid "float" msgstr "float" -#: ../../library/ctypes.rst:256 +#: ../../library/ctypes.rst:255 msgid ":class:`c_double`" msgstr ":class:`c_double`" -#: ../../library/ctypes.rst:256 +#: ../../library/ctypes.rst:255 msgid ":c:expr:`double`" msgstr ":c:expr:`double`" -#: ../../library/ctypes.rst:258 +#: ../../library/ctypes.rst:257 msgid ":class:`c_longdouble`" msgstr ":class:`c_longdouble`" -#: ../../library/ctypes.rst:258 +#: ../../library/ctypes.rst:257 msgid ":c:expr:`long double`" msgstr ":c:expr:`long double`" -#: ../../library/ctypes.rst:260 +#: ../../library/ctypes.rst:259 msgid ":class:`c_char_p`" msgstr ":class:`c_char_p`" -#: ../../library/ctypes.rst:260 +#: ../../library/ctypes.rst:259 msgid ":c:expr:`char *` (NUL terminated)" msgstr "" -#: ../../library/ctypes.rst:260 +#: ../../library/ctypes.rst:259 msgid "bytes object or ``None``" msgstr "" -#: ../../library/ctypes.rst:262 +#: ../../library/ctypes.rst:261 msgid ":class:`c_wchar_p`" msgstr ":class:`c_wchar_p`" -#: ../../library/ctypes.rst:262 +#: ../../library/ctypes.rst:261 msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr "" -#: ../../library/ctypes.rst:262 +#: ../../library/ctypes.rst:261 msgid "string or ``None``" msgstr "字串或 ``None``" -#: ../../library/ctypes.rst:264 +#: ../../library/ctypes.rst:263 msgid ":class:`c_void_p`" msgstr ":class:`c_void_p`" -#: ../../library/ctypes.rst:264 +#: ../../library/ctypes.rst:263 msgid ":c:expr:`void *`" msgstr ":c:expr:`void *`" -#: ../../library/ctypes.rst:264 +#: ../../library/ctypes.rst:263 msgid "int or ``None``" msgstr "" -#: ../../library/ctypes.rst:268 +#: ../../library/ctypes.rst:267 msgid "The constructor accepts any object with a truth value." msgstr "" -#: ../../library/ctypes.rst:270 +#: ../../library/ctypes.rst:269 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" msgstr "" -#: ../../library/ctypes.rst:281 +#: ../../library/ctypes.rst:280 msgid "" "Since these types are mutable, their value can also be changed afterwards::" msgstr "" -#: ../../library/ctypes.rst:293 +#: ../../library/ctypes.rst:292 msgid "" "Assigning a new value to instances of the pointer types :class:`c_char_p`, :" "class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they " @@ -464,7 +464,7 @@ msgid "" "Python bytes objects are immutable)::" msgstr "" -#: ../../library/ctypes.rst:313 +#: ../../library/ctypes.rst:312 msgid "" "You should be careful, however, not to pass them to functions expecting " "pointers to mutable memory. If you need mutable memory blocks, ctypes has a :" @@ -474,7 +474,7 @@ msgid "" "``value`` property::" msgstr "" -#: ../../library/ctypes.rst:337 +#: ../../library/ctypes.rst:336 msgid "" "The :func:`create_string_buffer` function replaces the old :func:`!c_buffer` " "function (which is still available as an alias). To create a mutable memory " @@ -482,29 +482,29 @@ msgid "" "the :func:`create_unicode_buffer` function." msgstr "" -#: ../../library/ctypes.rst:346 +#: ../../library/ctypes.rst:345 msgid "Calling functions, continued" msgstr "" -#: ../../library/ctypes.rst:348 +#: ../../library/ctypes.rst:347 msgid "" "Note that printf prints to the real standard output channel, *not* to :data:" "`sys.stdout`, so these examples will only work at the console prompt, not " "from within *IDLE* or *PythonWin*::" msgstr "" -#: ../../library/ctypes.rst:368 +#: ../../library/ctypes.rst:367 msgid "" "As has been mentioned before, all Python types except integers, strings, and " "bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" -#: ../../library/ctypes.rst:380 +#: ../../library/ctypes.rst:379 msgid "Calling variadic functions" msgstr "" -#: ../../library/ctypes.rst:382 +#: ../../library/ctypes.rst:381 msgid "" "On a lot of platforms calling variadic functions through ctypes is exactly " "the same as calling functions with a fixed number of parameters. On some " @@ -513,23 +513,23 @@ msgid "" "functions." msgstr "" -#: ../../library/ctypes.rst:387 +#: ../../library/ctypes.rst:386 msgid "" "On those platforms it is required to specify the :attr:`~_FuncPtr.argtypes` " "attribute for the regular, non-variadic, function arguments:" msgstr "" -#: ../../library/ctypes.rst:394 +#: ../../library/ctypes.rst:393 msgid "" "Because specifying the attribute does not inhibit portability it is advised " "to always specify :attr:`~_FuncPtr.argtypes` for all variadic functions." msgstr "" -#: ../../library/ctypes.rst:401 +#: ../../library/ctypes.rst:400 msgid "Calling functions with your own custom data types" msgstr "" -#: ../../library/ctypes.rst:403 +#: ../../library/ctypes.rst:402 msgid "" "You can also customize :mod:`ctypes` argument conversion to allow instances " "of your own classes be used as function arguments. :mod:`ctypes` looks for " @@ -538,24 +538,24 @@ msgid "" "or an object with an :attr:`!_as_parameter_` attribute::" msgstr "" -#: ../../library/ctypes.rst:419 +#: ../../library/ctypes.rst:418 msgid "" "If you don't want to store the instance's data in the :attr:`!" "_as_parameter_` instance variable, you could define a :class:`property` " "which makes the attribute available on request." msgstr "" -#: ../../library/ctypes.rst:427 +#: ../../library/ctypes.rst:426 msgid "Specifying the required argument types (function prototypes)" msgstr "" -#: ../../library/ctypes.rst:429 +#: ../../library/ctypes.rst:428 msgid "" "It is possible to specify the required argument types of functions exported " "from DLLs by setting the :attr:`~_FuncPtr.argtypes` attribute." msgstr "" -#: ../../library/ctypes.rst:432 +#: ../../library/ctypes.rst:431 msgid "" ":attr:`~_FuncPtr.argtypes` must be a sequence of C data types (the :func:`!" "printf` function is probably not a good example here, because it takes a " @@ -564,14 +564,14 @@ msgid "" "feature)::" msgstr "" -#: ../../library/ctypes.rst:443 +#: ../../library/ctypes.rst:442 msgid "" "Specifying a format protects against incompatible argument types (just as a " "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" -#: ../../library/ctypes.rst:455 +#: ../../library/ctypes.rst:454 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`~_CData.from_param` class method for them to be " @@ -585,48 +585,48 @@ msgid "" "_as_parameter_` attribute." msgstr "" -#: ../../library/ctypes.rst:469 +#: ../../library/ctypes.rst:468 msgid "Return types" msgstr "" -#: ../../library/ctypes.rst:479 +#: ../../library/ctypes.rst:478 msgid "" "By default functions are assumed to return the C :c:expr:`int` type. Other " "return types can be specified by setting the :attr:`~_FuncPtr.restype` " "attribute of the function object." msgstr "" -#: ../../library/ctypes.rst:483 +#: ../../library/ctypes.rst:482 msgid "" "The C prototype of :c:func:`time` is ``time_t time(time_t *)``. Because :c:" "type:`time_t` might be of a different type than the default return type :c:" "expr:`int`, you should specify the :attr:`!restype` attribute::" msgstr "" -#: ../../library/ctypes.rst:489 +#: ../../library/ctypes.rst:488 msgid "The argument types can be specified using :attr:`~_FuncPtr.argtypes`::" msgstr "" -#: ../../library/ctypes.rst:493 +#: ../../library/ctypes.rst:492 msgid "" "To call the function with a ``NULL`` pointer as first argument, use " "``None``::" msgstr "" -#: ../../library/ctypes.rst:498 +#: ../../library/ctypes.rst:497 msgid "" "Here is a more advanced example, it uses the :func:`!strchr` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" -#: ../../library/ctypes.rst:511 +#: ../../library/ctypes.rst:510 msgid "" "If you want to avoid the :func:`ord(\"x\") ` calls above, you can set " "the :attr:`~_FuncPtr.argtypes` attribute, and the second argument will be " "converted from a single character Python bytes object into a C char:" msgstr "" -#: ../../library/ctypes.rst:530 +#: ../../library/ctypes.rst:529 msgid "" "You can also use a callable Python object (a function or a class for " "example) as the :attr:`~_FuncPtr.restype` attribute, if the foreign function " @@ -636,7 +636,7 @@ msgid "" "automatically raise an exception::" msgstr "" -#: ../../library/ctypes.rst:553 +#: ../../library/ctypes.rst:552 msgid "" "``WinError`` is a function which will call Windows ``FormatMessage()`` api " "to get the string representation of an error code, and *returns* an " @@ -644,18 +644,18 @@ msgid "" "used, it calls :func:`GetLastError` to retrieve it." msgstr "" -#: ../../library/ctypes.rst:558 +#: ../../library/ctypes.rst:557 msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`~_FuncPtr.errcheck` attribute; see the reference manual " "for details." msgstr "" -#: ../../library/ctypes.rst:566 +#: ../../library/ctypes.rst:565 msgid "Passing pointers (or: passing parameters by reference)" msgstr "" -#: ../../library/ctypes.rst:568 +#: ../../library/ctypes.rst:567 msgid "" "Sometimes a C api function expects a *pointer* to a data type as parameter, " "probably to write into the corresponding location, or if the data is too " @@ -663,7 +663,7 @@ msgid "" "reference*." msgstr "" -#: ../../library/ctypes.rst:572 +#: ../../library/ctypes.rst:571 msgid "" ":mod:`ctypes` exports the :func:`byref` function which is used to pass " "parameters by reference. The same effect can be achieved with the :func:" @@ -672,11 +672,11 @@ msgid "" "you don't need the pointer object in Python itself::" msgstr "" -#: ../../library/ctypes.rst:594 +#: ../../library/ctypes.rst:593 msgid "Structures and unions" msgstr "" -#: ../../library/ctypes.rst:596 +#: ../../library/ctypes.rst:595 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`ctypes` module. Each " @@ -685,44 +685,44 @@ msgid "" "*field type*." msgstr "" -#: ../../library/ctypes.rst:601 +#: ../../library/ctypes.rst:600 msgid "" "The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " "other derived :mod:`ctypes` type: structure, union, array, pointer." msgstr "" -#: ../../library/ctypes.rst:604 +#: ../../library/ctypes.rst:603 msgid "" "Here is a simple example of a POINT structure, which contains two integers " "named *x* and *y*, and also shows how to initialize a structure in the " "constructor::" msgstr "" -#: ../../library/ctypes.rst:624 +#: ../../library/ctypes.rst:623 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." msgstr "" -#: ../../library/ctypes.rst:627 +#: ../../library/ctypes.rst:626 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -#: ../../library/ctypes.rst:641 +#: ../../library/ctypes.rst:640 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" -#: ../../library/ctypes.rst:646 +#: ../../library/ctypes.rst:645 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" -#: ../../library/ctypes.rst:660 +#: ../../library/ctypes.rst:659 msgid "" ":mod:`ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " @@ -730,11 +730,11 @@ msgid "" "structures with bit-fields should always be passed to functions by pointer." msgstr "" -#: ../../library/ctypes.rst:666 +#: ../../library/ctypes.rst:665 msgid "Structure/union alignment and byte order" msgstr "" -#: ../../library/ctypes.rst:668 +#: ../../library/ctypes.rst:667 msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" @@ -743,7 +743,7 @@ msgid "" "the fields. This is what ``#pragma pack(n)`` also does in MSVC." msgstr "" -#: ../../library/ctypes.rst:674 +#: ../../library/ctypes.rst:673 msgid "" ":mod:`ctypes` uses the native byte order for Structures and Unions. To " "build structures with non-native byte order, you can use one of the :class:" @@ -752,91 +752,91 @@ msgid "" "classes cannot contain pointer fields." msgstr "" -#: ../../library/ctypes.rst:684 +#: ../../library/ctypes.rst:683 msgid "Bit fields in structures and unions" msgstr "" -#: ../../library/ctypes.rst:686 +#: ../../library/ctypes.rst:685 msgid "" "It is possible to create structures and unions containing bit fields. Bit " "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`~Structure._fields_` tuples::" msgstr "" -#: ../../library/ctypes.rst:704 +#: ../../library/ctypes.rst:703 msgid "Arrays" msgstr "" -#: ../../library/ctypes.rst:706 +#: ../../library/ctypes.rst:705 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: ../../library/ctypes.rst:708 +#: ../../library/ctypes.rst:707 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: ../../library/ctypes.rst:713 +#: ../../library/ctypes.rst:712 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: ../../library/ctypes.rst:729 +#: ../../library/ctypes.rst:728 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: ../../library/ctypes.rst:735 +#: ../../library/ctypes.rst:734 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: ../../library/ctypes.rst:738 +#: ../../library/ctypes.rst:737 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: ../../library/ctypes.rst:754 +#: ../../library/ctypes.rst:753 msgid "Pointers" msgstr "" -#: ../../library/ctypes.rst:756 +#: ../../library/ctypes.rst:755 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" msgstr "" -#: ../../library/ctypes.rst:764 +#: ../../library/ctypes.rst:763 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" msgstr "" -#: ../../library/ctypes.rst:771 +#: ../../library/ctypes.rst:770 msgid "" "Note that :mod:`ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" -#: ../../library/ctypes.rst:780 +#: ../../library/ctypes.rst:779 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " "is stored::" msgstr "" -#: ../../library/ctypes.rst:792 +#: ../../library/ctypes.rst:791 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: ../../library/ctypes.rst:798 +#: ../../library/ctypes.rst:797 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: ../../library/ctypes.rst:807 +#: ../../library/ctypes.rst:806 msgid "" "It is also possible to use indexes different from 0, but you must know what " "you're doing, just as in C: You can access or change arbitrary memory " @@ -845,7 +845,7 @@ msgid "" "instead of a single item." msgstr "" -#: ../../library/ctypes.rst:813 +#: ../../library/ctypes.rst:812 msgid "" "Behind the scenes, the :func:`pointer` function does more than simply create " "pointer instances, it has to create pointer *types* first. This is done with " @@ -853,23 +853,23 @@ msgid "" "returns a new type::" msgstr "" -#: ../../library/ctypes.rst:829 +#: ../../library/ctypes.rst:828 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: ../../library/ctypes.rst:837 +#: ../../library/ctypes.rst:836 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: ../../library/ctypes.rst:856 +#: ../../library/ctypes.rst:855 msgid "Type conversions" msgstr "" -#: ../../library/ctypes.rst:858 +#: ../../library/ctypes.rst:857 msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`~_FuncPtr.argtypes` list of a function or " @@ -880,7 +880,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: ../../library/ctypes.rst:879 +#: ../../library/ctypes.rst:878 msgid "" "In addition, if a function argument is explicitly declared to be a pointer " "type (such as ``POINTER(c_int)``) in :attr:`~_FuncPtr.argtypes`, an object " @@ -889,11 +889,11 @@ msgid "" "automatically." msgstr "" -#: ../../library/ctypes.rst:884 +#: ../../library/ctypes.rst:883 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: ../../library/ctypes.rst:891 +#: ../../library/ctypes.rst:890 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " "type into another type. :mod:`ctypes` provides a :func:`cast` function " @@ -902,11 +902,11 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: ../../library/ctypes.rst:903 +#: ../../library/ctypes.rst:902 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: ../../library/ctypes.rst:905 +#: ../../library/ctypes.rst:904 msgid "" "The :func:`cast` function can be used to cast a ctypes instance into a " "pointer to a different ctypes data type. :func:`cast` takes two parameters, " @@ -915,60 +915,60 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: ../../library/ctypes.rst:916 +#: ../../library/ctypes.rst:915 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: ../../library/ctypes.rst:929 +#: ../../library/ctypes.rst:928 msgid "Incomplete Types" msgstr "" -#: ../../library/ctypes.rst:931 +#: ../../library/ctypes.rst:930 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" -#: ../../library/ctypes.rst:942 +#: ../../library/ctypes.rst:941 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: ../../library/ctypes.rst:955 +#: ../../library/ctypes.rst:954 msgid "" "because the new ``class cell`` is not available in the class statement " "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`~Structure._fields_` attribute later, after the class statement::" msgstr "" -#: ../../library/ctypes.rst:967 +#: ../../library/ctypes.rst:966 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" msgstr "" -#: ../../library/ctypes.rst:988 +#: ../../library/ctypes.rst:987 msgid "Callback functions" msgstr "" -#: ../../library/ctypes.rst:990 +#: ../../library/ctypes.rst:989 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: ../../library/ctypes.rst:993 +#: ../../library/ctypes.rst:992 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " "arguments this function will receive." msgstr "" -#: ../../library/ctypes.rst:997 +#: ../../library/ctypes.rst:996 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -976,21 +976,21 @@ msgid "" "calling convention." msgstr "" -#: ../../library/ctypes.rst:1002 +#: ../../library/ctypes.rst:1001 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " "remaining arguments." msgstr "" -#: ../../library/ctypes.rst:1006 +#: ../../library/ctypes.rst:1005 msgid "" "I will present an example here which uses the standard C library's :c:func:`!" "qsort` function, that is used to sort items with the help of a callback " "function. :c:func:`!qsort` will be used to sort an array of integers::" msgstr "" -#: ../../library/ctypes.rst:1016 +#: ../../library/ctypes.rst:1015 msgid "" ":func:`!qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " @@ -1000,44 +1000,44 @@ msgid "" "otherwise." msgstr "" -#: ../../library/ctypes.rst:1022 +#: ../../library/ctypes.rst:1021 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" -#: ../../library/ctypes.rst:1028 +#: ../../library/ctypes.rst:1027 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: ../../library/ctypes.rst:1038 +#: ../../library/ctypes.rst:1037 msgid "The result::" msgstr "" -#: ../../library/ctypes.rst:1048 +#: ../../library/ctypes.rst:1047 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: ../../library/ctypes.rst:1063 +#: ../../library/ctypes.rst:1062 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: ../../library/ctypes.rst:1070 +#: ../../library/ctypes.rst:1069 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: ../../library/ctypes.rst:1088 +#: ../../library/ctypes.rst:1087 msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " "are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -#: ../../library/ctypes.rst:1092 +#: ../../library/ctypes.rst:1091 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " @@ -1047,35 +1047,35 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: ../../library/ctypes.rst:1102 +#: ../../library/ctypes.rst:1101 msgid "Accessing values exported from dlls" msgstr "" -#: ../../library/ctypes.rst:1104 +#: ../../library/ctypes.rst:1103 msgid "" "Some shared libraries not only export functions, they also export variables. " "An example in the Python library itself is the :c:data:`Py_Version`, Python " "runtime version number encoded in a single constant integer." msgstr "" -#: ../../library/ctypes.rst:1108 +#: ../../library/ctypes.rst:1107 msgid "" ":mod:`ctypes` can access values like this with the :meth:`~_CData.in_dll` " "class methods of the type. *pythonapi* is a predefined symbol giving access " "to the Python C api::" msgstr "" -#: ../../library/ctypes.rst:1116 +#: ../../library/ctypes.rst:1115 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" -#: ../../library/ctypes.rst:1119 +#: ../../library/ctypes.rst:1118 msgid "Quoting the docs for that value:" msgstr "" -#: ../../library/ctypes.rst:1121 +#: ../../library/ctypes.rst:1120 msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " "records, terminated by one whose members are all ``NULL`` or zero. When a " @@ -1084,19 +1084,19 @@ msgid "" "frozen modules." msgstr "" -#: ../../library/ctypes.rst:1126 +#: ../../library/ctypes.rst:1125 msgid "" "So manipulating this pointer could even prove useful. To restrict the " "example size, we show only how this table can be read with :mod:`ctypes`::" msgstr "" -#: ../../library/ctypes.rst:1140 +#: ../../library/ctypes.rst:1139 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: ../../library/ctypes.rst:1147 +#: ../../library/ctypes.rst:1146 msgid "" "Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " "we can iterate over it, but we just have to make sure that our loop " @@ -1105,34 +1105,34 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: ../../library/ctypes.rst:1163 +#: ../../library/ctypes.rst:1162 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -#: ../../library/ctypes.rst:1171 +#: ../../library/ctypes.rst:1170 msgid "Surprises" msgstr "" -#: ../../library/ctypes.rst:1173 +#: ../../library/ctypes.rst:1172 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" -#: ../../library/ctypes.rst:1176 +#: ../../library/ctypes.rst:1175 msgid "Consider the following example::" msgstr "" -#: ../../library/ctypes.rst:1196 +#: ../../library/ctypes.rst:1195 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -#: ../../library/ctypes.rst:1204 +#: ../../library/ctypes.rst:1203 msgid "" "Note that ``temp0`` and ``temp1`` are objects still using the internal " "buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " @@ -1141,26 +1141,26 @@ msgid "" "have the expected effect." msgstr "" -#: ../../library/ctypes.rst:1210 +#: ../../library/ctypes.rst:1209 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " "accessing the root-object's underlying buffer." msgstr "" -#: ../../library/ctypes.rst:1214 +#: ../../library/ctypes.rst:1213 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: ../../library/ctypes.rst:1226 +#: ../../library/ctypes.rst:1225 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: ../../library/ctypes.rst:1229 +#: ../../library/ctypes.rst:1228 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1169,16 +1169,16 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: ../../library/ctypes.rst:1239 +#: ../../library/ctypes.rst:1238 msgid "Variable-sized data types" msgstr "" -#: ../../library/ctypes.rst:1241 +#: ../../library/ctypes.rst:1240 msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" -#: ../../library/ctypes.rst:1243 +#: ../../library/ctypes.rst:1242 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " "existing ctypes object. The function takes the object as first argument, " @@ -1187,35 +1187,35 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: ../../library/ctypes.rst:1263 +#: ../../library/ctypes.rst:1262 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " "we get errors accessing other elements::" msgstr "" -#: ../../library/ctypes.rst:1275 +#: ../../library/ctypes.rst:1274 msgid "" "Another way to use variable-sized data types with :mod:`ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " "required size is already known, on a case by case basis." msgstr "" -#: ../../library/ctypes.rst:1283 +#: ../../library/ctypes.rst:1282 msgid "ctypes reference" msgstr "" -#: ../../library/ctypes.rst:1289 +#: ../../library/ctypes.rst:1288 msgid "Finding shared libraries" msgstr "" -#: ../../library/ctypes.rst:1291 +#: ../../library/ctypes.rst:1290 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." msgstr "" -#: ../../library/ctypes.rst:1294 +#: ../../library/ctypes.rst:1293 msgid "" "The purpose of the :func:`~ctypes.util.find_library` function is to locate a " "library in a way similar to what the compiler or runtime loader does (on " @@ -1224,13 +1224,13 @@ msgid "" "and call the runtime loader directly." msgstr "" -#: ../../library/ctypes.rst:1300 +#: ../../library/ctypes.rst:1299 msgid "" "The :mod:`!ctypes.util` module provides a function which can help to " "determine the library to load." msgstr "" -#: ../../library/ctypes.rst:1308 +#: ../../library/ctypes.rst:1307 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " @@ -1238,39 +1238,39 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../library/ctypes.rst:1313 ../../library/ctypes.rst:1973 +#: ../../library/ctypes.rst:1312 ../../library/ctypes.rst:1972 msgid "The exact functionality is system dependent." msgstr "" -#: ../../library/ctypes.rst:1315 +#: ../../library/ctypes.rst:1314 msgid "" "On Linux, :func:`~ctypes.util.find_library` tries to run external programs " "(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library " "file. It returns the filename of the library file." msgstr "" -#: ../../library/ctypes.rst:1319 +#: ../../library/ctypes.rst:1318 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " "when searching for libraries, if a library cannot be found by any other " "means." msgstr "" -#: ../../library/ctypes.rst:1323 +#: ../../library/ctypes.rst:1322 msgid "Here are some examples::" msgstr "" "以下是一些範例:\n" "\n" "::" -#: ../../library/ctypes.rst:1334 +#: ../../library/ctypes.rst:1333 msgid "" "On macOS, :func:`~ctypes.util.find_library` tries several predefined naming " "schemes and paths to locate the library, and returns a full pathname if " "successful::" msgstr "" -#: ../../library/ctypes.rst:1348 +#: ../../library/ctypes.rst:1347 msgid "" "On Windows, :func:`~ctypes.util.find_library` searches along the system " "search path, and returns the full pathname, but since there is no predefined " @@ -1278,7 +1278,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/ctypes.rst:1352 +#: ../../library/ctypes.rst:1351 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " "determine the shared library name at development time, and hardcode that " @@ -1286,24 +1286,24 @@ msgid "" "to locate the library at runtime." msgstr "" -#: ../../library/ctypes.rst:1360 +#: ../../library/ctypes.rst:1359 msgid "Loading shared libraries" msgstr "" -#: ../../library/ctypes.rst:1362 +#: ../../library/ctypes.rst:1361 msgid "" "There are several ways to load shared libraries into the Python process. " "One way is to instantiate one of the following classes:" msgstr "" -#: ../../library/ctypes.rst:1368 +#: ../../library/ctypes.rst:1367 msgid "" "Instances of this class represent loaded shared libraries. Functions in " "these libraries use the standard C calling convention, and are assumed to " "return :c:expr:`int`." msgstr "" -#: ../../library/ctypes.rst:1372 +#: ../../library/ctypes.rst:1371 msgid "" "On Windows creating a :class:`CDLL` instance may fail even if the DLL name " "exists. When a dependent DLL of the loaded DLL is not found, a :exc:" @@ -1315,18 +1315,18 @@ msgid "" "determine which one is not found using Windows debugging and tracing tools." msgstr "" -#: ../../library/ctypes.rst:1384 ../../library/ctypes.rst:1407 -#: ../../library/ctypes.rst:1418 ../../library/ctypes.rst:1435 +#: ../../library/ctypes.rst:1383 ../../library/ctypes.rst:1406 +#: ../../library/ctypes.rst:1417 ../../library/ctypes.rst:1434 msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -#: ../../library/ctypes.rst:1388 +#: ../../library/ctypes.rst:1387 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" -#: ../../library/ctypes.rst:1394 +#: ../../library/ctypes.rst:1393 msgid "" "Windows only: Instances of this class represent loaded shared libraries, " "functions in these libraries use the ``stdcall`` calling convention, and are " @@ -1336,26 +1336,26 @@ msgid "" "value signals a failure, an :class:`OSError` is automatically raised." msgstr "" -#: ../../library/ctypes.rst:1401 +#: ../../library/ctypes.rst:1400 msgid "" ":exc:`WindowsError` used to be raised, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../library/ctypes.rst:1412 +#: ../../library/ctypes.rst:1411 msgid "" "Windows only: Instances of this class represent loaded shared libraries, " "functions in these libraries use the ``stdcall`` calling convention, and are " "assumed to return :c:expr:`int` by default." msgstr "" -#: ../../library/ctypes.rst:1420 +#: ../../library/ctypes.rst:1419 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." msgstr "" -#: ../../library/ctypes.rst:1426 +#: ../../library/ctypes.rst:1425 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " "Python GIL is *not* released during the function call, and after the " @@ -1363,11 +1363,11 @@ msgid "" "set, a Python exception is raised." msgstr "" -#: ../../library/ctypes.rst:1431 +#: ../../library/ctypes.rst:1430 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" -#: ../../library/ctypes.rst:1437 +#: ../../library/ctypes.rst:1436 msgid "" "All these classes can be instantiated by calling them with at least one " "argument, the pathname of the shared library. If you have an existing " @@ -1377,7 +1377,7 @@ msgid "" "the process, and to get a handle to it." msgstr "" -#: ../../library/ctypes.rst:1444 +#: ../../library/ctypes.rst:1443 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -1385,7 +1385,7 @@ msgid "" "configurable." msgstr "" -#: ../../library/ctypes.rst:1449 +#: ../../library/ctypes.rst:1448 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" @@ -1395,14 +1395,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: ../../library/ctypes.rst:1456 +#: ../../library/ctypes.rst:1455 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " "private copy to a new value and returns the former value." msgstr "" -#: ../../library/ctypes.rst:1460 +#: ../../library/ctypes.rst:1459 msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" @@ -1411,7 +1411,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: ../../library/ctypes.rst:1466 +#: ../../library/ctypes.rst:1465 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " @@ -1421,29 +1421,29 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: ../../library/ctypes.rst:1473 +#: ../../library/ctypes.rst:1472 msgid "Added *winmode* parameter." msgstr "新增 *winmode* 參數。" -#: ../../library/ctypes.rst:1480 +#: ../../library/ctypes.rst:1479 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." msgstr "" -#: ../../library/ctypes.rst:1487 +#: ../../library/ctypes.rst:1486 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." msgstr "" -#: ../../library/ctypes.rst:1494 +#: ../../library/ctypes.rst:1493 msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." msgstr "" -#: ../../library/ctypes.rst:1497 +#: ../../library/ctypes.rst:1496 msgid "" "Instances of these classes have no public methods. Functions exported by " "the shared library can be accessed as attributes or by index. Please note " @@ -1452,21 +1452,21 @@ msgid "" "other hand, accessing it through an index returns a new object each time::" msgstr "" -#: ../../library/ctypes.rst:1510 +#: ../../library/ctypes.rst:1509 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" msgstr "" -#: ../../library/ctypes.rst:1516 +#: ../../library/ctypes.rst:1515 msgid "The system handle used to access the library." msgstr "" -#: ../../library/ctypes.rst:1521 +#: ../../library/ctypes.rst:1520 msgid "The name of the library passed in the constructor." msgstr "" -#: ../../library/ctypes.rst:1523 +#: ../../library/ctypes.rst:1522 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1474,13 +1474,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: ../../library/ctypes.rst:1531 +#: ../../library/ctypes.rst:1530 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -#: ../../library/ctypes.rst:1534 +#: ../../library/ctypes.rst:1533 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -1488,39 +1488,39 @@ msgid "" "each time." msgstr "" -#: ../../library/ctypes.rst:1540 +#: ../../library/ctypes.rst:1539 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -#: ../../library/ctypes.rst:1544 +#: ../../library/ctypes.rst:1543 msgid "These prefabricated library loaders are available:" msgstr "" -#: ../../library/ctypes.rst:1549 +#: ../../library/ctypes.rst:1548 msgid "Creates :class:`CDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1555 +#: ../../library/ctypes.rst:1554 msgid "Windows only: Creates :class:`WinDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1561 +#: ../../library/ctypes.rst:1560 msgid "Windows only: Creates :class:`OleDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1567 +#: ../../library/ctypes.rst:1566 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1570 +#: ../../library/ctypes.rst:1569 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "" -#: ../../library/ctypes.rst:1576 +#: ../../library/ctypes.rst:1575 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:expr:" @@ -1528,21 +1528,21 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: ../../library/ctypes.rst:1581 +#: ../../library/ctypes.rst:1580 msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" "引發一個附帶引數 ``name`` 的\\ :ref:`稽核事件 ` ``ctypes.dlopen``。" -#: ../../library/ctypes.rst:1583 +#: ../../library/ctypes.rst:1582 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" -#: ../../library/ctypes.rst:1587 +#: ../../library/ctypes.rst:1586 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " @@ -1551,14 +1551,14 @@ msgstr "" "引發一個附帶引數 ``library``、``name`` 的\\ :ref:`稽核事件 ` " "``ctypes.dlsym``。" -#: ../../library/ctypes.rst:1589 +#: ../../library/ctypes.rst:1588 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " "symbol's name as a string or integer)." msgstr "" -#: ../../library/ctypes.rst:1593 +#: ../../library/ctypes.rst:1592 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " @@ -1567,18 +1567,18 @@ msgstr "" "引發一個附帶引數 ``handle``、``name`` 的\\ :ref:`稽核事件 ` " "``ctypes.dlsym/handle``。" -#: ../../library/ctypes.rst:1595 +#: ../../library/ctypes.rst:1594 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -#: ../../library/ctypes.rst:1602 +#: ../../library/ctypes.rst:1601 msgid "Foreign functions" msgstr "" -#: ../../library/ctypes.rst:1604 +#: ../../library/ctypes.rst:1603 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -1587,29 +1587,29 @@ msgid "" "library loader. They are instances of a private class:" msgstr "" -#: ../../library/ctypes.rst:1613 +#: ../../library/ctypes.rst:1612 msgid "Base class for C callable foreign functions." msgstr "" -#: ../../library/ctypes.rst:1615 +#: ../../library/ctypes.rst:1614 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: ../../library/ctypes.rst:1618 +#: ../../library/ctypes.rst:1617 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: ../../library/ctypes.rst:1623 +#: ../../library/ctypes.rst:1622 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:expr:`void`, a function not returning anything." msgstr "" -#: ../../library/ctypes.rst:1626 +#: ../../library/ctypes.rst:1625 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:expr:`int`, and the " @@ -1619,7 +1619,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: ../../library/ctypes.rst:1635 +#: ../../library/ctypes.rst:1634 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -1628,7 +1628,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: ../../library/ctypes.rst:1641 +#: ../../library/ctypes.rst:1640 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`~_CData.from_param` class method of the items in the :attr:`argtypes` " @@ -1638,7 +1638,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: ../../library/ctypes.rst:1648 +#: ../../library/ctypes.rst:1647 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`~_CData.from_param` method which returns a " @@ -1646,44 +1646,44 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: ../../library/ctypes.rst:1655 +#: ../../library/ctypes.rst:1654 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" -#: ../../library/ctypes.rst:1662 +#: ../../library/ctypes.rst:1661 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: ../../library/ctypes.rst:1665 +#: ../../library/ctypes.rst:1664 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." msgstr "" -#: ../../library/ctypes.rst:1669 +#: ../../library/ctypes.rst:1668 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -#: ../../library/ctypes.rst:1673 +#: ../../library/ctypes.rst:1672 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" -#: ../../library/ctypes.rst:1680 +#: ../../library/ctypes.rst:1679 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: ../../library/ctypes.rst:1684 +#: ../../library/ctypes.rst:1683 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_exception`` with " @@ -1692,7 +1692,7 @@ msgstr "" "引發一個附帶引數 ``code`` 的\\ :ref:`稽核事件 ` ``ctypes." "set_exception``。" -#: ../../library/ctypes.rst:1686 +#: ../../library/ctypes.rst:1685 msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " @@ -1701,7 +1701,7 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: ../../library/ctypes.rst:1692 +#: ../../library/ctypes.rst:1691 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " @@ -1710,18 +1710,18 @@ msgstr "" "引發一個附帶引數 ``func_pointer``、``arguments`` 的\\ :ref:`稽核事件 " "` ``ctypes.call_function``。" -#: ../../library/ctypes.rst:1694 +#: ../../library/ctypes.rst:1693 msgid "" "Some ways to invoke foreign function calls may raise an auditing event " "``ctypes.call_function`` with arguments ``function pointer`` and " "``arguments``." msgstr "" -#: ../../library/ctypes.rst:1700 +#: ../../library/ctypes.rst:1699 msgid "Function prototypes" msgstr "" -#: ../../library/ctypes.rst:1702 +#: ../../library/ctypes.rst:1701 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -1732,7 +1732,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: ../../library/ctypes.rst:1713 +#: ../../library/ctypes.rst:1712 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -1741,37 +1741,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: ../../library/ctypes.rst:1723 +#: ../../library/ctypes.rst:1722 msgid "" "Windows only: The returned function prototype creates functions that use the " "``stdcall`` calling convention. The function will release the GIL during " "the call. *use_errno* and *use_last_error* have the same meaning as above." msgstr "" -#: ../../library/ctypes.rst:1731 +#: ../../library/ctypes.rst:1730 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" -#: ../../library/ctypes.rst:1734 +#: ../../library/ctypes.rst:1733 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" -#: ../../library/ctypes.rst:1741 +#: ../../library/ctypes.rst:1740 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: ../../library/ctypes.rst:1748 +#: ../../library/ctypes.rst:1747 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: ../../library/ctypes.rst:1755 +#: ../../library/ctypes.rst:1754 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " @@ -1779,7 +1779,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: ../../library/ctypes.rst:1765 +#: ../../library/ctypes.rst:1764 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " @@ -1787,87 +1787,87 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: ../../library/ctypes.rst:1770 +#: ../../library/ctypes.rst:1769 msgid "" "COM methods use a special calling convention: They require a pointer to the " "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`!argtypes` tuple." msgstr "" -#: ../../library/ctypes.rst:1774 +#: ../../library/ctypes.rst:1773 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: ../../library/ctypes.rst:1777 +#: ../../library/ctypes.rst:1776 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_FuncPtr." "argtypes`." msgstr "" -#: ../../library/ctypes.rst:1779 +#: ../../library/ctypes.rst:1778 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -#: ../../library/ctypes.rst:1782 +#: ../../library/ctypes.rst:1781 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: ../../library/ctypes.rst:1786 +#: ../../library/ctypes.rst:1784 msgid "1" msgstr "1" -#: ../../library/ctypes.rst:1786 +#: ../../library/ctypes.rst:1785 msgid "Specifies an input parameter to the function." msgstr "" -#: ../../library/ctypes.rst:1789 +#: ../../library/ctypes.rst:1787 msgid "2" msgstr "2" -#: ../../library/ctypes.rst:1789 +#: ../../library/ctypes.rst:1788 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: ../../library/ctypes.rst:1792 +#: ../../library/ctypes.rst:1790 msgid "4" msgstr "4" -#: ../../library/ctypes.rst:1792 +#: ../../library/ctypes.rst:1791 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: ../../library/ctypes.rst:1794 +#: ../../library/ctypes.rst:1793 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" -#: ../../library/ctypes.rst:1797 +#: ../../library/ctypes.rst:1796 msgid "The optional third item is the default value for this parameter." msgstr "" -#: ../../library/ctypes.rst:1800 +#: ../../library/ctypes.rst:1799 msgid "" "The following example demonstrates how to wrap the Windows ``MessageBoxW`` " "function so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" -#: ../../library/ctypes.rst:1811 ../../library/ctypes.rst:1834 +#: ../../library/ctypes.rst:1810 ../../library/ctypes.rst:1833 msgid "Here is the wrapping with :mod:`ctypes`::" msgstr "" -#: ../../library/ctypes.rst:1819 +#: ../../library/ctypes.rst:1818 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: ../../library/ctypes.rst:1825 +#: ../../library/ctypes.rst:1824 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -1875,7 +1875,7 @@ msgid "" "the C declaration::" msgstr "" -#: ../../library/ctypes.rst:1843 +#: ../../library/ctypes.rst:1842 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -1883,7 +1883,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: ../../library/ctypes.rst:1848 +#: ../../library/ctypes.rst:1847 msgid "" "Output parameters can be combined with the :attr:`~_FuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -1892,7 +1892,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: ../../library/ctypes.rst:1861 +#: ../../library/ctypes.rst:1860 msgid "" "If the :attr:`~_FuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`ctypes` continues the normal processing it does on " @@ -1901,17 +1901,17 @@ msgid "" "and return them instead, the normal processing will no longer take place::" msgstr "" -#: ../../library/ctypes.rst:1880 +#: ../../library/ctypes.rst:1879 msgid "Utility functions" msgstr "" -#: ../../library/ctypes.rst:1884 +#: ../../library/ctypes.rst:1883 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: ../../library/ctypes.rst:1887 +#: ../../library/ctypes.rst:1886 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." @@ -1919,30 +1919,30 @@ msgstr "" "引發一個附帶引數 ``obj`` 的\\ :ref:`稽核事件 ` ``ctypes." "addressof``。" -#: ../../library/ctypes.rst:1892 +#: ../../library/ctypes.rst:1891 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: ../../library/ctypes.rst:1898 +#: ../../library/ctypes.rst:1897 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: ../../library/ctypes.rst:1902 +#: ../../library/ctypes.rst:1901 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: ../../library/ctypes.rst:1906 +#: ../../library/ctypes.rst:1905 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: ../../library/ctypes.rst:1912 +#: ../../library/ctypes.rst:1911 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -1950,19 +1950,19 @@ msgid "" "as a pointer." msgstr "" -#: ../../library/ctypes.rst:1920 +#: ../../library/ctypes.rst:1919 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: ../../library/ctypes.rst:1923 +#: ../../library/ctypes.rst:1922 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a bytes object which will be used to initialize the array items." msgstr "" -#: ../../library/ctypes.rst:1926 +#: ../../library/ctypes.rst:1925 msgid "" "If a bytes object is specified as first argument, the buffer is made one " "item larger than its length so that the last element in the array is a NUL " @@ -1971,7 +1971,7 @@ msgid "" "not be used." msgstr "" -#: ../../library/ctypes.rst:1931 +#: ../../library/ctypes.rst:1930 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." @@ -1979,19 +1979,19 @@ msgstr "" "引發一個附帶引數 ``init`` 與 ``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.create_string_buffer``。" -#: ../../library/ctypes.rst:1936 +#: ../../library/ctypes.rst:1935 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: ../../library/ctypes.rst:1939 +#: ../../library/ctypes.rst:1938 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a string which will be used to initialize the array items." msgstr "" -#: ../../library/ctypes.rst:1942 +#: ../../library/ctypes.rst:1941 msgid "" "If a string is specified as first argument, the buffer is made one item " "larger than the length of the string so that the last element in the array " @@ -2000,7 +2000,7 @@ msgid "" "should not be used." msgstr "" -#: ../../library/ctypes.rst:1948 +#: ../../library/ctypes.rst:1947 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." @@ -2008,21 +2008,21 @@ msgstr "" "引發一個附帶引數 ``init`` 與 ``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.create_unicode_buffer``。" -#: ../../library/ctypes.rst:1953 +#: ../../library/ctypes.rst:1952 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllCanUnloadNow function " "that the _ctypes extension dll exports." msgstr "" -#: ../../library/ctypes.rst:1960 +#: ../../library/ctypes.rst:1959 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllGetClassObject function " "that the ``_ctypes`` extension dll exports." msgstr "" -#: ../../library/ctypes.rst:1968 +#: ../../library/ctypes.rst:1967 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -2030,94 +2030,94 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../library/ctypes.rst:1979 +#: ../../library/ctypes.rst:1978 msgid "" "Windows only: return the filename of the VC runtime library used by Python, " "and by the extension modules. If the name of the library cannot be " "determined, ``None`` is returned." msgstr "" -#: ../../library/ctypes.rst:1983 +#: ../../library/ctypes.rst:1982 msgid "" "If you need to free memory, for example, allocated by an extension module " "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -#: ../../library/ctypes.rst:1990 +#: ../../library/ctypes.rst:1989 msgid "" "Windows only: Returns a textual description of the error code *code*. If no " "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" -#: ../../library/ctypes.rst:1997 +#: ../../library/ctypes.rst:1996 msgid "" "Windows only: Returns the last error code set by Windows in the calling " "thread. This function calls the Windows ``GetLastError()`` function " "directly, it does not return the ctypes-private copy of the error code." msgstr "" -#: ../../library/ctypes.rst:2003 +#: ../../library/ctypes.rst:2002 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:2006 +#: ../../library/ctypes.rst:2005 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``ctypes.get_errno``。" -#: ../../library/ctypes.rst:2010 +#: ../../library/ctypes.rst:2009 msgid "" "Windows only: returns the current value of the ctypes-private copy of the " "system :data:`!LastError` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:2013 +#: ../../library/ctypes.rst:2012 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``ctypes.get_last_error``。" -#: ../../library/ctypes.rst:2017 +#: ../../library/ctypes.rst:2016 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: ../../library/ctypes.rst:2024 +#: ../../library/ctypes.rst:2023 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: ../../library/ctypes.rst:2031 +#: ../../library/ctypes.rst:2030 msgid "" "Create and return a new ctypes pointer type. Pointer types are cached and " "reused internally, so calling this function repeatedly is cheap. *type* must " "be a ctypes type." msgstr "" -#: ../../library/ctypes.rst:2038 +#: ../../library/ctypes.rst:2037 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: ../../library/ctypes.rst:2041 +#: ../../library/ctypes.rst:2040 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: ../../library/ctypes.rst:2047 +#: ../../library/ctypes.rst:2046 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -2125,13 +2125,13 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: ../../library/ctypes.rst:2055 +#: ../../library/ctypes.rst:2054 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: ../../library/ctypes.rst:2058 +#: ../../library/ctypes.rst:2057 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." @@ -2139,14 +2139,14 @@ msgstr "" "引發一個附帶引數 ``errno`` 的\\ :ref:`稽核事件 ` ``ctypes." "set_errno``。" -#: ../../library/ctypes.rst:2063 +#: ../../library/ctypes.rst:2062 msgid "" "Windows only: set the current value of the ctypes-private copy of the " "system :data:`!LastError` variable in the calling thread to *value* and " "return the previous value." msgstr "" -#: ../../library/ctypes.rst:2067 +#: ../../library/ctypes.rst:2066 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." @@ -2154,20 +2154,20 @@ msgstr "" "引發一個附帶引數 ``error`` 的\\ :ref:`稽核事件 ` ``ctypes." "get_last_error``。" -#: ../../library/ctypes.rst:2072 +#: ../../library/ctypes.rst:2071 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: ../../library/ctypes.rst:2078 +#: ../../library/ctypes.rst:2077 msgid "" "This function returns the C string starting at memory address *address* as a " "bytes object. If size is specified, it is used as size, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: ../../library/ctypes.rst:2082 +#: ../../library/ctypes.rst:2081 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." @@ -2175,7 +2175,7 @@ msgstr "" "引發一個附帶引數 ``error``、``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.string_at``。" -#: ../../library/ctypes.rst:2087 +#: ../../library/ctypes.rst:2086 msgid "" "Windows only: this function is probably the worst-named thing in ctypes. It " "creates an instance of :exc:`OSError`. If *code* is not specified, " @@ -2184,13 +2184,13 @@ msgid "" "error." msgstr "" -#: ../../library/ctypes.rst:2093 +#: ../../library/ctypes.rst:2092 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: ../../library/ctypes.rst:2100 +#: ../../library/ctypes.rst:2099 msgid "" "This function returns the wide character string starting at memory address " "*address* as a string. If *size* is specified, it is used as the number of " @@ -2198,7 +2198,7 @@ msgid "" "terminated." msgstr "" -#: ../../library/ctypes.rst:2105 +#: ../../library/ctypes.rst:2104 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." @@ -2206,11 +2206,11 @@ msgstr "" "引發一個附帶引數 ``address``、``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.wstring_at``。" -#: ../../library/ctypes.rst:2111 +#: ../../library/ctypes.rst:2110 msgid "Data types" msgstr "" -#: ../../library/ctypes.rst:2116 +#: ../../library/ctypes.rst:2115 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " @@ -2220,13 +2220,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: ../../library/ctypes.rst:2123 +#: ../../library/ctypes.rst:2122 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: ../../library/ctypes.rst:2128 +#: ../../library/ctypes.rst:2127 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2235,7 +2235,7 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../library/ctypes.rst:2134 ../../library/ctypes.rst:2144 +#: ../../library/ctypes.rst:2133 ../../library/ctypes.rst:2143 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." @@ -2243,7 +2243,7 @@ msgstr "" "引發一個附帶引數 ``pointer``、``size``、``offset`` 的\\ :ref:`稽核事件 " "` ``ctypes.cdata/buffer``。" -#: ../../library/ctypes.rst:2138 +#: ../../library/ctypes.rst:2137 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2251,13 +2251,13 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: ../../library/ctypes.rst:2148 +#: ../../library/ctypes.rst:2147 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: ../../library/ctypes.rst:2151 +#: ../../library/ctypes.rst:2150 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." @@ -2265,13 +2265,13 @@ msgstr "" "引發一個附帶引數 ``address`` 的\\ :ref:`稽核事件 ` ``ctypes." "cdata``。" -#: ../../library/ctypes.rst:2153 +#: ../../library/ctypes.rst:2152 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: ../../library/ctypes.rst:2159 +#: ../../library/ctypes.rst:2158 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -2279,25 +2279,25 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: ../../library/ctypes.rst:2164 +#: ../../library/ctypes.rst:2163 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: ../../library/ctypes.rst:2170 +#: ../../library/ctypes.rst:2169 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: ../../library/ctypes.rst:2174 +#: ../../library/ctypes.rst:2173 msgid "Common instance variables of ctypes data types:" msgstr "" -#: ../../library/ctypes.rst:2178 +#: ../../library/ctypes.rst:2177 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " "instead they share part of the memory block of a base object. The :attr:" @@ -2305,13 +2305,13 @@ msgid "" "block." msgstr "" -#: ../../library/ctypes.rst:2185 +#: ../../library/ctypes.rst:2184 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: ../../library/ctypes.rst:2190 +#: ../../library/ctypes.rst:2189 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -2319,7 +2319,7 @@ msgid "" "dictionary." msgstr "" -#: ../../library/ctypes.rst:2203 +#: ../../library/ctypes.rst:2202 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " @@ -2328,11 +2328,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: ../../library/ctypes.rst:2209 +#: ../../library/ctypes.rst:2208 msgid "Instances have a single attribute:" msgstr "" -#: ../../library/ctypes.rst:2213 +#: ../../library/ctypes.rst:2212 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -2340,7 +2340,7 @@ msgid "" "bytes object or string." msgstr "" -#: ../../library/ctypes.rst:2218 +#: ../../library/ctypes.rst:2217 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " @@ -2348,7 +2348,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: ../../library/ctypes.rst:2224 +#: ../../library/ctypes.rst:2223 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -2358,7 +2358,7 @@ msgid "" "instance." msgstr "" -#: ../../library/ctypes.rst:2232 +#: ../../library/ctypes.rst:2231 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`!restype` is a subclass of :class:`c_void_p`, you " @@ -2366,25 +2366,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: ../../library/ctypes.rst:2237 +#: ../../library/ctypes.rst:2236 msgid "These are the fundamental ctypes data types:" msgstr "" -#: ../../library/ctypes.rst:2241 +#: ../../library/ctypes.rst:2240 msgid "" "Represents the C :c:expr:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2248 +#: ../../library/ctypes.rst:2247 msgid "" "Represents the C :c:expr:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: ../../library/ctypes.rst:2255 +#: ../../library/ctypes.rst:2254 msgid "" "Represents the C :c:expr:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -2392,182 +2392,182 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: ../../library/ctypes.rst:2263 +#: ../../library/ctypes.rst:2262 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../library/ctypes.rst:2269 +#: ../../library/ctypes.rst:2268 msgid "" "Represents the C :c:expr:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: ../../library/ctypes.rst:2275 +#: ../../library/ctypes.rst:2274 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../library/ctypes.rst:2281 +#: ../../library/ctypes.rst:2280 msgid "" "Represents the C :c:expr:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: ../../library/ctypes.rst:2288 +#: ../../library/ctypes.rst:2287 msgid "" "Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -#: ../../library/ctypes.rst:2294 +#: ../../library/ctypes.rst:2293 msgid "" "Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: ../../library/ctypes.rst:2300 +#: ../../library/ctypes.rst:2299 msgid "" "Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: ../../library/ctypes.rst:2306 +#: ../../library/ctypes.rst:2305 msgid "" "Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: ../../library/ctypes.rst:2312 +#: ../../library/ctypes.rst:2311 msgid "" "Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2318 +#: ../../library/ctypes.rst:2317 msgid "" "Represents the C :c:expr:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2324 +#: ../../library/ctypes.rst:2323 msgid "" "Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2330 +#: ../../library/ctypes.rst:2329 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2335 +#: ../../library/ctypes.rst:2334 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2342 +#: ../../library/ctypes.rst:2341 msgid "Represents the C :c:type:`time_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2349 +#: ../../library/ctypes.rst:2348 msgid "" "Represents the C :c:expr:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2356 +#: ../../library/ctypes.rst:2355 msgid "" "Represents the C :c:expr:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: ../../library/ctypes.rst:2363 +#: ../../library/ctypes.rst:2362 msgid "" "Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -#: ../../library/ctypes.rst:2369 +#: ../../library/ctypes.rst:2368 msgid "" "Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: ../../library/ctypes.rst:2375 +#: ../../library/ctypes.rst:2374 msgid "" "Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: ../../library/ctypes.rst:2381 +#: ../../library/ctypes.rst:2380 msgid "" "Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: ../../library/ctypes.rst:2387 +#: ../../library/ctypes.rst:2386 msgid "" "Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2393 +#: ../../library/ctypes.rst:2392 msgid "" "Represents the C :c:expr:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2399 +#: ../../library/ctypes.rst:2398 msgid "" "Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2405 +#: ../../library/ctypes.rst:2404 msgid "" "Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: ../../library/ctypes.rst:2411 +#: ../../library/ctypes.rst:2410 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: ../../library/ctypes.rst:2418 +#: ../../library/ctypes.rst:2417 msgid "" "Represents the C :c:expr:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: ../../library/ctypes.rst:2425 +#: ../../library/ctypes.rst:2424 msgid "" "Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: ../../library/ctypes.rst:2432 +#: ../../library/ctypes.rst:2431 msgid "" "Windows only: Represents a :c:type:`!HRESULT` value, which contains success " "or error information for a function or method call." msgstr "" -#: ../../library/ctypes.rst:2438 +#: ../../library/ctypes.rst:2437 msgid "" "Represents the C :c:expr:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: ../../library/ctypes.rst:2441 +#: ../../library/ctypes.rst:2440 msgid "" "The :mod:`!ctypes.wintypes` module provides quite some other Windows " "specific data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:" @@ -2575,41 +2575,41 @@ msgid "" "are also defined." msgstr "" -#: ../../library/ctypes.rst:2449 +#: ../../library/ctypes.rst:2448 msgid "Structured data types" msgstr "" -#: ../../library/ctypes.rst:2454 +#: ../../library/ctypes.rst:2453 msgid "Abstract base class for unions in native byte order." msgstr "" -#: ../../library/ctypes.rst:2459 +#: ../../library/ctypes.rst:2458 msgid "Abstract base class for unions in *big endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2465 +#: ../../library/ctypes.rst:2464 msgid "Abstract base class for unions in *little endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2471 +#: ../../library/ctypes.rst:2470 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2476 +#: ../../library/ctypes.rst:2475 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2478 +#: ../../library/ctypes.rst:2477 msgid "" "Structures and unions with non-native byte order cannot contain pointer type " "fields, or any other data types containing pointer type fields." msgstr "" -#: ../../library/ctypes.rst:2484 +#: ../../library/ctypes.rst:2483 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: ../../library/ctypes.rst:2486 +#: ../../library/ctypes.rst:2485 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:" @@ -2617,34 +2617,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: ../../library/ctypes.rst:2494 +#: ../../library/ctypes.rst:2493 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: ../../library/ctypes.rst:2498 +#: ../../library/ctypes.rst:2497 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: ../../library/ctypes.rst:2502 +#: ../../library/ctypes.rst:2501 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: ../../library/ctypes.rst:2505 +#: ../../library/ctypes.rst:2504 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: ../../library/ctypes.rst:2515 +#: ../../library/ctypes.rst:2514 msgid "" "The :attr:`_fields_` class variable must, however, be defined before the " "type is first used (an instance is created, :func:`sizeof` is called on it, " @@ -2652,14 +2652,14 @@ msgid "" "raise an AttributeError." msgstr "" -#: ../../library/ctypes.rst:2520 +#: ../../library/ctypes.rst:2519 msgid "" "It is possible to define sub-subclasses of structure types, they inherit the " "fields of the base class plus the :attr:`_fields_` defined in the sub-" "subclass, if any." msgstr "" -#: ../../library/ctypes.rst:2527 +#: ../../library/ctypes.rst:2526 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance. :attr:`_pack_` must already be defined when :attr:" @@ -2667,14 +2667,14 @@ msgid "" "attribute to 0 is the same as not setting it at all." msgstr "" -#: ../../library/ctypes.rst:2535 +#: ../../library/ctypes.rst:2534 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: ../../library/ctypes.rst:2539 +#: ../../library/ctypes.rst:2538 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`ctypes` will create descriptors in the structure type that allows " @@ -2682,11 +2682,11 @@ msgid "" "structure or union field." msgstr "" -#: ../../library/ctypes.rst:2544 +#: ../../library/ctypes.rst:2543 msgid "Here is an example type (Windows)::" msgstr "" -#: ../../library/ctypes.rst:2557 +#: ../../library/ctypes.rst:2556 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -2696,7 +2696,7 @@ msgid "" "temporary union instance::" msgstr "" -#: ../../library/ctypes.rst:2569 +#: ../../library/ctypes.rst:2568 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -2704,7 +2704,7 @@ msgid "" "of the base class." msgstr "" -#: ../../library/ctypes.rst:2574 +#: ../../library/ctypes.rst:2573 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -2714,15 +2714,15 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: ../../library/ctypes.rst:2585 +#: ../../library/ctypes.rst:2584 msgid "Arrays and pointers" msgstr "" -#: ../../library/ctypes.rst:2589 +#: ../../library/ctypes.rst:2588 msgid "Abstract base class for arrays." msgstr "" -#: ../../library/ctypes.rst:2591 +#: ../../library/ctypes.rst:2590 msgid "" "The recommended way to create concrete array types is by multiplying any :" "mod:`ctypes` data type with a non-negative integer. Alternatively, you can " @@ -2732,34 +2732,34 @@ msgid "" "an :class:`Array`." msgstr "" -#: ../../library/ctypes.rst:2601 +#: ../../library/ctypes.rst:2600 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -#: ../../library/ctypes.rst:2608 +#: ../../library/ctypes.rst:2607 msgid "Specifies the type of each element in the array." msgstr "" -#: ../../library/ctypes.rst:2611 +#: ../../library/ctypes.rst:2610 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: ../../library/ctypes.rst:2617 +#: ../../library/ctypes.rst:2616 msgid "Private, abstract base class for pointers." msgstr "" -#: ../../library/ctypes.rst:2619 +#: ../../library/ctypes.rst:2618 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: ../../library/ctypes.rst:2623 +#: ../../library/ctypes.rst:2622 msgid "" "If a pointer points to an array, its elements can be read and written using " "standard subscript and slice accesses. Pointer objects have no size, so :" @@ -2768,11 +2768,11 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: ../../library/ctypes.rst:2633 +#: ../../library/ctypes.rst:2632 msgid "Specifies the type pointed to." msgstr "" -#: ../../library/ctypes.rst:2637 +#: ../../library/ctypes.rst:2636 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." diff --git a/library/curses.po b/library/curses.po index 20df87361f..7abd5aba6b 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 10:36+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -52,9 +52,9 @@ msgid "" "as a Unicode string or a byte string." msgstr "" -#: ../../library/curses.rst:35 +#: ../../library/curses.rst:34 msgid "Module :mod:`curses.ascii`" -msgstr "" +msgstr ":mod:`curses.ascii` 模組" #: ../../library/curses.rst:35 msgid "" @@ -62,17 +62,17 @@ msgid "" "settings." msgstr "" -#: ../../library/curses.rst:38 +#: ../../library/curses.rst:37 msgid "Module :mod:`curses.panel`" -msgstr "" +msgstr ":mod:`curses.panel` 模組" #: ../../library/curses.rst:38 msgid "A panel stack extension that adds depth to curses windows." msgstr "" -#: ../../library/curses.rst:41 +#: ../../library/curses.rst:40 msgid "Module :mod:`curses.textpad`" -msgstr "" +msgstr ":mod:`curses.textpad` 模組" #: ../../library/curses.rst:41 msgid "" @@ -80,7 +80,7 @@ msgid "" "bindings." msgstr "" -#: ../../library/curses.rst:44 +#: ../../library/curses.rst:43 msgid ":ref:`curses-howto`" msgstr ":ref:`curses-howto`" diff --git a/library/dataclasses.po b/library/dataclasses.po index 592d18ef66..b6800ef7a9 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -1,11 +1,10 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-15 00:27+0000\n" "PO-Revision-Date: 2023-02-11 15:02+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -17,8 +16,8 @@ msgstr "" "X-Generator: Poedit 3.2.2\n" #: ../../library/dataclasses.rst:2 -msgid ":mod:`dataclasses` --- Data Classes" -msgstr ":mod:`dataclasses` --- Data Classes" +msgid ":mod:`!dataclasses` --- Data Classes" +msgstr ":mod:`!dataclasses` --- Data Classes" #: ../../library/dataclasses.rst:10 msgid "**Source code:** :source:`Lib/dataclasses.py`" @@ -28,12 +27,13 @@ msgstr "**原始碼:**\\ :source:`Lib/dataclasses.py`" #, fuzzy msgid "" "This module provides a decorator and functions for automatically adding " -"generated :term:`special method`\\s such as :meth:`~object.__init__` and :" -"meth:`~object.__repr__` to user-defined classes. It was originally " -"described in :pep:`557`." +"generated :term:`special methods ` such as :meth:`~object." +"__init__` and :meth:`~object.__repr__` to user-defined classes. It was " +"originally described in :pep:`557`." msgstr "" -"該模組提供了一個裝飾器和函式,用於自動新增生成的特殊方法,例如 :meth:" -"`__init__` 和 :meth:`__repr__` 到使用者定義的類。它最初在 :pep:`557` 中描述。" +"該模組提供了一個裝飾器和函式,用於自動新增生成的\\ :term:`特殊方法 `,例如 :meth:`~object.__init__` 和 :meth:`~object.__repr__` 到使用者" +"定義的類。它最初在 :pep:`557` 中描述。" #: ../../library/dataclasses.rst:19 #, fuzzy @@ -46,21 +46,19 @@ msgstr "" #: ../../library/dataclasses.rst:34 #, fuzzy -msgid "" -"will add, among other things, a :meth:`~object.__init__` that looks like::" -msgstr "將新增,除其他事項外,一個 :meth:`__init__` 看起來像:" +msgid "will add, among other things, a :meth:`!__init__` that looks like::" +msgstr "將新增,除其他事項外,一個 :meth:`!__init__` 看起來像: ::" #: ../../library/dataclasses.rst:41 #, fuzzy msgid "" "Note that this method is automatically added to the class: it is not " -"directly specified in the ``InventoryItem`` definition shown above." +"directly specified in the :class:`!InventoryItem` definition shown above." msgstr "" "請注意,此方法會自動新增到類中:它不會在上面顯示的“InventoryItem”定義中直接指" "定。" #: ../../library/dataclasses.rst:47 -#, fuzzy msgid "Module contents" msgstr "模組內容" @@ -68,20 +66,22 @@ msgstr "模組內容" #, fuzzy msgid "" "This function is a :term:`decorator` that is used to add generated :term:" -"`special method`\\s to classes, as described below." -msgstr "此函式是一個裝飾器,用於將生成的特殊方法新增到類中,如下所述。" +"`special methods ` to classes, as described below." +msgstr "" +"此函式是一個 :term:`decorator`,用於將生成的\\ :term:`特殊方法 `\\新增到類別中,如下所述。" #: ../../library/dataclasses.rst:54 #, fuzzy msgid "" -"The :func:`dataclass` decorator examines the class to find ``field``\\s. A " +"The ``@dataclass`` decorator examines the class to find ``field``\\s. A " "``field`` is defined as a class variable that has a :term:`type annotation " -"`. With two exceptions described below, nothing in :" -"func:`dataclass` examines the type specified in the variable annotation." +"`. With two exceptions described below, nothing in " +"``@dataclass`` examines the type specified in the variable annotation." msgstr "" -":func:`dataclass` 裝飾器檢查類以找到 ``field``\\s。 ``field`` 被定義為具有 :" +"``@dataclass`` 裝飾器檢查類以找到 ``field``\\s。 ``field`` 被定義為具有 :" "term:`type annotation ` 的類變數。除了下面描述的兩個例" -"外,:func:`dataclass` 中沒有任何內容檢查變數註釋中指定的型別。" +"外,``@dataclass`` 中沒有任何內容檢查變數註釋中指定的型別。" #: ../../library/dataclasses.rst:60 #, fuzzy @@ -93,275 +93,268 @@ msgstr "所有生成的方法中欄位的順序是它們在類定義中出現的 #: ../../library/dataclasses.rst:63 #, fuzzy msgid "" -"The :func:`dataclass` decorator will add various \"dunder\" methods to the " +"The ``@dataclass`` decorator will add various \"dunder\" methods to the " "class, described below. If any of the added methods already exist in the " "class, the behavior depends on the parameter, as documented below. The " "decorator returns the same class that it is called on; no new class is " "created." msgstr "" -":func:`dataclass` 裝飾器將向類新增各種“dunder”方法,如下所述。如果類中已存在" -"任何新增的方法,則行為取決於參數,如下所述。裝飾器回傳呼叫它的同一個類;沒有" -"建立新類。" +"``@dataclass`` 裝飾器將向類新增各種“dunder”方法,如下所述。如果類中已存在任何" +"新增的方法,則行為取決於參數,如下所述。裝飾器回傳呼叫它的同一個類;沒有建立" +"新類。" #: ../../library/dataclasses.rst:69 #, fuzzy msgid "" -"If :func:`dataclass` is used just as a simple decorator with no parameters, " -"it acts as if it has the default values documented in this signature. That " -"is, these three uses of :func:`dataclass` are equivalent::" +"If ``@dataclass`` is used just as a simple decorator with no parameters, it " +"acts as if it has the default values documented in this signature. That is, " +"these three uses of ``@dataclass`` are equivalent::" msgstr "" -"如果 :func:`dataclass` 僅用作不帶參數的簡單裝飾器,它的行為就好像它具有此簽名" -"中記錄的預設值一樣。也就是說,:func:`dataclass` 的這三種用法是等價的::" +"如果 ``@dataclass`` 僅用作不帶參數的簡單裝飾器,它的行為就好像它具有此簽名中" +"記錄的預設值一樣。也就是說,``@dataclass`` 的這三種用法是等價的::" #: ../../library/dataclasses.rst:87 -#, fuzzy -msgid "The parameters to :func:`dataclass` are:" -msgstr ":func:`dataclass` 的參數是:" +msgid "The parameters to ``@dataclass`` are:" +msgstr "``@dataclass`` 的參數是:" #: ../../library/dataclasses.rst:89 #, fuzzy msgid "" -"``init``: If true (the default), a :meth:`~object.__init__` method will be " +"*init*: If true (the default), a :meth:`~object.__init__` method will be " "generated." -msgstr "``init``:如果為真(預設值),將生成一個 :meth:`__init__` 方法。" +msgstr "*init*:如果為真(預設值),將生成一個 :meth:`__init__` 方法。" #: ../../library/dataclasses.rst:92 #, fuzzy msgid "" -"If the class already defines :meth:`~object.__init__`, this parameter is " -"ignored." +"If the class already defines :meth:`!__init__`, this parameter is ignored." msgstr "如果該類已經定義了 :meth:`__init__`,則忽略此參數。" #: ../../library/dataclasses.rst:95 #, fuzzy msgid "" -"``repr``: If true (the default), a :meth:`~object.__repr__` method will be " +"*repr*: If true (the default), a :meth:`~object.__repr__` method will be " "generated. The generated repr string will have the class name and the name " "and repr of each field, in the order they are defined in the class. Fields " "that are marked as being excluded from the repr are not included. For " "example: ``InventoryItem(name='widget', unit_price=3.0, " "quantity_on_hand=10)``." msgstr "" -"``repr``:如果為真(預設值),將生成一個 :meth:`__repr__` 方法。生成的 repr " -"字串將包含類名以及每個欄位的名稱和 repr,按照它們在類中定義的順序排列。不包括" -"標記為從 repr 中排除的欄位。例如:``InventoryItem(name='widget', " +"*repr*:如果為真(預設值),將生成一個 :meth:`__repr__` 方法。生成的 repr 字" +"串將包含類名以及每個欄位的名稱和 repr,按照它們在類中定義的順序排列。不包括標" +"記為從 repr 中排除的欄位。例如:``InventoryItem(name='widget', " "unit_price=3.0, quantity_on_hand=10)``。" #: ../../library/dataclasses.rst:102 #, fuzzy msgid "" -"If the class already defines :meth:`~object.__repr__`, this parameter is " -"ignored." -msgstr "如果該類已經定義了 :meth:`__repr__`,則忽略此參數。" +"If the class already defines :meth:`!__repr__`, this parameter is ignored." +msgstr "如果該類已經定義了 :meth:`!__repr__`,則忽略此參數。" #: ../../library/dataclasses.rst:105 #, fuzzy msgid "" -"``eq``: If true (the default), an :meth:`~object.__eq__` method will be " +"*eq*: If true (the default), an :meth:`~object.__eq__` method will be " "generated. This method compares the class as if it were a tuple of its " "fields, in order. Both instances in the comparison must be of the identical " "type." msgstr "" -"``eq``:如果為真(預設值),將生成一個 :meth:`__eq__` 方法。此方法按順序比較" -"類,就好像它是其欄位的元組一樣。比較中的兩個實例必須屬於同一型別。" +"*eq*:如果為真(預設值),將生成一個 :meth:`~object.__eq__` 方法。此方法按順" +"序比較類,就好像它是其欄位的元組一樣。比較中的兩個實例必須屬於同一型別。" #: ../../library/dataclasses.rst:110 #, fuzzy msgid "" -"If the class already defines :meth:`~object.__eq__`, this parameter is " -"ignored." -msgstr "如果該類已經定義了 :meth:`__eq__`,則忽略此參數。" +"If the class already defines :meth:`!__eq__`, this parameter is ignored." +msgstr "如果該類已經定義了 :meth:`!__eq__`,則忽略此參數。" #: ../../library/dataclasses.rst:113 #, fuzzy msgid "" -"``order``: If true (the default is ``False``), :meth:`~object.__lt__`, :meth:" +"*order*: If true (the default is ``False``), :meth:`~object.__lt__`, :meth:" "`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` methods " "will be generated. These compare the class as if it were a tuple of its " "fields, in order. Both instances in the comparison must be of the identical " -"type. If ``order`` is true and ``eq`` is false, a :exc:`ValueError` is " -"raised." +"type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised." msgstr "" -"``order``:如果為真(預設為 ``False``),:meth:`__lt__`、:meth:`__le__`、:" -"meth:`__gt__` 和 :meth:`__ge__` 方法將是產生。它們按順序比較類,就好像它是其" -"欄位的元組一樣。比較中的兩個實例必須屬於同一型別。如果 ``order`` 為真且 " -"``eq`` 為假,則會引發 :exc:`ValueError`。" +"*order*:如果為真(預設為 ``False``),:meth:`~object.__lt__`、:meth:" +"`~object.__le__`、:meth:`~object.__gt__` 和 :meth:`~object.__ge__` 方法將是產" +"生。它們按順序比較類,就好像它是其欄位的元組一樣。比較中的兩個實例必須屬於同" +"一型別。如果 *order* 為真且 *eq* 為假,則會引發 :exc:`ValueError`。" #: ../../library/dataclasses.rst:120 #, fuzzy msgid "" -"If the class already defines any of :meth:`~object.__lt__`, :meth:`~object." -"__le__`, :meth:`~object.__gt__`, or :meth:`~object.__ge__`, then :exc:" -"`TypeError` is raised." +"If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:" +"`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised." msgstr "" -"如果該類已經定義了 :meth:`__lt__`、:meth:`__le__`、:meth:`__gt__` 或 :meth:" -"`__ge__` 中的任何一個,則引發 :exc:`TypeError`。" +"如果該類已經定義了 :meth:`!__lt__`、:meth:`!__le__`、:meth:`!__gt__` 或 :" +"meth:`!__ge__` 中的任何一個,則引發 :exc:`TypeError`。" #: ../../library/dataclasses.rst:124 #, fuzzy msgid "" -"``unsafe_hash``: If ``False`` (the default), a :meth:`~object.__hash__` " -"method is generated according to how ``eq`` and ``frozen`` are set." +"*unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method " +"is generated according to how *eq* and *frozen* are set." msgstr "" -"``unsafe_hash``:如果``False``(預設值),將根據``eq`` 和``frozen`` 的設定生" -"成一個:meth:`__hash__` 方法。" +"*unsafe_hash*:如果``False``(預設值),將根據 *eq* 和 *frozen* 的設定生成一" +"個 :meth:`~object.__hash__` 方法。" #: ../../library/dataclasses.rst:127 #, fuzzy msgid "" -":meth:`~object.__hash__` is used by built-in :meth:`hash()`, and when " -"objects are added to hashed collections such as dictionaries and sets. " -"Having a :meth:`~object.__hash__` implies that instances of the class are " -"immutable. Mutability is a complicated property that depends on the " -"programmer's intent, the existence and behavior of :meth:`~object.__eq__`, " -"and the values of the ``eq`` and ``frozen`` flags in the :func:`dataclass` " -"decorator." +":meth:`!__hash__` is used by built-in :meth:`hash()`, and when objects are " +"added to hashed collections such as dictionaries and sets. Having a :meth:`!" +"__hash__` implies that instances of the class are immutable. Mutability is a " +"complicated property that depends on the programmer's intent, the existence " +"and behavior of :meth:`!__eq__`, and the values of the *eq* and *frozen* " +"flags in the ``@dataclass`` decorator." msgstr "" -":meth:`__hash__` 由內置的:meth:`hash()` 使用,當對像被新增到散列集合(如字典" -"和集合)時。擁有 :meth:`__hash__` 意味著該類的實例是不可變的。可變性是一個複" -"雜的屬性,它取決於程序員的意圖、__eq__ 的存在和行為,以及 dataclass 裝飾器中" -"的 eq 和 frozen 旗標的值." +":meth:`!__hash__` 由內置的:meth:`hash()` 使用,當對像被新增到散列集合(如字典" +"和集合)時。擁有 :meth:`!__hash__` 意味著該類的實例是不可變的。可變性是一個複" +"雜的屬性,它取決於程序員的意圖 :meth:`!__eq__` 的存在和行為,以及 dataclass " +"裝飾器中的 *eq* 和 *frozen* 旗標的值." #: ../../library/dataclasses.rst:134 #, fuzzy msgid "" -"By default, :func:`dataclass` will not implicitly add a :meth:`~object." +"By default, ``@dataclass`` will not implicitly add a :meth:`~object." "__hash__` method unless it is safe to do so. Neither will it add or change " -"an existing explicitly defined :meth:`~object.__hash__` method. Setting the " -"class attribute ``__hash__ = None`` has a specific meaning to Python, as " -"described in the :meth:`~object.__hash__` documentation." +"an existing explicitly defined :meth:`!__hash__` method. Setting the class " +"attribute ``__hash__ = None`` has a specific meaning to Python, as described " +"in the :meth:`!__hash__` documentation." msgstr "" -"預設情況下,:func:`dataclass` 不會隱式新增 :meth:`__hash__` 方法,除非這樣做" -"是安全的。它也不會新增或更改現有的明確定義的 :meth:`__hash__` 方法。設定類屬" -"性 ``__hash__ = None`` 對 Python 具有特定含義,如 :meth:`__hash__` 文檔中所" -"述。" +"預設情況下,``@dataclass`` 不會隱式新增 :meth:`~object.__hash__` 方法,除非這" +"樣做是安全的。它也不會新增或更改現有的明確定義的 :meth:`!__hash__` 方法。設定" +"類屬性 ``__hash__ = None`` 對 Python 具有特定含義,如 :meth:`!__hash__` 文檔" +"中所述。" #: ../../library/dataclasses.rst:140 #, fuzzy msgid "" -"If :meth:`~object.__hash__` is not explicitly defined, or if it is set to " -"``None``, then :func:`dataclass` *may* add an implicit :meth:`~object." -"__hash__` method. Although not recommended, you can force :func:`dataclass` " -"to create a :meth:`~object.__hash__` method with ``unsafe_hash=True``. This " -"might be the case if your class is logically immutable but can nonetheless " -"be mutated. This is a specialized use case and should be considered " -"carefully." +"If :meth:`!__hash__` is not explicitly defined, or if it is set to ``None``, " +"then ``@dataclass`` *may* add an implicit :meth:`!__hash__` method. Although " +"not recommended, you can force ``@dataclass`` to create a :meth:`!__hash__` " +"method with ``unsafe_hash=True``. This might be the case if your class is " +"logically immutable but can still be mutated. This is a specialized use case " +"and should be considered carefully." msgstr "" -"如果 :meth:`__hash__` 沒有明確定義,或者如果它被設定為 ``None``,那麼 :func:" -"`dataclass` *可能* 新增一個隱式的 :meth:`__hash__` 方法。雖然不推薦,但您可以" -"強制 :func:`dataclass` 使用 ``unsafe_hash=True`` 建立一個 :meth:`__hash__` 方" -"法。如果您的類在邏輯上是不可變的但仍然可以改變,則可能是這種情況。這是一個特" -"殊的用例,應該仔細考慮。" +"如果 :meth:`!__hash__` 沒有明確定義,或者如果它被設定為 ``None``,那麼 " +"``@dataclass`` *可能* 新增一個隱式的 :meth:`__hash__` 方法。雖然不推薦,但你" +"可以強制 :func:`dataclass` 使用 ``unsafe_hash=True`` 建立一個 :meth:" +"`__hash__` 方法。如果你的類在邏輯上是不可變的但仍然可以改變,則可能是這種情" +"況。這是一個特殊的用例,應該仔細考慮。" #: ../../library/dataclasses.rst:147 #, fuzzy msgid "" -"Here are the rules governing implicit creation of a :meth:`~object.__hash__` " -"method. Note that you cannot both have an explicit :meth:`~object.__hash__` " -"method in your dataclass and set ``unsafe_hash=True``; this will result in " -"a :exc:`TypeError`." +"Here are the rules governing implicit creation of a :meth:`!__hash__` " +"method. Note that you cannot both have an explicit :meth:`!__hash__` method " +"in your dataclass and set ``unsafe_hash=True``; this will result in a :exc:" +"`TypeError`." msgstr "" -"以下是管理隱式建立 :meth:`__hash__` 方法的規則。請注意,您不能在資料類中既有" -"顯式的 :meth:`__hash__` 方法又設定 ``unsafe_hash=True``;這將導致 :exc:" +"以下是管理隱式建立 :meth:`!__hash__` 方法的規則。請注意,你不能在資料類別中既" +"有顯式的 :meth:`!__hash__` 方法又設定 ``unsafe_hash=True``;這將導致 :exc:" "`TypeError`。" #: ../../library/dataclasses.rst:152 #, fuzzy msgid "" -"If ``eq`` and ``frozen`` are both true, by default :func:`dataclass` will " -"generate a :meth:`~object.__hash__` method for you. If ``eq`` is true and " -"``frozen`` is false, :meth:`~object.__hash__` will be set to ``None``, " -"marking it unhashable (which it is, since it is mutable). If ``eq`` is " -"false, :meth:`~object.__hash__` will be left untouched meaning the :meth:" -"`~object.__hash__` method of the superclass will be used (if the superclass " -"is :class:`object`, this means it will fall back to id-based hashing)." +"If *eq* and *frozen* are both true, by default ``@dataclass`` will generate " +"a :meth:`!__hash__` method for you. If *eq* is true and *frozen* is false, :" +"meth:`!__hash__` will be set to ``None``, marking it unhashable (which it " +"is, since it is mutable). If *eq* is false, :meth:`!__hash__` will be left " +"untouched meaning the :meth:`!__hash__` method of the superclass will be " +"used (if the superclass is :class:`object`, this means it will fall back to " +"id-based hashing)." msgstr "" -"如果``eq`` 和``frozen`` 都為真,預設情況下:func:`dataclass` 會為你生成一個:" -"meth:`__hash__` 方法。如果 ``eq`` 為真且 ``frozen`` 為假,:meth:`__hash__` 將" -"被設定為 ``None``,將其標記為不可散列(它是不可散列的,因為它是可變的)。如" -"果 ``eq`` 為假,:meth:`__hash__` 將保持不變,這意味著將使用超類的 :meth:" -"`__hash__` 方法(如果超類是 :class:`object`,這意味著它將回退到基於 id 的散" +"如果 *eq* 和 *frozen* 都為真,預設情況下 ``@dataclass`` 會為你生成一個:meth:" +"`!__hash__` 方法。如果 ``eq`` 為真且 ``frozen`` 為假,:meth:`!__hash__` 將被" +"設定為 ``None``,將其標記為不可散列(它是不可散列的,因為它是可變的)。如果 " +"``eq`` 為假,:meth:`!__hash__` 將保持不變,這意味著將使用超類的 :meth:`!" +"__hash__` 方法(如果超類是 :class:`object`,這意味著它將回退到基於 id 的散" "列)。" #: ../../library/dataclasses.rst:160 #, fuzzy msgid "" -"``frozen``: If true (the default is ``False``), assigning to fields will " +"*frozen*: If true (the default is ``False``), assigning to fields will " "generate an exception. This emulates read-only frozen instances. If :meth:" "`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the " "class, then :exc:`TypeError` is raised. See the discussion below." msgstr "" -"``frozen``:如果為真(預設為``False``),分配給欄位將產生例外。這模擬了只讀的" -"凍結實例。如果 :meth:`__setattr__` 或 :meth:`__delattr__` 在類中定義,則 :" -"exc:`TypeError` 被引發。請參閱下面的討論。" +"*frozen*:如果為真(預設為 ``False``),分配給欄位將產生例外。這模擬了只讀的" +"凍結實例。如果 :meth:`~object.__setattr__` 或 :meth:`~object.__delattr__` 在" +"類中定義,則 :exc:`TypeError` 被引發。請參閱下面的討論。" #: ../../library/dataclasses.rst:165 #, fuzzy msgid "" -"``match_args``: If true (the default is ``True``), the ``__match_args__`` " -"tuple will be created from the list of parameters to the generated :meth:" -"`~object.__init__` method (even if :meth:`~object.__init__` is not " -"generated, see above). If false, or if ``__match_args__`` is already " -"defined in the class, then ``__match_args__`` will not be generated." +"*match_args*: If true (the default is ``True``), the :attr:`~object." +"__match_args__` tuple will be created from the list of parameters to the " +"generated :meth:`~object.__init__` method (even if :meth:`!__init__` is not " +"generated, see above). If false, or if :attr:`!__match_args__` is already " +"defined in the class, then :attr:`!__match_args__` will not be generated." msgstr "" -"``match_args``:如果為真(預設為 ``True``),``__match_args__`` 元組將從參數" -"列表建立到生成的 :meth:`__init__` 方法(即使 :meth: `__init__` 未生成,見上" -"文)。如果為 false,或者類中已經定義了 __match_args__ ,則不會生成 " -"__match_args__ 。" +"*match_args*:如果為真(預設為 ``True``),``__match_args__`` 元組將從參數列" +"表建立到生成的 :meth:`~object.__init__` 方法(即使 :meth: `!__init__` 未生" +"成,見上文)。如果為 false,或者類中已經定義了 :attr:`!__match_args__`,則不" +"會生成 :attr:`!__match_args__`。" #: ../../library/dataclasses.rst:174 #, fuzzy msgid "" -"``kw_only``: If true (the default value is ``False``), then all fields will " -"be marked as keyword-only. If a field is marked as keyword-only, then the " -"only effect is that the :meth:`~object.__init__` parameter generated from a " -"keyword-only field must be specified with a keyword when :meth:`~object." -"__init__` is called. There is no effect on any other aspect of " -"dataclasses. See the :term:`parameter` glossary entry for details. Also " -"see the :const:`KW_ONLY` section." +"*kw_only*: If true (the default value is ``False``), then all fields will be " +"marked as keyword-only. If a field is marked as keyword-only, then the only " +"effect is that the :meth:`~object.__init__` parameter generated from a " +"keyword-only field must be specified with a keyword when :meth:`!__init__` " +"is called. There is no effect on any other aspect of dataclasses. See the :" +"term:`parameter` glossary entry for details. Also see the :const:`KW_ONLY` " +"section." msgstr "" "``kw_only``:如果為 true(預設值為 ``False``),則所有欄位將被標記為僅限關鍵" "字。如果一個欄位被標記為僅限關鍵字,那麼唯一的影響是從僅限關鍵字欄位生成的 :" -"meth:`__init__` 參數必須在呼叫 :meth:`__init__` 時指定關鍵字。對資料類的任何" -"其他方面都沒有影響。有關詳細資訊,請參閱:term:`parameter` 詞彙表條目。另請參" -"閱:const:`KW_ONLY` 部分。" +"meth:`~object.__init__` 參數必須在呼叫 :meth:`!__init__` 時指定關鍵字。對資料" +"類別的任何其他方面都沒有影響。有關詳細資訊,請參閱 :term:`parameter` 詞彙表條" +"目。另請參閱 :const:`KW_ONLY` 部分。" #: ../../library/dataclasses.rst:185 #, fuzzy msgid "" -"``slots``: If true (the default is ``False``), :attr:`~object.__slots__` " +"*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " "attribute will be generated and new class will be returned instead of the " -"original one. If :attr:`~object.__slots__` is already defined in the class, " -"then :exc:`TypeError` is raised." +"original one. If :attr:`!__slots__` is already defined in the class, then :" +"exc:`TypeError` is raised." msgstr "" -"``slots``:如果為 true(預設為 ``False``),將生成:attr:`__slots__` 屬性並回" -"傳新類而不是原始類。如果 :attr:`__slots__` 已經在類中定義,則 :exc:" +"``slots``:如果為 true(預設為 ``False``),將生成 :attr:`~object.__slots__` " +"屬性並回傳新類而不是原始類。如果 :attr:`!__slots__` 已經在類中定義,則 :exc:" "`TypeError` 被引發。" #: ../../library/dataclasses.rst:192 #, fuzzy msgid "" -"If a field name is already included in the ``__slots__`` of a base class, it " -"will not be included in the generated ``__slots__`` to prevent :ref:" -"`overriding them `. Therefore, do not use " -"``__slots__`` to retrieve the field names of a dataclass. Use :func:`fields` " -"instead. To be able to determine inherited slots, base class ``__slots__`` " -"may be any iterable, but *not* an iterator." +"If a field name is already included in the :attr:`!__slots__` of a base " +"class, it will not be included in the generated :attr:`!__slots__` to " +"prevent :ref:`overriding them `. Therefore, do not " +"use :attr:`!__slots__` to retrieve the field names of a dataclass. Use :func:" +"`fields` instead. To be able to determine inherited slots, base class :attr:" +"`!__slots__` may be any iterable, but *not* an iterator." msgstr "" -"如果欄位名稱已經包含在基底類別的 ``__slots__`` 中,它將不會包含在生成的 " -"``__slots__`` 中以防止 :ref:`覆蓋它們 `。因此,不要使" -"用 __slots__ 來檢索資料類的欄位名稱。使用 :func:`fields` 代替。為了能夠確定繼" -"承的插槽,基底類別 ``__slots__`` 可以是任何可疊代的,但*不是*疊代器。" +"如果欄位名稱已經包含在基底類別的 :attr:`!__slots__` 中,它將不會包含在生成" +"的 :attr:`!__slots__` 中以防止 :ref:`覆蓋它們 `。因此," +"不要使用 __slots__ 來檢索資料類別的欄位名稱。使用 :func:`fields` 代替。為了能" +"夠確定繼承的插槽,基底類別 :attr:`!__slots__` 可以是任何可疊代的,但*不是*疊" +"代器。" #: ../../library/dataclasses.rst:202 #, fuzzy msgid "" -"``weakref_slot``: If true (the default is ``False``), add a slot named " +"*weakref_slot*: If true (the default is ``False``), add a slot named " "\"__weakref__\", which is required to make an instance weakref-able. It is " "an error to specify ``weakref_slot=True`` without also specifying " "``slots=True``." msgstr "" -"``weakref_slot``:如果為真(預設為``False``),新增一個名為“__weakref__”的插" +"*weakref_slot*:如果為真(預設為 ``False``),新增一個名為“__weakref__”的插" "槽,這是使實例可弱引用所必需的。在沒有指定 ``slots=True`` 的情況下指定 " "``weakref_slot=True`` 是錯誤的。" @@ -375,11 +368,11 @@ msgstr "``field``\\s 可以選擇指定一個預設值,使用普通的 Python #: ../../library/dataclasses.rst:217 #, fuzzy msgid "" -"In this example, both ``a`` and ``b`` will be included in the added :meth:" -"`~object.__init__` method, which will be defined as::" +"In this example, both :attr:`!a` and :attr:`!b` will be included in the " +"added :meth:`~object.__init__` method, which will be defined as::" msgstr "" -"在此示例中,``a`` 和``b`` 都將包含在新增的 :meth:`__init__` 方法中,該方法將" -"定義為:" +"在此示例中,:attr:`!a` 和 :attr:`!b` 都將包含在新增的 :meth:`~object." +"__init__` 方法中,該方法將定義為:" #: ../../library/dataclasses.rst:222 #, fuzzy @@ -397,12 +390,12 @@ msgid "" "For common and simple use cases, no other functionality is required. There " "are, however, some dataclass features that require additional per-field " "information. To satisfy this need for additional information, you can " -"replace the default field value with a call to the provided :func:`field` " +"replace the default field value with a call to the provided :func:`!field` " "function. For example::" msgstr "" -"對於常見和簡單的用例,不需要其他功能。但是,有些資料類功能需要額外的每個欄位" -"資訊。為了滿足這種對附加資訊的需求,您可以通過呼叫提供的 :func:`field` 函式來" -"替換預設欄位值。例如::" +"對於常見和簡單的用例,不需要其他功能。但是,有些資料類別功能需要額外的每個欄" +"位資訊。為了滿足這種對附加資訊的需求,你可以通過呼叫提供的 :func:`field` 函式" +"來替換預設欄位值。例如: ::" #: ../../library/dataclasses.rst:241 #, fuzzy @@ -417,60 +410,58 @@ msgstr "" "應直接使用 :const:`MISSING` 值。" #: ../../library/dataclasses.rst:246 -#, fuzzy -msgid "The parameters to :func:`field` are:" -msgstr ":func:`field` 的參數是:" +msgid "The parameters to :func:`!field` are:" +msgstr ":func:`!field` 的參數是:" #: ../../library/dataclasses.rst:248 #, fuzzy msgid "" -"``default``: If provided, this will be the default value for this field. " -"This is needed because the :meth:`field` call itself replaces the normal " +"*default*: If provided, this will be the default value for this field. This " +"is needed because the :func:`!field` call itself replaces the normal " "position of the default value." msgstr "" -"``default``:如果提供,這將是該欄位的預設值。這是必需的,因為 :meth:`field` " -"呼叫本身會替換預設值的正常位置。" +"*default*:如果提供,這將是該欄位的預設值。這是必需的,因為 :meth:`!field` 呼" +"叫本身會替換預設值的正常位置。" #: ../../library/dataclasses.rst:252 #, fuzzy msgid "" -"``default_factory``: If provided, it must be a zero-argument callable that " +"*default_factory*: If provided, it must be a zero-argument callable that " "will be called when a default value is needed for this field. Among other " "purposes, this can be used to specify fields with mutable default values, as " -"discussed below. It is an error to specify both ``default`` and " -"``default_factory``." +"discussed below. It is an error to specify both *default* and " +"*default_factory*." msgstr "" -"``default_factory``:如果提供,它必須是一個零參數可呼叫函式,當此欄位需要預設" -"值時將被呼叫。除其他用途外,這可用於指定具有可變預設值的欄位,如下所述。同時" -"指定 ``default`` 和 ``default_factory`` 是錯誤的。" +"*default_factory*:如果提供,它必須是一個零參數可呼叫函式,當此欄位需要預設值" +"時將被呼叫。除其他用途外,這可用於指定具有可變預設值的欄位,如下所述。同時指" +"定 *default* 和 *default_factory* 是錯誤的。" #: ../../library/dataclasses.rst:258 #, fuzzy msgid "" -"``init``: If true (the default), this field is included as a parameter to " -"the generated :meth:`~object.__init__` method." +"*init*: If true (the default), this field is included as a parameter to the " +"generated :meth:`~object.__init__` method." msgstr "" -"``init``:如果為 true(預設值),則此欄位將作為生成的 __init__` 方法的參數包" -"含在內。" +"``init``:如果為 true(預設值),則此欄位將作為生成的 :meth:`~object." +"__init__` 方法的參數包含在內。" #: ../../library/dataclasses.rst:261 #, fuzzy msgid "" -"``repr``: If true (the default), this field is included in the string " -"returned by the generated :meth:`~object.__repr__` method." +"*repr*: If true (the default), this field is included in the string returned " +"by the generated :meth:`~object.__repr__` method." msgstr "" -"``repr``:如果為真(預設值),則此欄位包含在生成的 :meth:`__repr__` 方法回傳" -"的字串中。" +"``repr``:如果為真(預設值),則此欄位包含在生成的 :meth:`~object.__repr__` " +"方法回傳的字串中。" #: ../../library/dataclasses.rst:264 #, fuzzy msgid "" -"``hash``: This can be a bool or ``None``. If true, this field is included " -"in the generated :meth:`~object.__hash__` method. If ``None`` (the " -"default), use the value of ``compare``: this would normally be the expected " -"behavior. A field should be considered in the hash if it's used for " -"comparisons. Setting this value to anything other than ``None`` is " -"discouraged." +"*hash*: This can be a bool or ``None``. If true, this field is included in " +"the generated :meth:`~object.__hash__` method. If ``None`` (the default), " +"use the value of *compare*: this would normally be the expected behavior. A " +"field should be considered in the hash if it's used for comparisons. " +"Setting this value to anything other than ``None`` is discouraged." msgstr "" "``hash``:這可以是 bool 或 ``None``。如果為真,則此欄位包含在生成的 :meth:" "`__hash__` 方法中。如果“無”(預設值),則使用“比較”的值:這通常是預期的行為。" @@ -493,7 +484,7 @@ msgstr "" #: ../../library/dataclasses.rst:277 #, fuzzy msgid "" -"``compare``: If true (the default), this field is included in the generated " +"*compare*: If true (the default), this field is included in the generated " "equality and comparison methods (:meth:`~object.__eq__`, :meth:`~object." "__gt__`, et al.)." msgstr "" @@ -503,7 +494,7 @@ msgstr "" #: ../../library/dataclasses.rst:281 #, fuzzy msgid "" -"``metadata``: This can be a mapping or None. None is treated as an empty " +"*metadata*: This can be a mapping or None. None is treated as an empty " "dict. This value is wrapped in :func:`~types.MappingProxyType` to make it " "read-only, and exposed on the :class:`Field` object. It is not used at all " "by Data Classes, and is provided as a third-party extension mechanism. " @@ -512,15 +503,14 @@ msgid "" msgstr "" "``元資料``:這可以是映射或無。 None 被視為空字典。此值包含在 :func:`~types." "MappingProxyType` 中以使其成為只讀的,並暴露在 :class:`Field` 對像上。它根本" -"不被資料類使用,而是作為第三方擴充機制提供的。多個第三方可以各自擁有自己的密" -"鑰,用作元資料中的命名空間。" +"不被資料類別使用,而是作為第三方擴充機制提供的。多個第三方可以各自擁有自己的" +"密鑰,用作元資料中的命名空間。" #: ../../library/dataclasses.rst:289 #, fuzzy msgid "" -"``kw_only``: If true, this field will be marked as keyword-only. This is " -"used when the generated :meth:`~object.__init__` method's parameters are " -"computed." +"*kw_only*: If true, this field will be marked as keyword-only. This is used " +"when the generated :meth:`~object.__init__` method's parameters are computed." msgstr "" "``kw_only``:如果為真,該欄位將被標記為僅限關鍵字。這在計算生成的 :meth:" "`__init__` 方法的參數時使用。" @@ -528,57 +518,59 @@ msgstr "" #: ../../library/dataclasses.rst:295 #, fuzzy msgid "" -"If the default value of a field is specified by a call to :func:`field()`, " +"If the default value of a field is specified by a call to :func:`!field`, " "then the class attribute for this field will be replaced by the specified " -"``default`` value. If no ``default`` is provided, then the class attribute " -"will be deleted. The intent is that after the :func:`dataclass` decorator " -"runs, the class attributes will all contain the default values for the " -"fields, just as if the default value itself were specified. For example, " -"after::" +"*default* value. If *default* is not provided, then the class attribute " +"will be deleted. The intent is that after the :func:`@dataclass " +"` decorator runs, the class attributes will all contain the " +"default values for the fields, just as if the default value itself were " +"specified. For example, after::" msgstr "" -"如果欄位的預設值是通過呼叫 :func:`field()` 指定的,那麼該欄位的類屬性將被指定" -"的``default`` 值替換。如果沒有提供``default``,那麼類屬性將被刪除。目的是在 :" -"func:`dataclass` 裝飾器運行後,類屬性將全部包含欄位的預設值,就像預設值本身已" -"指定一樣。例如,在::" +"如果欄位的預設值是通過呼叫 :func:`field()` 指定的,那麼該欄位的類別屬性將被指" +"定的*default* 值替換。如果沒有提供 *default*,那麼類別屬性將被刪除。目的是" +"在 :func:`dataclass` 裝飾器運行後,類別屬性將全部包含欄位的預設值,就像預設值" +"本身已指定一樣。例如,在::" #: ../../library/dataclasses.rst:311 #, fuzzy msgid "" -"The class attribute ``C.z`` will be ``10``, the class attribute ``C.t`` will " -"be ``20``, and the class attributes ``C.x`` and ``C.y`` will not be set." -msgstr "類屬性“C.z”將為“10”,類屬性“C.t”將為“20”,類屬性“C.x”和“C.y”將不會放。" +"The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" +"C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` " +"will not be set." +msgstr "" +"類別屬性 :attr:`!C.z` 將為 ``10``,類別屬性 :attr:`!C.t` 將為 ``20``,類別屬" +"性 :attr:`!C.x` 和 :attr:`!C.y` 將不會放。" #: ../../library/dataclasses.rst:317 #, fuzzy msgid "" -":class:`Field` objects describe each defined field. These objects are " +":class:`!Field` objects describe each defined field. These objects are " "created internally, and are returned by the :func:`fields` module-level " -"method (see below). Users should never instantiate a :class:`Field` object " +"method (see below). Users should never instantiate a :class:`!Field` object " "directly. Its documented attributes are:" msgstr "" -":class:`Field` 物件描述每個定義的欄位。這些對像在內部建立,並由 :func:" -"`fields` 模組級方法回傳(見下文)。使用者不應該直接實例化 Field 物件。它記錄" -"的屬性是:" +":class:`!Field` 物件描述每個定義的欄位。這些對像在內部建立,並由 :func:" +"`fields` 模組級方法回傳(見下文)。使用者不應該直接實例化 :class:`!Field` 物" +"件。它記錄的屬性是:" #: ../../library/dataclasses.rst:322 -#, fuzzy -msgid "``name``: The name of the field." -msgstr "``name``:欄位的名稱。" +msgid ":attr:`!name`: The name of the field." +msgstr ":attr:`!name`:欄位的名稱。" #: ../../library/dataclasses.rst:323 -#, fuzzy -msgid "``type``: The type of the field." -msgstr "``type``:欄位的型別。" +msgid ":attr:`!type`: The type of the field." +msgstr ":attr:`!type`:欄位的型別。" #: ../../library/dataclasses.rst:324 #, fuzzy msgid "" -"``default``, ``default_factory``, ``init``, ``repr``, ``hash``, ``compare``, " -"``metadata``, and ``kw_only`` have the identical meaning and values as they " -"do in the :func:`field` function." +":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!repr`, :" +"attr:`!hash`, :attr:`!compare`, :attr:`!metadata`, and :attr:`!kw_only` have " +"the identical meaning and values as they do in the :func:`field` function." msgstr "" -"``default``、``default_factory``、``init``、``repr``、``hash``、``compare``、" -"``metadata`` 和 ``kw_only`` 有與它們在 :func:`field` 函式中的含義和值相同。" +":attr:`!default`、:attr:`!default_factory`、:attr:`!init`、:attr:`!repr`、:" +"attr:`!hash`、:attr:`!compare`, :attr:`!metadata` 和 :attr:`!kw_only` 有與它" +"們在 :func:`field` 函式中的含義和值相同。" #: ../../library/dataclasses.rst:328 #, fuzzy @@ -595,26 +587,26 @@ msgid "" "Raises :exc:`TypeError` if not passed a dataclass or instance of one. Does " "not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "" -"回傳定義此資料類欄位的 :class:`Field` 物件的元組。接受資料類或資料類的實例。" -"如果未傳遞資料類或其中一個實例,則引發 :exc:`TypeError`。不回傳 ``ClassVar`` " -"或 ``InitVar`` 的偽欄位。" +"回傳定義此資料類別欄位的 :class:`Field` 物件的元組。接受資料類別或資料類別的" +"實例。如果未傳遞資料類別或其中一個實例,則引發 :exc:`TypeError`。不回傳 " +"``ClassVar`` 或 ``InitVar`` 的偽欄位。" #: ../../library/dataclasses.rst:340 #, fuzzy msgid "" -"Converts the dataclass ``obj`` to a dict (by using the factory function " -"``dict_factory``). Each dataclass is converted to a dict of its fields, as " +"Converts the dataclass *obj* to a dict (by using the factory function " +"*dict_factory*). Each dataclass is converted to a dict of its fields, as " "``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " "into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" -"將資料類“obj”轉換為字典(通過使用工廠函式“dict_factory”)。每個資料類都被轉換" -"為其欄位的字典,作為“名稱:值”對。資料類、字典、列表和元組被遞迴到。其他物件" -"使用 :func:`copy.deepcopy` 複製。" +"將資料類別 *obj* 轉換為字典(通過使用工廠函式 *dict_factory*)。每個資料類別" +"都被轉換為其欄位的字典,作為 ``name: value`` 對。資料類別、字典、列表和元組被" +"遞迴到。其他物件使用 :func:`copy.deepcopy` 複製。" #: ../../library/dataclasses.rst:346 #, fuzzy -msgid "Example of using :func:`asdict` on nested dataclasses::" -msgstr "在嵌套資料類上使用 :func:`asdict` 的示例::" +msgid "Example of using :func:`!asdict` on nested dataclasses::" +msgstr "在嵌套資料類別上使用 :func:`!asdict` 的範例: ::" #: ../../library/dataclasses.rst:363 ../../library/dataclasses.rst:383 #, fuzzy @@ -624,87 +616,86 @@ msgstr "要建立淺拷貝,可以使用以下解決方法:" #: ../../library/dataclasses.rst:367 #, fuzzy msgid "" -":func:`asdict` raises :exc:`TypeError` if ``obj`` is not a dataclass " -"instance." -msgstr ":func:`asdict` 如果 ``obj`` 不是資料類實例,則引發 :exc:`TypeError`。" +":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." +msgstr ":func:`!asdict` 如果 *obj* 不是資料類別實例,則引發 :exc:`TypeError`。" #: ../../library/dataclasses.rst:372 #, fuzzy msgid "" -"Converts the dataclass ``obj`` to a tuple (by using the factory function " -"``tuple_factory``). Each dataclass is converted to a tuple of its field " +"Converts the dataclass *obj* to a tuple (by using the factory function " +"*tuple_factory*). Each dataclass is converted to a tuple of its field " "values. dataclasses, dicts, lists, and tuples are recursed into. Other " "objects are copied with :func:`copy.deepcopy`." msgstr "" -"將資料類“obj”轉換為元組(通過使用工廠函式“tuple_factory”)。每個資料類都被轉" -"換為其欄位值的元組。資料類、字典、列表和元組被遞迴到。其他物件使用 :func:" -"`copy.deepcopy` 複製。" +"將資料類別 *obj* 轉換為元組(通過使用工廠函式 *tuple_factory*)。每個資料類別" +"都被轉換為其欄位值的元組。資料類別、字典、列表和元組被遞迴到。其他物件使用 :" +"func:`copy.deepcopy` 複製。" #: ../../library/dataclasses.rst:378 -#, fuzzy msgid "Continuing from the previous example::" -msgstr "從前面的例子繼續:" +msgstr "從前面的例子繼續: ::" #: ../../library/dataclasses.rst:387 #, fuzzy msgid "" -":func:`astuple` raises :exc:`TypeError` if ``obj`` is not a dataclass " +":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " "instance." -msgstr ":func:`astuple` 如果 ``obj`` 不是資料類實例,則引發 :exc:`TypeError`。" +msgstr "" +":func:`!astuple` 如果 *obj* 不是資料類別實例,則引發 :exc:`TypeError`。" #: ../../library/dataclasses.rst:392 #, fuzzy msgid "" -"Creates a new dataclass with name ``cls_name``, fields as defined in " -"``fields``, base classes as given in ``bases``, and initialized with a " -"namespace as given in ``namespace``. ``fields`` is an iterable whose " -"elements are each either ``name``, ``(name, type)``, or ``(name, type, " -"Field)``. If just ``name`` is supplied, ``typing.Any`` is used for " -"``type``. The values of ``init``, ``repr``, ``eq``, ``order``, " -"``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, ``slots``, and " -"``weakref_slot`` have the same meaning as they do in :func:`dataclass`." +"Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " +"base classes as given in *bases*, and initialized with a namespace as given " +"in *namespace*. *fields* is an iterable whose elements are each either " +"``name``, ``(name, type)``, or ``(name, type, Field)``. If just ``name`` is " +"supplied, :data:`typing.Any` is used for ``type``. The values of *init*, " +"*repr*, *eq*, *order*, *unsafe_hash*, *frozen*, *match_args*, *kw_only*, " +"*slots*, and *weakref_slot* have the same meaning as they do in :func:" +"`@dataclass `." msgstr "" -"建立一個名為“cls_name”的新資料類,欄位在“fields”中定義,基底類別在“bases”中給" -"出,並使用“namespace”中給出的命名空間進行初始化。 ``fields`` 是一個疊代器,其" -"元素分別是 ``name``、``(name, type)`` 或 ``(name, type, Field)``。如果只提供 " -"``name``,則 ``typing.Any`` 用於 ``type``。 ``init``、``repr``、``eq``、" -"``order``、``unsafe_hash``、``frozen``、``match_args``、``kw_only`` 的值, " -"``slots`` 和 ``weakref_slot`` 與它們在 :func:`dataclass` 中的含義相同。" +"建立一個名為 *cls_name* 的新資料類別,欄位在 *fields* 中定義,基底類別在 " +"*bases* 中給出,並使用 *namespace* 中給出的命名空間進行初始化。 ``fields`` 是" +"一個疊代器,其元素分別是 ``name``、``(name, type)`` 或 ``(name, type, " +"Field)``。如果只提供 ``name``,則 ``typing.Any`` 用於 ``type``。 ``init``、" +"``repr``、``eq``、``order``、``unsafe_hash``、``frozen``、``match_args``、" +"``kw_only`` 的值, ``slots`` 和 ``weakref_slot`` 與它們在 :func:`dataclass` 中" +"的含義相同。" #: ../../library/dataclasses.rst:402 msgid "" -"If ``module`` is defined, the ``__module__`` attribute of the dataclass is " -"set to that value. By default, it is set to the module name of the caller." +"If *module* is defined, the :attr:`!__module__` attribute of the dataclass " +"is set to that value. By default, it is set to the module name of the caller." msgstr "" #: ../../library/dataclasses.rst:406 #, fuzzy msgid "" "This function is not strictly required, because any Python mechanism for " -"creating a new class with ``__annotations__`` can then apply the :func:" -"`dataclass` function to convert that class to a dataclass. This function is " -"provided as a convenience. For example::" +"creating a new class with :attr:`!__annotations__` can then apply the :func:" +"`@dataclass ` function to convert that class to a dataclass. " +"This function is provided as a convenience. For example::" msgstr "" "這個函式不是嚴格要求的,因為任何使用 ``__annotations__`` 建立新類的 Python 機" -"制都可以應用 :func:`dataclass` 函式將該類轉換為資料類。提供此功能是為了方便。" -"例如::" +"制都可以應用 :func:`dataclass` 函式將該類轉換為資料類別。提供此功能是為了方" +"便。例如: ::" #: ../../library/dataclasses.rst:418 -#, fuzzy msgid "Is equivalent to::" -msgstr "相當於::" +msgstr "相當於: ::" #: ../../library/dataclasses.rst:431 #, fuzzy msgid "" -"Creates a new object of the same type as ``obj``, replacing fields with " -"values from ``changes``. If ``obj`` is not a Data Class, raises :exc:" -"`TypeError`. If values in ``changes`` do not specify fields, raises :exc:" +"Creates a new object of the same type as *obj*, replacing fields with values " +"from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If " +"keys in *changes* are not field names of the given dataclass, raises :exc:" "`TypeError`." msgstr "" "建立一個與 ``obj`` 型別相同的新物件,用 ``changes`` 中的值替換欄位。如果 " -"``obj`` 不是資料類,則引發 :exc:`TypeError`。如果 ``changes`` 中的值未指定欄" -"位,則引發:exc:`TypeError`。" +"``obj`` 不是資料類別,則引發 :exc:`TypeError`。如果 ``changes`` 中的值未指定" +"欄位,則引發 :exc:`TypeError`。" #: ../../library/dataclasses.rst:436 #, fuzzy @@ -713,14 +704,14 @@ msgid "" "method of the dataclass. This ensures that :meth:`__post_init__`, if " "present, is also called." msgstr "" -"新回傳的對像是通過呼叫資料類的 :meth:`__init__` 方法建立的。這確保 :meth:" -"`__post_init__`(如果存在)也被呼叫。" +"新回傳的對像是通過呼叫資料類別的 :meth:`~object.__init__` 方法建立的。這確" +"保 :meth:`__post_init__`(如果存在)也被呼叫。" #: ../../library/dataclasses.rst:440 #, fuzzy msgid "" "Init-only variables without default values, if any exist, must be specified " -"on the call to :func:`replace` so that they can be passed to :meth:`~object." +"on the call to :func:`!replace` so that they can be passed to :meth:`!" "__init__` and :meth:`__post_init__`." msgstr "" "沒有預設值的僅初始化變數(如果存在)必須在呼叫 :func:`replace` 時指定,以便它" @@ -729,35 +720,36 @@ msgstr "" #: ../../library/dataclasses.rst:444 #, fuzzy msgid "" -"It is an error for ``changes`` to contain any fields that are defined as " +"It is an error for *changes* to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" -"``changes`` 包含任何定義為具有 ``init=False`` 的欄位是錯誤的。在這種情況下將" -"引發 :exc:`ValueError`。" +"*changes* 包含任何定義為具有 ``init=False`` 的欄位是錯誤的。在這種情況下將引" +"發 :exc:`ValueError`。" #: ../../library/dataclasses.rst:448 #, fuzzy msgid "" -"Be forewarned about how ``init=False`` fields work during a call to :func:" -"`replace`. They are not copied from the source object, but rather are " +"Be forewarned about how ``init=False`` fields work during a call to :func:`!" +"replace`. They are not copied from the source object, but rather are " "initialized in :meth:`__post_init__`, if they're initialized at all. It is " "expected that ``init=False`` fields will be rarely and judiciously used. If " "they are used, it might be wise to have alternate class constructors, or " -"perhaps a custom ``replace()`` (or similarly named) method which handles " +"perhaps a custom :func:`!replace` (or similarly named) method which handles " "instance copying." msgstr "" -"預先警告 ``init=False`` 欄位在呼叫 :func:`replace` 期間是如何工作的。它們不是" -"從源物件複製的,而是在 :meth:`__post_init__` 中初始化的,如果它們被初始化的" +"預先警告 ``init=False`` 欄位在呼叫 :func:`!replace` 期間是如何工作的。它們不" +"是從源物件複製的,而是在 :meth:`__post_init__` 中初始化的,如果它們被初始化的" "話。預計 ``init=False`` 欄位將很少被明智地使用。如果使用它們,使用替代的類構" -"造函式可能是明智的,或者可能是處理實例複製的自定義“replace()”(或類似命名的)" -"方法。" +"造函式可能是明智的,或者可能是處理實例複製的自定義:func:`!replace` (或類似命" +"名的)方法。" #: ../../library/dataclasses.rst:459 #, fuzzy msgid "" "Return ``True`` if its parameter is a dataclass or an instance of one, " "otherwise return ``False``." -msgstr "如果它的參數是一個資料類或一個實例,則回傳“True”,否則回傳“False”。" +msgstr "" +"如果它的參數是一個資料類別或一個實例,則回傳 ``True``,否則回傳 ``False``。" #: ../../library/dataclasses.rst:462 #, fuzzy @@ -766,43 +758,43 @@ msgid "" "dataclass itself), then add a further check for ``not isinstance(obj, " "type)``::" msgstr "" -"如果你需要知道一個類是否是資料類的實例(而不是資料類本身),那麼新增一個進一" -"步的檢查``not isinstance(obj, type)``::" +"如果你需要知道一個類是否是資料類別的實例(而不是資料類別本身),那麼新增一個" +"進一步的檢查 ``not isinstance(obj, type)``: ::" #: ../../library/dataclasses.rst:471 #, fuzzy msgid "A sentinel value signifying a missing default or default_factory." -msgstr "表示缺少預設值或 default_factory 的標記值。" +msgstr "表示缺少 default 或 default_factory 的標記值。" #: ../../library/dataclasses.rst:475 #, fuzzy msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " -"with the type of :const:`KW_ONLY` are marked as keyword-only fields. Note " -"that a pseudo-field of type :const:`KW_ONLY` is otherwise completely " +"with the type of :const:`!KW_ONLY` are marked as keyword-only fields. Note " +"that a pseudo-field of type :const:`!KW_ONLY` is otherwise completely " "ignored. This includes the name of such a field. By convention, a name of " -"``_`` is used for a :const:`KW_ONLY` field. Keyword-only fields signify :" +"``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :" "meth:`~object.__init__` parameters that must be specified as keywords when " "the class is instantiated." msgstr "" -"用作型別註釋的標記值。型別為 KW_ONLY 的偽欄位之後的任何欄位都被標記為僅關鍵字" -"欄位。請注意,KW_ONLY 型別的偽欄位將被完全忽略。這包括此類欄位的名稱。按照慣" -"例,名稱 _ 用於 :const: `KW_ONLY` 欄位。僅關鍵字欄位表示 :meth:`__init__` 參" -"數,在實例化類時必須將其指定為關鍵字。" +"用作型別註釋的標記值。型別為 :const:`!KW_ONLY` 的偽欄位之後的任何欄位都被標記" +"為僅關鍵字欄位。請注意,:const:`!KW_ONLY` 型別的偽欄位將被完全忽略。這包括此" +"類欄位的名稱。按照慣例,名稱 _ 用於 :const:`!KW_ONLY` 欄位。僅關鍵字欄位表" +"示 :meth:`~object.__init__` 參數,在實例化類時必須將其指定為關鍵字。" #: ../../library/dataclasses.rst:484 #, fuzzy msgid "" "In this example, the fields ``y`` and ``z`` will be marked as keyword-only " "fields::" -msgstr "在此示例中,欄位 ``y`` 和 ``z`` 將被標記為僅關鍵字欄位::" +msgstr "在此示例中,欄位 ``y`` 和 ``z`` 將被標記為僅關鍵字欄位: ::" #: ../../library/dataclasses.rst:495 #, fuzzy msgid "" "In a single dataclass, it is an error to specify more than one field whose " -"type is :const:`KW_ONLY`." -msgstr "在單個資料類中,指定多個型別為 KW_ONLY 的欄位是錯誤的。" +"type is :const:`!KW_ONLY`." +msgstr "在單個資料類別中,指定多個型別為 :const:`!KW_ONLY` 的欄位是錯誤的。" #: ../../library/dataclasses.rst:502 #, fuzzy @@ -811,7 +803,7 @@ msgid "" "`~object.__delattr__` is called on a dataclass which was defined with " "``frozen=True``. It is a subclass of :exc:`AttributeError`." msgstr "" -"當在使用 frozen=True 定義的資料類上呼叫隱式定義的 :meth:`__setattr__` 或 :" +"當在使用 frozen=True 定義的資料類別上呼叫隱式定義的 :meth:`__setattr__` 或 :" "meth:`__delattr__` 時引發。它是 :exc:`AttributeError` 的子類別。" #: ../../library/dataclasses.rst:509 @@ -823,192 +815,192 @@ msgstr "初始化後處理" #, fuzzy msgid "" "When defined on the class, it will be called by the generated :meth:`~object." -"__init__`, normally as ``self.__post_init__()``. However, if any ``InitVar`` " -"fields are defined, they will also be passed to :meth:`__post_init__` in the " -"order they were defined in the class. If no :meth:`~object.__init__` method " -"is generated, then :meth:`__post_init__` will not automatically be called." -msgstr "" -"生成的 :meth:`__init__` 程式碼將呼叫一個名為 :meth:`__post_init__` 的方法,如" -"果 :meth:`__post_init__` 是在類上定義的。它通常被稱為 ``self." -"__post_init__()``。但是,如果定義了任何 ``InitVar`` 欄位,它們也將按照它們在" -"類中定義的順序傳遞給 :meth:`__post_init__` 。如果沒有生成 :meth:`__init__` 方" -"法,那麼 :meth:`__post_init__` 將不會被自動呼叫。" +"__init__`, normally as :meth:`!self.__post_init__`. However, if any " +"``InitVar`` fields are defined, they will also be passed to :meth:`!" +"__post_init__` in the order they were defined in the class. If no :meth:`!" +"__init__` method is generated, then :meth:`!__post_init__` will not " +"automatically be called." +msgstr "" +"生成的 :meth:`~object.__init__` 程式碼將呼叫一個名為 :meth:`!self." +"__post_init__` 的方法,如果 :meth:`!__post_init__` 是在類上定義的。它通常被稱" +"為 ``self.!__post_init__()``。但是,如果定義了任何 ``InitVar`` 欄位,它們也將" +"按照它們在類中定義的順序傳遞給 :meth:`!__post_init__` 。如果沒有生成 :meth:`!" +"__init__` 方法,那麼 :meth:`!__post_init__` 將不會被自動呼叫。" #: ../../library/dataclasses.rst:520 #, fuzzy msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" -msgstr "" -"在其他用途\\u200b\\u200b中,這允許初始化依賴於一個或多個其他欄位的欄位值。例" -"如::" +msgstr "在其他用途中,這允許初始化依賴於一個或多個其他欄位的欄位值。例如: ::" #: ../../library/dataclasses.rst:532 #, fuzzy msgid "" -"The :meth:`~object.__init__` method generated by :func:`dataclass` does not " -"call base class :meth:`~object.__init__` methods. If the base class has an :" -"meth:`~object.__init__` method that has to be called, it is common to call " -"this method in a :meth:`__post_init__` method::" +"The :meth:`~object.__init__` method generated by :func:`@dataclass " +"` does not call base class :meth:`!__init__` methods. If the base " +"class has an :meth:`!__init__` method that has to be called, it is common to " +"call this method in a :meth:`__post_init__` method::" msgstr "" -":func:`dataclass` 生成的:meth:`__init__` 方法不呼叫基底類別:meth:`__init__` " -"方法。如果基底類別有一個必須呼叫的 :meth:`__init__` 方法,通常在 :meth:" -"`__post_init__` 方法中呼叫此方法::" +":func:`@dataclass ` 生成的 :meth:`~object.__init__` 方法不呼叫基底" +"類別 :meth:`!__init__` 方法。如果基底類別有一個必須呼叫的 :meth:`!__init__` " +"方法,通常在 :meth:`__post_init__` 方法中呼叫此方法::" #: ../../library/dataclasses.rst:549 #, fuzzy msgid "" -"Note, however, that in general the dataclass-generated :meth:`~object." -"__init__` methods don't need to be called, since the derived dataclass will " -"take care of initializing all fields of any base class that is a dataclass " -"itself." +"Note, however, that in general the dataclass-generated :meth:`!__init__` " +"methods don't need to be called, since the derived dataclass will take care " +"of initializing all fields of any base class that is a dataclass itself." msgstr "" -"但是請注意,通常不需要呼叫資料類生成的 :meth:`__init__` 方法,因為派生資料類" -"將負責初始化作為資料類本身的任何基底類別的所有欄位。" +"但是請注意,通常不需要呼叫資料類別生成的 :meth:`!__init__` 方法,因為派生資料" +"類別將負責初始化作為資料類別本身的任何基底類別的所有欄位。" #: ../../library/dataclasses.rst:553 #, fuzzy msgid "" "See the section below on init-only variables for ways to pass parameters to :" -"meth:`__post_init__`. Also see the warning about how :func:`replace` " +"meth:`!__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" -"請參閱下面有關僅初始化變數的部分,了解將參數傳遞給 :meth:`__post_init__` 的方" -"法。另請參閱有關 :func:`replace` 如何處理 ``init=False`` 欄位的警告。" +"請參閱下面有關僅初始化變數的部分,了解將參數傳遞給 :meth:`!__post_init__` 的" +"方法。另請參閱有關 :func:`replace` 如何處理 ``init=False`` 欄位的警告。" -#: ../../library/dataclasses.rst:558 -#, fuzzy +#: ../../library/dataclasses.rst:560 msgid "Class variables" -msgstr "類變數" +msgstr "類別變數" -#: ../../library/dataclasses.rst:560 +#: ../../library/dataclasses.rst:562 #, fuzzy msgid "" -"One of the few places where :func:`dataclass` actually inspects the type of " -"a field is to determine if a field is a class variable as defined in :pep:" -"`526`. It does this by checking if the type of the field is ``typing." -"ClassVar``. If a field is a ``ClassVar``, it is excluded from consideration " -"as a field and is ignored by the dataclass mechanisms. Such ``ClassVar`` " -"pseudo-fields are not returned by the module-level :func:`fields` function." +"One of the few places where :func:`@dataclass ` actually inspects " +"the type of a field is to determine if a field is a class variable as " +"defined in :pep:`526`. It does this by checking if the type of the field " +"is :data:`typing.ClassVar`. If a field is a ``ClassVar``, it is excluded " +"from consideration as a field and is ignored by the dataclass mechanisms. " +"Such ``ClassVar`` pseudo-fields are not returned by the module-level :func:" +"`fields` function." msgstr "" -":func:`dataclass` 實際檢查欄位型別的少數地方之一是確定欄位是否是 :pep:`526` " -"中定義的類變數。它通過檢查欄位的型別是否為“typing.ClassVar”來做到這一點。如果" -"一個欄位是一個“ClassVar”,它就被排除在考慮之外,並被資料類機制忽略。模組級 :" -"func:`fields` 函式不會回傳此類 ``ClassVar`` 偽欄位。" +":func:`@dataclass ` 實際檢查欄位型別的少數地方之一是確定欄位是否" +"是 :pep:`526` 中定義的類變數。它通過檢查欄位的型別是否為 :data:`typing." +"ClassVar` 來做到這一點。如果一個欄位是一個 ``ClassVar``,它就被排除在考慮之" +"外,並被資料類別機制忽略。模組級 :func:`fields` 函式不會回傳此類別 " +"``ClassVar`` 偽欄位。" -#: ../../library/dataclasses.rst:569 +#: ../../library/dataclasses.rst:573 #, fuzzy msgid "Init-only variables" msgstr "僅初始化變數" -#: ../../library/dataclasses.rst:571 +#: ../../library/dataclasses.rst:575 #, fuzzy msgid "" -"Another place where :func:`dataclass` inspects a type annotation is to " -"determine if a field is an init-only variable. It does this by seeing if " -"the type of a field is of type ``dataclasses.InitVar``. If a field is an " -"``InitVar``, it is considered a pseudo-field called an init-only field. As " -"it is not a true field, it is not returned by the module-level :func:" -"`fields` function. Init-only fields are added as parameters to the " -"generated :meth:`~object.__init__` method, and are passed to the optional :" -"meth:`__post_init__` method. They are not otherwise used by dataclasses." +"Another place where :func:`@dataclass ` inspects a type " +"annotation is to determine if a field is an init-only variable. It does " +"this by seeing if the type of a field is of type ``dataclasses.InitVar``. " +"If a field is an ``InitVar``, it is considered a pseudo-field called an init-" +"only field. As it is not a true field, it is not returned by the module-" +"level :func:`fields` function. Init-only fields are added as parameters to " +"the generated :meth:`~object.__init__` method, and are passed to the " +"optional :meth:`__post_init__` method. They are not otherwise used by " +"dataclasses." msgstr "" ":func:`dataclass` 檢查型別註解的另一個地方是確定欄位是否是僅初始化變數。它通" -"過查看欄位的型別是否為“dataclasses.InitVar”型別來執行此操作。如果一個欄位是一" -"個“InitVar”,它被認為是一個偽欄位,稱為 init-only 欄位。由於它不是真正的欄" -"位,因此它不會由模組級 fields 函式回傳。 Init-only 欄位作為參數新增到生成的 :" -"meth:`__init__` 方法,並傳遞給可選的 :meth:`__post_init__` 方法。它們不被資料" -"類使用。" +"過查看欄位的型別是否為 ``dataclasses.InitVar`` 型別來執行此操作。如果一個欄位" +"是一個 ``InitVar``,它被認為是一個偽欄位,稱為 init-only 欄位。由於它不是真正" +"的欄位,因此它不會由模組級 fields 函式回傳。 Init-only 欄位作為參數新增到生成" +"的 :meth:`~object.__init__` 方法,並傳遞給可選的 :meth:`__post_init__` 方法。" +"它們不被資料類使用。" -#: ../../library/dataclasses.rst:581 +#: ../../library/dataclasses.rst:585 #, fuzzy msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" -msgstr "例如,假設一個欄位將從資料庫中初始化,如果在建立類時沒有提供值::" +msgstr "例如,假設一個欄位將從資料庫中初始化,如果在建立類時沒有提供值: ::" -#: ../../library/dataclasses.rst:596 +#: ../../library/dataclasses.rst:600 #, fuzzy msgid "" -"In this case, :func:`fields` will return :class:`Field` objects for ``i`` " -"and ``j``, but not for ``database``." +"In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" +"i` and :attr:`!j`, but not for :attr:`!database`." msgstr "" -"在這種情況下,:func:`fields` 將為 ``i`` 和 ``j`` 回傳 :class:`Field` 物件,但" -"不會為 ``database`` 回傳。" +"在這種情況下,:func:`fields` 將為 :attr:`!i` 和 :attr:`!j` 回傳 :class:" +"`Field` 物件,但不會為 :attr:`!database` 回傳。" -#: ../../library/dataclasses.rst:600 -#, fuzzy +#: ../../library/dataclasses.rst:606 msgid "Frozen instances" msgstr "凍結實例" -#: ../../library/dataclasses.rst:602 +#: ../../library/dataclasses.rst:608 #, fuzzy msgid "" "It is not possible to create truly immutable Python objects. However, by " -"passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate " -"immutability. In that case, dataclasses will add :meth:`~object." +"passing ``frozen=True`` to the :func:`@dataclass ` decorator you " +"can emulate immutability. In that case, dataclasses will add :meth:`~object." "__setattr__` and :meth:`~object.__delattr__` methods to the class. These " "methods will raise a :exc:`FrozenInstanceError` when invoked." msgstr "" "不可能建立真正不可變的 Python 物件。但是,通過將 ``frozen=True`` 傳遞給 :" -"meth:`dataclass` 裝飾器,您可以模擬不變性。在這種情況下,資料類將向類新增 :" -"meth:`__setattr__` 和 :meth:`__delattr__` 方法。這些方法在呼叫時會引發:exc:" -"`FrozenInstanceError`。" +"func:`@dataclass ` 裝飾器,你可以模擬不變性。在這種情況下,資料類" +"別將向類新增 :meth:`~object.__setattr__` 和 :meth:`~object.__delattr__` 方" +"法。這些方法在呼叫時會引發 :exc:`FrozenInstanceError`。" -#: ../../library/dataclasses.rst:608 +#: ../../library/dataclasses.rst:614 #, fuzzy msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`~object.__init__` cannot use simple assignment to initialize fields, and " -"must use :meth:`!object.__setattr__`." +"must use :meth:`!__setattr__`." msgstr "" -"使用 ``frozen=True`` 時有一個微小的性能損失::meth:`__init__` 不能使用簡單賦" -"值來初始化欄位,必須使用 :meth:`object.__setattr__`。" +"使用 ``frozen=True`` 時有一個微小的性能損失::meth:`~object.__init__` 不能使" +"用簡單賦值來初始化欄位,必須使用 :meth:`!__setattr__`。" -#: ../../library/dataclasses.rst:613 -#, fuzzy +#: ../../library/dataclasses.rst:621 msgid "Inheritance" -msgstr "遺產" +msgstr "繼承" -#: ../../library/dataclasses.rst:615 +#: ../../library/dataclasses.rst:623 #, fuzzy msgid "" -"When the dataclass is being created by the :meth:`dataclass` decorator, it " -"looks through all of the class's base classes in reverse MRO (that is, " -"starting at :class:`object`) and, for each dataclass that it finds, adds the " -"fields from that base class to an ordered mapping of fields. After all of " -"the base class fields are added, it adds its own fields to the ordered " -"mapping. All of the generated methods will use this combined, calculated " -"ordered mapping of fields. Because the fields are in insertion order, " -"derived classes override base classes. An example::" +"When the dataclass is being created by the :func:`@dataclass ` " +"decorator, it looks through all of the class's base classes in reverse MRO " +"(that is, starting at :class:`object`) and, for each dataclass that it " +"finds, adds the fields from that base class to an ordered mapping of fields. " +"After all of the base class fields are added, it adds its own fields to the " +"ordered mapping. All of the generated methods will use this combined, " +"calculated ordered mapping of fields. Because the fields are in insertion " +"order, derived classes override base classes. An example::" msgstr "" -"當 :meth:`dataclass` 裝飾器建立資料類時,它會以反向 MRO(即從 :class:" -"`object` 開始)查看該類的所有基底類別,並且對於它找到的每個資料類,將該基底類" -"別中的欄位新增到欄位的有序映射中。新增所有基底類別欄位後,它會將自己的欄位新" -"增到有序映射中。所有生成的方法都將使用這種組合的、計算的有序欄位映射。因為欄" -"位是按插入順序排列的,所以派生類會覆蓋基底類別。一個例子::" +"當 :func:`@dataclass ` 裝飾器建立資料類別時,它會以反向 MRO(即" +"從 :class:`object` 開始)查看該類的所有基底類別,並且對於它找到的每個資料類" +"別,將該基底類別中的欄位新增到欄位的有序映射中。新增所有基底類別欄位後,它會" +"將自己的欄位新增到有序映射中。所有生成的方法都將使用這種組合的、計算的有序欄" +"位映射。因為欄位是按插入順序排列的,所以派生類會覆蓋基底類別。一個例子: ::" -#: ../../library/dataclasses.rst:635 +#: ../../library/dataclasses.rst:643 #, fuzzy msgid "" -"The final list of fields is, in order, ``x``, ``y``, ``z``. The final type " -"of ``x`` is ``int``, as specified in class ``C``." +"The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " +"The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!" +"C`." msgstr "" -"最終的欄位列表按順序為“x”、“y”、“z”。 ``x`` 的最終型別是 ``int``,如類 ``C`` " -"中指定的那樣。" +"最終的欄位列表按順序為 :attr:`!x`、:attr:`!y`、:attr:`!z`。:attr:`!x` 的最終" +"型別是 :class:`int`,如類別 :class:`!C` 中指定的那樣。" -#: ../../library/dataclasses.rst:638 +#: ../../library/dataclasses.rst:646 #, fuzzy msgid "" -"The generated :meth:`~object.__init__` method for ``C`` will look like::" -msgstr "為 ``C`` 生成的 :meth:`__init__` 方法將如下所示:" +"The generated :meth:`~object.__init__` method for :class:`!C` will look " +"like::" +msgstr "為 ``C`` 生成的 :meth:`~object.__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:643 +#: ../../library/dataclasses.rst:651 #, fuzzy -msgid "Re-ordering of keyword-only parameters in :meth:`~object.__init__`" +msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr ":meth:`__init__` 中僅關鍵字參數的重新排序" -#: ../../library/dataclasses.rst:645 +#: ../../library/dataclasses.rst:653 #, fuzzy msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " @@ -1020,22 +1012,22 @@ msgstr "" "僅關鍵字)參數之後。這是如何在 Python 中實作僅關鍵字參數的要求:它們必須位於" "非僅關鍵字參數之後。" -#: ../../library/dataclasses.rst:651 +#: ../../library/dataclasses.rst:659 #, fuzzy msgid "" -"In this example, ``Base.y``, ``Base.w``, and ``D.t`` are keyword-only " -"fields, and ``Base.x`` and ``D.z`` are regular fields::" +"In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " +"keyword-only fields, and :attr:`!Base.x` and :attr:`!D.z` are regular " +"fields::" msgstr "" -"在此示例中,``Base.y``、``Base.w`` 和``D.t`` 是僅限關鍵字的欄位,``Base.x`` " -"和``D.z`` 是常規欄位: :" +"在此示例中,:attr:`!Base.y`、:attr:`!Base.w` 和 :attr:`!D.t` 是僅限關鍵字的欄" +"位,:attr:`!Base.x` 和 :attr:`!D.z` 是常規欄位: ::" -#: ../../library/dataclasses.rst:666 +#: ../../library/dataclasses.rst:674 #, fuzzy -msgid "" -"The generated :meth:`~object.__init__` method for ``D`` will look like::" -msgstr "為 ``D`` 生成的 :meth:`__init__` 方法將如下所示:" +msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" +msgstr "為 :class:`!D` 生成的 :meth:`!__init__` 方法將如下所示:" -#: ../../library/dataclasses.rst:670 +#: ../../library/dataclasses.rst:678 #, fuzzy msgid "" "Note that the parameters have been re-ordered from how they appear in the " @@ -1045,156 +1037,157 @@ msgstr "" "請注意,參數已根據它們在欄位列表中的顯示方式重新排序:從常規欄位派生的參數後" "跟從僅關鍵字欄位派生的參數。" -#: ../../library/dataclasses.rst:674 +#: ../../library/dataclasses.rst:682 #, fuzzy msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" -"ordered :meth:`~object.__init__` parameter list." -msgstr "僅關鍵字參數的相對順序在重新排序的 :meth:`__init__` 參數列表中維護。" +"ordered :meth:`!__init__` parameter list." +msgstr "僅關鍵字參數的相對順序在重新排序的 :meth:`!__init__` 參數列表中維護。" -#: ../../library/dataclasses.rst:679 -#, fuzzy +#: ../../library/dataclasses.rst:687 msgid "Default factory functions" msgstr "預設工廠函式" -#: ../../library/dataclasses.rst:681 +#: ../../library/dataclasses.rst:689 #, fuzzy msgid "" -"If a :func:`field` specifies a ``default_factory``, it is called with zero " +"If a :func:`field` specifies a *default_factory*, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" -"如果 :func:`field` 指定了 ``default_factory``,當需要該欄位的預設值時,它會以" -"零參數呼叫。例如,要建立列表的新實例,請使用:" +"如果 :func:`field` 指定了 *default_factory*,當需要該欄位的預設值時,它會以零" +"參數呼叫。例如,要建立列表的新實例,請使用:" -#: ../../library/dataclasses.rst:687 +#: ../../library/dataclasses.rst:695 #, fuzzy msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " -"and the field also specifies ``default_factory``, then the default factory " -"function will always be called from the generated :meth:`~object.__init__` " +"and the field also specifies *default_factory*, then the default factory " +"function will always be called from the generated :meth:`!__init__` " "function. This happens because there is no other way to give the field an " "initial value." msgstr "" -"如果一個欄位從 :meth:`__init__` 中排除(使用 ``init=False``)並且該欄位還指定" -"了 ``default_factory``,那麼預設工廠函式將始終從生成的 :meth:`__init__ 中呼叫" -"`功能。發生這種情況是因為沒有其他方法可以為該欄位賦予初始值。" +"如果一個欄位從 :meth:`~object.__init__` 中排除(使用 ``init=False``)並且該欄" +"位還指定了 ``default_factory``,那麼預設工廠函式將始終從生成的 :meth:" +"`__init__ 中呼叫`功能。發生這種情況是因為沒有其他方法可以為該欄位賦予初始值。" -#: ../../library/dataclasses.rst:694 -#, fuzzy +#: ../../library/dataclasses.rst:702 msgid "Mutable default values" msgstr "可變預設值" -#: ../../library/dataclasses.rst:696 +#: ../../library/dataclasses.rst:704 #, fuzzy msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" -msgstr "Python 將預設成員變數值存儲在類屬性中。考慮這個例子,不使用資料類::" +msgstr "" +"Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別::" -#: ../../library/dataclasses.rst:711 +#: ../../library/dataclasses.rst:719 #, fuzzy msgid "" -"Note that the two instances of class ``C`` share the same class variable " -"``x``, as expected." -msgstr "請注意,類“C”的兩個實例共享同一個類變數“x”,正如預期的那樣。" +"Note that the two instances of class :class:`!C` share the same class " +"variable :attr:`!x`, as expected." +msgstr "" +"請注意,類別 :class:`!C` 的兩個實例共享同一個類別變數 :attr:`!x`,正如預期的" +"那樣。" -#: ../../library/dataclasses.rst:714 +#: ../../library/dataclasses.rst:722 #, fuzzy msgid "Using dataclasses, *if* this code was valid::" -msgstr "使用資料類,*如果*此程式碼有效::" +msgstr "使用資料類別,*如果*此程式碼有效: ::" -#: ../../library/dataclasses.rst:722 +#: ../../library/dataclasses.rst:730 msgid "it would generate code similar to::" -msgstr "它會生成類似的程式碼::" +msgstr "它會生成類似的程式碼: ::" -#: ../../library/dataclasses.rst:733 +#: ../../library/dataclasses.rst:741 #, fuzzy msgid "" -"This has the same issue as the original example using class ``C``. That is, " -"two instances of class ``D`` that do not specify a value for ``x`` when " -"creating a class instance will share the same copy of ``x``. Because " -"dataclasses just use normal Python class creation they also share this " -"behavior. There is no general way for Data Classes to detect this " -"condition. Instead, the :func:`dataclass` decorator will raise a :exc:" -"`ValueError` if it detects an unhashable default parameter. The assumption " -"is that if a value is unhashable, it is mutable. This is a partial " -"solution, but it does protect against many common errors." +"This has the same issue as the original example using class :class:`!C`. " +"That is, two instances of class :class:`!D` that do not specify a value for :" +"attr:`!x` when creating a class instance will share the same copy of :attr:`!" +"x`. Because dataclasses just use normal Python class creation they also " +"share this behavior. There is no general way for Data Classes to detect " +"this condition. Instead, the :func:`@dataclass ` decorator will " +"raise a :exc:`ValueError` if it detects an unhashable default parameter. " +"The assumption is that if a value is unhashable, it is mutable. This is a " +"partial solution, but it does protect against many common errors." msgstr "" -"這與使用類“C”的原始示例存在相同的問題。也就是說,類“D”的兩個實例在建立類實例" -"時沒有為“x”指定值,它們將共享“x”的同一個副本。因為資料類只是使用普通的 " -"Python 類建立,所以它們也有這種行為。資料類沒有通用的方法來檢測這種情況。相" -"反,如果 :func:`dataclass` 裝飾器檢測到不可散列的預設參數,它將引發 :exc:" -"`TypeError`。假設是如果一個值是不可散列的,那麼它就是可變的。這是一個部分解決" -"方案,但它確實可以防止許多常見錯誤。" +"這與使用類別 :class:`!C` 的原始示例存在相同的問題。也就是說,類別 :class:`!" +"D` 的兩個實例在建立類實例時沒有為 :attr:`!x` 指定值,它們將共享 :attr:`!x` 的" +"同一個副本。因為資料類別只是使用普通的 Python 類建立,所以它們也有這種行為。" +"資料類別沒有通用的方法來檢測這種情況。相反,如果 :func:`dataclass` 裝飾器檢測" +"到不可散列的預設參數,它將引發 :exc:`TypeError`。假設是如果一個值是不可散列" +"的,那麼它就是可變的。這是一個部分解決方案,但它確實可以防止許多常見錯誤。" -#: ../../library/dataclasses.rst:744 +#: ../../library/dataclasses.rst:752 #, fuzzy msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "使用預設工廠函式是一種建立可變型別的新實例作為欄位預設值的方法:" -#: ../../library/dataclasses.rst:753 +#: ../../library/dataclasses.rst:761 #, fuzzy msgid "" -"Instead of looking for and disallowing objects of type ``list``, ``dict``, " -"or ``set``, unhashable objects are now not allowed as default values. " -"Unhashability is used to approximate mutability." +"Instead of looking for and disallowing objects of type :class:`list`, :class:" +"`dict`, or :class:`set`, unhashable objects are now not allowed as default " +"values. Unhashability is used to approximate mutability." msgstr "" -"不再查找和禁止型別為“list”、“dict”或“set”的物件,現在不允許使用不可散列的對像" -"作為預設值。不可散列性用於近似可變性。" +"不再查找和禁止型別為 :class:`list`、:class:`dict` 或 :class:`set` 的物件,現" +"在不允許使用不可散列的對像作為預設值。不可散列性用於近似可變性。" -#: ../../library/dataclasses.rst:760 +#: ../../library/dataclasses.rst:768 #, fuzzy msgid "Descriptor-typed fields" msgstr "描述器型別的欄位" -#: ../../library/dataclasses.rst:762 +#: ../../library/dataclasses.rst:770 #, fuzzy msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " "default value have the following special behaviors:" msgstr "" -"指定為 :ref:`descriptor objects ` 作為預設值的欄位具有以下特殊行" -"為:" +"指定為\\ :ref:`描述器物件 `\\ 作為預設值的欄位具有以下特殊行為:" -#: ../../library/dataclasses.rst:765 +#: ../../library/dataclasses.rst:773 #, fuzzy msgid "" -"The value for the field passed to the dataclass's ``__init__`` method is " -"passed to the descriptor's ``__set__`` method rather than overwriting the " -"descriptor object." +"The value for the field passed to the dataclass's :meth:`~object.__init__` " +"method is passed to the descriptor's :meth:`~object.__set__` method rather " +"than overwriting the descriptor object." msgstr "" -"傳遞給資料類的“__init__”方法的欄位值被傳遞給描述器的“__set__”方法,而不是覆蓋" -"描述器物件。" +"傳遞給資料類別的 :meth:`~object.__init__` 方法的欄位值被傳遞給描述器的 :meth:" +"`~object.__set__` 方法,而不是覆蓋描述器物件。" -#: ../../library/dataclasses.rst:768 +#: ../../library/dataclasses.rst:777 #, fuzzy msgid "" -"Similarly, when getting or setting the field, the descriptor's ``__get__`` " -"or ``__set__`` method is called rather than returning or overwriting the " -"descriptor object." +"Similarly, when getting or setting the field, the descriptor's :meth:" +"`~object.__get__` or :meth:`!__set__` method is called rather than returning " +"or overwriting the descriptor object." msgstr "" -"同樣,在獲取或設定欄位時,將呼叫描述器的“__get__”或“__set__”方法,而不是回傳" -"或覆蓋描述器物件。" +"同樣,在獲取或設定欄位時,將呼叫描述器的 :meth:`~object.__get__` 或 :meth:`!" +"__set__` 方法,而不是回傳或覆蓋描述器物件。" -#: ../../library/dataclasses.rst:771 +#: ../../library/dataclasses.rst:781 #, fuzzy msgid "" -"To determine whether a field contains a default value, ``dataclasses`` will " -"call the descriptor's ``__get__`` method using its class access form (i.e. " -"``descriptor.__get__(obj=None, type=cls)``. If the descriptor returns a " -"value in this case, it will be used as the field's default. On the other " -"hand, if the descriptor raises :exc:`AttributeError` in this situation, no " -"default value will be provided for the field." +"To determine whether a field contains a default value, :func:`@dataclass " +"` will call the descriptor's :meth:`!__get__` method using its " +"class access form: ``descriptor.__get__(obj=None, type=cls)``. If the " +"descriptor returns a value in this case, it will be used as the field's " +"default. On the other hand, if the descriptor raises :exc:`AttributeError` " +"in this situation, no default value will be provided for the field." msgstr "" -"為了確定一個欄位是否包含預設值,``dataclasses`` 將使用其類訪問形式呼叫描述器" -"的``__get__`` 方法(即``descriptor.__get__(obj=None, type=cls)``。如果在這種" -"情況下,描述器回傳一個值,它將用作欄位的預設值。另一方面,如果描述器在這種情" -"況下引發 :exc:`AttributeError`,則不會為該欄位提供預設值。" +"為了確定一個欄位是否包含預設值,:func:`@dataclass ` 將使用其類訪問" +"形式呼叫描述器的 :meth:`!__get__` 方法(即 ``descriptor.__get__(obj=None, " +"type=cls)``。如果在這種情況下,描述器回傳一個值,它將用作欄位的預設值。另一方" +"面,如果描述器在這種情況下引發 :exc:`AttributeError`,則不會為該欄位提供預設" +"值。" -#: ../../library/dataclasses.rst:806 +#: ../../library/dataclasses.rst:816 #, fuzzy msgid "" "Note that if a field is annotated with a descriptor type, but is not " diff --git a/library/datetime.po b/library/datetime.po index f533117cdb..671f9eb604 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-08-07 10:20+0800\n" "Last-Translator: Griiid \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -42,7 +42,7 @@ msgstr "" msgid "Skip to :ref:`the format codes `." msgstr "跳轉至\\ :ref:`格式碼 (format codes) `。" -#: ../../library/datetime.rst:29 +#: ../../library/datetime.rst:28 msgid "Module :mod:`calendar`" msgstr ":mod:`calendar` 模組" @@ -50,7 +50,7 @@ msgstr ":mod:`calendar` 模組" msgid "General calendar related functions." msgstr "與日曆相關的一般函式。" -#: ../../library/datetime.rst:32 +#: ../../library/datetime.rst:31 msgid "Module :mod:`time`" msgstr ":mod:`time` 模組" @@ -58,7 +58,7 @@ msgstr ":mod:`time` 模組" msgid "Time access and conversions." msgstr "" -#: ../../library/datetime.rst:35 +#: ../../library/datetime.rst:34 msgid "Module :mod:`zoneinfo`" msgstr ":mod:`zoneinfo` 模組" @@ -66,7 +66,7 @@ msgstr ":mod:`zoneinfo` 模組" msgid "Concrete time zones representing the IANA time zone database." msgstr "" -#: ../../library/datetime.rst:38 +#: ../../library/datetime.rst:37 msgid "Package `dateutil `_" msgstr "" @@ -74,9 +74,9 @@ msgstr "" msgid "Third-party library with expanded time zone and parsing support." msgstr "帶有時區與剖析擴充支援的第三方函式庫。" -#: ../../library/datetime.rst:42 -msgid "Package `DateType `_" -msgstr "`DateType `_ 套件" +#: ../../library/datetime.rst:40 +msgid "Package :pypi:`DateType`" +msgstr ":pypi:`DateType` 套件" #: ../../library/datetime.rst:41 msgid "" @@ -2413,7 +2413,7 @@ msgid "" "offset -4 hours))." msgstr "" -#: ../../library/datetime.rst:2222 +#: ../../library/datetime.rst:2216 msgid ":mod:`zoneinfo`" msgstr ":mod:`zoneinfo`" @@ -2430,7 +2430,7 @@ msgid "" "database) to Python, and its usage is recommended." msgstr "" -#: ../../library/datetime.rst:2228 +#: ../../library/datetime.rst:2224 msgid "`IANA timezone database `_" msgstr "`IANA 時區資料庫 `_" @@ -2840,7 +2840,7 @@ msgstr "000000, 000001, ..., 999999" msgid "\\(5)" msgstr "\\(5)" -#: ../../library/datetime.rst:2411 ../../library/datetime.rst:2580 +#: ../../library/datetime.rst:2411 ../../library/datetime.rst:2570 msgid "``%z``" msgstr "``%z``" @@ -2859,7 +2859,7 @@ msgstr "" msgid "\\(6)" msgstr "\\(6)" -#: ../../library/datetime.rst:2416 ../../library/datetime.rst:2608 +#: ../../library/datetime.rst:2416 ../../library/datetime.rst:2596 msgid "``%Z``" msgstr "``%Z``" @@ -3027,7 +3027,7 @@ msgstr "01, 02, ..., 53" msgid "\\(8), \\(9)" msgstr "\\(8), \\(9)" -#: ../../library/datetime.rst:2473 ../../library/datetime.rst:2594 +#: ../../library/datetime.rst:2473 ../../library/datetime.rst:2592 msgid "``%:z``" msgstr "``%:z``" diff --git a/library/difflib.po b/library/difflib.po index 9b4da5dfec..9b82e5e79a 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-11-19 00:29+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -402,7 +402,7 @@ msgid "" "for parameter *charjunk* in :func:`ndiff`." msgstr "" -#: ../../library/difflib.rst:355 +#: ../../library/difflib.rst:354 msgid "" "`Pattern Matching: The Gestalt Approach `_" diff --git a/library/dis.po b/library/dis.po index 624c20d7c0..04f2edb166 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-03 20:44+0000\n" +"POT-Creation-Date: 2024-03-29 00:03+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1041,7 +1041,7 @@ msgstr "" #: ../../library/dis.rst:1118 msgid "" "The low bit of ``namei`` signals to attempt a method load, as with :opcode:" -"`LOAD_ATTR`, which results in pushing ``None`` and the loaded method. When " +"`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " "it is unset a single value is pushed to the stack." msgstr "" diff --git a/library/email.po b/library/email.po index 584ae34cfc..54a3a68e70 100644 --- a/library/email.po +++ b/library/email.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -156,7 +156,7 @@ msgstr "" msgid "Legacy API:" msgstr "" -#: ../../library/email.rst:136 +#: ../../library/email.rst:135 msgid "Module :mod:`smtplib`" msgstr ":mod:`smtplib` 模組" @@ -164,7 +164,7 @@ msgstr ":mod:`smtplib` 模組" msgid "SMTP (Simple Mail Transport Protocol) client" msgstr "" -#: ../../library/email.rst:139 +#: ../../library/email.rst:138 msgid "Module :mod:`poplib`" msgstr ":mod:`poplib` 模組" @@ -172,7 +172,7 @@ msgstr ":mod:`poplib` 模組" msgid "POP (Post Office Protocol) client" msgstr "" -#: ../../library/email.rst:142 +#: ../../library/email.rst:141 msgid "Module :mod:`imaplib`" msgstr ":mod:`imaplib` 模組" @@ -180,7 +180,7 @@ msgstr ":mod:`imaplib` 模組" msgid "IMAP (Internet Message Access Protocol) client" msgstr "" -#: ../../library/email.rst:145 +#: ../../library/email.rst:144 msgid "Module :mod:`nntplib`" msgstr ":mod:`nntplib` 模組" @@ -188,7 +188,7 @@ msgstr ":mod:`nntplib` 模組" msgid "NNTP (Net News Transport Protocol) client" msgstr "" -#: ../../library/email.rst:148 +#: ../../library/email.rst:147 msgid "Module :mod:`mailbox`" msgstr ":mod:`mailbox` 模組" diff --git a/library/ensurepip.po b/library/ensurepip.po index 2574dff11b..f3ad45add1 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 17:13+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -59,7 +59,7 @@ msgstr "" "此模組\\ *不會*\\ 通過網路存取。所有需要用來初始建置 ``pip`` 的元件都已包含在" "套件之內。" -#: ../../library/ensurepip.rst:36 +#: ../../library/ensurepip.rst:35 msgid ":ref:`installing-index`" msgstr ":ref:`installing-index`" diff --git a/library/faulthandler.po b/library/faulthandler.po index d9e44f6b49..a2df910551 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -7,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -92,9 +91,9 @@ msgid "" "enable` at Python startup." msgstr "" -#: ../../library/faulthandler.rst:49 +#: ../../library/faulthandler.rst:48 msgid "Module :mod:`pdb`" -msgstr "" +msgstr ":mod:`pdb` 模組" #: ../../library/faulthandler.rst:49 msgid "Interactive source code debugger for Python programs." @@ -102,7 +101,7 @@ msgstr "" #: ../../library/faulthandler.rst:51 msgid "Module :mod:`traceback`" -msgstr "" +msgstr ":mod:`traceback` 模組" #: ../../library/faulthandler.rst:52 msgid "" diff --git a/library/fcntl.po b/library/fcntl.po index 866fd4cf51..14e5d74f03 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-27 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -296,7 +296,7 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: ../../library/fcntl.rst:217 +#: ../../library/fcntl.rst:214 msgid "Module :mod:`os`" msgstr ":mod:`os` 模組" diff --git a/library/filesys.po b/library/filesys.po index d29c99d064..e682fe6090 100644 --- a/library/filesys.po +++ b/library/filesys.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2021-11-22 20:13+0800\n" "Last-Translator: Allen Wu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -36,7 +36,7 @@ msgstr "" "取檔案的屬性、以可攜 (portable) 方式操作路徑以及建立暫存檔。本章中的完整 " "module 清單是:" -#: ../../library/filesys.rst:31 +#: ../../library/filesys.rst:29 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" @@ -48,7 +48,7 @@ msgstr "" "作業系統介面,包括處理比 Python :term:`檔案物件 `\\ 更低階檔案的" "函式。" -#: ../../library/filesys.rst:35 +#: ../../library/filesys.rst:33 msgid "Module :mod:`io`" msgstr "Module :mod:`io`" diff --git a/library/ftplib.po b/library/ftplib.po index d80ef8619d..16769d2032 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-18 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-04-26 19:44+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -667,7 +667,7 @@ msgstr "" "所有例外集合(元組形式)。該集合包括上面列出的四個例外以及 :exc:`OSError` " "和 :exc:`EOFError`。" -#: ../../library/ftplib.rst:597 +#: ../../library/ftplib.rst:595 msgid "Module :mod:`netrc`" msgstr ":mod:`netrc` 模組" diff --git a/library/glob.po b/library/glob.po index aa2694f2d0..7db6c4ec79 100644 --- a/library/glob.po +++ b/library/glob.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2023, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-12 00:03+0000\n" "PO-Revision-Date: 2023-01-24 01:21+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -117,7 +117,7 @@ msgid "" "directories." msgstr "如果 *include_hidden* 為真,\"``**``\" 模式將匹配被隱藏的目錄。" -#: ../../library/glob.rst:73 ../../library/glob.rst:96 +#: ../../library/glob.rst:73 ../../library/glob.rst:100 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." @@ -125,7 +125,7 @@ msgstr "" "引發一個附帶引數 ``pathname``、``recursive`` 的\\ :ref:`稽核事件 ` " "``glob.glob``。" -#: ../../library/glob.rst:74 ../../library/glob.rst:97 +#: ../../library/glob.rst:74 ../../library/glob.rst:101 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." @@ -139,19 +139,25 @@ msgid "" "inordinate amount of time." msgstr "在大型目錄樹中使用 \"``**``\" 模式可能會消耗過多的時間。" -#: ../../library/glob.rst:80 ../../library/glob.rst:99 +#: ../../library/glob.rst:81 ../../library/glob.rst:104 +msgid "" +"This function may return duplicate path names if *pathname* contains " +"multiple \"``**``\" patterns and *recursive* is true." +msgstr "" + +#: ../../library/glob.rst:84 ../../library/glob.rst:107 msgid "Support for recursive globs using \"``**``\"." msgstr "支援以 \"``**``\" 使用遞迴 glob。" -#: ../../library/glob.rst:83 ../../library/glob.rst:102 +#: ../../library/glob.rst:87 ../../library/glob.rst:110 msgid "Added the *root_dir* and *dir_fd* parameters." msgstr "新增 *root_dir* 與 *dir_fd* 參數。" -#: ../../library/glob.rst:86 ../../library/glob.rst:105 +#: ../../library/glob.rst:90 ../../library/glob.rst:113 msgid "Added the *include_hidden* parameter." msgstr "新增 *include_hidden* 參數。" -#: ../../library/glob.rst:93 +#: ../../library/glob.rst:97 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." @@ -159,7 +165,7 @@ msgstr "" "回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時存儲全" "部的值。" -#: ../../library/glob.rst:111 +#: ../../library/glob.rst:119 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " @@ -172,7 +178,7 @@ msgstr "" "(sharepoints) 中的特殊字元不會被跳脫,例如在 Windows 上,``escape('//?/c:/" "Quo vadis?.txt')`` 會回傳 ``'//?/c:/Quo vadis[?].txt'``。" -#: ../../library/glob.rst:120 +#: ../../library/glob.rst:128 msgid "" "For example, consider a directory containing the following files: :file:`1." "gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which " @@ -182,26 +188,22 @@ msgid "" msgstr "" "例如,在一個包含以下檔案的目錄::file:`1.gif`、:file:`2.txt`、:file:`card." "gif`,和一個僅包含 :file:`3.txt` 檔案的子目錄 :file:`sub`,:func:`glob` 將產" -"生以下結果。請注意路徑的任何前導部分是如何保留的。\n" -"\n" -" ::" +"生以下結果。請注意路徑的任何前導部分是如何保留的。 ::" -#: ../../library/glob.rst:138 +#: ../../library/glob.rst:146 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " "default. For example, consider a directory containing :file:`card.gif` and :" "file:`.card.gif`::" msgstr "" "如果目錄包含以 ``.`` 開頭的檔案,則預設情況下不會去匹配到它們。例如,一個包" -"含 :file:`card.gif` 和 :file:`.card.gif` 的目錄:\n" -"\n" -"::" +"含 :file:`card.gif` 和 :file:`.card.gif` 的目錄: ::" -#: ../../library/glob.rst:150 +#: ../../library/glob.rst:158 msgid "Module :mod:`fnmatch`" msgstr ":mod:`fnmatch` 模組" -#: ../../library/glob.rst:151 +#: ../../library/glob.rst:159 msgid "Shell-style filename (not path) expansion" msgstr "Shell 風格檔案名(不是路徑)的擴展" diff --git a/library/grp.po b/library/grp.po index 7561672a82..e56ed4995f 100644 --- a/library/grp.po +++ b/library/grp.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -135,7 +135,7 @@ msgstr "" msgid "Return a list of all available group entries, in arbitrary order." msgstr "" -#: ../../library/grp.rst:65 +#: ../../library/grp.rst:64 msgid "Module :mod:`pwd`" msgstr ":mod:`pwd` 模組" diff --git a/library/gzip.po b/library/gzip.po index bd423bb202..a627e07aac 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -323,7 +323,7 @@ msgstr "如何壓縮一個已存在的檔案的範例: ::" msgid "Example of how to GZIP compress a binary string::" msgstr "如何壓縮一個二進位字串的範例: ::" -#: ../../library/gzip.rst:247 +#: ../../library/gzip.rst:246 msgid "Module :mod:`zlib`" msgstr ":mod:`zlib` 模組" diff --git a/library/hashlib.po b/library/hashlib.po index 50a5746b96..e570781a5a 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -568,7 +568,7 @@ msgid "" "(``False`` for sequential mode)." msgstr "" -#: ../../library/hashlib.rst:-1 +#: ../../library/hashlib.rst:464 msgid "Explanation of tree mode parameters." msgstr "" @@ -839,7 +839,7 @@ msgstr "" msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: ../../library/hashlib.rst:820 +#: ../../library/hashlib.rst:819 msgid "Module :mod:`hmac`" msgstr ":mod:`hmac` 模組" @@ -847,7 +847,7 @@ msgstr ":mod:`hmac` 模組" msgid "A module to generate message authentication codes using hashes." msgstr "" -#: ../../library/hashlib.rst:823 +#: ../../library/hashlib.rst:822 msgid "Module :mod:`base64`" msgstr ":mod:`base64` 模組" @@ -855,7 +855,7 @@ msgstr ":mod:`base64` 模組" msgid "Another way to encode binary hashes for non-binary environments." msgstr "" -#: ../../library/hashlib.rst:826 +#: ../../library/hashlib.rst:825 msgid "https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf" msgstr "" @@ -863,7 +863,7 @@ msgstr "" msgid "The FIPS 180-4 publication on Secure Hash Algorithms." msgstr "" -#: ../../library/hashlib.rst:829 +#: ../../library/hashlib.rst:828 msgid "https://csrc.nist.gov/publications/detail/fips/202/final" msgstr "" @@ -871,7 +871,7 @@ msgstr "" msgid "The FIPS 202 publication on the SHA-3 Standard." msgstr "" -#: ../../library/hashlib.rst:832 +#: ../../library/hashlib.rst:831 msgid "https://www.blake2.net/" msgstr "https://www.blake2.net/" @@ -879,7 +879,7 @@ msgstr "https://www.blake2.net/" msgid "Official BLAKE2 website." msgstr "BLAKE2 官方網站。" -#: ../../library/hashlib.rst:836 +#: ../../library/hashlib.rst:834 msgid "https://en.wikipedia.org/wiki/Cryptographic_hash_function" msgstr "https://en.wikipedia.org/wiki/Cryptographic_hash_function" @@ -889,7 +889,7 @@ msgid "" "what that means regarding their use." msgstr "" -#: ../../library/hashlib.rst:839 +#: ../../library/hashlib.rst:838 msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc8018.txt" diff --git a/library/heapq.po b/library/heapq.po index b8f97c5a2d..a6253c7d2b 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -9,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-11 00:04+0000\n" +"POT-Creation-Date: 2024-04-13 08:25+0000\n" "PO-Revision-Date: 2023-07-01 18:20+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -40,18 +39,25 @@ msgstr "" #: ../../library/heapq.rst:19 msgid "" "Heaps are binary trees for which every parent node has a value less than or " -"equal to any of its children. This implementation uses arrays for which " -"``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, " -"counting elements from zero. For the sake of comparison, non-existing " -"elements are considered to be infinite. The interesting property of a heap " -"is that its smallest element is always the root, ``heap[0]``." +"equal to any of its children. We refer to this condition as the heap " +"invariant." +msgstr "" +"Heap(堆積)是一顆二元樹,樹上所有父節點的值都小於等於他的子節點的值,我們將" +"這種情況稱為堆積的性質不變。" + +#: ../../library/heapq.rst:22 +msgid "" +"This implementation uses arrays for which ``heap[k] <= heap[2*k+1]`` and " +"``heap[k] <= heap[2*k+2]`` for all *k*, counting elements from zero. For " +"the sake of comparison, non-existing elements are considered to be " +"infinite. The interesting property of a heap is that its smallest element " +"is always the root, ``heap[0]``." msgstr "" -"Heap(堆積)是一顆二元樹,樹上所有父節點的值都小於等於他的子節點的值。使用陣" -"列實作,對於所有從0開始的 *k* 都滿足 ``heap[k] <= heap[2*k+1]`` 和 ``heap[k] " -"<= heap[2*k+2]`` 。為了比較節點的值,不存在的元素被視為無限大。heap 存在一個" -"有趣的性質:樹上最小的元素永遠會在根節點 ``heap[0]`` 上。" +"使用陣列實作,對於所有從0開始的 *k* 都滿足 ``heap[k] <= heap[2*k+1]`` 和 " +"``heap[k] <= heap[2*k+2]`` 。為了比較節點的值,不存在的元素被視為無限大。" +"heap 存在一個有趣的性質:樹上最小的元素永遠會在根節點 ``heap[0]`` 上。" -#: ../../library/heapq.rst:26 +#: ../../library/heapq.rst:28 msgid "" "The API below differs from textbook heap algorithms in two aspects: (a) We " "use zero-based indexing. This makes the relationship between the index for " @@ -67,7 +73,7 @@ msgstr "" "( 在教科書中被稱作 \"min heap\",而 \"max heap\" 因為他很適合做原地排序,所" "以更常出現在教科書中 )。" -#: ../../library/heapq.rst:33 +#: ../../library/heapq.rst:35 msgid "" "These two make it possible to view the heap as a regular Python list without " "surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains " @@ -76,7 +82,7 @@ msgstr "" "這兩個特性使得把 heap 當作一個標準的 Python list 檢視時不會出現意外:" "``heap[0]`` 是最小的物件,``heap.sort()`` 能保持 heap 的性質不變!" -#: ../../library/heapq.rst:37 +#: ../../library/heapq.rst:39 msgid "" "To create a heap, use a list initialized to ``[]``, or you can transform a " "populated list into a heap via function :func:`heapify`." @@ -84,15 +90,15 @@ msgstr "" "建立一個 heap 可以使用 list 初始化為 ``[]``,或者使用函式 :func:`heapify` 將" "一個已經有元素的 list轉成一個 heap。" -#: ../../library/heapq.rst:40 +#: ../../library/heapq.rst:42 msgid "The following functions are provided:" msgstr "此模組提供下面的函式" -#: ../../library/heapq.rst:45 +#: ../../library/heapq.rst:47 msgid "Push the value *item* onto the *heap*, maintaining the heap invariant." msgstr "把 *item* 放進 *heap*,並保持 heap 性質不變。" -#: ../../library/heapq.rst:50 +#: ../../library/heapq.rst:52 msgid "" "Pop and return the smallest item from the *heap*, maintaining the heap " "invariant. If the heap is empty, :exc:`IndexError` is raised. To access " @@ -101,7 +107,7 @@ msgstr "" "從 *heap* 取出並回傳最小的元素,同時保持 heap 性質不變。如果 heap 是空的會產" "生 :exc:`IndexError` 錯誤。只存取最小元素但不取出可以使用 ``heap[0]`` 。" -#: ../../library/heapq.rst:57 +#: ../../library/heapq.rst:59 msgid "" "Push *item* on the heap, then pop and return the smallest item from the " "*heap*. The combined action runs more efficiently than :func:`heappush` " @@ -110,11 +116,11 @@ msgstr "" "將 *item* 放入 heap ,接著從 *heap* 取出並回傳最小的元素。這個組合函式比呼" "叫 :func:`heappush` 之後呼叫 :func:`heappop` 更有效率。" -#: ../../library/heapq.rst:64 +#: ../../library/heapq.rst:66 msgid "Transform list *x* into a heap, in-place, in linear time." msgstr "在線性時間內將 list *x* 轉為 heap,且過程不會申請額外記憶體。" -#: ../../library/heapq.rst:69 +#: ../../library/heapq.rst:71 msgid "" "Pop and return the smallest item from the *heap*, and also push the new " "*item*. The heap size doesn't change. If the heap is empty, :exc:" @@ -123,7 +129,7 @@ msgstr "" "從 *heap* 取出並回傳最小的元素,接著將新的 *item* 放進heap。heap 的大小不會改" "變。如果 heap 是空的會產生 :exc:`IndexError` 錯誤。" -#: ../../library/heapq.rst:72 +#: ../../library/heapq.rst:74 msgid "" "This one step operation is more efficient than a :func:`heappop` followed " "by :func:`heappush` and can be more appropriate when using a fixed-size " @@ -134,7 +140,7 @@ msgstr "" "率,並在維護 heap 的大小不變時更為適當,取出/放入的組合函式一定會從 heap 回傳" "一個元素並用 *item* 取代他。" -#: ../../library/heapq.rst:77 +#: ../../library/heapq.rst:79 msgid "" "The value returned may be larger than the *item* added. If that isn't " "desired, consider using :func:`heappushpop` instead. Its push/pop " @@ -145,11 +151,11 @@ msgstr "" "用 :func:`heappushpop` 替代,他會回傳 heap 的最小值和 *item* 兩個當中比較小的" "那個,並將大的留在 heap 內。" -#: ../../library/heapq.rst:83 +#: ../../library/heapq.rst:85 msgid "The module also offers three general purpose functions based on heaps." msgstr "這個模組也提供三個利用 heap 實作的一般用途函式" -#: ../../library/heapq.rst:88 +#: ../../library/heapq.rst:90 msgid "" "Merge multiple sorted inputs into a single sorted output (for example, merge " "timestamped entries from multiple log files). Returns an :term:`iterator` " @@ -158,7 +164,7 @@ msgstr "" "合併多個已排序的輸入並產生單一且已排序的輸出(舉例:合併來自多個 log 檔中有時" "間戳記的項目)。回傳一個 :term:`iterator` 包含已經排序的值。" -#: ../../library/heapq.rst:92 +#: ../../library/heapq.rst:94 msgid "" "Similar to ``sorted(itertools.chain(*iterables))`` but returns an iterable, " "does not pull the data into memory all at once, and assumes that each of the " @@ -167,12 +173,12 @@ msgstr "" "和 ``sorted(itertools.chain(*iterables))`` 類似但回傳值是一個 iterable ,不會" "一次把所有資料都放進記憶體中,並且假設每一個輸入都已經(由小到大)排序過了。" -#: ../../library/heapq.rst:96 +#: ../../library/heapq.rst:98 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選用參數,指定時必須被當作關鍵字參數指定。" -#: ../../library/heapq.rst:98 +#: ../../library/heapq.rst:100 msgid "" "*key* specifies a :term:`key function` of one argument that is used to " "extract a comparison key from each input element. The default value is " @@ -181,7 +187,7 @@ msgstr "" "*key* 參數指定了一個 :term:`key function` 引數,用來從每一個輸入的元素中決定" "一個比較的依據。預設的值是 ``None`` (直接比較元素)。" -#: ../../library/heapq.rst:102 +#: ../../library/heapq.rst:104 msgid "" "*reverse* is a boolean value. If set to ``True``, then the input elements " "are merged as if each comparison were reversed. To achieve behavior similar " @@ -192,11 +198,11 @@ msgstr "" "進行合併。為了達成類似 ``sorted(itertools.chain(*iterables), reverse=True)`` " "的行為,所有 iterables 必須由大到小排序。" -#: ../../library/heapq.rst:107 +#: ../../library/heapq.rst:109 msgid "Added the optional *key* and *reverse* parameters." msgstr "加入選用參數 *key* 和 *reverse* 。" -#: ../../library/heapq.rst:113 +#: ../../library/heapq.rst:115 msgid "" "Return a list with the *n* largest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -209,7 +215,7 @@ msgstr "" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key, " "reverse=True)[:n]`` 。" -#: ../../library/heapq.rst:122 +#: ../../library/heapq.rst:124 msgid "" "Return a list with the *n* smallest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -222,7 +228,7 @@ msgstr "" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key)[:" "n]`` 。" -#: ../../library/heapq.rst:128 +#: ../../library/heapq.rst:130 msgid "" "The latter two functions perform best for smaller values of *n*. For larger " "values, it is more efficient to use the :func:`sorted` function. Also, when " @@ -235,20 +241,20 @@ msgstr "" "和 :func:`max` 會有更好的效率。如果需要重複使用這些函式,可以考慮將 iterable " "轉成真正的 heap 。" -#: ../../library/heapq.rst:136 +#: ../../library/heapq.rst:138 msgid "Basic Examples" msgstr "基礎範例" -#: ../../library/heapq.rst:138 +#: ../../library/heapq.rst:140 msgid "" "A `heapsort `_ can be implemented by " "pushing all values onto a heap and then popping off the smallest values one " "at a time::" msgstr "" "`堆積排序 (heapsort) `_ 可以透過將所" -"有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:" +"有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作: ::" -#: ../../library/heapq.rst:151 +#: ../../library/heapq.rst:153 msgid "" "This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this " "implementation is not stable." @@ -256,19 +262,19 @@ msgstr "" "雖然類似 ``sorted(iterable)`` ,但跟 :func:`sorted` 不同的是,這個實作不是 " "stable 的排序。" -#: ../../library/heapq.rst:154 +#: ../../library/heapq.rst:156 msgid "" "Heap elements can be tuples. This is useful for assigning comparison values " "(such as task priorities) alongside the main record being tracked::" msgstr "" "Heap 中的元素可以是 tuple 。這有利於將要比較的值(例如一個 task 的優先度)和" -"主要資料放在一起排序。" +"主要資料放在一起排序: ::" -#: ../../library/heapq.rst:167 +#: ../../library/heapq.rst:169 msgid "Priority Queue Implementation Notes" msgstr "優先佇列實作細節" -#: ../../library/heapq.rst:169 +#: ../../library/heapq.rst:171 msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" @@ -276,7 +282,7 @@ msgstr "" "`優先佇列 (priority queue) `_ " "是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:" -#: ../../library/heapq.rst:172 +#: ../../library/heapq.rst:174 msgid "" "Sort stability: how do you get two tasks with equal priorities to be " "returned in the order they were originally added?" @@ -284,7 +290,7 @@ msgstr "" "排序的穩定性:如何將兩個擁有相同優先次序 (priority) 的 task 按照他們被加入的" "順序回傳?" -#: ../../library/heapq.rst:175 +#: ../../library/heapq.rst:177 msgid "" "Tuple comparison breaks for (priority, task) pairs if the priorities are " "equal and the tasks do not have a default comparison order." @@ -292,21 +298,21 @@ msgstr "" "Tuple的排序在某些情況下會壞掉,例如當 Tuple (priority, task) 的 priorities 相" "等且 tasks 沒有一個預設的排序時。" -#: ../../library/heapq.rst:178 +#: ../../library/heapq.rst:180 msgid "" "If the priority of a task changes, how do you move it to a new position in " "the heap?" msgstr "" "當一個 heap 中 task 的 priority 改變時,如何將它移到 heap 正確的位置上?" -#: ../../library/heapq.rst:181 +#: ../../library/heapq.rst:183 msgid "" "Or if a pending task needs to be deleted, how do you find it and remove it " "from the queue?" msgstr "" "或者一個還沒被解決的 task 需要被刪除時,要如何從佇列中找到並刪除指定的 task?" -#: ../../library/heapq.rst:184 +#: ../../library/heapq.rst:186 msgid "" "A solution to the first two challenges is to store entries as 3-element list " "including the priority, an entry count, and the task. The entry count " @@ -319,16 +325,16 @@ msgstr "" "據加入的順序排序。因為沒有任何兩個 task 擁有相同的 entry count ,所以永遠不會" "直接使用 task 做比較。" -#: ../../library/heapq.rst:190 +#: ../../library/heapq.rst:192 msgid "" "Another solution to the problem of non-comparable tasks is to create a " "wrapper class that ignores the task item and only compares the priority " "field::" msgstr "" "task 無法比較的另一個解決方案是建立一個包裝器類別,該類別忽略 task 項目,只比" -"較優先等級:" +"較優先等級: ::" -#: ../../library/heapq.rst:201 +#: ../../library/heapq.rst:203 msgid "" "The remaining challenges revolve around finding a pending task and making " "changes to its priority or removing it entirely. Finding a task can be done " @@ -337,7 +343,7 @@ msgstr "" "剩下的問題可以藉由找到要刪除的 task 並更改它的 priority 或者直接將它移除。尋" "找一個 task 可以使用一個 dictionary 指向佇列當中的 entry 。" -#: ../../library/heapq.rst:205 +#: ../../library/heapq.rst:207 msgid "" "Removing the entry or changing its priority is more difficult because it " "would break the heap structure invariants. So, a possible solution is to " @@ -345,13 +351,13 @@ msgid "" msgstr "" "移除 entry 或更改它的 priority 更為困難,因為這會破壞 heap 的性質。所以一個可" "行的方案是將原本的 entry 做一個標記表示它已經被刪除,並新增一個擁有新的 " -"priority 的 entry 。" +"priority 的 entry: ::" -#: ../../library/heapq.rst:239 +#: ../../library/heapq.rst:241 msgid "Theory" msgstr "原理" -#: ../../library/heapq.rst:241 +#: ../../library/heapq.rst:243 msgid "" "Heaps are arrays for which ``a[k] <= a[2*k+1]`` and ``a[k] <= a[2*k+2]`` for " "all *k*, counting elements from 0. For the sake of comparison, non-existing " @@ -362,15 +368,15 @@ msgstr "" "和 ``a[k] <= a[2*k+2]`` 。為了方便比較,不存在的元素被視為無限大。Heap 的一個" "有趣的性質是:``a[0]`` 永遠是最小的元素。" -#: ../../library/heapq.rst:246 +#: ../../library/heapq.rst:248 msgid "" "The strange invariant above is meant to be an efficient memory " "representation for a tournament. The numbers below are *k*, not ``a[k]``::" msgstr "" "上述乍看之下有些奇怪的不變式,是為了實作一個對記憶體來說有效率的方法,其表示" -"方式如同錦標賽一般。下列的數字為 *k*,而不是 ``a[k]``:" +"方式如同錦標賽一般。下列的數字為 *k*,而不是 ``a[k]``: ::" -#: ../../library/heapq.rst:259 +#: ../../library/heapq.rst:261 msgid "" "In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a " "usual binary tournament we see in sports, each cell is the winner over the " @@ -389,7 +395,7 @@ msgstr "" "下方較低層級的另一個項目來取代它,至此規則變為一個單元以及它下方兩個單元,包" "含三個不同項目,但是最上方的單元「勝過」下方兩個單元。" -#: ../../library/heapq.rst:268 +#: ../../library/heapq.rst:270 msgid "" "If this heap invariant is protected at all time, index 0 is clearly the " "overall winner. The simplest algorithmic way to remove it and find the " @@ -405,7 +411,7 @@ msgstr "" "的複雜度顯然是樹的節點數目的對數級別。透過對所有項目疊代,可以得到一個複雜度" "為 *O*\\ (*n* log *n*) 的排序。" -#: ../../library/heapq.rst:275 +#: ../../library/heapq.rst:277 msgid "" "A nice feature of this sort is that you can efficiently insert new items " "while the sort is going on, provided that the inserted items are not " @@ -422,7 +428,7 @@ msgstr "" "時,因這些事件仍在等待進行,所以很容易將它們插入 heap 當中。因此, heap 是一" "個實現排程器的優秀資料結構(這就是我用以實作 MIDI 編曲器的方法 :-)。" -#: ../../library/heapq.rst:284 +#: ../../library/heapq.rst:286 msgid "" "Various structures for implementing schedulers have been extensively " "studied, and heaps are good for this, as they are reasonably speedy, the " @@ -434,7 +440,7 @@ msgstr "" "快,且速度幾乎不受其他因素影響,最壞情況與平均狀況差異無幾。也有其它整體說來" "更有效率的方法,然而它們的最壞情況可能會非常糟糕。" -#: ../../library/heapq.rst:290 +#: ../../library/heapq.rst:292 msgid "" "Heaps are also very useful in big disk sorts. You most probably all know " "that a big sort implies producing \"runs\" (which are pre-sorted sequences, " @@ -455,7 +461,7 @@ msgstr "" "於隨機產生的輸入,將可以產生長度兩倍於記憶體大小的 run。對於已模糊排序過的輸" "入,效果更好。" -#: ../../library/heapq.rst:300 +#: ../../library/heapq.rst:302 msgid "" "Moreover, if you output the 0'th item on disk and get an input which may not " "fit in the current tournament (because the value \"wins\" over the last " @@ -471,7 +477,7 @@ msgstr "" "大小增加的速度會與第一個 heap 減少的速度一致。當第一個 heap 完全消失時,你可" "以切換至第二個 heap 開啟一個新 run 。這真是個聰明且相當有效率的做法!" -#: ../../library/heapq.rst:308 +#: ../../library/heapq.rst:310 msgid "" "In a word, heaps are useful memory structures to know. I use them in a few " "applications, and I think it is good to keep a 'heap' module around. :-)" @@ -479,11 +485,11 @@ msgstr "" "總結來說,heap 是值得了解的有用記憶體結構。我在一些應用中使用它們,我認為能有" "一個 'heap' 模組是很棒的。:-)" -#: ../../library/heapq.rst:312 +#: ../../library/heapq.rst:314 msgid "Footnotes" msgstr "註解" -#: ../../library/heapq.rst:313 +#: ../../library/heapq.rst:315 msgid "" "The disk balancing algorithms which are current, nowadays, are more annoying " "than clever, and this is a consequence of the seeking capabilities of the " diff --git a/library/http.cookiejar.po b/library/http.cookiejar.po index 10f1545847..93bfc68985 100644 --- a/library/http.cookiejar.po +++ b/library/http.cookiejar.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -7,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-11-19 00:31+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -75,7 +74,7 @@ msgstr "" #: ../../library/http.cookiejar.rst:51 msgid "The following classes are provided:" -msgstr "" +msgstr "提供了以下類別:" #: ../../library/http.cookiejar.rst:56 msgid "*policy* is an object implementing the :class:`CookiePolicy` interface." @@ -152,7 +151,7 @@ msgid "" "class:`CookieJar` instance." msgstr "" -#: ../../library/http.cookiejar.rst:120 +#: ../../library/http.cookiejar.rst:119 msgid "Module :mod:`urllib.request`" msgstr ":mod:`urllib.request` 模組" @@ -160,7 +159,7 @@ msgstr ":mod:`urllib.request` 模組" msgid "URL opening with automatic cookie handling." msgstr "" -#: ../../library/http.cookiejar.rst:125 +#: ../../library/http.cookiejar.rst:122 msgid "Module :mod:`http.cookies`" msgstr ":mod:`http.cookies` 模組" @@ -170,7 +169,7 @@ msgid "" "`http.cookiejar` and :mod:`http.cookies` modules do not depend on each other." msgstr "" -#: ../../library/http.cookiejar.rst:131 +#: ../../library/http.cookiejar.rst:127 msgid "https://curl.se/rfc/cookie_spec.html" msgstr "https://curl.se/rfc/cookie_spec.html" @@ -182,7 +181,7 @@ msgid "" "resemblance to the one sketched out in ``cookie_spec.html``." msgstr "" -#: ../../library/http.cookiejar.rst:134 +#: ../../library/http.cookiejar.rst:133 msgid ":rfc:`2109` - HTTP State Management Mechanism" msgstr "" @@ -190,7 +189,7 @@ msgstr "" msgid "Obsoleted by :rfc:`2965`. Uses :mailheader:`Set-Cookie` with version=1." msgstr "" -#: ../../library/http.cookiejar.rst:138 +#: ../../library/http.cookiejar.rst:136 msgid ":rfc:`2965` - HTTP State Management Mechanism" msgstr "" @@ -200,7 +199,7 @@ msgid "" "in place of :mailheader:`Set-Cookie`. Not widely used." msgstr "" -#: ../../library/http.cookiejar.rst:141 +#: ../../library/http.cookiejar.rst:140 msgid "http://kristol.org/cookie/errata.html" msgstr "http://kristol.org/cookie/errata.html" diff --git a/library/http.cookies.po b/library/http.cookies.po index f05a197fa9..49e586f6b4 100644 --- a/library/http.cookies.po +++ b/library/http.cookies.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-10 14:21+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-11-19 00:31+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -89,7 +89,7 @@ msgid "" "string. Values received from HTTP are kept as strings." msgstr "" -#: ../../library/http.cookies.rst:68 +#: ../../library/http.cookies.rst:66 msgid "Module :mod:`http.cookiejar`" msgstr ":mod:`http.cookiejar` 模組" diff --git a/library/idle.po b/library/idle.po index 4bdb7a2e09..4768840637 100644 --- a/library/idle.po +++ b/library/idle.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -96,7 +96,7 @@ msgstr "" msgid "File menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:57 +#: ../../library/idle.rst:56 msgid "New File" msgstr "新增檔案" @@ -104,7 +104,7 @@ msgstr "新增檔案" msgid "Create a new file editing window." msgstr "" -#: ../../library/idle.rst:60 +#: ../../library/idle.rst:59 msgid "Open..." msgstr "" @@ -112,7 +112,7 @@ msgstr "" msgid "Open an existing file with an Open dialog." msgstr "" -#: ../../library/idle.rst:63 +#: ../../library/idle.rst:62 msgid "Open Module..." msgstr "" @@ -120,7 +120,7 @@ msgstr "" msgid "Open an existing module (searches sys.path)." msgstr "" -#: ../../library/idle.rst:66 +#: ../../library/idle.rst:65 msgid "Recent Files" msgstr "" @@ -128,7 +128,7 @@ msgstr "" msgid "Open a list of recent files. Click one to open it." msgstr "" -#: ../../library/idle.rst:74 +#: ../../library/idle.rst:72 msgid "Module Browser" msgstr "" @@ -138,7 +138,7 @@ msgid "" "structure. In the shell, open a module first." msgstr "" -#: ../../library/idle.rst:78 +#: ../../library/idle.rst:76 msgid "Path Browser" msgstr "" @@ -148,7 +148,7 @@ msgid "" "structure." msgstr "" -#: ../../library/idle.rst:84 +#: ../../library/idle.rst:80 msgid "Save" msgstr "" @@ -160,7 +160,7 @@ msgid "" "instead." msgstr "" -#: ../../library/idle.rst:91 +#: ../../library/idle.rst:86 msgid "Save As..." msgstr "" @@ -173,7 +173,7 @@ msgid "" "text files, except that on macOS Aqua,'.py' is added for all files.)" msgstr "" -#: ../../library/idle.rst:95 +#: ../../library/idle.rst:93 msgid "Save Copy As..." msgstr "" @@ -183,7 +183,7 @@ msgid "" "file. (See Save As note above about filename extensions.)" msgstr "" -#: ../../library/idle.rst:98 +#: ../../library/idle.rst:97 msgid "Print Window" msgstr "" @@ -191,7 +191,7 @@ msgstr "" msgid "Print the current window to the default printer." msgstr "" -#: ../../library/idle.rst:103 +#: ../../library/idle.rst:100 msgid "Close Window" msgstr "" @@ -202,7 +202,7 @@ msgid "" "Shell window also closes Shell. If this is the only window, also exit IDLE." msgstr "" -#: ../../library/idle.rst:106 +#: ../../library/idle.rst:105 msgid "Exit IDLE" msgstr "離開 IDLE" @@ -214,7 +214,7 @@ msgstr "" msgid "Edit menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:113 +#: ../../library/idle.rst:111 msgid "Undo" msgstr "" @@ -224,7 +224,7 @@ msgid "" "be undone." msgstr "" -#: ../../library/idle.rst:116 +#: ../../library/idle.rst:115 msgid "Redo" msgstr "" @@ -232,7 +232,7 @@ msgstr "" msgid "Redo the last undone change to the current window." msgstr "" -#: ../../library/idle.rst:119 +#: ../../library/idle.rst:118 msgid "Select All" msgstr "Select All(選擇全部)" @@ -240,8 +240,8 @@ msgstr "Select All(選擇全部)" msgid "Select the entire contents of the current window." msgstr "" -#: ../../library/idle.rst:122 ../../library/idle.rst:353 -#: ../../library/idle.rst:368 +#: ../../library/idle.rst:121 ../../library/idle.rst:353 +#: ../../library/idle.rst:367 msgid "Cut" msgstr "Cut(剪下)" @@ -250,8 +250,8 @@ msgid "" "Copy selection into the system-wide clipboard; then delete the selection." msgstr "" -#: ../../library/idle.rst:125 ../../library/idle.rst:353 -#: ../../library/idle.rst:371 +#: ../../library/idle.rst:124 ../../library/idle.rst:353 +#: ../../library/idle.rst:370 msgid "Copy" msgstr "Copy(複製)" @@ -259,8 +259,8 @@ msgstr "Copy(複製)" msgid "Copy selection into the system-wide clipboard." msgstr "" -#: ../../library/idle.rst:128 ../../library/idle.rst:353 -#: ../../library/idle.rst:374 +#: ../../library/idle.rst:127 ../../library/idle.rst:353 +#: ../../library/idle.rst:373 msgid "Paste" msgstr "Paste(貼上)" @@ -272,7 +272,7 @@ msgstr "" msgid "The clipboard functions are also available in context menus." msgstr "" -#: ../../library/idle.rst:133 +#: ../../library/idle.rst:132 msgid "Find..." msgstr "" @@ -280,7 +280,7 @@ msgstr "" msgid "Open a search dialog with many options" msgstr "" -#: ../../library/idle.rst:136 +#: ../../library/idle.rst:135 msgid "Find Again" msgstr "" @@ -288,7 +288,7 @@ msgstr "" msgid "Repeat the last search, if there is one." msgstr "" -#: ../../library/idle.rst:139 +#: ../../library/idle.rst:138 msgid "Find Selection" msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Search for the currently selected string, if there is one." msgstr "" -#: ../../library/idle.rst:142 +#: ../../library/idle.rst:141 msgid "Find in Files..." msgstr "" @@ -304,7 +304,7 @@ msgstr "" msgid "Open a file search dialog. Put results in a new output window." msgstr "" -#: ../../library/idle.rst:145 +#: ../../library/idle.rst:144 msgid "Replace..." msgstr "" @@ -312,7 +312,7 @@ msgstr "" msgid "Open a search-and-replace dialog." msgstr "" -#: ../../library/idle.rst:150 +#: ../../library/idle.rst:147 msgid "Go to Line" msgstr "" @@ -323,7 +323,7 @@ msgid "" "selection and update the line and column status." msgstr "" -#: ../../library/idle.rst:154 +#: ../../library/idle.rst:152 msgid "Show Completions" msgstr "" @@ -333,7 +333,7 @@ msgid "" "`Completions ` in the Editing and navigation section below." msgstr "" -#: ../../library/idle.rst:158 +#: ../../library/idle.rst:156 msgid "Expand Word" msgstr "" @@ -343,7 +343,7 @@ msgid "" "repeat to get a different expansion." msgstr "" -#: ../../library/idle.rst:163 +#: ../../library/idle.rst:160 msgid "Show Call Tip" msgstr "" @@ -354,7 +354,7 @@ msgid "" "navigation section below." msgstr "" -#: ../../library/idle.rst:166 +#: ../../library/idle.rst:165 msgid "Show Surrounding Parens" msgstr "" @@ -366,7 +366,7 @@ msgstr "" msgid "Format menu (Editor window only)" msgstr "" -#: ../../library/idle.rst:176 +#: ../../library/idle.rst:173 msgid "Format Paragraph" msgstr "" @@ -377,7 +377,7 @@ msgid "" "will be formatted to less than N columns, where N defaults to 72." msgstr "" -#: ../../library/idle.rst:179 +#: ../../library/idle.rst:178 msgid "Indent Region" msgstr "" @@ -385,7 +385,7 @@ msgstr "" msgid "Shift selected lines right by the indent width (default 4 spaces)." msgstr "" -#: ../../library/idle.rst:182 +#: ../../library/idle.rst:181 msgid "Dedent Region" msgstr "" @@ -393,7 +393,7 @@ msgstr "" msgid "Shift selected lines left by the indent width (default 4 spaces)." msgstr "" -#: ../../library/idle.rst:185 +#: ../../library/idle.rst:184 msgid "Comment Out Region" msgstr "" @@ -401,7 +401,7 @@ msgstr "" msgid "Insert ## in front of selected lines." msgstr "" -#: ../../library/idle.rst:188 +#: ../../library/idle.rst:187 msgid "Uncomment Region" msgstr "" @@ -409,7 +409,7 @@ msgstr "" msgid "Remove leading # or ## from selected lines." msgstr "" -#: ../../library/idle.rst:192 +#: ../../library/idle.rst:190 msgid "Tabify Region" msgstr "" @@ -419,7 +419,7 @@ msgid "" "space blocks to indent Python code.)" msgstr "" -#: ../../library/idle.rst:195 +#: ../../library/idle.rst:194 msgid "Untabify Region" msgstr "" @@ -427,7 +427,7 @@ msgstr "" msgid "Turn *all* tabs into the correct number of spaces." msgstr "" -#: ../../library/idle.rst:198 +#: ../../library/idle.rst:197 msgid "Toggle Tabs" msgstr "" @@ -435,7 +435,7 @@ msgstr "" msgid "Open a dialog to switch between indenting with spaces and tabs." msgstr "" -#: ../../library/idle.rst:202 +#: ../../library/idle.rst:200 msgid "New Indent Width" msgstr "" @@ -445,7 +445,7 @@ msgid "" "community is 4 spaces." msgstr "" -#: ../../library/idle.rst:208 +#: ../../library/idle.rst:204 msgid "Strip Trailing Chitespace" msgstr "" @@ -461,7 +461,7 @@ msgstr "" msgid "Run menu (Editor window only)" msgstr "" -#: ../../library/idle.rst:225 +#: ../../library/idle.rst:218 msgid "Run Module" msgstr "" @@ -475,7 +475,7 @@ msgid "" "similar to executing a file with ``python -i file`` at a command line." msgstr "" -#: ../../library/idle.rst:232 +#: ../../library/idle.rst:229 msgid "Run... Customized" msgstr "" @@ -486,7 +486,7 @@ msgid "" "a command line. The module can be run in the Shell without restarting." msgstr "" -#: ../../library/idle.rst:241 +#: ../../library/idle.rst:236 msgid "Check Module" msgstr "" @@ -499,7 +499,7 @@ msgid "" "window." msgstr "" -#: ../../library/idle.rst:247 +#: ../../library/idle.rst:245 msgid "Python Shell" msgstr "" @@ -511,7 +511,7 @@ msgstr "" msgid "Shell menu (Shell window only)" msgstr "" -#: ../../library/idle.rst:253 +#: ../../library/idle.rst:252 msgid "View Last Restart" msgstr "" @@ -519,7 +519,7 @@ msgstr "" msgid "Scroll the shell window to the last Shell restart." msgstr "" -#: ../../library/idle.rst:256 +#: ../../library/idle.rst:255 msgid "Restart Shell" msgstr "" @@ -529,7 +529,7 @@ msgid "" "handling." msgstr "" -#: ../../library/idle.rst:259 +#: ../../library/idle.rst:258 msgid "Previous History" msgstr "" @@ -538,7 +538,7 @@ msgid "" "Cycle through earlier commands in history which match the current entry." msgstr "" -#: ../../library/idle.rst:262 +#: ../../library/idle.rst:261 msgid "Next History" msgstr "" @@ -546,7 +546,7 @@ msgstr "" msgid "Cycle through later commands in history which match the current entry." msgstr "" -#: ../../library/idle.rst:265 +#: ../../library/idle.rst:264 msgid "Interrupt Execution" msgstr "" @@ -558,7 +558,7 @@ msgstr "" msgid "Debug menu (Shell window only)" msgstr "" -#: ../../library/idle.rst:275 +#: ../../library/idle.rst:270 msgid "Go to File/Line" msgstr "" @@ -571,7 +571,7 @@ msgid "" "Shell window and Output windows." msgstr "" -#: ../../library/idle.rst:284 +#: ../../library/idle.rst:281 msgid "Debugger (toggle)" msgstr "" @@ -582,7 +582,7 @@ msgid "" "menu. This feature is still incomplete and somewhat experimental." msgstr "" -#: ../../library/idle.rst:288 +#: ../../library/idle.rst:286 msgid "Stack Viewer" msgstr "" @@ -592,7 +592,7 @@ msgid "" "to locals and globals." msgstr "" -#: ../../library/idle.rst:291 +#: ../../library/idle.rst:290 msgid "Auto-open Stack Viewer" msgstr "" @@ -605,7 +605,7 @@ msgstr "" msgid "Options menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:302 +#: ../../library/idle.rst:296 msgid "Configure IDLE" msgstr "" @@ -624,7 +624,7 @@ msgid "" "option items below only apply to the active window." msgstr "" -#: ../../library/idle.rst:311 +#: ../../library/idle.rst:307 msgid "Show/Hide Code Context (Editor Window only)" msgstr "" @@ -635,7 +635,7 @@ msgid "" "Context ` in the Editing and Navigation section below." msgstr "" -#: ../../library/idle.rst:316 +#: ../../library/idle.rst:313 msgid "Show/Hide Line Numbers (Editor Window only)" msgstr "" @@ -646,7 +646,7 @@ msgid "" "(see :ref:`Setting preferences `)." msgstr "" -#: ../../library/idle.rst:324 +#: ../../library/idle.rst:318 msgid "Zoom/Restore Height" msgstr "" @@ -674,7 +674,7 @@ msgstr "" msgid "Help menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:336 +#: ../../library/idle.rst:335 msgid "About IDLE" msgstr "" @@ -682,7 +682,7 @@ msgstr "" msgid "Display version, copyright, license, credits, and more." msgstr "" -#: ../../library/idle.rst:340 +#: ../../library/idle.rst:338 msgid "IDLE Help" msgstr "" @@ -692,7 +692,7 @@ msgid "" "navigation, and other tips." msgstr "" -#: ../../library/idle.rst:344 +#: ../../library/idle.rst:342 msgid "Python Docs" msgstr "" @@ -702,7 +702,7 @@ msgid "" "open docs.python.org showing the latest Python documentation." msgstr "" -#: ../../library/idle.rst:347 +#: ../../library/idle.rst:346 msgid "Turtle Demo" msgstr "" @@ -735,7 +735,7 @@ msgid "" "directory." msgstr "" -#: ../../library/idle.rst:353 ../../library/idle.rst:382 +#: ../../library/idle.rst:353 ../../library/idle.rst:381 msgid "Set Breakpoint" msgstr "" @@ -743,7 +743,7 @@ msgstr "" msgid "Set a breakpoint on the current line." msgstr "" -#: ../../library/idle.rst:353 ../../library/idle.rst:385 +#: ../../library/idle.rst:353 ../../library/idle.rst:384 msgid "Clear Breakpoint" msgstr "" @@ -755,7 +755,7 @@ msgstr "" msgid "Shell and Output windows also have the following." msgstr "" -#: ../../library/idle.rst:390 +#: ../../library/idle.rst:389 msgid "Go to file/line" msgstr "" @@ -769,7 +769,7 @@ msgid "" "*Python Shell window* subsection below." msgstr "" -#: ../../library/idle.rst:398 +#: ../../library/idle.rst:395 msgid "Squeeze" msgstr "" diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index 8ede71d6bb..8916f7c6fa 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -46,11 +46,11 @@ msgstr "" #: ../../library/importlib.metadata.rst:27 msgid "" "``importlib.metadata`` operates on third-party *distribution packages* " -"installed into Python's ``site-packages`` directory via tools such as `pip " -"`_. Specifically, it works with distributions " -"with discoverable ``dist-info`` or ``egg-info`` directories, and metadata " -"defined by the `Core metadata specifications `_." +"installed into Python's ``site-packages`` directory via tools such as :pypi:" +"`pip`. Specifically, it works with distributions with discoverable ``dist-" +"info`` or ``egg-info`` directories, and metadata defined by the `Core " +"metadata specifications `_." msgstr "" #: ../../library/importlib.metadata.rst:36 @@ -71,7 +71,7 @@ msgid "" "can live almost anywhere." msgstr "" -#: ../../library/importlib.metadata.rst:62 +#: ../../library/importlib.metadata.rst:55 msgid "https://importlib-metadata.readthedocs.io/" msgstr "" @@ -196,9 +196,8 @@ msgid "" "3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted no " "parameters and always returned a dictionary of entry points, keyed by group. " "With ``importlib_metadata`` 5.0 and Python 3.12, ``entry_points`` always " -"returns an ``EntryPoints`` object. See `backports.entry_points_selectable " -"`_ for " -"compatibility options." +"returns an ``EntryPoints`` object. See :pypi:`backports." +"entry_points_selectable` for compatibility options." msgstr "" #: ../../library/importlib.metadata.rst:188 diff --git a/library/importlib.po b/library/importlib.po index bc8ced9688..0777be88b4 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -70,7 +70,7 @@ msgid "" "\"resources\" from Python packages." msgstr "" -#: ../../library/importlib.rst:44 +#: ../../library/importlib.rst:43 msgid ":ref:`import`" msgstr ":ref:`import`" @@ -78,7 +78,7 @@ msgstr ":ref:`import`" msgid "The language reference for the :keyword:`import` statement." msgstr "" -#: ../../library/importlib.rst:49 +#: ../../library/importlib.rst:46 msgid "" "`Packages specification `__" msgstr "" @@ -90,7 +90,7 @@ msgid "" "modules`)." msgstr "" -#: ../../library/importlib.rst:52 +#: ../../library/importlib.rst:51 msgid "The :func:`.__import__` function" msgstr ":func:`.__import__` 函式" @@ -98,7 +98,7 @@ msgstr ":func:`.__import__` 函式" msgid "The :keyword:`import` statement is syntactic sugar for this function." msgstr "" -#: ../../library/importlib.rst:55 +#: ../../library/importlib.rst:54 msgid ":ref:`sys-path-init`" msgstr ":ref:`sys-path-init`" @@ -106,7 +106,7 @@ msgstr ":ref:`sys-path-init`" msgid "The initialization of :data:`sys.path`." msgstr "" -#: ../../library/importlib.rst:58 +#: ../../library/importlib.rst:57 msgid ":pep:`235`" msgstr ":pep:`235`" @@ -114,7 +114,7 @@ msgstr ":pep:`235`" msgid "Import on Case-Insensitive Platforms" msgstr "" -#: ../../library/importlib.rst:61 +#: ../../library/importlib.rst:60 msgid ":pep:`263`" msgstr ":pep:`263`" @@ -122,7 +122,7 @@ msgstr ":pep:`263`" msgid "Defining Python Source Code Encodings" msgstr "" -#: ../../library/importlib.rst:64 +#: ../../library/importlib.rst:63 msgid ":pep:`302`" msgstr ":pep:`302`" @@ -130,7 +130,7 @@ msgstr ":pep:`302`" msgid "New Import Hooks" msgstr "" -#: ../../library/importlib.rst:67 +#: ../../library/importlib.rst:66 msgid ":pep:`328`" msgstr ":pep:`328`" @@ -138,7 +138,7 @@ msgstr ":pep:`328`" msgid "Imports: Multi-Line and Absolute/Relative" msgstr "" -#: ../../library/importlib.rst:70 +#: ../../library/importlib.rst:69 msgid ":pep:`366`" msgstr ":pep:`366`" @@ -146,7 +146,7 @@ msgstr ":pep:`366`" msgid "Main module explicit relative imports" msgstr "" -#: ../../library/importlib.rst:73 +#: ../../library/importlib.rst:72 msgid ":pep:`420`" msgstr ":pep:`420`" @@ -154,7 +154,7 @@ msgstr ":pep:`420`" msgid "Implicit namespace packages" msgstr "" -#: ../../library/importlib.rst:76 +#: ../../library/importlib.rst:75 msgid ":pep:`451`" msgstr ":pep:`451`" @@ -162,7 +162,7 @@ msgstr ":pep:`451`" msgid "A ModuleSpec Type for the Import System" msgstr "" -#: ../../library/importlib.rst:79 +#: ../../library/importlib.rst:78 msgid ":pep:`488`" msgstr ":pep:`488`" @@ -170,7 +170,7 @@ msgstr ":pep:`488`" msgid "Elimination of PYO files" msgstr "" -#: ../../library/importlib.rst:82 +#: ../../library/importlib.rst:81 msgid ":pep:`489`" msgstr ":pep:`489`" @@ -178,7 +178,7 @@ msgstr ":pep:`489`" msgid "Multi-phase extension module initialization" msgstr "" -#: ../../library/importlib.rst:85 +#: ../../library/importlib.rst:84 msgid ":pep:`552`" msgstr ":pep:`552`" @@ -186,7 +186,7 @@ msgstr ":pep:`552`" msgid "Deterministic pycs" msgstr "" -#: ../../library/importlib.rst:88 +#: ../../library/importlib.rst:87 msgid ":pep:`3120`" msgstr ":pep:`3120`" @@ -492,7 +492,7 @@ msgid "" "these attributes can change when a module is reloaded):" msgstr "" -#: ../../library/importlib.rst:360 +#: ../../library/importlib.rst:358 msgid ":attr:`__name__`" msgstr ":attr:`__name__`" @@ -502,7 +502,7 @@ msgid "" "module." msgstr "" -#: ../../library/importlib.rst:365 +#: ../../library/importlib.rst:362 msgid ":attr:`__file__`" msgstr ":attr:`__file__`" @@ -513,7 +513,7 @@ msgid "" "modules (e.g. built-in modules)." msgstr "" -#: ../../library/importlib.rst:369 +#: ../../library/importlib.rst:367 msgid ":attr:`__cached__`" msgstr ":attr:`__cached__`" @@ -523,7 +523,7 @@ msgid "" "all modules (e.g. built-in modules)." msgstr "" -#: ../../library/importlib.rst:377 +#: ../../library/importlib.rst:371 msgid ":attr:`__path__`" msgstr ":attr:`__path__`" @@ -536,7 +536,7 @@ msgid "" "as an indicator that the module is a package." msgstr "" -#: ../../library/importlib.rst:382 +#: ../../library/importlib.rst:379 msgid ":attr:`__package__`" msgstr ":attr:`__package__`" @@ -547,7 +547,7 @@ msgid "" "same as :attr:`__name__`." msgstr "" -#: ../../library/importlib.rst:385 +#: ../../library/importlib.rst:384 msgid ":attr:`__loader__`" msgstr ":attr:`__loader__`" @@ -747,7 +747,7 @@ msgstr "" msgid ":meth:`ResourceLoader.get_data`" msgstr ":meth:`ResourceLoader.get_data`" -#: ../../library/importlib.rst:564 +#: ../../library/importlib.rst:562 msgid ":meth:`ExecutionLoader.get_filename`" msgstr ":meth:`ExecutionLoader.get_filename`" @@ -1457,7 +1457,7 @@ msgid "" "is the same as :attr:`name`." msgstr "" -#: ../../library/importlib.rst:1240 +#: ../../library/importlib.rst:1239 msgid "``True`` if the spec's :attr:`origin` refers to a loadable location," msgstr "" diff --git a/library/importlib.resources.abc.po b/library/importlib.resources.abc.po index 31ba47eca2..4f7ad6d536 100644 --- a/library/importlib.resources.abc.po +++ b/library/importlib.resources.abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-14 00:03+0000\n" +"POT-Creation-Date: 2024-04-06 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -145,31 +145,58 @@ msgid "Return True if self is a file." msgstr "" #: ../../library/importlib.resources.abc.rst:114 -#: ../../library/importlib.resources.abc.rst:118 -msgid "Return Traversable child in self." +msgid "" +"Traverse directories according to *pathsegments* and return the result as :" +"class:`!Traversable`." +msgstr "" + +#: ../../library/importlib.resources.abc.rst:117 +msgid "" +"Each *pathsegments* argument may contain multiple names separated by forward " +"slashes (``/``, ``posixpath.sep`` ). For example, the following are " +"equivalent::" +msgstr "" + +#: ../../library/importlib.resources.abc.rst:124 +msgid "" +"Note that some :class:`!Traversable` implementations might not be updated to " +"the latest version of the protocol. For compatibility with such " +"implementations, provide a single argument without path separators to each " +"call to ``joinpath``. For example::" msgstr "" -#: ../../library/importlib.resources.abc.rst:122 +#: ../../library/importlib.resources.abc.rst:133 +msgid "" +"``joinpath`` accepts multiple *pathsegments*, and these segments may contain " +"forward slashes as path separators. Previously, only a single *child* " +"argument was accepted." +msgstr "" + +#: ../../library/importlib.resources.abc.rst:139 +msgid "Return Traversable child in self. Equivalent to ``joinpath(child)``." +msgstr "" + +#: ../../library/importlib.resources.abc.rst:144 msgid "" "*mode* may be 'r' or 'rb' to open as text or binary. Return a handle " "suitable for reading (same as :attr:`pathlib.Path.open`)." msgstr "" -#: ../../library/importlib.resources.abc.rst:125 +#: ../../library/importlib.resources.abc.rst:147 msgid "" "When opening as text, accepts encoding parameters such as those accepted by :" "class:`io.TextIOWrapper`." msgstr "" -#: ../../library/importlib.resources.abc.rst:130 +#: ../../library/importlib.resources.abc.rst:152 msgid "Read contents of self as bytes." msgstr "" -#: ../../library/importlib.resources.abc.rst:134 +#: ../../library/importlib.resources.abc.rst:156 msgid "Read contents of self as text." msgstr "" -#: ../../library/importlib.resources.abc.rst:139 +#: ../../library/importlib.resources.abc.rst:161 msgid "" "An abstract base class for resource readers capable of serving the :meth:" "`importlib.resources.files` interface. Subclasses :class:`ResourceReader` " @@ -178,13 +205,13 @@ msgid "" "TraversableResources` also supplies :class:`!ResourceReader`." msgstr "" -#: ../../library/importlib.resources.abc.rst:146 +#: ../../library/importlib.resources.abc.rst:168 msgid "" "Loaders that wish to support resource reading are expected to implement this " "interface." msgstr "" -#: ../../library/importlib.resources.abc.rst:151 +#: ../../library/importlib.resources.abc.rst:173 msgid "" "Returns a :class:`importlib.resources.abc.Traversable` object for the loaded " "package." diff --git a/library/inspect.po b/library/inspect.po index fa6bc2a177..59212fc3d6 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-03-16 00:03+0000\n" "PO-Revision-Date: 2022-10-16 06:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -74,19 +74,19 @@ msgstr "描述" msgid "class" msgstr "" -#: ../../library/inspect.rst:48 ../../library/inspect.rst:58 -#: ../../library/inspect.rst:76 ../../library/inspect.rst:238 +#: ../../library/inspect.rst:48 ../../library/inspect.rst:63 +#: ../../library/inspect.rst:81 ../../library/inspect.rst:248 msgid "__doc__" msgstr "__doc__" -#: ../../library/inspect.rst:48 ../../library/inspect.rst:58 -#: ../../library/inspect.rst:76 ../../library/inspect.rst:238 +#: ../../library/inspect.rst:48 ../../library/inspect.rst:63 +#: ../../library/inspect.rst:81 ../../library/inspect.rst:248 msgid "documentation string" msgstr "" -#: ../../library/inspect.rst:50 ../../library/inspect.rst:60 -#: ../../library/inspect.rst:78 ../../library/inspect.rst:207 -#: ../../library/inspect.rst:221 ../../library/inspect.rst:240 +#: ../../library/inspect.rst:50 ../../library/inspect.rst:65 +#: ../../library/inspect.rst:83 ../../library/inspect.rst:217 +#: ../../library/inspect.rst:231 ../../library/inspect.rst:250 msgid "__name__" msgstr "__name__" @@ -94,20 +94,20 @@ msgstr "__name__" msgid "name with which this class was defined" msgstr "" -#: ../../library/inspect.rst:53 ../../library/inspect.rst:63 -#: ../../library/inspect.rst:81 ../../library/inspect.rst:209 -#: ../../library/inspect.rst:223 ../../library/inspect.rst:243 +#: ../../library/inspect.rst:53 ../../library/inspect.rst:68 +#: ../../library/inspect.rst:86 ../../library/inspect.rst:219 +#: ../../library/inspect.rst:233 ../../library/inspect.rst:253 msgid "__qualname__" msgstr "__qualname__" -#: ../../library/inspect.rst:53 ../../library/inspect.rst:63 -#: ../../library/inspect.rst:81 ../../library/inspect.rst:209 -#: ../../library/inspect.rst:223 ../../library/inspect.rst:243 +#: ../../library/inspect.rst:53 ../../library/inspect.rst:68 +#: ../../library/inspect.rst:86 ../../library/inspect.rst:219 +#: ../../library/inspect.rst:233 ../../library/inspect.rst:253 msgid "qualified name" msgstr "" -#: ../../library/inspect.rst:55 ../../library/inspect.rst:73 -#: ../../library/inspect.rst:106 +#: ../../library/inspect.rst:55 ../../library/inspect.rst:78 +#: ../../library/inspect.rst:116 msgid "__module__" msgstr "__module__" @@ -115,436 +115,452 @@ msgstr "__module__" msgid "name of module in which this class was defined" msgstr "" +#: ../../library/inspect.rst:58 ../../library/inspect.rst:111 +msgid "__type_params__" +msgstr "__type_params__" + #: ../../library/inspect.rst:58 +msgid "" +"A tuple containing the :ref:`type parameters ` of a generic " +"class" +msgstr "" + +#: ../../library/inspect.rst:63 msgid "method" msgstr "" -#: ../../library/inspect.rst:60 +#: ../../library/inspect.rst:65 msgid "name with which this method was defined" msgstr "" -#: ../../library/inspect.rst:65 +#: ../../library/inspect.rst:70 msgid "__func__" msgstr "__func__" -#: ../../library/inspect.rst:65 +#: ../../library/inspect.rst:70 msgid "function object containing implementation of method" msgstr "" -#: ../../library/inspect.rst:69 ../../library/inspect.rst:245 +#: ../../library/inspect.rst:74 ../../library/inspect.rst:255 msgid "__self__" msgstr "__self__" -#: ../../library/inspect.rst:69 +#: ../../library/inspect.rst:74 msgid "instance to which this method is bound, or ``None``" msgstr "" -#: ../../library/inspect.rst:73 +#: ../../library/inspect.rst:78 msgid "name of module in which this method was defined" msgstr "" -#: ../../library/inspect.rst:76 +#: ../../library/inspect.rst:81 msgid "function" msgstr "函式" -#: ../../library/inspect.rst:78 +#: ../../library/inspect.rst:83 msgid "name with which this function was defined" msgstr "" -#: ../../library/inspect.rst:83 +#: ../../library/inspect.rst:88 msgid "__code__" msgstr "__code__" -#: ../../library/inspect.rst:83 +#: ../../library/inspect.rst:88 msgid "code object containing compiled function :term:`bytecode`" msgstr "" -#: ../../library/inspect.rst:87 +#: ../../library/inspect.rst:92 msgid "__defaults__" msgstr "__defaults__" -#: ../../library/inspect.rst:87 +#: ../../library/inspect.rst:92 msgid "tuple of any default values for positional or keyword parameters" msgstr "" -#: ../../library/inspect.rst:91 +#: ../../library/inspect.rst:96 msgid "__kwdefaults__" msgstr "__kwdefaults__" -#: ../../library/inspect.rst:91 +#: ../../library/inspect.rst:96 msgid "mapping of any default values for keyword-only parameters" msgstr "" -#: ../../library/inspect.rst:95 +#: ../../library/inspect.rst:100 msgid "__globals__" msgstr "__globals__" -#: ../../library/inspect.rst:95 +#: ../../library/inspect.rst:100 msgid "global namespace in which this function was defined" msgstr "" -#: ../../library/inspect.rst:98 +#: ../../library/inspect.rst:103 msgid "__builtins__" msgstr "__builtins__" -#: ../../library/inspect.rst:98 +#: ../../library/inspect.rst:103 msgid "builtins namespace" msgstr "" -#: ../../library/inspect.rst:100 +#: ../../library/inspect.rst:105 msgid "__annotations__" msgstr "__annotations__" -#: ../../library/inspect.rst:100 +#: ../../library/inspect.rst:105 msgid "" "mapping of parameters names to annotations; ``\"return\"`` key is reserved " "for return annotations." msgstr "" -#: ../../library/inspect.rst:106 +#: ../../library/inspect.rst:111 +msgid "" +"A tuple containing the :ref:`type parameters ` of a generic " +"function" +msgstr "" + +#: ../../library/inspect.rst:116 msgid "name of module in which this function was defined" msgstr "" -#: ../../library/inspect.rst:109 +#: ../../library/inspect.rst:119 msgid "traceback" msgstr "traceback" -#: ../../library/inspect.rst:109 +#: ../../library/inspect.rst:119 msgid "tb_frame" msgstr "tb_frame" -#: ../../library/inspect.rst:109 +#: ../../library/inspect.rst:119 msgid "frame object at this level" msgstr "" -#: ../../library/inspect.rst:112 +#: ../../library/inspect.rst:122 msgid "tb_lasti" msgstr "tb_lasti" -#: ../../library/inspect.rst:112 ../../library/inspect.rst:134 +#: ../../library/inspect.rst:122 ../../library/inspect.rst:144 msgid "index of last attempted instruction in bytecode" msgstr "" -#: ../../library/inspect.rst:115 +#: ../../library/inspect.rst:125 msgid "tb_lineno" msgstr "tb_lineno" -#: ../../library/inspect.rst:115 ../../library/inspect.rst:137 +#: ../../library/inspect.rst:125 ../../library/inspect.rst:147 msgid "current line number in Python source code" msgstr "" -#: ../../library/inspect.rst:118 +#: ../../library/inspect.rst:128 msgid "tb_next" msgstr "tb_next" -#: ../../library/inspect.rst:118 +#: ../../library/inspect.rst:128 msgid "next inner traceback object (called by this level)" msgstr "" -#: ../../library/inspect.rst:122 ../../library/inspect.rst:211 -#: ../../library/inspect.rst:228 +#: ../../library/inspect.rst:132 ../../library/inspect.rst:221 +#: ../../library/inspect.rst:238 msgid "frame" msgstr "" -#: ../../library/inspect.rst:122 +#: ../../library/inspect.rst:132 msgid "f_back" msgstr "f_back" -#: ../../library/inspect.rst:122 +#: ../../library/inspect.rst:132 msgid "next outer frame object (this frame's caller)" msgstr "" -#: ../../library/inspect.rst:125 +#: ../../library/inspect.rst:135 msgid "f_builtins" msgstr "f_builtins" -#: ../../library/inspect.rst:125 +#: ../../library/inspect.rst:135 msgid "builtins namespace seen by this frame" msgstr "" -#: ../../library/inspect.rst:128 +#: ../../library/inspect.rst:138 msgid "f_code" msgstr "f_code" -#: ../../library/inspect.rst:128 +#: ../../library/inspect.rst:138 msgid "code object being executed in this frame" msgstr "" -#: ../../library/inspect.rst:131 +#: ../../library/inspect.rst:141 msgid "f_globals" msgstr "f_globals" -#: ../../library/inspect.rst:131 +#: ../../library/inspect.rst:141 msgid "global namespace seen by this frame" msgstr "" -#: ../../library/inspect.rst:134 +#: ../../library/inspect.rst:144 msgid "f_lasti" msgstr "f_lasti" -#: ../../library/inspect.rst:137 +#: ../../library/inspect.rst:147 msgid "f_lineno" msgstr "f_lineno" -#: ../../library/inspect.rst:140 +#: ../../library/inspect.rst:150 msgid "f_locals" msgstr "f_locals" -#: ../../library/inspect.rst:140 +#: ../../library/inspect.rst:150 msgid "local namespace seen by this frame" msgstr "" -#: ../../library/inspect.rst:143 +#: ../../library/inspect.rst:153 msgid "f_trace" msgstr "f_trace" -#: ../../library/inspect.rst:143 +#: ../../library/inspect.rst:153 msgid "tracing function for this frame, or ``None``" msgstr "" -#: ../../library/inspect.rst:146 ../../library/inspect.rst:215 -#: ../../library/inspect.rst:232 +#: ../../library/inspect.rst:156 ../../library/inspect.rst:225 +#: ../../library/inspect.rst:242 msgid "code" msgstr "code(程式碼)" -#: ../../library/inspect.rst:146 +#: ../../library/inspect.rst:156 msgid "co_argcount" msgstr "co_argcount" -#: ../../library/inspect.rst:146 +#: ../../library/inspect.rst:156 msgid "" "number of arguments (not including keyword only arguments, \\* or \\*\\* " "args)" msgstr "" -#: ../../library/inspect.rst:151 +#: ../../library/inspect.rst:161 msgid "co_code" msgstr "co_code" -#: ../../library/inspect.rst:151 +#: ../../library/inspect.rst:161 msgid "string of raw compiled bytecode" msgstr "" -#: ../../library/inspect.rst:154 +#: ../../library/inspect.rst:164 msgid "co_cellvars" msgstr "co_cellvars" -#: ../../library/inspect.rst:154 +#: ../../library/inspect.rst:164 msgid "tuple of names of cell variables (referenced by containing scopes)" msgstr "" -#: ../../library/inspect.rst:158 +#: ../../library/inspect.rst:168 msgid "co_consts" msgstr "co_consts" -#: ../../library/inspect.rst:158 +#: ../../library/inspect.rst:168 msgid "tuple of constants used in the bytecode" msgstr "" -#: ../../library/inspect.rst:161 +#: ../../library/inspect.rst:171 msgid "co_filename" msgstr "co_filename" -#: ../../library/inspect.rst:161 +#: ../../library/inspect.rst:171 msgid "name of file in which this code object was created" msgstr "" -#: ../../library/inspect.rst:165 +#: ../../library/inspect.rst:175 msgid "co_firstlineno" msgstr "co_firstlineno" -#: ../../library/inspect.rst:165 +#: ../../library/inspect.rst:175 msgid "number of first line in Python source code" msgstr "" -#: ../../library/inspect.rst:168 +#: ../../library/inspect.rst:178 msgid "co_flags" msgstr "co_flags" -#: ../../library/inspect.rst:168 +#: ../../library/inspect.rst:178 msgid "" "bitmap of ``CO_*`` flags, read more :ref:`here `" msgstr "" -#: ../../library/inspect.rst:172 +#: ../../library/inspect.rst:182 msgid "co_lnotab" msgstr "co_lnotab" -#: ../../library/inspect.rst:172 +#: ../../library/inspect.rst:182 msgid "encoded mapping of line numbers to bytecode indices" msgstr "" -#: ../../library/inspect.rst:176 +#: ../../library/inspect.rst:186 msgid "co_freevars" msgstr "co_freevars" -#: ../../library/inspect.rst:176 +#: ../../library/inspect.rst:186 msgid "tuple of names of free variables (referenced via a function's closure)" msgstr "" -#: ../../library/inspect.rst:180 +#: ../../library/inspect.rst:190 msgid "co_posonlyargcount" msgstr "co_posonlyargcount" -#: ../../library/inspect.rst:180 +#: ../../library/inspect.rst:190 msgid "number of positional only arguments" msgstr "" -#: ../../library/inspect.rst:183 +#: ../../library/inspect.rst:193 msgid "co_kwonlyargcount" msgstr "co_kwonlyargcount" -#: ../../library/inspect.rst:183 +#: ../../library/inspect.rst:193 msgid "number of keyword only arguments (not including \\*\\* arg)" msgstr "" -#: ../../library/inspect.rst:187 +#: ../../library/inspect.rst:197 msgid "co_name" msgstr "co_name" -#: ../../library/inspect.rst:187 +#: ../../library/inspect.rst:197 msgid "name with which this code object was defined" msgstr "" -#: ../../library/inspect.rst:190 +#: ../../library/inspect.rst:200 msgid "co_qualname" msgstr "co_qualname" -#: ../../library/inspect.rst:190 +#: ../../library/inspect.rst:200 msgid "fully qualified name with which this code object was defined" msgstr "" -#: ../../library/inspect.rst:194 +#: ../../library/inspect.rst:204 msgid "co_names" msgstr "co_names" -#: ../../library/inspect.rst:194 +#: ../../library/inspect.rst:204 msgid "tuple of names other than arguments and function locals" msgstr "" -#: ../../library/inspect.rst:198 +#: ../../library/inspect.rst:208 msgid "co_nlocals" msgstr "co_nlocals" -#: ../../library/inspect.rst:198 +#: ../../library/inspect.rst:208 msgid "number of local variables" msgstr "" -#: ../../library/inspect.rst:200 +#: ../../library/inspect.rst:210 msgid "co_stacksize" msgstr "co_stacksize" -#: ../../library/inspect.rst:200 +#: ../../library/inspect.rst:210 msgid "virtual machine stack space required" msgstr "" -#: ../../library/inspect.rst:203 +#: ../../library/inspect.rst:213 msgid "co_varnames" msgstr "co_varnames" -#: ../../library/inspect.rst:203 +#: ../../library/inspect.rst:213 msgid "tuple of names of arguments and local variables" msgstr "" -#: ../../library/inspect.rst:207 +#: ../../library/inspect.rst:217 msgid "generator" msgstr "" -#: ../../library/inspect.rst:207 ../../library/inspect.rst:221 +#: ../../library/inspect.rst:217 ../../library/inspect.rst:231 msgid "name" msgstr "" -#: ../../library/inspect.rst:211 +#: ../../library/inspect.rst:221 msgid "gi_frame" msgstr "gi_frame" -#: ../../library/inspect.rst:213 +#: ../../library/inspect.rst:223 msgid "gi_running" msgstr "gi_running" -#: ../../library/inspect.rst:213 +#: ../../library/inspect.rst:223 msgid "is the generator running?" msgstr "" -#: ../../library/inspect.rst:215 +#: ../../library/inspect.rst:225 msgid "gi_code" msgstr "gi_code" -#: ../../library/inspect.rst:217 +#: ../../library/inspect.rst:227 msgid "gi_yieldfrom" msgstr "gi_yieldfrom" -#: ../../library/inspect.rst:217 +#: ../../library/inspect.rst:227 msgid "object being iterated by ``yield from``, or ``None``" msgstr "" -#: ../../library/inspect.rst:221 +#: ../../library/inspect.rst:231 msgid "coroutine" msgstr "" -#: ../../library/inspect.rst:225 +#: ../../library/inspect.rst:235 msgid "cr_await" msgstr "cr_await" -#: ../../library/inspect.rst:225 +#: ../../library/inspect.rst:235 msgid "object being awaited on, or ``None``" msgstr "" -#: ../../library/inspect.rst:228 +#: ../../library/inspect.rst:238 msgid "cr_frame" msgstr "cr_frame" -#: ../../library/inspect.rst:230 +#: ../../library/inspect.rst:240 msgid "cr_running" msgstr "cr_running" -#: ../../library/inspect.rst:230 +#: ../../library/inspect.rst:240 msgid "is the coroutine running?" msgstr "" -#: ../../library/inspect.rst:232 +#: ../../library/inspect.rst:242 msgid "cr_code" msgstr "cr_code" -#: ../../library/inspect.rst:234 +#: ../../library/inspect.rst:244 msgid "cr_origin" msgstr "cr_origin" -#: ../../library/inspect.rst:234 +#: ../../library/inspect.rst:244 msgid "where coroutine was created, or ``None``. See |coroutine-origin-link|" msgstr "" -#: ../../library/inspect.rst:238 +#: ../../library/inspect.rst:248 msgid "builtin" msgstr "" -#: ../../library/inspect.rst:240 +#: ../../library/inspect.rst:250 msgid "original name of this function or method" msgstr "" -#: ../../library/inspect.rst:245 +#: ../../library/inspect.rst:255 msgid "instance to which a method is bound, or ``None``" msgstr "" -#: ../../library/inspect.rst:252 +#: ../../library/inspect.rst:262 msgid "Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators." -msgstr "" +msgstr "將 ``__qualname__`` 和 ``gi_yieldfrom`` 屬性加到產生器。" -#: ../../library/inspect.rst:254 +#: ../../library/inspect.rst:264 msgid "" "The ``__name__`` attribute of generators is now set from the function name, " "instead of the code name, and it can now be modified." msgstr "" -#: ../../library/inspect.rst:259 +#: ../../library/inspect.rst:269 msgid "Add ``cr_origin`` attribute to coroutines." msgstr "新增協程的 ``cr_origin`` 屬性。" -#: ../../library/inspect.rst:263 +#: ../../library/inspect.rst:273 msgid "Add ``__builtins__`` attribute to functions." msgstr "新增函式的 ``__builtins__`` 屬性。" -#: ../../library/inspect.rst:267 +#: ../../library/inspect.rst:277 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name. If the optional *predicate* argument—which will be called " @@ -552,14 +568,14 @@ msgid "" "the predicate returns a true value are included." msgstr "" -#: ../../library/inspect.rst:274 +#: ../../library/inspect.rst:284 msgid "" ":func:`getmembers` will only return class attributes defined in the " "metaclass when the argument is a class and those attributes have been listed " "in the metaclass' custom :meth:`~object.__dir__`." msgstr "" -#: ../../library/inspect.rst:281 +#: ../../library/inspect.rst:291 msgid "" "Return all the members of an object in a list of ``(name, value)`` pairs " "sorted by name without triggering dynamic lookup via the descriptor " @@ -567,7 +583,7 @@ msgid "" "that satisfy a given predicate." msgstr "" -#: ../../library/inspect.rst:288 +#: ../../library/inspect.rst:298 msgid "" ":func:`getmembers_static` may not be able to retrieve all members that " "getmembers can fetch (like dynamically created attributes) and may find " @@ -576,7 +592,7 @@ msgid "" "cases." msgstr "" -#: ../../library/inspect.rst:299 +#: ../../library/inspect.rst:309 msgid "" "Return the name of the module named by the file *path*, without including " "the names of enclosing packages. The file extension is checked against all " @@ -585,52 +601,52 @@ msgid "" "``None`` is returned." msgstr "" -#: ../../library/inspect.rst:305 +#: ../../library/inspect.rst:315 msgid "" "Note that this function *only* returns a meaningful name for actual Python " "modules - paths that potentially refer to Python packages will still return " "``None``." msgstr "" -#: ../../library/inspect.rst:309 +#: ../../library/inspect.rst:319 msgid "The function is based directly on :mod:`importlib`." msgstr "此函式直接基於 :mod:`importlib`。" -#: ../../library/inspect.rst:315 +#: ../../library/inspect.rst:325 msgid "Return ``True`` if the object is a module." msgstr "如果物件是模組,則回傳 ``True``。" -#: ../../library/inspect.rst:320 +#: ../../library/inspect.rst:330 msgid "" "Return ``True`` if the object is a class, whether built-in or created in " "Python code." msgstr "" -#: ../../library/inspect.rst:326 +#: ../../library/inspect.rst:336 msgid "Return ``True`` if the object is a bound method written in Python." msgstr "" -#: ../../library/inspect.rst:331 +#: ../../library/inspect.rst:341 msgid "" "Return ``True`` if the object is a Python function, which includes functions " "created by a :term:`lambda` expression." msgstr "" -#: ../../library/inspect.rst:337 +#: ../../library/inspect.rst:347 msgid "Return ``True`` if the object is a Python generator function." msgstr "如果物件是 Python 產生器函式,則回傳 ``True``。" -#: ../../library/inspect.rst:339 +#: ../../library/inspect.rst:349 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a Python generator function." msgstr "" -#: ../../library/inspect.rst:346 +#: ../../library/inspect.rst:356 msgid "Return ``True`` if the object is a generator." msgstr "如果物件是產生器,則回傳 ``True``。" -#: ../../library/inspect.rst:351 +#: ../../library/inspect.rst:361 msgid "" "Return ``True`` if the object is a :term:`coroutine function` (a function " "defined with an :keyword:`async def` syntax), a :func:`functools.partial` " @@ -638,118 +654,118 @@ msgid "" "`markcoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:358 +#: ../../library/inspect.rst:368 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`coroutine function`." msgstr "" -#: ../../library/inspect.rst:362 +#: ../../library/inspect.rst:372 msgid "" "Sync functions marked with :func:`markcoroutinefunction` now return ``True``." msgstr "" -#: ../../library/inspect.rst:369 +#: ../../library/inspect.rst:379 msgid "" "Decorator to mark a callable as a :term:`coroutine function` if it would not " "otherwise be detected by :func:`iscoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:372 +#: ../../library/inspect.rst:382 msgid "" "This may be of use for sync functions that return a :term:`coroutine`, if " "the function is passed to an API that requires :func:`iscoroutinefunction`." msgstr "" -#: ../../library/inspect.rst:375 +#: ../../library/inspect.rst:385 msgid "" "When possible, using an :keyword:`async def` function is preferred. Also " "acceptable is calling the function and testing the return with :func:" "`iscoroutine`." msgstr "" -#: ../../library/inspect.rst:384 +#: ../../library/inspect.rst:394 msgid "" "Return ``True`` if the object is a :term:`coroutine` created by an :keyword:" "`async def` function." msgstr "" -#: ../../library/inspect.rst:392 +#: ../../library/inspect.rst:402 msgid "" "Return ``True`` if the object can be used in :keyword:`await` expression." msgstr "" -#: ../../library/inspect.rst:394 +#: ../../library/inspect.rst:404 msgid "" "Can also be used to distinguish generator-based coroutines from regular " "generators:" msgstr "" -#: ../../library/inspect.rst:415 +#: ../../library/inspect.rst:425 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator` function, " "for example:" msgstr "" -#: ../../library/inspect.rst:428 +#: ../../library/inspect.rst:438 msgid "" "Functions wrapped in :func:`functools.partial` now return ``True`` if the " "wrapped function is a :term:`asynchronous generator` function." msgstr "" -#: ../../library/inspect.rst:435 +#: ../../library/inspect.rst:445 msgid "" "Return ``True`` if the object is an :term:`asynchronous generator iterator` " "created by an :term:`asynchronous generator` function." msgstr "" -#: ../../library/inspect.rst:442 +#: ../../library/inspect.rst:452 msgid "Return ``True`` if the object is a traceback." msgstr "" -#: ../../library/inspect.rst:447 +#: ../../library/inspect.rst:457 msgid "Return ``True`` if the object is a frame." msgstr "" -#: ../../library/inspect.rst:452 +#: ../../library/inspect.rst:462 msgid "Return ``True`` if the object is a code." msgstr "" -#: ../../library/inspect.rst:457 +#: ../../library/inspect.rst:467 msgid "" "Return ``True`` if the object is a built-in function or a bound built-in " "method." msgstr "" -#: ../../library/inspect.rst:462 +#: ../../library/inspect.rst:472 msgid "" "Return ``True`` if the type of object is a :class:`~types.MethodWrapperType`." msgstr "" -#: ../../library/inspect.rst:464 +#: ../../library/inspect.rst:474 msgid "" "These are instances of :class:`~types.MethodWrapperType`, such as :meth:" "`~object.__str__`, :meth:`~object.__eq__` and :meth:`~object.__repr__`." msgstr "" -#: ../../library/inspect.rst:472 +#: ../../library/inspect.rst:482 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "如果物件是使用者定義或內建的函式或方法,則回傳 ``True``。" -#: ../../library/inspect.rst:477 +#: ../../library/inspect.rst:487 msgid "Return ``True`` if the object is an abstract base class." msgstr "如果物件是抽象基底類別,則回傳 ``True``。" -#: ../../library/inspect.rst:482 +#: ../../library/inspect.rst:492 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" "`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " "true." msgstr "" -#: ../../library/inspect.rst:486 +#: ../../library/inspect.rst:496 msgid "" "This, for example, is true of ``int.__add__``. An object passing this test " "has a :meth:`~object.__get__` method but not a :meth:`~object.__set__` " @@ -757,7 +773,7 @@ msgid "" "__name__` attribute is usually sensible, and :attr:`!__doc__` often is." msgstr "" -#: ../../library/inspect.rst:492 +#: ../../library/inspect.rst:502 msgid "" "Methods implemented via descriptors that also pass one of the other tests " "return ``False`` from the :func:`ismethoddescriptor` test, simply because " @@ -765,11 +781,11 @@ msgid "" "`~method.__func__` attribute (etc) when an object passes :func:`ismethod`." msgstr "" -#: ../../library/inspect.rst:501 +#: ../../library/inspect.rst:511 msgid "Return ``True`` if the object is a data descriptor." msgstr "" -#: ../../library/inspect.rst:503 +#: ../../library/inspect.rst:513 msgid "" "Data descriptors have a :attr:`~object.__set__` or a :attr:`~object." "__delete__` method. Examples are properties (defined in Python), getsets, " @@ -780,33 +796,33 @@ msgid "" "and members have both of these attributes), but this is not guaranteed." msgstr "" -#: ../../library/inspect.rst:514 +#: ../../library/inspect.rst:524 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: ../../library/inspect.rst:518 +#: ../../library/inspect.rst:528 msgid "" "getsets are attributes defined in extension modules via :c:type:" "`PyGetSetDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:525 +#: ../../library/inspect.rst:535 msgid "Return ``True`` if the object is a member descriptor." msgstr "" -#: ../../library/inspect.rst:529 +#: ../../library/inspect.rst:539 msgid "" "Member descriptors are attributes defined in extension modules via :c:type:" "`PyMemberDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:537 +#: ../../library/inspect.rst:547 msgid "Retrieving source code" msgstr "" -#: ../../library/inspect.rst:541 +#: ../../library/inspect.rst:551 msgid "" "Get the documentation string for an object, cleaned up with :func:" "`cleandoc`. If the documentation string for an object is not provided and " @@ -815,11 +831,11 @@ msgid "" "documentation string is invalid or missing." msgstr "" -#: ../../library/inspect.rst:547 +#: ../../library/inspect.rst:557 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: ../../library/inspect.rst:553 +#: ../../library/inspect.rst:563 msgid "" "Return in a single string any lines of comments immediately preceding the " "object's source code (for a class, function, or method), or at the top of " @@ -828,27 +844,27 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: ../../library/inspect.rst:562 +#: ../../library/inspect.rst:572 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" -#: ../../library/inspect.rst:569 +#: ../../library/inspect.rst:579 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: ../../library/inspect.rst:575 +#: ../../library/inspect.rst:585 msgid "" "Return the name of the Python source file in which an object was defined or " "``None`` if no way can be identified to get the source. This will fail with " "a :exc:`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:583 +#: ../../library/inspect.rst:593 msgid "" "Return a list of source lines and starting line number for an object. The " "argument may be a module, class, method, function, traceback, frame, or code " @@ -859,13 +875,13 @@ msgid "" "built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:592 ../../library/inspect.rst:606 +#: ../../library/inspect.rst:602 ../../library/inspect.rst:616 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: ../../library/inspect.rst:599 +#: ../../library/inspect.rst:609 msgid "" "Return the text of the source code for an object. The argument may be a " "module, class, method, function, traceback, frame, or code object. The " @@ -874,13 +890,13 @@ msgid "" "object is a built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:613 +#: ../../library/inspect.rst:623 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: ../../library/inspect.rst:616 +#: ../../library/inspect.rst:626 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -888,28 +904,28 @@ msgid "" "Also, all tabs are expanded to spaces." msgstr "" -#: ../../library/inspect.rst:625 +#: ../../library/inspect.rst:635 msgid "Introspecting callables with the Signature object" msgstr "" -#: ../../library/inspect.rst:629 +#: ../../library/inspect.rst:639 msgid "" "The :class:`Signature` object represents the call signature of a callable " "object and its return annotation. To retrieve a :class:`!Signature` object, " "use the :func:`!signature` function." msgstr "" -#: ../../library/inspect.rst:636 +#: ../../library/inspect.rst:646 msgid "Return a :class:`Signature` object for the given *callable*:" msgstr "" -#: ../../library/inspect.rst:655 +#: ../../library/inspect.rst:665 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: ../../library/inspect.rst:658 +#: ../../library/inspect.rst:668 msgid "" "For objects defined in modules using stringized annotations (``from " "__future__ import annotations``), :func:`signature` will attempt to " @@ -919,7 +935,7 @@ msgid "" "func:`get_annotations` for instructions on how to use these parameters." msgstr "" -#: ../../library/inspect.rst:667 +#: ../../library/inspect.rst:677 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -928,32 +944,32 @@ msgid "" "potentially raise any kind of exception." msgstr "" -#: ../../library/inspect.rst:673 +#: ../../library/inspect.rst:683 msgid "" "A slash(/) in the signature of a function denotes that the parameters prior " "to it are positional-only. For more info, see :ref:`the FAQ entry on " "positional-only parameters `." msgstr "" -#: ../../library/inspect.rst:677 +#: ../../library/inspect.rst:687 msgid "" "The *follow_wrapped* parameter was added. Pass ``False`` to get a signature " "of *callable* specifically (``callable.__wrapped__`` will not be used to " "unwrap decorated callables.)" msgstr "" -#: ../../library/inspect.rst:683 ../../library/inspect.rst:793 +#: ../../library/inspect.rst:693 ../../library/inspect.rst:803 msgid "The *globals*, *locals*, and *eval_str* parameters were added." msgstr "" -#: ../../library/inspect.rst:688 +#: ../../library/inspect.rst:698 msgid "" "Some callables may not be introspectable in certain implementations of " "Python. For example, in CPython, some built-in functions defined in C " "provide no metadata about their arguments." msgstr "" -#: ../../library/inspect.rst:694 +#: ../../library/inspect.rst:704 msgid "" "If the passed object has a :attr:`!__signature__` attribute, we may use it " "to create the signature. The exact semantics are an implementation detail " @@ -961,14 +977,14 @@ msgid "" "semantics." msgstr "" -#: ../../library/inspect.rst:702 +#: ../../library/inspect.rst:712 msgid "" "A :class:`!Signature` object represents the call signature of a function and " "its return annotation. For each parameter accepted by the function it " "stores a :class:`Parameter` object in its :attr:`parameters` collection." msgstr "" -#: ../../library/inspect.rst:707 +#: ../../library/inspect.rst:717 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -977,54 +993,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: ../../library/inspect.rst:713 +#: ../../library/inspect.rst:723 msgid "" "The optional *return_annotation* argument can be an arbitrary Python object. " "It represents the \"return\" annotation of the callable." msgstr "" -#: ../../library/inspect.rst:716 +#: ../../library/inspect.rst:726 msgid "" ":class:`!Signature` objects are *immutable*. Use :meth:`Signature.replace` " "to make a modified copy." msgstr "" -#: ../../library/inspect.rst:719 +#: ../../library/inspect.rst:729 msgid ":class:`!Signature` objects are now picklable and :term:`hashable`." msgstr "" -#: ../../library/inspect.rst:724 +#: ../../library/inspect.rst:734 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: ../../library/inspect.rst:728 +#: ../../library/inspect.rst:738 msgid "" "An ordered mapping of parameters' names to the corresponding :class:" "`Parameter` objects. Parameters appear in strict definition order, " "including keyword-only parameters." msgstr "" -#: ../../library/inspect.rst:732 ../../library/inspect.rst:1069 +#: ../../library/inspect.rst:742 ../../library/inspect.rst:1079 msgid "" "Python only explicitly guaranteed that it preserved the declaration order of " "keyword-only parameters as of version 3.7, although in practice this order " "had always been preserved in Python 3." msgstr "" -#: ../../library/inspect.rst:739 +#: ../../library/inspect.rst:749 msgid "" "The \"return\" annotation for the callable. If the callable has no " "\"return\" annotation, this attribute is set to :attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:744 +#: ../../library/inspect.rst:754 msgid "" "Create a mapping from positional and keyword arguments to parameters. " "Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the " "signature, or raises a :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:750 +#: ../../library/inspect.rst:760 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1032,7 +1048,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: ../../library/inspect.rst:757 +#: ../../library/inspect.rst:767 msgid "" "Create a new :class:`Signature` instance based on the instance :meth:" "`replace` was invoked on. It is possible to pass different *parameters* and/" @@ -1041,147 +1057,147 @@ msgid "" "Signature`, pass in :attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:777 +#: ../../library/inspect.rst:787 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "*obj*." msgstr "" -#: ../../library/inspect.rst:780 +#: ../../library/inspect.rst:790 msgid "This method simplifies subclassing of :class:`Signature`:" msgstr "" -#: ../../library/inspect.rst:789 +#: ../../library/inspect.rst:799 msgid "Its behavior is otherwise identical to that of :func:`signature`." msgstr "" -#: ../../library/inspect.rst:799 +#: ../../library/inspect.rst:809 msgid "" ":class:`!Parameter` objects are *immutable*. Instead of modifying a :class:`!" "Parameter` object, you can use :meth:`Parameter.replace` to create a " "modified copy." msgstr "" -#: ../../library/inspect.rst:803 +#: ../../library/inspect.rst:813 msgid "Parameter objects are now picklable and :term:`hashable`." msgstr "" -#: ../../library/inspect.rst:808 +#: ../../library/inspect.rst:818 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: ../../library/inspect.rst:813 +#: ../../library/inspect.rst:823 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: ../../library/inspect.rst:818 +#: ../../library/inspect.rst:828 msgid "" "CPython generates implicit parameter names of the form ``.0`` on the code " "objects used to implement comprehensions and generator expressions." msgstr "" -#: ../../library/inspect.rst:822 +#: ../../library/inspect.rst:832 msgid "" "These parameter names are now exposed by this module as names like " "``implicit0``." msgstr "" -#: ../../library/inspect.rst:828 +#: ../../library/inspect.rst:838 msgid "" "The default value for the parameter. If the parameter has no default value, " "this attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:833 +#: ../../library/inspect.rst:843 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:838 +#: ../../library/inspect.rst:848 msgid "" "Describes how argument values are bound to the parameter. The possible " "values are accessible via :class:`Parameter` (like ``Parameter." "KEYWORD_ONLY``), and support comparison and ordering, in the following order:" msgstr "" -#: ../../library/inspect.rst:845 +#: ../../library/inspect.rst:855 msgid "Name" msgstr "名稱" -#: ../../library/inspect.rst:845 +#: ../../library/inspect.rst:855 msgid "Meaning" msgstr "意義" -#: ../../library/inspect.rst:847 +#: ../../library/inspect.rst:857 msgid "*POSITIONAL_ONLY*" msgstr "*POSITIONAL_ONLY*" -#: ../../library/inspect.rst:847 +#: ../../library/inspect.rst:857 msgid "" "Value must be supplied as a positional argument. Positional only parameters " "are those which appear before a ``/`` entry (if present) in a Python " "function definition." msgstr "" -#: ../../library/inspect.rst:852 +#: ../../library/inspect.rst:862 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "*POSITIONAL_OR_KEYWORD*" -#: ../../library/inspect.rst:852 +#: ../../library/inspect.rst:862 msgid "" "Value may be supplied as either a keyword or positional argument (this is " "the standard binding behaviour for functions implemented in Python.)" msgstr "" -#: ../../library/inspect.rst:857 +#: ../../library/inspect.rst:867 msgid "*VAR_POSITIONAL*" msgstr "*VAR_POSITIONAL*" -#: ../../library/inspect.rst:857 +#: ../../library/inspect.rst:867 msgid "" "A tuple of positional arguments that aren't bound to any other parameter. " "This corresponds to a ``*args`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:862 +#: ../../library/inspect.rst:872 msgid "*KEYWORD_ONLY*" msgstr "*KEYWORD_ONLY*" -#: ../../library/inspect.rst:862 +#: ../../library/inspect.rst:872 msgid "" "Value must be supplied as a keyword argument. Keyword only parameters are " "those which appear after a ``*`` or ``*args`` entry in a Python function " "definition." msgstr "" -#: ../../library/inspect.rst:867 +#: ../../library/inspect.rst:877 msgid "*VAR_KEYWORD*" msgstr "*VAR_KEYWORD*" -#: ../../library/inspect.rst:867 +#: ../../library/inspect.rst:877 msgid "" "A dict of keyword arguments that aren't bound to any other parameter. This " "corresponds to a ``**kwargs`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:873 +#: ../../library/inspect.rst:883 msgid "Example: print all keyword-only arguments without default values:" msgstr "" -#: ../../library/inspect.rst:889 +#: ../../library/inspect.rst:899 msgid "Describes a enum value of :attr:`Parameter.kind`." msgstr "" -#: ../../library/inspect.rst:893 +#: ../../library/inspect.rst:903 msgid "Example: print all descriptions of arguments:" msgstr "範例:列印所有引數的描述:" -#: ../../library/inspect.rst:910 +#: ../../library/inspect.rst:920 msgid "" "Create a new :class:`Parameter` instance based on the instance replaced was " "invoked on. To override a :class:`!Parameter` attribute, pass the " @@ -1189,94 +1205,94 @@ msgid "" "a :class:`!Parameter`, pass :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:928 +#: ../../library/inspect.rst:938 msgid "" "In Python 3.3 :class:`Parameter` objects were allowed to have ``name`` set " "to ``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no " "longer permitted." msgstr "" -#: ../../library/inspect.rst:935 +#: ../../library/inspect.rst:945 msgid "" "Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call. " "Holds the mapping of arguments to the function's parameters." msgstr "" -#: ../../library/inspect.rst:940 +#: ../../library/inspect.rst:950 msgid "" "A mutable mapping of parameters' names to arguments' values. Contains only " "explicitly bound arguments. Changes in :attr:`arguments` will reflect in :" "attr:`args` and :attr:`kwargs`." msgstr "" -#: ../../library/inspect.rst:944 +#: ../../library/inspect.rst:954 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: ../../library/inspect.rst:949 +#: ../../library/inspect.rst:959 msgid "" "Arguments for which :meth:`Signature.bind` or :meth:`Signature.bind_partial` " "relied on a default value are skipped. However, if needed, use :meth:" "`BoundArguments.apply_defaults` to add them." msgstr "" -#: ../../library/inspect.rst:954 +#: ../../library/inspect.rst:964 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: ../../library/inspect.rst:960 +#: ../../library/inspect.rst:970 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../library/inspect.rst:965 +#: ../../library/inspect.rst:975 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../library/inspect.rst:970 +#: ../../library/inspect.rst:980 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../library/inspect.rst:974 +#: ../../library/inspect.rst:984 msgid "Set default values for missing arguments." msgstr "為遺漏的引數設定預設值。" -#: ../../library/inspect.rst:976 +#: ../../library/inspect.rst:986 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../library/inspect.rst:979 +#: ../../library/inspect.rst:989 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../library/inspect.rst:992 +#: ../../library/inspect.rst:1002 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: ../../library/inspect.rst:1007 +#: ../../library/inspect.rst:1017 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: ../../library/inspect.rst:1008 +#: ../../library/inspect.rst:1018 msgid "The detailed specification, implementation details and examples." msgstr "" -#: ../../library/inspect.rst:1014 +#: ../../library/inspect.rst:1024 msgid "Classes and functions" msgstr "類別與函式" -#: ../../library/inspect.rst:1018 +#: ../../library/inspect.rst:1028 msgid "" "Arrange the given list of classes into a hierarchy of nested lists. Where a " "nested list appears, it contains classes derived from the class whose entry " @@ -1287,19 +1303,19 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../library/inspect.rst:1029 +#: ../../library/inspect.rst:1039 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../library/inspect.rst:1032 +#: ../../library/inspect.rst:1042 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: ../../library/inspect.rst:1035 +#: ../../library/inspect.rst:1045 msgid "" "*args* is a list of the positional parameter names. *varargs* is the name of " "the ``*`` parameter or ``None`` if arbitrary positional arguments are not " @@ -1314,7 +1330,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../library/inspect.rst:1050 +#: ../../library/inspect.rst:1060 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1324,14 +1340,14 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../library/inspect.rst:1057 +#: ../../library/inspect.rst:1067 msgid "" "This function is now based on :func:`signature`, but still ignores " "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" -#: ../../library/inspect.rst:1062 +#: ../../library/inspect.rst:1072 msgid "" "This method was previously documented as deprecated in favour of :func:" "`signature` in Python 3.5, but that decision has been reversed in order to " @@ -1339,7 +1355,7 @@ msgid "" "code migrating away from the legacy :func:`getargspec` API." msgstr "" -#: ../../library/inspect.rst:1077 +#: ../../library/inspect.rst:1087 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1348,18 +1364,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../library/inspect.rst:1084 ../../library/inspect.rst:1094 +#: ../../library/inspect.rst:1094 ../../library/inspect.rst:1104 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../library/inspect.rst:1089 +#: ../../library/inspect.rst:1099 msgid "" "Format a pretty argument spec from the four values returned by :func:" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" -#: ../../library/inspect.rst:1099 +#: ../../library/inspect.rst:1109 msgid "" "Return a tuple of class cls's base classes, including cls, in method " "resolution order. No class appears more than once in this tuple. Note that " @@ -1367,7 +1383,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../library/inspect.rst:1107 +#: ../../library/inspect.rst:1117 msgid "" "Bind the *args* and *kwds* to the argument names of the Python function or " "method *func*, as if it was called with them. For bound methods, bind also " @@ -1380,11 +1396,11 @@ msgid "" "example:" msgstr "" -#: ../../library/inspect.rst:1133 +#: ../../library/inspect.rst:1143 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "請改用 :meth:`Signature.bind` 與 :meth:`Signature.bind_partial`。" -#: ../../library/inspect.rst:1139 +#: ../../library/inspect.rst:1149 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1396,18 +1412,18 @@ msgid "" "builtins." msgstr "" -#: ../../library/inspect.rst:1148 +#: ../../library/inspect.rst:1158 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "如果 *func* 不是 Python 函式或方法,則引發 :exc:`TypeError`。" -#: ../../library/inspect.rst:1155 +#: ../../library/inspect.rst:1165 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" -#: ../../library/inspect.rst:1158 +#: ../../library/inspect.rst:1168 msgid "" "*stop* is an optional callback accepting an object in the wrapper chain as " "its sole argument that allows the unwrapping to be terminated early if the " @@ -1417,68 +1433,68 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../library/inspect.rst:1165 +#: ../../library/inspect.rst:1175 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "如果遇到循環,則引發 :exc:`ValueError`。" -#: ../../library/inspect.rst:1172 +#: ../../library/inspect.rst:1182 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../library/inspect.rst:1174 +#: ../../library/inspect.rst:1184 msgid "" "``obj`` may be a callable, class, or module. Passing in an object of any " "other type raises :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:1177 +#: ../../library/inspect.rst:1187 msgid "" "Returns a dict. ``get_annotations()`` returns a new dict every time it's " "called; calling it twice on the same object will return two different but " "equivalent dicts." msgstr "" -#: ../../library/inspect.rst:1181 +#: ../../library/inspect.rst:1191 msgid "This function handles several details for you:" msgstr "" -#: ../../library/inspect.rst:1183 +#: ../../library/inspect.rst:1193 msgid "" "If ``eval_str`` is true, values of type ``str`` will be un-stringized using :" "func:`eval()`. This is intended for use with stringized annotations (``from " "__future__ import annotations``)." msgstr "" -#: ../../library/inspect.rst:1187 +#: ../../library/inspect.rst:1197 msgid "" "If ``obj`` doesn't have an annotations dict, returns an empty dict. " "(Functions and methods always have an annotations dict; classes, modules, " "and other types of callables may not.)" msgstr "" -#: ../../library/inspect.rst:1191 +#: ../../library/inspect.rst:1201 msgid "" "Ignores inherited annotations on classes. If a class doesn't have its own " "annotations dict, returns an empty dict." msgstr "" -#: ../../library/inspect.rst:1193 +#: ../../library/inspect.rst:1203 msgid "" "All accesses to object members and dict values are done using ``getattr()`` " "and ``dict.get()`` for safety." msgstr "" -#: ../../library/inspect.rst:1195 +#: ../../library/inspect.rst:1205 msgid "Always, always, always returns a freshly created dict." msgstr "" -#: ../../library/inspect.rst:1197 +#: ../../library/inspect.rst:1207 msgid "" "``eval_str`` controls whether or not values of type ``str`` are replaced " "with the result of calling :func:`eval()` on those values:" msgstr "" -#: ../../library/inspect.rst:1200 +#: ../../library/inspect.rst:1210 msgid "" "If eval_str is true, :func:`eval()` is called on values of type ``str``. " "(Note that ``get_annotations`` doesn't catch exceptions; if :func:`eval()` " @@ -1486,12 +1502,12 @@ msgid "" "call.)" msgstr "" -#: ../../library/inspect.rst:1204 +#: ../../library/inspect.rst:1214 msgid "" "If eval_str is false (the default), values of type ``str`` are unchanged." msgstr "" -#: ../../library/inspect.rst:1206 +#: ../../library/inspect.rst:1216 msgid "" "``globals`` and ``locals`` are passed in to :func:`eval()`; see the " "documentation for :func:`eval()` for more information. If ``globals`` or " @@ -1499,35 +1515,35 @@ msgid "" "specific default, contingent on ``type(obj)``:" msgstr "" -#: ../../library/inspect.rst:1211 +#: ../../library/inspect.rst:1221 msgid "If ``obj`` is a module, ``globals`` defaults to ``obj.__dict__``." msgstr "" -#: ../../library/inspect.rst:1212 +#: ../../library/inspect.rst:1222 msgid "" "If ``obj`` is a class, ``globals`` defaults to ``sys.modules[obj.__module__]." "__dict__`` and ``locals`` defaults to the ``obj`` class namespace." msgstr "" -#: ../../library/inspect.rst:1215 +#: ../../library/inspect.rst:1225 msgid "" "If ``obj`` is a callable, ``globals`` defaults to :attr:`obj.__globals__ " "`, although if ``obj`` is a wrapped function (using :" "func:`functools.update_wrapper`) it is first unwrapped." msgstr "" -#: ../../library/inspect.rst:1220 +#: ../../library/inspect.rst:1230 msgid "" "Calling ``get_annotations`` is best practice for accessing the annotations " "dict of any object. See :ref:`annotations-howto` for more information on " "annotations best practices." msgstr "" -#: ../../library/inspect.rst:1230 +#: ../../library/inspect.rst:1240 msgid "The interpreter stack" msgstr "" -#: ../../library/inspect.rst:1232 +#: ../../library/inspect.rst:1242 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1535,95 +1551,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../library/inspect.rst:1241 +#: ../../library/inspect.rst:1251 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../library/inspect.rst:1245 +#: ../../library/inspect.rst:1255 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../library/inspect.rst:1250 +#: ../../library/inspect.rst:1260 msgid "" "The line number of the current line associated with the code being executed " "by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1255 +#: ../../library/inspect.rst:1265 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1259 +#: ../../library/inspect.rst:1269 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1264 ../../library/inspect.rst:1303 +#: ../../library/inspect.rst:1274 ../../library/inspect.rst:1313 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../library/inspect.rst:1268 +#: ../../library/inspect.rst:1278 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1272 +#: ../../library/inspect.rst:1282 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../library/inspect.rst:1275 +#: ../../library/inspect.rst:1285 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1284 +#: ../../library/inspect.rst:1294 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1289 +#: ../../library/inspect.rst:1299 msgid "" "The line number of the current line associated with the code being executed " "by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1294 +#: ../../library/inspect.rst:1304 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1298 +#: ../../library/inspect.rst:1308 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1307 +#: ../../library/inspect.rst:1317 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1312 +#: ../../library/inspect.rst:1322 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1319 +#: ../../library/inspect.rst:1329 msgid "" "Keeping references to frame objects, as found in the first element of the " "frame records these functions return, can cause your program to create " @@ -1635,7 +1651,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../library/inspect.rst:1327 +#: ../../library/inspect.rst:1337 msgid "" "Though the cycle detector will catch these, destruction of the frames (and " "local variables) can be made deterministic by removing the cycle in a :" @@ -1643,31 +1659,31 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../library/inspect.rst:1339 +#: ../../library/inspect.rst:1349 msgid "" "If you want to keep the frame around (for example to print a traceback " "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" -#: ../../library/inspect.rst:1343 +#: ../../library/inspect.rst:1353 msgid "" "The optional *context* argument supported by most of these functions " "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" -#: ../../library/inspect.rst:1350 +#: ../../library/inspect.rst:1360 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../library/inspect.rst:1353 +#: ../../library/inspect.rst:1363 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../library/inspect.rst:1358 +#: ../../library/inspect.rst:1368 msgid "" "Get a list of :class:`FrameInfo` objects for a frame and all outer frames. " "These frames represent the calls that lead to the creation of *frame*. The " @@ -1675,19 +1691,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../library/inspect.rst:1363 ../../library/inspect.rst:1378 -#: ../../library/inspect.rst:1404 ../../library/inspect.rst:1419 +#: ../../library/inspect.rst:1373 ../../library/inspect.rst:1388 +#: ../../library/inspect.rst:1414 ../../library/inspect.rst:1429 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../library/inspect.rst:1368 ../../library/inspect.rst:1383 -#: ../../library/inspect.rst:1409 ../../library/inspect.rst:1424 +#: ../../library/inspect.rst:1378 ../../library/inspect.rst:1393 +#: ../../library/inspect.rst:1419 ../../library/inspect.rst:1434 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "回傳一個 :class:`FrameInfo` 物件串列。" -#: ../../library/inspect.rst:1373 +#: ../../library/inspect.rst:1383 msgid "" "Get a list of :class:`FrameInfo` objects for a traceback's frame and all " "inner frames. These frames represent calls made as a consequence of " @@ -1695,11 +1711,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1388 +#: ../../library/inspect.rst:1398 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../library/inspect.rst:1392 +#: ../../library/inspect.rst:1402 msgid "" "This function relies on Python stack frame support in the interpreter, which " "isn't guaranteed to exist in all implementations of Python. If running in " @@ -1707,14 +1723,14 @@ msgid "" "``None``." msgstr "" -#: ../../library/inspect.rst:1400 +#: ../../library/inspect.rst:1410 msgid "" "Return a list of :class:`FrameInfo` objects for the caller's stack. The " "first entry in the returned list represents the caller; the last entry " "represents the outermost call on the stack." msgstr "" -#: ../../library/inspect.rst:1414 +#: ../../library/inspect.rst:1424 msgid "" "Return a list of :class:`FrameInfo` objects for the stack between the " "current frame and the frame in which an exception currently being handled " @@ -1722,11 +1738,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1428 +#: ../../library/inspect.rst:1438 msgid "Fetching attributes statically" msgstr "" -#: ../../library/inspect.rst:1430 +#: ../../library/inspect.rst:1440 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -1734,20 +1750,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: ../../library/inspect.rst:1436 +#: ../../library/inspect.rst:1446 msgid "" "For cases where you want passive introspection, like documentation tools, " "this can be inconvenient. :func:`getattr_static` has the same signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" -#: ../../library/inspect.rst:1442 +#: ../../library/inspect.rst:1452 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: ../../library/inspect.rst:1446 +#: ../../library/inspect.rst:1456 msgid "" "Note: this function may not be able to retrieve all attributes that getattr " "can fetch (like dynamically created attributes) and may find attributes that " @@ -1755,31 +1771,31 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../library/inspect.rst:1452 +#: ../../library/inspect.rst:1462 msgid "" "If the instance :attr:`~object.__dict__` is shadowed by another member (for " "example a property) then this function will be unable to find instance " "members." msgstr "" -#: ../../library/inspect.rst:1458 +#: ../../library/inspect.rst:1468 msgid "" ":func:`getattr_static` does not resolve descriptors, for example slot " "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" -#: ../../library/inspect.rst:1462 +#: ../../library/inspect.rst:1472 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" -#: ../../library/inspect.rst:1488 +#: ../../library/inspect.rst:1498 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: ../../library/inspect.rst:1490 +#: ../../library/inspect.rst:1500 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -1788,32 +1804,32 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../library/inspect.rst:1498 +#: ../../library/inspect.rst:1508 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../library/inspect.rst:1500 ../../library/inspect.rst:1516 -#: ../../library/inspect.rst:1533 +#: ../../library/inspect.rst:1510 ../../library/inspect.rst:1526 +#: ../../library/inspect.rst:1543 msgid "Possible states are:" msgstr "" -#: ../../library/inspect.rst:1502 +#: ../../library/inspect.rst:1512 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1503 +#: ../../library/inspect.rst:1513 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1504 +#: ../../library/inspect.rst:1514 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../library/inspect.rst:1505 +#: ../../library/inspect.rst:1515 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1511 +#: ../../library/inspect.rst:1521 msgid "" "Get current state of a coroutine object. The function is intended to be " "used with coroutine objects created by :keyword:`async def` functions, but " @@ -1821,23 +1837,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1518 +#: ../../library/inspect.rst:1528 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1519 +#: ../../library/inspect.rst:1529 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1520 +#: ../../library/inspect.rst:1530 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../library/inspect.rst:1521 +#: ../../library/inspect.rst:1531 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1527 +#: ../../library/inspect.rst:1537 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -1846,30 +1862,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1535 +#: ../../library/inspect.rst:1545 msgid "AGEN_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1536 +#: ../../library/inspect.rst:1546 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1537 +#: ../../library/inspect.rst:1547 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../library/inspect.rst:1538 +#: ../../library/inspect.rst:1548 msgid "AGEN_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1542 +#: ../../library/inspect.rst:1552 msgid "" "The current internal state of the generator can also be queried. This is " "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" -#: ../../library/inspect.rst:1548 +#: ../../library/inspect.rst:1558 msgid "" "Get the mapping of live local variables in *generator* to their current " "values. A dictionary is returned that maps from variable names to values. " @@ -1877,14 +1893,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../library/inspect.rst:1553 +#: ../../library/inspect.rst:1563 msgid "" "If *generator* is a :term:`generator` with no currently associated frame, " "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" -#: ../../library/inspect.rst:1559 +#: ../../library/inspect.rst:1569 msgid "" "This function relies on the generator exposing a Python stack frame for " "introspection, which isn't guaranteed to be the case in all implementations " @@ -1892,79 +1908,79 @@ msgid "" "dictionary." msgstr "" -#: ../../library/inspect.rst:1568 +#: ../../library/inspect.rst:1578 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../library/inspect.rst:1575 +#: ../../library/inspect.rst:1585 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for asynchronous generator objects created by :keyword:`async def` functions " "which use the :keyword:`yield` statement." msgstr "" -#: ../../library/inspect.rst:1585 +#: ../../library/inspect.rst:1595 msgid "Code Objects Bit Flags" msgstr "" -#: ../../library/inspect.rst:1587 +#: ../../library/inspect.rst:1597 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: ../../library/inspect.rst:1592 +#: ../../library/inspect.rst:1602 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../library/inspect.rst:1596 +#: ../../library/inspect.rst:1606 msgid "" "If set, a new dict will be created for the frame's :attr:`~frame.f_locals` " "when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1601 +#: ../../library/inspect.rst:1611 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../library/inspect.rst:1605 +#: ../../library/inspect.rst:1615 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../library/inspect.rst:1609 +#: ../../library/inspect.rst:1619 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../library/inspect.rst:1613 +#: ../../library/inspect.rst:1623 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1618 +#: ../../library/inspect.rst:1628 msgid "" "The flag is set when the code object is a coroutine function. When the code " "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" -#: ../../library/inspect.rst:1626 +#: ../../library/inspect.rst:1636 msgid "" "The flag is used to transform generators into generator-based coroutines. " "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" -#: ../../library/inspect.rst:1635 +#: ../../library/inspect.rst:1645 msgid "" "The flag is set when the code object is an asynchronous generator function. " "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" -#: ../../library/inspect.rst:1642 +#: ../../library/inspect.rst:1652 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -1972,39 +1988,39 @@ msgid "" "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" -#: ../../library/inspect.rst:1650 +#: ../../library/inspect.rst:1660 msgid "Buffer flags" msgstr "" -#: ../../library/inspect.rst:1654 +#: ../../library/inspect.rst:1664 msgid "" "This is an :class:`enum.IntFlag` that represents the flags that can be " "passed to the :meth:`~object.__buffer__` method of objects implementing the :" "ref:`buffer protocol `." msgstr "" -#: ../../library/inspect.rst:1658 +#: ../../library/inspect.rst:1668 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: ../../library/inspect.rst:1685 +#: ../../library/inspect.rst:1695 msgid "Command Line Interface" msgstr "命令列介面" -#: ../../library/inspect.rst:1687 +#: ../../library/inspect.rst:1697 msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../library/inspect.rst:1692 +#: ../../library/inspect.rst:1702 msgid "" "By default, accepts the name of a module and prints the source of that " "module. A class or function within the module can be printed instead by " "appended a colon and the qualified name of the target object." msgstr "" -#: ../../library/inspect.rst:1698 +#: ../../library/inspect.rst:1708 msgid "" "Print information about the specified object rather than the source code" msgstr "" diff --git a/library/io.po b/library/io.po index 101cf3e05b..8248cfa54e 100644 --- a/library/io.po +++ b/library/io.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-12-08 00:08+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -221,7 +221,7 @@ msgstr "" "``encoding=\"utf-8\"``。若想使用目前的地區編碼,Python 3.10 以後的版本支援使" "用 ``encoding=\"locale\"``。" -#: ../../library/io.rst:135 +#: ../../library/io.rst:133 msgid ":ref:`utf8-mode`" msgstr ":ref:`utf8-mode`" @@ -394,7 +394,7 @@ msgstr "" "當在資料串流上呼叫不支援的操作時,會引發繼承自 :exc:`OSError` 與 :exc:" "`ValueError` 的例外。" -#: ../../library/io.rst:244 +#: ../../library/io.rst:243 msgid ":mod:`sys`" msgstr ":mod:`sys`" diff --git a/library/ipaddress.po b/library/ipaddress.po index 356dc58bb5..6673a12a9b 100644 --- a/library/ipaddress.po +++ b/library/ipaddress.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-04-13 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -313,10 +313,6 @@ msgid "" "documentation of the :class:`IPv4Address` class:" msgstr "" -#: ../../library/ipaddress.rst:300 -msgid "is_global" -msgstr "is_global" - #: ../../library/ipaddress.rst:305 msgid "" "``True`` if the address is reserved for site-local usage. Note that the " @@ -922,3 +918,6 @@ msgstr "" #: ../../library/ipaddress.rst:989 msgid "Any value error related to the net mask." msgstr "" + +#~ msgid "is_global" +#~ msgstr "is_global" diff --git a/library/itertools.po b/library/itertools.po index 9440dcf5a6..4c68523f18 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -89,8 +89,8 @@ msgid "start, start+step, start+2*step, ..." msgstr "start, start+step, start+2*step, ..." #: ../../library/itertools.rst:44 -msgid "``count(10) --> 10 11 12 13 14 ...``" -msgstr "``count(10) --> 10 11 12 13 14 ...``" +msgid "``count(10) → 10 11 12 13 14 ...``" +msgstr "``count(10) → 10 11 12 13 14 ...``" #: ../../library/itertools.rst:45 msgid ":func:`cycle`" @@ -105,8 +105,8 @@ msgid "p0, p1, ... plast, p0, p1, ..." msgstr "p0, p1, ... plast, p0, p1, ..." #: ../../library/itertools.rst:45 -msgid "``cycle('ABCD') --> A B C D A B C D ...``" -msgstr "``cycle('ABCD') --> A B C D A B C D ...``" +msgid "``cycle('ABCD') → A B C D A B C D ...``" +msgstr "``cycle('ABCD') → A B C D A B C D ...``" #: ../../library/itertools.rst:46 msgid ":func:`repeat`" @@ -121,8 +121,8 @@ msgid "elem, elem, elem, ... endlessly or up to n times" msgstr "" #: ../../library/itertools.rst:46 -msgid "``repeat(10, 3) --> 10 10 10``" -msgstr "``repeat(10, 3) --> 10 10 10``" +msgid "``repeat(10, 3) → 10 10 10``" +msgstr "``repeat(10, 3) → 10 10 10``" #: ../../library/itertools.rst:49 msgid "**Iterators terminating on the shortest input sequence:**" @@ -141,8 +141,8 @@ msgid "p0, p0+p1, p0+p1+p2, ..." msgstr "p0, p0+p1, p0+p1+p2, ..." #: ../../library/itertools.rst:54 -msgid "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" -msgstr "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" +msgid "``accumulate([1,2,3,4,5]) → 1 3 6 10 15``" +msgstr "``accumulate([1,2,3,4,5]) → 1 3 6 10 15``" #: ../../library/itertools.rst:55 msgid ":func:`batched`" @@ -157,8 +157,8 @@ msgid "(p0, p1, ..., p_n-1), ..." msgstr "(p0, p1, ..., p_n-1), ..." #: ../../library/itertools.rst:55 -msgid "``batched('ABCDEFG', n=3) --> ABC DEF G``" -msgstr "``batched('ABCDEFG', n=3) --> ABC DEF G``" +msgid "``batched('ABCDEFG', n=3) → ABC DEF G``" +msgstr "``batched('ABCDEFG', n=3) → ABC DEF G``" #: ../../library/itertools.rst:56 msgid ":func:`chain`" @@ -173,8 +173,8 @@ msgid "p0, p1, ... plast, q0, q1, ..." msgstr "p0, p1, ... plast, q0, q1, ..." #: ../../library/itertools.rst:56 -msgid "``chain('ABC', 'DEF') --> A B C D E F``" -msgstr "``chain('ABC', 'DEF') --> A B C D E F``" +msgid "``chain('ABC', 'DEF') → A B C D E F``" +msgstr "``chain('ABC', 'DEF') → A B C D E F``" #: ../../library/itertools.rst:57 msgid ":func:`chain.from_iterable`" @@ -185,8 +185,8 @@ msgid "iterable" msgstr "" #: ../../library/itertools.rst:57 -msgid "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" -msgstr "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" +msgid "``chain.from_iterable(['ABC', 'DEF']) → A B C D E F``" +msgstr "``chain.from_iterable(['ABC', 'DEF']) → A B C D E F``" #: ../../library/itertools.rst:58 msgid ":func:`compress`" @@ -201,8 +201,8 @@ msgid "(d[0] if s[0]), (d[1] if s[1]), ..." msgstr "(d[0] if s[0]), (d[1] if s[1]), ..." #: ../../library/itertools.rst:58 -msgid "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" -msgstr "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" +msgid "``compress('ABCDEF', [1,0,1,0,1,1]) → A C E F``" +msgstr "``compress('ABCDEF', [1,0,1,0,1,1]) → A C E F``" #: ../../library/itertools.rst:59 msgid ":func:`dropwhile`" @@ -218,8 +218,8 @@ msgid "seq[n], seq[n+1], starting when predicate fails" msgstr "" #: ../../library/itertools.rst:59 -msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" -msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" +msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) → 6 4 1``" +msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) → 6 4 1``" #: ../../library/itertools.rst:60 msgid ":func:`filterfalse`" @@ -230,8 +230,8 @@ msgid "elements of seq where predicate(elem) fails" msgstr "" #: ../../library/itertools.rst:60 -msgid "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" -msgstr "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" +msgid "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" +msgstr "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" #: ../../library/itertools.rst:61 msgid ":func:`groupby`" @@ -258,8 +258,8 @@ msgid "elements from seq[start:stop:step]" msgstr "" #: ../../library/itertools.rst:62 -msgid "``islice('ABCDEFG', 2, None) --> C D E F G``" -msgstr "``islice('ABCDEFG', 2, None) --> C D E F G``" +msgid "``islice('ABCDEFG', 2, None) → C D E F G``" +msgstr "``islice('ABCDEFG', 2, None) → C D E F G``" #: ../../library/itertools.rst:63 msgid ":func:`pairwise`" @@ -270,8 +270,8 @@ msgid "(p[0], p[1]), (p[1], p[2])" msgstr "(p[0], p[1]), (p[1], p[2])" #: ../../library/itertools.rst:63 -msgid "``pairwise('ABCDEFG') --> AB BC CD DE EF FG``" -msgstr "``pairwise('ABCDEFG') --> AB BC CD DE EF FG``" +msgid "``pairwise('ABCDEFG') → AB BC CD DE EF FG``" +msgstr "``pairwise('ABCDEFG') → AB BC CD DE EF FG``" #: ../../library/itertools.rst:64 msgid ":func:`starmap`" @@ -286,8 +286,8 @@ msgid "func(\\*seq[0]), func(\\*seq[1]), ..." msgstr "func(\\*seq[0]), func(\\*seq[1]), ..." #: ../../library/itertools.rst:64 -msgid "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" -msgstr "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" +msgid "``starmap(pow, [(2,5), (3,2), (10,3)]) → 32 9 1000``" +msgstr "``starmap(pow, [(2,5), (3,2), (10,3)]) → 32 9 1000``" #: ../../library/itertools.rst:65 msgid ":func:`takewhile`" @@ -298,8 +298,8 @@ msgid "seq[0], seq[1], until predicate fails" msgstr "" #: ../../library/itertools.rst:65 -msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" -msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" +msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" +msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" #: ../../library/itertools.rst:66 msgid ":func:`tee`" @@ -322,8 +322,8 @@ msgid "(p[0], q[0]), (p[1], q[1]), ..." msgstr "(p[0], q[0]), (p[1], q[1]), ..." #: ../../library/itertools.rst:67 -msgid "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" -msgstr "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" +msgid "``zip_longest('ABCD', 'xy', fillvalue='-') → Ax By C- D-``" +msgstr "``zip_longest('ABCD', 'xy', fillvalue='-') → Ax By C- D-``" #: ../../library/itertools.rst:70 msgid "**Combinatoric iterators:**" @@ -446,7 +446,7 @@ msgstr "" #: ../../library/itertools.rst:118 ../../library/itertools.rst:191 #: ../../library/itertools.rst:242 ../../library/itertools.rst:291 #: ../../library/itertools.rst:491 ../../library/itertools.rst:527 -#: ../../library/itertools.rst:554 ../../library/itertools.rst:634 +#: ../../library/itertools.rst:556 ../../library/itertools.rst:636 msgid "Roughly equivalent to::" msgstr "大致等價於: ::" @@ -679,56 +679,56 @@ msgid "" "values." msgstr "" -#: ../../library/itertools.rst:540 +#: ../../library/itertools.rst:542 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" -#: ../../library/itertools.rst:542 +#: ../../library/itertools.rst:544 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../library/itertools.rst:546 +#: ../../library/itertools.rst:548 msgid "" "The permutation tuples are emitted in lexicographic order according to the " "order of the input *iterable*. So, if the input *iterable* is sorted, the " "output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:550 +#: ../../library/itertools.rst:552 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, there will be no repeated values within " "a permutation." msgstr "" -#: ../../library/itertools.rst:581 +#: ../../library/itertools.rst:583 msgid "" "The code for :func:`permutations` can be also expressed as a subsequence of :" "func:`product`, filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:593 +#: ../../library/itertools.rst:595 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" -#: ../../library/itertools.rst:598 +#: ../../library/itertools.rst:600 msgid "Cartesian product of input iterables." msgstr "" -#: ../../library/itertools.rst:600 +#: ../../library/itertools.rst:602 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../library/itertools.rst:603 +#: ../../library/itertools.rst:605 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -736,39 +736,39 @@ msgid "" "sorted order." msgstr "" -#: ../../library/itertools.rst:608 +#: ../../library/itertools.rst:610 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../library/itertools.rst:612 +#: ../../library/itertools.rst:614 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../library/itertools.rst:625 +#: ../../library/itertools.rst:627 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../library/itertools.rst:631 +#: ../../library/itertools.rst:633 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" -#: ../../library/itertools.rst:645 +#: ../../library/itertools.rst:647 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" msgstr "" -#: ../../library/itertools.rst:655 +#: ../../library/itertools.rst:657 msgid "" "Make an iterator that computes the function using arguments obtained from " "the iterable. Used instead of :func:`map` when argument parameters are " @@ -776,20 +776,20 @@ msgid "" "\"pre-zipped\")." msgstr "" -#: ../../library/itertools.rst:660 +#: ../../library/itertools.rst:662 msgid "" "The difference between :func:`map` and :func:`starmap` parallels the " "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../library/itertools.rst:672 +#: ../../library/itertools.rst:674 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:683 +#: ../../library/itertools.rst:685 msgid "" "Note, the element that first fails the predicate condition is consumed from " "the input iterator and there is no way to access it. This could be an issue " @@ -799,32 +799,32 @@ msgid "" "io/en/stable/api.html#more_itertools.before_and_after>`_ instead." msgstr "" -#: ../../library/itertools.rst:694 +#: ../../library/itertools.rst:696 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:696 +#: ../../library/itertools.rst:698 msgid "" "The following Python code helps explain what *tee* does (although the actual " "implementation is more complex and uses only a single underlying :abbr:`FIFO " "(first-in, first-out)` queue)::" msgstr "" -#: ../../library/itertools.rst:715 +#: ../../library/itertools.rst:717 msgid "" "Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:719 +#: ../../library/itertools.rst:721 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:723 +#: ../../library/itertools.rst:725 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -832,7 +832,7 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:731 +#: ../../library/itertools.rst:733 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " @@ -840,7 +840,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:755 +#: ../../library/itertools.rst:757 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " @@ -848,17 +848,17 @@ msgid "" "specified, *fillvalue* defaults to ``None``." msgstr "" -#: ../../library/itertools.rst:764 +#: ../../library/itertools.rst:766 msgid "Itertools Recipes" msgstr "" -#: ../../library/itertools.rst:766 +#: ../../library/itertools.rst:768 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../library/itertools.rst:769 +#: ../../library/itertools.rst:771 msgid "" "The primary purpose of the itertools recipes is educational. The recipes " "show various ways of thinking about individual tools — for example, that " @@ -870,32 +870,32 @@ msgid "" "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" -#: ../../library/itertools.rst:778 +#: ../../library/itertools.rst:780 msgid "" "A secondary purpose of the recipes is to serve as an incubator. The " "``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " -"as recipes. Currently, the ``sliding_window()`` and ``iter_index()`` " -"recipes are being tested to see whether they prove their worth." +"as recipes. Currently, the ``sliding_window()``, ``iter_index()``, and " +"``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" -#: ../../library/itertools.rst:783 +#: ../../library/itertools.rst:785 msgid "" "Substantially all of these recipes and many, many others can be installed " -"from the `more-itertools project `_ found on the Python Package Index::" +"from the :pypi:`more-itertools` project found on the Python Package Index::" msgstr "" -#: ../../library/itertools.rst:789 +#: ../../library/itertools.rst:791 msgid "" "Many of the recipes offer the same high performance as the underlying " "toolset. Superior memory performance is kept by processing elements one at a " "time rather than bringing the whole iterable into memory all at once. Code " -"volume is kept small by linking the tools together in a functional style " -"which helps eliminate temporary variables. High speed is retained by " -"preferring \"vectorized\" building blocks over the use of for-loops and :" -"term:`generator`\\s which incur interpreter overhead." +"volume is kept small by linking the tools together in a `functional style " +"`_. High " +"speed is retained by preferring \"vectorized\" building blocks over the use " +"of for-loops and :term:`generators ` which incur interpreter " +"overhead." msgstr "" -#: ../../library/itertools.rst:982 +#: ../../library/itertools.rst:980 msgid "The following recipes have a more mathematical flavor:" msgstr "" diff --git a/library/logging.config.po b/library/logging.config.po index bae0d74453..581923e700 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1088,7 +1088,7 @@ msgid "" "`listen` documentation for more information." msgstr "" -#: ../../library/logging.config.rst:992 +#: ../../library/logging.config.rst:991 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" diff --git a/library/logging.handlers.po b/library/logging.handlers.po index b1ff60e1c6..e0330776d3 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1616,7 +1616,7 @@ msgid "" "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1196 +#: ../../library/logging.handlers.rst:1195 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" diff --git a/library/logging.po b/library/logging.po index 34fb6e54f3..c331fc7e3c 100644 --- a/library/logging.po +++ b/library/logging.po @@ -68,7 +68,33 @@ msgstr "" msgid "The simplest example:" msgstr "最簡單的示範:" -#: ../../library/logging.rst:41 +#: ../../library/logging.rst:58 +msgid "If you run *myapp.py*, you should see this in *myapp.log*:" +msgstr "" + +#: ../../library/logging.rst:66 +msgid "" +"The key feature of this idiomatic usage is that the majority of code is " +"simply creating a module level logger with ``getLogger(__name__)``, and " +"using that logger to do any needed logging. This is concise, while allowing " +"downstream code fine-grained control if needed. Logged messages to the " +"module-level logger get forwarded to handlers of loggers in higher-level " +"modules, all the way up to the highest-level logger known as the root " +"logger; this approach is known as hierarchical logging." +msgstr "" + +#: ../../library/logging.rst:74 +msgid "" +"For logging to be useful, it needs to be configured: setting the levels and " +"destinations for each logger, potentially changing how specific modules log, " +"often based on command-line arguments or application configuration. In most " +"cases, like the one above, only the root logger needs to be so configured, " +"since all the lower level loggers at module level eventually forward their " +"messages to its handlers. :func:`~logging.basicConfig` provides a quick way " +"to configure the root logger that handles many use cases." +msgstr "" + +#: ../../library/logging.rst:82 msgid "" "The module provides a lot of functionality and flexibility. If you are " "unfamiliar with logging, the best way to get to grips with it is to view the " @@ -77,37 +103,37 @@ msgstr "" "這個模組提供了很多的功能性以及彈性。如果你對於 logging 不熟悉,熟悉它最好的方" "法就是去看教學(**請看右上方的連結**)。" -#: ../../library/logging.rst:45 +#: ../../library/logging.rst:86 msgid "" -"The basic classes defined by the module, together with their functions, are " -"listed below." +"The basic classes defined by the module, together with their attributes and " +"methods, are listed in the sections below." msgstr "" -#: ../../library/logging.rst:48 +#: ../../library/logging.rst:89 msgid "Loggers expose the interface that application code directly uses." msgstr "" -#: ../../library/logging.rst:49 +#: ../../library/logging.rst:90 msgid "" "Handlers send the log records (created by loggers) to the appropriate " "destination." msgstr "" -#: ../../library/logging.rst:51 +#: ../../library/logging.rst:92 msgid "" "Filters provide a finer grained facility for determining which log records " "to output." msgstr "" -#: ../../library/logging.rst:53 +#: ../../library/logging.rst:94 msgid "Formatters specify the layout of log records in the final output." msgstr "格式器指定日誌記錄在最終輸出中的佈局。" -#: ../../library/logging.rst:59 +#: ../../library/logging.rst:100 msgid "Logger Objects" -msgstr "" +msgstr "Logger 物件" -#: ../../library/logging.rst:61 +#: ../../library/logging.rst:102 msgid "" "Loggers have the following attributes and methods. Note that Loggers should " "*NEVER* be instantiated directly, but always through the module-level " @@ -115,7 +141,7 @@ msgid "" "with the same name will always return a reference to the same Logger object." msgstr "" -#: ../../library/logging.rst:66 +#: ../../library/logging.rst:107 msgid "" "The ``name`` is potentially a period-separated hierarchical value, like " "``foo.bar.baz`` (though it could also be just plain ``foo``, for example). " @@ -129,7 +155,37 @@ msgid "" "module's name in the Python package namespace." msgstr "" -#: ../../library/logging.rst:82 +#: ../../library/logging.rst:123 +msgid "" +"This is the logger's name, and is the value that was passed to :func:" +"`getLogger` to obtain the logger." +msgstr "" + +#: ../../library/logging.rst:126 ../../library/logging.rst:186 +msgid "This attribute should be treated as read-only." +msgstr "" + +#: ../../library/logging.rst:130 +msgid "The threshold of this logger, as set by the :meth:`setLevel` method." +msgstr "" + +#: ../../library/logging.rst:132 +msgid "" +"Do not set this attribute directly - always use :meth:`setLevel`, which has " +"checks for the level passed to it." +msgstr "" + +#: ../../library/logging.rst:137 +msgid "" +"The parent logger of this logger. It may change based on later instantiation " +"of loggers which are higher up in the namespace hierarchy." +msgstr "" + +#: ../../library/logging.rst:140 +msgid "This value should be treated as read-only." +msgstr "" + +#: ../../library/logging.rst:144 msgid "" "If this attribute evaluates to true, events logged to this logger will be " "passed to the handlers of higher level (ancestor) loggers, in addition to " @@ -141,13 +197,13 @@ msgstr "" "記錄器 的處理函式和所有附加在此日誌記錄器的任何處理器。訊息會直接傳到上代 " "loggers 的處理器 - 在問題中上代日誌記錄器的層級或是篩選器都不會被考慮。" -#: ../../library/logging.rst:88 +#: ../../library/logging.rst:150 msgid "" "If this evaluates to false, logging messages are not passed to the handlers " "of ancestor loggers." msgstr "" -#: ../../library/logging.rst:91 +#: ../../library/logging.rst:153 msgid "" "Spelling it out with an example: If the propagate attribute of the logger " "named ``A.B.C`` evaluates to true, any event logged to ``A.B.C`` via a " @@ -160,11 +216,11 @@ msgid "" "handle, and propagation stops at that point." msgstr "" -#: ../../library/logging.rst:100 +#: ../../library/logging.rst:162 msgid "The constructor sets this attribute to ``True``." msgstr "此建構函式將該屬性設為 ``True``。" -#: ../../library/logging.rst:102 +#: ../../library/logging.rst:164 msgid "" "If you attach a handler to a logger *and* one or more of its ancestors, it " "may emit the same record multiple times. In general, you should not need to " @@ -176,7 +232,24 @@ msgid "" "rest." msgstr "" -#: ../../library/logging.rst:113 +#: ../../library/logging.rst:175 +msgid "The list of handlers directly attached to this logger instance." +msgstr "" + +#: ../../library/logging.rst:177 +msgid "" +"This attribute should be treated as read-only; it is normally changed via " +"the :meth:`addHandler` and :meth:`removeHandler` methods, which use locks to " +"ensure thread-safe operation." +msgstr "" + +#: ../../library/logging.rst:183 +msgid "" +"This attribute disables handling of any events. It is set to ``False`` in " +"the initializer, and only changed by logging configuration code." +msgstr "" + +#: ../../library/logging.rst:190 msgid "" "Sets the threshold for this logger to *level*. Logging messages which are " "less severe than *level* will be ignored; logging messages which have " @@ -185,7 +258,7 @@ msgid "" "severity level than *level*." msgstr "" -#: ../../library/logging.rst:118 +#: ../../library/logging.rst:195 msgid "" "When a logger is created, the level is set to :const:`NOTSET` (which causes " "all messages to be processed when the logger is the root logger, or " @@ -196,32 +269,32 @@ msgstr "" "是根日誌記錄器,或是代表父日誌記錄器的非根日誌記錄器時,會使所有訊息被處" "理)。請注意根日誌記錄器會以記錄等級 :const:`WARNING` 被建立。" -#: ../../library/logging.rst:123 +#: ../../library/logging.rst:200 msgid "" "The term 'delegation to the parent' means that if a logger has a level of " "NOTSET, its chain of ancestor loggers is traversed until either an ancestor " "with a level other than NOTSET is found, or the root is reached." msgstr "" -#: ../../library/logging.rst:127 +#: ../../library/logging.rst:204 msgid "" "If an ancestor is found with a level other than NOTSET, then that ancestor's " "level is treated as the effective level of the logger where the ancestor " "search began, and is used to determine how a logging event is handled." msgstr "" -#: ../../library/logging.rst:131 +#: ../../library/logging.rst:208 msgid "" "If the root is reached, and it has a level of NOTSET, then all messages will " "be processed. Otherwise, the root's level will be used as the effective " "level." msgstr "" -#: ../../library/logging.rst:134 ../../library/logging.rst:477 +#: ../../library/logging.rst:211 ../../library/logging.rst:554 msgid "See :ref:`levels` for a list of levels." msgstr "層級清單請見 :ref:`levels`\\ 。" -#: ../../library/logging.rst:136 +#: ../../library/logging.rst:213 msgid "" "The *level* parameter now accepts a string representation of the level such " "as 'INFO' as an alternative to the integer constants such as :const:`INFO`. " @@ -230,7 +303,7 @@ msgid "" "expect to be passed integers." msgstr "" -#: ../../library/logging.rst:146 +#: ../../library/logging.rst:223 msgid "" "Indicates if a message of severity *level* would be processed by this " "logger. This method checks first the module-level level set by ``logging." @@ -238,7 +311,7 @@ msgid "" "meth:`getEffectiveLevel`." msgstr "" -#: ../../library/logging.rst:154 +#: ../../library/logging.rst:231 msgid "" "Indicates the effective level for this logger. If a value other than :const:" "`NOTSET` has been set using :meth:`setLevel`, it is returned. Otherwise, the " @@ -247,7 +320,7 @@ msgid "" "integer, typically one of :const:`logging.DEBUG`, :const:`logging.INFO` etc." msgstr "" -#: ../../library/logging.rst:164 +#: ../../library/logging.rst:241 msgid "" "Returns a logger which is a descendant to this logger, as determined by the " "suffix. Thus, ``logging.getLogger('abc').getChild('def.ghi')`` would return " @@ -256,7 +329,7 @@ msgid "" "named using e.g. ``__name__`` rather than a literal string." msgstr "" -#: ../../library/logging.rst:175 +#: ../../library/logging.rst:252 msgid "" "Returns a set of loggers which are immediate children of this logger. So for " "example ``logging.getLogger().getChildren()`` might return a set containing " @@ -266,7 +339,7 @@ msgid "" "include one named ``foo.bar.baz``." msgstr "" -#: ../../library/logging.rst:187 +#: ../../library/logging.rst:264 msgid "" "Logs a message with level :const:`DEBUG` on this logger. The *msg* is the " "message format string, and the *args* are the arguments which are merged " @@ -276,13 +349,13 @@ msgid "" "are supplied." msgstr "" -#: ../../library/logging.rst:193 +#: ../../library/logging.rst:270 msgid "" "There are four keyword arguments in *kwargs* which are inspected: " "*exc_info*, *stack_info*, *stacklevel* and *extra*." msgstr "" -#: ../../library/logging.rst:196 +#: ../../library/logging.rst:273 msgid "" "If *exc_info* does not evaluate as false, it causes exception information to " "be added to the logging message. If an exception tuple (in the format " @@ -291,7 +364,7 @@ msgid "" "information." msgstr "" -#: ../../library/logging.rst:201 ../../library/logging.rst:1116 +#: ../../library/logging.rst:278 msgid "" "The second optional keyword argument is *stack_info*, which defaults to " "``False``. If true, stack information is added to the logging message, " @@ -303,20 +376,20 @@ msgid "" "handlers." msgstr "" -#: ../../library/logging.rst:210 ../../library/logging.rst:1125 +#: ../../library/logging.rst:287 msgid "" "You can specify *stack_info* independently of *exc_info*, e.g. to just show " "how you got to a certain point in your code, even when no exceptions were " "raised. The stack frames are printed following a header line which says:" msgstr "" -#: ../../library/logging.rst:218 ../../library/logging.rst:1133 +#: ../../library/logging.rst:295 msgid "" "This mimics the ``Traceback (most recent call last):`` which is used when " "displaying exception frames." msgstr "" -#: ../../library/logging.rst:221 +#: ../../library/logging.rst:298 msgid "" "The third optional keyword argument is *stacklevel*, which defaults to " "``1``. If greater than 1, the corresponding number of stack frames are " @@ -328,7 +401,7 @@ msgid "" "module." msgstr "" -#: ../../library/logging.rst:229 +#: ../../library/logging.rst:306 msgid "" "The fourth keyword argument is *extra* which can be used to pass a " "dictionary which is used to populate the __dict__ of the :class:`LogRecord` " @@ -337,18 +410,18 @@ msgid "" "incorporated into logged messages. For example::" msgstr "" -#: ../../library/logging.rst:241 +#: ../../library/logging.rst:318 msgid "would print something like" msgstr "" -#: ../../library/logging.rst:247 +#: ../../library/logging.rst:324 msgid "" "The keys in the dictionary passed in *extra* should not clash with the keys " "used by the logging system. (See the section on :ref:`logrecord-attributes` " "for more information on which keys are used by the logging system.)" msgstr "" -#: ../../library/logging.rst:251 +#: ../../library/logging.rst:328 msgid "" "If you choose to use these attributes in logged messages, you need to " "exercise some care. In the above example, for instance, the :class:" @@ -359,7 +432,7 @@ msgid "" "dictionary with these keys." msgstr "" -#: ../../library/logging.rst:258 ../../library/logging.rst:1164 +#: ../../library/logging.rst:335 msgid "" "While this might be annoying, this feature is intended for use in " "specialized circumstances, such as multi-threaded servers where the same " @@ -370,32 +443,32 @@ msgid "" "particular :class:`Handler`\\ s." msgstr "" -#: ../../library/logging.rst:265 +#: ../../library/logging.rst:342 msgid "" "If no handler is attached to this logger (or any of its ancestors, taking " "into account the relevant :attr:`Logger.propagate` attributes), the message " "will be sent to the handler set on :attr:`lastResort`." msgstr "" -#: ../../library/logging.rst:269 ../../library/logging.rst:1175 +#: ../../library/logging.rst:346 msgid "The *stack_info* parameter was added." msgstr "新增 *stack_info* 參數。" -#: ../../library/logging.rst:272 +#: ../../library/logging.rst:349 msgid "The *exc_info* parameter can now accept exception instances." msgstr "" -#: ../../library/logging.rst:275 +#: ../../library/logging.rst:352 msgid "The *stacklevel* parameter was added." msgstr "新增 *stacklevel* 參數。" -#: ../../library/logging.rst:281 +#: ../../library/logging.rst:358 msgid "" "Logs a message with level :const:`INFO` on this logger. The arguments are " "interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:287 +#: ../../library/logging.rst:364 msgid "" "Logs a message with level :const:`WARNING` on this logger. The arguments are " "interpreted as for :meth:`debug`." @@ -403,47 +476,47 @@ msgstr "" "在此記錄器上記錄一條層級為 :const:`WARNING` 的訊息。這些引數被直譯的方式與 :" "meth:`debug` 相同。" -#: ../../library/logging.rst:290 +#: ../../library/logging.rst:367 msgid "" "There is an obsolete method ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:296 +#: ../../library/logging.rst:373 msgid "" "Logs a message with level :const:`ERROR` on this logger. The arguments are " "interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:302 +#: ../../library/logging.rst:379 msgid "" "Logs a message with level :const:`CRITICAL` on this logger. The arguments " "are interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:308 +#: ../../library/logging.rst:385 msgid "" "Logs a message with integer level *level* on this logger. The other " "arguments are interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:314 +#: ../../library/logging.rst:391 msgid "" "Logs a message with level :const:`ERROR` on this logger. The arguments are " "interpreted as for :meth:`debug`. Exception info is added to the logging " "message. This method should only be called from an exception handler." msgstr "" -#: ../../library/logging.rst:321 +#: ../../library/logging.rst:398 msgid "Adds the specified filter *filter* to this logger." msgstr "在該 logger 內增加指定的 filter *filter*。" -#: ../../library/logging.rst:326 +#: ../../library/logging.rst:403 msgid "Removes the specified filter *filter* from this logger." msgstr "在該 logger 內移除指定的 filter *filter*。" -#: ../../library/logging.rst:331 +#: ../../library/logging.rst:408 msgid "" "Apply this logger's filters to the record and return ``True`` if the record " "is to be processed. The filters are consulted in turn, until one of them " @@ -452,22 +525,22 @@ msgid "" "processing of the record occurs." msgstr "" -#: ../../library/logging.rst:340 +#: ../../library/logging.rst:417 msgid "Adds the specified handler *hdlr* to this logger." msgstr "" -#: ../../library/logging.rst:345 +#: ../../library/logging.rst:422 msgid "Removes the specified handler *hdlr* from this logger." msgstr "" -#: ../../library/logging.rst:350 +#: ../../library/logging.rst:427 msgid "" "Finds the caller's source filename and line number. Returns the filename, " "line number, function name and stack information as a 4-element tuple. The " "stack information is returned as ``None`` unless *stack_info* is ``True``." msgstr "" -#: ../../library/logging.rst:354 +#: ../../library/logging.rst:431 msgid "" "The *stacklevel* parameter is passed from code calling the :meth:`debug` and " "other APIs. If greater than 1, the excess is used to skip stack frames " @@ -477,7 +550,7 @@ msgid "" "calls it." msgstr "" -#: ../../library/logging.rst:364 +#: ../../library/logging.rst:441 msgid "" "Handles a record by passing it to all handlers associated with this logger " "and its ancestors (until a false value of *propagate* is found). This method " @@ -486,13 +559,13 @@ msgid "" "filter`." msgstr "" -#: ../../library/logging.rst:372 +#: ../../library/logging.rst:449 msgid "" "This is a factory method which can be overridden in subclasses to create " "specialized :class:`LogRecord` instances." msgstr "" -#: ../../library/logging.rst:377 +#: ../../library/logging.rst:454 msgid "" "Checks to see if this logger has any handlers configured. This is done by " "looking for handlers in this logger and its parents in the logger hierarchy. " @@ -502,15 +575,15 @@ msgid "" "the existence of handlers." msgstr "" -#: ../../library/logging.rst:386 +#: ../../library/logging.rst:463 msgid "Loggers can now be pickled and unpickled." msgstr "" -#: ../../library/logging.rst:392 +#: ../../library/logging.rst:469 msgid "Logging Levels" msgstr "" -#: ../../library/logging.rst:394 +#: ../../library/logging.rst:471 msgid "" "The numeric values of logging levels are given in the following table. These " "are primarily of interest if you want to define your own levels, and need " @@ -519,83 +592,83 @@ msgid "" "value; the predefined name is lost." msgstr "" -#: ../../library/logging.rst:401 +#: ../../library/logging.rst:478 msgid "Level" msgstr "" -#: ../../library/logging.rst:401 +#: ../../library/logging.rst:478 msgid "Numeric value" msgstr "" -#: ../../library/logging.rst:401 +#: ../../library/logging.rst:478 msgid "What it means / When to use it" msgstr "" -#: ../../library/logging.rst:403 +#: ../../library/logging.rst:480 msgid "0" msgstr "0" -#: ../../library/logging.rst:403 +#: ../../library/logging.rst:480 msgid "" "When set on a logger, indicates that ancestor loggers are to be consulted to " "determine the effective level. If that still resolves to :const:`!NOTSET`, " "then all events are logged. When set on a handler, all events are handled." msgstr "" -#: ../../library/logging.rst:411 +#: ../../library/logging.rst:488 msgid "10" msgstr "10" -#: ../../library/logging.rst:411 +#: ../../library/logging.rst:488 msgid "" "Detailed information, typically only of interest to a developer trying to " "diagnose a problem." msgstr "" -#: ../../library/logging.rst:415 +#: ../../library/logging.rst:492 msgid "20" msgstr "20" -#: ../../library/logging.rst:415 +#: ../../library/logging.rst:492 msgid "Confirmation that things are working as expected." msgstr "" -#: ../../library/logging.rst:418 +#: ../../library/logging.rst:495 msgid "30" msgstr "30" -#: ../../library/logging.rst:418 +#: ../../library/logging.rst:495 msgid "" "An indication that something unexpected happened, or that a problem might " "occur in the near future (e.g. 'disk space low'). The software is still " "working as expected." msgstr "" -#: ../../library/logging.rst:425 +#: ../../library/logging.rst:502 msgid "40" msgstr "40" -#: ../../library/logging.rst:425 +#: ../../library/logging.rst:502 msgid "" "Due to a more serious problem, the software has not been able to perform " "some function." msgstr "" -#: ../../library/logging.rst:429 +#: ../../library/logging.rst:506 msgid "50" msgstr "50" -#: ../../library/logging.rst:429 +#: ../../library/logging.rst:506 msgid "" "A serious error, indicating that the program itself may be unable to " "continue running." msgstr "" -#: ../../library/logging.rst:438 +#: ../../library/logging.rst:515 msgid "Handler Objects" msgstr "" -#: ../../library/logging.rst:440 +#: ../../library/logging.rst:517 msgid "" "Handlers have the following attributes and methods. Note that :class:" "`Handler` is never instantiated directly; this class acts as a base for more " @@ -603,53 +676,53 @@ msgid "" "to call :meth:`Handler.__init__`." msgstr "" -#: ../../library/logging.rst:449 +#: ../../library/logging.rst:526 msgid "" "Initializes the :class:`Handler` instance by setting its level, setting the " "list of filters to the empty list and creating a lock (using :meth:" "`createLock`) for serializing access to an I/O mechanism." msgstr "" -#: ../../library/logging.rst:456 +#: ../../library/logging.rst:533 msgid "" "Initializes a thread lock which can be used to serialize access to " "underlying I/O functionality which may not be threadsafe." msgstr "" -#: ../../library/logging.rst:462 +#: ../../library/logging.rst:539 msgid "Acquires the thread lock created with :meth:`createLock`." msgstr "" -#: ../../library/logging.rst:467 +#: ../../library/logging.rst:544 msgid "Releases the thread lock acquired with :meth:`acquire`." msgstr "" -#: ../../library/logging.rst:472 +#: ../../library/logging.rst:549 msgid "" "Sets the threshold for this handler to *level*. Logging messages which are " "less severe than *level* will be ignored. When a handler is created, the " "level is set to :const:`NOTSET` (which causes all messages to be processed)." msgstr "" -#: ../../library/logging.rst:479 +#: ../../library/logging.rst:556 msgid "" "The *level* parameter now accepts a string representation of the level such " "as 'INFO' as an alternative to the integer constants such as :const:`INFO`." msgstr "" -#: ../../library/logging.rst:487 +#: ../../library/logging.rst:564 msgid "Sets the :class:`Formatter` for this handler to *fmt*." msgstr "" -#: ../../library/logging.rst:492 +#: ../../library/logging.rst:569 msgid "Adds the specified filter *filter* to this handler." msgstr "" -#: ../../library/logging.rst:497 +#: ../../library/logging.rst:574 msgid "Removes the specified filter *filter* from this handler." msgstr "" -#: ../../library/logging.rst:502 +#: ../../library/logging.rst:579 msgid "" "Apply this handler's filters to the record and return ``True`` if the record " "is to be processed. The filters are consulted in turn, until one of them " @@ -658,13 +731,13 @@ msgid "" "record." msgstr "" -#: ../../library/logging.rst:511 +#: ../../library/logging.rst:588 msgid "" "Ensure all logging output has been flushed. This version does nothing and is " "intended to be implemented by subclasses." msgstr "" -#: ../../library/logging.rst:517 +#: ../../library/logging.rst:594 msgid "" "Tidy up any resources used by the handler. This version does no output but " "removes the handler from an internal list of handlers which is closed when :" @@ -672,14 +745,14 @@ msgid "" "from overridden :meth:`close` methods." msgstr "" -#: ../../library/logging.rst:525 +#: ../../library/logging.rst:602 msgid "" "Conditionally emits the specified logging record, depending on filters which " "may have been added to the handler. Wraps the actual emission of the record " "with acquisition/release of the I/O thread lock." msgstr "" -#: ../../library/logging.rst:532 +#: ../../library/logging.rst:609 msgid "" "This method should be called from handlers when an exception is encountered " "during an :meth:`emit` call. If the module-level attribute :data:" @@ -692,20 +765,20 @@ msgid "" "is more useful during development)." msgstr "" -#: ../../library/logging.rst:545 +#: ../../library/logging.rst:622 msgid "" "Do formatting for a record - if a formatter is set, use it. Otherwise, use " "the default formatter for the module." msgstr "" -#: ../../library/logging.rst:551 +#: ../../library/logging.rst:628 msgid "" "Do whatever it takes to actually log the specified logging record. This " "version is intended to be implemented by subclasses and so raises a :exc:" "`NotImplementedError`." msgstr "" -#: ../../library/logging.rst:555 +#: ../../library/logging.rst:632 msgid "" "This method is called after a handler-level lock is acquired, which is " "released after this method returns. When you override this method, note that " @@ -714,13 +787,13 @@ msgid "" "Specifically:" msgstr "" -#: ../../library/logging.rst:561 +#: ../../library/logging.rst:638 msgid "" "Logging configuration APIs acquire the module-level lock, and then " "individual handler-level locks as those handlers are configured." msgstr "" -#: ../../library/logging.rst:564 +#: ../../library/logging.rst:641 msgid "" "Many logging APIs lock the module-level lock. If such an API is called from " "this method, it could cause a deadlock if a configuration call is made on " @@ -730,16 +803,16 @@ msgid "" "method, the handler-level lock has already been acquired)." msgstr "" -#: ../../library/logging.rst:571 +#: ../../library/logging.rst:648 msgid "" "For a list of handlers included as standard, see :mod:`logging.handlers`." msgstr "" -#: ../../library/logging.rst:576 +#: ../../library/logging.rst:653 msgid "Formatter Objects" msgstr "" -#: ../../library/logging.rst:582 +#: ../../library/logging.rst:659 msgid "" "Responsible for converting a :class:`LogRecord` to an output string to be " "interpreted by a human or external system." @@ -749,7 +822,7 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../library/logging.rst:585 +#: ../../library/logging.rst:662 msgid "" "A format string in the given *style* for the logged output as a whole. The " "possible mapping keys are drawn from the :class:`LogRecord` object's :ref:" @@ -757,14 +830,14 @@ msgid "" "is just the logged message." msgstr "" -#: ../../library/logging.rst:593 +#: ../../library/logging.rst:670 msgid "" "A format string in the given *style* for the date/time portion of the logged " "output. If not specified, the default described in :meth:`formatTime` is " "used." msgstr "" -#: ../../library/logging.rst:598 +#: ../../library/logging.rst:675 msgid "" "Can be one of ``'%'``, ``'{'`` or ``'$'`` and determines how the format " "string will be merged with its data: using one of :ref:`old-string-" @@ -775,32 +848,32 @@ msgid "" "use ``{``- and ``$``-formatting for log messages." msgstr "" -#: ../../library/logging.rst:608 +#: ../../library/logging.rst:685 msgid "" "If ``True`` (the default), incorrect or mismatched *fmt* and *style* will " "raise a :exc:`ValueError`; for example, ``logging.Formatter('%(asctime)s - " "%(message)s', style='{')``." msgstr "" -#: ../../library/logging.rst:613 +#: ../../library/logging.rst:690 msgid "" "A dictionary with default values to use in custom fields. For example, " "``logging.Formatter('%(ip)s %(message)s', defaults={\"ip\": None})``" msgstr "" -#: ../../library/logging.rst:618 +#: ../../library/logging.rst:695 msgid "Added the *style* parameter." msgstr "新增 *style* 參數。" -#: ../../library/logging.rst:621 +#: ../../library/logging.rst:698 msgid "Added the *validate* parameter." msgstr "新增 *validate* 參數。" -#: ../../library/logging.rst:624 +#: ../../library/logging.rst:701 msgid "Added the *defaults* parameter." msgstr "新增 *defaults* 參數。" -#: ../../library/logging.rst:630 +#: ../../library/logging.rst:707 msgid "" "The record's attribute dictionary is used as the operand to a string " "formatting operation. Returns the resulting string. Before formatting the " @@ -819,13 +892,13 @@ msgid "" "recalculates it afresh." msgstr "" -#: ../../library/logging.rst:646 +#: ../../library/logging.rst:723 msgid "" "If stack information is available, it's appended after the exception " "information, using :meth:`formatStack` to transform it if necessary." msgstr "" -#: ../../library/logging.rst:652 +#: ../../library/logging.rst:729 msgid "" "This method should be called from :meth:`format` by a formatter which wants " "to make use of a formatted time. This method can be overridden in formatters " @@ -838,7 +911,7 @@ msgid "" "resulting string is returned." msgstr "" -#: ../../library/logging.rst:662 +#: ../../library/logging.rst:739 msgid "" "This function uses a user-configurable function to convert the creation time " "to a tuple. By default, :func:`time.localtime` is used; to change this for a " @@ -848,7 +921,7 @@ msgid "" "be shown in GMT, set the ``converter`` attribute in the ``Formatter`` class." msgstr "" -#: ../../library/logging.rst:670 +#: ../../library/logging.rst:747 msgid "" "Previously, the default format was hard-coded as in this example: " "``2010-09-06 22:38:15,292`` where the part before the comma is handled by a " @@ -863,11 +936,11 @@ msgid "" "the millisecond value)." msgstr "" -#: ../../library/logging.rst:683 +#: ../../library/logging.rst:760 msgid "The ``default_msec_format`` can be ``None``." msgstr "" -#: ../../library/logging.rst:688 +#: ../../library/logging.rst:765 msgid "" "Formats the specified exception information (a standard exception tuple as " "returned by :func:`sys.exc_info`) as a string. This default implementation " @@ -875,14 +948,14 @@ msgid "" "returned." msgstr "" -#: ../../library/logging.rst:695 +#: ../../library/logging.rst:772 msgid "" "Formats the specified stack information (a string as returned by :func:" "`traceback.print_stack`, but with the last newline removed) as a string. " "This default implementation just returns the input value." msgstr "" -#: ../../library/logging.rst:701 +#: ../../library/logging.rst:778 msgid "" "A base formatter class suitable for subclassing when you want to format a " "number of records. You can pass a :class:`Formatter` instance which you want " @@ -891,7 +964,7 @@ msgid "" "used as the line formatter." msgstr "" -#: ../../library/logging.rst:709 +#: ../../library/logging.rst:786 msgid "" "Return a header for a list of *records*. The base implementation just " "returns the empty string. You will need to override this method if you want " @@ -899,14 +972,14 @@ msgid "" "separator line." msgstr "" -#: ../../library/logging.rst:716 +#: ../../library/logging.rst:793 msgid "" "Return a footer for a list of *records*. The base implementation just " "returns the empty string. You will need to override this method if you want " "specific behaviour, e.g. to show the count of records or a separator line." msgstr "" -#: ../../library/logging.rst:723 +#: ../../library/logging.rst:800 msgid "" "Return formatted text for a list of *records*. The base implementation just " "returns the empty string if there are no records; otherwise, it returns the " @@ -914,11 +987,11 @@ msgid "" "and the footer." msgstr "" -#: ../../library/logging.rst:731 +#: ../../library/logging.rst:808 msgid "Filter Objects" msgstr "" -#: ../../library/logging.rst:733 +#: ../../library/logging.rst:810 msgid "" "``Filters`` can be used by ``Handlers`` and ``Loggers`` for more " "sophisticated filtering than is provided by levels. The base filter class " @@ -928,7 +1001,7 @@ msgid "" "If initialized with the empty string, all events are passed." msgstr "" -#: ../../library/logging.rst:743 +#: ../../library/logging.rst:820 msgid "" "Returns an instance of the :class:`Filter` class. If *name* is specified, it " "names a logger which, together with its children, will have its events " @@ -936,7 +1009,7 @@ msgid "" "event." msgstr "" -#: ../../library/logging.rst:750 +#: ../../library/logging.rst:827 msgid "" "Is the specified record to be logged? Returns false for no, true for yes. " "Filters can either modify log records in-place or return a completely " @@ -944,7 +1017,7 @@ msgid "" "future processing of the event." msgstr "" -#: ../../library/logging.rst:755 +#: ../../library/logging.rst:832 msgid "" "Note that filters attached to handlers are consulted before an event is " "emitted by the handler, whereas filters attached to loggers are consulted " @@ -954,13 +1027,13 @@ msgid "" "setting, unless the filter has also been applied to those descendant loggers." msgstr "" -#: ../../library/logging.rst:762 +#: ../../library/logging.rst:839 msgid "" "You don't actually need to subclass ``Filter``: you can pass any instance " "which has a ``filter`` method with the same semantics." msgstr "" -#: ../../library/logging.rst:765 +#: ../../library/logging.rst:842 msgid "" "You don't need to create specialized ``Filter`` classes, or use other " "classes with a ``filter`` method: you can use a function (or other callable) " @@ -971,7 +1044,7 @@ msgid "" "value should conform to that returned by :meth:`~Filter.filter`." msgstr "" -#: ../../library/logging.rst:775 +#: ../../library/logging.rst:852 msgid "" "You can now return a :class:`LogRecord` instance from filters to replace the " "log record rather than modifying it in place. This allows filters attached " @@ -979,7 +1052,7 @@ msgid "" "having side effects on other handlers." msgstr "" -#: ../../library/logging.rst:781 +#: ../../library/logging.rst:858 msgid "" "Although filters are used primarily to filter records based on more " "sophisticated criteria than levels, they get to see every record which is " @@ -991,11 +1064,11 @@ msgid "" "contextual information into logs (see :ref:`filters-contextual`)." msgstr "" -#: ../../library/logging.rst:794 +#: ../../library/logging.rst:871 msgid "LogRecord Objects" msgstr "LogRecord 物件" -#: ../../library/logging.rst:796 +#: ../../library/logging.rst:873 msgid "" ":class:`LogRecord` instances are created automatically by the :class:" "`Logger` every time something is logged, and can be created manually via :" @@ -1003,17 +1076,17 @@ msgid "" "wire)." msgstr "" -#: ../../library/logging.rst:804 +#: ../../library/logging.rst:881 msgid "Contains all the information pertinent to the event being logged." msgstr "" -#: ../../library/logging.rst:806 +#: ../../library/logging.rst:883 msgid "" "The primary information is passed in *msg* and *args*, which are combined " "using ``msg % args`` to create the :attr:`!message` attribute of the record." msgstr "" -#: ../../library/logging.rst:810 +#: ../../library/logging.rst:887 msgid "" "The name of the logger used to log the event represented by this :class:`!" "LogRecord`. Note that the logger name in the :class:`!LogRecord` will always " @@ -1021,7 +1094,7 @@ msgid "" "different (ancestor) logger." msgstr "" -#: ../../library/logging.rst:818 +#: ../../library/logging.rst:895 msgid "" "The :ref:`numeric level ` of the logging event (such as ``10`` for " "``DEBUG``, ``20`` for ``INFO``, etc). Note that this is converted to *two* " @@ -1029,46 +1102,46 @@ msgid "" "attr:`!levelname` for the corresponding level name." msgstr "" -#: ../../library/logging.rst:825 +#: ../../library/logging.rst:902 msgid "" "The full string path of the source file where the logging call was made." msgstr "" -#: ../../library/logging.rst:829 +#: ../../library/logging.rst:906 msgid "The line number in the source file where the logging call was made." msgstr "" -#: ../../library/logging.rst:833 +#: ../../library/logging.rst:910 msgid "" "The event description message, which can be a %-format string with " "placeholders for variable data, or an arbitrary object (see :ref:`arbitrary-" "object-messages`)." msgstr "" -#: ../../library/logging.rst:838 +#: ../../library/logging.rst:915 msgid "" "Variable data to merge into the *msg* argument to obtain the event " "description." msgstr "" -#: ../../library/logging.rst:842 +#: ../../library/logging.rst:919 msgid "" "An exception tuple with the current exception information, as returned by :" "func:`sys.exc_info`, or ``None`` if no exception information is available." msgstr "" -#: ../../library/logging.rst:847 +#: ../../library/logging.rst:924 msgid "" "The name of the function or method from which the logging call was invoked." msgstr "" -#: ../../library/logging.rst:851 +#: ../../library/logging.rst:928 msgid "" "A text string representing stack information from the base of the stack in " "the current thread, up to the logging call." msgstr "" -#: ../../library/logging.rst:858 +#: ../../library/logging.rst:935 msgid "" "Returns the message for this :class:`LogRecord` instance after merging any " "user-supplied arguments with the message. If the user-supplied message " @@ -1077,7 +1150,7 @@ msgid "" "whose ``__str__`` method can return the actual format string to be used." msgstr "" -#: ../../library/logging.rst:865 +#: ../../library/logging.rst:942 msgid "" "The creation of a :class:`LogRecord` has been made more configurable by " "providing a factory which is used to create the record. The factory can be " @@ -1085,24 +1158,24 @@ msgid "" "this for the factory's signature)." msgstr "" -#: ../../library/logging.rst:871 +#: ../../library/logging.rst:948 msgid "" "This functionality can be used to inject your own values into a :class:" "`LogRecord` at creation time. You can use the following pattern::" msgstr "" -#: ../../library/logging.rst:883 +#: ../../library/logging.rst:960 msgid "" "With this pattern, multiple factories could be chained, and as long as they " "don't overwrite each other's attributes or unintentionally overwrite the " "standard attributes listed above, there should be no surprises." msgstr "" -#: ../../library/logging.rst:892 +#: ../../library/logging.rst:969 msgid "LogRecord attributes" msgstr "" -#: ../../library/logging.rst:894 +#: ../../library/logging.rst:971 msgid "" "The LogRecord has a number of attributes, most of which are derived from the " "parameters to the constructor. (Note that the names do not always correspond " @@ -1113,7 +1186,7 @@ msgid "" "style format string." msgstr "" -#: ../../library/logging.rst:902 +#: ../../library/logging.rst:979 msgid "" "If you are using {}-formatting (:func:`str.format`), you can use ``{attrname}" "`` as the placeholder in the format string. If you are using $-formatting (:" @@ -1121,7 +1194,7 @@ msgid "" "course, replace ``attrname`` with the actual attribute name you want to use." msgstr "" -#: ../../library/logging.rst:908 +#: ../../library/logging.rst:985 msgid "" "In the case of {}-formatting, you can specify formatting flags by placing " "them after the attribute name, separated from it with a colon. For example: " @@ -1130,324 +1203,324 @@ msgid "" "on the options available to you." msgstr "" -#: ../../library/logging.rst:915 +#: ../../library/logging.rst:992 msgid "Attribute name" msgstr "" -#: ../../library/logging.rst:915 ../../library/logging.rst:1333 +#: ../../library/logging.rst:992 ../../library/logging.rst:1352 msgid "Format" msgstr "格式" -#: ../../library/logging.rst:915 ../../library/logging.rst:1333 +#: ../../library/logging.rst:992 ../../library/logging.rst:1352 msgid "Description" msgstr "描述" -#: ../../library/logging.rst:0 ../../library/logging.rst:917 +#: ../../library/logging.rst:0 ../../library/logging.rst:994 msgid "args" msgstr "" -#: ../../library/logging.rst:917 ../../library/logging.rst:931 -#: ../../library/logging.rst:959 ../../library/logging.rst:977 +#: ../../library/logging.rst:994 ../../library/logging.rst:1008 +#: ../../library/logging.rst:1036 ../../library/logging.rst:1054 msgid "You shouldn't need to format this yourself." msgstr "你不應該需要自己格式化它。" -#: ../../library/logging.rst:917 +#: ../../library/logging.rst:994 msgid "" "The tuple of arguments merged into ``msg`` to produce ``message``, or a dict " "whose values are used for the merge (when there is only one argument, and it " "is a dictionary)." msgstr "" -#: ../../library/logging.rst:922 +#: ../../library/logging.rst:999 msgid "asctime" msgstr "" -#: ../../library/logging.rst:922 +#: ../../library/logging.rst:999 msgid "``%(asctime)s``" msgstr "``%(asctime)s``" -#: ../../library/logging.rst:922 +#: ../../library/logging.rst:999 msgid "" "Human-readable time when the :class:`LogRecord` was created. By default " "this is of the form '2003-07-08 16:49:45,896' (the numbers after the comma " "are millisecond portion of the time)." msgstr "" -#: ../../library/logging.rst:928 +#: ../../library/logging.rst:1005 msgid "created" msgstr "" -#: ../../library/logging.rst:928 +#: ../../library/logging.rst:1005 msgid "``%(created)f``" msgstr "``%(created)f``" -#: ../../library/logging.rst:928 +#: ../../library/logging.rst:1005 msgid "" "Time when the :class:`LogRecord` was created (as returned by :func:`time." "time`)." msgstr "" -#: ../../library/logging.rst:0 ../../library/logging.rst:931 +#: ../../library/logging.rst:0 ../../library/logging.rst:1008 msgid "exc_info" msgstr "exc_info" -#: ../../library/logging.rst:931 +#: ../../library/logging.rst:1008 msgid "" "Exception tuple (à la ``sys.exc_info``) or, if no exception has occurred, " "``None``." msgstr "" -#: ../../library/logging.rst:934 +#: ../../library/logging.rst:1011 msgid "filename" msgstr "filename" -#: ../../library/logging.rst:934 +#: ../../library/logging.rst:1011 msgid "``%(filename)s``" msgstr "``%(filename)s``" -#: ../../library/logging.rst:934 +#: ../../library/logging.rst:1011 msgid "Filename portion of ``pathname``." msgstr "" -#: ../../library/logging.rst:936 +#: ../../library/logging.rst:1013 msgid "funcName" msgstr "" -#: ../../library/logging.rst:936 +#: ../../library/logging.rst:1013 msgid "``%(funcName)s``" msgstr "``%(funcName)s``" -#: ../../library/logging.rst:936 +#: ../../library/logging.rst:1013 msgid "Name of function containing the logging call." msgstr "" -#: ../../library/logging.rst:938 +#: ../../library/logging.rst:1015 msgid "levelname" msgstr "" -#: ../../library/logging.rst:938 +#: ../../library/logging.rst:1015 msgid "``%(levelname)s``" msgstr "``%(levelname)s``" -#: ../../library/logging.rst:938 +#: ../../library/logging.rst:1015 msgid "" "Text logging level for the message (``'DEBUG'``, ``'INFO'``, ``'WARNING'``, " "``'ERROR'``, ``'CRITICAL'``)." msgstr "" -#: ../../library/logging.rst:942 +#: ../../library/logging.rst:1019 msgid "levelno" msgstr "" -#: ../../library/logging.rst:942 +#: ../../library/logging.rst:1019 msgid "``%(levelno)s``" msgstr "``%(levelno)s``" -#: ../../library/logging.rst:942 +#: ../../library/logging.rst:1019 msgid "" "Numeric logging level for the message (:const:`DEBUG`, :const:`INFO`, :const:" "`WARNING`, :const:`ERROR`, :const:`CRITICAL`)." msgstr "" -#: ../../library/logging.rst:947 +#: ../../library/logging.rst:1024 msgid "lineno" msgstr "" -#: ../../library/logging.rst:947 +#: ../../library/logging.rst:1024 msgid "``%(lineno)d``" msgstr "``%(lineno)d``" -#: ../../library/logging.rst:947 +#: ../../library/logging.rst:1024 msgid "Source line number where the logging call was issued (if available)." msgstr "" -#: ../../library/logging.rst:950 +#: ../../library/logging.rst:1027 msgid "message" msgstr "" -#: ../../library/logging.rst:950 +#: ../../library/logging.rst:1027 msgid "``%(message)s``" msgstr "``%(message)s``" -#: ../../library/logging.rst:950 +#: ../../library/logging.rst:1027 msgid "" "The logged message, computed as ``msg % args``. This is set when :meth:" "`Formatter.format` is invoked." msgstr "" -#: ../../library/logging.rst:954 +#: ../../library/logging.rst:1031 msgid "module" msgstr "模組" -#: ../../library/logging.rst:954 +#: ../../library/logging.rst:1031 msgid "``%(module)s``" msgstr "``%(module)s``" -#: ../../library/logging.rst:954 +#: ../../library/logging.rst:1031 msgid "Module (name portion of ``filename``)." msgstr "" -#: ../../library/logging.rst:956 +#: ../../library/logging.rst:1033 msgid "msecs" msgstr "" -#: ../../library/logging.rst:956 +#: ../../library/logging.rst:1033 msgid "``%(msecs)d``" msgstr "``%(msecs)d``" -#: ../../library/logging.rst:956 +#: ../../library/logging.rst:1033 msgid "" "Millisecond portion of the time when the :class:`LogRecord` was created." msgstr "" -#: ../../library/logging.rst:0 ../../library/logging.rst:959 +#: ../../library/logging.rst:0 ../../library/logging.rst:1036 msgid "msg" msgstr "" -#: ../../library/logging.rst:959 +#: ../../library/logging.rst:1036 msgid "" "The format string passed in the original logging call. Merged with ``args`` " "to produce ``message``, or an arbitrary object (see :ref:`arbitrary-object-" "messages`)." msgstr "" -#: ../../library/logging.rst:0 ../../library/logging.rst:964 +#: ../../library/logging.rst:0 ../../library/logging.rst:1041 msgid "name" msgstr "name" -#: ../../library/logging.rst:964 +#: ../../library/logging.rst:1041 msgid "``%(name)s``" msgstr "``%(name)s``" -#: ../../library/logging.rst:964 +#: ../../library/logging.rst:1041 msgid "Name of the logger used to log the call." msgstr "" -#: ../../library/logging.rst:966 +#: ../../library/logging.rst:1043 msgid "pathname" msgstr "" -#: ../../library/logging.rst:966 +#: ../../library/logging.rst:1043 msgid "``%(pathname)s``" msgstr "``%(pathname)s``" -#: ../../library/logging.rst:966 +#: ../../library/logging.rst:1043 msgid "" "Full pathname of the source file where the logging call was issued (if " "available)." msgstr "" -#: ../../library/logging.rst:969 +#: ../../library/logging.rst:1046 msgid "process" msgstr "" -#: ../../library/logging.rst:969 +#: ../../library/logging.rst:1046 msgid "``%(process)d``" msgstr "``%(process)d``" -#: ../../library/logging.rst:969 +#: ../../library/logging.rst:1046 msgid "Process ID (if available)." msgstr "" -#: ../../library/logging.rst:971 +#: ../../library/logging.rst:1048 msgid "processName" msgstr "" -#: ../../library/logging.rst:971 +#: ../../library/logging.rst:1048 msgid "``%(processName)s``" msgstr "``%(processName)s``" -#: ../../library/logging.rst:971 +#: ../../library/logging.rst:1048 msgid "Process name (if available)." msgstr "" -#: ../../library/logging.rst:973 +#: ../../library/logging.rst:1050 msgid "relativeCreated" msgstr "" -#: ../../library/logging.rst:973 +#: ../../library/logging.rst:1050 msgid "``%(relativeCreated)d``" msgstr "``%(relativeCreated)d``" -#: ../../library/logging.rst:973 +#: ../../library/logging.rst:1050 msgid "" "Time in milliseconds when the LogRecord was created, relative to the time " "the logging module was loaded." msgstr "" -#: ../../library/logging.rst:977 +#: ../../library/logging.rst:1054 msgid "stack_info" msgstr "stack_info" -#: ../../library/logging.rst:977 +#: ../../library/logging.rst:1054 msgid "" "Stack frame information (where available) from the bottom of the stack in " "the current thread, up to and including the stack frame of the logging call " "which resulted in the creation of this record." msgstr "" -#: ../../library/logging.rst:983 +#: ../../library/logging.rst:1060 msgid "thread" msgstr "" -#: ../../library/logging.rst:983 +#: ../../library/logging.rst:1060 msgid "``%(thread)d``" msgstr "``%(thread)d``" -#: ../../library/logging.rst:983 +#: ../../library/logging.rst:1060 msgid "Thread ID (if available)." msgstr "" -#: ../../library/logging.rst:985 +#: ../../library/logging.rst:1062 msgid "threadName" msgstr "" -#: ../../library/logging.rst:985 +#: ../../library/logging.rst:1062 msgid "``%(threadName)s``" msgstr "``%(threadName)s``" -#: ../../library/logging.rst:985 +#: ../../library/logging.rst:1062 msgid "Thread name (if available)." msgstr "" -#: ../../library/logging.rst:987 +#: ../../library/logging.rst:1064 msgid "taskName" msgstr "taskName" -#: ../../library/logging.rst:987 +#: ../../library/logging.rst:1064 msgid "``%(taskName)s``" msgstr "``%(taskName)s``" -#: ../../library/logging.rst:987 +#: ../../library/logging.rst:1064 msgid ":class:`asyncio.Task` name (if available)." msgstr "" -#: ../../library/logging.rst:990 +#: ../../library/logging.rst:1067 msgid "*processName* was added." msgstr "新增 *processName*。" -#: ../../library/logging.rst:993 +#: ../../library/logging.rst:1070 msgid "*taskName* was added." msgstr "新增 *taskName*。" -#: ../../library/logging.rst:999 +#: ../../library/logging.rst:1076 msgid "LoggerAdapter Objects" msgstr "LoggerAdapter 物件" -#: ../../library/logging.rst:1001 +#: ../../library/logging.rst:1078 msgid "" ":class:`LoggerAdapter` instances are used to conveniently pass contextual " "information into logging calls. For a usage example, see the section on :ref:" "`adding contextual information to your logging output `." msgstr "" -#: ../../library/logging.rst:1007 +#: ../../library/logging.rst:1084 msgid "" "Returns an instance of :class:`LoggerAdapter` initialized with an " "underlying :class:`Logger` instance and a dict-like object." msgstr "" -#: ../../library/logging.rst:1012 +#: ../../library/logging.rst:1089 msgid "" "Modifies the message and/or keyword arguments passed to a logging call in " "order to insert contextual information. This implementation takes the object " @@ -1456,15 +1529,15 @@ msgid "" "(possibly modified) versions of the arguments passed in." msgstr "" -#: ../../library/logging.rst:1020 +#: ../../library/logging.rst:1097 msgid "Delegates to the underlying :attr:`!manager`` on *logger*." msgstr "" -#: ../../library/logging.rst:1024 +#: ../../library/logging.rst:1101 msgid "Delegates to the underlying :meth:`!_log`` method on *logger*." msgstr "" -#: ../../library/logging.rst:1026 +#: ../../library/logging.rst:1103 msgid "" "In addition to the above, :class:`LoggerAdapter` supports the following " "methods of :class:`Logger`: :meth:`~Logger.debug`, :meth:`~Logger.info`, :" @@ -1476,24 +1549,24 @@ msgid "" "interchangeably." msgstr "" -#: ../../library/logging.rst:1037 +#: ../../library/logging.rst:1114 msgid "" "The :meth:`~Logger.isEnabledFor`, :meth:`~Logger.getEffectiveLevel`, :meth:" "`~Logger.setLevel` and :meth:`~Logger.hasHandlers` methods were added to :" "class:`LoggerAdapter`. These methods delegate to the underlying logger." msgstr "" -#: ../../library/logging.rst:1043 +#: ../../library/logging.rst:1120 msgid "" "Attribute :attr:`!manager` and method :meth:`!_log` were added, which " "delegate to the underlying logger and allow adapters to be nested." msgstr "" -#: ../../library/logging.rst:1048 +#: ../../library/logging.rst:1125 msgid "Thread Safety" msgstr "" -#: ../../library/logging.rst:1050 +#: ../../library/logging.rst:1127 msgid "" "The logging module is intended to be thread-safe without any special work " "needing to be done by its clients. It achieves this though using threading " @@ -1502,7 +1575,7 @@ msgid "" "O." msgstr "" -#: ../../library/logging.rst:1055 +#: ../../library/logging.rst:1132 msgid "" "If you are implementing asynchronous signal handlers using the :mod:`signal` " "module, you may not be able to use logging from within such handlers. This " @@ -1510,17 +1583,17 @@ msgid "" "always re-entrant, and so cannot be invoked from such signal handlers." msgstr "" -#: ../../library/logging.rst:1062 +#: ../../library/logging.rst:1139 msgid "Module-Level Functions" msgstr "" -#: ../../library/logging.rst:1064 +#: ../../library/logging.rst:1141 msgid "" "In addition to the classes described above, there are a number of module-" "level functions." msgstr "" -#: ../../library/logging.rst:1070 +#: ../../library/logging.rst:1147 msgid "" "Return a logger with the specified name or, if name is ``None``, return a " "logger which is the root logger of the hierarchy. If specified, the name is " @@ -1529,14 +1602,14 @@ msgid "" "logging." msgstr "" -#: ../../library/logging.rst:1075 +#: ../../library/logging.rst:1152 msgid "" "All calls to this function with a given name return the same logger " "instance. This means that logger instances never need to be passed between " "different parts of an application." msgstr "" -#: ../../library/logging.rst:1082 +#: ../../library/logging.rst:1159 msgid "" "Return either the standard :class:`Logger` class, or the last class passed " "to :func:`setLoggerClass`. This function may be called from within a new " @@ -1545,125 +1618,92 @@ msgid "" "example::" msgstr "" -#: ../../library/logging.rst:1093 +#: ../../library/logging.rst:1170 msgid "Return a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1095 +#: ../../library/logging.rst:1172 msgid "" "This function has been provided, along with :func:`setLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1100 +#: ../../library/logging.rst:1177 msgid "" "See :func:`setLogRecordFactory` for more information about the how the " "factory is called." msgstr "" -#: ../../library/logging.rst:1105 +#: ../../library/logging.rst:1182 msgid "" -"Logs a message with level :const:`DEBUG` on the root logger. The *msg* is " -"the message format string, and the *args* are the arguments which are merged " -"into *msg* using the string formatting operator. (Note that this means that " -"you can use keywords in the format string, together with a single dictionary " -"argument.)" -msgstr "" - -#: ../../library/logging.rst:1110 -msgid "" -"There are three keyword arguments in *kwargs* which are inspected: " -"*exc_info* which, if it does not evaluate as false, causes exception " -"information to be added to the logging message. If an exception tuple (in " -"the format returned by :func:`sys.exc_info`) or an exception instance is " -"provided, it is used; otherwise, :func:`sys.exc_info` is called to get the " -"exception information." -msgstr "" - -#: ../../library/logging.rst:1136 -msgid "" -"The third optional keyword argument is *extra* which can be used to pass a " -"dictionary which is used to populate the __dict__ of the LogRecord created " -"for the logging event with user-defined attributes. These custom attributes " -"can then be used as you like. For example, they could be incorporated into " -"logged messages. For example::" -msgstr "" - -#: ../../library/logging.rst:1147 -msgid "would print something like:" -msgstr "" - -#: ../../library/logging.rst:1153 -msgid "" -"The keys in the dictionary passed in *extra* should not clash with the keys " -"used by the logging system. (See the :class:`Formatter` documentation for " -"more information on which keys are used by the logging system.)" +"This is a convenience function that calls :meth:`Logger.debug`, on the root " +"logger. The handling of the arguments is in every way identical to what is " +"described in that method." msgstr "" -#: ../../library/logging.rst:1157 +#: ../../library/logging.rst:1186 msgid "" -"If you choose to use these attributes in logged messages, you need to " -"exercise some care. In the above example, for instance, the :class:" -"`Formatter` has been set up with a format string which expects 'clientip' " -"and 'user' in the attribute dictionary of the LogRecord. If these are " -"missing, the message will not be logged because a string formatting " -"exception will occur. So in this case, you always need to pass the *extra* " -"dictionary with these keys." +"The only difference is that if the root logger has no handlers, then :func:" +"`basicConfig` is called, prior to calling ``debug`` on the root logger." msgstr "" -#: ../../library/logging.rst:1171 +#: ../../library/logging.rst:1189 msgid "" -"This function (as well as :func:`info`, :func:`warning`, :func:`error` and :" -"func:`critical`) will call :func:`basicConfig` if the root logger doesn't " -"have any handler attached." +"For very short scripts or quick demonstrations of ``logging`` facilities, " +"``debug`` and the other module-level functions may be convenient. However, " +"most programs will want to carefully and explicitly control the logging " +"configuration, and should therefore prefer creating a module-level logger " +"and calling :meth:`Logger.debug` (or other level-specific methods) on it, as " +"described at the beginnning of this documentation." msgstr "" -#: ../../library/logging.rst:1180 +#: ../../library/logging.rst:1199 msgid "" "Logs a message with level :const:`INFO` on the root logger. The arguments " -"are interpreted as for :func:`debug`." +"and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1186 +#: ../../library/logging.rst:1205 msgid "" "Logs a message with level :const:`WARNING` on the root logger. The arguments " -"are interpreted as for :func:`debug`." +"and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1189 +#: ../../library/logging.rst:1208 msgid "" "There is an obsolete function ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:1196 +#: ../../library/logging.rst:1215 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " -"are interpreted as for :func:`debug`." +"and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1202 +#: ../../library/logging.rst:1221 msgid "" "Logs a message with level :const:`CRITICAL` on the root logger. The " -"arguments are interpreted as for :func:`debug`." +"arguments and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1208 +#: ../../library/logging.rst:1227 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " -"are interpreted as for :func:`debug`. Exception info is added to the logging " -"message. This function should only be called from an exception handler." +"and behavior are otherwise the same as for :func:`debug`. Exception info is " +"added to the logging message. This function should only be called from an " +"exception handler." msgstr "" -#: ../../library/logging.rst:1214 +#: ../../library/logging.rst:1233 msgid "" -"Logs a message with level *level* on the root logger. The other arguments " -"are interpreted as for :func:`debug`." +"Logs a message with level *level* on the root logger. The arguments and " +"behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1219 +#: ../../library/logging.rst:1238 msgid "" "Provides an overriding level *level* for all loggers which takes precedence " "over the logger's own level. When the need arises to temporarily throttle " @@ -1677,7 +1717,7 @@ msgid "" "individual loggers." msgstr "" -#: ../../library/logging.rst:1230 +#: ../../library/logging.rst:1249 msgid "" "Note that if you have defined any custom logging level higher than " "``CRITICAL`` (this is not recommended), you won't be able to rely on the " @@ -1685,13 +1725,13 @@ msgid "" "a suitable value." msgstr "" -#: ../../library/logging.rst:1235 +#: ../../library/logging.rst:1254 msgid "" "The *level* parameter was defaulted to level ``CRITICAL``. See :issue:" "`28524` for more information about this change." msgstr "" -#: ../../library/logging.rst:1241 +#: ../../library/logging.rst:1260 msgid "" "Associates level *level* with text *levelName* in an internal dictionary, " "which is used to map numeric levels to a textual representation, for example " @@ -1701,24 +1741,24 @@ msgid "" "and they should increase in increasing order of severity." msgstr "" -#: ../../library/logging.rst:1248 +#: ../../library/logging.rst:1267 msgid "" "If you are thinking of defining your own levels, please see the section on :" "ref:`custom-levels`." msgstr "" -#: ../../library/logging.rst:1253 +#: ../../library/logging.rst:1272 msgid "" "Returns a mapping from level names to their corresponding logging levels. " "For example, the string \"CRITICAL\" maps to :const:`CRITICAL`. The returned " "mapping is copied from an internal mapping on each call to this function." msgstr "" -#: ../../library/logging.rst:1261 +#: ../../library/logging.rst:1280 msgid "Returns the textual or numeric representation of logging level *level*." msgstr "" -#: ../../library/logging.rst:1263 +#: ../../library/logging.rst:1282 msgid "" "If *level* is one of the predefined levels :const:`CRITICAL`, :const:" "`ERROR`, :const:`WARNING`, :const:`INFO` or :const:`DEBUG` then you get the " @@ -1728,20 +1768,20 @@ msgid "" "the corresponding string representation is returned." msgstr "" -#: ../../library/logging.rst:1270 +#: ../../library/logging.rst:1289 msgid "" "The *level* parameter also accepts a string representation of the level such " "as 'INFO'. In such cases, this functions returns the corresponding numeric " "value of the level." msgstr "" -#: ../../library/logging.rst:1274 +#: ../../library/logging.rst:1293 msgid "" "If no matching numeric or string value is passed in, the string 'Level %s' % " "level is returned." msgstr "" -#: ../../library/logging.rst:1277 +#: ../../library/logging.rst:1296 msgid "" "Levels are internally integers (as they need to be compared in the logging " "logic). This function is used to convert between an integer level and the " @@ -1750,7 +1790,7 @@ msgid "" "vice versa." msgstr "" -#: ../../library/logging.rst:1283 +#: ../../library/logging.rst:1302 msgid "" "In Python versions earlier than 3.4, this function could also be passed a " "text level, and would return the corresponding numeric value of the level. " @@ -1758,17 +1798,17 @@ msgid "" "Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." msgstr "" -#: ../../library/logging.rst:1291 +#: ../../library/logging.rst:1310 msgid "" "Returns a handler with the specified *name*, or ``None`` if there is no " "handler with that name." msgstr "" -#: ../../library/logging.rst:1298 +#: ../../library/logging.rst:1317 msgid "Returns an immutable set of all known handler names." msgstr "" -#: ../../library/logging.rst:1304 +#: ../../library/logging.rst:1323 msgid "" "Creates and returns a new :class:`LogRecord` instance whose attributes are " "defined by *attrdict*. This function is useful for taking a pickled :class:" @@ -1776,7 +1816,7 @@ msgid "" "as a :class:`LogRecord` instance at the receiving end." msgstr "" -#: ../../library/logging.rst:1312 +#: ../../library/logging.rst:1331 msgid "" "Does basic configuration for the logging system by creating a :class:" "`StreamHandler` with a default :class:`Formatter` and adding it to the root " @@ -1785,13 +1825,13 @@ msgid "" "no handlers are defined for the root logger." msgstr "" -#: ../../library/logging.rst:1318 +#: ../../library/logging.rst:1337 msgid "" "This function does nothing if the root logger already has handlers " "configured, unless the keyword argument *force* is set to ``True``." msgstr "" -#: ../../library/logging.rst:1321 +#: ../../library/logging.rst:1340 msgid "" "This function should be called from the main thread before other threads are " "started. In versions of Python prior to 2.7.1 and 3.2, if this function is " @@ -1800,54 +1840,54 @@ msgid "" "unexpected results such as messages being duplicated in the log." msgstr "" -#: ../../library/logging.rst:1328 +#: ../../library/logging.rst:1347 msgid "The following keyword arguments are supported." msgstr "" -#: ../../library/logging.rst:1335 +#: ../../library/logging.rst:1354 msgid "*filename*" msgstr "*filename*" -#: ../../library/logging.rst:1335 +#: ../../library/logging.rst:1354 msgid "" "Specifies that a :class:`FileHandler` be created, using the specified " "filename, rather than a :class:`StreamHandler`." msgstr "" -#: ../../library/logging.rst:1339 +#: ../../library/logging.rst:1358 msgid "*filemode*" msgstr "*filemode*" -#: ../../library/logging.rst:1339 +#: ../../library/logging.rst:1358 msgid "" "If *filename* is specified, open the file in this :ref:`mode `. " "Defaults to ``'a'``." msgstr "" -#: ../../library/logging.rst:1343 +#: ../../library/logging.rst:1362 msgid "*format*" msgstr "*format*" -#: ../../library/logging.rst:1343 +#: ../../library/logging.rst:1362 msgid "" "Use the specified format string for the handler. Defaults to attributes " "``levelname``, ``name`` and ``message`` separated by colons." msgstr "" -#: ../../library/logging.rst:1348 +#: ../../library/logging.rst:1367 msgid "*datefmt*" msgstr "*datefmt*" -#: ../../library/logging.rst:1348 +#: ../../library/logging.rst:1367 msgid "" "Use the specified date/time format, as accepted by :func:`time.strftime`." msgstr "" -#: ../../library/logging.rst:1351 +#: ../../library/logging.rst:1370 msgid "*style*" msgstr "*style*" -#: ../../library/logging.rst:1351 +#: ../../library/logging.rst:1370 msgid "" "If *format* is specified, use this style for the format string. One of " "``'%'``, ``'{'`` or ``'$'`` for :ref:`printf-style `." msgstr "" -#: ../../library/logging.rst:1362 +#: ../../library/logging.rst:1381 msgid "*stream*" msgstr "*stream*" -#: ../../library/logging.rst:1362 +#: ../../library/logging.rst:1381 msgid "" "Use the specified stream to initialize the :class:`StreamHandler`. Note that " "this argument is incompatible with *filename* - if both are present, a " "``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1368 +#: ../../library/logging.rst:1387 msgid "*handlers*" msgstr "*handlers*" -#: ../../library/logging.rst:1368 +#: ../../library/logging.rst:1387 msgid "" "If specified, this should be an iterable of already created handlers to add " "to the root logger. Any handlers which don't already have a formatter set " @@ -1887,33 +1927,33 @@ msgid "" "present, a ``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1377 +#: ../../library/logging.rst:1396 msgid "*force*" msgstr "*force*" -#: ../../library/logging.rst:1377 +#: ../../library/logging.rst:1396 msgid "" "If this keyword argument is specified as true, any existing handlers " "attached to the root logger are removed and closed, before carrying out the " "configuration as specified by the other arguments." msgstr "" -#: ../../library/logging.rst:1383 +#: ../../library/logging.rst:1402 msgid "*encoding*" msgstr "*encoding*" -#: ../../library/logging.rst:1383 +#: ../../library/logging.rst:1402 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " "the output file." msgstr "" -#: ../../library/logging.rst:1388 +#: ../../library/logging.rst:1407 msgid "*errors*" msgstr "*errors*" -#: ../../library/logging.rst:1388 +#: ../../library/logging.rst:1407 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " @@ -1922,39 +1962,39 @@ msgid "" "`open`, which means that it will be treated the same as passing 'errors'." msgstr "" -#: ../../library/logging.rst:1399 +#: ../../library/logging.rst:1418 msgid "The *style* argument was added." msgstr "新增 *style* 引數。" -#: ../../library/logging.rst:1402 +#: ../../library/logging.rst:1421 msgid "" "The *handlers* argument was added. Additional checks were added to catch " "situations where incompatible arguments are specified (e.g. *handlers* " "together with *stream* or *filename*, or *stream* together with *filename*)." msgstr "" -#: ../../library/logging.rst:1408 +#: ../../library/logging.rst:1427 msgid "The *force* argument was added." msgstr "新增 *force* 引數。" -#: ../../library/logging.rst:1411 +#: ../../library/logging.rst:1430 msgid "The *encoding* and *errors* arguments were added." msgstr "新增 *encoding* 與 *errors* 引數。" -#: ../../library/logging.rst:1416 +#: ../../library/logging.rst:1435 msgid "" "Informs the logging system to perform an orderly shutdown by flushing and " "closing all handlers. This should be called at application exit and no " "further use of the logging system should be made after this call." msgstr "" -#: ../../library/logging.rst:1420 +#: ../../library/logging.rst:1439 msgid "" "When the logging module is imported, it registers this function as an exit " "handler (see :mod:`atexit`), so normally there's no need to do that manually." msgstr "" -#: ../../library/logging.rst:1427 +#: ../../library/logging.rst:1446 msgid "" "Tells the logging system to use the class *klass* when instantiating a " "logger. The class should define :meth:`!__init__` such that only a name " @@ -1966,32 +2006,32 @@ msgid "" "loggers." msgstr "" -#: ../../library/logging.rst:1438 +#: ../../library/logging.rst:1457 msgid "Set a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1440 +#: ../../library/logging.rst:1459 msgid "The factory callable to be used to instantiate a log record." msgstr "" -#: ../../library/logging.rst:1442 +#: ../../library/logging.rst:1461 msgid "" "This function has been provided, along with :func:`getLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1447 +#: ../../library/logging.rst:1466 msgid "The factory has the following signature:" msgstr "" -#: ../../library/logging.rst:1449 +#: ../../library/logging.rst:1468 msgid "" "``factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, " "**kwargs)``" msgstr "" -#: ../../library/logging.rst:1451 +#: ../../library/logging.rst:1470 msgid "The logger name." msgstr "" @@ -1999,7 +2039,7 @@ msgstr "" msgid "level" msgstr "" -#: ../../library/logging.rst:1452 +#: ../../library/logging.rst:1471 msgid "The logging level (numeric)." msgstr "" @@ -2007,7 +2047,7 @@ msgstr "" msgid "fn" msgstr "fn" -#: ../../library/logging.rst:1453 +#: ../../library/logging.rst:1472 msgid "The full pathname of the file where the logging call was made." msgstr "" @@ -2015,19 +2055,19 @@ msgstr "" msgid "lno" msgstr "lno" -#: ../../library/logging.rst:1454 +#: ../../library/logging.rst:1473 msgid "The line number in the file where the logging call was made." msgstr "" -#: ../../library/logging.rst:1455 +#: ../../library/logging.rst:1474 msgid "The logging message." msgstr "" -#: ../../library/logging.rst:1456 +#: ../../library/logging.rst:1475 msgid "The arguments for the logging message." msgstr "" -#: ../../library/logging.rst:1457 +#: ../../library/logging.rst:1476 msgid "An exception tuple, or ``None``." msgstr "" @@ -2035,7 +2075,7 @@ msgstr "" msgid "func" msgstr "func" -#: ../../library/logging.rst:1458 +#: ../../library/logging.rst:1477 msgid "The name of the function or method which invoked the logging call." msgstr "" @@ -2043,7 +2083,7 @@ msgstr "" msgid "sinfo" msgstr "sinfo" -#: ../../library/logging.rst:1460 +#: ../../library/logging.rst:1479 msgid "" "A stack traceback such as is provided by :func:`traceback.print_stack`, " "showing the call hierarchy." @@ -2053,15 +2093,15 @@ msgstr "" msgid "kwargs" msgstr "kwargs" -#: ../../library/logging.rst:1462 +#: ../../library/logging.rst:1481 msgid "Additional keyword arguments." msgstr "額外的關鍵字引數。" -#: ../../library/logging.rst:1466 +#: ../../library/logging.rst:1485 msgid "Module-Level Attributes" msgstr "" -#: ../../library/logging.rst:1470 +#: ../../library/logging.rst:1489 msgid "" "A \"handler of last resort\" is available through this attribute. This is a :" "class:`StreamHandler` writing to ``sys.stderr`` with a level of ``WARNING``, " @@ -2072,15 +2112,15 @@ msgid "" "reason, ``lastResort`` can be set to ``None``." msgstr "" -#: ../../library/logging.rst:1482 +#: ../../library/logging.rst:1501 msgid "Used to see if exceptions during handling should be propagated." msgstr "" -#: ../../library/logging.rst:1484 +#: ../../library/logging.rst:1503 msgid "Default: ``True``." msgstr "" -#: ../../library/logging.rst:1486 +#: ../../library/logging.rst:1505 msgid "" "If :data:`raiseExceptions` is ``False``, exceptions get silently ignored. " "This is what is mostly wanted for a logging system - most users will not " @@ -2088,22 +2128,22 @@ msgid "" "application errors." msgstr "" -#: ../../library/logging.rst:1493 +#: ../../library/logging.rst:1512 msgid "Integration with the warnings module" msgstr "" -#: ../../library/logging.rst:1495 +#: ../../library/logging.rst:1514 msgid "" "The :func:`captureWarnings` function can be used to integrate :mod:`logging` " "with the :mod:`warnings` module." msgstr "" -#: ../../library/logging.rst:1500 +#: ../../library/logging.rst:1519 msgid "" "This function is used to turn the capture of warnings by logging on and off." msgstr "" -#: ../../library/logging.rst:1503 +#: ../../library/logging.rst:1522 msgid "" "If *capture* is ``True``, warnings issued by the :mod:`warnings` module will " "be redirected to the logging system. Specifically, a warning will be " @@ -2112,46 +2152,46 @@ msgid "" "`WARNING`." msgstr "" -#: ../../library/logging.rst:1508 +#: ../../library/logging.rst:1527 msgid "" "If *capture* is ``False``, the redirection of warnings to the logging system " "will stop, and warnings will be redirected to their original destinations (i." "e. those in effect before ``captureWarnings(True)`` was called)." msgstr "" -#: ../../library/logging.rst:1516 +#: ../../library/logging.rst:1534 msgid "Module :mod:`logging.config`" msgstr "" -#: ../../library/logging.rst:1516 +#: ../../library/logging.rst:1535 msgid "Configuration API for the logging module." msgstr "" -#: ../../library/logging.rst:1519 +#: ../../library/logging.rst:1537 msgid "Module :mod:`logging.handlers`" msgstr "" -#: ../../library/logging.rst:1519 +#: ../../library/logging.rst:1538 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../library/logging.rst:1523 +#: ../../library/logging.rst:1540 msgid ":pep:`282` - A Logging System" msgstr "" -#: ../../library/logging.rst:1522 +#: ../../library/logging.rst:1541 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/logging.rst:1528 +#: ../../library/logging.rst:1544 msgid "" "`Original Python logging package `_" msgstr "" -#: ../../library/logging.rst:1526 +#: ../../library/logging.rst:1545 msgid "" "This is the original source for the :mod:`logging` package. The version of " "the package available from this site is suitable for use with Python 1.5.2, " diff --git a/library/lzma.po b/library/lzma.po index 245b87f7f2..a41f05f722 100644 --- a/library/lzma.po +++ b/library/lzma.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -200,7 +200,7 @@ msgid "" "Possible values are:" msgstr "" -#: ../../library/lzma.rst:145 +#: ../../library/lzma.rst:144 msgid ":const:`FORMAT_XZ`: The ``.xz`` container format." msgstr "" @@ -208,7 +208,7 @@ msgstr "" msgid "This is the default format." msgstr "" -#: ../../library/lzma.rst:149 +#: ../../library/lzma.rst:147 msgid ":const:`FORMAT_ALONE`: The legacy ``.lzma`` container format." msgstr "" @@ -218,7 +218,7 @@ msgid "" "checks or multiple filters." msgstr "" -#: ../../library/lzma.rst:155 +#: ../../library/lzma.rst:151 msgid ":const:`FORMAT_RAW`: A raw data stream, not using any container format." msgstr "" diff --git a/library/mailbox.po b/library/mailbox.po index f5cfe71286..cc58de07c2 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-30 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -483,7 +483,7 @@ msgid "" "the underlying message while the returned file remains open." msgstr "" -#: ../../library/mailbox.rst:447 +#: ../../library/mailbox.rst:445 msgid "" "`maildir man page from Courier `_" msgstr "" @@ -494,7 +494,7 @@ msgid "" "folders." msgstr "" -#: ../../library/mailbox.rst:450 +#: ../../library/mailbox.rst:449 msgid "`Using maildir format `_" msgstr "" @@ -558,7 +558,7 @@ msgid "" "func:`!flock` and :c:func:`!lockf` system calls." msgstr "" -#: ../../library/mailbox.rst:502 +#: ../../library/mailbox.rst:501 msgid "" "`mbox man page from tin `_" @@ -568,7 +568,7 @@ msgstr "" msgid "A specification of the format, with details on locking." msgstr "" -#: ../../library/mailbox.rst:505 +#: ../../library/mailbox.rst:504 msgid "" "`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad " "`_" @@ -704,7 +704,7 @@ msgid "" "equivalent to :meth:`unlock`." msgstr "" -#: ../../library/mailbox.rst:634 +#: ../../library/mailbox.rst:633 msgid "`nmh - Message Handling System `_" msgstr "" @@ -714,7 +714,7 @@ msgid "" "`mh`." msgstr "" -#: ../../library/mailbox.rst:637 +#: ../../library/mailbox.rst:636 msgid "" "`MH & nmh: Email for Users & Programmers `_" @@ -795,7 +795,7 @@ msgid "" "memory compared to a string representation." msgstr "" -#: ../../library/mailbox.rst:711 +#: ../../library/mailbox.rst:710 msgid "" "`Format of Version 5 Babyl Files `_" msgstr "" @@ -854,7 +854,7 @@ msgid "" "raise an exception." msgstr "" -#: ../../library/mailbox.rst:762 +#: ../../library/mailbox.rst:761 msgid "" "`mmdf man page from tin `_" @@ -865,7 +865,7 @@ msgid "" "A specification of MMDF format from the documentation of tin, a newsreader." msgstr "" -#: ../../library/mailbox.rst:765 +#: ../../library/mailbox.rst:764 msgid "`MMDF `_" msgstr "`MMDF `_" diff --git a/library/math.po b/library/math.po index 2bb4ee4385..f35448010e 100644 --- a/library/math.po +++ b/library/math.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 19:55+0000\n" +"POT-Creation-Date: 2024-03-14 00:03+0000\n" "PO-Revision-Date: 2024-02-05 16:30+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -704,7 +704,7 @@ msgstr "" msgid "" "The :func:`erf` function can be used to compute traditional statistical " "functions such as the `cumulative standard normal distribution `_::" +"wikipedia.org/wiki/Cumulative_distribution_function>`_::" msgstr "" #: ../../library/math.rst:606 diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 49c0878d26..037627fa8a 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 19:55+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -114,7 +114,7 @@ msgid "" "start a process. These *start methods* are" msgstr "" -#: ../../library/multiprocessing.rst:118 +#: ../../library/multiprocessing.rst:110 msgid "*spawn*" msgstr "" @@ -133,7 +133,7 @@ msgid "" "Available on POSIX and Windows platforms. The default on Windows and macOS." msgstr "" -#: ../../library/multiprocessing.rst:138 +#: ../../library/multiprocessing.rst:120 msgid "*fork*" msgstr "" @@ -165,7 +165,7 @@ msgid "" "fork` documentation for further explanation." msgstr "" -#: ../../library/multiprocessing.rst:151 +#: ../../library/multiprocessing.rst:140 msgid "*forkserver*" msgstr "" diff --git a/library/optparse.po b/library/optparse.po index e1b0fcc815..7720d93253 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -98,7 +98,7 @@ msgstr "" msgid "Terminology" msgstr "" -#: ../../library/optparse.rst:104 +#: ../../library/optparse.rst:95 msgid "argument" msgstr "" @@ -118,7 +118,7 @@ msgid "" "argv[1:]``\"." msgstr "" -#: ../../library/optparse.rst:134 +#: ../../library/optparse.rst:106 msgid "option" msgstr "" @@ -171,7 +171,7 @@ msgid "" "Windows or certain legacy platforms (e.g. VMS, MS-DOS)." msgstr "" -#: ../../library/optparse.rst:160 +#: ../../library/optparse.rst:136 msgid "option argument" msgstr "" @@ -198,7 +198,7 @@ msgid "" "support this feature." msgstr "" -#: ../../library/optparse.rst:165 +#: ../../library/optparse.rst:162 msgid "positional argument" msgstr "" @@ -209,7 +209,7 @@ msgid "" "argument list." msgstr "" -#: ../../library/optparse.rst:171 +#: ../../library/optparse.rst:167 msgid "required option" msgstr "" @@ -525,7 +525,7 @@ msgstr "" msgid "Some other actions supported by :mod:`optparse` are:" msgstr "" -#: ../../library/optparse.rst:407 ../../library/optparse.rst:929 +#: ../../library/optparse.rst:406 ../../library/optparse.rst:928 msgid "``\"store_const\"``" msgstr "``\"store_const\"``" @@ -533,7 +533,7 @@ msgstr "``\"store_const\"``" msgid "store a constant value, pre-set via :attr:`Option.const`" msgstr "" -#: ../../library/optparse.rst:410 ../../library/optparse.rst:938 +#: ../../library/optparse.rst:409 ../../library/optparse.rst:937 msgid "``\"append\"``" msgstr "``\"append\"``" @@ -541,7 +541,7 @@ msgstr "``\"append\"``" msgid "append this option's argument to a list" msgstr "" -#: ../../library/optparse.rst:413 ../../library/optparse.rst:944 +#: ../../library/optparse.rst:412 ../../library/optparse.rst:943 msgid "``\"count\"``" msgstr "``\"count\"``" @@ -549,7 +549,7 @@ msgstr "``\"count\"``" msgid "increment a counter by one" msgstr "" -#: ../../library/optparse.rst:416 ../../library/optparse.rst:947 +#: ../../library/optparse.rst:415 ../../library/optparse.rst:946 msgid "``\"callback\"``" msgstr "``\"callback\"``" @@ -912,7 +912,7 @@ msgid "" "arguments, i.e. do not rely on the order in which the arguments are declared." msgstr "" -#: ../../library/optparse.rst:815 +#: ../../library/optparse.rst:810 msgid "``usage`` (default: ``\"%prog [options]\"``)" msgstr "" @@ -925,7 +925,7 @@ msgid "" "value :const:`optparse.SUPPRESS_USAGE`." msgstr "" -#: ../../library/optparse.rst:822 +#: ../../library/optparse.rst:817 msgid "``option_list`` (default: ``[]``)" msgstr "" @@ -938,7 +938,7 @@ msgid "" "the parser instead." msgstr "" -#: ../../library/optparse.rst:825 +#: ../../library/optparse.rst:824 msgid "``option_class`` (default: optparse.Option)" msgstr "" @@ -946,7 +946,7 @@ msgstr "" msgid "Class to use when adding options to the parser in :meth:`add_option`." msgstr "" -#: ../../library/optparse.rst:831 +#: ../../library/optparse.rst:827 msgid "``version`` (default: ``None``)" msgstr "" @@ -958,7 +958,7 @@ msgid "" "``%prog`` is expanded the same as for ``usage``." msgstr "" -#: ../../library/optparse.rst:836 +#: ../../library/optparse.rst:833 msgid "``conflict_handler`` (default: ``\"error\"``)" msgstr "" @@ -968,7 +968,7 @@ msgid "" "to the parser; see section :ref:`optparse-conflicts-between-options`." msgstr "" -#: ../../library/optparse.rst:842 +#: ../../library/optparse.rst:838 msgid "``description`` (default: ``None``)" msgstr "" @@ -980,7 +980,7 @@ msgid "" "options)." msgstr "" -#: ../../library/optparse.rst:847 +#: ../../library/optparse.rst:844 msgid "``formatter`` (default: a new :class:`IndentedHelpFormatter`)" msgstr "" @@ -991,7 +991,7 @@ msgid "" "IndentedHelpFormatter and TitledHelpFormatter." msgstr "" -#: ../../library/optparse.rst:851 +#: ../../library/optparse.rst:849 msgid "``add_help_option`` (default: ``True``)" msgstr "" @@ -1001,7 +1001,7 @@ msgid "" "and ``--help``) to the parser." msgstr "" -#: ../../library/optparse.rst:855 +#: ../../library/optparse.rst:853 msgid "``prog``" msgstr "``prog``" @@ -1097,7 +1097,7 @@ msgid "" "into :mod:`optparse` are:" msgstr "" -#: ../../library/optparse.rst:926 +#: ../../library/optparse.rst:925 msgid "``\"store\"``" msgstr "``\"store\"``" @@ -1105,7 +1105,7 @@ msgstr "``\"store\"``" msgid "store this option's argument (default)" msgstr "" -#: ../../library/optparse.rst:932 +#: ../../library/optparse.rst:931 msgid "``\"store_true\"``" msgstr "``\"store_true\"``" @@ -1113,7 +1113,7 @@ msgstr "``\"store_true\"``" msgid "store ``True``" msgstr "" -#: ../../library/optparse.rst:935 +#: ../../library/optparse.rst:934 msgid "``\"store_false\"``" msgstr "``\"store_false\"``" @@ -1121,7 +1121,7 @@ msgstr "``\"store_false\"``" msgid "store ``False``" msgstr "" -#: ../../library/optparse.rst:941 +#: ../../library/optparse.rst:940 msgid "``\"append_const\"``" msgstr "``\"append_const\"``" @@ -1129,7 +1129,7 @@ msgstr "``\"append_const\"``" msgid "append a constant value to a list, pre-set via :attr:`Option.const`" msgstr "" -#: ../../library/optparse.rst:950 ../../library/optparse.rst:1244 +#: ../../library/optparse.rst:949 ../../library/optparse.rst:1244 msgid "``\"help\"``" msgstr "``\"help\"``" @@ -1622,8 +1622,8 @@ msgstr "" msgid "The input parameters are" msgstr "" -#: ../../library/optparse.rst:1351 ../../library/optparse.rst:1364 -#: ../../library/optparse.rst:1684 +#: ../../library/optparse.rst:1350 ../../library/optparse.rst:1364 +#: ../../library/optparse.rst:1682 msgid "``args``" msgstr "``args``" @@ -1631,7 +1631,7 @@ msgstr "``args``" msgid "the list of arguments to process (default: ``sys.argv[1:]``)" msgstr "" -#: ../../library/optparse.rst:1356 +#: ../../library/optparse.rst:1353 msgid "``values``" msgstr "``values``" @@ -1646,7 +1646,7 @@ msgstr "" msgid "and the return value is a pair ``(options, args)`` where" msgstr "" -#: ../../library/optparse.rst:1362 +#: ../../library/optparse.rst:1360 msgid "``options``" msgstr "``options``" @@ -1770,7 +1770,7 @@ msgstr "" msgid "The available conflict handlers are:" msgstr "" -#: ../../library/optparse.rst:1459 +#: ../../library/optparse.rst:1457 msgid "``\"error\"`` (default)" msgstr "" @@ -1780,7 +1780,7 @@ msgid "" "`OptionConflictError`" msgstr "" -#: ../../library/optparse.rst:1463 +#: ../../library/optparse.rst:1461 msgid "``\"resolve\"``" msgstr "``\"resolve\"``" @@ -1944,7 +1944,7 @@ msgid "" "define a callback option:" msgstr "" -#: ../../library/optparse.rst:1616 +#: ../../library/optparse.rst:1612 msgid ":attr:`~Option.type`" msgstr ":attr:`~Option.type`" @@ -1956,7 +1956,7 @@ msgid "" "though, :mod:`optparse` passes it to your callback function." msgstr "" -#: ../../library/optparse.rst:1622 +#: ../../library/optparse.rst:1618 msgid ":attr:`~Option.nargs`" msgstr ":attr:`~Option.nargs`" @@ -1968,7 +1968,7 @@ msgid "" "callback." msgstr "" -#: ../../library/optparse.rst:1625 +#: ../../library/optparse.rst:1624 msgid ":attr:`~Option.callback_args`" msgstr ":attr:`~Option.callback_args`" @@ -1976,7 +1976,7 @@ msgstr ":attr:`~Option.callback_args`" msgid "a tuple of extra positional arguments to pass to the callback" msgstr "" -#: ../../library/optparse.rst:1629 +#: ../../library/optparse.rst:1627 msgid ":attr:`~Option.callback_kwargs`" msgstr ":attr:`~Option.callback_kwargs`" @@ -1992,7 +1992,7 @@ msgstr "" msgid "All callbacks are called as follows::" msgstr "" -#: ../../library/optparse.rst:1643 +#: ../../library/optparse.rst:1642 msgid "``option``" msgstr "``option``" @@ -2000,7 +2000,7 @@ msgstr "``option``" msgid "is the Option instance that's calling the callback" msgstr "" -#: ../../library/optparse.rst:1650 +#: ../../library/optparse.rst:1645 msgid "``opt_str``" msgstr "``opt_str``" @@ -2013,7 +2013,7 @@ msgid "" "``\"--foobar\"``.)" msgstr "" -#: ../../library/optparse.rst:1657 +#: ../../library/optparse.rst:1652 msgid "``value``" msgstr "``value``" @@ -2027,7 +2027,7 @@ msgid "" "of values of the appropriate type." msgstr "" -#: ../../library/optparse.rst:1680 +#: ../../library/optparse.rst:1659 msgid "``parser``" msgstr "``parser``" @@ -2037,7 +2037,7 @@ msgid "" "you can access some other interesting data through its instance attributes:" msgstr "" -#: ../../library/optparse.rst:1667 +#: ../../library/optparse.rst:1663 msgid "``parser.largs``" msgstr "``parser.largs``" @@ -2050,7 +2050,7 @@ msgid "" "parse_args`.)" msgstr "" -#: ../../library/optparse.rst:1673 +#: ../../library/optparse.rst:1669 msgid "``parser.rargs``" msgstr "``parser.rargs``" @@ -2061,7 +2061,7 @@ msgid "" "Feel free to modify ``parser.rargs``, e.g. by consuming more arguments." msgstr "" -#: ../../library/optparse.rst:1680 +#: ../../library/optparse.rst:1675 msgid "``parser.values``" msgstr "``parser.values``" @@ -2080,7 +2080,7 @@ msgid "" "callback_args` option attribute." msgstr "" -#: ../../library/optparse.rst:1689 +#: ../../library/optparse.rst:1686 msgid "``kwargs``" msgstr "``kwargs``" @@ -2336,7 +2336,7 @@ msgid "" "mod:`optparse` has a couple of classifications for actions:" msgstr "" -#: ../../library/optparse.rst:1962 +#: ../../library/optparse.rst:1959 msgid "\"store\" actions" msgstr "" @@ -2347,7 +2347,7 @@ msgid "" "dest` attribute to be supplied to the Option constructor." msgstr "" -#: ../../library/optparse.rst:1968 +#: ../../library/optparse.rst:1964 msgid "\"typed\" actions" msgstr "" diff --git a/library/os.path.po b/library/os.path.po index b1f560fc99..a91183622a 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-07-13 14:06+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -25,11 +25,11 @@ msgstr ":mod:`os.path` --- 常見的路徑名操作" #: ../../library/os.path.rst:7 msgid "" -"**Source code:** :source:`Lib/posixpath.py` (for POSIX) and :source:`Lib/" -"ntpath.py` (for Windows)." +"**Source code:** :source:`Lib/genericpath.py`, :source:`Lib/posixpath.py` " +"(for POSIX) and :source:`Lib/ntpath.py` (for Windows)." msgstr "" -"**原始碼:** :source:`Lib/posixpath.py` (用於 POSIX 系統) 和 :source:`Lib/" -"ntpath.py` (用於 Windows)." +"**原始碼:** :source:`Lib/genericpath.py`、:source:`Lib/posixpath.py` (用於 " +"POSIX 系統) 和 :source:`Lib/ntpath.py` (用於 Windows)." #: ../../library/os.path.rst:14 msgid "" @@ -110,18 +110,18 @@ msgstr "" "func:`normpath` 函式:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 -#: ../../library/os.path.rst:116 ../../library/os.path.rst:125 -#: ../../library/os.path.rst:141 ../../library/os.path.rst:151 -#: ../../library/os.path.rst:177 ../../library/os.path.rst:197 -#: ../../library/os.path.rst:214 ../../library/os.path.rst:226 -#: ../../library/os.path.rst:235 ../../library/os.path.rst:245 -#: ../../library/os.path.rst:255 ../../library/os.path.rst:265 -#: ../../library/os.path.rst:284 ../../library/os.path.rst:303 -#: ../../library/os.path.rst:352 ../../library/os.path.rst:372 -#: ../../library/os.path.rst:395 ../../library/os.path.rst:417 -#: ../../library/os.path.rst:435 ../../library/os.path.rst:448 -#: ../../library/os.path.rst:464 ../../library/os.path.rst:480 -#: ../../library/os.path.rst:505 ../../library/os.path.rst:569 +#: ../../library/os.path.rst:114 ../../library/os.path.rst:123 +#: ../../library/os.path.rst:139 ../../library/os.path.rst:149 +#: ../../library/os.path.rst:175 ../../library/os.path.rst:195 +#: ../../library/os.path.rst:212 ../../library/os.path.rst:224 +#: ../../library/os.path.rst:233 ../../library/os.path.rst:243 +#: ../../library/os.path.rst:253 ../../library/os.path.rst:263 +#: ../../library/os.path.rst:282 ../../library/os.path.rst:301 +#: ../../library/os.path.rst:350 ../../library/os.path.rst:370 +#: ../../library/os.path.rst:393 ../../library/os.path.rst:413 +#: ../../library/os.path.rst:429 ../../library/os.path.rst:440 +#: ../../library/os.path.rst:454 ../../library/os.path.rst:470 +#: ../../library/os.path.rst:495 ../../library/os.path.rst:559 msgid "Accepts a :term:`path-like object`." msgstr "接受一個 :term:`path-like object`。" @@ -149,17 +149,11 @@ msgstr "" "和相對路徑、*paths* 位於不同的驅動機或 *paths* 為空,則引發 :exc:" "`ValueError`。與 :func:`commonprefix` 不同,此函式回傳的是有效路徑。" -#: ../../library/os.path.rst:88 ../../library/os.path.rst:415 -#: ../../library/os.path.rst:427 ../../library/os.path.rst:443 -#: ../../library/os.path.rst:459 -msgid ":ref:`Availability `: Unix, Windows." -msgstr ":ref:`適用 `:Unix、Windows。" - -#: ../../library/os.path.rst:92 +#: ../../library/os.path.rst:90 msgid "Accepts a sequence of :term:`path-like objects `." msgstr "接受一個\\ :term:`類路徑物件 `\\ 的序列。" -#: ../../library/os.path.rst:98 +#: ../../library/os.path.rst:96 msgid "" "Return the longest path prefix (taken character-by-character) that is a " "prefix of all paths in *list*. If *list* is empty, return the empty string " @@ -168,7 +162,7 @@ msgstr "" "回傳 *list* 中所有路徑的最長路徑前綴(逐字元比較)。如果 *list* 為空,則回傳" "空字串(``''``)。" -#: ../../library/os.path.rst:104 +#: ../../library/os.path.rst:102 msgid "" "This function may return invalid paths because it works a character at a " "time. To obtain a valid path, see :func:`commonpath`." @@ -176,7 +170,7 @@ msgstr "" "由於此函式是逐字元比較,因此可能會回傳無效的路徑。若要獲得有效的路徑,請參" "考 :func:`commonpath` 函式。" -#: ../../library/os.path.rst:122 +#: ../../library/os.path.rst:120 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." @@ -184,7 +178,7 @@ msgstr "" "回傳路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函式 :func:`split` 後回傳之" "成對結果中的第一個元素。" -#: ../../library/os.path.rst:131 +#: ../../library/os.path.rst:129 msgid "" "Return ``True`` if *path* refers to an existing path or an open file " "descriptor. Returns ``False`` for broken symbolic links. On some " @@ -196,7 +190,7 @@ msgstr "" "的符號連結則回傳 ``False``。在某些平台上,即使 *path* 實際存在,如果未被授予" "執行 :func:`os.stat` 的權限,此函式仍可能回傳 ``False``。" -#: ../../library/os.path.rst:137 +#: ../../library/os.path.rst:135 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." @@ -204,16 +198,16 @@ msgstr "" "現在 *path* 可以是一個整數:如果它是一個開啟的檔案描述器,則回傳 ``True``;否" "則回傳 ``False``。" -#: ../../library/os.path.rst:147 +#: ../../library/os.path.rst:145 msgid "" -"Return ``True`` if *path* refers to an existing path. Returns ``True`` for " -"broken symbolic links. Equivalent to :func:`exists` on platforms lacking :" -"func:`os.lstat`." +"Return ``True`` if *path* refers to an existing path, including broken " +"symbolic links. Equivalent to :func:`exists` on platforms lacking :func:" +"`os.lstat`." msgstr "" -"如果 *path* 是一個存在的路徑則回傳 ``True``。對於已損壞的符號連結也回傳 " -"``True``。在缺乏 :func:`os.lstat` 的平台上,與 :func:`exists` 函式等效。" +"如果 *path* 是一個存在的路徑則回傳 ``True``,對已損壞的符號連結也是。在缺乏 :" +"func:`os.lstat` 的平台上,與 :func:`exists` 函式等效。" -#: ../../library/os.path.rst:159 +#: ../../library/os.path.rst:157 msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." @@ -221,7 +215,7 @@ msgstr "" "在 Unix 和 Windows 上,將引數中以 ``~`` 或 ``~user`` 開頭的部分替換為該 " "*user* 的家目錄。" -#: ../../library/os.path.rst:164 +#: ../../library/os.path.rst:162 msgid "" "On Unix, an initial ``~`` is replaced by the environment variable :envvar:" "`HOME` if it is set; otherwise the current user's home directory is looked " @@ -232,7 +226,7 @@ msgstr "" "數的值;否則將使用內建模組 :mod:`pwd` 在密碼目錄中查找當前使用者的家目錄。對" "於初始的 ``~user``,直接在密碼目錄中查找該使用者的家目錄。" -#: ../../library/os.path.rst:169 +#: ../../library/os.path.rst:167 msgid "" "On Windows, :envvar:`USERPROFILE` will be used if set, otherwise a " "combination of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be used. An " @@ -245,18 +239,18 @@ msgstr "" "當前使用者的家目錄的最後一個目錄元件是否與 :envvar:`USERNAME` 相符,如果相符" "則替換它。" -#: ../../library/os.path.rst:174 +#: ../../library/os.path.rst:172 msgid "" "If the expansion fails or if the path does not begin with a tilde, the path " "is returned unchanged." msgstr "" "如果展開失敗或路徑不以波浪符號 (tilde) 開頭,則回傳原始路徑,不做任何變更。" -#: ../../library/os.path.rst:180 +#: ../../library/os.path.rst:178 msgid "No longer uses :envvar:`HOME` on Windows." msgstr "在 Windows 上不再使用 :envvar:`HOME` 變數。" -#: ../../library/os.path.rst:189 +#: ../../library/os.path.rst:187 msgid "" "Return the argument with environment variables expanded. Substrings of the " "form ``$name`` or ``${name}`` are replaced by the value of environment " @@ -266,7 +260,7 @@ msgstr "" "回傳已展開環境變數的引數。形如 ``$name`` 或 ``${name}`` 的子字串會被替換為環" "境變數 *name* 的值。無效的變數名稱和對不存在變數的引用保持不變。" -#: ../../library/os.path.rst:194 +#: ../../library/os.path.rst:192 msgid "" "On Windows, ``%name%`` expansions are supported in addition to ``$name`` and " "``${name}``." @@ -274,7 +268,7 @@ msgstr "" "在 Windows 上,除了支援 ``$name`` 和 ``${name}`` 形式的展開外,還支援 " "``%name%`` 形式的展開。" -#: ../../library/os.path.rst:203 +#: ../../library/os.path.rst:201 msgid "" "Return the time of last access of *path*. The return value is a floating " "point number giving the number of seconds since the epoch (see the :mod:" @@ -284,7 +278,7 @@ msgstr "" "回傳 *path* 的最後存取時間。回傳值是一個浮點數,表示自紀元(參見 :mod:`time` " "模組)以來的秒數。如果檔案不存在或無法存取,則引發 :exc:`OSError`。" -#: ../../library/os.path.rst:210 +#: ../../library/os.path.rst:208 msgid "" "Return the time of last modification of *path*. The return value is a " "floating point number giving the number of seconds since the epoch (see " @@ -294,7 +288,7 @@ msgstr "" "回傳 *path* 的最後修改時間。回傳值是一個浮點數,表示自紀元(參見 :mod:`time` " "模組)以來的秒數。如果檔案不存在或無法存取,則引發 :exc:`OSError`。" -#: ../../library/os.path.rst:220 +#: ../../library/os.path.rst:218 msgid "" "Return the system's ctime which, on some systems (like Unix) is the time of " "the last metadata change, and, on others (like Windows), is the creation " @@ -307,7 +301,7 @@ msgstr "" "數,表示自紀元(參見 :mod:`time` 模組)以來的秒數。如果檔案不存在或無法存" "取),則引發 :exc:`OSError`。" -#: ../../library/os.path.rst:232 +#: ../../library/os.path.rst:230 msgid "" "Return the size, in bytes, of *path*. Raise :exc:`OSError` if the file does " "not exist or is inaccessible." @@ -315,7 +309,7 @@ msgstr "" "回傳 *path* 的大小(以位元組為單位)。如果檔案不存在或無法存取,則引發 :exc:" "`OSError`。" -#: ../../library/os.path.rst:241 +#: ../../library/os.path.rst:239 msgid "" "Return ``True`` if *path* is an absolute pathname. On Unix, that means it " "begins with a slash, on Windows that it begins with a (back)slash after " @@ -324,7 +318,7 @@ msgstr "" "如果 *path* 是絕對路徑名,則回傳 ``True``。在 Unix 上,這表示它以斜線開頭;" "在 Windows 上,表示在去除可能的驅動機字母後,以(反)斜線開頭。" -#: ../../library/os.path.rst:251 +#: ../../library/os.path.rst:249 msgid "" "Return ``True`` if *path* is an :func:`existing ` regular file. This " "follows symbolic links, so both :func:`islink` and :func:`isfile` can be " @@ -334,7 +328,7 @@ msgstr "" "這將跟隨符號連結,因此同一個路徑可以同時回傳 :func:`islink` 和 :func:" "`isfile` 的結果為真。" -#: ../../library/os.path.rst:261 +#: ../../library/os.path.rst:259 msgid "" "Return ``True`` if *path* is an :func:`existing ` directory. This " "follows symbolic links, so both :func:`islink` and :func:`isdir` can be true " @@ -344,7 +338,7 @@ msgstr "" "跟隨符號連結,因此同一個路徑可以同時回傳 :func:`islink` 和 :func:`isfile` 的" "結果為真。" -#: ../../library/os.path.rst:271 +#: ../../library/os.path.rst:269 msgid "" "Return ``True`` if *path* refers to an :func:`existing ` directory " "entry that is a junction. Always return ``False`` if junctions are not " @@ -353,7 +347,7 @@ msgstr "" "如果 *path* 是指向\\ :func:`已存在的 `\\ 目錄條目且為聯接點 " "(junction),則回傳 ``True``。如果目前平台不支援聯接點,則始終返回 ``False``。" -#: ../../library/os.path.rst:280 +#: ../../library/os.path.rst:278 msgid "" "Return ``True`` if *path* refers to an :func:`existing ` directory " "entry that is a symbolic link. Always ``False`` if symbolic links are not " @@ -362,7 +356,7 @@ msgstr "" "如果 *path* 是指向\\ :func:`已存在的 `\\ 目錄項目且為符號連結,則回" "傳 ``True``。如果 Python 執行時不支援符號連結,則始終回傳 ``False``。" -#: ../../library/os.path.rst:290 +#: ../../library/os.path.rst:288 msgid "" "Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a " "file system where a different file system has been mounted. On POSIX, the " @@ -382,11 +376,11 @@ msgstr "" "上,以驅動機字母開頭的根目錄和 UNC 共享路徑始終是掛載點,對於任何其他路徑,會" "呼叫 ``GetVolumePathName`` 函式來檢查它是否與輸入路徑不同。" -#: ../../library/os.path.rst:300 -msgid "Support for detecting non-root mount points on Windows." -msgstr "支援在 Windows 上檢測非根目錄的掛載點。" +#: ../../library/os.path.rst:298 +msgid "Added support for detecting non-root mount points on Windows." +msgstr "新增在 Windows 上檢測非根目錄掛載點的支援。" -#: ../../library/os.path.rst:309 +#: ../../library/os.path.rst:307 msgid "" "Return ``True`` if pathname *path* is located on a Windows Dev Drive. A Dev " "Drive is optimized for developer scenarios, and offers faster performance " @@ -398,7 +392,7 @@ msgstr "" "開發人員場景進行了優化,提供更快的讀寫檔案性能。建議將其用於原始程式碼、臨時" "建置目錄、封包快取和其他 I/O 密集型操作。" -#: ../../library/os.path.rst:315 +#: ../../library/os.path.rst:313 msgid "" "May raise an error for an invalid path, for example, one without a " "recognizable drive, but returns ``False`` on platforms that do not support " @@ -409,11 +403,11 @@ msgstr "" "碟機的平台上返回 ``False``。請參閱 `Windows 文件 `_\\ 以了解有關啟用和建立 Dev 驅動機的資訊。" -#: ../../library/os.path.rst:320 +#: ../../library/os.path.rst:318 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/os.path.rst:327 +#: ../../library/os.path.rst:325 msgid "" "Join one or more path segments intelligently. The return value is the " "concatenation of *path* and all members of *\\*paths*, with exactly one " @@ -428,7 +422,7 @@ msgstr "" "個部分為空或以分隔符號結尾,結果只會以分隔符號結尾。如果一個段是絕對路徑(在 " "Windows 上需要驅動機和根),則忽略所有之前的段,並從絕對路徑段繼續連接。" -#: ../../library/os.path.rst:335 +#: ../../library/os.path.rst:333 msgid "" "On Windows, the drive is not reset when a rooted path segment (e.g., " "``r'\\foo'``) is encountered. If a segment is on a different drive or is an " @@ -443,11 +437,11 @@ msgstr "" "對於驅動機 :file:`C:` 的當前目錄的路徑(即 :file:`c:foo`),而不是 :file:`c:" "\\\\foo`。" -#: ../../library/os.path.rst:342 +#: ../../library/os.path.rst:340 msgid "Accepts a :term:`path-like object` for *path* and *paths*." msgstr "*path* 和 *paths* 接受 :term:`path-like object` 作為參數。" -#: ../../library/os.path.rst:348 +#: ../../library/os.path.rst:346 msgid "" "Normalize the case of a pathname. On Windows, convert all characters in the " "pathname to lowercase, and also convert forward slashes to backward slashes. " @@ -456,7 +450,7 @@ msgstr "" "將路徑名的大小寫規範化。在 Windows 上,將路徑名中的所有字元轉換為小寫,並將正" "斜線轉換為反斜線。在其他作業系統上,回傳原始路徑。" -#: ../../library/os.path.rst:358 +#: ../../library/os.path.rst:356 msgid "" "Normalize a pathname by collapsing redundant separators and up-level " "references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all " @@ -469,7 +463,7 @@ msgstr "" "結的路徑的含義。在 Windows 上,它將正斜線轉換為反斜線。要標準化大小寫,請使" "用 :func:`normcase`。" -#: ../../library/os.path.rst:365 +#: ../../library/os.path.rst:363 msgid "" "On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13 " "Pathname Resolution `_ 的實作定義)。例" -"如:\n" -"\n" -"::" +"如: ::" -#: ../../library/os.path.rst:530 +#: ../../library/os.path.rst:520 msgid "" "On Windows, *drive* may be empty, a drive-letter name, a UNC share, or a " "device name. The *root* may be empty, a forward slash, or a backward slash. " "For example::" msgstr "" "在 Windows 上,*drive* 可能為空、驅動機名稱、UNC 共享或設備名稱。*root* 可能" -"為空,斜線或反斜線。例如:\n" -"\n" -"::" +"為空,斜線或反斜線。例如: ::" -#: ../../library/os.path.rst:544 +#: ../../library/os.path.rst:534 msgid "" "Split the pathname *path* into a pair ``(root, ext)`` such that ``root + " "ext == path``, and the extension, *ext*, is empty or begins with a period " @@ -681,33 +667,25 @@ msgstr "" "將路徑名 *path* 拆分為一對 ``(root, ext)``,使得 ``root + ext == path``,且副" "檔名 *ext* 為空或以點開頭且最多包含一個點 (period)。" -#: ../../library/os.path.rst:548 +#: ../../library/os.path.rst:538 msgid "If the path contains no extension, *ext* will be ``''``::" -msgstr "" -"如果路徑不包含副檔名,則 *ext* 將為 ``''``:\n" -"\n" -"::" +msgstr "如果路徑不包含副檔名,則 *ext* 將為 ``''``: ::" -#: ../../library/os.path.rst:553 +#: ../../library/os.path.rst:543 msgid "" "If the path contains an extension, then *ext* will be set to this extension, " "including the leading period. Note that previous periods will be ignored::" msgstr "" "如果路徑包含副檔名,則 *ext* 將設置為該副檔名,包括前導的點。請注意,前面的點" -"將被忽略:\n" -"\n" -"::" +"將被忽略: ::" -#: ../../library/os.path.rst:561 +#: ../../library/os.path.rst:551 msgid "" "Leading periods of the last component of the path are considered to be part " "of the root::" -msgstr "" -"路徑的最後一個部份的前導點被認為是根的一部分:\n" -"\n" -"::" +msgstr "路徑的最後一個部份的前導點被認為是根的一部分: ::" -#: ../../library/os.path.rst:575 +#: ../../library/os.path.rst:565 msgid "" "``True`` if arbitrary Unicode strings can be used as file names (within " "limitations imposed by the file system)." @@ -723,34 +701,37 @@ msgstr "path(路徑)" msgid "operations" msgstr "operations(操作)" -#: ../../library/os.path.rst:155 +#: ../../library/os.path.rst:153 msgid "~ (tilde)" msgstr "~ (波浪號)" -#: ../../library/os.path.rst:155 +#: ../../library/os.path.rst:153 msgid "home directory expansion" msgstr "home directory expansion(家目錄展開)" -#: ../../library/os.path.rst:162 +#: ../../library/os.path.rst:160 msgid "module" msgstr "module(模組)" -#: ../../library/os.path.rst:162 +#: ../../library/os.path.rst:160 msgid "pwd" msgstr "pwd" -#: ../../library/os.path.rst:183 +#: ../../library/os.path.rst:181 msgid "$ (dollar)" msgstr "$ (金錢符號)" -#: ../../library/os.path.rst:183 +#: ../../library/os.path.rst:181 msgid "environment variables expansion" msgstr "environment variables expansion(環境變數展開)" -#: ../../library/os.path.rst:183 +#: ../../library/os.path.rst:181 msgid "% (percent)" msgstr "% (百分號)" -#: ../../library/os.path.rst:183 +#: ../../library/os.path.rst:181 msgid "environment variables expansion (Windows)" msgstr "environment variables expansion (Windows)(環境變數展開 (Windows))" + +#~ msgid ":ref:`Availability `: Unix, Windows." +#~ msgstr ":ref:`適用 `:Unix、Windows。" diff --git a/library/os.po b/library/os.po index 36ef859416..66d91bc585 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-08-30 23:53+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1351,7 +1351,7 @@ msgstr ":const:`SEEK_CUR`" msgid "Adjust the file position relative to the current file position." msgstr "" -#: ../../library/os.rst:1197 +#: ../../library/os.rst:1196 msgid ":const:`SEEK_END`" msgstr ":const:`SEEK_END`" @@ -1370,7 +1370,7 @@ msgid "" "holes on sparsely allocated files." msgstr "" -#: ../../library/os.rst:1211 +#: ../../library/os.rst:1209 msgid ":data:`!SEEK_DATA`" msgstr ":data:`!SEEK_DATA`" @@ -1380,7 +1380,7 @@ msgid "" "seek position." msgstr "" -#: ../../library/os.rst:1216 +#: ../../library/os.rst:1213 msgid ":data:`!SEEK_HOLE`" msgstr ":data:`!SEEK_HOLE`" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 9b7bddb82e..33094d63ca 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-05-22 02:10+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -45,7 +45,7 @@ msgid "" "raised." msgstr "" -#: ../../library/ossaudiodev.rst:55 +#: ../../library/ossaudiodev.rst:54 msgid "" "`Open Sound System Programmer's Guide `_" diff --git a/library/pdb.po b/library/pdb.po index ceffb0bc67..528d9ab7fd 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -43,9 +43,9 @@ msgid "" "source. The extension interface uses the modules :mod:`bdb` and :mod:`cmd`." msgstr "" -#: ../../library/pdb.rst:34 +#: ../../library/pdb.rst:32 msgid "Module :mod:`faulthandler`" -msgstr "" +msgstr ":mod:`faulthandler` 模組" #: ../../library/pdb.rst:33 msgid "" @@ -55,7 +55,7 @@ msgstr "" #: ../../library/pdb.rst:36 msgid "Module :mod:`traceback`" -msgstr "" +msgstr ":mod:`traceback` 模組" #: ../../library/pdb.rst:37 msgid "" @@ -252,7 +252,7 @@ msgstr "" #: ../../library/pdb.rst:219 msgid "The *readrc* argument." -msgstr "" +msgstr "*readrc* 引數。" #: ../../library/pdb.rst:227 msgid "See the documentation for the functions explained above." @@ -339,25 +339,26 @@ msgstr "" msgid "" "If a file :file:`.pdbrc` exists in the user's home directory or in the " "current directory, it is read with ``'utf-8'`` encoding and executed as if " -"it had been typed at the debugger prompt. This is particularly useful for " -"aliases. If both files exist, the one in the home directory is read first " -"and aliases defined there can be overridden by the local file." +"it had been typed at the debugger prompt, with the exception that empty " +"lines and lines starting with ``#`` are ignored. This is particularly " +"useful for aliases. If both files exist, the one in the home directory is " +"read first and aliases defined there can be overridden by the local file." msgstr "" -#: ../../library/pdb.rst:291 +#: ../../library/pdb.rst:292 msgid "" ":file:`.pdbrc` can now contain commands that continue debugging, such as :" "pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no " "effect." msgstr "" -#: ../../library/pdb.rst:296 +#: ../../library/pdb.rst:297 msgid "" ":file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was " "read with the system locale encoding." msgstr "" -#: ../../library/pdb.rst:303 +#: ../../library/pdb.rst:304 msgid "" "Without argument, print the list of available commands. With a *command* as " "argument, print help about that command. ``help pdb`` displays the full " @@ -366,26 +367,26 @@ msgid "" "the ``!`` command." msgstr "" -#: ../../library/pdb.rst:311 +#: ../../library/pdb.rst:312 msgid "" "Print a stack trace, with the most recent frame at the bottom. An arrow " "(``>``) indicates the current frame, which determines the context of most " "commands." msgstr "" -#: ../../library/pdb.rst:316 +#: ../../library/pdb.rst:317 msgid "" "Move the current frame *count* (default one) levels down in the stack trace " "(to a newer frame)." msgstr "" -#: ../../library/pdb.rst:321 +#: ../../library/pdb.rst:322 msgid "" "Move the current frame *count* (default one) levels up in the stack trace " "(to an older frame)." msgstr "" -#: ../../library/pdb.rst:326 +#: ../../library/pdb.rst:327 msgid "" "With a *lineno* argument, set a break there in the current file. With a " "*function* argument, set a break at the first executable statement within " @@ -396,33 +397,33 @@ msgid "" "refer." msgstr "" -#: ../../library/pdb.rst:333 +#: ../../library/pdb.rst:334 msgid "" "If a second argument is present, it is an expression which must evaluate to " "true before the breakpoint is honored." msgstr "" -#: ../../library/pdb.rst:336 +#: ../../library/pdb.rst:337 msgid "" "Without argument, list all breaks, including for each breakpoint, the number " "of times that breakpoint has been hit, the current ignore count, and the " "associated condition if any." msgstr "" -#: ../../library/pdb.rst:342 +#: ../../library/pdb.rst:343 msgid "" "Temporary breakpoint, which is removed automatically when it is first hit. " "The arguments are the same as for :pdbcmd:`break`." msgstr "" -#: ../../library/pdb.rst:347 +#: ../../library/pdb.rst:348 msgid "" "With a *filename:lineno* argument, clear all the breakpoints at this line. " "With a space separated list of breakpoint numbers, clear those breakpoints. " "Without argument, clear all breaks (but first ask confirmation)." msgstr "" -#: ../../library/pdb.rst:353 +#: ../../library/pdb.rst:354 msgid "" "Disable the breakpoints given as a space separated list of breakpoint " "numbers. Disabling a breakpoint means it cannot cause the program to stop " @@ -430,11 +431,11 @@ msgid "" "breakpoints and can be (re-)enabled." msgstr "" -#: ../../library/pdb.rst:360 +#: ../../library/pdb.rst:361 msgid "Enable the breakpoints specified." msgstr "" -#: ../../library/pdb.rst:364 +#: ../../library/pdb.rst:365 msgid "" "Set the ignore count for the given breakpoint number. If *count* is " "omitted, the ignore count is set to 0. A breakpoint becomes active when the " @@ -443,39 +444,39 @@ msgid "" "associated condition evaluates to true." msgstr "" -#: ../../library/pdb.rst:372 +#: ../../library/pdb.rst:373 msgid "" "Set a new *condition* for the breakpoint, an expression which must evaluate " "to true before the breakpoint is honored. If *condition* is absent, any " "existing condition is removed; i.e., the breakpoint is made unconditional." msgstr "" -#: ../../library/pdb.rst:378 +#: ../../library/pdb.rst:379 msgid "" "Specify a list of commands for breakpoint number *bpnumber*. The commands " "themselves appear on the following lines. Type a line containing just " "``end`` to terminate the commands. An example::" msgstr "" -#: ../../library/pdb.rst:387 +#: ../../library/pdb.rst:388 msgid "" "To remove all commands from a breakpoint, type ``commands`` and follow it " "immediately with ``end``; that is, give no commands." msgstr "" -#: ../../library/pdb.rst:390 +#: ../../library/pdb.rst:391 msgid "" "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." msgstr "" -#: ../../library/pdb.rst:392 +#: ../../library/pdb.rst:393 msgid "" "You can use breakpoint commands to start your program up again. Simply use " "the :pdbcmd:`continue` command, or :pdbcmd:`step`, or any other command that " "resumes execution." msgstr "" -#: ../../library/pdb.rst:396 +#: ../../library/pdb.rst:397 msgid "" "Specifying any command resuming execution (currently :pdbcmd:`continue`, :" "pdbcmd:`step`, :pdbcmd:`next`, :pdbcmd:`return`, :pdbcmd:`jump`, :pdbcmd:" @@ -486,7 +487,7 @@ msgid "" "ambiguities about which list to execute." msgstr "" -#: ../../library/pdb.rst:405 +#: ../../library/pdb.rst:406 msgid "" "If you use the ``silent`` command in the command list, the usual message " "about stopping at a breakpoint is not printed. This may be desirable for " @@ -495,13 +496,13 @@ msgid "" "was reached." msgstr "" -#: ../../library/pdb.rst:412 +#: ../../library/pdb.rst:413 msgid "" "Execute the current line, stop at the first possible occasion (either in a " "function that is called or on the next line in the current function)." msgstr "" -#: ../../library/pdb.rst:417 +#: ../../library/pdb.rst:418 msgid "" "Continue execution until the next line in the current function is reached or " "it returns. (The difference between :pdbcmd:`next` and :pdbcmd:`step` is " @@ -510,46 +511,46 @@ msgid "" "line in the current function.)" msgstr "" -#: ../../library/pdb.rst:425 +#: ../../library/pdb.rst:426 msgid "" "Without argument, continue execution until the line with a number greater " "than the current one is reached." msgstr "" -#: ../../library/pdb.rst:428 +#: ../../library/pdb.rst:429 msgid "" "With *lineno*, continue execution until a line with a number greater or " "equal to *lineno* is reached. In both cases, also stop when the current " "frame returns." msgstr "" -#: ../../library/pdb.rst:432 +#: ../../library/pdb.rst:433 msgid "Allow giving an explicit line number." msgstr "" -#: ../../library/pdb.rst:437 +#: ../../library/pdb.rst:438 msgid "Continue execution until the current function returns." msgstr "" -#: ../../library/pdb.rst:441 +#: ../../library/pdb.rst:442 msgid "Continue execution, only stop when a breakpoint is encountered." msgstr "" -#: ../../library/pdb.rst:445 +#: ../../library/pdb.rst:446 msgid "" "Set the next line that will be executed. Only available in the bottom-most " "frame. This lets you jump back and execute code again, or jump forward to " "skip code that you don't want to run." msgstr "" -#: ../../library/pdb.rst:449 +#: ../../library/pdb.rst:450 msgid "" "It should be noted that not all jumps are allowed -- for instance it is not " "possible to jump into the middle of a :keyword:`for` loop or out of a :" "keyword:`finally` clause." msgstr "" -#: ../../library/pdb.rst:455 +#: ../../library/pdb.rst:456 msgid "" "List source code for the current file. Without arguments, list 11 lines " "around the current line or continue the previous listing. With ``.`` as " @@ -558,7 +559,7 @@ msgid "" "second argument is less than the first, it is interpreted as a count." msgstr "" -#: ../../library/pdb.rst:461 +#: ../../library/pdb.rst:462 msgid "" "The current line in the current frame is indicated by ``->``. If an " "exception is being debugged, the line where the exception was originally " @@ -566,90 +567,90 @@ msgid "" "line." msgstr "" -#: ../../library/pdb.rst:466 +#: ../../library/pdb.rst:467 msgid "Added the ``>>`` marker." msgstr "" -#: ../../library/pdb.rst:471 +#: ../../library/pdb.rst:472 msgid "" "List all source code for the current function or frame. Interesting lines " "are marked as for :pdbcmd:`list`." msgstr "" -#: ../../library/pdb.rst:478 +#: ../../library/pdb.rst:479 msgid "Print the arguments of the current function and their current values." msgstr "" -#: ../../library/pdb.rst:482 +#: ../../library/pdb.rst:483 msgid "Evaluate *expression* in the current context and print its value." msgstr "" -#: ../../library/pdb.rst:486 +#: ../../library/pdb.rst:487 msgid "" "``print()`` can also be used, but is not a debugger command --- this " "executes the Python :func:`print` function." msgstr "" -#: ../../library/pdb.rst:492 +#: ../../library/pdb.rst:493 msgid "" "Like the :pdbcmd:`p` command, except the value of *expression* is pretty-" "printed using the :mod:`pprint` module." msgstr "" -#: ../../library/pdb.rst:497 +#: ../../library/pdb.rst:498 msgid "Print the type of *expression*." msgstr "" -#: ../../library/pdb.rst:501 +#: ../../library/pdb.rst:502 msgid "Try to get source code of *expression* and display it." msgstr "" -#: ../../library/pdb.rst:507 +#: ../../library/pdb.rst:508 msgid "" "Display the value of *expression* if it changed, each time execution stops " "in the current frame." msgstr "" -#: ../../library/pdb.rst:510 +#: ../../library/pdb.rst:511 msgid "" "Without *expression*, list all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:514 +#: ../../library/pdb.rst:515 msgid "" "Display evaluates *expression* and compares to the result of the previous " "evaluation of *expression*, so when the result is mutable, display may not " "be able to pick up the changes." msgstr "" -#: ../../library/pdb.rst:518 +#: ../../library/pdb.rst:519 msgid "Example::" -msgstr "" +msgstr "範例: ::" -#: ../../library/pdb.rst:526 +#: ../../library/pdb.rst:527 msgid "" "Display won't realize ``lst`` has been changed because the result of " "evaluation is modified in place by ``lst.append(1)`` before being compared::" msgstr "" -#: ../../library/pdb.rst:541 +#: ../../library/pdb.rst:542 msgid "You can do some tricks with copy mechanism to make it work::" msgstr "" -#: ../../library/pdb.rst:560 +#: ../../library/pdb.rst:561 msgid "" "Do not display *expression* anymore in the current frame. Without " "*expression*, clear all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:567 +#: ../../library/pdb.rst:568 msgid "" "Start an interactive interpreter (using the :mod:`code` module) whose global " "namespace contains all the (global and local) names found in the current " "scope." msgstr "" -#: ../../library/pdb.rst:577 +#: ../../library/pdb.rst:578 msgid "" "Create an alias called *name* that executes *command*. The *command* must " "*not* be enclosed in quotes. Replaceable parameters can be indicated by " @@ -658,7 +659,7 @@ msgid "" "arguments are given, all aliases are listed." msgstr "" -#: ../../library/pdb.rst:583 +#: ../../library/pdb.rst:584 msgid "" "Aliases may be nested and can contain anything that can be legally typed at " "the pdb prompt. Note that internal pdb commands *can* be overridden by " @@ -667,30 +668,30 @@ msgid "" "other words in the line are left alone." msgstr "" -#: ../../library/pdb.rst:589 +#: ../../library/pdb.rst:590 msgid "" "As an example, here are two useful aliases (especially when placed in the :" "file:`.pdbrc` file)::" msgstr "" -#: ../../library/pdb.rst:599 +#: ../../library/pdb.rst:600 msgid "Delete the specified alias *name*." msgstr "" -#: ../../library/pdb.rst:603 +#: ../../library/pdb.rst:604 msgid "" "Execute the (one-line) *statement* in the context of the current stack " "frame. The exclamation point can be omitted unless the first word of the " "statement resembles a debugger command, e.g.:" msgstr "" -#: ../../library/pdb.rst:612 +#: ../../library/pdb.rst:613 msgid "" "To set a global variable, you can prefix the assignment command with a :" "keyword:`global` statement on the same line, e.g.:" msgstr "" -#: ../../library/pdb.rst:623 +#: ../../library/pdb.rst:624 msgid "" "Restart the debugged Python program. If *args* is supplied, it is split " "with :mod:`shlex` and the result is used as the new :data:`sys.argv`. " @@ -698,25 +699,25 @@ msgid "" "`restart` is an alias for :pdbcmd:`run`." msgstr "" -#: ../../library/pdb.rst:630 +#: ../../library/pdb.rst:631 msgid "Quit from the debugger. The program being executed is aborted." msgstr "" -#: ../../library/pdb.rst:634 +#: ../../library/pdb.rst:635 msgid "" "Enter a recursive debugger that steps through *code* (which is an arbitrary " "expression or statement to be executed in the current environment)." msgstr "" -#: ../../library/pdb.rst:640 +#: ../../library/pdb.rst:641 msgid "Print the return value for the last return of the current function." msgstr "" -#: ../../library/pdb.rst:643 +#: ../../library/pdb.rst:644 msgid "Footnotes" msgstr "註解" -#: ../../library/pdb.rst:644 +#: ../../library/pdb.rst:645 msgid "" "Whether a frame is considered to originate in a certain module is determined " "by the ``__name__`` in the frame globals." diff --git a/library/pickle.po b/library/pickle.po index 5616534be0..5e467e150d 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -62,11 +62,11 @@ msgstr "" #: ../../library/pickle.rst:47 msgid "Relationship to other Python modules" -msgstr "" +msgstr "和其他 Python 模組的關係" #: ../../library/pickle.rst:50 msgid "Comparison with ``marshal``" -msgstr "" +msgstr "和 ``marshal`` 的比較" #: ../../library/pickle.rst:52 msgid "" @@ -125,7 +125,7 @@ msgstr "" #: ../../library/pickle.rst:90 msgid "Comparison with ``json``" -msgstr "" +msgstr "和 ``json`` 的比較" #: ../../library/pickle.rst:92 msgid "" @@ -142,7 +142,7 @@ msgstr "" #: ../../library/pickle.rst:99 msgid "JSON is human-readable, while pickle is not;" -msgstr "" +msgstr "JSON 是人類可讀的,而 pickle 不是;" #: ../../library/pickle.rst:101 msgid "" @@ -275,7 +275,7 @@ msgstr "" #: ../../library/pickle.rst:188 msgid "The :mod:`pickle` module provides the following constants:" -msgstr "" +msgstr ":mod:`pickle` 模組提供以下常數:" #: ../../library/pickle.rst:193 msgid "" @@ -294,11 +294,11 @@ msgstr "" #: ../../library/pickle.rst:207 msgid "The default protocol is 3." -msgstr "" +msgstr "預設協定為 3。" #: ../../library/pickle.rst:211 msgid "The default protocol is 4." -msgstr "" +msgstr "預設協定為 4。" #: ../../library/pickle.rst:213 msgid "" @@ -481,7 +481,7 @@ msgstr "" #: ../../library/pickle.rst:346 ../../library/pickle.rst:447 msgid "See :ref:`pickle-persistent` for details and examples of uses." -msgstr "關於細節與用法範例請見 :ref:`pickle-persistent`\\ 。" +msgstr "關於細節與用法範例請見 :ref:`pickle-persistent`。" #: ../../library/pickle.rst:350 msgid "" @@ -505,7 +505,7 @@ msgstr "" #: ../../library/pickle.rst:367 msgid "See :ref:`pickle-dispatch` for usage examples." -msgstr "關於用法範例請見 :ref:`pickle-dispatch`\\ 。" +msgstr "關於用法範例請見 :ref:`pickle-dispatch`。" #: ../../library/pickle.rst:373 msgid "" @@ -1054,10 +1054,7 @@ msgstr "" #: ../../library/pickle.rst:793 msgid "For example ::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/pickle.rst:800 msgid "" @@ -1335,7 +1332,7 @@ msgstr "" msgid "The following example reads the resulting pickled data. ::" msgstr "" -#: ../../library/pickle.rst:1192 +#: ../../library/pickle.rst:1191 msgid "Module :mod:`copyreg`" msgstr ":mod:`copyreg` 模組" @@ -1343,7 +1340,7 @@ msgstr ":mod:`copyreg` 模組" msgid "Pickle interface constructor registration for extension types." msgstr "" -#: ../../library/pickle.rst:1195 +#: ../../library/pickle.rst:1194 msgid "Module :mod:`pickletools`" msgstr ":mod:`pickletools` 模組" @@ -1351,7 +1348,7 @@ msgstr ":mod:`pickletools` 模組" msgid "Tools for working with and analyzing pickled data." msgstr "" -#: ../../library/pickle.rst:1198 +#: ../../library/pickle.rst:1197 msgid "Module :mod:`shelve`" msgstr ":mod:`shelve` 模組" @@ -1359,7 +1356,7 @@ msgstr ":mod:`shelve` 模組" msgid "Indexed databases of objects; uses :mod:`pickle`." msgstr "" -#: ../../library/pickle.rst:1201 +#: ../../library/pickle.rst:1200 msgid "Module :mod:`copy`" msgstr ":mod:`copy` 模組" @@ -1468,6 +1465,3 @@ msgstr "__setstate__()(copy 協定)" #: ../../library/pickle.rst:1069 msgid "find_class() (pickle protocol)" msgstr "find_class()(pickle 協定)" - -#~ msgid "``None``, ``True``, and ``False``;" -#~ msgstr "``None``\\ 、\\ ``True`` 和 ``False``\\ ;" diff --git a/library/platform.po b/library/platform.po index 804967f176..947f09597c 100644 --- a/library/platform.po +++ b/library/platform.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2024-04-12 00:03+0000\n" "PO-Revision-Date: 2022-06-11 14:03+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -318,14 +318,14 @@ msgstr "" msgid "" "As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT " "machines and ``'Multiprocessor Free'`` on multi processor machines. The " -"*'Free'* refers to the OS version being free of debugging code. It could " -"also state *'Checked'* which means the OS version uses debugging code, i.e. " -"code that checks arguments, ranges, etc." +"``'Free'`` refers to the OS version being free of debugging code. It could " +"also state ``'Checked'`` which means the OS version uses debugging code, i." +"e. code that checks arguments, ranges, etc." msgstr "" "一點提示:*ptype* 在單個處理器的 NT 機器上為 ``'Uniprocessor Free'``,而在多" -"個處理器的機器上為 ``'Multiprocessor Free'``。*'Free'* 是指該 OS 版本沒有除錯" -"程式。它也可能以 *'Checked'* 表示,代表該 OS 版本使用了除錯程式,即檢查引數、" -"範圍等的程式。" +"個處理器的機器上為 ``'Multiprocessor Free'``。``'Free'`` 是指該 OS 版本沒有除" +"錯程式。它也可能以 ``'Checked'`` 表示,代表該 OS 版本使用了除錯程式,即檢查引" +"數、範圍等的程式。" #: ../../library/platform.rst:220 msgid "" diff --git a/library/poplib.po b/library/poplib.po index 01d018a090..731393775b 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 10:36+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -144,7 +144,7 @@ msgid "" "constructor as a string." msgstr "" -#: ../../library/poplib.rst:102 +#: ../../library/poplib.rst:101 msgid "Module :mod:`imaplib`" msgstr ":mod:`imaplib` 模組" @@ -152,7 +152,7 @@ msgstr ":mod:`imaplib` 模組" msgid "The standard Python IMAP module." msgstr "" -#: ../../library/poplib.rst:106 +#: ../../library/poplib.rst:104 msgid "" "`Frequently Asked Questions About Fetchmail `_" diff --git a/library/pprint.po b/library/pprint.po index d6fc11af9a..c77adc2e42 100644 --- a/library/pprint.po +++ b/library/pprint.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-03-25 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -69,7 +69,7 @@ msgid "" "parameters." msgstr "" -#: ../../library/pprint.rst:53 +#: ../../library/pprint.rst:64 msgid "" "Prints the formatted representation of *object* on *stream*, followed by a " "newline. If *stream* is ``None``, :data:`sys.stdout` is used. This may be " @@ -78,7 +78,7 @@ msgid "" "use within a scope)." msgstr "" -#: ../../library/pprint.rst:59 +#: ../../library/pprint.rst:70 msgid "" "The configuration parameters *stream*, *indent*, *width*, *depth*, " "*compact*, *sort_dicts* and *underscore_numbers* are passed to the :class:" @@ -86,7 +86,13 @@ msgid "" "documentation below." msgstr "" -#: ../../library/pprint.rst:78 +#: ../../library/pprint.rst:75 +msgid "" +"Note that *sort_dicts* is ``True`` by default and you might want to use :" +"func:`~pprint.pp` instead where it is ``False`` by default." +msgstr "" + +#: ../../library/pprint.rst:81 msgid "" "Return the formatted representation of *object* as a string. *indent*, " "*width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are " @@ -94,21 +100,21 @@ msgid "" "and their meanings are as described in its documentation below." msgstr "" -#: ../../library/pprint.rst:88 +#: ../../library/pprint.rst:91 msgid "" "Determine if the formatted representation of *object* is \"readable\", or " "can be used to reconstruct the value using :func:`eval`. This always " "returns ``False`` for recursive objects." msgstr "" -#: ../../library/pprint.rst:98 +#: ../../library/pprint.rst:101 msgid "" "Determine if *object* requires a recursive representation. This function is " "subject to the same limitations as noted in :func:`saferepr` below and may " "raise an :exc:`RecursionError` if it fails to detect a recursive object." msgstr "" -#: ../../library/pprint.rst:105 +#: ../../library/pprint.rst:108 msgid "" "Return a string representation of *object*, protected against recursion in " "some common data structures, namely instances of :class:`dict`, :class:" @@ -118,21 +124,21 @@ msgid "" "id=number>``. The representation is not otherwise formatted." msgstr "" -#: ../../library/pprint.rst:118 +#: ../../library/pprint.rst:121 msgid "PrettyPrinter Objects" msgstr "PrettyPrinter 物件" -#: ../../library/pprint.rst:120 +#: ../../library/pprint.rst:123 msgid "This module defines one class:" msgstr "" -#: ../../library/pprint.rst:130 +#: ../../library/pprint.rst:133 msgid "" "Construct a :class:`PrettyPrinter` instance. This constructor understands " "several keyword parameters." msgstr "" -#: ../../library/pprint.rst:133 +#: ../../library/pprint.rst:136 msgid "" "*stream* (default :data:`!sys.stdout`) is a :term:`file-like object` to " "which the output will be written by calling its :meth:`!write` method. If " @@ -140,19 +146,19 @@ msgid "" "`~PrettyPrinter.pprint` silently returns." msgstr "" -#: ../../library/pprint.rst:138 +#: ../../library/pprint.rst:141 msgid "" "Other values configure the manner in which nesting of complex data " "structures is displayed." msgstr "" -#: ../../library/pprint.rst:141 +#: ../../library/pprint.rst:144 msgid "" "*indent* (default 1) specifies the amount of indentation added for each " "nesting level." msgstr "" -#: ../../library/pprint.rst:144 +#: ../../library/pprint.rst:147 msgid "" "*depth* controls the number of nesting levels which may be printed; if the " "data structure being printed is too deep, the next contained level is " @@ -160,14 +166,14 @@ msgid "" "objects being formatted." msgstr "" -#: ../../library/pprint.rst:149 +#: ../../library/pprint.rst:152 msgid "" "*width* (default 80) specifies the desired maximum number of characters per " "line in the output. If a structure cannot be formatted within the width " "constraint, a best effort will be made." msgstr "" -#: ../../library/pprint.rst:153 +#: ../../library/pprint.rst:156 msgid "" "*compact* impacts the way that long sequences (lists, tuples, sets, etc) are " "formatted. If *compact* is false (the default) then each item of a sequence " @@ -175,52 +181,52 @@ msgid "" "as will fit within the *width* will be formatted on each output line." msgstr "" -#: ../../library/pprint.rst:159 +#: ../../library/pprint.rst:162 msgid "" "If *sort_dicts* is true (the default), dictionaries will be formatted with " "their keys sorted, otherwise they will display in insertion order." msgstr "" -#: ../../library/pprint.rst:162 +#: ../../library/pprint.rst:165 msgid "" "If *underscore_numbers* is true, integers will be formatted with the ``_`` " "character for a thousands separator, otherwise underscores are not displayed " "(the default)." msgstr "" -#: ../../library/pprint.rst:166 +#: ../../library/pprint.rst:169 msgid "Added the *compact* parameter." msgstr "新增 *compact* 參數。" -#: ../../library/pprint.rst:169 +#: ../../library/pprint.rst:172 msgid "Added the *sort_dicts* parameter." msgstr "新增 *sort_dicts* 參數。" -#: ../../library/pprint.rst:172 +#: ../../library/pprint.rst:175 msgid "Added the *underscore_numbers* parameter." msgstr "新增 *underscore_numbers* 參數。" -#: ../../library/pprint.rst:175 +#: ../../library/pprint.rst:178 msgid "No longer attempts to write to :data:`!sys.stdout` if it is ``None``." msgstr "" -#: ../../library/pprint.rst:202 +#: ../../library/pprint.rst:205 msgid ":class:`PrettyPrinter` instances have the following methods:" msgstr "" -#: ../../library/pprint.rst:207 +#: ../../library/pprint.rst:210 msgid "" "Return the formatted representation of *object*. This takes into account " "the options passed to the :class:`PrettyPrinter` constructor." msgstr "" -#: ../../library/pprint.rst:213 +#: ../../library/pprint.rst:216 msgid "" "Print the formatted representation of *object* on the configured stream, " "followed by a newline." msgstr "" -#: ../../library/pprint.rst:216 +#: ../../library/pprint.rst:219 msgid "" "The following methods provide the implementations for the corresponding " "functions of the same names. Using these methods on an instance is slightly " @@ -228,7 +234,7 @@ msgid "" "created." msgstr "" -#: ../../library/pprint.rst:226 +#: ../../library/pprint.rst:229 msgid "" "Determine if the formatted representation of the object is \"readable,\" or " "can be used to reconstruct the value using :func:`eval`. Note that this " @@ -237,18 +243,18 @@ msgid "" "returns ``False``." msgstr "" -#: ../../library/pprint.rst:235 +#: ../../library/pprint.rst:238 msgid "Determine if the object requires a recursive representation." msgstr "" -#: ../../library/pprint.rst:237 +#: ../../library/pprint.rst:240 msgid "" "This method is provided as a hook to allow subclasses to modify the way " "objects are converted to strings. The default implementation uses the " "internals of the :func:`saferepr` implementation." msgstr "" -#: ../../library/pprint.rst:244 +#: ../../library/pprint.rst:247 msgid "" "Returns three values: the formatted version of *object* as a string, a flag " "indicating whether the result is readable, and a flag indicating whether " @@ -266,45 +272,45 @@ msgid "" "of the current call." msgstr "" -#: ../../library/pprint.rst:262 +#: ../../library/pprint.rst:265 msgid "Example" msgstr "範例" -#: ../../library/pprint.rst:264 +#: ../../library/pprint.rst:267 msgid "" -"To demonstrate several uses of the :func:`~pprint.pprint` function and its " +"To demonstrate several uses of the :func:`~pprint.pp` function and its " "parameters, let's fetch information about a project from `PyPI `_::" msgstr "" -#: ../../library/pprint.rst:273 -msgid "In its basic form, :func:`~pprint.pprint` shows the whole object::" +#: ../../library/pprint.rst:276 +msgid "In its basic form, :func:`~pprint.pp` shows the whole object::" msgstr "" -#: ../../library/pprint.rst:329 +#: ../../library/pprint.rst:332 msgid "" "The result can be limited to a certain *depth* (ellipsis is used for deeper " "contents)::" msgstr "" -#: ../../library/pprint.rst:375 +#: ../../library/pprint.rst:378 msgid "" "Additionally, maximum character *width* can be suggested. If a long object " "cannot be split, the specified width will be exceeded::" msgstr "" -#: ../../library/pprint.rst:86 ../../library/pprint.rst:224 +#: ../../library/pprint.rst:89 ../../library/pprint.rst:227 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../library/pprint.rst:86 ../../library/pprint.rst:224 +#: ../../library/pprint.rst:89 ../../library/pprint.rst:227 msgid "eval" msgstr "eval" -#: ../../library/pprint.rst:125 +#: ../../library/pprint.rst:128 msgid "..." msgstr "..." -#: ../../library/pprint.rst:125 +#: ../../library/pprint.rst:128 msgid "placeholder" msgstr "placeholder(佔位符號)" diff --git a/library/profile.po b/library/profile.po index cd5bc2abd1..e8572edb2d 100644 --- a/library/profile.po +++ b/library/profile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-20 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -105,7 +105,7 @@ msgid "" "sorted by the ``cumtime`` values. The column headings include:" msgstr "" -#: ../../library/profile.rst:89 +#: ../../library/profile.rst:88 msgid "ncalls" msgstr "ncalls" @@ -113,7 +113,7 @@ msgstr "ncalls" msgid "for the number of calls." msgstr "" -#: ../../library/profile.rst:93 +#: ../../library/profile.rst:91 msgid "tottime" msgstr "tottime" @@ -123,7 +123,7 @@ msgid "" "calls to sub-functions)" msgstr "" -#: ../../library/profile.rst:96 ../../library/profile.rst:103 +#: ../../library/profile.rst:95 ../../library/profile.rst:102 msgid "percall" msgstr "percall" @@ -131,7 +131,7 @@ msgstr "percall" msgid "is the quotient of ``tottime`` divided by ``ncalls``" msgstr "" -#: ../../library/profile.rst:100 +#: ../../library/profile.rst:98 msgid "cumtime" msgstr "cumtime" @@ -145,7 +145,7 @@ msgstr "" msgid "is the quotient of ``cumtime`` divided by primitive calls" msgstr "" -#: ../../library/profile.rst:106 +#: ../../library/profile.rst:105 msgid "filename:lineno(function)" msgstr "" @@ -910,7 +910,7 @@ msgid "" "``your_time_func``'s return value will be interpreted differently:" msgstr "" -#: ../../library/profile.rst:681 +#: ../../library/profile.rst:667 msgid ":class:`profile.Profile`" msgstr ":class:`profile.Profile`" @@ -935,7 +935,7 @@ msgid "" "along with the appropriate calibration constant." msgstr "" -#: ../../library/profile.rst:695 +#: ../../library/profile.rst:683 msgid ":class:`cProfile.Profile`" msgstr ":class:`cProfile.Profile`" diff --git a/library/pwd.po b/library/pwd.po index 10903ae7c6..bd2d72f38f 100644 --- a/library/pwd.po +++ b/library/pwd.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-05-20 16:08+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -182,7 +182,7 @@ msgid "" "Return a list of all available password database entries, in arbitrary order." msgstr "以任意順序回傳所有可用密碼資料庫條目的 list。" -#: ../../library/pwd.rst:74 +#: ../../library/pwd.rst:73 msgid "Module :mod:`grp`" msgstr ":mod:`grp` 模組" diff --git a/library/pydoc.po b/library/pydoc.po index d02128e2a7..dfb6750d97 100644 --- a/library/pydoc.po +++ b/library/pydoc.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-03-20 00:03+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/pydoc.py`" #: ../../library/pydoc.rst:19 msgid "" -"The :mod:`pydoc` module automatically generates documentation from Python " +"The :mod:`!pydoc` module automatically generates documentation from Python " "modules. The documentation can be presented as pages of text on the " "console, served to a web browser, or saved to HTML files." msgstr "" @@ -36,9 +36,9 @@ msgstr "" #: ../../library/pydoc.rst:23 msgid "" "For modules, classes, functions and methods, the displayed documentation is " -"derived from the docstring (i.e. the :attr:`__doc__` attribute) of the " +"derived from the docstring (i.e. the :attr:`!__doc__` attribute) of the " "object, and recursively of its documentable members. If there is no " -"docstring, :mod:`pydoc` tries to obtain a description from the block of " +"docstring, :mod:`!pydoc` tries to obtain a description from the block of " "comment lines just above the definition of the class, function or method in " "the source file, or at the top of the module (see :func:`inspect." "getcomments`)." @@ -47,7 +47,7 @@ msgstr "" #: ../../library/pydoc.rst:30 msgid "" "The built-in function :func:`help` invokes the online help system in the " -"interactive interpreter, which uses :mod:`pydoc` to generate its " +"interactive interpreter, which uses :mod:`!pydoc` to generate its " "documentation as text on the console. The same text documentation can also " "be viewed from outside the Python interpreter by running :program:`pydoc` as " "a script at the operating system's command prompt. For example, running ::" @@ -67,7 +67,7 @@ msgstr "" #: ../../library/pydoc.rst:49 msgid "" -"In order to find objects and their documentation, :mod:`pydoc` imports the " +"In order to find objects and their documentation, :mod:`!pydoc` imports the " "module(s) to be documented. Therefore, any code on module level will be " "executed on that occasion. Use an ``if __name__ == '__main__':`` guard to " "only execute code when a file is invoked as a script and not just imported." @@ -136,7 +136,7 @@ msgid "" "Module docs for core modules are assumed to reside in ``https://docs.python." "org/X.Y/library/`` where ``X`` and ``Y`` are the major and minor version " "numbers of the Python interpreter. This can be overridden by setting the :" -"envvar:`PYTHONDOCS` environment variable to a different URL or to a local " +"envvar:`!PYTHONDOCS` environment variable to a different URL or to a local " "directory containing the Library Reference Manual pages." msgstr "" @@ -150,7 +150,7 @@ msgstr "" #: ../../library/pydoc.rst:103 msgid "" -":mod:`pydoc` now uses :func:`inspect.signature` rather than :func:`inspect." +":mod:`!pydoc` now uses :func:`inspect.signature` rather than :func:`inspect." "getfullargspec` to extract signature information from callables." msgstr "" diff --git a/library/queue.po b/library/queue.po index 434fc9493e..9feabac60a 100644 --- a/library/queue.po +++ b/library/queue.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-23 00:17+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-09-27 00:12+0800\n" "Last-Translator: Allen Wu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -364,7 +364,7 @@ msgid "" msgstr "" "等效於 ``put(item, block=False)``,用於與 :meth:`Queue.put_nowait` 相容。" -#: ../../library/queue.rst:275 +#: ../../library/queue.rst:273 msgid "Class :class:`multiprocessing.Queue`" msgstr "Class :class:`multiprocessing.Queue`" diff --git a/library/re.po b/library/re.po index c6ad200022..53636a8987 100644 --- a/library/re.po +++ b/library/re.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-18 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-09-16 14:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -98,12 +98,12 @@ msgstr "" #: ../../library/re.rst:51 msgid "" -"The third-party `regex `_ module, which has " -"an API compatible with the standard library :mod:`re` module, but offers " -"additional functionality and a more thorough Unicode support." +"The third-party :pypi:`regex` module, which has an API compatible with the " +"standard library :mod:`re` module, but offers additional functionality and a " +"more thorough Unicode support." msgstr "" -"第三方的 `regex `_ 模組,有著和標準函式庫 :" -"mod:`re` 模組相容的 API,但是提供額外的功能以及更完整的 Unicode 支援。" +"第三方的 :pypi:`regex` 模組,有著和標準函式庫 :mod:`re` 模組相容的 API,但是" +"提供額外的功能以及更完整的 Unicode 支援。" #: ../../library/re.rst:59 msgid "Regular Expression Syntax" @@ -169,7 +169,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: ../../library/re.rst:104 ../../library/re.rst:1606 +#: ../../library/re.rst:101 ../../library/re.rst:1606 msgid "``.``" msgstr "``.``" @@ -180,7 +180,7 @@ msgid "" "including a newline." msgstr "" -#: ../../library/re.rst:110 +#: ../../library/re.rst:108 msgid "``^``" msgstr "``^``" @@ -190,7 +190,7 @@ msgid "" "also matches immediately after each newline." msgstr "" -#: ../../library/re.rst:121 +#: ../../library/re.rst:114 msgid "``$``" msgstr "``$``" @@ -206,7 +206,7 @@ msgid "" "string." msgstr "" -#: ../../library/re.rst:128 +#: ../../library/re.rst:125 msgid "``*``" msgstr "``*``" @@ -217,7 +217,7 @@ msgid "" "followed by any number of 'b's." msgstr "" -#: ../../library/re.rst:135 +#: ../../library/re.rst:132 msgid "``+``" msgstr "``+``" @@ -228,7 +228,7 @@ msgid "" "match just 'a'." msgstr "" -#: ../../library/re.rst:141 +#: ../../library/re.rst:139 msgid "``?``" msgstr "``?``" @@ -238,7 +238,7 @@ msgid "" "``ab?`` will match either 'a' or 'ab'." msgstr "" -#: ../../library/re.rst:155 +#: ../../library/re.rst:148 msgid "``*?``, ``+?``, ``??``" msgstr "``*?``, ``+?``, ``??``" @@ -253,7 +253,7 @@ msgid "" "only ``''``." msgstr "" -#: ../../library/re.rst:179 +#: ../../library/re.rst:162 msgid "``*+``, ``++``, ``?+``" msgstr "``*+``, ``++``, ``?+``" @@ -274,7 +274,7 @@ msgid "" "``(?>x?)`` correspondingly." msgstr "" -#: ../../library/re.rst:187 +#: ../../library/re.rst:184 msgid "``{m}``" msgstr "``{m}``" @@ -285,7 +285,7 @@ msgid "" "match exactly six ``'a'`` characters, but not five." msgstr "" -#: ../../library/re.rst:196 +#: ../../library/re.rst:189 msgid "``{m,n}``" msgstr "``{m,n}``" @@ -301,7 +301,7 @@ msgid "" "described form." msgstr "" -#: ../../library/re.rst:203 +#: ../../library/re.rst:198 msgid "``{m,n}?``" msgstr "``{m,n}?``" @@ -314,7 +314,7 @@ msgid "" "while ``a{3,5}?`` will only match 3 characters." msgstr "" -#: ../../library/re.rst:218 +#: ../../library/re.rst:205 msgid "``{m,n}+``" msgstr "``{m,n}+``" @@ -331,7 +331,7 @@ msgid "" "``aa`` in the pattern. ``x{m,n}+`` is equivalent to ``(?>x{m,n})``." msgstr "" -#: ../../library/re.rst:233 +#: ../../library/re.rst:222 msgid "``\\``" msgstr "``\\``" @@ -353,7 +353,7 @@ msgid "" "recommended that you use raw strings for all but the simplest expressions." msgstr "" -#: ../../library/re.rst:293 +#: ../../library/re.rst:238 msgid "``[]``" msgstr "``[]``" @@ -425,7 +425,7 @@ msgid "" "will change semantically in the future." msgstr "" -#: ../../library/re.rst:306 +#: ../../library/re.rst:297 msgid "``|``" msgstr "``|``" @@ -442,7 +442,7 @@ msgid "" "use ``\\|``, or enclose it inside a character class, as in ``[|]``." msgstr "" -#: ../../library/re.rst:316 +#: ../../library/re.rst:311 msgid "``(...)``" msgstr "``(...)``" @@ -456,7 +456,7 @@ msgid "" "character class: ``[(]``, ``[)]``." msgstr "" -#: ../../library/re.rst:325 +#: ../../library/re.rst:320 msgid "``(?...)``" msgstr "``(?...)``" @@ -469,7 +469,7 @@ msgid "" "rule. Following are the currently supported extensions." msgstr "" -#: ../../library/re.rst:348 +#: ../../library/re.rst:327 msgid "``(?aiLmsux)``" msgstr "``(?aiLmsux)``" @@ -520,7 +520,7 @@ msgstr "" msgid "This construction can only be used at the start of the expression." msgstr "" -#: ../../library/re.rst:356 +#: ../../library/re.rst:352 msgid "``(?:...)``" msgstr "``(?:...)``" @@ -532,7 +532,7 @@ msgid "" "pattern." msgstr "" -#: ../../library/re.rst:388 +#: ../../library/re.rst:358 msgid "``(?aiLmsux-imsx:...)``" msgstr "``(?aiLmsux-imsx:...)``" @@ -565,7 +565,7 @@ msgstr "" msgid "The letters ``'a'``, ``'L'`` and ``'u'`` also can be used in a group." msgstr "" -#: ../../library/re.rst:403 +#: ../../library/re.rst:390 msgid "``(?>...)``" msgstr "``(?>...)``" @@ -583,7 +583,7 @@ msgid "" "thus fail to match." msgstr "" -#: ../../library/re.rst:435 +#: ../../library/re.rst:407 msgid "``(?P...)``" msgstr "``(?P...)``" @@ -654,7 +654,7 @@ msgid "" "range (``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../library/re.rst:441 +#: ../../library/re.rst:439 msgid "``(?P=name)``" msgstr "``(?P=name)``" @@ -664,7 +664,7 @@ msgid "" "the earlier group named *name*." msgstr "" -#: ../../library/re.rst:446 +#: ../../library/re.rst:445 msgid "``(?#...)``" msgstr "``(?#...)``" @@ -672,7 +672,7 @@ msgstr "``(?#...)``" msgid "A comment; the contents of the parentheses are simply ignored." msgstr "" -#: ../../library/re.rst:453 +#: ../../library/re.rst:450 msgid "``(?=...)``" msgstr "``(?=...)``" @@ -683,7 +683,7 @@ msgid "" "=Asimov)`` will match ``'Isaac '`` only if it's followed by ``'Asimov'``." msgstr "" -#: ../../library/re.rst:460 +#: ../../library/re.rst:457 msgid "``(?!...)``" msgstr "``(?!...)``" @@ -694,7 +694,7 @@ msgid "" "if it's *not* followed by ``'Asimov'``." msgstr "" -#: ../../library/re.rst:487 +#: ../../library/re.rst:464 msgid "``(?<=...)``" msgstr "``(?<=...)``" @@ -720,7 +720,7 @@ msgstr "" msgid "Added support for group references of fixed length." msgstr "" -#: ../../library/re.rst:496 +#: ../../library/re.rst:491 msgid "``(?\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -245,7 +245,7 @@ msgid "" "deprecated." msgstr "" -#: ../../library/runpy.rst:179 +#: ../../library/runpy.rst:178 msgid ":pep:`338` -- Executing modules as scripts" msgstr "" @@ -253,11 +253,11 @@ msgstr "" msgid "PEP written and implemented by Nick Coghlan." msgstr "" -#: ../../library/runpy.rst:182 +#: ../../library/runpy.rst:181 msgid ":pep:`366` -- Main module explicit relative imports" msgstr "" -#: ../../library/runpy.rst:185 +#: ../../library/runpy.rst:184 msgid ":pep:`451` -- A ModuleSpec Type for the Import System" msgstr "" diff --git a/library/secrets.po b/library/secrets.po index 9dbc2024e5..c308f9363a 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-27 00:19+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2022-11-30 13:42+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -203,14 +203,13 @@ msgstr "產生八個字元長的字母數字密碼:" #: ../../library/secrets.rst:157 msgid "" -"Applications should not `store passwords in a recoverable format `_, whether plain text or " -"encrypted. They should be salted and hashed using a cryptographically " -"strong one-way (irreversible) hash function." +"Applications should not :cwe:`store passwords in a recoverable format " +"<257>`, whether plain text or encrypted. They should be salted and hashed " +"using a cryptographically strong one-way (irreversible) hash function." msgstr "" -"應用程式不能\\ `以可復原的格式存儲密碼 `_,無論是用純文本還是經過加密。 它們應當先加鹽" -"(salt),再使用高加密強度的單向(不可逆)雜湊函式來產生雜湊值。" +"應用程式不能\\ :cwe:`以可復原的格式存儲密碼 <257>`,無論是用純文本還是經過加" +"密。 它們應當先加鹽(salt),再使用高加密強度的單向(不可逆)雜湊函式來產生雜" +"湊值。" #: ../../library/secrets.rst:163 msgid "" diff --git a/library/shelve.po b/library/shelve.po index deecb39af5..ec9e6e4382 100644 --- a/library/shelve.po +++ b/library/shelve.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-23 16:09+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -232,7 +232,7 @@ msgid "" "object)::" msgstr "" -#: ../../library/shelve.rst:219 +#: ../../library/shelve.rst:218 msgid "Module :mod:`dbm`" msgstr ":mod:`dbm` 模組" diff --git a/library/smtplib.po b/library/smtplib.po index f0c102718e..ef754c20f0 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -240,7 +240,7 @@ msgid "" "username/password combination provided." msgstr "" -#: ../../library/smtplib.rst:201 +#: ../../library/smtplib.rst:199 msgid ":rfc:`821` - Simple Mail Transfer Protocol" msgstr "" @@ -250,7 +250,7 @@ msgid "" "procedure, and protocol details for SMTP." msgstr "" -#: ../../library/smtplib.rst:205 +#: ../../library/smtplib.rst:203 msgid ":rfc:`1869` - SMTP Service Extensions" msgstr "" @@ -364,8 +364,8 @@ msgid "" "first." msgstr "" -#: ../../library/smtplib.rst:289 ../../library/smtplib.rst:319 -#: ../../library/smtplib.rst:407 ../../library/smtplib.rst:476 +#: ../../library/smtplib.rst:289 ../../library/smtplib.rst:318 +#: ../../library/smtplib.rst:406 ../../library/smtplib.rst:475 msgid ":exc:`SMTPHeloError`" msgstr ":exc:`SMTPHeloError`" @@ -401,7 +401,7 @@ msgid "" "successful, or may raise the following exceptions:" msgstr "" -#: ../../library/smtplib.rst:322 +#: ../../library/smtplib.rst:321 msgid ":exc:`SMTPAuthenticationError`" msgstr ":exc:`SMTPAuthenticationError`" @@ -409,8 +409,8 @@ msgstr ":exc:`SMTPAuthenticationError`" msgid "The server didn't accept the username/password combination." msgstr "" -#: ../../library/smtplib.rst:325 ../../library/smtplib.rst:410 -#: ../../library/smtplib.rst:487 +#: ../../library/smtplib.rst:324 ../../library/smtplib.rst:409 +#: ../../library/smtplib.rst:485 msgid ":exc:`SMTPNotSupportedError`" msgstr ":exc:`SMTPNotSupportedError`" @@ -418,7 +418,7 @@ msgstr ":exc:`SMTPNotSupportedError`" msgid "The ``AUTH`` command is not supported by the server." msgstr "" -#: ../../library/smtplib.rst:328 +#: ../../library/smtplib.rst:327 msgid ":exc:`SMTPException`" msgstr ":exc:`SMTPException`" @@ -534,7 +534,7 @@ msgstr "" msgid "The server does not support the STARTTLS extension." msgstr "" -#: ../../library/smtplib.rst:413 +#: ../../library/smtplib.rst:412 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" @@ -611,7 +611,7 @@ msgstr "" msgid "This method may raise the following exceptions:" msgstr "" -#: ../../library/smtplib.rst:473 +#: ../../library/smtplib.rst:469 msgid ":exc:`SMTPRecipientsRefused`" msgstr ":exc:`SMTPRecipientsRefused`" @@ -623,7 +623,7 @@ msgid "" "accepted)." msgstr "" -#: ../../library/smtplib.rst:479 +#: ../../library/smtplib.rst:478 msgid ":exc:`SMTPSenderRefused`" msgstr ":exc:`SMTPSenderRefused`" @@ -631,7 +631,7 @@ msgstr ":exc:`SMTPSenderRefused`" msgid "The server didn't accept the *from_addr*." msgstr "" -#: ../../library/smtplib.rst:483 +#: ../../library/smtplib.rst:481 msgid ":exc:`SMTPDataError`" msgstr ":exc:`SMTPDataError`" diff --git a/library/socket.po b/library/socket.po index 47b348dc47..9c8b6428fd 100644 --- a/library/socket.po +++ b/library/socket.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-21 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -62,7 +62,7 @@ msgid "" "operations is automatic, and buffer length is implicit on send operations." msgstr "" -#: ../../library/socket.rst:36 +#: ../../library/socket.rst:35 msgid "Module :mod:`socketserver`" msgstr ":mod:`socketserver` 模組" diff --git a/library/spwd.po b/library/spwd.po index b1813fef85..a590ec74ea 100644 --- a/library/spwd.po +++ b/library/spwd.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-13 00:17+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-05-22 02:14+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -209,7 +209,7 @@ msgid "" "arbitrary order." msgstr "" -#: ../../library/spwd.rst:78 +#: ../../library/spwd.rst:77 msgid "Module :mod:`grp`" msgstr ":mod:`grp` 模組" diff --git a/library/sqlite3.po b/library/sqlite3.po index 7110d2b6a2..1bb68199ed 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-22 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -25,7 +25,7 @@ msgstr ":mod:`sqlite3` --- SQLite 資料庫的 DB-API 2.0 介面" msgid "**Source code:** :source:`Lib/sqlite3/`" msgstr "**原始碼:**\\ :source:`Lib/sqlite3/`" -#: ../../library/sqlite3.rst:23 +#: ../../library/sqlite3.rst:25 msgid "" "SQLite is a C library that provides a lightweight disk-based database that " "doesn't require a separate server process and allows accessing the database " @@ -35,32 +35,32 @@ msgid "" "PostgreSQL or Oracle." msgstr "" -#: ../../library/sqlite3.rst:30 +#: ../../library/sqlite3.rst:32 msgid "" "The :mod:`!sqlite3` module was written by Gerhard Häring. It provides an " "SQL interface compliant with the DB-API 2.0 specification described by :pep:" "`249`, and requires SQLite 3.7.15 or newer." msgstr "" -#: ../../library/sqlite3.rst:34 +#: ../../library/sqlite3.rst:36 msgid "This document includes four main sections:" msgstr "此文件包含四個主要章節:" -#: ../../library/sqlite3.rst:36 +#: ../../library/sqlite3.rst:38 msgid ":ref:`sqlite3-tutorial` teaches how to use the :mod:`!sqlite3` module." msgstr ":ref:`sqlite3-tutorial` 教導如何使用 :mod:`!sqlite3` 模組。" -#: ../../library/sqlite3.rst:37 +#: ../../library/sqlite3.rst:39 msgid "" ":ref:`sqlite3-reference` describes the classes and functions this module " "defines." msgstr ":ref:`sqlite3-reference` 描述此模組定義的類別與函式。" -#: ../../library/sqlite3.rst:39 +#: ../../library/sqlite3.rst:41 msgid ":ref:`sqlite3-howtos` details how to handle specific tasks." msgstr ":ref:`sqlite3-howtos` 詳細說明如何處理特定工作。" -#: ../../library/sqlite3.rst:40 +#: ../../library/sqlite3.rst:42 msgid "" ":ref:`sqlite3-explanation` provides in-depth background on transaction " "control." @@ -70,40 +70,40 @@ msgstr ":ref:`sqlite3-explanation` 深入提供交易 (transaction) 控制的背 msgid "https://www.sqlite.org" msgstr "https://www.sqlite.org" -#: ../../library/sqlite3.rst:46 +#: ../../library/sqlite3.rst:48 msgid "" "The SQLite web page; the documentation describes the syntax and the " "available data types for the supported SQL dialect." msgstr "" -#: ../../library/sqlite3.rst:50 +#: ../../library/sqlite3.rst:51 msgid "https://www.w3schools.com/sql/" msgstr "https://www.w3schools.com/sql/" -#: ../../library/sqlite3.rst:50 +#: ../../library/sqlite3.rst:52 msgid "Tutorial, reference and examples for learning SQL syntax." msgstr "" -#: ../../library/sqlite3.rst:52 +#: ../../library/sqlite3.rst:54 msgid ":pep:`249` - Database API Specification 2.0" msgstr ":pep:`249` - 資料庫 API 規格 2.0" -#: ../../library/sqlite3.rst:53 +#: ../../library/sqlite3.rst:55 msgid "PEP written by Marc-André Lemburg." msgstr "PEP 由 Marc-André Lemburg 撰寫。" -#: ../../library/sqlite3.rst:66 +#: ../../library/sqlite3.rst:68 msgid "Tutorial" msgstr "" -#: ../../library/sqlite3.rst:68 +#: ../../library/sqlite3.rst:70 msgid "" "In this tutorial, you will create a database of Monty Python movies using " "basic :mod:`!sqlite3` functionality. It assumes a fundamental understanding " "of database concepts, including `cursors`_ and `transactions`_." msgstr "" -#: ../../library/sqlite3.rst:73 +#: ../../library/sqlite3.rst:75 msgid "" "First, we need to create a new database and open a database connection to " "allow :mod:`!sqlite3` to work with it. Call :func:`sqlite3.connect` to " @@ -111,20 +111,20 @@ msgid "" "working directory, implicitly creating it if it does not exist:" msgstr "" -#: ../../library/sqlite3.rst:84 +#: ../../library/sqlite3.rst:86 msgid "" "The returned :class:`Connection` object ``con`` represents the connection to " "the on-disk database." msgstr "" -#: ../../library/sqlite3.rst:87 +#: ../../library/sqlite3.rst:89 msgid "" "In order to execute SQL statements and fetch results from SQL queries, we " "will need to use a database cursor. Call :meth:`con.cursor() ` to create the :class:`Cursor`:" msgstr "" -#: ../../library/sqlite3.rst:95 +#: ../../library/sqlite3.rst:97 msgid "" "Now that we've got a database connection and a cursor, we can create a " "database table ``movie`` with columns for title, release year, and review " @@ -134,7 +134,7 @@ msgid "" "`cur.execute(...) `:" msgstr "" -#: ../../library/sqlite3.rst:111 +#: ../../library/sqlite3.rst:113 msgid "" "We can verify that the new table has been created by querying the " "``sqlite_master`` table built-in to SQLite, which should now contain an " @@ -144,21 +144,21 @@ msgid "" "` to fetch the resulting row:" msgstr "" -#: ../../library/sqlite3.rst:125 +#: ../../library/sqlite3.rst:127 msgid "" "We can see that the table has been created, as the query returns a :class:" "`tuple` containing the table's name. If we query ``sqlite_master`` for a non-" "existent table ``spam``, :meth:`!res.fetchone()` will return ``None``:" msgstr "" -#: ../../library/sqlite3.rst:136 +#: ../../library/sqlite3.rst:138 msgid "" "Now, add two rows of data supplied as SQL literals by executing an " "``INSERT`` statement, once again by calling :meth:`cur.execute(...) `:" msgstr "" -#: ../../library/sqlite3.rst:148 +#: ../../library/sqlite3.rst:150 msgid "" "The ``INSERT`` statement implicitly opens a transaction, which needs to be " "committed before changes are saved in the database (see :ref:`sqlite3-" @@ -166,7 +166,7 @@ msgid "" "commit>` on the connection object to commit the transaction:" msgstr "" -#: ../../library/sqlite3.rst:158 +#: ../../library/sqlite3.rst:160 msgid "" "We can verify that the data was inserted correctly by executing a ``SELECT`` " "query. Use the now-familiar :meth:`cur.execute(...) ` to " @@ -174,19 +174,19 @@ msgid "" "fetchall>` to return all resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:170 +#: ../../library/sqlite3.rst:172 msgid "" "The result is a :class:`list` of two :class:`!tuple`\\s, one per row, each " "containing that row's ``score`` value." msgstr "" -#: ../../library/sqlite3.rst:173 +#: ../../library/sqlite3.rst:175 msgid "" "Now, insert three more rows by calling :meth:`cur.executemany(...) `:" msgstr "" -#: ../../library/sqlite3.rst:186 +#: ../../library/sqlite3.rst:188 msgid "" "Notice that ``?`` placeholders are used to bind ``data`` to the query. " "Always use placeholders instead of :ref:`string formatting ` " @@ -194,69 +194,69 @@ msgid "" "(see :ref:`sqlite3-placeholders` for more details)." msgstr "" -#: ../../library/sqlite3.rst:192 +#: ../../library/sqlite3.rst:194 msgid "" "We can verify that the new rows were inserted by executing a ``SELECT`` " "query, this time iterating over the results of the query:" msgstr "" -#: ../../library/sqlite3.rst:206 +#: ../../library/sqlite3.rst:208 msgid "" "Each row is a two-item :class:`tuple` of ``(year, title)``, matching the " "columns selected in the query." msgstr "" -#: ../../library/sqlite3.rst:209 +#: ../../library/sqlite3.rst:211 msgid "" "Finally, verify that the database has been written to disk by calling :meth:" "`con.close() ` to close the existing connection, opening a " "new one, creating a new cursor, then querying the database:" msgstr "" -#: ../../library/sqlite3.rst:224 +#: ../../library/sqlite3.rst:227 msgid "" "You've now created an SQLite database using the :mod:`!sqlite3` module, " "inserted data and retrieved values from it in multiple ways." msgstr "" -#: ../../library/sqlite3.rst:236 +#: ../../library/sqlite3.rst:239 msgid ":ref:`sqlite3-howtos` for further reading:" msgstr "進一步參考 :ref:`sqlite3-howtos`:" -#: ../../library/sqlite3.rst:238 +#: ../../library/sqlite3.rst:241 msgid ":ref:`sqlite3-placeholders`" msgstr ":ref:`sqlite3-placeholders`" -#: ../../library/sqlite3.rst:239 +#: ../../library/sqlite3.rst:242 msgid ":ref:`sqlite3-adapters`" msgstr ":ref:`sqlite3-adapters`" -#: ../../library/sqlite3.rst:240 +#: ../../library/sqlite3.rst:243 msgid ":ref:`sqlite3-converters`" msgstr ":ref:`sqlite3-converters`" -#: ../../library/sqlite3.rst:241 ../../library/sqlite3.rst:625 +#: ../../library/sqlite3.rst:244 ../../library/sqlite3.rst:610 msgid ":ref:`sqlite3-connection-context-manager`" msgstr ":ref:`sqlite3-connection-context-manager`" -#: ../../library/sqlite3.rst:242 +#: ../../library/sqlite3.rst:245 msgid ":ref:`sqlite3-howto-row-factory`" msgstr ":ref:`sqlite3-howto-row-factory`" -#: ../../library/sqlite3.rst:244 +#: ../../library/sqlite3.rst:247 msgid "" ":ref:`sqlite3-explanation` for in-depth background on transaction control." msgstr "" -#: ../../library/sqlite3.rst:249 +#: ../../library/sqlite3.rst:252 msgid "Reference" msgstr "" -#: ../../library/sqlite3.rst:257 +#: ../../library/sqlite3.rst:260 msgid "Module functions" msgstr "" -#: ../../library/sqlite3.rst:265 +#: ../../library/sqlite3.rst:268 msgid "Open a connection to an SQLite database." msgstr "" @@ -264,14 +264,14 @@ msgstr "" msgid "Parameters" msgstr "參數" -#: ../../library/sqlite3.rst:267 +#: ../../library/sqlite3.rst:270 msgid "" "The path to the database file to be opened. You can pass ``\":memory:\"`` to " "create an `SQLite database existing only in memory `_, and open a connection to it." msgstr "" -#: ../../library/sqlite3.rst:274 +#: ../../library/sqlite3.rst:277 msgid "" "How many seconds the connection should wait before raising an :exc:" "`OperationalError` when a table is locked. If another connection opens a " @@ -279,7 +279,7 @@ msgid "" "transaction is committed. Default five seconds." msgstr "" -#: ../../library/sqlite3.rst:281 +#: ../../library/sqlite3.rst:284 msgid "" "Control whether and how data types not :ref:`natively supported by SQLite " "` are looked up to be converted to Python types, using the " @@ -292,7 +292,7 @@ msgid "" "disabled." msgstr "" -#: ../../library/sqlite3.rst:295 +#: ../../library/sqlite3.rst:298 msgid "" "Control legacy transaction handling behaviour. See :attr:`Connection." "isolation_level` and :ref:`sqlite3-transaction-control-isolation-level` for " @@ -302,7 +302,7 @@ msgid "" "`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default)." msgstr "" -#: ../../library/sqlite3.rst:305 +#: ../../library/sqlite3.rst:308 msgid "" "If ``True`` (default), :exc:`ProgrammingError` will be raised if the " "database connection is used by a thread other than the one that created it. " @@ -311,19 +311,19 @@ msgid "" "See :attr:`threadsafety` for more information." msgstr "" -#: ../../library/sqlite3.rst:314 +#: ../../library/sqlite3.rst:317 msgid "" "A custom subclass of :class:`Connection` to create the connection with, if " "not the default :class:`Connection` class." msgstr "" -#: ../../library/sqlite3.rst:318 +#: ../../library/sqlite3.rst:321 msgid "" "The number of statements that :mod:`!sqlite3` should internally cache for " "this connection, to avoid parsing overhead. By default, 128 statements." msgstr "" -#: ../../library/sqlite3.rst:323 +#: ../../library/sqlite3.rst:326 msgid "" "If set to ``True``, *database* is interpreted as a :abbr:`URI (Uniform " "Resource Identifier)` with a file path and an optional query string. The " @@ -332,7 +332,7 @@ msgid "" "various :ref:`sqlite3-uri-tricks`." msgstr "" -#: ../../library/sqlite3.rst:332 +#: ../../library/sqlite3.rst:335 msgid "" "Control :pep:`249` transaction handling behaviour. See :attr:`Connection." "autocommit` and :ref:`sqlite3-transaction-control-autocommit` for more " @@ -345,7 +345,7 @@ msgstr "" msgid "Return type" msgstr "" -#: ../../library/sqlite3.rst:343 +#: ../../library/sqlite3.rst:346 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect`` with argument " "``database``." @@ -353,7 +353,7 @@ msgstr "" "引發一個附帶引數 ``database`` 的\\ :ref:`稽核事件 ` ``sqlite3." "connect``。" -#: ../../library/sqlite3.rst:344 +#: ../../library/sqlite3.rst:347 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect/handle`` with " "argument ``connection_handle``." @@ -361,24 +361,24 @@ msgstr "" "引發一個附帶引數 ``connection_handle`` 的\\ :ref:`稽核事件 ` " "``sqlite3.connect/handle``。" -#: ../../library/sqlite3.rst:346 +#: ../../library/sqlite3.rst:349 msgid "Added the *uri* parameter." msgstr "新增 *uri* 參數。" -#: ../../library/sqlite3.rst:349 +#: ../../library/sqlite3.rst:352 msgid "" "*database* can now also be a :term:`path-like object`, not only a string." msgstr "" -#: ../../library/sqlite3.rst:352 +#: ../../library/sqlite3.rst:355 msgid "Added the ``sqlite3.connect/handle`` auditing event." msgstr "新增 ``sqlite3.connect/handle`` 稽核事件。" -#: ../../library/sqlite3.rst:355 +#: ../../library/sqlite3.rst:358 msgid "Added the *autocommit* parameter." msgstr "新增 *autocommit* 參數。" -#: ../../library/sqlite3.rst:360 +#: ../../library/sqlite3.rst:363 msgid "" "Return ``True`` if the string *statement* appears to contain one or more " "complete SQL statements. No syntactic verification or parsing of any kind is " @@ -386,24 +386,24 @@ msgid "" "and the statement is terminated by a semicolon." msgstr "" -#: ../../library/sqlite3.rst:366 +#: ../../library/sqlite3.rst:369 msgid "For example:" msgstr "範例:" -#: ../../library/sqlite3.rst:375 +#: ../../library/sqlite3.rst:378 msgid "" "This function may be useful during command-line input to determine if the " "entered text seems to form a complete SQL statement, or if additional input " "is needed before calling :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:379 +#: ../../library/sqlite3.rst:382 msgid "" "See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py` for real-world " "use." msgstr "" -#: ../../library/sqlite3.rst:384 +#: ../../library/sqlite3.rst:387 msgid "" "Enable or disable callback tracebacks. By default you will not get any " "tracebacks in user-defined functions, aggregates, converters, authorizer " @@ -412,13 +412,14 @@ msgid "" "on :data:`sys.stderr`. Use ``False`` to disable the feature again." msgstr "" -#: ../../library/sqlite3.rst:391 +#: ../../library/sqlite3.rst:396 msgid "" -"Register an :func:`unraisable hook handler ` for an " -"improved debug experience:" +"Errors in user-defined function callbacks are logged as unraisable " +"exceptions. Use an :func:`unraisable hook handler ` for " +"introspection of the failed callback." msgstr "" -#: ../../library/sqlite3.rst:417 +#: ../../library/sqlite3.rst:402 msgid "" "Register an *adapter* :term:`callable` to adapt the Python type *type* into " "an SQLite type. The adapter is called with a Python object of type *type* as " @@ -426,7 +427,7 @@ msgid "" "natively understands `." msgstr "" -#: ../../library/sqlite3.rst:425 +#: ../../library/sqlite3.rst:410 msgid "" "Register the *converter* :term:`callable` to convert SQLite objects of type " "*typename* into a Python object of a specific type. The converter is invoked " @@ -436,24 +437,24 @@ msgid "" "type detection works." msgstr "" -#: ../../library/sqlite3.rst:433 +#: ../../library/sqlite3.rst:418 msgid "" "Note: *typename* and the name of the type in your query are matched case-" "insensitively." msgstr "" -#: ../../library/sqlite3.rst:440 +#: ../../library/sqlite3.rst:425 msgid "Module constants" msgstr "" -#: ../../library/sqlite3.rst:444 +#: ../../library/sqlite3.rst:429 msgid "" "Set :attr:`~Connection.autocommit` to this constant to select old style (pre-" "Python 3.12) transaction control behaviour. See :ref:`sqlite3-transaction-" "control-isolation-level` for more information." msgstr "" -#: ../../library/sqlite3.rst:450 +#: ../../library/sqlite3.rst:435 msgid "" "Pass this flag value to the *detect_types* parameter of :func:`connect` to " "look up a converter function by using the type name, parsed from the query " @@ -461,13 +462,13 @@ msgid "" "in square brackets (``[]``)." msgstr "" -#: ../../library/sqlite3.rst:460 +#: ../../library/sqlite3.rst:445 msgid "" "This flag may be combined with :const:`PARSE_DECLTYPES` using the ``|`` " "(bitwise or) operator." msgstr "" -#: ../../library/sqlite3.rst:465 +#: ../../library/sqlite3.rst:450 msgid "" "Pass this flag value to the *detect_types* parameter of :func:`connect` to " "look up a converter function using the declared types for each column. The " @@ -476,61 +477,61 @@ msgid "" "the converter dictionary key. For example:" msgstr "" -#: ../../library/sqlite3.rst:481 +#: ../../library/sqlite3.rst:466 msgid "" "This flag may be combined with :const:`PARSE_COLNAMES` using the ``|`` " "(bitwise or) operator." msgstr "" -#: ../../library/sqlite3.rst:488 +#: ../../library/sqlite3.rst:473 msgid "" "Flags that should be returned by the *authorizer_callback* :term:`callable` " "passed to :meth:`Connection.set_authorizer`, to indicate whether:" msgstr "" -#: ../../library/sqlite3.rst:491 +#: ../../library/sqlite3.rst:476 msgid "Access is allowed (:const:`!SQLITE_OK`)," msgstr "" -#: ../../library/sqlite3.rst:492 +#: ../../library/sqlite3.rst:477 msgid "" "The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)" msgstr "" -#: ../../library/sqlite3.rst:493 +#: ../../library/sqlite3.rst:478 msgid "" "The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`)" msgstr "" -#: ../../library/sqlite3.rst:497 +#: ../../library/sqlite3.rst:482 msgid "" "String constant stating the supported DB-API level. Required by the DB-API. " "Hard-coded to ``\"2.0\"``." msgstr "" -#: ../../library/sqlite3.rst:502 +#: ../../library/sqlite3.rst:487 msgid "" "String constant stating the type of parameter marker formatting expected by " "the :mod:`!sqlite3` module. Required by the DB-API. Hard-coded to " "``\"qmark\"``." msgstr "" -#: ../../library/sqlite3.rst:508 +#: ../../library/sqlite3.rst:493 msgid "The ``named`` DB-API parameter style is also supported." msgstr "" -#: ../../library/sqlite3.rst:512 +#: ../../library/sqlite3.rst:497 msgid "" "Version number of the runtime SQLite library as a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:516 +#: ../../library/sqlite3.rst:501 msgid "" "Version number of the runtime SQLite library as a :class:`tuple` of :class:" "`integers `." msgstr "" -#: ../../library/sqlite3.rst:521 +#: ../../library/sqlite3.rst:506 msgid "" "Integer constant required by the DB-API 2.0, stating the level of thread " "safety the :mod:`!sqlite3` module supports. This attribute is set based on " @@ -538,181 +539,181 @@ msgid "" "underlying SQLite library is compiled with. The SQLite threading modes are:" msgstr "" -#: ../../library/sqlite3.rst:526 +#: ../../library/sqlite3.rst:511 msgid "" "**Single-thread**: In this mode, all mutexes are disabled and SQLite is " "unsafe to use in more than a single thread at once." msgstr "" -#: ../../library/sqlite3.rst:528 +#: ../../library/sqlite3.rst:513 msgid "" "**Multi-thread**: In this mode, SQLite can be safely used by multiple " "threads provided that no single database connection is used simultaneously " "in two or more threads." msgstr "" -#: ../../library/sqlite3.rst:531 +#: ../../library/sqlite3.rst:516 msgid "" "**Serialized**: In serialized mode, SQLite can be safely used by multiple " "threads with no restriction." msgstr "" -#: ../../library/sqlite3.rst:534 +#: ../../library/sqlite3.rst:519 msgid "" "The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels " "are as follows:" msgstr "" -#: ../../library/sqlite3.rst:538 +#: ../../library/sqlite3.rst:523 msgid "SQLite threading mode" msgstr "" -#: ../../library/sqlite3.rst:538 +#: ../../library/sqlite3.rst:523 msgid "`threadsafety`_" msgstr "`threadsafety`_" -#: ../../library/sqlite3.rst:538 +#: ../../library/sqlite3.rst:523 msgid "`SQLITE_THREADSAFE`_" msgstr "`SQLITE_THREADSAFE`_" -#: ../../library/sqlite3.rst:538 +#: ../../library/sqlite3.rst:523 msgid "DB-API 2.0 meaning" msgstr "" -#: ../../library/sqlite3.rst:541 +#: ../../library/sqlite3.rst:526 msgid "single-thread" msgstr "" -#: ../../library/sqlite3.rst:541 +#: ../../library/sqlite3.rst:526 msgid "0" msgstr "0" -#: ../../library/sqlite3.rst:541 +#: ../../library/sqlite3.rst:526 msgid "Threads may not share the module" msgstr "" -#: ../../library/sqlite3.rst:544 +#: ../../library/sqlite3.rst:529 msgid "multi-thread" msgstr "" -#: ../../library/sqlite3.rst:544 ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:529 ../../library/sqlite3.rst:532 msgid "1" msgstr "1" -#: ../../library/sqlite3.rst:544 +#: ../../library/sqlite3.rst:529 msgid "2" msgstr "2" -#: ../../library/sqlite3.rst:544 +#: ../../library/sqlite3.rst:529 msgid "Threads may share the module, but not connections" msgstr "" -#: ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:532 msgid "serialized" msgstr "" -#: ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:532 msgid "3" msgstr "3" -#: ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:532 msgid "Threads may share the module, connections and cursors" msgstr "" -#: ../../library/sqlite3.rst:554 +#: ../../library/sqlite3.rst:539 msgid "Set *threadsafety* dynamically instead of hard-coding it to ``1``." msgstr "" -#: ../../library/sqlite3.rst:559 +#: ../../library/sqlite3.rst:544 msgid "" "Version number of this module as a :class:`string `. This is not the " "version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:565 ../../library/sqlite3.rst:575 +#: ../../library/sqlite3.rst:550 ../../library/sqlite3.rst:560 msgid "" "This constant used to reflect the version number of the ``pysqlite`` " "package, a third-party library which used to upstream changes to :mod:`!" "sqlite3`. Today, it carries no meaning or practical value." msgstr "" -#: ../../library/sqlite3.rst:569 +#: ../../library/sqlite3.rst:554 msgid "" "Version number of this module as a :class:`tuple` of :class:`integers " "`. This is not the version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:596 +#: ../../library/sqlite3.rst:581 msgid "" "These constants are used for the :meth:`Connection.setconfig` and :meth:" "`~Connection.getconfig` methods." msgstr "" -#: ../../library/sqlite3.rst:599 +#: ../../library/sqlite3.rst:584 msgid "" "The availability of these constants varies depending on the version of " "SQLite Python was compiled with." msgstr "" -#: ../../library/sqlite3.rst:606 +#: ../../library/sqlite3.rst:591 msgid "https://www.sqlite.org/c3ref/c_dbconfig_defensive.html" msgstr "" -#: ../../library/sqlite3.rst:607 +#: ../../library/sqlite3.rst:592 msgid "SQLite docs: Database Connection Configuration Options" msgstr "" -#: ../../library/sqlite3.rst:613 +#: ../../library/sqlite3.rst:598 msgid "Connection objects" msgstr "Connection 物件" -#: ../../library/sqlite3.rst:617 +#: ../../library/sqlite3.rst:602 msgid "" "Each open SQLite database is represented by a ``Connection`` object, which " "is created using :func:`sqlite3.connect`. Their main purpose is creating :" "class:`Cursor` objects, and :ref:`sqlite3-controlling-transactions`." msgstr "" -#: ../../library/sqlite3.rst:624 +#: ../../library/sqlite3.rst:609 msgid ":ref:`sqlite3-connection-shortcuts`" msgstr ":ref:`sqlite3-connection-shortcuts`" -#: ../../library/sqlite3.rst:627 +#: ../../library/sqlite3.rst:612 msgid "An SQLite database connection has the following attributes and methods:" msgstr "" -#: ../../library/sqlite3.rst:631 +#: ../../library/sqlite3.rst:616 msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a :term:" "`callable` returning an instance of :class:`Cursor` or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:638 +#: ../../library/sqlite3.rst:623 msgid "" "Open a :class:`Blob` handle to an existing :abbr:`BLOB (Binary Large " "OBject)`." msgstr "" -#: ../../library/sqlite3.rst:641 +#: ../../library/sqlite3.rst:626 msgid "The name of the table where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:644 +#: ../../library/sqlite3.rst:629 msgid "The name of the column where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:647 +#: ../../library/sqlite3.rst:632 msgid "The name of the row where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:650 +#: ../../library/sqlite3.rst:635 msgid "" "Set to ``True`` if the blob should be opened without write permissions. " "Defaults to ``False``." msgstr "" -#: ../../library/sqlite3.rst:655 +#: ../../library/sqlite3.rst:640 msgid "" "The name of the database where the blob is located. Defaults to ``\"main\"``." msgstr "" @@ -721,17 +722,17 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/sqlite3.rst:659 +#: ../../library/sqlite3.rst:644 msgid "When trying to open a blob in a ``WITHOUT ROWID`` table." msgstr "" -#: ../../library/sqlite3.rst:666 +#: ../../library/sqlite3.rst:651 msgid "" "The blob size cannot be changed using the :class:`Blob` class. Use the SQL " "function ``zeroblob`` to create a blob with a fixed size." msgstr "" -#: ../../library/sqlite3.rst:673 +#: ../../library/sqlite3.rst:658 msgid "" "Commit any pending transaction to the database. If :attr:`autocommit` is " "``True``, or there is no open transaction, this method does nothing. If :" @@ -739,7 +740,7 @@ msgid "" "pending transaction was committed by this method." msgstr "" -#: ../../library/sqlite3.rst:681 +#: ../../library/sqlite3.rst:666 msgid "" "Roll back to the start of any pending transaction. If :attr:`autocommit` is " "``True``, or there is no open transaction, this method does nothing. If :" @@ -747,7 +748,7 @@ msgid "" "pending transaction was rolled back by this method." msgstr "" -#: ../../library/sqlite3.rst:689 +#: ../../library/sqlite3.rst:674 msgid "" "Close the database connection. If :attr:`autocommit` is ``False``, any " "pending transaction is implicitly rolled back. If :attr:`!autocommit` is " @@ -756,81 +757,81 @@ msgid "" "losing pending changes." msgstr "" -#: ../../library/sqlite3.rst:699 +#: ../../library/sqlite3.rst:684 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:705 +#: ../../library/sqlite3.rst:690 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:711 +#: ../../library/sqlite3.rst:696 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:717 +#: ../../library/sqlite3.rst:702 msgid "Create or remove a user-defined SQL function." msgstr "" -#: ../../library/sqlite3.rst:719 +#: ../../library/sqlite3.rst:704 msgid "The name of the SQL function." msgstr "" -#: ../../library/sqlite3.rst:722 +#: ../../library/sqlite3.rst:707 msgid "" "The number of arguments the SQL function can accept. If ``-1``, it may take " "any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:726 +#: ../../library/sqlite3.rst:711 msgid "" "A :term:`callable` that is called when the SQL function is invoked. The " "callable must return :ref:`a type natively supported by SQLite `. Set to ``None`` to remove an existing SQL function." msgstr "" -#: ../../library/sqlite3.rst:733 +#: ../../library/sqlite3.rst:718 msgid "" "If ``True``, the created SQL function is marked as `deterministic `_, which allows SQLite to perform additional " "optimizations." msgstr "" -#: ../../library/sqlite3.rst:738 +#: ../../library/sqlite3.rst:723 msgid "If *deterministic* is used with SQLite versions older than 3.8.3." msgstr "" -#: ../../library/sqlite3.rst:741 +#: ../../library/sqlite3.rst:726 msgid "Added the *deterministic* parameter." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:744 ../../library/sqlite3.rst:782 -#: ../../library/sqlite3.rst:845 ../../library/sqlite3.rst:1115 -#: ../../library/sqlite3.rst:1529 ../../library/sqlite3.rst:1568 +#: ../../library/sqlite3.rst:729 ../../library/sqlite3.rst:768 +#: ../../library/sqlite3.rst:831 ../../library/sqlite3.rst:1091 +#: ../../library/sqlite3.rst:1511 ../../library/sqlite3.rst:1554 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:760 +#: ../../library/sqlite3.rst:746 msgid "Create or remove a user-defined SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:762 +#: ../../library/sqlite3.rst:748 msgid "The name of the SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:765 +#: ../../library/sqlite3.rst:751 msgid "" "The number of arguments the SQL aggregate function can accept. If ``-1``, it " "may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:769 +#: ../../library/sqlite3.rst:755 msgid "" "A class must implement the following methods: * ``step()``: Add a row to " "the aggregate. * ``finalize()``: Return the final result of the aggregate " @@ -839,45 +840,45 @@ msgid "" "*n_arg*. Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:770 +#: ../../library/sqlite3.rst:756 msgid "A class must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:772 +#: ../../library/sqlite3.rst:758 msgid "``step()``: Add a row to the aggregate." msgstr "" -#: ../../library/sqlite3.rst:773 ../../library/sqlite3.rst:829 +#: ../../library/sqlite3.rst:759 ../../library/sqlite3.rst:815 msgid "" "``finalize()``: Return the final result of the aggregate as :ref:`a type " "natively supported by SQLite `." msgstr "" -#: ../../library/sqlite3.rst:776 +#: ../../library/sqlite3.rst:762 msgid "" "The number of arguments that the ``step()`` method must accept is controlled " "by *n_arg*." msgstr "" -#: ../../library/sqlite3.rst:779 +#: ../../library/sqlite3.rst:765 msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:814 +#: ../../library/sqlite3.rst:800 msgid "Create or remove a user-defined aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:816 +#: ../../library/sqlite3.rst:802 msgid "The name of the SQL aggregate window function to create or remove." msgstr "" -#: ../../library/sqlite3.rst:819 +#: ../../library/sqlite3.rst:805 msgid "" "The number of arguments the SQL aggregate window function can accept. If " "``-1``, it may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:823 +#: ../../library/sqlite3.rst:809 msgid "" "A class that must implement the following methods: * ``step()``: Add a row " "to the current window. * ``value()``: Return the current value of the " @@ -889,79 +890,79 @@ msgid "" "function." msgstr "" -#: ../../library/sqlite3.rst:824 +#: ../../library/sqlite3.rst:810 msgid "A class that must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:826 +#: ../../library/sqlite3.rst:812 msgid "``step()``: Add a row to the current window." msgstr "" -#: ../../library/sqlite3.rst:827 +#: ../../library/sqlite3.rst:813 msgid "``value()``: Return the current value of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:814 msgid "``inverse()``: Remove a row from the current window." msgstr "" -#: ../../library/sqlite3.rst:832 +#: ../../library/sqlite3.rst:818 msgid "" "The number of arguments that the ``step()`` and ``value()`` methods must " "accept is controlled by *num_params*." msgstr "" -#: ../../library/sqlite3.rst:835 +#: ../../library/sqlite3.rst:821 msgid "Set to ``None`` to remove an existing SQL aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:837 +#: ../../library/sqlite3.rst:823 msgid "" "If used with a version of SQLite older than 3.25.0, which does not support " "aggregate window functions." msgstr "" -#: ../../library/sqlite3.rst:900 +#: ../../library/sqlite3.rst:887 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:904 +#: ../../library/sqlite3.rst:891 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:905 +#: ../../library/sqlite3.rst:892 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:906 +#: ../../library/sqlite3.rst:893 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:908 +#: ../../library/sqlite3.rst:895 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:936 +#: ../../library/sqlite3.rst:923 msgid "Remove a collation function by setting *callable* to ``None``." msgstr "" -#: ../../library/sqlite3.rst:938 +#: ../../library/sqlite3.rst:925 msgid "" "The collation name can contain any Unicode character. Earlier, only ASCII " "characters were allowed." msgstr "" -#: ../../library/sqlite3.rst:945 +#: ../../library/sqlite3.rst:932 msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an :exc:" "`OperationalError`." msgstr "" -#: ../../library/sqlite3.rst:952 +#: ../../library/sqlite3.rst:939 msgid "" "Register :term:`callable` *authorizer_callback* to be invoked for each " "attempt to access a column of a table in the database. The callback should " @@ -970,7 +971,7 @@ msgid "" "underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:959 +#: ../../library/sqlite3.rst:946 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or ``None`` " @@ -980,7 +981,7 @@ msgid "" "attempt or ``None`` if this access attempt is directly from input SQL code." msgstr "" -#: ../../library/sqlite3.rst:966 +#: ../../library/sqlite3.rst:953 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -988,15 +989,15 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:970 +#: ../../library/sqlite3.rst:957 msgid "Passing ``None`` as *authorizer_callback* will disable the authorizer." msgstr "" -#: ../../library/sqlite3.rst:972 +#: ../../library/sqlite3.rst:959 msgid "Added support for disabling the authorizer using ``None``." msgstr "" -#: ../../library/sqlite3.rst:978 +#: ../../library/sqlite3.rst:965 msgid "" "Register :term:`callable` *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -1004,26 +1005,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:983 +#: ../../library/sqlite3.rst:970 msgid "" "If you want to clear any previously installed progress handler, call the " "method with ``None`` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:986 +#: ../../library/sqlite3.rst:973 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise a :exc:`DatabaseError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:993 +#: ../../library/sqlite3.rst:980 msgid "" "Register :term:`callable` *trace_callback* to be invoked for each SQL " "statement that is actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:983 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -1033,18 +1034,18 @@ msgid "" "execution of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:1004 +#: ../../library/sqlite3.rst:991 msgid "Passing ``None`` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:1007 +#: ../../library/sqlite3.rst:994 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:1017 +#: ../../library/sqlite3.rst:1004 msgid "" "Enable the SQLite engine to load SQLite extensions from shared libraries if " "*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite " @@ -1053,7 +1054,7 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:1026 +#: ../../library/sqlite3.rst:1013 msgid "" "The :mod:`!sqlite3` module is not built with loadable extension support by " "default, because some platforms (notably macOS) have SQLite libraries which " @@ -1062,7 +1063,7 @@ msgid "" "program:`configure`." msgstr "" -#: ../../library/sqlite3.rst:1033 +#: ../../library/sqlite3.rst:1020 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." @@ -1070,28 +1071,28 @@ msgstr "" "引發一個附帶引數 ``connection``、``enabled`` 的\\ :ref:`稽核事件 ` " "``sqlite3.enable_load_extension``。" -#: ../../library/sqlite3.rst:1037 +#: ../../library/sqlite3.rst:1024 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "加入 ``sqlite3.enable_load_extension`` 稽核事件。" -#: ../../library/sqlite3.rst:1080 +#: ../../library/sqlite3.rst:1056 msgid "" "Load an SQLite extension from a shared library. Enable extension loading " "with :meth:`enable_load_extension` before calling this method." msgstr "" -#: ../../library/sqlite3.rst:1084 +#: ../../library/sqlite3.rst:1060 msgid "The path to the SQLite extension." msgstr "" -#: ../../library/sqlite3.rst:1088 +#: ../../library/sqlite3.rst:1064 msgid "" "Entry point name. If ``None`` (the default), SQLite will come up with an " "entry point name of its own; see the SQLite docs `Loading an Extension`_ for " "details." msgstr "" -#: ../../library/sqlite3.rst:1097 +#: ../../library/sqlite3.rst:1073 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." @@ -1099,46 +1100,46 @@ msgstr "" "引發一個附帶引數 ``connection``、``path`` 的\\ :ref:`稽核事件 ` " "``sqlite3.load_extension``。" -#: ../../library/sqlite3.rst:1101 +#: ../../library/sqlite3.rst:1077 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "加入 ``sqlite3.load_extension`` 稽核事件。" -#: ../../library/sqlite3.rst:1104 +#: ../../library/sqlite3.rst:1080 msgid "Added the *entrypoint* parameter." msgstr "新增 *entrypoint* 參數。" -#: ../../library/sqlite3.rst:1111 +#: ../../library/sqlite3.rst:1087 msgid "" "Return an :term:`iterator` to dump the database as SQL source code. Useful " "when saving an in-memory database for later restoration. Similar to the ``." "dump`` command in the :program:`sqlite3` shell." msgstr "" -#: ../../library/sqlite3.rst:1128 ../../library/sqlite3.rst:1198 +#: ../../library/sqlite3.rst:1104 ../../library/sqlite3.rst:1176 msgid ":ref:`sqlite3-howto-encoding`" msgstr ":ref:`sqlite3-howto-encoding`" -#: ../../library/sqlite3.rst:1133 +#: ../../library/sqlite3.rst:1109 msgid "Create a backup of an SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1135 +#: ../../library/sqlite3.rst:1111 msgid "" "Works even if the database is being accessed by other clients or " "concurrently by the same connection." msgstr "" -#: ../../library/sqlite3.rst:1138 +#: ../../library/sqlite3.rst:1114 msgid "The database connection to save the backup to." msgstr "" -#: ../../library/sqlite3.rst:1141 +#: ../../library/sqlite3.rst:1117 msgid "" "The number of pages to copy at a time. If equal to or less than ``0``, the " "entire database is copied in a single step. Defaults to ``-1``." msgstr "" -#: ../../library/sqlite3.rst:1147 +#: ../../library/sqlite3.rst:1123 msgid "" "If set to a :term:`callable`, it is invoked with three integer arguments for " "every backup iteration: the *status* of the last iteration, the *remaining* " @@ -1146,46 +1147,46 @@ msgid "" "Defaults to ``None``." msgstr "" -#: ../../library/sqlite3.rst:1156 +#: ../../library/sqlite3.rst:1132 msgid "" "The name of the database to back up. Either ``\"main\"`` (the default) for " "the main database, ``\"temp\"`` for the temporary database, or the name of a " "custom database as attached using the ``ATTACH DATABASE`` SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1163 +#: ../../library/sqlite3.rst:1139 msgid "" "The number of seconds to sleep between successive attempts to back up " "remaining pages." msgstr "" -#: ../../library/sqlite3.rst:1167 +#: ../../library/sqlite3.rst:1143 msgid "Example 1, copy an existing database into another:" msgstr "" -#: ../../library/sqlite3.rst:1186 +#: ../../library/sqlite3.rst:1162 msgid "Example 2, copy an existing database into a transient copy:" msgstr "" -#: ../../library/sqlite3.rst:1202 +#: ../../library/sqlite3.rst:1180 msgid "Get a connection runtime limit." msgstr "" -#: ../../library/sqlite3.rst:1204 +#: ../../library/sqlite3.rst:1182 msgid "The `SQLite limit category`_ to be queried." msgstr "" -#: ../../library/sqlite3.rst:1209 ../../library/sqlite3.rst:1246 +#: ../../library/sqlite3.rst:1187 ../../library/sqlite3.rst:1224 msgid "If *category* is not recognised by the underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:1212 +#: ../../library/sqlite3.rst:1190 msgid "" "Example, query the maximum length of an SQL statement for :class:" "`Connection` ``con`` (the default is 1000000000):" msgstr "" -#: ../../library/sqlite3.rst:1232 +#: ../../library/sqlite3.rst:1210 msgid "" "Set a connection runtime limit. Attempts to increase a limit above its hard " "upper bound are silently truncated to the hard upper bound. Regardless of " @@ -1193,40 +1194,40 @@ msgid "" "returned." msgstr "" -#: ../../library/sqlite3.rst:1237 +#: ../../library/sqlite3.rst:1215 msgid "The `SQLite limit category`_ to be set." msgstr "" -#: ../../library/sqlite3.rst:1240 +#: ../../library/sqlite3.rst:1218 msgid "" "The value of the new limit. If negative, the current limit is unchanged." msgstr "" -#: ../../library/sqlite3.rst:1249 +#: ../../library/sqlite3.rst:1227 msgid "" "Example, limit the number of attached databases to 1 for :class:`Connection` " "``con`` (the default limit is 10):" msgstr "" -#: ../../library/sqlite3.rst:1266 +#: ../../library/sqlite3.rst:1248 msgid "Query a boolean connection configuration option." msgstr "" -#: ../../library/sqlite3.rst:1268 ../../library/sqlite3.rst:1279 +#: ../../library/sqlite3.rst:1250 ../../library/sqlite3.rst:1261 msgid "A :ref:`SQLITE_DBCONFIG code `." msgstr "" -#: ../../library/sqlite3.rst:1277 +#: ../../library/sqlite3.rst:1259 msgid "Set a boolean connection configuration option." msgstr "" -#: ../../library/sqlite3.rst:1282 +#: ../../library/sqlite3.rst:1264 msgid "" "``True`` if the configuration option should be enabled (default); ``False`` " "if it should be disabled." msgstr "" -#: ../../library/sqlite3.rst:1290 +#: ../../library/sqlite3.rst:1272 msgid "" "Serialize a database into a :class:`bytes` object. For an ordinary on-disk " "database file, the serialization is just a copy of the disk file. For an in-" @@ -1235,17 +1236,17 @@ msgid "" "backed up to disk." msgstr "" -#: ../../library/sqlite3.rst:1296 +#: ../../library/sqlite3.rst:1278 msgid "The database name to be serialized. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1304 +#: ../../library/sqlite3.rst:1286 msgid "" "This method is only available if the underlying SQLite library has the " "serialize API." msgstr "" -#: ../../library/sqlite3.rst:1312 +#: ../../library/sqlite3.rst:1294 msgid "" "Deserialize a :meth:`serialized ` database into a :class:" "`Connection`. This method causes the database connection to disconnect from " @@ -1253,96 +1254,96 @@ msgid "" "serialization contained in *data*." msgstr "" -#: ../../library/sqlite3.rst:1318 +#: ../../library/sqlite3.rst:1300 msgid "A serialized database." msgstr "" -#: ../../library/sqlite3.rst:1321 +#: ../../library/sqlite3.rst:1303 msgid "The database name to deserialize into. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1325 +#: ../../library/sqlite3.rst:1307 msgid "" "If the database connection is currently involved in a read transaction or a " "backup operation." msgstr "" -#: ../../library/sqlite3.rst:1329 +#: ../../library/sqlite3.rst:1311 msgid "If *data* does not contain a valid SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1332 +#: ../../library/sqlite3.rst:1314 msgid "If :func:`len(data) ` is larger than ``2**63 - 1``." msgstr "" -#: ../../library/sqlite3.rst:1337 +#: ../../library/sqlite3.rst:1319 msgid "" "This method is only available if the underlying SQLite library has the " "deserialize API." msgstr "" -#: ../../library/sqlite3.rst:1344 +#: ../../library/sqlite3.rst:1326 msgid "" "This attribute controls :pep:`249`-compliant transaction behaviour. :attr:`!" "autocommit` has three allowed values:" msgstr "" -#: ../../library/sqlite3.rst:1347 +#: ../../library/sqlite3.rst:1329 msgid "" "``False``: Select :pep:`249`-compliant transaction behaviour, implying that :" "mod:`!sqlite3` ensures a transaction is always open. Use :meth:`commit` and :" "meth:`rollback` to close transactions." msgstr "" -#: ../../library/sqlite3.rst:1351 +#: ../../library/sqlite3.rst:1333 msgid "This is the recommended value of :attr:`!autocommit`." msgstr "" -#: ../../library/sqlite3.rst:1353 +#: ../../library/sqlite3.rst:1335 msgid "" "``True``: Use SQLite's `autocommit mode`_. :meth:`commit` and :meth:" "`rollback` have no effect in this mode." msgstr "" -#: ../../library/sqlite3.rst:1356 +#: ../../library/sqlite3.rst:1338 msgid "" ":data:`LEGACY_TRANSACTION_CONTROL`: Pre-Python 3.12 (non-:pep:`249`-" "compliant) transaction control. See :attr:`isolation_level` for more details." msgstr "" -#: ../../library/sqlite3.rst:1360 +#: ../../library/sqlite3.rst:1342 msgid "This is currently the default value of :attr:`!autocommit`." msgstr "" -#: ../../library/sqlite3.rst:1362 +#: ../../library/sqlite3.rst:1344 msgid "" "Changing :attr:`!autocommit` to ``False`` will open a new transaction, and " "changing it to ``True`` will commit any pending transaction." msgstr "" -#: ../../library/sqlite3.rst:1365 +#: ../../library/sqlite3.rst:1347 msgid "See :ref:`sqlite3-transaction-control-autocommit` for more details." msgstr "更多詳情請見 :ref:`sqlite3-transaction-control-autocommit`。" -#: ../../library/sqlite3.rst:1369 +#: ../../library/sqlite3.rst:1351 msgid "" "The :attr:`isolation_level` attribute has no effect unless :attr:" "`autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`." msgstr "" -#: ../../library/sqlite3.rst:1376 +#: ../../library/sqlite3.rst:1358 msgid "" "This read-only attribute corresponds to the low-level SQLite `autocommit " "mode`_." msgstr "" -#: ../../library/sqlite3.rst:1379 +#: ../../library/sqlite3.rst:1361 msgid "" "``True`` if a transaction is active (there are uncommitted changes), " "``False`` otherwise." msgstr "" -#: ../../library/sqlite3.rst:1386 +#: ../../library/sqlite3.rst:1368 msgid "" "Controls the :ref:`legacy transaction handling mode ` of :mod:`!sqlite3`. If set to ``None``, " @@ -1352,13 +1353,13 @@ msgid "" "` is performed." msgstr "" -#: ../../library/sqlite3.rst:1394 +#: ../../library/sqlite3.rst:1376 msgid "" "If not overridden by the *isolation_level* parameter of :func:`connect`, the " "default is ``\"\"``, which is an alias for ``\"DEFERRED\"``." msgstr "" -#: ../../library/sqlite3.rst:1399 +#: ../../library/sqlite3.rst:1381 msgid "" "Using :attr:`autocommit` to control transaction handling is recommended over " "using :attr:`!isolation_level`. :attr:`!isolation_level` has no effect " @@ -1366,7 +1367,7 @@ msgid "" "default)." msgstr "" -#: ../../library/sqlite3.rst:1406 +#: ../../library/sqlite3.rst:1388 msgid "" "The initial :attr:`~Cursor.row_factory` for :class:`Cursor` objects created " "from this connection. Assigning to this attribute does not affect the :attr:" @@ -1375,33 +1376,33 @@ msgid "" "`tuple`." msgstr "" -#: ../../library/sqlite3.rst:1413 ../../library/sqlite3.rst:1694 -#: ../../library/sqlite3.rst:1717 +#: ../../library/sqlite3.rst:1395 ../../library/sqlite3.rst:1681 +#: ../../library/sqlite3.rst:1704 msgid "See :ref:`sqlite3-howto-row-factory` for more details." msgstr "更多詳情請見 :ref:`sqlite3-howto-row-factory`。" -#: ../../library/sqlite3.rst:1417 +#: ../../library/sqlite3.rst:1399 msgid "" "A :term:`callable` that accepts a :class:`bytes` parameter and returns a " "text representation of it. The callable is invoked for SQLite values with " "the ``TEXT`` data type. By default, this attribute is set to :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:1422 +#: ../../library/sqlite3.rst:1404 msgid "See :ref:`sqlite3-howto-encoding` for more details." msgstr "更多詳情請見 :ref:`sqlite3-howto-encoding`。" -#: ../../library/sqlite3.rst:1426 +#: ../../library/sqlite3.rst:1408 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:1433 +#: ../../library/sqlite3.rst:1415 msgid "Cursor objects" msgstr "Cursor 物件" -#: ../../library/sqlite3.rst:1435 +#: ../../library/sqlite3.rst:1417 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -1409,39 +1410,39 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: ../../library/sqlite3.rst:1442 +#: ../../library/sqlite3.rst:1424 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:1467 +#: ../../library/sqlite3.rst:1449 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:1474 +#: ../../library/sqlite3.rst:1456 msgid "" "Execute a single SQL statement, optionally binding Python values using :ref:" "`placeholders `." msgstr "" -#: ../../library/sqlite3.rst:1478 +#: ../../library/sqlite3.rst:1460 msgid "A single SQL statement." msgstr "單一個 SQL 陳述式。" -#: ../../library/sqlite3.rst:1481 +#: ../../library/sqlite3.rst:1463 msgid "" "Python values to bind to placeholders in *sql*. A :class:`!dict` if named " "placeholders are used. A :term:`!sequence` if unnamed placeholders are used. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: ../../library/sqlite3.rst:1488 +#: ../../library/sqlite3.rst:1470 msgid "If *sql* contains more than one SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1491 +#: ../../library/sqlite3.rst:1473 msgid "" "If :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`, :" "attr:`~Connection.isolation_level` is not ``None``, *sql* is an ``INSERT``, " @@ -1449,7 +1450,7 @@ msgid "" "transaction, a transaction is implicitly opened before executing *sql*." msgstr "" -#: ../../library/sqlite3.rst:1500 +#: ../../library/sqlite3.rst:1482 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and *parameters* is a sequence instead of a :class:" @@ -1457,43 +1458,43 @@ msgid "" "instead." msgstr "" -#: ../../library/sqlite3.rst:1506 +#: ../../library/sqlite3.rst:1488 msgid "Use :meth:`executescript` to execute multiple SQL statements." msgstr "" -#: ../../library/sqlite3.rst:1510 +#: ../../library/sqlite3.rst:1492 msgid "" "For every item in *parameters*, repeatedly execute the :ref:`parameterized " "` :abbr:`DML (Data Manipulation Language)` SQL " "statement *sql*." msgstr "" -#: ../../library/sqlite3.rst:1514 +#: ../../library/sqlite3.rst:1496 msgid "Uses the same implicit transaction handling as :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:1516 +#: ../../library/sqlite3.rst:1498 msgid "A single SQL DML statement." msgstr "" -#: ../../library/sqlite3.rst:1519 +#: ../../library/sqlite3.rst:1501 msgid "" "An :term:`!iterable` of parameters to bind with the placeholders in *sql*. " "See :ref:`sqlite3-placeholders`." msgstr "" -#: ../../library/sqlite3.rst:1525 +#: ../../library/sqlite3.rst:1507 msgid "" "If *sql* contains more than one SQL statement, or is not a DML statement." msgstr "" -#: ../../library/sqlite3.rst:1542 +#: ../../library/sqlite3.rst:1528 msgid "" "Any resulting rows are discarded, including DML statements with `RETURNING " "clauses`_." msgstr "" -#: ../../library/sqlite3.rst:1549 +#: ../../library/sqlite3.rst:1535 msgid "" ":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and the items in *parameters* are sequences instead " @@ -1501,7 +1502,7 @@ msgid "" "be raised instead." msgstr "" -#: ../../library/sqlite3.rst:1558 +#: ../../library/sqlite3.rst:1544 msgid "" "Execute the SQL statements in *sql_script*. If the :attr:`~Connection." "autocommit` is :data:`LEGACY_TRANSACTION_CONTROL` and there is a pending " @@ -1510,24 +1511,24 @@ msgid "" "added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:1566 +#: ../../library/sqlite3.rst:1552 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:1583 +#: ../../library/sqlite3.rst:1569 msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -#: ../../library/sqlite3.rst:1591 +#: ../../library/sqlite3.rst:1577 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:1594 +#: ../../library/sqlite3.rst:1580 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -1535,7 +1536,7 @@ msgid "" "available are returned." msgstr "" -#: ../../library/sqlite3.rst:1600 +#: ../../library/sqlite3.rst:1586 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -1543,36 +1544,36 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:1607 +#: ../../library/sqlite3.rst:1593 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: ../../library/sqlite3.rst:1614 +#: ../../library/sqlite3.rst:1600 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:1616 +#: ../../library/sqlite3.rst:1602 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:1621 ../../library/sqlite3.rst:1625 +#: ../../library/sqlite3.rst:1607 ../../library/sqlite3.rst:1611 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:1629 +#: ../../library/sqlite3.rst:1615 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:1634 +#: ../../library/sqlite3.rst:1620 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -1580,18 +1581,18 @@ msgid "" "that refers to *con*:" msgstr "" -#: ../../library/sqlite3.rst:1648 +#: ../../library/sqlite3.rst:1635 msgid "" "Read-only attribute that provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are ``None``." msgstr "" -#: ../../library/sqlite3.rst:1652 +#: ../../library/sqlite3.rst:1639 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:1656 +#: ../../library/sqlite3.rst:1643 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1601,15 +1602,15 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1664 +#: ../../library/sqlite3.rst:1651 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1666 +#: ../../library/sqlite3.rst:1653 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1671 +#: ../../library/sqlite3.rst:1658 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -1619,7 +1620,7 @@ msgid "" "resulting rows must be fetched in order for :attr:`!rowcount` to be updated." msgstr "" -#: ../../library/sqlite3.rst:1682 +#: ../../library/sqlite3.rst:1669 msgid "" "Control how a row fetched from this :class:`!Cursor` is represented. If " "``None``, a row is represented as a :class:`tuple`. Can be set to the " @@ -1628,18 +1629,18 @@ msgid "" "and returns a custom object representing an SQLite row." msgstr "" -#: ../../library/sqlite3.rst:1689 +#: ../../library/sqlite3.rst:1676 msgid "" "Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" -#: ../../library/sqlite3.rst:1705 +#: ../../library/sqlite3.rst:1692 msgid "Row objects" msgstr "Row 物件" -#: ../../library/sqlite3.rst:1709 +#: ../../library/sqlite3.rst:1696 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -1647,28 +1648,28 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1714 +#: ../../library/sqlite3.rst:1701 msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -#: ../../library/sqlite3.rst:1721 +#: ../../library/sqlite3.rst:1708 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1725 +#: ../../library/sqlite3.rst:1712 msgid "Added support of slicing." msgstr "新增對切片的支援。" -#: ../../library/sqlite3.rst:1732 +#: ../../library/sqlite3.rst:1719 msgid "Blob objects" msgstr "Blob 物件" -#: ../../library/sqlite3.rst:1738 +#: ../../library/sqlite3.rst:1725 msgid "" "A :class:`Blob` instance is a :term:`file-like object` that can read and " "write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call :func:" @@ -1676,24 +1677,24 @@ msgid "" "and :term:`slices ` for direct access to the blob data." msgstr "" -#: ../../library/sqlite3.rst:1743 +#: ../../library/sqlite3.rst:1730 msgid "" "Use the :class:`Blob` as a :term:`context manager` to ensure that the blob " "handle is closed after use." msgstr "" -#: ../../library/sqlite3.rst:1773 +#: ../../library/sqlite3.rst:1761 msgid "Close the blob." msgstr "" -#: ../../library/sqlite3.rst:1775 +#: ../../library/sqlite3.rst:1763 msgid "" "The blob will be unusable from this point onward. An :class:`~sqlite3." "Error` (or subclass) exception will be raised if any further operation is " "attempted with the blob." msgstr "" -#: ../../library/sqlite3.rst:1781 +#: ../../library/sqlite3.rst:1769 msgid "" "Read *length* bytes of data from the blob at the current offset position. If " "the end of the blob is reached, the data up to :abbr:`EOF (End of File)` " @@ -1701,18 +1702,18 @@ msgid "" "`~Blob.read` will read until the end of the blob." msgstr "" -#: ../../library/sqlite3.rst:1789 +#: ../../library/sqlite3.rst:1777 msgid "" "Write *data* to the blob at the current offset. This function cannot change " "the blob length. Writing beyond the end of the blob will raise :exc:" "`ValueError`." msgstr "" -#: ../../library/sqlite3.rst:1795 +#: ../../library/sqlite3.rst:1783 msgid "Return the current access position of the blob." msgstr "" -#: ../../library/sqlite3.rst:1799 +#: ../../library/sqlite3.rst:1787 msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other " @@ -1720,26 +1721,26 @@ msgid "" "position) and :const:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -#: ../../library/sqlite3.rst:1807 +#: ../../library/sqlite3.rst:1795 msgid "PrepareProtocol objects" msgstr "PrepareProtocol 物件" -#: ../../library/sqlite3.rst:1811 +#: ../../library/sqlite3.rst:1799 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: ../../library/sqlite3.rst:1819 +#: ../../library/sqlite3.rst:1807 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1821 +#: ../../library/sqlite3.rst:1809 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1825 +#: ../../library/sqlite3.rst:1813 msgid "" "This exception is not currently raised by the :mod:`!sqlite3` module, but " "may be raised by applications using :mod:`!sqlite3`, for example if a user-" @@ -1747,39 +1748,39 @@ msgid "" "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1832 +#: ../../library/sqlite3.rst:1820 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1836 +#: ../../library/sqlite3.rst:1824 msgid "" "If the exception originated from within the SQLite library, the following " "two attributes are added to the exception:" msgstr "" -#: ../../library/sqlite3.rst:1841 +#: ../../library/sqlite3.rst:1829 msgid "" "The numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1848 +#: ../../library/sqlite3.rst:1836 msgid "" "The symbolic name of the numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1855 +#: ../../library/sqlite3.rst:1843 msgid "" "Exception raised for misuse of the low-level SQLite C API. In other words, " "if this exception is raised, it probably indicates a bug in the :mod:`!" "sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1862 +#: ../../library/sqlite3.rst:1850 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -1787,14 +1788,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1869 +#: ../../library/sqlite3.rst:1857 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1875 +#: ../../library/sqlite3.rst:1863 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1802,20 +1803,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1883 +#: ../../library/sqlite3.rst:1871 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1888 +#: ../../library/sqlite3.rst:1876 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1895 +#: ../../library/sqlite3.rst:1883 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "supplying the wrong number of bindings to a query, or trying to operate on a " @@ -1823,7 +1824,7 @@ msgid "" "`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1902 +#: ../../library/sqlite3.rst:1890 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -1832,78 +1833,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1912 +#: ../../library/sqlite3.rst:1900 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1914 +#: ../../library/sqlite3.rst:1902 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1917 +#: ../../library/sqlite3.rst:1905 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1920 ../../library/sqlite3.rst:1937 +#: ../../library/sqlite3.rst:1908 ../../library/sqlite3.rst:1925 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1920 ../../library/sqlite3.rst:1937 +#: ../../library/sqlite3.rst:1908 ../../library/sqlite3.rst:1925 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1922 ../../library/sqlite3.rst:1939 +#: ../../library/sqlite3.rst:1910 ../../library/sqlite3.rst:1927 msgid "``None``" msgstr "``None``" -#: ../../library/sqlite3.rst:1922 ../../library/sqlite3.rst:1939 +#: ../../library/sqlite3.rst:1910 ../../library/sqlite3.rst:1927 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1924 ../../library/sqlite3.rst:1941 +#: ../../library/sqlite3.rst:1912 ../../library/sqlite3.rst:1929 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1924 ../../library/sqlite3.rst:1941 +#: ../../library/sqlite3.rst:1912 ../../library/sqlite3.rst:1929 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1926 ../../library/sqlite3.rst:1943 +#: ../../library/sqlite3.rst:1914 ../../library/sqlite3.rst:1931 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1926 ../../library/sqlite3.rst:1943 +#: ../../library/sqlite3.rst:1914 ../../library/sqlite3.rst:1931 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1928 +#: ../../library/sqlite3.rst:1916 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1928 ../../library/sqlite3.rst:1945 +#: ../../library/sqlite3.rst:1916 ../../library/sqlite3.rst:1933 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1930 ../../library/sqlite3.rst:1948 +#: ../../library/sqlite3.rst:1918 ../../library/sqlite3.rst:1936 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1930 ../../library/sqlite3.rst:1948 +#: ../../library/sqlite3.rst:1918 ../../library/sqlite3.rst:1936 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1934 +#: ../../library/sqlite3.rst:1922 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1945 +#: ../../library/sqlite3.rst:1933 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1951 +#: ../../library/sqlite3.rst:1939 msgid "" "The type system of the :mod:`!sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via :ref:`object " @@ -1912,47 +1913,47 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1961 +#: ../../library/sqlite3.rst:1949 msgid "Default adapters and converters (deprecated)" msgstr "" -#: ../../library/sqlite3.rst:1965 +#: ../../library/sqlite3.rst:1953 msgid "" "The default adapters and converters are deprecated as of Python 3.12. " "Instead, use the :ref:`sqlite3-adapter-converter-recipes` and tailor them to " "your needs." msgstr "" -#: ../../library/sqlite3.rst:1969 +#: ../../library/sqlite3.rst:1957 msgid "The deprecated default adapters and converters consist of:" msgstr "" -#: ../../library/sqlite3.rst:1971 +#: ../../library/sqlite3.rst:1959 msgid "" "An adapter for :class:`datetime.date` objects to :class:`strings ` in " "`ISO 8601`_ format." msgstr "" -#: ../../library/sqlite3.rst:1973 +#: ../../library/sqlite3.rst:1961 msgid "" "An adapter for :class:`datetime.datetime` objects to strings in ISO 8601 " "format." msgstr "" -#: ../../library/sqlite3.rst:1975 +#: ../../library/sqlite3.rst:1963 msgid "" "A converter for :ref:`declared ` \"date\" types to :" "class:`datetime.date` objects." msgstr "" -#: ../../library/sqlite3.rst:1977 +#: ../../library/sqlite3.rst:1965 msgid "" "A converter for declared \"timestamp\" types to :class:`datetime.datetime` " "objects. Fractional parts will be truncated to 6 digits (microsecond " "precision)." msgstr "" -#: ../../library/sqlite3.rst:1983 +#: ../../library/sqlite3.rst:1971 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1960,38 +1961,38 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1996 +#: ../../library/sqlite3.rst:1984 msgid "Command-line interface" msgstr "命令列介面" -#: ../../library/sqlite3.rst:1998 +#: ../../library/sqlite3.rst:1986 msgid "" "The :mod:`!sqlite3` module can be invoked as a script, using the " "interpreter's :option:`-m` switch, in order to provide a simple SQLite " "shell. The argument signature is as follows::" msgstr "" -#: ../../library/sqlite3.rst:2005 +#: ../../library/sqlite3.rst:1993 msgid "Type ``.quit`` or CTRL-D to exit the shell." msgstr "" -#: ../../library/sqlite3.rst:2011 +#: ../../library/sqlite3.rst:1999 msgid "Print CLI help." msgstr "" -#: ../../library/sqlite3.rst:2015 +#: ../../library/sqlite3.rst:2003 msgid "Print underlying SQLite library version." msgstr "" -#: ../../library/sqlite3.rst:2023 +#: ../../library/sqlite3.rst:2011 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:2028 +#: ../../library/sqlite3.rst:2016 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:2030 +#: ../../library/sqlite3.rst:2018 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -1999,7 +2000,7 @@ msgid "" "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -#: ../../library/sqlite3.rst:2043 +#: ../../library/sqlite3.rst:2031 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -2007,7 +2008,7 @@ msgid "" "second argument of the cursor's :meth:`~Cursor.execute` method." msgstr "" -#: ../../library/sqlite3.rst:2048 +#: ../../library/sqlite3.rst:2036 msgid "" "An SQL statement may use one of two kinds of placeholders: question marks " "(qmark style) or named placeholders (named style). For the qmark style, " @@ -2018,24 +2019,24 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:2085 +#: ../../library/sqlite3.rst:2074 msgid "" ":pep:`249` numeric placeholders are *not* supported. If used, they will be " "interpreted as named placeholders." msgstr "" -#: ../../library/sqlite3.rst:2092 +#: ../../library/sqlite3.rst:2081 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:2094 +#: ../../library/sqlite3.rst:2083 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands `." msgstr "" -#: ../../library/sqlite3.rst:2098 +#: ../../library/sqlite3.rst:2087 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -2045,11 +2046,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:2110 +#: ../../library/sqlite3.rst:2099 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:2112 +#: ../../library/sqlite3.rst:2101 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -2059,84 +2060,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:2143 +#: ../../library/sqlite3.rst:2133 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:2145 +#: ../../library/sqlite3.rst:2135 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:2175 +#: ../../library/sqlite3.rst:2166 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:2177 +#: ../../library/sqlite3.rst:2168 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:2182 +#: ../../library/sqlite3.rst:2173 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:2185 +#: ../../library/sqlite3.rst:2176 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:2190 +#: ../../library/sqlite3.rst:2181 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:2199 +#: ../../library/sqlite3.rst:2190 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:2203 +#: ../../library/sqlite3.rst:2194 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:2204 +#: ../../library/sqlite3.rst:2195 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:2205 +#: ../../library/sqlite3.rst:2196 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:2209 +#: ../../library/sqlite3.rst:2200 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:2260 +#: ../../library/sqlite3.rst:2253 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:2262 +#: ../../library/sqlite3.rst:2255 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:2324 +#: ../../library/sqlite3.rst:2317 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:2326 +#: ../../library/sqlite3.rst:2319 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -2148,11 +2149,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:2367 +#: ../../library/sqlite3.rst:2360 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:2369 +#: ../../library/sqlite3.rst:2362 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -2164,60 +2165,60 @@ msgid "" "rolling back." msgstr "" -#: ../../library/sqlite3.rst:2380 +#: ../../library/sqlite3.rst:2373 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, or if :attr:`~Connection.autocommit` is ``True``, the context " "manager does nothing." msgstr "" -#: ../../library/sqlite3.rst:2385 +#: ../../library/sqlite3.rst:2378 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection. If you need a closing context manager, consider using :meth:" "`contextlib.closing`." msgstr "" -#: ../../library/sqlite3.rst:2419 +#: ../../library/sqlite3.rst:2412 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:2421 +#: ../../library/sqlite3.rst:2414 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:2423 +#: ../../library/sqlite3.rst:2416 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:2432 +#: ../../library/sqlite3.rst:2425 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: ../../library/sqlite3.rst:2442 +#: ../../library/sqlite3.rst:2435 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:2456 +#: ../../library/sqlite3.rst:2451 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:2465 +#: ../../library/sqlite3.rst:2460 msgid "How to create and use row factories" msgstr "" -#: ../../library/sqlite3.rst:2467 +#: ../../library/sqlite3.rst:2462 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: ../../library/sqlite3.rst:2472 +#: ../../library/sqlite3.rst:2467 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -2225,7 +2226,7 @@ msgid "" "use the same row factory." msgstr "" -#: ../../library/sqlite3.rst:2477 +#: ../../library/sqlite3.rst:2472 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -2233,11 +2234,11 @@ msgid "" "attribute:" msgstr "" -#: ../../library/sqlite3.rst:2487 +#: ../../library/sqlite3.rst:2482 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: ../../library/sqlite3.rst:2504 +#: ../../library/sqlite3.rst:2500 msgid "" "The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the " "above example. In such cases, SQLite returns a single row with columns " @@ -2245,37 +2246,37 @@ msgid "" "alias``." msgstr "" -#: ../../library/sqlite3.rst:2509 +#: ../../library/sqlite3.rst:2505 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: ../../library/sqlite3.rst:2518 +#: ../../library/sqlite3.rst:2514 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2528 +#: ../../library/sqlite3.rst:2525 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2539 +#: ../../library/sqlite3.rst:2536 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: ../../library/sqlite3.rst:2554 +#: ../../library/sqlite3.rst:2552 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: ../../library/sqlite3.rst:2562 +#: ../../library/sqlite3.rst:2560 msgid "How to handle non-UTF-8 text encodings" msgstr "" -#: ../../library/sqlite3.rst:2564 +#: ../../library/sqlite3.rst:2562 msgid "" "By default, :mod:`!sqlite3` uses :class:`str` to adapt SQLite values with " "the ``TEXT`` data type. This works well for UTF-8 encoded text, but it might " @@ -2283,7 +2284,7 @@ msgid "" "`~Connection.text_factory` to handle such cases." msgstr "" -#: ../../library/sqlite3.rst:2570 +#: ../../library/sqlite3.rst:2568 msgid "" "Because of SQLite's `flexible typing`_, it is not uncommon to encounter " "table columns with the ``TEXT`` data type containing non-UTF-8 encodings, or " @@ -2294,31 +2295,31 @@ msgid "" "text using this :attr:`~Connection.text_factory`:" msgstr "" -#: ../../library/sqlite3.rst:2583 +#: ../../library/sqlite3.rst:2581 msgid "" "For invalid UTF-8 or arbitrary data in stored in ``TEXT`` table columns, you " "can use the following technique, borrowed from the :ref:`unicode-howto`:" msgstr "" -#: ../../library/sqlite3.rst:2592 +#: ../../library/sqlite3.rst:2590 msgid "" "The :mod:`!sqlite3` module API does not support strings containing " "surrogates." msgstr "" -#: ../../library/sqlite3.rst:2597 +#: ../../library/sqlite3.rst:2595 msgid ":ref:`unicode-howto`" msgstr ":ref:`unicode-howto`" -#: ../../library/sqlite3.rst:2603 +#: ../../library/sqlite3.rst:2601 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:2609 +#: ../../library/sqlite3.rst:2607 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:2611 +#: ../../library/sqlite3.rst:2609 msgid "" ":mod:`!sqlite3` offers multiple methods of controlling whether, when and how " "database transactions are opened and closed. :ref:`sqlite3-transaction-" @@ -2326,24 +2327,24 @@ msgid "" "isolation-level` retains the pre-Python 3.12 behaviour." msgstr "" -#: ../../library/sqlite3.rst:2620 +#: ../../library/sqlite3.rst:2618 msgid "Transaction control via the ``autocommit`` attribute" msgstr "" -#: ../../library/sqlite3.rst:2622 +#: ../../library/sqlite3.rst:2620 msgid "" "The recommended way of controlling transaction behaviour is through the :" "attr:`Connection.autocommit` attribute, which should preferably be set using " "the *autocommit* parameter of :func:`connect`." msgstr "" -#: ../../library/sqlite3.rst:2627 +#: ../../library/sqlite3.rst:2625 msgid "" "It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-" "compliant transaction control. This means:" msgstr "" -#: ../../library/sqlite3.rst:2631 +#: ../../library/sqlite3.rst:2629 msgid "" ":mod:`!sqlite3` ensures that a transaction is always open, so :func:" "`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback` will " @@ -2352,21 +2353,21 @@ msgid "" "when opening transactions." msgstr "" -#: ../../library/sqlite3.rst:2636 +#: ../../library/sqlite3.rst:2634 msgid "Transactions should be committed explicitly using :meth:`!commit`." msgstr "" -#: ../../library/sqlite3.rst:2637 +#: ../../library/sqlite3.rst:2635 msgid "Transactions should be rolled back explicitly using :meth:`!rollback`." msgstr "" -#: ../../library/sqlite3.rst:2638 +#: ../../library/sqlite3.rst:2636 msgid "" "An implicit rollback is performed if the database is :meth:`~Connection." "close`-ed with pending changes." msgstr "" -#: ../../library/sqlite3.rst:2641 +#: ../../library/sqlite3.rst:2639 msgid "" "Set *autocommit* to ``True`` to enable SQLite's `autocommit mode`_. In this " "mode, :meth:`Connection.commit` and :meth:`Connection.rollback` have no " @@ -2375,25 +2376,25 @@ msgid "" "in_transaction` to query the low-level SQLite autocommit mode." msgstr "" -#: ../../library/sqlite3.rst:2649 +#: ../../library/sqlite3.rst:2647 msgid "" "Set *autocommit* to :data:`LEGACY_TRANSACTION_CONTROL` to leave transaction " "control behaviour to the :attr:`Connection.isolation_level` attribute. See :" "ref:`sqlite3-transaction-control-isolation-level` for more information." msgstr "" -#: ../../library/sqlite3.rst:2658 +#: ../../library/sqlite3.rst:2656 msgid "Transaction control via the ``isolation_level`` attribute" msgstr "" -#: ../../library/sqlite3.rst:2662 +#: ../../library/sqlite3.rst:2660 msgid "" "The recommended way of controlling transactions is via the :attr:" "`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-" "autocommit`." msgstr "" -#: ../../library/sqlite3.rst:2666 +#: ../../library/sqlite3.rst:2664 msgid "" "If :attr:`Connection.autocommit` is set to :data:" "`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is " @@ -2401,7 +2402,7 @@ msgid "" "Otherwise, :attr:`!isolation_level` has no effect." msgstr "" -#: ../../library/sqlite3.rst:2672 +#: ../../library/sqlite3.rst:2670 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -2415,7 +2416,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:2685 +#: ../../library/sqlite3.rst:2683 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -2425,33 +2426,33 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:2693 +#: ../../library/sqlite3.rst:2691 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:2697 +#: ../../library/sqlite3.rst:2695 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:2701 +#: ../../library/sqlite3.rst:2699 msgid "" "The recommended way of controlling transactions is now via the :attr:" "`~Connection.autocommit` attribute." msgstr "" -#: ../../library/sqlite3.rst:1469 +#: ../../library/sqlite3.rst:1451 msgid "? (question mark)" msgstr "? (問號)" -#: ../../library/sqlite3.rst:1469 ../../library/sqlite3.rst:1470 +#: ../../library/sqlite3.rst:1451 ../../library/sqlite3.rst:1452 msgid "in SQL statements" msgstr "於 SQL 陳述式中" -#: ../../library/sqlite3.rst:1470 +#: ../../library/sqlite3.rst:1452 msgid ": (colon)" msgstr ": (冒號)" diff --git a/library/ssl.po b/library/ssl.po index 62e7a4b871..9a1d1d6432 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2024-03-19 18:48+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1028,7 +1028,8 @@ msgstr "此選項僅適用於 OpenSSL 1.1.1 及更新版本。" msgid "" "Disable compression on the SSL channel. This is useful if the application " "protocol supports its own compression scheme." -msgstr "在 SSL 通道上禁用壓縮。如果應用程序協定支援自己的壓縮方案,這會很有用。" +msgstr "" +"在 SSL 通道上禁用壓縮。如果應用程序協定支援自己的壓縮方案,這會很有用。" #: ../../library/ssl.rst:794 msgid ":class:`enum.IntFlag` collection of OP_* constants." @@ -3127,7 +3128,7 @@ msgid "" "signature algorithm configuration, and rekeying are not supported yet." msgstr "" -#: ../../library/ssl.rst:2653 +#: ../../library/ssl.rst:2652 msgid "Class :class:`socket.socket`" msgstr ":class:`socket.socket` 類別" @@ -3135,7 +3136,7 @@ msgstr ":class:`socket.socket` 類別" msgid "Documentation of underlying :mod:`socket` class" msgstr "底層 :mod:`socket` 類別的文件" -#: ../../library/ssl.rst:2656 +#: ../../library/ssl.rst:2655 msgid "" "`SSL/TLS Strong Encryption: An Introduction `_" @@ -3147,7 +3148,7 @@ msgstr "" msgid "Intro from the Apache HTTP Server documentation" msgstr "Apache HTTP Server 文件的介紹" -#: ../../library/ssl.rst:2659 +#: ../../library/ssl.rst:2658 msgid "" ":rfc:`RFC 1422: Privacy Enhancement for Internet Electronic Mail: Part II: " "Certificate-Based Key Management <1422>`" @@ -3159,7 +3160,7 @@ msgstr "" msgid "Steve Kent" msgstr "Steve Kent" -#: ../../library/ssl.rst:2662 +#: ../../library/ssl.rst:2661 msgid ":rfc:`RFC 4086: Randomness Requirements for Security <4086>`" msgstr ":rfc:`RFC 4086: Randomness Requirements for Security <4086>`" @@ -3167,7 +3168,7 @@ msgstr ":rfc:`RFC 4086: Randomness Requirements for Security <4086>`" msgid "Donald E., Jeffrey I. Schiller" msgstr "Donald E., Jeffrey I. Schiller" -#: ../../library/ssl.rst:2665 +#: ../../library/ssl.rst:2664 msgid "" ":rfc:`RFC 5280: Internet X.509 Public Key Infrastructure Certificate and " "Certificate Revocation List (CRL) Profile <5280>`" @@ -3179,7 +3180,7 @@ msgstr "" msgid "D. Cooper" msgstr "D. Cooper" -#: ../../library/ssl.rst:2668 +#: ../../library/ssl.rst:2667 msgid "" ":rfc:`RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 " "<5246>`" @@ -3191,7 +3192,7 @@ msgstr "" msgid "T. Dierks et. al." msgstr "T. Dierks et. al." -#: ../../library/ssl.rst:2671 +#: ../../library/ssl.rst:2670 msgid ":rfc:`RFC 6066: Transport Layer Security (TLS) Extensions <6066>`" msgstr ":rfc:`RFC 6066: Transport Layer Security (TLS) Extensions <6066>`" @@ -3199,7 +3200,7 @@ msgstr ":rfc:`RFC 6066: Transport Layer Security (TLS) Extensions <6066>`" msgid "D. Eastlake" msgstr "D. Eastlake" -#: ../../library/ssl.rst:2674 +#: ../../library/ssl.rst:2673 msgid "" "`IANA TLS: Transport Layer Security (TLS) Parameters `_" @@ -3211,7 +3212,7 @@ msgstr "" msgid "IANA" msgstr "IANA" -#: ../../library/ssl.rst:2677 +#: ../../library/ssl.rst:2676 msgid "" ":rfc:`RFC 7525: Recommendations for Secure Use of Transport Layer Security " "(TLS) and Datagram Transport Layer Security (DTLS) <7525>`" diff --git a/library/statistics.po b/library/statistics.po index 0b81304d16..ace3fec006 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-17 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-07-22 21:15+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -149,8 +149,8 @@ msgid ":func:`median_grouped`" msgstr ":func:`median_grouped`" #: ../../library/statistics.rst:82 -msgid "Median, or 50th percentile, of grouped data." -msgstr "分組資料的中位數或 50% 處。" +msgid "Median (50th percentile) of grouped data." +msgstr "分組資料的中位數(第 50 百分位數)。" #: ../../library/statistics.rst:83 msgid ":func:`mode`" @@ -532,68 +532,56 @@ msgstr "" #: ../../library/statistics.rst:334 msgid "" -"Return the median of grouped continuous data, calculated as the 50th " -"percentile, using interpolation. If *data* is empty, :exc:`StatisticsError` " -"is raised. *data* can be a sequence or iterable." +"Estimates the median for numeric data that has been `grouped or binned " +"`_ around the midpoints of " +"consecutive, fixed-width intervals." msgstr "" -"回傳分組連續資料的中位數,該數值透過內插法計算第 50 百分位數而得。若 *data* " -"為空,則會引發 :exc:`StatisticsError`。*data* 可為一個 sequence 或者 " -"iterable。" -#: ../../library/statistics.rst:343 +#: ../../library/statistics.rst:338 msgid "" -"In the following example, the data are rounded, so that each value " -"represents the midpoint of data classes, e.g. 1 is the midpoint of the class " -"0.5--1.5, 2 is the midpoint of 1.5--2.5, 3 is the midpoint of 2.5--3.5, " -"etc. With the data given, the middle value falls somewhere in the class " -"3.5--4.5, and interpolation is used to estimate it:" +"The *data* can be any iterable of numeric data with each value being exactly " +"the midpoint of a bin. At least one value must be present." +msgstr "" + +#: ../../library/statistics.rst:341 +msgid "The *interval* is the width of each bin." msgstr "" -"在以下範例中,資料已經四捨五入,每個值代表每組資料的中點。舉例來說,1 是組 " -"0.5--1.5 的中點,2 是組 1.5--2.5 的中點,3 是組 2.5--3.5 的中點等。根據輸入的" -"資料,中間值落在 3.5--4.5 的組別中,並使用內插法來估計它:" -#: ../../library/statistics.rst:354 +#: ../../library/statistics.rst:343 msgid "" -"Optional argument *interval* represents the class interval, and defaults to " -"1. Changing the class interval naturally will change the interpolation:" +"For example, demographic information may have been summarized into " +"consecutive ten-year age groups with each group being represented by the 5-" +"year midpoints of the intervals:" msgstr "" -"選擇性引數 *interval* 表示組距 (class interval),預設值為 1。改變組距自然會改" -"變內插值:" -#: ../../library/statistics.rst:364 +#: ../../library/statistics.rst:359 msgid "" -"This function does not check whether the data points are at least *interval* " -"apart." -msgstr "此函式不檢查資料點是否至少間隔 *interval* 以上。" +"The 50th percentile (median) is the 536th person out of the 1071 member " +"cohort. That person is in the 30 to 40 year old age group." +msgstr "" -#: ../../library/statistics.rst:369 +#: ../../library/statistics.rst:362 msgid "" -"Under some circumstances, :func:`median_grouped` may coerce data points to " -"floats. This behaviour is likely to change in the future." +"The regular :func:`median` function would assume that everyone in the " +"tricenarian age group was exactly 35 years old. A more tenable assumption " +"is that the 484 members of that age group are evenly distributed between 30 " +"and 40. For that, we use :func:`median_grouped`:" msgstr "" -"在部份情況下,:func:`median_grouped` 可能會強制將資料點轉換為浮點數。這種行為" -"在未來可能會改變。" -#: ../../library/statistics.rst:374 +#: ../../library/statistics.rst:376 msgid "" -"\"Statistics for the Behavioral Sciences\", Frederick J Gravetter and Larry " -"B Wallnau (8th Edition)." +"The caller is responsible for making sure the data points are separated by " +"exact multiples of *interval*. This is essential for getting a correct " +"result. The function does not check this precondition." msgstr "" -"\"Statistics for the Behavioral Sciences\", Frederick J Gravetter and Larry " -"B Wallnau (8th Edition)." -#: ../../library/statistics.rst:377 +#: ../../library/statistics.rst:380 msgid "" -"The `SSMEDIAN `_ function in the Gnome Gnumeric " -"spreadsheet, including `this discussion `_." +"Inputs may be any numeric type that can be coerced to a float during the " +"interpolation step." msgstr "" -"Gnome Gnumeric 試算表中的 `SSMEDIAN `_ 函式,包括\\ `這篇討論 " -"`_。" -#: ../../library/statistics.rst:385 +#: ../../library/statistics.rst:386 msgid "" "Return the single most common data point from discrete or nominal *data*. " "The mode (when it exists) is the most typical value and serves as a measure " @@ -602,7 +590,7 @@ msgstr "" "回傳離散或名目 *data* 中出現次數最多次的值,只回傳一個。眾數(如果存在)是最" "典型的值,並用來衡量資料的中心位置。" -#: ../../library/statistics.rst:389 +#: ../../library/statistics.rst:390 msgid "" "If there are multiple modes with the same frequency, returns the first one " "encountered in the *data*. If the smallest or largest of those is desired " @@ -614,20 +602,20 @@ msgstr "" "``max(multimode(data))``。如果輸入的 *data* 為空,則會引發 :exc:" "`StatisticsError`。" -#: ../../library/statistics.rst:394 +#: ../../library/statistics.rst:395 msgid "" "``mode`` assumes discrete data and returns a single value. This is the " "standard treatment of the mode as commonly taught in schools:" msgstr "" "``mode`` 假定為離散資料,並回傳單一的值。這也是一般學校教授的標準眾數定義:" -#: ../../library/statistics.rst:402 +#: ../../library/statistics.rst:403 msgid "" "The mode is unique in that it is the only statistic in this package that " "also applies to nominal (non-numeric) data:" msgstr "眾數特別之處在於它是此套件中唯一也適用於名目(非數值型)資料的統計量:" -#: ../../library/statistics.rst:410 +#: ../../library/statistics.rst:411 msgid "" "Now handles multimodal datasets by returning the first mode encountered. " "Formerly, it raised :exc:`StatisticsError` when more than one mode was found." @@ -635,7 +623,7 @@ msgstr "" "現在,遇到資料中有多個眾數時,會回傳第一個遇到的眾數。在以前,當找到大於一個" "眾數時,會引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:418 +#: ../../library/statistics.rst:419 msgid "" "Return a list of the most frequently occurring values in the order they were " "first encountered in the *data*. Will return more than one result if there " @@ -645,7 +633,7 @@ msgstr "" "次出現的順序排列。如果有多個眾數,將會回傳所有結果。若 *data* 為空,則回傳空" "的 list:" -#: ../../library/statistics.rst:434 +#: ../../library/statistics.rst:435 msgid "" "Return the population standard deviation (the square root of the population " "variance). See :func:`pvariance` for arguments and other details." @@ -653,7 +641,7 @@ msgstr "" "回傳母體標準差(即母體變異數的平方根)。有關引數以及其他細節,請參見 :func:" "`pvariance`。" -#: ../../library/statistics.rst:445 +#: ../../library/statistics.rst:446 msgid "" "Return the population variance of *data*, a non-empty sequence or iterable " "of real-valued numbers. Variance, or second moment about the mean, is a " @@ -665,7 +653,7 @@ msgstr "" "數,或者以平均數為中心的二階動差,用於衡量資料的變異性(離度或分散程度)。變" "異數大表示資料分散,變異數小表示資料集中在平均數附近。" -#: ../../library/statistics.rst:451 +#: ../../library/statistics.rst:452 msgid "" "If the optional second argument *mu* is given, it is typically the mean of " "the *data*. It can also be used to compute the second moment around a point " @@ -676,7 +664,7 @@ msgstr "" "算非以平均值為中心的第二動差。如果沒有傳入此引數或者引數為 ``None`` (預設" "值),則自動計算資料的算數平均數。" -#: ../../library/statistics.rst:456 +#: ../../library/statistics.rst:457 msgid "" "Use this function to calculate the variance from the entire population. To " "estimate the variance from a sample, the :func:`variance` function is " @@ -685,16 +673,16 @@ msgstr "" "使用此函式來計算整個母體的變異數。如果要從樣本估算變異數,:func:`variance` 通" "常是較好的選擇。" -#: ../../library/statistics.rst:460 +#: ../../library/statistics.rst:461 msgid "Raises :exc:`StatisticsError` if *data* is empty." msgstr "若 *data* 為空,則引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:462 ../../library/statistics.rst:532 -#: ../../library/statistics.rst:636 +#: ../../library/statistics.rst:463 ../../library/statistics.rst:533 +#: ../../library/statistics.rst:637 msgid "Examples:" msgstr "範例:" -#: ../../library/statistics.rst:470 +#: ../../library/statistics.rst:471 msgid "" "If you have already calculated the mean of your data, you can pass it as the " "optional second argument *mu* to avoid recalculation:" @@ -702,11 +690,11 @@ msgstr "" "如果已經計算出資料的平均值,你可以將其作為選擇性的第二個引數 *mu* 傳遞以避免" "重新計算:" -#: ../../library/statistics.rst:479 +#: ../../library/statistics.rst:480 msgid "Decimals and Fractions are supported:" msgstr "支援小數 (decimal) 與分數 (fraction):" -#: ../../library/statistics.rst:493 +#: ../../library/statistics.rst:494 msgid "" "When called with the entire population, this gives the population variance " "σ². When called on a sample instead, this is the biased sample variance s², " @@ -715,7 +703,7 @@ msgstr "" "當在整個母體上呼叫此函式時,會回傳母體變異數 σ²。當在樣本上呼叫此函式時,會回" "傳有偏差的樣本變異數 s²,也就是具有 N 個自由度的變異數。" -#: ../../library/statistics.rst:497 +#: ../../library/statistics.rst:498 msgid "" "If you somehow know the true population mean μ, you may use this function to " "calculate the variance of a sample, giving the known population mean as the " @@ -727,7 +715,7 @@ msgstr "" "引數提供給此函式,用以計算樣本的變異數。只要資料點是母體的隨機樣本,結果將是" "母體變異數的不偏估計。" -#: ../../library/statistics.rst:506 +#: ../../library/statistics.rst:507 msgid "" "Return the sample standard deviation (the square root of the sample " "variance). See :func:`variance` for arguments and other details." @@ -735,7 +723,7 @@ msgstr "" "回傳樣本標準差(即樣本變異數的平方根)。有關引數以及其他細節,請參見 :func:" "`variance`。" -#: ../../library/statistics.rst:517 +#: ../../library/statistics.rst:518 msgid "" "Return the sample variance of *data*, an iterable of at least two real-" "valued numbers. Variance, or second moment about the mean, is a measure of " @@ -747,7 +735,7 @@ msgstr "" "平均數為中心的二階動差,用於衡量資料的變異性(離度或分散程度)。變異數大表示" "資料分散,變異數小表示資料集中在平均數附近。" -#: ../../library/statistics.rst:523 +#: ../../library/statistics.rst:524 msgid "" "If the optional second argument *xbar* is given, it should be the mean of " "*data*. If it is missing or ``None`` (the default), the mean is " @@ -756,7 +744,7 @@ msgstr "" "若有傳入選擇性的第二個引數 *xbar*,它應該是 *data* 的平均值。如果沒有傳入或者" "為 ``None`` (預設值),則自動計算資料的平均值。" -#: ../../library/statistics.rst:527 +#: ../../library/statistics.rst:528 msgid "" "Use this function when your data is a sample from a population. To calculate " "the variance from the entire population, see :func:`pvariance`." @@ -764,11 +752,11 @@ msgstr "" "當你的資料是來自母體的樣本時,請使用此函式。若要從整個母體計算變異數,請參" "見 :func:`pvariance`。" -#: ../../library/statistics.rst:530 +#: ../../library/statistics.rst:531 msgid "Raises :exc:`StatisticsError` if *data* has fewer than two values." msgstr "若 *data* 內少於兩個值,則引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:540 +#: ../../library/statistics.rst:541 msgid "" "If you have already calculated the mean of your data, you can pass it as the " "optional second argument *xbar* to avoid recalculation:" @@ -776,7 +764,7 @@ msgstr "" "如果已經計算出資料的平均值,你可以將其作為選擇性的第二個引數 *mu* 傳遞以避免" "重新計算:" -#: ../../library/statistics.rst:549 +#: ../../library/statistics.rst:550 msgid "" "This function does not attempt to verify that you have passed the actual " "mean as *xbar*. Using arbitrary values for *xbar* can lead to invalid or " @@ -785,11 +773,11 @@ msgstr "" "此函式不會驗證你傳入的 *xbar* 是否為實際的平均數。傳入任意的 *xbar* 會導致無" "效或不可能的結果。" -#: ../../library/statistics.rst:553 +#: ../../library/statistics.rst:554 msgid "Decimal and Fraction values are supported:" msgstr "支援小數 (decimal) 與分數 (fraction):" -#: ../../library/statistics.rst:567 +#: ../../library/statistics.rst:568 msgid "" "This is the sample variance s² with Bessel's correction, also known as " "variance with N-1 degrees of freedom. Provided that the data points are " @@ -800,7 +788,7 @@ msgstr "" "為 N-1 的變異數。只要資料點具有代表性(例如:獨立且具有相同分布),結果應該會" "是對真實母體變異數的不偏估計。" -#: ../../library/statistics.rst:572 +#: ../../library/statistics.rst:573 msgid "" "If you somehow know the actual population mean μ you should pass it to the :" "func:`pvariance` function as the *mu* parameter to get the variance of a " @@ -809,7 +797,7 @@ msgstr "" "若你剛好知道真正的母體平均數 μ,你應該將其作為 *mu* 參數傳入 :func:" "`pvariance` 函式來計算樣本變異數。" -#: ../../library/statistics.rst:578 +#: ../../library/statistics.rst:579 msgid "" "Divide *data* into *n* continuous intervals with equal probability. Returns " "a list of ``n - 1`` cut points separating the intervals." @@ -817,7 +805,7 @@ msgstr "" "將 *data* 分成 *n* 個具有相等機率的連續區間。回傳一個包含 ``n - 1`` 個用於切" "分各區間的分隔點的 list。" -#: ../../library/statistics.rst:581 +#: ../../library/statistics.rst:582 msgid "" "Set *n* to 4 for quartiles (the default). Set *n* to 10 for deciles. Set " "*n* to 100 for percentiles which gives the 99 cuts points that separate " @@ -828,7 +816,7 @@ msgstr "" "分位數 (percentile),這將給出 99 個分隔點將 *data* 分成 100 個大小相等的組。" "如果 *n* 不是至少為 1,則引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:586 +#: ../../library/statistics.rst:587 msgid "" "The *data* can be any iterable containing sample data. For meaningful " "results, the number of data points in *data* should be larger than *n*. " @@ -837,7 +825,7 @@ msgstr "" "*data* 可以是包含樣本資料的任何 iterable。為了取得有意義的結果,*data* 中的資" "料點數量應大於 *n*。如果資料點少於兩個,則引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:590 +#: ../../library/statistics.rst:591 msgid "" "The cut points are linearly interpolated from the two nearest data points. " "For example, if a cut point falls one-third of the distance between two " @@ -846,7 +834,7 @@ msgstr "" "分隔點是從兩個最近的資料點線性內插值計算出來的。舉例來說,如果分隔點落在兩個" "樣本值 ``100`` 與 ``112`` 之間的距離三分之一處,則分隔點的值將為 ``104``。" -#: ../../library/statistics.rst:595 +#: ../../library/statistics.rst:596 msgid "" "The *method* for computing quantiles can be varied depending on whether the " "*data* includes or excludes the lowest and highest possible values from the " @@ -855,7 +843,7 @@ msgstr "" "計算分位數的 *method* 可以根據 *data* 是否包含或排除來自母體的最小與最大可能" "的值而改變。" -#: ../../library/statistics.rst:599 +#: ../../library/statistics.rst:600 msgid "" "The default *method* is \"exclusive\" and is used for data sampled from a " "population that can have more extreme values than found in the samples. The " @@ -869,7 +857,7 @@ msgstr "" "1)``。給定九個樣本資料,此方法將對資料排序且計算下列百分位數:10%、20%、30%、" "40%、50%、60%、70%、80%、90%。" -#: ../../library/statistics.rst:606 +#: ../../library/statistics.rst:607 msgid "" "Setting the *method* to \"inclusive\" is used for describing population data " "or for samples that are known to include the most extreme values from the " @@ -886,7 +874,7 @@ msgstr "" "給定十一個個樣本資料,此方法將對資料排序且計算下列百分位數:0%、10%、20%、" "30%、40%、50%、60%、70%、80%、90%、100%。" -#: ../../library/statistics.rst:630 +#: ../../library/statistics.rst:631 msgid "" "Return the sample covariance of two inputs *x* and *y*. Covariance is a " "measure of the joint variability of two inputs." @@ -894,14 +882,14 @@ msgstr "" "回傳兩輸入 *x* 與 *y* 的樣本共變異數 (sample covariance)。共變異數是衡量兩輸" "入的聯合變異性 (joint variability) 的指標。" -#: ../../library/statistics.rst:633 +#: ../../library/statistics.rst:634 msgid "" "Both inputs must be of the same length (no less than two), otherwise :exc:" "`StatisticsError` is raised." msgstr "" "兩輸入必須具有相同長度(至少兩個),否則會引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:654 +#: ../../library/statistics.rst:655 msgid "" "Return the `Pearson's correlation coefficient `_ for two inputs. Pearson's correlation " @@ -912,7 +900,7 @@ msgstr "" "en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_。Pearson 相關係數 " "*r* 的值介於 -1 與 +1 之間。它衡量線性關係的強度與方向。" -#: ../../library/statistics.rst:660 +#: ../../library/statistics.rst:661 msgid "" "If *method* is \"ranked\", computes `Spearman's rank correlation coefficient " "`_ " @@ -926,7 +914,7 @@ msgstr "" "則取平均,令相同的值排名也相同。所得係數衡量單調關係 (monotonic " "relationship) 的強度。" -#: ../../library/statistics.rst:666 +#: ../../library/statistics.rst:667 msgid "" "Spearman's correlation coefficient is appropriate for ordinal data or for " "continuous data that doesn't meet the linear proportion requirement for " @@ -935,7 +923,7 @@ msgstr "" "Spearman 相關係數適用於順序型資料,或者不符合 Pearson 相關係數要求的線性比例" "關係的連續型 (continuous) 資料。" -#: ../../library/statistics.rst:670 +#: ../../library/statistics.rst:671 msgid "" "Both inputs must be of the same length (no less than two), and need not to " "be constant, otherwise :exc:`StatisticsError` is raised." @@ -943,7 +931,7 @@ msgstr "" "兩輸入必須具有相同長度(至少兩個),且不須為常數,否則會引發 :exc:" "`StatisticsError`。" -#: ../../library/statistics.rst:673 +#: ../../library/statistics.rst:674 msgid "" "Example with `Kepler's laws of planetary motion `_:" @@ -951,11 +939,11 @@ msgstr "" "以 `Kepler 行星運動定律 `_\\ 為例:" -#: ../../library/statistics.rst:700 +#: ../../library/statistics.rst:701 msgid "Added support for Spearman's rank correlation coefficient." msgstr "新增了對 Spearman 等級相關係數的支援。" -#: ../../library/statistics.rst:705 +#: ../../library/statistics.rst:706 msgid "" "Return the slope and intercept of `simple linear regression `_ parameters estimated using " @@ -969,11 +957,11 @@ msgstr "" "迴歸描述自變數 (independent variable) *x* 與應變數 (dependent variable) *y* " "之間的關係,用以下的線性函式表示:" -#: ../../library/statistics.rst:711 +#: ../../library/statistics.rst:712 msgid "*y = slope \\* x + intercept + noise*" msgstr "*y = slope \\* x + intercept + noise*" -#: ../../library/statistics.rst:713 +#: ../../library/statistics.rst:714 msgid "" "where ``slope`` and ``intercept`` are the regression parameters that are " "estimated, and ``noise`` represents the variability of the data that was not " @@ -983,7 +971,7 @@ msgstr "" "其中 ``slope`` 和 ``intercept`` 是被估計的迴歸參數,而 ``noise`` 表示由線性迴" "歸未解釋的資料變異性(它等於應變數的預測值與實際值之差)。" -#: ../../library/statistics.rst:719 +#: ../../library/statistics.rst:720 msgid "" "Both inputs must be of the same length (no less than two), and the " "independent variable *x* cannot be constant; otherwise a :exc:" @@ -992,7 +980,7 @@ msgstr "" "兩輸入必須具有相同長度(至少兩個),且自變數 *x* 不得為常數,否則會引發 :exc:" "`StatisticsError`。" -#: ../../library/statistics.rst:723 +#: ../../library/statistics.rst:724 msgid "" "For example, we can use the `release dates of the Monty Python films " "`_ to predict the " @@ -1003,7 +991,7 @@ msgstr "" "wikipedia.org/wiki/Monty_Python#Films>`_\\ 來預測至 2019 年為止,假設他們保持" "固定的製作速度,應該會產生的 Monty Python 電影的累計數量。" -#: ../../library/statistics.rst:737 +#: ../../library/statistics.rst:738 msgid "" "If *proportional* is true, the independent variable *x* and the dependent " "variable *y* are assumed to be directly proportional. The data is fit to a " @@ -1014,11 +1002,11 @@ msgstr "" "資料座落在通過原點的一直線上。由於 *intercept* 始終為 0.0,因此線性函式可簡化" "如下:" -#: ../../library/statistics.rst:743 +#: ../../library/statistics.rst:744 msgid "*y = slope \\* x + noise*" msgstr "*y = slope \\* x + noise*" -#: ../../library/statistics.rst:745 +#: ../../library/statistics.rst:746 msgid "" "Continuing the example from :func:`correlation`, we look to see how well a " "model based on major planets can predict the orbital distances for dwarf " @@ -1027,27 +1015,27 @@ msgstr "" "繼續 :func:`correlation` 中的範例,我們看看基於主要行星的模型可以如何很好地預" "測矮行星的軌道距離:" -#: ../../library/statistics.rst:765 +#: ../../library/statistics.rst:766 msgid "Added support for *proportional*." msgstr "新增 *proportional* 的支援。" -#: ../../library/statistics.rst:769 +#: ../../library/statistics.rst:770 msgid "Exceptions" msgstr "例外" -#: ../../library/statistics.rst:771 +#: ../../library/statistics.rst:772 msgid "A single exception is defined:" msgstr "定義了一個單一的例外:" -#: ../../library/statistics.rst:775 +#: ../../library/statistics.rst:776 msgid "Subclass of :exc:`ValueError` for statistics-related exceptions." msgstr ":exc:`ValueError` 的子類別,用於和統計相關的例外。" -#: ../../library/statistics.rst:779 +#: ../../library/statistics.rst:780 msgid ":class:`NormalDist` objects" msgstr ":class:`NormalDist` 物件" -#: ../../library/statistics.rst:781 +#: ../../library/statistics.rst:782 msgid "" ":class:`NormalDist` is a tool for creating and manipulating normal " "distributions of a `random variable `_ 的常態分布的工" "具。它是一個將量測資料的平均數與標準差視為單一實體的類別。" -#: ../../library/statistics.rst:787 +#: ../../library/statistics.rst:788 msgid "" "Normal distributions arise from the `Central Limit Theorem `_ and have a wide range of " @@ -1067,7 +1055,7 @@ msgstr "" "常態分布源自於\\ `中央極限定理 (Central Limit Theorem) `_,在統計學中有著廣泛的應用。" -#: ../../library/statistics.rst:793 +#: ../../library/statistics.rst:794 msgid "" "Returns a new *NormalDist* object where *mu* represents the `arithmetic mean " "`_ and *sigma* represents the " @@ -1077,11 +1065,11 @@ msgstr "" "en.wikipedia.org/wiki/Arithmetic_mean>`_\\ 而 *sigma* 代表\\ `標準差 " "`_。" -#: ../../library/statistics.rst:798 +#: ../../library/statistics.rst:799 msgid "If *sigma* is negative, raises :exc:`StatisticsError`." msgstr "若 *sigma* 為負值,則引發 :exc:`StatisticsError`。" -#: ../../library/statistics.rst:802 +#: ../../library/statistics.rst:803 msgid "" "A read-only property for the `arithmetic mean `_ of a normal distribution." @@ -1089,14 +1077,14 @@ msgstr "" "常態分布中的\\ `算數平均數 `_\\ 唯讀屬性。" -#: ../../library/statistics.rst:808 +#: ../../library/statistics.rst:809 msgid "" "A read-only property for the `median `_ of a normal distribution." msgstr "" "常態分布中的\\ `中位數 `_\\ 唯讀屬性。" -#: ../../library/statistics.rst:814 +#: ../../library/statistics.rst:815 msgid "" "A read-only property for the `mode `_ of a normal distribution." @@ -1104,7 +1092,7 @@ msgstr "" "常態分布中的\\ `眾數 `_\\ 唯" "讀屬性。" -#: ../../library/statistics.rst:820 +#: ../../library/statistics.rst:821 msgid "" "A read-only property for the `standard deviation `_ of a normal distribution." @@ -1112,7 +1100,7 @@ msgstr "" "常態分布中的\\ `標準差 `_\\ 唯讀屬性。" -#: ../../library/statistics.rst:826 +#: ../../library/statistics.rst:827 msgid "" "A read-only property for the `variance `_ of a normal distribution. Equal to the square of the standard " @@ -1121,7 +1109,7 @@ msgstr "" "常態分布中的\\ `變異數 `_\\ 唯讀屬" "性。" -#: ../../library/statistics.rst:832 +#: ../../library/statistics.rst:833 msgid "" "Makes a normal distribution instance with *mu* and *sigma* parameters " "estimated from the *data* using :func:`fmean` and :func:`stdev`." @@ -1129,7 +1117,7 @@ msgstr "" "利用 :func:`fmean` 與 :func:`stdev` 函式,估計 *data* 的 *mu* 與 *sigma* 參" "數,建立一個常態分布的實例。" -#: ../../library/statistics.rst:835 +#: ../../library/statistics.rst:836 msgid "" "The *data* can be any :term:`iterable` and should consist of values that can " "be converted to type :class:`float`. If *data* does not contain at least " @@ -1141,7 +1129,7 @@ msgstr "" "若 *data* 沒有包含至少兩個以上的元素在內,則引發 :exc:`StatisticsError`,因為" "至少需要一個點來估計中央值且至少需要兩個點來估計分散情形。" -#: ../../library/statistics.rst:843 +#: ../../library/statistics.rst:844 msgid "" "Generates *n* random samples for a given mean and standard deviation. " "Returns a :class:`list` of :class:`float` values." @@ -1149,7 +1137,7 @@ msgstr "" "給定平均值與標準差,產生 *n* 個隨機樣本。回傳一個由 :class:`float` 組成的 :" "class:`list`。" -#: ../../library/statistics.rst:846 +#: ../../library/statistics.rst:847 msgid "" "If *seed* is given, creates a new instance of the underlying random number " "generator. This is useful for creating reproducible results, even in a " @@ -1158,7 +1146,7 @@ msgstr "" "若有給定 *seed*,則會建立一個以此為基礎的亂數產生器實例。這對於建立可重現的結" "果很有幫助,即使在多執行緒情境下也是如此。" -#: ../../library/statistics.rst:852 +#: ../../library/statistics.rst:853 msgid "" "Using a `probability density function (pdf) `_, compute the relative likelihood that a " @@ -1170,7 +1158,7 @@ msgstr "" "值 *x* 的相對概度 (relative likelihood)。數學上,它是比率 ``P(x <= X < " "x+dx) / dx`` 在 *dx* 趨近於零時的極限值。" -#: ../../library/statistics.rst:858 +#: ../../library/statistics.rst:859 msgid "" "The relative likelihood is computed as the probability of a sample occurring " "in a narrow range divided by the width of the range (hence the word " @@ -1180,7 +1168,7 @@ msgstr "" "相對概度是樣本出現在狹窄範圍的機率,除以該範圍的寬度(故稱為「密度」)計算而" "得。由於概度是相對於其它點,故其值可大於 ``1.0``。" -#: ../../library/statistics.rst:865 +#: ../../library/statistics.rst:866 msgid "" "Using a `cumulative distribution function (cdf) `_, compute the probability that a " @@ -1191,7 +1179,7 @@ msgstr "" "wikipedia.org/wiki/Cumulative_distribution_function>`_ 計算隨機變數 *X* 小於" "或等於 *x* 的機率。數學上,它記為 ``P(X <= x)``。" -#: ../../library/statistics.rst:872 +#: ../../library/statistics.rst:873 msgid "" "Compute the inverse cumulative distribution function, also known as the " "`quantile function `_ or " @@ -1205,7 +1193,7 @@ msgstr "" "org/web/20190203145224/https://www.statisticshowto.datasciencecentral.com/" "inverse-distribution-function/>`_ 函式。數學上記為 ``x : P(X <= x) = p``。" -#: ../../library/statistics.rst:878 +#: ../../library/statistics.rst:879 msgid "" "Finds the value *x* of the random variable *X* such that the probability of " "the variable being less than or equal to that value equals the given " @@ -1213,7 +1201,7 @@ msgid "" msgstr "" "找出一個值 *x*,使得隨機變數 *X* 小於或等於該值的機率等於給定的機率 *p*。" -#: ../../library/statistics.rst:884 +#: ../../library/statistics.rst:885 msgid "" "Measures the agreement between two normal probability distributions. Returns " "a value between 0.0 and 1.0 giving `the overlapping area for the two " @@ -1222,7 +1210,7 @@ msgstr "" "衡量兩常態分布之間的一致性。回傳一個介於 0.0 與 1.0 之間的值,表示\\ `兩機率" "密度函式的重疊區域 `_。" -#: ../../library/statistics.rst:891 +#: ../../library/statistics.rst:892 msgid "" "Divide the normal distribution into *n* continuous intervals with equal " "probability. Returns a list of (n - 1) cut points separating the intervals." @@ -1230,7 +1218,7 @@ msgstr "" "將常態分布分割成 *n* 個具有相等機率的連續區間。回傳一個 list,包含 (n-1) 個切" "割區間的分隔點。" -#: ../../library/statistics.rst:895 +#: ../../library/statistics.rst:896 msgid "" "Set *n* to 4 for quartiles (the default). Set *n* to 10 for deciles. Set " "*n* to 100 for percentiles which gives the 99 cuts points that separate the " @@ -1240,7 +1228,7 @@ msgstr "" "*n* 設定為 100 表示百分位數,這會產生 99 個分隔點,將常態分布切割成大小相等的" "群組。" -#: ../../library/statistics.rst:901 +#: ../../library/statistics.rst:902 msgid "" "Compute the `Standard Score `_ describing *x* in terms of the number of standard " @@ -1251,7 +1239,7 @@ msgstr "" "probability-and-statistics/z-score/>`_,用以描述在常態分布中,*x* 高出或低於" "平均數幾個標準差:``(x - mean) / stdev``。" -#: ../../library/statistics.rst:909 +#: ../../library/statistics.rst:910 msgid "" "Instances of :class:`NormalDist` support addition, subtraction, " "multiplication and division by a constant. These operations are used for " @@ -1260,14 +1248,14 @@ msgstr "" ":class:`NormalDist` 的實例支援對常數的加法、減法、乘法與除法。這些操作用於平" "移與縮放。例如:" -#: ../../library/statistics.rst:919 +#: ../../library/statistics.rst:920 msgid "" "Dividing a constant by an instance of :class:`NormalDist` is not supported " "because the result wouldn't be normally distributed." msgstr "" "不支援將常數除以 :class:`NormalDist` 的實例,因為結果將不符合常態分布。" -#: ../../library/statistics.rst:922 +#: ../../library/statistics.rst:923 msgid "" "Since normal distributions arise from additive effects of independent " "variables, it is possible to `add and subtract two independent normally " @@ -1280,19 +1268,19 @@ msgstr "" "Sum_of_normally_distributed_random_variables>`_,並且表示為 :class:" "`NormalDist` 的實例。例如:" -#: ../../library/statistics.rst:942 -msgid ":class:`NormalDist` Examples and Recipes" -msgstr ":class:`NormalDist` 範例與錦囊妙計" +#: ../../library/statistics.rst:943 +msgid "Examples and Recipes" +msgstr "範例與錦囊妙計" -#: ../../library/statistics.rst:946 +#: ../../library/statistics.rst:947 msgid "Classic probability problems" msgstr "經典機率問題" -#: ../../library/statistics.rst:948 +#: ../../library/statistics.rst:949 msgid ":class:`NormalDist` readily solves classic probability problems." msgstr ":class:`NormalDist` 可以輕易地解決經典的機率問題。" -#: ../../library/statistics.rst:950 +#: ../../library/statistics.rst:951 msgid "" "For example, given `historical data for SAT exams `_ showing that scores are " @@ -1304,7 +1292,7 @@ msgstr "" "tables/dt17_226.40.asp>`_,顯示成績為平均 1060、標準差 195 的常態分布。我們要" "求出分數在 1100 與 1200 之間(四捨五入至最接近的整數)的學生的百分比:" -#: ../../library/statistics.rst:963 +#: ../../library/statistics.rst:964 msgid "" "Find the `quartiles `_ and `deciles " "`_ for the SAT scores:" @@ -1312,13 +1300,13 @@ msgstr "" "找出 SAT 分數的\\ `四分位數 `_\\ 以及" "\\ `十分位數 `_:" -#: ../../library/statistics.rst:975 +#: ../../library/statistics.rst:976 msgid "Monte Carlo inputs for simulations" msgstr "用於模擬的蒙地卡羅 (Monte Carlo) 輸入" -#: ../../library/statistics.rst:977 +#: ../../library/statistics.rst:978 msgid "" -"To estimate the distribution for a model than isn't easy to solve " +"To estimate the distribution for a model that isn't easy to solve " "analytically, :class:`NormalDist` can generate input samples for a `Monte " "Carlo simulation `_:" msgstr "" @@ -1326,11 +1314,11 @@ msgstr "" "樣本以進行\\ `蒙地卡羅模擬 `_:" -#: ../../library/statistics.rst:994 +#: ../../library/statistics.rst:995 msgid "Approximating binomial distributions" msgstr "近似二項分布" -#: ../../library/statistics.rst:996 +#: ../../library/statistics.rst:997 msgid "" "Normal distributions can be used to approximate `Binomial distributions " "`_ when the sample " @@ -1340,7 +1328,7 @@ msgstr "" "(Binomial distributions) `_。" -#: ../../library/statistics.rst:1001 +#: ../../library/statistics.rst:1002 msgid "" "For example, an open source conference has 750 attendees and two rooms with " "a 500 person capacity. There is a talk about Python and another about Ruby. " @@ -1353,15 +1341,15 @@ msgstr "" "向參與 Python 講座。假設參與者的偏好沒有改變,那麼 Python 會議室未超過自身容" "量限制的機率是?" -#: ../../library/statistics.rst:1032 +#: ../../library/statistics.rst:1033 msgid "Naive bayesian classifier" msgstr "單純貝氏分類器 (Naive bayesian classifier)" -#: ../../library/statistics.rst:1034 +#: ../../library/statistics.rst:1035 msgid "Normal distributions commonly arise in machine learning problems." msgstr "常態分布常在機器學習問題中出現。" -#: ../../library/statistics.rst:1036 +#: ../../library/statistics.rst:1037 msgid "" "Wikipedia has a `nice example of a Naive Bayesian Classifier `_. The " @@ -1372,7 +1360,7 @@ msgstr "" "wiki/Naive_Bayes_classifier#Person_classification>`_。課題為從身高、體重與鞋" "子尺寸等符合常態分布的特徵量測值中判斷一個人的性別。" -#: ../../library/statistics.rst:1041 +#: ../../library/statistics.rst:1042 msgid "" "We're given a training dataset with measurements for eight people. The " "measurements are assumed to be normally distributed, so we summarize the " @@ -1381,13 +1369,13 @@ msgstr "" "給定一組包含八個人的量測值的訓練資料集。假設這些量測值服從常態分布,我們可以" "利用 :class:`NormalDist` 來總結資料:" -#: ../../library/statistics.rst:1054 +#: ../../library/statistics.rst:1055 msgid "" "Next, we encounter a new person whose feature measurements are known but " "whose gender is unknown:" msgstr "接著,我們遇到一個新的人,他的特徵量測值已知,但性別未知:" -#: ../../library/statistics.rst:1063 +#: ../../library/statistics.rst:1064 msgid "" "Starting with a 50% `prior probability `_ of being male or female, we compute the posterior as " @@ -1398,7 +1386,7 @@ msgstr "" "org/wiki/Prior_probability>`_ 為開端,我們將後驗機率 (posterior probability) " "計算為先驗機率乘以給定性別下,各特徵量測值的概度乘積:" -#: ../../library/statistics.rst:1078 +#: ../../library/statistics.rst:1079 msgid "" "The final prediction goes to the largest posterior. This is known as the " "`maximum a posteriori `_ 或者 MAP:" -#: ../../library/statistics.rst:1089 +#: ../../library/statistics.rst:1090 msgid "Kernel density estimation" msgstr "核密度估計 (Kernel density estimation)" -#: ../../library/statistics.rst:1091 +#: ../../library/statistics.rst:1092 msgid "" "It is possible to estimate a continuous probability density function from a " "fixed number of discrete samples." msgstr "可以從固定數量的離散樣本估計出連續機率密度函式。" -#: ../../library/statistics.rst:1094 +#: ../../library/statistics.rst:1095 msgid "" "The basic idea is to smooth the data using `a kernel function such as a " "normal distribution, triangular distribution, or uniform distribution " @@ -1431,7 +1419,7 @@ msgstr "" "wikipedia.org/wiki/Kernel_(statistics)#Kernel_functions_in_common_use>`_\\ 來" "使資料更加平滑。平滑程度由一個縮放參數 ``h`` 控制,被稱為 *bandwidth*。" -#: ../../library/statistics.rst:1111 +#: ../../library/statistics.rst:1112 msgid "" "`Wikipedia has an example `_ where we can use the ``kde_normal()`` " @@ -1442,10 +1430,68 @@ msgstr "" "Kernel_density_estimation#Example>`_,我們可以使用 ``kde_normal()`` 這個錦囊" "妙計來生成並繪製從小樣本估計的機率密度函式:" -#: ../../library/statistics.rst:1123 +#: ../../library/statistics.rst:1124 msgid "The points in ``xarr`` and ``yarr`` can be used to make a PDF plot:" msgstr "``xarr`` 和 ``yarr`` 中的點可用於繪製 PDF 圖:" -#: ../../library/statistics.rst:-1 +#: ../../library/statistics.rst:1126 msgid "Scatter plot of the estimated probability density function." msgstr "估計機率密度函式的散點圖 (scatter plot)。" + +#~ msgid "" +#~ "Return the median of grouped continuous data, calculated as the 50th " +#~ "percentile, using interpolation. If *data* is empty, :exc:" +#~ "`StatisticsError` is raised. *data* can be a sequence or iterable." +#~ msgstr "" +#~ "回傳分組連續資料的中位數,該數值透過內插法計算第 50 百分位數而得。若 " +#~ "*data* 為空,則會引發 :exc:`StatisticsError`。*data* 可為一個 sequence 或" +#~ "者 iterable。" + +#~ msgid "" +#~ "In the following example, the data are rounded, so that each value " +#~ "represents the midpoint of data classes, e.g. 1 is the midpoint of the " +#~ "class 0.5--1.5, 2 is the midpoint of 1.5--2.5, 3 is the midpoint of " +#~ "2.5--3.5, etc. With the data given, the middle value falls somewhere in " +#~ "the class 3.5--4.5, and interpolation is used to estimate it:" +#~ msgstr "" +#~ "在以下範例中,資料已經四捨五入,每個值代表每組資料的中點。舉例來說,1 是" +#~ "組 0.5--1.5 的中點,2 是組 1.5--2.5 的中點,3 是組 2.5--3.5 的中點等。根據" +#~ "輸入的資料,中間值落在 3.5--4.5 的組別中,並使用內插法來估計它:" + +#~ msgid "" +#~ "Optional argument *interval* represents the class interval, and defaults " +#~ "to 1. Changing the class interval naturally will change the " +#~ "interpolation:" +#~ msgstr "" +#~ "選擇性引數 *interval* 表示組距 (class interval),預設值為 1。改變組距自然" +#~ "會改變內插值:" + +#~ msgid "" +#~ "This function does not check whether the data points are at least " +#~ "*interval* apart." +#~ msgstr "此函式不檢查資料點是否至少間隔 *interval* 以上。" + +#~ msgid "" +#~ "Under some circumstances, :func:`median_grouped` may coerce data points " +#~ "to floats. This behaviour is likely to change in the future." +#~ msgstr "" +#~ "在部份情況下,:func:`median_grouped` 可能會強制將資料點轉換為浮點數。這種" +#~ "行為在未來可能會改變。" + +#~ msgid "" +#~ "\"Statistics for the Behavioral Sciences\", Frederick J Gravetter and " +#~ "Larry B Wallnau (8th Edition)." +#~ msgstr "" +#~ "\"Statistics for the Behavioral Sciences\", Frederick J Gravetter and " +#~ "Larry B Wallnau (8th Edition)." + +#~ msgid "" +#~ "The `SSMEDIAN `_ function in the Gnome Gnumeric " +#~ "spreadsheet, including `this discussion `_." +#~ msgstr "" +#~ "Gnome Gnumeric 試算表中的 `SSMEDIAN `_ 函式,包括\\ `" +#~ "這篇討論 `_。" diff --git a/library/struct.po b/library/struct.po index 022bb78e79..67dd18a800 100644 --- a/library/struct.po +++ b/library/struct.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 11:09+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -773,7 +773,7 @@ msgid "" "end, assuming the platform's longs are aligned on 4-byte boundaries::" msgstr "" -#: ../../library/struct.rst:447 +#: ../../library/struct.rst:446 msgid "Module :mod:`array`" msgstr ":mod:`array` 模組" @@ -781,7 +781,7 @@ msgstr ":mod:`array` 模組" msgid "Packed binary storage of homogeneous data." msgstr "" -#: ../../library/struct.rst:450 +#: ../../library/struct.rst:449 msgid "Module :mod:`json`" msgstr ":mod:`json` 模組" diff --git a/library/subprocess.po b/library/subprocess.po index f81be61790..736c8e101d 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-13 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -85,14 +85,15 @@ msgstr "" #: ../../library/subprocess.rst:53 msgid "" "If *capture_output* is true, stdout and stderr will be captured. When used, " -"the internal :class:`Popen` object is automatically created with " -"``stdout=PIPE`` and ``stderr=PIPE``. The *stdout* and *stderr* arguments may " -"not be supplied at the same time as *capture_output*. If you wish to " -"capture and combine both streams into one, use ``stdout=PIPE`` and " -"``stderr=STDOUT`` instead of *capture_output*." +"the internal :class:`Popen` object is automatically created with *stdout* " +"and *stdin* both set to :data:`~subprocess.PIPE`. The *stdout* and *stderr* " +"arguments may not be supplied at the same time as *capture_output*. If you " +"wish to capture and combine both streams into one, set *stdout* to :data:" +"`~subprocess.PIPE` and *stderr* to :data:`~subprocess.STDOUT`, instead of " +"using *capture_output*." msgstr "" -#: ../../library/subprocess.rst:60 +#: ../../library/subprocess.rst:62 msgid "" "A *timeout* may be specified in seconds, it is internally passed on to :meth:" "`Popen.communicate`. If the timeout expires, the child process will be " @@ -102,16 +103,16 @@ msgid "" "a timeout exception until at least after however long process creation takes." msgstr "" -#: ../../library/subprocess.rst:68 +#: ../../library/subprocess.rst:70 msgid "" "The *input* argument is passed to :meth:`Popen.communicate` and thus to the " "subprocess's stdin. If used it must be a byte sequence, or a string if " "*encoding* or *errors* is specified or *text* is true. When used, the " -"internal :class:`Popen` object is automatically created with ``stdin=PIPE``, " -"and the *stdin* argument may not be used as well." +"internal :class:`Popen` object is automatically created with *stdin* set to :" +"data:`~subprocess.PIPE`, and the *stdin* argument may not be used as well." msgstr "" -#: ../../library/subprocess.rst:74 +#: ../../library/subprocess.rst:77 msgid "" "If *check* is true, and the process exits with a non-zero exit code, a :exc:" "`CalledProcessError` exception will be raised. Attributes of that exception " @@ -119,7 +120,7 @@ msgid "" "captured." msgstr "" -#: ../../library/subprocess.rst:79 +#: ../../library/subprocess.rst:82 msgid "" "If *encoding* or *errors* are specified, or *text* is true, file objects for " "stdin, stdout and stderr are opened in text mode using the specified " @@ -128,7 +129,7 @@ msgid "" "backwards compatibility. By default, file objects are opened in binary mode." msgstr "" -#: ../../library/subprocess.rst:85 +#: ../../library/subprocess.rst:88 msgid "" "If *env* is not ``None``, it must be a mapping that defines the environment " "variables for the new process; these are used instead of the default " @@ -138,23 +139,23 @@ msgid "" "`os.environb`." msgstr "" -#: ../../library/subprocess.rst:92 +#: ../../library/subprocess.rst:95 msgid "Examples::" msgstr "範例: ::" -#: ../../library/subprocess.rst:110 +#: ../../library/subprocess.rst:113 msgid "Added *encoding* and *errors* parameters" msgstr "新增 *encoding* 與 *errors* 參數。" -#: ../../library/subprocess.rst:114 +#: ../../library/subprocess.rst:117 msgid "" "Added the *text* parameter, as a more understandable alias of " "*universal_newlines*. Added the *capture_output* parameter." msgstr "" -#: ../../library/subprocess.rst:119 ../../library/subprocess.rst:503 -#: ../../library/subprocess.rst:1187 ../../library/subprocess.rst:1227 -#: ../../library/subprocess.rst:1290 +#: ../../library/subprocess.rst:122 ../../library/subprocess.rst:506 +#: ../../library/subprocess.rst:1198 ../../library/subprocess.rst:1238 +#: ../../library/subprocess.rst:1301 msgid "" "Changed Windows shell search order for ``shell=True``. The current directory " "and ``%PATH%`` are replaced with ``%COMSPEC%`` and ``%SystemRoot%" @@ -162,92 +163,92 @@ msgid "" "exe`` into a current directory no longer works." msgstr "" -#: ../../library/subprocess.rst:127 +#: ../../library/subprocess.rst:130 msgid "" "The return value from :func:`run`, representing a process that has finished." msgstr "" -#: ../../library/subprocess.rst:131 +#: ../../library/subprocess.rst:134 msgid "" "The arguments used to launch the process. This may be a list or a string." msgstr "" -#: ../../library/subprocess.rst:135 +#: ../../library/subprocess.rst:138 msgid "" "Exit status of the child process. Typically, an exit status of 0 indicates " "that it ran successfully." msgstr "" -#: ../../library/subprocess.rst:138 ../../library/subprocess.rst:934 +#: ../../library/subprocess.rst:141 ../../library/subprocess.rst:945 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." msgstr "" -#: ../../library/subprocess.rst:143 +#: ../../library/subprocess.rst:146 msgid "" "Captured stdout from the child process. A bytes sequence, or a string if :" "func:`run` was called with an encoding, errors, or text=True. ``None`` if " "stdout was not captured." msgstr "" -#: ../../library/subprocess.rst:147 +#: ../../library/subprocess.rst:150 msgid "" "If you ran the process with ``stderr=subprocess.STDOUT``, stdout and stderr " "will be combined in this attribute, and :attr:`stderr` will be ``None``." msgstr "" -#: ../../library/subprocess.rst:153 +#: ../../library/subprocess.rst:156 msgid "" "Captured stderr from the child process. A bytes sequence, or a string if :" "func:`run` was called with an encoding, errors, or text=True. ``None`` if " "stderr was not captured." msgstr "" -#: ../../library/subprocess.rst:159 +#: ../../library/subprocess.rst:162 msgid "If :attr:`returncode` is non-zero, raise a :exc:`CalledProcessError`." msgstr "" -#: ../../library/subprocess.rst:165 +#: ../../library/subprocess.rst:168 msgid "" "Special value that can be used as the *stdin*, *stdout* or *stderr* argument " "to :class:`Popen` and indicates that the special file :data:`os.devnull` " "will be used." msgstr "" -#: ../../library/subprocess.rst:174 +#: ../../library/subprocess.rst:177 msgid "" "Special value that can be used as the *stdin*, *stdout* or *stderr* argument " "to :class:`Popen` and indicates that a pipe to the standard stream should be " "opened. Most useful with :meth:`Popen.communicate`." msgstr "" -#: ../../library/subprocess.rst:181 +#: ../../library/subprocess.rst:184 msgid "" "Special value that can be used as the *stderr* argument to :class:`Popen` " "and indicates that standard error should go into the same handle as standard " "output." msgstr "" -#: ../../library/subprocess.rst:188 +#: ../../library/subprocess.rst:191 msgid "Base class for all other exceptions from this module." msgstr "" -#: ../../library/subprocess.rst:195 +#: ../../library/subprocess.rst:198 msgid "" "Subclass of :exc:`SubprocessError`, raised when a timeout expires while " "waiting for a child process." msgstr "" -#: ../../library/subprocess.rst:200 ../../library/subprocess.rst:244 +#: ../../library/subprocess.rst:203 ../../library/subprocess.rst:247 msgid "Command that was used to spawn the child process." msgstr "" -#: ../../library/subprocess.rst:204 +#: ../../library/subprocess.rst:207 msgid "Timeout in seconds." msgstr "" -#: ../../library/subprocess.rst:208 +#: ../../library/subprocess.rst:211 msgid "" "Output of the child process if it was captured by :func:`run` or :func:" "`check_output`. Otherwise, ``None``. This is always :class:`bytes` when " @@ -255,11 +256,11 @@ msgid "" "remain ``None`` instead of ``b''`` when no output was observed." msgstr "" -#: ../../library/subprocess.rst:216 ../../library/subprocess.rst:253 +#: ../../library/subprocess.rst:219 ../../library/subprocess.rst:256 msgid "Alias for output, for symmetry with :attr:`stderr`." msgstr "" -#: ../../library/subprocess.rst:220 +#: ../../library/subprocess.rst:223 msgid "" "Stderr output of the child process if it was captured by :func:`run`. " "Otherwise, ``None``. This is always :class:`bytes` when stderr output was " @@ -267,40 +268,40 @@ msgid "" "instead of ``b''`` when no stderr output was observed." msgstr "" -#: ../../library/subprocess.rst:227 ../../library/subprocess.rst:260 +#: ../../library/subprocess.rst:230 ../../library/subprocess.rst:263 msgid "*stdout* and *stderr* attributes added" msgstr "" -#: ../../library/subprocess.rst:232 +#: ../../library/subprocess.rst:235 msgid "" "Subclass of :exc:`SubprocessError`, raised when a process run by :func:" "`check_call`, :func:`check_output`, or :func:`run` (with ``check=True``) " "returns a non-zero exit status." msgstr "" -#: ../../library/subprocess.rst:239 +#: ../../library/subprocess.rst:242 msgid "" "Exit status of the child process. If the process exited due to a signal, " "this will be the negative signal number." msgstr "" -#: ../../library/subprocess.rst:248 +#: ../../library/subprocess.rst:251 msgid "" "Output of the child process if it was captured by :func:`run` or :func:" "`check_output`. Otherwise, ``None``." msgstr "" -#: ../../library/subprocess.rst:257 +#: ../../library/subprocess.rst:260 msgid "" "Stderr output of the child process if it was captured by :func:`run`. " "Otherwise, ``None``." msgstr "" -#: ../../library/subprocess.rst:267 +#: ../../library/subprocess.rst:270 msgid "Frequently Used Arguments" msgstr "" -#: ../../library/subprocess.rst:269 +#: ../../library/subprocess.rst:272 msgid "" "To support a wide variety of use cases, the :class:`Popen` constructor (and " "the convenience functions) accept a large number of optional arguments. For " @@ -308,7 +309,7 @@ msgid "" "default values. The arguments that are most commonly needed are:" msgstr "" -#: ../../library/subprocess.rst:274 +#: ../../library/subprocess.rst:277 msgid "" "*args* is required for all calls and should be a string, or a sequence of " "program arguments. Providing a sequence of arguments is generally preferred, " @@ -318,7 +319,7 @@ msgid "" "simply name the program to be executed without specifying any arguments." msgstr "" -#: ../../library/subprocess.rst:282 +#: ../../library/subprocess.rst:285 msgid "" "*stdin*, *stdout* and *stderr* specify the executed program's standard " "input, standard output and standard error file handles, respectively. Valid " @@ -332,7 +333,7 @@ msgid "" "captured into the same file handle as for *stdout*." msgstr "" -#: ../../library/subprocess.rst:296 +#: ../../library/subprocess.rst:299 msgid "" "If *encoding* or *errors* are specified, or *text* (also known as " "*universal_newlines*) is true, the file objects *stdin*, *stdout* and " @@ -340,7 +341,7 @@ msgid "" "specified in the call or the defaults for :class:`io.TextIOWrapper`." msgstr "" -#: ../../library/subprocess.rst:302 +#: ../../library/subprocess.rst:305 msgid "" "For *stdin*, line ending characters ``'\\n'`` in the input will be converted " "to the default line separator :data:`os.linesep`. For *stdout* and *stderr*, " @@ -349,29 +350,29 @@ msgid "" "when the *newline* argument to its constructor is ``None``." msgstr "" -#: ../../library/subprocess.rst:308 +#: ../../library/subprocess.rst:311 msgid "" "If text mode is not used, *stdin*, *stdout* and *stderr* will be opened as " "binary streams. No encoding or line ending conversion is performed." msgstr "" -#: ../../library/subprocess.rst:311 ../../library/subprocess.rst:1542 -#: ../../library/subprocess.rst:1560 +#: ../../library/subprocess.rst:314 ../../library/subprocess.rst:1553 +#: ../../library/subprocess.rst:1571 msgid "Added the *encoding* and *errors* parameters." msgstr "新增 *encoding* 與 *errors* 參數。" -#: ../../library/subprocess.rst:314 +#: ../../library/subprocess.rst:317 msgid "Added the *text* parameter as an alias for *universal_newlines*." msgstr "" -#: ../../library/subprocess.rst:319 +#: ../../library/subprocess.rst:322 msgid "" "The newlines attribute of the file objects :attr:`Popen.stdin`, :attr:`Popen." "stdout` and :attr:`Popen.stderr` are not updated by the :meth:`Popen." "communicate` method." msgstr "" -#: ../../library/subprocess.rst:323 +#: ../../library/subprocess.rst:326 msgid "" "If *shell* is ``True``, the specified command will be executed through the " "shell. This can be useful if you are using Python primarily for the " @@ -384,7 +385,7 @@ msgid "" "expanduser`, and :mod:`shutil`)." msgstr "" -#: ../../library/subprocess.rst:333 +#: ../../library/subprocess.rst:336 msgid "" "When *universal_newlines* is ``True``, the class uses the encoding :func:" "`locale.getpreferredencoding(False) ` instead " @@ -392,22 +393,22 @@ msgid "" "class for more information on this change." msgstr "" -#: ../../library/subprocess.rst:341 ../../library/subprocess.rst:462 +#: ../../library/subprocess.rst:344 ../../library/subprocess.rst:465 msgid "" "Read the `Security Considerations`_ section before using ``shell=True``." msgstr "" -#: ../../library/subprocess.rst:343 +#: ../../library/subprocess.rst:346 msgid "" "These options, along with all of the other options, are described in more " "detail in the :class:`Popen` constructor documentation." msgstr "" -#: ../../library/subprocess.rst:348 +#: ../../library/subprocess.rst:351 msgid "Popen Constructor" msgstr "" -#: ../../library/subprocess.rst:350 +#: ../../library/subprocess.rst:353 msgid "" "The underlying process creation and management in this module is handled by " "the :class:`Popen` class. It offers a lot of flexibility so that developers " @@ -415,7 +416,7 @@ msgid "" "functions." msgstr "" -#: ../../library/subprocess.rst:365 +#: ../../library/subprocess.rst:368 msgid "" "Execute a child program in a new process. On POSIX, the class uses :meth:" "`os.execvpe`-like behavior to execute the child program. On Windows, the " @@ -423,7 +424,7 @@ msgid "" "class:`Popen` are as follows." msgstr "" -#: ../../library/subprocess.rst:370 +#: ../../library/subprocess.rst:373 msgid "" "*args* should be a sequence of program arguments or else a single string or :" "term:`path-like object`. By default, the program to execute is the first " @@ -434,7 +435,7 @@ msgid "" "sequence." msgstr "" -#: ../../library/subprocess.rst:380 +#: ../../library/subprocess.rst:383 msgid "" "For maximum reliability, use a fully qualified path for the executable. To " "search for an unqualified name on :envvar:`PATH`, use :meth:`shutil.which`. " @@ -443,7 +444,7 @@ msgid "" "format to launch an installed module." msgstr "" -#: ../../library/subprocess.rst:386 +#: ../../library/subprocess.rst:389 msgid "" "Resolving the path of *executable* (or the first item of *args*) is platform " "dependent. For POSIX, see :meth:`os.execvpe`, and note that when resolving " @@ -457,27 +458,27 @@ msgid "" "variations." msgstr "" -#: ../../library/subprocess.rst:397 +#: ../../library/subprocess.rst:400 msgid "" "An example of passing some arguments to an external program as a sequence " "is::" msgstr "" -#: ../../library/subprocess.rst:402 +#: ../../library/subprocess.rst:405 msgid "" "On POSIX, if *args* is a string, the string is interpreted as the name or " "path of the program to execute. However, this can only be done if not " "passing arguments to the program." msgstr "" -#: ../../library/subprocess.rst:408 +#: ../../library/subprocess.rst:411 msgid "" "It may not be obvious how to break a shell command into a sequence of " "arguments, especially in complex cases. :meth:`shlex.split` can illustrate " "how to determine the correct tokenization for *args*::" msgstr "" -#: ../../library/subprocess.rst:420 +#: ../../library/subprocess.rst:423 msgid "" "Note in particular that options (such as *-input*) and arguments (such as " "*eggs.txt*) that are separated by whitespace in the shell go in separate " @@ -486,33 +487,33 @@ msgid "" "shown above) are single list elements." msgstr "" -#: ../../library/subprocess.rst:426 +#: ../../library/subprocess.rst:429 msgid "" "On Windows, if *args* is a sequence, it will be converted to a string in a " "manner described in :ref:`converting-argument-sequence`. This is because " "the underlying ``CreateProcess()`` operates on strings." msgstr "" -#: ../../library/subprocess.rst:430 +#: ../../library/subprocess.rst:433 msgid "" "*args* parameter accepts a :term:`path-like object` if *shell* is ``False`` " "and a sequence containing path-like objects on POSIX." msgstr "" -#: ../../library/subprocess.rst:434 +#: ../../library/subprocess.rst:437 msgid "" "*args* parameter accepts a :term:`path-like object` if *shell* is ``False`` " "and a sequence containing bytes and path-like objects on Windows." msgstr "" -#: ../../library/subprocess.rst:439 +#: ../../library/subprocess.rst:442 msgid "" "The *shell* argument (which defaults to ``False``) specifies whether to use " "the shell as the program to execute. If *shell* is ``True``, it is " "recommended to pass *args* as a string rather than as a sequence." msgstr "" -#: ../../library/subprocess.rst:443 +#: ../../library/subprocess.rst:446 msgid "" "On POSIX with ``shell=True``, the shell defaults to :file:`/bin/sh`. If " "*args* is a string, the string specifies the command to execute through the " @@ -524,7 +525,7 @@ msgid "" "class:`Popen` does the equivalent of::" msgstr "" -#: ../../library/subprocess.rst:454 +#: ../../library/subprocess.rst:457 msgid "" "On Windows with ``shell=True``, the :envvar:`COMSPEC` environment variable " "specifies the default shell. The only time you need to specify " @@ -533,35 +534,35 @@ msgid "" "``shell=True`` to run a batch file or console-based executable." msgstr "" -#: ../../library/subprocess.rst:464 +#: ../../library/subprocess.rst:467 msgid "" "*bufsize* will be supplied as the corresponding argument to the :func:`open` " "function when creating the stdin/stdout/stderr pipe file objects:" msgstr "" -#: ../../library/subprocess.rst:468 +#: ../../library/subprocess.rst:471 msgid "" "``0`` means unbuffered (read and write are one system call and can return " "short)" msgstr "" -#: ../../library/subprocess.rst:470 +#: ../../library/subprocess.rst:473 msgid "" "``1`` means line buffered (only usable if ``text=True`` or " "``universal_newlines=True``)" msgstr "" -#: ../../library/subprocess.rst:472 +#: ../../library/subprocess.rst:475 msgid "any other positive value means use a buffer of approximately that size" msgstr "" -#: ../../library/subprocess.rst:474 +#: ../../library/subprocess.rst:477 msgid "" "negative bufsize (the default) means the system default of io." "DEFAULT_BUFFER_SIZE will be used." msgstr "" -#: ../../library/subprocess.rst:477 +#: ../../library/subprocess.rst:480 msgid "" "*bufsize* now defaults to -1 to enable buffering by default to match the " "behavior that most code expects. In versions prior to Python 3.2.4 and " @@ -570,7 +571,7 @@ msgid "" "Python 2 as most code expected." msgstr "" -#: ../../library/subprocess.rst:484 +#: ../../library/subprocess.rst:487 msgid "" "The *executable* argument specifies a replacement program to execute. It " "is very seldom needed. When ``shell=False``, *executable* replaces the " @@ -583,17 +584,17 @@ msgid "" "default :file:`/bin/sh`." msgstr "" -#: ../../library/subprocess.rst:494 +#: ../../library/subprocess.rst:497 msgid "*executable* parameter accepts a :term:`path-like object` on POSIX." msgstr "" -#: ../../library/subprocess.rst:497 +#: ../../library/subprocess.rst:500 msgid "" "*executable* parameter accepts a bytes and :term:`path-like object` on " "Windows." msgstr "" -#: ../../library/subprocess.rst:509 +#: ../../library/subprocess.rst:512 msgid "" "*stdin*, *stdout* and *stderr* specify the executed program's standard " "input, standard output and standard error file handles, respectively. Valid " @@ -607,19 +608,19 @@ msgid "" "captured into the same file handle as for *stdout*." msgstr "" -#: ../../library/subprocess.rst:520 +#: ../../library/subprocess.rst:523 msgid "" "If *preexec_fn* is set to a callable object, this object will be called in " "the child process just before the child is executed. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:526 +#: ../../library/subprocess.rst:529 msgid "" "The *preexec_fn* parameter is NOT SAFE to use in the presence of threads in " "your application. The child process could deadlock before exec is called." msgstr "" -#: ../../library/subprocess.rst:532 +#: ../../library/subprocess.rst:535 msgid "" "If you need to modify the environment for the child use the *env* parameter " "rather than doing it in a *preexec_fn*. The *start_new_session* and " @@ -627,7 +628,7 @@ msgid "" "to call :func:`os.setsid` or :func:`os.setpgid` in the child." msgstr "" -#: ../../library/subprocess.rst:539 +#: ../../library/subprocess.rst:542 msgid "" "The *preexec_fn* parameter is no longer supported in subinterpreters. The " "use of the parameter in a subinterpreter raises :exc:`RuntimeError`. The new " @@ -635,7 +636,7 @@ msgid "" "and other embedded environments." msgstr "" -#: ../../library/subprocess.rst:544 +#: ../../library/subprocess.rst:547 msgid "" "If *close_fds* is true, all file descriptors except ``0``, ``1`` and ``2`` " "will be closed before the child process is executed. Otherwise when " @@ -643,38 +644,38 @@ msgid "" "described in :ref:`fd_inheritance`." msgstr "" -#: ../../library/subprocess.rst:549 +#: ../../library/subprocess.rst:552 msgid "" "On Windows, if *close_fds* is true then no handles will be inherited by the " "child process unless explicitly passed in the ``handle_list`` element of :" "attr:`STARTUPINFO.lpAttributeList`, or by standard handle redirection." msgstr "" -#: ../../library/subprocess.rst:553 +#: ../../library/subprocess.rst:556 msgid "" "The default for *close_fds* was changed from :const:`False` to what is " "described above." msgstr "" -#: ../../library/subprocess.rst:557 +#: ../../library/subprocess.rst:560 msgid "" "On Windows the default for *close_fds* was changed from :const:`False` to :" "const:`True` when redirecting the standard handles. It's now possible to set " "*close_fds* to :const:`True` when redirecting the standard handles." msgstr "" -#: ../../library/subprocess.rst:562 +#: ../../library/subprocess.rst:565 msgid "" "*pass_fds* is an optional sequence of file descriptors to keep open between " "the parent and child. Providing any *pass_fds* forces *close_fds* to be :" "const:`True`. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:566 +#: ../../library/subprocess.rst:569 msgid "The *pass_fds* parameter was added." msgstr "新增 *pass_fds* 參數。" -#: ../../library/subprocess.rst:569 +#: ../../library/subprocess.rst:572 msgid "" "If *cwd* is not ``None``, the function changes the working directory to " "*cwd* before executing the child. *cwd* can be a string, bytes or :term:" @@ -683,57 +684,57 @@ msgid "" "executable path is a relative path." msgstr "" -#: ../../library/subprocess.rst:575 +#: ../../library/subprocess.rst:578 msgid "*cwd* parameter accepts a :term:`path-like object` on POSIX." msgstr "" -#: ../../library/subprocess.rst:578 +#: ../../library/subprocess.rst:581 msgid "*cwd* parameter accepts a :term:`path-like object` on Windows." msgstr "" -#: ../../library/subprocess.rst:581 +#: ../../library/subprocess.rst:584 msgid "*cwd* parameter accepts a bytes object on Windows." msgstr "" -#: ../../library/subprocess.rst:584 +#: ../../library/subprocess.rst:587 msgid "" "If *restore_signals* is true (the default) all signals that Python has set " "to SIG_IGN are restored to SIG_DFL in the child process before the exec. " "Currently this includes the SIGPIPE, SIGXFZ and SIGXFSZ signals. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:589 +#: ../../library/subprocess.rst:592 msgid "*restore_signals* was added." msgstr "新增 *restore_signals*。" -#: ../../library/subprocess.rst:592 +#: ../../library/subprocess.rst:595 msgid "" "If *start_new_session* is true the ``setsid()`` system call will be made in " "the child process prior to the execution of the subprocess." msgstr "" -#: ../../library/subprocess.rst:595 ../../library/subprocess.rst:602 -#: ../../library/subprocess.rst:612 ../../library/subprocess.rst:621 -#: ../../library/subprocess.rst:630 ../../library/subprocess.rst:636 +#: ../../library/subprocess.rst:598 ../../library/subprocess.rst:605 +#: ../../library/subprocess.rst:615 ../../library/subprocess.rst:624 +#: ../../library/subprocess.rst:633 ../../library/subprocess.rst:639 msgid ":ref:`Availability `: POSIX" msgstr ":ref:`適用 `:POSIX" -#: ../../library/subprocess.rst:596 +#: ../../library/subprocess.rst:599 msgid "*start_new_session* was added." msgstr "新增 *start_new_session*。" -#: ../../library/subprocess.rst:599 +#: ../../library/subprocess.rst:602 msgid "" "If *process_group* is a non-negative integer, the ``setpgid(0, value)`` " "system call will be made in the child process prior to the execution of the " "subprocess." msgstr "" -#: ../../library/subprocess.rst:603 +#: ../../library/subprocess.rst:606 msgid "*process_group* was added." msgstr "新增 *process_group*。" -#: ../../library/subprocess.rst:606 +#: ../../library/subprocess.rst:609 msgid "" "If *group* is not ``None``, the setregid() system call will be made in the " "child process prior to the execution of the subprocess. If the provided " @@ -742,7 +743,7 @@ msgid "" "passed verbatim. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:615 +#: ../../library/subprocess.rst:618 msgid "" "If *extra_groups* is not ``None``, the setgroups() system call will be made " "in the child process prior to the execution of the subprocess. Strings " @@ -751,7 +752,7 @@ msgid "" "verbatim. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:624 +#: ../../library/subprocess.rst:627 msgid "" "If *user* is not ``None``, the setreuid() system call will be made in the " "child process prior to the execution of the subprocess. If the provided " @@ -760,13 +761,13 @@ msgid "" "passed verbatim. (POSIX only)" msgstr "" -#: ../../library/subprocess.rst:633 +#: ../../library/subprocess.rst:636 msgid "" "If *umask* is not negative, the umask() system call will be made in the " "child process prior to the execution of the subprocess." msgstr "" -#: ../../library/subprocess.rst:639 +#: ../../library/subprocess.rst:642 msgid "" "If *env* is not ``None``, it must be a mapping that defines the environment " "variables for the new process; these are used instead of the default " @@ -775,14 +776,14 @@ msgid "" "data:`os.environ` or :data:`os.environb`." msgstr "" -#: ../../library/subprocess.rst:647 +#: ../../library/subprocess.rst:650 msgid "" "If specified, *env* must provide any variables required for the program to " "execute. On Windows, in order to run a `side-by-side assembly`_ the " "specified *env* **must** include a valid :envvar:`SystemRoot`." msgstr "" -#: ../../library/subprocess.rst:653 +#: ../../library/subprocess.rst:656 msgid "" "If *encoding* or *errors* are specified, or *text* is true, the file objects " "*stdin*, *stdout* and *stderr* are opened in text mode with the specified " @@ -792,73 +793,73 @@ msgid "" "in binary mode." msgstr "" -#: ../../library/subprocess.rst:659 +#: ../../library/subprocess.rst:662 msgid "*encoding* and *errors* were added." msgstr "新增 *encoding* 與 *errors*。" -#: ../../library/subprocess.rst:662 ../../library/subprocess.rst:1285 +#: ../../library/subprocess.rst:665 ../../library/subprocess.rst:1296 msgid "*text* was added as a more readable alias for *universal_newlines*." msgstr "" -#: ../../library/subprocess.rst:665 +#: ../../library/subprocess.rst:668 msgid "" "If given, *startupinfo* will be a :class:`STARTUPINFO` object, which is " "passed to the underlying ``CreateProcess`` function." msgstr "" -#: ../../library/subprocess.rst:668 +#: ../../library/subprocess.rst:671 msgid "If given, *creationflags*, can be one or more of the following flags:" msgstr "" -#: ../../library/subprocess.rst:670 +#: ../../library/subprocess.rst:673 msgid ":data:`CREATE_NEW_CONSOLE`" msgstr ":data:`CREATE_NEW_CONSOLE`" -#: ../../library/subprocess.rst:671 +#: ../../library/subprocess.rst:674 msgid ":data:`CREATE_NEW_PROCESS_GROUP`" msgstr ":data:`CREATE_NEW_PROCESS_GROUP`" -#: ../../library/subprocess.rst:672 +#: ../../library/subprocess.rst:675 msgid ":data:`ABOVE_NORMAL_PRIORITY_CLASS`" msgstr ":data:`ABOVE_NORMAL_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:673 +#: ../../library/subprocess.rst:676 msgid ":data:`BELOW_NORMAL_PRIORITY_CLASS`" msgstr ":data:`BELOW_NORMAL_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:674 +#: ../../library/subprocess.rst:677 msgid ":data:`HIGH_PRIORITY_CLASS`" msgstr ":data:`HIGH_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:675 +#: ../../library/subprocess.rst:678 msgid ":data:`IDLE_PRIORITY_CLASS`" msgstr ":data:`IDLE_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:676 +#: ../../library/subprocess.rst:679 msgid ":data:`NORMAL_PRIORITY_CLASS`" msgstr ":data:`NORMAL_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:677 +#: ../../library/subprocess.rst:680 msgid ":data:`REALTIME_PRIORITY_CLASS`" msgstr ":data:`REALTIME_PRIORITY_CLASS`" -#: ../../library/subprocess.rst:678 +#: ../../library/subprocess.rst:681 msgid ":data:`CREATE_NO_WINDOW`" msgstr ":data:`CREATE_NO_WINDOW`" -#: ../../library/subprocess.rst:679 +#: ../../library/subprocess.rst:682 msgid ":data:`DETACHED_PROCESS`" msgstr ":data:`DETACHED_PROCESS`" -#: ../../library/subprocess.rst:680 +#: ../../library/subprocess.rst:683 msgid ":data:`CREATE_DEFAULT_ERROR_MODE`" msgstr ":data:`CREATE_DEFAULT_ERROR_MODE`" -#: ../../library/subprocess.rst:681 +#: ../../library/subprocess.rst:684 msgid ":data:`CREATE_BREAKAWAY_FROM_JOB`" msgstr ":data:`CREATE_BREAKAWAY_FROM_JOB`" -#: ../../library/subprocess.rst:683 +#: ../../library/subprocess.rst:686 msgid "" "*pipesize* can be used to change the size of the pipe when :data:`PIPE` is " "used for *stdin*, *stdout* or *stderr*. The size of the pipe is only changed " @@ -866,18 +867,18 @@ msgid "" "platforms will ignore this parameter." msgstr "" -#: ../../library/subprocess.rst:688 +#: ../../library/subprocess.rst:691 msgid "Added the *pipesize* parameter." msgstr "新增 ``pipesize`` 參數。" -#: ../../library/subprocess.rst:691 +#: ../../library/subprocess.rst:694 msgid "" "Popen objects are supported as context managers via the :keyword:`with` " "statement: on exit, standard file descriptors are closed, and the process is " "waited for. ::" msgstr "" -#: ../../library/subprocess.rst:709 +#: ../../library/subprocess.rst:712 msgid "" "Raises an :ref:`auditing event ` ``subprocess.Popen`` with " "arguments ``executable``, ``args``, ``cwd``, ``env``." @@ -885,7 +886,7 @@ msgstr "" "引發一個附帶引數 ``executable``、``args``、``cwd``、``env`` 的\\ :ref:`稽核事" "件 ` ``subprocess.Popen``。" -#: ../../library/subprocess.rst:700 +#: ../../library/subprocess.rst:703 msgid "" "Popen and the other functions in this module that use it raise an :ref:" "`auditing event ` ``subprocess.Popen`` with arguments " @@ -893,17 +894,17 @@ msgid "" "be a single string or a list of strings, depending on platform." msgstr "" -#: ../../library/subprocess.rst:705 +#: ../../library/subprocess.rst:708 msgid "Added context manager support." msgstr "新增情境管理器的支援。" -#: ../../library/subprocess.rst:708 +#: ../../library/subprocess.rst:711 msgid "" "Popen destructor now emits a :exc:`ResourceWarning` warning if the child " "process is still running." msgstr "" -#: ../../library/subprocess.rst:712 +#: ../../library/subprocess.rst:715 msgid "" "Popen can use :func:`os.posix_spawn` in some cases for better performance. " "On Windows Subsystem for Linux and QEMU User Emulation, Popen constructor " @@ -912,17 +913,17 @@ msgid "" "returncode`." msgstr "" -#: ../../library/subprocess.rst:721 +#: ../../library/subprocess.rst:724 msgid "Exceptions" msgstr "例外" -#: ../../library/subprocess.rst:723 +#: ../../library/subprocess.rst:726 msgid "" "Exceptions raised in the child process, before the new program has started " "to execute, will be re-raised in the parent." msgstr "" -#: ../../library/subprocess.rst:726 +#: ../../library/subprocess.rst:729 msgid "" "The most common exception raised is :exc:`OSError`. This occurs, for " "example, when trying to execute a non-existent file. Applications should " @@ -933,42 +934,42 @@ msgid "" "subprocess." msgstr "" -#: ../../library/subprocess.rst:733 +#: ../../library/subprocess.rst:736 msgid "" "A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid " "arguments." msgstr "" -#: ../../library/subprocess.rst:736 +#: ../../library/subprocess.rst:739 msgid "" ":func:`check_call` and :func:`check_output` will raise :exc:" "`CalledProcessError` if the called process returns a non-zero return code." msgstr "" -#: ../../library/subprocess.rst:740 +#: ../../library/subprocess.rst:743 msgid "" "All of the functions and methods that accept a *timeout* parameter, such as :" "func:`run` and :meth:`Popen.communicate` will raise :exc:`TimeoutExpired` if " "the timeout expires before the process exits." msgstr "" -#: ../../library/subprocess.rst:744 +#: ../../library/subprocess.rst:747 msgid "" "Exceptions defined in this module all inherit from :exc:`SubprocessError`." msgstr "" -#: ../../library/subprocess.rst:746 +#: ../../library/subprocess.rst:749 msgid "The :exc:`SubprocessError` base class was added." msgstr "" -#: ../../library/subprocess.rst:752 +#: ../../library/subprocess.rst:755 msgid "Security Considerations" msgstr "" -#: ../../library/subprocess.rst:754 +#: ../../library/subprocess.rst:757 msgid "" -"Unlike some other popen functions, this implementation will never implicitly " -"call a system shell. This means that all characters, including shell " +"Unlike some other popen functions, this library will not implicitly choose " +"to call a system shell. This means that all characters, including shell " "metacharacters, can safely be passed to child processes. If the shell is " "invoked explicitly, via ``shell=True``, it is the application's " "responsibility to ensure that all whitespace and metacharacters are quoted " @@ -978,34 +979,45 @@ msgid "" "escaping." msgstr "" -#: ../../library/subprocess.rst:766 +#: ../../library/subprocess.rst:767 +msgid "" +"On Windows, batch files (:file:`*.bat` or :file:`*.cmd`) may be launched by " +"the operating system in a system shell regardless of the arguments passed to " +"this library. This could result in arguments being parsed according to shell " +"rules, but without any escaping added by Python. If you are intentionally " +"launching a batch file with arguments from untrusted sources, consider " +"passing ``shell=True`` to allow Python to escape special characters. See :gh:" +"`114539` for additional discussion." +msgstr "" + +#: ../../library/subprocess.rst:777 msgid "Popen Objects" msgstr "" -#: ../../library/subprocess.rst:768 +#: ../../library/subprocess.rst:779 msgid "Instances of the :class:`Popen` class have the following methods:" msgstr "" -#: ../../library/subprocess.rst:773 +#: ../../library/subprocess.rst:784 msgid "" "Check if child process has terminated. Set and return :attr:`~Popen." "returncode` attribute. Otherwise, returns ``None``." msgstr "" -#: ../../library/subprocess.rst:779 +#: ../../library/subprocess.rst:790 msgid "" "Wait for child process to terminate. Set and return :attr:`~Popen." "returncode` attribute." msgstr "" -#: ../../library/subprocess.rst:782 +#: ../../library/subprocess.rst:793 msgid "" "If the process does not terminate after *timeout* seconds, raise a :exc:" "`TimeoutExpired` exception. It is safe to catch this exception and retry " "the wait." msgstr "" -#: ../../library/subprocess.rst:788 +#: ../../library/subprocess.rst:799 msgid "" "This will deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and the " "child process generates enough output to a pipe such that it blocks waiting " @@ -1013,7 +1025,7 @@ msgid "" "when using pipes to avoid that." msgstr "" -#: ../../library/subprocess.rst:795 +#: ../../library/subprocess.rst:806 msgid "" "When the ``timeout`` parameter is not ``None``, then (on POSIX) the function " "is implemented using a busy loop (non-blocking call and short sleeps). Use " @@ -1021,13 +1033,13 @@ msgid "" "create_subprocess_exec`." msgstr "" -#: ../../library/subprocess.rst:800 ../../library/subprocess.rst:841 -#: ../../library/subprocess.rst:1182 ../../library/subprocess.rst:1222 -#: ../../library/subprocess.rst:1276 +#: ../../library/subprocess.rst:811 ../../library/subprocess.rst:852 +#: ../../library/subprocess.rst:1193 ../../library/subprocess.rst:1233 +#: ../../library/subprocess.rst:1287 msgid "*timeout* was added." msgstr "新增 *timeout*。" -#: ../../library/subprocess.rst:805 +#: ../../library/subprocess.rst:816 msgid "" "Interact with process: Send data to stdin. Read data from stdout and " "stderr, until end-of-file is reached. Wait for process to terminate and set " @@ -1037,13 +1049,13 @@ msgid "" "must be a string. Otherwise, it must be bytes." msgstr "" -#: ../../library/subprocess.rst:812 +#: ../../library/subprocess.rst:823 msgid "" ":meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``. The data " "will be strings if streams were opened in text mode; otherwise, bytes." msgstr "" -#: ../../library/subprocess.rst:816 +#: ../../library/subprocess.rst:827 msgid "" "Note that if you want to send data to the process's stdin, you need to " "create the Popen object with ``stdin=PIPE``. Similarly, to get anything " @@ -1051,67 +1063,67 @@ msgid "" "and/or ``stderr=PIPE`` too." msgstr "" -#: ../../library/subprocess.rst:821 +#: ../../library/subprocess.rst:832 msgid "" "If the process does not terminate after *timeout* seconds, a :exc:" "`TimeoutExpired` exception will be raised. Catching this exception and " "retrying communication will not lose any output." msgstr "" -#: ../../library/subprocess.rst:825 +#: ../../library/subprocess.rst:836 msgid "" "The child process is not killed if the timeout expires, so in order to " "cleanup properly a well-behaved application should kill the child process " "and finish communication::" msgstr "" -#: ../../library/subprocess.rst:838 +#: ../../library/subprocess.rst:849 msgid "" "The data read is buffered in memory, so do not use this method if the data " "size is large or unlimited." msgstr "" -#: ../../library/subprocess.rst:847 +#: ../../library/subprocess.rst:858 msgid "Sends the signal *signal* to the child." msgstr "" -#: ../../library/subprocess.rst:849 +#: ../../library/subprocess.rst:860 msgid "Do nothing if the process completed." msgstr "" -#: ../../library/subprocess.rst:853 +#: ../../library/subprocess.rst:864 msgid "" "On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and " "CTRL_BREAK_EVENT can be sent to processes started with a *creationflags* " "parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" -#: ../../library/subprocess.rst:860 +#: ../../library/subprocess.rst:871 msgid "" "Stop the child. On POSIX OSs the method sends :py:const:`~signal.SIGTERM` to " "the child. On Windows the Win32 API function :c:func:`!TerminateProcess` is " "called to stop the child." msgstr "" -#: ../../library/subprocess.rst:867 +#: ../../library/subprocess.rst:878 msgid "" "Kills the child. On POSIX OSs the function sends SIGKILL to the child. On " "Windows :meth:`kill` is an alias for :meth:`terminate`." msgstr "" -#: ../../library/subprocess.rst:871 +#: ../../library/subprocess.rst:882 msgid "" "The following attributes are also set by the class for you to access. " "Reassigning them to new values is unsupported:" msgstr "" -#: ../../library/subprocess.rst:876 +#: ../../library/subprocess.rst:887 msgid "" "The *args* argument as it was passed to :class:`Popen` -- a sequence of " "program arguments or else a single string." msgstr "" -#: ../../library/subprocess.rst:883 +#: ../../library/subprocess.rst:894 msgid "" "If the *stdin* argument was :data:`PIPE`, this attribute is a writeable " "stream object as returned by :func:`open`. If the *encoding* or *errors* " @@ -1120,7 +1132,7 @@ msgid "" "*stdin* argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: ../../library/subprocess.rst:892 +#: ../../library/subprocess.rst:903 msgid "" "If the *stdout* argument was :data:`PIPE`, this attribute is a readable " "stream object as returned by :func:`open`. Reading from the stream provides " @@ -1130,7 +1142,7 @@ msgid "" "argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: ../../library/subprocess.rst:902 +#: ../../library/subprocess.rst:913 msgid "" "If the *stderr* argument was :data:`PIPE`, this attribute is a readable " "stream object as returned by :func:`open`. Reading from the stream provides " @@ -1140,7 +1152,7 @@ msgid "" "argument was not :data:`PIPE`, this attribute is ``None``." msgstr "" -#: ../../library/subprocess.rst:911 +#: ../../library/subprocess.rst:922 msgid "" "Use :meth:`~Popen.communicate` rather than :attr:`.stdin.write `, :attr:`.stdout.read ` or :attr:`.stderr.read `__ structure is used for :class:`Popen` " @@ -1189,38 +1201,38 @@ msgid "" "only arguments." msgstr "" -#: ../../library/subprocess.rst:952 +#: ../../library/subprocess.rst:963 msgid "Keyword-only argument support was added." msgstr "" -#: ../../library/subprocess.rst:957 +#: ../../library/subprocess.rst:968 msgid "" "A bit field that determines whether certain :class:`STARTUPINFO` attributes " "are used when the process creates a window. ::" msgstr "" -#: ../../library/subprocess.rst:965 +#: ../../library/subprocess.rst:976 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard input handle for the process. If :data:`STARTF_USESTDHANDLES` " "is not specified, the default for standard input is the keyboard buffer." msgstr "" -#: ../../library/subprocess.rst:972 +#: ../../library/subprocess.rst:983 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard output handle for the process. Otherwise, this attribute is " "ignored and the default for standard output is the console window's buffer." msgstr "" -#: ../../library/subprocess.rst:979 +#: ../../library/subprocess.rst:990 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is " "the standard error handle for the process. Otherwise, this attribute is " "ignored and the default for standard error is the console window's buffer." msgstr "" -#: ../../library/subprocess.rst:985 +#: ../../library/subprocess.rst:996 msgid "" "If :attr:`dwFlags` specifies :data:`STARTF_USESHOWWINDOW`, this attribute " "can be any of the values that can be specified in the ``nCmdShow`` parameter " @@ -1229,34 +1241,34 @@ msgid "" "Otherwise, this attribute is ignored." msgstr "" -#: ../../library/subprocess.rst:992 +#: ../../library/subprocess.rst:1003 msgid "" ":data:`SW_HIDE` is provided for this attribute. It is used when :class:" "`Popen` is called with ``shell=True``." msgstr "" -#: ../../library/subprocess.rst:997 +#: ../../library/subprocess.rst:1008 msgid "" "A dictionary of additional attributes for process creation as given in " "``STARTUPINFOEX``, see `UpdateProcThreadAttribute `__." msgstr "" -#: ../../library/subprocess.rst:1001 +#: ../../library/subprocess.rst:1012 msgid "Supported attributes:" msgstr "" -#: ../../library/subprocess.rst:1019 +#: ../../library/subprocess.rst:1014 msgid "**handle_list**" msgstr "**handle_list**" -#: ../../library/subprocess.rst:1004 +#: ../../library/subprocess.rst:1015 msgid "" "Sequence of handles that will be inherited. *close_fds* must be true if non-" "empty." msgstr "" -#: ../../library/subprocess.rst:1007 +#: ../../library/subprocess.rst:1018 msgid "" "The handles must be temporarily made inheritable by :func:`os." "set_handle_inheritable` when passed to the :class:`Popen` constructor, else :" @@ -1264,7 +1276,7 @@ msgid "" "``ERROR_INVALID_PARAMETER`` (87)." msgstr "" -#: ../../library/subprocess.rst:1014 +#: ../../library/subprocess.rst:1025 msgid "" "In a multithreaded process, use caution to avoid leaking handles that are " "marked inheritable when combining this feature with concurrent calls to " @@ -1273,97 +1285,97 @@ msgid "" "temporarily creates inheritable handles." msgstr "" -#: ../../library/subprocess.rst:1024 +#: ../../library/subprocess.rst:1035 msgid "Windows Constants" msgstr "" -#: ../../library/subprocess.rst:1026 +#: ../../library/subprocess.rst:1037 msgid "The :mod:`subprocess` module exposes the following constants." msgstr "" -#: ../../library/subprocess.rst:1030 +#: ../../library/subprocess.rst:1041 msgid "" "The standard input device. Initially, this is the console input buffer, " "``CONIN$``." msgstr "" -#: ../../library/subprocess.rst:1035 +#: ../../library/subprocess.rst:1046 msgid "" "The standard output device. Initially, this is the active console screen " "buffer, ``CONOUT$``." msgstr "" -#: ../../library/subprocess.rst:1040 +#: ../../library/subprocess.rst:1051 msgid "" "The standard error device. Initially, this is the active console screen " "buffer, ``CONOUT$``." msgstr "" -#: ../../library/subprocess.rst:1045 +#: ../../library/subprocess.rst:1056 msgid "Hides the window. Another window will be activated." msgstr "" -#: ../../library/subprocess.rst:1049 +#: ../../library/subprocess.rst:1060 msgid "" "Specifies that the :attr:`STARTUPINFO.hStdInput`, :attr:`STARTUPINFO." "hStdOutput`, and :attr:`STARTUPINFO.hStdError` attributes contain additional " "information." msgstr "" -#: ../../library/subprocess.rst:1055 +#: ../../library/subprocess.rst:1066 msgid "" "Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains " "additional information." msgstr "" -#: ../../library/subprocess.rst:1060 +#: ../../library/subprocess.rst:1071 msgid "" "The new process has a new console, instead of inheriting its parent's " "console (the default)." msgstr "" -#: ../../library/subprocess.rst:1065 +#: ../../library/subprocess.rst:1076 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "group will be created. This flag is necessary for using :func:`os.kill` on " "the subprocess." msgstr "" -#: ../../library/subprocess.rst:1069 +#: ../../library/subprocess.rst:1080 msgid "This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified." msgstr "" -#: ../../library/subprocess.rst:1073 +#: ../../library/subprocess.rst:1084 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have an above average priority." msgstr "" -#: ../../library/subprocess.rst:1080 +#: ../../library/subprocess.rst:1091 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have a below average priority." msgstr "" -#: ../../library/subprocess.rst:1087 +#: ../../library/subprocess.rst:1098 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have a high priority." msgstr "" -#: ../../library/subprocess.rst:1094 +#: ../../library/subprocess.rst:1105 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have an idle (lowest) priority." msgstr "" -#: ../../library/subprocess.rst:1101 +#: ../../library/subprocess.rst:1112 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have an normal priority. (default)" msgstr "" -#: ../../library/subprocess.rst:1108 +#: ../../library/subprocess.rst:1119 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will have realtime priority. You should almost never use " @@ -1373,20 +1385,20 @@ msgid "" "perform brief tasks that should have limited interruptions." msgstr "" -#: ../../library/subprocess.rst:1119 +#: ../../library/subprocess.rst:1130 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will not create a window." msgstr "" -#: ../../library/subprocess.rst:1126 +#: ../../library/subprocess.rst:1137 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "will not inherit its parent's console. This value cannot be used with " "CREATE_NEW_CONSOLE." msgstr "" -#: ../../library/subprocess.rst:1134 +#: ../../library/subprocess.rst:1145 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "does not inherit the error mode of the calling process. Instead, the new " @@ -1394,39 +1406,39 @@ msgid "" "multithreaded shell applications that run with hard errors disabled." msgstr "" -#: ../../library/subprocess.rst:1144 +#: ../../library/subprocess.rst:1155 msgid "" "A :class:`Popen` ``creationflags`` parameter to specify that a new process " "is not associated with the job." msgstr "" -#: ../../library/subprocess.rst:1152 +#: ../../library/subprocess.rst:1163 msgid "Older high-level API" msgstr "" -#: ../../library/subprocess.rst:1154 +#: ../../library/subprocess.rst:1165 msgid "" "Prior to Python 3.5, these three functions comprised the high level API to " "subprocess. You can now use :func:`run` in many cases, but lots of existing " "code calls these functions." msgstr "" -#: ../../library/subprocess.rst:1161 +#: ../../library/subprocess.rst:1172 msgid "" "Run the command described by *args*. Wait for command to complete, then " "return the :attr:`~Popen.returncode` attribute." msgstr "" -#: ../../library/subprocess.rst:1164 ../../library/subprocess.rst:1204 +#: ../../library/subprocess.rst:1175 ../../library/subprocess.rst:1215 msgid "" "Code needing to capture stdout or stderr should use :func:`run` instead::" msgstr "" -#: ../../library/subprocess.rst:1168 ../../library/subprocess.rst:1208 +#: ../../library/subprocess.rst:1179 ../../library/subprocess.rst:1219 msgid "To suppress stdout or stderr, supply a value of :data:`DEVNULL`." msgstr "" -#: ../../library/subprocess.rst:1170 ../../library/subprocess.rst:1210 +#: ../../library/subprocess.rst:1181 ../../library/subprocess.rst:1221 msgid "" "The arguments shown above are merely some common ones. The full function " "signature is the same as that of the :class:`Popen` constructor - this " @@ -1434,14 +1446,14 @@ msgid "" "to that interface." msgstr "" -#: ../../library/subprocess.rst:1177 ../../library/subprocess.rst:1217 +#: ../../library/subprocess.rst:1188 ../../library/subprocess.rst:1228 msgid "" "Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this function. The child " "process will block if it generates enough output to a pipe to fill up the OS " "pipe buffer as the pipes are not being read from." msgstr "" -#: ../../library/subprocess.rst:1197 +#: ../../library/subprocess.rst:1208 msgid "" "Run command with arguments. Wait for command to complete. If the return " "code was zero then return, otherwise raise :exc:`CalledProcessError`. The :" @@ -1450,11 +1462,11 @@ msgid "" "to start the process it will propagate the exception that was raised." msgstr "" -#: ../../library/subprocess.rst:1239 +#: ../../library/subprocess.rst:1250 msgid "Run command with arguments and return its output." msgstr "" -#: ../../library/subprocess.rst:1241 +#: ../../library/subprocess.rst:1252 msgid "" "If the return code was non-zero it raises a :exc:`CalledProcessError`. The :" "exc:`CalledProcessError` object will have the return code in the :attr:" @@ -1462,11 +1474,11 @@ msgid "" "`~CalledProcessError.output` attribute." msgstr "" -#: ../../library/subprocess.rst:1246 +#: ../../library/subprocess.rst:1257 msgid "This is equivalent to::" msgstr "這等同於: ::" -#: ../../library/subprocess.rst:1250 +#: ../../library/subprocess.rst:1261 msgid "" "The arguments shown above are merely some common ones. The full function " "signature is largely the same as that of :func:`run` - most arguments are " @@ -1476,52 +1488,52 @@ msgid "" "using the parent's standard input file handle." msgstr "" -#: ../../library/subprocess.rst:1257 +#: ../../library/subprocess.rst:1268 msgid "" "By default, this function will return the data as encoded bytes. The actual " "encoding of the output data may depend on the command being invoked, so the " "decoding to text will often need to be handled at the application level." msgstr "" -#: ../../library/subprocess.rst:1261 +#: ../../library/subprocess.rst:1272 msgid "" "This behaviour may be overridden by setting *text*, *encoding*, *errors*, or " "*universal_newlines* to ``True`` as described in :ref:`frequently-used-" "arguments` and :func:`run`." msgstr "" -#: ../../library/subprocess.rst:1265 +#: ../../library/subprocess.rst:1276 msgid "" "To also capture standard error in the result, use ``stderr=subprocess." "STDOUT``::" msgstr "" -#: ../../library/subprocess.rst:1279 +#: ../../library/subprocess.rst:1290 msgid "Support for the *input* keyword argument was added." msgstr "新增 *input* 關鍵字引數的支援。" -#: ../../library/subprocess.rst:1282 +#: ../../library/subprocess.rst:1293 msgid "*encoding* and *errors* were added. See :func:`run` for details." msgstr "新增 *encoding* 與 *errors*。細節請見 :func:`run`。" -#: ../../library/subprocess.rst:1300 +#: ../../library/subprocess.rst:1311 msgid "Replacing Older Functions with the :mod:`subprocess` Module" msgstr "" -#: ../../library/subprocess.rst:1302 +#: ../../library/subprocess.rst:1313 msgid "" "In this section, \"a becomes b\" means that b can be used as a replacement " "for a." msgstr "" -#: ../../library/subprocess.rst:1306 +#: ../../library/subprocess.rst:1317 msgid "" "All \"a\" functions in this section fail (more or less) silently if the " "executed program cannot be found; the \"b\" replacements raise :exc:" "`OSError` instead." msgstr "" -#: ../../library/subprocess.rst:1310 +#: ../../library/subprocess.rst:1321 msgid "" "In addition, the replacements using :func:`check_output` will fail with a :" "exc:`CalledProcessError` if the requested operation produces a non-zero " @@ -1529,134 +1541,134 @@ msgid "" "output` attribute of the raised exception." msgstr "" -#: ../../library/subprocess.rst:1315 +#: ../../library/subprocess.rst:1326 msgid "" "In the following examples, we assume that the relevant functions have " "already been imported from the :mod:`subprocess` module." msgstr "" -#: ../../library/subprocess.rst:1320 +#: ../../library/subprocess.rst:1331 msgid "Replacing :program:`/bin/sh` shell command substitution" msgstr "" -#: ../../library/subprocess.rst:1326 ../../library/subprocess.rst:1337 -#: ../../library/subprocess.rst:1354 +#: ../../library/subprocess.rst:1337 ../../library/subprocess.rst:1348 +#: ../../library/subprocess.rst:1365 msgid "becomes::" msgstr "變成: ::" -#: ../../library/subprocess.rst:1331 +#: ../../library/subprocess.rst:1342 msgid "Replacing shell pipeline" msgstr "" -#: ../../library/subprocess.rst:1344 +#: ../../library/subprocess.rst:1355 msgid "" "The ``p1.stdout.close()`` call after starting the p2 is important in order " "for p1 to receive a SIGPIPE if p2 exits before p1." msgstr "" -#: ../../library/subprocess.rst:1347 +#: ../../library/subprocess.rst:1358 msgid "" "Alternatively, for trusted input, the shell's own pipeline support may still " "be used directly:" msgstr "" -#: ../../library/subprocess.rst:1360 +#: ../../library/subprocess.rst:1371 msgid "Replacing :func:`os.system`" msgstr "" -#: ../../library/subprocess.rst:1368 +#: ../../library/subprocess.rst:1379 msgid "Notes:" msgstr "註解:" -#: ../../library/subprocess.rst:1370 +#: ../../library/subprocess.rst:1381 msgid "Calling the program through the shell is usually not required." msgstr "" -#: ../../library/subprocess.rst:1371 +#: ../../library/subprocess.rst:1382 msgid "" "The :func:`call` return value is encoded differently to that of :func:`os." "system`." msgstr "" -#: ../../library/subprocess.rst:1374 +#: ../../library/subprocess.rst:1385 msgid "" "The :func:`os.system` function ignores SIGINT and SIGQUIT signals while the " "command is running, but the caller must do this separately when using the :" "mod:`subprocess` module." msgstr "" -#: ../../library/subprocess.rst:1378 +#: ../../library/subprocess.rst:1389 msgid "A more realistic example would look like this::" msgstr "" -#: ../../library/subprocess.rst:1391 +#: ../../library/subprocess.rst:1402 msgid "Replacing the :func:`os.spawn ` family" msgstr "" -#: ../../library/subprocess.rst:1393 +#: ../../library/subprocess.rst:1404 msgid "P_NOWAIT example::" msgstr "P_NOWAIT 範例: ::" -#: ../../library/subprocess.rst:1399 +#: ../../library/subprocess.rst:1410 msgid "P_WAIT example::" msgstr "P_WAIT 範例: ::" -#: ../../library/subprocess.rst:1405 +#: ../../library/subprocess.rst:1416 msgid "Vector example::" msgstr "" -#: ../../library/subprocess.rst:1411 +#: ../../library/subprocess.rst:1422 msgid "Environment example::" msgstr "" -#: ../../library/subprocess.rst:1420 +#: ../../library/subprocess.rst:1431 msgid "Replacing :func:`os.popen`, :func:`os.popen2`, :func:`os.popen3`" msgstr "" -#: ../../library/subprocess.rst:1450 +#: ../../library/subprocess.rst:1461 msgid "Return code handling translates as follows::" msgstr "" -#: ../../library/subprocess.rst:1466 +#: ../../library/subprocess.rst:1477 msgid "Replacing functions from the :mod:`!popen2` module" msgstr "" -#: ../../library/subprocess.rst:1470 +#: ../../library/subprocess.rst:1481 msgid "" "If the cmd argument to popen2 functions is a string, the command is executed " "through /bin/sh. If it is a list, the command is directly executed." msgstr "" -#: ../../library/subprocess.rst:1489 +#: ../../library/subprocess.rst:1500 msgid "" ":class:`popen2.Popen3` and :class:`popen2.Popen4` basically work as :class:" "`subprocess.Popen`, except that:" msgstr "" -#: ../../library/subprocess.rst:1492 +#: ../../library/subprocess.rst:1503 msgid ":class:`Popen` raises an exception if the execution fails." msgstr "" -#: ../../library/subprocess.rst:1494 +#: ../../library/subprocess.rst:1505 msgid "The *capturestderr* argument is replaced with the *stderr* argument." msgstr "" -#: ../../library/subprocess.rst:1496 +#: ../../library/subprocess.rst:1507 msgid "``stdin=PIPE`` and ``stdout=PIPE`` must be specified." msgstr "" -#: ../../library/subprocess.rst:1498 +#: ../../library/subprocess.rst:1509 msgid "" "popen2 closes all file descriptors by default, but you have to specify " "``close_fds=True`` with :class:`Popen` to guarantee this behavior on all " "platforms or past Python versions." msgstr "" -#: ../../library/subprocess.rst:1504 +#: ../../library/subprocess.rst:1515 msgid "Legacy Shell Invocation Functions" msgstr "" -#: ../../library/subprocess.rst:1506 +#: ../../library/subprocess.rst:1517 msgid "" "This module also provides the following legacy functions from the 2.x " "``commands`` module. These operations implicitly invoke the system shell and " @@ -1664,11 +1676,11 @@ msgid "" "handling consistency are valid for these functions." msgstr "" -#: ../../library/subprocess.rst:1513 +#: ../../library/subprocess.rst:1524 msgid "Return ``(exitcode, output)`` of executing *cmd* in a shell." msgstr "" -#: ../../library/subprocess.rst:1515 +#: ../../library/subprocess.rst:1526 msgid "" "Execute the string *cmd* in a shell with :meth:`Popen.check_output` and " "return a 2-tuple ``(exitcode, output)``. *encoding* and *errors* are used to " @@ -1676,81 +1688,81 @@ msgid "" "details." msgstr "" -#: ../../library/subprocess.rst:1520 +#: ../../library/subprocess.rst:1531 msgid "" "A trailing newline is stripped from the output. The exit code for the " "command can be interpreted as the return code of subprocess. Example::" msgstr "" -#: ../../library/subprocess.rst:1533 ../../library/subprocess.rst:1555 +#: ../../library/subprocess.rst:1544 ../../library/subprocess.rst:1566 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix 和 Windows。" -#: ../../library/subprocess.rst:1535 +#: ../../library/subprocess.rst:1546 msgid "Windows support was added." msgstr "新增對 Windows 的支援。" -#: ../../library/subprocess.rst:1538 +#: ../../library/subprocess.rst:1549 msgid "" "The function now returns (exitcode, output) instead of (status, output) as " "it did in Python 3.3.3 and earlier. exitcode has the same value as :attr:" "`~Popen.returncode`." msgstr "" -#: ../../library/subprocess.rst:1547 +#: ../../library/subprocess.rst:1558 msgid "Return output (stdout and stderr) of executing *cmd* in a shell." msgstr "" -#: ../../library/subprocess.rst:1549 +#: ../../library/subprocess.rst:1560 msgid "" "Like :func:`getstatusoutput`, except the exit code is ignored and the return " "value is a string containing the command's output. Example::" msgstr "" -#: ../../library/subprocess.rst:1557 +#: ../../library/subprocess.rst:1568 msgid "Windows support added" msgstr "新增對 Windows 的支援" -#: ../../library/subprocess.rst:1565 +#: ../../library/subprocess.rst:1576 msgid "Notes" msgstr "註解" -#: ../../library/subprocess.rst:1570 +#: ../../library/subprocess.rst:1581 msgid "Converting an argument sequence to a string on Windows" msgstr "" -#: ../../library/subprocess.rst:1572 +#: ../../library/subprocess.rst:1583 msgid "" "On Windows, an *args* sequence is converted to a string that can be parsed " "using the following rules (which correspond to the rules used by the MS C " "runtime):" msgstr "" -#: ../../library/subprocess.rst:1576 +#: ../../library/subprocess.rst:1587 msgid "" "Arguments are delimited by white space, which is either a space or a tab." msgstr "" -#: ../../library/subprocess.rst:1579 +#: ../../library/subprocess.rst:1590 msgid "" "A string surrounded by double quotation marks is interpreted as a single " "argument, regardless of white space contained within. A quoted string can " "be embedded in an argument." msgstr "" -#: ../../library/subprocess.rst:1584 +#: ../../library/subprocess.rst:1595 msgid "" "A double quotation mark preceded by a backslash is interpreted as a literal " "double quotation mark." msgstr "" -#: ../../library/subprocess.rst:1587 +#: ../../library/subprocess.rst:1598 msgid "" "Backslashes are interpreted literally, unless they immediately precede a " "double quotation mark." msgstr "" -#: ../../library/subprocess.rst:1590 +#: ../../library/subprocess.rst:1601 msgid "" "If backslashes immediately precede a double quotation mark, every pair of " "backslashes is interpreted as a literal backslash. If the number of " @@ -1758,33 +1770,33 @@ msgid "" "mark as described in rule 3." msgstr "" -#: ../../library/subprocess.rst:1599 +#: ../../library/subprocess.rst:1610 msgid ":mod:`shlex`" msgstr ":mod:`shlex`" -#: ../../library/subprocess.rst:1600 +#: ../../library/subprocess.rst:1611 msgid "Module which provides function to parse and escape command lines." msgstr "" -#: ../../library/subprocess.rst:1607 +#: ../../library/subprocess.rst:1618 msgid "Disabling use of ``vfork()`` or ``posix_spawn()``" msgstr "" -#: ../../library/subprocess.rst:1609 +#: ../../library/subprocess.rst:1620 msgid "" "On Linux, :mod:`subprocess` defaults to using the ``vfork()`` system call " "internally when it is safe to do so rather than ``fork()``. This greatly " "improves performance." msgstr "" -#: ../../library/subprocess.rst:1613 +#: ../../library/subprocess.rst:1624 msgid "" "If you ever encounter a presumed highly unusual situation where you need to " "prevent ``vfork()`` from being used by Python, you can set the :const:" "`subprocess._USE_VFORK` attribute to a false value." msgstr "" -#: ../../library/subprocess.rst:1621 +#: ../../library/subprocess.rst:1632 msgid "" "Setting this has no impact on use of ``posix_spawn()`` which could use " "``vfork()`` internally within its libc implementation. There is a similar :" @@ -1792,7 +1804,7 @@ msgid "" "that." msgstr "" -#: ../../library/subprocess.rst:1630 +#: ../../library/subprocess.rst:1641 msgid "" "It is safe to set these to false on any Python version. They will have no " "effect on older versions when unsupported. Do not assume the attributes are " @@ -1800,26 +1812,26 @@ msgid "" "the corresponding function will be used, only that it may be." msgstr "" -#: ../../library/subprocess.rst:1635 +#: ../../library/subprocess.rst:1646 msgid "" "Please file issues any time you have to use these private knobs with a way " "to reproduce the issue you were seeing. Link to that issue from a comment in " "your code." msgstr "" -#: ../../library/subprocess.rst:1639 +#: ../../library/subprocess.rst:1650 msgid "``_USE_POSIX_SPAWN``" msgstr "``_USE_POSIX_SPAWN``" -#: ../../library/subprocess.rst:1640 +#: ../../library/subprocess.rst:1651 msgid "``_USE_VFORK``" msgstr "``_USE_VFORK``" -#: ../../library/subprocess.rst:293 +#: ../../library/subprocess.rst:296 msgid "universal newlines" msgstr "universal newlines" -#: ../../library/subprocess.rst:293 +#: ../../library/subprocess.rst:296 msgid "subprocess module" msgstr "subprocess 模組" diff --git a/library/sunau.po b/library/sunau.po index deeb530def..522bdb462a 100644 --- a/library/sunau.po +++ b/library/sunau.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -135,7 +135,7 @@ msgstr "" "如 *file* 是一個字串,則以此名開啟檔案,否則把它當作一個可以被搜尋的 file-" "like object(類檔案物件)。\\ *mode* 可以是以下任一" -#: ../../library/sunau.rst:56 +#: ../../library/sunau.rst:55 msgid "``'r'``" msgstr "``'r'``" @@ -143,7 +143,7 @@ msgstr "``'r'``" msgid "Read only mode." msgstr "唯讀模式。" -#: ../../library/sunau.rst:59 +#: ../../library/sunau.rst:58 msgid "``'w'``" msgstr "``'w'``" diff --git a/library/sys.po b/library/sys.po index ad52ed3445..ff46baf86d 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 19:55+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-04-26 02:54+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1535,7 +1535,7 @@ msgid "" "if the module cannot be found." msgstr "" -#: ../../library/sys.rst:1249 +#: ../../library/sys.rst:1248 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr ":class:`importlib.abc.MetaPathFinder`" @@ -1545,7 +1545,7 @@ msgid "" "`meta_path`." msgstr "" -#: ../../library/sys.rst:1253 +#: ../../library/sys.rst:1251 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr ":class:`importlib.machinery.ModuleSpec`" @@ -1890,7 +1890,7 @@ msgstr "" msgid "The events have the following meaning:" msgstr "" -#: ../../library/sys.rst:1500 ../../library/sys.rst:1588 +#: ../../library/sys.rst:1498 ../../library/sys.rst:1585 msgid "``'call'``" msgstr "``'call'``" @@ -1900,7 +1900,7 @@ msgid "" "function is called; *arg* is ``None``." msgstr "" -#: ../../library/sys.rst:1505 ../../library/sys.rst:1604 +#: ../../library/sys.rst:1502 ../../library/sys.rst:1600 msgid "``'return'``" msgstr "``'return'``" @@ -1911,7 +1911,7 @@ msgid "" "event is caused by an exception being raised." msgstr "" -#: ../../library/sys.rst:1509 +#: ../../library/sys.rst:1507 msgid "``'c_call'``" msgstr "``'c_call'``" @@ -1921,7 +1921,7 @@ msgid "" "built-in. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1512 +#: ../../library/sys.rst:1511 msgid "``'c_return'``" msgstr "``'c_return'``" @@ -1929,7 +1929,7 @@ msgstr "``'c_return'``" msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1515 +#: ../../library/sys.rst:1514 msgid "``'c_exception'``" msgstr "``'c_exception'``" @@ -2031,7 +2031,7 @@ msgid "" "trace function." msgstr "" -#: ../../library/sys.rst:1598 +#: ../../library/sys.rst:1590 msgid "``'line'``" msgstr "``'line'``" @@ -2053,7 +2053,7 @@ msgid "" "return value is ignored." msgstr "" -#: ../../library/sys.rst:1609 +#: ../../library/sys.rst:1606 msgid "``'exception'``" msgstr "``'exception'``" @@ -2064,7 +2064,7 @@ msgid "" "local trace function." msgstr "" -#: ../../library/sys.rst:1617 +#: ../../library/sys.rst:1611 msgid "``'opcode'``" msgstr "``'opcode'``" diff --git a/library/syslog.po b/library/syslog.po index fc9d6e877d..b20aa98af1 100644 --- a/library/syslog.po +++ b/library/syslog.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -165,7 +165,7 @@ msgstr "" msgid "The module defines the following constants:" msgstr "" -#: ../../library/syslog.rst:113 +#: ../../library/syslog.rst:110 msgid "Priority levels (high to low):" msgstr "" @@ -176,7 +176,7 @@ msgid "" "const:`LOG_DEBUG`." msgstr "" -#: ../../library/syslog.rst:120 +#: ../../library/syslog.rst:115 msgid "Facilities:" msgstr "" @@ -188,7 +188,7 @@ msgid "" "const:`LOG_LOCAL7`, and, if defined in ````, :const:`LOG_AUTHPRIV`." msgstr "" -#: ../../library/syslog.rst:126 +#: ../../library/syslog.rst:122 msgid "Log options:" msgstr "" diff --git a/library/tarfile.po b/library/tarfile.po index d62b993b7a..b633425545 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-30 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -527,7 +527,7 @@ msgid "" "const:`GNU_FORMAT`." msgstr "" -#: ../../library/tarfile.rst:338 +#: ../../library/tarfile.rst:337 msgid "Module :mod:`zipfile`" msgstr ":mod:`zipfile` 模組" @@ -535,7 +535,7 @@ msgstr ":mod:`zipfile` 模組" msgid "Documentation of the :mod:`zipfile` standard module." msgstr "" -#: ../../library/tarfile.rst:342 +#: ../../library/tarfile.rst:340 msgid ":ref:`archiving-operations`" msgstr ":ref:`archiving-operations`" diff --git a/library/test.po b/library/test.po index 80b7970795..efcfa96e63 100644 --- a/library/test.po +++ b/library/test.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-08 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -48,7 +48,7 @@ msgid "" "printed to ``sys.stdout``; this style of test is considered deprecated." msgstr "" -#: ../../library/test.rst:33 +#: ../../library/test.rst:32 msgid "Module :mod:`unittest`" msgstr ":mod:`unittest` 模組" diff --git a/library/time.po b/library/time.po index 163e61668a..ae06322abd 100644 --- a/library/time.po +++ b/library/time.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -592,7 +592,7 @@ msgstr "" msgid "``%f``" msgstr "" -#: ../../library/time.rst:431 +#: ../../library/time.rst:430 msgid "Microseconds as a decimal number" msgstr "" @@ -1077,7 +1077,7 @@ msgstr "" msgid "Where the components are:" msgstr "" -#: ../../library/time.rst:735 +#: ../../library/time.rst:733 msgid "``std`` and ``dst``" msgstr "``std`` 和 ``dst``" @@ -1087,7 +1087,7 @@ msgid "" "propagated into time.tzname" msgstr "" -#: ../../library/time.rst:741 +#: ../../library/time.rst:737 msgid "``offset``" msgstr "``offset``" @@ -1099,7 +1099,7 @@ msgid "" "summer time is assumed to be one hour ahead of standard time." msgstr "" -#: ../../library/time.rst:763 +#: ../../library/time.rst:743 msgid "``start[/time], end[/time]``" msgstr "``start[/time], end[/time]``" @@ -1109,7 +1109,7 @@ msgid "" "end dates are one of the following:" msgstr "" -#: ../../library/time.rst:749 +#: ../../library/time.rst:747 msgid ":samp:`J{n}`" msgstr ":samp:`J{n}`" @@ -1119,7 +1119,7 @@ msgid "" "years February 28 is day 59 and March 1 is day 60." msgstr "" -#: ../../library/time.rst:753 +#: ../../library/time.rst:751 msgid ":samp:`{n}`" msgstr ":samp:`{n}`" @@ -1129,7 +1129,7 @@ msgid "" "is possible to refer to February 29." msgstr "" -#: ../../library/time.rst:760 +#: ../../library/time.rst:755 msgid ":samp:`M{m}.{n}.{d}`" msgstr ":samp:`M{m}.{n}.{d}`" @@ -1314,7 +1314,7 @@ msgid "" "func:`localtime` to obtain timezone information." msgstr "" -#: ../../library/time.rst:958 +#: ../../library/time.rst:957 msgid "Module :mod:`datetime`" msgstr ":mod:`datetime` 模組" @@ -1322,7 +1322,7 @@ msgstr ":mod:`datetime` 模組" msgid "More object-oriented interface to dates and times." msgstr "" -#: ../../library/time.rst:962 +#: ../../library/time.rst:960 msgid "Module :mod:`locale`" msgstr ":mod:`locale` 模組" @@ -1333,7 +1333,7 @@ msgid "" "`strptime`." msgstr "" -#: ../../library/time.rst:965 +#: ../../library/time.rst:964 msgid "Module :mod:`calendar`" msgstr ":mod:`calendar` 模組" diff --git a/library/tkinter.font.po b/library/tkinter.font.po index 0b2a275b28..5e956af05e 100644 --- a/library/tkinter.font.po +++ b/library/tkinter.font.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2024-02-15 23:09+0800\n" "Last-Translator: RockLeon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -134,7 +134,7 @@ msgstr "" msgid "Return font-specific data. Options include:" msgstr "回傳字型特定的資料。其選項包含:" -#: ../../library/tkinter.font.rst:76 +#: ../../library/tkinter.font.rst:75 msgid "*ascent* - distance between baseline and highest point that a" msgstr "*ascent* - 基準線以及最高點的距離" @@ -142,11 +142,11 @@ msgstr "*ascent* - 基準線以及最高點的距離" msgid "character of the font can occupy" msgstr "在字型中的一個字母可以佔用的空間" -#: ../../library/tkinter.font.rst:79 +#: ../../library/tkinter.font.rst:78 msgid "*descent* - distance between baseline and lowest point that a" msgstr "*descent* - 基準線以及最低點的距離" -#: ../../library/tkinter.font.rst:82 +#: ../../library/tkinter.font.rst:81 msgid "*linespace* - minimum vertical separation necessary between any two" msgstr "*linespace* - 最小所需的垂直間距" diff --git a/library/tkinter.messagebox.po b/library/tkinter.messagebox.po index e8516f1553..295d4187e6 100644 --- a/library/tkinter.messagebox.po +++ b/library/tkinter.messagebox.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2024-02-22 15:59+0800\n" "Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -53,7 +53,7 @@ msgstr "" msgid "The following options are supported:" msgstr "支援以下選項:" -#: ../../library/tkinter.messagebox.rst:33 +#: ../../library/tkinter.messagebox.rst:29 msgid "*command*" msgstr "*command*" @@ -66,7 +66,7 @@ msgstr "" "指定當使用者關閉對話框 (dialog) 時要呼叫的函式。使用者按一下以關閉對話框的按" "鈕的名稱作為引數傳遞。此選項僅適用於 macOS。" -#: ../../library/tkinter.messagebox.rst:39 +#: ../../library/tkinter.messagebox.rst:35 msgid "*default*" msgstr "*default*" @@ -81,7 +81,7 @@ msgstr "" "`OK`、:data:`CANCEL` 等)。如果未指定此選項,則對話框中的第一個按鈕將成為預設" "按鈕。" -#: ../../library/tkinter.messagebox.rst:46 +#: ../../library/tkinter.messagebox.rst:41 msgid "*detail*" msgstr "*detail*" @@ -94,7 +94,7 @@ msgstr "" "透過 *message* 選項指定將輔助訊息給主訊息。訊息詳細資訊將顯示在主要訊息下方," "並且在作業系統支援的情況下,將以比主要訊息更不強調的字體顯示。" -#: ../../library/tkinter.messagebox.rst:51 +#: ../../library/tkinter.messagebox.rst:48 msgid "*icon*" msgstr "*icon*" @@ -106,7 +106,7 @@ msgstr "" "指定要顯示的\\ :ref:`圖示 `。如果未指定此選項,則會顯示 :" "data:`INFO` 圖示。" -#: ../../library/tkinter.messagebox.rst:55 +#: ../../library/tkinter.messagebox.rst:53 msgid "*message*" msgstr "*message*" @@ -116,7 +116,7 @@ msgid "" "an empty string." msgstr "指定要在此訊息框中顯示的訊息。預設值為空字串。" -#: ../../library/tkinter.messagebox.rst:59 +#: ../../library/tkinter.messagebox.rst:57 msgid "*parent*" msgstr "*parent*" @@ -128,7 +128,7 @@ msgstr "" "使指定視窗成為訊息框的邏輯父視窗 (logical parent window)。訊息框顯示在其父視" "窗的頂部。" -#: ../../library/tkinter.messagebox.rst:64 +#: ../../library/tkinter.messagebox.rst:61 msgid "*title*" msgstr "*title*" @@ -141,7 +141,7 @@ msgstr "" "指定顯示為訊息框標題的字串。此選項在 macOS 上被忽略,其平台指南禁止在此類對話" "方塊上使用標題。" -#: ../../library/tkinter.messagebox.rst:68 +#: ../../library/tkinter.messagebox.rst:66 msgid "*type*" msgstr "*type*" diff --git a/library/tkinter.po b/library/tkinter.po index a9daa8c89d..28611d0db7 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-30 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -67,7 +67,7 @@ msgid "" "and can be woefully outdated." msgstr "" -#: ../../library/tkinter.rst:43 +#: ../../library/tkinter.rst:41 msgid "`TkDocs `_" msgstr "`TkDocs `_" @@ -77,7 +77,7 @@ msgid "" "concepts, and illustrates recommended approaches using the modern API." msgstr "" -#: ../../library/tkinter.rst:46 +#: ../../library/tkinter.rst:45 msgid "" "`Tkinter 8.5 reference: a GUI for Python `_" msgstr "" @@ -92,7 +92,7 @@ msgstr "" msgid "Tcl/Tk Resources:" msgstr "Tcl/Tk 相關資源:" -#: ../../library/tkinter.rst:51 +#: ../../library/tkinter.rst:50 msgid "`Tk commands `_" msgstr "`Tk 指令 `_" @@ -102,7 +102,7 @@ msgid "" "Tkinter." msgstr "" -#: ../../library/tkinter.rst:54 +#: ../../library/tkinter.rst:53 msgid "`Tcl/Tk Home Page `_" msgstr "`Tcl/Tk 首頁 `_" @@ -114,7 +114,7 @@ msgstr "" msgid "Books:" msgstr "書籍:" -#: ../../library/tkinter.rst:59 +#: ../../library/tkinter.rst:58 msgid "" "`Modern Tkinter for Busy Python Developers `_" msgstr "" @@ -124,7 +124,7 @@ msgstr "" msgid "By Mark Roseman. (ISBN 978-1999149567)" msgstr "由 Mark Roseman 所著。(ISBN 978-1999149567)" -#: ../../library/tkinter.rst:62 +#: ../../library/tkinter.rst:61 msgid "" "`Python GUI programming with Tkinter `_" @@ -136,7 +136,7 @@ msgstr "" msgid "By Alan D. Moore. (ISBN 978-1788835886)" msgstr "由 Alan D. Moore 所著。(ISBN 978-1788835886)" -#: ../../library/tkinter.rst:65 +#: ../../library/tkinter.rst:64 msgid "`Programming Python `_" msgstr "`Programming Python `_" @@ -172,7 +172,7 @@ msgid "" "with it." msgstr "" -#: ../../library/tkinter.rst:90 +#: ../../library/tkinter.rst:79 msgid "Tcl" msgstr "Tcl" @@ -190,7 +190,7 @@ msgid "" "difference (see `Threading model`_ for details)." msgstr "" -#: ../../library/tkinter.rst:97 ../../library/tkinter.rst:911 +#: ../../library/tkinter.rst:92 ../../library/tkinter.rst:911 msgid "Tk" msgstr "Tk" @@ -203,7 +203,7 @@ msgid "" "appearance. Tk uses Tcl's event queue to generate and process GUI events." msgstr "" -#: ../../library/tkinter.rst:103 +#: ../../library/tkinter.rst:99 msgid "Ttk" msgstr "Ttk" @@ -255,7 +255,7 @@ msgid "" "However, the following keyword arguments are currently recognized:" msgstr "" -#: ../../library/tkinter.rst:137 +#: ../../library/tkinter.rst:136 msgid "*screenName*" msgstr "*screenName*" @@ -265,7 +265,7 @@ msgid "" "(X11 only)" msgstr "" -#: ../../library/tkinter.rst:140 +#: ../../library/tkinter.rst:139 msgid "*baseName*" msgstr "*baseName*" @@ -275,7 +275,7 @@ msgid "" "program name (``sys.argv[0]``)." msgstr "" -#: ../../library/tkinter.rst:143 +#: ../../library/tkinter.rst:142 msgid "*className*" msgstr "*className*" @@ -285,7 +285,7 @@ msgid "" "which Tcl is invoked (*argv0* in *interp*)." msgstr "" -#: ../../library/tkinter.rst:146 +#: ../../library/tkinter.rst:145 msgid "*useTk*" msgstr "*useTk*" @@ -295,7 +295,7 @@ msgid "" "function sets this to ``False``." msgstr "" -#: ../../library/tkinter.rst:149 +#: ../../library/tkinter.rst:148 msgid "*sync*" msgstr "*sync*" @@ -305,7 +305,7 @@ msgid "" "reported immediately. Can be used for debugging. (X11 only)" msgstr "" -#: ../../library/tkinter.rst:159 +#: ../../library/tkinter.rst:151 msgid "*use*" msgstr "*use*" @@ -372,7 +372,7 @@ msgstr "" msgid "The modules that provide Tk support include:" msgstr "" -#: ../../library/tkinter.rst:206 +#: ../../library/tkinter.rst:205 msgid ":mod:`tkinter`" msgstr ":mod:`tkinter`" @@ -380,7 +380,7 @@ msgstr ":mod:`tkinter`" msgid "Main Tkinter module." msgstr "" -#: ../../library/tkinter.rst:209 +#: ../../library/tkinter.rst:208 msgid ":mod:`tkinter.colorchooser`" msgstr ":mod:`tkinter.colorchooser`" @@ -388,7 +388,7 @@ msgstr ":mod:`tkinter.colorchooser`" msgid "Dialog to let the user choose a color." msgstr "" -#: ../../library/tkinter.rst:212 +#: ../../library/tkinter.rst:211 msgid ":mod:`tkinter.commondialog`" msgstr ":mod:`tkinter.commondialog`" @@ -396,7 +396,7 @@ msgstr ":mod:`tkinter.commondialog`" msgid "Base class for the dialogs defined in the other modules listed here." msgstr "" -#: ../../library/tkinter.rst:215 +#: ../../library/tkinter.rst:214 msgid ":mod:`tkinter.filedialog`" msgstr ":mod:`tkinter.filedialog`" @@ -404,7 +404,7 @@ msgstr ":mod:`tkinter.filedialog`" msgid "Common dialogs to allow the user to specify a file to open or save." msgstr "" -#: ../../library/tkinter.rst:218 +#: ../../library/tkinter.rst:217 msgid ":mod:`tkinter.font`" msgstr ":mod:`tkinter.font`" @@ -412,7 +412,7 @@ msgstr ":mod:`tkinter.font`" msgid "Utilities to help work with fonts." msgstr "" -#: ../../library/tkinter.rst:221 +#: ../../library/tkinter.rst:220 msgid ":mod:`tkinter.messagebox`" msgstr ":mod:`tkinter.messagebox`" @@ -420,7 +420,7 @@ msgstr ":mod:`tkinter.messagebox`" msgid "Access to standard Tk dialog boxes." msgstr "" -#: ../../library/tkinter.rst:224 +#: ../../library/tkinter.rst:223 msgid ":mod:`tkinter.scrolledtext`" msgstr ":mod:`tkinter.scrolledtext`" @@ -428,7 +428,7 @@ msgstr ":mod:`tkinter.scrolledtext`" msgid "Text widget with a vertical scroll bar built in." msgstr "" -#: ../../library/tkinter.rst:227 +#: ../../library/tkinter.rst:226 msgid ":mod:`tkinter.simpledialog`" msgstr ":mod:`tkinter.simpledialog`" @@ -436,7 +436,7 @@ msgstr ":mod:`tkinter.simpledialog`" msgid "Basic dialogs and convenience functions." msgstr "" -#: ../../library/tkinter.rst:231 +#: ../../library/tkinter.rst:229 msgid ":mod:`tkinter.ttk`" msgstr ":mod:`tkinter.ttk`" @@ -450,7 +450,7 @@ msgstr "" msgid "Additional modules:" msgstr "" -#: ../../library/tkinter.rst:243 +#: ../../library/tkinter.rst:238 msgid ":mod:`_tkinter`" msgstr ":mod:`_tkinter`" @@ -463,7 +463,7 @@ msgid "" "interpreter." msgstr "" -#: ../../library/tkinter.rst:247 +#: ../../library/tkinter.rst:245 msgid ":mod:`idlelib`" msgstr ":mod:`idlelib`" @@ -473,7 +473,7 @@ msgid "" "mod:`tkinter`." msgstr "" -#: ../../library/tkinter.rst:252 +#: ../../library/tkinter.rst:249 msgid ":mod:`tkinter.constants`" msgstr ":mod:`tkinter.constants`" @@ -484,7 +484,7 @@ msgid "" "`tkinter` module." msgstr "" -#: ../../library/tkinter.rst:256 +#: ../../library/tkinter.rst:254 msgid ":mod:`tkinter.dnd`" msgstr ":mod:`tkinter.dnd`" @@ -494,7 +494,7 @@ msgid "" "deprecated when it is replaced with the Tk DND." msgstr "" -#: ../../library/tkinter.rst:260 +#: ../../library/tkinter.rst:258 msgid ":mod:`tkinter.tix`" msgstr ":mod:`tkinter.tix`" @@ -504,7 +504,7 @@ msgid "" "widgets. Better alternatives for most can be found in :mod:`tkinter.ttk`." msgstr "" -#: ../../library/tkinter.rst:264 +#: ../../library/tkinter.rst:262 msgid ":mod:`turtle`" msgstr ":mod:`turtle`" @@ -586,7 +586,7 @@ msgstr "" msgid "Even this simple program illustrates the following key Tk concepts:" msgstr "" -#: ../../library/tkinter.rst:329 +#: ../../library/tkinter.rst:326 msgid "widgets" msgstr "" @@ -597,7 +597,7 @@ msgid "" "Frame`, :class:`ttk.Label`, and :class:`ttk.Button`." msgstr "" -#: ../../library/tkinter.rst:335 +#: ../../library/tkinter.rst:331 msgid "widget hierarchy" msgstr "" @@ -609,7 +609,7 @@ msgid "" "argument to the widget constructor." msgstr "" -#: ../../library/tkinter.rst:340 +#: ../../library/tkinter.rst:337 msgid "configuration options" msgstr "" @@ -620,7 +620,7 @@ msgid "" "classes of widgets will have different sets of options." msgstr "" -#: ../../library/tkinter.rst:345 +#: ../../library/tkinter.rst:342 msgid "geometry management" msgstr "" @@ -631,7 +631,7 @@ msgid "" "interface they are placed." msgstr "" -#: ../../library/tkinter.rst:351 +#: ../../library/tkinter.rst:347 msgid "event loop" msgstr "" @@ -925,15 +925,15 @@ msgid "" "can be set in three ways:" msgstr "" -#: ../../library/tkinter.rst:574 +#: ../../library/tkinter.rst:571 msgid "At object creation time, using keyword arguments" msgstr "" -#: ../../library/tkinter.rst:580 +#: ../../library/tkinter.rst:576 msgid "After object creation, treating the option name like a dictionary index" msgstr "" -#: ../../library/tkinter.rst:585 +#: ../../library/tkinter.rst:582 msgid "" "Use the config() method to update multiple attrs subsequent to object " "creation" @@ -1112,7 +1112,7 @@ msgid "" "take, see the man pages and page 183 of John Ousterhout's book." msgstr "" -#: ../../library/tkinter.rst:678 ../../library/tkinter.rst:798 +#: ../../library/tkinter.rst:677 ../../library/tkinter.rst:796 msgid "anchor" msgstr "" @@ -1121,7 +1121,7 @@ msgid "" "Anchor type. Denotes where the packer is to place each slave in its parcel." msgstr "" -#: ../../library/tkinter.rst:681 +#: ../../library/tkinter.rst:680 msgid "expand" msgstr "" @@ -1129,7 +1129,7 @@ msgstr "" msgid "Boolean, ``0`` or ``1``." msgstr "" -#: ../../library/tkinter.rst:684 +#: ../../library/tkinter.rst:683 msgid "fill" msgstr "" @@ -1137,7 +1137,7 @@ msgstr "" msgid "Legal values: ``'x'``, ``'y'``, ``'both'``, ``'none'``." msgstr "" -#: ../../library/tkinter.rst:687 +#: ../../library/tkinter.rst:686 msgid "ipadx and ipady" msgstr "" @@ -1146,7 +1146,7 @@ msgid "" "A distance - designating internal padding on each side of the slave widget." msgstr "" -#: ../../library/tkinter.rst:690 +#: ../../library/tkinter.rst:689 msgid "padx and pady" msgstr "" @@ -1155,7 +1155,7 @@ msgid "" "A distance - designating external padding on each side of the slave widget." msgstr "" -#: ../../library/tkinter.rst:694 +#: ../../library/tkinter.rst:692 msgid "side" msgstr "" @@ -1243,7 +1243,7 @@ msgid "" "``\"center\"``." msgstr "" -#: ../../library/tkinter.rst:804 +#: ../../library/tkinter.rst:800 msgid "bitmap" msgstr "" @@ -1255,7 +1255,7 @@ msgid "" "file, preceded with an ``@``, as in ``\"@/usr/contrib/bitmap/gumby.bit\"``." msgstr "" -#: ../../library/tkinter.rst:807 +#: ../../library/tkinter.rst:806 msgid "boolean" msgstr "" @@ -1263,7 +1263,7 @@ msgstr "" msgid "You can pass integers 0 or 1 or the strings ``\"yes\"`` or ``\"no\"``." msgstr "" -#: ../../library/tkinter.rst:814 +#: ../../library/tkinter.rst:809 msgid "callback" msgstr "" @@ -1271,7 +1271,7 @@ msgstr "" msgid "This is any Python function that takes no arguments. For example::" msgstr "" -#: ../../library/tkinter.rst:820 +#: ../../library/tkinter.rst:816 msgid "color" msgstr "" @@ -1284,7 +1284,7 @@ msgid "" "digit. See page 160 of Ousterhout's book for details." msgstr "" -#: ../../library/tkinter.rst:826 +#: ../../library/tkinter.rst:822 msgid "cursor" msgstr "" @@ -1296,7 +1296,7 @@ msgid "" "of your own. See page 179 of Ousterhout's book." msgstr "" -#: ../../library/tkinter.rst:833 +#: ../../library/tkinter.rst:828 msgid "distance" msgstr "" @@ -1309,7 +1309,7 @@ msgid "" "is expressed as ``\"3.5i\"``." msgstr "" -#: ../../library/tkinter.rst:838 +#: ../../library/tkinter.rst:835 msgid "font" msgstr "" @@ -1320,7 +1320,7 @@ msgid "" "are measured in pixels." msgstr "" -#: ../../library/tkinter.rst:843 +#: ../../library/tkinter.rst:840 msgid "geometry" msgstr "" @@ -1331,7 +1331,7 @@ msgid "" "text). For example: ``fred[\"geometry\"] = \"200x100\"``." msgstr "" -#: ../../library/tkinter.rst:847 +#: ../../library/tkinter.rst:845 msgid "justify" msgstr "" @@ -1341,7 +1341,7 @@ msgid "" "and ``\"fill\"``." msgstr "" -#: ../../library/tkinter.rst:852 +#: ../../library/tkinter.rst:849 msgid "region" msgstr "" @@ -1352,7 +1352,7 @@ msgid "" "2i\"`` and ``\"3c 2c 4c 10.43c\"`` are all legal regions." msgstr "" -#: ../../library/tkinter.rst:856 +#: ../../library/tkinter.rst:854 msgid "relief" msgstr "" @@ -1363,7 +1363,7 @@ msgid "" "``\"ridge\"``." msgstr "" -#: ../../library/tkinter.rst:860 +#: ../../library/tkinter.rst:858 msgid "scrollcommand" msgstr "" @@ -1373,7 +1373,7 @@ msgid "" "can be any widget method that takes a single argument." msgstr "" -#: ../../library/tkinter.rst:863 +#: ../../library/tkinter.rst:862 msgid "wrap" msgstr "" @@ -1396,7 +1396,7 @@ msgstr "" msgid "where:" msgstr "" -#: ../../library/tkinter.rst:885 +#: ../../library/tkinter.rst:882 msgid "sequence" msgstr "sequence(序列)" @@ -1407,7 +1407,7 @@ msgid "" "reference:`Tcl and the Tk Toolkit (2nd edition)`, for details)." msgstr "" -#: ../../library/tkinter.rst:890 +#: ../../library/tkinter.rst:887 msgid "func" msgstr "" @@ -1418,7 +1418,7 @@ msgid "" "deployed this way are commonly known as *callbacks*.)" msgstr "" -#: ../../library/tkinter.rst:896 +#: ../../library/tkinter.rst:892 msgid "add" msgstr "" @@ -1582,7 +1582,7 @@ msgid "" "characters in an Entry widget, or to particular menu items in a Menu widget." msgstr "" -#: ../../library/tkinter.rst:941 +#: ../../library/tkinter.rst:938 msgid "Entry widget indexes (index, view index, etc.)" msgstr "" @@ -1593,7 +1593,7 @@ msgid "" "special points in text widgets:" msgstr "" -#: ../../library/tkinter.rst:945 +#: ../../library/tkinter.rst:943 msgid "Text widget indexes" msgstr "" @@ -1603,7 +1603,7 @@ msgid "" "the Tk man pages." msgstr "" -#: ../../library/tkinter.rst:970 +#: ../../library/tkinter.rst:947 msgid "Menu indexes (menu.invoke(), menu.entryconfig(), etc.)" msgstr "" diff --git a/library/tkinter.tix.po b/library/tkinter.tix.po index bea609cd02..fdad2212a9 100644 --- a/library/tkinter.tix.po +++ b/library/tkinter.tix.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-10-01 14:35+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -54,7 +54,7 @@ msgid "" "match the special needs of your application and users." msgstr "" -#: ../../library/tkinter.tix.rst:38 +#: ../../library/tkinter.tix.rst:36 msgid "`Tix Homepage `_" msgstr "`Tix 首頁 `_" @@ -64,7 +64,7 @@ msgid "" "documentation and downloads." msgstr "" -#: ../../library/tkinter.tix.rst:41 +#: ../../library/tkinter.tix.rst:40 msgid "`Tix Man Pages `_" msgstr "`Tix 首頁 `_" @@ -72,7 +72,7 @@ msgstr "`Tix 首頁 `_" msgid "On-line version of the man pages and reference material." msgstr "" -#: ../../library/tkinter.tix.rst:44 +#: ../../library/tkinter.tix.rst:43 msgid "" "`Tix Programming Guide `_" @@ -84,7 +84,7 @@ msgstr "" msgid "On-line version of the programmer's reference material." msgstr "" -#: ../../library/tkinter.tix.rst:48 +#: ../../library/tkinter.tix.rst:46 msgid "" "`Tix Development Applications `_" diff --git a/library/tkinter.ttk.po b/library/tkinter.ttk.po index 2c4f870eb0..5971cf13e8 100644 --- a/library/tkinter.ttk.po +++ b/library/tkinter.ttk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-18 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -82,7 +82,7 @@ msgid "" "styling effects." msgstr "" -#: ../../library/tkinter.ttk.rst:60 +#: ../../library/tkinter.ttk.rst:59 msgid "" "`Converting existing applications to use Tile widgets `_" @@ -1517,7 +1517,7 @@ msgstr "*id*" msgid "Returns the column name. This is a read-only option." msgstr "回傳欄位名稱。這是唯讀選項。" -#: ../../library/tkinter.ttk.rst:992 +#: ../../library/tkinter.ttk.rst:991 msgid "*anchor*: One of the standard Tk anchor values." msgstr "" @@ -1527,7 +1527,7 @@ msgid "" "cell." msgstr "" -#: ../../library/tkinter.ttk.rst:996 +#: ../../library/tkinter.ttk.rst:994 msgid "*minwidth*: width" msgstr "" @@ -1538,7 +1538,7 @@ msgid "" "resized or the user drags a column." msgstr "" -#: ../../library/tkinter.ttk.rst:999 +#: ../../library/tkinter.ttk.rst:998 msgid "*stretch*: ``True``/``False``" msgstr "" @@ -1548,7 +1548,7 @@ msgid "" "resized." msgstr "" -#: ../../library/tkinter.ttk.rst:1002 +#: ../../library/tkinter.ttk.rst:1001 msgid "*width*: width" msgstr "" @@ -1619,7 +1619,7 @@ msgstr "" msgid "Specifies an image to display to the right of the column heading." msgstr "" -#: ../../library/tkinter.ttk.rst:1049 +#: ../../library/tkinter.ttk.rst:1048 msgid "*anchor*: anchor" msgstr "" @@ -1629,7 +1629,7 @@ msgid "" "anchor values." msgstr "" -#: ../../library/tkinter.ttk.rst:1052 +#: ../../library/tkinter.ttk.rst:1051 msgid "*command*: callback" msgstr "" @@ -1987,7 +1987,7 @@ msgid "" "following options:" msgstr "" -#: ../../library/tkinter.ttk.rst:1402 +#: ../../library/tkinter.ttk.rst:1400 msgid "border=padding" msgstr "border=padding" @@ -1997,7 +1997,7 @@ msgid "" "and bottom borders, respectively." msgstr "" -#: ../../library/tkinter.ttk.rst:1406 +#: ../../library/tkinter.ttk.rst:1404 msgid "height=height" msgstr "height=height" @@ -2007,7 +2007,7 @@ msgid "" "image's height is used as a default." msgstr "" -#: ../../library/tkinter.ttk.rst:1410 +#: ../../library/tkinter.ttk.rst:1408 msgid "padding=padding" msgstr "padding=padding" @@ -2017,7 +2017,7 @@ msgid "" "specified." msgstr "" -#: ../../library/tkinter.ttk.rst:1414 +#: ../../library/tkinter.ttk.rst:1412 msgid "sticky=spec" msgstr "sticky=spec" @@ -2027,7 +2027,7 @@ msgid "" "zero or more characters \"n\", \"s\", \"w\", or \"e\"." msgstr "" -#: ../../library/tkinter.ttk.rst:1418 +#: ../../library/tkinter.ttk.rst:1416 msgid "width=width" msgstr "width=width" @@ -2112,7 +2112,7 @@ msgid "" "each element is allocated a parcel." msgstr "" -#: ../../library/tkinter.ttk.rst:1525 +#: ../../library/tkinter.ttk.rst:1522 msgid "*side*: whichside" msgstr "" @@ -2122,7 +2122,7 @@ msgid "" "bottom or left. If omitted, the element occupies the entire cavity." msgstr "" -#: ../../library/tkinter.ttk.rst:1528 +#: ../../library/tkinter.ttk.rst:1527 msgid "*sticky*: nswe" msgstr "" @@ -2130,7 +2130,7 @@ msgstr "" msgid "Specifies where the element is placed inside its allocated parcel." msgstr "" -#: ../../library/tkinter.ttk.rst:1533 +#: ../../library/tkinter.ttk.rst:1530 msgid "*unit*: 0 or 1" msgstr "*unit*:0 或 1" @@ -2141,7 +2141,7 @@ msgid "" "used for things like scrollbar thumbs with grips." msgstr "" -#: ../../library/tkinter.ttk.rst:1538 +#: ../../library/tkinter.ttk.rst:1535 msgid "*children*: [sublayout... ]" msgstr "" diff --git a/library/tomllib.po b/library/tomllib.po index 949883e5f0..139050324c 100644 --- a/library/tomllib.po +++ b/library/tomllib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-19 13:45+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2022-11-18 01:56+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -37,24 +37,22 @@ msgstr "" #: ../../library/tomllib.rst:22 msgid "" -"The `Tomli-W package `__ is a TOML writer " -"that can be used in conjunction with this module, providing a write API " -"familiar to users of the standard library :mod:`marshal` and :mod:`pickle` " -"modules." +"The :pypi:`Tomli-W package ` is a TOML writer that can be used in " +"conjunction with this module, providing a write API familiar to users of the " +"standard library :mod:`marshal` and :mod:`pickle` modules." msgstr "" -"`Tomli-W 套件 `__\\ 是一個 TOML 編寫器,可" -"以與此模組結合使用,以提供標準函式庫中 :mod:`marshal` 和 :mod:`pickle` 模組之" -"使用者所熟悉的寫入 API。" +":pypi:`Tomli-W 套件 `\\ 是一個 TOML 編寫器,可以與此模組結合使用,以" +"提供標準函式庫中 :mod:`marshal` 和 :mod:`pickle` 模組之使用者所熟悉的寫入 " +"API。" #: ../../library/tomllib.rst:29 msgid "" -"The `TOML Kit package `__ is a style-" -"preserving TOML library with both read and write capability. It is a " -"recommended replacement for this module for editing already existing TOML " -"files." +"The :pypi:`TOML Kit package ` is a style-preserving TOML library " +"with both read and write capability. It is a recommended replacement for " +"this module for editing already existing TOML files." msgstr "" -"`TOML 工具套件 `__\\ 是一個保留風格且具有" -"讀寫能力的 TOML 函式庫。若要編輯已存在的 TOML 文件,建議用它來替換此模組。" +":pypi:`TOML 工具套件 `\\ 是一個保留風格且具有讀寫能力的 TOML 函式" +"庫。若要編輯已存在的 TOML 文件,建議用它來替換此模組。" #: ../../library/tomllib.rst:35 msgid "This module defines the following functions:" diff --git a/library/trace.po b/library/trace.po index f9a54b0c64..90ceeb8382 100644 --- a/library/trace.po +++ b/library/trace.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -34,7 +34,7 @@ msgid "" "program or from the command line." msgstr "" -#: ../../library/trace.rst:19 +#: ../../library/trace.rst:18 msgid "`Coverage.py `_" msgstr "`Coverage.py `_" diff --git a/library/traceback.po b/library/traceback.po index 5e78ce141c..6c9ce7c752 100644 --- a/library/traceback.po +++ b/library/traceback.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-15 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -43,7 +43,7 @@ msgid "" "instances." msgstr "" -#: ../../library/traceback.rst:27 +#: ../../library/traceback.rst:26 msgid "Module :mod:`faulthandler`" msgstr ":mod:`faulthandler` 模組" diff --git a/library/turtle.po b/library/turtle.po index 40346b1284..945ead6d14 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-15 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -122,7 +122,7 @@ msgid "" "Experiment with those commands, and also with ``backward()`` and ``right()``." msgstr "" -#: ../../library/turtle.rst:96 ../../library/turtle.rst:346 +#: ../../library/turtle.rst:96 ../../library/turtle.rst:325 #: ../../library/turtle.rst:1016 msgid "Pen control" msgstr "" @@ -349,11 +349,11 @@ msgstr "" msgid "Turtle methods" msgstr "" -#: ../../library/turtle.rst:323 ../../library/turtle.rst:433 +#: ../../library/turtle.rst:293 ../../library/turtle.rst:433 msgid "Turtle motion" msgstr "" -#: ../../library/turtle.rst:311 +#: ../../library/turtle.rst:294 msgid "Move and draw" msgstr "" @@ -425,7 +425,7 @@ msgstr ":func:`undo`" msgid ":func:`speed`" msgstr ":func:`speed`" -#: ../../library/turtle.rst:319 ../../library/turtle.rst:865 +#: ../../library/turtle.rst:313 ../../library/turtle.rst:865 msgid "Tell Turtle's state" msgstr "" @@ -453,7 +453,7 @@ msgstr ":func:`heading`" msgid ":func:`distance`" msgstr ":func:`distance`" -#: ../../library/turtle.rst:323 +#: ../../library/turtle.rst:321 msgid "Setting and measurement" msgstr "" @@ -465,7 +465,7 @@ msgstr ":func:`degrees`" msgid ":func:`radians`" msgstr ":func:`radians`" -#: ../../library/turtle.rst:331 ../../library/turtle.rst:1019 +#: ../../library/turtle.rst:326 ../../library/turtle.rst:1019 msgid "Drawing state" msgstr "" @@ -489,7 +489,7 @@ msgstr ":func:`pen`" msgid ":func:`isdown`" msgstr ":func:`isdown`" -#: ../../library/turtle.rst:336 ../../library/turtle.rst:1111 +#: ../../library/turtle.rst:333 ../../library/turtle.rst:1111 msgid "Color control" msgstr "" @@ -505,7 +505,7 @@ msgstr ":func:`pencolor`" msgid ":func:`fillcolor`" msgstr ":func:`fillcolor`" -#: ../../library/turtle.rst:341 ../../library/turtle.rst:1243 +#: ../../library/turtle.rst:338 ../../library/turtle.rst:1243 msgid "Filling" msgstr "" @@ -521,7 +521,7 @@ msgstr ":func:`begin_fill`" msgid ":func:`end_fill`" msgstr ":func:`end_fill`" -#: ../../library/turtle.rst:346 ../../library/turtle.rst:1290 +#: ../../library/turtle.rst:343 ../../library/turtle.rst:1290 msgid "More drawing control" msgstr "" @@ -537,11 +537,11 @@ msgstr ":func:`clear`" msgid ":func:`write`" msgstr ":func:`write`" -#: ../../library/turtle.rst:363 ../../library/turtle.rst:1336 +#: ../../library/turtle.rst:348 ../../library/turtle.rst:1336 msgid "Turtle state" msgstr "" -#: ../../library/turtle.rst:352 ../../library/turtle.rst:1339 +#: ../../library/turtle.rst:349 ../../library/turtle.rst:1339 msgid "Visibility" msgstr "" @@ -557,7 +557,7 @@ msgstr ":func:`hideturtle` | :func:`ht`" msgid ":func:`isvisible`" msgstr ":func:`isvisible`" -#: ../../library/turtle.rst:363 ../../library/turtle.rst:1378 +#: ../../library/turtle.rst:354 ../../library/turtle.rst:1378 msgid "Appearance" msgstr "" @@ -597,7 +597,7 @@ msgstr ":func:`shapetransform`" msgid ":func:`get_shapepoly`" msgstr ":func:`get_shapepoly`" -#: ../../library/turtle.rst:368 ../../library/turtle.rst:1583 +#: ../../library/turtle.rst:365 ../../library/turtle.rst:1583 msgid "Using events" msgstr "" @@ -613,7 +613,7 @@ msgstr ":func:`onrelease`" msgid ":func:`ondrag`" msgstr ":func:`ondrag`" -#: ../../library/turtle.rst:379 ../../library/turtle.rst:1657 +#: ../../library/turtle.rst:370 ../../library/turtle.rst:1657 msgid "Special Turtle methods" msgstr "" @@ -653,7 +653,7 @@ msgstr ":func:`undobufferentries`" msgid "Methods of TurtleScreen/Screen" msgstr "" -#: ../../library/turtle.rst:390 ../../library/turtle.rst:1811 +#: ../../library/turtle.rst:384 ../../library/turtle.rst:1811 msgid "Window control" msgstr "" @@ -681,7 +681,7 @@ msgstr ":func:`screensize`" msgid ":func:`setworldcoordinates`" msgstr ":func:`setworldcoordinates`" -#: ../../library/turtle.rst:395 ../../library/turtle.rst:1934 +#: ../../library/turtle.rst:392 ../../library/turtle.rst:1934 msgid "Animation control" msgstr "" @@ -697,7 +697,7 @@ msgstr ":func:`tracer`" msgid ":func:`update`" msgstr ":func:`update`" -#: ../../library/turtle.rst:403 ../../library/turtle.rst:1987 +#: ../../library/turtle.rst:397 ../../library/turtle.rst:1987 msgid "Using screen events" msgstr "" @@ -725,7 +725,7 @@ msgstr ":func:`ontimer`" msgid ":func:`mainloop` | :func:`done`" msgstr ":func:`mainloop` | :func:`done`" -#: ../../library/turtle.rst:413 ../../library/turtle.rst:2132 +#: ../../library/turtle.rst:405 ../../library/turtle.rst:2132 msgid "Settings and special methods" msgstr "" @@ -761,7 +761,7 @@ msgstr ":func:`window_height`" msgid ":func:`window_width`" msgstr ":func:`window_width`" -#: ../../library/turtle.rst:417 ../../library/turtle.rst:2096 +#: ../../library/turtle.rst:415 ../../library/turtle.rst:2096 msgid "Input methods" msgstr "" @@ -773,7 +773,7 @@ msgstr ":func:`textinput`" msgid ":func:`numinput`" msgstr ":func:`numinput`" -#: ../../library/turtle.rst:424 +#: ../../library/turtle.rst:419 msgid "Methods specific to Screen" msgstr "" @@ -1208,7 +1208,7 @@ msgstr "" msgid "Four input formats are allowed:" msgstr "" -#: ../../library/turtle.rst:1122 +#: ../../library/turtle.rst:1119 msgid "``pencolor()``" msgstr "``pencolor()``" @@ -1218,7 +1218,7 @@ msgid "" "example). May be used as input to another color/pencolor/fillcolor call." msgstr "" -#: ../../library/turtle.rst:1126 +#: ../../library/turtle.rst:1124 msgid "``pencolor(colorstring)``" msgstr "``pencolor(colorstring)``" @@ -1228,7 +1228,7 @@ msgid "" "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:1131 +#: ../../library/turtle.rst:1128 msgid "``pencolor((r, g, b))``" msgstr "``pencolor((r, g, b))``" @@ -1239,7 +1239,7 @@ msgid "" "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:1135 +#: ../../library/turtle.rst:1133 msgid "``pencolor(r, g, b)``" msgstr "``pencolor(r, g, b)``" @@ -1259,7 +1259,7 @@ msgstr "" msgid "Return or set the fillcolor." msgstr "" -#: ../../library/turtle.rst:1171 +#: ../../library/turtle.rst:1168 msgid "``fillcolor()``" msgstr "``fillcolor()``" @@ -1270,7 +1270,7 @@ msgid "" "fillcolor call." msgstr "" -#: ../../library/turtle.rst:1175 +#: ../../library/turtle.rst:1173 msgid "``fillcolor(colorstring)``" msgstr "``fillcolor(colorstring)``" @@ -1280,7 +1280,7 @@ msgid "" "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:1180 +#: ../../library/turtle.rst:1177 msgid "``fillcolor((r, g, b))``" msgstr "``fillcolor((r, g, b))``" @@ -1291,7 +1291,7 @@ msgid "" "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:1184 +#: ../../library/turtle.rst:1182 msgid "``fillcolor(r, g, b)``" msgstr "``fillcolor(r, g, b)``" @@ -1316,7 +1316,7 @@ msgid "" "Several input formats are allowed. They use 0 to 3 arguments as follows:" msgstr "" -#: ../../library/turtle.rst:1215 +#: ../../library/turtle.rst:1212 msgid "``color()``" msgstr "``color()``" @@ -1327,7 +1327,7 @@ msgid "" "`fillcolor`." msgstr "" -#: ../../library/turtle.rst:1219 +#: ../../library/turtle.rst:1217 msgid "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" msgstr "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" @@ -1337,7 +1337,7 @@ msgid "" "given value." msgstr "" -#: ../../library/turtle.rst:1223 +#: ../../library/turtle.rst:1221 msgid "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" msgstr "" diff --git a/library/types.po b/library/types.po index 2693c94041..16de87df19 100644 --- a/library/types.po +++ b/library/types.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -99,7 +99,7 @@ msgid "" "metaclass does not have a ``__prepare__`` method." msgstr "" -#: ../../library/types.rst:67 +#: ../../library/types.rst:66 msgid ":ref:`metaclasses`" msgstr ":ref:`metaclasses`" @@ -382,7 +382,7 @@ msgstr "" msgid "This type can now be subclassed." msgstr "" -#: ../../library/types.rst:351 +#: ../../library/types.rst:350 msgid ":ref:`Generic Alias Types`" msgstr "" diff --git a/library/typing.po b/library/typing.po index 379df25e8a..b2e4dd4921 100644 --- a/library/typing.po +++ b/library/typing.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-06 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2024-03-26 11:30+0800\n" "Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -36,47 +36,38 @@ msgstr "" "\\ :term:`型別檢查器 `、IDE、linter 等。" #: ../../library/typing.rst:26 -msgid "" -"This module provides runtime support for type hints. For the original " -"specification of the typing system, see :pep:`484`. For a simplified " -"introduction to type hints, see :pep:`483`." -msgstr "" -"這個模組提供可以支援型別提示的 runtime。關於加註型別系統的原有規格,請看 :" -"pep:`484`。關於型別提示的簡易介紹,請看 :pep:`483`。" +msgid "This module provides runtime support for type hints." +msgstr "此模組提供 runtime 型別提示支援。" -#: ../../library/typing.rst:31 -msgid "" -"The function below takes and returns a string and is annotated as follows::" -msgstr "以下函式接受及回傳都是使用字串,且註解方式如下: ::" +#: ../../library/typing.rst:28 +msgid "Consider the function below::" +msgstr "" -#: ../../library/typing.rst:36 +#: ../../library/typing.rst:33 msgid "" -"In the function ``greeting``, the argument ``name`` is expected to be of " -"type :class:`str` and the return type :class:`str`. Subtypes are accepted as " -"arguments." +"The function ``moon_weight`` takes an argument expected to be an instance " +"of :class:`float`, as indicated by the *type hint* ``earth_weight: float``. " +"The function is expected to return an instance of :class:`str`, as indicated " +"by the ``-> str`` hint." msgstr "" -"在函式 ``greeting`` 當中,引數 ``name`` 的型別應為 :class:`str` 且回傳的型別" -"也是 :class:`str`。該引數也可以接受其子型別。" -#: ../../library/typing.rst:40 +#: ../../library/typing.rst:37 msgid "" -"New features are frequently added to the ``typing`` module. The " -"`typing_extensions `_ package " -"provides backports of these new features to older versions of Python." +"While type hints can be simple classes like :class:`float` or :class:`str`, " +"they can also be more complex. The :mod:`typing` module provides a " +"vocabulary of more advanced type hints." msgstr "" -"新功能會頻繁的新增至 ``typing`` 模組中。`typing_extensions `_ 套件為這些新功能提供了 backport(向後移植的)版" -"本,提供給舊版本的 Python 使用。" -#: ../../library/typing.rst:44 +#: ../../library/typing.rst:41 msgid "" -"For a summary of deprecated features and a deprecation timeline, please see " -"`Deprecation Timeline of Major Features`_." +"New features are frequently added to the ``typing`` module. The :pypi:" +"`typing_extensions` package provides backports of these new features to " +"older versions of Python." msgstr "" -"棄用功能及其棄用時間線的簡介,請看\\ `Deprecation Timeline of Major " -"Features`_ \\。" +"新功能會頻繁的新增至 ``typing`` 模組中。:pypi:`typing_extensions` 套件為這些" +"新功能提供了 backport(向後移植的)版本,提供給舊版本的 Python 使用。" -#: ../../library/typing.rst:50 +#: ../../library/typing.rst:47 msgid "" "`\"Typing cheat sheet\" `_" @@ -84,11 +75,11 @@ msgstr "" "`\"型別小抄 (Typing cheat sheet)\" `_" -#: ../../library/typing.rst:50 +#: ../../library/typing.rst:48 msgid "A quick overview of type hints (hosted at the mypy docs)" msgstr "型別提示的快速預覽(發布於 mypy 的文件中)" -#: ../../library/typing.rst:55 +#: ../../library/typing.rst:50 msgid "" "\"Type System Reference\" section of `the mypy docs `_" @@ -96,7 +87,7 @@ msgstr "" "`mypy 文件 `_\\ 的 \"型別系" "統參考資料 (Type System Reference)\" 章節" -#: ../../library/typing.rst:53 +#: ../../library/typing.rst:51 msgid "" "The Python typing system is standardised via PEPs, so this reference should " "broadly apply to most Python type checkers. (Some parts may still be " @@ -105,14 +96,14 @@ msgstr "" "Python 的加註型別系統是基於 PEPs 進行標準化,所以這個參照 (reference) 應該在" "多數 Python 型別檢查器中廣為使用。(某些部分依然是特定給 mypy 使用。)" -#: ../../library/typing.rst:59 +#: ../../library/typing.rst:55 msgid "" "`\"Static Typing with Python\" `_" msgstr "" "`\"Python 的靜態型別 (Static Typing)\" `_" -#: ../../library/typing.rst:58 +#: ../../library/typing.rst:56 msgid "" "Type-checker-agnostic documentation written by the community detailing type " "system features, useful typing related tools and typing best practices." @@ -120,203 +111,22 @@ msgstr "" "由社群編寫的跨平台型別檢查器文件 (type-checker-agnostic) 詳細描述加註型別系統" "的功能、實用的加註型別衍伸工具、以及加註型別的最佳實踐 (best practice)。" -#: ../../library/typing.rst:65 -msgid "Relevant PEPs" -msgstr "相關的 PEPs" - -#: ../../library/typing.rst:67 -msgid "" -"Since the initial introduction of type hints in :pep:`484` and :pep:`483`, a " -"number of PEPs have modified and enhanced Python's framework for type " -"annotations:" -msgstr "" -"自從 :pep:`484` 及 :pep:`483` 對於型別提示的基礎引入,多個 PEPs 針對型別註釋" -"的 Python 框架進行修訂及加強:" - -#: ../../library/typing.rst:77 -msgid ":pep:`526`: Syntax for Variable Annotations" -msgstr ":pep:`526`:變數註釋的語法" - -#: ../../library/typing.rst:77 -msgid "" -"*Introducing* syntax for annotating variables outside of function " -"definitions, and :data:`ClassVar`" -msgstr "*引入*\\ 在定義函式之外的變數註釋語法,以及 :data:`ClassVar`" - -#: ../../library/typing.rst:80 -msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)" -msgstr "" -":pep:`544`: 協定:結構子型別 (Structural Subtyping) (靜態鴨子型別,Static " -"Duck Typing)" - -#: ../../library/typing.rst:80 -msgid "" -"*Introducing* :class:`Protocol` and the :func:" -"`@runtime_checkable` decorator" -msgstr "" -"*引入* :class:`Protocol` 以及 :func:`@runtime_checkable` " -"裝飾器 (decorator)" - -#: ../../library/typing.rst:83 -msgid ":pep:`585`: Type Hinting Generics In Standard Collections" -msgstr "" -":pep:`585`:基礎彙集 (collection) 中的型別提示泛型 (Type Hinting Generics In " -"Standard Collections)" - -#: ../../library/typing.rst:83 -msgid "" -"*Introducing* :class:`types.GenericAlias` and the ability to use standard " -"library classes as :ref:`generic types`" -msgstr "" -"*引入* :class:`types.GenericAlias` 以及使用基礎函式庫類別 :ref:`generic " -"types` 的能力" - -#: ../../library/typing.rst:85 -msgid ":pep:`586`: Literal Types" -msgstr ":pep:`586`:文字型別" - -#: ../../library/typing.rst:86 -msgid "*Introducing* :data:`Literal`" -msgstr "*引入* :data:`Literal`" - -#: ../../library/typing.rst:87 -msgid "" -":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys" -msgstr ":pep:`589`:TypedDict:含有一組固定 (fixed) 鍵值的型別提示字典" - -#: ../../library/typing.rst:88 -msgid "*Introducing* :class:`TypedDict`" -msgstr "*引入* :class:`TypedDict`" - -#: ../../library/typing.rst:89 -msgid ":pep:`591`: Adding a final qualifier to typing" -msgstr ":pep:`591`:為型別新增一個最終限定符 (final qualifier)" - -#: ../../library/typing.rst:90 -msgid "*Introducing* :data:`Final` and the :func:`@final` decorator" -msgstr "*引入* :data:`Final` 以及 :func:`@final` 裝飾器" - -#: ../../library/typing.rst:91 -msgid ":pep:`593`: Flexible function and variable annotations" -msgstr ":pep:`593`:彈性函式及變數註釋" - -#: ../../library/typing.rst:92 -msgid "*Introducing* :data:`Annotated`" -msgstr "*引入* :data:`Annotated`" - -#: ../../library/typing.rst:95 -msgid ":pep:`604`: Allow writing union types as ``X | Y``" -msgstr ":pep:`604`:允許寫入聯集型別 (union type) 為 ``X | Y``" - -#: ../../library/typing.rst:94 -msgid "" -"*Introducing* :data:`types.UnionType` and the ability to use the binary-or " -"operator ``|`` to signify a :ref:`union of types`" +#: ../../library/typing.rst:63 +msgid "Specification for the Python Type System" msgstr "" -"*引入* :data:`types.UnionType` 以及使用 binary-or 運算子 ``|`` 以表示\\ :ref:" -"`型別聯合 `\\ 的能力" - -#: ../../library/typing.rst:97 -msgid ":pep:`612`: Parameter Specification Variables" -msgstr ":pep:`612`:參數規格變數 (Parameter Specification Variable)" - -#: ../../library/typing.rst:98 -msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`" -msgstr "*引入* :class:`ParamSpec` 及 :data:`Concatenate`" - -#: ../../library/typing.rst:99 -msgid ":pep:`613`: Explicit Type Aliases" -msgstr ":pep:`613`:顯式型別別名 (Explicit Type Alias)" - -#: ../../library/typing.rst:100 -msgid "*Introducing* :data:`TypeAlias`" -msgstr "*引入* :data:`TypeAlias`" - -#: ../../library/typing.rst:101 -msgid ":pep:`646`: Variadic Generics" -msgstr ":pep:`646`:可變參數泛型 (Variadic Generic)" - -#: ../../library/typing.rst:102 -msgid "*Introducing* :data:`TypeVarTuple`" -msgstr "*引入* :data:`TypeVarTuple`" - -#: ../../library/typing.rst:103 -msgid ":pep:`647`: User-Defined Type Guards" -msgstr ":pep:`647`:使用者定義的型別防護 (Type Guard)" - -#: ../../library/typing.rst:104 -msgid "*Introducing* :data:`TypeGuard`" -msgstr "*引入* :data:`TypeGuard`" - -#: ../../library/typing.rst:105 -msgid "" -":pep:`655`: Marking individual TypedDict items as required or potentially " -"missing" -msgstr ":pep:`655`:標記個別的 TypedDict 物件為必需的或可能遺失的" - -#: ../../library/typing.rst:106 -msgid "*Introducing* :data:`Required` and :data:`NotRequired`" -msgstr "*引入* :data:`Required` 和 :data:`NotRequired`" - -#: ../../library/typing.rst:107 -msgid ":pep:`673`: Self type" -msgstr ":pep:`673`:Self 型別" - -#: ../../library/typing.rst:108 -msgid "*Introducing* :data:`Self`" -msgstr "*引入* :data:`Self`" - -#: ../../library/typing.rst:109 -msgid ":pep:`675`: Arbitrary Literal String Type" -msgstr ":pep:`675`:任意的文本字串型別 (Arbitrary Literal String Type)" - -#: ../../library/typing.rst:110 -msgid "*Introducing* :data:`LiteralString`" -msgstr "*引入* :data:`LiteralString`" -#: ../../library/typing.rst:111 -msgid ":pep:`681`: Data Class Transforms" -msgstr ":pep:`681`:資料類別轉換" - -#: ../../library/typing.rst:112 -msgid "" -"*Introducing* the :func:`@dataclass_transform` decorator" -msgstr "*引入* :func:`@dataclass_transform` 裝飾器" - -#: ../../library/typing.rst:114 -msgid ":pep:`692`: Using ``TypedDict`` for more precise ``**kwargs`` typing" -msgstr ":pep:`692`:為更精準的 ``**kwargs`` 型別使用 ``TypedDict``" - -#: ../../library/typing.rst:114 +#: ../../library/typing.rst:65 msgid "" -"*Introducing* a new way of typing ``**kwargs`` with :data:`Unpack` and :data:" -"`TypedDict`" +"The canonical, up-to-date specification of the Python type system can be " +"found at `\"Specification for the Python type system\" `_." msgstr "" -"*引入* 型別 ``**kwargs`` 的新方式 :data:`Unpack` 以及 :data:`TypedDict`" - -#: ../../library/typing.rst:116 -msgid ":pep:`695`: Type Parameter Syntax" -msgstr ":pep:`695`:型別參數語法" - -#: ../../library/typing.rst:117 -msgid "" -"*Introducing* builtin syntax for creating generic functions, classes, and " -"type aliases." -msgstr "*引入*\\ 建立泛型函式、類別、型別別名的內建語法。" -#: ../../library/typing.rst:119 -msgid ":pep:`698`: Adding an override decorator to typing" -msgstr ":pep:`698`:為型別新增可覆寫的裝飾器" - -#: ../../library/typing.rst:119 -msgid "*Introducing* the :func:`@override` decorator" -msgstr "*引入* :func:`@override` 裝飾器" - -#: ../../library/typing.rst:129 +#: ../../library/typing.rst:71 msgid "Type aliases" msgstr "型別別名" -#: ../../library/typing.rst:131 +#: ../../library/typing.rst:73 msgid "" "A type alias is defined using the :keyword:`type` statement, which creates " "an instance of :class:`TypeAliasType`. In this example, ``Vector`` and " @@ -326,7 +136,7 @@ msgstr "" "`TypeAliasType` 的實例。在這個範例中,``Vector`` 及 ``list[float]`` 會被當作" "和靜態型別檢查器一樣同等對待: ::" -#: ../../library/typing.rst:144 +#: ../../library/typing.rst:86 msgid "" "Type aliases are useful for simplifying complex type signatures. For " "example::" @@ -334,7 +144,7 @@ msgstr "" "型別別名對於簡化複雜的型別簽名 (complex type signature) 非常好用。舉例來" "說: ::" -#: ../../library/typing.rst:162 +#: ../../library/typing.rst:104 msgid "" "The :keyword:`type` statement is new in Python 3.12. For backwards " "compatibility, type aliases can also be created through simple assignment::" @@ -342,7 +152,7 @@ msgstr "" ":keyword:`type` 陳述式是 Python 3.12 的新功能。為了向後相容性,型別別名可以透" "過簡單的賦值來建立: ::" -#: ../../library/typing.rst:167 +#: ../../library/typing.rst:109 msgid "" "Or marked with :data:`TypeAlias` to make it explicit that this is a type " "alias, not a normal variable assignment::" @@ -350,15 +160,15 @@ msgstr "" "或是用 :data:`TypeAlias` 標記,讓它明確的表示這是一個型別別名,而非一般的變數" "賦值: ::" -#: ../../library/typing.rst:177 +#: ../../library/typing.rst:119 msgid "NewType" msgstr "NewType" -#: ../../library/typing.rst:179 +#: ../../library/typing.rst:121 msgid "Use the :class:`NewType` helper to create distinct types::" msgstr "使用 :class:`NewType` 輔助工具 (helper) 建立獨特型別: ::" -#: ../../library/typing.rst:186 +#: ../../library/typing.rst:128 msgid "" "The static type checker will treat the new type as if it were a subclass of " "the original type. This is useful in helping catch logical errors::" @@ -366,7 +176,7 @@ msgstr "" "若它是原本型別的子類別,靜態型別檢查器會將其視為一個新的型別。這對於幫助擷取" "邏輯性錯誤非常有用: ::" -#: ../../library/typing.rst:198 +#: ../../library/typing.rst:140 msgid "" "You may still perform all ``int`` operations on a variable of type " "``UserId``, but the result will always be of type ``int``. This lets you " @@ -377,7 +187,7 @@ msgstr "" "預期接受 ``int`` 的地方傳遞一個 ``UserId``,還能預防你意外使用無效的方法建立" "一個 ``UserId``: ::" -#: ../../library/typing.rst:206 +#: ../../library/typing.rst:148 msgid "" "Note that these checks are enforced only by the static type checker. At " "runtime, the statement ``Derived = NewType('Derived', Base)`` will make " @@ -390,7 +200,7 @@ msgstr "" "呼叫物件),會立即回傳任何你傳遞的引數。這意味著 expression (運算式)\\ " "``Derived(some_value)`` 不會建立一個新的類別或過度引入原有的函式呼叫。" -#: ../../library/typing.rst:212 +#: ../../library/typing.rst:154 msgid "" "More precisely, the expression ``some_value is Derived(some_value)`` is " "always true at runtime." @@ -398,26 +208,26 @@ msgstr "" "更精確地說,expression ``some_value is Derived(some_value)`` 在 runtime 永遠" "為 true。" -#: ../../library/typing.rst:215 +#: ../../library/typing.rst:157 msgid "It is invalid to create a subtype of ``Derived``::" msgstr "這會無法建立一個 ``Derived`` 的子型別: ::" -#: ../../library/typing.rst:224 +#: ../../library/typing.rst:166 msgid "" "However, it is possible to create a :class:`NewType` based on a 'derived' " "``NewType``::" msgstr "" "無論如何,這有辦法基於 '衍生的' ``NewType`` 建立一個 :class:`NewType`: ::" -#: ../../library/typing.rst:232 +#: ../../library/typing.rst:174 msgid "and typechecking for ``ProUserId`` will work as expected." msgstr "以及針對 ``ProUserId`` 的型別檢查會如期運作。" -#: ../../library/typing.rst:234 +#: ../../library/typing.rst:176 msgid "See :pep:`484` for more details." msgstr "更多細節請見 :pep:`484`\\ 。" -#: ../../library/typing.rst:238 +#: ../../library/typing.rst:180 msgid "" "Recall that the use of a type alias declares two types to be *equivalent* to " "one another. Doing ``type Alias = Original`` will make the static type " @@ -428,7 +238,7 @@ msgstr "" "Original`` 則會讓靜態型別檢查器在任何情況之下將 ``Alias`` 視為與 " "``Original`` \\ *完全相等*\\ 。這當你想把複雜的型別簽名進行簡化時,非常好用。" -#: ../../library/typing.rst:243 +#: ../../library/typing.rst:185 msgid "" "In contrast, ``NewType`` declares one type to be a *subtype* of another. " "Doing ``Derived = NewType('Derived', Original)`` will make the static type " @@ -443,7 +253,7 @@ msgstr "" "預期接收到型別 ``Derived`` 的值的區域。這當你想用最小的 runtime 成本預防邏輯" "性錯誤而言,非常有用。" -#: ../../library/typing.rst:252 +#: ../../library/typing.rst:194 msgid "" "``NewType`` is now a class rather than a function. As a result, there is " "some additional runtime cost when calling ``NewType`` over a regular " @@ -452,17 +262,17 @@ msgstr "" "現在的 ``NewType`` 比起一個函式更像一個類別。因此,比起一般的函式,呼叫 " "``NewType`` 需要額外的 runtime 成本。" -#: ../../library/typing.rst:257 +#: ../../library/typing.rst:199 msgid "" "The performance of calling ``NewType`` has been restored to its level in " "Python 3.9." msgstr "呼叫 ``NewType`` 的效能已經恢復與 Python 3.9 相同的水準。" -#: ../../library/typing.rst:264 +#: ../../library/typing.rst:206 msgid "Annotating callable objects" msgstr "註釋 callable 物件" -#: ../../library/typing.rst:266 +#: ../../library/typing.rst:208 msgid "" "Functions -- or other :term:`callable` objects -- can be annotated using :" "class:`collections.abc.Callable` or :data:`typing.Callable`. " @@ -473,12 +283,12 @@ msgstr "" "Callable` 或 :data:`typing.Callable` 進行註釋。 ``Callable[[int], str]`` 象徵" "為一個函式,可以接受一個型別為 :class:`int` 的引數,並回傳一個 :class:`str`。" -#: ../../library/typing.rst:271 ../../library/typing.rst:2889 -#: ../../library/typing.rst:3031 +#: ../../library/typing.rst:213 ../../library/typing.rst:2831 +#: ../../library/typing.rst:2973 msgid "For example:" msgstr "舉例來說:" -#: ../../library/typing.rst:289 +#: ../../library/typing.rst:231 msgid "" "The subscription syntax must always be used with exactly two values: the " "argument list and the return type. The argument list must be a list of " @@ -489,7 +299,7 @@ msgstr "" "傳類別。引數串列必須為一個型別串列::class:`ParamSpec`、:data:`Concatenate` " "或是一個刪節號 (ellipsis)。回傳類別必為一個單一類別。" -#: ../../library/typing.rst:294 +#: ../../library/typing.rst:236 msgid "" "If a literal ellipsis ``...`` is given as the argument list, it indicates " "that a callable with any arbitrary parameter list would be acceptable:" @@ -497,7 +307,7 @@ msgstr "" "若刪節號文字 ``...`` 被當作引數串列給定,其指出一個具任何、任意參數列表的 " "callable 會被接受: ::" -#: ../../library/typing.rst:306 +#: ../../library/typing.rst:248 msgid "" "``Callable`` cannot express complex signatures such as functions that take a " "variadic number of arguments, :ref:`overloaded functions `, or " @@ -510,7 +320,7 @@ msgstr "" "過定義一個具有 :meth:`~object.__call__` 方法的 :class:`Protocol` 類別進行表" "示:" -#: ../../library/typing.rst:333 +#: ../../library/typing.rst:275 msgid "" "Callables which take other callables as arguments may indicate that their " "parameter types are dependent on each other using :class:`ParamSpec`. " @@ -527,7 +337,7 @@ msgstr "" "``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " "ReturnType]`` 的形式。" -#: ../../library/typing.rst:341 ../../library/typing.rst:3557 +#: ../../library/typing.rst:283 ../../library/typing.rst:3499 msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." @@ -535,7 +345,7 @@ msgstr "" "``Callable`` 現已支援 :class:`ParamSpec` 以及 :data:`Concatenate`。請參閱 :" "pep:`612` 閱讀詳細內容。" -#: ../../library/typing.rst:346 +#: ../../library/typing.rst:288 msgid "" "The documentation for :class:`ParamSpec` and :class:`Concatenate` provides " "examples of usage in ``Callable``." @@ -543,11 +353,11 @@ msgstr "" ":class:`ParamSpec` 以及 :class:`Concatenate` 的文件中,提供範例如何在 " "``Callable`` 中使用。" -#: ../../library/typing.rst:352 +#: ../../library/typing.rst:294 msgid "Generics" msgstr "泛型" -#: ../../library/typing.rst:354 +#: ../../library/typing.rst:296 msgid "" "Since type information about objects kept in containers cannot be statically " "inferred in a generic way, many container classes in the standard library " @@ -557,7 +367,7 @@ msgstr "" "(statically inferred),許多標準函式庫的容器類別支援以下標來表示容器內預期的元" "素。" -#: ../../library/typing.rst:371 +#: ../../library/typing.rst:313 msgid "" "Generic functions and classes can be parameterized by using :ref:`type " "parameter syntax `::" @@ -565,19 +375,19 @@ msgstr "" "泛型函式及類別可以使用\\ :ref:`型別參數語法 (type parameter syntax) ` 進行參數化 (parameterize) : ::" -#: ../../library/typing.rst:379 +#: ../../library/typing.rst:321 msgid "Or by using the :class:`TypeVar` factory directly::" msgstr "或是直接使用 :class:`TypeVar` 工廠 (factory): ::" -#: ../../library/typing.rst:389 +#: ../../library/typing.rst:331 msgid "Syntactic support for generics is new in Python 3.12." msgstr "在 Python 3.12 中,泛型的語法支援是全新功能。" -#: ../../library/typing.rst:395 +#: ../../library/typing.rst:337 msgid "Annotating tuples" msgstr "註釋元組 (tuple)" -#: ../../library/typing.rst:397 +#: ../../library/typing.rst:339 msgid "" "For most containers in Python, the typing system assumes that all elements " "in the container will be of the same type. For example::" @@ -585,7 +395,7 @@ msgstr "" "在 Python 大多數的容器當中,加註型別系統認為容器內的所有元素會是相同型別。舉" "例來說: ::" -#: ../../library/typing.rst:412 +#: ../../library/typing.rst:354 msgid "" ":class:`list` only accepts one type argument, so a type checker would emit " "an error on the ``y`` assignment above. Similarly, :class:`~collections.abc." @@ -597,7 +407,7 @@ msgstr "" "個型別引數:第一個引數指出 keys(鍵)的型別;第二個引數指出 values(值)的型" "別。" -#: ../../library/typing.rst:418 +#: ../../library/typing.rst:360 msgid "" "Unlike most other Python containers, however, it is common in idiomatic " "Python code for tuples to have elements which are not all of the same type. " @@ -609,7 +419,7 @@ msgstr "" "統中是個特例 (special-cased)。:class:`tuple` 接受\\ *任何數量*\\ 的型別引" "數: ::" -#: ../../library/typing.rst:434 +#: ../../library/typing.rst:376 msgid "" "To denote a tuple which could be of *any* length, and in which all elements " "are of the same type ``T``, use ``tuple[T, ...]``. To denote an empty tuple, " @@ -620,11 +430,11 @@ msgstr "" "``tuple[T, ...]`` 進行標示。為了標示一個空元組,請使用 ``tuple[()]``。單純使" "用 ``tuple`` 作為註釋,會與使用 ``tuple[Any, ...]`` 是相等的: ::" -#: ../../library/typing.rst:457 +#: ../../library/typing.rst:399 msgid "The type of class objects" msgstr "類別物件的型別" -#: ../../library/typing.rst:459 +#: ../../library/typing.rst:401 msgid "" "A variable annotated with ``C`` may accept a value of type ``C``. In " "contrast, a variable annotated with ``type[C]`` (or :class:`typing.Type[C] " @@ -635,11 +445,11 @@ msgstr "" "為 ``type[C]`` \\ (或 :class:`typing.Type[C] `)\\ 可以接受本身為該類" "別的值 -- 具體來說,他可能會接受 ``C`` 的\\ *類別物件*\\。舉例來說: ::" -#: ../../library/typing.rst:469 +#: ../../library/typing.rst:411 msgid "Note that ``type[C]`` is covariant::" msgstr "請記得 ``type[C]`` 是共變 (covariant) 的: ::" -#: ../../library/typing.rst:485 +#: ../../library/typing.rst:427 msgid "" "The only legal parameters for :class:`type` are classes, :data:`Any`, :ref:" "`type variables `, and unions of any of these types. For example::" @@ -647,7 +457,7 @@ msgstr "" ":class:`type` 僅有的合法參數是類別、:data:`Any`、:ref:`型別變數 " "`\\ 以及這些型別任意組合成的聯集。舉例來說: ::" -#: ../../library/typing.rst:497 +#: ../../library/typing.rst:439 msgid "" "``type[Any]`` is equivalent to :class:`type`, which is the root of Python's :" "ref:`metaclass hierarchy `." @@ -655,15 +465,15 @@ msgstr "" "``type[Any]`` 等價於 :class:`type` ,其為 Python :ref:`metaclass 階層結構 " "(hierachy) `。" -#: ../../library/typing.rst:503 +#: ../../library/typing.rst:445 msgid "User-defined generic types" msgstr "使用者定義泛型型別" -#: ../../library/typing.rst:505 +#: ../../library/typing.rst:447 msgid "A user-defined class can be defined as a generic class." msgstr "一個使用者定義的類別可以被定義成一個泛型類別。" -#: ../../library/typing.rst:528 +#: ../../library/typing.rst:470 msgid "" "This syntax indicates that the class ``LoggedVar`` is parameterised around a " "single :ref:`type variable ` ``T`` . This also makes ``T`` valid as " @@ -672,7 +482,7 @@ msgstr "" "這個語法指出類別 ``LoggedVar`` 透過一個單一的 :ref:`型別變數 ` " "``T`` 進行參數化 (parameterised)。這使得 ``T`` 在類別中有效的成為型別。" -#: ../../library/typing.rst:532 +#: ../../library/typing.rst:474 msgid "" "Generic classes implicitly inherit from :class:`Generic`. For compatibility " "with Python 3.11 and lower, it is also possible to inherit explicitly from :" @@ -681,7 +491,7 @@ msgstr "" "泛型類別隱性繼承了 :class:`Generic`。為了相容 Python 3.11 及更早版本,也可以" "明確的繼承 :class:`Generic` 並指出是一個泛型類別: ::" -#: ../../library/typing.rst:543 +#: ../../library/typing.rst:485 msgid "" "Generic classes have :meth:`~object.__class_getitem__` methods, meaning they " "can be parameterised at runtime (e.g. ``LoggedVar[int]`` below)::" @@ -689,7 +499,7 @@ msgstr "" "泛型類別有 :meth:`~object.__class_getitem__` 方法,其意味著可以在 runtime 進" "行參數化(如下述的 ``LoggedVar[int]``): ::" -#: ../../library/typing.rst:552 +#: ../../library/typing.rst:494 msgid "" "A generic type can have any number of type variables. All varieties of :" "class:`TypeVar` are permissible as parameters for a generic type::" @@ -697,26 +507,26 @@ msgstr "" "一個泛型型別可以有任意數量的型別變數。所有種類的 :class:`TypeVar` 都可以作為" "泛型型別的參數: ::" -#: ../../library/typing.rst:567 +#: ../../library/typing.rst:509 msgid "" "Each type variable argument to :class:`Generic` must be distinct. This is " "thus invalid::" msgstr ":class:`Generic` 的每個型別變數引數必不相同。因此以下是無效的: ::" -#: ../../library/typing.rst:581 +#: ../../library/typing.rst:523 msgid "Generic classes can also inherit from other classes::" msgstr "泛型類別亦可以繼承其他類別: ::" -#: ../../library/typing.rst:588 +#: ../../library/typing.rst:530 msgid "" "When inheriting from generic classes, some type parameters could be fixed::" msgstr "當繼承泛型類別時,部份的型別參數可固定: ::" -#: ../../library/typing.rst:595 +#: ../../library/typing.rst:537 msgid "In this case ``MyDict`` has a single parameter, ``T``." msgstr "在這種情況下 ``MyDict`` 有一個單一的參數 ``T``。" -#: ../../library/typing.rst:597 +#: ../../library/typing.rst:539 msgid "" "Using a generic class without specifying type parameters assumes :data:`Any` " "for each position. In the following example, ``MyIterable`` is not generic " @@ -725,21 +535,21 @@ msgstr "" "若使用泛型類別卻沒有特指型別參數,則會將每個位置視為 :data:`Any`。在下列的範" "例中 ``MyIterable`` 不是泛型,但隱性繼承了 ``Iterable[Any]``: ::" -#: ../../library/typing.rst:608 +#: ../../library/typing.rst:550 msgid "User-defined generic type aliases are also supported. Examples::" msgstr "使用者定義的泛型型別別名也有支援。例如: ::" -#: ../../library/typing.rst:623 +#: ../../library/typing.rst:565 msgid "" "For backward compatibility, generic type aliases can also be created through " "a simple assignment::" msgstr "為了向後相容性,泛型型別別名可以透過簡單的賦值來建立: ::" -#: ../../library/typing.rst:632 +#: ../../library/typing.rst:574 msgid ":class:`Generic` no longer has a custom metaclass." msgstr ":class:`Generic` 不再是一個自訂的 metaclass。" -#: ../../library/typing.rst:635 +#: ../../library/typing.rst:577 msgid "" "Syntactic support for generics and type aliases is new in version 3.12. " "Previously, generic classes had to explicitly inherit from :class:`Generic` " @@ -748,7 +558,7 @@ msgstr "" "在版本 3.12 新增了泛型及型別別名的語法支援。在之前的版本中,泛型類別必須顯性" "繼承 :class:`Generic` 或是包含一個型別變數在基底類別 (base) 當中。" -#: ../../library/typing.rst:640 +#: ../../library/typing.rst:582 msgid "" "User-defined generics for parameter expressions are also supported via " "parameter specification variables in the form ``[**P]``. The behavior is " @@ -762,7 +572,7 @@ msgstr "" "別模組視為一個特定的型別變數。對此,其中一個例外是一個型別列表可以替代 :" "class:`ParamSpec`: ::" -#: ../../library/typing.rst:651 +#: ../../library/typing.rst:593 msgid "" "Classes generic over a :class:`ParamSpec` can also be created using explicit " "inheritance from :class:`Generic`. In this case, ``**`` is not used::" @@ -770,7 +580,7 @@ msgstr "" "具有 :class:`ParamSpec` 的泛型類別可以透過顯性繼承 :class:`Generic` 進行建" "立。在這種情況下,不需要使用 ``**``: ::" -#: ../../library/typing.rst:661 +#: ../../library/typing.rst:603 msgid "" "Another difference between :class:`TypeVar` and :class:`ParamSpec` is that a " "generic with only one parameter specification variable will accept parameter " @@ -783,7 +593,7 @@ msgstr "" "``X[Type1, Type2, ...]`` 的參數列表。在內部中,後者會被轉換為前者,所以在下方" "的範例中為相等的: ::" -#: ../../library/typing.rst:674 +#: ../../library/typing.rst:616 msgid "" "Note that generics with :class:`ParamSpec` may not have correct " "``__parameters__`` after substitution in some cases because they are " @@ -792,7 +602,7 @@ msgstr "" "請記得,具有 :class:`ParamSpec` 的泛型在某些情況下替換之後可能不會有正確的 " "``__parameters__``,因為參數規格主要還是用於靜態型別檢查。" -#: ../../library/typing.rst:678 +#: ../../library/typing.rst:620 msgid "" ":class:`Generic` can now be parameterized over parameter expressions. See :" "class:`ParamSpec` and :pep:`612` for more details." @@ -800,7 +610,7 @@ msgstr "" ":class:`Generic` 現在可以透過參數運算式來進行參數化。詳細內容請見 :class:" "`ParamSpec` 以及 :pep:`612`。" -#: ../../library/typing.rst:682 +#: ../../library/typing.rst:624 msgid "" "A user-defined generic class can have ABCs as base classes without a " "metaclass conflict. Generic metaclasses are not supported. The outcome of " @@ -811,11 +621,11 @@ msgstr "" "突。泛型的 metaclass 則不支援。參數化泛型的輸出將被存為快取,而在型別模組中多" "數的型別皆為 :term:`hashable` 且可以比較相等性。" -#: ../../library/typing.rst:689 +#: ../../library/typing.rst:631 msgid "The :data:`Any` type" msgstr ":data:`Any` 型別" -#: ../../library/typing.rst:691 +#: ../../library/typing.rst:633 msgid "" "A special kind of type is :data:`Any`. A static type checker will treat " "every type as being compatible with :data:`Any` and :data:`Any` as being " @@ -824,7 +634,7 @@ msgstr "" ":data:`Any` 是一種特別的型別。一個靜態型別檢查器會將每個型別視為可相容於 :" "data:`Any` 且 :data:`Any` 也可以相容於每個型別。" -#: ../../library/typing.rst:695 +#: ../../library/typing.rst:637 msgid "" "This means that it is possible to perform any operation or method call on a " "value of type :data:`Any` and assign it to any variable::" @@ -832,7 +642,7 @@ msgstr "" "這意味著如果在一個為 :data:`Any` 的值上執行任何操作或呼叫方法是可行的,且可以" "賦值給任意變數: ::" -#: ../../library/typing.rst:713 +#: ../../library/typing.rst:655 msgid "" "Notice that no type checking is performed when assigning a value of type :" "data:`Any` to a more precise type. For example, the static type checker did " @@ -844,13 +654,13 @@ msgstr "" "舉例來說,靜態型別檢查器不會在 runtime 中,將 ``a`` 賦值給 ``s`` 的情況下回報" "錯誤,儘管 ``s`` 是被宣告為型別 :class:`str` 卻接收到 :class:`int` 的值!" -#: ../../library/typing.rst:719 +#: ../../library/typing.rst:661 msgid "" "Furthermore, all functions without a return type or parameter types will " "implicitly default to using :data:`Any`::" msgstr "另外,所有缺少回傳型別或參數型別的函式將會隱性預設為 :data:`Any`: ::" -#: ../../library/typing.rst:732 +#: ../../library/typing.rst:674 msgid "" "This behavior allows :data:`Any` to be used as an *escape hatch* when you " "need to mix dynamically and statically typed code." @@ -858,7 +668,7 @@ msgstr "" "當你需要混和動態及靜態的型別程式碼,這個行為允許 :data:`Any` 被當作一個\\ *緊" "急出口 (escape hatch)*\\使用。" -#: ../../library/typing.rst:735 +#: ../../library/typing.rst:677 msgid "" "Contrast the behavior of :data:`Any` with the behavior of :class:`object`. " "Similar to :data:`Any`, every type is a subtype of :class:`object`. However, " @@ -869,7 +679,7 @@ msgstr "" "別會作為 :class:`object` 的子型別。然而,不像 :data:`Any`,反之不亦然::" "class:`object` 並\\ *不是*\\一個其他型別的子型別。" -#: ../../library/typing.rst:740 +#: ../../library/typing.rst:682 msgid "" "That means when the type of a value is :class:`object`, a type checker will " "reject almost all operations on it, and assigning it to a variable (or using " @@ -880,7 +690,7 @@ msgstr "" "並將賦予這個值到一個特定型別變數(或是當作回傳值使用)視為一個型別錯誤。舉例" "來說: ::" -#: ../../library/typing.rst:762 +#: ../../library/typing.rst:704 msgid "" "Use :class:`object` to indicate that a value could be any type in a typesafe " "manner. Use :data:`Any` to indicate that a value is dynamically typed." @@ -888,11 +698,11 @@ msgstr "" "使用 :class:`object` ,將指出在型別安全 (typesafe) 的習慣之下一個值可以為任意" "型別。使用 :data:`Any`,將指出這個值是個動態型別。" -#: ../../library/typing.rst:767 +#: ../../library/typing.rst:709 msgid "Nominal vs structural subtyping" msgstr "標稱 (nominal) 子型別 vs 結構子型別" -#: ../../library/typing.rst:769 +#: ../../library/typing.rst:711 msgid "" "Initially :pep:`484` defined the Python static type system as using *nominal " "subtyping*. This means that a class ``A`` is allowed where a class ``B`` is " @@ -901,7 +711,7 @@ msgstr "" "最初 :pep:`484` 定義 Python 靜態型別系統使用\\ *標稱子型別*。這意味著只有 " "``A`` 為 ``B`` 的子類別時,``A`` 才被允許使用在預期是類別 ``B`` 出現的地方。" -#: ../../library/typing.rst:773 +#: ../../library/typing.rst:715 msgid "" "This requirement previously also applied to abstract base classes, such as :" "class:`~collections.abc.Iterable`. The problem with this approach is that a " @@ -914,7 +724,7 @@ msgstr "" "格,也不像一個常見的慣用動態型別 Python 程式碼。舉例來說,下列程式碼符合 :" "pep:`484`: ::" -#: ../../library/typing.rst:786 +#: ../../library/typing.rst:728 msgid "" ":pep:`544` allows to solve this problem by allowing users to write the above " "code without explicit base classes in the class definition, allowing " @@ -927,7 +737,7 @@ msgstr "" "``Iterable[int]`` 兩者的子型別。這就是眾所周知的\\ *結構子型別*\\ (或是靜態" "鴨子型別): ::" -#: ../../library/typing.rst:802 +#: ../../library/typing.rst:744 msgid "" "Moreover, by subclassing a special class :class:`Protocol`, a user can " "define new custom protocols to fully enjoy structural subtyping (see " @@ -936,43 +746,43 @@ msgstr "" "而且,基於一個特別的型別 :class:`Protocol` 建立子型別時,使用者可以定義新的" "協定並充份發揮結構子型別的優勢(請見下方範例)。" -#: ../../library/typing.rst:807 +#: ../../library/typing.rst:749 msgid "Module contents" msgstr "模組內容" -#: ../../library/typing.rst:809 +#: ../../library/typing.rst:751 msgid "" "The ``typing`` module defines the following classes, functions and " "decorators." msgstr "模組 ``typing`` 定義了下列的類別、函式以及裝飾器。" -#: ../../library/typing.rst:812 +#: ../../library/typing.rst:754 msgid "Special typing primitives" msgstr "特別型別原語 (primitive)" -#: ../../library/typing.rst:815 +#: ../../library/typing.rst:757 msgid "Special types" msgstr "特別型別" -#: ../../library/typing.rst:817 +#: ../../library/typing.rst:759 msgid "" "These can be used as types in annotations. They do not support subscription " "using ``[]``." msgstr "這些可以在註釋中做為型別。他們並不支援 ``[]`` 的下標使用。" -#: ../../library/typing.rst:822 +#: ../../library/typing.rst:764 msgid "Special type indicating an unconstrained type." msgstr "特別型別,指出一個不受約束 (unconstrained) 的型別。" -#: ../../library/typing.rst:824 +#: ../../library/typing.rst:766 msgid "Every type is compatible with :data:`Any`." msgstr "所有型別皆與 :data:`Any` 相容。" -#: ../../library/typing.rst:825 +#: ../../library/typing.rst:767 msgid ":data:`Any` is compatible with every type." msgstr ":data:`Any` 相容於所有型別。" -#: ../../library/typing.rst:827 +#: ../../library/typing.rst:769 msgid "" ":data:`Any` can now be used as a base class. This can be useful for avoiding " "type checker errors with classes that can duck type anywhere or are highly " @@ -981,15 +791,15 @@ msgstr "" ":data:`Any` 可以作為一個基礎類別。這對於在任何地方使用鴨子型別或是高度動態的" "型別,避免型別檢查器的錯誤是非常有用的。" -#: ../../library/typing.rst:834 +#: ../../library/typing.rst:776 msgid "A :ref:`constrained type variable `." msgstr "一個\\ :ref:`不受約束的型別變數 `。" -#: ../../library/typing.rst:836 +#: ../../library/typing.rst:778 msgid "Definition::" msgstr "定義: ::" -#: ../../library/typing.rst:840 +#: ../../library/typing.rst:782 msgid "" "``AnyStr`` is meant to be used for functions that may accept :class:`str` " "or :class:`bytes` arguments but cannot allow the two to mix." @@ -997,17 +807,17 @@ msgstr "" "``AnyStr`` 是對於函式有用的,他可以接受 :class:`str` 或 :class:`bytes` 引數但" "不可以將此兩種混合。" -#: ../../library/typing.rst:843 ../../library/typing.rst:934 -#: ../../library/typing.rst:953 ../../library/typing.rst:1010 -#: ../../library/typing.rst:1176 ../../library/typing.rst:1233 -#: ../../library/typing.rst:1442 ../../library/typing.rst:2829 +#: ../../library/typing.rst:785 ../../library/typing.rst:876 +#: ../../library/typing.rst:895 ../../library/typing.rst:952 +#: ../../library/typing.rst:1118 ../../library/typing.rst:1175 +#: ../../library/typing.rst:1384 ../../library/typing.rst:2771 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/typing.rst:852 +#: ../../library/typing.rst:794 msgid "" "Note that, despite its name, ``AnyStr`` has nothing to do with the :class:" "`Any` type, nor does it mean \"any string\". In particular, ``AnyStr`` and " @@ -1017,11 +827,11 @@ msgstr "" "何字串」的意思。尤其,``AnyStr`` 與 ``str | bytes`` 兩者不同且具有不同的使用" "情境: ::" -#: ../../library/typing.rst:869 +#: ../../library/typing.rst:811 msgid "Special type that includes only literal strings." msgstr "特別型別,只包含文本字串。" -#: ../../library/typing.rst:871 +#: ../../library/typing.rst:813 msgid "" "Any string literal is compatible with ``LiteralString``, as is another " "``LiteralString``. However, an object typed as just ``str`` is not. A string " @@ -1032,11 +842,11 @@ msgstr "" "此。然而,若是一個型別僅為 ``str`` 的物件則不相容。一個字串若是透過組合多個 " "``LiteralString`` 型別的物件建立,則此字串也可以視為 ``LiteralString``。" -#: ../../library/typing.rst:877 ../../library/typing.rst:1957 +#: ../../library/typing.rst:819 ../../library/typing.rst:1899 msgid "Example:" msgstr "舉例來說: ::" -#: ../../library/typing.rst:893 +#: ../../library/typing.rst:835 msgid "" "``LiteralString`` is useful for sensitive APIs where arbitrary user-" "generated strings could generate problems. For example, the two cases above " @@ -1047,11 +857,11 @@ msgstr "" "會產生問題。舉例來說,上面兩個案例中產生的型別檢查器錯誤是脆弱的且容易受到 " "SQL 注入攻擊。" -#: ../../library/typing.rst:898 +#: ../../library/typing.rst:840 msgid "See :pep:`675` for more details." msgstr "更多細節請見 :pep:`675`。" -#: ../../library/typing.rst:904 +#: ../../library/typing.rst:846 msgid "" "The `bottom type `_, a type that " "has no members." @@ -1059,13 +869,13 @@ msgstr "" "`底部型別 (bottom type) `_,為一個" "型別但沒有任何的成員。" -#: ../../library/typing.rst:907 +#: ../../library/typing.rst:849 msgid "" "This can be used to define a function that should never be called, or a " "function that never returns::" msgstr "這可以被用來定義一個不應被呼叫的函式,或是一個不會回傳的函式: ::" -#: ../../library/typing.rst:927 +#: ../../library/typing.rst:869 msgid "" "On older Python versions, :data:`NoReturn` may be used to express the same " "concept. ``Never`` was added to make the intended meaning more explicit." @@ -1073,11 +883,11 @@ msgstr "" "在舊的 Python 版本當中,:data:`NoReturn` 可以用來當作一樣的概念使用。新增 " "``Never`` 之後,則讓這個含義變得更為明確。" -#: ../../library/typing.rst:932 +#: ../../library/typing.rst:874 msgid "Special type indicating that a function never returns." msgstr "特別型別,指出一個永不回傳的函式。" -#: ../../library/typing.rst:941 +#: ../../library/typing.rst:883 msgid "" "``NoReturn`` can also be used as a `bottom type `_, a type that has no values. Starting in Python 3.11, " @@ -1088,17 +898,17 @@ msgstr "" "Bottom_type>`_,一個沒有值的型別。從 Python 3.11 開始,型別 :data:`Never` 應" "該改用這個概念。型別檢查器應該將這兩種型別視為相等的。" -#: ../../library/typing.rst:951 +#: ../../library/typing.rst:893 msgid "Special type to represent the current enclosed class." msgstr "特別型別,用來表示當前類別之內 (enclosed class)。" -#: ../../library/typing.rst:967 +#: ../../library/typing.rst:909 msgid "" "This annotation is semantically equivalent to the following, albeit in a " "more succinct fashion::" msgstr "這個註釋在語意上相等於下列內容,且形式更為簡潔: ::" -#: ../../library/typing.rst:979 +#: ../../library/typing.rst:921 msgid "" "In general, if something returns ``self``, as in the above examples, you " "should use ``Self`` as the return annotation. If ``Foo.return_self`` was " @@ -1111,11 +921,11 @@ msgstr "" "器應該推論這個從 ``SubclassOfFoo.return_self`` 回傳的物件為 ``Foo`` 型別,而" "並非回傳 ``SubclassOfFoo`` 型別。" -#: ../../library/typing.rst:985 +#: ../../library/typing.rst:927 msgid "Other common use cases include:" msgstr "其他常見的使用案例包含: ::" -#: ../../library/typing.rst:987 +#: ../../library/typing.rst:929 msgid "" ":class:`classmethod`\\s that are used as alternative constructors and return " "instances of the ``cls`` parameter." @@ -1123,11 +933,11 @@ msgstr "" ":class:`classmethod` 被用來作為替代的建構函式 (constructor) 並回傳 ``cls`` 參" "數的實例。" -#: ../../library/typing.rst:989 +#: ../../library/typing.rst:931 msgid "Annotating an :meth:`~object.__enter__` method which returns self." msgstr "註釋一個回傳自己的 :meth:`~object.__enter__` 方法。" -#: ../../library/typing.rst:991 +#: ../../library/typing.rst:933 msgid "" "You should not use ``Self`` as the return annotation if the method is not " "guaranteed to return an instance of a subclass when the class is subclassed::" @@ -1135,17 +945,17 @@ msgstr "" "當類別被子類別化時,若方法不保證回傳一個子類別的實例,你不應該使用 ``Self`` " "作為回傳註釋: ::" -#: ../../library/typing.rst:1002 +#: ../../library/typing.rst:944 msgid "See :pep:`673` for more details." msgstr "更多細節請見 :pep:`673`。" -#: ../../library/typing.rst:1008 +#: ../../library/typing.rst:950 msgid "" "Special annotation for explicitly declaring a :ref:`type alias `." msgstr "做為明確宣告一個\\ :ref:`型別別名 ` 的特別註釋。" -#: ../../library/typing.rst:1016 +#: ../../library/typing.rst:958 msgid "" "``TypeAlias`` is particularly useful on older Python versions for annotating " "aliases that make use of forward references, as it can be hard for type " @@ -1155,11 +965,11 @@ msgstr "" "(forward reference),因為對於型別檢查器來說,分辨這些別名與一般的變數賦值相當" "困難: ::" -#: ../../library/typing.rst:1036 +#: ../../library/typing.rst:978 msgid "See :pep:`613` for more details." msgstr "更多細節請見 :pep:`613`。" -#: ../../library/typing.rst:1040 +#: ../../library/typing.rst:982 msgid "" ":data:`TypeAlias` is deprecated in favor of the :keyword:`type` statement, " "which creates instances of :class:`TypeAliasType` and which natively " @@ -1175,71 +985,71 @@ msgstr "" "是不同的,且後者不是前者的型別。現在還沒有移除 :data:`TypeAlias` 的計畫,但鼓" "勵使用者們遷移 (migrate) 至 :keyword:`type` 陳述式。" -#: ../../library/typing.rst:1051 +#: ../../library/typing.rst:993 msgid "Special forms" msgstr "" -#: ../../library/typing.rst:1053 +#: ../../library/typing.rst:995 msgid "" "These can be used as types in annotations. They all support subscription " "using ``[]``, but each has a unique syntax." msgstr "" -#: ../../library/typing.rst:1058 +#: ../../library/typing.rst:1000 msgid "" "Union type; ``Union[X, Y]`` is equivalent to ``X | Y`` and means either X or " "Y." msgstr "" -#: ../../library/typing.rst:1060 +#: ../../library/typing.rst:1002 msgid "" "To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | " "str``. Using that shorthand is recommended. Details:" msgstr "" -#: ../../library/typing.rst:1062 +#: ../../library/typing.rst:1004 msgid "The arguments must be types and there must be at least one." msgstr "" -#: ../../library/typing.rst:1064 +#: ../../library/typing.rst:1006 msgid "Unions of unions are flattened, e.g.::" msgstr "" -#: ../../library/typing.rst:1068 +#: ../../library/typing.rst:1010 msgid "Unions of a single argument vanish, e.g.::" msgstr "" -#: ../../library/typing.rst:1072 +#: ../../library/typing.rst:1014 msgid "Redundant arguments are skipped, e.g.::" msgstr "" -#: ../../library/typing.rst:1076 +#: ../../library/typing.rst:1018 msgid "When comparing unions, the argument order is ignored, e.g.::" msgstr "" -#: ../../library/typing.rst:1080 +#: ../../library/typing.rst:1022 msgid "You cannot subclass or instantiate a ``Union``." msgstr "" -#: ../../library/typing.rst:1082 +#: ../../library/typing.rst:1024 msgid "You cannot write ``Union[X][Y]``." msgstr "你不能寫成 ``Union[X][Y]``。" -#: ../../library/typing.rst:1084 +#: ../../library/typing.rst:1026 msgid "Don't remove explicit subclasses from unions at runtime." msgstr "" -#: ../../library/typing.rst:1087 +#: ../../library/typing.rst:1029 msgid "" "Unions can now be written as ``X | Y``. See :ref:`union type " "expressions`." msgstr "" -#: ../../library/typing.rst:1093 +#: ../../library/typing.rst:1035 msgid "``Optional[X]`` is equivalent to ``X | None`` (or ``Union[X, None]``)." msgstr "" -#: ../../library/typing.rst:1095 +#: ../../library/typing.rst:1037 msgid "" "Note that this is not the same concept as an optional argument, which is one " "that has a default. An optional argument with a default does not require " @@ -1247,24 +1057,24 @@ msgid "" "optional. For example::" msgstr "" -#: ../../library/typing.rst:1103 +#: ../../library/typing.rst:1045 msgid "" "On the other hand, if an explicit value of ``None`` is allowed, the use of " "``Optional`` is appropriate, whether the argument is optional or not. For " "example::" msgstr "" -#: ../../library/typing.rst:1110 +#: ../../library/typing.rst:1052 msgid "" "Optional can now be written as ``X | None``. See :ref:`union type " "expressions`." msgstr "" -#: ../../library/typing.rst:1116 +#: ../../library/typing.rst:1058 msgid "Special form for annotating higher-order functions." msgstr "" -#: ../../library/typing.rst:1118 +#: ../../library/typing.rst:1060 msgid "" "``Concatenate`` can be used in conjunction with :ref:`Callable ` and :class:`ParamSpec` to annotate a higher-order callable which " @@ -1275,7 +1085,7 @@ msgid "" "``Concatenate`` must be a :class:`ParamSpec` or ellipsis (``...``)." msgstr "" -#: ../../library/typing.rst:1127 +#: ../../library/typing.rst:1069 msgid "" "For example, to annotate a decorator ``with_lock`` which provides a :class:" "`threading.Lock` to the decorated function, ``Concatenate`` can be used to " @@ -1286,38 +1096,38 @@ msgid "" "passed in::" msgstr "" -#: ../../library/typing.rst:1163 ../../library/typing.rst:1925 +#: ../../library/typing.rst:1105 ../../library/typing.rst:1867 msgid "" ":pep:`612` -- Parameter Specification Variables (the PEP which introduced " "``ParamSpec`` and ``Concatenate``)" msgstr "" -#: ../../library/typing.rst:1165 +#: ../../library/typing.rst:1107 msgid ":class:`ParamSpec`" msgstr ":class:`ParamSpec`" -#: ../../library/typing.rst:1166 ../../library/typing.rst:1928 +#: ../../library/typing.rst:1108 ../../library/typing.rst:1870 msgid ":ref:`annotating-callables`" msgstr ":ref:`annotating-callables`" -#: ../../library/typing.rst:1170 +#: ../../library/typing.rst:1112 msgid "Special typing form to define \"literal types\"." msgstr "" -#: ../../library/typing.rst:1172 +#: ../../library/typing.rst:1114 msgid "" "``Literal`` can be used to indicate to type checkers that the annotated " "object has a value equivalent to one of the provided literals." msgstr "" -#: ../../library/typing.rst:1188 +#: ../../library/typing.rst:1130 msgid "" "``Literal[...]`` cannot be subclassed. At runtime, an arbitrary value is " "allowed as type argument to ``Literal[...]``, but type checkers may impose " "restrictions. See :pep:`586` for more details about literal types." msgstr "" -#: ../../library/typing.rst:1194 +#: ../../library/typing.rst:1136 msgid "" "``Literal`` now de-duplicates parameters. Equality comparisons of " "``Literal`` objects are no longer order dependent. ``Literal`` objects will " @@ -1325,22 +1135,22 @@ msgid "" "their parameters are not :term:`hashable`." msgstr "" -#: ../../library/typing.rst:1202 +#: ../../library/typing.rst:1144 msgid "Special type construct to mark class variables." msgstr "" -#: ../../library/typing.rst:1204 +#: ../../library/typing.rst:1146 msgid "" "As introduced in :pep:`526`, a variable annotation wrapped in ClassVar " "indicates that a given attribute is intended to be used as a class variable " "and should not be set on instances of that class. Usage::" msgstr "" -#: ../../library/typing.rst:1212 +#: ../../library/typing.rst:1154 msgid ":data:`ClassVar` accepts only types and cannot be further subscribed." msgstr "" -#: ../../library/typing.rst:1214 +#: ../../library/typing.rst:1156 msgid "" ":data:`ClassVar` is not a class itself, and should not be used with :func:" "`isinstance` or :func:`issubclass`. :data:`ClassVar` does not change Python " @@ -1348,27 +1158,27 @@ msgid "" "example, a type checker might flag the following code as an error::" msgstr "" -#: ../../library/typing.rst:1228 +#: ../../library/typing.rst:1170 msgid "Special typing construct to indicate final names to type checkers." msgstr "" -#: ../../library/typing.rst:1230 +#: ../../library/typing.rst:1172 msgid "" "Final names cannot be reassigned in any scope. Final names declared in class " "scopes cannot be overridden in subclasses." msgstr "" -#: ../../library/typing.rst:1244 ../../library/typing.rst:2845 +#: ../../library/typing.rst:1186 ../../library/typing.rst:2787 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." msgstr "" -#: ../../library/typing.rst:1251 +#: ../../library/typing.rst:1193 msgid "Special typing construct to mark a :class:`TypedDict` key as required." msgstr "" -#: ../../library/typing.rst:1253 +#: ../../library/typing.rst:1195 msgid "" "This is mainly useful for ``total=False`` TypedDicts. See :class:`TypedDict` " "and :pep:`655` for more details." @@ -1376,21 +1186,21 @@ msgstr "" "主要用於 ``total=False`` 的 TypedDict。更多細節請見 :class:`TypedDict` 與 :" "pep:`655`。" -#: ../../library/typing.rst:1260 +#: ../../library/typing.rst:1202 msgid "" "Special typing construct to mark a :class:`TypedDict` key as potentially " "missing." msgstr "" -#: ../../library/typing.rst:1263 +#: ../../library/typing.rst:1205 msgid "See :class:`TypedDict` and :pep:`655` for more details." msgstr "更多細節請見 :class:`TypedDict` 與 :pep:`655`。" -#: ../../library/typing.rst:1269 +#: ../../library/typing.rst:1211 msgid "Special typing form to add context-specific metadata to an annotation." msgstr "" -#: ../../library/typing.rst:1271 +#: ../../library/typing.rst:1213 msgid "" "Add metadata ``x`` to a given type ``T`` by using the annotation " "``Annotated[T, x]``. Metadata added using ``Annotated`` can be used by " @@ -1398,7 +1208,7 @@ msgid "" "a :attr:`!__metadata__` attribute." msgstr "" -#: ../../library/typing.rst:1276 +#: ../../library/typing.rst:1218 msgid "" "If a library or tool encounters an annotation ``Annotated[T, x]`` and has no " "special logic for the metadata, it should ignore the metadata and simply " @@ -1407,7 +1217,7 @@ msgid "" "system." msgstr "" -#: ../../library/typing.rst:1282 +#: ../../library/typing.rst:1224 msgid "" "Using ``Annotated[T, x]`` as an annotation still allows for static " "typechecking of ``T``, as type checkers will simply ignore the metadata " @@ -1417,7 +1227,7 @@ msgid "" "for a function or class." msgstr "" -#: ../../library/typing.rst:1289 +#: ../../library/typing.rst:1231 msgid "" "The responsibility of how to interpret the metadata lies with the tool or " "library encountering an ``Annotated`` annotation. A tool or library " @@ -1425,108 +1235,108 @@ msgid "" "determine if they are of interest (e.g., using :func:`isinstance`)." msgstr "" -#: ../../library/typing.rst:1297 +#: ../../library/typing.rst:1239 msgid "" "Here is an example of how you might use ``Annotated`` to add metadata to " "type annotations if you were doing range analysis:" msgstr "" -#: ../../library/typing.rst:1310 +#: ../../library/typing.rst:1252 msgid "Details of the syntax:" msgstr "" -#: ../../library/typing.rst:1312 +#: ../../library/typing.rst:1254 msgid "The first argument to ``Annotated`` must be a valid type" msgstr "" -#: ../../library/typing.rst:1314 +#: ../../library/typing.rst:1256 msgid "" "Multiple metadata elements can be supplied (``Annotated`` supports variadic " "arguments)::" msgstr "" -#: ../../library/typing.rst:1323 +#: ../../library/typing.rst:1265 msgid "" "It is up to the tool consuming the annotations to decide whether the client " "is allowed to add multiple metadata elements to one annotation and how to " "merge those annotations." msgstr "" -#: ../../library/typing.rst:1327 +#: ../../library/typing.rst:1269 msgid "" "``Annotated`` must be subscripted with at least two arguments " "( ``Annotated[int]`` is not valid)" msgstr "" -#: ../../library/typing.rst:1330 +#: ../../library/typing.rst:1272 msgid "" "The order of the metadata elements is preserved and matters for equality " "checks::" msgstr "" -#: ../../library/typing.rst:1337 +#: ../../library/typing.rst:1279 msgid "" "Nested ``Annotated`` types are flattened. The order of the metadata elements " "starts with the innermost annotation::" msgstr "" -#: ../../library/typing.rst:1344 +#: ../../library/typing.rst:1286 msgid "Duplicated metadata elements are not removed::" msgstr "" -#: ../../library/typing.rst:1350 +#: ../../library/typing.rst:1292 msgid "``Annotated`` can be used with nested and generic aliases:" msgstr "" -#: ../../library/typing.rst:1364 +#: ../../library/typing.rst:1306 msgid "``Annotated`` cannot be used with an unpacked :class:`TypeVarTuple`::" msgstr "" -#: ../../library/typing.rst:1368 +#: ../../library/typing.rst:1310 msgid "This would be equivalent to::" msgstr "" "這會等價於:\n" "\n" "::" -#: ../../library/typing.rst:1372 +#: ../../library/typing.rst:1314 msgid "" "where ``T1``, ``T2``, etc. are :class:`TypeVars `. This would be " "invalid: only one type should be passed to Annotated." msgstr "" -#: ../../library/typing.rst:1375 +#: ../../library/typing.rst:1317 msgid "" "By default, :func:`get_type_hints` strips the metadata from annotations. " "Pass ``include_extras=True`` to have the metadata preserved:" msgstr "" -#: ../../library/typing.rst:1388 +#: ../../library/typing.rst:1330 msgid "" "At runtime, the metadata associated with an ``Annotated`` type can be " "retrieved via the :attr:`!__metadata__` attribute:" msgstr "" -#: ../../library/typing.rst:1402 +#: ../../library/typing.rst:1344 msgid ":pep:`593` - Flexible function and variable annotations" msgstr "" -#: ../../library/typing.rst:1403 +#: ../../library/typing.rst:1345 msgid "The PEP introducing ``Annotated`` to the standard library." msgstr "" -#: ../../library/typing.rst:1410 +#: ../../library/typing.rst:1352 msgid "Special typing construct for marking user-defined type guard functions." msgstr "" -#: ../../library/typing.rst:1412 +#: ../../library/typing.rst:1354 msgid "" "``TypeGuard`` can be used to annotate the return type of a user-defined type " "guard function. ``TypeGuard`` only accepts a single type argument. At " "runtime, functions marked this way should return a boolean." msgstr "" -#: ../../library/typing.rst:1416 +#: ../../library/typing.rst:1358 msgid "" "``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static " "type checkers to determine a more precise type of an expression within a " @@ -1535,44 +1345,44 @@ msgid "" "conditional expression here is sometimes referred to as a \"type guard\"::" msgstr "" -#: ../../library/typing.rst:1431 +#: ../../library/typing.rst:1373 msgid "" "Sometimes it would be convenient to use a user-defined boolean function as a " "type guard. Such a function should use ``TypeGuard[...]`` as its return " "type to alert static type checkers to this intention." msgstr "" -#: ../../library/typing.rst:1435 +#: ../../library/typing.rst:1377 msgid "" "Using ``-> TypeGuard`` tells the static type checker that for a given " "function:" msgstr "" -#: ../../library/typing.rst:1438 +#: ../../library/typing.rst:1380 msgid "The return value is a boolean." msgstr "" -#: ../../library/typing.rst:1439 +#: ../../library/typing.rst:1381 msgid "" "If the return value is ``True``, the type of its argument is the type inside " "``TypeGuard``." msgstr "" -#: ../../library/typing.rst:1456 +#: ../../library/typing.rst:1398 msgid "" "If ``is_str_list`` is a class or instance method, then the type in " "``TypeGuard`` maps to the type of the second parameter after ``cls`` or " "``self``." msgstr "" -#: ../../library/typing.rst:1460 +#: ../../library/typing.rst:1402 msgid "" "In short, the form ``def foo(arg: TypeA) -> TypeGuard[TypeB]: ...``, means " "that if ``foo(arg)`` returns ``True``, then ``arg`` narrows from ``TypeA`` " "to ``TypeB``." msgstr "" -#: ../../library/typing.rst:1466 +#: ../../library/typing.rst:1408 msgid "" "``TypeB`` need not be a narrower form of ``TypeA`` -- it can even be a wider " "form. The main reason is to allow for things like narrowing ``list[object]`` " @@ -1581,24 +1391,24 @@ msgid "" "guards is left to the user." msgstr "" -#: ../../library/typing.rst:1472 +#: ../../library/typing.rst:1414 msgid "" "``TypeGuard`` also works with type variables. See :pep:`647` for more " "details." msgstr "" -#: ../../library/typing.rst:1479 +#: ../../library/typing.rst:1421 msgid "Typing operator to conceptually mark an object as having been unpacked." msgstr "" -#: ../../library/typing.rst:1481 +#: ../../library/typing.rst:1423 msgid "" "For example, using the unpack operator ``*`` on a :ref:`type variable tuple " "` is equivalent to using ``Unpack`` to mark the type variable " "tuple as having been unpacked::" msgstr "" -#: ../../library/typing.rst:1490 +#: ../../library/typing.rst:1432 msgid "" "In fact, ``Unpack`` can be used interchangeably with ``*`` in the context " "of :class:`typing.TypeVarTuple ` and :class:`builtins.tuple " @@ -1606,29 +1416,29 @@ msgid "" "versions of Python, where ``*`` couldn't be used in certain places::" msgstr "" -#: ../../library/typing.rst:1504 +#: ../../library/typing.rst:1446 msgid "" "``Unpack`` can also be used along with :class:`typing.TypedDict` for typing " "``**kwargs`` in a function signature::" msgstr "" -#: ../../library/typing.rst:1517 +#: ../../library/typing.rst:1459 msgid "" "See :pep:`692` for more details on using ``Unpack`` for ``**kwargs`` typing." msgstr "" -#: ../../library/typing.rst:1522 +#: ../../library/typing.rst:1464 msgid "Building generic types and type aliases" msgstr "" -#: ../../library/typing.rst:1524 +#: ../../library/typing.rst:1466 msgid "" "The following classes should not be used directly as annotations. Their " "intended purpose is to be building blocks for creating generic types and " "type aliases." msgstr "" -#: ../../library/typing.rst:1528 +#: ../../library/typing.rst:1470 msgid "" "These objects can be created through special syntax (:ref:`type parameter " "lists ` and the :keyword:`type` statement). For compatibility " @@ -1636,62 +1446,62 @@ msgid "" "syntax, as documented below." msgstr "" -#: ../../library/typing.rst:1535 +#: ../../library/typing.rst:1477 msgid "Abstract base class for generic types." msgstr "" -#: ../../library/typing.rst:1537 +#: ../../library/typing.rst:1479 msgid "" "A generic type is typically declared by adding a list of type parameters " "after the class name::" msgstr "" -#: ../../library/typing.rst:1545 +#: ../../library/typing.rst:1487 msgid "" "Such a class implicitly inherits from ``Generic``. The runtime semantics of " "this syntax are discussed in the :ref:`Language Reference `." msgstr "" -#: ../../library/typing.rst:1549 +#: ../../library/typing.rst:1491 msgid "This class can then be used as follows::" msgstr "" -#: ../../library/typing.rst:1557 +#: ../../library/typing.rst:1499 msgid "" "Here the brackets after the function name indicate a :ref:`generic function " "`." msgstr "" -#: ../../library/typing.rst:1560 +#: ../../library/typing.rst:1502 msgid "" "For backwards compatibility, generic classes can also be declared by " "explicitly inheriting from ``Generic``. In this case, the type parameters " "must be declared separately::" msgstr "" -#: ../../library/typing.rst:1577 +#: ../../library/typing.rst:1519 msgid "Type variable." msgstr "" -#: ../../library/typing.rst:1579 +#: ../../library/typing.rst:1521 msgid "" "The preferred way to construct a type variable is via the dedicated syntax " "for :ref:`generic functions `, :ref:`generic classes " "`, and :ref:`generic type aliases `::" msgstr "" -#: ../../library/typing.rst:1587 +#: ../../library/typing.rst:1529 msgid "" "This syntax can also be used to create bound and constrained type variables::" msgstr "" -#: ../../library/typing.rst:1597 +#: ../../library/typing.rst:1539 msgid "" "However, if desired, reusable type variables can also be constructed " "manually, like so::" msgstr "" -#: ../../library/typing.rst:1603 +#: ../../library/typing.rst:1545 msgid "" "Type variables exist primarily for the benefit of static type checkers. " "They serve as the parameters for generic types as well as for generic " @@ -1699,13 +1509,13 @@ msgid "" "information on generic types. Generic functions work as follows::" msgstr "" -#: ../../library/typing.rst:1624 +#: ../../library/typing.rst:1566 msgid "" "Note that type variables can be *bound*, *constrained*, or neither, but " "cannot be both bound *and* constrained." msgstr "" -#: ../../library/typing.rst:1627 +#: ../../library/typing.rst:1569 msgid "" "The variance of type variables is inferred by type checkers when they are " "created through the :ref:`type parameter syntax ` or when " @@ -1715,92 +1525,92 @@ msgid "" "invariant. See :pep:`484` and :pep:`695` for more details." msgstr "" -#: ../../library/typing.rst:1635 +#: ../../library/typing.rst:1577 msgid "" "Bound type variables and constrained type variables have different semantics " "in several important ways. Using a *bound* type variable means that the " "``TypeVar`` will be solved using the most specific type possible::" msgstr "" -#: ../../library/typing.rst:1650 +#: ../../library/typing.rst:1592 msgid "" "Type variables can be bound to concrete types, abstract types (ABCs or " "protocols), and even unions of types::" msgstr "" -#: ../../library/typing.rst:1662 +#: ../../library/typing.rst:1604 msgid "" "Using a *constrained* type variable, however, means that the ``TypeVar`` can " "only ever be solved as being exactly one of the constraints given::" msgstr "" -#: ../../library/typing.rst:1673 +#: ../../library/typing.rst:1615 msgid "At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`." msgstr "" -#: ../../library/typing.rst:1677 +#: ../../library/typing.rst:1619 msgid "The name of the type variable." msgstr "" -#: ../../library/typing.rst:1681 +#: ../../library/typing.rst:1623 msgid "Whether the type var has been explicitly marked as covariant." msgstr "" -#: ../../library/typing.rst:1685 +#: ../../library/typing.rst:1627 msgid "Whether the type var has been explicitly marked as contravariant." msgstr "" -#: ../../library/typing.rst:1689 +#: ../../library/typing.rst:1631 msgid "" "Whether the type variable's variance should be inferred by type checkers." msgstr "" -#: ../../library/typing.rst:1695 +#: ../../library/typing.rst:1637 msgid "The bound of the type variable, if any." msgstr "" -#: ../../library/typing.rst:1699 +#: ../../library/typing.rst:1641 msgid "" "For type variables created through :ref:`type parameter syntax `, the bound is evaluated only when the attribute is accessed, not " "when the type variable is created (see :ref:`lazy-evaluation`)." msgstr "" -#: ../../library/typing.rst:1705 +#: ../../library/typing.rst:1647 msgid "A tuple containing the constraints of the type variable, if any." msgstr "" -#: ../../library/typing.rst:1709 +#: ../../library/typing.rst:1651 msgid "" "For type variables created through :ref:`type parameter syntax `, the constraints are evaluated only when the attribute is accessed, " "not when the type variable is created (see :ref:`lazy-evaluation`)." msgstr "" -#: ../../library/typing.rst:1715 +#: ../../library/typing.rst:1657 msgid "" "Type variables can now be declared using the :ref:`type parameter ` syntax introduced by :pep:`695`. The ``infer_variance`` parameter " "was added." msgstr "" -#: ../../library/typing.rst:1723 +#: ../../library/typing.rst:1665 msgid "" "Type variable tuple. A specialized form of :ref:`type variable ` " "that enables *variadic* generics." msgstr "" -#: ../../library/typing.rst:1726 +#: ../../library/typing.rst:1668 msgid "" "Type variable tuples can be declared in :ref:`type parameter lists ` using a single asterisk (``*``) before the name::" msgstr "" -#: ../../library/typing.rst:1732 +#: ../../library/typing.rst:1674 msgid "Or by explicitly invoking the ``TypeVarTuple`` constructor::" msgstr "" -#: ../../library/typing.rst:1740 +#: ../../library/typing.rst:1682 msgid "" "A normal type variable enables parameterization with a single type. A type " "variable tuple, in contrast, allows parameterization with an *arbitrary* " @@ -1808,7 +1618,7 @@ msgid "" "wrapped in a tuple. For example::" msgstr "" -#: ../../library/typing.rst:1762 +#: ../../library/typing.rst:1704 msgid "" "Note the use of the unpacking operator ``*`` in ``tuple[T, *Ts]``. " "Conceptually, you can think of ``Ts`` as a tuple of type variables ``(T1, " @@ -1818,36 +1628,36 @@ msgid "" "` instead, as ``Unpack[Ts]``.)" msgstr "" -#: ../../library/typing.rst:1770 +#: ../../library/typing.rst:1712 msgid "" "Type variable tuples must *always* be unpacked. This helps distinguish type " "variable tuples from normal type variables::" msgstr "" -#: ../../library/typing.rst:1777 +#: ../../library/typing.rst:1719 msgid "" "Type variable tuples can be used in the same contexts as normal type " "variables. For example, in class definitions, arguments, and return types::" msgstr "" -#: ../../library/typing.rst:1785 +#: ../../library/typing.rst:1727 msgid "" "Type variable tuples can be happily combined with normal type variables:" msgstr "" -#: ../../library/typing.rst:1801 +#: ../../library/typing.rst:1743 msgid "" "However, note that at most one type variable tuple may appear in a single " "list of type arguments or type parameters::" msgstr "" -#: ../../library/typing.rst:1808 +#: ../../library/typing.rst:1750 msgid "" "Finally, an unpacked type variable tuple can be used as the type annotation " "of ``*args``::" msgstr "" -#: ../../library/typing.rst:1818 +#: ../../library/typing.rst:1760 msgid "" "In contrast to non-unpacked annotations of ``*args`` - e.g. ``*args: int``, " "which would specify that *all* arguments are ``int`` - ``*args: *Ts`` " @@ -1856,39 +1666,39 @@ msgid "" "``call_soon`` match the types of the (positional) arguments of ``callback``." msgstr "" -#: ../../library/typing.rst:1825 +#: ../../library/typing.rst:1767 msgid "See :pep:`646` for more details on type variable tuples." msgstr "" -#: ../../library/typing.rst:1829 +#: ../../library/typing.rst:1771 msgid "The name of the type variable tuple." msgstr "" -#: ../../library/typing.rst:1835 +#: ../../library/typing.rst:1777 msgid "" "Type variable tuples can now be declared using the :ref:`type parameter " "` syntax introduced by :pep:`695`." msgstr "" -#: ../../library/typing.rst:1840 +#: ../../library/typing.rst:1782 msgid "" "Parameter specification variable. A specialized version of :ref:`type " "variables `." msgstr "" -#: ../../library/typing.rst:1843 +#: ../../library/typing.rst:1785 msgid "" "In :ref:`type parameter lists `, parameter specifications can " "be declared with two asterisks (``**``)::" msgstr "" -#: ../../library/typing.rst:1848 +#: ../../library/typing.rst:1790 msgid "" "For compatibility with Python 3.11 and earlier, ``ParamSpec`` objects can " "also be created as follows::" msgstr "" -#: ../../library/typing.rst:1853 +#: ../../library/typing.rst:1795 msgid "" "Parameter specification variables exist primarily for the benefit of static " "type checkers. They are used to forward the parameter types of one callable " @@ -1898,7 +1708,7 @@ msgid "" "See :class:`Generic` for more information on generic types." msgstr "" -#: ../../library/typing.rst:1860 +#: ../../library/typing.rst:1802 msgid "" "For example, to add basic logging to a function, one can create a decorator " "``add_logging`` to log function calls. The parameter specification variable " @@ -1906,27 +1716,27 @@ msgid "" "new callable returned by it have inter-dependent type parameters::" msgstr "" -#: ../../library/typing.rst:1880 +#: ../../library/typing.rst:1822 msgid "" "Without ``ParamSpec``, the simplest way to annotate this previously was to " "use a :class:`TypeVar` with bound ``Callable[..., Any]``. However this " "causes two problems:" msgstr "" -#: ../../library/typing.rst:1884 +#: ../../library/typing.rst:1826 msgid "" "The type checker can't type check the ``inner`` function because ``*args`` " "and ``**kwargs`` have to be typed :data:`Any`." msgstr "" -#: ../../library/typing.rst:1886 +#: ../../library/typing.rst:1828 msgid "" ":func:`~cast` may be required in the body of the ``add_logging`` decorator " "when returning the ``inner`` function, or the static type checker must be " "told to ignore the ``return inner``." msgstr "" -#: ../../library/typing.rst:1893 +#: ../../library/typing.rst:1835 msgid "" "Since ``ParamSpec`` captures both positional and keyword parameters, ``P." "args`` and ``P.kwargs`` can be used to split a ``ParamSpec`` into its " @@ -1939,11 +1749,11 @@ msgid "" "`ParamSpecKwargs`." msgstr "" -#: ../../library/typing.rst:1905 +#: ../../library/typing.rst:1847 msgid "The name of the parameter specification." msgstr "" -#: ../../library/typing.rst:1907 +#: ../../library/typing.rst:1849 msgid "" "Parameter specification variables created with ``covariant=True`` or " "``contravariant=True`` can be used to declare covariant or contravariant " @@ -1952,23 +1762,23 @@ msgid "" "decided." msgstr "" -#: ../../library/typing.rst:1917 +#: ../../library/typing.rst:1859 msgid "" "Parameter specifications can now be declared using the :ref:`type parameter " "` syntax introduced by :pep:`695`." msgstr "" -#: ../../library/typing.rst:1921 +#: ../../library/typing.rst:1863 msgid "" "Only parameter specification variables defined in global scope can be " "pickled." msgstr "" -#: ../../library/typing.rst:1927 +#: ../../library/typing.rst:1869 msgid ":data:`Concatenate`" msgstr ":data:`Concatenate`" -#: ../../library/typing.rst:1933 +#: ../../library/typing.rst:1875 msgid "" "Arguments and keyword arguments attributes of a :class:`ParamSpec`. The ``P." "args`` attribute of a ``ParamSpec`` is an instance of ``ParamSpecArgs``, and " @@ -1976,75 +1786,75 @@ msgid "" "runtime introspection and have no special meaning to static type checkers." msgstr "" -#: ../../library/typing.rst:1938 +#: ../../library/typing.rst:1880 msgid "" "Calling :func:`get_origin` on either of these objects will return the " "original ``ParamSpec``:" msgstr "" -#: ../../library/typing.rst:1955 +#: ../../library/typing.rst:1897 msgid "The type of type aliases created through the :keyword:`type` statement." msgstr "" -#: ../../library/typing.rst:1969 +#: ../../library/typing.rst:1911 msgid "The name of the type alias:" msgstr "" -#: ../../library/typing.rst:1979 +#: ../../library/typing.rst:1921 msgid "The module in which the type alias was defined::" msgstr "" -#: ../../library/typing.rst:1987 +#: ../../library/typing.rst:1929 msgid "" "The type parameters of the type alias, or an empty tuple if the alias is not " "generic:" msgstr "" -#: ../../library/typing.rst:2001 +#: ../../library/typing.rst:1943 msgid "" "The type alias's value. This is :ref:`lazily evaluated `, " "so names used in the definition of the alias are not resolved until the " "``__value__`` attribute is accessed:" msgstr "" -#: ../../library/typing.rst:2019 +#: ../../library/typing.rst:1961 msgid "Other special directives" msgstr "" -#: ../../library/typing.rst:2021 +#: ../../library/typing.rst:1963 msgid "" "These functions and classes should not be used directly as annotations. " "Their intended purpose is to be building blocks for creating and declaring " "types." msgstr "" -#: ../../library/typing.rst:2027 +#: ../../library/typing.rst:1969 msgid "Typed version of :func:`collections.namedtuple`." msgstr "" -#: ../../library/typing.rst:2029 ../../library/typing.rst:2106 -#: ../../library/typing.rst:3071 +#: ../../library/typing.rst:1971 ../../library/typing.rst:2048 +#: ../../library/typing.rst:3013 msgid "Usage::" msgstr "" -#: ../../library/typing.rst:2035 +#: ../../library/typing.rst:1977 msgid "This is equivalent to::" msgstr "" "這等價於:\n" "\n" "::" -#: ../../library/typing.rst:2039 +#: ../../library/typing.rst:1981 msgid "" "To give a field a default value, you can assign to it in the class body::" msgstr "" -#: ../../library/typing.rst:2048 +#: ../../library/typing.rst:1990 msgid "" "Fields with a default value must come after any fields without a default." msgstr "" -#: ../../library/typing.rst:2050 +#: ../../library/typing.rst:1992 msgid "" "The resulting class has an extra attribute ``__annotations__`` giving a dict " "that maps the field names to the field types. (The field names are in the " @@ -2053,83 +1863,83 @@ msgid "" "API.)" msgstr "" -#: ../../library/typing.rst:2056 +#: ../../library/typing.rst:1998 msgid "``NamedTuple`` subclasses can also have docstrings and methods::" msgstr "" -#: ../../library/typing.rst:2066 +#: ../../library/typing.rst:2008 msgid "``NamedTuple`` subclasses can be generic::" msgstr "" -#: ../../library/typing.rst:2072 +#: ../../library/typing.rst:2014 msgid "Backward-compatible usage::" msgstr "" -#: ../../library/typing.rst:2082 +#: ../../library/typing.rst:2024 msgid "Added support for :pep:`526` variable annotation syntax." msgstr "" -#: ../../library/typing.rst:2085 +#: ../../library/typing.rst:2027 msgid "Added support for default values, methods, and docstrings." msgstr "" -#: ../../library/typing.rst:2088 +#: ../../library/typing.rst:2030 msgid "" "The ``_field_types`` and ``__annotations__`` attributes are now regular " "dictionaries instead of instances of ``OrderedDict``." msgstr "" -#: ../../library/typing.rst:2092 +#: ../../library/typing.rst:2034 msgid "" "Removed the ``_field_types`` attribute in favor of the more standard " "``__annotations__`` attribute which has the same information." msgstr "" -#: ../../library/typing.rst:2096 +#: ../../library/typing.rst:2038 msgid "Added support for generic namedtuples." msgstr "" -#: ../../library/typing.rst:2101 +#: ../../library/typing.rst:2043 msgid "Helper class to create low-overhead :ref:`distinct types `." msgstr "" -#: ../../library/typing.rst:2103 +#: ../../library/typing.rst:2045 msgid "" "A ``NewType`` is considered a distinct type by a typechecker. At runtime, " "however, calling a ``NewType`` returns its argument unchanged." msgstr "" -#: ../../library/typing.rst:2113 +#: ../../library/typing.rst:2055 msgid "The module in which the new type is defined." msgstr "" -#: ../../library/typing.rst:2117 +#: ../../library/typing.rst:2059 msgid "The name of the new type." msgstr "" -#: ../../library/typing.rst:2121 +#: ../../library/typing.rst:2063 msgid "The type that the new type is based on." msgstr "" -#: ../../library/typing.rst:2125 +#: ../../library/typing.rst:2067 msgid "``NewType`` is now a class rather than a function." msgstr "" -#: ../../library/typing.rst:2130 +#: ../../library/typing.rst:2072 msgid "Base class for protocol classes." msgstr "" -#: ../../library/typing.rst:2132 +#: ../../library/typing.rst:2074 msgid "Protocol classes are defined like this::" msgstr "" -#: ../../library/typing.rst:2138 +#: ../../library/typing.rst:2080 msgid "" "Such classes are primarily used with static type checkers that recognize " "structural subtyping (static duck-typing), for example::" msgstr "" -#: ../../library/typing.rst:2150 +#: ../../library/typing.rst:2092 msgid "" "See :pep:`544` for more details. Protocol classes decorated with :func:" "`runtime_checkable` (described later) act as simple-minded runtime protocols " @@ -2137,21 +1947,21 @@ msgid "" "signatures." msgstr "" -#: ../../library/typing.rst:2155 +#: ../../library/typing.rst:2097 msgid "Protocol classes can be generic, for example::" msgstr "" -#: ../../library/typing.rst:2161 +#: ../../library/typing.rst:2103 msgid "" "In code that needs to be compatible with Python 3.11 or older, generic " "Protocols can be written as follows::" msgstr "" -#: ../../library/typing.rst:2174 +#: ../../library/typing.rst:2116 msgid "Mark a protocol class as a runtime protocol." msgstr "" -#: ../../library/typing.rst:2176 +#: ../../library/typing.rst:2118 msgid "" "Such a protocol can be used with :func:`isinstance` and :func:`issubclass`. " "This raises :exc:`TypeError` when applied to a non-protocol class. This " @@ -2160,7 +1970,7 @@ msgid "" "Iterable`. For example::" msgstr "" -#: ../../library/typing.rst:2196 +#: ../../library/typing.rst:2138 msgid "" ":func:`!runtime_checkable` will check only the presence of the required " "methods or attributes, not their type signatures or types. For example, :" @@ -2171,7 +1981,7 @@ msgid "" "(instantiate) :class:`ssl.SSLObject`." msgstr "" -#: ../../library/typing.rst:2207 +#: ../../library/typing.rst:2149 msgid "" "An :func:`isinstance` check against a runtime-checkable protocol can be " "surprisingly slow compared to an ``isinstance()`` check against a non-" @@ -2179,7 +1989,7 @@ msgid "" "calls for structural checks in performance-sensitive code." msgstr "" -#: ../../library/typing.rst:2215 +#: ../../library/typing.rst:2157 msgid "" "The internal implementation of :func:`isinstance` checks against runtime-" "checkable protocols now uses :func:`inspect.getattr_static` to look up " @@ -2189,7 +1999,7 @@ msgid "" "versa. Most users are unlikely to be affected by this change." msgstr "" -#: ../../library/typing.rst:2224 +#: ../../library/typing.rst:2166 msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " @@ -2198,13 +2008,13 @@ msgid "" "`\"What's new in Python 3.12\" ` for more details." msgstr "" -#: ../../library/typing.rst:2235 +#: ../../library/typing.rst:2177 msgid "" "Special construct to add type hints to a dictionary. At runtime it is a " "plain :class:`dict`." msgstr "" -#: ../../library/typing.rst:2238 +#: ../../library/typing.rst:2180 msgid "" "``TypedDict`` declares a dictionary type that expects all of its instances " "to have a certain set of keys, where each key is associated with a value of " @@ -2212,53 +2022,53 @@ msgid "" "enforced by type checkers. Usage::" msgstr "" -#: ../../library/typing.rst:2254 +#: ../../library/typing.rst:2196 msgid "" "To allow using this feature with older versions of Python that do not " "support :pep:`526`, ``TypedDict`` supports two additional equivalent " "syntactic forms:" msgstr "" -#: ../../library/typing.rst:2258 +#: ../../library/typing.rst:2200 msgid "Using a literal :class:`dict` as the second argument::" msgstr "" -#: ../../library/typing.rst:2262 +#: ../../library/typing.rst:2204 msgid "Using keyword arguments::" msgstr "" -#: ../../library/typing.rst:2269 +#: ../../library/typing.rst:2211 msgid "" "The keyword-argument syntax is deprecated in 3.11 and will be removed in " "3.13. It may also be unsupported by static type checkers." msgstr "" -#: ../../library/typing.rst:2270 +#: ../../library/typing.rst:2212 msgid "" "The functional syntax should also be used when any of the keys are not " "valid :ref:`identifiers `, for example because they are " "keywords or contain hyphens. Example::" msgstr "" -#: ../../library/typing.rst:2282 +#: ../../library/typing.rst:2224 msgid "" "By default, all keys must be present in a ``TypedDict``. It is possible to " "mark individual keys as non-required using :data:`NotRequired`::" msgstr "" -#: ../../library/typing.rst:2293 +#: ../../library/typing.rst:2235 msgid "" "This means that a ``Point2D`` ``TypedDict`` can have the ``label`` key " "omitted." msgstr "" -#: ../../library/typing.rst:2296 +#: ../../library/typing.rst:2238 msgid "" "It is also possible to mark all keys as non-required by default by " "specifying a totality of ``False``::" msgstr "" -#: ../../library/typing.rst:2306 +#: ../../library/typing.rst:2248 msgid "" "This means that a ``Point2D`` ``TypedDict`` can have any of the keys " "omitted. A type checker is only expected to support a literal ``False`` or " @@ -2266,53 +2076,53 @@ msgid "" "and makes all items defined in the class body required." msgstr "" -#: ../../library/typing.rst:2311 +#: ../../library/typing.rst:2253 msgid "" "Individual keys of a ``total=False`` ``TypedDict`` can be marked as required " "using :data:`Required`::" msgstr "" -#: ../../library/typing.rst:2326 +#: ../../library/typing.rst:2268 msgid "" "It is possible for a ``TypedDict`` type to inherit from one or more other " "``TypedDict`` types using the class-based syntax. Usage::" msgstr "" -#: ../../library/typing.rst:2333 +#: ../../library/typing.rst:2275 msgid "" "``Point3D`` has three items: ``x``, ``y`` and ``z``. It is equivalent to " "this definition::" msgstr "" -#: ../../library/typing.rst:2341 +#: ../../library/typing.rst:2283 msgid "" "A ``TypedDict`` cannot inherit from a non-\\ ``TypedDict`` class, except " "for :class:`Generic`. For example::" msgstr "" -#: ../../library/typing.rst:2356 +#: ../../library/typing.rst:2298 msgid "A ``TypedDict`` can be generic::" msgstr "" -#: ../../library/typing.rst:2362 +#: ../../library/typing.rst:2304 msgid "" "To create a generic ``TypedDict`` that is compatible with Python 3.11 or " "lower, inherit from :class:`Generic` explicitly:" msgstr "" -#: ../../library/typing.rst:2373 +#: ../../library/typing.rst:2315 msgid "" "A ``TypedDict`` can be introspected via annotations dicts (see :ref:" "`annotations-howto` for more information on annotations best practices), :" "attr:`__total__`, :attr:`__required_keys__`, and :attr:`__optional_keys__`." msgstr "" -#: ../../library/typing.rst:2379 +#: ../../library/typing.rst:2321 msgid "" "``Point2D.__total__`` gives the value of the ``total`` argument. Example:" msgstr "" -#: ../../library/typing.rst:2395 +#: ../../library/typing.rst:2337 msgid "" "This attribute reflects *only* the value of the ``total`` argument to the " "current ``TypedDict`` class, not whether the class is semantically total. " @@ -2323,21 +2133,21 @@ msgid "" "introspection." msgstr "" -#: ../../library/typing.rst:2408 +#: ../../library/typing.rst:2350 msgid "" "``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return :" "class:`frozenset` objects containing required and non-required keys, " "respectively." msgstr "" -#: ../../library/typing.rst:2411 +#: ../../library/typing.rst:2353 msgid "" "Keys marked with :data:`Required` will always appear in " "``__required_keys__`` and keys marked with :data:`NotRequired` will always " "appear in ``__optional_keys__``." msgstr "" -#: ../../library/typing.rst:2414 +#: ../../library/typing.rst:2356 msgid "" "For backwards compatibility with Python 3.10 and below, it is also possible " "to use inheritance to declare both required and non-required keys in the " @@ -2346,7 +2156,7 @@ msgid "" "``TypedDict`` with a different value for ``total``:" msgstr "" -#: ../../library/typing.rst:2439 +#: ../../library/typing.rst:2381 msgid "" "If ``from __future__ import annotations`` is used or if annotations are " "given as strings, annotations are not evaluated when the ``TypedDict`` is " @@ -2355,133 +2165,133 @@ msgid "" "attributes may be incorrect." msgstr "" -#: ../../library/typing.rst:2445 +#: ../../library/typing.rst:2387 msgid "" "See :pep:`589` for more examples and detailed rules of using ``TypedDict``." msgstr "" -#: ../../library/typing.rst:2449 +#: ../../library/typing.rst:2391 msgid "" "Added support for marking individual keys as :data:`Required` or :data:" "`NotRequired`. See :pep:`655`." msgstr "" -#: ../../library/typing.rst:2453 +#: ../../library/typing.rst:2395 msgid "Added support for generic ``TypedDict``\\ s." msgstr "" -#: ../../library/typing.rst:2457 +#: ../../library/typing.rst:2399 msgid "Protocols" msgstr "協定" -#: ../../library/typing.rst:2459 +#: ../../library/typing.rst:2401 msgid "" "The following protocols are provided by the typing module. All are decorated " "with :func:`@runtime_checkable `." msgstr "" -#: ../../library/typing.rst:2464 +#: ../../library/typing.rst:2406 msgid "" "An ABC with one abstract method ``__abs__`` that is covariant in its return " "type." msgstr "" -#: ../../library/typing.rst:2469 +#: ../../library/typing.rst:2411 msgid "An ABC with one abstract method ``__bytes__``." msgstr "一個有抽象方法 ``__bytes__`` 的 ABC。" -#: ../../library/typing.rst:2473 +#: ../../library/typing.rst:2415 msgid "An ABC with one abstract method ``__complex__``." msgstr "一個有抽象方法 ``__complex__`` 的 ABC。" -#: ../../library/typing.rst:2477 +#: ../../library/typing.rst:2419 msgid "An ABC with one abstract method ``__float__``." msgstr "一個有抽象方法 ``__float__`` 的 ABC。" -#: ../../library/typing.rst:2481 +#: ../../library/typing.rst:2423 msgid "An ABC with one abstract method ``__index__``." msgstr "一個有抽象方法 ``__index__`` 的 ABC。" -#: ../../library/typing.rst:2487 +#: ../../library/typing.rst:2429 msgid "An ABC with one abstract method ``__int__``." msgstr "一個有抽象方法 ``__int__`` 的 ABC。" -#: ../../library/typing.rst:2491 +#: ../../library/typing.rst:2433 msgid "" "An ABC with one abstract method ``__round__`` that is covariant in its " "return type." msgstr "" -#: ../../library/typing.rst:2495 +#: ../../library/typing.rst:2437 msgid "ABCs for working with IO" msgstr "" -#: ../../library/typing.rst:2501 +#: ../../library/typing.rst:2443 msgid "" "Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` and " "``BinaryIO(IO[bytes])`` represent the types of I/O streams such as returned " "by :func:`open`." msgstr "" -#: ../../library/typing.rst:2507 +#: ../../library/typing.rst:2449 msgid "Functions and decorators" msgstr "函式與裝飾器" -#: ../../library/typing.rst:2511 +#: ../../library/typing.rst:2453 msgid "Cast a value to a type." msgstr "" -#: ../../library/typing.rst:2513 +#: ../../library/typing.rst:2455 msgid "" "This returns the value unchanged. To the type checker this signals that the " "return value has the designated type, but at runtime we intentionally don't " "check anything (we want this to be as fast as possible)." msgstr "" -#: ../../library/typing.rst:2520 +#: ../../library/typing.rst:2462 msgid "" "Ask a static type checker to confirm that *val* has an inferred type of " "*typ*." msgstr "" -#: ../../library/typing.rst:2522 +#: ../../library/typing.rst:2464 msgid "" "At runtime this does nothing: it returns the first argument unchanged with " "no checks or side effects, no matter the actual type of the argument." msgstr "" -#: ../../library/typing.rst:2525 +#: ../../library/typing.rst:2467 msgid "" "When a static type checker encounters a call to ``assert_type()``, it emits " "an error if the value is not of the specified type::" msgstr "" -#: ../../library/typing.rst:2532 +#: ../../library/typing.rst:2474 msgid "" "This function is useful for ensuring the type checker's understanding of a " "script is in line with the developer's intentions::" msgstr "" -#: ../../library/typing.rst:2546 +#: ../../library/typing.rst:2488 msgid "" "Ask a static type checker to confirm that a line of code is unreachable." msgstr "" -#: ../../library/typing.rst:2548 +#: ../../library/typing.rst:2490 msgid "Example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/typing.rst:2559 +#: ../../library/typing.rst:2501 msgid "" "Here, the annotations allow the type checker to infer that the last case can " "never execute, because ``arg`` is either an :class:`int` or a :class:`str`, " "and both options are covered by earlier cases." msgstr "" -#: ../../library/typing.rst:2564 +#: ../../library/typing.rst:2506 msgid "" "If a type checker finds that a call to ``assert_never()`` is reachable, it " "will emit an error. For example, if the type annotation for ``arg`` was " @@ -2491,47 +2301,47 @@ msgid "" "passed in must be the bottom type, :data:`Never`, and nothing else." msgstr "" -#: ../../library/typing.rst:2572 +#: ../../library/typing.rst:2514 msgid "At runtime, this throws an exception when called." msgstr "" -#: ../../library/typing.rst:2575 +#: ../../library/typing.rst:2517 msgid "" "`Unreachable Code and Exhaustiveness Checking `__ has more information about " "exhaustiveness checking with static typing." msgstr "" -#: ../../library/typing.rst:2583 +#: ../../library/typing.rst:2525 msgid "Ask a static type checker to reveal the inferred type of an expression." msgstr "" -#: ../../library/typing.rst:2585 +#: ../../library/typing.rst:2527 msgid "" "When a static type checker encounters a call to this function, it emits a " "diagnostic with the inferred type of the argument. For example::" msgstr "" -#: ../../library/typing.rst:2591 +#: ../../library/typing.rst:2533 msgid "" "This can be useful when you want to debug how your type checker handles a " "particular piece of code." msgstr "" -#: ../../library/typing.rst:2594 +#: ../../library/typing.rst:2536 msgid "" "At runtime, this function prints the runtime type of its argument to :data:" "`sys.stderr` and returns the argument unchanged (allowing the call to be " "used within an expression)::" msgstr "" -#: ../../library/typing.rst:2601 +#: ../../library/typing.rst:2543 msgid "" "Note that the runtime type may be different from (more or less specific " "than) the type statically inferred by a type checker." msgstr "" -#: ../../library/typing.rst:2604 +#: ../../library/typing.rst:2546 msgid "" "Most type checkers support ``reveal_type()`` anywhere, even if the name is " "not imported from ``typing``. Importing the name from ``typing``, however, " @@ -2539,13 +2349,13 @@ msgid "" "clearly." msgstr "" -#: ../../library/typing.rst:2615 +#: ../../library/typing.rst:2557 msgid "" "Decorator to mark an object as providing :func:`dataclass `-like behavior." msgstr "" -#: ../../library/typing.rst:2618 +#: ../../library/typing.rst:2560 msgid "" "``dataclass_transform`` may be used to decorate a class, metaclass, or a " "function that is itself a decorator. The presence of " @@ -2554,19 +2364,19 @@ msgid "" "to :func:`@dataclasses.dataclass `." msgstr "" -#: ../../library/typing.rst:2625 +#: ../../library/typing.rst:2567 msgid "Example usage with a decorator function:" msgstr "" -#: ../../library/typing.rst:2639 +#: ../../library/typing.rst:2581 msgid "On a base class::" msgstr "" -#: ../../library/typing.rst:2648 +#: ../../library/typing.rst:2590 msgid "On a metaclass::" msgstr "" -#: ../../library/typing.rst:2659 +#: ../../library/typing.rst:2601 msgid "" "The ``CustomerModel`` classes defined above will be treated by type checkers " "similarly to classes created with :func:`@dataclasses.dataclass `-decorated definitions for " "*func*." msgstr "" -#: ../../library/typing.rst:2799 +#: ../../library/typing.rst:2741 msgid "" "*func* is the function object for the implementation of the overloaded " "function. For example, given the definition of ``process`` in the " @@ -2784,32 +2594,32 @@ msgid "" "returns an empty sequence." msgstr "" -#: ../../library/typing.rst:2806 +#: ../../library/typing.rst:2748 msgid "" "``get_overloads()`` can be used for introspecting an overloaded function at " "runtime." msgstr "" -#: ../../library/typing.rst:2814 +#: ../../library/typing.rst:2756 msgid "Clear all registered overloads in the internal registry." msgstr "" -#: ../../library/typing.rst:2816 +#: ../../library/typing.rst:2758 msgid "This can be used to reclaim the memory used by the registry." msgstr "" -#: ../../library/typing.rst:2823 +#: ../../library/typing.rst:2765 msgid "Decorator to indicate final methods and final classes." msgstr "" -#: ../../library/typing.rst:2825 +#: ../../library/typing.rst:2767 msgid "" "Decorating a method with ``@final`` indicates to a type checker that the " "method cannot be overridden in a subclass. Decorating a class with " "``@final`` indicates that it cannot be subclassed." msgstr "" -#: ../../library/typing.rst:2850 +#: ../../library/typing.rst:2792 msgid "" "The decorator will now attempt to set a ``__final__`` attribute to ``True`` " "on the decorated object. Thus, a check like ``if getattr(obj, \"__final__\", " @@ -2819,11 +2629,11 @@ msgid "" "exception." msgstr "" -#: ../../library/typing.rst:2861 +#: ../../library/typing.rst:2803 msgid "Decorator to indicate that annotations are not type hints." msgstr "" -#: ../../library/typing.rst:2863 +#: ../../library/typing.rst:2805 msgid "" "This works as a class or function :term:`decorator`. With a class, it " "applies recursively to all methods and classes defined in that class (but " @@ -2831,38 +2641,38 @@ msgid "" "will ignore all annotations in a function or class with this decorator." msgstr "" -#: ../../library/typing.rst:2869 +#: ../../library/typing.rst:2811 msgid "``@no_type_check`` mutates the decorated object in place." msgstr "" -#: ../../library/typing.rst:2873 +#: ../../library/typing.rst:2815 msgid "Decorator to give another decorator the :func:`no_type_check` effect." msgstr "" -#: ../../library/typing.rst:2875 +#: ../../library/typing.rst:2817 msgid "" "This wraps the decorator with something that wraps the decorated function " "in :func:`no_type_check`." msgstr "" -#: ../../library/typing.rst:2881 +#: ../../library/typing.rst:2823 msgid "" "Decorator to indicate that a method in a subclass is intended to override a " "method or attribute in a superclass." msgstr "" -#: ../../library/typing.rst:2884 +#: ../../library/typing.rst:2826 msgid "" "Type checkers should emit an error if a method decorated with ``@override`` " "does not, in fact, override anything. This helps prevent bugs that may occur " "when a base class is changed without an equivalent change to a child class." msgstr "" -#: ../../library/typing.rst:2906 +#: ../../library/typing.rst:2848 msgid "There is no runtime checking of this property." msgstr "" -#: ../../library/typing.rst:2908 +#: ../../library/typing.rst:2850 msgid "" "The decorator will attempt to set an ``__override__`` attribute to ``True`` " "on the decorated object. Thus, a check like ``if getattr(obj, " @@ -2872,38 +2682,38 @@ msgid "" "without raising an exception." msgstr "" -#: ../../library/typing.rst:2915 +#: ../../library/typing.rst:2857 msgid "See :pep:`698` for more details." msgstr "更多細節請見 :pep:`698`。" -#: ../../library/typing.rst:2922 +#: ../../library/typing.rst:2864 msgid "Decorator to mark a class or function as unavailable at runtime." msgstr "" -#: ../../library/typing.rst:2924 +#: ../../library/typing.rst:2866 msgid "" "This decorator is itself not available at runtime. It is mainly intended to " "mark classes that are defined in type stub files if an implementation " "returns an instance of a private class::" msgstr "" -#: ../../library/typing.rst:2935 +#: ../../library/typing.rst:2877 msgid "" "Note that returning instances of private classes is not recommended. It is " "usually preferable to make such classes public." msgstr "" -#: ../../library/typing.rst:2939 +#: ../../library/typing.rst:2881 msgid "Introspection helpers" msgstr "" -#: ../../library/typing.rst:2943 +#: ../../library/typing.rst:2885 msgid "" "Return a dictionary containing type hints for a function, method, module or " "class object." msgstr "" -#: ../../library/typing.rst:2946 +#: ../../library/typing.rst:2888 msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " @@ -2912,21 +2722,21 @@ msgid "" "__mro__`` in reverse order." msgstr "" -#: ../../library/typing.rst:2952 +#: ../../library/typing.rst:2894 msgid "" "The function recursively replaces all ``Annotated[T, ...]`` with ``T``, " "unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " "more information). For example:" msgstr "" -#: ../../library/typing.rst:2969 +#: ../../library/typing.rst:2911 msgid "" ":func:`get_type_hints` does not work with imported :ref:`type aliases ` that include forward references. Enabling postponed evaluation of " "annotations (:pep:`563`) may remove the need for most forward references." msgstr "" -#: ../../library/typing.rst:2974 +#: ../../library/typing.rst:2916 msgid "" "Added ``include_extras`` parameter as part of :pep:`593`. See the " "documentation on :data:`Annotated` for more information." @@ -2934,20 +2744,20 @@ msgstr "" "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。更多資訊請見 :data:" "`Annotated` 的文件。" -#: ../../library/typing.rst:2978 +#: ../../library/typing.rst:2920 msgid "" "Previously, ``Optional[t]`` was added for function and method annotations if " "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" -#: ../../library/typing.rst:2985 +#: ../../library/typing.rst:2927 msgid "" "Get the unsubscripted version of a type: for a typing object of the form " "``X[Y, Z, ...]`` return ``X``." msgstr "" -#: ../../library/typing.rst:2988 +#: ../../library/typing.rst:2930 msgid "" "If ``X`` is a typing-module alias for a builtin or :mod:`collections` class, " "it will be normalized to the original class. If ``X`` is an instance of :" @@ -2955,17 +2765,17 @@ msgid "" "class:`ParamSpec`. Return ``None`` for unsupported objects." msgstr "" -#: ../../library/typing.rst:2994 ../../library/typing.rst:3017 +#: ../../library/typing.rst:2936 ../../library/typing.rst:2959 msgid "Examples:" msgstr "舉例:" -#: ../../library/typing.rst:3009 +#: ../../library/typing.rst:2951 msgid "" "Get type arguments with all substitutions performed: for a typing object of " "the form ``X[Y, Z, ...]`` return ``(Y, Z, ...)``." msgstr "" -#: ../../library/typing.rst:3012 +#: ../../library/typing.rst:2954 msgid "" "If ``X`` is a union or :class:`Literal` contained in another generic type, " "the order of ``(Y, Z, ...)`` may be different from the order of the original " @@ -2973,40 +2783,40 @@ msgid "" "objects." msgstr "" -#: ../../library/typing.rst:3029 +#: ../../library/typing.rst:2971 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:3050 +#: ../../library/typing.rst:2992 msgid "" "Class used for internal typing representation of string forward references." msgstr "" -#: ../../library/typing.rst:3052 +#: ../../library/typing.rst:2994 msgid "" "For example, ``List[\"SomeClass\"]`` is implicitly transformed into " "``List[ForwardRef(\"SomeClass\")]``. ``ForwardRef`` should not be " "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:3057 +#: ../../library/typing.rst:2999 msgid "" ":pep:`585` generic types such as ``list[\"SomeClass\"]`` will not be " "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" -#: ../../library/typing.rst:3064 +#: ../../library/typing.rst:3006 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:3068 +#: ../../library/typing.rst:3010 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime." msgstr "" -#: ../../library/typing.rst:3079 +#: ../../library/typing.rst:3021 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -3014,7 +2824,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:3086 +#: ../../library/typing.rst:3028 msgid "" "If ``from __future__ import annotations`` is used, annotations are not " "evaluated at function definition time. Instead, they are stored as strings " @@ -3022,11 +2832,11 @@ msgid "" "annotation (see :pep:`563`)." msgstr "" -#: ../../library/typing.rst:3098 +#: ../../library/typing.rst:3040 msgid "Deprecated aliases" msgstr "棄用的別名" -#: ../../library/typing.rst:3100 +#: ../../library/typing.rst:3042 msgid "" "This module defines several deprecated aliases to pre-existing standard " "library classes. These were originally included in the typing module in " @@ -3035,7 +2845,7 @@ msgid "" "existing classes were enhanced to support ``[]`` (see :pep:`585`)." msgstr "" -#: ../../library/typing.rst:3107 +#: ../../library/typing.rst:3049 msgid "" "The redundant types are deprecated as of Python 3.9. However, while the " "aliases may be removed at some point, removal of these aliases is not " @@ -3043,7 +2853,7 @@ msgid "" "the interpreter for these aliases." msgstr "" -#: ../../library/typing.rst:3112 +#: ../../library/typing.rst:3054 msgid "" "If at some point it is decided to remove these deprecated aliases, a " "deprecation warning will be issued by the interpreter for at least two " @@ -3051,188 +2861,188 @@ msgid "" "typing module without deprecation warnings until at least Python 3.14." msgstr "" -#: ../../library/typing.rst:3117 +#: ../../library/typing.rst:3059 msgid "" "Type checkers are encouraged to flag uses of the deprecated types if the " "program they are checking targets a minimum Python version of 3.9 or newer." msgstr "" -#: ../../library/typing.rst:3123 +#: ../../library/typing.rst:3065 msgid "Aliases to built-in types" msgstr "內建型別的別名" -#: ../../library/typing.rst:3127 +#: ../../library/typing.rst:3069 msgid "Deprecated alias to :class:`dict`." msgstr "棄用 :class:`dict` 的別名。" -#: ../../library/typing.rst:3129 +#: ../../library/typing.rst:3071 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Mapping` rather than to use :class:`dict` " "or :class:`!typing.Dict`." msgstr "" -#: ../../library/typing.rst:3133 ../../library/typing.rst:3372 +#: ../../library/typing.rst:3075 ../../library/typing.rst:3314 msgid "This type can be used as follows::" msgstr "" -#: ../../library/typing.rst:3138 +#: ../../library/typing.rst:3080 msgid "" ":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3144 +#: ../../library/typing.rst:3086 msgid "Deprecated alias to :class:`list`." msgstr "棄用 :class:`list` 的別名。" -#: ../../library/typing.rst:3146 +#: ../../library/typing.rst:3088 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Sequence` or :class:`Iterable` rather than " "to use :class:`list` or :class:`!typing.List`." msgstr "" -#: ../../library/typing.rst:3150 +#: ../../library/typing.rst:3092 msgid "This type may be used as follows::" msgstr "" -#: ../../library/typing.rst:3158 +#: ../../library/typing.rst:3100 msgid "" ":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3164 +#: ../../library/typing.rst:3106 msgid "Deprecated alias to :class:`builtins.set `." msgstr "棄用 :class:`builtins.set ` 的別名。" -#: ../../library/typing.rst:3166 +#: ../../library/typing.rst:3108 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`AbstractSet` rather than to use :class:`set` " "or :class:`!typing.Set`." msgstr "" -#: ../../library/typing.rst:3170 +#: ../../library/typing.rst:3112 msgid "" ":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3176 +#: ../../library/typing.rst:3118 msgid "Deprecated alias to :class:`builtins.frozenset `." msgstr "棄用 :class:`builtins.frozenset ` 的別名。" -#: ../../library/typing.rst:3178 +#: ../../library/typing.rst:3120 msgid "" ":class:`builtins.frozenset ` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3185 +#: ../../library/typing.rst:3127 msgid "Deprecated alias for :class:`tuple`." msgstr "棄用 :class:`tuple` 的別名。" -#: ../../library/typing.rst:3187 +#: ../../library/typing.rst:3129 msgid "" ":class:`tuple` and ``Tuple`` are special-cased in the type system; see :ref:" "`annotating-tuples` for more details." msgstr "" -#: ../../library/typing.rst:3190 +#: ../../library/typing.rst:3132 msgid "" ":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3196 +#: ../../library/typing.rst:3138 msgid "Deprecated alias to :class:`type`." msgstr "棄用 :class:`type` 的別名。" -#: ../../library/typing.rst:3198 +#: ../../library/typing.rst:3140 msgid "" "See :ref:`type-of-class-objects` for details on using :class:`type` or " "``typing.Type`` in type annotations." msgstr "" -#: ../../library/typing.rst:3203 +#: ../../library/typing.rst:3145 msgid "" ":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3210 +#: ../../library/typing.rst:3152 msgid "Aliases to types in :mod:`collections`" msgstr ":mod:`collections` 中型別的別名" -#: ../../library/typing.rst:3214 +#: ../../library/typing.rst:3156 msgid "Deprecated alias to :class:`collections.defaultdict`." msgstr "棄用 :class:`collections.defaultdict` 的別名。" -#: ../../library/typing.rst:3218 +#: ../../library/typing.rst:3160 msgid "" ":class:`collections.defaultdict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3224 +#: ../../library/typing.rst:3166 msgid "Deprecated alias to :class:`collections.OrderedDict`." msgstr "棄用 :class:`collections.OrderedDict` 的別名。" -#: ../../library/typing.rst:3228 +#: ../../library/typing.rst:3170 msgid "" ":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3234 +#: ../../library/typing.rst:3176 msgid "Deprecated alias to :class:`collections.ChainMap`." msgstr "棄用 :class:`collections.ChainMap` 的別名。" -#: ../../library/typing.rst:3238 +#: ../../library/typing.rst:3180 msgid "" ":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3244 +#: ../../library/typing.rst:3186 msgid "Deprecated alias to :class:`collections.Counter`." msgstr "棄用 :class:`collections.Counter` 的別名。" -#: ../../library/typing.rst:3248 +#: ../../library/typing.rst:3190 msgid "" ":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3254 +#: ../../library/typing.rst:3196 msgid "Deprecated alias to :class:`collections.deque`." msgstr "棄用 :class:`collections.deque` 的別名。" -#: ../../library/typing.rst:3258 +#: ../../library/typing.rst:3200 msgid "" ":class:`collections.deque` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3265 +#: ../../library/typing.rst:3207 msgid "Aliases to other concrete types" msgstr "" -#: ../../library/typing.rst:3270 +#: ../../library/typing.rst:3212 msgid "" "The ``typing.io`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3274 +#: ../../library/typing.rst:3216 msgid "" "Deprecated aliases corresponding to the return types from :func:`re.compile` " "and :func:`re.match`." msgstr "" -#: ../../library/typing.rst:3277 +#: ../../library/typing.rst:3219 msgid "" "These types (and the corresponding functions) are generic over :data:" "`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " @@ -3240,391 +3050,391 @@ msgid "" "``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:3285 +#: ../../library/typing.rst:3227 msgid "" "The ``typing.re`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3286 +#: ../../library/typing.rst:3228 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3292 +#: ../../library/typing.rst:3234 msgid "Deprecated alias for :class:`str`." msgstr "棄用 :class:`str` 的別名。" -#: ../../library/typing.rst:3294 +#: ../../library/typing.rst:3236 msgid "" "``Text`` is provided to supply a forward compatible path for Python 2 code: " "in Python 2, ``Text`` is an alias for ``unicode``." msgstr "" -#: ../../library/typing.rst:3298 +#: ../../library/typing.rst:3240 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:3306 +#: ../../library/typing.rst:3248 msgid "" "Python 2 is no longer supported, and most type checkers also no longer " "support type checking Python 2 code. Removal of the alias is not currently " "planned, but users are encouraged to use :class:`str` instead of ``Text``." msgstr "" -#: ../../library/typing.rst:3316 +#: ../../library/typing.rst:3258 msgid "Aliases to container ABCs in :mod:`collections.abc`" msgstr ":mod:`collections.abc` 中容器 ABC 的別名" -#: ../../library/typing.rst:3320 +#: ../../library/typing.rst:3262 msgid "Deprecated alias to :class:`collections.abc.Set`." msgstr "棄用 :class:`collections.abc.Set` 的別名。" -#: ../../library/typing.rst:3322 +#: ../../library/typing.rst:3264 msgid "" ":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3328 +#: ../../library/typing.rst:3270 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview` of byte sequences." msgstr "" -#: ../../library/typing.rst:3332 +#: ../../library/typing.rst:3274 msgid "" "Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray " "| memoryview``." msgstr "" -#: ../../library/typing.rst:3336 +#: ../../library/typing.rst:3278 msgid "Deprecated alias to :class:`collections.abc.Collection`." msgstr "棄用 :class:`collections.abc.Collection` 的別名。" -#: ../../library/typing.rst:3340 +#: ../../library/typing.rst:3282 msgid "" ":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3346 +#: ../../library/typing.rst:3288 msgid "Deprecated alias to :class:`collections.abc.Container`." msgstr "棄用 :class:`collections.abc.Container` 的別名。" -#: ../../library/typing.rst:3348 +#: ../../library/typing.rst:3290 msgid "" ":class:`collections.abc.Container` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3354 +#: ../../library/typing.rst:3296 msgid "Deprecated alias to :class:`collections.abc.ItemsView`." msgstr "棄用 :class:`collections.abc.ItemsView` 的別名。" -#: ../../library/typing.rst:3356 +#: ../../library/typing.rst:3298 msgid "" ":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3362 +#: ../../library/typing.rst:3304 msgid "Deprecated alias to :class:`collections.abc.KeysView`." msgstr "棄用 :class:`collections.abc.KeysView` 的別名。" -#: ../../library/typing.rst:3364 +#: ../../library/typing.rst:3306 msgid "" ":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3370 +#: ../../library/typing.rst:3312 msgid "Deprecated alias to :class:`collections.abc.Mapping`." msgstr "棄用 :class:`collections.abc.Mapping` 的別名。" -#: ../../library/typing.rst:3377 +#: ../../library/typing.rst:3319 msgid "" ":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3383 +#: ../../library/typing.rst:3325 msgid "Deprecated alias to :class:`collections.abc.MappingView`." msgstr "棄用 :class:`collections.abc.MappingView` 的別名。" -#: ../../library/typing.rst:3385 +#: ../../library/typing.rst:3327 msgid "" ":class:`collections.abc.MappingView` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3391 +#: ../../library/typing.rst:3333 msgid "Deprecated alias to :class:`collections.abc.MutableMapping`." msgstr "棄用 :class:`collections.abc.MutableMapping` 的別名。" -#: ../../library/typing.rst:3393 +#: ../../library/typing.rst:3335 msgid "" ":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3400 +#: ../../library/typing.rst:3342 msgid "Deprecated alias to :class:`collections.abc.MutableSequence`." msgstr "棄用 :class:`collections.abc.MutableSequence` 的別名。" -#: ../../library/typing.rst:3402 +#: ../../library/typing.rst:3344 msgid "" ":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3409 +#: ../../library/typing.rst:3351 msgid "Deprecated alias to :class:`collections.abc.MutableSet`." msgstr "棄用 :class:`collections.abc.MutableSet` 的別名。" -#: ../../library/typing.rst:3411 +#: ../../library/typing.rst:3353 msgid "" ":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3417 +#: ../../library/typing.rst:3359 msgid "Deprecated alias to :class:`collections.abc.Sequence`." msgstr "棄用 :class:`collections.abc.Sequence` 的別名。" -#: ../../library/typing.rst:3419 +#: ../../library/typing.rst:3361 msgid "" ":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3425 +#: ../../library/typing.rst:3367 msgid "Deprecated alias to :class:`collections.abc.ValuesView`." msgstr "棄用 :class:`collections.abc.ValuesView` 的別名。" -#: ../../library/typing.rst:3427 +#: ../../library/typing.rst:3369 msgid "" ":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3434 +#: ../../library/typing.rst:3376 msgid "Aliases to asynchronous ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3438 +#: ../../library/typing.rst:3380 msgid "Deprecated alias to :class:`collections.abc.Coroutine`." msgstr "棄用 :class:`collections.abc.Coroutine` 的別名。" -#: ../../library/typing.rst:3440 +#: ../../library/typing.rst:3382 msgid "" "The variance and order of type variables correspond to those of :class:" "`Generator`, for example::" msgstr "" -#: ../../library/typing.rst:3451 +#: ../../library/typing.rst:3393 msgid "" ":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3457 +#: ../../library/typing.rst:3399 msgid "Deprecated alias to :class:`collections.abc.AsyncGenerator`." msgstr "棄用 :class:`collections.abc.AsyncGenerator` 的別名。" -#: ../../library/typing.rst:3459 +#: ../../library/typing.rst:3401 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:3468 +#: ../../library/typing.rst:3410 msgid "" "Unlike normal generators, async generators cannot return a value, so there " "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" -#: ../../library/typing.rst:3472 +#: ../../library/typing.rst:3414 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3480 +#: ../../library/typing.rst:3422 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3490 +#: ../../library/typing.rst:3432 msgid "" ":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3497 +#: ../../library/typing.rst:3439 msgid "Deprecated alias to :class:`collections.abc.AsyncIterable`." msgstr "棄用 :class:`collections.abc.AsyncIterable` 的別名。" -#: ../../library/typing.rst:3501 +#: ../../library/typing.rst:3443 msgid "" ":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3507 +#: ../../library/typing.rst:3449 msgid "Deprecated alias to :class:`collections.abc.AsyncIterator`." msgstr "棄用 :class:`collections.abc.AsyncIterator` 的別名。" -#: ../../library/typing.rst:3511 +#: ../../library/typing.rst:3453 msgid "" ":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3517 +#: ../../library/typing.rst:3459 msgid "Deprecated alias to :class:`collections.abc.Awaitable`." msgstr "棄用 :class:`collections.abc.Awaitable` 的別名。" -#: ../../library/typing.rst:3521 +#: ../../library/typing.rst:3463 msgid "" ":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3528 +#: ../../library/typing.rst:3470 msgid "Aliases to other ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3532 +#: ../../library/typing.rst:3474 msgid "Deprecated alias to :class:`collections.abc.Iterable`." msgstr "棄用 :class:`collections.abc.Iterable` 的別名。" -#: ../../library/typing.rst:3534 +#: ../../library/typing.rst:3476 msgid "" ":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3540 +#: ../../library/typing.rst:3482 msgid "Deprecated alias to :class:`collections.abc.Iterator`." msgstr "棄用 :class:`collections.abc.Iterator` 的別名。" -#: ../../library/typing.rst:3542 +#: ../../library/typing.rst:3484 msgid "" ":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3548 +#: ../../library/typing.rst:3490 msgid "Deprecated alias to :class:`collections.abc.Callable`." msgstr "棄用 :class:`collections.abc.Callable` 的別名。" -#: ../../library/typing.rst:3550 +#: ../../library/typing.rst:3492 msgid "" "See :ref:`annotating-callables` for details on how to use :class:" "`collections.abc.Callable` and ``typing.Callable`` in type annotations." msgstr "" -#: ../../library/typing.rst:3553 +#: ../../library/typing.rst:3495 msgid "" ":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3563 +#: ../../library/typing.rst:3505 msgid "Deprecated alias to :class:`collections.abc.Generator`." msgstr "棄用 :class:`collections.abc.Generator` 的別名。" -#: ../../library/typing.rst:3565 +#: ../../library/typing.rst:3507 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" -#: ../../library/typing.rst:3574 +#: ../../library/typing.rst:3516 msgid "" "Note that unlike many other generics in the typing module, the ``SendType`` " "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" -#: ../../library/typing.rst:3578 +#: ../../library/typing.rst:3520 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3586 +#: ../../library/typing.rst:3528 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3594 +#: ../../library/typing.rst:3536 msgid "" ":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3600 +#: ../../library/typing.rst:3542 msgid "Deprecated alias to :class:`collections.abc.Hashable`." msgstr "棄用 :class:`collections.abc.Hashable` 的別名。" -#: ../../library/typing.rst:3602 +#: ../../library/typing.rst:3544 msgid "Use :class:`collections.abc.Hashable` directly instead." msgstr "改為直接使用 :class:`collections.abc.Hashable`。" -#: ../../library/typing.rst:3607 +#: ../../library/typing.rst:3549 msgid "Deprecated alias to :class:`collections.abc.Reversible`." msgstr "棄用 :class:`collections.abc.Reversible` 的別名。" -#: ../../library/typing.rst:3609 +#: ../../library/typing.rst:3551 msgid "" ":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3615 +#: ../../library/typing.rst:3557 msgid "Deprecated alias to :class:`collections.abc.Sized`." msgstr "棄用 :class:`collections.abc.Sized` 的別名。" -#: ../../library/typing.rst:3617 +#: ../../library/typing.rst:3559 msgid "Use :class:`collections.abc.Sized` directly instead." msgstr "改為直接使用 :class:`collections.abc.Sized`。" -#: ../../library/typing.rst:3623 +#: ../../library/typing.rst:3565 msgid "Aliases to :mod:`contextlib` ABCs" msgstr ":mod:`contextlib` ABC 的別名" -#: ../../library/typing.rst:3627 +#: ../../library/typing.rst:3569 msgid "Deprecated alias to :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:3631 +#: ../../library/typing.rst:3573 msgid "" ":class:`contextlib.AbstractContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3638 +#: ../../library/typing.rst:3580 msgid "Deprecated alias to :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:3642 +#: ../../library/typing.rst:3584 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3648 +#: ../../library/typing.rst:3590 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:3650 +#: ../../library/typing.rst:3592 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -3632,99 +3442,281 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:3657 +#: ../../library/typing.rst:3599 msgid "Feature" msgstr "" -#: ../../library/typing.rst:3658 +#: ../../library/typing.rst:3600 msgid "Deprecated in" msgstr "棄用於" -#: ../../library/typing.rst:3659 +#: ../../library/typing.rst:3601 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:3660 +#: ../../library/typing.rst:3602 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:3661 +#: ../../library/typing.rst:3603 msgid "``typing.io`` and ``typing.re`` submodules" msgstr "``typing.io`` 和 ``typing.re`` 子模組" -#: ../../library/typing.rst:3662 +#: ../../library/typing.rst:3604 msgid "3.8" msgstr "3.8" -#: ../../library/typing.rst:3663 +#: ../../library/typing.rst:3605 msgid "3.13" msgstr "3.13" -#: ../../library/typing.rst:3664 +#: ../../library/typing.rst:3606 msgid ":issue:`38291`" msgstr ":issue:`38291`" -#: ../../library/typing.rst:3665 +#: ../../library/typing.rst:3607 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:3666 ../../library/typing.rst:3670 +#: ../../library/typing.rst:3608 ../../library/typing.rst:3612 msgid "3.9" msgstr "3.9" -#: ../../library/typing.rst:3667 +#: ../../library/typing.rst:3609 msgid "Undecided (see :ref:`deprecated-aliases` for more information)" msgstr "" -#: ../../library/typing.rst:3668 +#: ../../library/typing.rst:3610 msgid ":pep:`585`" msgstr ":pep:`585`" -#: ../../library/typing.rst:3669 +#: ../../library/typing.rst:3611 msgid ":class:`typing.ByteString`" msgstr ":class:`typing.ByteString`" -#: ../../library/typing.rst:3671 +#: ../../library/typing.rst:3613 msgid "3.14" msgstr "3.14" -#: ../../library/typing.rst:3672 +#: ../../library/typing.rst:3614 msgid ":gh:`91896`" msgstr ":gh:`91896`" -#: ../../library/typing.rst:3673 +#: ../../library/typing.rst:3615 msgid ":data:`typing.Text`" msgstr ":data:`typing.Text`" -#: ../../library/typing.rst:3674 +#: ../../library/typing.rst:3616 msgid "3.11" msgstr "3.11" -#: ../../library/typing.rst:3675 ../../library/typing.rst:3679 -#: ../../library/typing.rst:3683 +#: ../../library/typing.rst:3617 ../../library/typing.rst:3621 +#: ../../library/typing.rst:3625 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:3676 +#: ../../library/typing.rst:3618 msgid ":gh:`92332`" msgstr ":gh:`92332`" -#: ../../library/typing.rst:3677 +#: ../../library/typing.rst:3619 msgid ":class:`typing.Hashable` and :class:`typing.Sized`" msgstr ":class:`typing.Hashable` 和 :class:`typing.Sized`" -#: ../../library/typing.rst:3678 ../../library/typing.rst:3682 +#: ../../library/typing.rst:3620 ../../library/typing.rst:3624 msgid "3.12" msgstr "" -#: ../../library/typing.rst:3680 +#: ../../library/typing.rst:3622 msgid ":gh:`94309`" msgstr ":gh:`94309`" -#: ../../library/typing.rst:3681 +#: ../../library/typing.rst:3623 msgid ":data:`typing.TypeAlias`" msgstr ":data:`typing.TypeAlias`" -#: ../../library/typing.rst:3684 +#: ../../library/typing.rst:3626 msgid ":pep:`695`" msgstr ":pep:`695`" + +#~ msgid "" +#~ "This module provides runtime support for type hints. For the original " +#~ "specification of the typing system, see :pep:`484`. For a simplified " +#~ "introduction to type hints, see :pep:`483`." +#~ msgstr "" +#~ "這個模組提供可以支援型別提示的 runtime。關於加註型別系統的原有規格,請看 :" +#~ "pep:`484`。關於型別提示的簡易介紹,請看 :pep:`483`。" + +#~ msgid "" +#~ "The function below takes and returns a string and is annotated as " +#~ "follows::" +#~ msgstr "以下函式接受及回傳都是使用字串,且註解方式如下: ::" + +#~ msgid "" +#~ "In the function ``greeting``, the argument ``name`` is expected to be of " +#~ "type :class:`str` and the return type :class:`str`. Subtypes are accepted " +#~ "as arguments." +#~ msgstr "" +#~ "在函式 ``greeting`` 當中,引數 ``name`` 的型別應為 :class:`str` 且回傳的型" +#~ "別也是 :class:`str`。該引數也可以接受其子型別。" + +#~ msgid "" +#~ "For a summary of deprecated features and a deprecation timeline, please " +#~ "see `Deprecation Timeline of Major Features`_." +#~ msgstr "" +#~ "棄用功能及其棄用時間線的簡介,請看\\ `Deprecation Timeline of Major " +#~ "Features`_ \\。" + +#~ msgid "Relevant PEPs" +#~ msgstr "相關的 PEPs" + +#~ msgid "" +#~ "Since the initial introduction of type hints in :pep:`484` and :pep:" +#~ "`483`, a number of PEPs have modified and enhanced Python's framework for " +#~ "type annotations:" +#~ msgstr "" +#~ "自從 :pep:`484` 及 :pep:`483` 對於型別提示的基礎引入,多個 PEPs 針對型別註" +#~ "釋的 Python 框架進行修訂及加強:" + +#~ msgid ":pep:`526`: Syntax for Variable Annotations" +#~ msgstr ":pep:`526`:變數註釋的語法" + +#~ msgid "" +#~ "*Introducing* syntax for annotating variables outside of function " +#~ "definitions, and :data:`ClassVar`" +#~ msgstr "*引入*\\ 在定義函式之外的變數註釋語法,以及 :data:`ClassVar`" + +#~ msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)" +#~ msgstr "" +#~ ":pep:`544`: 協定:結構子型別 (Structural Subtyping) (靜態鴨子型別," +#~ "Static Duck Typing)" + +#~ msgid "" +#~ "*Introducing* :class:`Protocol` and the :func:" +#~ "`@runtime_checkable` decorator" +#~ msgstr "" +#~ "*引入* :class:`Protocol` 以及 :func:" +#~ "`@runtime_checkable` 裝飾器 (decorator)" + +#~ msgid ":pep:`585`: Type Hinting Generics In Standard Collections" +#~ msgstr "" +#~ ":pep:`585`:基礎彙集 (collection) 中的型別提示泛型 (Type Hinting Generics " +#~ "In Standard Collections)" + +#~ msgid "" +#~ "*Introducing* :class:`types.GenericAlias` and the ability to use standard " +#~ "library classes as :ref:`generic types`" +#~ msgstr "" +#~ "*引入* :class:`types.GenericAlias` 以及使用基礎函式庫類別 :ref:`generic " +#~ "types` 的能力" + +#~ msgid ":pep:`586`: Literal Types" +#~ msgstr ":pep:`586`:文字型別" + +#~ msgid "*Introducing* :data:`Literal`" +#~ msgstr "*引入* :data:`Literal`" + +#~ msgid "" +#~ ":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of " +#~ "Keys" +#~ msgstr ":pep:`589`:TypedDict:含有一組固定 (fixed) 鍵值的型別提示字典" + +#~ msgid "*Introducing* :class:`TypedDict`" +#~ msgstr "*引入* :class:`TypedDict`" + +#~ msgid ":pep:`591`: Adding a final qualifier to typing" +#~ msgstr ":pep:`591`:為型別新增一個最終限定符 (final qualifier)" + +#~ msgid "*Introducing* :data:`Final` and the :func:`@final` decorator" +#~ msgstr "*引入* :data:`Final` 以及 :func:`@final` 裝飾器" + +#~ msgid ":pep:`593`: Flexible function and variable annotations" +#~ msgstr ":pep:`593`:彈性函式及變數註釋" + +#~ msgid "*Introducing* :data:`Annotated`" +#~ msgstr "*引入* :data:`Annotated`" + +#~ msgid ":pep:`604`: Allow writing union types as ``X | Y``" +#~ msgstr ":pep:`604`:允許寫入聯集型別 (union type) 為 ``X | Y``" + +#~ msgid "" +#~ "*Introducing* :data:`types.UnionType` and the ability to use the binary-" +#~ "or operator ``|`` to signify a :ref:`union of types`" +#~ msgstr "" +#~ "*引入* :data:`types.UnionType` 以及使用 binary-or 運算子 ``|`` 以表示\\ :" +#~ "ref:`型別聯合 `\\ 的能力" + +#~ msgid ":pep:`612`: Parameter Specification Variables" +#~ msgstr ":pep:`612`:參數規格變數 (Parameter Specification Variable)" + +#~ msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`" +#~ msgstr "*引入* :class:`ParamSpec` 及 :data:`Concatenate`" + +#~ msgid ":pep:`613`: Explicit Type Aliases" +#~ msgstr ":pep:`613`:顯式型別別名 (Explicit Type Alias)" + +#~ msgid "*Introducing* :data:`TypeAlias`" +#~ msgstr "*引入* :data:`TypeAlias`" + +#~ msgid ":pep:`646`: Variadic Generics" +#~ msgstr ":pep:`646`:可變參數泛型 (Variadic Generic)" + +#~ msgid "*Introducing* :data:`TypeVarTuple`" +#~ msgstr "*引入* :data:`TypeVarTuple`" + +#~ msgid ":pep:`647`: User-Defined Type Guards" +#~ msgstr ":pep:`647`:使用者定義的型別防護 (Type Guard)" + +#~ msgid "*Introducing* :data:`TypeGuard`" +#~ msgstr "*引入* :data:`TypeGuard`" + +#~ msgid "" +#~ ":pep:`655`: Marking individual TypedDict items as required or potentially " +#~ "missing" +#~ msgstr ":pep:`655`:標記個別的 TypedDict 物件為必需的或可能遺失的" + +#~ msgid "*Introducing* :data:`Required` and :data:`NotRequired`" +#~ msgstr "*引入* :data:`Required` 和 :data:`NotRequired`" + +#~ msgid ":pep:`673`: Self type" +#~ msgstr ":pep:`673`:Self 型別" + +#~ msgid "*Introducing* :data:`Self`" +#~ msgstr "*引入* :data:`Self`" + +#~ msgid ":pep:`675`: Arbitrary Literal String Type" +#~ msgstr ":pep:`675`:任意的文本字串型別 (Arbitrary Literal String Type)" + +#~ msgid "*Introducing* :data:`LiteralString`" +#~ msgstr "*引入* :data:`LiteralString`" + +#~ msgid ":pep:`681`: Data Class Transforms" +#~ msgstr ":pep:`681`:資料類別轉換" + +#~ msgid "" +#~ "*Introducing* the :func:`@dataclass_transform` " +#~ "decorator" +#~ msgstr "*引入* :func:`@dataclass_transform` 裝飾器" + +#~ msgid ":pep:`692`: Using ``TypedDict`` for more precise ``**kwargs`` typing" +#~ msgstr ":pep:`692`:為更精準的 ``**kwargs`` 型別使用 ``TypedDict``" + +#~ msgid "" +#~ "*Introducing* a new way of typing ``**kwargs`` with :data:`Unpack` and :" +#~ "data:`TypedDict`" +#~ msgstr "" +#~ "*引入* 型別 ``**kwargs`` 的新方式 :data:`Unpack` 以及 :data:`TypedDict`" + +#~ msgid ":pep:`695`: Type Parameter Syntax" +#~ msgstr ":pep:`695`:型別參數語法" + +#~ msgid "" +#~ "*Introducing* builtin syntax for creating generic functions, classes, and " +#~ "type aliases." +#~ msgstr "*引入*\\ 建立泛型函式、類別、型別別名的內建語法。" + +#~ msgid ":pep:`698`: Adding an override decorator to typing" +#~ msgstr ":pep:`698`:為型別新增可覆寫的裝飾器" + +#~ msgid "*Introducing* the :func:`@override` decorator" +#~ msgstr "*引入* :func:`@override` 裝飾器" diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index c38b74abf7..68ffd9f057 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -976,7 +976,7 @@ msgid "" msgstr "" "當你將 ``Mock`` 或 ``MagicMock`` 子類別化時,所有屬性會被動態建立,且 " "``return_value`` 會自動使用你的子類別。這代表著 ``CopyingMock`` 的所有子代 " -"(child) 也會具有``CopyingMock`` 型別。" +"(child) 也會具有 ``CopyingMock`` 型別。" #: ../../library/unittest.mock-examples.rst:941 msgid "Nesting Patches" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index e82c8bda3e..32ca62460b 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-16 00:03+0000\n" -"PO-Revision-Date: 2024-03-27 08:49+0800\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" +"PO-Revision-Date: 2024-02-19 21:27+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -73,10 +73,10 @@ msgstr "" #: ../../library/unittest.mock.rst:37 msgid "" "There is a backport of :mod:`unittest.mock` for earlier versions of Python, " -"available as `mock on PyPI `_." +"available as :pypi:`mock` on PyPI." msgstr "" "對於早期版本的 Python,有一個 backport(向後移植的)\\ :mod:`unittest.mock` " -"可以使用,\\ `從 PyPI 下載 mock `_。" +"可以使用,可從 PyPI 下載 :pypi:`mock`。" #: ../../library/unittest.mock.rst:42 msgid "Quick Guide" @@ -2997,3 +2997,87 @@ msgid "" msgstr "" "如果將具有名稱或規格的 mock 實例指派給屬性,則不會出現在密封鏈中。這表示可藉" "由固定 mock 物件的一部分來防止密封。: ::" + +#: ../../library/unittest.mock.rst:2788 +msgid "" +"Order of precedence of :attr:`side_effect`, :attr:`return_value` and *wraps*" +msgstr "" + +#: ../../library/unittest.mock.rst:2790 +msgid "The order of their precedence is:" +msgstr "" + +#: ../../library/unittest.mock.rst:2792 +msgid ":attr:`~Mock.side_effect`" +msgstr ":attr:`~Mock.side_effect`" + +#: ../../library/unittest.mock.rst:2793 +msgid ":attr:`~Mock.return_value`" +msgstr ":attr:`~Mock.return_value`" + +#: ../../library/unittest.mock.rst:2794 +msgid "*wraps*" +msgstr "" + +#: ../../library/unittest.mock.rst:2796 +msgid "" +"If all three are set, mock will return the value from :attr:`~Mock." +"side_effect`, ignoring :attr:`~Mock.return_value` and the wrapped object " +"altogether. If any two are set, the one with the higher precedence will " +"return the value. Regardless of the order of which was set first, the order " +"of precedence remains unchanged." +msgstr "" + +#: ../../library/unittest.mock.rst:2814 +msgid "" +"As ``None`` is the default value of :attr:`~Mock.side_effect`, if you " +"reassign its value back to ``None``, the order of precedence will be checked " +"between :attr:`~Mock.return_value` and the wrapped object, ignoring :attr:" +"`~Mock.side_effect`." +msgstr "" + +#: ../../library/unittest.mock.rst:2823 +msgid "" +"If the value being returned by :attr:`~Mock.side_effect` is :data:`DEFAULT`, " +"it is ignored and the order of precedence moves to the successor to obtain " +"the value to return." +msgstr "" + +#: ../../library/unittest.mock.rst:2832 +msgid "" +"When :class:`Mock` wraps an object, the default value of :attr:`~Mock." +"return_value` will be :data:`DEFAULT`." +msgstr "" + +#: ../../library/unittest.mock.rst:2841 +msgid "" +"The order of precedence will ignore this value and it will move to the last " +"successor which is the wrapped object." +msgstr "" + +#: ../../library/unittest.mock.rst:2844 +msgid "" +"As the real call is being made to the wrapped object, creating an instance " +"of this mock will return the real instance of the class. The positional " +"arguments, if any, required by the wrapped object must be passed." +msgstr "" + +#: ../../library/unittest.mock.rst:2862 +msgid "" +"But if you assign ``None`` to it, this will not be ignored as it is an " +"explicit assignment. So, the order of precedence will not move to the " +"wrapped object." +msgstr "" + +#: ../../library/unittest.mock.rst:2870 +msgid "" +"Even if you set all three at once when initializing the mock, the order of " +"precedence remains the same:" +msgstr "" + +#: ../../library/unittest.mock.rst:2887 +msgid "" +"If :attr:`~Mock.side_effect` is exhausted, the order of precedence will not " +"cause a value to be obtained from the successors. Instead, ``StopIteration`` " +"exception is raised." +msgstr "" diff --git a/library/unittest.po b/library/unittest.po index b14166b8cd..f8bf4f18f0 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-10-16 06:03+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -56,7 +56,7 @@ msgid "" "object-oriented way:" msgstr ":mod:`unittest` 用來作為實現支援一些重要的物件導向方法的概念:" -#: ../../library/unittest.rst:32 +#: ../../library/unittest.rst:28 msgid "test fixture" msgstr "test fixture" @@ -71,7 +71,7 @@ msgstr "" "操作,例如可以是建立臨時性的或是代理用 (proxy) 資料庫、目錄、或是啟動一個伺服" "器程序。" -#: ../../library/unittest.rst:37 +#: ../../library/unittest.rst:34 msgid "test case" msgstr "test case(測試用例)" @@ -85,7 +85,7 @@ msgstr "" "特殊回饋。 :mod:`unittest` 提供一個基礎類別,類別 :class:`TestCase`\\ ,可以" "用來建立一個新的測試條例。" -#: ../../library/unittest.rst:41 +#: ../../library/unittest.rst:39 msgid "test suite" msgstr "test suite(測試套件)" @@ -97,7 +97,7 @@ msgstr "" ":dfn:`test suite` 是一個搜集測試條例,測試套件,或是兩者皆有。它需要一起被執" "行並用來匯總測試。" -#: ../../library/unittest.rst:48 +#: ../../library/unittest.rst:43 msgid "test runner" msgstr "test runner(測試執行器)" @@ -111,7 +111,7 @@ msgstr "" ":dfn:`test runner` 是一個編排測試執行與提供結果給使用者的一個元件。執行器可以" "使用圖形化介面,文字介面或是回傳一個特別值用來標示出執行測試的結果。" -#: ../../library/unittest.rst:53 +#: ../../library/unittest.rst:52 msgid "Module :mod:`doctest`" msgstr ":mod:`doctest` 模組" @@ -119,7 +119,7 @@ msgstr ":mod:`doctest` 模組" msgid "Another test-support module with a very different flavor." msgstr "另一個執行測試的模組,但使用不一樣的測試方法與規範。" -#: ../../library/unittest.rst:57 +#: ../../library/unittest.rst:55 msgid "" "`Simple Smalltalk Testing: With Patterns `_" @@ -133,7 +133,7 @@ msgid "" "by :mod:`unittest`." msgstr "Kent Beck 的原始論文討論使用 :mod:`unittest` 這樣模式的測試框架。" -#: ../../library/unittest.rst:61 +#: ../../library/unittest.rst:59 msgid "`pytest `_" msgstr "`pytest `_" @@ -145,7 +145,7 @@ msgstr "" "第三方的單元測試框架,但在撰寫測試時使用更輕量的語法。例如: ``assert " "func(10) == 42``\\ 。" -#: ../../library/unittest.rst:65 +#: ../../library/unittest.rst:63 msgid "" "`The Python Testing Tools Taxonomy `_" @@ -161,7 +161,7 @@ msgstr "" "一份詳細的 Python 測試工具列表,包含 functional testing 框架和mock object 函" "式庫。" -#: ../../library/unittest.rst:69 +#: ../../library/unittest.rst:67 msgid "" "`Testing in Python Mailing List `_" diff --git a/library/urllib.parse.po b/library/urllib.parse.po index 782e24688f..8a2165d1c8 100644 --- a/library/urllib.parse.po +++ b/library/urllib.parse.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -878,7 +878,7 @@ msgstr "" msgid "Added the *quote_via* parameter." msgstr "新增 *quote_via* 參數。" -#: ../../library/urllib.parse.rst:740 +#: ../../library/urllib.parse.rst:738 msgid "`WHATWG`_ - URL Living standard" msgstr "" @@ -888,7 +888,7 @@ msgid "" "the application/x-www-form-urlencoded format, and their API." msgstr "" -#: ../../library/urllib.parse.rst:746 +#: ../../library/urllib.parse.rst:742 msgid ":rfc:`3986` - Uniform Resource Identifiers" msgstr "" @@ -900,7 +900,7 @@ msgid "" "requirements as commonly observed in major browsers." msgstr "" -#: ../../library/urllib.parse.rst:749 +#: ../../library/urllib.parse.rst:748 msgid ":rfc:`2732` - Format for Literal IPv6 Addresses in URL's." msgstr "" @@ -908,7 +908,7 @@ msgstr "" msgid "This specifies the parsing requirements of IPv6 URLs." msgstr "" -#: ../../library/urllib.parse.rst:753 +#: ../../library/urllib.parse.rst:751 msgid ":rfc:`2396` - Uniform Resource Identifiers (URI): Generic Syntax" msgstr "" @@ -918,7 +918,7 @@ msgid "" "Resource Names (URNs) and Uniform Resource Locators (URLs)." msgstr "" -#: ../../library/urllib.parse.rst:756 +#: ../../library/urllib.parse.rst:755 msgid ":rfc:`2368` - The mailto URL scheme." msgstr "" @@ -926,7 +926,7 @@ msgstr "" msgid "Parsing requirements for mailto URL schemes." msgstr "" -#: ../../library/urllib.parse.rst:761 +#: ../../library/urllib.parse.rst:758 msgid ":rfc:`1808` - Relative Uniform Resource Locators" msgstr "" ":rfc:`1808` - 相對的統一資源定位器 (Relative Uniform Resource Locators)" diff --git a/library/uuid.po b/library/uuid.po index 9048e97b5b..4868a3e09f 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-03 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -341,7 +341,7 @@ msgstr "保留供 Microsoft 相容性使用。" msgid "Reserved for future definition." msgstr "保留供未來定義使用。" -#: ../../library/uuid.rst:271 +#: ../../library/uuid.rst:270 msgid ":rfc:`4122` - A Universally Unique IDentifier (UUID) URN Namespace" msgstr "" ":rfc:`4122` - 通用唯一辨識碼 (UUID, Universally Unique IDentifier) 的 URN 命" diff --git a/library/venv.po b/library/venv.po index 3a72499425..7d3417cbb7 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-19 19:55+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2023-07-09 15:09+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -41,8 +41,8 @@ msgstr "" #: ../../library/venv.rst:29 msgid "" "When used from within a virtual environment, common installation tools such " -"as `pip`_ will install Python packages into a virtual environment without " -"needing to be told to do so explicitly." +"as :pypi:`pip` will install Python packages into a virtual environment " +"without needing to be told to do so explicitly." msgstr "" #: ../../library/venv.rst:33 @@ -88,7 +88,7 @@ msgstr "更多關於 Python 虛擬環境的背景資訊請見 :pep:`405`\\ 。" msgid "" "`Python Packaging User Guide: Creating and using virtual environments " "`__" +"environments/#create-and-use-virtual-environments>`__" msgstr "" #: ../../includes/wasm-notavail.rst:3 diff --git a/library/wave.po b/library/wave.po index 98dce2aa68..94b89a7403 100644 --- a/library/wave.po +++ b/library/wave.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -55,7 +55,7 @@ msgstr "" "如果 *file* 是一個字串,會打開對應名稱的檔案,否則會以類檔案物件處理。*mode* " "可以是:" -#: ../../library/wave.rst:32 +#: ../../library/wave.rst:31 msgid "``'rb'``" msgstr "``'rb'``" @@ -63,7 +63,7 @@ msgstr "``'rb'``" msgid "Read only mode." msgstr "唯讀模式。" -#: ../../library/wave.rst:35 +#: ../../library/wave.rst:34 msgid "``'wb'``" msgstr "``'wb'``" diff --git a/library/weakref.po b/library/weakref.po index 7dc80648fd..8baa40ecf8 100644 --- a/library/weakref.po +++ b/library/weakref.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 17:13+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -406,7 +406,7 @@ msgid "" "both proxy types." msgstr "" -#: ../../library/weakref.rst:357 +#: ../../library/weakref.rst:356 msgid ":pep:`205` - Weak References" msgstr "" diff --git a/library/xdrlib.po b/library/xdrlib.po index 43f81acec7..436b12ba1c 100644 --- a/library/xdrlib.po +++ b/library/xdrlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-01-31 07:33+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -60,7 +60,7 @@ msgid "" "string buffer. The input buffer is given as *data*." msgstr "" -#: ../../library/xdrlib.rst:45 +#: ../../library/xdrlib.rst:43 msgid ":rfc:`1014` - XDR: External Data Representation Standard" msgstr "" diff --git a/library/xml.dom.po b/library/xml.dom.po index 9c4f9c250d..f3d6653379 100644 --- a/library/xml.dom.po +++ b/library/xml.dom.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-13 13:14+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -93,7 +93,7 @@ msgid "" "mapping requirements." msgstr "" -#: ../../library/xml.dom.rst:71 +#: ../../library/xml.dom.rst:70 msgid "" "`Document Object Model (DOM) Level 2 Specification `_" @@ -103,7 +103,7 @@ msgstr "" msgid "The W3C recommendation upon which the Python DOM API is based." msgstr "" -#: ../../library/xml.dom.rst:74 +#: ../../library/xml.dom.rst:73 msgid "" "`Document Object Model (DOM) Level 1 Specification `_" diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po index 7420008ab9..0f2e8e3a9a 100644 --- a/library/xml.etree.elementtree.po +++ b/library/xml.etree.elementtree.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 00:03+0000\n" +"POT-Creation-Date: 2024-04-12 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -79,8 +79,8 @@ msgstr "剖析 XML" #: ../../library/xml.etree.elementtree.rst:52 msgid "" -"We'll be using the following XML document as the sample data for this " -"section:" +"We'll be using the fictive :file:`country_data.xml` XML document as the " +"sample data for this section:" msgstr "" #: ../../library/xml.etree.elementtree.rst:80 @@ -677,7 +677,7 @@ msgid "" msgstr "" #: ../../library/xml.etree.elementtree.rst:647 -#: ../../library/xml.etree.elementtree.rst:1520 +#: ../../library/xml.etree.elementtree.rst:1515 msgid "If you need a fully populated element, look for \"end\" events instead." msgstr "" @@ -686,7 +686,7 @@ msgid "The *parser* argument." msgstr "*parser* 引數。" #: ../../library/xml.etree.elementtree.rst:652 -#: ../../library/xml.etree.elementtree.rst:1524 +#: ../../library/xml.etree.elementtree.rst:1519 msgid "The ``comment`` and ``pi`` events were added." msgstr "新增 *context* 與 *check_hostname* 事件。" @@ -752,7 +752,7 @@ msgstr "" #: ../../library/xml.etree.elementtree.rst:713 #: ../../library/xml.etree.elementtree.rst:740 -#: ../../library/xml.etree.elementtree.rst:1197 +#: ../../library/xml.etree.elementtree.rst:1192 msgid "Added the *short_empty_elements* parameter." msgstr "新增 *short_empty_elements* 參數。" @@ -860,50 +860,45 @@ msgstr "" msgid "The result might look something like:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:841 +#: ../../library/xml.etree.elementtree.rst:840 msgid "" -"Default loader. This default loader reads an included resource from disk. " -"*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". " +"Default loader. This default loader reads an included resource from disk. " +"*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". " "*encoding* is an optional text encoding. If not given, encoding is " -"``utf-8``. Returns the expanded resource. If the parse mode is " -"``\"xml\"``, this is an ElementTree instance. If the parse mode is " -"\"text\", this is a Unicode string. If the loader fails, it can return None " -"or raise an exception." +"``utf-8``. Returns the expanded resource. If the parse mode is ``\"xml\"``, " +"this is an :class:`~xml.etree.ElementTree.Element` instance. If the parse " +"mode is ``\"text\"``, this is a string. If the loader fails, it can return " +"``None`` or raise an exception." msgstr "" -#: ../../library/xml.etree.elementtree.rst:853 +#: ../../library/xml.etree.elementtree.rst:851 msgid "" -"This function expands XInclude directives. *elem* is the root element. " -"*loader* is an optional resource loader. If omitted, it defaults to :func:" -"`default_loader`. If given, it should be a callable that implements the same " -"interface as :func:`default_loader`. *base_url* is base URL of the original " -"file, to resolve relative include file references. *max_depth* is the " -"maximum number of recursive inclusions. Limited to reduce the risk of " -"malicious content explosion. Pass a negative value to disable the limitation." +"This function expands XInclude directives in-place in tree pointed by " +"*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or " +"an :class:`~xml.etree.ElementTree.ElementTree` instance to find such " +"element. *loader* is an optional resource loader. If omitted, it defaults " +"to :func:`default_loader`. If given, it should be a callable that implements " +"the same interface as :func:`default_loader`. *base_url* is base URL of the " +"original file, to resolve relative include file references. *max_depth* is " +"the maximum number of recursive inclusions. Limited to reduce the risk of " +"malicious content explosion. Pass ``None`` to disable the limitation." msgstr "" #: ../../library/xml.etree.elementtree.rst:861 -msgid "" -"Returns the expanded resource. If the parse mode is ``\"xml\"``, this is an " -"ElementTree instance. If the parse mode is \"text\", this is a Unicode " -"string. If the loader fails, it can return None or raise an exception." -msgstr "" - -#: ../../library/xml.etree.elementtree.rst:866 msgid "Added the *base_url* and *max_depth* parameters." msgstr "新增 *base_url* 與 *max_depth* 參數。" -#: ../../library/xml.etree.elementtree.rst:873 +#: ../../library/xml.etree.elementtree.rst:868 msgid "Element Objects" msgstr "Element 物件" -#: ../../library/xml.etree.elementtree.rst:880 +#: ../../library/xml.etree.elementtree.rst:875 msgid "" "Element class. This class defines the Element interface, and provides a " "reference implementation of this interface." msgstr "" -#: ../../library/xml.etree.elementtree.rst:883 +#: ../../library/xml.etree.elementtree.rst:878 msgid "" "The element name, attribute names, and attribute values can be either " "bytestrings or Unicode strings. *tag* is the element name. *attrib* is an " @@ -911,13 +906,13 @@ msgid "" "additional attributes, given as keyword arguments." msgstr "" -#: ../../library/xml.etree.elementtree.rst:891 +#: ../../library/xml.etree.elementtree.rst:886 msgid "" "A string identifying what kind of data this element represents (the element " "type, in other words)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:898 +#: ../../library/xml.etree.elementtree.rst:893 msgid "" "These attributes can be used to hold additional data associated with the " "element. Their values are usually strings but may be any application-" @@ -928,7 +923,7 @@ msgid "" "the XML data" msgstr "" -#: ../../library/xml.etree.elementtree.rst:910 +#: ../../library/xml.etree.elementtree.rst:905 msgid "" "the *a* element has ``None`` for both *text* and *tail* attributes, the *b* " "element has *text* ``\"1\"`` and *tail* ``\"4\"``, the *c* element has " @@ -936,17 +931,17 @@ msgid "" "``None`` and *tail* ``\"3\"``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:915 +#: ../../library/xml.etree.elementtree.rst:910 msgid "" "To collect the inner text of an element, see :meth:`itertext`, for example " "``\"\".join(element.itertext())``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:918 +#: ../../library/xml.etree.elementtree.rst:913 msgid "Applications may store arbitrary objects in these attributes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:923 +#: ../../library/xml.etree.elementtree.rst:918 msgid "" "A dictionary containing the element's attributes. Note that while the " "*attrib* value is always a real mutable Python dictionary, an ElementTree " @@ -955,59 +950,59 @@ msgid "" "implementations, use the dictionary methods below whenever possible." msgstr "" -#: ../../library/xml.etree.elementtree.rst:929 +#: ../../library/xml.etree.elementtree.rst:924 msgid "The following dictionary-like methods work on the element attributes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:934 +#: ../../library/xml.etree.elementtree.rst:929 msgid "" "Resets an element. This function removes all subelements, clears all " "attributes, and sets the text and tail attributes to ``None``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:940 +#: ../../library/xml.etree.elementtree.rst:935 msgid "Gets the element attribute named *key*." msgstr "" -#: ../../library/xml.etree.elementtree.rst:942 +#: ../../library/xml.etree.elementtree.rst:937 msgid "" "Returns the attribute value, or *default* if the attribute was not found." msgstr "" -#: ../../library/xml.etree.elementtree.rst:947 +#: ../../library/xml.etree.elementtree.rst:942 msgid "" "Returns the element attributes as a sequence of (name, value) pairs. The " "attributes are returned in an arbitrary order." msgstr "" -#: ../../library/xml.etree.elementtree.rst:953 +#: ../../library/xml.etree.elementtree.rst:948 msgid "" "Returns the elements attribute names as a list. The names are returned in " "an arbitrary order." msgstr "" -#: ../../library/xml.etree.elementtree.rst:959 +#: ../../library/xml.etree.elementtree.rst:954 msgid "Set the attribute *key* on the element to *value*." msgstr "" -#: ../../library/xml.etree.elementtree.rst:961 +#: ../../library/xml.etree.elementtree.rst:956 msgid "The following methods work on the element's children (subelements)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:966 +#: ../../library/xml.etree.elementtree.rst:961 msgid "" "Adds the element *subelement* to the end of this element's internal list of " "subelements. Raises :exc:`TypeError` if *subelement* is not an :class:" "`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:973 +#: ../../library/xml.etree.elementtree.rst:968 msgid "" "Appends *subelements* from a sequence object with zero or more elements. " "Raises :exc:`TypeError` if a subelement is not an :class:`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:981 +#: ../../library/xml.etree.elementtree.rst:976 msgid "" "Finds the first subelement matching *match*. *match* may be a tag name or " "a :ref:`path `. Returns an element instance or " @@ -1016,7 +1011,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:990 +#: ../../library/xml.etree.elementtree.rst:985 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document " @@ -1025,7 +1020,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:999 +#: ../../library/xml.etree.elementtree.rst:994 msgid "" "Finds text for the first subelement matching *match*. *match* may be a tag " "name or a :ref:`path `. Returns the text content of the " @@ -1036,13 +1031,13 @@ msgid "" "into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1010 +#: ../../library/xml.etree.elementtree.rst:1005 msgid "" "Inserts *subelement* at the given position in this element. Raises :exc:" "`TypeError` if *subelement* is not an :class:`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1016 +#: ../../library/xml.etree.elementtree.rst:1011 msgid "" "Creates a tree :term:`iterator` with the current element as the root. The " "iterator iterates over this element and all elements below it, in document " @@ -1051,7 +1046,7 @@ msgid "" "structure is modified during iteration, the result is undefined." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1027 +#: ../../library/xml.etree.elementtree.rst:1022 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document " @@ -1059,44 +1054,44 @@ msgid "" "name." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1038 +#: ../../library/xml.etree.elementtree.rst:1033 msgid "" "Creates a text iterator. The iterator loops over this element and all " "subelements, in document order, and returns all inner text." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1046 +#: ../../library/xml.etree.elementtree.rst:1041 msgid "" "Creates a new element object of the same type as this element. Do not call " "this method, use the :func:`SubElement` factory function instead." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1052 +#: ../../library/xml.etree.elementtree.rst:1047 msgid "" "Removes *subelement* from the element. Unlike the find\\* methods this " "method compares elements based on the instance identity, not on tag value or " "contents." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1056 +#: ../../library/xml.etree.elementtree.rst:1051 msgid "" ":class:`Element` objects also support the following sequence type methods " "for working with subelements: :meth:`~object.__delitem__`, :meth:`~object." "__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__len__`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1061 +#: ../../library/xml.etree.elementtree.rst:1056 msgid "" "Caution: Elements with no subelements will test as ``False``. Testing the " "truth value of an Element is deprecated and will raise an exception in " "Python 3.14. Use specific ``len(elem)`` or ``elem is None`` test instead.::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1073 +#: ../../library/xml.etree.elementtree.rst:1068 msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1076 +#: ../../library/xml.etree.elementtree.rst:1071 msgid "" "Prior to Python 3.8, the serialisation order of the XML attributes of " "elements was artificially made predictable by sorting the attributes by " @@ -1105,7 +1100,7 @@ msgid "" "attributes were originally parsed or created by user code." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1082 +#: ../../library/xml.etree.elementtree.rst:1077 msgid "" "In general, user code should try not to depend on a specific ordering of " "attributes, given that the `XML Information Set `_ writer. Arguments are the " "same as for the :func:`canonicalize` function. This class does not build a " @@ -1341,11 +1336,11 @@ msgid "" "using the *write* function." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1361 +#: ../../library/xml.etree.elementtree.rst:1356 msgid "XMLParser Objects" msgstr "XMLParser 物件" -#: ../../library/xml.etree.elementtree.rst:1366 +#: ../../library/xml.etree.elementtree.rst:1361 msgid "" "This class is the low-level building block of the module. It uses :mod:`xml." "parsers.expat` for efficient, event-based parsing of XML. It can be fed XML " @@ -1356,25 +1351,25 @@ msgid "" "XML file." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1374 +#: ../../library/xml.etree.elementtree.rst:1369 msgid "" "Parameters are now :ref:`keyword-only `. The *html* " "argument no longer supported." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1381 +#: ../../library/xml.etree.elementtree.rst:1376 msgid "" "Finishes feeding data to the parser. Returns the result of calling the " "``close()`` method of the *target* passed during construction; by default, " "this is the toplevel document element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1388 +#: ../../library/xml.etree.elementtree.rst:1383 msgid "Feeds data to the parser. *data* is encoded data." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1393 -#: ../../library/xml.etree.elementtree.rst:1471 +#: ../../library/xml.etree.elementtree.rst:1388 +#: ../../library/xml.etree.elementtree.rst:1466 msgid "" "Triggers parsing of any previously fed unparsed data, which can be used to " "ensure more immediate feedback, in particular with Expat >=2.6.0. The " @@ -1384,15 +1379,15 @@ msgid "" "xmlparser.SetReparseDeferralEnabled` for details." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1400 -#: ../../library/xml.etree.elementtree.rst:1478 +#: ../../library/xml.etree.elementtree.rst:1395 +#: ../../library/xml.etree.elementtree.rst:1473 msgid "" "Note that :meth:`flush` has been backported to some prior releases of " "CPython as a security fix. Check for availability of :meth:`flush` using :" "func:`hasattr` if used in code running across a variety of Python versions." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1408 +#: ../../library/xml.etree.elementtree.rst:1403 msgid "" ":meth:`XMLParser.feed` calls *target*\\'s ``start(tag, attrs_dict)`` method " "for each opening tag, its ``end(tag)`` method for each closing tag, and data " @@ -1403,11 +1398,11 @@ msgid "" "of an XML file::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1452 +#: ../../library/xml.etree.elementtree.rst:1447 msgid "XMLPullParser Objects" msgstr "XMLPullParser 物件" -#: ../../library/xml.etree.elementtree.rst:1456 +#: ../../library/xml.etree.elementtree.rst:1451 msgid "" "A pull parser suitable for non-blocking applications. Its input-side API is " "similar to that of :class:`XMLParser`, but instead of pushing calls to a " @@ -1419,11 +1414,11 @@ msgid "" "If *events* is omitted, only ``\"end\"`` events are reported." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1467 +#: ../../library/xml.etree.elementtree.rst:1462 msgid "Feed the given bytes data to the parser." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1487 +#: ../../library/xml.etree.elementtree.rst:1482 msgid "" "Signal the parser that the data stream is terminated. Unlike :meth:" "`XMLParser.close`, this method always returns :const:`None`. Any events not " @@ -1431,7 +1426,7 @@ msgid "" "`read_events`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1494 +#: ../../library/xml.etree.elementtree.rst:1489 msgid "" "Return an iterator over the events which have been encountered in the data " "fed to the parser. The iterator yields ``(event, elem)`` pairs, where " @@ -1440,25 +1435,25 @@ msgid "" "follows." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1500 +#: ../../library/xml.etree.elementtree.rst:1495 msgid "``start``, ``end``: the current Element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1501 +#: ../../library/xml.etree.elementtree.rst:1496 msgid "``comment``, ``pi``: the current comment / processing instruction" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1502 +#: ../../library/xml.etree.elementtree.rst:1497 msgid "" "``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace " "mapping." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1504 +#: ../../library/xml.etree.elementtree.rst:1499 msgid "``end-ns``: :const:`None` (this may change in a future version)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1506 +#: ../../library/xml.etree.elementtree.rst:1501 msgid "" "Events provided in a previous call to :meth:`read_events` will not be " "yielded again. Events are consumed from the internal queue only when they " @@ -1467,7 +1462,7 @@ msgid "" "results." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1514 +#: ../../library/xml.etree.elementtree.rst:1509 msgid "" ":class:`XMLPullParser` only guarantees that it has seen the \">\" character " "of a starting tag when it emits a \"start\" event, so the attributes are " @@ -1476,11 +1471,11 @@ msgid "" "be present." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1529 +#: ../../library/xml.etree.elementtree.rst:1524 msgid "Exceptions" msgstr "例外" -#: ../../library/xml.etree.elementtree.rst:1533 +#: ../../library/xml.etree.elementtree.rst:1528 msgid "" "XML parse error, raised by the various parsing methods in this module when " "parsing fails. The string representation of an instance of this exception " @@ -1488,22 +1483,22 @@ msgid "" "following attributes available:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1540 +#: ../../library/xml.etree.elementtree.rst:1535 msgid "" "A numeric error code from the expat parser. See the documentation of :mod:" "`xml.parsers.expat` for the list of error codes and their meanings." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1545 +#: ../../library/xml.etree.elementtree.rst:1540 msgid "" "A tuple of *line*, *column* numbers, specifying where the error occurred." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1548 +#: ../../library/xml.etree.elementtree.rst:1543 msgid "Footnotes" msgstr "註解" -#: ../../library/xml.etree.elementtree.rst:1549 +#: ../../library/xml.etree.elementtree.rst:1544 msgid "" "The encoding string included in XML output should conform to the appropriate " "standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See " diff --git a/library/xml.po b/library/xml.po index 6d44e025d5..09721a17e1 100644 --- a/library/xml.po +++ b/library/xml.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-22 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2023-08-21 02:16+0000\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -148,7 +148,7 @@ msgstr "**脆弱** (1)" msgid "quadratic blowup" msgstr "二次爆炸 (quadratic blowup)" -#: ../../library/xml.rst:68 ../../library/xml.rst:109 +#: ../../library/xml.rst:68 ../../library/xml.rst:106 msgid "external entity expansion" msgstr "外部實體擴展 (external entity expansion)" @@ -168,7 +168,7 @@ msgstr "安全 (3)" msgid "Safe (4)" msgstr "安全 (4)" -#: ../../library/xml.rst:69 ../../library/xml.rst:114 +#: ../../library/xml.rst:69 ../../library/xml.rst:111 msgid "`DTD`_ retrieval" msgstr "`DTD`_ 檢索" @@ -176,7 +176,7 @@ msgstr "`DTD`_ 檢索" msgid "Safe" msgstr "安全" -#: ../../library/xml.rst:70 ../../library/xml.rst:121 +#: ../../library/xml.rst:70 ../../library/xml.rst:116 msgid "decompression bomb" msgstr "解壓縮炸彈 (decompression bomb)" @@ -184,7 +184,7 @@ msgstr "解壓縮炸彈 (decompression bomb)" msgid "**Vulnerable**" msgstr "**脆弱**" -#: ../../library/xml.rst:71 ../../library/xml.rst:128 +#: ../../library/xml.rst:71 ../../library/xml.rst:123 msgid "large tokens" msgstr "大型 token" @@ -238,7 +238,7 @@ msgstr "" "影響。由於可能依賴系統提供的函式庫,因此仍被列為易受攻擊的項目。請參考 :" "const:`!pyexpat.EXPAT_VERSION`。" -#: ../../library/xml.rst:97 +#: ../../library/xml.rst:92 msgid "billion laughs / exponential entity expansion" msgstr "十億笑聲 / 指數實體擴展" @@ -254,7 +254,7 @@ msgstr "" "expansion))使用多層巢狀實體。每個實體多次引用另一個實體,最終的實體定義包含" "一個小字串。指數擴展會產生數 GB 的文本,並消耗大量記憶體和 CPU 時間。" -#: ../../library/xml.rst:104 +#: ../../library/xml.rst:99 msgid "quadratic blowup entity expansion" msgstr "二次爆炸實體擴展" @@ -303,36 +303,34 @@ msgstr "" msgid "" "Expat needs to re-parse unfinished tokens; without the protection introduced " "in Expat 2.6.0, this can lead to quadratic runtime that can be used to cause " -"denial of service in the application parsing XML. The issue is known as " -"`CVE-2023-52425 `_." +"denial of service in the application parsing XML. The issue is known as :cve:" +"`2023-52425`." msgstr "" "Expat 需要重新剖析未完成的 token;如果沒有 Expat 2.6.0 中引入的保護,這可能會" -"導致二次 runtime 而導致剖析 XML 的應用程式出現阻斷服務。此問題記錄於 " -"`CVE-2023-52425 `_。" +"導致二次 runtime 而導致剖析 XML 的應用程式出現阻斷服務。此問題記錄於 :cve:" +"`2023-52425`。" -#: ../../library/xml.rst:130 +#: ../../library/xml.rst:129 msgid "" -"The documentation for `defusedxml`_ on PyPI has further information about " -"all known attack vectors with examples and references." +"The documentation for :pypi:`defusedxml` on PyPI has further information " +"about all known attack vectors with examples and references." msgstr "" -"PyPI 上的 `defusedxml`_ 文件包含有關所有已知攻擊媒介 (attack vector) 的更多資" -"訊以及範例和參考資料。" +"PyPI 上的 :pypi:`defusedxml` 文件包含有關所有已知攻擊媒介 (attack vector) 的" +"更多資訊以及範例和參考資料。" -#: ../../library/xml.rst:136 +#: ../../library/xml.rst:135 msgid "The :mod:`!defusedxml` Package" msgstr ":mod:`!defusedxml` 套件" -#: ../../library/xml.rst:138 +#: ../../library/xml.rst:137 msgid "" -"`defusedxml`_ is a pure Python package with modified subclasses of all " +":pypi:`defusedxml` is a pure Python package with modified subclasses of all " "stdlib XML parsers that prevent any potentially malicious operation. Use of " "this package is recommended for any server code that parses untrusted XML " "data. The package also ships with example exploits and extended " "documentation on more XML exploits such as XPath injection." msgstr "" -"`defusedxml`_ 是一個純 Python 套件,其中包含所有標準函式庫中 XML 剖析器的修正" -"版本子類別,可防止任何潛在的惡意操作。當伺服器程式會剖析任何不受信任的 XML 資" -"料時建議使用此套件。該套件還附帶了更多有關 XML 漏洞(例如 XPath 注入)的範例" -"和延伸文件。" +":pypi:`defusedxml` 是一個純 Python 套件,其中包含所有標準函式庫中 XML 剖析器" +"的修正版本子類別,可防止任何潛在的惡意操作。當伺服器程式會剖析任何不受信任的 " +"XML 資料時建議使用此套件。該套件還附帶了更多有關 XML 漏洞(例如 XPath 注入)" +"的範例和延伸文件。" diff --git a/library/xml.sax.po b/library/xml.sax.po index f8b23a51d2..75aa124011 100644 --- a/library/xml.sax.po +++ b/library/xml.sax.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2016-11-19 00:36+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -173,7 +173,7 @@ msgid "" "applications and extensions may use this class for similar purposes." msgstr "" -#: ../../library/xml.sax.rst:148 +#: ../../library/xml.sax.rst:145 msgid "`SAX: The Simple API for XML `_" msgstr "" @@ -184,7 +184,7 @@ msgid "" "and historical information are also available." msgstr "" -#: ../../library/xml.sax.rst:151 +#: ../../library/xml.sax.rst:150 msgid "Module :mod:`xml.sax.handler`" msgstr ":mod:`xml.sax.handler` 模組" @@ -192,7 +192,7 @@ msgstr ":mod:`xml.sax.handler` 模組" msgid "Definitions of the interfaces for application-provided objects." msgstr "" -#: ../../library/xml.sax.rst:154 +#: ../../library/xml.sax.rst:153 msgid "Module :mod:`xml.sax.saxutils`" msgstr ":mod:`xml.sax.saxutils` 模組" diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index 78096a8137..c311b21d8a 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -270,7 +270,7 @@ msgid "" "description." msgstr "" -#: ../../library/xmlrpc.client.rst:166 +#: ../../library/xmlrpc.client.rst:164 msgid "`XML-RPC HOWTO `_" msgstr "`XML-RPC HOWTO `_" @@ -281,7 +281,7 @@ msgid "" "to know." msgstr "" -#: ../../library/xmlrpc.client.rst:169 +#: ../../library/xmlrpc.client.rst:168 msgid "" "`XML-RPC Introspection `_" diff --git a/library/zipfile.po b/library/zipfile.po index 0f4385d4a1..937e493e7d 100644 --- a/library/zipfile.po +++ b/library/zipfile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-24 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -133,7 +133,7 @@ msgid "" "individual files." msgstr "" -#: ../../library/zipfile.rst:129 +#: ../../library/zipfile.rst:127 msgid "`PKZIP Application Note`_" msgstr "" @@ -143,7 +143,7 @@ msgid "" "and algorithms used." msgstr "" -#: ../../library/zipfile.rst:132 +#: ../../library/zipfile.rst:131 msgid "`Info-ZIP Home Page `_" msgstr "`Info-ZIP 首頁 `_" @@ -719,9 +719,9 @@ msgstr "" #: ../../library/zipfile.rst:629 msgid "" -"The `zipp `_ project provides backports of " -"the latest path object functionality to older Pythons. Use ``zipp.Path`` in " -"place of ``zipfile.Path`` for early access to changes." +"The :pypi:`zipp` project provides backports of the latest path object " +"functionality to older Pythons. Use ``zipp.Path`` in place of ``zipfile." +"Path`` for early access to changes." msgstr "" #: ../../library/zipfile.rst:637 diff --git a/library/zipimport.po b/library/zipimport.po index cc7909b20e..8b101a21b6 100644 --- a/library/zipimport.po +++ b/library/zipimport.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 17:13+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -60,7 +60,7 @@ msgstr "" msgid "Previously, ZIP archives with an archive comment were not supported." msgstr "" -#: ../../library/zipimport.rst:40 +#: ../../library/zipimport.rst:38 msgid "" "`PKZIP Application Note `_" @@ -72,7 +72,7 @@ msgid "" "and algorithms used." msgstr "" -#: ../../library/zipimport.rst:45 +#: ../../library/zipimport.rst:42 msgid ":pep:`273` - Import Modules from Zip Archives" msgstr "" @@ -84,7 +84,7 @@ msgid "" "`302`." msgstr "" -#: ../../library/zipimport.rst:48 +#: ../../library/zipimport.rst:47 msgid ":mod:`importlib` - The implementation of the import machinery" msgstr "" diff --git a/library/zlib.po b/library/zlib.po index 9d64c36c81..d8c2702920 100644 --- a/library/zlib.po +++ b/library/zlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 00:15+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-12-28 20:58+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -536,7 +536,7 @@ msgid "" "The version string of the zlib library actually loaded by the interpreter." msgstr "直譯器實際載入的 zlib 函式庫版本字串。" -#: ../../library/zlib.rst:336 +#: ../../library/zlib.rst:335 msgid "Module :mod:`gzip`" msgstr ":mod:`gzip` 模組" @@ -544,7 +544,7 @@ msgstr ":mod:`gzip` 模組" msgid "Reading and writing :program:`gzip`\\ -format files." msgstr "讀寫 :program:`gzip` 格式的檔案。" -#: ../../library/zlib.rst:339 +#: ../../library/zlib.rst:338 msgid "http://www.zlib.net" msgstr "http://www.zlib.net" @@ -552,7 +552,7 @@ msgstr "http://www.zlib.net" msgid "The zlib library home page." msgstr "zlib 函式庫首頁。" -#: ../../library/zlib.rst:342 +#: ../../library/zlib.rst:341 msgid "http://www.zlib.net/manual.html" msgstr "http://www.zlib.net/manual.html" diff --git a/library/zoneinfo.po b/library/zoneinfo.po index 6f9431e9f3..407305c7cb 100644 --- a/library/zoneinfo.po +++ b/library/zoneinfo.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -31,10 +31,10 @@ msgid "" "support the IANA time zone database as originally specified in :pep:`615`. " "By default, :mod:`zoneinfo` uses the system's time zone data if available; " "if no system time zone data is available, the library will fall back to " -"using the first-party `tzdata`_ package available on PyPI." +"using the first-party :pypi:`tzdata` package available on PyPI." msgstr "" -#: ../../library/zoneinfo.rst:26 +#: ../../library/zoneinfo.rst:24 msgid "Module: :mod:`datetime`" msgstr ":mod:`datetime` 模組" @@ -44,8 +44,8 @@ msgid "" "with which the :class:`ZoneInfo` class is designed to be used." msgstr "" -#: ../../library/zoneinfo.rst:29 -msgid "Package `tzdata`_" +#: ../../library/zoneinfo.rst:28 +msgid "Package :pypi:`tzdata`" msgstr "" #: ../../library/zoneinfo.rst:29 @@ -109,7 +109,7 @@ msgstr "" msgid "" "The ``zoneinfo`` module does not directly provide time zone data, and " "instead pulls time zone information from the system time zone database or " -"the first-party PyPI package `tzdata`_, if available. Some systems, " +"the first-party PyPI package :pypi:`tzdata`, if available. Some systems, " "including notably Windows systems, do not have an IANA database available, " "and so for projects targeting cross-platform compatibility that require time " "zone data, it is recommended to declare a dependency on tzdata. If neither " diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 39e86f9f9a..25a55e3e84 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-03 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -483,7 +483,7 @@ msgid "" "lines." msgstr "" -#: ../../reference/compound_stmts.rst:579 +#: ../../reference/compound_stmts.rst:578 msgid ":pep:`343` - The \"with\" statement" msgstr "" @@ -1247,7 +1247,7 @@ msgstr "" msgid ":ref:`class-pattern-matching`" msgstr ":ref:`class-pattern-matching`" -#: ../../reference/compound_stmts.rst:1147 +#: ../../reference/compound_stmts.rst:1146 msgid "" "II. Once all positional patterns have been converted to keyword patterns," msgstr "" @@ -1500,7 +1500,7 @@ msgid "" "See section :ref:`naming` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1358 +#: ../../reference/compound_stmts.rst:1357 msgid ":pep:`3107` - Function Annotations" msgstr "" @@ -1508,7 +1508,7 @@ msgstr "" msgid "The original specification for function annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1361 +#: ../../reference/compound_stmts.rst:1360 msgid ":pep:`484` - Type Hints" msgstr "" @@ -1516,7 +1516,7 @@ msgstr "" msgid "Definition of a standard meaning for annotations: type hints." msgstr "" -#: ../../reference/compound_stmts.rst:1365 +#: ../../reference/compound_stmts.rst:1363 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr "" @@ -1526,7 +1526,7 @@ msgid "" "instance variables." msgstr "" -#: ../../reference/compound_stmts.rst:1369 +#: ../../reference/compound_stmts.rst:1367 msgid ":pep:`563` - Postponed Evaluation of Annotations" msgstr "" @@ -1536,7 +1536,7 @@ msgid "" "in a string form at runtime instead of eager evaluation." msgstr "" -#: ../../reference/compound_stmts.rst:1372 +#: ../../reference/compound_stmts.rst:1371 msgid ":pep:`318` - Decorators for Functions and Methods" msgstr "" @@ -1632,7 +1632,7 @@ msgid "" "implementation details." msgstr "" -#: ../../reference/compound_stmts.rst:1476 +#: ../../reference/compound_stmts.rst:1473 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" @@ -1642,7 +1642,7 @@ msgid "" "syntax, and the semantics for how classes with metaclasses are constructed." msgstr "" -#: ../../reference/compound_stmts.rst:1479 +#: ../../reference/compound_stmts.rst:1478 msgid ":pep:`3129` - Class Decorators" msgstr "" @@ -1749,7 +1749,7 @@ msgid "" "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1613 +#: ../../reference/compound_stmts.rst:1612 msgid ":pep:`492` - Coroutines with async and await syntax" msgstr "" diff --git a/reference/datamodel.po b/reference/datamodel.po index bd6f7618d4..b7ef9e5b81 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-04 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -278,7 +278,7 @@ msgstr "" msgid "There are two types of integers:" msgstr "" -#: ../../reference/datamodel.rst:243 +#: ../../reference/datamodel.rst:238 msgid "Integers (:class:`int`)" msgstr "" @@ -291,7 +291,7 @@ msgid "" "sign bits extending to the left." msgstr "" -#: ../../reference/datamodel.rst:256 +#: ../../reference/datamodel.rst:245 msgid "Booleans (:class:`bool`)" msgstr "" @@ -341,33 +341,36 @@ msgid "" "These represent finite ordered sets indexed by non-negative numbers. The " "built-in function :func:`len` returns the number of items of a sequence. " "When the length of a sequence is *n*, the index set contains the numbers 0, " -"1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``." +"1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``. Some " +"sequences, including built-in sequences, interpret negative subscripts by " +"adding the sequence length. For example, ``a[-2]`` equals ``a[n-2]``, the " +"second to last item of sequence a with length ``n``." msgstr "" -#: ../../reference/datamodel.rst:306 +#: ../../reference/datamodel.rst:309 msgid "" "Sequences also support slicing: ``a[i:j]`` selects all items with index *k* " "such that *i* ``<=`` *k* ``<`` *j*. When used as an expression, a slice is " -"a sequence of the same type. This implies that the index set is renumbered " -"so that it starts at 0." +"a sequence of the same type. The comment above about negative indexes also " +"applies to negative slice positions." msgstr "" -#: ../../reference/datamodel.rst:311 +#: ../../reference/datamodel.rst:314 msgid "" "Some sequences also support \"extended slicing\" with a third \"step\" " "parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = " "i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*." msgstr "" -#: ../../reference/datamodel.rst:315 +#: ../../reference/datamodel.rst:318 msgid "Sequences are distinguished according to their mutability:" msgstr "" -#: ../../reference/datamodel.rst:319 +#: ../../reference/datamodel.rst:322 msgid "Immutable sequences" msgstr "" -#: ../../reference/datamodel.rst:325 +#: ../../reference/datamodel.rst:328 msgid "" "An object of an immutable sequence type cannot change once it is created. " "(If the object contains references to other objects, these other objects may " @@ -375,15 +378,15 @@ msgid "" "referenced by an immutable object cannot change.)" msgstr "" -#: ../../reference/datamodel.rst:330 +#: ../../reference/datamodel.rst:333 msgid "The following types are immutable sequences:" msgstr "" -#: ../../reference/datamodel.rst:353 +#: ../../reference/datamodel.rst:338 msgid "Strings" msgstr "字串 (String)" -#: ../../reference/datamodel.rst:343 +#: ../../reference/datamodel.rst:346 msgid "" "A string is a sequence of values that represent Unicode code points. All the " "code points in the range ``U+0000 - U+10FFFF`` can be represented in a " @@ -397,11 +400,11 @@ msgid "" "to achieve the opposite." msgstr "" -#: ../../reference/datamodel.rst:366 +#: ../../reference/datamodel.rst:358 msgid "Tuples" msgstr "" -#: ../../reference/datamodel.rst:361 +#: ../../reference/datamodel.rst:364 msgid "" "The items of a tuple are arbitrary Python objects. Tuples of two or more " "items are formed by comma-separated lists of expressions. A tuple of one " @@ -411,11 +414,11 @@ msgid "" "empty pair of parentheses." msgstr "" -#: ../../reference/datamodel.rst:376 +#: ../../reference/datamodel.rst:371 msgid "Bytes" msgstr "" -#: ../../reference/datamodel.rst:371 +#: ../../reference/datamodel.rst:374 msgid "" "A bytes object is an immutable array. The items are 8-bit bytes, " "represented by integers in the range 0 <= x < 256. Bytes literals (like " @@ -424,43 +427,43 @@ msgid "" "the :meth:`~bytes.decode` method." msgstr "" -#: ../../reference/datamodel.rst:379 +#: ../../reference/datamodel.rst:382 msgid "Mutable sequences" msgstr "" -#: ../../reference/datamodel.rst:388 +#: ../../reference/datamodel.rst:391 msgid "" "Mutable sequences can be changed after they are created. The subscription " "and slicing notations can be used as the target of assignment and :keyword:" "`del` (delete) statements." msgstr "" -#: ../../reference/datamodel.rst:396 +#: ../../reference/datamodel.rst:399 msgid "" "The :mod:`collections` and :mod:`array` module provide additional examples " "of mutable sequence types." msgstr "" -#: ../../reference/datamodel.rst:399 +#: ../../reference/datamodel.rst:402 msgid "There are currently two intrinsic mutable sequence types:" msgstr "" -#: ../../reference/datamodel.rst:406 +#: ../../reference/datamodel.rst:404 msgid "Lists" msgstr "List(串列)" -#: ../../reference/datamodel.rst:404 +#: ../../reference/datamodel.rst:407 msgid "" "The items of a list are arbitrary Python objects. Lists are formed by " "placing a comma-separated list of expressions in square brackets. (Note that " "there are no special cases needed to form lists of length 0 or 1.)" msgstr "" -#: ../../reference/datamodel.rst:415 +#: ../../reference/datamodel.rst:411 msgid "Byte Arrays" msgstr "" -#: ../../reference/datamodel.rst:411 +#: ../../reference/datamodel.rst:414 msgid "" "A bytearray object is a mutable array. They are created by the built-in :" "func:`bytearray` constructor. Aside from being mutable (and hence " @@ -468,11 +471,11 @@ msgid "" "functionality as immutable :class:`bytes` objects." msgstr "" -#: ../../reference/datamodel.rst:418 +#: ../../reference/datamodel.rst:421 msgid "Set types" msgstr "" -#: ../../reference/datamodel.rst:424 +#: ../../reference/datamodel.rst:427 msgid "" "These represent unordered, finite sets of unique, immutable objects. As " "such, they cannot be indexed by any subscript. However, they can be iterated " @@ -482,7 +485,7 @@ msgid "" "union, difference, and symmetric difference." msgstr "" -#: ../../reference/datamodel.rst:431 +#: ../../reference/datamodel.rst:434 msgid "" "For set elements, the same immutability rules apply as for dictionary keys. " "Note that numeric types obey the normal rules for numeric comparison: if two " @@ -490,37 +493,37 @@ msgid "" "contained in a set." msgstr "" -#: ../../reference/datamodel.rst:436 +#: ../../reference/datamodel.rst:439 msgid "There are currently two intrinsic set types:" msgstr "" -#: ../../reference/datamodel.rst:445 +#: ../../reference/datamodel.rst:442 msgid "Sets" msgstr "" -#: ../../reference/datamodel.rst:442 +#: ../../reference/datamodel.rst:445 msgid "" "These represent a mutable set. They are created by the built-in :func:`set` " "constructor and can be modified afterwards by several methods, such as :meth:" "`~set.add`." msgstr "" -#: ../../reference/datamodel.rst:454 +#: ../../reference/datamodel.rst:450 msgid "Frozen sets" msgstr "" -#: ../../reference/datamodel.rst:450 +#: ../../reference/datamodel.rst:453 msgid "" "These represent an immutable set. They are created by the built-in :func:" "`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, " "it can be used again as an element of another set, or as a dictionary key." msgstr "" -#: ../../reference/datamodel.rst:457 +#: ../../reference/datamodel.rst:460 msgid "Mappings" msgstr "" -#: ../../reference/datamodel.rst:464 +#: ../../reference/datamodel.rst:467 msgid "" "These represent finite sets of objects indexed by arbitrary index sets. The " "subscript notation ``a[k]`` selects the item indexed by ``k`` from the " @@ -529,15 +532,15 @@ msgid "" "returns the number of items in a mapping." msgstr "" -#: ../../reference/datamodel.rst:470 +#: ../../reference/datamodel.rst:473 msgid "There is currently a single intrinsic mapping type:" msgstr "" -#: ../../reference/datamodel.rst:474 +#: ../../reference/datamodel.rst:477 msgid "Dictionaries" msgstr "字典" -#: ../../reference/datamodel.rst:478 +#: ../../reference/datamodel.rst:481 msgid "" "These represent finite sets of objects indexed by nearly arbitrary values. " "The only types of values not acceptable as keys are values containing lists " @@ -549,7 +552,7 @@ msgid "" "interchangeably to index the same dictionary entry." msgstr "" -#: ../../reference/datamodel.rst:487 +#: ../../reference/datamodel.rst:490 msgid "" "Dictionaries preserve insertion order, meaning that keys will be produced in " "the same order they were added sequentially over the dictionary. Replacing " @@ -557,130 +560,130 @@ msgid "" "inserting it will add it to the end instead of keeping its old place." msgstr "" -#: ../../reference/datamodel.rst:492 +#: ../../reference/datamodel.rst:495 msgid "" "Dictionaries are mutable; they can be created by the ``{...}`` notation (see " "section :ref:`dict`)." msgstr "" -#: ../../reference/datamodel.rst:499 +#: ../../reference/datamodel.rst:502 msgid "" "The extension modules :mod:`dbm.ndbm` and :mod:`dbm.gnu` provide additional " "examples of mapping types, as does the :mod:`collections` module." msgstr "" -#: ../../reference/datamodel.rst:503 +#: ../../reference/datamodel.rst:506 msgid "" "Dictionaries did not preserve insertion order in versions of Python before " "3.6. In CPython 3.6, insertion order was preserved, but it was considered an " "implementation detail at that time rather than a language guarantee." msgstr "" -#: ../../reference/datamodel.rst:510 +#: ../../reference/datamodel.rst:513 msgid "Callable types" msgstr "" -#: ../../reference/datamodel.rst:518 +#: ../../reference/datamodel.rst:521 msgid "" "These are the types to which the function call operation (see section :ref:" "`calls`) can be applied:" msgstr "" -#: ../../reference/datamodel.rst:525 +#: ../../reference/datamodel.rst:528 msgid "User-defined functions" msgstr "自訂函式" -#: ../../reference/datamodel.rst:532 +#: ../../reference/datamodel.rst:535 msgid "" "A user-defined function object is created by a function definition (see " "section :ref:`function`). It should be called with an argument list " "containing the same number of items as the function's formal parameter list." msgstr "" -#: ../../reference/datamodel.rst:538 ../../reference/datamodel.rst:1127 +#: ../../reference/datamodel.rst:541 ../../reference/datamodel.rst:1127 #: ../../reference/datamodel.rst:1322 msgid "Special read-only attributes" msgstr "特殊唯讀屬性" -#: ../../reference/datamodel.rst:548 ../../reference/datamodel.rst:582 +#: ../../reference/datamodel.rst:551 ../../reference/datamodel.rst:585 msgid "Attribute" msgstr "屬性" -#: ../../reference/datamodel.rst:549 ../../reference/datamodel.rst:583 +#: ../../reference/datamodel.rst:552 ../../reference/datamodel.rst:586 msgid "Meaning" msgstr "" -#: ../../reference/datamodel.rst:552 +#: ../../reference/datamodel.rst:555 msgid "" "A reference to the :class:`dictionary ` that holds the function's :ref:" "`global variables ` -- the global namespace of the module in which " "the function was defined." msgstr "" -#: ../../reference/datamodel.rst:557 +#: ../../reference/datamodel.rst:560 msgid "" "``None`` or a :class:`tuple` of cells that contain bindings for the " "function's free variables." msgstr "" -#: ../../reference/datamodel.rst:560 +#: ../../reference/datamodel.rst:563 msgid "" "A cell object has the attribute ``cell_contents``. This can be used to get " "the value of the cell, as well as set the value." msgstr "" -#: ../../reference/datamodel.rst:564 ../../reference/datamodel.rst:1359 +#: ../../reference/datamodel.rst:567 ../../reference/datamodel.rst:1359 msgid "Special writable attributes" msgstr "特殊可寫屬性" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:580 msgid "Most of these attributes check the type of the assigned value:" msgstr "" -#: ../../reference/datamodel.rst:586 +#: ../../reference/datamodel.rst:589 msgid "" "The function's documentation string, or ``None`` if unavailable. Not " "inherited by subclasses." msgstr "" -#: ../../reference/datamodel.rst:590 +#: ../../reference/datamodel.rst:593 msgid "" "The function's name. See also: :attr:`__name__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:594 +#: ../../reference/datamodel.rst:597 msgid "" "The function's :term:`qualified name`. See also: :attr:`__qualname__ " "attributes `." msgstr "" -#: ../../reference/datamodel.rst:600 +#: ../../reference/datamodel.rst:603 msgid "" "The name of the module the function was defined in, or ``None`` if " "unavailable." msgstr "" -#: ../../reference/datamodel.rst:604 +#: ../../reference/datamodel.rst:607 msgid "" "A :class:`tuple` containing default :term:`parameter` values for those " "parameters that have defaults, or ``None`` if no parameters have a default " "value." msgstr "" -#: ../../reference/datamodel.rst:609 +#: ../../reference/datamodel.rst:612 msgid "" "The :ref:`code object ` representing the compiled function " "body." msgstr "代表編譯函式主體的\\ :ref:`程式碼物件 `。" -#: ../../reference/datamodel.rst:613 +#: ../../reference/datamodel.rst:616 msgid "" "The namespace supporting arbitrary function attributes. See also: :attr:" "`__dict__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:617 +#: ../../reference/datamodel.rst:620 msgid "" "A :class:`dictionary ` containing annotations of :term:`parameters " "`. The keys of the dictionary are the parameter names, and " @@ -688,88 +691,88 @@ msgid "" "`annotations-howto`." msgstr "" -#: ../../reference/datamodel.rst:624 +#: ../../reference/datamodel.rst:627 msgid "" "A :class:`dictionary ` containing defaults for keyword-only :term:" "`parameters `." msgstr "" -#: ../../reference/datamodel.rst:628 +#: ../../reference/datamodel.rst:631 msgid "" "A :class:`tuple` containing the :ref:`type parameters ` of a :" "ref:`generic function `." msgstr "" -#: ../../reference/datamodel.rst:633 +#: ../../reference/datamodel.rst:636 msgid "" "Function objects also support getting and setting arbitrary attributes, " "which can be used, for example, to attach metadata to functions. Regular " "attribute dot-notation is used to get and set such attributes." msgstr "" -#: ../../reference/datamodel.rst:639 +#: ../../reference/datamodel.rst:642 msgid "" "CPython's current implementation only supports function attributes on user-" "defined functions. Function attributes on :ref:`built-in functions ` may be supported in the future." msgstr "" -#: ../../reference/datamodel.rst:644 +#: ../../reference/datamodel.rst:647 msgid "" "Additional information about a function's definition can be retrieved from " "its :ref:`code object ` (accessible via the :attr:`~function." "__code__` attribute)." msgstr "" -#: ../../reference/datamodel.rst:652 +#: ../../reference/datamodel.rst:655 msgid "Instance methods" msgstr "" -#: ../../reference/datamodel.rst:659 +#: ../../reference/datamodel.rst:662 msgid "" "An instance method object combines a class, a class instance and any " "callable object (normally a user-defined function)." msgstr "" -#: ../../reference/datamodel.rst:669 ../../reference/datamodel.rst:1450 +#: ../../reference/datamodel.rst:672 ../../reference/datamodel.rst:1450 msgid "Special read-only attributes:" msgstr "特殊唯讀屬性:" -#: ../../reference/datamodel.rst:674 +#: ../../reference/datamodel.rst:677 msgid "" "Refers to the class instance object to which the method is :ref:`bound " "`" msgstr "" -#: ../../reference/datamodel.rst:678 +#: ../../reference/datamodel.rst:681 msgid "Refers to the original :ref:`function object `" msgstr "" -#: ../../reference/datamodel.rst:681 +#: ../../reference/datamodel.rst:684 msgid "" "The method's documentation (same as :attr:`method.__func__.__doc__ `). A :class:`string ` if the original function had a " "docstring, else ``None``." msgstr "" -#: ../../reference/datamodel.rst:687 +#: ../../reference/datamodel.rst:690 msgid "" "The name of the method (same as :attr:`method.__func__.__name__ `)" msgstr "" -#: ../../reference/datamodel.rst:691 +#: ../../reference/datamodel.rst:694 msgid "" "The name of the module the method was defined in, or ``None`` if unavailable." msgstr "" -#: ../../reference/datamodel.rst:694 +#: ../../reference/datamodel.rst:697 msgid "" "Methods also support accessing (but not setting) the arbitrary function " "attributes on the underlying :ref:`function object `." msgstr "" -#: ../../reference/datamodel.rst:697 +#: ../../reference/datamodel.rst:700 msgid "" "User-defined method objects may be created when getting an attribute of a " "class (perhaps via an instance of that class), if that attribute is a user-" @@ -777,7 +780,7 @@ msgid "" "`classmethod` object." msgstr "" -#: ../../reference/datamodel.rst:704 +#: ../../reference/datamodel.rst:707 msgid "" "When an instance method object is created by retrieving a user-defined :ref:" "`function object ` from a class via one of its " @@ -786,7 +789,7 @@ msgid "" "__func__` attribute is the original function object." msgstr "" -#: ../../reference/datamodel.rst:710 +#: ../../reference/datamodel.rst:713 msgid "" "When an instance method object is created by retrieving a :class:" "`classmethod` object from a class or instance, its :attr:`~method.__self__` " @@ -794,7 +797,7 @@ msgid "" "the function object underlying the class method." msgstr "" -#: ../../reference/datamodel.rst:715 +#: ../../reference/datamodel.rst:718 msgid "" "When an instance method object is called, the underlying function (:attr:" "`~method.__func__`) is called, inserting the class instance (:attr:`~method." @@ -804,7 +807,7 @@ msgid "" "f(x, 1)``." msgstr "" -#: ../../reference/datamodel.rst:722 +#: ../../reference/datamodel.rst:725 msgid "" "When an instance method object is derived from a :class:`classmethod` " "object, the \"class instance\" stored in :attr:`~method.__self__` will " @@ -813,7 +816,7 @@ msgid "" "function." msgstr "" -#: ../../reference/datamodel.rst:727 +#: ../../reference/datamodel.rst:730 msgid "" "Note that the transformation from :ref:`function object ` to instance method object happens each time the attribute is " @@ -826,11 +829,11 @@ msgid "" "this *only* happens when the function is an attribute of the class." msgstr "" -#: ../../reference/datamodel.rst:741 +#: ../../reference/datamodel.rst:744 msgid "Generator functions" msgstr "" -#: ../../reference/datamodel.rst:747 +#: ../../reference/datamodel.rst:750 msgid "" "A function or method which uses the :keyword:`yield` statement (see section :" "ref:`yield`) is called a :dfn:`generator function`. Such a function, when " @@ -843,11 +846,11 @@ msgid "" "values to be returned." msgstr "" -#: ../../reference/datamodel.rst:759 +#: ../../reference/datamodel.rst:762 msgid "Coroutine functions" msgstr "" -#: ../../reference/datamodel.rst:764 +#: ../../reference/datamodel.rst:767 msgid "" "A function or method which is defined using :keyword:`async def` is called " "a :dfn:`coroutine function`. Such a function, when called, returns a :term:" @@ -856,11 +859,11 @@ msgid "" "ref:`coroutine-objects` section." msgstr "" -#: ../../reference/datamodel.rst:772 +#: ../../reference/datamodel.rst:775 msgid "Asynchronous generator functions" msgstr "" -#: ../../reference/datamodel.rst:778 +#: ../../reference/datamodel.rst:781 msgid "" "A function or method which is defined using :keyword:`async def` and which " "uses the :keyword:`yield` statement is called a :dfn:`asynchronous generator " @@ -869,7 +872,7 @@ msgid "" "execute the body of the function." msgstr "" -#: ../../reference/datamodel.rst:784 +#: ../../reference/datamodel.rst:787 msgid "" "Calling the asynchronous iterator's :meth:`aiterator.__anext__ ` method will return an :term:`awaitable` which when awaited will " @@ -880,11 +883,11 @@ msgid "" "yielded." msgstr "" -#: ../../reference/datamodel.rst:797 +#: ../../reference/datamodel.rst:800 msgid "Built-in functions" msgstr "" -#: ../../reference/datamodel.rst:804 +#: ../../reference/datamodel.rst:807 msgid "" "A built-in function object is a wrapper around a C function. Examples of " "built-in functions are :func:`len` and :func:`math.sin` (:mod:`math` is a " @@ -892,7 +895,7 @@ msgid "" "determined by the C function. Special read-only attributes:" msgstr "" -#: ../../reference/datamodel.rst:809 +#: ../../reference/datamodel.rst:812 msgid "" ":attr:`!__doc__` is the function's documentation string, or ``None`` if " "unavailable. See :attr:`function.__doc__`." @@ -900,26 +903,26 @@ msgstr "" ":attr:`!__doc__` 是函式的文件字串,若不可用則為 ``None``。請見 :attr:" "`function.__doc__`。" -#: ../../reference/datamodel.rst:811 +#: ../../reference/datamodel.rst:814 msgid "" ":attr:`!__name__` is the function's name. See :attr:`function.__name__`." msgstr ":attr:`!__name__` 是函式的名稱。請見 :attr:`function.__name__`。" -#: ../../reference/datamodel.rst:812 +#: ../../reference/datamodel.rst:815 msgid ":attr:`!__self__` is set to ``None`` (but see the next item)." msgstr "" -#: ../../reference/datamodel.rst:813 +#: ../../reference/datamodel.rst:816 msgid "" ":attr:`!__module__` is the name of the module the function was defined in or " "``None`` if unavailable. See :attr:`function.__module__`." msgstr "" -#: ../../reference/datamodel.rst:821 +#: ../../reference/datamodel.rst:824 msgid "Built-in methods" msgstr "" -#: ../../reference/datamodel.rst:828 +#: ../../reference/datamodel.rst:831 msgid "" "This is really a different disguise of a built-in function, this time " "containing an object passed to the C function as an implicit extra " @@ -930,11 +933,11 @@ msgid "" "__self__>`.)" msgstr "" -#: ../../reference/datamodel.rst:837 +#: ../../reference/datamodel.rst:840 msgid "Classes" msgstr "" -#: ../../reference/datamodel.rst:839 +#: ../../reference/datamodel.rst:842 msgid "" "Classes are callable. These objects normally act as factories for new " "instances of themselves, but variations are possible for class types that " @@ -943,21 +946,21 @@ msgid "" "initialize the new instance." msgstr "" -#: ../../reference/datamodel.rst:847 +#: ../../reference/datamodel.rst:850 msgid "Class Instances" msgstr "" -#: ../../reference/datamodel.rst:849 +#: ../../reference/datamodel.rst:852 msgid "" "Instances of arbitrary classes can be made callable by defining a :meth:" "`~object.__call__` method in their class." msgstr "" -#: ../../reference/datamodel.rst:854 +#: ../../reference/datamodel.rst:857 msgid "Modules" msgstr "模組" -#: ../../reference/datamodel.rst:860 +#: ../../reference/datamodel.rst:863 msgid "" "Modules are a basic organizational unit of Python code, and are created by " "the :ref:`import system ` as invoked either by the :keyword:" @@ -972,37 +975,37 @@ msgid "" "done)." msgstr "" -#: ../../reference/datamodel.rst:873 +#: ../../reference/datamodel.rst:876 msgid "" "Attribute assignment updates the module's namespace dictionary, e.g., ``m.x " "= 1`` is equivalent to ``m.__dict__[\"x\"] = 1``." msgstr "" -#: ../../reference/datamodel.rst:883 +#: ../../reference/datamodel.rst:886 msgid "Predefined (writable) attributes:" msgstr "" -#: ../../reference/datamodel.rst:886 +#: ../../reference/datamodel.rst:888 msgid ":attr:`__name__`" msgstr ":attr:`__name__`" -#: ../../reference/datamodel.rst:886 +#: ../../reference/datamodel.rst:889 msgid "The module's name." msgstr "" -#: ../../reference/datamodel.rst:890 ../../reference/datamodel.rst:990 +#: ../../reference/datamodel.rst:891 ../../reference/datamodel.rst:989 msgid ":attr:`__doc__`" msgstr ":attr:`__doc__`" -#: ../../reference/datamodel.rst:889 +#: ../../reference/datamodel.rst:892 msgid "The module's documentation string, or ``None`` if unavailable." msgstr "" -#: ../../reference/datamodel.rst:899 +#: ../../reference/datamodel.rst:895 msgid ":attr:`__file__`" msgstr ":attr:`__file__`" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:896 msgid "" "The pathname of the file from which the module was loaded, if it was loaded " "from a file. The :attr:`__file__` attribute may be missing for certain types " @@ -1011,24 +1014,24 @@ msgid "" "library, it's the pathname of the shared library file." msgstr "" -#: ../../reference/datamodel.rst:905 ../../reference/datamodel.rst:997 +#: ../../reference/datamodel.rst:904 ../../reference/datamodel.rst:992 msgid ":attr:`__annotations__`" msgstr ":attr:`__annotations__`" -#: ../../reference/datamodel.rst:902 +#: ../../reference/datamodel.rst:905 msgid "" "A dictionary containing :term:`variable annotations ` " "collected during module body execution. For best practices on working with :" "attr:`__annotations__`, please see :ref:`annotations-howto`." msgstr "" -#: ../../reference/datamodel.rst:909 +#: ../../reference/datamodel.rst:912 msgid "" "Special read-only attribute: :attr:`~object.__dict__` is the module's " "namespace as a dictionary object." msgstr "" -#: ../../reference/datamodel.rst:914 +#: ../../reference/datamodel.rst:917 msgid "" "Because of the way CPython clears module dictionaries, the module dictionary " "will be cleared when the module falls out of scope even if the dictionary " @@ -1036,11 +1039,11 @@ msgid "" "module around while using its dictionary directly." msgstr "" -#: ../../reference/datamodel.rst:921 +#: ../../reference/datamodel.rst:924 msgid "Custom classes" msgstr "" -#: ../../reference/datamodel.rst:923 +#: ../../reference/datamodel.rst:926 msgid "" "Custom class types are typically created by class definitions (see section :" "ref:`class`). A class has a namespace implemented by a dictionary object. " @@ -1052,8 +1055,7 @@ msgid "" "order which behaves correctly even in the presence of 'diamond' inheritance " "structures where there are multiple inheritance paths leading back to a " "common ancestor. Additional details on the C3 MRO used by Python can be " -"found in the documentation accompanying the 2.3 release at https://www." -"python.org/download/releases/2.3/mro/." +"found at :ref:`python_2.3_mro`." msgstr "" #: ../../reference/datamodel.rst:947 @@ -1083,7 +1085,7 @@ msgstr "" msgid "Special attributes:" msgstr "" -#: ../../reference/datamodel.rst:977 +#: ../../reference/datamodel.rst:976 msgid ":attr:`~definition.__name__`" msgstr ":attr:`~definition.__name__`" @@ -1091,7 +1093,7 @@ msgstr ":attr:`~definition.__name__`" msgid "The class name." msgstr "" -#: ../../reference/datamodel.rst:980 +#: ../../reference/datamodel.rst:979 msgid ":attr:`__module__`" msgstr ":attr:`__module__`" @@ -1099,7 +1101,7 @@ msgstr ":attr:`__module__`" msgid "The name of the module in which the class was defined." msgstr "" -#: ../../reference/datamodel.rst:983 +#: ../../reference/datamodel.rst:982 msgid ":attr:`~object.__dict__`" msgstr ":attr:`~object.__dict__`" @@ -1107,7 +1109,7 @@ msgstr ":attr:`~object.__dict__`" msgid "The dictionary containing the class's namespace." msgstr "" -#: ../../reference/datamodel.rst:987 +#: ../../reference/datamodel.rst:985 msgid ":attr:`~class.__bases__`" msgstr ":attr:`~class.__bases__`" @@ -1128,7 +1130,7 @@ msgid "" "attr:`__annotations__`, please see :ref:`annotations-howto`." msgstr "" -#: ../../reference/datamodel.rst:1002 +#: ../../reference/datamodel.rst:999 msgid ":attr:`__type_params__`" msgstr ":attr:`__type_params__`" @@ -2427,7 +2429,7 @@ msgid "" "arguments are assembled depends on ``a``:" msgstr "" -#: ../../reference/datamodel.rst:2140 +#: ../../reference/datamodel.rst:2138 msgid "Direct Call" msgstr "" @@ -2437,7 +2439,7 @@ msgid "" "descriptor method: ``x.__get__(a)``." msgstr "" -#: ../../reference/datamodel.rst:2144 +#: ../../reference/datamodel.rst:2142 msgid "Instance Binding" msgstr "" @@ -2447,7 +2449,7 @@ msgid "" "``type(a).__dict__['x'].__get__(a, type(a))``." msgstr "" -#: ../../reference/datamodel.rst:2148 +#: ../../reference/datamodel.rst:2146 msgid "Class Binding" msgstr "" @@ -2457,7 +2459,7 @@ msgid "" "__dict__['x'].__get__(None, A)``." msgstr "" -#: ../../reference/datamodel.rst:2154 +#: ../../reference/datamodel.rst:2150 msgid "Super Binding" msgstr "" @@ -2752,7 +2754,7 @@ msgid "" "is ignored." msgstr "" -#: ../../reference/datamodel.rst:2427 +#: ../../reference/datamodel.rst:2426 msgid ":func:`types.resolve_bases`" msgstr ":func:`types.resolve_bases`" @@ -2760,7 +2762,7 @@ msgstr ":func:`types.resolve_bases`" msgid "Dynamically resolve bases that are not instances of :class:`type`." msgstr "" -#: ../../reference/datamodel.rst:2431 +#: ../../reference/datamodel.rst:2429 msgid ":func:`types.get_original_bases`" msgstr ":func:`types.get_original_bases`" @@ -2997,7 +2999,7 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:2603 +#: ../../reference/datamodel.rst:2599 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" @@ -3022,7 +3024,7 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:2618 +#: ../../reference/datamodel.rst:2617 msgid ":pep:`484` - Type Hints" msgstr "" @@ -3030,7 +3032,7 @@ msgstr "" msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../reference/datamodel.rst:2621 +#: ../../reference/datamodel.rst:2620 msgid ":ref:`Generic Alias Types`" msgstr ":ref:`泛型別名型別 `" @@ -3038,7 +3040,7 @@ msgstr ":ref:`泛型別名型別 `" msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:2624 +#: ../../reference/datamodel.rst:2623 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" @@ -3135,7 +3137,7 @@ msgid "" "example of this can be found in the :mod:`enum` module::" msgstr "" -#: ../../reference/datamodel.rst:2744 +#: ../../reference/datamodel.rst:2742 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" @@ -3511,7 +3513,7 @@ msgid "" "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:3159 +#: ../../reference/datamodel.rst:3158 msgid ":pep:`343` - The \"with\" statement" msgstr "" @@ -3597,7 +3599,7 @@ msgid "" "to perform any cleanup are not required to implement this method." msgstr "" -#: ../../reference/datamodel.rst:3231 +#: ../../reference/datamodel.rst:3230 msgid ":pep:`688` - Making the buffer protocol accessible in Python" msgstr "" @@ -3883,14 +3885,14 @@ msgstr "" #: ../../reference/datamodel.rst:192 ../../reference/datamodel.rst:225 #: ../../reference/datamodel.rst:246 ../../reference/datamodel.rst:261 #: ../../reference/datamodel.rst:279 ../../reference/datamodel.rst:292 -#: ../../reference/datamodel.rst:321 ../../reference/datamodel.rst:356 -#: ../../reference/datamodel.rst:381 ../../reference/datamodel.rst:402 -#: ../../reference/datamodel.rst:420 ../../reference/datamodel.rst:440 -#: ../../reference/datamodel.rst:448 ../../reference/datamodel.rst:459 -#: ../../reference/datamodel.rst:476 ../../reference/datamodel.rst:512 -#: ../../reference/datamodel.rst:527 ../../reference/datamodel.rst:654 -#: ../../reference/datamodel.rst:799 ../../reference/datamodel.rst:823 -#: ../../reference/datamodel.rst:856 ../../reference/datamodel.rst:938 +#: ../../reference/datamodel.rst:324 ../../reference/datamodel.rst:359 +#: ../../reference/datamodel.rst:384 ../../reference/datamodel.rst:405 +#: ../../reference/datamodel.rst:423 ../../reference/datamodel.rst:443 +#: ../../reference/datamodel.rst:451 ../../reference/datamodel.rst:462 +#: ../../reference/datamodel.rst:479 ../../reference/datamodel.rst:515 +#: ../../reference/datamodel.rst:530 ../../reference/datamodel.rst:657 +#: ../../reference/datamodel.rst:802 ../../reference/datamodel.rst:826 +#: ../../reference/datamodel.rst:859 ../../reference/datamodel.rst:938 #: ../../reference/datamodel.rst:1007 ../../reference/datamodel.rst:1034 #: ../../reference/datamodel.rst:1096 ../../reference/datamodel.rst:1200 #: ../../reference/datamodel.rst:1307 ../../reference/datamodel.rst:1407 @@ -3903,8 +3905,8 @@ msgid "data" msgstr "data(資料)" #: ../../reference/datamodel.rst:23 ../../reference/datamodel.rst:292 -#: ../../reference/datamodel.rst:336 ../../reference/datamodel.rst:420 -#: ../../reference/datamodel.rst:459 ../../reference/datamodel.rst:799 +#: ../../reference/datamodel.rst:339 ../../reference/datamodel.rst:423 +#: ../../reference/datamodel.rst:462 ../../reference/datamodel.rst:802 #: ../../reference/datamodel.rst:1053 ../../reference/datamodel.rst:1490 #: ../../reference/datamodel.rst:1730 ../../reference/datamodel.rst:1735 #: ../../reference/datamodel.rst:1819 ../../reference/datamodel.rst:2375 @@ -3968,20 +3970,20 @@ msgstr "hierarchy(階層)" msgid "extension" msgstr "extension(擴充)" -#: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:393 -#: ../../reference/datamodel.rst:394 ../../reference/datamodel.rst:495 -#: ../../reference/datamodel.rst:856 ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:396 +#: ../../reference/datamodel.rst:397 ../../reference/datamodel.rst:498 +#: ../../reference/datamodel.rst:859 ../../reference/datamodel.rst:879 #: ../../reference/datamodel.rst:1053 msgid "module" msgstr "module(模組)" #: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:261 -#: ../../reference/datamodel.rst:799 +#: ../../reference/datamodel.rst:802 msgid "C" msgstr "C" #: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:261 -#: ../../reference/datamodel.rst:799 +#: ../../reference/datamodel.rst:802 msgid "language" msgstr "language(語言)" @@ -4012,7 +4014,7 @@ msgid "numeric" msgstr "numeric(數值)" #: ../../reference/datamodel.rst:225 ../../reference/datamodel.rst:231 -#: ../../reference/datamodel.rst:336 +#: ../../reference/datamodel.rst:339 msgid "integer" msgstr "integer(整數)" @@ -4048,8 +4050,8 @@ msgstr "Java" msgid "complex" msgstr "complex(複數)" -#: ../../reference/datamodel.rst:292 ../../reference/datamodel.rst:420 -#: ../../reference/datamodel.rst:459 ../../reference/datamodel.rst:2804 +#: ../../reference/datamodel.rst:292 ../../reference/datamodel.rst:423 +#: ../../reference/datamodel.rst:462 ../../reference/datamodel.rst:2804 msgid "len" msgstr "len" @@ -4065,292 +4067,292 @@ msgstr "index operation(索引操作)" msgid "item selection" msgstr "item selection(項目選取)" -#: ../../reference/datamodel.rst:292 ../../reference/datamodel.rst:381 -#: ../../reference/datamodel.rst:459 +#: ../../reference/datamodel.rst:292 ../../reference/datamodel.rst:384 +#: ../../reference/datamodel.rst:462 msgid "subscription" msgstr "subscription(下標)" -#: ../../reference/datamodel.rst:304 ../../reference/datamodel.rst:381 +#: ../../reference/datamodel.rst:307 ../../reference/datamodel.rst:384 msgid "slicing" msgstr "slice(切片)" -#: ../../reference/datamodel.rst:321 +#: ../../reference/datamodel.rst:324 msgid "immutable sequence" msgstr "immutable sequence(不可變序列)" -#: ../../reference/datamodel.rst:321 +#: ../../reference/datamodel.rst:324 msgid "immutable" msgstr "immutable(不可變)" -#: ../../reference/datamodel.rst:332 ../../reference/datamodel.rst:1705 +#: ../../reference/datamodel.rst:335 ../../reference/datamodel.rst:1705 #: ../../reference/datamodel.rst:1735 msgid "string" msgstr "string(字串)" -#: ../../reference/datamodel.rst:332 +#: ../../reference/datamodel.rst:335 msgid "immutable sequences" msgstr "immutable sequences(不可變序列)" -#: ../../reference/datamodel.rst:336 +#: ../../reference/datamodel.rst:339 msgid "chr" msgstr "chr" -#: ../../reference/datamodel.rst:336 +#: ../../reference/datamodel.rst:339 msgid "ord" msgstr "ord" -#: ../../reference/datamodel.rst:336 +#: ../../reference/datamodel.rst:339 msgid "character" msgstr "character(字元)" -#: ../../reference/datamodel.rst:336 +#: ../../reference/datamodel.rst:339 msgid "Unicode" msgstr "Unicode" -#: ../../reference/datamodel.rst:356 +#: ../../reference/datamodel.rst:359 msgid "tuple" msgstr "tuple(元組)" -#: ../../reference/datamodel.rst:356 +#: ../../reference/datamodel.rst:359 msgid "singleton" msgstr "singleton(單例)" -#: ../../reference/datamodel.rst:356 +#: ../../reference/datamodel.rst:359 msgid "empty" msgstr "empty(空的)" -#: ../../reference/datamodel.rst:369 ../../reference/datamodel.rst:1730 +#: ../../reference/datamodel.rst:372 ../../reference/datamodel.rst:1730 msgid "bytes" msgstr "bytes(位元組)" -#: ../../reference/datamodel.rst:369 +#: ../../reference/datamodel.rst:372 msgid "byte" msgstr "byte(位元組)" -#: ../../reference/datamodel.rst:381 +#: ../../reference/datamodel.rst:384 msgid "mutable sequence" msgstr "mutable sequence(可變序列)" -#: ../../reference/datamodel.rst:381 +#: ../../reference/datamodel.rst:384 msgid "mutable" msgstr "mutable(可變的)" -#: ../../reference/datamodel.rst:381 ../../reference/datamodel.rst:956 +#: ../../reference/datamodel.rst:384 ../../reference/datamodel.rst:956 #: ../../reference/datamodel.rst:1027 msgid "assignment" msgstr "assignment(賦值)" -#: ../../reference/datamodel.rst:381 ../../reference/datamodel.rst:856 +#: ../../reference/datamodel.rst:384 ../../reference/datamodel.rst:859 #: ../../reference/datamodel.rst:1444 ../../reference/datamodel.rst:1626 #: ../../reference/datamodel.rst:3125 msgid "statement" msgstr "statement(陳述式)" -#: ../../reference/datamodel.rst:393 +#: ../../reference/datamodel.rst:396 msgid "array" msgstr "array(陣列)" -#: ../../reference/datamodel.rst:394 +#: ../../reference/datamodel.rst:397 msgid "collections" msgstr "collections" -#: ../../reference/datamodel.rst:402 +#: ../../reference/datamodel.rst:405 msgid "list" msgstr "list(串列)" -#: ../../reference/datamodel.rst:409 +#: ../../reference/datamodel.rst:412 msgid "bytearray" msgstr "bytearray(位元組陣列)" -#: ../../reference/datamodel.rst:420 +#: ../../reference/datamodel.rst:423 msgid "set type" msgstr "set type(集合型別)" -#: ../../reference/datamodel.rst:440 +#: ../../reference/datamodel.rst:443 msgid "set" msgstr "set(集合)" -#: ../../reference/datamodel.rst:448 +#: ../../reference/datamodel.rst:451 msgid "frozenset" msgstr "frozenset(凍結集合)" -#: ../../reference/datamodel.rst:459 ../../reference/datamodel.rst:1034 +#: ../../reference/datamodel.rst:462 ../../reference/datamodel.rst:1034 msgid "mapping" msgstr "mapping(對映)" -#: ../../reference/datamodel.rst:476 ../../reference/datamodel.rst:938 +#: ../../reference/datamodel.rst:479 ../../reference/datamodel.rst:938 #: ../../reference/datamodel.rst:1819 msgid "dictionary" msgstr "dictionary(字典)" -#: ../../reference/datamodel.rst:495 +#: ../../reference/datamodel.rst:498 msgid "dbm.ndbm" msgstr "dbm.ndbm" -#: ../../reference/datamodel.rst:495 +#: ../../reference/datamodel.rst:498 msgid "dbm.gnu" msgstr "dbm.gnu" -#: ../../reference/datamodel.rst:512 +#: ../../reference/datamodel.rst:515 msgid "callable" msgstr "callable(可呼叫物件)" -#: ../../reference/datamodel.rst:512 ../../reference/datamodel.rst:527 -#: ../../reference/datamodel.rst:743 ../../reference/datamodel.rst:761 -#: ../../reference/datamodel.rst:774 ../../reference/datamodel.rst:799 +#: ../../reference/datamodel.rst:515 ../../reference/datamodel.rst:530 +#: ../../reference/datamodel.rst:746 ../../reference/datamodel.rst:764 +#: ../../reference/datamodel.rst:777 ../../reference/datamodel.rst:802 msgid "function" msgstr "function (函式)" -#: ../../reference/datamodel.rst:512 ../../reference/datamodel.rst:938 +#: ../../reference/datamodel.rst:515 ../../reference/datamodel.rst:938 #: ../../reference/datamodel.rst:961 ../../reference/datamodel.rst:2756 msgid "call" msgstr "call(呼叫)" -#: ../../reference/datamodel.rst:512 +#: ../../reference/datamodel.rst:515 msgid "invocation" msgstr "invocation(調用)" -#: ../../reference/datamodel.rst:512 +#: ../../reference/datamodel.rst:515 msgid "argument" msgstr "argument(引數)" -#: ../../reference/datamodel.rst:527 ../../reference/datamodel.rst:654 +#: ../../reference/datamodel.rst:530 ../../reference/datamodel.rst:657 msgid "user-defined" msgstr "user-defined(使用者定義)" -#: ../../reference/datamodel.rst:527 +#: ../../reference/datamodel.rst:530 msgid "user-defined function" msgstr "user-defined function(使用者定義函式)" -#: ../../reference/datamodel.rst:540 +#: ../../reference/datamodel.rst:543 msgid "__closure__ (function attribute)" msgstr "__closure__ (函式屬性)" -#: ../../reference/datamodel.rst:540 +#: ../../reference/datamodel.rst:543 msgid "__globals__ (function attribute)" msgstr "__globals__ (函式屬性)" -#: ../../reference/datamodel.rst:540 +#: ../../reference/datamodel.rst:543 msgid "global" msgstr "global(全域)" -#: ../../reference/datamodel.rst:540 ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:543 ../../reference/datamodel.rst:879 msgid "namespace" msgstr "namespace(命名空間)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__doc__ (function attribute)" msgstr "__doc__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__name__ (function attribute)" msgstr "__name__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__module__ (function attribute)" msgstr "__module__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__dict__ (function attribute)" msgstr "__dict__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__defaults__ (function attribute)" msgstr "__defaults__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__code__ (function attribute)" msgstr "__code__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__annotations__ (function attribute)" msgstr "__annotations__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__kwdefaults__ (function attribute)" msgstr "__kwdefaults__ (函式屬性)" -#: ../../reference/datamodel.rst:566 +#: ../../reference/datamodel.rst:569 msgid "__type_params__ (function attribute)" msgstr "__type_params__ (函式屬性)" -#: ../../reference/datamodel.rst:654 ../../reference/datamodel.rst:823 +#: ../../reference/datamodel.rst:657 ../../reference/datamodel.rst:826 msgid "method" msgstr "method(方法)" -#: ../../reference/datamodel.rst:654 +#: ../../reference/datamodel.rst:657 msgid "user-defined method" msgstr "user-defined method(使用者定義方法)" -#: ../../reference/datamodel.rst:662 +#: ../../reference/datamodel.rst:665 msgid "__func__ (method attribute)" msgstr "__func__ (方法屬性)" -#: ../../reference/datamodel.rst:662 +#: ../../reference/datamodel.rst:665 msgid "__self__ (method attribute)" msgstr "__self__ (方法屬性)" -#: ../../reference/datamodel.rst:662 +#: ../../reference/datamodel.rst:665 msgid "__doc__ (method attribute)" msgstr "__doc__ (方法屬性)" -#: ../../reference/datamodel.rst:662 +#: ../../reference/datamodel.rst:665 msgid "__name__ (method attribute)" msgstr "__name__ (方法屬性)" -#: ../../reference/datamodel.rst:662 +#: ../../reference/datamodel.rst:665 msgid "__module__ (method attribute)" msgstr "__module__ (方法屬性)" -#: ../../reference/datamodel.rst:743 ../../reference/datamodel.rst:1200 +#: ../../reference/datamodel.rst:746 ../../reference/datamodel.rst:1200 msgid "generator" msgstr "generator(產生器)" -#: ../../reference/datamodel.rst:743 +#: ../../reference/datamodel.rst:746 msgid "iterator" msgstr "itorator(疊代器)" -#: ../../reference/datamodel.rst:761 ../../reference/datamodel.rst:3312 +#: ../../reference/datamodel.rst:764 ../../reference/datamodel.rst:3312 msgid "coroutine" msgstr "coroutine(協程)" -#: ../../reference/datamodel.rst:774 +#: ../../reference/datamodel.rst:777 msgid "asynchronous generator" msgstr "asynchronous generator(非同步產生器)" -#: ../../reference/datamodel.rst:774 +#: ../../reference/datamodel.rst:777 msgid "asynchronous iterator" msgstr "asynchronous iterator(非同步疊代器)" -#: ../../reference/datamodel.rst:823 +#: ../../reference/datamodel.rst:826 msgid "built-in method" msgstr "built-in method(內建方法)" -#: ../../reference/datamodel.rst:823 +#: ../../reference/datamodel.rst:826 msgid "built-in" msgstr "built-in(內建)" -#: ../../reference/datamodel.rst:856 +#: ../../reference/datamodel.rst:859 msgid "import" msgstr "import(引入)" -#: ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:879 msgid "__name__ (module attribute)" msgstr "__name__ (模組屬性)" -#: ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:879 msgid "__doc__ (module attribute)" msgstr "__doc__ (模組屬性)" -#: ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:879 msgid "__file__ (module attribute)" msgstr "__file__ (模組屬性)" -#: ../../reference/datamodel.rst:876 +#: ../../reference/datamodel.rst:879 msgid "__annotations__ (module attribute)" msgstr "__annotations__ (模組屬性)" -#: ../../reference/datamodel.rst:907 +#: ../../reference/datamodel.rst:910 msgid "__dict__ (module attribute)" msgstr "__dict__ (模組屬性)" diff --git a/reference/expressions.po b/reference/expressions.po index 53692df74d..2e4b3e8737 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -534,7 +534,7 @@ msgid "" "expression on the right hand side of an assignment statement." msgstr "" -#: ../../reference/expressions.rst:512 +#: ../../reference/expressions.rst:511 msgid ":pep:`255` - Simple Generators" msgstr "" @@ -544,7 +544,7 @@ msgid "" "Python." msgstr "" -#: ../../reference/expressions.rst:516 +#: ../../reference/expressions.rst:514 msgid ":pep:`342` - Coroutines via Enhanced Generators" msgstr "" @@ -554,7 +554,7 @@ msgid "" "as simple coroutines." msgstr "" -#: ../../reference/expressions.rst:520 +#: ../../reference/expressions.rst:518 msgid ":pep:`380` - Syntax for Delegating to a Subgenerator" msgstr "" @@ -564,7 +564,7 @@ msgid "" "making delegation to subgenerators easy." msgstr "" -#: ../../reference/expressions.rst:523 +#: ../../reference/expressions.rst:522 msgid ":pep:`525` - Asynchronous Generators" msgstr "" @@ -1134,7 +1134,7 @@ msgstr "" msgid "If it is---" msgstr "" -#: ../../reference/expressions.rst:1117 +#: ../../reference/expressions.rst:1106 msgid "a user-defined function:" msgstr "" @@ -1147,7 +1147,7 @@ msgid "" "value of the function call." msgstr "" -#: ../../reference/expressions.rst:1131 +#: ../../reference/expressions.rst:1119 msgid "a built-in function or method:" msgstr "" @@ -1157,7 +1157,7 @@ msgid "" "descriptions of built-in functions and methods." msgstr "" -#: ../../reference/expressions.rst:1138 +#: ../../reference/expressions.rst:1133 msgid "a class object:" msgstr "" @@ -1165,7 +1165,7 @@ msgstr "" msgid "A new instance of that class is returned." msgstr "" -#: ../../reference/expressions.rst:1148 +#: ../../reference/expressions.rst:1140 msgid "a class instance method:" msgstr "" @@ -1176,7 +1176,7 @@ msgid "" "the first argument." msgstr "" -#: ../../reference/expressions.rst:1157 +#: ../../reference/expressions.rst:1150 msgid "a class instance:" msgstr "" diff --git a/reference/introduction.po b/reference/introduction.po index d453a71ed1..4fb85fd222 100644 --- a/reference/introduction.po +++ b/reference/introduction.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2017-09-22 18:27+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -78,7 +78,7 @@ msgstr "" msgid "Known implementations include:" msgstr "" -#: ../../reference/introduction.rst:51 +#: ../../reference/introduction.rst:49 msgid "CPython" msgstr "CPython" @@ -88,7 +88,7 @@ msgid "" "in C. New language features generally appear here first." msgstr "" -#: ../../reference/introduction.rst:57 +#: ../../reference/introduction.rst:53 msgid "Jython" msgstr "Jython" @@ -101,7 +101,7 @@ msgid "" "jython.org/>`_." msgstr "" -#: ../../reference/introduction.rst:63 +#: ../../reference/introduction.rst:59 msgid "Python for .NET" msgstr "" @@ -113,7 +113,7 @@ msgid "" "`_." msgstr "" -#: ../../reference/introduction.rst:69 +#: ../../reference/introduction.rst:65 msgid "IronPython" msgstr "IronPython" @@ -126,7 +126,7 @@ msgid "" ">`_." msgstr "" -#: ../../reference/introduction.rst:77 +#: ../../reference/introduction.rst:71 msgid "PyPy" msgstr "PyPy" diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 857c53f252..b5c6dd8b95 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,24 +116,23 @@ msgstr "" #: ../../reference/lexical_analysis.rst:99 msgid "" -"If no encoding declaration is found, the default encoding is UTF-8. In " -"addition, if the first bytes of the file are the UTF-8 byte-order mark " -"(``b'\\xef\\xbb\\xbf'``), the declared file encoding is UTF-8 (this is " -"supported, among others, by Microsoft's :program:`notepad`)." +"If no encoding declaration is found, the default encoding is UTF-8. If the " +"implicit or explicit encoding of a file is UTF-8, an initial UTF-8 byte-" +"order mark (b'\\xef\\xbb\\xbf') is ignored rather than being a syntax error." msgstr "" -#: ../../reference/lexical_analysis.rst:104 +#: ../../reference/lexical_analysis.rst:103 msgid "" "If an encoding is declared, the encoding name must be recognized by Python " "(see :ref:`standard-encodings`). The encoding is used for all lexical " "analysis, including string literals, comments and identifiers." msgstr "" -#: ../../reference/lexical_analysis.rst:113 +#: ../../reference/lexical_analysis.rst:112 msgid "Explicit line joining" msgstr "" -#: ../../reference/lexical_analysis.rst:117 +#: ../../reference/lexical_analysis.rst:116 msgid "" "Two or more physical lines may be joined into logical lines using backslash " "characters (``\\``), as follows: when a physical line ends in a backslash " @@ -142,7 +141,7 @@ msgid "" "following end-of-line character. For example::" msgstr "" -#: ../../reference/lexical_analysis.rst:128 +#: ../../reference/lexical_analysis.rst:127 msgid "" "A line ending in a backslash cannot carry a comment. A backslash does not " "continue a comment. A backslash does not continue a token except for string " @@ -151,17 +150,17 @@ msgid "" "line outside a string literal." msgstr "" -#: ../../reference/lexical_analysis.rst:138 +#: ../../reference/lexical_analysis.rst:137 msgid "Implicit line joining" msgstr "" -#: ../../reference/lexical_analysis.rst:140 +#: ../../reference/lexical_analysis.rst:139 msgid "" "Expressions in parentheses, square brackets or curly braces can be split " "over more than one physical line without using backslashes. For example::" msgstr "" -#: ../../reference/lexical_analysis.rst:148 +#: ../../reference/lexical_analysis.rst:147 msgid "" "Implicitly continued lines can carry comments. The indentation of the " "continuation lines is not important. Blank continuation lines are allowed. " @@ -170,11 +169,11 @@ msgid "" "that case they cannot carry comments." msgstr "" -#: ../../reference/lexical_analysis.rst:158 +#: ../../reference/lexical_analysis.rst:157 msgid "Blank lines" msgstr "" -#: ../../reference/lexical_analysis.rst:162 +#: ../../reference/lexical_analysis.rst:161 msgid "" "A logical line that contains only spaces, tabs, formfeeds and possibly a " "comment, is ignored (i.e., no NEWLINE token is generated). During " @@ -185,18 +184,18 @@ msgid "" "statement." msgstr "" -#: ../../reference/lexical_analysis.rst:173 +#: ../../reference/lexical_analysis.rst:172 msgid "Indentation" msgstr "" -#: ../../reference/lexical_analysis.rst:177 +#: ../../reference/lexical_analysis.rst:176 msgid "" "Leading whitespace (spaces and tabs) at the beginning of a logical line is " "used to compute the indentation level of the line, which in turn is used to " "determine the grouping of statements." msgstr "" -#: ../../reference/lexical_analysis.rst:181 +#: ../../reference/lexical_analysis.rst:180 msgid "" "Tabs are replaced (from left to right) by one to eight spaces such that the " "total number of characters up to and including the replacement is a multiple " @@ -207,14 +206,14 @@ msgid "" "the indentation." msgstr "" -#: ../../reference/lexical_analysis.rst:189 +#: ../../reference/lexical_analysis.rst:188 msgid "" "Indentation is rejected as inconsistent if a source file mixes tabs and " "spaces in a way that makes the meaning dependent on the worth of a tab in " "spaces; a :exc:`TabError` is raised in that case." msgstr "" -#: ../../reference/lexical_analysis.rst:193 +#: ../../reference/lexical_analysis.rst:192 msgid "" "**Cross-platform compatibility note:** because of the nature of text editors " "on non-UNIX platforms, it is unwise to use a mixture of spaces and tabs for " @@ -222,7 +221,7 @@ msgid "" "different platforms may explicitly limit the maximum indentation level." msgstr "" -#: ../../reference/lexical_analysis.rst:198 +#: ../../reference/lexical_analysis.rst:197 msgid "" "A formfeed character may be present at the start of the line; it will be " "ignored for the indentation calculations above. Formfeed characters " @@ -230,13 +229,13 @@ msgid "" "instance, they may reset the space count to zero)." msgstr "" -#: ../../reference/lexical_analysis.rst:205 +#: ../../reference/lexical_analysis.rst:204 msgid "" "The indentation levels of consecutive lines are used to generate INDENT and " "DEDENT tokens, using a stack, as follows." msgstr "" -#: ../../reference/lexical_analysis.rst:208 +#: ../../reference/lexical_analysis.rst:207 msgid "" "Before the first line of the file is read, a single zero is pushed on the " "stack; this will never be popped off again. The numbers pushed on the stack " @@ -250,28 +249,28 @@ msgid "" "number remaining on the stack that is larger than zero." msgstr "" -#: ../../reference/lexical_analysis.rst:219 +#: ../../reference/lexical_analysis.rst:218 msgid "" "Here is an example of a correctly (though confusingly) indented piece of " "Python code::" msgstr "" -#: ../../reference/lexical_analysis.rst:234 +#: ../../reference/lexical_analysis.rst:233 msgid "The following example shows various indentation errors::" msgstr "" -#: ../../reference/lexical_analysis.rst:244 +#: ../../reference/lexical_analysis.rst:243 msgid "" "(Actually, the first three errors are detected by the parser; only the last " "error is found by the lexical analyzer --- the indentation of ``return r`` " "does not match a level popped off the stack.)" msgstr "" -#: ../../reference/lexical_analysis.rst:252 +#: ../../reference/lexical_analysis.rst:251 msgid "Whitespace between tokens" msgstr "" -#: ../../reference/lexical_analysis.rst:254 +#: ../../reference/lexical_analysis.rst:253 msgid "" "Except at the beginning of a logical line or in string literals, the " "whitespace characters space, tab and formfeed can be used interchangeably to " @@ -280,11 +279,11 @@ msgid "" "is one token, but a b is two tokens)." msgstr "" -#: ../../reference/lexical_analysis.rst:264 +#: ../../reference/lexical_analysis.rst:263 msgid "Other tokens" msgstr "" -#: ../../reference/lexical_analysis.rst:266 +#: ../../reference/lexical_analysis.rst:265 msgid "" "Besides NEWLINE, INDENT and DEDENT, the following categories of tokens " "exist: *identifiers*, *keywords*, *literals*, *operators*, and *delimiters*. " @@ -294,24 +293,24 @@ msgid "" "from left to right." msgstr "" -#: ../../reference/lexical_analysis.rst:276 +#: ../../reference/lexical_analysis.rst:275 msgid "Identifiers and keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:280 +#: ../../reference/lexical_analysis.rst:279 msgid "" "Identifiers (also referred to as *names*) are described by the following " "lexical definitions." msgstr "" -#: ../../reference/lexical_analysis.rst:283 +#: ../../reference/lexical_analysis.rst:282 msgid "" "The syntax of identifiers in Python is based on the Unicode standard annex " "UAX-31, with elaboration and changes as defined below; see also :pep:`3131` " "for further details." msgstr "" -#: ../../reference/lexical_analysis.rst:287 +#: ../../reference/lexical_analysis.rst:286 msgid "" "Within the ASCII range (U+0001..U+007F), the valid characters for " "identifiers are the same as in Python 2.x: the uppercase and lowercase " @@ -319,7 +318,7 @@ msgid "" "character, the digits ``0`` through ``9``." msgstr "" -#: ../../reference/lexical_analysis.rst:292 +#: ../../reference/lexical_analysis.rst:291 msgid "" "Python 3.0 introduces additional characters from outside the ASCII range " "(see :pep:`3131`). For these characters, the classification uses the " @@ -327,94 +326,94 @@ msgid "" "`unicodedata` module." msgstr "" -#: ../../reference/lexical_analysis.rst:296 +#: ../../reference/lexical_analysis.rst:295 msgid "Identifiers are unlimited in length. Case is significant." msgstr "" -#: ../../reference/lexical_analysis.rst:305 +#: ../../reference/lexical_analysis.rst:304 msgid "The Unicode category codes mentioned above stand for:" msgstr "" -#: ../../reference/lexical_analysis.rst:307 +#: ../../reference/lexical_analysis.rst:306 msgid "*Lu* - uppercase letters" msgstr "*Lu* - 大寫字母" -#: ../../reference/lexical_analysis.rst:308 +#: ../../reference/lexical_analysis.rst:307 msgid "*Ll* - lowercase letters" msgstr "*Ll* - 小寫字母" -#: ../../reference/lexical_analysis.rst:309 +#: ../../reference/lexical_analysis.rst:308 msgid "*Lt* - titlecase letters" msgstr "" -#: ../../reference/lexical_analysis.rst:310 +#: ../../reference/lexical_analysis.rst:309 msgid "*Lm* - modifier letters" msgstr "" -#: ../../reference/lexical_analysis.rst:311 +#: ../../reference/lexical_analysis.rst:310 msgid "*Lo* - other letters" msgstr "*Lo* - 其他字母" -#: ../../reference/lexical_analysis.rst:312 +#: ../../reference/lexical_analysis.rst:311 msgid "*Nl* - letter numbers" msgstr "" -#: ../../reference/lexical_analysis.rst:313 +#: ../../reference/lexical_analysis.rst:312 msgid "*Mn* - nonspacing marks" msgstr "" -#: ../../reference/lexical_analysis.rst:314 +#: ../../reference/lexical_analysis.rst:313 msgid "*Mc* - spacing combining marks" msgstr "" -#: ../../reference/lexical_analysis.rst:315 +#: ../../reference/lexical_analysis.rst:314 msgid "*Nd* - decimal numbers" msgstr "*Nd* - 十進位數字" -#: ../../reference/lexical_analysis.rst:316 +#: ../../reference/lexical_analysis.rst:315 msgid "*Pc* - connector punctuations" msgstr "" -#: ../../reference/lexical_analysis.rst:317 +#: ../../reference/lexical_analysis.rst:316 msgid "" "*Other_ID_Start* - explicit list of characters in `PropList.txt `_ to support backwards " "compatibility" msgstr "" -#: ../../reference/lexical_analysis.rst:320 +#: ../../reference/lexical_analysis.rst:319 msgid "*Other_ID_Continue* - likewise" msgstr "" -#: ../../reference/lexical_analysis.rst:322 +#: ../../reference/lexical_analysis.rst:321 msgid "" "All identifiers are converted into the normal form NFKC while parsing; " "comparison of identifiers is based on NFKC." msgstr "" -#: ../../reference/lexical_analysis.rst:325 +#: ../../reference/lexical_analysis.rst:324 msgid "" "A non-normative HTML file listing all valid identifier characters for " "Unicode 15.0.0 can be found at https://www.unicode.org/Public/15.0.0/ucd/" "DerivedCoreProperties.txt" msgstr "" -#: ../../reference/lexical_analysis.rst:333 +#: ../../reference/lexical_analysis.rst:332 msgid "Keywords" msgstr "關鍵字" -#: ../../reference/lexical_analysis.rst:339 +#: ../../reference/lexical_analysis.rst:338 msgid "" "The following identifiers are used as reserved words, or *keywords* of the " "language, and cannot be used as ordinary identifiers. They must be spelled " "exactly as written here:" msgstr "" -#: ../../reference/lexical_analysis.rst:357 +#: ../../reference/lexical_analysis.rst:356 msgid "Soft Keywords" msgstr "軟關鍵字" -#: ../../reference/lexical_analysis.rst:363 +#: ../../reference/lexical_analysis.rst:362 msgid "" "Some identifiers are only reserved under specific contexts. These are known " "as *soft keywords*. The identifiers ``match``, ``case``, ``type`` and ``_`` " @@ -422,82 +421,82 @@ msgid "" "is done at the parser level, not when tokenizing." msgstr "" -#: ../../reference/lexical_analysis.rst:368 +#: ../../reference/lexical_analysis.rst:367 msgid "" "As soft keywords, their use in the grammar is possible while still " "preserving compatibility with existing code that uses these names as " "identifier names." msgstr "" -#: ../../reference/lexical_analysis.rst:372 +#: ../../reference/lexical_analysis.rst:371 msgid "" "``match``, ``case``, and ``_`` are used in the :keyword:`match` statement. " "``type`` is used in the :keyword:`type` statement." msgstr "" -#: ../../reference/lexical_analysis.rst:375 +#: ../../reference/lexical_analysis.rst:374 msgid "``type`` is now a soft keyword." msgstr "``type`` 現在是軟關鍵字。" -#: ../../reference/lexical_analysis.rst:384 +#: ../../reference/lexical_analysis.rst:383 msgid "Reserved classes of identifiers" msgstr "" -#: ../../reference/lexical_analysis.rst:386 +#: ../../reference/lexical_analysis.rst:385 msgid "" "Certain classes of identifiers (besides keywords) have special meanings. " "These classes are identified by the patterns of leading and trailing " "underscore characters:" msgstr "" -#: ../../reference/lexical_analysis.rst:391 +#: ../../reference/lexical_analysis.rst:389 msgid "``_*``" msgstr "``_*``" -#: ../../reference/lexical_analysis.rst:391 +#: ../../reference/lexical_analysis.rst:390 msgid "Not imported by ``from module import *``." msgstr "" -#: ../../reference/lexical_analysis.rst:412 +#: ../../reference/lexical_analysis.rst:392 msgid "``_``" msgstr "``_``" -#: ../../reference/lexical_analysis.rst:394 +#: ../../reference/lexical_analysis.rst:393 msgid "" "In a ``case`` pattern within a :keyword:`match` statement, ``_`` is a :ref:" "`soft keyword ` that denotes a :ref:`wildcard `." msgstr "" -#: ../../reference/lexical_analysis.rst:398 +#: ../../reference/lexical_analysis.rst:397 msgid "" "Separately, the interactive interpreter makes the result of the last " "evaluation available in the variable ``_``. (It is stored in the :mod:" "`builtins` module, alongside built-in functions like ``print``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:403 +#: ../../reference/lexical_analysis.rst:402 msgid "" "Elsewhere, ``_`` is a regular identifier. It is often used to name " "\"special\" items, but it is not special to Python itself." msgstr "" -#: ../../reference/lexical_analysis.rst:408 +#: ../../reference/lexical_analysis.rst:407 msgid "" "The name ``_`` is often used in conjunction with internationalization; refer " "to the documentation for the :mod:`gettext` module for more information on " "this convention." msgstr "" -#: ../../reference/lexical_analysis.rst:412 +#: ../../reference/lexical_analysis.rst:411 msgid "It is also commonly used for unused variables." msgstr "" -#: ../../reference/lexical_analysis.rst:420 +#: ../../reference/lexical_analysis.rst:413 msgid "``__*__``" msgstr "``__*__``" -#: ../../reference/lexical_analysis.rst:415 +#: ../../reference/lexical_analysis.rst:414 msgid "" "System-defined names, informally known as \"dunder\" names. These names are " "defined by the interpreter and its implementation (including the standard " @@ -507,11 +506,11 @@ msgid "" "explicitly documented use, is subject to breakage without warning." msgstr "" -#: ../../reference/lexical_analysis.rst:427 +#: ../../reference/lexical_analysis.rst:421 msgid "``__*``" msgstr "``__*``" -#: ../../reference/lexical_analysis.rst:423 +#: ../../reference/lexical_analysis.rst:422 msgid "" "Class-private names. Names in this category, when used within the context " "of a class definition, are re-written to use a mangled form to help avoid " @@ -519,23 +518,23 @@ msgid "" "section :ref:`atom-identifiers`." msgstr "" -#: ../../reference/lexical_analysis.rst:432 +#: ../../reference/lexical_analysis.rst:431 msgid "Literals" msgstr "" -#: ../../reference/lexical_analysis.rst:436 +#: ../../reference/lexical_analysis.rst:435 msgid "Literals are notations for constant values of some built-in types." msgstr "" -#: ../../reference/lexical_analysis.rst:447 +#: ../../reference/lexical_analysis.rst:446 msgid "String and Bytes literals" msgstr "" -#: ../../reference/lexical_analysis.rst:449 +#: ../../reference/lexical_analysis.rst:448 msgid "String literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:474 +#: ../../reference/lexical_analysis.rst:473 msgid "" "One syntactic restriction not indicated by these productions is that " "whitespace is not allowed between the :token:`~python-grammar:stringprefix` " @@ -545,7 +544,7 @@ msgid "" "`encodings`." msgstr "" -#: ../../reference/lexical_analysis.rst:484 +#: ../../reference/lexical_analysis.rst:483 msgid "" "In plain English: Both types of literals can be enclosed in matching single " "quotes (``'``) or double quotes (``\"``). They can also be enclosed in " @@ -558,7 +557,7 @@ msgid "" "sequences>` below for examples." msgstr "" -#: ../../reference/lexical_analysis.rst:497 +#: ../../reference/lexical_analysis.rst:496 msgid "" "Bytes literals are always prefixed with ``'b'`` or ``'B'``; they produce an " "instance of the :class:`bytes` type instead of the :class:`str` type. They " @@ -566,7 +565,7 @@ msgid "" "greater must be expressed with escapes." msgstr "" -#: ../../reference/lexical_analysis.rst:506 +#: ../../reference/lexical_analysis.rst:505 msgid "" "Both string and bytes literals may optionally be prefixed with a letter " "``'r'`` or ``'R'``; such strings are called :dfn:`raw strings` and treat " @@ -576,20 +575,20 @@ msgid "" "3.x's the ``'ur'`` syntax is not supported." msgstr "" -#: ../../reference/lexical_analysis.rst:513 +#: ../../reference/lexical_analysis.rst:512 msgid "" "The ``'rb'`` prefix of raw bytes literals has been added as a synonym of " "``'br'``." msgstr "" -#: ../../reference/lexical_analysis.rst:517 +#: ../../reference/lexical_analysis.rst:516 msgid "" "Support for the unicode legacy literal (``u'value'``) was reintroduced to " "simplify the maintenance of dual Python 2.x and 3.x codebases. See :pep:" "`414` for more information." msgstr "" -#: ../../reference/lexical_analysis.rst:525 +#: ../../reference/lexical_analysis.rst:524 msgid "" "A string literal with ``'f'`` or ``'F'`` in its prefix is a :dfn:`formatted " "string literal`; see :ref:`f-strings`. The ``'f'`` may be combined with " @@ -597,7 +596,7 @@ msgid "" "are possible, but formatted bytes literals are not." msgstr "" -#: ../../reference/lexical_analysis.rst:530 +#: ../../reference/lexical_analysis.rst:529 msgid "" "In triple-quoted literals, unescaped newlines and quotes are allowed (and " "are retained), except that three unescaped quotes in a row terminate the " @@ -605,246 +604,246 @@ msgid "" "either ``'`` or ``\"``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:553 +#: ../../reference/lexical_analysis.rst:552 msgid "Escape sequences" msgstr "跳脫序列" -#: ../../reference/lexical_analysis.rst:555 +#: ../../reference/lexical_analysis.rst:554 msgid "" "Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string " "and bytes literals are interpreted according to rules similar to those used " "by Standard C. The recognized escape sequences are:" msgstr "" -#: ../../reference/lexical_analysis.rst:560 -#: ../../reference/lexical_analysis.rst:593 +#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:592 msgid "Escape Sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:560 -#: ../../reference/lexical_analysis.rst:593 +#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:592 msgid "Meaning" msgstr "" -#: ../../reference/lexical_analysis.rst:560 -#: ../../reference/lexical_analysis.rst:593 +#: ../../reference/lexical_analysis.rst:559 +#: ../../reference/lexical_analysis.rst:592 msgid "Notes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:562 +#: ../../reference/lexical_analysis.rst:561 msgid "``\\``\\ " msgstr "``\\``\\ " -#: ../../reference/lexical_analysis.rst:562 +#: ../../reference/lexical_analysis.rst:561 msgid "Backslash and newline ignored" msgstr "" -#: ../../reference/lexical_analysis.rst:562 +#: ../../reference/lexical_analysis.rst:561 msgid "\\(1)" msgstr "\\(1)" -#: ../../reference/lexical_analysis.rst:564 +#: ../../reference/lexical_analysis.rst:563 msgid "``\\\\``" msgstr "``\\\\``" -#: ../../reference/lexical_analysis.rst:564 +#: ../../reference/lexical_analysis.rst:563 msgid "Backslash (``\\``)" msgstr "" -#: ../../reference/lexical_analysis.rst:566 +#: ../../reference/lexical_analysis.rst:565 msgid "``\\'``" msgstr "``\\'``" -#: ../../reference/lexical_analysis.rst:566 +#: ../../reference/lexical_analysis.rst:565 msgid "Single quote (``'``)" msgstr "單引號 (``'``)" -#: ../../reference/lexical_analysis.rst:568 +#: ../../reference/lexical_analysis.rst:567 msgid "``\\\"``" msgstr "``\\\"``" -#: ../../reference/lexical_analysis.rst:568 +#: ../../reference/lexical_analysis.rst:567 msgid "Double quote (``\"``)" msgstr "雙引號 (``\"``)" -#: ../../reference/lexical_analysis.rst:570 +#: ../../reference/lexical_analysis.rst:569 msgid "``\\a``" msgstr "``\\a``" -#: ../../reference/lexical_analysis.rst:570 +#: ../../reference/lexical_analysis.rst:569 msgid "ASCII Bell (BEL)" msgstr "" -#: ../../reference/lexical_analysis.rst:572 +#: ../../reference/lexical_analysis.rst:571 msgid "``\\b``" msgstr "``\\b``" -#: ../../reference/lexical_analysis.rst:572 +#: ../../reference/lexical_analysis.rst:571 msgid "ASCII Backspace (BS)" msgstr "" -#: ../../reference/lexical_analysis.rst:574 +#: ../../reference/lexical_analysis.rst:573 msgid "``\\f``" msgstr "``\\f``" -#: ../../reference/lexical_analysis.rst:574 +#: ../../reference/lexical_analysis.rst:573 msgid "ASCII Formfeed (FF)" msgstr "" -#: ../../reference/lexical_analysis.rst:576 +#: ../../reference/lexical_analysis.rst:575 msgid "``\\n``" msgstr "``\\n``" -#: ../../reference/lexical_analysis.rst:576 +#: ../../reference/lexical_analysis.rst:575 msgid "ASCII Linefeed (LF)" msgstr "" -#: ../../reference/lexical_analysis.rst:578 +#: ../../reference/lexical_analysis.rst:577 msgid "``\\r``" msgstr "``\\r``" -#: ../../reference/lexical_analysis.rst:578 +#: ../../reference/lexical_analysis.rst:577 msgid "ASCII Carriage Return (CR)" msgstr "" -#: ../../reference/lexical_analysis.rst:580 +#: ../../reference/lexical_analysis.rst:579 msgid "``\\t``" msgstr "``\\t``" -#: ../../reference/lexical_analysis.rst:580 +#: ../../reference/lexical_analysis.rst:579 msgid "ASCII Horizontal Tab (TAB)" msgstr "" -#: ../../reference/lexical_analysis.rst:582 +#: ../../reference/lexical_analysis.rst:581 msgid "``\\v``" msgstr "``\\v``" -#: ../../reference/lexical_analysis.rst:582 +#: ../../reference/lexical_analysis.rst:581 msgid "ASCII Vertical Tab (VT)" msgstr "" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:583 msgid ":samp:`\\\\\\\\{ooo}`" msgstr ":samp:`\\\\\\\\{ooo}`" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:583 msgid "Character with octal value *ooo*" msgstr "" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:583 msgid "(2,4)" msgstr "(2,4)" -#: ../../reference/lexical_analysis.rst:587 +#: ../../reference/lexical_analysis.rst:586 msgid ":samp:`\\\\x{hh}`" msgstr ":samp:`\\\\x{hh}`" -#: ../../reference/lexical_analysis.rst:587 +#: ../../reference/lexical_analysis.rst:586 msgid "Character with hex value *hh*" msgstr "" -#: ../../reference/lexical_analysis.rst:587 +#: ../../reference/lexical_analysis.rst:586 msgid "(3,4)" msgstr "(3,4)" -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:589 msgid "Escape sequences only recognized in string literals are:" msgstr "" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:594 msgid ":samp:`\\\\N\\\\{{name}\\\\}`" msgstr ":samp:`\\\\N\\\\{{name}\\\\}`" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:594 msgid "Character named *name* in the Unicode database" msgstr "" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:594 msgid "\\(5)" msgstr "\\(5)" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:597 msgid ":samp:`\\\\u{xxxx}`" msgstr ":samp:`\\\\u{xxxx}`" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:597 msgid "Character with 16-bit hex value *xxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:597 msgid "\\(6)" msgstr "\\(6)" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:600 msgid ":samp:`\\\\U{xxxxxxxx}`" msgstr ":samp:`\\\\U{xxxxxxxx}`" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:600 msgid "Character with 32-bit hex value *xxxxxxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:600 msgid "\\(7)" msgstr "\\(7)" -#: ../../reference/lexical_analysis.rst:605 +#: ../../reference/lexical_analysis.rst:604 msgid "Notes:" msgstr "註解:" -#: ../../reference/lexical_analysis.rst:608 +#: ../../reference/lexical_analysis.rst:607 msgid "A backslash can be added at the end of a line to ignore the newline::" msgstr "" -#: ../../reference/lexical_analysis.rst:614 +#: ../../reference/lexical_analysis.rst:613 msgid "" "The same result can be achieved using :ref:`triple-quoted strings " "`, or parentheses and :ref:`string literal concatenation `." msgstr "" -#: ../../reference/lexical_analysis.rst:619 +#: ../../reference/lexical_analysis.rst:618 msgid "As in Standard C, up to three octal digits are accepted." msgstr "" -#: ../../reference/lexical_analysis.rst:621 +#: ../../reference/lexical_analysis.rst:620 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:625 +#: ../../reference/lexical_analysis.rst:624 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`SyntaxWarning`. In a future Python version they will be eventually a :exc:" "`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:631 +#: ../../reference/lexical_analysis.rst:630 msgid "Unlike in Standard C, exactly two hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:634 +#: ../../reference/lexical_analysis.rst:633 msgid "" "In a bytes literal, hexadecimal and octal escapes denote the byte with the " "given value. In a string literal, these escapes denote a Unicode character " "with the given value." msgstr "" -#: ../../reference/lexical_analysis.rst:639 +#: ../../reference/lexical_analysis.rst:638 msgid "Support for name aliases [#]_ has been added." msgstr "" -#: ../../reference/lexical_analysis.rst:643 +#: ../../reference/lexical_analysis.rst:642 msgid "Exactly four hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:646 +#: ../../reference/lexical_analysis.rst:645 msgid "" "Any Unicode character can be encoded this way. Exactly eight hex digits are " "required." msgstr "" -#: ../../reference/lexical_analysis.rst:652 +#: ../../reference/lexical_analysis.rst:651 msgid "" "Unlike Standard C, all unrecognized escape sequences are left in the string " "unchanged, i.e., *the backslash is left in the result*. (This behavior is " @@ -854,17 +853,17 @@ msgid "" "category of unrecognized escapes for bytes literals." msgstr "" -#: ../../reference/lexical_analysis.rst:659 +#: ../../reference/lexical_analysis.rst:658 msgid "Unrecognized escape sequences produce a :exc:`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:662 +#: ../../reference/lexical_analysis.rst:661 msgid "" "Unrecognized escape sequences produce a :exc:`SyntaxWarning`. In a future " "Python version they will be eventually a :exc:`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:666 +#: ../../reference/lexical_analysis.rst:665 msgid "" "Even in a raw literal, quotes can be escaped with a backslash, but the " "backslash remains in the result; for example, ``r\"\\\"\"`` is a valid " @@ -877,11 +876,11 @@ msgid "" "continuation." msgstr "" -#: ../../reference/lexical_analysis.rst:679 +#: ../../reference/lexical_analysis.rst:678 msgid "String literal concatenation" msgstr "" -#: ../../reference/lexical_analysis.rst:681 +#: ../../reference/lexical_analysis.rst:680 msgid "" "Multiple adjacent string or bytes literals (delimited by whitespace), " "possibly using different quoting conventions, are allowed, and their meaning " @@ -891,7 +890,7 @@ msgid "" "lines, or even to add comments to parts of strings, for example::" msgstr "" -#: ../../reference/lexical_analysis.rst:692 +#: ../../reference/lexical_analysis.rst:691 msgid "" "Note that this feature is defined at the syntactical level, but implemented " "at compile time. The '+' operator must be used to concatenate string " @@ -901,11 +900,11 @@ msgid "" "with plain string literals." msgstr "" -#: ../../reference/lexical_analysis.rst:715 +#: ../../reference/lexical_analysis.rst:714 msgid "f-strings" msgstr "f-string(f 字串)" -#: ../../reference/lexical_analysis.rst:719 +#: ../../reference/lexical_analysis.rst:718 msgid "" "A :dfn:`formatted string literal` or :dfn:`f-string` is a string literal " "that is prefixed with ``'f'`` or ``'F'``. These strings may contain " @@ -914,14 +913,14 @@ msgid "" "are really expressions evaluated at run time." msgstr "" -#: ../../reference/lexical_analysis.rst:725 +#: ../../reference/lexical_analysis.rst:724 msgid "" "Escape sequences are decoded like in ordinary string literals (except when a " "literal is also marked as a raw string). After decoding, the grammar for " "the contents of the string is:" msgstr "" -#: ../../reference/lexical_analysis.rst:739 +#: ../../reference/lexical_analysis.rst:738 msgid "" "The parts of the string outside curly braces are treated literally, except " "that any doubled curly braces ``'{{'`` or ``'}}'`` are replaced with the " @@ -934,7 +933,7 @@ msgid "" "replacement field ends with a closing curly bracket ``'}'``." msgstr "" -#: ../../reference/lexical_analysis.rst:749 +#: ../../reference/lexical_analysis.rst:748 msgid "" "Expressions in formatted string literals are treated like regular Python " "expressions surrounded by parentheses, with a few exceptions. An empty " @@ -948,20 +947,20 @@ msgid "" "replacement fields must be closed in a different line." msgstr "" -#: ../../reference/lexical_analysis.rst:766 +#: ../../reference/lexical_analysis.rst:765 msgid "" "Prior to Python 3.7, an :keyword:`await` expression and comprehensions " "containing an :keyword:`async for` clause were illegal in the expressions in " "formatted string literals due to a problem with the implementation." msgstr "" -#: ../../reference/lexical_analysis.rst:771 +#: ../../reference/lexical_analysis.rst:770 msgid "" "Prior to Python 3.12, comments were not allowed inside f-string replacement " "fields." msgstr "" -#: ../../reference/lexical_analysis.rst:775 +#: ../../reference/lexical_analysis.rst:774 msgid "" "When the equal sign ``'='`` is provided, the output will have the expression " "text, the ``'='`` and the evaluated value. Spaces after the opening brace " @@ -972,18 +971,18 @@ msgid "" "r'`` is declared." msgstr "" -#: ../../reference/lexical_analysis.rst:783 +#: ../../reference/lexical_analysis.rst:782 msgid "The equal sign ``'='``." msgstr "等號 ``'='``。" -#: ../../reference/lexical_analysis.rst:786 +#: ../../reference/lexical_analysis.rst:785 msgid "" "If a conversion is specified, the result of evaluating the expression is " "converted before formatting. Conversion ``'!s'`` calls :func:`str` on the " "result, ``'!r'`` calls :func:`repr`, and ``'!a'`` calls :func:`ascii`." msgstr "" -#: ../../reference/lexical_analysis.rst:790 +#: ../../reference/lexical_analysis.rst:789 msgid "" "The result is then formatted using the :func:`format` protocol. The format " "specifier is passed to the :meth:`~object.__format__` method of the " @@ -992,7 +991,7 @@ msgid "" "value of the whole string." msgstr "" -#: ../../reference/lexical_analysis.rst:796 +#: ../../reference/lexical_analysis.rst:795 msgid "" "Top-level format specifiers may include nested replacement fields. These " "nested fields may include their own conversion fields and :ref:`format " @@ -1001,117 +1000,117 @@ msgid "" "as that used by the :meth:`str.format` method." msgstr "" -#: ../../reference/lexical_analysis.rst:802 +#: ../../reference/lexical_analysis.rst:801 msgid "" "Formatted string literals may be concatenated, but replacement fields cannot " "be split across literals." msgstr "" -#: ../../reference/lexical_analysis.rst:805 +#: ../../reference/lexical_analysis.rst:804 msgid "Some examples of formatted string literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:837 +#: ../../reference/lexical_analysis.rst:836 msgid "" "Reusing the outer f-string quoting type inside a replacement field is " "permitted::" msgstr "" -#: ../../reference/lexical_analysis.rst:844 +#: ../../reference/lexical_analysis.rst:843 msgid "" "Prior to Python 3.12, reuse of the same quoting type of the outer f-string " "inside a replacement field was not possible." msgstr "" -#: ../../reference/lexical_analysis.rst:848 +#: ../../reference/lexical_analysis.rst:847 msgid "" "Backslashes are also allowed in replacement fields and are evaluated the " "same way as in any other context::" msgstr "" -#: ../../reference/lexical_analysis.rst:858 +#: ../../reference/lexical_analysis.rst:857 msgid "" "Prior to Python 3.12, backslashes were not permitted inside an f-string " "replacement field." msgstr "" -#: ../../reference/lexical_analysis.rst:862 +#: ../../reference/lexical_analysis.rst:861 msgid "" "Formatted string literals cannot be used as docstrings, even if they do not " "include expressions." msgstr "" -#: ../../reference/lexical_analysis.rst:873 +#: ../../reference/lexical_analysis.rst:872 msgid "" "See also :pep:`498` for the proposal that added formatted string literals, " "and :meth:`str.format`, which uses a related format string mechanism." msgstr "" -#: ../../reference/lexical_analysis.rst:880 +#: ../../reference/lexical_analysis.rst:879 msgid "Numeric literals" msgstr "" -#: ../../reference/lexical_analysis.rst:886 +#: ../../reference/lexical_analysis.rst:885 msgid "" "There are three types of numeric literals: integers, floating point numbers, " "and imaginary numbers. There are no complex literals (complex numbers can " "be formed by adding a real number and an imaginary number)." msgstr "" -#: ../../reference/lexical_analysis.rst:890 +#: ../../reference/lexical_analysis.rst:889 msgid "" "Note that numeric literals do not include a sign; a phrase like ``-1`` is " "actually an expression composed of the unary operator '``-``' and the " "literal ``1``." msgstr "" -#: ../../reference/lexical_analysis.rst:904 +#: ../../reference/lexical_analysis.rst:903 msgid "Integer literals" msgstr "" -#: ../../reference/lexical_analysis.rst:906 +#: ../../reference/lexical_analysis.rst:905 msgid "Integer literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:920 +#: ../../reference/lexical_analysis.rst:919 msgid "" "There is no limit for the length of integer literals apart from what can be " "stored in available memory." msgstr "" -#: ../../reference/lexical_analysis.rst:923 +#: ../../reference/lexical_analysis.rst:922 msgid "" "Underscores are ignored for determining the numeric value of the literal. " "They can be used to group digits for enhanced readability. One underscore " "can occur between digits, and after base specifiers like ``0x``." msgstr "" -#: ../../reference/lexical_analysis.rst:927 +#: ../../reference/lexical_analysis.rst:926 msgid "" "Note that leading zeros in a non-zero decimal number are not allowed. This " "is for disambiguation with C-style octal literals, which Python used before " "version 3.0." msgstr "" -#: ../../reference/lexical_analysis.rst:931 +#: ../../reference/lexical_analysis.rst:930 msgid "Some examples of integer literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:937 -#: ../../reference/lexical_analysis.rst:969 +#: ../../reference/lexical_analysis.rst:936 +#: ../../reference/lexical_analysis.rst:968 msgid "Underscores are now allowed for grouping purposes in literals." msgstr "" -#: ../../reference/lexical_analysis.rst:948 +#: ../../reference/lexical_analysis.rst:947 msgid "Floating point literals" msgstr "" -#: ../../reference/lexical_analysis.rst:950 +#: ../../reference/lexical_analysis.rst:949 msgid "" "Floating point literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:960 +#: ../../reference/lexical_analysis.rst:959 msgid "" "Note that the integer and exponent parts are always interpreted using radix " "10. For example, ``077e010`` is legal, and denotes the same number as " @@ -1120,19 +1119,19 @@ msgid "" "grouping." msgstr "" -#: ../../reference/lexical_analysis.rst:965 +#: ../../reference/lexical_analysis.rst:964 msgid "Some examples of floating point literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:978 +#: ../../reference/lexical_analysis.rst:977 msgid "Imaginary literals" msgstr "" -#: ../../reference/lexical_analysis.rst:980 +#: ../../reference/lexical_analysis.rst:979 msgid "Imaginary literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:985 +#: ../../reference/lexical_analysis.rst:984 msgid "" "An imaginary literal yields a complex number with a real part of 0.0. " "Complex numbers are represented as a pair of floating point numbers and have " @@ -1141,23 +1140,23 @@ msgid "" "Some examples of imaginary literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:997 +#: ../../reference/lexical_analysis.rst:996 msgid "Operators" msgstr "" -#: ../../reference/lexical_analysis.rst:1001 +#: ../../reference/lexical_analysis.rst:1000 msgid "The following tokens are operators:" msgstr "" -#: ../../reference/lexical_analysis.rst:1014 +#: ../../reference/lexical_analysis.rst:1013 msgid "Delimiters" msgstr "" -#: ../../reference/lexical_analysis.rst:1018 +#: ../../reference/lexical_analysis.rst:1017 msgid "The following tokens serve as delimiters in the grammar:" msgstr "" -#: ../../reference/lexical_analysis.rst:1027 +#: ../../reference/lexical_analysis.rst:1026 msgid "" "The period can also occur in floating-point and imaginary literals. A " "sequence of three periods has a special meaning as an ellipsis literal. The " @@ -1165,23 +1164,23 @@ msgid "" "as delimiters, but also perform an operation." msgstr "" -#: ../../reference/lexical_analysis.rst:1032 +#: ../../reference/lexical_analysis.rst:1031 msgid "" "The following printing ASCII characters have special meaning as part of " "other tokens or are otherwise significant to the lexical analyzer:" msgstr "" -#: ../../reference/lexical_analysis.rst:1039 +#: ../../reference/lexical_analysis.rst:1038 msgid "" "The following printing ASCII characters are not used in Python. Their " "occurrence outside string literals and comments is an unconditional error:" msgstr "" -#: ../../reference/lexical_analysis.rst:1048 +#: ../../reference/lexical_analysis.rst:1047 msgid "Footnotes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:1049 +#: ../../reference/lexical_analysis.rst:1048 msgid "https://www.unicode.org/Public/15.0.0/ucd/NameAliases.txt" msgstr "https://www.unicode.org/Public/15.0.0/ucd/NameAliases.txt" @@ -1206,13 +1205,13 @@ msgid "logical line" msgstr "logical line(邏輯列)" #: ../../reference/lexical_analysis.rst:35 -#: ../../reference/lexical_analysis.rst:115 -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:114 +#: ../../reference/lexical_analysis.rst:533 msgid "physical line" msgstr "physical line(物理列)" #: ../../reference/lexical_analysis.rst:35 -#: ../../reference/lexical_analysis.rst:115 +#: ../../reference/lexical_analysis.rst:114 msgid "line joining" msgstr "line joining(列連接)" @@ -1245,367 +1244,367 @@ msgstr "encoding declarations (source file)(編碼宣告(原始檔案))" msgid "source encoding declaration" msgstr "source encoding declaration(原始編碼宣告)" -#: ../../reference/lexical_analysis.rst:115 +#: ../../reference/lexical_analysis.rst:114 msgid "line continuation" msgstr "line continuation(列延續)" -#: ../../reference/lexical_analysis.rst:115 +#: ../../reference/lexical_analysis.rst:114 msgid "backslash character" msgstr "backslash character(反斜線字元)" -#: ../../reference/lexical_analysis.rst:160 +#: ../../reference/lexical_analysis.rst:159 msgid "blank line" msgstr "blank line(空白列)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "indentation" msgstr "indentation(縮排)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "leading whitespace" msgstr "leading whitespace(前置空白)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "space" msgstr "space(空白)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "tab" msgstr "tab(定位字元)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "grouping" msgstr "grouping(群組)" -#: ../../reference/lexical_analysis.rst:175 +#: ../../reference/lexical_analysis.rst:174 msgid "statement grouping" msgstr "statement grouping(陳述式群組)" -#: ../../reference/lexical_analysis.rst:203 +#: ../../reference/lexical_analysis.rst:202 msgid "INDENT token" msgstr "INDENT token(縮排標誌)" -#: ../../reference/lexical_analysis.rst:203 +#: ../../reference/lexical_analysis.rst:202 msgid "DEDENT token" msgstr "DEDENT token(縮排標誌)" -#: ../../reference/lexical_analysis.rst:278 +#: ../../reference/lexical_analysis.rst:277 msgid "identifier" msgstr "identifier(識別器)" -#: ../../reference/lexical_analysis.rst:278 +#: ../../reference/lexical_analysis.rst:277 msgid "name" msgstr "name(名稱)" -#: ../../reference/lexical_analysis.rst:335 -#: ../../reference/lexical_analysis.rst:359 +#: ../../reference/lexical_analysis.rst:334 +#: ../../reference/lexical_analysis.rst:358 msgid "keyword" msgstr "keyword(關鍵字)" -#: ../../reference/lexical_analysis.rst:335 +#: ../../reference/lexical_analysis.rst:334 msgid "reserved word" msgstr "reserved word(保留字)" -#: ../../reference/lexical_analysis.rst:359 +#: ../../reference/lexical_analysis.rst:358 msgid "soft keyword" msgstr "soft keyword(軟關鍵字)" -#: ../../reference/lexical_analysis.rst:378 +#: ../../reference/lexical_analysis.rst:377 msgid "_, identifiers" msgstr "_, identifiers(識別器)" -#: ../../reference/lexical_analysis.rst:378 +#: ../../reference/lexical_analysis.rst:377 msgid "__, identifiers" msgstr "__, identifiers(識別器)" -#: ../../reference/lexical_analysis.rst:434 +#: ../../reference/lexical_analysis.rst:433 msgid "literal" msgstr "literal(常數)" -#: ../../reference/lexical_analysis.rst:434 +#: ../../reference/lexical_analysis.rst:433 msgid "constant" msgstr "constant(常數)" -#: ../../reference/lexical_analysis.rst:439 -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:438 +#: ../../reference/lexical_analysis.rst:479 msgid "string literal" msgstr "string literal(字串常數)" -#: ../../reference/lexical_analysis.rst:439 -#: ../../reference/lexical_analysis.rst:493 +#: ../../reference/lexical_analysis.rst:438 +#: ../../reference/lexical_analysis.rst:492 msgid "bytes literal" msgstr "bytes literal(位元組常數)" -#: ../../reference/lexical_analysis.rst:439 +#: ../../reference/lexical_analysis.rst:438 msgid "ASCII" msgstr "ASCII" -#: ../../reference/lexical_analysis.rst:439 +#: ../../reference/lexical_analysis.rst:438 msgid "' (single quote)" msgstr "' (單引號)" -#: ../../reference/lexical_analysis.rst:439 +#: ../../reference/lexical_analysis.rst:438 msgid "\" (double quote)" msgstr "\" (雙引號)" -#: ../../reference/lexical_analysis.rst:439 +#: ../../reference/lexical_analysis.rst:438 msgid "u'" msgstr "u'" -#: ../../reference/lexical_analysis.rst:439 +#: ../../reference/lexical_analysis.rst:438 msgid "u\"" msgstr "u\"" -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:479 msgid "triple-quoted string" msgstr "triple-quoted string(三引號字串)" -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:479 msgid "Unicode Consortium" msgstr "Unicode Consortium" -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:479 msgid "raw string" msgstr "raw string(原始字串)" -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:479 msgid "\"\"\"" msgstr "\"\"\"" -#: ../../reference/lexical_analysis.rst:480 +#: ../../reference/lexical_analysis.rst:479 msgid "'''" msgstr "'''" -#: ../../reference/lexical_analysis.rst:493 +#: ../../reference/lexical_analysis.rst:492 msgid "b'" msgstr "b'" -#: ../../reference/lexical_analysis.rst:493 +#: ../../reference/lexical_analysis.rst:492 msgid "b\"" msgstr "b\"" -#: ../../reference/lexical_analysis.rst:502 +#: ../../reference/lexical_analysis.rst:501 msgid "r'" msgstr "r'" -#: ../../reference/lexical_analysis.rst:502 +#: ../../reference/lexical_analysis.rst:501 msgid "raw string literal" msgstr "raw string literal(原始字串常數)" -#: ../../reference/lexical_analysis.rst:502 +#: ../../reference/lexical_analysis.rst:501 msgid "r\"" msgstr "r\"" -#: ../../reference/lexical_analysis.rst:521 +#: ../../reference/lexical_analysis.rst:520 msgid "f'" msgstr "f'" -#: ../../reference/lexical_analysis.rst:521 -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:520 +#: ../../reference/lexical_analysis.rst:698 msgid "formatted string literal" msgstr "formatted string literal(格式化字串常數)" -#: ../../reference/lexical_analysis.rst:521 +#: ../../reference/lexical_analysis.rst:520 msgid "f\"" msgstr "f\"" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "escape sequence" msgstr "escape sequence(跳脫序列)" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "Standard C" msgstr "Standard C(標準 C)" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "C" msgstr "C" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\ (backslash)" msgstr "\\ (反斜線)" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\\\" msgstr "\\\\" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\a" msgstr "\\a" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\b" msgstr "\\b" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\f" msgstr "\\f" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\n" msgstr "\\n" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\r" msgstr "\\r" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\t" msgstr "\\t" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\v" msgstr "\\v" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\x" msgstr "\\x" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\N" msgstr "\\N" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\u" msgstr "\\u" -#: ../../reference/lexical_analysis.rst:534 +#: ../../reference/lexical_analysis.rst:533 msgid "\\U" msgstr "\\U" -#: ../../reference/lexical_analysis.rst:650 +#: ../../reference/lexical_analysis.rst:649 msgid "unrecognized escape sequence" msgstr "unrecognized escape sequence(無法辨識的跳脫序列)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "interpolated string literal" msgstr "interpolated string literal(插值字串常數)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "string" msgstr "string(字串)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "formatted literal" msgstr "formatted literal(格式化常數)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "interpolated literal" msgstr "interpolated literal(插值常數)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "f-string" msgstr "f-string(f 字串)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "fstring" msgstr "fstring(f 字串)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "{} (curly brackets)" msgstr "{} (花括號)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "in formatted string literal" msgstr "於格式化字串常數中" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "! (exclamation)" msgstr "! (驚嘆號)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid ": (colon)" msgstr ": (冒號)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "= (equals)" msgstr "= (等於)" -#: ../../reference/lexical_analysis.rst:699 +#: ../../reference/lexical_analysis.rst:698 msgid "for help in debugging using string literals" msgstr "for help in debugging using string literals(使用字串常數進行除錯)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "number" msgstr "number(數字)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "numeric literal" msgstr "numeric literal(數值常數)" -#: ../../reference/lexical_analysis.rst:882 -#: ../../reference/lexical_analysis.rst:895 +#: ../../reference/lexical_analysis.rst:881 +#: ../../reference/lexical_analysis.rst:894 msgid "integer literal" msgstr "integer literal(整數常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "floating point literal" msgstr "floating point literal(浮點數常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "hexadecimal literal" msgstr "hexadecimal literal(十六進位常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "octal literal" msgstr "octal literal(八進位常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "binary literal" msgstr "binary literal(二進位常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "decimal literal" msgstr "decimal literal(十進位常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "imaginary literal" msgstr "imaginary literal(虛數常數)" -#: ../../reference/lexical_analysis.rst:882 +#: ../../reference/lexical_analysis.rst:881 msgid "complex literal" msgstr "complex literal(複數常數)" -#: ../../reference/lexical_analysis.rst:895 +#: ../../reference/lexical_analysis.rst:894 msgid "0b" msgstr "0b" -#: ../../reference/lexical_analysis.rst:895 +#: ../../reference/lexical_analysis.rst:894 msgid "0o" msgstr "0o" -#: ../../reference/lexical_analysis.rst:895 +#: ../../reference/lexical_analysis.rst:894 msgid "0x" msgstr "0x" -#: ../../reference/lexical_analysis.rst:895 -#: ../../reference/lexical_analysis.rst:941 +#: ../../reference/lexical_analysis.rst:894 +#: ../../reference/lexical_analysis.rst:940 msgid "_ (underscore)" msgstr "_ (底線)" -#: ../../reference/lexical_analysis.rst:895 -#: ../../reference/lexical_analysis.rst:941 -#: ../../reference/lexical_analysis.rst:973 +#: ../../reference/lexical_analysis.rst:894 +#: ../../reference/lexical_analysis.rst:940 +#: ../../reference/lexical_analysis.rst:972 msgid "in numeric literal" msgstr "於數值常數中" -#: ../../reference/lexical_analysis.rst:941 +#: ../../reference/lexical_analysis.rst:940 msgid ". (dot)" msgstr ". (點)" -#: ../../reference/lexical_analysis.rst:941 +#: ../../reference/lexical_analysis.rst:940 msgid "e" msgstr "e" -#: ../../reference/lexical_analysis.rst:973 +#: ../../reference/lexical_analysis.rst:972 msgid "j" msgstr "j" -#: ../../reference/lexical_analysis.rst:999 +#: ../../reference/lexical_analysis.rst:998 msgid "operators" msgstr "operators(運算子)" -#: ../../reference/lexical_analysis.rst:1016 +#: ../../reference/lexical_analysis.rst:1015 msgid "delimiters" msgstr "delimiters(分隔符號)" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 3d9e200d9e..85e94417ea 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -362,7 +362,7 @@ msgid "" "__setitem__` or :meth:`~object.__setattr__` call." msgstr "" -#: ../../reference/simple_stmts.rst:361 +#: ../../reference/simple_stmts.rst:358 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr "" @@ -373,7 +373,7 @@ msgid "" "them through comments." msgstr "" -#: ../../reference/simple_stmts.rst:365 +#: ../../reference/simple_stmts.rst:363 msgid ":pep:`484` - Type hints" msgstr "" @@ -1030,60 +1030,63 @@ msgstr "" #: ../../reference/simple_stmts.rst:1009 msgid "" -"The :keyword:`nonlocal` statement causes the listed identifiers to refer to " -"previously bound variables in the nearest enclosing scope excluding globals. " -"This is important because the default behavior for binding is to search the " -"local namespace first. The statement allows encapsulated code to rebind " -"variables outside of the local scope besides the global (module) scope." +"When the definition of a function or class is nested (enclosed) within the " +"definitions of other functions, its nonlocal scopes are the local scopes of " +"the enclosing functions. The :keyword:`nonlocal` statement causes the listed " +"identifiers to refer to names previously bound in nonlocal scopes. It allows " +"encapsulated code to rebind such nonlocal identifiers. If a name is bound " +"in more than one nonlocal scope, the nearest binding is used. If a name is " +"not bound in any nonlocal scope, or if there is no nonlocal scope, a :exc:" +"`SyntaxError` is raised." msgstr "" -#: ../../reference/simple_stmts.rst:1015 +#: ../../reference/simple_stmts.rst:1018 msgid "" -"Names listed in a :keyword:`nonlocal` statement, unlike those listed in a :" -"keyword:`global` statement, must refer to pre-existing bindings in an " -"enclosing scope (the scope in which a new binding should be created cannot " -"be determined unambiguously)." +"The nonlocal statement applies to the entire scope of a function or class " +"body. A :exc:`SyntaxError` is raised if a variable is used or assigned to " +"prior to its nonlocal declaration in the scope." msgstr "" -#: ../../reference/simple_stmts.rst:1020 -msgid "" -"Names listed in a :keyword:`nonlocal` statement must not collide with pre-" -"existing bindings in the local scope." +#: ../../reference/simple_stmts.rst:1024 +msgid ":pep:`3104` - Access to Names in Outer Scopes" msgstr "" #: ../../reference/simple_stmts.rst:1025 -msgid ":pep:`3104` - Access to Names in Outer Scopes" +msgid "The specification for the :keyword:`nonlocal` statement." msgstr "" -#: ../../reference/simple_stmts.rst:1026 -msgid "The specification for the :keyword:`nonlocal` statement." +#: ../../reference/simple_stmts.rst:1027 +msgid "" +"**Programmer's note:** :keyword:`nonlocal` is a directive to the parser and " +"applies only to code parsed along with it. See the note for the :keyword:" +"`global` statement." msgstr "" -#: ../../reference/simple_stmts.rst:1031 +#: ../../reference/simple_stmts.rst:1035 msgid "The :keyword:`!type` statement" msgstr "" -#: ../../reference/simple_stmts.rst:1038 +#: ../../reference/simple_stmts.rst:1042 msgid "" "The :keyword:`!type` statement declares a type alias, which is an instance " "of :class:`typing.TypeAliasType`." msgstr "" -#: ../../reference/simple_stmts.rst:1041 +#: ../../reference/simple_stmts.rst:1045 msgid "For example, the following statement creates a type alias::" msgstr "" -#: ../../reference/simple_stmts.rst:1045 +#: ../../reference/simple_stmts.rst:1049 msgid "This code is roughly equivalent to::" msgstr "" -#: ../../reference/simple_stmts.rst:1051 +#: ../../reference/simple_stmts.rst:1055 msgid "" "``annotation-def`` indicates an :ref:`annotation scope `, " "which behaves mostly like a function, but with several small differences." msgstr "" -#: ../../reference/simple_stmts.rst:1054 +#: ../../reference/simple_stmts.rst:1058 msgid "" "The value of the type alias is evaluated in the annotation scope. It is not " "evaluated when the type alias is created, but only when the value is " @@ -1092,21 +1095,21 @@ msgid "" "not yet defined." msgstr "" -#: ../../reference/simple_stmts.rst:1060 +#: ../../reference/simple_stmts.rst:1064 msgid "" "Type aliases may be made generic by adding a :ref:`type parameter list ` after the name. See :ref:`generic-type-aliases` for more." msgstr "" -#: ../../reference/simple_stmts.rst:1063 +#: ../../reference/simple_stmts.rst:1067 msgid ":keyword:`!type` is a :ref:`soft keyword `." msgstr "" -#: ../../reference/simple_stmts.rst:1070 +#: ../../reference/simple_stmts.rst:1073 msgid ":pep:`695` - Type Parameter Syntax" msgstr "" -#: ../../reference/simple_stmts.rst:1070 +#: ../../reference/simple_stmts.rst:1074 msgid "" "Introduced the :keyword:`!type` statement and syntax for generic classes and " "functions." @@ -1125,7 +1128,7 @@ msgstr "" #: ../../reference/simple_stmts.rst:681 ../../reference/simple_stmts.rst:715 #: ../../reference/simple_stmts.rst:740 ../../reference/simple_stmts.rst:870 #: ../../reference/simple_stmts.rst:956 ../../reference/simple_stmts.rst:1003 -#: ../../reference/simple_stmts.rst:1033 +#: ../../reference/simple_stmts.rst:1037 msgid "statement" msgstr "statement(陳述式)" @@ -1585,6 +1588,6 @@ msgstr "compile(編譯)" msgid "nonlocal" msgstr "nonlocal" -#: ../../reference/simple_stmts.rst:1033 +#: ../../reference/simple_stmts.rst:1037 msgid "type" msgstr "" diff --git a/sphinx.po b/sphinx.po index 91bc236984..a4641b17c0 100644 --- a/sphinx.po +++ b/sphinx.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2023, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-03 20:44+0000\n" +"POT-Creation-Date: 2024-03-27 00:03+0000\n" "PO-Revision-Date: 2023-03-15 10:19+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -122,8 +122,8 @@ msgid "Welcome! This is the official documentation for Python %(release)s." msgstr "歡迎!這是 Python %(release)s 的官方說明文件。" #: ../../tools/templates/indexcontent.html:10 -msgid "Parts of the documentation:" -msgstr "說明文件綱要:" +msgid "Documentation sections:" +msgstr "文件章節:" #: ../../tools/templates/indexcontent.html:13 msgid "What's new in Python %(version)s?" @@ -131,152 +131,153 @@ msgstr "Python %(version)s 有什麼新功能?" #: ../../tools/templates/indexcontent.html:14 msgid "" -"or all \"What's new\" documents since 2.0" +"Or all \"What's new\" documents since Python " +"2.0" msgstr "" -"或自 2.0 起所有「有什麼新功能?」文件" +"或自 2.0 起的所有「有什麼新功能?」文件" #: ../../tools/templates/indexcontent.html:15 msgid "Tutorial" msgstr "Python 教學" #: ../../tools/templates/indexcontent.html:16 -msgid "start here" -msgstr "由此開始閱讀" +msgid "Start here: a tour of Python's syntax and features" +msgstr "從這裡開始:Python 的語法與特性導覽" #: ../../tools/templates/indexcontent.html:17 -msgid "Library Reference" +msgid "Library reference" msgstr "函式庫參考手冊" #: ../../tools/templates/indexcontent.html:18 -msgid "keep this under your pillow" -msgstr "把這個放在枕頭下" +msgid "Standard library and builtins" +msgstr "標準函式庫與內建函式" #: ../../tools/templates/indexcontent.html:19 -msgid "Language Reference" +msgid "Language reference" msgstr "語言參考手冊" #: ../../tools/templates/indexcontent.html:20 -msgid "describes syntax and language elements" -msgstr "描述語法及語言要素" +msgid "Syntax and language elements" +msgstr "語法及語言要素" #: ../../tools/templates/indexcontent.html:21 -msgid "Python Setup and Usage" +msgid "Python setup and usage" msgstr "Python 的設置與使用" #: ../../tools/templates/indexcontent.html:22 -msgid "how to use Python on different platforms" -msgstr "如何在不同平台上使用 Python" +msgid "How to install, configure, and use Python" +msgstr "如何安裝、設定與使用 Python" #: ../../tools/templates/indexcontent.html:23 msgid "Python HOWTOs" msgstr "Python 如何達成任務" #: ../../tools/templates/indexcontent.html:24 -msgid "in-depth documents on specific topics" -msgstr "特定主題的深入探索" +msgid "In-depth topic manuals" +msgstr "深度主題說明手冊" #: ../../tools/templates/indexcontent.html:26 -msgid "Installing Python Modules" +msgid "Installing Python modules" msgstr "安裝 Python 模組" #: ../../tools/templates/indexcontent.html:27 -msgid "installing from the Python Package Index & other sources" -msgstr "從 Python 套件索引和其他來源安裝" +msgid "Third-party modules and PyPI.org" +msgstr "第三方模組與 PyPI.org" #: ../../tools/templates/indexcontent.html:28 -msgid "Distributing Python Modules" +msgid "Distributing Python modules" msgstr "發布 Python 模組" #: ../../tools/templates/indexcontent.html:29 -msgid "publishing modules for installation by others" -msgstr "公佈模組讓其他人可以安裝" +msgid "Publishing modules for use by other people" +msgstr "發佈模組讓其他人可以使用" #: ../../tools/templates/indexcontent.html:30 -msgid "Extending and Embedding" +msgid "Extending and embedding" msgstr "擴充和嵌入" #: ../../tools/templates/indexcontent.html:31 -msgid "tutorial for C/C++ programmers" -msgstr "給 C/C++ 程式設計師的教學" +msgid "For C/C++ programmers" +msgstr "給 C/C++ 程式設計師" #: ../../tools/templates/indexcontent.html:32 -msgid "Python/C API" -msgstr "Python/C 應用程式介面 (API)" +msgid "Python's C API" +msgstr "Python 的 C 應用程式介面 (API)" #: ../../tools/templates/indexcontent.html:33 -msgid "reference for C/C++ programmers" -msgstr "給 C/C++ 程式設計師的參考" +msgid "C API reference" +msgstr "C API 參考手冊" #: ../../tools/templates/indexcontent.html:34 msgid "FAQs" msgstr "常見問答集" #: ../../tools/templates/indexcontent.html:35 -msgid "frequently asked questions (with answers!)" +msgid "Frequently asked questions (with answers!)" msgstr "常被提出的問題(還有答案!)" #: ../../tools/templates/indexcontent.html:39 -msgid "Indices and tables:" -msgstr "索引與表格:" +msgid "Indices, glossary, and search:" +msgstr "索引、術語表與搜尋:" #: ../../tools/templates/indexcontent.html:42 -msgid "Global Module Index" +msgid "Global module index" msgstr "全域模組索引" #: ../../tools/templates/indexcontent.html:43 -msgid "quick access to all modules" -msgstr "迅速找到所有模組" +msgid "All modules and libraries" +msgstr "所有模組與函式庫" #: ../../tools/templates/indexcontent.html:44 -msgid "General Index" +msgid "General index" msgstr "總索引" #: ../../tools/templates/indexcontent.html:45 -msgid "all functions, classes, terms" -msgstr "全部函式、類別、術語" +msgid "All functions, classes, and terms" +msgstr "全部函式、類別和術語" #: ../../tools/templates/indexcontent.html:46 msgid "Glossary" msgstr "術語表" #: ../../tools/templates/indexcontent.html:47 -msgid "the most important terms explained" -msgstr "解釋最重要的術語" +msgid "Terms explained" +msgstr "術語解釋" #: ../../tools/templates/indexcontent.html:49 msgid "Search page" msgstr "搜尋頁" #: ../../tools/templates/indexcontent.html:50 -msgid "search this documentation" +msgid "Search this documentation" msgstr "搜尋這份說明文件" #: ../../tools/templates/indexcontent.html:51 -msgid "Complete Table of Contents" +msgid "Complete table of contents" msgstr "完整內容列表" #: ../../tools/templates/indexcontent.html:52 -msgid "lists all sections and subsections" +msgid "Lists all sections and subsections" msgstr "列出所有章節與小節" #: ../../tools/templates/indexcontent.html:56 -msgid "Meta information:" -msgstr "元資訊:" +msgid "Project information:" +msgstr "專案資訊:" #: ../../tools/templates/indexcontent.html:59 -msgid "Reporting bugs" -msgstr "錯誤回報" +msgid "Reporting issues" +msgstr "回報問題" #: ../../tools/templates/indexcontent.html:60 msgid "Contributing to Docs" msgstr "貢獻說明文件" #: ../../tools/templates/indexcontent.html:61 -msgid "About the documentation" -msgstr "關於說明文件" +msgid "Download the documentation" +msgstr "下載說明文件" #: ../../tools/templates/indexcontent.html:63 -msgid "History and License of Python" +msgid "History and license of Python" msgstr "Python 的沿革與授權" #: ../../tools/templates/indexcontent.html:64 @@ -284,8 +285,8 @@ msgid "Copyright" msgstr "版權" #: ../../tools/templates/indexcontent.html:65 -msgid "Download the documentation" -msgstr "下載說明文件" +msgid "About the documentation" +msgstr "關於說明文件" #: ../../tools/templates/indexsidebar.html:1 msgid "Download" diff --git a/tutorial/classes.po b/tutorial/classes.po index aec0f3f79e..ad2cb04994 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-17 00:03+0000\n" +"POT-Creation-Date: 2024-04-15 12:57+0000\n" "PO-Revision-Date: 2022-12-26 23:12+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -997,8 +997,7 @@ msgid "" "and that is monotonic (meaning that a class can be subclassed without " "affecting the precedence order of its parents). Taken together, these " "properties make it possible to design reliable and extensible classes with " -"multiple inheritance. For more detail, see https://www.python.org/download/" -"releases/2.3/mro/." +"multiple inheritance. For more detail, see :ref:`python_2.3_mro`." msgstr "" "動態排序是必要的,因為多重繼承的所有情況都表現一或多的菱形關係(其中至少一個 " "parent class 可以從最底層 class 透過多個路徑存取)。例如,所有的 class 都繼承" @@ -1007,8 +1006,7 @@ msgstr "" "(linearize):保留每個 class 中規定的從左到右的順序、對每個 parent 只會呼叫一" "次、使用單調的 (monotonic) 方式(意思是,一個 class 可以被 subclassed(子類別" "化),而不會影響其 parent 的搜尋優先順序)。總之,這些特性使設計出可靠又可擴" -"充、具有多重繼承的 class 成為可能。更多資訊,請見 https://www.python.org/" -"download/releases/2.3/mro/。" +"充、具有多重繼承的 class 成為可能。更多資訊,請見 :ref:`python_2.3_mro`。" #: ../../tutorial/classes.rst:674 msgid "Private Variables" diff --git a/tutorial/errors.po b/tutorial/errors.po index bff2d5515a..2e94ac8397 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-11-20 00:03+0000\n" +"POT-Creation-Date: 2024-04-10 00:03+0000\n" "PO-Revision-Date: 2022-10-24 14:54+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -49,13 +49,14 @@ msgstr "" "怨: ::" #: ../../tutorial/errors.rst:26 +#, fuzzy msgid "" -"The parser repeats the offending line and displays a little 'arrow' pointing " -"at the earliest point in the line where the error was detected. The error " -"is caused by (or at least detected at) the token *preceding* the arrow: in " -"the example, the error is detected at the function :func:`print`, since a " -"colon (``':'``) is missing before it. File name and line number are printed " -"so you know where to look in case the input came from a script." +"The parser repeats the offending line and displays little 'arrow's pointing " +"at the token in the line where the error was detected. The error may be " +"caused by the absence of a token *before* the indicated token. In the " +"example, the error is detected at the function :func:`print`, since a colon " +"(``':'``) is missing before it. File name and line number are printed so " +"you know where to look in case the input came from a script." msgstr "" "剖析器 (parser) 會重複犯錯的那一行,並用一個小「箭頭」指向該行檢測到的第一個" "錯誤點。錯誤是由箭頭\\ *之前*\\ 的標記 (token) 導致的(或至少是在這裡檢測到" @@ -195,11 +196,13 @@ msgstr "" "用一組括號內的 tuple 列舉多個例外,例如: ::" #: ../../tutorial/errors.rst:122 +#, fuzzy msgid "" -"A class in an :keyword:`except` clause is compatible with an exception if it " -"is the same class or a base class thereof (but not the other way around --- " -"an *except clause* listing a derived class is not compatible with a base " -"class). For example, the following code will print B, C, D in that order::" +"A class in an :keyword:`except` clause matches exceptions which are " +"instances of the class itself or one of its derived classes (but not the " +"other way around --- an *except clause* listing a derived class does not " +"match instances of its base classes). For example, the following code will " +"print B, C, D in that order::" msgstr "" "一個在 :keyword:`except` 子句中的 class(類別)和一個例外是可相容的,只要它與" "例外是同一個 class 或是為其 base class(基底類別);反之則無法成立——列出 " diff --git a/tutorial/introduction.po b/tutorial/introduction.po index 080f8e2a06..301693f800 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -378,7 +378,7 @@ msgstr "如果你需要一個不一樣的字串,你必須建立一個新的: msgid "The built-in function :func:`len` returns the length of a string::" msgstr "內建的函式 :func:`len` 回傳一個字串的長度: ::" -#: ../../tutorial/introduction.rst:367 +#: ../../tutorial/introduction.rst:365 msgid ":ref:`textseq`" msgstr ":ref:`textseq`" @@ -388,7 +388,7 @@ msgid "" "supported by such types." msgstr "字串是 *sequence 型別*\\ 的範例之一,並支援該型別常用的操作。" -#: ../../tutorial/introduction.rst:371 +#: ../../tutorial/introduction.rst:369 msgid ":ref:`string-methods`" msgstr ":ref:`string-methods`" @@ -398,7 +398,7 @@ msgid "" "searching." msgstr "字串支援非常多種基本轉換和搜尋的 method(方法)。" -#: ../../tutorial/introduction.rst:374 +#: ../../tutorial/introduction.rst:373 msgid ":ref:`f-strings`" msgstr ":ref:`f-strings`" @@ -406,7 +406,7 @@ msgstr ":ref:`f-strings`" msgid "String literals that have embedded expressions." msgstr "包含有運算式的字串文本。" -#: ../../tutorial/introduction.rst:377 +#: ../../tutorial/introduction.rst:376 msgid ":ref:`formatstrings`" msgstr ":ref:`formatstrings`" @@ -414,7 +414,7 @@ msgstr ":ref:`formatstrings`" msgid "Information about string formatting with :meth:`str.format`." msgstr "關於透過 :meth:`str.format` 字串格式化 (string formatting) 的資訊。" -#: ../../tutorial/introduction.rst:380 +#: ../../tutorial/introduction.rst:379 msgid ":ref:`old-string-formatting`" msgstr ":ref:`old-string-formatting`" diff --git a/using/cmdline.po b/using/cmdline.po index 0fb740ca3d..2c74d49926 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-07 17:26+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -185,7 +185,7 @@ msgstr "" "引發一個附帶引數 ``module-name`` 的\\ :ref:`稽核事件 ` ``cpython." "run_module``。" -#: ../../using/cmdline.rst:119 +#: ../../using/cmdline.rst:118 msgid ":func:`runpy.run_module`" msgstr ":func:`runpy.run_module`" @@ -329,22 +329,23 @@ msgstr "" #: ../../using/cmdline.rst:245 msgid "" -"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" -"class:`str` or :class:`bytes` with :class:`int`. Issue an error when the " -"option is given twice (:option:`!-bb`)." +"Issue a warning when converting :class:`bytes` or :class:`bytearray` to :" +"class:`str` without specifying encoding or comparing :class:`!bytes` or :" +"class:`!bytearray` with :class:`!str` or :class:`!bytes` with :class:`int`. " +"Issue an error when the option is given twice (:option:`!-bb`)." msgstr "" -#: ../../using/cmdline.rst:249 -msgid "Affects comparisons of :class:`bytes` with :class:`int`." +#: ../../using/cmdline.rst:250 +msgid "Affects also comparisons of :class:`bytes` with :class:`int`." msgstr "" -#: ../../using/cmdline.rst:254 +#: ../../using/cmdline.rst:255 msgid "" "If given, Python won't try to write ``.pyc`` files on the import of source " "modules. See also :envvar:`PYTHONDONTWRITEBYTECODE`." msgstr "" -#: ../../using/cmdline.rst:260 +#: ../../using/cmdline.rst:261 msgid "" "Control the validation behavior of hash-based ``.pyc`` files. See :ref:`pyc-" "invalidation`. When set to ``default``, checked and unchecked hash-based " @@ -355,35 +356,35 @@ msgid "" "corresponding source files." msgstr "" -#: ../../using/cmdline.rst:268 +#: ../../using/cmdline.rst:269 msgid "" "The semantics of timestamp-based ``.pyc`` files are unaffected by this " "option." msgstr "" -#: ../../using/cmdline.rst:274 +#: ../../using/cmdline.rst:275 msgid "" "Turn on parser debugging output (for expert only). See also the :envvar:" "`PYTHONDEBUG` environment variable." msgstr "" -#: ../../using/cmdline.rst:277 +#: ../../using/cmdline.rst:278 msgid "" "This option requires a :ref:`debug build of Python `, otherwise " "it's ignored." msgstr "" -#: ../../using/cmdline.rst:283 +#: ../../using/cmdline.rst:284 msgid "" "Ignore all ``PYTHON*`` environment variables, e.g. :envvar:`PYTHONPATH` and :" "envvar:`PYTHONHOME`, that might be set." msgstr "" -#: ../../using/cmdline.rst:286 +#: ../../using/cmdline.rst:287 msgid "See also the :option:`-P` and :option:`-I` (isolated) options." msgstr "另請參閱 :option:`-P` 和 :option:`-I` (isolated) 選項。" -#: ../../using/cmdline.rst:291 +#: ../../using/cmdline.rst:292 msgid "" "When a script is passed as first argument or the :option:`-c` option is " "used, enter interactive mode after executing the script or the command, even " @@ -391,19 +392,19 @@ msgid "" "`PYTHONSTARTUP` file is not read." msgstr "" -#: ../../using/cmdline.rst:296 +#: ../../using/cmdline.rst:297 msgid "" "This can be useful to inspect global variables or a stack trace when a " "script raises an exception. See also :envvar:`PYTHONINSPECT`." msgstr "" -#: ../../using/cmdline.rst:302 +#: ../../using/cmdline.rst:303 msgid "" "Run Python in isolated mode. This also implies :option:`-E`, :option:`-P` " "and :option:`-s` options." msgstr "" -#: ../../using/cmdline.rst:305 +#: ../../using/cmdline.rst:306 msgid "" "In isolated mode :data:`sys.path` contains neither the script's directory " "nor the user's site-packages directory. All ``PYTHON*`` environment " @@ -411,7 +412,7 @@ msgid "" "the user from injecting malicious code." msgstr "" -#: ../../using/cmdline.rst:315 +#: ../../using/cmdline.rst:316 msgid "" "Remove assert statements and any code conditional on the value of :const:" "`__debug__`. Augment the filename for compiled (:term:`bytecode`) files by " @@ -419,58 +420,58 @@ msgid "" "envvar:`PYTHONOPTIMIZE`." msgstr "" -#: ../../using/cmdline.rst:320 ../../using/cmdline.rst:330 +#: ../../using/cmdline.rst:321 ../../using/cmdline.rst:331 msgid "Modify ``.pyc`` filenames according to :pep:`488`." msgstr "根據 :pep:`488` 修改 ``.pyc`` 檔案名稱。" -#: ../../using/cmdline.rst:326 +#: ../../using/cmdline.rst:327 msgid "" "Do :option:`-O` and also discard docstrings. Augment the filename for " "compiled (:term:`bytecode`) files by adding ``.opt-2`` before the ``.pyc`` " "extension (see :pep:`488`)." msgstr "" -#: ../../using/cmdline.rst:336 +#: ../../using/cmdline.rst:337 msgid "Don't prepend a potentially unsafe path to :data:`sys.path`:" msgstr "" -#: ../../using/cmdline.rst:338 +#: ../../using/cmdline.rst:339 msgid "" "``python -m module`` command line: Don't prepend the current working " "directory." msgstr "" -#: ../../using/cmdline.rst:340 +#: ../../using/cmdline.rst:341 msgid "" "``python script.py`` command line: Don't prepend the script's directory. If " "it's a symbolic link, resolve symbolic links." msgstr "" -#: ../../using/cmdline.rst:342 +#: ../../using/cmdline.rst:343 msgid "" "``python -c code`` and ``python`` (REPL) command lines: Don't prepend an " "empty string, which means the current working directory." msgstr "" -#: ../../using/cmdline.rst:345 +#: ../../using/cmdline.rst:346 msgid "" "See also the :envvar:`PYTHONSAFEPATH` environment variable, and :option:`-E` " "and :option:`-I` (isolated) options." msgstr "" -#: ../../using/cmdline.rst:353 +#: ../../using/cmdline.rst:354 msgid "" "Don't display the copyright and version messages even in interactive mode." msgstr "" -#: ../../using/cmdline.rst:360 +#: ../../using/cmdline.rst:361 msgid "" "Turn on hash randomization. This option only has an effect if the :envvar:" "`PYTHONHASHSEED` environment variable is set to ``0``, since hash " "randomization is enabled by default." msgstr "" -#: ../../using/cmdline.rst:364 +#: ../../using/cmdline.rst:365 msgid "" "On previous versions of Python, this option turns on hash randomization, so " "that the :meth:`~object.__hash__` values of str and bytes objects are " @@ -479,7 +480,7 @@ msgid "" "between repeated invocations of Python." msgstr "" -#: ../../using/cmdline.rst:370 +#: ../../using/cmdline.rst:371 msgid "" "Hash randomization is intended to provide protection against a denial-of-" "service caused by carefully chosen inputs that exploit the worst case " @@ -487,28 +488,32 @@ msgid "" "http://ocert.org/advisories/ocert-2011-003.html for details." msgstr "" -#: ../../using/cmdline.rst:375 +#: ../../using/cmdline.rst:376 msgid "" ":envvar:`PYTHONHASHSEED` allows you to set a fixed value for the hash seed " "secret." msgstr "" -#: ../../using/cmdline.rst:380 +#: ../../using/cmdline.rst:381 msgid "The option is no longer ignored." msgstr "" -#: ../../using/cmdline.rst:386 +#: ../../using/cmdline.rst:387 msgid "" "Don't add the :data:`user site-packages directory ` to :data:" "`sys.path`." msgstr "" -#: ../../using/cmdline.rst:391 ../../using/cmdline.rst:799 -#: ../../using/cmdline.rst:811 +#: ../../using/cmdline.rst:390 +msgid "See also :envvar:`PYTHONNOUSERSITE`." +msgstr "另請參閱 :envvar:`PYTHONNOUSERSITE`。" + +#: ../../using/cmdline.rst:394 ../../using/cmdline.rst:810 +#: ../../using/cmdline.rst:822 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" -#: ../../using/cmdline.rst:396 +#: ../../using/cmdline.rst:399 msgid "" "Disable the import of the module :mod:`site` and the site-dependent " "manipulations of :data:`sys.path` that it entails. Also disable these " @@ -516,21 +521,21 @@ msgid "" "main` if you want them to be triggered)." msgstr "" -#: ../../using/cmdline.rst:404 +#: ../../using/cmdline.rst:407 msgid "" "Force the stdout and stderr streams to be unbuffered. This option has no " "effect on the stdin stream." msgstr "" -#: ../../using/cmdline.rst:407 +#: ../../using/cmdline.rst:410 msgid "See also :envvar:`PYTHONUNBUFFERED`." msgstr "另請參閱 :envvar:`PYTHONUNBUFFERED`\\ 。" -#: ../../using/cmdline.rst:409 +#: ../../using/cmdline.rst:412 msgid "The text layer of the stdout and stderr streams now is unbuffered." msgstr "" -#: ../../using/cmdline.rst:415 +#: ../../using/cmdline.rst:418 msgid "" "Print a message each time a module is initialized, showing the place " "(filename or built-in module) from which it is loaded. When given twice (:" @@ -538,60 +543,60 @@ msgid "" "searching for a module. Also provides information on module cleanup at exit." msgstr "" -#: ../../using/cmdline.rst:420 +#: ../../using/cmdline.rst:423 msgid "" "The :mod:`site` module reports the site-specific paths and :file:`.pth` " "files being processed." msgstr "" -#: ../../using/cmdline.rst:424 +#: ../../using/cmdline.rst:427 msgid "See also :envvar:`PYTHONVERBOSE`." msgstr "另請參閱 :envvar:`PYTHONVERBOSE`\\ 。" -#: ../../using/cmdline.rst:430 +#: ../../using/cmdline.rst:433 msgid "" "Warning control. Python's warning machinery by default prints warning " "messages to :data:`sys.stderr`." msgstr "" -#: ../../using/cmdline.rst:433 ../../using/cmdline.rst:827 +#: ../../using/cmdline.rst:436 ../../using/cmdline.rst:838 msgid "" "The simplest settings apply a particular action unconditionally to all " "warnings emitted by a process (even those that are otherwise ignored by " "default)::" msgstr "" -#: ../../using/cmdline.rst:444 +#: ../../using/cmdline.rst:447 msgid "" "The action names can be abbreviated as desired and the interpreter will " "resolve them to the appropriate action name. For example, ``-Wi`` is the " "same as ``-Wignore``." msgstr "" -#: ../../using/cmdline.rst:448 +#: ../../using/cmdline.rst:451 msgid "The full form of argument is::" msgstr "" -#: ../../using/cmdline.rst:452 +#: ../../using/cmdline.rst:455 msgid "" "Empty fields match all values; trailing empty fields may be omitted. For " "example ``-W ignore::DeprecationWarning`` ignores all DeprecationWarning " "warnings." msgstr "" -#: ../../using/cmdline.rst:456 +#: ../../using/cmdline.rst:459 msgid "" "The *action* field is as explained above but only applies to warnings that " "match the remaining fields." msgstr "" -#: ../../using/cmdline.rst:459 +#: ../../using/cmdline.rst:462 msgid "" "The *message* field must match the whole warning message; this match is case-" "insensitive." msgstr "" -#: ../../using/cmdline.rst:462 +#: ../../using/cmdline.rst:465 msgid "" "The *category* field matches the warning category (ex: " "``DeprecationWarning``). This must be a class name; the match test whether " @@ -599,19 +604,19 @@ msgid "" "warning category." msgstr "" -#: ../../using/cmdline.rst:467 +#: ../../using/cmdline.rst:470 msgid "" "The *module* field matches the (fully qualified) module name; this match is " "case-sensitive." msgstr "" -#: ../../using/cmdline.rst:470 +#: ../../using/cmdline.rst:473 msgid "" "The *lineno* field matches the line number, where zero matches all line " "numbers and is thus equivalent to an omitted line number." msgstr "" -#: ../../using/cmdline.rst:473 +#: ../../using/cmdline.rst:476 msgid "" "Multiple :option:`-W` options can be given; when a warning matches more than " "one option, the action for the last matching option is performed. Invalid :" @@ -619,7 +624,7 @@ msgid "" "invalid options when the first warning is issued)." msgstr "" -#: ../../using/cmdline.rst:478 +#: ../../using/cmdline.rst:481 msgid "" "Warnings can also be controlled using the :envvar:`PYTHONWARNINGS` " "environment variable and from within a Python program using the :mod:" @@ -627,31 +632,31 @@ msgid "" "can be used to use a regular expression on the warning message." msgstr "" -#: ../../using/cmdline.rst:483 ../../using/cmdline.rst:838 +#: ../../using/cmdline.rst:486 ../../using/cmdline.rst:849 msgid "" "See :ref:`warning-filter` and :ref:`describing-warning-filters` for more " "details." msgstr "" -#: ../../using/cmdline.rst:489 +#: ../../using/cmdline.rst:492 msgid "" "Skip the first line of the source, allowing use of non-Unix forms of ``#!" "cmd``. This is intended for a DOS specific hack only." msgstr "" -#: ../../using/cmdline.rst:495 +#: ../../using/cmdline.rst:498 msgid "" "Reserved for various implementation-specific options. CPython currently " "defines the following possible values:" msgstr "" -#: ../../using/cmdline.rst:498 +#: ../../using/cmdline.rst:501 msgid "" "``-X faulthandler`` to enable :mod:`faulthandler`. See also :envvar:" "`PYTHONFAULTHANDLER`." msgstr "" -#: ../../using/cmdline.rst:500 +#: ../../using/cmdline.rst:506 msgid "" "``-X showrefcount`` to output the total reference count and number of used " "memory blocks when the program finishes or after each statement in the " @@ -659,7 +664,7 @@ msgid "" "build>`." msgstr "" -#: ../../using/cmdline.rst:504 +#: ../../using/cmdline.rst:513 msgid "" "``-X tracemalloc`` to start tracing Python memory allocations using the :mod:" "`tracemalloc` module. By default, only the most recent frame is stored in a " @@ -668,14 +673,14 @@ msgid "" "envvar:`PYTHONTRACEMALLOC` for more information." msgstr "" -#: ../../using/cmdline.rst:510 +#: ../../using/cmdline.rst:522 msgid "" "``-X int_max_str_digits`` configures the :ref:`integer string conversion " "length limitation `. See also :envvar:" "`PYTHONINTMAXSTRDIGITS`." msgstr "" -#: ../../using/cmdline.rst:513 +#: ../../using/cmdline.rst:528 msgid "" "``-X importtime`` to show how long each import takes. It shows module name, " "cumulative time (including nested imports) and self time (excluding nested " @@ -684,34 +689,35 @@ msgid "" "asyncio'``. See also :envvar:`PYTHONPROFILEIMPORTTIME`." msgstr "" -#: ../../using/cmdline.rst:518 +#: ../../using/cmdline.rst:536 msgid "" "``-X dev``: enable :ref:`Python Development Mode `, introducing " -"additional runtime checks that are too expensive to be enabled by default." +"additional runtime checks that are too expensive to be enabled by default. " +"See also :envvar:`PYTHONDEVMODE`." msgstr "" -#: ../../using/cmdline.rst:521 +#: ../../using/cmdline.rst:542 msgid "" "``-X utf8`` enables the :ref:`Python UTF-8 Mode `. ``-X utf8=0`` " "explicitly disables :ref:`Python UTF-8 Mode ` (even when it would " "otherwise activate automatically). See also :envvar:`PYTHONUTF8`." msgstr "" -#: ../../using/cmdline.rst:525 +#: ../../using/cmdline.rst:549 msgid "" "``-X pycache_prefix=PATH`` enables writing ``.pyc`` files to a parallel tree " "rooted at the given directory instead of to the code tree. See also :envvar:" "`PYTHONPYCACHEPREFIX`." msgstr "" -#: ../../using/cmdline.rst:528 +#: ../../using/cmdline.rst:555 msgid "" "``-X warn_default_encoding`` issues a :class:`EncodingWarning` when the " "locale-specific default encoding is used for opening files. See also :envvar:" "`PYTHONWARNDEFAULTENCODING`." msgstr "" -#: ../../using/cmdline.rst:531 +#: ../../using/cmdline.rst:561 msgid "" "``-X no_debug_ranges`` disables the inclusion of the tables mapping extra " "location information (end line, start column offset and end column offset) " @@ -721,7 +727,7 @@ msgid "" "envvar:`PYTHONNODEBUGRANGES`." msgstr "" -#: ../../using/cmdline.rst:537 +#: ../../using/cmdline.rst:570 msgid "" "``-X frozen_modules`` determines whether or not frozen modules are ignored " "by the import machinery. A value of \"on\" means they get imported and " @@ -732,7 +738,7 @@ msgid "" "are always used, even if this flag is set to \"off\"." msgstr "" -#: ../../using/cmdline.rst:544 +#: ../../using/cmdline.rst:580 msgid "" "``-X perf`` enables support for the Linux ``perf`` profiler. When this " "option is provided, the ``perf`` profiler will be able to report Python " @@ -741,74 +747,33 @@ msgid "" "also :envvar:`PYTHONPERFSUPPORT` and :ref:`perf_profiling`." msgstr "" -#: ../../using/cmdline.rst:550 +#: ../../using/cmdline.rst:588 msgid "" "It also allows passing arbitrary values and retrieving them through the :" "data:`sys._xoptions` dictionary." msgstr "" -#: ../../using/cmdline.rst:555 -msgid "Added the ``-X faulthandler`` option." -msgstr "新增 ``-X faulthandler`` 選項。" - -#: ../../using/cmdline.rst:558 -msgid "Added the ``-X showrefcount`` and ``-X tracemalloc`` options." -msgstr "新增 ``-X showrefcount`` 和 ``-X tracemalloc`` 選項。" - -#: ../../using/cmdline.rst:561 -msgid "Added the ``-X showalloccount`` option." -msgstr "新增 ``-X showalloccount`` 選項。" - -#: ../../using/cmdline.rst:564 -msgid "Added the ``-X importtime``, ``-X dev`` and ``-X utf8`` options." -msgstr "新增 ``-X importtime``、``-X dev`` 和 ``-X utf8`` 選項。" - -#: ../../using/cmdline.rst:567 -msgid "" -"Added the ``-X pycache_prefix`` option. The ``-X dev`` option now logs " -"``close()`` exceptions in :class:`io.IOBase` destructor." -msgstr "" - -#: ../../using/cmdline.rst:571 -msgid "" -"Using ``-X dev`` option, check *encoding* and *errors* arguments on string " -"encoding and decoding operations." -msgstr "" +#: ../../using/cmdline.rst:593 +msgid "Removed the ``-X showalloccount`` option." +msgstr "移除 ``-X showalloccount`` 選項。" -#: ../../using/cmdline.rst:575 -msgid "The ``-X showalloccount`` option has been removed." -msgstr "``-X showalloccount`` 選項已被移除。" +#: ../../using/cmdline.rst:596 +msgid "Removed the ``-X oldparser`` option." +msgstr "移除 ``-X oldparser`` 選項。" -#: ../../using/cmdline.rst:577 -msgid "" -"Added the ``-X warn_default_encoding`` option. Removed the ``-X oldparser`` " -"option." -msgstr "" -"新增 ``-X warn_default_encoding`` 選項。``-X oldparser`` 選項已被移除。" - -#: ../../using/cmdline.rst:581 -msgid "" -"Added the ``-X no_debug_ranges``, ``-X frozen_modules`` and ``-X " -"int_max_str_digits`` options." -msgstr "新增 ``-X importtime``、``-X dev`` 和 ``-X utf8`` 選項。" - -#: ../../using/cmdline.rst:585 -msgid "Added the ``-X perf`` option." -msgstr "新增 ``-X perf`` 選項。" - -#: ../../using/cmdline.rst:590 +#: ../../using/cmdline.rst:601 msgid "Options you shouldn't use" msgstr "你不該使用的選項" -#: ../../using/cmdline.rst:594 +#: ../../using/cmdline.rst:605 msgid "Reserved for use by Jython_." msgstr "" -#: ../../using/cmdline.rst:602 +#: ../../using/cmdline.rst:613 msgid "Environment variables" msgstr "環境變數" -#: ../../using/cmdline.rst:604 +#: ../../using/cmdline.rst:615 msgid "" "These environment variables influence Python's behavior, they are processed " "before the command-line switches other than -E or -I. It is customary that " @@ -816,7 +781,7 @@ msgid "" "conflict." msgstr "" -#: ../../using/cmdline.rst:611 +#: ../../using/cmdline.rst:622 msgid "" "Change the location of the standard Python libraries. By default, the " "libraries are searched in :file:`{prefix}/lib/python{version}` and :file:" @@ -825,14 +790,14 @@ msgid "" "file:`/usr/local`." msgstr "" -#: ../../using/cmdline.rst:617 +#: ../../using/cmdline.rst:628 msgid "" "When :envvar:`PYTHONHOME` is set to a single directory, its value replaces " "both :file:`{prefix}` and :file:`{exec_prefix}`. To specify different " "values for these, set :envvar:`PYTHONHOME` to :file:`{prefix}:{exec_prefix}`." msgstr "" -#: ../../using/cmdline.rst:624 +#: ../../using/cmdline.rst:635 msgid "" "Augment the default search path for module files. The format is the same as " "the shell's :envvar:`PATH`: one or more directory pathnames separated by :" @@ -840,21 +805,21 @@ msgid "" "existent directories are silently ignored." msgstr "" -#: ../../using/cmdline.rst:629 +#: ../../using/cmdline.rst:640 msgid "" "In addition to normal directories, individual :envvar:`PYTHONPATH` entries " "may refer to zipfiles containing pure Python modules (in either source or " "compiled form). Extension modules cannot be imported from zipfiles." msgstr "" -#: ../../using/cmdline.rst:633 +#: ../../using/cmdline.rst:644 msgid "" "The default search path is installation dependent, but generally begins " "with :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). " "It is *always* appended to :envvar:`PYTHONPATH`." msgstr "" -#: ../../using/cmdline.rst:637 +#: ../../using/cmdline.rst:648 msgid "" "An additional directory will be inserted in the search path in front of :" "envvar:`PYTHONPATH` as described above under :ref:`using-on-interface-" @@ -862,19 +827,19 @@ msgid "" "the variable :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:645 +#: ../../using/cmdline.rst:656 msgid "" "If this is set to a non-empty string, don't prepend a potentially unsafe " "path to :data:`sys.path`: see the :option:`-P` option for details." msgstr "" -#: ../../using/cmdline.rst:653 +#: ../../using/cmdline.rst:664 msgid "" "If this is set to a non-empty string, it overrides the :data:`sys." "platlibdir` value." msgstr "" -#: ../../using/cmdline.rst:661 +#: ../../using/cmdline.rst:672 msgid "" "If this is the name of a readable file, the Python commands in that file are " "executed before the first prompt is displayed in interactive mode. The file " @@ -885,7 +850,7 @@ msgid "" "file." msgstr "" -#: ../../using/cmdline.rst:668 +#: ../../using/cmdline.rst:679 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with " "argument ``filename``." @@ -893,7 +858,7 @@ msgstr "" "引發一個附帶引數 ``filename`` 的\\ :ref:`稽核事件 ` ``cpython." "run_startup``。" -#: ../../using/cmdline.rst:670 +#: ../../using/cmdline.rst:681 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with the " "filename as the argument when called on startup." @@ -901,14 +866,14 @@ msgstr "" "引發一個附帶呼叫啟動時的檔案名稱為引數的\\ :ref:`稽核事件 ` " "``cpython.run_startup``。" -#: ../../using/cmdline.rst:676 +#: ../../using/cmdline.rst:687 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-O` option. If set to an integer, it is equivalent to specifying :" "option:`-O` multiple times." msgstr "" -#: ../../using/cmdline.rst:683 +#: ../../using/cmdline.rst:694 msgid "" "If this is set, it names a callable using dotted-path notation. The module " "containing the callable will be imported and then the callable will be run " @@ -919,58 +884,58 @@ msgid "" "breakpointhook` to do nothing but return immediately." msgstr "" -#: ../../using/cmdline.rst:695 +#: ../../using/cmdline.rst:706 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-d` option. If set to an integer, it is equivalent to specifying :" "option:`-d` multiple times." msgstr "" -#: ../../using/cmdline.rst:699 +#: ../../using/cmdline.rst:710 msgid "" "This environment variable requires a :ref:`debug build of Python `, otherwise it's ignored." msgstr "" -#: ../../using/cmdline.rst:705 +#: ../../using/cmdline.rst:716 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-i` option." msgstr "" -#: ../../using/cmdline.rst:708 +#: ../../using/cmdline.rst:719 msgid "" "This variable can also be modified by Python code using :data:`os.environ` " "to force inspect mode on program termination." msgstr "" -#: ../../using/cmdline.rst:714 +#: ../../using/cmdline.rst:725 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-u` option." msgstr "" -#: ../../using/cmdline.rst:720 +#: ../../using/cmdline.rst:731 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-v` option. If set to an integer, it is equivalent to specifying :" "option:`-v` multiple times." msgstr "" -#: ../../using/cmdline.rst:727 +#: ../../using/cmdline.rst:738 msgid "" "If this is set, Python ignores case in :keyword:`import` statements. This " "only works on Windows and macOS." msgstr "" -#: ../../using/cmdline.rst:733 +#: ../../using/cmdline.rst:744 msgid "" "If this is set to a non-empty string, Python won't try to write ``.pyc`` " "files on the import of source modules. This is equivalent to specifying " "the :option:`-B` option." msgstr "" -#: ../../using/cmdline.rst:740 +#: ../../using/cmdline.rst:751 msgid "" "If this is set, Python will write ``.pyc`` files in a mirror directory tree " "at this path, instead of in ``__pycache__`` directories within the source " @@ -978,40 +943,40 @@ msgid "" "``pycache_prefix=PATH`` option." msgstr "" -#: ../../using/cmdline.rst:750 +#: ../../using/cmdline.rst:761 msgid "" "If this variable is not set or set to ``random``, a random value is used to " "seed the hashes of str and bytes objects." msgstr "" -#: ../../using/cmdline.rst:753 +#: ../../using/cmdline.rst:764 msgid "" "If :envvar:`PYTHONHASHSEED` is set to an integer value, it is used as a " "fixed seed for generating the hash() of the types covered by the hash " "randomization." msgstr "" -#: ../../using/cmdline.rst:757 +#: ../../using/cmdline.rst:768 msgid "" "Its purpose is to allow repeatable hashing, such as for selftests for the " "interpreter itself, or to allow a cluster of python processes to share hash " "values." msgstr "" -#: ../../using/cmdline.rst:761 +#: ../../using/cmdline.rst:772 msgid "" "The integer must be a decimal number in the range [0,4294967295]. " "Specifying the value 0 will disable hash randomization." msgstr "" -#: ../../using/cmdline.rst:768 +#: ../../using/cmdline.rst:779 msgid "" "If this variable is set to an integer, it is used to configure the " "interpreter's global :ref:`integer string conversion length limitation " "`." msgstr "" -#: ../../using/cmdline.rst:776 +#: ../../using/cmdline.rst:787 msgid "" "If this is set before running the interpreter, it overrides the encoding " "used for stdin/stdout/stderr, in the syntax ``encodingname:errorhandler``. " @@ -1019,17 +984,17 @@ msgid "" "have the same meaning as in :func:`str.encode`." msgstr "" -#: ../../using/cmdline.rst:781 +#: ../../using/cmdline.rst:792 msgid "" "For stderr, the ``:errorhandler`` part is ignored; the handler will always " "be ``'backslashreplace'``." msgstr "" -#: ../../using/cmdline.rst:784 +#: ../../using/cmdline.rst:795 msgid "The ``encodingname`` part is now optional." msgstr "" -#: ../../using/cmdline.rst:787 +#: ../../using/cmdline.rst:798 msgid "" "On Windows, the encoding specified by this variable is ignored for " "interactive console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is " @@ -1037,13 +1002,13 @@ msgid "" "not affected." msgstr "" -#: ../../using/cmdline.rst:794 +#: ../../using/cmdline.rst:805 msgid "" "If this is set, Python won't add the :data:`user site-packages directory " "` to :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:804 +#: ../../using/cmdline.rst:815 msgid "" "Defines the :data:`user base directory `, which is used to " "compute the path of the :data:`user site-packages directory ` of the :mod:`asyncio` module." msgstr "" -#: ../../using/cmdline.rst:886 +#: ../../using/cmdline.rst:897 msgid "Set the Python memory allocators and/or install debug hooks." msgstr "" -#: ../../using/cmdline.rst:888 +#: ../../using/cmdline.rst:899 msgid "Set the family of memory allocators used by Python:" msgstr "" -#: ../../using/cmdline.rst:890 +#: ../../using/cmdline.rst:901 msgid "" "``default``: use the :ref:`default memory allocators `." msgstr "" -#: ../../using/cmdline.rst:892 +#: ../../using/cmdline.rst:903 msgid "" "``malloc``: use the :c:func:`malloc` function of the C library for all " "domains (:c:macro:`PYMEM_DOMAIN_RAW`, :c:macro:`PYMEM_DOMAIN_MEM`, :c:macro:" "`PYMEM_DOMAIN_OBJ`)." msgstr "" -#: ../../using/cmdline.rst:895 +#: ../../using/cmdline.rst:906 msgid "" "``pymalloc``: use the :ref:`pymalloc allocator ` for :c:macro:" "`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../using/cmdline.rst:899 +#: ../../using/cmdline.rst:910 msgid "Install :ref:`debug hooks `:" msgstr "" -#: ../../using/cmdline.rst:901 +#: ../../using/cmdline.rst:912 msgid "" "``debug``: install debug hooks on top of the :ref:`default memory allocators " "`." msgstr "" -#: ../../using/cmdline.rst:903 +#: ../../using/cmdline.rst:914 msgid "``malloc_debug``: same as ``malloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:904 +#: ../../using/cmdline.rst:915 msgid "``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:908 +#: ../../using/cmdline.rst:919 msgid "Added the ``\"default\"`` allocator." msgstr "" -#: ../../using/cmdline.rst:914 +#: ../../using/cmdline.rst:925 msgid "" "If set to a non-empty string, Python will print statistics of the :ref:" "`pymalloc memory allocator ` every time a new pymalloc object " "arena is created, and on shutdown." msgstr "" -#: ../../using/cmdline.rst:918 +#: ../../using/cmdline.rst:929 msgid "" "This variable is ignored if the :envvar:`PYTHONMALLOC` environment variable " "is used to force the :c:func:`malloc` allocator of the C library, or if " "Python is configured without ``pymalloc`` support." msgstr "" -#: ../../using/cmdline.rst:922 +#: ../../using/cmdline.rst:933 msgid "" "This variable can now also be used on Python compiled in release mode. It " "now has no effect if set to an empty string." msgstr "" -#: ../../using/cmdline.rst:929 +#: ../../using/cmdline.rst:940 msgid "" "If set to a non-empty string, the default :term:`filesystem encoding and " "error handler` mode will revert to their pre-3.6 values of 'mbcs' and " @@ -1174,41 +1139,41 @@ msgid "" "'surrogatepass' are used." msgstr "" -#: ../../using/cmdline.rst:934 +#: ../../using/cmdline.rst:945 msgid "" "This may also be enabled at runtime with :func:`sys." "_enablelegacywindowsfsencoding()`." msgstr "" -#: ../../using/cmdline.rst:937 ../../using/cmdline.rst:951 +#: ../../using/cmdline.rst:948 ../../using/cmdline.rst:962 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../using/cmdline.rst:939 +#: ../../using/cmdline.rst:950 msgid "See :pep:`529` for more details." msgstr "更多細節請見 :pep:`529`。" -#: ../../using/cmdline.rst:944 +#: ../../using/cmdline.rst:955 msgid "" "If set to a non-empty string, does not use the new console reader and " "writer. This means that Unicode characters will be encoded according to the " "active console code page, rather than using utf-8." msgstr "" -#: ../../using/cmdline.rst:948 +#: ../../using/cmdline.rst:959 msgid "" "This variable is ignored if the standard streams are redirected (to files or " "pipes) rather than referring to console buffers." msgstr "" -#: ../../using/cmdline.rst:958 +#: ../../using/cmdline.rst:969 msgid "" "If set to the value ``0``, causes the main Python command line application " "to skip coercing the legacy ASCII-based C and POSIX locales to a more " "capable UTF-8 based alternative." msgstr "" -#: ../../using/cmdline.rst:962 +#: ../../using/cmdline.rst:973 msgid "" "If this variable is *not* set (or is set to a value other than ``0``), the " "``LC_ALL`` locale override environment variable is also not set, and the " @@ -1219,19 +1184,19 @@ msgid "" "runtime:" msgstr "" -#: ../../using/cmdline.rst:970 +#: ../../using/cmdline.rst:981 msgid "``C.UTF-8``" msgstr "``C.UTF-8``" -#: ../../using/cmdline.rst:971 +#: ../../using/cmdline.rst:982 msgid "``C.utf8``" msgstr "``C.utf8``" -#: ../../using/cmdline.rst:972 +#: ../../using/cmdline.rst:983 msgid "``UTF-8``" msgstr "``UTF-8``" -#: ../../using/cmdline.rst:974 +#: ../../using/cmdline.rst:985 msgid "" "If setting one of these locale categories succeeds, then the ``LC_CTYPE`` " "environment variable will also be set accordingly in the current process " @@ -1244,7 +1209,7 @@ msgid "" "(such as Python's own :func:`locale.getdefaultlocale`)." msgstr "" -#: ../../using/cmdline.rst:984 +#: ../../using/cmdline.rst:995 msgid "" "Configuring one of these locales (either explicitly or via the above " "implicit locale coercion) automatically enables the ``surrogateescape`` :ref:" @@ -1254,7 +1219,7 @@ msgid "" "envvar:`PYTHONIOENCODING` as usual." msgstr "" -#: ../../using/cmdline.rst:991 +#: ../../using/cmdline.rst:1002 msgid "" "For debugging purposes, setting ``PYTHONCOERCECLOCALE=warn`` will cause " "Python to emit warning messages on ``stderr`` if either the locale coercion " @@ -1262,7 +1227,7 @@ msgid "" "active when the Python runtime is initialized." msgstr "" -#: ../../using/cmdline.rst:996 +#: ../../using/cmdline.rst:1007 msgid "" "Also note that even when locale coercion is disabled, or when it fails to " "find a suitable target locale, :envvar:`PYTHONUTF8` will still activate by " @@ -1271,15 +1236,15 @@ msgid "" "system interfaces." msgstr "" -#: ../../using/cmdline.rst:1002 +#: ../../using/cmdline.rst:1013 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../using/cmdline.rst:1004 +#: ../../using/cmdline.rst:1015 msgid "See :pep:`538` for more details." msgstr "更多細節請見 :pep:`538`。" -#: ../../using/cmdline.rst:1010 +#: ../../using/cmdline.rst:1021 msgid "" "If this environment variable is set to a non-empty string, enable :ref:" "`Python Development Mode `, introducing additional runtime checks " @@ -1287,31 +1252,31 @@ msgid "" "setting the :option:`-X` ``dev`` option." msgstr "" -#: ../../using/cmdline.rst:1019 +#: ../../using/cmdline.rst:1030 msgid "If set to ``1``, enable the :ref:`Python UTF-8 Mode `." msgstr "如果設為 ``1``,則啟用 :ref:`Python UTF-8 Mode `。" -#: ../../using/cmdline.rst:1021 +#: ../../using/cmdline.rst:1032 msgid "If set to ``0``, disable the :ref:`Python UTF-8 Mode `." msgstr "如果設為 ``0``,則停用 :ref:`Python UTF-8 Mode `。" -#: ../../using/cmdline.rst:1023 +#: ../../using/cmdline.rst:1034 msgid "" "Setting any other non-empty string causes an error during interpreter " "initialisation." msgstr "" -#: ../../using/cmdline.rst:1030 +#: ../../using/cmdline.rst:1041 msgid "" "If this environment variable is set to a non-empty string, issue a :class:" "`EncodingWarning` when the locale-specific default encoding is used." msgstr "" -#: ../../using/cmdline.rst:1033 +#: ../../using/cmdline.rst:1044 msgid "See :ref:`io-encoding-warning` for details." msgstr "細節請見 :ref:`io-encoding-warning`。" -#: ../../using/cmdline.rst:1039 +#: ../../using/cmdline.rst:1050 msgid "" "If this variable is set, it disables the inclusion of the tables mapping " "extra location information (end line, start column offset and end column " @@ -1320,43 +1285,66 @@ msgid "" "visual location indicators when the interpreter displays tracebacks." msgstr "" -#: ../../using/cmdline.rst:1049 +#: ../../using/cmdline.rst:1060 msgid "" "If this variable is set to a nonzero value, it enables support for the Linux " "``perf`` profiler so Python calls can be detected by it." msgstr "" -#: ../../using/cmdline.rst:1052 +#: ../../using/cmdline.rst:1063 msgid "If set to ``0``, disable Linux ``perf`` profiler support." msgstr "" -#: ../../using/cmdline.rst:1054 +#: ../../using/cmdline.rst:1065 msgid "" "See also the :option:`-X perf <-X>` command-line option and :ref:" "`perf_profiling`." msgstr "" -#: ../../using/cmdline.rst:1061 +#: ../../using/cmdline.rst:1072 msgid "Debug-mode variables" msgstr "除錯模式變數" -#: ../../using/cmdline.rst:1065 +#: ../../using/cmdline.rst:1076 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter." msgstr "" -#: ../../using/cmdline.rst:1068 ../../using/cmdline.rst:1075 +#: ../../using/cmdline.rst:1079 ../../using/cmdline.rst:1086 msgid "" "Need Python configured with the :option:`--with-trace-refs` build option." msgstr "" -#: ../../using/cmdline.rst:1072 +#: ../../using/cmdline.rst:1083 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter into a file called *FILENAME*." msgstr "" +#~ msgid "Added the ``-X faulthandler`` option." +#~ msgstr "新增 ``-X faulthandler`` 選項。" + +#~ msgid "Added the ``-X showrefcount`` and ``-X tracemalloc`` options." +#~ msgstr "新增 ``-X showrefcount`` 和 ``-X tracemalloc`` 選項。" + +#~ msgid "Added the ``-X importtime``, ``-X dev`` and ``-X utf8`` options." +#~ msgstr "新增 ``-X importtime``、``-X dev`` 和 ``-X utf8`` 選項。" + +#~ msgid "The ``-X showalloccount`` option has been removed." +#~ msgstr "``-X showalloccount`` 選項已被移除。" + +#~ msgid "" +#~ "Added the ``-X warn_default_encoding`` option. Removed the ``-X " +#~ "oldparser`` option." +#~ msgstr "" +#~ "新增 ``-X warn_default_encoding`` 選項。``-X oldparser`` 選項已被移除。" + +#~ msgid "" +#~ "Added the ``-X no_debug_ranges``, ``-X frozen_modules`` and ``-X " +#~ "int_max_str_digits`` options." +#~ msgstr "新增 ``-X importtime``、``-X dev`` 和 ``-X utf8`` 選項。" + #~ msgid "The :option:`-X` option was added." #~ msgstr "新增 :option:`-X` 選項。" diff --git a/using/configure.po b/using/configure.po index 54a0ba82a4..c6aafb7c6e 100644 --- a/using/configure.po +++ b/using/configure.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -441,53 +441,62 @@ msgid "" msgstr "" #: ../../using/configure.rst:307 +msgid "" +"During the build, you may encounter compiler warnings about profile data not " +"being available for some source files. These warnings are harmless, as only " +"a subset of the code is exercised during profile data acquisition. To " +"disable these warnings on Clang, manually suppress them by adding ``-Wno-" +"profile-instr-unprofiled`` to :envvar:`CFLAGS`." +msgstr "" + +#: ../../using/configure.rst:316 msgid "Use ``-fno-semantic-interposition`` on GCC." msgstr "在 GCC 上使用 ``-fno-semantic-interposition``。" -#: ../../using/configure.rst:312 +#: ../../using/configure.rst:321 msgid "" "Environment variable used in the Makefile: Python command line arguments for " "the PGO generation task." msgstr "" -#: ../../using/configure.rst:315 +#: ../../using/configure.rst:324 msgid "Default: ``-m test --pgo --timeout=$(TESTTIMEOUT)``." msgstr "預設值:``-m test --pgo --timeout=$(TESTTIMEOUT)``。" -#: ../../using/configure.rst:321 +#: ../../using/configure.rst:330 msgid "Enable Link Time Optimization (LTO) in any build (disabled by default)." msgstr "" -#: ../../using/configure.rst:323 +#: ../../using/configure.rst:332 msgid "" "The C compiler Clang requires ``llvm-ar`` for LTO (``ar`` on macOS), as well " "as an LTO-aware linker (``ld.gold`` or ``lld``)." msgstr "" -#: ../../using/configure.rst:328 +#: ../../using/configure.rst:337 msgid "To use ThinLTO feature, use ``--with-lto=thin`` on Clang." msgstr "" -#: ../../using/configure.rst:331 +#: ../../using/configure.rst:340 msgid "" "Use ThinLTO as the default optimization policy on Clang if the compiler " "accepts the flag." msgstr "" -#: ../../using/configure.rst:336 +#: ../../using/configure.rst:345 msgid "" "Enable usage of the `BOLT post-link binary optimizer `_ (disabled by default)." msgstr "" -#: ../../using/configure.rst:340 +#: ../../using/configure.rst:349 msgid "" "BOLT is part of the LLVM project but is not always included in their binary " "distributions. This flag requires that ``llvm-bolt`` and ``merge-fdata`` are " "available." msgstr "" -#: ../../using/configure.rst:344 +#: ../../using/configure.rst:353 msgid "" "BOLT is still a fairly new project so this flag should be considered " "experimental for now. Because this tool operates on machine code its success " @@ -498,7 +507,7 @@ msgid "" "encouraged." msgstr "" -#: ../../using/configure.rst:352 +#: ../../using/configure.rst:361 msgid "" "The :envvar:`!BOLT_INSTRUMENT_FLAGS` and :envvar:`!BOLT_APPLY_FLAGS` :" "program:`configure` variables can be defined to override the default set of " @@ -506,101 +515,101 @@ msgid "" "binaries, respectively." msgstr "" -#: ../../using/configure.rst:361 +#: ../../using/configure.rst:370 msgid "" "Enable computed gotos in evaluation loop (enabled by default on supported " "compilers)." msgstr "" -#: ../../using/configure.rst:366 +#: ../../using/configure.rst:375 msgid "" "Disable the specialized Python memory allocator :ref:`pymalloc ` " "(enabled by default)." msgstr "" -#: ../../using/configure.rst:369 +#: ../../using/configure.rst:378 msgid "See also :envvar:`PYTHONMALLOC` environment variable." msgstr "另請參閱 :envvar:`PYTHONMALLOC` 環境變數。" -#: ../../using/configure.rst:373 +#: ../../using/configure.rst:382 msgid "" "Disable static documentation strings to reduce the memory footprint (enabled " "by default). Documentation strings defined in Python are not affected." msgstr "" -#: ../../using/configure.rst:376 +#: ../../using/configure.rst:385 msgid "Don't define the ``WITH_DOC_STRINGS`` macro." msgstr "不要定義 ``WITH_DOC_STRINGS`` 巨集。" -#: ../../using/configure.rst:378 +#: ../../using/configure.rst:387 msgid "See the ``PyDoc_STRVAR()`` macro." msgstr "請見 ``PyDoc_STRVAR()`` 巨集。" -#: ../../using/configure.rst:382 +#: ../../using/configure.rst:391 msgid "Enable C-level code profiling with ``gprof`` (disabled by default)." msgstr "" -#: ../../using/configure.rst:386 +#: ../../using/configure.rst:395 msgid "" "Add ``-fstrict-overflow`` to the C compiler flags (by default we add ``-fno-" "strict-overflow`` instead)." msgstr "" -#: ../../using/configure.rst:393 +#: ../../using/configure.rst:402 msgid "Python Debug Build" msgstr "" -#: ../../using/configure.rst:395 +#: ../../using/configure.rst:404 msgid "" "A debug build is Python built with the :option:`--with-pydebug` configure " "option." msgstr "" -#: ../../using/configure.rst:398 +#: ../../using/configure.rst:407 msgid "Effects of a debug build:" msgstr "" -#: ../../using/configure.rst:400 +#: ../../using/configure.rst:409 msgid "" "Display all warnings by default: the list of default warning filters is " "empty in the :mod:`warnings` module." msgstr "" -#: ../../using/configure.rst:402 +#: ../../using/configure.rst:411 msgid "Add ``d`` to :data:`sys.abiflags`." msgstr "新增 ``d`` 到 :data:`sys.abiflags`。" -#: ../../using/configure.rst:403 +#: ../../using/configure.rst:412 msgid "Add :func:`!sys.gettotalrefcount` function." msgstr "新增 :func:`!sys.gettotalrefcount` 函式。" -#: ../../using/configure.rst:404 +#: ../../using/configure.rst:413 msgid "Add :option:`-X showrefcount <-X>` command line option." msgstr "新增 :option:`-X showrefcount <-X>` 命令列選項。" -#: ../../using/configure.rst:405 +#: ../../using/configure.rst:414 msgid "" "Add :option:`-d` command line option and :envvar:`PYTHONDEBUG` environment " "variable to debug the parser." msgstr "" -#: ../../using/configure.rst:407 +#: ../../using/configure.rst:416 msgid "" "Add support for the ``__lltrace__`` variable: enable low-level tracing in " "the bytecode evaluation loop if the variable is defined." msgstr "" -#: ../../using/configure.rst:409 +#: ../../using/configure.rst:418 msgid "" "Install :ref:`debug hooks on memory allocators ` " "to detect buffer overflow and other memory errors." msgstr "" -#: ../../using/configure.rst:411 +#: ../../using/configure.rst:420 msgid "Define ``Py_DEBUG`` and ``Py_REF_DEBUG`` macros." msgstr "定義 ``Py_DEBUG`` 和 ``Py_REF_DEBUG`` 巨集。" -#: ../../using/configure.rst:412 +#: ../../using/configure.rst:421 msgid "" "Add runtime checks: code surrounded by ``#ifdef Py_DEBUG`` and ``#endif``. " "Enable ``assert(...)`` and ``_PyObject_ASSERT(...)`` assertions: don't set " @@ -608,45 +617,45 @@ msgid "" "option). Main runtime checks:" msgstr "" -#: ../../using/configure.rst:417 +#: ../../using/configure.rst:426 msgid "Add sanity checks on the function arguments." msgstr "" -#: ../../using/configure.rst:418 +#: ../../using/configure.rst:427 msgid "" "Unicode and int objects are created with their memory filled with a pattern " "to detect usage of uninitialized objects." msgstr "" -#: ../../using/configure.rst:420 +#: ../../using/configure.rst:429 msgid "" "Ensure that functions which can clear or replace the current exception are " "not called with an exception raised." msgstr "" -#: ../../using/configure.rst:422 +#: ../../using/configure.rst:431 msgid "Check that deallocator functions don't change the current exception." msgstr "" -#: ../../using/configure.rst:423 +#: ../../using/configure.rst:432 msgid "" "The garbage collector (:func:`gc.collect` function) runs some basic checks " "on objects consistency." msgstr "" -#: ../../using/configure.rst:425 +#: ../../using/configure.rst:434 msgid "" "The :c:macro:`!Py_SAFE_DOWNCAST()` macro checks for integer underflow and " "overflow when downcasting from wide types to narrow types." msgstr "" -#: ../../using/configure.rst:428 +#: ../../using/configure.rst:437 msgid "" "See also the :ref:`Python Development Mode ` and the :option:`--" "with-trace-refs` configure option." msgstr "" -#: ../../using/configure.rst:431 +#: ../../using/configure.rst:440 msgid "" "Release builds and debug builds are now ABI compatible: defining the " "``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro (see the :" @@ -654,320 +663,320 @@ msgid "" "incompatibility." msgstr "" -#: ../../using/configure.rst:439 +#: ../../using/configure.rst:448 msgid "Debug options" msgstr "" -#: ../../using/configure.rst:443 +#: ../../using/configure.rst:452 msgid "" ":ref:`Build Python in debug mode `: define the ``Py_DEBUG`` " "macro (disabled by default)." msgstr "" -#: ../../using/configure.rst:448 +#: ../../using/configure.rst:457 msgid "Enable tracing references for debugging purpose (disabled by default)." msgstr "" -#: ../../using/configure.rst:450 +#: ../../using/configure.rst:459 msgid "Effects:" msgstr "" -#: ../../using/configure.rst:452 +#: ../../using/configure.rst:461 msgid "Define the ``Py_TRACE_REFS`` macro." msgstr "定義 ``Py_TRACE_REFS`` 巨集。" -#: ../../using/configure.rst:453 +#: ../../using/configure.rst:462 msgid "Add :func:`!sys.getobjects` function." msgstr "新增 :func:`!sys.getobjects` 函式。" -#: ../../using/configure.rst:454 +#: ../../using/configure.rst:463 msgid "Add :envvar:`PYTHONDUMPREFS` environment variable." msgstr "新增 :envvar:`PYTHONDUMPREFS` 環境變數。" -#: ../../using/configure.rst:456 +#: ../../using/configure.rst:465 msgid "" "This build is not ABI compatible with release build (default build) or debug " "build (``Py_DEBUG`` and ``Py_REF_DEBUG`` macros)." msgstr "" -#: ../../using/configure.rst:463 +#: ../../using/configure.rst:472 msgid "" "Build with C assertions enabled (default is no): ``assert(...);`` and " "``_PyObject_ASSERT(...);``." msgstr "" -#: ../../using/configure.rst:466 +#: ../../using/configure.rst:475 msgid "" "If set, the ``NDEBUG`` macro is not defined in the :envvar:`OPT` compiler " "variable." msgstr "" -#: ../../using/configure.rst:469 +#: ../../using/configure.rst:478 msgid "" "See also the :option:`--with-pydebug` option (:ref:`debug build `) which also enables assertions." msgstr "" -#: ../../using/configure.rst:476 +#: ../../using/configure.rst:485 msgid "Enable Valgrind support (default is no)." msgstr "啟用 Valgrind 支援(預設不啟用)。" -#: ../../using/configure.rst:480 +#: ../../using/configure.rst:489 msgid "Enable DTrace support (default is no)." msgstr "啟用 DTrace 支援(預設不啟用)。" -#: ../../using/configure.rst:482 +#: ../../using/configure.rst:491 msgid "" "See :ref:`Instrumenting CPython with DTrace and SystemTap `." msgstr "" -#: ../../using/configure.rst:489 +#: ../../using/configure.rst:498 msgid "" "Enable AddressSanitizer memory error detector, ``asan`` (default is no)." msgstr "" -#: ../../using/configure.rst:495 +#: ../../using/configure.rst:504 msgid "" "Enable MemorySanitizer allocation error detector, ``msan`` (default is no)." msgstr "" -#: ../../using/configure.rst:501 +#: ../../using/configure.rst:510 msgid "" "Enable UndefinedBehaviorSanitizer undefined behaviour detector, ``ubsan`` " "(default is no)." msgstr "" -#: ../../using/configure.rst:508 +#: ../../using/configure.rst:517 msgid "Linker options" msgstr "" -#: ../../using/configure.rst:512 +#: ../../using/configure.rst:521 msgid "Enable building a shared Python library: ``libpython`` (default is no)." msgstr "" -#: ../../using/configure.rst:516 +#: ../../using/configure.rst:525 msgid "" "Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o`` " "(built and enabled by default)." msgstr "" -#: ../../using/configure.rst:523 +#: ../../using/configure.rst:532 msgid "Libraries options" msgstr "函式庫選項" -#: ../../using/configure.rst:527 +#: ../../using/configure.rst:536 msgid "Link against additional libraries (default is no)." msgstr "" -#: ../../using/configure.rst:531 +#: ../../using/configure.rst:540 msgid "" "Build the :mod:`!pyexpat` module using an installed ``expat`` library " "(default is no)." msgstr "" -#: ../../using/configure.rst:536 +#: ../../using/configure.rst:545 msgid "" "Build the ``_decimal`` extension module using an installed ``mpdec`` " "library, see the :mod:`decimal` module (default is no)." msgstr "" -#: ../../using/configure.rst:543 +#: ../../using/configure.rst:552 msgid "Use ``editline`` library for backend of the :mod:`readline` module." msgstr "" -#: ../../using/configure.rst:545 +#: ../../using/configure.rst:554 msgid "Define the ``WITH_EDITLINE`` macro." msgstr "定義 ``WITH_EDITLINE`` 巨集。" -#: ../../using/configure.rst:551 +#: ../../using/configure.rst:560 msgid "Don't build the :mod:`readline` module (built by default)." msgstr "" -#: ../../using/configure.rst:553 +#: ../../using/configure.rst:562 msgid "Don't define the ``HAVE_LIBREADLINE`` macro." msgstr "不要定義 ``HAVE_LIBREADLINE`` 巨集。" -#: ../../using/configure.rst:559 +#: ../../using/configure.rst:568 msgid "" "Override ``libm`` math library to *STRING* (default is system-dependent)." msgstr "" -#: ../../using/configure.rst:563 +#: ../../using/configure.rst:572 msgid "Override ``libc`` C library to *STRING* (default is system-dependent)." msgstr "" -#: ../../using/configure.rst:567 +#: ../../using/configure.rst:576 msgid "Root of the OpenSSL directory." msgstr "" -#: ../../using/configure.rst:573 +#: ../../using/configure.rst:582 msgid "Set runtime library directory (rpath) for OpenSSL libraries:" msgstr "" -#: ../../using/configure.rst:575 +#: ../../using/configure.rst:584 msgid "``no`` (default): don't set rpath;" msgstr "" -#: ../../using/configure.rst:576 +#: ../../using/configure.rst:585 msgid "" "``auto``: auto-detect rpath from :option:`--with-openssl` and ``pkg-config``;" msgstr "" -#: ../../using/configure.rst:578 +#: ../../using/configure.rst:587 msgid "*DIR*: set an explicit rpath." msgstr "" -#: ../../using/configure.rst:584 +#: ../../using/configure.rst:593 msgid "Security Options" msgstr "" -#: ../../using/configure.rst:588 +#: ../../using/configure.rst:597 msgid "Select hash algorithm for use in ``Python/pyhash.c``:" msgstr "" -#: ../../using/configure.rst:590 +#: ../../using/configure.rst:599 msgid "``siphash13`` (default);" msgstr "" -#: ../../using/configure.rst:591 +#: ../../using/configure.rst:600 msgid "``siphash24``;" msgstr "``siphash24``;" -#: ../../using/configure.rst:592 +#: ../../using/configure.rst:601 msgid "``fnv``." msgstr "``fnv``。" -#: ../../using/configure.rst:596 +#: ../../using/configure.rst:605 msgid "``siphash13`` is added and it is the new default." msgstr "" -#: ../../using/configure.rst:601 +#: ../../using/configure.rst:610 msgid "Built-in hash modules:" msgstr "內建雜湊模組:" -#: ../../using/configure.rst:603 +#: ../../using/configure.rst:612 msgid "``md5``;" msgstr "``md5``;" -#: ../../using/configure.rst:604 +#: ../../using/configure.rst:613 msgid "``sha1``;" msgstr "``sha1``;" -#: ../../using/configure.rst:605 +#: ../../using/configure.rst:614 msgid "``sha256``;" msgstr "``sha256``;" -#: ../../using/configure.rst:606 +#: ../../using/configure.rst:615 msgid "``sha512``;" msgstr "``sha512``;" -#: ../../using/configure.rst:607 +#: ../../using/configure.rst:616 msgid "``sha3`` (with shake);" msgstr "" -#: ../../using/configure.rst:608 +#: ../../using/configure.rst:617 msgid "``blake2``." msgstr "``blake2``。" -#: ../../using/configure.rst:614 +#: ../../using/configure.rst:623 msgid "Override the OpenSSL default cipher suites string:" msgstr "" -#: ../../using/configure.rst:616 +#: ../../using/configure.rst:625 msgid "``python`` (default): use Python's preferred selection;" msgstr "" -#: ../../using/configure.rst:617 +#: ../../using/configure.rst:626 msgid "``openssl``: leave OpenSSL's defaults untouched;" msgstr "" -#: ../../using/configure.rst:618 +#: ../../using/configure.rst:627 msgid "*STRING*: use a custom string" msgstr "" -#: ../../using/configure.rst:620 +#: ../../using/configure.rst:629 msgid "See the :mod:`ssl` module." msgstr "請見 :mod:`ssl` 模組。" -#: ../../using/configure.rst:626 +#: ../../using/configure.rst:635 msgid "" "The settings ``python`` and *STRING* also set TLS 1.2 as minimum protocol " "version." msgstr "" -#: ../../using/configure.rst:630 +#: ../../using/configure.rst:639 msgid "macOS Options" msgstr "macOS 選項" -#: ../../using/configure.rst:632 +#: ../../using/configure.rst:641 msgid "See ``Mac/README.rst``." msgstr "參閱 ``Mac/README.rst``。" -#: ../../using/configure.rst:637 +#: ../../using/configure.rst:646 msgid "" "Create a universal binary build. *SDKDIR* specifies which macOS SDK should " "be used to perform the build (default is no)." msgstr "" -#: ../../using/configure.rst:643 +#: ../../using/configure.rst:652 msgid "" "Create a Python.framework rather than a traditional Unix install. Optional " "*INSTALLDIR* specifies the installation path (default is no)." msgstr "" -#: ../../using/configure.rst:648 +#: ../../using/configure.rst:657 msgid "" "Specify the kind of universal binary that should be created. This option is " "only valid when :option:`--enable-universalsdk` is set." msgstr "" -#: ../../using/configure.rst:651 +#: ../../using/configure.rst:660 msgid "Options:" msgstr "選項:" -#: ../../using/configure.rst:653 +#: ../../using/configure.rst:662 msgid "``universal2``;" msgstr "``universal2``;" -#: ../../using/configure.rst:654 +#: ../../using/configure.rst:663 msgid "``32-bit``;" msgstr "``32-bit``;" -#: ../../using/configure.rst:655 +#: ../../using/configure.rst:664 msgid "``64-bit``;" msgstr "``64-bit``;" -#: ../../using/configure.rst:656 +#: ../../using/configure.rst:665 msgid "``3-way``;" msgstr "``3-way``;" -#: ../../using/configure.rst:657 +#: ../../using/configure.rst:666 msgid "``intel``;" msgstr "``intel``;" -#: ../../using/configure.rst:658 +#: ../../using/configure.rst:667 msgid "``intel-32``;" msgstr "``intel-32``;" -#: ../../using/configure.rst:659 +#: ../../using/configure.rst:668 msgid "``intel-64``;" msgstr "``intel-64``;" -#: ../../using/configure.rst:660 +#: ../../using/configure.rst:669 msgid "``all``." msgstr "``all``。" -#: ../../using/configure.rst:664 +#: ../../using/configure.rst:673 msgid "" "Specify the name for the python framework on macOS only valid when :option:" "`--enable-framework` is set (default: ``Python``)." msgstr "" -#: ../../using/configure.rst:669 +#: ../../using/configure.rst:678 msgid "Cross Compiling Options" msgstr "" -#: ../../using/configure.rst:671 +#: ../../using/configure.rst:680 msgid "" "Cross compiling, also known as cross building, can be used to build Python " "for another CPU architecture or platform. Cross compiling requires a Python " @@ -975,95 +984,95 @@ msgid "" "match the version of the cross compiled host Python." msgstr "" -#: ../../using/configure.rst:678 +#: ../../using/configure.rst:687 msgid "" "configure for building on BUILD, usually guessed by :program:`config.guess`." msgstr "" -#: ../../using/configure.rst:682 +#: ../../using/configure.rst:691 msgid "cross-compile to build programs to run on HOST (target platform)" msgstr "" -#: ../../using/configure.rst:686 +#: ../../using/configure.rst:695 msgid "path to build ``python`` binary for cross compiling" msgstr "" -#: ../../using/configure.rst:692 +#: ../../using/configure.rst:701 msgid "An environment variable that points to a file with configure overrides." msgstr "" -#: ../../using/configure.rst:694 +#: ../../using/configure.rst:703 msgid "Example *config.site* file:" msgstr "" -#: ../../using/configure.rst:704 +#: ../../using/configure.rst:713 msgid "Cross compiling example::" msgstr "" -#: ../../using/configure.rst:713 +#: ../../using/configure.rst:722 msgid "Python Build System" msgstr "" -#: ../../using/configure.rst:716 +#: ../../using/configure.rst:725 msgid "Main files of the build system" msgstr "" -#: ../../using/configure.rst:718 +#: ../../using/configure.rst:727 msgid ":file:`configure.ac` => :file:`configure`;" msgstr ":file:`configure.ac` => :file:`configure`\\ ;" -#: ../../using/configure.rst:719 +#: ../../using/configure.rst:728 msgid "" ":file:`Makefile.pre.in` => :file:`Makefile` (created by :file:`configure`);" msgstr "" -#: ../../using/configure.rst:720 +#: ../../using/configure.rst:729 msgid ":file:`pyconfig.h` (created by :file:`configure`);" msgstr ":file:`pyconfig.h` (created by :file:`configure`)\\ ;" -#: ../../using/configure.rst:721 +#: ../../using/configure.rst:730 msgid "" ":file:`Modules/Setup`: C extensions built by the Makefile using :file:" "`Module/makesetup` shell script;" msgstr "" -#: ../../using/configure.rst:725 +#: ../../using/configure.rst:734 msgid "Main build steps" msgstr "主要建置步驟" -#: ../../using/configure.rst:727 +#: ../../using/configure.rst:736 msgid "C files (``.c``) are built as object files (``.o``)." msgstr "" -#: ../../using/configure.rst:728 +#: ../../using/configure.rst:737 msgid "A static ``libpython`` library (``.a``) is created from objects files." msgstr "" -#: ../../using/configure.rst:729 +#: ../../using/configure.rst:738 msgid "" "``python.o`` and the static ``libpython`` library are linked into the final " "``python`` program." msgstr "" -#: ../../using/configure.rst:731 +#: ../../using/configure.rst:740 msgid "C extensions are built by the Makefile (see :file:`Modules/Setup`)." msgstr "" -#: ../../using/configure.rst:734 +#: ../../using/configure.rst:743 msgid "Main Makefile targets" msgstr "主要 Makefile 目標" -#: ../../using/configure.rst:736 +#: ../../using/configure.rst:745 msgid "``make``: Build Python with the standard library." msgstr "" -#: ../../using/configure.rst:737 +#: ../../using/configure.rst:746 msgid "" "``make platform:``: build the ``python`` program, but don't build the " "standard library extension modules." msgstr "" -#: ../../using/configure.rst:739 +#: ../../using/configure.rst:748 msgid "" "``make profile-opt``: build Python using Profile Guided Optimization (PGO). " "You can use the configure :option:`--enable-optimizations` option to make " @@ -1071,53 +1080,53 @@ msgid "" "``make``)." msgstr "" -#: ../../using/configure.rst:743 +#: ../../using/configure.rst:752 msgid "" "``make buildbottest``: Build Python and run the Python test suite, the same " "way than buildbots test Python. Set ``TESTTIMEOUT`` variable (in seconds) to " "change the test timeout (1200 by default: 20 minutes)." msgstr "" -#: ../../using/configure.rst:746 +#: ../../using/configure.rst:755 msgid "``make install``: Build and install Python." msgstr "" -#: ../../using/configure.rst:747 +#: ../../using/configure.rst:756 msgid "" "``make regen-all``: Regenerate (almost) all generated files; ``make regen-" "stdlib-module-names`` and ``autoconf`` must be run separately for the " "remaining generated files." msgstr "" -#: ../../using/configure.rst:750 +#: ../../using/configure.rst:759 msgid "``make clean``: Remove built files." msgstr "" -#: ../../using/configure.rst:751 +#: ../../using/configure.rst:760 msgid "" "``make distclean``: Same than ``make clean``, but remove also files created " "by the configure script." msgstr "" -#: ../../using/configure.rst:755 +#: ../../using/configure.rst:764 msgid "C extensions" msgstr "C 擴充模組" -#: ../../using/configure.rst:757 +#: ../../using/configure.rst:766 msgid "" "Some C extensions are built as built-in modules, like the ``sys`` module. " "They are built with the ``Py_BUILD_CORE_BUILTIN`` macro defined. Built-in " "modules have no ``__file__`` attribute:" msgstr "" -#: ../../using/configure.rst:771 +#: ../../using/configure.rst:780 msgid "" "Other C extensions are built as dynamic libraries, like the ``_asyncio`` " "module. They are built with the ``Py_BUILD_CORE_MODULE`` macro defined. " "Example on Linux x86-64:" msgstr "" -#: ../../using/configure.rst:783 +#: ../../using/configure.rst:792 msgid "" ":file:`Modules/Setup` is used to generate Makefile targets to build C " "extensions. At the beginning of the files, C extensions are built as built-" @@ -1125,303 +1134,303 @@ msgid "" "dynamic libraries." msgstr "" -#: ../../using/configure.rst:787 +#: ../../using/configure.rst:796 msgid "" "The :c:macro:`!PyAPI_FUNC()`, :c:macro:`!PyAPI_DATA()` and :c:macro:" "`PyMODINIT_FUNC` macros of :file:`Include/exports.h` are defined differently " "depending if the ``Py_BUILD_CORE_MODULE`` macro is defined:" msgstr "" -#: ../../using/configure.rst:791 +#: ../../using/configure.rst:800 msgid "Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined" msgstr "如果定義了 ``Py_BUILD_CORE_MODULE``,則使用 ``Py_EXPORTED_SYMBOL``" -#: ../../using/configure.rst:792 +#: ../../using/configure.rst:801 msgid "Use ``Py_IMPORTED_SYMBOL`` otherwise." msgstr "否則使用 ``Py_IMPORTED_SYMBOL``。" -#: ../../using/configure.rst:794 +#: ../../using/configure.rst:803 msgid "" "If the ``Py_BUILD_CORE_BUILTIN`` macro is used by mistake on a C extension " "built as a shared library, its :samp:`PyInit_{xxx}()` function is not " "exported, causing an :exc:`ImportError` on import." msgstr "" -#: ../../using/configure.rst:800 +#: ../../using/configure.rst:809 msgid "Compiler and linker flags" msgstr "" -#: ../../using/configure.rst:802 +#: ../../using/configure.rst:811 msgid "" "Options set by the ``./configure`` script and environment variables and used " "by ``Makefile``." msgstr "" -#: ../../using/configure.rst:806 +#: ../../using/configure.rst:815 msgid "Preprocessor flags" msgstr "" -#: ../../using/configure.rst:810 +#: ../../using/configure.rst:819 msgid "" "Value of :envvar:`CPPFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:816 +#: ../../using/configure.rst:825 msgid "" "(Objective) C/C++ preprocessor flags, e.g. :samp:`-I{include_dir}` if you " "have headers in a nonstandard directory *include_dir*." msgstr "" -#: ../../using/configure.rst:819 ../../using/configure.rst:1009 +#: ../../using/configure.rst:828 ../../using/configure.rst:1018 msgid "" "Both :envvar:`CPPFLAGS` and :envvar:`LDFLAGS` need to contain the shell's " "value to be able to build extension modules using the directories specified " "in the environment variables." msgstr "" -#: ../../using/configure.rst:829 +#: ../../using/configure.rst:838 msgid "" "Extra preprocessor flags added for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:831 +#: ../../using/configure.rst:840 msgid "" "Default: ``$(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) " "$(CPPFLAGS)``." msgstr "" -#: ../../using/configure.rst:836 +#: ../../using/configure.rst:845 msgid "Compiler flags" msgstr "編譯器旗標" -#: ../../using/configure.rst:840 +#: ../../using/configure.rst:849 msgid "C compiler command." msgstr "C 編譯器指令。" -#: ../../using/configure.rst:842 +#: ../../using/configure.rst:851 msgid "Example: ``gcc -pthread``." msgstr "" -#: ../../using/configure.rst:846 +#: ../../using/configure.rst:855 msgid "C++ compiler command." msgstr "C++ 編譯器指令。" -#: ../../using/configure.rst:848 +#: ../../using/configure.rst:857 msgid "Example: ``g++ -pthread``." msgstr "範例:``g++ -pthread``。" -#: ../../using/configure.rst:852 +#: ../../using/configure.rst:861 msgid "C compiler flags." msgstr "C 編譯器旗標。" -#: ../../using/configure.rst:856 +#: ../../using/configure.rst:865 msgid "" ":envvar:`CFLAGS_NODIST` is used for building the interpreter and stdlib C " "extensions. Use it when a compiler flag should *not* be part of :envvar:" "`CFLAGS` once Python is installed (:gh:`65320`)." msgstr "" -#: ../../using/configure.rst:860 +#: ../../using/configure.rst:869 msgid "In particular, :envvar:`CFLAGS` should not contain:" msgstr "" -#: ../../using/configure.rst:862 +#: ../../using/configure.rst:871 msgid "" "the compiler flag ``-I`` (for setting the search path for include files). " "The ``-I`` flags are processed from left to right, and any flags in :envvar:" "`CFLAGS` would take precedence over user- and package-supplied ``-I`` flags." msgstr "" -#: ../../using/configure.rst:867 +#: ../../using/configure.rst:876 msgid "" "hardening flags such as ``-Werror`` because distributions cannot control " "whether packages installed by users conform to such heightened standards." msgstr "" -#: ../../using/configure.rst:875 +#: ../../using/configure.rst:884 msgid "" "Options passed to the :mod:`compileall` command line when building PYC files " "in ``make install``. Default: ``-j0``." msgstr "" -#: ../../using/configure.rst:882 +#: ../../using/configure.rst:891 msgid "Extra C compiler flags." msgstr "額外的 C 編譯器旗標。" -#: ../../using/configure.rst:886 +#: ../../using/configure.rst:895 msgid "" "Value of :envvar:`CFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:893 +#: ../../using/configure.rst:902 msgid "" "Value of :envvar:`CFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:900 +#: ../../using/configure.rst:909 msgid "Base compiler flags." msgstr "基本編譯器旗標。" -#: ../../using/configure.rst:904 +#: ../../using/configure.rst:913 msgid "Optimization flags." msgstr "最佳化旗標。" -#: ../../using/configure.rst:908 +#: ../../using/configure.rst:917 msgid "Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``." msgstr "" -#: ../../using/configure.rst:914 +#: ../../using/configure.rst:923 msgid "Compiler flags used to build a shared library." msgstr "" -#: ../../using/configure.rst:916 +#: ../../using/configure.rst:925 msgid "For example, ``-fPIC`` is used on Linux and on BSD." msgstr "例如說 ``-fPIC`` 被使用於 Linux 與 BSD 上。" -#: ../../using/configure.rst:920 +#: ../../using/configure.rst:929 msgid "Extra C flags added for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:922 +#: ../../using/configure.rst:931 msgid "" "Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty " "string otherwise." msgstr "" -#: ../../using/configure.rst:927 +#: ../../using/configure.rst:936 msgid "" "Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) " "$(EXTRA_CFLAGS)``." msgstr "" -#: ../../using/configure.rst:931 +#: ../../using/configure.rst:940 msgid "" "Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/" "internal``." msgstr "" -#: ../../using/configure.rst:937 +#: ../../using/configure.rst:946 msgid "C flags used for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:939 +#: ../../using/configure.rst:948 msgid "" "Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) " "$(CFLAGSFORSHARED)``." msgstr "" -#: ../../using/configure.rst:945 +#: ../../using/configure.rst:954 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``." msgstr "" -#: ../../using/configure.rst:951 +#: ../../using/configure.rst:960 msgid "" "Compiler flags to build a standard library extension module as a built-in " "module, like the :mod:`posix` module." msgstr "" -#: ../../using/configure.rst:954 +#: ../../using/configure.rst:963 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``." msgstr "" -#: ../../using/configure.rst:960 +#: ../../using/configure.rst:969 msgid "Purify command. Purify is a memory debugger program." msgstr "" -#: ../../using/configure.rst:962 +#: ../../using/configure.rst:971 msgid "Default: empty string (not used)." msgstr "" -#: ../../using/configure.rst:966 +#: ../../using/configure.rst:975 msgid "Linker flags" msgstr "" -#: ../../using/configure.rst:970 +#: ../../using/configure.rst:979 msgid "" "Linker command used to build programs like ``python`` and ``_testembed``." msgstr "" -#: ../../using/configure.rst:972 +#: ../../using/configure.rst:981 msgid "Default: ``$(PURIFY) $(CC)``." msgstr "" -#: ../../using/configure.rst:976 +#: ../../using/configure.rst:985 msgid "" "Value of :envvar:`LDFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:978 +#: ../../using/configure.rst:987 msgid "" "Avoid assigning :envvar:`CFLAGS`, :envvar:`LDFLAGS`, etc. so users can use " "them on the command line to append to these values without stomping the pre-" "set values." msgstr "" -#: ../../using/configure.rst:986 +#: ../../using/configure.rst:995 msgid "" ":envvar:`LDFLAGS_NODIST` is used in the same manner as :envvar:" "`CFLAGS_NODIST`. Use it when a linker flag should *not* be part of :envvar:" "`LDFLAGS` once Python is installed (:gh:`65320`)." msgstr "" -#: ../../using/configure.rst:990 +#: ../../using/configure.rst:999 msgid "In particular, :envvar:`LDFLAGS` should not contain:" msgstr "" -#: ../../using/configure.rst:992 +#: ../../using/configure.rst:1001 msgid "" "the compiler flag ``-L`` (for setting the search path for libraries). The ``-" "L`` flags are processed from left to right, and any flags in :envvar:" "`LDFLAGS` would take precedence over user- and package-supplied ``-L`` flags." msgstr "" -#: ../../using/configure.rst:999 +#: ../../using/configure.rst:1008 msgid "" "Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:1006 +#: ../../using/configure.rst:1015 msgid "" "Linker flags, e.g. :samp:`-L{lib_dir}` if you have libraries in a " "nonstandard directory *lib_dir*." msgstr "" -#: ../../using/configure.rst:1015 +#: ../../using/configure.rst:1024 msgid "" "Linker flags to pass libraries to the linker when linking the Python " "executable." msgstr "" -#: ../../using/configure.rst:1018 +#: ../../using/configure.rst:1027 msgid "Example: ``-lrt``." msgstr "範例:``-lrt``。" -#: ../../using/configure.rst:1022 +#: ../../using/configure.rst:1031 msgid "Command to build a shared library." msgstr "" -#: ../../using/configure.rst:1024 +#: ../../using/configure.rst:1033 msgid "Default: ``@LDSHARED@ $(PY_LDFLAGS)``." msgstr "預設值:``@LDSHARED@ $(PY_LDFLAGS)``。" -#: ../../using/configure.rst:1028 +#: ../../using/configure.rst:1037 msgid "Command to build ``libpython`` shared library." msgstr "" -#: ../../using/configure.rst:1030 +#: ../../using/configure.rst:1039 msgid "Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``." msgstr "預設值:``@BLDSHARED@ $(PY_CORE_LDFLAGS)``。" -#: ../../using/configure.rst:1034 +#: ../../using/configure.rst:1043 msgid "Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``." msgstr "預設值:``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``。" -#: ../../using/configure.rst:1038 +#: ../../using/configure.rst:1047 msgid "Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." msgstr "預設值:``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``。" -#: ../../using/configure.rst:1044 +#: ../../using/configure.rst:1053 msgid "Linker flags used for building the interpreter object files." msgstr "" diff --git a/using/mac.po b/using/mac.po index ddf3696d9f..a4b126dda2 100644 --- a/using/mac.po +++ b/using/mac.po @@ -5,12 +5,12 @@ # Ching-Lung Chuang, 2015 # Jason , 2016 # Adrian Liaw , 2018 -# Matt Wang , 2022 +# Matt Wang , 2022, 2024 msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-14 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2022-08-31 22:26+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -269,11 +269,10 @@ msgstr "於 Mac 上使用 Python 來建立 GUI 應用程式有許多選項。" msgid "" "*PyObjC* is a Python binding to Apple's Objective-C/Cocoa framework, which " "is the foundation of most modern Mac development. Information on PyObjC is " -"available from https://pypi.org/project/pyobjc/." +"available from :pypi:`pyobjc`." msgstr "" "*PyObjC* 是一個 Apple Objective-C/Cocoa 框架的 Python 繫結 (binding),這是大" -"多數現代 Mac 開發的基礎。有關 PyObjC 的資訊,請見 https://pypi.org/project/" -"pyobjc/。" +"多數現代 Mac 開發的基礎。有關 PyObjC 的資訊,請見 :pypi:`pyobjc`。" #: ../../using/mac.rst:150 msgid "" @@ -287,47 +286,84 @@ msgstr "" "從 https://www.activestate.com 下載和安裝;它也可以從原始碼開始建置。" #: ../../using/mac.rst:155 +msgid "A number of alternative macOS GUI toolkits are available:" +msgstr "有許多替代 macOS GUI 工具套件可用:" + +#: ../../using/mac.rst:157 msgid "" -"*wxPython* is another popular cross-platform GUI toolkit that runs natively " -"on macOS. Packages and documentation are available from https://www.wxpython." -"org." +"`PySide `__: Official Python bindings to " +"the `Qt GUI toolkit `__." msgstr "" -"*wxPython* 是另一種流行的跨平臺 GUI 工具套件,可在 macOS 上本機執行。套件和文" -"件可從 https://www.wxpython.org 獲得。" +"`PySide `__:`Qt GUI 工具包 `__\\ 的官方 Python 繫結。" -#: ../../using/mac.rst:158 +#: ../../using/mac.rst:160 msgid "" -"*PyQt* is another popular cross-platform GUI toolkit that runs natively on " -"macOS. More information can be found at https://riverbankcomputing.com/" -"software/pyqt/intro." +"`PyQt `__: Alternative " +"Python bindings to Qt." msgstr "" -"*PyQt* 是另一種流行的跨平臺 GUI 工具套件,可在原生 macOS 上執行。更多資訊可" -"在 https://riverbankcomputing.com/software/pyqt/intro 上找到。" +"`PyQt `__:Qt 的替代 " +"Python 繫結。" -#: ../../using/mac.rst:162 +#: ../../using/mac.rst:163 msgid "" -"*PySide* is another cross-platform Qt-based toolkit. More information at " -"https://www.qt.io/qt-for-python." +"`Kivy `__: A cross-platform GUI toolkit that supports " +"desktop and mobile platforms." msgstr "" +"`Kivy `__:一個支援桌面和行動平臺的跨平臺 GUI 工具包。" + +#: ../../using/mac.rst:166 +msgid "" +"`Toga `__: Part of the `BeeWare Project " +"`__; supports desktop, mobile, web and console apps." +msgstr "" +"`Toga `__:`BeeWare 專案 `__\\ 的一部分;支援桌面、行動、網頁和控制台應用程式。" #: ../../using/mac.rst:169 +msgid "" +"`wxPython `__: A cross-platform toolkit that " +"supports desktop operating systems." +msgstr "" +"`wxPython `__:一個支援桌面作業系統的跨平臺工具包。" + +#: ../../using/mac.rst:175 msgid "Distributing Python Applications" msgstr "發行 Python 應用程式" -#: ../../using/mac.rst:171 +#: ../../using/mac.rst:177 msgid "" -"The standard tool for deploying standalone Python applications on the Mac " -"is :program:`py2app`. More information on installing and using :program:" -"`py2app` can be found at https://pypi.org/project/py2app/." +"A range of tools exist for converting your Python code into a standalone " +"distributable application:" msgstr "" -"在 Mac 上部署獨立 Python 應用程式的標準工具是 :program:`py2app`。有關安裝和使" -"用 :program:`py2app` 的更多資訊,請參考 https://pypi.org/project/py2app/。" -#: ../../using/mac.rst:177 +#: ../../using/mac.rst:180 +msgid "" +":pypi:`py2app`: Supports creating macOS ``.app`` bundles from a Python " +"project." +msgstr ":pypi:`py2app`:支援從 Python 專案打包成 macOS ``.app``。" + +#: ../../using/mac.rst:183 +msgid "" +"`Briefcase `__: Part of the `BeeWare " +"Project `__; a cross-platform packaging tool that " +"supports creation of ``.app`` bundles on macOS, as well as managing signing " +"and notarization." +msgstr "" + +#: ../../using/mac.rst:188 +msgid "" +"`PyInstaller `__: A cross-platform packaging tool " +"that creates a single file or folder as a distributable artifact." +msgstr "" +"`PyInstaller `__:一個跨平臺打包工具,可以將單一檔" +"案或資料夾打包成可分發的檔案。" + +#: ../../using/mac.rst:192 msgid "Other Resources" msgstr "其他資源" -#: ../../using/mac.rst:179 +#: ../../using/mac.rst:194 msgid "" "The Pythonmac-SIG mailing list is an excellent support resource for Python " "users and developers on the Mac:" @@ -335,14 +371,14 @@ msgstr "" "Pythonmac-SIG 郵件清單對於 Mac 上的 Python 使用者和開發者是一個極佳的支援資" "源:" -#: ../../using/mac.rst:182 +#: ../../using/mac.rst:197 msgid "https://www.python.org/community/sigs/current/pythonmac-sig/" msgstr "https://www.python.org/community/sigs/current/pythonmac-sig/" -#: ../../using/mac.rst:184 +#: ../../using/mac.rst:199 msgid "Another useful resource is the MacPython wiki:" msgstr "另一個好用資源是 MacPython wiki:" -#: ../../using/mac.rst:186 +#: ../../using/mac.rst:201 msgid "https://wiki.python.org/moin/MacPython" msgstr "https://wiki.python.org/moin/MacPython" diff --git a/using/windows.po b/using/windows.po index 59ca88416c..14f747fe48 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-25 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -971,7 +971,7 @@ msgid "" "versions and their key features:" msgstr "" -#: ../../using/windows.rst:545 +#: ../../using/windows.rst:544 msgid "`ActivePython `_" msgstr "`ActivePython `_" @@ -979,7 +979,7 @@ msgstr "`ActivePython `_" msgid "Installer with multi-platform compatibility, documentation, PyWin32" msgstr "" -#: ../../using/windows.rst:549 +#: ../../using/windows.rst:547 msgid "`Anaconda `_" msgstr "`Anaconda `_" @@ -989,7 +989,7 @@ msgid "" "``conda`` package manager." msgstr "" -#: ../../using/windows.rst:555 +#: ../../using/windows.rst:551 msgid "`Enthought Deployment Manager `_" msgstr "`Enthought Deployment Manager `_" @@ -1005,7 +1005,7 @@ msgid "" "Code>`_." msgstr "" -#: ../../using/windows.rst:559 +#: ../../using/windows.rst:557 msgid "`WinPython `_" msgstr "`WinPython `_" @@ -1088,7 +1088,7 @@ msgid "" "code that is compatible with all of your installed Python versions." msgstr "" -#: ../../using/windows.rst:622 +#: ../../using/windows.rst:621 msgid "" "https://docs.microsoft.com/en-us/windows/win32/procthread/environment-" "variables" @@ -1100,7 +1100,7 @@ msgstr "" msgid "Overview of environment variables on Windows" msgstr "Windows 上的環境變數概要" -#: ../../using/windows.rst:625 +#: ../../using/windows.rst:624 msgid "" "https://docs.microsoft.com/en-us/windows-server/administration/windows-" "commands/set_1" @@ -2000,9 +2000,8 @@ msgstr "PyWin32" #: ../../using/windows.rst:1220 msgid "" -"The `PyWin32 `_ module by Mark Hammond is " -"a collection of modules for advanced Windows-specific support. This " -"includes utilities for:" +"The :pypi:`PyWin32` module by Mark Hammond is a collection of modules for " +"advanced Windows-specific support. This includes utilities for:" msgstr "" #: ../../using/windows.rst:1224 @@ -2036,7 +2035,7 @@ msgid "" "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1241 +#: ../../using/windows.rst:1240 msgid "" "`Win32 How Do I...? `_" msgstr "" diff --git a/whatsnew/2.1.po b/whatsnew/2.1.po index 121614837b..9a8cf65f8c 100644 --- a/whatsnew/2.1.po +++ b/whatsnew/2.1.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-27 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -329,7 +329,7 @@ msgid "" "functions." msgstr "" -#: ../../whatsnew/2.1.rst:223 +#: ../../whatsnew/2.1.rst:222 msgid ":pep:`207` - Rich Comparisons" msgstr "" @@ -407,7 +407,7 @@ msgid "" "PEP 230 or to Python's API documentation for the details." msgstr "" -#: ../../whatsnew/2.1.rst:293 +#: ../../whatsnew/2.1.rst:289 msgid ":pep:`5` - Guidelines for Language Evolution" msgstr "" @@ -667,7 +667,7 @@ msgid "" "object's numeric methods)." msgstr "" -#: ../../whatsnew/2.1.rst:535 +#: ../../whatsnew/2.1.rst:533 msgid ":pep:`208` - Reworking the Coercion Model" msgstr "" @@ -719,11 +719,11 @@ msgid "" "python.org/community/sigs/current/distutils-sig/." msgstr "" -#: ../../whatsnew/2.1.rst:575 +#: ../../whatsnew/2.1.rst:574 msgid ":pep:`241` - Metadata for Python Software Packages" msgstr "" -#: ../../whatsnew/2.1.rst:578 +#: ../../whatsnew/2.1.rst:577 msgid ":pep:`243` - Module Repository Upload Mechanism" msgstr "" diff --git a/whatsnew/2.2.po b/whatsnew/2.2.po index 3a8d3f97c6..8bda506a7f 100644 --- a/whatsnew/2.2.po +++ b/whatsnew/2.2.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -596,7 +596,7 @@ msgid "" "only requires a :meth:`next` method." msgstr "" -#: ../../whatsnew/2.2.rst:535 +#: ../../whatsnew/2.2.rst:534 msgid ":pep:`234` - Iterators" msgstr ":pep:`234` - 疊代器" @@ -736,7 +736,7 @@ msgid "" "other functions or stored in a data structure." msgstr "" -#: ../../whatsnew/2.2.rst:662 +#: ../../whatsnew/2.2.rst:661 msgid ":pep:`255` - Simple Generators" msgstr "" @@ -782,7 +782,7 @@ msgid "" "that's rarely needed." msgstr "" -#: ../../whatsnew/2.2.rst:702 +#: ../../whatsnew/2.2.rst:701 msgid ":pep:`237` - Unifying Long Integers and Integers" msgstr "" @@ -1274,7 +1274,7 @@ msgid "Rename :c:macro:`!Py_TPFLAGS_GC` to :c:macro:`Py_TPFLAGS_HAVE_GC`." msgstr "" "將 :c:macro:`!Py_TPFLAGS_GC` 重新命名為 :c:macro:`Py_TPFLAGS_HAVE_GC`。" -#: ../../whatsnew/2.2.rst:1084 +#: ../../whatsnew/2.2.rst:1083 msgid "" "Use :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar` to allocate" msgstr "" diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index 40a781feb1..ccf80e8cae 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-11 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -114,7 +114,7 @@ msgid "" "checking whether one set is a subset or superset of another::" msgstr "" -#: ../../whatsnew/2.3.rst:117 +#: ../../whatsnew/2.3.rst:116 msgid ":pep:`218` - Adding a Built-In Set Object Type" msgstr "" @@ -254,7 +254,7 @@ msgid "" "functions or stored in a data structure." msgstr "" -#: ../../whatsnew/2.3.rst:248 +#: ../../whatsnew/2.3.rst:247 msgid ":pep:`255` - Simple Generators" msgstr "" @@ -294,7 +294,7 @@ msgid "" "variable names that use characters outside of the usual alphanumerics." msgstr "" -#: ../../whatsnew/2.3.rst:282 +#: ../../whatsnew/2.3.rst:281 msgid ":pep:`263` - Defining Python Source Code Encodings" msgstr "" @@ -333,7 +333,7 @@ msgid "" "import from the :file:`lib/` subdirectory within the archive." msgstr "" -#: ../../whatsnew/2.3.rst:331 +#: ../../whatsnew/2.3.rst:328 msgid ":pep:`273` - Import Modules from Zip Archives" msgstr "" @@ -385,7 +385,7 @@ msgstr "" msgid "Under MacOS, :func:`os.listdir` may now return Unicode filenames." msgstr "" -#: ../../whatsnew/2.3.rst:365 +#: ../../whatsnew/2.3.rst:364 msgid ":pep:`277` - Unicode file name support for Windows NT" msgstr "" @@ -654,9 +654,9 @@ msgstr "" msgid "" "When encoding a Unicode string into a byte string, unencodable characters " "may be encountered. So far, Python has allowed specifying the error " -"processing as either \"strict\" (raising :exc:`UnicodeError`), \"ignore\" " -"(skipping the character), or \"replace\" (using a question mark in the " -"output string), with \"strict\" being the default behavior. It may be " +"processing as either \"strict\" (raising :exc:`UnicodeError`), " +"\"ignore\" (skipping the character), or \"replace\" (using a question mark " +"in the output string), with \"strict\" being the default behavior. It may be " "desirable to specify alternative processing of such errors, such as " "inserting an XML character reference or HTML entity reference into the " "converted string." @@ -845,7 +845,7 @@ msgid "" "succession of tuples or lists, quoting strings that contain the delimiter." msgstr "" -#: ../../whatsnew/2.3.rst:806 +#: ../../whatsnew/2.3.rst:805 msgid ":pep:`305` - CSV File API" msgstr "" @@ -1147,8 +1147,7 @@ msgid "" "2.3 now uses the C3 algorithm as described in the paper `\"A Monotonic " "Superclass Linearization for Dylan\" `_. To understand the motivation for this " -"change, read Michele Simionato's article `\"Python 2.3 Method Resolution " -"Order\" `_, or read the " +"change, read Michele Simionato's article :ref:`python_2.3_mro`, or read the " "thread on python-dev starting with the message at https://mail.python.org/" "pipermail/python-dev/2002-October/029035.html. Samuele Pedroni first pointed " "out the problem and also implemented the fix by coding the C3 algorithm." @@ -2044,7 +2043,7 @@ msgid "" "distribution and bundle it with the source of your extension." msgstr "" -#: ../../whatsnew/2.3.rst:1869 +#: ../../whatsnew/2.3.rst:1867 msgid "https://hg.python.org/cpython/file/default/Objects/obmalloc.c" msgstr "https://hg.python.org/cpython/file/default/Objects/obmalloc.c" diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index 913f077413..cd88e145da 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -90,7 +90,7 @@ msgid "" "There are currently no plans to deprecate the module." msgstr "" -#: ../../whatsnew/2.4.rst:83 +#: ../../whatsnew/2.4.rst:82 msgid ":pep:`218` - Adding a Built-In Set Object Type" msgstr "" @@ -122,7 +122,7 @@ msgid "" "expression now returns the correct answer, 8589934592." msgstr "" -#: ../../whatsnew/2.4.rst:108 +#: ../../whatsnew/2.4.rst:107 msgid ":pep:`237` - Unifying Long Integers and Integers" msgstr "" @@ -184,7 +184,7 @@ msgid "" "respect." msgstr "" -#: ../../whatsnew/2.4.rst:165 +#: ../../whatsnew/2.4.rst:164 msgid ":pep:`289` - Generator Expressions" msgstr "" @@ -349,7 +349,7 @@ msgid "" "function that's constructed and returned." msgstr "" -#: ../../whatsnew/2.4.rst:339 +#: ../../whatsnew/2.4.rst:336 msgid ":pep:`318` - Decorators for Functions, Methods and Classes" msgstr "" @@ -501,7 +501,7 @@ msgid "" "section of the PEP is highly recommended." msgstr "" -#: ../../whatsnew/2.4.rst:466 +#: ../../whatsnew/2.4.rst:465 msgid ":pep:`324` - subprocess - New process module" msgstr "" @@ -732,7 +732,7 @@ msgid "" "which includes a quick-start tutorial and a reference." msgstr "" -#: ../../whatsnew/2.4.rst:685 +#: ../../whatsnew/2.4.rst:683 msgid ":pep:`327` - Decimal Data Type" msgstr "" @@ -742,7 +742,7 @@ msgid "" "Raymond Hettinger, Aahz, and Tim Peters." msgstr "" -#: ../../whatsnew/2.4.rst:689 +#: ../../whatsnew/2.4.rst:687 msgid "http://www.lahey.com/float.htm" msgstr "http://www.lahey.com/float.htm" @@ -752,7 +752,7 @@ msgid "" "floating-point inaccuracy can cause." msgstr "" -#: ../../whatsnew/2.4.rst:693 +#: ../../whatsnew/2.4.rst:691 msgid "http://speleotrove.com/decimal/" msgstr "http://speleotrove.com/decimal/" @@ -1161,7 +1161,7 @@ msgstr "" msgid "Chinese (ROC): big5, cp950" msgstr "" -#: ../../whatsnew/2.4.rst:1018 +#: ../../whatsnew/2.4.rst:1016 msgid "Japanese: cp932, euc-jis-2004, euc-jp, euc-jisx0213, iso-2022-jp," msgstr "" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 9556b49e77..401013431e 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -166,7 +166,7 @@ msgid "" "around your conditional expressions, you won't run into this case." msgstr "" -#: ../../whatsnew/2.5.rst:123 +#: ../../whatsnew/2.5.rst:122 msgid ":pep:`308` - Conditional Expressions" msgstr "" @@ -231,7 +231,7 @@ msgid "" "previous example would be::" msgstr "" -#: ../../whatsnew/2.5.rst:201 +#: ../../whatsnew/2.5.rst:200 msgid ":pep:`309` - Partial Function Application" msgstr "" @@ -283,7 +283,7 @@ msgid "" "Package uploading was implemented by Martin von Löwis and Richard Jones." msgstr "" -#: ../../whatsnew/2.5.rst:248 +#: ../../whatsnew/2.5.rst:247 msgid ":pep:`314` - Metadata for Python Software Packages v1.1" msgstr "" @@ -386,7 +386,7 @@ msgid "" "import statement, only the ``from ... import`` form." msgstr "" -#: ../../whatsnew/2.5.rst:331 +#: ../../whatsnew/2.5.rst:330 msgid ":pep:`328` - Imports: Multi-Line and Absolute/Relative" msgstr "" @@ -631,7 +631,7 @@ msgid "" "exhausted." msgstr "" -#: ../../whatsnew/2.5.rst:549 +#: ../../whatsnew/2.5.rst:544 msgid ":pep:`342` - Coroutines via Enhanced Generators" msgstr "" @@ -647,7 +647,7 @@ msgid "" "Hettinger and :pep:`325` by Samuele Pedroni." msgstr "" -#: ../../whatsnew/2.5.rst:552 +#: ../../whatsnew/2.5.rst:551 msgid "https://en.wikipedia.org/wiki/Coroutine" msgstr "https://en.wikipedia.org/wiki/Coroutine" @@ -907,7 +907,7 @@ msgid "" "bound to a variable, and calls ``object.close`` at the end of the block. ::" msgstr "" -#: ../../whatsnew/2.5.rst:803 +#: ../../whatsnew/2.5.rst:799 msgid ":pep:`343` - The \"with\" statement" msgstr "" @@ -2051,7 +2051,7 @@ msgid "" "modules, now that :mod:`ctypes` is included with core Python." msgstr "" -#: ../../whatsnew/2.5.rst:1750 +#: ../../whatsnew/2.5.rst:1749 msgid "" "https://web.archive.org/web/20180410025338/http://starship.python.net/crew/" "theller/ctypes/" @@ -2395,7 +2395,7 @@ msgid "" "www.sqlite.org." msgstr "" -#: ../../whatsnew/2.5.rst:2023 +#: ../../whatsnew/2.5.rst:2022 msgid "https://www.pysqlite.org" msgstr "https://www.pysqlite.org" @@ -2403,7 +2403,7 @@ msgstr "https://www.pysqlite.org" msgid "The pysqlite web page." msgstr "" -#: ../../whatsnew/2.5.rst:2027 +#: ../../whatsnew/2.5.rst:2025 msgid "https://www.sqlite.org" msgstr "https://www.sqlite.org" @@ -2444,7 +2444,7 @@ msgid "" "Setting up a server takes only a few lines of code::" msgstr "" -#: ../../whatsnew/2.5.rst:2069 +#: ../../whatsnew/2.5.rst:2068 msgid "" "https://web.archive.org/web/20160331090247/http://wsgi.readthedocs.org/en/" "latest/" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 4679885ca6..13ab4d414c 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -194,7 +194,7 @@ msgid "" "wishing to move from SourceForge to Roundup." msgstr "" -#: ../../whatsnew/2.6.rst:183 +#: ../../whatsnew/2.6.rst:182 msgid "https://bugs.python.org" msgstr "https://bugs.python.org" @@ -202,7 +202,7 @@ msgstr "https://bugs.python.org" msgid "The Python bug tracker." msgstr "" -#: ../../whatsnew/2.6.rst:186 +#: ../../whatsnew/2.6.rst:185 msgid "https://bugs.jython.org:" msgstr "https://bugs.jython.org:" @@ -210,7 +210,7 @@ msgstr "https://bugs.jython.org:" msgid "The Jython bug tracker." msgstr "" -#: ../../whatsnew/2.6.rst:189 +#: ../../whatsnew/2.6.rst:188 msgid "https://roundup.sourceforge.io/" msgstr "https://roundup.sourceforge.io/" @@ -275,7 +275,7 @@ msgid "" "tool." msgstr "" -#: ../../whatsnew/2.6.rst:234 +#: ../../whatsnew/2.6.rst:233 msgid "`Documenting Python `__" msgstr "" @@ -283,7 +283,7 @@ msgstr "" msgid "Describes how to write for Python's documentation." msgstr "" -#: ../../whatsnew/2.6.rst:237 +#: ../../whatsnew/2.6.rst:236 msgid "`Sphinx `__" msgstr "" @@ -542,7 +542,7 @@ msgid "" "of the block. ::" msgstr "" -#: ../../whatsnew/2.6.rst:490 +#: ../../whatsnew/2.6.rst:486 msgid ":pep:`343` - The \"with\" statement" msgstr "" @@ -719,7 +719,7 @@ msgstr "" msgid "The documentation for the :mod:`multiprocessing` module." msgstr "" -#: ../../whatsnew/2.6.rst:707 +#: ../../whatsnew/2.6.rst:706 msgid ":pep:`371` - Addition of the multiprocessing package" msgstr "" @@ -933,7 +933,7 @@ msgid "" "calls the type's :meth:`__format__` method with the provided specifier::" msgstr "" -#: ../../whatsnew/2.6.rst:847 +#: ../../whatsnew/2.6.rst:846 msgid ":ref:`formatstrings`" msgstr ":ref:`formatstrings`" @@ -1217,7 +1217,7 @@ msgid "" "buffering and text I/O." msgstr "" -#: ../../whatsnew/2.6.rst:1099 +#: ../../whatsnew/2.6.rst:1097 msgid ":pep:`3116` - New I/O" msgstr "" @@ -1290,7 +1290,7 @@ msgid "" "return locked buffer objects for a parameter." msgstr "" -#: ../../whatsnew/2.6.rst:1149 +#: ../../whatsnew/2.6.rst:1148 msgid ":pep:`3118` - Revising the buffer protocol" msgstr "" @@ -1418,7 +1418,7 @@ msgstr "" msgid "Subclasses must then define a :meth:`readonly` property." msgstr "" -#: ../../whatsnew/2.6.rst:1297 +#: ../../whatsnew/2.6.rst:1295 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" @@ -1460,7 +1460,7 @@ msgid "" "the string)::" msgstr "" -#: ../../whatsnew/2.6.rst:1349 +#: ../../whatsnew/2.6.rst:1348 msgid ":pep:`3127` - Integer Literal Support and Syntax" msgstr "" @@ -1550,7 +1550,7 @@ msgid "" "the function's argument and zero." msgstr "" -#: ../../whatsnew/2.6.rst:1426 +#: ../../whatsnew/2.6.rst:1425 msgid ":pep:`3141` - A Type Hierarchy for Numbers" msgstr "" @@ -3249,7 +3249,7 @@ msgstr "" msgid "Deprecations and Removals" msgstr "" -#: ../../whatsnew/2.6.rst:2908 ../../whatsnew/2.6.rst:3263 +#: ../../whatsnew/2.6.rst:2908 ../../whatsnew/2.6.rst:3262 msgid "" "String exceptions have been removed. Attempting to use them raises a :exc:" "`TypeError`." @@ -3389,26 +3389,25 @@ msgstr "" #: ../../whatsnew/2.6.rst:3018 msgid "" -"Security issue reported as `CVE-2008-5983 `_; discussed in :gh:`50003`, and fixed by " -"Antoine Pitrou." +"Security issue reported as :cve:`2008-5983`; discussed in :gh:`50003`, and " +"fixed by Antoine Pitrou." msgstr "" -#: ../../whatsnew/2.6.rst:3022 +#: ../../whatsnew/2.6.rst:3021 msgid "" "The BerkeleyDB module now has a C API object, available as ``bsddb.db." "api``. This object can be used by other C extensions that wish to use the :" "mod:`bsddb` module for their own purposes. (Contributed by Duncan Grisby.)" msgstr "" -#: ../../whatsnew/2.6.rst:3027 +#: ../../whatsnew/2.6.rst:3026 msgid "" "The new buffer interface, previously described in `the PEP 3118 section " "<#pep-3118-revised-buffer-protocol>`__, adds :c:func:`PyObject_GetBuffer` " "and :c:func:`PyBuffer_Release`, as well as a few other functions." msgstr "" -#: ../../whatsnew/2.6.rst:3032 +#: ../../whatsnew/2.6.rst:3031 msgid "" "Python's use of the C stdio library is now thread-safe, or at least as " "thread-safe as the underlying library is. A long-standing potential bug " @@ -3423,7 +3422,7 @@ msgid "" "Gregory P. Smith.)" msgstr "" -#: ../../whatsnew/2.6.rst:3045 +#: ../../whatsnew/2.6.rst:3044 msgid "" "Importing modules simultaneously in two different threads no longer " "deadlocks; it will now raise an :exc:`ImportError`. A new API function, :c:" @@ -3433,7 +3432,7 @@ msgid "" "(Contributed by Christian Heimes.)" msgstr "" -#: ../../whatsnew/2.6.rst:3053 +#: ../../whatsnew/2.6.rst:3052 msgid "" "Several functions return information about the platform's floating-point " "support. :c:func:`PyFloat_GetMax` returns the maximum representable " @@ -3445,7 +3444,7 @@ msgid "" "by Christian Heimes; :issue:`1534`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3064 +#: ../../whatsnew/2.6.rst:3063 msgid "" "C functions and methods that use :c:func:`PyComplex_AsCComplex` will now " "accept arguments that have a :meth:`__complex__` method. In particular, the " @@ -3454,14 +3453,14 @@ msgid "" "Dickinson; :issue:`1675423`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3071 +#: ../../whatsnew/2.6.rst:3070 msgid "" "Python's C API now includes two functions for case-insensitive string " "comparisons, ``PyOS_stricmp(char*, char*)`` and ``PyOS_strnicmp(char*, " "char*, Py_ssize_t)``. (Contributed by Christian Heimes; :issue:`1635`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3076 +#: ../../whatsnew/2.6.rst:3075 msgid "" "Many C extensions define their own little macro for adding integers and " "strings to the module's dictionary in the ``init*`` function. Python 2.6 " @@ -3470,7 +3469,7 @@ msgid "" "(Contributed by Christian Heimes.)" msgstr "" -#: ../../whatsnew/2.6.rst:3083 +#: ../../whatsnew/2.6.rst:3082 msgid "" "Some macros were renamed in both 3.0 and 2.6 to make it clearer that they " "are macros, not functions. :c:macro:`!Py_Size()` became :c:macro:" @@ -3479,14 +3478,14 @@ msgid "" "still available in Python 2.6 for backward compatibility. (:issue:`1629`)" msgstr "" -#: ../../whatsnew/2.6.rst:3092 +#: ../../whatsnew/2.6.rst:3091 msgid "" "Distutils now places C extensions it builds in a different directory when " "running on a debug version of Python. (Contributed by Collin Winter; :issue:" "`1530959`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3096 +#: ../../whatsnew/2.6.rst:3095 msgid "" "Several basic data types, such as integers and strings, maintain internal " "free lists of objects that can be re-used. The data structures for these " @@ -3495,7 +3494,7 @@ msgid "" "``Py_MAXFREELIST`` is always defined." msgstr "" -#: ../../whatsnew/2.6.rst:3103 +#: ../../whatsnew/2.6.rst:3102 msgid "" "A new Makefile target, \"make patchcheck\", prepares the Python source tree " "for making a patch: it fixes trailing whitespace in all modified ``.py`` " @@ -3504,7 +3503,7 @@ msgid "" "(Contributed by Brett Cannon.)" msgstr "" -#: ../../whatsnew/2.6.rst:3110 +#: ../../whatsnew/2.6.rst:3109 msgid "" "Another new target, \"make profile-opt\", compiles a Python binary using " "GCC's profile-guided optimization. It compiles Python with profiling " @@ -3513,17 +3512,17 @@ msgid "" "Smith.)" msgstr "" -#: ../../whatsnew/2.6.rst:3119 +#: ../../whatsnew/2.6.rst:3118 msgid "Port-Specific Changes: Windows" msgstr "" -#: ../../whatsnew/2.6.rst:3121 +#: ../../whatsnew/2.6.rst:3120 msgid "" "The support for Windows 95, 98, ME and NT4 has been dropped. Python 2.6 " "requires at least Windows 2000 SP4." msgstr "" -#: ../../whatsnew/2.6.rst:3124 +#: ../../whatsnew/2.6.rst:3123 msgid "" "The new default compiler on Windows is Visual Studio 2008 (version 9.0). The " "build directories for Visual Studio 2003 (version 7.1) and 2005 (version " @@ -3534,7 +3533,7 @@ msgid "" "Martin von Löwis.)" msgstr "" -#: ../../whatsnew/2.6.rst:3132 +#: ../../whatsnew/2.6.rst:3131 msgid "" "The :mod:`msvcrt` module now supports both the normal and wide char variants " "of the console I/O API. The :func:`~msvcrt.getwch` function reads a " @@ -3543,21 +3542,21 @@ msgid "" "writes it to the console. (Contributed by Christian Heimes.)" msgstr "" -#: ../../whatsnew/2.6.rst:3139 +#: ../../whatsnew/2.6.rst:3138 msgid "" ":func:`os.path.expandvars` will now expand environment variables in the form " "\"%var%\", and \"~user\" will be expanded into the user's home directory " "path. (Contributed by Josiah Carlson; :issue:`957650`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3143 +#: ../../whatsnew/2.6.rst:3142 msgid "" "The :mod:`socket` module's socket objects now have an :meth:`~socket.socket." "ioctl` method that provides a limited interface to the :c:func:`WSAIoctl` " "system interface." msgstr "" -#: ../../whatsnew/2.6.rst:3147 +#: ../../whatsnew/2.6.rst:3146 msgid "" "The :mod:`_winreg ` module now has a function, :func:`~winreg." "ExpandEnvironmentStrings`, that expands environment variable references such " @@ -3566,7 +3565,7 @@ msgid "" "`with` statements. (Contributed by Christian Heimes.)" msgstr "" -#: ../../whatsnew/2.6.rst:3154 +#: ../../whatsnew/2.6.rst:3153 msgid "" ":mod:`_winreg ` also has better support for x64 systems, exposing " "the :func:`~winreg.DisableReflectionKey`, :func:`~winreg." @@ -3575,7 +3574,7 @@ msgid "" "64-bit systems. (:issue:`1753245`)" msgstr "" -#: ../../whatsnew/2.6.rst:3160 +#: ../../whatsnew/2.6.rst:3159 msgid "" "The :mod:`msilib` module's :class:`!Record` object gained :meth:`~msilib." "Record.GetInteger` and :meth:`~msilib.Record.GetString` methods that return " @@ -3583,25 +3582,25 @@ msgid "" "issue:`2125`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3168 +#: ../../whatsnew/2.6.rst:3167 msgid "Port-Specific Changes: Mac OS X" msgstr "" -#: ../../whatsnew/2.6.rst:3170 +#: ../../whatsnew/2.6.rst:3169 msgid "" "When compiling a framework build of Python, you can now specify the " "framework name to be used by providing the :option:`!--with-framework-name=` " "option to the :program:`configure` script." msgstr "" -#: ../../whatsnew/2.6.rst:3175 +#: ../../whatsnew/2.6.rst:3174 msgid "" "The :mod:`!macfs` module has been removed. This in turn required the :func:" "`!macostools.touched` function to be removed because it depended on the :mod:" "`!macfs` module. (:issue:`1490190`)" msgstr "" -#: ../../whatsnew/2.6.rst:3179 +#: ../../whatsnew/2.6.rst:3178 msgid "" "Many other Mac OS modules have been deprecated and will be removed in Python " "3.0: :mod:`!_builtinSuites`, :mod:`!aepack`, :mod:`!aetools`, :mod:`!" @@ -3616,11 +3615,11 @@ msgid "" "mod:`!SystemEvents`, :mod:`!Terminal`, and :mod:`!terminalcommand`." msgstr "" -#: ../../whatsnew/2.6.rst:3222 +#: ../../whatsnew/2.6.rst:3221 msgid "Port-Specific Changes: IRIX" msgstr "" -#: ../../whatsnew/2.6.rst:3224 +#: ../../whatsnew/2.6.rst:3223 msgid "" "A number of old IRIX-specific modules were deprecated and will be removed in " "Python 3.0: :mod:`!al` and :mod:`!AL`, :mod:`!cd`, :mod:`!cddb`, :mod:`!" @@ -3631,30 +3630,30 @@ msgid "" "`!torgb`, :mod:`!videoreader`, and :mod:`!WAIT`." msgstr "" -#: ../../whatsnew/2.6.rst:3254 +#: ../../whatsnew/2.6.rst:3253 msgid "Porting to Python 2.6" msgstr "" -#: ../../whatsnew/2.6.rst:3256 +#: ../../whatsnew/2.6.rst:3255 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code:" msgstr "" -#: ../../whatsnew/2.6.rst:3259 +#: ../../whatsnew/2.6.rst:3258 msgid "" "Classes that aren't supposed to be hashable should set ``__hash__ = None`` " "in their definitions to indicate the fact." msgstr "" -#: ../../whatsnew/2.6.rst:3266 +#: ../../whatsnew/2.6.rst:3265 msgid "" "The :meth:`__init__` method of :class:`collections.deque` now clears any " "existing contents of the deque before adding elements from the iterable. " "This change makes the behavior match ``list.__init__()``." msgstr "" -#: ../../whatsnew/2.6.rst:3271 +#: ../../whatsnew/2.6.rst:3270 msgid "" ":meth:`object.__init__` previously accepted arbitrary arguments and keyword " "arguments, ignoring them. In Python 2.6, this is no longer allowed and will " @@ -3663,7 +3662,7 @@ msgid "" "through using :func:`super`). See :issue:`1683368` for discussion." msgstr "" -#: ../../whatsnew/2.6.rst:3278 +#: ../../whatsnew/2.6.rst:3277 msgid "" "The :class:`Decimal` constructor now accepts leading and trailing whitespace " "when passed a string. Previously it would raise an :exc:`InvalidOperation` " @@ -3672,7 +3671,7 @@ msgid "" "`ConversionSyntax` exception." msgstr "" -#: ../../whatsnew/2.6.rst:3285 +#: ../../whatsnew/2.6.rst:3284 msgid "" "Due to an implementation accident, if you passed a file path to the built-" "in :func:`__import__` function, it would actually import the specified " @@ -3680,20 +3679,20 @@ msgid "" "explicitly checks for this case and raises an :exc:`ImportError`." msgstr "" -#: ../../whatsnew/2.6.rst:3291 +#: ../../whatsnew/2.6.rst:3290 msgid "" "C API: the :c:func:`PyImport_Import` and :c:func:`PyImport_ImportModule` " "functions now default to absolute imports, not relative imports. This will " "affect C extensions that import other modules." msgstr "" -#: ../../whatsnew/2.6.rst:3295 +#: ../../whatsnew/2.6.rst:3294 msgid "" "C API: extension data types that shouldn't be hashable should define their " "``tp_hash`` slot to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: ../../whatsnew/2.6.rst:3299 +#: ../../whatsnew/2.6.rst:3298 msgid "" "The :mod:`socket` module exception :exc:`socket.error` now inherits from :" "exc:`IOError`. Previously it wasn't a subclass of :exc:`StandardError` but " @@ -3701,7 +3700,7 @@ msgid "" "`1706815`.)" msgstr "" -#: ../../whatsnew/2.6.rst:3304 +#: ../../whatsnew/2.6.rst:3303 msgid "" "The :mod:`xmlrpclib ` module no longer automatically " "converts :class:`datetime.date` and :class:`datetime.time` to the :class:" @@ -3711,32 +3710,32 @@ msgid "" "instances. (:issue:`1330538`)" msgstr "" -#: ../../whatsnew/2.6.rst:3311 +#: ../../whatsnew/2.6.rst:3310 msgid "" "(3.0-warning mode) The :class:`Exception` class now warns when accessed " "using slicing or index access; having :class:`Exception` behave like a tuple " "is being phased out." msgstr "" -#: ../../whatsnew/2.6.rst:3315 +#: ../../whatsnew/2.6.rst:3314 msgid "" "(3.0-warning mode) inequality comparisons between two dictionaries or two " "objects that don't implement comparison methods are reported as warnings. " "``dict1 == dict2`` still works, but ``dict1 < dict2`` is being phased out." msgstr "" -#: ../../whatsnew/2.6.rst:3320 +#: ../../whatsnew/2.6.rst:3319 msgid "" "Comparisons between cells, which are an implementation detail of Python's " "scoping rules, also cause warnings because such comparisons are forbidden " "entirely in 3.0." msgstr "" -#: ../../whatsnew/2.6.rst:3324 +#: ../../whatsnew/2.6.rst:3323 msgid "For applications that embed Python:" msgstr "" -#: ../../whatsnew/2.6.rst:3326 +#: ../../whatsnew/2.6.rst:3325 msgid "" "The :c:func:`!PySys_SetArgvEx` function was added in Python 2.6.6, letting " "applications close a security hole when the existing :c:func:`!" @@ -3745,11 +3744,11 @@ msgid "" "using :c:func:`!PySys_SetArgvEx` with *updatepath* set to false." msgstr "" -#: ../../whatsnew/2.6.rst:3339 +#: ../../whatsnew/2.6.rst:3338 msgid "Acknowledgements" msgstr "致謝" -#: ../../whatsnew/2.6.rst:3341 +#: ../../whatsnew/2.6.rst:3340 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index dd220c5043..66e8418c6a 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -66,7 +66,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:80 msgid "The Future for Python 2.x" -msgstr "" +msgstr "Python 2.x 的未來" #: ../../whatsnew/2.7.rst:82 msgid "" @@ -230,7 +230,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:185 msgid "The :class:`memoryview` object." -msgstr "" +msgstr ":class:`memoryview` 物件。" #: ../../whatsnew/2.7.rst:186 msgid "" @@ -259,7 +259,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:195 msgid "The :c:func:`PyLong_AsLongAndOverflow` C API function." -msgstr "" +msgstr ":c:func:`PyLong_AsLongAndOverflow` C API 函式。" #: ../../whatsnew/2.7.rst:197 msgid "Other new Python3-mode warnings include:" @@ -365,7 +365,7 @@ msgid "" "tools like `PyYAML `_." msgstr "" -#: ../../whatsnew/2.7.rst:307 +#: ../../whatsnew/2.7.rst:306 msgid ":pep:`372` - Adding an ordered dictionary to collections" msgstr "" @@ -483,15 +483,15 @@ msgid "" "``'-'`` means standard input or output." msgstr "" -#: ../../whatsnew/2.7.rst:438 +#: ../../whatsnew/2.7.rst:437 msgid ":mod:`argparse` documentation" msgstr ":mod:`argparse` 文件" #: ../../whatsnew/2.7.rst:438 msgid "The documentation page of the argparse module." -msgstr "" +msgstr "argparse 模組的文件頁面。" -#: ../../whatsnew/2.7.rst:442 +#: ../../whatsnew/2.7.rst:440 msgid ":ref:`upgrading-optparse-code`" msgstr ":ref:`upgrading-optparse-code`" @@ -631,7 +631,7 @@ msgid "" "meth:`~dict.items` methods." msgstr "" -#: ../../whatsnew/2.7.rst:606 +#: ../../whatsnew/2.7.rst:605 msgid ":pep:`3106` - Revamping dict.keys(), .values() and .items()" msgstr "" @@ -663,7 +663,7 @@ msgid "" "mutable object." msgstr "" -#: ../../whatsnew/2.7.rst:666 +#: ../../whatsnew/2.7.rst:664 msgid ":pep:`3137` - Immutable Bytes and Mutable Buffer" msgstr "" @@ -882,7 +882,7 @@ msgid "" "George Sakkis; :issue:`5982`.)" msgstr "" -#: ../../whatsnew/2.7.rst:869 ../../whatsnew/2.7.rst:2468 +#: ../../whatsnew/2.7.rst:869 ../../whatsnew/2.7.rst:2466 msgid "" "When a restricted set of attributes were set using ``__slots__``, deleting " "an unset attribute would not raise :exc:`AttributeError` as you would " @@ -1286,7 +1286,7 @@ msgid "" "types. (Changed by Mark Dickinson; :issue:`6857`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1220 ../../whatsnew/2.7.rst:2486 +#: ../../whatsnew/2.7.rst:1220 ../../whatsnew/2.7.rst:2484 msgid "" "Comparisons involving a signaling NaN value (or ``sNAN``) now signal :const:" "`~decimal.InvalidOperation` instead of silently returning a true or false " @@ -1787,7 +1787,7 @@ msgid "" "Hylton.)" msgstr "" -#: ../../whatsnew/2.7.rst:1601 ../../whatsnew/2.7.rst:2502 +#: ../../whatsnew/2.7.rst:1601 ../../whatsnew/2.7.rst:2500 msgid "" "The :mod:`syslog` module will now use the value of ``sys.argv[0]`` as the " "identifier instead of the previous default value of ``'python'``. (Changed " @@ -1810,7 +1810,7 @@ msgid "" "(Contributed by Brian Curtin; :issue:`7766`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1616 ../../whatsnew/2.7.rst:2506 +#: ../../whatsnew/2.7.rst:1616 ../../whatsnew/2.7.rst:2504 msgid "" "The :mod:`tarfile` module's default error handling has changed, to no longer " "suppress fatal errors. The default error level was previously 0, which " @@ -1854,7 +1854,7 @@ msgid "" "Florent Xicluna; :issue:`8024`)." msgstr "" -#: ../../whatsnew/2.7.rst:1651 ../../whatsnew/2.7.rst:2514 +#: ../../whatsnew/2.7.rst:1651 ../../whatsnew/2.7.rst:2512 msgid "" "The :mod:`urlparse ` module's :func:`~urllib.parse.urlsplit` " "now handles unknown URL schemes in a fashion compliant with :rfc:`3986`: if " @@ -1864,11 +1864,11 @@ msgid "" "behaviour. For example, Python 2.6.4 or 2.5 will return the following:" msgstr "" -#: ../../whatsnew/2.7.rst:1666 ../../whatsnew/2.7.rst:2529 +#: ../../whatsnew/2.7.rst:1666 ../../whatsnew/2.7.rst:2527 msgid "Python 2.7 (and Python 2.6.5) will return:" msgstr "" -#: ../../whatsnew/2.7.rst:1675 ../../whatsnew/2.7.rst:2538 +#: ../../whatsnew/2.7.rst:1675 ../../whatsnew/2.7.rst:2536 msgid "" "(Python 2.7 actually produces slightly different output, since it returns a " "named tuple instead of a standard tuple.)" @@ -2077,10 +2077,10 @@ msgid "" "added. Most of these features were implemented by Michael Foord, unless " "otherwise noted. The enhanced version of the module is downloadable " "separately for use with Python versions 2.4 to 2.6, packaged as the :mod:`!" -"unittest2` package, from https://pypi.org/project/unittest2." +"unittest2` package, from :pypi:`unittest2`." msgstr "" -#: ../../whatsnew/2.7.rst:1837 +#: ../../whatsnew/2.7.rst:1836 msgid "" "When used from the command line, the module can automatically discover " "tests. It's not as fancy as `py.test `__ or `nose " @@ -2090,17 +2090,17 @@ msgid "" "files named ``test*.py``::" msgstr "" -#: ../../whatsnew/2.7.rst:1846 +#: ../../whatsnew/2.7.rst:1845 msgid "" "Consult the :mod:`unittest` module documentation for more details. " "(Developed in :issue:`6001`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1849 +#: ../../whatsnew/2.7.rst:1848 msgid "The :func:`~unittest.main` function supports some other new options:" msgstr "" -#: ../../whatsnew/2.7.rst:1851 +#: ../../whatsnew/2.7.rst:1850 msgid "" ":option:`-b ` or :option:`!--buffer` will buffer the standard " "output and standard error streams during each test. If the test passes, any " @@ -2108,7 +2108,7 @@ msgid "" "displayed." msgstr "" -#: ../../whatsnew/2.7.rst:1856 +#: ../../whatsnew/2.7.rst:1855 msgid "" ":option:`-c ` or :option:`!--catch` will cause the control-C " "interrupt to be handled more gracefully. Instead of interrupting the test " @@ -2117,7 +2117,7 @@ msgid "" "impatient, a second press of control-C will cause an immediate interruption." msgstr "" -#: ../../whatsnew/2.7.rst:1863 +#: ../../whatsnew/2.7.rst:1862 msgid "" "This control-C handler tries to avoid causing problems when the code being " "tested or the tests being run have defined a signal handler of their own, by " @@ -2127,7 +2127,7 @@ msgid "" "disabled." msgstr "" -#: ../../whatsnew/2.7.rst:1870 +#: ../../whatsnew/2.7.rst:1869 msgid "" ":option:`-f ` or :option:`!--failfast` makes test execution " "stop immediately when a test fails instead of continuing to execute further " @@ -2135,20 +2135,20 @@ msgid "" "`8074`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1875 +#: ../../whatsnew/2.7.rst:1874 msgid "" "The progress messages now show 'x' for expected failures and 'u' for " "unexpected successes when run in verbose mode. (Contributed by Benjamin " "Peterson.)" msgstr "" -#: ../../whatsnew/2.7.rst:1879 +#: ../../whatsnew/2.7.rst:1878 msgid "" "Test cases can raise the :exc:`~unittest.SkipTest` exception to skip a test " "(:issue:`1034053`)." msgstr "" -#: ../../whatsnew/2.7.rst:1882 +#: ../../whatsnew/2.7.rst:1881 msgid "" "The error messages for :meth:`~unittest.TestCase.assertEqual`, :meth:" "`~unittest.TestCase.assertTrue`, and :meth:`~unittest.TestCase.assertFalse` " @@ -2159,18 +2159,18 @@ msgid "" "`5663`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1889 +#: ../../whatsnew/2.7.rst:1888 msgid "" "The :meth:`~unittest.TestCase.assertRaises` method now returns a context " "handler when called without providing a callable object to run. For " "example, you can write this::" msgstr "" -#: ../../whatsnew/2.7.rst:1896 +#: ../../whatsnew/2.7.rst:1895 msgid "(Implemented by Antoine Pitrou; :issue:`4444`.)" msgstr "(由 Antoine Pitrou 實作;:issue:`4444`。)" -#: ../../whatsnew/2.7.rst:1900 +#: ../../whatsnew/2.7.rst:1899 msgid "" "Module- and class-level setup and teardown fixtures are now supported. " "Modules can contain :func:`~unittest.setUpModule` and :func:`~unittest." @@ -2181,7 +2181,7 @@ msgid "" "case in a different module or class." msgstr "" -#: ../../whatsnew/2.7.rst:1908 +#: ../../whatsnew/2.7.rst:1907 msgid "" "The methods :meth:`~unittest.TestCase.addCleanup` and :meth:`~unittest." "TestCase.doCleanups` were added. :meth:`~unittest.TestCase.addCleanup` lets " @@ -2191,7 +2191,7 @@ msgid "" "simpler resource allocation and deallocation during tests (:issue:`5679`)." msgstr "" -#: ../../whatsnew/2.7.rst:1916 +#: ../../whatsnew/2.7.rst:1915 msgid "" "A number of new methods were added that provide more specialized tests. " "Many of these methods were written by Google engineers for use in their test " @@ -2199,21 +2199,21 @@ msgid "" "Python's version of :mod:`unittest`." msgstr "" -#: ../../whatsnew/2.7.rst:1921 +#: ../../whatsnew/2.7.rst:1920 msgid "" ":meth:`~unittest.TestCase.assertIsNone` and :meth:`~unittest.TestCase." "assertIsNotNone` take one expression and verify that the result is or is not " "``None``." msgstr "" -#: ../../whatsnew/2.7.rst:1924 +#: ../../whatsnew/2.7.rst:1923 msgid "" ":meth:`~unittest.TestCase.assertIs` and :meth:`~unittest.TestCase." "assertIsNot` take two values and check whether the two values evaluate to " "the same object or not. (Added by Michael Foord; :issue:`2578`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1928 +#: ../../whatsnew/2.7.rst:1927 msgid "" ":meth:`~unittest.TestCase.assertIsInstance` and :meth:`~unittest.TestCase." "assertNotIsInstance` check whether the resulting object is an instance of a " @@ -2221,14 +2221,14 @@ msgid "" "issue:`7031`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1933 +#: ../../whatsnew/2.7.rst:1932 msgid "" ":meth:`~unittest.TestCase.assertGreater`, :meth:`~unittest.TestCase." "assertGreaterEqual`, :meth:`~unittest.TestCase.assertLess`, and :meth:" "`~unittest.TestCase.assertLessEqual` compare two quantities." msgstr "" -#: ../../whatsnew/2.7.rst:1937 +#: ../../whatsnew/2.7.rst:1936 msgid "" ":meth:`~unittest.TestCase.assertMultiLineEqual` compares two strings, and if " "they're not equal, displays a helpful comparison that highlights the " @@ -2236,7 +2236,7 @@ msgid "" "Unicode strings are compared with :meth:`~unittest.TestCase.assertEqual`." msgstr "" -#: ../../whatsnew/2.7.rst:1942 +#: ../../whatsnew/2.7.rst:1941 msgid "" ":meth:`assertRegexpMatches() ` and :meth:" "`assertNotRegexpMatches() ` checks whether " @@ -2244,7 +2244,7 @@ msgid "" "expression provided as the second argument (:issue:`8038`)." msgstr "" -#: ../../whatsnew/2.7.rst:1947 +#: ../../whatsnew/2.7.rst:1946 msgid "" ":meth:`assertRaisesRegexp() ` checks " "whether a particular exception is raised, and then also checks that the " @@ -2252,25 +2252,25 @@ msgid "" "expression." msgstr "" -#: ../../whatsnew/2.7.rst:1952 +#: ../../whatsnew/2.7.rst:1951 msgid "" ":meth:`~unittest.TestCase.assertIn` and :meth:`~unittest.TestCase." "assertNotIn` tests whether *first* is or is not in *second*." msgstr "" -#: ../../whatsnew/2.7.rst:1955 +#: ../../whatsnew/2.7.rst:1954 msgid "" ":meth:`assertItemsEqual() ` tests " "whether two provided sequences contain the same elements." msgstr "" -#: ../../whatsnew/2.7.rst:1958 +#: ../../whatsnew/2.7.rst:1957 msgid "" ":meth:`~unittest.TestCase.assertSetEqual` compares whether two sets are " "equal, and only reports the differences between the sets in case of error." msgstr "" -#: ../../whatsnew/2.7.rst:1961 +#: ../../whatsnew/2.7.rst:1960 msgid "" "Similarly, :meth:`~unittest.TestCase.assertListEqual` and :meth:`~unittest." "TestCase.assertTupleEqual` compare the specified types and explain any " @@ -2281,7 +2281,7 @@ msgid "" "both sequences are of a particular type." msgstr "" -#: ../../whatsnew/2.7.rst:1969 +#: ../../whatsnew/2.7.rst:1968 msgid "" ":meth:`~unittest.TestCase.assertDictEqual` compares two dictionaries and " "reports the differences; it's now used by default when you compare two " @@ -2290,7 +2290,7 @@ msgid "" "*first* are found in *second*." msgstr "" -#: ../../whatsnew/2.7.rst:1974 +#: ../../whatsnew/2.7.rst:1973 msgid "" ":meth:`~unittest.TestCase.assertAlmostEqual` and :meth:`~unittest.TestCase." "assertNotAlmostEqual` test whether *first* and *second* are approximately " @@ -2299,14 +2299,14 @@ msgid "" "require the difference to be smaller than a supplied *delta* value." msgstr "" -#: ../../whatsnew/2.7.rst:1980 +#: ../../whatsnew/2.7.rst:1979 msgid "" ":meth:`~unittest.TestLoader.loadTestsFromName` properly honors the :attr:" "`~unittest.TestLoader.suiteClass` attribute of the :class:`~unittest." "TestLoader`. (Fixed by Mark Roddy; :issue:`6866`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1984 +#: ../../whatsnew/2.7.rst:1983 msgid "" "A new hook lets you extend the :meth:`~unittest.TestCase.assertEqual` method " "to handle new data types. The :meth:`~unittest.TestCase." @@ -2318,7 +2318,7 @@ msgid "" "sequence comparison methods do." msgstr "" -#: ../../whatsnew/2.7.rst:1993 +#: ../../whatsnew/2.7.rst:1992 msgid "" ":func:`unittest.main` now takes an optional ``exit`` argument. If false, :" "func:`~unittest.main` doesn't call :func:`sys.exit`, allowing :func:" @@ -2326,7 +2326,7 @@ msgid "" "by J. Pablo Fernández; :issue:`3379`.)" msgstr "" -#: ../../whatsnew/2.7.rst:1998 +#: ../../whatsnew/2.7.rst:1997 msgid "" ":class:`~unittest.TestResult` has new :meth:`~unittest.TestResult." "startTestRun` and :meth:`~unittest.TestResult.stopTestRun` methods that are " @@ -2334,7 +2334,7 @@ msgid "" "Collins; :issue:`5728`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2002 +#: ../../whatsnew/2.7.rst:2001 msgid "" "With all these changes, the :file:`unittest.py` was becoming awkwardly " "large, so the module was turned into a package and the code split into " @@ -2342,7 +2342,7 @@ msgid "" "imported or used." msgstr "" -#: ../../whatsnew/2.7.rst:2010 +#: ../../whatsnew/2.7.rst:2008 msgid "" "https://web.archive.org/web/20210619163128/http://www.voidspace.org.uk/" "python/articles/unittest2.shtml" @@ -2350,37 +2350,37 @@ msgstr "" "https://web.archive.org/web/20210619163128/http://www.voidspace.org.uk/" "python/articles/unittest2.shtml" -#: ../../whatsnew/2.7.rst:2010 +#: ../../whatsnew/2.7.rst:2009 msgid "" "Describes the new features, how to use them, and the rationale for various " "design decisions. (By Michael Foord.)" msgstr "" -#: ../../whatsnew/2.7.rst:2016 +#: ../../whatsnew/2.7.rst:2015 msgid "Updated module: ElementTree 1.3" msgstr "" -#: ../../whatsnew/2.7.rst:2018 +#: ../../whatsnew/2.7.rst:2017 msgid "" "The version of the ElementTree library included with Python was updated to " "version 1.3. Some of the new features are:" msgstr "" -#: ../../whatsnew/2.7.rst:2021 +#: ../../whatsnew/2.7.rst:2020 msgid "" "The various parsing functions now take a *parser* keyword argument giving " "an :class:`~xml.etree.ElementTree.XMLParser` instance that will be used. " "This makes it possible to override the file's internal encoding::" msgstr "" -#: ../../whatsnew/2.7.rst:2028 +#: ../../whatsnew/2.7.rst:2027 msgid "" "Errors in parsing XML now raise a :exc:`~xml.etree.ElementTree.ParseError` " "exception, whose instances have a :attr:`!position` attribute containing a " "(*line*, *column*) tuple giving the location of the problem." msgstr "" -#: ../../whatsnew/2.7.rst:2032 +#: ../../whatsnew/2.7.rst:2031 msgid "" "ElementTree's code for converting trees to a string has been significantly " "reworked, making it roughly twice as fast in many cases. The :meth:" @@ -2395,7 +2395,7 @@ msgid "" "element." msgstr "" -#: ../../whatsnew/2.7.rst:2045 +#: ../../whatsnew/2.7.rst:2044 msgid "" "Namespace handling has also been improved. All ``xmlns:`` " "declarations are now output on the root element, not scattered throughout " @@ -2405,7 +2405,7 @@ msgid "" "the true/false *xml_declaration* parameter to suppress the XML declaration." msgstr "" -#: ../../whatsnew/2.7.rst:2053 +#: ../../whatsnew/2.7.rst:2052 msgid "" "New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." "ElementTree.Element.extend` appends the items from a sequence to the " @@ -2413,7 +2413,7 @@ msgid "" "to move children from one element to another::" msgstr "" -#: ../../whatsnew/2.7.rst:2070 +#: ../../whatsnew/2.7.rst:2069 msgid "" "New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." "ElementTree.Element.iter` yields the children of the element as a " @@ -2423,14 +2423,14 @@ msgid "" "of children." msgstr "" -#: ../../whatsnew/2.7.rst:2077 +#: ../../whatsnew/2.7.rst:2076 msgid "" "New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." "ElementTree.Element.itertext` yields all chunks of text that are descendants " "of the element. For example::" msgstr "" -#: ../../whatsnew/2.7.rst:2088 +#: ../../whatsnew/2.7.rst:2087 msgid "" "Deprecated: using an element as a Boolean (i.e., ``if elem:``) would return " "true if the element had any children, or false if there were no children. " @@ -2440,7 +2440,7 @@ msgid "" "number of children, or ``elem is not None``." msgstr "" -#: ../../whatsnew/2.7.rst:2096 +#: ../../whatsnew/2.7.rst:2095 msgid "" "Fredrik Lundh develops ElementTree and produced the 1.3 version; you can " "read his article describing 1.3 at https://web.archive.org/" @@ -2449,15 +2449,15 @@ msgid "" "python-dev and in :issue:`6472`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2106 +#: ../../whatsnew/2.7.rst:2105 msgid "Build and C API Changes" msgstr "" -#: ../../whatsnew/2.7.rst:2108 +#: ../../whatsnew/2.7.rst:2107 msgid "Changes to Python's build process and to the C API include:" msgstr "" -#: ../../whatsnew/2.7.rst:2110 +#: ../../whatsnew/2.7.rst:2109 msgid "" "The latest release of the GNU Debugger, GDB 7, can be `scripted using Python " "`_; discussed in :issue:`5753`, and fixed by " -"Antoine Pitrou." +"Security issue reported as :cve:`2008-5983`; discussed in :issue:`5753`, and " +"fixed by Antoine Pitrou." msgstr "" -#: ../../whatsnew/2.7.rst:2185 +#: ../../whatsnew/2.7.rst:2183 msgid "" "New macros: the Python header files now define the following macros: :c:" "macro:`Py_ISALNUM`, :c:macro:`Py_ISALPHA`, :c:macro:`Py_ISDIGIT`, :c:macro:" @@ -2576,7 +2575,7 @@ msgid "" "Eric Smith; :issue:`5793`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2203 +#: ../../whatsnew/2.7.rst:2201 msgid "" "Removed function: :c:func:`!PyEval_CallObject` is now only available as a " "macro. A function version was being kept around to preserve ABI linking " @@ -2584,7 +2583,7 @@ msgid "" "(Removed by Antoine Pitrou; :issue:`8276`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2208 +#: ../../whatsnew/2.7.rst:2206 msgid "" "New format codes: the :c:func:`!PyString_FromFormat`, :c:func:`!" "PyString_FromFormatV`, and :c:func:`PyErr_Format` functions now accept " @@ -2592,7 +2591,7 @@ msgid "" "types. (Contributed by Mark Dickinson; :issue:`7228`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2214 +#: ../../whatsnew/2.7.rst:2212 msgid "" "The complicated interaction between threads and process forking has been " "changed. Previously, the child process created by :func:`os.fork` might " @@ -2604,7 +2603,7 @@ msgid "" "replicated, and the child process would no longer be able to perform imports." msgstr "" -#: ../../whatsnew/2.7.rst:2224 +#: ../../whatsnew/2.7.rst:2222 msgid "" "Python 2.7 acquires the import lock before performing an :func:`os.fork`, " "and will also clean up any locks created using the :mod:`threading` module. " @@ -2612,31 +2611,31 @@ msgid "" "themselves, will not benefit from this clean-up." msgstr "" -#: ../../whatsnew/2.7.rst:2230 +#: ../../whatsnew/2.7.rst:2228 msgid "(Fixed by Thomas Wouters; :issue:`1590864`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2232 +#: ../../whatsnew/2.7.rst:2230 msgid "" "The :c:func:`Py_Finalize` function now calls the internal :func:`!threading." "_shutdown` function; this prevents some exceptions from being raised when an " "interpreter shuts down. (Patch by Adam Olsen; :issue:`1722344`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2237 +#: ../../whatsnew/2.7.rst:2235 msgid "" "When using the :c:type:`PyMemberDef` structure to define attributes of a " "type, Python will no longer let you try to delete or set a :c:macro:" "`T_STRING_INPLACE` attribute." msgstr "" -#: ../../whatsnew/2.7.rst:2243 +#: ../../whatsnew/2.7.rst:2241 msgid "" "Global symbols defined by the :mod:`ctypes` module are now prefixed with " "``Py``, or with ``_ctypes``. (Implemented by Thomas Heller; :issue:`3102`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2247 +#: ../../whatsnew/2.7.rst:2245 msgid "" "New configure option: the :option:`!--with-system-expat` switch allows " "building the :mod:`pyexpat ` module to use the system " @@ -2644,7 +2643,7 @@ msgid "" "`7609`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2251 +#: ../../whatsnew/2.7.rst:2249 msgid "" "New configure option: the :option:`!--with-valgrind` option will now disable " "the pymalloc allocator, which is difficult for the Valgrind memory-error " @@ -2653,14 +2652,14 @@ msgid "" "issue:`2422`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2258 +#: ../../whatsnew/2.7.rst:2256 msgid "" "New configure option: you can now supply an empty string to :option:`!--with-" "dbmliborder=` in order to disable all of the various DBM modules. (Added by " "Arfrever Frehtes Taifersar Arahesis; :issue:`6491`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2263 +#: ../../whatsnew/2.7.rst:2261 msgid "" "The :program:`configure` script now checks for floating-point rounding bugs " "on certain 32-bit Intel chips and defines a :c:macro:`X87_DOUBLE_ROUNDING` " @@ -2669,30 +2668,30 @@ msgid "" "`2937`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2269 +#: ../../whatsnew/2.7.rst:2267 msgid "" ":program:`configure` also now sets a :envvar:`LDCXXSHARED` Makefile variable " "for supporting C++ linking. (Contributed by Arfrever Frehtes Taifersar " "Arahesis; :issue:`1222585`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2273 +#: ../../whatsnew/2.7.rst:2271 msgid "" "The build process now creates the necessary files for pkg-config support. " "(Contributed by Clinton Roy; :issue:`3585`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2276 +#: ../../whatsnew/2.7.rst:2274 msgid "" "The build process now supports Subversion 1.7. (Contributed by Arfrever " "Frehtes Taifersar Arahesis; :issue:`6094`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2283 +#: ../../whatsnew/2.7.rst:2281 msgid "Capsules" msgstr "" -#: ../../whatsnew/2.7.rst:2285 +#: ../../whatsnew/2.7.rst:2283 msgid "" "Python 3.1 adds a new C datatype, :c:type:`PyCapsule`, for providing a C API " "to an extension module. A capsule is essentially the holder of a C ``void " @@ -2704,7 +2703,7 @@ msgid "" "module's various API functions." msgstr "" -#: ../../whatsnew/2.7.rst:2294 +#: ../../whatsnew/2.7.rst:2292 msgid "" "There is an existing data type already used for this, :c:type:`!PyCObject`, " "but it doesn't provide type safety. Evil code written in pure Python could " @@ -2714,7 +2713,7 @@ msgid "" "name:" msgstr "" -#: ../../whatsnew/2.7.rst:2312 +#: ../../whatsnew/2.7.rst:2310 msgid "" "You are assured that ``vtable`` points to whatever you're expecting. If a " "different capsule was passed in, :c:func:`PyCapsule_IsValid` would detect " @@ -2722,7 +2721,7 @@ msgid "" "more information on using these objects." msgstr "" -#: ../../whatsnew/2.7.rst:2317 +#: ../../whatsnew/2.7.rst:2315 msgid "" "Python 2.7 now uses capsules internally to provide various extension-module " "APIs, but the :c:func:`!PyCObject_AsVoidPtr` was modified to handle " @@ -2731,17 +2730,17 @@ msgid "" "exc:`PendingDeprecationWarning`, which is silent by default." msgstr "" -#: ../../whatsnew/2.7.rst:2324 +#: ../../whatsnew/2.7.rst:2322 msgid "" "Implemented in Python 3.1 and backported to 2.7 by Larry Hastings; discussed " "in :issue:`5630`." msgstr "" -#: ../../whatsnew/2.7.rst:2331 +#: ../../whatsnew/2.7.rst:2329 msgid "Port-Specific Changes: Windows" msgstr "" -#: ../../whatsnew/2.7.rst:2333 +#: ../../whatsnew/2.7.rst:2331 msgid "" "The :mod:`msvcrt` module now contains some constants from the :file:" "`crtassem.h` header file: :data:`~msvcrt.CRT_ASSEMBLY_VERSION`, :data:" @@ -2750,7 +2749,7 @@ msgid "" "`4365`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2340 +#: ../../whatsnew/2.7.rst:2338 msgid "" "The :mod:`_winreg ` module for accessing the registry now implements " "the :func:`~winreg.CreateKeyEx` and :func:`~winreg.DeleteKeyEx` functions, " @@ -2760,14 +2759,14 @@ msgid "" "tested and documented. (Implemented by Brian Curtin: :issue:`7347`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2348 +#: ../../whatsnew/2.7.rst:2346 msgid "" "The new :c:func:`!_beginthreadex` API is used to start threads, and the " "native thread-local storage functions are now used. (Contributed by Kristján " "Valur Jónsson; :issue:`3582`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2352 +#: ../../whatsnew/2.7.rst:2350 msgid "" "The :func:`os.kill` function now works on Windows. The signal value can be " "the constants :const:`~signal.CTRL_C_EVENT`, :const:`~signal." @@ -2777,23 +2776,23 @@ msgid "" "Miki Tebeka; :issue:`1220212`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2359 +#: ../../whatsnew/2.7.rst:2357 msgid "" "The :func:`os.listdir` function now correctly fails for an empty path. " "(Fixed by Hirokazu Yamamoto; :issue:`5913`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2362 +#: ../../whatsnew/2.7.rst:2360 msgid "" "The :mod:`mimetypes` module will now read the MIME database from the Windows " "registry when initializing. (Patch by Gabriel Genellina; :issue:`4969`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2369 +#: ../../whatsnew/2.7.rst:2367 msgid "Port-Specific Changes: Mac OS X" msgstr "" -#: ../../whatsnew/2.7.rst:2371 +#: ../../whatsnew/2.7.rst:2369 msgid "" "The path ``/Library/Python/2.7/site-packages`` is now appended to ``sys." "path``, in order to share added packages between the system installation and " @@ -2801,7 +2800,7 @@ msgid "" "issue:`4865`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2378 +#: ../../whatsnew/2.7.rst:2376 msgid "" "As of 2.7.13, this change was removed. ``/Library/Python/2.7/site-" "packages``, the site-packages directory used by the Apple-supplied system " @@ -2813,11 +2812,11 @@ msgid "" "Pythons. (:issue:`28440`)" msgstr "" -#: ../../whatsnew/2.7.rst:2389 +#: ../../whatsnew/2.7.rst:2387 msgid "Port-Specific Changes: FreeBSD" msgstr "" -#: ../../whatsnew/2.7.rst:2391 +#: ../../whatsnew/2.7.rst:2389 msgid "" "FreeBSD 7.1's :const:`!SO_SETFIB` constant, used with the :func:`~socket." "socket` methods :func:`~socket.socket.getsockopt`/:func:`~socket.socket." @@ -2825,11 +2824,11 @@ msgid "" "mod:`socket` module. (Added by Kyle VanderBeek; :issue:`8235`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2397 +#: ../../whatsnew/2.7.rst:2395 msgid "Other Changes and Fixes" msgstr "" -#: ../../whatsnew/2.7.rst:2399 +#: ../../whatsnew/2.7.rst:2397 msgid "" "Two benchmark scripts, :file:`iobench` and :file:`ccbench`, were added to " "the :file:`Tools` directory. :file:`iobench` measures the speed of the " @@ -2839,13 +2838,13 @@ msgid "" "bandwidth when performing several tasks using a varying number of threads." msgstr "" -#: ../../whatsnew/2.7.rst:2407 +#: ../../whatsnew/2.7.rst:2405 msgid "" "The :file:`Tools/i18n/msgfmt.py` script now understands plural forms in :" "file:`.po` files. (Fixed by Martin von Löwis; :issue:`5464`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2411 +#: ../../whatsnew/2.7.rst:2409 msgid "" "When importing a module from a :file:`.pyc` or :file:`.pyo` file with an " "existing :file:`.py` counterpart, the :attr:`~codeobject.co_filename` " @@ -2855,7 +2854,7 @@ msgid "" "Paul Calderone; :issue:`1180193`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2418 +#: ../../whatsnew/2.7.rst:2416 msgid "" "The :file:`regrtest.py` script now takes a :option:`!--randseed=` switch " "that takes an integer that will be used as the random seed for the :option:" @@ -2863,7 +2862,7 @@ msgid "" "also reports the seed that was used (Added by Collin Winter.)" msgstr "" -#: ../../whatsnew/2.7.rst:2424 +#: ../../whatsnew/2.7.rst:2422 msgid "" "Another :file:`regrtest.py` switch is :option:`!-j`, which takes an integer " "specifying how many tests run in parallel. This allows reducing the total " @@ -2874,31 +2873,31 @@ msgid "" "they fail. (Added by Antoine Pitrou; :issue:`7312`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2433 +#: ../../whatsnew/2.7.rst:2431 msgid "" "When executed as a script, the :file:`py_compile.py` module now accepts " "``'-'`` as an argument, which will read standard input for the list of " "filenames to be compiled. (Contributed by Piotr Ożarowski; :issue:`8233`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2441 +#: ../../whatsnew/2.7.rst:2439 msgid "Porting to Python 2.7" msgstr "" -#: ../../whatsnew/2.7.rst:2443 +#: ../../whatsnew/2.7.rst:2441 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code:" msgstr "" -#: ../../whatsnew/2.7.rst:2446 +#: ../../whatsnew/2.7.rst:2444 msgid "" "The :func:`range` function processes its arguments more consistently; it " "will now call :meth:`~object.__int__` on non-float, non-integer arguments " "that are supplied to it. (Fixed by Alexander Belopolsky; :issue:`1533`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2451 +#: ../../whatsnew/2.7.rst:2449 msgid "" "The string :meth:`format` method changed the default precision used for " "floating-point and complex numbers from 6 decimal places to 12, which " @@ -2906,7 +2905,7 @@ msgid "" "`5920`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2456 +#: ../../whatsnew/2.7.rst:2454 msgid "" "Because of an optimization for the :keyword:`with` statement, the special " "methods :meth:`~object.__enter__` and :meth:`~object.__exit__` must belong " @@ -2915,7 +2914,7 @@ msgid "" "C extension types. (:issue:`6101`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2462 +#: ../../whatsnew/2.7.rst:2460 msgid "" "Due to a bug in Python 2.6, the *exc_value* parameter to :meth:`~object." "__exit__` methods was often the string representation of the exception, not " @@ -2923,11 +2922,11 @@ msgid "" "expected. (Fixed by Florent Xicluna; :issue:`7853`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2472 +#: ../../whatsnew/2.7.rst:2470 msgid "In the standard library:" msgstr "" -#: ../../whatsnew/2.7.rst:2474 +#: ../../whatsnew/2.7.rst:2472 msgid "" "Operations with :class:`~datetime.datetime` instances that resulted in a " "year falling outside the supported range didn't always raise :exc:" @@ -2936,7 +2935,7 @@ msgid "" "Alexander Belopolsky; :issue:`7150`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2480 +#: ../../whatsnew/2.7.rst:2478 msgid "" "When using :class:`~decimal.Decimal` instances with a string's :meth:" "`format` method, the default alignment was previously left-alignment. This " @@ -2944,7 +2943,7 @@ msgid "" "programs. (Changed by Mark Dickinson; :issue:`6857`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2492 +#: ../../whatsnew/2.7.rst:2490 msgid "" "The :mod:`xml.etree.ElementTree` library no longer escapes ampersands and " "angle brackets when outputting an XML processing instruction (which looks " @@ -2952,36 +2951,36 @@ msgid "" "````). (Patch by Neil Muller; :issue:`2746`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2498 +#: ../../whatsnew/2.7.rst:2496 msgid "" "The :meth:`!readline` method of :class:`~io.StringIO` objects now does " "nothing when a negative length is requested, as other file-like objects do. " "(:issue:`7348`)." msgstr "" -#: ../../whatsnew/2.7.rst:2541 +#: ../../whatsnew/2.7.rst:2539 msgid "For C extensions:" msgstr "" -#: ../../whatsnew/2.7.rst:2543 +#: ../../whatsnew/2.7.rst:2541 msgid "" "C extensions that use integer format codes with the ``PyArg_Parse*`` family " "of functions will now raise a :exc:`TypeError` exception instead of " "triggering a :exc:`DeprecationWarning` (:issue:`5080`)." msgstr "" -#: ../../whatsnew/2.7.rst:2547 +#: ../../whatsnew/2.7.rst:2545 msgid "" "Use the new :c:func:`PyOS_string_to_double` function instead of the old :c:" "func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions, which " "are now deprecated." msgstr "" -#: ../../whatsnew/2.7.rst:2551 +#: ../../whatsnew/2.7.rst:2549 msgid "For applications that embed Python:" msgstr "" -#: ../../whatsnew/2.7.rst:2553 +#: ../../whatsnew/2.7.rst:2551 msgid "" "The :c:func:`PySys_SetArgvEx` function was added, letting applications close " "a security hole when the existing :c:func:`PySys_SetArgv` function was " @@ -2990,11 +2989,11 @@ msgid "" "with *updatepath* set to false." msgstr "" -#: ../../whatsnew/2.7.rst:2566 +#: ../../whatsnew/2.7.rst:2564 msgid "New Features Added to Python 2.7 Maintenance Releases" msgstr "" -#: ../../whatsnew/2.7.rst:2568 +#: ../../whatsnew/2.7.rst:2566 msgid "" "New features may be added to Python 2.7 maintenance releases when the " "situation genuinely calls for it. Any such additions must go through the " @@ -3003,25 +3002,25 @@ msgid "" "Python 3, or else by publishing it on the Python Package Index." msgstr "" -#: ../../whatsnew/2.7.rst:2574 +#: ../../whatsnew/2.7.rst:2572 msgid "" "In addition to the specific proposals listed below, there is a general " "exemption allowing new ``-3`` warnings to be added in any Python 2.7 " "maintenance release." msgstr "" -#: ../../whatsnew/2.7.rst:2580 +#: ../../whatsnew/2.7.rst:2578 msgid "Two new environment variables for debug mode" msgstr "" -#: ../../whatsnew/2.7.rst:2582 +#: ../../whatsnew/2.7.rst:2580 msgid "" "In debug mode, the ``[xxx refs]`` statistic is not written by default, the :" "envvar:`!PYTHONSHOWREFCOUNT` environment variable now must also be set. " "(Contributed by Victor Stinner; :issue:`31733`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2586 +#: ../../whatsnew/2.7.rst:2584 msgid "" "When Python is compiled with ``COUNT_ALLOC`` defined, allocation counts are " "no longer dumped by default anymore: the :envvar:`!PYTHONSHOWALLOCCOUNT` " @@ -3030,11 +3029,11 @@ msgid "" "issue:`31692`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2595 +#: ../../whatsnew/2.7.rst:2593 msgid "PEP 434: IDLE Enhancement Exception for All Branches" msgstr "" -#: ../../whatsnew/2.7.rst:2597 +#: ../../whatsnew/2.7.rst:2595 msgid "" ":pep:`434` describes a general exemption for changes made to the IDLE " "development environment shipped along with Python. This exemption makes it " @@ -3042,62 +3041,63 @@ msgid "" "experience across all supported versions of Python 2 and 3." msgstr "" -#: ../../whatsnew/2.7.rst:2602 +#: ../../whatsnew/2.7.rst:2600 msgid "" "For details of any IDLE changes, refer to the NEWS file for the specific " "release." msgstr "" -#: ../../whatsnew/2.7.rst:2607 +#: ../../whatsnew/2.7.rst:2605 msgid "PEP 466: Network Security Enhancements for Python 2.7" msgstr "" -#: ../../whatsnew/2.7.rst:2609 +#: ../../whatsnew/2.7.rst:2607 msgid "" ":pep:`466` describes a number of network security enhancement proposals that " "have been approved for inclusion in Python 2.7 maintenance releases, with " "the first of those changes appearing in the Python 2.7.7 release." msgstr "" -#: ../../whatsnew/2.7.rst:2613 +#: ../../whatsnew/2.7.rst:2611 msgid ":pep:`466` related features added in Python 2.7.7:" msgstr "" -#: ../../whatsnew/2.7.rst:2615 +#: ../../whatsnew/2.7.rst:2613 msgid "" ":func:`hmac.compare_digest` was backported from Python 3 to make a timing " "attack resistant comparison operation available to Python 2 applications. " "(Contributed by Alex Gaynor; :issue:`21306`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2619 +#: ../../whatsnew/2.7.rst:2617 msgid "" "OpenSSL 1.0.1g was upgraded in the official Windows installers published on " "python.org. (Contributed by Zachary Ware; :issue:`21462`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2622 +#: ../../whatsnew/2.7.rst:2620 msgid ":pep:`466` related features added in Python 2.7.8:" msgstr "" -#: ../../whatsnew/2.7.rst:2624 +#: ../../whatsnew/2.7.rst:2622 msgid "" ":func:`hashlib.pbkdf2_hmac` was backported from Python 3 to make a hashing " "algorithm suitable for secure password storage broadly available to Python 2 " "applications. (Contributed by Alex Gaynor; :issue:`21304`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2628 +#: ../../whatsnew/2.7.rst:2626 msgid "" "OpenSSL 1.0.1h was upgraded for the official Windows installers published on " -"python.org. (contributed by Zachary Ware in :issue:`21671` for CVE-2014-0224)" +"python.org. (Contributed by Zachary Ware in :issue:`21671` for :cve:" +"`2014-0224`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2631 +#: ../../whatsnew/2.7.rst:2629 msgid ":pep:`466` related features added in Python 2.7.9:" msgstr "" -#: ../../whatsnew/2.7.rst:2633 +#: ../../whatsnew/2.7.rst:2631 msgid "" "Most of Python 3.4's :mod:`ssl` module was backported. This means :mod:`ssl` " "now supports Server Name Indication, TLS1.x settings, access to the platform " @@ -3105,20 +3105,20 @@ msgid "" "(Contributed by Alex Gaynor and David Reid; :issue:`21308`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2638 +#: ../../whatsnew/2.7.rst:2636 msgid "" "Refer to the \"Version added: 2.7.9\" notes in the module documentation for " "specific details." msgstr "" -#: ../../whatsnew/2.7.rst:2641 +#: ../../whatsnew/2.7.rst:2639 msgid "" ":func:`os.urandom` was changed to cache a file descriptor to ``/dev/" "urandom`` instead of reopening ``/dev/urandom`` on every call. (Contributed " "by Alex Gaynor; :issue:`21305`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2645 +#: ../../whatsnew/2.7.rst:2643 msgid "" ":data:`hashlib.algorithms_guaranteed` and :data:`hashlib." "algorithms_available` were backported from Python 3 to make it easier for " @@ -3126,22 +3126,22 @@ msgid "" "(Contributed by Alex Gaynor in :issue:`21307`)" msgstr "" -#: ../../whatsnew/2.7.rst:2652 +#: ../../whatsnew/2.7.rst:2650 msgid "PEP 477: Backport ensurepip (PEP 453) to Python 2.7" msgstr "" -#: ../../whatsnew/2.7.rst:2654 +#: ../../whatsnew/2.7.rst:2652 msgid "" ":pep:`477` approves the inclusion of the :pep:`453` ensurepip module and the " "improved documentation that was enabled by it in the Python 2.7 maintenance " "releases, appearing first in the Python 2.7.9 release." msgstr "" -#: ../../whatsnew/2.7.rst:2660 +#: ../../whatsnew/2.7.rst:2658 msgid "Bootstrapping pip By Default" msgstr "" -#: ../../whatsnew/2.7.rst:2662 +#: ../../whatsnew/2.7.rst:2660 msgid "" "The new :mod:`ensurepip` module (defined in :pep:`453`) provides a standard " "cross-platform mechanism to bootstrap the pip installer into Python " @@ -3151,14 +3151,14 @@ msgid "" "the release candidate." msgstr "" -#: ../../whatsnew/2.7.rst:2669 +#: ../../whatsnew/2.7.rst:2667 msgid "" "By default, the commands ``pip``, ``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." msgstr "" -#: ../../whatsnew/2.7.rst:2673 +#: ../../whatsnew/2.7.rst:2671 msgid "" "For CPython :ref:`source builds on POSIX systems `, " "the ``make install`` and ``make altinstall`` commands do not bootstrap " @@ -3166,7 +3166,7 @@ msgid "" "options, and overridden through Makefile options." msgstr "" -#: ../../whatsnew/2.7.rst:2678 +#: ../../whatsnew/2.7.rst:2676 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 " @@ -3176,7 +3176,7 @@ msgid "" "Windows as ``py -m pip``." msgstr "" -#: ../../whatsnew/2.7.rst:2685 +#: ../../whatsnew/2.7.rst:2683 msgid "" "As `discussed in the PEP`__, platform packagers may choose not to install " "these commands by default, as long as, when invoked, they provide clear and " @@ -3184,11 +3184,11 @@ msgid "" "system package manager)." msgstr "" -#: ../../whatsnew/2.7.rst:2694 +#: ../../whatsnew/2.7.rst:2692 msgid "Documentation Changes" msgstr "" -#: ../../whatsnew/2.7.rst:2696 +#: ../../whatsnew/2.7.rst:2694 msgid "" "As part of this change, the :ref:`installing-index` and :ref:`distributing-" "index` sections of the documentation have been completely redesigned as " @@ -3198,29 +3198,29 @@ msgid "" "of the individual projects." msgstr "" -#: ../../whatsnew/2.7.rst:2704 +#: ../../whatsnew/2.7.rst:2702 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/2.7.rst:2711 +#: ../../whatsnew/2.7.rst:2708 msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations" msgstr "" -#: ../../whatsnew/2.7.rst:2711 +#: ../../whatsnew/2.7.rst:2709 msgid "" "PEP written by Donald Stufft and Nick Coghlan, implemented by Donald Stufft, " "Nick Coghlan, Martin von Löwis and Ned Deily." msgstr "" -#: ../../whatsnew/2.7.rst:2715 +#: ../../whatsnew/2.7.rst:2713 msgid "" "PEP 476: Enabling certificate verification by default for stdlib http clients" msgstr "" -#: ../../whatsnew/2.7.rst:2717 +#: ../../whatsnew/2.7.rst:2715 msgid "" ":pep:`476` updated :mod:`httplib ` and modules which use it, such as :" "mod:`urllib2 ` and :mod:`xmlrpclib `, to now " @@ -3230,17 +3230,17 @@ msgid "" "for many applications. This change was made in the Python 2.7.9 release." msgstr "" -#: ../../whatsnew/2.7.rst:2725 +#: ../../whatsnew/2.7.rst:2723 msgid "" "For applications which require the old previous behavior, they can pass an " "alternate context::" msgstr "" -#: ../../whatsnew/2.7.rst:2742 +#: ../../whatsnew/2.7.rst:2740 msgid "PEP 493: HTTPS verification migration tools for Python 2.7" msgstr "" -#: ../../whatsnew/2.7.rst:2744 +#: ../../whatsnew/2.7.rst:2742 msgid "" ":pep:`493` provides additional migration tools to support a more incremental " "infrastructure upgrade process for environments containing applications and " @@ -3249,14 +3249,14 @@ msgid "" "were made in the Python 2.7.12 release." msgstr "" -#: ../../whatsnew/2.7.rst:2750 +#: ../../whatsnew/2.7.rst:2748 msgid "" "These tools are intended for use in cases where affected applications and " "services can't be modified to explicitly pass a more permissive SSL context " "when establishing the connection." msgstr "" -#: ../../whatsnew/2.7.rst:2754 +#: ../../whatsnew/2.7.rst:2752 msgid "" "For applications and services which can't be modified at all, the new " "``PYTHONHTTPSVERIFY`` environment variable may be set to ``0`` to revert an " @@ -3264,18 +3264,18 @@ msgid "" "2.7.8 and earlier." msgstr "" -#: ../../whatsnew/2.7.rst:2759 +#: ../../whatsnew/2.7.rst:2757 msgid "" "For cases where the connection establishment code can't be modified, but the " "overall application can be, the new :func:`!ssl._https_verify_certificates` " "function can be used to adjust the default behaviour at runtime." msgstr "" -#: ../../whatsnew/2.7.rst:2765 +#: ../../whatsnew/2.7.rst:2763 msgid "New ``make regen-all`` build target" msgstr "" -#: ../../whatsnew/2.7.rst:2767 +#: ../../whatsnew/2.7.rst:2765 msgid "" "To simplify cross-compilation, and to ensure that CPython can reliably be " "compiled without requiring an existing version of Python to already be " @@ -3283,43 +3283,43 @@ msgid "" "recompile generated files based on file modification times." msgstr "" -#: ../../whatsnew/2.7.rst:2772 +#: ../../whatsnew/2.7.rst:2770 msgid "" "Instead, a new ``make regen-all`` command has been added to force " "regeneration of these files when desired (e.g. after an initial version of " "Python has already been built based on the pregenerated versions)." msgstr "" -#: ../../whatsnew/2.7.rst:2776 +#: ../../whatsnew/2.7.rst:2774 msgid "" "More selective regeneration targets are also defined - see :source:`Makefile." "pre.in` for details." msgstr "" -#: ../../whatsnew/2.7.rst:2779 ../../whatsnew/2.7.rst:2792 +#: ../../whatsnew/2.7.rst:2777 ../../whatsnew/2.7.rst:2790 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" msgstr "(由 Victor Stinner 於 :issue:`23404` 中貢獻。)" -#: ../../whatsnew/2.7.rst:2785 +#: ../../whatsnew/2.7.rst:2783 msgid "Removal of ``make touch`` build target" msgstr "" -#: ../../whatsnew/2.7.rst:2787 +#: ../../whatsnew/2.7.rst:2785 msgid "" "The ``make touch`` build target previously used to request implicit " "regeneration of generated files by updating their modification times has " "been removed." msgstr "" -#: ../../whatsnew/2.7.rst:2790 +#: ../../whatsnew/2.7.rst:2788 msgid "It has been replaced by the new ``make regen-all`` target." msgstr "" -#: ../../whatsnew/2.7.rst:2801 +#: ../../whatsnew/2.7.rst:2799 msgid "Acknowledgements" msgstr "致謝" -#: ../../whatsnew/2.7.rst:2803 +#: ../../whatsnew/2.7.rst:2801 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " diff --git a/whatsnew/3.1.po b/whatsnew/3.1.po index 7e1aafa225..29563e015f 100644 --- a/whatsnew/3.1.po +++ b/whatsnew/3.1.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-18 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -38,7 +38,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:54 msgid "PEP 372: Ordered Dictionaries" -msgstr "" +msgstr ":pep:`372`:有序字典" #: ../../whatsnew/3.1.rst:56 msgid "" @@ -71,9 +71,9 @@ msgid "" "`_." msgstr "" -#: ../../whatsnew/3.1.rst:80 +#: ../../whatsnew/3.1.rst:79 msgid ":pep:`372` - Ordered Dictionaries" -msgstr "" +msgstr ":pep:`372` - 有序字典" #: ../../whatsnew/3.1.rst:80 msgid "" @@ -120,7 +120,7 @@ msgid "" "thousands separators." msgstr "" -#: ../../whatsnew/3.1.rst:134 +#: ../../whatsnew/3.1.rst:133 msgid ":pep:`378` - Format Specifier for Thousands Separator" msgstr "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index c10335ee70..c490662263 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2023-06-26 03:02+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3969,19 +3969,18 @@ msgid "" "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " "now raises a :exc:`ValueError` if the number of digits in string form is " "above a limit to avoid potential denial of service attacks due to the " -"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " -"configured or disabled by environment variable, command line flag, or :mod:" -"`sys` APIs. See the :ref:`integer string conversion length limitation " -"` documentation. The default limit is 4300 digits in " -"string form." +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." msgstr "" -#: ../../whatsnew/3.10.rst:2342 +#: ../../whatsnew/3.10.rst:2341 msgid "Notable security feature in 3.10.8" msgstr "" -#: ../../whatsnew/3.10.rst:2344 +#: ../../whatsnew/3.10.rst:2343 msgid "" "The deprecated :mod:`!mailcap` module now refuses to inject unsafe text " "(filenames, MIME types, parameters) into shell commands. Instead of using " @@ -3990,15 +3989,15 @@ msgid "" "`98966`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2351 +#: ../../whatsnew/3.10.rst:2350 msgid "Notable changes in 3.10.12" msgstr "" -#: ../../whatsnew/3.10.rst:2354 +#: ../../whatsnew/3.10.rst:2353 msgid "tarfile" -msgstr "" +msgstr "tarfile" -#: ../../whatsnew/3.10.rst:2356 +#: ../../whatsnew/3.10.rst:2355 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 95edded7fb..7f9101fa43 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-29 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2023-05-28 18:21+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -148,7 +148,7 @@ msgid "" "pep670>`" msgstr ":pep:`670`:\\ :ref:`轉換為靜態行內函式的巨集 `" -#: ../../whatsnew/3.11.rst:108 ../../whatsnew/3.11.rst:2197 +#: ../../whatsnew/3.11.rst:108 ../../whatsnew/3.11.rst:2196 msgid "New Features" msgstr "新增特性" @@ -747,27 +747,25 @@ msgid "" "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " "now raises a :exc:`ValueError` if the number of digits in string form is " "above a limit to avoid potential denial of service attacks due to the " -"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " -"configured or disabled by environment variable, command line flag, or :mod:" -"`sys` APIs. See the :ref:`integer string conversion length limitation " -"` documentation. The default limit is 4300 digits in " -"string form." +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." msgstr "" "在除 2(binary、二進制)、4、8(octal、八進制)、16(hexadecimal、十六進制)" "或 32 以外的基數中,例如以 10(decimal、十進制)為基數,進行 :class:`int` " "和 :class:`str` 之間的轉換且字串形式的位數超過限制,現在會引發 :exc:" "`ValueError`,以避免由於演算法複雜性而導致的潛在阻斷服務攻擊 (denial of " -"service attacks)。這是針對 `CVE-2020-10735 `_ 的緩解措施,可以透過環境變數、命令列旗標" -"或 :mod:`sys` API 來設定或禁用此限制。請參閱\\ :ref:`整數字串轉換長度限制 " -"` 文件。預設限制為字串形式的 4300 位數字。" +"service attacks)。這是針對 :cve:`2020-10735` 的緩解措施,可以透過環境變數、命" +"令列旗標或 :mod:`sys` API 來設定或禁用此限制。請參閱\\ :ref:`整數字串轉換長度" +"限制 ` 文件。預設限制為字串形式的 4300 位數字。" -#: ../../whatsnew/3.11.rst:558 +#: ../../whatsnew/3.11.rst:557 msgid "New Modules" msgstr "新增模組" -#: ../../whatsnew/3.11.rst:560 +#: ../../whatsnew/3.11.rst:559 msgid "" ":mod:`tomllib`: For parsing `TOML `_. See :pep:`680` for " "more details. (Contributed by Taneli Hukkinen in :issue:`40059`.)" @@ -775,7 +773,7 @@ msgstr "" ":mod:`tomllib`:用於剖析 `TOML `_。詳情請見 :pep:`680`。" "(由 Taneli Hukkinen 於 :issue:`40059` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:564 +#: ../../whatsnew/3.11.rst:563 msgid "" ":mod:`wsgiref.types`: :pep:`WSGI <3333>`-specific types for static type " "checking. (Contributed by Sebastian Rittau in :issue:`42012`.)" @@ -783,15 +781,15 @@ msgstr "" ":mod:`wsgiref.types`:\\ :pep:`WSGI <3333>` 限定型別,用於靜態型別檢查。" "(Sebastian Rittau 於 :issue:`42012` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:572 +#: ../../whatsnew/3.11.rst:571 msgid "Improved Modules" msgstr "改進的模組" -#: ../../whatsnew/3.11.rst:577 +#: ../../whatsnew/3.11.rst:576 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.11.rst:579 +#: ../../whatsnew/3.11.rst:578 msgid "" "Added the :class:`~asyncio.TaskGroup` class, an :ref:`asynchronous context " "manager ` holding a group of tasks that will wait " @@ -805,7 +803,7 @@ msgstr "" "和 :func:`~asyncio.gather`。(由 Yury Selivanov 和其他人在 :gh:`90908` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:586 +#: ../../whatsnew/3.11.rst:585 msgid "" "Added :func:`~asyncio.timeout`, an asynchronous context manager for setting " "a timeout on asynchronous operations. For new code this is recommended over " @@ -816,7 +814,7 @@ msgstr "" "管理器,新的程式建議直接使用它以取代 :func:`~asyncio.wait_for`。(由 Andrew " "Svetlov 於 :gh:`90927` 貢獻。)" -#: ../../whatsnew/3.11.rst:591 +#: ../../whatsnew/3.11.rst:590 msgid "" "Added the :class:`~asyncio.Runner` class, which exposes the machinery used " "by :func:`~asyncio.run`. (Contributed by Andrew Svetlov in :gh:`91218`.)" @@ -824,7 +822,7 @@ msgstr "" "新增 :class:`~asyncio.Runner` 類別,它會對外公布了 :func:`~asyncio.run` 的使" "用機制。(由 Andrew Svetlov 於 :gh:`91218` 貢獻。)" -#: ../../whatsnew/3.11.rst:595 +#: ../../whatsnew/3.11.rst:594 msgid "" "Added the :class:`~asyncio.Barrier` class to the synchronization primitives " "in the asyncio library, and the related :exc:`~asyncio.BrokenBarrierError` " @@ -834,7 +832,7 @@ msgstr "" "相關的 :exc:`~asyncio.BrokenBarrierError` 例外。(由 Yves Duprat 和 Andrew " "Svetlov in :gh:`87518` 貢獻。)" -#: ../../whatsnew/3.11.rst:600 +#: ../../whatsnew/3.11.rst:599 msgid "" "Added keyword argument *all_errors* to :meth:`asyncio.loop." "create_connection` so that multiple connection errors can be raised as an :" @@ -843,7 +841,7 @@ msgstr "" "在 :meth:`asyncio.loop.create_connection` 新增關鍵字引數 *all_errors*,這樣多" "個連接錯誤就可以一起用一個 :exc:`ExceptionGroup` 來引發。" -#: ../../whatsnew/3.11.rst:603 +#: ../../whatsnew/3.11.rst:602 msgid "" "Added the :meth:`asyncio.StreamWriter.start_tls` method for upgrading " "existing stream-based connections to TLS. (Contributed by Ian Good in :issue:" @@ -852,7 +850,7 @@ msgstr "" "新增 :meth:`asyncio.StreamWriter.start_tls` 方法,用來將已存在的串流連線升級" "至 TLS。(由 Ian Good 於 :issue:`34975` 中貢獻。)" -#: ../../whatsnew/3.11.rst:607 +#: ../../whatsnew/3.11.rst:606 msgid "" "Added raw datagram socket functions to the event loop: :meth:`~asyncio.loop." "sock_sendto`, :meth:`~asyncio.loop.sock_recvfrom` and :meth:`~asyncio.loop." @@ -866,7 +864,7 @@ msgstr "" "`~asyncio.ProactorEventLoop` 中都有實作。(由 Alex Grönholm 在 :issue:" "`46805` 中貢獻。)" -#: ../../whatsnew/3.11.rst:615 +#: ../../whatsnew/3.11.rst:614 msgid "" "Added :meth:`~asyncio.Task.cancelling` and :meth:`~asyncio.Task.uncancel` " "methods to :class:`~asyncio.Task`. These are primarily intended for internal " @@ -876,11 +874,11 @@ msgstr "" "`~asyncio.Task.uncancel` 方法。這些預期是只用於內部,尤其是 :class:`~asyncio." "TaskGroup`。" -#: ../../whatsnew/3.11.rst:624 +#: ../../whatsnew/3.11.rst:623 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.11.rst:626 +#: ../../whatsnew/3.11.rst:625 msgid "" "Added non parallel-safe :func:`~contextlib.chdir` context manager to change " "the current working directory and then restore it on exit. Simple wrapper " @@ -890,11 +888,11 @@ msgstr "" "後在退出時恢復它。:func:`~os.chdir` 的簡單包裝器。(由 Filipe Laíns 在 :" "issue:`25625` 中貢獻)" -#: ../../whatsnew/3.11.rst:634 +#: ../../whatsnew/3.11.rst:633 msgid "dataclasses" msgstr "dataclasses" -#: ../../whatsnew/3.11.rst:636 +#: ../../whatsnew/3.11.rst:635 msgid "" "Change field default mutability check, allowing only defaults which are :" "term:`hashable` instead of any object which is not an instance of :class:" @@ -905,11 +903,11 @@ msgstr "" "而不是任何非 :class:`dict`、:class:`list` 或 :class:`set` 實例的物件。(由 " "Eric V. Smith 在 :issue:`44674` 中貢獻。)" -#: ../../whatsnew/3.11.rst:645 +#: ../../whatsnew/3.11.rst:644 msgid "datetime" msgstr "datetime" -#: ../../whatsnew/3.11.rst:647 +#: ../../whatsnew/3.11.rst:646 msgid "" "Add :const:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." "utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" @@ -917,7 +915,7 @@ msgstr "" "新增 :const:`datetime.UTC`,一個 :attr:`datetime.timezone.utc` 的方便別名。" "(由 Kabir Kwatra 於 :gh:`91973` 所貢獻。)" -#: ../../whatsnew/3.11.rst:650 +#: ../../whatsnew/3.11.rst:649 msgid "" ":meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` " "and :meth:`datetime.datetime.fromisoformat` can now be used to parse most " @@ -929,11 +927,11 @@ msgstr "" "(除了那些支援分數形式的小時與分鐘)。(由 Paul Ganssle 於 :gh:`80010` 中所貢" "獻。)" -#: ../../whatsnew/3.11.rst:659 +#: ../../whatsnew/3.11.rst:658 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.11.rst:661 +#: ../../whatsnew/3.11.rst:660 msgid "" "Renamed :class:`!EnumMeta` to :class:`~enum.EnumType` (:class:`!EnumMeta` " "kept as an alias)." @@ -941,13 +939,13 @@ msgstr "" ":class:`!EnumMeta` 更名為 :class:`~enum.EnumType`\\ (:class:`!EnumMeta` 保留" "為別名)。" -#: ../../whatsnew/3.11.rst:664 +#: ../../whatsnew/3.11.rst:663 msgid "" "Added :class:`~enum.StrEnum`, with members that can be used as (and must be) " "strings." msgstr "增加 :class:`~enum.StrEnum`,列舉 (enum) 內的成員必須是字串。" -#: ../../whatsnew/3.11.rst:667 +#: ../../whatsnew/3.11.rst:666 msgid "" "Added :class:`~enum.ReprEnum`, which only modifies the :meth:`~object." "__repr__` of members while returning their literal values (rather than " @@ -959,7 +957,7 @@ msgstr "" "`format` 和 :term:`f-string` 所使用的)\\ :meth:`~object.__str__` 和 :meth:" "`~object.__format__`。" -#: ../../whatsnew/3.11.rst:673 +#: ../../whatsnew/3.11.rst:672 msgid "" "Changed :meth:`Enum.__format__() ` (the default for :" "func:`format`, :meth:`str.format` and :term:`f-string`\\s) to always produce " @@ -973,7 +971,7 @@ msgstr "" "`~enum.ReprEnum` 的列舉,這會是成員之值;而其他的列舉會是列舉與成員名稱(例" "如 ``Color.RED``)。" -#: ../../whatsnew/3.11.rst:679 +#: ../../whatsnew/3.11.rst:678 msgid "" "Added a new *boundary* class parameter to :class:`~enum.Flag` enums and the :" "class:`~enum.FlagBoundary` enum with its options, to control how to handle " @@ -982,7 +980,7 @@ msgstr "" "新增 *boundary* 類別參數與其選項到 :class:`~enum.Flag` 列舉和 :class:`~enum." "FlagBoundary` 列舉以控制處理超出範圍旗標數值的方法。" -#: ../../whatsnew/3.11.rst:683 +#: ../../whatsnew/3.11.rst:682 msgid "" "Added the :func:`~enum.verify` enum decorator and the :class:`~enum." "EnumCheck` enum with its options, to check enum classes against several " @@ -991,7 +989,7 @@ msgstr "" "新增了 :func:`~enum.verify` 列舉裝飾器和 :class:`~enum.EnumCheck` 列舉及其選" "項,以根據幾個特定限制檢查列舉類別。" -#: ../../whatsnew/3.11.rst:687 +#: ../../whatsnew/3.11.rst:686 msgid "" "Added the :func:`~enum.member` and :func:`~enum.nonmember` decorators, to " "ensure the decorated object is/is not converted to an enum member." @@ -999,7 +997,7 @@ msgstr "" "新增 :func:`~enum.member` 與 :func:`~enum.nonmember` 裝飾器以確保被裝飾的物件" "會/不會被轉換成一個列舉成員。" -#: ../../whatsnew/3.11.rst:690 +#: ../../whatsnew/3.11.rst:689 msgid "" "Added the :func:`~enum.property` decorator, which works like :func:" "`property` except for enums. Use this instead of :func:`types." @@ -1008,7 +1006,7 @@ msgstr "" "新增 :func:`~enum.property` 裝飾器,它的作用類似 :func:`property` 但是是用於" "列舉,用以替代 :func:`types.DynamicClassAttribute`。" -#: ../../whatsnew/3.11.rst:694 +#: ../../whatsnew/3.11.rst:693 msgid "" "Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" "`~object.__repr__` and :meth:`~object.__str__` to show values as members of " @@ -1021,7 +1019,7 @@ msgstr "" "`re.RegexFlag` 的 :const:`~re.ASCII` 成員的 ``'re.ASCII'``,而非 " "``'RegexFlag.ASCII'``。" -#: ../../whatsnew/3.11.rst:700 +#: ../../whatsnew/3.11.rst:699 msgid "" "Enhanced :class:`~enum.Flag` to support :func:`len`, iteration and :keyword:" "`in`/:keyword:`not in` on its members. For example, the following now works: " @@ -1031,7 +1029,7 @@ msgstr "" "keyword:`in`/:keyword:`not in` 於其成員。例如,以下程式現在能夠作用了:" "``len(AFlag(3)) == 2 and list(AFlag(3)) == (AFlag.ONE, AFlag.TWO)``" -#: ../../whatsnew/3.11.rst:705 +#: ../../whatsnew/3.11.rst:704 msgid "" "Changed :class:`~enum.Enum` and :class:`~enum.Flag` so that members are now " "defined before :meth:`~object.__init_subclass__` is called; :func:`dir` now " @@ -1041,7 +1039,7 @@ msgstr "" "__init_subclass__` 之前就定義成員;:func:`dir` 現在包括來自混合資料型別的方" "法。" -#: ../../whatsnew/3.11.rst:710 +#: ../../whatsnew/3.11.rst:709 msgid "" "Changed :class:`~enum.Flag` to only consider primary values (power of two) " "canonical while composite values (``3``, ``6``, ``10``, etc.) are considered " @@ -1051,11 +1049,11 @@ msgstr "" "``6``、``10`` 等)被視為別名;倒置旗標 (inverted flags) 會被強制轉換為正等價" "的值。" -#: ../../whatsnew/3.11.rst:719 +#: ../../whatsnew/3.11.rst:718 msgid "fcntl" msgstr "fcntl" -#: ../../whatsnew/3.11.rst:721 +#: ../../whatsnew/3.11.rst:720 msgid "" "On FreeBSD, the :data:`!F_DUP2FD` and :data:`!F_DUP2FD_CLOEXEC` flags " "respectively are supported, the former equals to ``dup2`` usage while the " @@ -1064,11 +1062,11 @@ msgstr "" "FreeBSD 上,:data:`!F_DUP2FD` 和 :data:`!F_DUP2FD_CLOEXEC` 旗標分別有被支援," "前者等同於 ``dup2`` 用法,而後者設定了 ``FD_CLOEXEC`` 旗標。" -#: ../../whatsnew/3.11.rst:729 +#: ../../whatsnew/3.11.rst:728 msgid "fractions" msgstr "fractions" -#: ../../whatsnew/3.11.rst:731 +#: ../../whatsnew/3.11.rst:730 msgid "" "Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from " "string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)" @@ -1076,7 +1074,7 @@ msgstr "" "支援有 :PEP:`515` 風格的 :class:`~fractions.Fraction` 以字串初始化。(Sergey " "B Kirpichev 於 :issue:`44258` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:734 +#: ../../whatsnew/3.11.rst:733 msgid "" ":class:`~fractions.Fraction` now implements an ``__int__`` method, so that " "an ``isinstance(some_fraction, typing.SupportsInt)`` check passes. " @@ -1086,11 +1084,11 @@ msgstr "" "``isinstance(some_fraction, typing.SupportsInt)`` 的檢查會通過。(由 Mark " "Dickinson 在 :issue:`44547` 中貢獻。)" -#: ../../whatsnew/3.11.rst:742 +#: ../../whatsnew/3.11.rst:741 msgid "functools" msgstr "functools" -#: ../../whatsnew/3.11.rst:744 +#: ../../whatsnew/3.11.rst:743 msgid "" ":func:`functools.singledispatch` now supports :data:`types.UnionType` and :" "data:`typing.Union` as annotations to the dispatch argument.::" @@ -1098,15 +1096,15 @@ msgstr "" ":func:`functools.singledispatch` 現在支援 :data:`types.UnionType` 和 :data:" "`typing.Union` 作為調度 (dispatch) 引數的標註。 ::" -#: ../../whatsnew/3.11.rst:769 +#: ../../whatsnew/3.11.rst:768 msgid "(Contributed by Yurii Karabas in :issue:`46014`.)" msgstr "(由 Yurii Karabas 於 :issue:`46014` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:775 +#: ../../whatsnew/3.11.rst:774 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.11.rst:777 +#: ../../whatsnew/3.11.rst:776 msgid "" ":func:`hashlib.blake2b` and :func:`hashlib.blake2s` now prefer `libb2`_ over " "Python's vendored copy. (Contributed by Christian Heimes in :issue:`47095`.)" @@ -1115,7 +1113,7 @@ msgstr "" "於 Python 自發行版的複製。(由 Christian Heimes 於 :issue:`47095` 中所貢" "獻。)" -#: ../../whatsnew/3.11.rst:781 +#: ../../whatsnew/3.11.rst:780 msgid "" "The internal ``_sha3`` module with SHA3 and SHAKE algorithms now uses " "*tiny_sha3* instead of the *Keccak Code Package* to reduce code and binary " @@ -1128,7 +1126,7 @@ msgstr "" "來自 OpenSSL 的 SHA3 和 SHAKE 最佳化實作。此更改僅影響沒有 OpenSSL 支援的安" "裝。(由 Christian Heimes 在 :issue:`47098` 中貢獻。)" -#: ../../whatsnew/3.11.rst:788 +#: ../../whatsnew/3.11.rst:787 msgid "" "Add :func:`hashlib.file_digest`, a helper function for efficient hashing of " "files or file-like objects. (Contributed by Christian Heimes in :gh:`89313`.)" @@ -1136,11 +1134,11 @@ msgstr "" "新增 :func:`hashlib.file_digest`,是個能夠為檔案或類檔案物件做高效率雜湊的幫" "助函式。(由 Christian Heimes 於 :gh:`89313` 中貢獻。)" -#: ../../whatsnew/3.11.rst:796 +#: ../../whatsnew/3.11.rst:795 msgid "IDLE and idlelib" msgstr "IDLE 與 idlelib" -#: ../../whatsnew/3.11.rst:798 +#: ../../whatsnew/3.11.rst:797 msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" @@ -1148,7 +1146,7 @@ msgstr "" "在 ``.pyi`` 檔案施用語法突顯 (syntax highlight)。(由 Alex Waygood 與 Terry " "Jan Reedy 於 :issue:`45447` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:801 +#: ../../whatsnew/3.11.rst:800 msgid "" "Include prompts when saving Shell with inputs and outputs. (Contributed by " "Terry Jan Reedy in :gh:`95191`.)" @@ -1156,11 +1154,11 @@ msgstr "" "當帶有輸入與輸出地儲存 Shell 時,也會包含提示字元。(由 Terry Jan Reedy 於 :" "gh:`95191` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:808 +#: ../../whatsnew/3.11.rst:807 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.11.rst:810 +#: ../../whatsnew/3.11.rst:809 msgid "" "Add :func:`~inspect.getmembers_static` to return all members without " "triggering dynamic lookup via the descriptor protocol. (Contributed by " @@ -1170,7 +1168,7 @@ msgstr "" "(descriptor protocol) 觸發動態查找。 (由 Weipeng Hong 在 :issue:`30533` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:814 +#: ../../whatsnew/3.11.rst:813 msgid "" "Add :func:`~inspect.ismethodwrapper` for checking if the type of an object " "is a :class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :" @@ -1179,7 +1177,7 @@ msgstr "" "新增 :func:`inspect.ismethodwrapper`,用來檢查一個物件的型別是否為 :class:" "`~types.MethodWrapperType`。(由 Hakan Çelik 於 :issue:`29418` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:818 +#: ../../whatsnew/3.11.rst:817 msgid "" "Change the frame-related functions in the :mod:`inspect` module to return " "new :class:`~inspect.FrameInfo` and :class:`~inspect.Traceback` class " @@ -1192,35 +1190,35 @@ msgstr "" "`named tuple` 的介面),包括擴充的 :pep:`657` 位置資訊(結束行號、欄和結束" "欄)。受影響的功能是:" -#: ../../whatsnew/3.11.rst:824 +#: ../../whatsnew/3.11.rst:823 msgid ":func:`inspect.getframeinfo`" msgstr ":func:`inspect.getframeinfo`" -#: ../../whatsnew/3.11.rst:825 +#: ../../whatsnew/3.11.rst:824 msgid ":func:`inspect.getouterframes`" msgstr ":func:`inspect.getouterframes`" -#: ../../whatsnew/3.11.rst:826 +#: ../../whatsnew/3.11.rst:825 msgid ":func:`inspect.getinnerframes`," msgstr ":func:`inspect.getinnerframes`," -#: ../../whatsnew/3.11.rst:827 +#: ../../whatsnew/3.11.rst:826 msgid ":func:`inspect.stack`" msgstr ":func:`inspect.stack`" -#: ../../whatsnew/3.11.rst:828 +#: ../../whatsnew/3.11.rst:827 msgid ":func:`inspect.trace`" msgstr ":func:`inspect.trace`" -#: ../../whatsnew/3.11.rst:830 +#: ../../whatsnew/3.11.rst:829 msgid "(Contributed by Pablo Galindo in :gh:`88116`.)" msgstr "(由 Pablo Galindo 於 :gh:`88116` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:836 +#: ../../whatsnew/3.11.rst:835 msgid "locale" msgstr "locale" -#: ../../whatsnew/3.11.rst:838 +#: ../../whatsnew/3.11.rst:837 msgid "" "Add :func:`locale.getencoding` to get the current locale encoding. It is " "similar to ``locale.getpreferredencoding(False)`` but ignores the :ref:" @@ -1230,11 +1228,11 @@ msgstr "" "``locale.getpreferredencoding(False)`` 類似但不考慮 :ref:`Python UTF-8 模式 " "`。" -#: ../../whatsnew/3.11.rst:846 +#: ../../whatsnew/3.11.rst:845 msgid "logging" msgstr "logging" -#: ../../whatsnew/3.11.rst:848 +#: ../../whatsnew/3.11.rst:847 msgid "" "Added :func:`~logging.getLevelNamesMapping` to return a mapping from logging " "level names (e.g. ``'CRITICAL'``) to the values of their corresponding :ref:" @@ -1245,7 +1243,7 @@ msgstr "" "``'CRITICAL'``)指到對應的 :ref:`levels` 數值(例如,預設為 ``50``)的映射。" "(由 Andrei Kulakovin 於 :gh:`88024` 中貢獻。)" -#: ../../whatsnew/3.11.rst:853 +#: ../../whatsnew/3.11.rst:852 msgid "" "Added a :meth:`~logging.handlers.SysLogHandler.createSocket` method to :" "class:`~logging.handlers.SysLogHandler`, to match :meth:`SocketHandler." @@ -1259,11 +1257,11 @@ msgstr "" "用的 socket,它會在處理程式初始化期間和發出一個事件時自動呼叫。 (由 Kirill " "Pinchuk 在 :gh:`88457` 中貢獻。)" -#: ../../whatsnew/3.11.rst:865 +#: ../../whatsnew/3.11.rst:864 msgid "math" msgstr "math" -#: ../../whatsnew/3.11.rst:867 +#: ../../whatsnew/3.11.rst:866 msgid "" "Add :func:`math.exp2`: return 2 raised to the power of x. (Contributed by " "Gideon Mitchell in :issue:`45917`.)" @@ -1271,7 +1269,7 @@ msgstr "" "新增 :func:`math.exp2`:回傳 2 的 x 次方。(由 Gideon Mitchell 於 :issue:" "`45917` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:870 +#: ../../whatsnew/3.11.rst:869 msgid "" "Add :func:`math.cbrt`: return the cube root of x. (Contributed by Ajith " "Ramachandran in :issue:`44357`.)" @@ -1279,7 +1277,7 @@ msgstr "" "新增 :func:`math.cbrt`:回傳 x 的立方根。(由 Ajith Ramachandran 於 :issue:" "`44357` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:873 +#: ../../whatsnew/3.11.rst:872 msgid "" "The behaviour of two :func:`math.pow` corner cases was changed, for " "consistency with the IEEE 754 specification. The operations ``math.pow(0.0, -" @@ -1292,7 +1290,7 @@ msgstr "" "現在回傳 ``inf``,之前它們會引發 :exc:`ValueError`。(由 Mark Dickinson 在 :" "issue:`44339` 中貢獻。)" -#: ../../whatsnew/3.11.rst:879 +#: ../../whatsnew/3.11.rst:878 msgid "" "The :data:`math.nan` value is now always available. (Contributed by Victor " "Stinner in :issue:`46917`.)" @@ -1300,11 +1298,11 @@ msgstr "" ":data:`math.nan` 現為隨時可用。(由 Victor Stinner 於 :issue:`46917` 中所貢" "獻。)" -#: ../../whatsnew/3.11.rst:886 +#: ../../whatsnew/3.11.rst:885 msgid "operator" msgstr "operator" -#: ../../whatsnew/3.11.rst:888 +#: ../../whatsnew/3.11.rst:887 msgid "" "A new function ``operator.call`` has been added, such that ``operator." "call(obj, *args, **kwargs) == obj(*args, **kwargs)``. (Contributed by Antony " @@ -1313,11 +1311,11 @@ msgstr "" "新增 ``operator.call`` 函式,使得 ``operator.call(obj, *args, **kwargs) == " "obj(*args, **kwargs)``。(由 Antony Lee 於 :issue:`44019` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:896 +#: ../../whatsnew/3.11.rst:895 msgid "os" msgstr "os" -#: ../../whatsnew/3.11.rst:898 +#: ../../whatsnew/3.11.rst:897 msgid "" "On Windows, :func:`os.urandom` now uses ``BCryptGenRandom()``, instead of " "``CryptGenRandom()`` which is deprecated. (Contributed by Donghee Na in :" @@ -1326,11 +1324,11 @@ msgstr "" "在 Windows 上,:func:`os.urandom` 現在使用 ``BCryptGenRandom()`` 以取代被棄用" "的 ``CryptGenRandom()``。(由 Donghee Na 於 :issue:`44611` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:906 +#: ../../whatsnew/3.11.rst:905 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.11.rst:908 +#: ../../whatsnew/3.11.rst:907 msgid "" ":meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only " "directories if *pattern* ends with a pathname components separator: :data:" @@ -1341,11 +1339,11 @@ msgstr "" "結尾,:meth:`~pathlib.Path.glob` 和 :meth:`~pathlib.Path.rglob` 只回傳目錄。" "(由 Eisuke Kawasima 於 :issue:`22276` 與 :issue:`33392` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:917 +#: ../../whatsnew/3.11.rst:916 msgid "re" msgstr "re" -#: ../../whatsnew/3.11.rst:919 +#: ../../whatsnew/3.11.rst:918 msgid "" "Atomic grouping (``(?>...)``) and possessive quantifiers (``*+``, ``++``, ``?" "+``, ``{m,n}+``) are now supported in regular expressions. (Contributed by " @@ -1356,11 +1354,11 @@ msgstr "" "``{m,n}+``) 的。 (由 Jeffrey C. Jacobs 和 Serhiy Storchaka 在 :issue:" "`433030` 中貢獻。)" -#: ../../whatsnew/3.11.rst:927 +#: ../../whatsnew/3.11.rst:926 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.11.rst:929 +#: ../../whatsnew/3.11.rst:928 msgid "" "Add optional parameter *dir_fd* in :func:`shutil.rmtree`. (Contributed by " "Serhiy Storchaka in :issue:`46245`.)" @@ -1368,11 +1366,11 @@ msgstr "" "新增 :func:`shutil.rmtree` 的可選參數 *dir_fd*。(由 Serhiy Storchaka 於 :" "issue:`46245` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:936 +#: ../../whatsnew/3.11.rst:935 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.11.rst:938 +#: ../../whatsnew/3.11.rst:937 msgid "" "Add CAN Socket support for NetBSD. (Contributed by Thomas Klausner in :issue:" "`30512`.)" @@ -1380,7 +1378,7 @@ msgstr "" "新增 NetBSD 對於 CAN Socket 的支援。(由 Thomas Klausner 於 :issue:`30512` 中" "所貢獻。)" -#: ../../whatsnew/3.11.rst:941 +#: ../../whatsnew/3.11.rst:940 msgid "" ":meth:`~socket.create_connection` has an option to raise, in case of failure " "to connect, an :exc:`ExceptionGroup` containing all errors instead of only " @@ -1390,11 +1388,11 @@ msgstr "" "錯誤的 :exc:`ExceptionGroup`,而非只引發最後一個錯誤。(由 Irit Katriel 於 :" "issue:`29980` 中貢獻。)" -#: ../../whatsnew/3.11.rst:950 +#: ../../whatsnew/3.11.rst:949 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.11.rst:952 +#: ../../whatsnew/3.11.rst:951 msgid "" "You can now disable the authorizer by passing :const:`None` to :meth:" "`~sqlite3.Connection.set_authorizer`. (Contributed by Erlend E. Aasland in :" @@ -1404,7 +1402,7 @@ msgstr "" "set_authorizer` 來停用 authorizer。(由 Erlend E. Aasland 於 :issue:`44491` " "中貢獻。)" -#: ../../whatsnew/3.11.rst:956 +#: ../../whatsnew/3.11.rst:955 msgid "" "Collation name :meth:`~sqlite3.Connection.create_collation` can now contain " "any Unicode character. Collation names with invalid characters now raise :" @@ -1416,7 +1414,7 @@ msgstr "" "`UnicodeEncodeError` 而不是 :exc:`sqlite3.ProgrammingError`。(由 Erlend E. " "Aasland 在 :issue:`44688` 中貢獻。)" -#: ../../whatsnew/3.11.rst:961 +#: ../../whatsnew/3.11.rst:960 msgid "" ":mod:`sqlite3` exceptions now include the SQLite extended error code as :" "attr:`~sqlite3.Error.sqlite_errorcode` and the SQLite error name as :attr:" @@ -1428,7 +1426,7 @@ msgstr "" "sqlite_errorname`)。(由 Aviv Palivoda、Daniel Shahaf 和 Erlend E. Aasland " "在 :issue:`16379` 和 :issue:`24139` 中貢獻。)" -#: ../../whatsnew/3.11.rst:967 +#: ../../whatsnew/3.11.rst:966 msgid "" "Add :meth:`~sqlite3.Connection.setlimit` and :meth:`~sqlite3.Connection." "getlimit` to :class:`sqlite3.Connection` for setting and getting SQLite " @@ -1439,7 +1437,7 @@ msgstr "" "getlimit` 新增到 :class:`sqlite3.Connection` 以根據連線來設定和取得 SQLite 限" "制。(由 Erlend E. Aasland 在 :issue:`45243` 中貢獻。)" -#: ../../whatsnew/3.11.rst:972 +#: ../../whatsnew/3.11.rst:971 msgid "" ":mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default " "threading mode the underlying SQLite library has been compiled with. " @@ -1449,7 +1447,7 @@ msgstr "" "定 :attr:`sqlite3.threadsafety`。(由 Erlend E. Aasland 在 :issue:`45613` 中" "貢獻。)" -#: ../../whatsnew/3.11.rst:976 +#: ../../whatsnew/3.11.rst:975 msgid "" ":mod:`sqlite3` C callbacks now use unraisable exceptions if callback " "tracebacks are enabled. Users can now register an :func:`unraisable hook " @@ -1461,7 +1459,7 @@ msgstr "" "(unraisable hook handler) ` 來改善他們的除錯體驗。(由 " "Erlend E. Aasland 在 :issue:`45828` 中貢獻。)" -#: ../../whatsnew/3.11.rst:982 +#: ../../whatsnew/3.11.rst:981 msgid "" "Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`. " "Instead we leave it to the SQLite library to handle these cases. " @@ -1471,7 +1469,7 @@ msgstr "" "們將其留給 SQLite 函式庫來處理這些情況。(由 Erlend E. Aasland 在 :issue:" "`44092` 中貢獻。)" -#: ../../whatsnew/3.11.rst:986 +#: ../../whatsnew/3.11.rst:985 msgid "" "Add :meth:`~sqlite3.Connection.serialize` and :meth:`~sqlite3.Connection." "deserialize` to :class:`sqlite3.Connection` for serializing and " @@ -1482,7 +1480,7 @@ msgstr "" "deserialize` 新增到 :class:`sqlite3.Connection` 以用於序列化和反序列化資料" "庫。(由 Erlend E. Aasland 在 :issue:`41930` 中貢獻。)" -#: ../../whatsnew/3.11.rst:991 +#: ../../whatsnew/3.11.rst:990 msgid "" "Add :meth:`~sqlite3.Connection.create_window_function` to :class:`sqlite3." "Connection` for creating aggregate window functions. (Contributed by Erlend " @@ -1492,7 +1490,7 @@ msgstr "" "create_window_function` 已建立聚合視窗函式 (aggregate window function)。(由 " "Erlend E. Aasland 於 :issue:`34916` 中貢獻。)" -#: ../../whatsnew/3.11.rst:995 +#: ../../whatsnew/3.11.rst:994 msgid "" "Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`. :" "class:`sqlite3.Blob` allows incremental I/O operations on blobs. " @@ -1503,11 +1501,11 @@ msgstr "" "operations)。(由 Aviv Palivoda 和 Erlend E. Aasland 在 :issue:`24905` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:1003 +#: ../../whatsnew/3.11.rst:1002 msgid "string" msgstr "string" -#: ../../whatsnew/3.11.rst:1005 +#: ../../whatsnew/3.11.rst:1004 msgid "" "Add :meth:`~string.Template.get_identifiers` and :meth:`~string.Template." "is_valid` to :class:`string.Template`, which respectively return all valid " @@ -1519,11 +1517,11 @@ msgstr "" "(placeholder) 與是否有任何不合格的預留位置存在。(由 Ben Kehoe 於 :gh:" "`90465` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1015 +#: ../../whatsnew/3.11.rst:1014 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.11.rst:1017 +#: ../../whatsnew/3.11.rst:1016 msgid "" ":func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields from " "the ``value`` (the exception instance), so when an exception is modified " @@ -1535,7 +1533,7 @@ msgstr "" "``traceback`` 欄位,因此當例外在處理過程中被修改時,變更會反映在 :func:`!" "exc_info` 後續呼叫的結果中。 (由 Irit Katriel 在 :issue:`45711` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1023 +#: ../../whatsnew/3.11.rst:1022 msgid "" "Add :func:`sys.exception` which returns the active exception instance " "(equivalent to ``sys.exc_info()[1]``). (Contributed by Irit Katriel in :" @@ -1545,7 +1543,7 @@ msgstr "" "exception`\\ (等價於 ``sys.exc_info()[1]``\\ )。(由 Irit Katriel 於 :" "issue:`46328` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1027 +#: ../../whatsnew/3.11.rst:1026 msgid "" "Add the :data:`sys.flags.safe_path ` flag. (Contributed by Victor " "Stinner in :gh:`57684`.)" @@ -1553,11 +1551,11 @@ msgstr "" "新增 :data:`sys.flags.safe_path ` 旗標。(由 Victor Stinner 於 :" "gh:`57684` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1034 +#: ../../whatsnew/3.11.rst:1033 msgid "sysconfig" msgstr "sysconfig" -#: ../../whatsnew/3.11.rst:1036 +#: ../../whatsnew/3.11.rst:1035 msgid "" "Three new :ref:`installation schemes ` (*posix_venv*, " "*nt_venv* and *venv*) were added and are used when Python creates new " @@ -1578,11 +1576,11 @@ msgstr "" "的第三方程式碼應該使用新的 *venv* 安裝方案來確定路徑,就像 :mod:`venv` 一樣。" "(由 Miro Hrončok 在 :issue:`45413` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1053 +#: ../../whatsnew/3.11.rst:1052 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.11.rst:1055 +#: ../../whatsnew/3.11.rst:1054 msgid "" ":class:`~tempfile.SpooledTemporaryFile` objects now fully implement the " "methods of :class:`io.BufferedIOBase` or :class:`io.TextIOBase` (depending " @@ -1595,11 +1593,11 @@ msgstr "" "能夠正確地使用需要類檔案物件的 API,例如壓縮模組。(由 Carey Metcalfe 在 :gh:" "`70363` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1066 +#: ../../whatsnew/3.11.rst:1065 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.11.rst:1068 +#: ../../whatsnew/3.11.rst:1067 msgid "" "On Unix, if the ``sem_clockwait()`` function is available in the C library " "(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses " @@ -1614,11 +1612,11 @@ msgstr "" "const:`time.CLOCK_REALTIME`),以免受系統時鐘變化的影響。 由 Victor Stinner " "在 :issue:`41710` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1079 +#: ../../whatsnew/3.11.rst:1078 msgid "time" msgstr "time" -#: ../../whatsnew/3.11.rst:1081 +#: ../../whatsnew/3.11.rst:1080 msgid "" "On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or " "``nanosleep()`` function, if available, which has a resolution of 1 " @@ -1631,7 +1629,7 @@ msgstr "" "`-9` 秒),而不是使用解析度為 1 微秒(10\\ :sup:`-6` 秒)的 ``select()``。" "(由 Benjamin Szőke 和 Victor Stinner 在 :issue:`21302` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1087 +#: ../../whatsnew/3.11.rst:1086 msgid "" "On Windows 8.1 and newer, :func:`time.sleep` now uses a waitable timer based " "on `high-resolution timers `. " @@ -1806,7 +1804,7 @@ msgstr "" "`typing.get_type_hints` 現支援了為字串求值 (evaluate)。(由 Niklas " "Rosenstein 在 :gh:`85542` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1178 +#: ../../whatsnew/3.11.rst:1177 msgid "" ":func:`typing.get_type_hints` no longer adds :data:`~typing.Optional` to " "parameters with ``None`` as a default. (Contributed by Nikita Sobolev in :gh:" @@ -1815,7 +1813,7 @@ msgstr "" ":func:`typing.get_type_hints` 不再將 :data:`~typing.Optional` 新增到預設為 " "``None`` 的參數中。(由 Nikita Sobolev 在 :gh:`90353` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1182 +#: ../../whatsnew/3.11.rst:1181 msgid "" ":func:`typing.get_type_hints` now supports evaluating bare stringified :data:" "`~typing.ClassVar` annotations. (Contributed by Gregory Beauregard in :gh:" @@ -1825,7 +1823,7 @@ msgstr "" "的 :data:`~typing.ClassVar` 標註來求值。(由 Gregory Beauregard 在 :gh:" "`90711` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1186 +#: ../../whatsnew/3.11.rst:1185 msgid "" ":func:`typing.no_type_check` no longer modifies external classes and " "functions. It also now correctly marks classmethods as not to be type " @@ -1834,11 +1832,11 @@ msgstr "" ":func:`typing.no_type_check` 不再修改外部類別和函式。它現在也正確地將類別方法" "標記為不需進行型別檢查。(由 Nikita Sobolev 在 :gh:`90729` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1194 +#: ../../whatsnew/3.11.rst:1193 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.11.rst:1196 +#: ../../whatsnew/3.11.rst:1195 msgid "" "The Unicode database has been updated to version 14.0.0. (Contributed by " "Benjamin Peterson in :issue:`45190`)." @@ -1846,11 +1844,11 @@ msgstr "" "Unicode 資料庫被更新為 14.0.0 版本。(Benjamin Peterson 於 :issue:`45190` 中" "所貢獻。)" -#: ../../whatsnew/3.11.rst:1203 +#: ../../whatsnew/3.11.rst:1202 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.11.rst:1205 +#: ../../whatsnew/3.11.rst:1204 msgid "" "Added methods :meth:`~unittest.TestCase.enterContext` and :meth:`~unittest." "TestCase.enterClassContext` of class :class:`~unittest.TestCase`, method :" @@ -1864,11 +1862,11 @@ msgstr "" "IsolatedAsyncioTestCase.enterAsyncContext` 方法、:func:`unittest." "enterModuleContext` 函式。(由 Serhiy Storchaka 於 :issue:`45046` 貢獻。)" -#: ../../whatsnew/3.11.rst:1217 +#: ../../whatsnew/3.11.rst:1216 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.11.rst:1219 +#: ../../whatsnew/3.11.rst:1218 msgid "" "When new Python virtual environments are created, the *venv* :ref:`sysconfig " "installation scheme ` is used to determine the paths " @@ -1885,11 +1883,11 @@ msgstr "" "下更改預設的 sysconfig 安裝方案。建立新虛擬環境的第三方程式碼也應該這樣做。" "(由 Miro Hrončok 在 :issue:`45413` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1233 +#: ../../whatsnew/3.11.rst:1232 msgid "warnings" msgstr "warnings" -#: ../../whatsnew/3.11.rst:1235 +#: ../../whatsnew/3.11.rst:1234 msgid "" ":func:`warnings.catch_warnings` now accepts arguments for :func:`warnings." "simplefilter`, providing a more concise way to locally ignore warnings or " @@ -1900,11 +1898,11 @@ msgstr "" "數,提供了一種更簡潔的方法來在本地端忽略警告或將它們轉換為錯誤。 (由 Zac " "Hatfield-Dodds 在 :issue:`47074` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1243 +#: ../../whatsnew/3.11.rst:1242 msgid "zipfile" msgstr "zipfile" -#: ../../whatsnew/3.11.rst:1245 +#: ../../whatsnew/3.11.rst:1244 msgid "" "Added support for specifying member name encoding for reading metadata in a :" "class:`~zipfile.ZipFile`'s directory and file headers. (Contributed by " @@ -1914,7 +1912,7 @@ msgstr "" "標頭中讀取元資料 (metadata)。(由 Stephen J. Turnbull 和 Serhiy Storchaka " "在 :issue:`28080` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1249 +#: ../../whatsnew/3.11.rst:1248 msgid "" "Added :meth:`ZipFile.mkdir() ` for creating new " "directories inside ZIP archives. (Contributed by Sam Ezeh in :gh:`49083`.)" @@ -1922,7 +1920,7 @@ msgstr "" "新增 :meth:`ZipFile.mkdir() ` 以在 ZIP 歸檔中建立新的" "目錄。(由 Sam Ezeh 於 :gh:`49083` 貢獻。)" -#: ../../whatsnew/3.11.rst:1253 +#: ../../whatsnew/3.11.rst:1252 msgid "" "Added :attr:`~zipfile.Path.stem`, :attr:`~zipfile.Path.suffix` and :attr:" "`~zipfile.Path.suffixes` to :class:`zipfile.Path`. (Contributed by Miguel " @@ -1932,11 +1930,11 @@ msgstr "" "Path.suffix` 和 :attr:`~zipfile.Path.suffixes`。(由 Miguel Brito 於 :gh:" "`88261` 貢獻。)" -#: ../../whatsnew/3.11.rst:1261 +#: ../../whatsnew/3.11.rst:1260 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.11.rst:1263 +#: ../../whatsnew/3.11.rst:1262 msgid "" "This section covers specific optimizations independent of the :ref:" "`whatsnew311-faster-cpython` project, which is covered in its own section." @@ -1944,7 +1942,7 @@ msgstr "" "這個部分會涵蓋到特定的最佳化,但獨立於擁有自己一個說明的\\ :ref:`whatsnew311-" "faster-cpython` 計畫。" -#: ../../whatsnew/3.11.rst:1266 +#: ../../whatsnew/3.11.rst:1265 msgid "" "The compiler now optimizes simple :ref:`printf-style % formatting ` on string literals containing only the format codes " @@ -1956,7 +1954,7 @@ msgstr "" "` 最佳化並使其與相應的 :term:`f-string` 運算式一樣快。" "(由 Serhiy Storchaka 在 :issue:`28307` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1272 +#: ../../whatsnew/3.11.rst:1271 msgid "" "Integer division (``//``) is better tuned for optimization by compilers. It " "is now around 20% faster on x86-64 when dividing an :class:`int` by a value " @@ -1967,7 +1965,7 @@ msgstr "" "``2**30`` 的值時,在 x86-64 上快了大約 20%。(由 Gregory P. Smith 和 Tim " "Peters 在 :gh:`90564` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1277 +#: ../../whatsnew/3.11.rst:1276 msgid "" ":func:`sum` is now nearly 30% faster for integers smaller than ``2**30``. " "(Contributed by Stefan Behnel in :gh:`68264`.)" @@ -1975,7 +1973,7 @@ msgstr "" "針對小於 ``2**30`` 的整數,:func:`sum` 現在快了將近 30%。(由 Stefan Behnel " "於 :gh:`68264` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1280 +#: ../../whatsnew/3.11.rst:1279 msgid "" "Resizing lists is streamlined for the common case, speeding up :meth:`list." "append` by ≈15% and simple :term:`list comprehension`\\s by up to 20-30% " @@ -1985,7 +1983,7 @@ msgstr "" "為簡單的 :term:`list comprehension` 加快了高達 20-30%(由 Dennis Sweeney 在 :" "gh:`91165` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1285 +#: ../../whatsnew/3.11.rst:1284 msgid "" "Dictionaries don't store hash values when all keys are Unicode objects, " "decreasing :class:`dict` size. For example, ``sys.getsizeof(dict." @@ -1997,7 +1995,7 @@ msgstr "" "元組減少到 272 位元組(減少 23%)。(由 Inada Naoki 在 :issue:`46845` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:1291 +#: ../../whatsnew/3.11.rst:1290 msgid "" "Using :class:`asyncio.DatagramProtocol` is now orders of magnitude faster " "when transferring large files over UDP, with speeds over 100 times higher " @@ -2007,7 +2005,7 @@ msgstr "" "了幾個數量級,傳輸 ≈60 MiB 檔案的速度提高了 100 多倍。(由 msoxzw 在 :gh:" "`91487` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1296 +#: ../../whatsnew/3.11.rst:1295 msgid "" ":mod:`math` functions :func:`~math.comb` and :func:`~math.perm` are now ≈10 " "times faster for large arguments (with a larger speedup for larger *k*). " @@ -2017,7 +2015,7 @@ msgstr "" "了 ≈10 倍(對於更大的 *k* 有更大的加速)。(由 Serhiy Storchaka 在 :issue:" "`37295` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1300 +#: ../../whatsnew/3.11.rst:1299 msgid "" "The :mod:`statistics` functions :func:`~statistics.mean`, :func:`~statistics." "variance` and :func:`~statistics.stdev` now consume iterators in one pass " @@ -2030,7 +2028,7 @@ msgstr "" "們轉換為 :class:`list`,這讓速度提升為兩倍並可以節省大量記憶體空間。(由 " "Raymond Hettinger 在 :gh:`90415` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1306 +#: ../../whatsnew/3.11.rst:1305 msgid "" ":func:`unicodedata.normalize` now normalizes pure-ASCII strings in constant " "time. (Contributed by Donghee Na in :issue:`44987`.)" @@ -2038,11 +2036,11 @@ msgstr "" ":func:`unicodedata.normalize` 現在在常數時間內規範化 (normalize) 純 ASCII 字" "串。(由 Donghee Na 在 :issue:`44987` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1314 +#: ../../whatsnew/3.11.rst:1313 msgid "Faster CPython" msgstr "更快的 CPython" -#: ../../whatsnew/3.11.rst:1316 +#: ../../whatsnew/3.11.rst:1315 msgid "" "CPython 3.11 is an average of `25% faster `_ than CPython 3.10 as measured with the " @@ -2055,7 +2053,7 @@ msgstr "" "Python 3.10 `快了 25% `_。根據程式工作量可能有所不同,整體加速程度可達 10-60%。" -#: ../../whatsnew/3.11.rst:1323 +#: ../../whatsnew/3.11.rst:1322 msgid "" "This project focuses on two major areas in Python: :ref:`whatsnew311-faster-" "startup` and :ref:`whatsnew311-faster-runtime`. Optimizations not covered by " @@ -2065,15 +2063,15 @@ msgstr "" "`whatsnew311-faster-runtime`。不在此專案內的最佳化被獨立列出在 :ref:" "`whatsnew311-optimizations`。" -#: ../../whatsnew/3.11.rst:1332 +#: ../../whatsnew/3.11.rst:1331 msgid "Faster Startup" msgstr "更快的啟動" -#: ../../whatsnew/3.11.rst:1337 +#: ../../whatsnew/3.11.rst:1336 msgid "Frozen imports / Static code objects" msgstr "凍結引入 (Frozen imports) / 靜態程式碼物件 (Static code objects)" -#: ../../whatsnew/3.11.rst:1339 +#: ../../whatsnew/3.11.rst:1338 msgid "" "Python caches :term:`bytecode` in the :ref:`__pycache__ ` " "directory to speed up module loading." @@ -2081,11 +2079,11 @@ msgstr "" "Python 將\\ :term:`位元組碼 `\\ 於 :ref:`__pycache__` " "目錄中存為快取來加速模組的載入。" -#: ../../whatsnew/3.11.rst:1342 +#: ../../whatsnew/3.11.rst:1341 msgid "Previously in 3.10, Python module execution looked like this:" msgstr "在先前的 3.10 中,執行 Python 模組會像是這樣:" -#: ../../whatsnew/3.11.rst:1348 +#: ../../whatsnew/3.11.rst:1347 msgid "" "In Python 3.11, the core modules essential for Python startup are " "\"frozen\". This means that their :ref:`codeobjects` (and bytecode) are " @@ -2096,7 +2094,7 @@ msgstr "" "ref:`程式碼物件 `\\ (和位元組碼)是由直譯器靜態分配的。這將模組" "執行過程中的步驟減少為:" -#: ../../whatsnew/3.11.rst:1357 +#: ../../whatsnew/3.11.rst:1356 msgid "" "Interpreter startup is now 10-15% faster in Python 3.11. This has a big " "impact for short-running programs using Python." @@ -2104,21 +2102,21 @@ msgstr "" "在 Python 3.11 中直譯器啟動速度快了 10-15%。這對於使用 Python 所撰寫的短暫程" "式有著巨大影響。" -#: ../../whatsnew/3.11.rst:1360 +#: ../../whatsnew/3.11.rst:1359 msgid "" "(Contributed by Eric Snow, Guido van Rossum and Kumar Aditya in many issues.)" msgstr "" "(由 Eric Snow、Guido van Rossum 與 Kumar Aditya 於多個 issue 中貢獻。)" -#: ../../whatsnew/3.11.rst:1366 +#: ../../whatsnew/3.11.rst:1365 msgid "Faster Runtime" msgstr "更快的運行程式" -#: ../../whatsnew/3.11.rst:1371 +#: ../../whatsnew/3.11.rst:1370 msgid "Cheaper, lazy Python frames" msgstr "所需資源更少 (cheaper) 且惰性的 (lazy)) Python 幀 (frame)" -#: ../../whatsnew/3.11.rst:1373 +#: ../../whatsnew/3.11.rst:1372 msgid "" "Python frames, holding execution information, are created whenever Python " "calls a Python function. The following are new frame optimizations:" @@ -2126,16 +2124,16 @@ msgstr "" "每當 Python 呼叫 Python 函式時,就會建立保存執行資訊的 Python 幀。以下是針對" "幀而做的新最佳化:" -#: ../../whatsnew/3.11.rst:1377 +#: ../../whatsnew/3.11.rst:1376 msgid "Streamlined the frame creation process." msgstr "使幀的建立過程更有效率。" -#: ../../whatsnew/3.11.rst:1378 +#: ../../whatsnew/3.11.rst:1377 msgid "" "Avoided memory allocation by generously re-using frame space on the C stack." msgstr "在 C 堆疊 (stack) 中盡量重複利用幀的空間來避免記憶體分配。" -#: ../../whatsnew/3.11.rst:1379 +#: ../../whatsnew/3.11.rst:1378 msgid "" "Streamlined the internal frame struct to contain only essential information. " "Frames previously held extra debugging and memory management information." @@ -2143,7 +2141,7 @@ msgstr "" "讓內部幀結構只包含必要資訊,使其更加精簡。在過去,幀必須帶有額外的偵錯與記憶" "體管理的資訊。" -#: ../../whatsnew/3.11.rst:1382 +#: ../../whatsnew/3.11.rst:1381 msgid "" "Old-style :ref:`frame objects ` are now created only when " "requested by debuggers or by Python introspection functions such as :func:" @@ -2157,15 +2155,15 @@ msgstr "" "對於大多數使用者程式碼,根本不會建立任何幀物件。結果幾乎所有 Python 函式呼叫" "都顯著加速。我們以 pyperformance 測得了 3-7% 的加速。" -#: ../../whatsnew/3.11.rst:1389 +#: ../../whatsnew/3.11.rst:1388 msgid "(Contributed by Mark Shannon in :issue:`44590`.)" msgstr "(由 Mark Shannon 於 :issue:`44590` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1396 +#: ../../whatsnew/3.11.rst:1395 msgid "Inlined Python function calls" msgstr "行內 Python 函式呼叫" -#: ../../whatsnew/3.11.rst:1398 +#: ../../whatsnew/3.11.rst:1397 msgid "" "During a Python function call, Python will call an evaluating C function to " "interpret that function's code. This effectively limits pure Python " @@ -2174,7 +2172,7 @@ msgstr "" "在 Python 函式呼叫期間,Python 將呼叫一個正在求值的 C 函式來直譯該函式的程式" "碼,這有效地將純 Python 遞迴限制在對 C 堆疊的安全範圍內。" -#: ../../whatsnew/3.11.rst:1402 +#: ../../whatsnew/3.11.rst:1401 msgid "" "In 3.11, when CPython detects Python code calling another Python function, " "it sets up a new frame, and \"jumps\" to the new code inside the new frame. " @@ -2184,7 +2182,7 @@ msgstr "" "一個新框架 (frame),並「跳轉」到新框架內的新程式碼,這避免了呼叫整個 C 直譯函" "式。" -#: ../../whatsnew/3.11.rst:1406 +#: ../../whatsnew/3.11.rst:1405 msgid "" "Most Python function calls now consume no C stack space, speeding them up. " "In simple recursive functions like fibonacci or factorial, we observed a " @@ -2197,15 +2195,15 @@ msgstr "" "以遞迴得更深(如果使用者有增加\\ :func:`遞迴限制 `\\ )。我們在 pyperformance 測得 1-3% 的改進。" -#: ../../whatsnew/3.11.rst:1413 +#: ../../whatsnew/3.11.rst:1412 msgid "(Contributed by Pablo Galindo and Mark Shannon in :issue:`45256`.)" msgstr "(由 Pablo Galindo 與 Mark Shannon 於 :issue:`45256` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1419 +#: ../../whatsnew/3.11.rst:1418 msgid "PEP 659: Specializing Adaptive Interpreter" msgstr "PEP 659:特化的適應性直譯器" -#: ../../whatsnew/3.11.rst:1421 +#: ../../whatsnew/3.11.rst:1420 msgid "" ":pep:`659` is one of the key parts of the Faster CPython project. The " "general idea is that while Python is a dynamic language, most code has " @@ -2216,7 +2214,7 @@ msgstr "" "種動態語言,但大多數程式碼都有物件和型別很少去更改的區域。這個概念被稱為\\ *" "型別穩定 (type stability)*\\ 。" -#: ../../whatsnew/3.11.rst:1425 +#: ../../whatsnew/3.11.rst:1424 msgid "" "At runtime, Python will try to look for common patterns and type stability " "in the executing code. Python will then replace the current operation with a " @@ -2232,7 +2230,7 @@ msgstr "" "稱為\\ *行內快取 (inline caching)*\\ 的概念,其中 Python 將繁重操作的結果直接" "快取在\\ :term:`位元組碼 `\\ 中。" -#: ../../whatsnew/3.11.rst:1433 +#: ../../whatsnew/3.11.rst:1432 msgid "" "The specializer will also combine certain common instruction pairs into one " "superinstruction, reducing the overhead during execution." @@ -2240,7 +2238,7 @@ msgstr "" "特化程式 (specializer) 還將某些常用指示 (common instruction) 組合成一個超級指" "示 (superinstruction),這減少了執行期間的開銷。" -#: ../../whatsnew/3.11.rst:1436 +#: ../../whatsnew/3.11.rst:1435 msgid "" "Python will only specialize when it sees code that is \"hot\" (executed " "multiple times). This prevents Python from wasting time on run-once code. " @@ -2254,7 +2252,7 @@ msgstr "" "特化 (de-specialize)。特化會定期被嘗試執行,而嘗試的成本也不會太高,這讓特化" "得以適應新的環境。" -#: ../../whatsnew/3.11.rst:1443 +#: ../../whatsnew/3.11.rst:1442 msgid "" "(PEP written by Mark Shannon, with ideas inspired by Stefan Brunthaler. See :" "pep:`659` for more information. Implementation by Mark Shannon and Brandt " @@ -2264,43 +2262,43 @@ msgstr "" "`659`。由 Mark Shannon 和 Brandt Bucher 實作,Irit Katriel 和 Dennis Sweeney " "亦提供了額外的幫助。)" -#: ../../whatsnew/3.11.rst:1451 +#: ../../whatsnew/3.11.rst:1450 msgid "Operation" msgstr "操作" -#: ../../whatsnew/3.11.rst:1451 +#: ../../whatsnew/3.11.rst:1450 msgid "Form" msgstr "形式" -#: ../../whatsnew/3.11.rst:1451 +#: ../../whatsnew/3.11.rst:1450 msgid "Specialization" msgstr "特化" -#: ../../whatsnew/3.11.rst:1451 +#: ../../whatsnew/3.11.rst:1450 msgid "Operation speedup (up to)" msgstr "操作加速程度(上限)" -#: ../../whatsnew/3.11.rst:1451 +#: ../../whatsnew/3.11.rst:1450 msgid "Contributor(s)" msgstr "貢獻者" -#: ../../whatsnew/3.11.rst:1454 +#: ../../whatsnew/3.11.rst:1453 msgid "Binary operations" msgstr "二元操作" -#: ../../whatsnew/3.11.rst:1454 +#: ../../whatsnew/3.11.rst:1453 msgid "``x + x``" msgstr "``x + x``" -#: ../../whatsnew/3.11.rst:1456 +#: ../../whatsnew/3.11.rst:1455 msgid "``x - x``" msgstr "``x - x``" -#: ../../whatsnew/3.11.rst:1458 +#: ../../whatsnew/3.11.rst:1457 msgid "``x * x``" msgstr "``x * x``" -#: ../../whatsnew/3.11.rst:1454 +#: ../../whatsnew/3.11.rst:1453 msgid "" "Binary add, multiply and subtract for common types such as :class:`int`, :" "class:`float` and :class:`str` take custom fast paths for their underlying " @@ -2309,23 +2307,23 @@ msgstr "" "常見型別如 :class:`int`、:class:`float` 與 :class:`str` 的二元加法、乘法與減" "法,為底層型別採取了特製的快速路徑。" -#: ../../whatsnew/3.11.rst:1454 +#: ../../whatsnew/3.11.rst:1453 msgid "10%" msgstr "10%" -#: ../../whatsnew/3.11.rst:1454 +#: ../../whatsnew/3.11.rst:1453 msgid "Mark Shannon, Donghee Na, Brandt Bucher, Dennis Sweeney" msgstr "Mark Shannon, Donghee Na, Brandt Bucher, Dennis Sweeney" -#: ../../whatsnew/3.11.rst:1460 +#: ../../whatsnew/3.11.rst:1459 msgid "Subscript" msgstr "下標" -#: ../../whatsnew/3.11.rst:1460 +#: ../../whatsnew/3.11.rst:1459 msgid "``a[i]``" msgstr "``a[i]``" -#: ../../whatsnew/3.11.rst:1460 +#: ../../whatsnew/3.11.rst:1459 msgid "" "Subscripting container types such as :class:`list`, :class:`tuple` and :" "class:`dict` directly index the underlying data structures." @@ -2333,7 +2331,7 @@ msgstr "" "下標容器型別如 :class:`list`、:class:`tuple` 和 :class:`dict` 直接索引底層的" "資料結構。" -#: ../../whatsnew/3.11.rst:1464 +#: ../../whatsnew/3.11.rst:1463 msgid "" "Subscripting custom :meth:`~object.__getitem__` is also inlined similar to :" "ref:`inline-calls`." @@ -2341,43 +2339,43 @@ msgstr "" "下標自定義 :meth:`~object.__getitem__` 也是行內的,類似於 :ref:`inline-" "calls`。" -#: ../../whatsnew/3.11.rst:1460 ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1459 ../../whatsnew/3.11.rst:1466 msgid "10-25%" msgstr "10-25%" -#: ../../whatsnew/3.11.rst:1460 +#: ../../whatsnew/3.11.rst:1459 msgid "Irit Katriel, Mark Shannon" msgstr "Irit Katriel, Mark Shannon" -#: ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1466 msgid "Store subscript" msgstr "儲存下標" -#: ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1466 msgid "``a[i] = z``" msgstr "``a[i] = z``" -#: ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1466 msgid "Similar to subscripting specialization above." msgstr "類似於上面的下標特化。" -#: ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1466 msgid "Dennis Sweeney" msgstr "Dennis Sweeney" -#: ../../whatsnew/3.11.rst:1470 +#: ../../whatsnew/3.11.rst:1469 msgid "Calls" msgstr "呼叫" -#: ../../whatsnew/3.11.rst:1470 +#: ../../whatsnew/3.11.rst:1469 msgid "``f(arg)``" msgstr "``f(arg)``" -#: ../../whatsnew/3.11.rst:1472 +#: ../../whatsnew/3.11.rst:1471 msgid "``C(arg)``" msgstr "``C(arg)``" -#: ../../whatsnew/3.11.rst:1470 +#: ../../whatsnew/3.11.rst:1469 msgid "" "Calls to common builtin (C) functions and types such as :func:`len` and :" "class:`str` directly call their underlying C version. This avoids going " @@ -2386,27 +2384,27 @@ msgstr "" "常見內建 (C) 函式和型別的呼叫,例如 :func:`len` 和 :class:`str`,會直接呼叫它" "們的 C 版本底層,這避免了通過內部呼叫的慣例。" -#: ../../whatsnew/3.11.rst:1470 +#: ../../whatsnew/3.11.rst:1469 msgid "20%" msgstr "20%" -#: ../../whatsnew/3.11.rst:1470 +#: ../../whatsnew/3.11.rst:1469 msgid "Mark Shannon, Ken Jin" msgstr "Mark Shannon, Ken Jin" -#: ../../whatsnew/3.11.rst:1475 +#: ../../whatsnew/3.11.rst:1474 msgid "Load global variable" msgstr "載入全域變數" -#: ../../whatsnew/3.11.rst:1475 +#: ../../whatsnew/3.11.rst:1474 msgid "``print``" msgstr "``print``" -#: ../../whatsnew/3.11.rst:1477 +#: ../../whatsnew/3.11.rst:1476 msgid "``len``" msgstr "``len``" -#: ../../whatsnew/3.11.rst:1475 +#: ../../whatsnew/3.11.rst:1474 msgid "" "The object's index in the globals/builtins namespace is cached. Loading " "globals and builtins require zero namespace lookups." @@ -2414,24 +2412,24 @@ msgstr "" "全域/內建之命名空間內的物件索引被快取起來。載入全域與內建變數不需要任何命名空" "間的查找。" -#: ../../whatsnew/3.11.rst:1475 +#: ../../whatsnew/3.11.rst:1474 msgid "[#load-global]_" msgstr "[#load-global]_" -#: ../../whatsnew/3.11.rst:1475 ../../whatsnew/3.11.rst:1479 -#: ../../whatsnew/3.11.rst:1488 +#: ../../whatsnew/3.11.rst:1474 ../../whatsnew/3.11.rst:1478 +#: ../../whatsnew/3.11.rst:1487 msgid "Mark Shannon" msgstr "Mark Shannon" -#: ../../whatsnew/3.11.rst:1479 +#: ../../whatsnew/3.11.rst:1478 msgid "Load attribute" msgstr "載入屬性" -#: ../../whatsnew/3.11.rst:1479 +#: ../../whatsnew/3.11.rst:1478 msgid "``o.attr``" msgstr "``o.attr``" -#: ../../whatsnew/3.11.rst:1479 +#: ../../whatsnew/3.11.rst:1478 msgid "" "Similar to loading global variables. The attribute's index inside the class/" "object's namespace is cached. In most cases, attribute loading will require " @@ -2440,19 +2438,19 @@ msgstr "" "和載入全域變數類似,類別/物件之命名空間內的屬性索引被快取起來。在大部分情況" "中,載入屬性不需要任何命名空間的查找。" -#: ../../whatsnew/3.11.rst:1479 +#: ../../whatsnew/3.11.rst:1478 msgid "[#load-attr]_" msgstr "[#load-attr]_" -#: ../../whatsnew/3.11.rst:1484 +#: ../../whatsnew/3.11.rst:1483 msgid "Load methods for call" msgstr "載入要呼叫的方法" -#: ../../whatsnew/3.11.rst:1484 +#: ../../whatsnew/3.11.rst:1483 msgid "``o.meth()``" msgstr "``o.meth()``" -#: ../../whatsnew/3.11.rst:1484 +#: ../../whatsnew/3.11.rst:1483 msgid "" "The actual address of the method is cached. Method loading now has no " "namespace lookups -- even for classes with long inheritance chains." @@ -2460,54 +2458,54 @@ msgstr "" "方法的真實記憶體地址被快取 (cache) 起來,方法的載入現在不需要命名空間的查找 " "-- 即便有很長繼承鏈結的類別也是。" -#: ../../whatsnew/3.11.rst:1484 +#: ../../whatsnew/3.11.rst:1483 msgid "10-20%" msgstr "10-20%" -#: ../../whatsnew/3.11.rst:1484 +#: ../../whatsnew/3.11.rst:1483 msgid "Ken Jin, Mark Shannon" msgstr "Ken Jin, Mark Shannon" -#: ../../whatsnew/3.11.rst:1488 +#: ../../whatsnew/3.11.rst:1487 msgid "Store attribute" msgstr "儲存屬性" -#: ../../whatsnew/3.11.rst:1488 +#: ../../whatsnew/3.11.rst:1487 msgid "``o.attr = z``" msgstr "``o.attr = z``" -#: ../../whatsnew/3.11.rst:1488 +#: ../../whatsnew/3.11.rst:1487 msgid "Similar to load attribute optimization." msgstr "和載入屬性的最佳化相似。" -#: ../../whatsnew/3.11.rst:1488 +#: ../../whatsnew/3.11.rst:1487 msgid "2% in pyperformance" msgstr "2% 於 pyperformance 中" -#: ../../whatsnew/3.11.rst:1491 +#: ../../whatsnew/3.11.rst:1490 msgid "Unpack Sequence" msgstr "拆解 (unpack) 序列" -#: ../../whatsnew/3.11.rst:1491 +#: ../../whatsnew/3.11.rst:1490 msgid "``*seq``" msgstr "``*seq``" -#: ../../whatsnew/3.11.rst:1491 +#: ../../whatsnew/3.11.rst:1490 msgid "" "Specialized for common containers such as :class:`list` and :class:`tuple`. " "Avoids internal calling convention." msgstr "" "為像是 :class:`list` 和 :class:`tuple` 的常見容器所特化,避免了內部呼叫慣例。" -#: ../../whatsnew/3.11.rst:1491 +#: ../../whatsnew/3.11.rst:1490 msgid "8%" msgstr "8%" -#: ../../whatsnew/3.11.rst:1491 +#: ../../whatsnew/3.11.rst:1490 msgid "Brandt Bucher" msgstr "Brandt Bucher" -#: ../../whatsnew/3.11.rst:1496 +#: ../../whatsnew/3.11.rst:1495 msgid "" "A similar optimization already existed since Python 3.8. 3.11 specializes " "for more forms and reduces some overhead." @@ -2515,7 +2513,7 @@ msgstr "" "類似的最佳化自從 Python 3.8 就存在。3.11 特別處理了更多形式並減少效能開銷 " "(overhead)。" -#: ../../whatsnew/3.11.rst:1499 +#: ../../whatsnew/3.11.rst:1498 msgid "" "A similar optimization already existed since Python 3.10. 3.11 specializes " "for more forms. Furthermore, all attribute loads should be sped up by :issue:" @@ -2524,11 +2522,11 @@ msgstr "" "類似的最佳化自從 Python 3.10 就存在。3.11 特別處理了更多形式。此外,所有屬性" "載入也被 :issue:`45947` 所加速。" -#: ../../whatsnew/3.11.rst:1507 +#: ../../whatsnew/3.11.rst:1506 msgid "Misc" msgstr "雜項" -#: ../../whatsnew/3.11.rst:1509 +#: ../../whatsnew/3.11.rst:1508 msgid "" "Objects now require less memory due to lazily created object namespaces. " "Their namespace dictionaries now also share keys more freely. (Contributed " @@ -2538,7 +2536,7 @@ msgstr "" "字典現在也更自由地共享鍵。(由 Mark Shannon 於 :issue:`45340` 和 :issue:" "`40116` 貢獻。 )" -#: ../../whatsnew/3.11.rst:1513 +#: ../../whatsnew/3.11.rst:1512 msgid "" "\"Zero-cost\" exceptions are implemented, eliminating the cost of :keyword:" "`try` statements when no exception is raised. (Contributed by Mark Shannon " @@ -2547,7 +2545,7 @@ msgstr "" "實作了「無代價 (Zero-cost)」的例外,消除了在沒有例外被引發時的 :keyword:" "`try` 陳述式開銷。(由 Mark Shannon 於 :issue:`40222` 貢獻。)" -#: ../../whatsnew/3.11.rst:1517 +#: ../../whatsnew/3.11.rst:1516 msgid "" "A more concise representation of exceptions in the interpreter reduced the " "time required for catching an exception by about 10%. (Contributed by Irit " @@ -2556,7 +2554,7 @@ msgstr "" "在直譯器內使用更簡潔的例外表示法將捕獲一個例外所需的時間減少了大約 10%。 由 " "Irit Katriel 在 :issue:`45711` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1521 +#: ../../whatsnew/3.11.rst:1520 msgid "" ":mod:`re`'s regular expression matching engine has been partially " "refactored, and now uses computed gotos (or \"threaded code\") on supported " @@ -2571,15 +2569,15 @@ msgstr "" "benchmarks.html#regex-dna>`_\\ 的表現上比起 Python 3.10 快了 10%。(由 " "Brandt Bucher 於 :gh:`91404` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1532 +#: ../../whatsnew/3.11.rst:1531 msgid "FAQ" msgstr "FAQ" -#: ../../whatsnew/3.11.rst:1537 +#: ../../whatsnew/3.11.rst:1536 msgid "How should I write my code to utilize these speedups?" msgstr "我該如何在程式碼中獲取這些加速?" -#: ../../whatsnew/3.11.rst:1539 +#: ../../whatsnew/3.11.rst:1538 msgid "" "Write Pythonic code that follows common best practices; you don't have to " "change your code. The Faster CPython project optimizes for common code " @@ -2588,11 +2586,11 @@ msgstr "" "撰寫符合 Python 風格 (Pythonic) 且依循常見最佳實踐的程式碼就好,你不需要改變" "你的程式碼。CPython 加速計畫中,我們為所觀察到的常見程式編寫模式來做最佳化。" -#: ../../whatsnew/3.11.rst:1547 +#: ../../whatsnew/3.11.rst:1546 msgid "Will CPython 3.11 use more memory?" msgstr "Python 3.11 會不會使用更多記憶體?" -#: ../../whatsnew/3.11.rst:1549 +#: ../../whatsnew/3.11.rst:1548 msgid "" "Maybe not; we don't expect memory use to exceed 20% higher than 3.10. This " "is offset by memory optimizations for frame objects and object dictionaries " @@ -2601,11 +2599,11 @@ msgstr "" "也許不會。我們預期不會有超出 3.10 20% 的記憶體使用量。這數字會和上述禎物件與" "物件字典的記憶體最佳化而有所偏差。" -#: ../../whatsnew/3.11.rst:1557 +#: ../../whatsnew/3.11.rst:1556 msgid "I don't see any speedups in my workload. Why?" msgstr "我在我的程式當中沒感覺到任何加速,為什麼?" -#: ../../whatsnew/3.11.rst:1559 +#: ../../whatsnew/3.11.rst:1558 msgid "" "Certain code won't have noticeable benefits. If your code spends most of its " "time on I/O operations, or already does most of its computation in a C " @@ -2616,7 +2614,7 @@ msgstr "" "將大部分計算用像是 numpy 的 C 擴充函式庫處理,那就不會有明顯的加速。這個計畫" "是對純 Python 的工作負荷最有幫助。" -#: ../../whatsnew/3.11.rst:1564 +#: ../../whatsnew/3.11.rst:1563 msgid "" "Furthermore, the pyperformance figures are a geometric mean. Even within the " "pyperformance benchmarks, certain benchmarks have slowed down slightly, " @@ -2625,19 +2623,19 @@ msgstr "" "此外,pyperformance 數值為一個幾何平均數 (geometric mean)。即便在 " "pyperformance 基準量測中,某些測試稍微慢了一些,但其他加快了將近兩倍!" -#: ../../whatsnew/3.11.rst:1572 +#: ../../whatsnew/3.11.rst:1571 msgid "Is there a JIT compiler?" msgstr "有用到 JIT 編譯器嗎?" -#: ../../whatsnew/3.11.rst:1574 +#: ../../whatsnew/3.11.rst:1573 msgid "No. We're still exploring other optimizations." msgstr "沒有,我們還在探索其他最佳化方式。" -#: ../../whatsnew/3.11.rst:1580 +#: ../../whatsnew/3.11.rst:1579 msgid "About" msgstr "關於" -#: ../../whatsnew/3.11.rst:1582 +#: ../../whatsnew/3.11.rst:1581 msgid "" "Faster CPython explores optimizations for :term:`CPython`. The main team is " "funded by Microsoft to work on this full-time. Pablo Galindo Salgado is also " @@ -2648,11 +2646,11 @@ msgstr "" "(microsoft) 所資助以全職發展該計畫,Pablo Galindo Salgado 亦由彭博有限合夥企" "業 (Bloomberg LP) 資助來兼職開發,更有許許多多來自社群的自發性貢獻者。" -#: ../../whatsnew/3.11.rst:1591 +#: ../../whatsnew/3.11.rst:1590 msgid "CPython bytecode changes" msgstr "CPython 位元組碼 (bytecode) 變更" -#: ../../whatsnew/3.11.rst:1593 +#: ../../whatsnew/3.11.rst:1592 msgid "" "The bytecode now contains inline cache entries, which take the form of the " "newly-added :opcode:`CACHE` instructions. Many opcodes expect to be followed " @@ -2666,11 +2664,11 @@ msgstr "" "(populated) 快取看起來像任意指示,因此在讀取或修改包含加速資料的原始且適應 " "(adaptive) 位元組碼時應格外小心。" -#: ../../whatsnew/3.11.rst:1605 +#: ../../whatsnew/3.11.rst:1604 msgid "New opcodes" msgstr "新增 opcode" -#: ../../whatsnew/3.11.rst:1607 +#: ../../whatsnew/3.11.rst:1606 msgid "" ":opcode:`!ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`, " "used in generators and co-routines." @@ -2678,7 +2676,7 @@ msgstr "" ":opcode:`!ASYNC_GEN_WRAP`、:opcode:`RETURN_GENERATOR` 和 :opcode:`SEND` 被用" "於產生器與協程。" -#: ../../whatsnew/3.11.rst:1610 +#: ../../whatsnew/3.11.rst:1609 msgid "" ":opcode:`COPY_FREE_VARS`, which avoids needing special caller-side code for " "closures." @@ -2686,17 +2684,17 @@ msgstr "" ":opcode:`COPY_FREE_VARS`,避免了為閉包 (closure) 而生的特殊呼叫方 (caller-" "side) 程式碼的需求。" -#: ../../whatsnew/3.11.rst:1613 +#: ../../whatsnew/3.11.rst:1612 msgid "" ":opcode:`JUMP_BACKWARD_NO_INTERRUPT`, for use in certain loops where " "handling interrupts is undesirable." msgstr ":opcode:`JUMP_BACKWARD_NO_INTERRUPT`,用於某些不需要處理中斷的循環。" -#: ../../whatsnew/3.11.rst:1616 +#: ../../whatsnew/3.11.rst:1615 msgid ":opcode:`MAKE_CELL`, to create :ref:`cell-objects`." msgstr ":opcode:`MAKE_CELL` 被用於建立 :ref:`cell-objects`。" -#: ../../whatsnew/3.11.rst:1618 +#: ../../whatsnew/3.11.rst:1617 msgid "" ":opcode:`CHECK_EG_MATCH` and :opcode:`!PREP_RERAISE_STAR`, to handle the :" "ref:`new exception groups and except* ` added in :pep:" @@ -2705,29 +2703,29 @@ msgstr "" ":opcode:`CHECK_EG_MATCH` 和 :opcode:`!PREP_RERAISE_STAR`,處理 :pep:`654` 所" "加入的\\ :ref:`新增例外群組和 except* `。" -#: ../../whatsnew/3.11.rst:1622 +#: ../../whatsnew/3.11.rst:1621 msgid ":opcode:`PUSH_EXC_INFO`, for use in exception handlers." msgstr ":opcode:`PUSH_EXC_INFO` 被用於例外處理函式。" -#: ../../whatsnew/3.11.rst:1624 +#: ../../whatsnew/3.11.rst:1623 msgid "" ":opcode:`RESUME`, a no-op, for internal tracing, debugging and optimization " "checks." msgstr ":opcode:`RESUME`,為無操作 (no-po),用於內部追查、除錯和最佳化檢查。" -#: ../../whatsnew/3.11.rst:1631 +#: ../../whatsnew/3.11.rst:1630 msgid "Replaced opcodes" msgstr "被取代的操作碼 (opcode)" -#: ../../whatsnew/3.11.rst:1634 +#: ../../whatsnew/3.11.rst:1633 msgid "Replaced Opcode(s)" msgstr "被取代的操作碼" -#: ../../whatsnew/3.11.rst:1634 +#: ../../whatsnew/3.11.rst:1633 msgid "New Opcode(s)" msgstr "新的操作碼" -#: ../../whatsnew/3.11.rst:1634 +#: ../../whatsnew/3.11.rst:1633 msgid "Notes" msgstr "註記" @@ -2739,11 +2737,11 @@ msgstr ":opcode:`!BINARY_*`" msgid ":opcode:`!INPLACE_*`" msgstr ":opcode:`!INPLACE_*`" -#: ../../whatsnew/3.11.rst:1636 +#: ../../whatsnew/3.11.rst:1635 msgid ":opcode:`BINARY_OP`" msgstr ":opcode:`BINARY_OP`" -#: ../../whatsnew/3.11.rst:1636 +#: ../../whatsnew/3.11.rst:1635 msgid "Replaced all numeric binary/in-place opcodes with a single opcode" msgstr "以單一一個操作碼來取代所有數值的、二進位/原位 (in-place) 操作碼" @@ -2775,7 +2773,7 @@ msgstr ":opcode:`!PRECALL`" msgid ":opcode:`PUSH_NULL`" msgstr ":opcode:`PUSH_NULL`" -#: ../../whatsnew/3.11.rst:1639 +#: ../../whatsnew/3.11.rst:1638 msgid "" "Decouples argument shifting for methods from handling of keyword arguments; " "allows better specialization of calls" @@ -2815,7 +2813,7 @@ msgstr ":opcode:`COPY`" msgid ":opcode:`SWAP`" msgstr ":opcode:`SWAP`" -#: ../../whatsnew/3.11.rst:1644 +#: ../../whatsnew/3.11.rst:1643 msgid "Stack manipulation instructions" msgstr "堆疊操作指示" @@ -2827,7 +2825,7 @@ msgstr ":opcode:`!JUMP_IF_NOT_EXC_MATCH`" msgid ":opcode:`CHECK_EXC_MATCH`" msgstr ":opcode:`CHECK_EXC_MATCH`" -#: ../../whatsnew/3.11.rst:1651 +#: ../../whatsnew/3.11.rst:1650 msgid "Now performs check but doesn't jump" msgstr "現在執行檢查但不跳位 (jump)" @@ -2855,7 +2853,7 @@ msgstr ":opcode:`!POP_JUMP_BACKWARD_IF_*`" msgid ":opcode:`!POP_JUMP_FORWARD_IF_*`" msgstr ":opcode:`!POP_JUMP_FORWARD_IF_*`" -#: ../../whatsnew/3.11.rst:1653 +#: ../../whatsnew/3.11.rst:1652 msgid "" "See [#bytecode-jump]_; ``TRUE``, ``FALSE``, ``NONE`` and ``NOT_NONE`` " "variants for each direction" @@ -2871,15 +2869,15 @@ msgstr ":opcode:`!SETUP_WITH`" msgid ":opcode:`!SETUP_ASYNC_WITH`" msgstr ":opcode:`!SETUP_ASYNC_WITH`" -#: ../../whatsnew/3.11.rst:1659 +#: ../../whatsnew/3.11.rst:1658 msgid ":opcode:`BEFORE_WITH`" msgstr ":opcode:`BEFORE_WITH`" -#: ../../whatsnew/3.11.rst:1659 +#: ../../whatsnew/3.11.rst:1658 msgid ":keyword:`with` block setup" msgstr ":keyword:`with` 區塊設置" -#: ../../whatsnew/3.11.rst:1663 +#: ../../whatsnew/3.11.rst:1662 msgid "" "All jump opcodes are now relative, including the existing :opcode:`!" "JUMP_IF_TRUE_OR_POP` and :opcode:`!JUMP_IF_FALSE_OR_POP`. The argument is " @@ -2889,11 +2887,11 @@ msgstr "" "JUMP_IF_TRUE_OR_POP` 和 :opcode:`!JUMP_IF_FALSE_OR_POP`。該引數現在是當前指" "示 (instruction) 的偏移量而不是絕對位置。" -#: ../../whatsnew/3.11.rst:1674 +#: ../../whatsnew/3.11.rst:1673 msgid "Changed/removed opcodes" msgstr "有更動/被移除的 opcode" -#: ../../whatsnew/3.11.rst:1676 +#: ../../whatsnew/3.11.rst:1675 msgid "" "Changed :opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` to no longer push an " "additional boolean value to indicate success/failure. Instead, ``None`` is " @@ -2903,7 +2901,7 @@ msgstr "" "值來表示成功/失敗。取而代之的是會在失敗時推送 ``None``,而非一個包含提取值的" "元組。" -#: ../../whatsnew/3.11.rst:1681 +#: ../../whatsnew/3.11.rst:1680 msgid "" "Changed opcodes that work with exceptions to reflect them now being " "represented as one item on the stack instead of three (see :gh:`89874`)." @@ -2911,7 +2909,7 @@ msgstr "" "更改了運作於例外的操作碼以反映它們現在在堆疊中的表示為一項而不是三項(請參" "閱 :gh:`89874`)。" -#: ../../whatsnew/3.11.rst:1685 +#: ../../whatsnew/3.11.rst:1684 msgid "" "Removed :opcode:`!COPY_DICT_WITHOUT_KEYS`, :opcode:`!GEN_START`, :opcode:`!" "POP_BLOCK`, :opcode:`!SETUP_FINALLY` and :opcode:`!YIELD_FROM`." @@ -2919,26 +2917,26 @@ msgstr "" "刪除 :opcode:`!COPY_DICT_WITHOUT_KEYS`、:opcode:`!GEN_START`、:opcode:`!" "POP_BLOCK`、:opcode:`!SETUP_FINALLY` 和 :opcode:`!YIELD_FROM`。" -#: ../../whatsnew/3.11.rst:1693 ../../whatsnew/3.11.rst:2566 +#: ../../whatsnew/3.11.rst:1692 ../../whatsnew/3.11.rst:2565 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.11.rst:1695 +#: ../../whatsnew/3.11.rst:1694 msgid "" "This section lists Python APIs that have been deprecated in Python 3.11." msgstr "這個部分列出了在 Python 3.11 中棄用的 Python API。" -#: ../../whatsnew/3.11.rst:1697 +#: ../../whatsnew/3.11.rst:1696 msgid "" "Deprecated C APIs are :ref:`listed separately `." msgstr "被棄用的 C API 被\\ :ref:`獨立列出 `。" -#: ../../whatsnew/3.11.rst:1704 +#: ../../whatsnew/3.11.rst:1703 msgid "Language/Builtins" msgstr "語言/內建" -#: ../../whatsnew/3.11.rst:1706 +#: ../../whatsnew/3.11.rst:1705 msgid "" "Chaining :class:`classmethod` descriptors (introduced in :issue:`19072`) is " "now deprecated. It can no longer be used to wrap other descriptors such as :" @@ -2953,7 +2951,7 @@ msgstr "" "慮使用 Python 3.10 中添加的 :attr:`!__wrapped__` 屬性。(由 Raymond " "Hettinger 在 :gh:`89519` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1714 +#: ../../whatsnew/3.11.rst:1713 msgid "" "Octal escapes in string and bytes literals with values larger than ``0o377`` " "(255 in decimal) now produce a :exc:`DeprecationWarning`. In a future Python " @@ -2965,7 +2963,7 @@ msgstr "" "Python 版本中,他們將引發一個 :exc:`SyntaxWarning` 並最終引發一個 :exc:" "`SyntaxError`。(由 Serhiy Storchaka 在 :gh:`81548` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1720 +#: ../../whatsnew/3.11.rst:1719 msgid "" "The delegation of :func:`int` to :meth:`~object.__trunc__` is now " "deprecated. Calling ``int(a)`` when ``type(a)`` implements :meth:`!" @@ -2978,93 +2976,93 @@ msgstr "" "meth:`~object.__index__`,呼叫 ``int(a)`` 現在會引發一個 :exc:" "`DeprecationWarning`。(由 Zackery Spytz 在 :issue:`44977` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1730 +#: ../../whatsnew/3.11.rst:1729 msgid "Modules" msgstr "模組" -#: ../../whatsnew/3.11.rst:1734 +#: ../../whatsnew/3.11.rst:1733 msgid "" ":pep:`594` led to the deprecations of the following modules slated for " "removal in Python 3.13:" msgstr ":pep:`594` 引領下列模組的棄用,並排訂於 Python 3.13 移除:" -#: ../../whatsnew/3.11.rst:1738 +#: ../../whatsnew/3.11.rst:1737 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.11.rst:1738 +#: ../../whatsnew/3.11.rst:1737 msgid ":mod:`chunk`" msgstr ":mod:`chunk`" -#: ../../whatsnew/3.11.rst:1738 +#: ../../whatsnew/3.11.rst:1737 msgid ":mod:`msilib`" msgstr ":mod:`msilib`" -#: ../../whatsnew/3.11.rst:1738 +#: ../../whatsnew/3.11.rst:1737 msgid ":mod:`pipes`" msgstr ":mod:`pipes`" -#: ../../whatsnew/3.11.rst:1738 +#: ../../whatsnew/3.11.rst:1737 msgid ":mod:`telnetlib`" msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.11.rst:1740 +#: ../../whatsnew/3.11.rst:1739 msgid ":mod:`audioop`" msgstr ":mod:`audioop`" -#: ../../whatsnew/3.11.rst:1740 +#: ../../whatsnew/3.11.rst:1739 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.11.rst:1740 +#: ../../whatsnew/3.11.rst:1739 msgid ":mod:`nis`" msgstr ":mod:`nis`" -#: ../../whatsnew/3.11.rst:1740 +#: ../../whatsnew/3.11.rst:1739 msgid ":mod:`sndhdr`" msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.11.rst:1740 +#: ../../whatsnew/3.11.rst:1739 msgid ":mod:`uu`" msgstr ":mod:`uu`" -#: ../../whatsnew/3.11.rst:1742 +#: ../../whatsnew/3.11.rst:1741 msgid ":mod:`cgi`" msgstr ":mod:`cgi`" -#: ../../whatsnew/3.11.rst:1742 +#: ../../whatsnew/3.11.rst:1741 msgid ":mod:`imghdr`" msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.11.rst:1742 +#: ../../whatsnew/3.11.rst:1741 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.11.rst:1742 +#: ../../whatsnew/3.11.rst:1741 msgid ":mod:`spwd`" msgstr ":mod:`spwd`" -#: ../../whatsnew/3.11.rst:1742 +#: ../../whatsnew/3.11.rst:1741 msgid ":mod:`xdrlib`" msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.11.rst:1744 +#: ../../whatsnew/3.11.rst:1743 msgid ":mod:`cgitb`" msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.11.rst:1744 +#: ../../whatsnew/3.11.rst:1743 msgid ":mod:`mailcap`" msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.11.rst:1744 +#: ../../whatsnew/3.11.rst:1743 msgid ":mod:`ossaudiodev`" msgstr ":mod:`ossaudiodev`" -#: ../../whatsnew/3.11.rst:1744 +#: ../../whatsnew/3.11.rst:1743 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.11.rst:1747 +#: ../../whatsnew/3.11.rst:1746 msgid "" "(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:" "`68966`.)" @@ -3072,7 +3070,7 @@ msgstr "" "(由 Brett Cannon 和 Victor Stinner 分別於 :issue:`47061` 與 :gh:`68966` 中所" "貢獻。)" -#: ../../whatsnew/3.11.rst:1750 +#: ../../whatsnew/3.11.rst:1749 msgid "" "The :mod:`!asynchat`, :mod:`!asyncore` and :mod:`!smtpd` modules have been " "deprecated since at least Python 3.6. Their documentation and deprecation " @@ -3083,7 +3081,7 @@ msgstr "" "被棄用,它們的文件與棄用警告現在已被更新為會提示它們即將於 Python 3.12 中移" "除。(由 Hugo van Kemenade 於 :issue:`47022` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1755 +#: ../../whatsnew/3.11.rst:1754 msgid "" "The :mod:`lib2to3` package and :ref:`2to3 <2to3-reference>` tool are now " "deprecated and may not be able to parse Python 3.10 or newer. See :pep:" @@ -3094,7 +3092,7 @@ msgstr "" "析 Python 3.10 或更新版本。有關詳細資訊請參閱 :pep:`617`,它引入了新的 PEG 剖" "析器。(由 Victor Stinner 在 :issue:`40360` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1760 +#: ../../whatsnew/3.11.rst:1759 msgid "" "Undocumented modules :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!" "sre_parse` are now deprecated. (Contributed by Serhiy Storchaka in :issue:" @@ -3104,11 +3102,11 @@ msgstr "" "sre_parse` 模組現在已被棄用。(由 Serhiy Storchaka 在 :issue:`47152` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:1768 +#: ../../whatsnew/3.11.rst:1767 msgid "Standard Library" msgstr "標準函式庫" -#: ../../whatsnew/3.11.rst:1770 +#: ../../whatsnew/3.11.rst:1769 msgid "" "The following have been deprecated in :mod:`configparser` since Python 3.2. " "Their deprecation warnings have now been updated to note they will be " @@ -3117,23 +3115,23 @@ msgstr "" "以下 :mod:`configparser` 相關項目已在 Python 3.2 中棄用,它們的棄用警告現在會" "提示它們即將於 Python 3.12 中移除:" -#: ../../whatsnew/3.11.rst:1774 +#: ../../whatsnew/3.11.rst:1773 msgid "the :class:`!configparser.SafeConfigParser` class" msgstr ":class:`!configparser.SafeConfigParser` 類別" -#: ../../whatsnew/3.11.rst:1775 +#: ../../whatsnew/3.11.rst:1774 msgid "the :attr:`!configparser.ParsingError.filename` property" msgstr ":attr:`!configparser.ParsingError.filename` 屬性" -#: ../../whatsnew/3.11.rst:1776 +#: ../../whatsnew/3.11.rst:1775 msgid "the :meth:`!configparser.RawConfigParser.readfp` method" msgstr ":meth:`!configparser.RawConfigParser.readfp` 方法" -#: ../../whatsnew/3.11.rst:1778 +#: ../../whatsnew/3.11.rst:1777 msgid "(Contributed by Hugo van Kemenade in :issue:`45173`.)" msgstr "(由 Hugo van Kemenade 於 :issue:`45173` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1780 +#: ../../whatsnew/3.11.rst:1779 msgid "" ":class:`!configparser.LegacyInterpolation` has been deprecated in the " "docstring since Python 3.2, and is not listed in the :mod:`configparser` " @@ -3148,7 +3146,7 @@ msgstr "" "BasicInterpolation` 或 :class:`configparser.ExtendedInterpolation`。(由 " "Hugo van Kemenade 在 :issue:`46607` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1787 +#: ../../whatsnew/3.11.rst:1786 msgid "" "The older set of :mod:`importlib.resources` functions were deprecated in " "favor of the replacements added in Python 3.9 and will be removed in a " @@ -3159,35 +3157,35 @@ msgstr "" "用、並將在未來的 Python 版本中刪除,取而代之的是在 Python 3.9 中添加的替代方" "案:" -#: ../../whatsnew/3.11.rst:1792 +#: ../../whatsnew/3.11.rst:1791 msgid ":func:`importlib.resources.contents`" msgstr ":func:`importlib.resources.contents`" -#: ../../whatsnew/3.11.rst:1793 +#: ../../whatsnew/3.11.rst:1792 msgid ":func:`importlib.resources.is_resource`" msgstr ":func:`importlib.resources.is_resource`" -#: ../../whatsnew/3.11.rst:1794 +#: ../../whatsnew/3.11.rst:1793 msgid ":func:`importlib.resources.open_binary`" msgstr ":func:`importlib.resources.open_binary`" -#: ../../whatsnew/3.11.rst:1795 +#: ../../whatsnew/3.11.rst:1794 msgid ":func:`importlib.resources.open_text`" msgstr ":func:`importlib.resources.open_text`" -#: ../../whatsnew/3.11.rst:1796 +#: ../../whatsnew/3.11.rst:1795 msgid ":func:`importlib.resources.read_binary`" msgstr ":func:`importlib.resources.read_binary`" -#: ../../whatsnew/3.11.rst:1797 +#: ../../whatsnew/3.11.rst:1796 msgid ":func:`importlib.resources.read_text`" msgstr ":func:`importlib.resources.read_text`" -#: ../../whatsnew/3.11.rst:1798 +#: ../../whatsnew/3.11.rst:1797 msgid ":func:`importlib.resources.path`" msgstr ":func:`importlib.resources.path`" -#: ../../whatsnew/3.11.rst:1800 +#: ../../whatsnew/3.11.rst:1799 msgid "" "The :func:`locale.getdefaultlocale` function is deprecated and will be " "removed in Python 3.15. Use :func:`locale.setlocale`, :func:`locale." @@ -3199,7 +3197,7 @@ msgstr "" "` 和 :func:`locale.getlocale`。(Victor Stinner " "於 :gh:`90817` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1806 +#: ../../whatsnew/3.11.rst:1805 msgid "" "The :func:`locale.resetlocale` function is deprecated and will be removed in " "Python 3.13. Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. " @@ -3209,7 +3207,7 @@ msgstr "" "``locale.setlocale(locale.LC_ALL, \"\")``。(由 Victor Stinner 於 :gh:" "`90817` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1810 +#: ../../whatsnew/3.11.rst:1809 msgid "" "Stricter rules will now be applied for numerical group references and group " "names in :ref:`regular expressions `. Only sequences of ASCII " @@ -3225,7 +3223,7 @@ msgstr "" "字母、數字和底線。目前,會針對違反這些規則的語法發出棄用警告。(由 Serhiy " "Storchaka 在 :gh:`91760` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1818 +#: ../../whatsnew/3.11.rst:1817 msgid "" "In the :mod:`re` module, the :func:`!re.template` function and the " "corresponding :const:`!re.TEMPLATE` and :const:`!re.T` flags are deprecated, " @@ -3238,7 +3236,7 @@ msgstr "" "們將在 Python 3.13 中被刪除。(由 Serhiy Storchaka 和 Miro Hrončok 在 :gh:" "`92728` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1824 +#: ../../whatsnew/3.11.rst:1823 msgid "" ":func:`turtle.settiltangle` has been deprecated since Python 3.1; it now " "emits a deprecation warning and will be removed in Python 3.13. Use :func:" @@ -3251,7 +3249,7 @@ msgstr "" "誤地標記為已棄用,其文件字串現在已更正)。(由 Hugo van Kemenade 在 :issue:" "`45837` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1830 +#: ../../whatsnew/3.11.rst:1829 msgid "" ":class:`typing.Text`, which exists solely to provide compatibility support " "between Python 2 and Python 3 code, is now deprecated. Its removal is " @@ -3262,7 +3260,7 @@ msgstr "" "用。目前未計劃刪除它,但鼓勵用戶盡可能使用 :class:`str` 代替。(由 Alex " "Waygood 在 :gh:`92332` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1836 +#: ../../whatsnew/3.11.rst:1835 msgid "" "The keyword argument syntax for constructing :data:`typing.TypedDict` types " "is now deprecated. Support will be removed in Python 3.13. (Contributed by " @@ -3271,7 +3269,7 @@ msgstr "" "用於建構 :data:`typing.TypedDict` 型別的關鍵字引數語法現已棄用。將在 Python " "3.13 中停止支援。(由 Jingchen Ye 在 :gh:`90224` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1840 +#: ../../whatsnew/3.11.rst:1839 msgid "" ":class:`!webbrowser.MacOSX` is deprecated and will be removed in Python " "3.13. It is untested, undocumented, and not used by :mod:`webbrowser` " @@ -3281,7 +3279,7 @@ msgstr "" "過、沒紀錄於文件、也沒有被 :mod:`webbrowser` 本身使用。(由 Donghee Na 於 :" "issue:`42255`。)" -#: ../../whatsnew/3.11.rst:1844 +#: ../../whatsnew/3.11.rst:1843 msgid "" "The behavior of returning a value from a :class:`~unittest.TestCase` and :" "class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the " @@ -3291,7 +3289,7 @@ msgstr "" "IsolatedAsyncioTestCase` 測試方法(預設的 ``None`` 值除外)給定值的行為現已棄" "用。" -#: ../../whatsnew/3.11.rst:1848 +#: ../../whatsnew/3.11.rst:1847 msgid "" "Deprecated the following not-formally-documented :mod:`unittest` functions, " "scheduled for removal in Python 3.13:" @@ -3299,39 +3297,39 @@ msgstr "" "棄用以下並沒有正式紀錄於文件中的 :mod:`unittest` 函式,並預計於 Python 3.13 " "中移除:" -#: ../../whatsnew/3.11.rst:1851 +#: ../../whatsnew/3.11.rst:1850 msgid ":func:`!unittest.findTestCases`" msgstr ":func:`!unittest.findTestCases`" -#: ../../whatsnew/3.11.rst:1852 +#: ../../whatsnew/3.11.rst:1851 msgid ":func:`!unittest.makeSuite`" msgstr ":func:`!unittest.makeSuite`" -#: ../../whatsnew/3.11.rst:1853 +#: ../../whatsnew/3.11.rst:1852 msgid ":func:`!unittest.getTestCaseNames`" msgstr ":func:`!unittest.getTestCaseNames`" -#: ../../whatsnew/3.11.rst:1855 +#: ../../whatsnew/3.11.rst:1854 msgid "Use :class:`~unittest.TestLoader` methods instead:" msgstr "改用 :class:`~unittest.TestLoader` 方法:" -#: ../../whatsnew/3.11.rst:1857 +#: ../../whatsnew/3.11.rst:1856 msgid ":meth:`unittest.TestLoader.loadTestsFromModule`" msgstr ":meth:`unittest.TestLoader.loadTestsFromModule`" -#: ../../whatsnew/3.11.rst:1858 +#: ../../whatsnew/3.11.rst:1857 msgid ":meth:`unittest.TestLoader.loadTestsFromTestCase`" msgstr ":meth:`unittest.TestLoader.loadTestsFromTestCase`" -#: ../../whatsnew/3.11.rst:1859 +#: ../../whatsnew/3.11.rst:1858 msgid ":meth:`unittest.TestLoader.getTestCaseNames`" msgstr ":meth:`unittest.TestLoader.getTestCaseNames`" -#: ../../whatsnew/3.11.rst:1861 +#: ../../whatsnew/3.11.rst:1860 msgid "(Contributed by Erlend E. Aasland in :issue:`5846`.)" msgstr "(由 Erlend E. Aasland 於 :issue:`5846` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1863 +#: ../../whatsnew/3.11.rst:1862 msgid "" ":meth:`!unittest.TestProgram.usageExit` is marked deprecated, to be removed " "in 3.13. (Contributed by Carlos Damázio in :gh:`67048`.)" @@ -3339,17 +3337,17 @@ msgstr "" ":meth:`!unittest.TestProgram.usageExit` 被標記為已棄用,即將在 3.13 中移除" "(由 Carlos Damázio 在 :gh:`67048` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1872 ../../whatsnew/3.11.rst:2594 +#: ../../whatsnew/3.11.rst:1871 ../../whatsnew/3.11.rst:2593 msgid "Pending Removal in Python 3.12" msgstr "Python 3.12 中待決議的移除項目" -#: ../../whatsnew/3.11.rst:1874 +#: ../../whatsnew/3.11.rst:1873 msgid "" "The following Python APIs have been deprecated in earlier Python releases, " "and will be removed in Python 3.12." msgstr "下列 API 已在先前的 Python 發布版本中棄用,並將於 Python 3.12 中移除。" -#: ../../whatsnew/3.11.rst:1877 +#: ../../whatsnew/3.11.rst:1876 msgid "" "C APIs pending removal are :ref:`listed separately `." @@ -3357,270 +3355,270 @@ msgstr "" "待定的 C API 移除項目為\\ :ref:`獨立列出的 `。" -#: ../../whatsnew/3.11.rst:1880 +#: ../../whatsnew/3.11.rst:1879 msgid "The :mod:`!asynchat` module" msgstr ":mod:`!asynchat` 模組" -#: ../../whatsnew/3.11.rst:1881 +#: ../../whatsnew/3.11.rst:1880 msgid "The :mod:`!asyncore` module" msgstr ":mod:`!asyncore` 模組" -#: ../../whatsnew/3.11.rst:1882 +#: ../../whatsnew/3.11.rst:1881 msgid "The :ref:`entire distutils package `" msgstr ":ref:`整個 distutils 套件 `" -#: ../../whatsnew/3.11.rst:1883 +#: ../../whatsnew/3.11.rst:1882 msgid "The :mod:`!imp` module" msgstr ":mod:`!imp` 模組" -#: ../../whatsnew/3.11.rst:1884 +#: ../../whatsnew/3.11.rst:1883 msgid "The :class:`typing.io ` namespace" msgstr ":class:`typing.io ` 命名空間" -#: ../../whatsnew/3.11.rst:1885 +#: ../../whatsnew/3.11.rst:1884 msgid "The :class:`typing.re ` namespace" msgstr ":class:`typing.re ` 命名空間" -#: ../../whatsnew/3.11.rst:1886 +#: ../../whatsnew/3.11.rst:1885 msgid ":func:`!cgi.log`" msgstr ":func:`!cgi.log`" -#: ../../whatsnew/3.11.rst:1887 +#: ../../whatsnew/3.11.rst:1886 msgid ":func:`!importlib.find_loader`" msgstr ":func:`!importlib.find_loader`" -#: ../../whatsnew/3.11.rst:1888 +#: ../../whatsnew/3.11.rst:1887 msgid ":meth:`!importlib.abc.Loader.module_repr`" msgstr ":meth:`!importlib.abc.Loader.module_repr`" -#: ../../whatsnew/3.11.rst:1889 +#: ../../whatsnew/3.11.rst:1888 msgid ":meth:`!importlib.abc.MetaPathFinder.find_module`" msgstr ":meth:`!importlib.abc.MetaPathFinder.find_module`" -#: ../../whatsnew/3.11.rst:1890 +#: ../../whatsnew/3.11.rst:1889 msgid ":meth:`!importlib.abc.PathEntryFinder.find_loader`" msgstr ":meth:`!importlib.abc.PathEntryFinder.find_loader`" -#: ../../whatsnew/3.11.rst:1891 +#: ../../whatsnew/3.11.rst:1890 msgid ":meth:`!importlib.abc.PathEntryFinder.find_module`" msgstr ":meth:`!importlib.abc.PathEntryFinder.find_module`" -#: ../../whatsnew/3.11.rst:1892 +#: ../../whatsnew/3.11.rst:1891 msgid ":meth:`!importlib.machinery.BuiltinImporter.find_module`" msgstr ":meth:`!importlib.machinery.BuiltinImporter.find_module`" -#: ../../whatsnew/3.11.rst:1893 +#: ../../whatsnew/3.11.rst:1892 msgid ":meth:`!importlib.machinery.BuiltinLoader.module_repr`" msgstr ":meth:`!importlib.machinery.BuiltinLoader.module_repr`" -#: ../../whatsnew/3.11.rst:1894 +#: ../../whatsnew/3.11.rst:1893 msgid ":meth:`!importlib.machinery.FileFinder.find_loader`" msgstr ":meth:`!importlib.machinery.FileFinder.find_loader`" -#: ../../whatsnew/3.11.rst:1895 +#: ../../whatsnew/3.11.rst:1894 msgid ":meth:`!importlib.machinery.FileFinder.find_module`" msgstr ":meth:`!importlib.machinery.FileFinder.find_module`" -#: ../../whatsnew/3.11.rst:1896 +#: ../../whatsnew/3.11.rst:1895 msgid ":meth:`!importlib.machinery.FrozenImporter.find_module`" msgstr ":meth:`!importlib.machinery.FrozenImporter.find_module`" -#: ../../whatsnew/3.11.rst:1897 +#: ../../whatsnew/3.11.rst:1896 msgid ":meth:`!importlib.machinery.FrozenLoader.module_repr`" msgstr ":meth:`!importlib.machinery.FrozenLoader.module_repr`" -#: ../../whatsnew/3.11.rst:1898 +#: ../../whatsnew/3.11.rst:1897 msgid ":meth:`!importlib.machinery.PathFinder.find_module`" msgstr ":meth:`!importlib.machinery.PathFinder.find_module`" -#: ../../whatsnew/3.11.rst:1899 +#: ../../whatsnew/3.11.rst:1898 msgid ":meth:`!importlib.machinery.WindowsRegistryFinder.find_module`" msgstr ":meth:`!importlib.machinery.WindowsRegistryFinder.find_module`" -#: ../../whatsnew/3.11.rst:1900 +#: ../../whatsnew/3.11.rst:1899 msgid ":func:`!importlib.util.module_for_loader`" msgstr ":func:`!importlib.util.module_for_loader`" -#: ../../whatsnew/3.11.rst:1901 +#: ../../whatsnew/3.11.rst:1900 msgid ":func:`!importlib.util.set_loader_wrapper`" msgstr ":func:`!importlib.util.set_loader_wrapper`" -#: ../../whatsnew/3.11.rst:1902 +#: ../../whatsnew/3.11.rst:1901 msgid ":func:`!importlib.util.set_package_wrapper`" msgstr ":func:`!importlib.util.set_package_wrapper`" -#: ../../whatsnew/3.11.rst:1903 +#: ../../whatsnew/3.11.rst:1902 msgid ":class:`!pkgutil.ImpImporter`" msgstr ":class:`!pkgutil.ImpImporter`" -#: ../../whatsnew/3.11.rst:1904 +#: ../../whatsnew/3.11.rst:1903 msgid ":class:`!pkgutil.ImpLoader`" msgstr ":class:`!pkgutil.ImpLoader`" -#: ../../whatsnew/3.11.rst:1905 +#: ../../whatsnew/3.11.rst:1904 msgid ":meth:`!pathlib.Path.link_to`" msgstr ":meth:`!pathlib.Path.link_to`" -#: ../../whatsnew/3.11.rst:1906 +#: ../../whatsnew/3.11.rst:1905 msgid ":func:`!sqlite3.enable_shared_cache`" msgstr ":func:`!sqlite3.enable_shared_cache`" -#: ../../whatsnew/3.11.rst:1907 +#: ../../whatsnew/3.11.rst:1906 msgid ":func:`!sqlite3.OptimizedUnicode`" msgstr ":func:`!sqlite3.OptimizedUnicode`" -#: ../../whatsnew/3.11.rst:1908 +#: ../../whatsnew/3.11.rst:1907 msgid ":envvar:`!PYTHONTHREADDEBUG` environment variable" msgstr ":envvar:`!PYTHONTHREADDEBUG` 環境變數" -#: ../../whatsnew/3.11.rst:1909 +#: ../../whatsnew/3.11.rst:1908 msgid "The following deprecated aliases in :mod:`unittest`:" msgstr ":mod:`unittest` 中被棄用的別名:" -#: ../../whatsnew/3.11.rst:1912 +#: ../../whatsnew/3.11.rst:1911 msgid "Deprecated alias" msgstr "已棄用的別名" -#: ../../whatsnew/3.11.rst:1912 +#: ../../whatsnew/3.11.rst:1911 msgid "Method Name" msgstr "方法名稱" -#: ../../whatsnew/3.11.rst:1912 +#: ../../whatsnew/3.11.rst:1911 msgid "Deprecated in" msgstr "棄用於" -#: ../../whatsnew/3.11.rst:1914 +#: ../../whatsnew/3.11.rst:1913 msgid "``failUnless``" msgstr "``failUnless``" -#: ../../whatsnew/3.11.rst:1914 ../../whatsnew/3.11.rst:1921 +#: ../../whatsnew/3.11.rst:1913 ../../whatsnew/3.11.rst:1920 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.11.rst:1914 ../../whatsnew/3.11.rst:1915 -#: ../../whatsnew/3.11.rst:1916 ../../whatsnew/3.11.rst:1917 -#: ../../whatsnew/3.11.rst:1918 ../../whatsnew/3.11.rst:1919 -#: ../../whatsnew/3.11.rst:1920 +#: ../../whatsnew/3.11.rst:1913 ../../whatsnew/3.11.rst:1914 +#: ../../whatsnew/3.11.rst:1915 ../../whatsnew/3.11.rst:1916 +#: ../../whatsnew/3.11.rst:1917 ../../whatsnew/3.11.rst:1918 +#: ../../whatsnew/3.11.rst:1919 msgid "3.1" msgstr "3.1" -#: ../../whatsnew/3.11.rst:1915 +#: ../../whatsnew/3.11.rst:1914 msgid "``failIf``" msgstr "``failIf``" -#: ../../whatsnew/3.11.rst:1915 +#: ../../whatsnew/3.11.rst:1914 msgid ":meth:`.assertFalse`" msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.11.rst:1916 +#: ../../whatsnew/3.11.rst:1915 msgid "``failUnlessEqual``" msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.11.rst:1916 ../../whatsnew/3.11.rst:1922 +#: ../../whatsnew/3.11.rst:1915 ../../whatsnew/3.11.rst:1921 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.11.rst:1917 +#: ../../whatsnew/3.11.rst:1916 msgid "``failIfEqual``" msgstr "``failIfEqual``" -#: ../../whatsnew/3.11.rst:1917 ../../whatsnew/3.11.rst:1923 +#: ../../whatsnew/3.11.rst:1916 ../../whatsnew/3.11.rst:1922 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.11.rst:1918 +#: ../../whatsnew/3.11.rst:1917 msgid "``failUnlessAlmostEqual``" msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.11.rst:1918 ../../whatsnew/3.11.rst:1924 +#: ../../whatsnew/3.11.rst:1917 ../../whatsnew/3.11.rst:1923 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.11.rst:1919 +#: ../../whatsnew/3.11.rst:1918 msgid "``failIfAlmostEqual``" msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.11.rst:1919 ../../whatsnew/3.11.rst:1925 +#: ../../whatsnew/3.11.rst:1918 ../../whatsnew/3.11.rst:1924 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.11.rst:1920 +#: ../../whatsnew/3.11.rst:1919 msgid "``failUnlessRaises``" msgstr "``failUnlessRaises``" -#: ../../whatsnew/3.11.rst:1920 +#: ../../whatsnew/3.11.rst:1919 msgid ":meth:`.assertRaises`" msgstr ":meth:`.assertRaises`" -#: ../../whatsnew/3.11.rst:1921 +#: ../../whatsnew/3.11.rst:1920 msgid "``assert_``" msgstr "``assert_``" -#: ../../whatsnew/3.11.rst:1921 ../../whatsnew/3.11.rst:1922 -#: ../../whatsnew/3.11.rst:1923 ../../whatsnew/3.11.rst:1924 -#: ../../whatsnew/3.11.rst:1925 ../../whatsnew/3.11.rst:1926 -#: ../../whatsnew/3.11.rst:1927 +#: ../../whatsnew/3.11.rst:1920 ../../whatsnew/3.11.rst:1921 +#: ../../whatsnew/3.11.rst:1922 ../../whatsnew/3.11.rst:1923 +#: ../../whatsnew/3.11.rst:1924 ../../whatsnew/3.11.rst:1925 +#: ../../whatsnew/3.11.rst:1926 msgid "3.2" msgstr "3.2" -#: ../../whatsnew/3.11.rst:1922 +#: ../../whatsnew/3.11.rst:1921 msgid "``assertEquals``" msgstr "``assertEquals``" -#: ../../whatsnew/3.11.rst:1923 +#: ../../whatsnew/3.11.rst:1922 msgid "``assertNotEquals``" msgstr "``assertNotEquals``" -#: ../../whatsnew/3.11.rst:1924 +#: ../../whatsnew/3.11.rst:1923 msgid "``assertAlmostEquals``" msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.11.rst:1925 +#: ../../whatsnew/3.11.rst:1924 msgid "``assertNotAlmostEquals``" msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.11.rst:1926 +#: ../../whatsnew/3.11.rst:1925 msgid "``assertRegexpMatches``" msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.11.rst:1926 +#: ../../whatsnew/3.11.rst:1925 msgid ":meth:`.assertRegex`" msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.11.rst:1927 +#: ../../whatsnew/3.11.rst:1926 msgid "``assertRaisesRegexp``" msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.11.rst:1927 +#: ../../whatsnew/3.11.rst:1926 msgid ":meth:`.assertRaisesRegex`" msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.11.rst:1928 +#: ../../whatsnew/3.11.rst:1927 msgid "``assertNotRegexpMatches``" msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.11.rst:1928 +#: ../../whatsnew/3.11.rst:1927 msgid ":meth:`.assertNotRegex`" msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.11.rst:1928 +#: ../../whatsnew/3.11.rst:1927 msgid "3.5" msgstr "3.5" -#: ../../whatsnew/3.11.rst:1935 ../../whatsnew/3.11.rst:2620 +#: ../../whatsnew/3.11.rst:1934 ../../whatsnew/3.11.rst:2619 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.11.rst:1937 +#: ../../whatsnew/3.11.rst:1936 msgid "This section lists Python APIs that have been removed in Python 3.11." msgstr "此部分列出 Python 3.11 中移除的 Python API。" -#: ../../whatsnew/3.11.rst:1939 +#: ../../whatsnew/3.11.rst:1938 msgid "" "Removed C APIs are :ref:`listed separately `." msgstr "被移除的 C API 被\\ :ref:`獨立列出 `。" -#: ../../whatsnew/3.11.rst:1941 +#: ../../whatsnew/3.11.rst:1940 msgid "" "Removed the :func:`!@asyncio.coroutine` :term:`decorator` enabling legacy " "generator-based coroutines to be compatible with :keyword:`async` / :keyword:" @@ -3633,7 +3631,7 @@ msgstr "" "相容。該函式自 Python 3.8 起已被棄用,計劃於 Python 3.10 刪除。請改用 :" "keyword:`async def`。(由 Illia Volochii 在 :issue:`43216` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1948 +#: ../../whatsnew/3.11.rst:1947 msgid "" "Removed :class:`!asyncio.coroutines.CoroWrapper` used for wrapping legacy " "generator-based coroutine objects in the debug mode. (Contributed by Illia " @@ -3642,7 +3640,7 @@ msgstr "" "移除除錯模式中用於包裝遺留基於產生器之協程物件的 :class:`!asyncio.coroutines." "CoroWrapper`。(由 Illia Volochii 於 :issue:`43216` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1952 +#: ../../whatsnew/3.11.rst:1951 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint`, disabled in Python 3.9, is now " @@ -3655,7 +3653,7 @@ msgstr "" "socket 選項 ``SO_REUSEADDR`` 的行為所致。(由 Hugo van Kemenade 於 :issue:" "`45129` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1958 +#: ../../whatsnew/3.11.rst:1957 msgid "" "Removed the :mod:`!binhex` module, deprecated in Python 3.9. Also removed " "the related, similarly-deprecated :mod:`binascii` functions:" @@ -3663,31 +3661,31 @@ msgstr "" "移除 Python 3.9 中棄用的 :mod:`!binhex` 模組,與其相關且相似的 :mod:" "`binascii` 函式也一併被移除:" -#: ../../whatsnew/3.11.rst:1961 +#: ../../whatsnew/3.11.rst:1960 msgid ":func:`!binascii.a2b_hqx`" msgstr ":func:`!binascii.a2b_hqx`" -#: ../../whatsnew/3.11.rst:1962 +#: ../../whatsnew/3.11.rst:1961 msgid ":func:`!binascii.b2a_hqx`" msgstr ":func:`!binascii.b2a_hqx`" -#: ../../whatsnew/3.11.rst:1963 +#: ../../whatsnew/3.11.rst:1962 msgid ":func:`!binascii.rlecode_hqx`" msgstr ":func:`!binascii.rlecode_hqx`" -#: ../../whatsnew/3.11.rst:1964 +#: ../../whatsnew/3.11.rst:1963 msgid ":func:`!binascii.rldecode_hqx`" msgstr ":func:`!binascii.rldecode_hqx`" -#: ../../whatsnew/3.11.rst:1966 +#: ../../whatsnew/3.11.rst:1965 msgid "The :func:`binascii.crc_hqx` function remains available." msgstr ":func:`binascii.crc_hqx` 維持可用。" -#: ../../whatsnew/3.11.rst:1968 +#: ../../whatsnew/3.11.rst:1967 msgid "(Contributed by Victor Stinner in :issue:`45085`.)" msgstr "(由 Victor Stinner 於 :issue:`45085` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:1970 +#: ../../whatsnew/3.11.rst:1969 msgid "" "Removed the :mod:`!distutils` ``bdist_msi`` command deprecated in Python " "3.9. Use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo van " @@ -3697,7 +3695,7 @@ msgstr "" "``bdist_wheel``\\ (wheel 套件)。(由 Hugo van Kemenade 於 :issue:`45124` 中" "貢獻。)" -#: ../../whatsnew/3.11.rst:1974 +#: ../../whatsnew/3.11.rst:1973 msgid "" "Removed the :meth:`~object.__getitem__` methods of :class:`xml.dom.pulldom." "DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput." @@ -3709,7 +3707,7 @@ msgstr "" "`~object.__getitem__` 方法移除。(由 Hugo van Kemenade 在 :issue:`45132` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:1979 +#: ../../whatsnew/3.11.rst:1978 msgid "" "Removed the deprecated :mod:`gettext` functions :func:`!lgettext`, :func:`!" "ldgettext`, :func:`!lngettext` and :func:`!ldngettext`. Also removed the :" @@ -3726,11 +3724,11 @@ msgstr "" "和 :func:`!install` 的 *codeset* 參數,因為它們僅被用於 :func:`!l*gettext` 函" "式。 (由 Donghee Na 和 Serhiy Storchaka 在 :issue:`44235` 中貢獻。)" -#: ../../whatsnew/3.11.rst:1989 +#: ../../whatsnew/3.11.rst:1988 msgid "Removed from the :mod:`inspect` module:" msgstr "於 :mod:`inspect` 模組中移除:" -#: ../../whatsnew/3.11.rst:1991 +#: ../../whatsnew/3.11.rst:1990 msgid "" "The :func:`!getargspec` function, deprecated since Python 3.0; use :func:" "`inspect.signature` or :func:`inspect.getfullargspec` instead." @@ -3738,7 +3736,7 @@ msgstr "" "Python 3.0 中棄用的 :func:`!getargspec`;改用 :func:`inspect.signature` 或 :" "func:`inspect.getfullargspec`。" -#: ../../whatsnew/3.11.rst:1994 +#: ../../whatsnew/3.11.rst:1993 msgid "" "The :func:`!formatargspec` function, deprecated since Python 3.5; use the :" "func:`inspect.signature` function or the :class:`inspect.Signature` object " @@ -3747,7 +3745,7 @@ msgstr "" "Python 3.5 中棄用的 :func:`!formatargspec` 函式;請直接用 :func:`inspect." "signature` 函式或 :class:`inspect.Signature` 物件。" -#: ../../whatsnew/3.11.rst:1998 +#: ../../whatsnew/3.11.rst:1997 msgid "" "The undocumented :meth:`!Signature.from_builtin` and :meth:`!Signature." "from_function` methods, deprecated since Python 3.5; use the :meth:" @@ -3757,11 +3755,11 @@ msgstr "" "meth:`!Signature.from_function` 方法;改用 :meth:`Signature.from_callable() " "` 方法。" -#: ../../whatsnew/3.11.rst:2003 +#: ../../whatsnew/3.11.rst:2002 msgid "(Contributed by Hugo van Kemenade in :issue:`45320`.)" msgstr "(由 Hugo van Kemenade 於 :issue:`45320` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2005 +#: ../../whatsnew/3.11.rst:2004 msgid "" "Removed the :meth:`~object.__class_getitem__` method from :class:`pathlib." "PurePath`, because it was not used and added by mistake in previous " @@ -3771,7 +3769,7 @@ msgstr "" "因為它是前一版本中誤加且沒被使用。(由 Nikita Sobolev 於 :issue:`46483` 中所" "貢獻。)" -#: ../../whatsnew/3.11.rst:2010 +#: ../../whatsnew/3.11.rst:2009 msgid "" "Removed the :class:`!MailmanProxy` class in the :mod:`!smtpd` module, as it " "is unusable without the external :mod:`!mailman` package. (Contributed by " @@ -3780,7 +3778,7 @@ msgstr "" "移除 :mod:`!smtpd` 模組中的 :class:`!MailmanProxy` 類別,因為它無法獨立於外部" "套件 :mod:`!mailman` 使用。(由 Donghee Na 於 :issue:`35800` 貢獻。)" -#: ../../whatsnew/3.11.rst:2014 +#: ../../whatsnew/3.11.rst:2013 msgid "" "Removed the deprecated :meth:`!split` method of :class:`!_tkinter." "TkappType`. (Contributed by Erlend E. Aasland in :issue:`38371`.)" @@ -3788,7 +3786,7 @@ msgstr "" "移除 :class:`!_tkinter.TkappType` 已被棄用的 :meth:`!split` 方法。(由 " "Erlend E. Aasland 於 :issue:`38371` 貢獻。)" -#: ../../whatsnew/3.11.rst:2017 +#: ../../whatsnew/3.11.rst:2016 msgid "" "Removed namespace package support from :mod:`unittest` discovery. It was " "introduced in Python 3.4 but has been broken since Python 3.7. (Contributed " @@ -3797,7 +3795,7 @@ msgstr "" "從 :mod:`unittest` 中刪除了命名空間套件支援。它在 Python 3.4 中引入,但自 " "Python 3.7 以來已無法運作。(由 Inada Naoki 在 :issue:`23882` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2021 +#: ../../whatsnew/3.11.rst:2020 msgid "" "Removed the undocumented private :meth:`!float.__set_format__()` method, " "previously known as :meth:`!float.__setformat__()` in Python 3.7. Its " @@ -3810,7 +3808,7 @@ msgstr "" "到:「你大概不會想要使用這個函式,它只為了讓 Python 測試系列套件 (suite) 使用" "而存在。」(由 Victor Stinner 於 :issue:`46852` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2027 +#: ../../whatsnew/3.11.rst:2026 msgid "" "The :option:`!--experimental-isolated-subinterpreters` configure flag (and " "corresponding :c:macro:`!EXPERIMENTAL_ISOLATED_SUBINTERPRETERS` macro) have " @@ -3819,22 +3817,21 @@ msgstr "" "移除 :option:`!--experimental-isolated-subinterpreters` 配置旗標(與對應的 :" "c:macro:`!EXPERIMENTAL_ISOLATED_SUBINTERPRETERS` 巨集)。" -#: ../../whatsnew/3.11.rst:2031 +#: ../../whatsnew/3.11.rst:2030 msgid "" -"`Pynche `_ --- The Pythonically Natural " -"Color and Hue Editor --- has been moved out of ``Tools/scripts`` and is " -"`being developed independently `_ from the Python source tree." +":pypi:`Pynche` --- The Pythonically Natural Color and Hue Editor --- has " +"been moved out of ``Tools/scripts`` and is `being developed independently " +"`_ from the Python source tree." msgstr "" -"`Pynche `_ --- Python 風格的自然色彩與色調" -"編輯器 --- 已被移出 ``Tools/scripts``,`獨立開發 `_\\ 於 Python 原始碼之外。" +":pypi:`Pynche` --- Python 風格的自然色彩與色調編輯器 --- 已被移出 ``Tools/" +"scripts``,`獨立開發 `_\\ 於 " +"Python 原始碼之外。" -#: ../../whatsnew/3.11.rst:2041 ../../whatsnew/3.11.rst:2263 +#: ../../whatsnew/3.11.rst:2040 ../../whatsnew/3.11.rst:2262 msgid "Porting to Python 3.11" msgstr "移植至 Python 3.11" -#: ../../whatsnew/3.11.rst:2043 +#: ../../whatsnew/3.11.rst:2042 msgid "" "This section lists previously described changes and other bugfixes in the " "Python API that may require changes to your Python code." @@ -3842,13 +3839,13 @@ msgstr "" "本部分列出了之前描述的 Python API 中可能需要你去更改 Python 程式碼的變更和其" "他錯誤修復。" -#: ../../whatsnew/3.11.rst:2046 +#: ../../whatsnew/3.11.rst:2045 msgid "" "Porting notes for the C API are :ref:`listed separately `." msgstr "C API 的移植被\\ :ref:`獨立列出 `。" -#: ../../whatsnew/3.11.rst:2049 +#: ../../whatsnew/3.11.rst:2048 msgid "" ":func:`open`, :func:`io.open`, :func:`codecs.open` and :class:`fileinput." "FileInput` no longer accept ``'U'`` (\"universal newline\") in the file " @@ -3865,7 +3862,7 @@ msgstr "" "ref:`newline 參數 `\\ 控制了通用換行符的作用方式。" "(由 Victor Stinner 在 :issue:`37330` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2058 +#: ../../whatsnew/3.11.rst:2057 msgid "" ":class:`ast.AST` node positions are now validated when provided to :func:" "`compile` and other related functions. If invalid positions are detected, a :" @@ -3876,7 +3873,7 @@ msgstr "" "證。如果檢測到無效位置,則會引發 :exc:`ValueError`。(由 Pablo Galindo 在 :" "gh:`93351` 中貢獻)" -#: ../../whatsnew/3.11.rst:2062 +#: ../../whatsnew/3.11.rst:2061 msgid "" "Prohibited passing non-:class:`concurrent.futures.ThreadPoolExecutor` " "executors to :meth:`asyncio.loop.set_default_executor` following a " @@ -3886,7 +3883,7 @@ msgstr "" "ThreadPoolExecutor` 執行器傳遞給 :meth:`asyncio.loop.set_default_executor`。" "(由 Illia Volochii 在 :issue:`43234` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2067 +#: ../../whatsnew/3.11.rst:2066 msgid "" ":mod:`calendar`: The :class:`calendar.LocaleTextCalendar` and :class:" "`calendar.LocaleHTMLCalendar` classes now use :func:`locale.getlocale`, " @@ -3898,7 +3895,7 @@ msgstr "" "getlocale` 而非 :func:`locale.getdefaultlocale`。(由 Victor Stinner 在 :" "issue:`46659` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2073 +#: ../../whatsnew/3.11.rst:2072 msgid "" "The :mod:`pdb` module now reads the :file:`.pdbrc` configuration file with " "the ``'UTF-8'`` encoding. (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ " @@ -3907,7 +3904,7 @@ msgstr "" ":mod:`pdb` 模組現在會讀取 ``'UTF-8'`` 編碼的 :file:`.pdbrc` 配置檔案。" "(Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 於 :issue:`41137` 貢獻。)" -#: ../../whatsnew/3.11.rst:2077 +#: ../../whatsnew/3.11.rst:2076 msgid "" "The *population* parameter of :func:`random.sample` must be a sequence, and " "automatic conversion of :class:`set`\\s to :class:`list`\\s is no longer " @@ -3919,7 +3916,7 @@ msgstr "" "`set` 到 :class:`list` 的自動轉換。此外,如果抽樣大小大於總體大小,則會引發 :" "exc:`ValueError`。(由 Raymond Hettinger 在 :issue:`40465` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2083 +#: ../../whatsnew/3.11.rst:2082 msgid "" "The *random* optional parameter of :func:`random.shuffle` was removed. It " "was previously an arbitrary random function to use for the shuffle; now, :" @@ -3929,7 +3926,7 @@ msgstr "" "(shuffle) 的任意隨機函式;現在都會使用 :func:`random.random`\\ (這是它以前的" "預設值)。" -#: ../../whatsnew/3.11.rst:2087 +#: ../../whatsnew/3.11.rst:2086 msgid "" "In :mod:`re` :ref:`re-syntax`, global inline flags (e.g. ``(?i)``) can now " "only be used at the start of regular expressions. Using them elsewhere has " @@ -3940,7 +3937,7 @@ msgstr "" "運算式的開頭使用。自 Python 3.6 以來,在其他地方使用它們已被棄用。 (由 " "Serhiy Storchaka 在 :issue:`47066` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2092 +#: ../../whatsnew/3.11.rst:2091 msgid "" "In the :mod:`re` module, several long-standing bugs where fixed that, in " "rare cases, could cause capture groups to get the wrong result. Therefore, " @@ -3951,11 +3948,11 @@ msgstr "" "致捕獲群組 (capture group) 得到錯誤的結果。因此,這可能會在這些情況下更改捕獲" "的輸出。(Ma Lin 在 :issue:`35859` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2101 +#: ../../whatsnew/3.11.rst:2100 msgid "Build Changes" msgstr "建置變更" -#: ../../whatsnew/3.11.rst:2103 +#: ../../whatsnew/3.11.rst:2102 msgid "" "CPython now has :pep:`11` :pep:`Tier 3 support <11#tier-3>` for cross " "compiling to the `WebAssembly `_ platforms " @@ -3979,11 +3976,11 @@ msgstr "" "Christian Heimes 和 Ethan Smith 在 :gh:`84461` 貢獻,WASI 由 Christian " "Heimes 在 :gh:`90473` 貢獻;平台在 :gh:`95085` 中推廣)" -#: ../../whatsnew/3.11.rst:2117 +#: ../../whatsnew/3.11.rst:2116 msgid "Building CPython now requires:" msgstr "建置 CPython 現在必須要有:" -#: ../../whatsnew/3.11.rst:2119 +#: ../../whatsnew/3.11.rst:2118 msgid "" "A `C11 `_ compiler and standard library. " "`Optional C11 features `_ 並非必要。(由 Victor Stinner " "於 :issue:`46656`、:issue:`45440` 和 :issue:`46640` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2126 +#: ../../whatsnew/3.11.rst:2125 msgid "" "Support for `IEEE 754 `_ floating " "point numbers. (Contributed by Victor Stinner in :issue:`46917`.)" @@ -4004,7 +4001,7 @@ msgstr "" "對 `IEEE 754 `_ 浮點數的支援(由 " "Victor Stinner 於 :issue:`46917` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2130 +#: ../../whatsnew/3.11.rst:2129 msgid "" "The :c:macro:`!Py_NO_NAN` macro has been removed. Since CPython now requires " "IEEE 754 floats, NaN values are always available. (Contributed by Victor " @@ -4013,7 +4010,7 @@ msgstr "" ":c:macro:`!Py_NO_NAN` 巨集已被移除。因為 CPython 現在需要 IEEE 754 浮點數," "NaN 數值皆為可得的。(由 Victor Stinner 在 :issue:`46656` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2134 +#: ../../whatsnew/3.11.rst:2133 msgid "" "The :mod:`tkinter` package now requires `Tcl/Tk `_ " "version 8.5.12 or newer. (Contributed by Serhiy Storchaka in :issue:`46996`.)" @@ -4021,7 +4018,7 @@ msgstr "" ":mod:`tkinter` 套件現在必須要有 `Tcl/Tk `_ 8.5.12 或更新" "的版本。(由 Serhiy Storchaka 於 :issue:`46996` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2138 +#: ../../whatsnew/3.11.rst:2137 msgid "" "Build dependencies, compiler flags, and linker flags for most stdlib " "extension modules are now detected by :program:`configure`. libffi, libnsl, " @@ -4040,7 +4037,7 @@ msgstr "" "和函式庫的開發設定。(由 Christian Heimes 和 Erlend Egeberg Aasland 在 :" "issue:`45847`、:issue:`45747` 和 :issue:`45763` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2148 +#: ../../whatsnew/3.11.rst:2147 msgid "" "libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert " "in :issue:`45433`.)" @@ -4048,7 +4045,7 @@ msgstr "" "libpython 不再鏈接到 libcrypt。 (由 Mike Gilbert 在 :issue:`45433` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:2151 +#: ../../whatsnew/3.11.rst:2150 msgid "" "CPython can now be built with the `ThinLTO `_ option via passing ``thin`` to :option:`--with-lto`, i.e. " @@ -4060,7 +4057,7 @@ msgstr "" "html>`_ 選項建置。(由 Donghee Na 與 Brett Holman 於 :issue:`44340` 中所貢" "獻。)" -#: ../../whatsnew/3.11.rst:2156 +#: ../../whatsnew/3.11.rst:2155 msgid "" "Freelists for object structs can now be disabled. A new :program:`configure` " "option :option:`--without-freelists` can be used to disable all freelists " @@ -4068,7 +4065,7 @@ msgid "" "`45522`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2161 +#: ../../whatsnew/3.11.rst:2160 msgid "" "``Modules/Setup`` and ``Modules/makesetup`` have been improved and tied up. " "Extension modules can now be built through ``makesetup``. All except some " @@ -4081,7 +4078,7 @@ msgstr "" "的二進制文件或函式庫中。(由 Brett Cannon 和 Christian Heimes 在 :issue:" "`45548`、:issue:`45570`、:issue:`45571` 和 :issue:`43974` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2168 +#: ../../whatsnew/3.11.rst:2167 msgid "" "Use the environment variables :envvar:`!TCLTK_CFLAGS` and :envvar:`!" "TCLTK_LIBS` to manually specify the location of Tcl/Tk headers and " @@ -4092,7 +4089,7 @@ msgstr "" "Tk 標頭檔和函式庫的位置。:program:`configure` 選項 :option:`!—with-tcltk-" "includes` 和 :option:`!—with-tcltk-libs` 已被刪除。" -#: ../../whatsnew/3.11.rst:2174 +#: ../../whatsnew/3.11.rst:2173 msgid "" "On RHEL 7 and CentOS 7 the development packages do not provide ``tcl.pc`` " "and ``tk.pc``; use ``TCLTK_LIBS=\"-ltk8.5 -ltkstub8.5 -ltcl8.5\"``. The " @@ -4104,7 +4101,7 @@ msgstr "" "pc`` 檔案與如何使用 RHEL 7 和 CentOS 7 的 Tcl/Tk 與 OpenSSL 建置 Python 的指" "示。" -#: ../../whatsnew/3.11.rst:2179 +#: ../../whatsnew/3.11.rst:2178 msgid "" "CPython will now use 30-bit digits by default for the Python :class:`int` " "implementation. Previously, the default was to use 30-bit digits on " @@ -4122,11 +4119,11 @@ msgstr "" "此選項可能會在將來的某個時候被刪除。 (由 Mark Dickinson 在 :issue:`45569` 中" "貢獻。)" -#: ../../whatsnew/3.11.rst:2192 +#: ../../whatsnew/3.11.rst:2191 msgid "C API Changes" msgstr "C API 變更" -#: ../../whatsnew/3.11.rst:2199 +#: ../../whatsnew/3.11.rst:2198 msgid "" "Add a new :c:func:`PyType_GetName` function to get type's short name. " "(Contributed by Hai Shi in :issue:`42035`.)" @@ -4134,7 +4131,7 @@ msgstr "" "新增 :c:func:`PyType_GetName` 函式來取得型別的短名。(由 Hai Shi 於 :issue:" "`42035` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2202 +#: ../../whatsnew/3.11.rst:2201 msgid "" "Add a new :c:func:`PyType_GetQualName` function to get type's qualified " "name. (Contributed by Hai Shi in :issue:`42035`.)" @@ -4142,7 +4139,7 @@ msgstr "" "新增 :c:func:`PyType_GetQualName` 函式來取得型別的合格名稱 (qualified name)。" "(由 Hai Shi 於 :issue:`42035` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2205 +#: ../../whatsnew/3.11.rst:2204 msgid "" "Add new :c:func:`PyThreadState_EnterTracing` and :c:func:" "`PyThreadState_LeaveTracing` functions to the limited C API to suspend and " @@ -4153,7 +4150,7 @@ msgstr "" "c:func:`PyThreadState_LeaveTracing` 函式來中止和繼續追蹤 (tracing) 和性能分" "析 (profiling)。(由 Victor Stinner 於 :issue:`43760` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2210 +#: ../../whatsnew/3.11.rst:2209 msgid "" "Added the :c:data:`Py_Version` constant which bears the same value as :c:" "macro:`PY_VERSION_HEX`. (Contributed by Gabriele N. Tornetta in :issue:" @@ -4162,61 +4159,61 @@ msgstr "" "添加了 :c:data:`Py_Version` 常數,其值與 :c:macro:`PY_VERSION_HEX` 相同。" "(由 Gabriele N. Tornetta 在 :issue:`43931` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2214 +#: ../../whatsnew/3.11.rst:2213 msgid "" ":c:type:`Py_buffer` and APIs are now part of the limited API and the stable " "ABI:" msgstr ":c:type:`Py_buffer` 與 API 目前是受限 API 與穩定 ABI 中的一部分:" -#: ../../whatsnew/3.11.rst:2217 +#: ../../whatsnew/3.11.rst:2216 msgid ":c:func:`PyObject_CheckBuffer`" msgstr ":c:func:`PyObject_CheckBuffer`" -#: ../../whatsnew/3.11.rst:2218 +#: ../../whatsnew/3.11.rst:2217 msgid ":c:func:`PyObject_GetBuffer`" msgstr ":c:func:`PyObject_GetBuffer`" -#: ../../whatsnew/3.11.rst:2219 +#: ../../whatsnew/3.11.rst:2218 msgid ":c:func:`PyBuffer_GetPointer`" msgstr ":c:func:`PyBuffer_GetPointer`" -#: ../../whatsnew/3.11.rst:2220 +#: ../../whatsnew/3.11.rst:2219 msgid ":c:func:`PyBuffer_SizeFromFormat`" msgstr ":c:func:`PyBuffer_SizeFromFormat`" -#: ../../whatsnew/3.11.rst:2221 +#: ../../whatsnew/3.11.rst:2220 msgid ":c:func:`PyBuffer_ToContiguous`" msgstr ":c:func:`PyBuffer_ToContiguous`" -#: ../../whatsnew/3.11.rst:2222 +#: ../../whatsnew/3.11.rst:2221 msgid ":c:func:`PyBuffer_FromContiguous`" msgstr ":c:func:`PyBuffer_FromContiguous`" -#: ../../whatsnew/3.11.rst:2223 +#: ../../whatsnew/3.11.rst:2222 msgid ":c:func:`PyObject_CopyData`" msgstr ":c:func:`PyObject_CopyData`" -#: ../../whatsnew/3.11.rst:2224 +#: ../../whatsnew/3.11.rst:2223 msgid ":c:func:`PyBuffer_IsContiguous`" msgstr ":c:func:`PyBuffer_IsContiguous`" -#: ../../whatsnew/3.11.rst:2225 +#: ../../whatsnew/3.11.rst:2224 msgid ":c:func:`PyBuffer_FillContiguousStrides`" msgstr ":c:func:`PyBuffer_FillContiguousStrides`" -#: ../../whatsnew/3.11.rst:2226 +#: ../../whatsnew/3.11.rst:2225 msgid ":c:func:`PyBuffer_FillInfo`" msgstr ":c:func:`PyBuffer_FillInfo`" -#: ../../whatsnew/3.11.rst:2227 +#: ../../whatsnew/3.11.rst:2226 msgid ":c:func:`PyBuffer_Release`" msgstr ":c:func:`PyBuffer_Release`" -#: ../../whatsnew/3.11.rst:2228 +#: ../../whatsnew/3.11.rst:2227 msgid ":c:func:`PyMemoryView_FromBuffer`" msgstr ":c:func:`PyMemoryView_FromBuffer`" -#: ../../whatsnew/3.11.rst:2229 +#: ../../whatsnew/3.11.rst:2228 msgid "" ":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." "bf_releasebuffer` type slots" @@ -4224,11 +4221,11 @@ msgstr "" ":c:member:`~PyBufferProcs.bf_getbuffer` 與 :c:member:`~PyBufferProcs." "bf_releasebuffer` 型別插槽 (type slot)" -#: ../../whatsnew/3.11.rst:2232 +#: ../../whatsnew/3.11.rst:2231 msgid "(Contributed by Christian Heimes in :issue:`45459`.)" msgstr "(由 Christian Heimes 於 :issue:`45459` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2234 +#: ../../whatsnew/3.11.rst:2233 msgid "" "Added the :c:func:`PyType_GetModuleByDef` function, used to get the module " "in which a method was defined, in cases where this information is not " @@ -4239,7 +4236,7 @@ msgstr "" "以免這項資訊無法直接被取得(透過 :c:type:`PyCMethod`)。(由 Petr Viktorin " "於 :issue:`46613` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2239 +#: ../../whatsnew/3.11.rst:2238 msgid "" "Add new functions to pack and unpack C double (serialize and deserialize): :" "c:func:`PyFloat_Pack2`, :c:func:`PyFloat_Pack4`, :c:func:`PyFloat_Pack8`, :c:" @@ -4251,7 +4248,7 @@ msgstr "" "`PyFloat_Unpack2` , :c:func:`PyFloat_Unpack4` 和 :c:func:`PyFloat_Unpack8`。" "(由 Victor Stinner 在 :issue:`46906` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2245 +#: ../../whatsnew/3.11.rst:2244 msgid "" "Add new functions to get frame object attributes: :c:func:" "`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`, :c:func:" @@ -4261,7 +4258,7 @@ msgstr "" "`PyFrame_GetGenerator`、:c:func:`PyFrame_GetGlobals`、:c:func:" "`PyFrame_GetLasti`。" -#: ../../whatsnew/3.11.rst:2249 +#: ../../whatsnew/3.11.rst:2248 msgid "" "Added two new functions to get and set the active exception instance: :c:" "func:`PyErr_GetHandledException` and :c:func:`PyErr_SetHandledException`. " @@ -4275,7 +4272,7 @@ msgstr "" "例外的遺留三元組表示法一起作用。(由 Irit Katriel 在 :issue:`46343` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:2256 +#: ../../whatsnew/3.11.rst:2255 msgid "" "Added the :c:member:`PyConfig.safe_path` member. (Contributed by Victor " "Stinner in :gh:`57684`.)" @@ -4283,7 +4280,7 @@ msgstr "" "新增 :c:member:`PyConfig.safe_path` 成員。(由 Victor Stinner 於 :gh:`57684` " "中所貢獻。)" -#: ../../whatsnew/3.11.rst:2267 +#: ../../whatsnew/3.11.rst:2266 msgid "" "Some macros have been converted to static inline functions to avoid `macro " "pitfalls `_. The " @@ -4301,7 +4298,7 @@ msgstr "" "要將引數轉換為他們期望的型別。有關更多詳細資訊,請參閱 :pep:`670`。 (由 " "Victor Stinner 和 Erlend E. Aasland 在 :gh:`89653` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2278 +#: ../../whatsnew/3.11.rst:2277 msgid "" ":c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback`` " "arguments, the interpreter now derives those values from the exception " @@ -4312,7 +4309,7 @@ msgstr "" "現在從例外實例(``value`` 引數)中獲得這些值。該函式仍會偷用這三個引數的參" "照。(由 Irit Katriel 在 :issue:`45711` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2284 +#: ../../whatsnew/3.11.rst:2283 msgid "" ":c:func:`PyErr_GetExcInfo()` now derives the ``type`` and ``traceback`` " "fields of the result from the exception instance (the ``value`` field). " @@ -4322,7 +4319,7 @@ msgstr "" "``type`` 和 ``traceback`` 欄位。(由 Irit Katriel 在 :issue:`45711` 中貢" "獻。)" -#: ../../whatsnew/3.11.rst:2288 +#: ../../whatsnew/3.11.rst:2287 msgid "" ":c:struct:`_frozen` has a new ``is_package`` field to indicate whether or " "not the frozen module is a package. Previously, a negative value in the " @@ -4333,7 +4330,7 @@ msgstr "" "件。以前 ``size`` 欄位中的負值是指標,現在只有非負值可用於 ``size``。 (由 " "Kumar Aditya 在 :issue:`46608` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2294 +#: ../../whatsnew/3.11.rst:2293 msgid "" ":c:func:`_PyFrameEvalFunction` now takes ``_PyInterpreterFrame*`` as its " "second parameter, instead of ``PyFrameObject*``. See :pep:`523` for more " @@ -4343,7 +4340,7 @@ msgstr "" "數,而不是 ``PyFrameObject*``。有關如何使用此函式指標型別的更多詳細資訊,請參" "閱 :pep:`523`。" -#: ../../whatsnew/3.11.rst:2298 +#: ../../whatsnew/3.11.rst:2297 msgid "" ":c:func:`!PyCode_New` and :c:func:`!PyCode_NewWithPosOnlyArgs` now take an " "additional ``exception_table`` argument. Using these functions should be " @@ -4356,7 +4353,7 @@ msgstr "" "碼物件,使用編譯器建立一個程式碼物件,然後使用 ``replace`` 方法來得到修改後的" "版本。" -#: ../../whatsnew/3.11.rst:2304 +#: ../../whatsnew/3.11.rst:2303 msgid "" ":c:type:`PyCodeObject` no longer has the ``co_code``, ``co_varnames``, " "``co_cellvars`` and ``co_freevars`` fields. Instead, use :c:func:" @@ -4371,7 +4368,7 @@ msgstr "" "和 :c:func:`PyCode_GetFreevars` 來存取。(由 Brandt Bucher 在 :issue:" "`46841`、Ken Jin 在 :gh:`92154` 與 :gh:`94936` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2312 +#: ../../whatsnew/3.11.rst:2311 msgid "" "The old trashcan macros (``Py_TRASHCAN_SAFE_BEGIN``/" "``Py_TRASHCAN_SAFE_END``) are now deprecated. They should be replaced by the " @@ -4381,15 +4378,15 @@ msgstr "" "``Py_TRASHCAN_SAFE_END``) 現在已經被棄用,它們應被新的巨集 " "``Py_TRASHCAN_BEGIN`` 和 ``Py_TRASHCAN_END`` 所取代。" -#: ../../whatsnew/3.11.rst:2316 +#: ../../whatsnew/3.11.rst:2315 msgid "A tp_dealloc function that has the old macros, such as::" msgstr "一個用到老舊巨集的 tp_dealloc 函式,像是: ::" -#: ../../whatsnew/3.11.rst:2327 +#: ../../whatsnew/3.11.rst:2326 msgid "should migrate to the new macros as follows::" msgstr "應該要搬遷到新的巨集,如下所示: ::" -#: ../../whatsnew/3.11.rst:2338 +#: ../../whatsnew/3.11.rst:2337 msgid "" "Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " "deallocation function it is in." @@ -4397,7 +4394,7 @@ msgstr "" "請注意 ``Py_TRASHCAN_BEGIN`` 有第二個引數,它應該是它所在的釋放函式 " "(deallocation function)。" -#: ../../whatsnew/3.11.rst:2341 +#: ../../whatsnew/3.11.rst:2340 msgid "" "To support older Python versions in the same codebase, you can define the " "following macros and use them throughout the code (credit: these were copied " @@ -4406,7 +4403,7 @@ msgstr "" "為支援舊版 Python 在同一份程式碼中,你可以定義以下巨集並在程式碼中使用它們" "(要歸功於 ``mypy`` 程式碼,這些是從那邊複製過來的): ::" -#: ../../whatsnew/3.11.rst:2353 +#: ../../whatsnew/3.11.rst:2352 msgid "" "The :c:func:`PyType_Ready` function now raises an error if a type is defined " "with the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function " @@ -4418,7 +4415,7 @@ msgstr "" "`PyType_Ready` 函式現在會引發一個錯誤。(由 Victor Stinner 於 :issue:`44263` " "中貢獻。)" -#: ../../whatsnew/3.11.rst:2358 +#: ../../whatsnew/3.11.rst:2357 msgid "" "Heap types with the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit " "the :pep:`590` vectorcall protocol. Previously, this was only possible for :" @@ -4429,7 +4426,7 @@ msgstr "" "`590` 向量呼叫協定 (vectorcall protocol)。以前這僅適用於 :ref:`static types " "`。(由 Erlend E. Aasland 在 :issue:`43908` 中貢獻)。" -#: ../../whatsnew/3.11.rst:2363 +#: ../../whatsnew/3.11.rst:2362 msgid "" "Since :c:func:`Py_TYPE()` is changed to a inline static function, " "``Py_TYPE(obj) = new_type`` must be replaced with ``Py_SET_TYPE(obj, " @@ -4441,11 +4438,11 @@ msgstr "" "c:func:`Py_SET_TYPE()` 函式(自 Python 3.9 起可用)。為了向後相容,可以使用這" "個巨集:" -#: ../../whatsnew/3.11.rst:2375 ../../whatsnew/3.11.rst:2389 +#: ../../whatsnew/3.11.rst:2374 ../../whatsnew/3.11.rst:2388 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "(由 Victor Stinner 於 :issue:`39573` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2377 +#: ../../whatsnew/3.11.rst:2376 msgid "" "Since :c:func:`Py_SIZE()` is changed to a inline static function, " "``Py_SIZE(obj) = new_size`` must be replaced with ``Py_SET_SIZE(obj, " @@ -4457,7 +4454,7 @@ msgstr "" "`Py_SET_SIZE()` 函式(自 Python 3.9 起可用)。為了向後相容,可以使用這個巨" "集:" -#: ../../whatsnew/3.11.rst:2391 +#: ../../whatsnew/3.11.rst:2390 msgid "" "```` no longer includes the header files ````, ````, ```` and ```` when the ``Py_LIMITED_API`` macro is " @@ -4470,7 +4467,7 @@ msgstr "" "和 ````。C 擴充程式應該要清楚的在 ``#include `` 之後引入" "標頭檔案。(由 Victor Stinner 於 :issue:`45434` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2397 +#: ../../whatsnew/3.11.rst:2396 msgid "" "The non-limited API files ``cellobject.h``, ``classobject.h``, ``code.h``, " "``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have " @@ -4487,7 +4484,7 @@ msgstr "" "檔案 `。如果它們已被直接引入,請考慮改為引入 ``Python.h``。 " "(由 Victor Stinner 在 :issue:`35134` 中貢獻。)" -#: ../../whatsnew/3.11.rst:2405 +#: ../../whatsnew/3.11.rst:2404 msgid "" "The :c:func:`!PyUnicode_CHECK_INTERNED` macro has been excluded from the " "limited C API. It was never usable there, because it used internal " @@ -4498,7 +4495,7 @@ msgstr "" "使用,因為它使用了受限 C API 不提供的內部結構。(由 Victor Stinner 於 :issue:" "`46007` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2410 +#: ../../whatsnew/3.11.rst:2409 msgid "" "The following frame functions and type are now directly available with " "``#include ``, it's no longer needed to add ``#include " @@ -4507,49 +4504,49 @@ msgstr "" "以下用於幀 (frame) 的函式與型別現在可直接透過 ``#include `` 來使" "用,不必再加上 ``#include ``:" -#: ../../whatsnew/3.11.rst:2414 +#: ../../whatsnew/3.11.rst:2413 msgid ":c:func:`PyFrame_Check`" msgstr ":c:func:`PyFrame_Check`" -#: ../../whatsnew/3.11.rst:2415 +#: ../../whatsnew/3.11.rst:2414 msgid ":c:func:`PyFrame_GetBack`" msgstr ":c:func:`PyFrame_GetBack`" -#: ../../whatsnew/3.11.rst:2416 +#: ../../whatsnew/3.11.rst:2415 msgid ":c:func:`PyFrame_GetBuiltins`" msgstr ":c:func:`PyFrame_GetBuiltins`" -#: ../../whatsnew/3.11.rst:2417 +#: ../../whatsnew/3.11.rst:2416 msgid ":c:func:`PyFrame_GetGenerator`" msgstr ":c:func:`PyFrame_GetGenerator`" -#: ../../whatsnew/3.11.rst:2418 +#: ../../whatsnew/3.11.rst:2417 msgid ":c:func:`PyFrame_GetGlobals`" msgstr ":c:func:`PyFrame_GetGlobals`" -#: ../../whatsnew/3.11.rst:2419 +#: ../../whatsnew/3.11.rst:2418 msgid ":c:func:`PyFrame_GetLasti`" msgstr ":c:func:`PyFrame_GetLasti`" -#: ../../whatsnew/3.11.rst:2420 +#: ../../whatsnew/3.11.rst:2419 msgid ":c:func:`PyFrame_GetLocals`" msgstr ":c:func:`PyFrame_GetLocals`" -#: ../../whatsnew/3.11.rst:2421 +#: ../../whatsnew/3.11.rst:2420 msgid ":c:type:`PyFrame_Type`" msgstr ":c:type:`PyFrame_Type`" -#: ../../whatsnew/3.11.rst:2423 +#: ../../whatsnew/3.11.rst:2422 msgid "(Contributed by Victor Stinner in :gh:`93937`.)" msgstr "(由 Victor Stinner 於 :gh:`93937` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2427 +#: ../../whatsnew/3.11.rst:2426 msgid "" "The :c:type:`PyFrameObject` structure members have been removed from the " "public C API." msgstr ":c:type:`PyFrameObject` 結構成員已經從公開的 C API 中移除。" -#: ../../whatsnew/3.11.rst:2430 +#: ../../whatsnew/3.11.rst:2429 msgid "" "While the documentation notes that the :c:type:`PyFrameObject` fields are " "subject to change at any time, they have been stable for a long time and " @@ -4558,7 +4555,7 @@ msgstr "" "雖然文件指出 :c:type:`PyFrameObject` 欄位隨時可能發生變化,但它們已經穩定了很" "長時間,並被用於幾個流行的擴充套件中。" -#: ../../whatsnew/3.11.rst:2434 +#: ../../whatsnew/3.11.rst:2433 msgid "" "In Python 3.11, the frame struct was reorganized to allow performance " "optimizations. Some fields were removed entirely, as they were details of " @@ -4567,39 +4564,39 @@ msgstr "" "Python 3.11 中,幀的結構被重新編制來為性能做最佳化,有些作為舊版實作細節的欄" "位被整個移除。" -#: ../../whatsnew/3.11.rst:2438 +#: ../../whatsnew/3.11.rst:2437 msgid ":c:type:`PyFrameObject` fields:" msgstr ":c:type:`PyFrameObject` 欄位:" -#: ../../whatsnew/3.11.rst:2440 +#: ../../whatsnew/3.11.rst:2439 msgid "``f_back``: use :c:func:`PyFrame_GetBack`." msgstr "``f_back``:使用 :c:func:`PyFrame_GetBack`。" -#: ../../whatsnew/3.11.rst:2441 +#: ../../whatsnew/3.11.rst:2440 msgid "``f_blockstack``: removed." msgstr "``f_blockstack``:已移除。" -#: ../../whatsnew/3.11.rst:2442 +#: ../../whatsnew/3.11.rst:2441 msgid "``f_builtins``: use :c:func:`PyFrame_GetBuiltins`." msgstr "``f_builtins``:使用 :c:func:`PyFrame_GetBuiltins`。" -#: ../../whatsnew/3.11.rst:2443 +#: ../../whatsnew/3.11.rst:2442 msgid "``f_code``: use :c:func:`PyFrame_GetCode`." msgstr "``f_code``:使用 :c:func:`PyFrame_GetCode`。" -#: ../../whatsnew/3.11.rst:2444 +#: ../../whatsnew/3.11.rst:2443 msgid "``f_gen``: use :c:func:`PyFrame_GetGenerator`." msgstr "``f_gen``:使用 :c:func:`PyFrame_GetGenerator`。" -#: ../../whatsnew/3.11.rst:2445 +#: ../../whatsnew/3.11.rst:2444 msgid "``f_globals``: use :c:func:`PyFrame_GetGlobals`." msgstr "``f_globals``:使用 :c:func:`PyFrame_GetGlobals`。" -#: ../../whatsnew/3.11.rst:2446 +#: ../../whatsnew/3.11.rst:2445 msgid "``f_iblock``: removed." msgstr "``f_iblock``:已移除。" -#: ../../whatsnew/3.11.rst:2447 +#: ../../whatsnew/3.11.rst:2446 msgid "" "``f_lasti``: use :c:func:`PyFrame_GetLasti`. Code using ``f_lasti`` with " "``PyCode_Addr2Line()`` should use :c:func:`PyFrame_GetLineNumber` instead; " @@ -4609,27 +4606,27 @@ msgstr "" "``PyCode_Addr2Line()`` 同時使用的部分應該改用 :c:func:" "`PyFrame_GetLineNumber`;它可能會更快。" -#: ../../whatsnew/3.11.rst:2450 +#: ../../whatsnew/3.11.rst:2449 msgid "``f_lineno``: use :c:func:`PyFrame_GetLineNumber`" msgstr "``f_lineno``:使用 :c:func:`PyFrame_GetLineNumber`" -#: ../../whatsnew/3.11.rst:2451 +#: ../../whatsnew/3.11.rst:2450 msgid "``f_locals``: use :c:func:`PyFrame_GetLocals`." msgstr "``f_locals``:使用 :c:func:`PyFrame_GetLocals`。" -#: ../../whatsnew/3.11.rst:2452 +#: ../../whatsnew/3.11.rst:2451 msgid "``f_stackdepth``: removed." msgstr "``f_stackdepth``:已移除。" -#: ../../whatsnew/3.11.rst:2453 +#: ../../whatsnew/3.11.rst:2452 msgid "``f_state``: no public API (renamed to ``f_frame.f_state``)." msgstr "``f_state``:無公開 API(重新命名為 ``f_frame.f_state``)。" -#: ../../whatsnew/3.11.rst:2454 +#: ../../whatsnew/3.11.rst:2453 msgid "``f_trace``: no public API." msgstr "``f_trace``:無公開 API。" -#: ../../whatsnew/3.11.rst:2455 +#: ../../whatsnew/3.11.rst:2454 msgid "" "``f_trace_lines``: use ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_lines\")``." @@ -4637,7 +4634,7 @@ msgstr "" "``f_trace_lines``:使用 ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_lines\")``。" -#: ../../whatsnew/3.11.rst:2456 +#: ../../whatsnew/3.11.rst:2455 msgid "" "``f_trace_opcodes``: use ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_opcodes\")``." @@ -4645,15 +4642,15 @@ msgstr "" "``f_trace_opcodes``:使用 ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_opcodes\")``。" -#: ../../whatsnew/3.11.rst:2457 +#: ../../whatsnew/3.11.rst:2456 msgid "``f_localsplus``: no public API (renamed to ``f_frame.localsplus``)." msgstr "``f_localsplus``:無公開 API(重新命名為 ``f_frame.localsplus``)。" -#: ../../whatsnew/3.11.rst:2458 +#: ../../whatsnew/3.11.rst:2457 msgid "``f_valuestack``: removed." msgstr "``f_valuestack``:已移除。" -#: ../../whatsnew/3.11.rst:2460 +#: ../../whatsnew/3.11.rst:2459 msgid "" "The Python frame object is now created lazily. A side effect is that the :" "attr:`~frame.f_back` member must not be accessed directly, since its value " @@ -4664,7 +4661,7 @@ msgstr "" "員不能被直接存取,因為其職的計算也是惰性的,要改呼叫 :c:func:" "`PyFrame_GetBack`。" -#: ../../whatsnew/3.11.rst:2466 +#: ../../whatsnew/3.11.rst:2465 msgid "" "Debuggers that accessed the :attr:`~frame.f_locals` directly *must* call :c:" "func:`PyFrame_GetLocals` instead. They no longer need to call :c:func:`!" @@ -4677,15 +4674,15 @@ msgstr "" "PyFrame_FastToLocalsWithError` 或 :c:func:`!PyFrame_LocalsToFast`,事實上他們" "不應該呼叫這些函式。框架的必要更新現在由虛擬機管理。" -#: ../../whatsnew/3.11.rst:2472 +#: ../../whatsnew/3.11.rst:2471 msgid "Code defining ``PyFrame_GetCode()`` on Python 3.8 and older::" msgstr "``PyFrame_GetCode()`` 在 Python 3.8 以前的程式定義: ::" -#: ../../whatsnew/3.11.rst:2482 +#: ../../whatsnew/3.11.rst:2481 msgid "Code defining ``PyFrame_GetBack()`` on Python 3.8 and older::" msgstr "``PyFrame_GetBack()`` 在 Python 3.8 以前的程式定義: ::" -#: ../../whatsnew/3.11.rst:2492 +#: ../../whatsnew/3.11.rst:2491 msgid "" "Or use the `pythoncapi_compat project `__ to get these two functions on older Python versions." @@ -4693,11 +4690,11 @@ msgstr "" "或是使用 `pythoncap_compat 計畫 `__\\ 來在舊版 Python 函式中取得這兩個函式。" -#: ../../whatsnew/3.11.rst:2496 +#: ../../whatsnew/3.11.rst:2495 msgid "Changes of the :c:type:`PyThreadState` structure members:" msgstr ":c:type:`PyThreadState` 結構成員的改動:" -#: ../../whatsnew/3.11.rst:2498 +#: ../../whatsnew/3.11.rst:2497 msgid "" "``frame``: removed, use :c:func:`PyThreadState_GetFrame` (function added to " "Python 3.9 by :issue:`40429`). Warning: the function returns a :term:`strong " @@ -4707,7 +4704,7 @@ msgstr "" "於 Python 3.9 新增的函式)。警告:會回傳 :term:`strong reference` 的函式必須" "呼叫 :c:func:`Py_XDECREF`。" -#: ../../whatsnew/3.11.rst:2502 +#: ../../whatsnew/3.11.rst:2501 msgid "" "``tracing``: changed, use :c:func:`PyThreadState_EnterTracing` and :c:func:" "`PyThreadState_LeaveTracing` (functions added to Python 3.11 by :issue:" @@ -4717,7 +4714,7 @@ msgstr "" "`PyThreadState_LeaveTracing`\\ (:issue:`43760` 於 Python 3.11 中新增的函" "式)。" -#: ../../whatsnew/3.11.rst:2505 +#: ../../whatsnew/3.11.rst:2504 msgid "" "``recursion_depth``: removed, use ``(tstate->recursion_limit - tstate-" ">recursion_remaining)`` instead." @@ -4725,15 +4722,15 @@ msgstr "" "``recursion_depth``:已移除,請改用 ``(tstate->recursion_limit - tstate-" ">recursion_remaining)``。" -#: ../../whatsnew/3.11.rst:2507 +#: ../../whatsnew/3.11.rst:2506 msgid "``stackcheck_counter``: removed." msgstr "``stackcheck_counter``:已移除。" -#: ../../whatsnew/3.11.rst:2509 +#: ../../whatsnew/3.11.rst:2508 msgid "Code defining ``PyThreadState_GetFrame()`` on Python 3.8 and older::" msgstr "``PyThreadState_GetFrame()`` 在 Python 3.8 以前的程式定義: ::" -#: ../../whatsnew/3.11.rst:2519 +#: ../../whatsnew/3.11.rst:2518 msgid "" "Code defining ``PyThreadState_EnterTracing()`` and " "``PyThreadState_LeaveTracing()`` on Python 3.10 and older::" @@ -4741,7 +4738,7 @@ msgstr "" "``PyThreadState_EnterTracing()`` 與 ``PyThreadState_LeaveTracing()`` 在 " "Python 3.10 以前的程式定義: ::" -#: ../../whatsnew/3.11.rst:2545 +#: ../../whatsnew/3.11.rst:2544 msgid "" "Or use `the pythoncapi-compat project `__ to get these functions on old Python functions." @@ -4749,13 +4746,13 @@ msgstr "" "或是使用 `pythoncap-compat 計畫 `__\\ 來在舊版 Python 函式中取得它們。" -#: ../../whatsnew/3.11.rst:2549 +#: ../../whatsnew/3.11.rst:2548 msgid "" "Distributors are encouraged to build Python with the optimized Blake2 " "library `libb2`_." msgstr "鼓勵發布者們使用最佳化過的 Blake2 函式庫 `libb2`_ 來建置 Python。" -#: ../../whatsnew/3.11.rst:2552 +#: ../../whatsnew/3.11.rst:2551 msgid "" "The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 " "for initialization to use :c:member:`PyConfig.module_search_paths` to " @@ -4766,7 +4763,7 @@ msgstr "" "`sys.path`,則現在 :c:member:`PyConfig.module_search_paths_set` 必須被設為 " "1。否則,初始化會重新計算路徑並取代所有被加到 ``module_search_paths`` 的值。" -#: ../../whatsnew/3.11.rst:2557 +#: ../../whatsnew/3.11.rst:2556 msgid "" ":c:func:`PyConfig_Read` no longer calculates the initial search path, and " "will not fill any values into :c:member:`PyConfig.module_search_paths`. To " @@ -4779,60 +4776,60 @@ msgstr "" "初始化並使用 :c:func:`PySys_GetObject` 以取得 :data:`sys.path` 作為 Python 列" "表物件並直接修改它。" -#: ../../whatsnew/3.11.rst:2568 +#: ../../whatsnew/3.11.rst:2567 msgid "" "Deprecate the following functions to configure the Python initialization:" msgstr "棄用以下用來配置 Python 初始化的函式:" -#: ../../whatsnew/3.11.rst:2570 +#: ../../whatsnew/3.11.rst:2569 msgid ":c:func:`!PySys_AddWarnOptionUnicode`" msgstr ":c:func:`!PySys_AddWarnOptionUnicode`" -#: ../../whatsnew/3.11.rst:2571 +#: ../../whatsnew/3.11.rst:2570 msgid ":c:func:`!PySys_AddWarnOption`" msgstr ":c:func:`!PySys_AddWarnOption`" -#: ../../whatsnew/3.11.rst:2572 +#: ../../whatsnew/3.11.rst:2571 msgid ":c:func:`!PySys_AddXOption`" msgstr ":c:func:`!PySys_AddXOption`" -#: ../../whatsnew/3.11.rst:2573 +#: ../../whatsnew/3.11.rst:2572 msgid ":c:func:`!PySys_HasWarnOptions`" msgstr ":c:func:`!PySys_HasWarnOptions`" -#: ../../whatsnew/3.11.rst:2574 +#: ../../whatsnew/3.11.rst:2573 msgid ":c:func:`!PySys_SetArgvEx`" msgstr ":c:func:`!PySys_SetArgvEx`" -#: ../../whatsnew/3.11.rst:2575 +#: ../../whatsnew/3.11.rst:2574 msgid ":c:func:`!PySys_SetArgv`" msgstr ":c:func:`!PySys_SetArgv`" -#: ../../whatsnew/3.11.rst:2576 +#: ../../whatsnew/3.11.rst:2575 msgid ":c:func:`!PySys_SetPath`" msgstr ":c:func:`!PySys_SetPath`" -#: ../../whatsnew/3.11.rst:2577 +#: ../../whatsnew/3.11.rst:2576 msgid ":c:func:`!Py_SetPath`" msgstr ":c:func:`!Py_SetPath`" -#: ../../whatsnew/3.11.rst:2578 +#: ../../whatsnew/3.11.rst:2577 msgid ":c:func:`!Py_SetProgramName`" msgstr ":c:func:`!Py_SetProgramName`" -#: ../../whatsnew/3.11.rst:2579 +#: ../../whatsnew/3.11.rst:2578 msgid ":c:func:`!Py_SetPythonHome`" msgstr ":c:func:`!Py_SetPythonHome`" -#: ../../whatsnew/3.11.rst:2580 +#: ../../whatsnew/3.11.rst:2579 msgid ":c:func:`!Py_SetStandardStreamEncoding`" msgstr ":c:func:`!Py_SetStandardStreamEncoding`" -#: ../../whatsnew/3.11.rst:2581 +#: ../../whatsnew/3.11.rst:2580 msgid ":c:func:`!_Py_SetProgramFullPath`" msgstr ":c:func:`!_Py_SetProgramFullPath`" -#: ../../whatsnew/3.11.rst:2583 +#: ../../whatsnew/3.11.rst:2582 msgid "" "Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " "Configuration ` instead (:pep:`587`). (Contributed by Victor " @@ -4841,7 +4838,7 @@ msgstr "" "請改用 :ref:`Python 初始化配置 `\\ 中新的 :c:type:`PyConfig` " "API。(由 Victor Stinner 於 :gh:`88279` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2587 +#: ../../whatsnew/3.11.rst:2586 msgid "" "Deprecate the ``ob_shash`` member of the :c:type:`PyBytesObject`. Use :c:" "func:`PyObject_Hash` instead. (Contributed by Inada Naoki in :issue:`46864`.)" @@ -4849,111 +4846,111 @@ msgstr "" "棄用 :c:type:`PyBytesObject` 中的 ``ob_shash`` 成員。請改用 :c:func:" "`PyObject_Hash`。(由 Inada Naoki 於 :issue:`46864` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2596 +#: ../../whatsnew/3.11.rst:2595 msgid "" "The following C APIs have been deprecated in earlier Python releases, and " "will be removed in Python 3.12." msgstr "以下 C API 已於先前 Python 發布版本中棄用,並將於 Python 3.12 中移除。" -#: ../../whatsnew/3.11.rst:2599 +#: ../../whatsnew/3.11.rst:2598 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.11.rst:2600 +#: ../../whatsnew/3.11.rst:2599 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.11.rst:2601 +#: ../../whatsnew/3.11.rst:2600 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.11.rst:2602 +#: ../../whatsnew/3.11.rst:2601 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.11.rst:2603 +#: ../../whatsnew/3.11.rst:2602 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.11.rst:2604 +#: ../../whatsnew/3.11.rst:2603 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.11.rst:2605 +#: ../../whatsnew/3.11.rst:2604 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.11.rst:2606 +#: ../../whatsnew/3.11.rst:2605 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.11.rst:2607 +#: ../../whatsnew/3.11.rst:2606 msgid ":c:func:`!PyUnicode_IS_COMPACT`" msgstr ":c:func:`!PyUnicode_IS_COMPACT`" -#: ../../whatsnew/3.11.rst:2608 +#: ../../whatsnew/3.11.rst:2607 msgid ":c:func:`!PyUnicode_IS_READY`" msgstr ":c:func:`!PyUnicode_IS_READY`" -#: ../../whatsnew/3.11.rst:2609 +#: ../../whatsnew/3.11.rst:2608 msgid ":c:func:`PyUnicode_READY`" msgstr ":c:func:`PyUnicode_READY`" -#: ../../whatsnew/3.11.rst:2610 +#: ../../whatsnew/3.11.rst:2609 msgid ":c:func:`!PyUnicode_WSTR_LENGTH`" msgstr ":c:func:`!PyUnicode_WSTR_LENGTH`" -#: ../../whatsnew/3.11.rst:2611 +#: ../../whatsnew/3.11.rst:2610 msgid ":c:func:`!_PyUnicode_AsUnicode`" msgstr ":c:func:`!_PyUnicode_AsUnicode`" -#: ../../whatsnew/3.11.rst:2612 +#: ../../whatsnew/3.11.rst:2611 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.11.rst:2613 +#: ../../whatsnew/3.11.rst:2612 msgid ":c:type:`PyUnicodeObject`" msgstr ":c:type:`PyUnicodeObject`" -#: ../../whatsnew/3.11.rst:2614 +#: ../../whatsnew/3.11.rst:2613 msgid ":c:func:`!PyUnicode_InternImmortal`" msgstr ":c:func:`!PyUnicode_InternImmortal`" -#: ../../whatsnew/3.11.rst:2622 +#: ../../whatsnew/3.11.rst:2621 msgid "" ":c:func:`!PyFrame_BlockSetup` and :c:func:`!PyFrame_BlockPop` have been " "removed. (Contributed by Mark Shannon in :issue:`40222`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2626 +#: ../../whatsnew/3.11.rst:2625 msgid "Remove the following math macros using the ``errno`` variable:" msgstr "移除以下使用到 ``errno`` 變數的數學巨集:" -#: ../../whatsnew/3.11.rst:2628 +#: ../../whatsnew/3.11.rst:2627 msgid "``Py_ADJUST_ERANGE1()``" msgstr "``Py_ADJUST_ERANGE1()``" -#: ../../whatsnew/3.11.rst:2629 +#: ../../whatsnew/3.11.rst:2628 msgid "``Py_ADJUST_ERANGE2()``" msgstr "``Py_ADJUST_ERANGE2()``" -#: ../../whatsnew/3.11.rst:2630 +#: ../../whatsnew/3.11.rst:2629 msgid "``Py_OVERFLOWED()``" msgstr "``Py_OVERFLOWED()``" -#: ../../whatsnew/3.11.rst:2631 +#: ../../whatsnew/3.11.rst:2630 msgid "``Py_SET_ERANGE_IF_OVERFLOW()``" msgstr "``Py_SET_ERANGE_IF_OVERFLOW()``" -#: ../../whatsnew/3.11.rst:2632 +#: ../../whatsnew/3.11.rst:2631 msgid "``Py_SET_ERRNO_ON_MATH_ERROR()``" msgstr "``Py_SET_ERRNO_ON_MATH_ERROR()``" -#: ../../whatsnew/3.11.rst:2634 +#: ../../whatsnew/3.11.rst:2633 msgid "(Contributed by Victor Stinner in :issue:`45412`.)" msgstr "(由 Victor Stinner 於 :issue:`45412` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2636 +#: ../../whatsnew/3.11.rst:2635 msgid "" "Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated " "since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()`` " @@ -4965,7 +4962,7 @@ msgstr "" "和 ``PyUnicode_Fill()`` 函式。(由 Victor Stinner 於 :issue:`41123` 中所貢" "獻。)" -#: ../../whatsnew/3.11.rst:2641 +#: ../../whatsnew/3.11.rst:2640 msgid "" "Remove the ``pystrhex.h`` header file. It only contains private functions. C " "extensions should only include the main ```` header file. " @@ -4974,7 +4971,7 @@ msgstr "" "移除 ``pystrhex.h`` 標頭檔案。它只有包含私有函式。C 的擴充應該只要引入主要的 " "```` 標頭檔案。(由 Victor Stinner 於 :issue:`45434` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2645 +#: ../../whatsnew/3.11.rst:2644 msgid "" "Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the " "``Py_IS_INFINITY()`` macro. (Contributed by Victor Stinner in :issue:" @@ -4983,41 +4980,41 @@ msgstr "" "移除 ``Py_FORCE_DOUBLE()`` 巨集。它先前被用於 ``Py_IS_INFINITY()`` 巨集。" "(由 Victor Stinner 於 :issue:`45440` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2649 +#: ../../whatsnew/3.11.rst:2648 msgid "" "The following items are no longer available when :c:macro:`Py_LIMITED_API` " "is defined:" msgstr "當 :c:macro:`Py_LIMITED_API` 有被定義時,以下項目將無法被取得:" -#: ../../whatsnew/3.11.rst:2652 +#: ../../whatsnew/3.11.rst:2651 msgid ":c:func:`PyMarshal_WriteLongToFile`" msgstr ":c:func:`PyMarshal_WriteLongToFile`" -#: ../../whatsnew/3.11.rst:2653 +#: ../../whatsnew/3.11.rst:2652 msgid ":c:func:`PyMarshal_WriteObjectToFile`" msgstr ":c:func:`PyMarshal_WriteObjectToFile`" -#: ../../whatsnew/3.11.rst:2654 +#: ../../whatsnew/3.11.rst:2653 msgid ":c:func:`PyMarshal_ReadObjectFromString`" msgstr ":c:func:`PyMarshal_ReadObjectFromString`" -#: ../../whatsnew/3.11.rst:2655 +#: ../../whatsnew/3.11.rst:2654 msgid ":c:func:`PyMarshal_WriteObjectToString`" msgstr ":c:func:`PyMarshal_WriteObjectToString`" -#: ../../whatsnew/3.11.rst:2656 +#: ../../whatsnew/3.11.rst:2655 msgid "the ``Py_MARSHAL_VERSION`` macro" msgstr "``Py_MARSHAL_VERSION`` 巨集" -#: ../../whatsnew/3.11.rst:2658 +#: ../../whatsnew/3.11.rst:2657 msgid "These are not part of the :ref:`limited API `." msgstr "" -#: ../../whatsnew/3.11.rst:2660 +#: ../../whatsnew/3.11.rst:2659 msgid "(Contributed by Victor Stinner in :issue:`45474`.)" msgstr "(由 Victor Stinner 於 :issue:`45474` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2662 +#: ../../whatsnew/3.11.rst:2661 msgid "" "Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never " "worked since the :c:type:`!PyWeakReference` structure is opaque in the " @@ -5027,7 +5024,7 @@ msgstr "" "PyWeakReference` 結構在受限 C API 中過於晦澀而從未運作。(由 Victor Stinner " "於 :issue:`35134` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2667 +#: ../../whatsnew/3.11.rst:2666 msgid "" "Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed in the public " "C API by mistake, it must only be used by Python internally. Use the " @@ -5038,7 +5035,7 @@ msgstr "" "該只能被 Python 內部所使用。請改用 ``PyTypeObject.tp_members``。(由 Victor " "Stinner 於 :issue:`40170` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2672 +#: ../../whatsnew/3.11.rst:2671 msgid "" "Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the internal C " "API). (Contributed by Victor Stinner in :issue:`45412`.)" @@ -5046,7 +5043,7 @@ msgstr "" "移除 ``HAVE_PY_SET_53BIT_PRECISION`` 巨集(移動至內部 C API)。(由 Victor " "Stinner 於 :issue:`45412` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2678 +#: ../../whatsnew/3.11.rst:2677 msgid "" "Remove the :c:type:`Py_UNICODE` encoder APIs, as they have been deprecated " "since Python 3.3, are little used and are inefficient relative to the " @@ -5055,63 +5052,63 @@ msgstr "" "移除 :c:type:`Py_UNICODE` 編碼器 API,它們自從 Python 3.3 就被棄用,非常少用" "且和推薦的替代方案已無太大關聯。" -#: ../../whatsnew/3.11.rst:2683 +#: ../../whatsnew/3.11.rst:2682 msgid "The removed functions are:" msgstr "被移除的函式為:" -#: ../../whatsnew/3.11.rst:2685 +#: ../../whatsnew/3.11.rst:2684 msgid ":func:`!PyUnicode_Encode`" msgstr ":func:`!PyUnicode_Encode`" -#: ../../whatsnew/3.11.rst:2686 +#: ../../whatsnew/3.11.rst:2685 msgid ":func:`!PyUnicode_EncodeASCII`" msgstr ":func:`!PyUnicode_EncodeASCII`" -#: ../../whatsnew/3.11.rst:2687 +#: ../../whatsnew/3.11.rst:2686 msgid ":func:`!PyUnicode_EncodeLatin1`" msgstr ":func:`!PyUnicode_EncodeLatin1`" -#: ../../whatsnew/3.11.rst:2688 +#: ../../whatsnew/3.11.rst:2687 msgid ":func:`!PyUnicode_EncodeUTF7`" msgstr ":func:`!PyUnicode_EncodeUTF7`" -#: ../../whatsnew/3.11.rst:2689 +#: ../../whatsnew/3.11.rst:2688 msgid ":func:`!PyUnicode_EncodeUTF8`" msgstr ":func:`!PyUnicode_EncodeUTF8`" -#: ../../whatsnew/3.11.rst:2690 +#: ../../whatsnew/3.11.rst:2689 msgid ":func:`!PyUnicode_EncodeUTF16`" msgstr ":func:`!PyUnicode_EncodeUTF16`" -#: ../../whatsnew/3.11.rst:2691 +#: ../../whatsnew/3.11.rst:2690 msgid ":func:`!PyUnicode_EncodeUTF32`" msgstr ":func:`!PyUnicode_EncodeUTF32`" -#: ../../whatsnew/3.11.rst:2692 +#: ../../whatsnew/3.11.rst:2691 msgid ":func:`!PyUnicode_EncodeUnicodeEscape`" msgstr ":func:`!PyUnicode_EncodeUnicodeEscape`" -#: ../../whatsnew/3.11.rst:2693 +#: ../../whatsnew/3.11.rst:2692 msgid ":func:`!PyUnicode_EncodeRawUnicodeEscape`" msgstr ":func:`!PyUnicode_EncodeRawUnicodeEscape`" -#: ../../whatsnew/3.11.rst:2694 +#: ../../whatsnew/3.11.rst:2693 msgid ":func:`!PyUnicode_EncodeCharmap`" msgstr ":func:`!PyUnicode_EncodeCharmap`" -#: ../../whatsnew/3.11.rst:2695 +#: ../../whatsnew/3.11.rst:2694 msgid ":func:`!PyUnicode_TranslateCharmap`" msgstr ":func:`!PyUnicode_TranslateCharmap`" -#: ../../whatsnew/3.11.rst:2696 +#: ../../whatsnew/3.11.rst:2695 msgid ":func:`!PyUnicode_EncodeDecimal`" msgstr ":func:`!PyUnicode_EncodeDecimal`" -#: ../../whatsnew/3.11.rst:2697 +#: ../../whatsnew/3.11.rst:2696 msgid ":func:`!PyUnicode_TransformDecimalToASCII`" msgstr ":func:`!PyUnicode_TransformDecimalToASCII`" -#: ../../whatsnew/3.11.rst:2699 +#: ../../whatsnew/3.11.rst:2698 msgid "" "See :pep:`624` for details and :pep:`migration guidance <624#alternative-" "apis>`. (Contributed by Inada Naoki in :issue:`44029`.)" @@ -5119,15 +5116,15 @@ msgstr "" "詳情請見 :pep:`624` 與\\ :pep:`搬遷指南 <624#alternative-apis>`。(由 Inada " "Naoki 於 :issue:`44029` 中所貢獻。)" -#: ../../whatsnew/3.11.rst:2705 +#: ../../whatsnew/3.11.rst:2704 msgid "Notable changes in 3.11.4" msgstr "" -#: ../../whatsnew/3.11.rst:2708 +#: ../../whatsnew/3.11.rst:2707 msgid "tarfile" msgstr "tarfile" -#: ../../whatsnew/3.11.rst:2710 +#: ../../whatsnew/3.11.rst:2709 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " @@ -5138,15 +5135,15 @@ msgid "" "Viktorin in :pep:`706`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2722 +#: ../../whatsnew/3.11.rst:2721 msgid "Notable changes in 3.11.5" msgstr "" -#: ../../whatsnew/3.11.rst:2725 +#: ../../whatsnew/3.11.rst:2724 msgid "OpenSSL" msgstr "OpenSSL" -#: ../../whatsnew/3.11.rst:2727 +#: ../../whatsnew/3.11.rst:2726 msgid "" "Windows builds and macOS installers from python.org now use OpenSSL 3.0." msgstr "" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index c99b4579c7..9cbd5eb77b 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-19 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -257,7 +257,7 @@ msgid "" "`_." msgstr "" -#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1966 +#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1963 msgid "New Features" msgstr "新增特性" @@ -1124,7 +1124,7 @@ msgid "" "Windows. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:862 ../../whatsnew/3.12.rst:1669 +#: ../../whatsnew/3.12.rst:862 ../../whatsnew/3.12.rst:1667 msgid "sqlite3" msgstr "sqlite3" @@ -1199,7 +1199,7 @@ msgid "" "Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:913 ../../whatsnew/3.12.rst:1865 +#: ../../whatsnew/3.12.rst:913 ../../whatsnew/3.12.rst:1862 msgid "" ":func:`sys._current_exceptions` now returns a mapping from thread-id to an " "exception instance, rather than to a ``(typ, exc, tb)`` tuple. (Contributed " @@ -1230,11 +1230,11 @@ msgid "" "argument provided to the *dir* parameter is a relative path." msgstr "" -#: ../../whatsnew/3.12.rst:933 +#: ../../whatsnew/3.12.rst:931 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.12.rst:935 +#: ../../whatsnew/3.12.rst:933 msgid "" "Add :func:`threading.settrace_all_threads` and :func:`threading." "setprofile_all_threads` that allow to set tracing and profiling functions in " @@ -1242,11 +1242,11 @@ msgid "" "Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:941 +#: ../../whatsnew/3.12.rst:939 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.12.rst:943 +#: ../../whatsnew/3.12.rst:941 msgid "" "``tkinter.Canvas.coords()`` now flattens its arguments. It now accepts not " "only coordinates as separate arguments (``x1, y1, x2, y2, ...``) and a " @@ -1256,11 +1256,11 @@ msgid "" "in :gh:`94473`.)" msgstr "" -#: ../../whatsnew/3.12.rst:952 +#: ../../whatsnew/3.12.rst:950 msgid "tokenize" msgstr "tokenize" -#: ../../whatsnew/3.12.rst:954 +#: ../../whatsnew/3.12.rst:952 msgid "" "The :mod:`tokenize` module includes the changes introduced in :pep:`701`. " "(Contributed by Marta Gómez Macías and Pablo Galindo in :gh:`102856`.) See :" @@ -1268,11 +1268,11 @@ msgid "" "to the :mod:`tokenize` module." msgstr "" -#: ../../whatsnew/3.12.rst:960 +#: ../../whatsnew/3.12.rst:958 msgid "types" msgstr "types" -#: ../../whatsnew/3.12.rst:962 +#: ../../whatsnew/3.12.rst:960 msgid "" "Add :func:`types.get_original_bases` to allow for further introspection of :" "ref:`user-defined-generics` when subclassed. (Contributed by James Hilton-" @@ -1344,7 +1344,7 @@ msgid "" "Benjamin Peterson in :gh:`96734`)." msgstr "" -#: ../../whatsnew/3.12.rst:1027 ../../whatsnew/3.12.rst:1710 +#: ../../whatsnew/3.12.rst:1027 ../../whatsnew/3.12.rst:1707 msgid "unittest" msgstr "unittest" @@ -1520,7 +1520,7 @@ msgid "" "demos>`_. (Contributed by Victor Stinner in :gh:`97669`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1144 ../../whatsnew/3.12.rst:2268 +#: ../../whatsnew/3.12.rst:1144 ../../whatsnew/3.12.rst:2265 msgid "Deprecated" msgstr "已棄用" @@ -2016,7 +2016,7 @@ msgid "" "en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)" msgstr "" -#: ../../whatsnew/3.12.rst:1391 ../../whatsnew/3.12.rst:2355 +#: ../../whatsnew/3.12.rst:1391 ../../whatsnew/3.12.rst:2352 msgid "Pending Removal in Python 3.14" msgstr "Python 3.14 中待決議的移除項目" @@ -2129,7 +2129,7 @@ msgstr "" msgid "The :attr:`~codeobject.co_lnotab` attribute of code objects." msgstr "" -#: ../../whatsnew/3.12.rst:1451 ../../whatsnew/3.12.rst:2392 +#: ../../whatsnew/3.12.rst:1451 ../../whatsnew/3.12.rst:2389 msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待決議的移除項目" @@ -2142,7 +2142,7 @@ msgstr "" msgid ":func:`locale.getdefaultlocale` (:gh:`90817`)" msgstr ":func:`locale.getdefaultlocale` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1462 ../../whatsnew/3.12.rst:2410 +#: ../../whatsnew/3.12.rst:1462 ../../whatsnew/3.12.rst:2407 msgid "Pending Removal in Future Versions" msgstr "未來版本中待決議的移除項目" @@ -2172,7 +2172,7 @@ msgid "" "syntax error. (:gh:`87999`)" msgstr "" -#: ../../whatsnew/3.12.rst:1482 ../../whatsnew/3.12.rst:2442 +#: ../../whatsnew/3.12.rst:1482 ../../whatsnew/3.12.rst:2439 msgid "Removed" msgstr "已移除" @@ -2522,32 +2522,32 @@ msgstr "smtpd" #: ../../whatsnew/3.12.rst:1660 msgid "" "The ``smtpd`` module has been removed according to the schedule in :pep:" -"`594`, having been deprecated in Python 3.4.7 and 3.5.4. Use aiosmtpd_ PyPI " -"module or any other :mod:`asyncio`-based server instead. (Contributed by " -"Oleg Iarygin in :gh:`93243`.)" +"`594`, having been deprecated in Python 3.4.7 and 3.5.4. Use the :pypi:" +"`aiosmtpd` PyPI module or any other :mod:`asyncio`-based server instead. " +"(Contributed by Oleg Iarygin in :gh:`93243`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1671 +#: ../../whatsnew/3.12.rst:1669 msgid "" "The following undocumented :mod:`sqlite3` features, deprecated in Python " "3.10, are now removed:" msgstr "" -#: ../../whatsnew/3.12.rst:1674 +#: ../../whatsnew/3.12.rst:1672 msgid "``sqlite3.enable_shared_cache()``" msgstr "``sqlite3.enable_shared_cache()``" -#: ../../whatsnew/3.12.rst:1675 +#: ../../whatsnew/3.12.rst:1673 msgid "``sqlite3.OptimizedUnicode``" msgstr "``sqlite3.OptimizedUnicode``" -#: ../../whatsnew/3.12.rst:1677 +#: ../../whatsnew/3.12.rst:1675 msgid "" "If a shared cache must be used, open the database in URI mode using the " "``cache=shared`` query parameter." msgstr "" -#: ../../whatsnew/3.12.rst:1680 +#: ../../whatsnew/3.12.rst:1678 msgid "" "The ``sqlite3.OptimizedUnicode`` text factory has been an alias for :class:" "`str` since Python 3.3. Code that previously set the text factory to " @@ -2555,22 +2555,22 @@ msgid "" "default value which is also ``str``." msgstr "" -#: ../../whatsnew/3.12.rst:1685 +#: ../../whatsnew/3.12.rst:1683 msgid "(Contributed by Erlend E. Aasland in :gh:`92548`.)" msgstr "(由 Erlend E. Aasland 於 :gh:`92548` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1688 +#: ../../whatsnew/3.12.rst:1686 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.12.rst:1690 +#: ../../whatsnew/3.12.rst:1688 msgid "" "Remove :mod:`ssl`'s :func:`!ssl.RAND_pseudo_bytes` function, deprecated in " "Python 3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. " "(Contributed by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1694 +#: ../../whatsnew/3.12.rst:1692 msgid "" "Remove the :func:`!ssl.match_hostname` function. It was deprecated in Python " "3.7. OpenSSL performs hostname matching since Python 3.7, Python no longer " @@ -2578,200 +2578,200 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1700 +#: ../../whatsnew/3.12.rst:1698 msgid "" "Remove the :func:`!ssl.wrap_socket` function, deprecated in Python 3.7: " "instead, create a :class:`ssl.SSLContext` object and call its :class:`ssl." "SSLContext.wrap_socket` method. Any package that still uses :func:`!ssl." "wrap_socket` is broken and insecure. The function neither sends a SNI TLS " -"extension nor validates server hostname. Code is subject to `CWE-295 " -"`_: Improper Certificate " -"Validation. (Contributed by Victor Stinner in :gh:`94199`.)" +"extension nor validates the server hostname. Code is subject to :cwe:`295` " +"(Improper Certificate Validation). (Contributed by Victor Stinner in :gh:" +"`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1712 +#: ../../whatsnew/3.12.rst:1709 msgid "Remove many long-deprecated :mod:`unittest` features:" msgstr "移除許多 :mod:`unittest` 中被棄用已久的功能:" -#: ../../whatsnew/3.12.rst:1716 +#: ../../whatsnew/3.12.rst:1713 msgid "A number of :class:`~unittest.TestCase` method aliases:" msgstr "" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1716 msgid "Deprecated alias" msgstr "已棄用的別名" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1716 msgid "Method Name" msgstr "方法名稱" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1716 msgid "Deprecated in" msgstr "" -#: ../../whatsnew/3.12.rst:1721 +#: ../../whatsnew/3.12.rst:1718 msgid "``failUnless``" msgstr "``failUnless``" -#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1718 ../../whatsnew/3.12.rst:1725 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1722 -#: ../../whatsnew/3.12.rst:1723 ../../whatsnew/3.12.rst:1724 -#: ../../whatsnew/3.12.rst:1725 ../../whatsnew/3.12.rst:1726 -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1718 ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1721 +#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1724 msgid "3.1" msgstr "3.1" -#: ../../whatsnew/3.12.rst:1722 +#: ../../whatsnew/3.12.rst:1719 msgid "``failIf``" msgstr "``failIf``" -#: ../../whatsnew/3.12.rst:1722 +#: ../../whatsnew/3.12.rst:1719 msgid ":meth:`.assertFalse`" msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1720 msgid "``failUnlessEqual``" msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.12.rst:1723 ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1726 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1721 msgid "``failIfEqual``" msgstr "``failIfEqual``" -#: ../../whatsnew/3.12.rst:1724 ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1727 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1722 msgid "``failUnlessAlmostEqual``" msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.12.rst:1725 ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1728 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1723 msgid "``failIfAlmostEqual``" msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.12.rst:1726 ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1723 ../../whatsnew/3.12.rst:1729 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1724 msgid "``failUnlessRaises``" msgstr "``failUnlessRaises``" -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1724 msgid ":meth:`.assertRaises`" msgstr ":meth:`.assertRaises`" -#: ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1725 msgid "``assert_``" msgstr "``assert_``" -#: ../../whatsnew/3.12.rst:1728 ../../whatsnew/3.12.rst:1729 -#: ../../whatsnew/3.12.rst:1730 ../../whatsnew/3.12.rst:1731 -#: ../../whatsnew/3.12.rst:1732 ../../whatsnew/3.12.rst:1733 -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1725 ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1727 ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1729 ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1731 msgid "3.2" msgstr "3.2" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1726 msgid "``assertEquals``" msgstr "``assertEquals``" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1727 msgid "``assertNotEquals``" msgstr "``assertNotEquals``" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1728 msgid "``assertAlmostEquals``" msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1729 msgid "``assertNotAlmostEquals``" msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.12.rst:1733 +#: ../../whatsnew/3.12.rst:1730 msgid "``assertRegexpMatches``" msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.12.rst:1733 +#: ../../whatsnew/3.12.rst:1730 msgid ":meth:`.assertRegex`" msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1731 msgid "``assertRaisesRegexp``" msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.12.rst:1734 +#: ../../whatsnew/3.12.rst:1731 msgid ":meth:`.assertRaisesRegex`" msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1732 msgid "``assertNotRegexpMatches``" msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1732 msgid ":meth:`.assertNotRegex`" msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1732 msgid "3.5" msgstr "3.5" -#: ../../whatsnew/3.12.rst:1738 +#: ../../whatsnew/3.12.rst:1735 msgid "" "You can use https://github.com/isidentical/teyit to automatically modernise " "your unit tests." msgstr "" -#: ../../whatsnew/3.12.rst:1741 +#: ../../whatsnew/3.12.rst:1738 msgid "" "Undocumented and broken :class:`~unittest.TestCase` method " "``assertDictContainsSubset`` (deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1744 +#: ../../whatsnew/3.12.rst:1741 msgid "" "Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " "since Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1748 +#: ../../whatsnew/3.12.rst:1745 msgid "" "An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " "(deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1751 +#: ../../whatsnew/3.12.rst:1748 msgid "(Contributed by Serhiy Storchaka in :gh:`89325`.)" msgstr "(由 Serhiy Storchaka 於 :gh:`89325` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1754 +#: ../../whatsnew/3.12.rst:1751 msgid "webbrowser" msgstr "webbrowser" -#: ../../whatsnew/3.12.rst:1756 +#: ../../whatsnew/3.12.rst:1753 msgid "" "Remove support for obsolete browsers from :mod:`webbrowser`. The removed " "browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape, " "Firebird, and Firefox versions 35 and below (:gh:`102871`)." msgstr "" -#: ../../whatsnew/3.12.rst:1761 +#: ../../whatsnew/3.12.rst:1758 msgid "xml.etree.ElementTree" msgstr "xml.etree.ElementTree" -#: ../../whatsnew/3.12.rst:1763 +#: ../../whatsnew/3.12.rst:1760 msgid "" "Remove the ``ElementTree.Element.copy()`` method of the pure Python " "implementation, deprecated in Python 3.10, use the :func:`copy.copy` " @@ -2780,22 +2780,22 @@ msgid "" "Stinner in :gh:`94383`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1770 +#: ../../whatsnew/3.12.rst:1767 msgid "zipimport" msgstr "zipimport" -#: ../../whatsnew/3.12.rst:1772 +#: ../../whatsnew/3.12.rst:1769 msgid "" "Remove :mod:`zipimport`'s ``find_loader()`` and ``find_module()`` methods, " "deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" "`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1778 +#: ../../whatsnew/3.12.rst:1775 msgid "Others" msgstr "其他" -#: ../../whatsnew/3.12.rst:1780 +#: ../../whatsnew/3.12.rst:1777 msgid "" "Remove the ``suspicious`` rule from the documentation :file:`Makefile` and :" "file:`Doc/tools/rstlint.py`, both in favor of `sphinx-lint `, " "intended for low-level tools like debuggers and JIT compilers. This API may " @@ -3069,84 +3069,84 @@ msgid "" "contents are marked by the ``PyUnstable_`` prefix in names." msgstr "" -#: ../../whatsnew/3.12.rst:1976 +#: ../../whatsnew/3.12.rst:1973 msgid "Code object constructors:" msgstr "" -#: ../../whatsnew/3.12.rst:1978 +#: ../../whatsnew/3.12.rst:1975 msgid "``PyUnstable_Code_New()`` (renamed from ``PyCode_New``)" msgstr "" -#: ../../whatsnew/3.12.rst:1979 +#: ../../whatsnew/3.12.rst:1976 msgid "" "``PyUnstable_Code_NewWithPosOnlyArgs()`` (renamed from " "``PyCode_NewWithPosOnlyArgs``)" msgstr "" -#: ../../whatsnew/3.12.rst:1981 +#: ../../whatsnew/3.12.rst:1978 msgid "Extra storage for code objects (:pep:`523`):" msgstr "" -#: ../../whatsnew/3.12.rst:1983 +#: ../../whatsnew/3.12.rst:1980 msgid "" "``PyUnstable_Eval_RequestCodeExtraIndex()`` (renamed from " "``_PyEval_RequestCodeExtraIndex``)" msgstr "" -#: ../../whatsnew/3.12.rst:1984 +#: ../../whatsnew/3.12.rst:1981 msgid "``PyUnstable_Code_GetExtra()`` (renamed from ``_PyCode_GetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1985 +#: ../../whatsnew/3.12.rst:1982 msgid "``PyUnstable_Code_SetExtra()`` (renamed from ``_PyCode_SetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1987 +#: ../../whatsnew/3.12.rst:1984 msgid "" "The original names will continue to be available until the respective API " "changes." msgstr "" -#: ../../whatsnew/3.12.rst:1990 +#: ../../whatsnew/3.12.rst:1987 msgid "(Contributed by Petr Viktorin in :gh:`101101`.)" msgstr "(由 Petr Viktorin 於 :gh:`101101` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1992 +#: ../../whatsnew/3.12.rst:1989 msgid "" ":pep:`697`: Add an API for extending types whose instance memory layout is " "opaque:" msgstr "" -#: ../../whatsnew/3.12.rst:1995 +#: ../../whatsnew/3.12.rst:1992 msgid "" ":c:member:`PyType_Spec.basicsize` can be zero or negative to specify " "inheriting or extending the base class size." msgstr "" -#: ../../whatsnew/3.12.rst:1997 +#: ../../whatsnew/3.12.rst:1994 msgid "" ":c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize` added to " "allow access to subclass-specific instance data." msgstr "" -#: ../../whatsnew/3.12.rst:1999 +#: ../../whatsnew/3.12.rst:1996 msgid "" ":c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added " "to allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" -#: ../../whatsnew/3.12.rst:2002 +#: ../../whatsnew/3.12.rst:1999 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` added to allow defining :c:type:`members " "` in terms of a subclass-specific struct." msgstr "" -#: ../../whatsnew/3.12.rst:2005 +#: ../../whatsnew/3.12.rst:2002 msgid "(Contributed by Petr Viktorin in :gh:`103509`.)" msgstr "(由 Petr Viktorin 於 :gh:`103509` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2007 +#: ../../whatsnew/3.12.rst:2004 msgid "" "Add the new :ref:`limited C API ` function :c:func:" "`PyType_FromMetaclass`, which generalizes the existing :c:func:" @@ -3154,29 +3154,29 @@ msgid "" "(Contributed by Wenzel Jakob in :gh:`93012`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2012 +#: ../../whatsnew/3.12.rst:2009 msgid "" "API for creating objects that can be called using :ref:`the vectorcall " "protocol ` was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2016 +#: ../../whatsnew/3.12.rst:2013 msgid ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" msgstr ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" -#: ../../whatsnew/3.12.rst:2017 +#: ../../whatsnew/3.12.rst:2014 msgid ":c:func:`PyVectorcall_NARGS`" msgstr ":c:func:`PyVectorcall_NARGS`" -#: ../../whatsnew/3.12.rst:2018 +#: ../../whatsnew/3.12.rst:2015 msgid ":c:func:`PyVectorcall_Call`" msgstr ":c:func:`PyVectorcall_Call`" -#: ../../whatsnew/3.12.rst:2019 +#: ../../whatsnew/3.12.rst:2016 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" -#: ../../whatsnew/3.12.rst:2021 +#: ../../whatsnew/3.12.rst:2018 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " @@ -3187,7 +3187,7 @@ msgid "" "`93274`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2029 +#: ../../whatsnew/3.12.rst:2026 msgid "" "The :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flags have been added. This allows extensions " @@ -3195,32 +3195,32 @@ msgid "" "using less memory and with faster access." msgstr "" -#: ../../whatsnew/3.12.rst:2034 +#: ../../whatsnew/3.12.rst:2031 msgid "" "API for performing calls using :ref:`the vectorcall protocol ` " "was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2038 +#: ../../whatsnew/3.12.rst:2035 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" -#: ../../whatsnew/3.12.rst:2039 +#: ../../whatsnew/3.12.rst:2036 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" -#: ../../whatsnew/3.12.rst:2040 +#: ../../whatsnew/3.12.rst:2037 msgid ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" msgstr ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" -#: ../../whatsnew/3.12.rst:2042 +#: ../../whatsnew/3.12.rst:2039 msgid "" "This means that both the incoming and outgoing ends of the vector call " "protocol are now available in the :ref:`Limited API `. (Contributed " "by Wenzel Jakob in :gh:`98586`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2046 +#: ../../whatsnew/3.12.rst:2043 msgid "" "Add two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:" "func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling " @@ -3228,14 +3228,14 @@ msgid "" "(Contributed by Pablo Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2052 +#: ../../whatsnew/3.12.rst:2049 msgid "" "Add new function :c:func:`PyFunction_SetVectorcall` to the C API which sets " "the vectorcall field of a given :c:type:`PyFunctionObject`. (Contributed by " "Andrew Frost in :gh:`92257`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2056 +#: ../../whatsnew/3.12.rst:2053 msgid "" "The C API now permits registering callbacks via :c:func:" "`PyDict_AddWatcher`, :c:func:`PyDict_Watch` and related APIs to be called " @@ -3244,28 +3244,28 @@ msgid "" "`91052`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2062 +#: ../../whatsnew/3.12.rst:2059 msgid "" "Add :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register " "callbacks to receive notification on changes to a type. (Contributed by Carl " "Meyer in :gh:`91051`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2066 +#: ../../whatsnew/3.12.rst:2063 msgid "" "Add :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to " "register callbacks to receive notification on creation and destruction of " "code objects. (Contributed by Itamar Oren in :gh:`91054`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2071 +#: ../../whatsnew/3.12.rst:2068 msgid "" "Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to " "get a frame variable by its name. (Contributed by Victor Stinner in :gh:" "`91248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2075 +#: ../../whatsnew/3.12.rst:2072 msgid "" "Add :c:func:`PyErr_GetRaisedException` and :c:func:" "`PyErr_SetRaisedException` for saving and restoring the current exception. " @@ -3275,14 +3275,14 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2083 +#: ../../whatsnew/3.12.rst:2080 msgid "" "Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to " "replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. " "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2087 +#: ../../whatsnew/3.12.rst:2084 msgid "" "Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as " "convenience functions for retrieving and modifying the :attr:`~BaseException." @@ -3290,71 +3290,71 @@ msgid "" "in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2092 +#: ../../whatsnew/3.12.rst:2089 msgid "" "Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to " "replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit " "Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:2098 +#: ../../whatsnew/3.12.rst:2095 msgid "" ":pep:`683`: Introduce *Immortal Objects*, which allows objects to bypass " "reference counts, and related changes to the C-API:" msgstr "" -#: ../../whatsnew/3.12.rst:2101 +#: ../../whatsnew/3.12.rst:2098 msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object" msgstr "" -#: ../../whatsnew/3.12.rst:2102 +#: ../../whatsnew/3.12.rst:2099 msgid "as immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2103 +#: ../../whatsnew/3.12.rst:2100 msgid "" "``_Py_IsImmortal`` Checks if an object has the immortal reference count." msgstr "" -#: ../../whatsnew/3.12.rst:2104 +#: ../../whatsnew/3.12.rst:2101 msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to" msgstr "" -#: ../../whatsnew/3.12.rst:2105 +#: ../../whatsnew/3.12.rst:2102 msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``." msgstr "" -#: ../../whatsnew/3.12.rst:2106 +#: ../../whatsnew/3.12.rst:2103 msgid "``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects" msgstr "" -#: ../../whatsnew/3.12.rst:2107 +#: ../../whatsnew/3.12.rst:2104 msgid "that are immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2108 +#: ../../whatsnew/3.12.rst:2105 msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2109 +#: ../../whatsnew/3.12.rst:2106 msgid "objects that are immortal and static" msgstr "" -#: ../../whatsnew/3.12.rst:2112 +#: ../../whatsnew/3.12.rst:2107 msgid "``sys.getunicodeinternedsize`` This returns the total number of unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2111 +#: ../../whatsnew/3.12.rst:2108 msgid "" "objects that have been interned. This is now needed for :file:`refleak.py` " "to correctly track reference counts and allocated blocks" msgstr "" -#: ../../whatsnew/3.12.rst:2114 +#: ../../whatsnew/3.12.rst:2111 msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)" msgstr "(由 Eddie Elizondo 於 :gh:`84436` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2116 +#: ../../whatsnew/3.12.rst:2113 msgid "" ":pep:`684`: Add the new :c:func:`Py_NewInterpreterFromConfig` function and :" "c:type:`PyInterpreterConfig`, which may be used to create sub-interpreters " @@ -3362,27 +3362,27 @@ msgid "" "(Contributed by Eric Snow in :gh:`104110`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2122 +#: ../../whatsnew/3.12.rst:2119 msgid "" "In the limited C API version 3.12, :c:func:`Py_INCREF` and :c:func:" "`Py_DECREF` functions are now implemented as opaque function calls to hide " "implementation details. (Contributed by Victor Stinner in :gh:`105387`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2130 +#: ../../whatsnew/3.12.rst:2127 msgid "" "Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been " "removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``." msgstr "" -#: ../../whatsnew/3.12.rst:2133 +#: ../../whatsnew/3.12.rst:2130 msgid "" "Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support " "``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to " "other formats for Unicode like ``s``, ``z``, ``es``, and ``U``." msgstr "" -#: ../../whatsnew/3.12.rst:2137 +#: ../../whatsnew/3.12.rst:2134 msgid "" "``tp_weaklist`` for all static builtin types is always ``NULL``. This is an " "internal-only field on ``PyTypeObject`` but we're pointing out the change in " @@ -3391,7 +3391,7 @@ msgid "" "necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro." msgstr "" -#: ../../whatsnew/3.12.rst:2144 +#: ../../whatsnew/3.12.rst:2141 msgid "" "This internal-only :c:member:`PyTypeObject.tp_subclasses` may now not be a " "valid object pointer. Its type was changed to :c:expr:`void *` to reflect " @@ -3399,13 +3399,13 @@ msgid "" "only field directly." msgstr "" -#: ../../whatsnew/3.12.rst:2149 +#: ../../whatsnew/3.12.rst:2146 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__` (using :c:func:`PyObject_CallMethod`, for example)." msgstr "" -#: ../../whatsnew/3.12.rst:2153 +#: ../../whatsnew/3.12.rst:2150 msgid "" "Add support of more formatting options (left aligning, octals, uppercase " "hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, :c:type:`wchar_t` C " @@ -3414,7 +3414,7 @@ msgid "" "`98836`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2159 +#: ../../whatsnew/3.12.rst:2156 msgid "" "An unrecognized format character in :c:func:`PyUnicode_FromFormat` and :c:" "func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous " @@ -3423,13 +3423,13 @@ msgid "" "Storchaka in :gh:`95781`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2165 +#: ../../whatsnew/3.12.rst:2162 msgid "" "Fix wrong sign placement in :c:func:`PyUnicode_FromFormat` and :c:func:" "`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in :gh:`95504`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2169 +#: ../../whatsnew/3.12.rst:2166 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " "should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" @@ -3443,7 +3443,7 @@ msgid "" "func:`PyObject_ClearWeakRefs`, as before." msgstr "" -#: ../../whatsnew/3.12.rst:2181 +#: ../../whatsnew/3.12.rst:2178 msgid "" "The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like " "paths, like :class:`bytearray` and :class:`memoryview` types: only the " @@ -3451,7 +3451,7 @@ msgid "" "Victor Stinner in :gh:`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2186 +#: ../../whatsnew/3.12.rst:2183 msgid "" "The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` " "macros now only evaluate their arguments once. If an argument has side " @@ -3459,7 +3459,7 @@ msgid "" "Stinner in :gh:`98724`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2191 +#: ../../whatsnew/3.12.rst:2188 msgid "" "The interpreter's error indicator is now always normalized. This means that :" "c:func:`PyErr_SetObject`, :c:func:`PyErr_SetString` and the other functions " @@ -3467,7 +3467,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2196 +#: ../../whatsnew/3.12.rst:2193 msgid "" "``_Py_RefTotal`` is no longer authoritative and only kept around for ABI " "compatibility. Note that it is an internal global and only available on " @@ -3475,25 +3475,25 @@ msgid "" "``_Py_GetGlobalRefTotal()``." msgstr "" -#: ../../whatsnew/3.12.rst:2201 +#: ../../whatsnew/3.12.rst:2198 msgid "" "The following functions now select an appropriate metaclass for the newly " "created type:" msgstr "" -#: ../../whatsnew/3.12.rst:2204 +#: ../../whatsnew/3.12.rst:2201 msgid ":c:func:`PyType_FromSpec`" msgstr ":c:func:`PyType_FromSpec`" -#: ../../whatsnew/3.12.rst:2205 +#: ../../whatsnew/3.12.rst:2202 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr ":c:func:`PyType_FromSpecWithBases`" -#: ../../whatsnew/3.12.rst:2206 +#: ../../whatsnew/3.12.rst:2203 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr ":c:func:`PyType_FromModuleAndSpec`" -#: ../../whatsnew/3.12.rst:2208 +#: ../../whatsnew/3.12.rst:2205 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is deprecated, and in Python 3.14+ it will be disallowed. Note that these " @@ -3501,14 +3501,14 @@ msgid "" "initialization." msgstr "" -#: ../../whatsnew/3.12.rst:2213 +#: ../../whatsnew/3.12.rst:2210 msgid "" "Note that :c:func:`PyType_FromMetaclass` (added in Python 3.12) already " "disallows creating classes whose metaclass overrides ``tp_new`` (:meth:" "`~object.__new__` in Python)." msgstr "" -#: ../../whatsnew/3.12.rst:2217 +#: ../../whatsnew/3.12.rst:2214 msgid "" "Since ``tp_new`` overrides almost everything ``PyType_From*`` functions do, " "the two are incompatible with each other. The existing behavior -- ignoring " @@ -3517,17 +3517,17 @@ msgid "" "general workaround. One of the following may work for you:" msgstr "" -#: ../../whatsnew/3.12.rst:2224 +#: ../../whatsnew/3.12.rst:2221 msgid "If you control the metaclass, avoid using ``tp_new`` in it:" msgstr "" -#: ../../whatsnew/3.12.rst:2226 +#: ../../whatsnew/3.12.rst:2223 msgid "" "If initialization can be skipped, it can be done in :c:member:`~PyTypeObject." "tp_init` instead." msgstr "" -#: ../../whatsnew/3.12.rst:2228 +#: ../../whatsnew/3.12.rst:2225 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " "``tp_new`` to ``NULL`` using the :c:macro:" @@ -3535,20 +3535,20 @@ msgid "" "``PyType_From*`` functions." msgstr "" -#: ../../whatsnew/3.12.rst:2233 +#: ../../whatsnew/3.12.rst:2230 msgid "" "Avoid ``PyType_From*`` functions: if you don't need C-specific features " "(slots or setting the instance size), create types by :ref:`calling ` " "the metaclass." msgstr "" -#: ../../whatsnew/3.12.rst:2237 +#: ../../whatsnew/3.12.rst:2234 msgid "" "If you *know* the ``tp_new`` can be skipped safely, filter the deprecation " "warning out using :func:`warnings.catch_warnings` from Python." msgstr "" -#: ../../whatsnew/3.12.rst:2240 +#: ../../whatsnew/3.12.rst:2237 msgid "" ":c:var:`PyOS_InputHook` and :c:var:`PyOS_ReadlineFunctionPointer` are no " "longer called in :ref:`subinterpreters `. This is " @@ -3556,14 +3556,14 @@ msgid "" "callbacks have no way of recovering extension module state)." msgstr "" -#: ../../whatsnew/3.12.rst:2245 +#: ../../whatsnew/3.12.rst:2242 msgid "" "This also avoids situations where extensions may find themselves running in " "a subinterpreter that they don't support (or haven't yet been loaded in). " "See :gh:`104668` for more info." msgstr "" -#: ../../whatsnew/3.12.rst:2249 +#: ../../whatsnew/3.12.rst:2246 msgid "" ":c:struct:`PyLongObject` has had its internals changed for better " "performance. Although the internals of :c:struct:`PyLongObject` are private, " @@ -3574,15 +3574,15 @@ msgid "" "a single machine word:" msgstr "" -#: ../../whatsnew/3.12.rst:2257 +#: ../../whatsnew/3.12.rst:2254 msgid ":c:func:`PyUnstable_Long_IsCompact`" msgstr ":c:func:`PyUnstable_Long_IsCompact`" -#: ../../whatsnew/3.12.rst:2258 +#: ../../whatsnew/3.12.rst:2255 msgid ":c:func:`PyUnstable_Long_CompactValue`" msgstr ":c:func:`PyUnstable_Long_CompactValue`" -#: ../../whatsnew/3.12.rst:2260 +#: ../../whatsnew/3.12.rst:2257 msgid "" "Custom allocators, set via :c:func:`PyMem_SetAllocator`, are now required to " "be thread-safe, regardless of memory domain. Allocators that don't have " @@ -3591,7 +3591,7 @@ msgid "" "create a new GitHub issue and CC ``@ericsnowcurrently``." msgstr "" -#: ../../whatsnew/3.12.rst:2270 +#: ../../whatsnew/3.12.rst:2267 msgid "" "In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" "`PyDictObject` is deprecated for extension modules. Accessing this field " @@ -3600,76 +3600,76 @@ msgid "" "PEP by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.12.rst:2275 +#: ../../whatsnew/3.12.rst:2272 msgid "Deprecate global configuration variable:" msgstr "" -#: ../../whatsnew/3.12.rst:2277 ../../whatsnew/3.12.rst:2362 +#: ../../whatsnew/3.12.rst:2274 ../../whatsnew/3.12.rst:2359 msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`" msgstr ":c:var:`Py_DebugFlag`: 請改用 :c:member:`PyConfig.parser_debug`" -#: ../../whatsnew/3.12.rst:2278 ../../whatsnew/3.12.rst:2363 +#: ../../whatsnew/3.12.rst:2275 ../../whatsnew/3.12.rst:2360 msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`" msgstr ":c:var:`Py_VerboseFlag`: 請改用 :c:member:`PyConfig.verbose`" -#: ../../whatsnew/3.12.rst:2279 ../../whatsnew/3.12.rst:2364 +#: ../../whatsnew/3.12.rst:2276 ../../whatsnew/3.12.rst:2361 msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`" msgstr ":c:var:`Py_QuietFlag`: 請改用 :c:member:`PyConfig.quiet`" -#: ../../whatsnew/3.12.rst:2280 ../../whatsnew/3.12.rst:2365 +#: ../../whatsnew/3.12.rst:2277 ../../whatsnew/3.12.rst:2362 msgid ":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`" msgstr ":c:var:`Py_InteractiveFlag`: 請改用 :c:member:`PyConfig.interactive`" -#: ../../whatsnew/3.12.rst:2281 ../../whatsnew/3.12.rst:2366 +#: ../../whatsnew/3.12.rst:2278 ../../whatsnew/3.12.rst:2363 msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`" msgstr ":c:var:`Py_InspectFlag`: 請改用 :c:member:`PyConfig.inspect`" -#: ../../whatsnew/3.12.rst:2282 ../../whatsnew/3.12.rst:2367 +#: ../../whatsnew/3.12.rst:2279 ../../whatsnew/3.12.rst:2364 msgid ":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`" msgstr "" ":c:var:`Py_OptimizeFlag`: 請改用 :c:member:`PyConfig.optimization_level`" -#: ../../whatsnew/3.12.rst:2283 ../../whatsnew/3.12.rst:2368 +#: ../../whatsnew/3.12.rst:2280 ../../whatsnew/3.12.rst:2365 msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`" msgstr ":c:var:`Py_NoSiteFlag`: 請改用 :c:member:`PyConfig.site_import`" -#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 +#: ../../whatsnew/3.12.rst:2281 ../../whatsnew/3.12.rst:2366 msgid ":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`" msgstr "" ":c:var:`Py_BytesWarningFlag`: 請改用 :c:member:`PyConfig.bytes_warning`" -#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 +#: ../../whatsnew/3.12.rst:2282 ../../whatsnew/3.12.rst:2367 msgid ":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`" msgstr "" ":c:var:`Py_FrozenFlag`: 請改用 :c:member:`PyConfig.pathconfig_warnings`" -#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 +#: ../../whatsnew/3.12.rst:2283 ../../whatsnew/3.12.rst:2368 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`" msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`: 請改用 :c:member:`PyConfig." "use_environment`" -#: ../../whatsnew/3.12.rst:2287 ../../whatsnew/3.12.rst:2372 +#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`" msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`: 請改用 :c:member:`PyConfig.write_bytecode`" -#: ../../whatsnew/3.12.rst:2288 ../../whatsnew/3.12.rst:2373 +#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 msgid "" ":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`" msgstr "" ":c:var:`Py_NoUserSiteDirectory`: 請改用 :c:member:`PyConfig." "user_site_directory`" -#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 +#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`" msgstr "" ":c:var:`Py_UnbufferedStdioFlag`: 請改用 :c:member:`PyConfig.buffered_stdio`" -#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 +#: ../../whatsnew/3.12.rst:2287 ../../whatsnew/3.12.rst:2372 msgid "" ":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed`" @@ -3677,11 +3677,11 @@ msgstr "" ":c:var:`Py_HashRandomizationFlag`: 請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`" -#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 +#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`" msgstr ":c:var:`Py_IsolatedFlag`: 請改用 :c:member:`PyConfig.isolated`" -#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 +#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" @@ -3689,7 +3689,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: 請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" -#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 +#: ../../whatsnew/3.12.rst:2291 ../../whatsnew/3.12.rst:2376 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." "legacy_windows_stdio`" @@ -3697,7 +3697,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`: 請改用 :c:member:`PyConfig." "legacy_windows_stdio`" -#: ../../whatsnew/3.12.rst:2295 ../../whatsnew/3.12.rst:2380 +#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3705,7 +3705,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2296 ../../whatsnew/3.12.rst:2381 +#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3713,7 +3713,7 @@ msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2297 ../../whatsnew/3.12.rst:2382 +#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." "filesystem_errors`" @@ -3721,7 +3721,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: 請改用 :c:member:`PyConfig." "filesystem_errors`" -#: ../../whatsnew/3.12.rst:2298 ../../whatsnew/3.12.rst:2383 +#: ../../whatsnew/3.12.rst:2295 ../../whatsnew/3.12.rst:2380 msgid "" ":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:" "`Py_PreInitialize`)" @@ -3729,7 +3729,7 @@ msgstr "" ":c:var:`!Py_UTF8Mode`: 請改用 :c:member:`PyPreConfig.utf8_mode`\\ (參見 :c:" "func:`Py_PreInitialize`)" -#: ../../whatsnew/3.12.rst:2300 +#: ../../whatsnew/3.12.rst:2297 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead. (Contributed by Victor Stinner in :gh:`77782`.)" @@ -3737,25 +3737,25 @@ msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" "(由 Victor Stinner 於 :gh:`77782` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2304 +#: ../../whatsnew/3.12.rst:2301 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases is deprecated and will be disabled in Python 3.14. (:gh:`95388`)" msgstr "" -#: ../../whatsnew/3.12.rst:2307 +#: ../../whatsnew/3.12.rst:2304 msgid "" "The :file:`structmember.h` header is deprecated, though it continues to be " "available and there are no plans to remove it." msgstr ":file:`structmember.h` 標頭已棄用,但仍可使用,且還沒有移除它的計畫。" -#: ../../whatsnew/3.12.rst:2310 +#: ../../whatsnew/3.12.rst:2307 msgid "" "Its contents are now available just by including :file:`Python.h`, with a " "``Py`` prefix added if it was missing:" msgstr "" -#: ../../whatsnew/3.12.rst:2313 +#: ../../whatsnew/3.12.rst:2310 msgid "" ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and :c:func:" "`PyMember_SetOne`" @@ -3763,13 +3763,13 @@ msgstr "" ":c:struct:`PyMemberDef`、:c:func:`PyMember_GetOne` 和 :c:func:" "`PyMember_SetOne`" -#: ../../whatsnew/3.12.rst:2315 +#: ../../whatsnew/3.12.rst:2312 msgid "" "Type macros like :c:macro:`Py_T_INT`, :c:macro:`Py_T_DOUBLE`, etc. " "(previously ``T_INT``, ``T_DOUBLE``, etc.)" msgstr "" -#: ../../whatsnew/3.12.rst:2317 +#: ../../whatsnew/3.12.rst:2314 msgid "" "The flags :c:macro:`Py_READONLY` (previously ``READONLY``) and :c:macro:" "`Py_AUDIT_READ` (previously all uppercase)" @@ -3777,23 +3777,23 @@ msgstr "" ":c:macro:`Py_READONLY`\\ (先前為 ``READONLY``)和 :c:macro:" "`Py_AUDIT_READ`\\ (先前全大寫)旗標" -#: ../../whatsnew/3.12.rst:2320 +#: ../../whatsnew/3.12.rst:2317 msgid "Several items are not exposed from :file:`Python.h`:" msgstr "數個項目不再從 :file:`Python.h` 中公開:" -#: ../../whatsnew/3.12.rst:2322 +#: ../../whatsnew/3.12.rst:2319 msgid ":c:macro:`T_OBJECT` (use :c:macro:`Py_T_OBJECT_EX`)" msgstr ":c:macro:`T_OBJECT`\\ (請改用 :c:macro:`Py_T_OBJECT_EX`)" -#: ../../whatsnew/3.12.rst:2323 +#: ../../whatsnew/3.12.rst:2320 msgid ":c:macro:`T_NONE` (previously undocumented, and pretty quirky)" msgstr ":c:macro:`T_NONE`\\ (先前未記錄於文件上,且相當古怪)" -#: ../../whatsnew/3.12.rst:2324 +#: ../../whatsnew/3.12.rst:2321 msgid "The macro ``WRITE_RESTRICTED`` which does nothing." msgstr "不做任何事的巨集 ``WRITE_RESTRICTED``。" -#: ../../whatsnew/3.12.rst:2325 +#: ../../whatsnew/3.12.rst:2322 msgid "" "The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of :c:macro:" "`Py_AUDIT_READ`." @@ -3801,33 +3801,33 @@ msgstr "" "``RESTRICTED`` 和 ``READ_RESTRICTED`` 這兩個巨集,相當於 :c:macro:" "`Py_AUDIT_READ`。" -#: ../../whatsnew/3.12.rst:2327 +#: ../../whatsnew/3.12.rst:2324 msgid "" "In some configurations, ```` is not included from :file:`Python." "h`. It should be included manually when using ``offsetof()``." msgstr "" -#: ../../whatsnew/3.12.rst:2330 +#: ../../whatsnew/3.12.rst:2327 msgid "" "The deprecated header continues to provide its original contents under the " "original names. Your old code can stay unchanged, unless the extra include " "and non-namespaced macros bother you greatly." msgstr "" -#: ../../whatsnew/3.12.rst:2335 +#: ../../whatsnew/3.12.rst:2332 msgid "" "(Contributed in :gh:`47146` by Petr Viktorin, based on earlier work by " "Alexander Belopolsky and Matthias Braun.)" msgstr "" -#: ../../whatsnew/3.12.rst:2338 +#: ../../whatsnew/3.12.rst:2335 msgid "" ":c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` are deprecated. Use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` " "instead. (Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2343 +#: ../../whatsnew/3.12.rst:2340 msgid "" ":c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException` " "instead. (Contributed by Irit Katriel in :gh:`102755`)." @@ -3835,7 +3835,7 @@ msgstr "" ":c:func:`!PyErr_Display` 已棄用,請改用 :c:func:`PyErr_DisplayException`。" "(由 Irit Katriel 於 :gh:`102755` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2346 +#: ../../whatsnew/3.12.rst:2343 msgid "" "``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1`` " "instead. (Contributed by Irit Katriel in :gh:`102192`.)" @@ -3843,56 +3843,56 @@ msgstr "" "``_PyErr_ChainExceptions`` 已棄用,請改用 ``_PyErr_ChainExceptions1``。(由 " "Irit Katriel 於 :gh:`102192` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2349 +#: ../../whatsnew/3.12.rst:2346 msgid "" "Using :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` or :c:" "func:`PyType_FromModuleAndSpec` to create a class whose metaclass overrides :" "c:member:`~PyTypeObject.tp_new` is deprecated. Call the metaclass instead." msgstr "" -#: ../../whatsnew/3.12.rst:2357 +#: ../../whatsnew/3.12.rst:2354 msgid "" "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " "(:pep:`699`; :gh:`101193`)." msgstr "" -#: ../../whatsnew/3.12.rst:2360 +#: ../../whatsnew/3.12.rst:2357 msgid "Global configuration variables:" msgstr "" -#: ../../whatsnew/3.12.rst:2385 +#: ../../whatsnew/3.12.rst:2382 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" -#: ../../whatsnew/3.12.rst:2388 +#: ../../whatsnew/3.12.rst:2385 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases (:gh:`95388`)." msgstr "" -#: ../../whatsnew/3.12.rst:2394 +#: ../../whatsnew/3.12.rst:2391 msgid "" ":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`" msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`" -#: ../../whatsnew/3.12.rst:2395 +#: ../../whatsnew/3.12.rst:2392 msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t`" msgstr ":c:type:`!Py_UNICODE_WIDE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2396 +#: ../../whatsnew/3.12.rst:2393 msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t`" msgstr ":c:type:`Py_UNICODE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2397 +#: ../../whatsnew/3.12.rst:2394 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../whatsnew/3.12.rst:2399 +#: ../../whatsnew/3.12.rst:2396 msgid "" ":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" "warnings.filters`" @@ -3900,27 +3900,27 @@ msgstr "" ":c:func:`PySys_ResetWarnOptions`:清除 :data:`sys.warnoptions` 和 :data:`!" "warnings.filters`" -#: ../../whatsnew/3.12.rst:2401 +#: ../../whatsnew/3.12.rst:2398 msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix`" msgstr ":c:func:`Py_GetExecPrefix`:取得 :data:`sys.exec_prefix`" -#: ../../whatsnew/3.12.rst:2402 +#: ../../whatsnew/3.12.rst:2399 msgid ":c:func:`Py_GetPath`: get :data:`sys.path`" msgstr ":c:func:`Py_GetPath`:取得 :data:`sys.path`" -#: ../../whatsnew/3.12.rst:2403 +#: ../../whatsnew/3.12.rst:2400 msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix`" msgstr ":c:func:`Py_GetPrefix`:取得 :data:`sys.prefix`" -#: ../../whatsnew/3.12.rst:2404 +#: ../../whatsnew/3.12.rst:2401 msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramFullPath`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2405 +#: ../../whatsnew/3.12.rst:2402 msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramName`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2406 +#: ../../whatsnew/3.12.rst:2403 msgid "" ":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable" @@ -3928,41 +3928,41 @@ msgstr "" ":c:func:`Py_GetPythonHome`:取得 :c:member:`PyConfig.home` 或 :envvar:" "`PYTHONHOME` 環境變數" -#: ../../whatsnew/3.12.rst:2412 +#: ../../whatsnew/3.12.rst:2409 msgid "" "The following APIs are deprecated and will be removed, although there is " "currently no date scheduled for their removal." msgstr "以下 API 已棄用,且將會被移除,雖目前尚未定下移除日期。" -#: ../../whatsnew/3.12.rst:2415 +#: ../../whatsnew/3.12.rst:2412 msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8" msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../whatsnew/3.12.rst:2416 +#: ../../whatsnew/3.12.rst:2413 msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`" msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2417 +#: ../../whatsnew/3.12.rst:2414 msgid "" ":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`" msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2418 +#: ../../whatsnew/3.12.rst:2415 msgid ":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`" msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`" -#: ../../whatsnew/3.12.rst:2419 +#: ../../whatsnew/3.12.rst:2416 msgid "" ":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`" msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`" -#: ../../whatsnew/3.12.rst:2420 +#: ../../whatsnew/3.12.rst:2417 msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child`" msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`" -#: ../../whatsnew/3.12.rst:2421 +#: ../../whatsnew/3.12.rst:2418 msgid "" ":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices`" @@ -3970,122 +3970,122 @@ msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`" -#: ../../whatsnew/3.12.rst:2422 +#: ../../whatsnew/3.12.rst:2419 msgid ":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2423 +#: ../../whatsnew/3.12.rst:2420 msgid ":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2424 +#: ../../whatsnew/3.12.rst:2421 msgid ":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2425 +#: ../../whatsnew/3.12.rst:2422 msgid ":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2426 +#: ../../whatsnew/3.12.rst:2423 msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../whatsnew/3.12.rst:2427 +#: ../../whatsnew/3.12.rst:2424 msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`" msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`" -#: ../../whatsnew/3.12.rst:2428 +#: ../../whatsnew/3.12.rst:2425 msgid ":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``" msgstr ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``" -#: ../../whatsnew/3.12.rst:2429 +#: ../../whatsnew/3.12.rst:2426 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead" msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改用 :c:func:`PyObject_Hash`" -#: ../../whatsnew/3.12.rst:2431 +#: ../../whatsnew/3.12.rst:2428 msgid ":c:member:`!PyDictObject.ma_version_tag` member" msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員" -#: ../../whatsnew/3.12.rst:2432 +#: ../../whatsnew/3.12.rst:2429 msgid "Thread Local Storage (TLS) API:" msgstr "" -#: ../../whatsnew/3.12.rst:2434 +#: ../../whatsnew/3.12.rst:2431 msgid ":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`" msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`" -#: ../../whatsnew/3.12.rst:2435 +#: ../../whatsnew/3.12.rst:2432 msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`" msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`" -#: ../../whatsnew/3.12.rst:2436 +#: ../../whatsnew/3.12.rst:2433 msgid ":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`" msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`" -#: ../../whatsnew/3.12.rst:2437 +#: ../../whatsnew/3.12.rst:2434 msgid ":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`" msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`" -#: ../../whatsnew/3.12.rst:2438 +#: ../../whatsnew/3.12.rst:2435 msgid ":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`" msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`" -#: ../../whatsnew/3.12.rst:2439 +#: ../../whatsnew/3.12.rst:2436 msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7" msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要" -#: ../../whatsnew/3.12.rst:2444 +#: ../../whatsnew/3.12.rst:2441 msgid "" "Remove the :file:`token.h` header file. There was never any public tokenizer " "C API. The :file:`token.h` header file was only designed to be used by " "Python internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2449 +#: ../../whatsnew/3.12.rst:2446 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:2451 +#: ../../whatsnew/3.12.rst:2448 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.12.rst:2452 +#: ../../whatsnew/3.12.rst:2449 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.12.rst:2453 +#: ../../whatsnew/3.12.rst:2450 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.12.rst:2454 +#: ../../whatsnew/3.12.rst:2451 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.12.rst:2455 +#: ../../whatsnew/3.12.rst:2452 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.12.rst:2456 +#: ../../whatsnew/3.12.rst:2453 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.12.rst:2457 +#: ../../whatsnew/3.12.rst:2454 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.12.rst:2458 +#: ../../whatsnew/3.12.rst:2455 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.12.rst:2459 +#: ../../whatsnew/3.12.rst:2456 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.12.rst:2461 +#: ../../whatsnew/3.12.rst:2458 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 851c3dac0e..3ede279eca 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-18 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -117,7 +117,7 @@ msgid "" "subparsers, each with their own argument patterns and help displays::" msgstr "" -#: ../../whatsnew/3.2.rst:176 +#: ../../whatsnew/3.2.rst:175 msgid ":pep:`389` - New Command Line Parsing Module" msgstr "" @@ -226,7 +226,7 @@ msgid "" "launch of four parallel threads for copying files::" msgstr "" -#: ../../whatsnew/3.2.rst:282 +#: ../../whatsnew/3.2.rst:281 msgid ":pep:`3148` - Futures -- Execute Computations Asynchronously" msgstr "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index e7ba840fc5..b73225094e 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-11 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -173,7 +173,7 @@ msgid "" "`420`)" msgstr "" -#: ../../whatsnew/3.3.rst:133 +#: ../../whatsnew/3.3.rst:132 msgid ":pep:`420` - Implicit Namespace Packages" msgstr "" @@ -417,7 +417,7 @@ msgid "" "benchmark (see the PEP for details)." msgstr "" -#: ../../whatsnew/3.3.rst:283 +#: ../../whatsnew/3.3.rst:282 msgid ":pep:`393` - Flexible String Representation" msgstr "" @@ -465,7 +465,7 @@ msgid "" "Curtin in :issue:`3561`.)" msgstr "" -#: ../../whatsnew/3.3.rst:317 +#: ../../whatsnew/3.3.rst:315 msgid ":pep:`397` - Python Launcher for Windows" msgstr ":pep:`397` - 適用於 Windows 的 Python 啟動器" @@ -635,7 +635,7 @@ msgid "" "into multiple subfunctions." msgstr "" -#: ../../whatsnew/3.3.rst:464 +#: ../../whatsnew/3.3.rst:462 msgid ":pep:`380` - Syntax for Delegating to a Subgenerator" msgstr "" @@ -670,7 +670,7 @@ msgid "" "suppressed valuable underlying details)::" msgstr "" -#: ../../whatsnew/3.3.rst:528 +#: ../../whatsnew/3.3.rst:527 msgid ":pep:`409` - Suppressing exception context" msgstr "" @@ -784,7 +784,7 @@ msgid "" "code that validates or amends calling signatures or arguments." msgstr "" -#: ../../whatsnew/3.3.rst:642 +#: ../../whatsnew/3.3.rst:641 msgid ":pep:`362`: - Function Signature Object" msgstr ":pep:`362`: - 函式簽名物件" @@ -1511,7 +1511,7 @@ msgstr "" msgid "decimal" msgstr "decimal" -#: ../../whatsnew/3.3.rst:1097 +#: ../../whatsnew/3.3.rst:1096 msgid ":issue:`7652` - integrate fast native decimal arithmetic." msgstr "" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index dcf608e986..7b195e364d 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -379,7 +379,7 @@ msgid "" "ref:`setuptools-index`." msgstr "" -#: ../../whatsnew/3.4.rst:255 +#: ../../whatsnew/3.4.rst:254 msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations" msgstr "" @@ -692,7 +692,7 @@ msgid "" "enumeration values." msgstr "" -#: ../../whatsnew/3.4.rst:519 +#: ../../whatsnew/3.4.rst:518 msgid ":pep:`435` -- Adding an Enum type to the Python standard library" msgstr "" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index e3f0a810c4..9678fe5cbe 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-05 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -357,7 +357,7 @@ msgid "" "unpackings (see :ref:`exprlists` and :ref:`dict`)::" msgstr "" -#: ../../whatsnew/3.5.rst:353 +#: ../../whatsnew/3.5.rst:352 msgid ":pep:`448` -- Additional Unpacking Generalizations" msgstr "" @@ -406,7 +406,7 @@ msgid "" "only be used in codebases that need compatibility with Python 2." msgstr "" -#: ../../whatsnew/3.5.rst:398 +#: ../../whatsnew/3.5.rst:397 msgid ":pep:`461` -- Adding % formatting to bytes and bytearray" msgstr "" @@ -467,7 +467,7 @@ msgstr "" msgid ":mod:`typing` module documentation" msgstr ":mod:`typing` 模組文件" -#: ../../whatsnew/3.5.rst:439 +#: ../../whatsnew/3.5.rst:438 msgid ":pep:`484` -- Type Hints" msgstr "" @@ -627,7 +627,7 @@ msgstr ":func:`signal.sigtimedwait` 和 :func:`signal.sigwaitinfo`\\ ;" msgid ":func:`time.sleep`." msgstr ":func:`time.sleep`\\ 。" -#: ../../whatsnew/3.5.rst:552 +#: ../../whatsnew/3.5.rst:551 msgid ":pep:`475` -- Retry system calls failing with EINTR" msgstr "" @@ -674,7 +674,7 @@ msgid "" "generator." msgstr "" -#: ../../whatsnew/3.5.rst:601 +#: ../../whatsnew/3.5.rst:600 msgid ":pep:`479` -- Change StopIteration handling inside generators" msgstr "" @@ -704,7 +704,7 @@ msgid "" "must be a non-negative value::" msgstr "" -#: ../../whatsnew/3.5.rst:639 +#: ../../whatsnew/3.5.rst:638 msgid ":pep:`485` -- A function for testing approximate equality" msgstr "" @@ -776,7 +776,7 @@ msgid "" "rather than being restricted to ASCII." msgstr "" -#: ../../whatsnew/3.5.rst:696 +#: ../../whatsnew/3.5.rst:695 msgid ":pep:`489` -- Multi-phase extension module initialization" msgstr "" @@ -1155,7 +1155,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:953 msgid "" "For earlier Python versions, a backport of the new ABCs is available in an " -"external `PyPI package `_." +"external :pypi:`PyPI package `." msgstr "" #: ../../whatsnew/3.5.rst:958 diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 85e5a4c76e..3b00521a7f 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -256,7 +256,7 @@ msgid "" "protocol::" msgstr "" -#: ../../whatsnew/3.6.rst:204 +#: ../../whatsnew/3.6.rst:203 msgid ":pep:`498` -- Literal String Interpolation." msgstr "" @@ -294,7 +294,7 @@ msgid "" "and the ``__annotations__`` attribute." msgstr "" -#: ../../whatsnew/3.6.rst:238 +#: ../../whatsnew/3.6.rst:236 msgid ":pep:`526` -- Syntax for variable annotations." msgstr "" @@ -407,7 +407,7 @@ msgid "" "``type.__new__`` (as described in :ref:`class-object-creation`)." msgstr "" -#: ../../whatsnew/3.6.rst:356 ../../whatsnew/3.6.rst:394 +#: ../../whatsnew/3.6.rst:355 ../../whatsnew/3.6.rst:393 msgid ":pep:`487` -- Simpler customization of class creation" msgstr "" @@ -532,7 +532,7 @@ msgid "" "(chronologically) moment in time in an ambiguous case." msgstr "" -#: ../../whatsnew/3.6.rst:498 +#: ../../whatsnew/3.6.rst:497 msgid ":pep:`495` -- Local Time Disambiguation" msgstr "" @@ -2686,7 +2686,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:2071 msgid "xml" -msgstr "" +msgstr "xml" #: ../../whatsnew/3.6.rst:2073 msgid "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 67cd26c9bc..0228567446 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 00:04+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -667,7 +667,7 @@ msgstr "法文:https://docs.python.org/fr/" msgid "Korean: https://docs.python.org/ko/" msgstr "韓文:https://docs.python.org/ko/" -#: ../../whatsnew/3.7.rst:477 +#: ../../whatsnew/3.7.rst:476 msgid ":pep:`545` -- Python Documentation Translations" msgstr ":pep:`545` -- Python 文件翻譯" @@ -2270,7 +2270,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:1607 msgid "xml" -msgstr "" +msgstr "xml" #: ../../whatsnew/3.7.rst:1609 msgid "" @@ -3671,10 +3671,9 @@ msgid "" "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " "now raises a :exc:`ValueError` if the number of digits in string form is " "above a limit to avoid potential denial of service attacks due to the " -"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " -"configured or disabled by environment variable, command line flag, or :mod:" -"`sys` APIs. See the :ref:`integer string conversion length limitation " -"` documentation. The default limit is 4300 digits in " -"string form." +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." msgstr "" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 760173a390..89a88b2582 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-16 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1523,7 +1523,7 @@ msgid "" "(:func:`gc.collect`). (Contributed by Victor Stinner in :issue:`36829`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1250 ../../whatsnew/3.8.rst:2351 +#: ../../whatsnew/3.8.rst:1250 ../../whatsnew/3.8.rst:2350 msgid "tarfile" msgstr "tarfile" @@ -2979,19 +2979,18 @@ msgid "" "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " "now raises a :exc:`ValueError` if the number of digits in string form is " "above a limit to avoid potential denial of service attacks due to the " -"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " -"configured or disabled by environment variable, command line flag, or :mod:" -"`sys` APIs. See the :ref:`integer string conversion length limitation " -"` documentation. The default limit is 4300 digits in " -"string form." +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." msgstr "" -#: ../../whatsnew/3.8.rst:2348 +#: ../../whatsnew/3.8.rst:2347 msgid "Notable changes in 3.8.17" msgstr "" -#: ../../whatsnew/3.8.rst:2353 +#: ../../whatsnew/3.8.rst:2352 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 626da68527..2fdb128447 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -198,7 +198,7 @@ msgid "" "Python as well. Consult the :ref:`removed-in-python-39` section." msgstr "" -#: ../../whatsnew/3.9.rst:140 ../../whatsnew/3.9.rst:1273 +#: ../../whatsnew/3.9.rst:140 ../../whatsnew/3.9.rst:1270 msgid "New Features" msgstr "" @@ -253,7 +253,7 @@ msgid "" "for example ``queue.Queue``." msgstr "" -#: ../../whatsnew/3.9.rst:180 ../../whatsnew/3.9.rst:1161 +#: ../../whatsnew/3.9.rst:180 ../../whatsnew/3.9.rst:1158 msgid "Example:" msgstr "範例:" @@ -400,24 +400,24 @@ msgstr "" #: ../../whatsnew/3.9.rst:302 msgid "" "As a fall-back source of data for platforms that don't ship the IANA " -"database, the |tzdata|_ module was released as a first-party package -- " +"database, the :pypi:`tzdata` module was released as a first-party package -- " "distributed via PyPI and maintained by the CPython core team." msgstr "" -#: ../../whatsnew/3.9.rst:311 +#: ../../whatsnew/3.9.rst:308 msgid "" ":pep:`615` -- Support for the IANA Time Zone Database in the Standard Library" msgstr "" -#: ../../whatsnew/3.9.rst:312 +#: ../../whatsnew/3.9.rst:309 msgid "PEP written and implemented by Paul Ganssle" msgstr "由 Paul Ganssle 撰寫 PEP 與實作" -#: ../../whatsnew/3.9.rst:316 +#: ../../whatsnew/3.9.rst:313 msgid "graphlib" msgstr "graphlib" -#: ../../whatsnew/3.9.rst:318 +#: ../../whatsnew/3.9.rst:315 msgid "" "A new module, :mod:`graphlib`, was added that contains the :class:`graphlib." "TopologicalSorter` class to offer functionality to perform topological " @@ -425,22 +425,22 @@ msgid "" "Hastings in :issue:`17005`.)" msgstr "" -#: ../../whatsnew/3.9.rst:325 +#: ../../whatsnew/3.9.rst:322 msgid "Improved Modules" msgstr "改進的模組" -#: ../../whatsnew/3.9.rst:328 +#: ../../whatsnew/3.9.rst:325 msgid "ast" msgstr "ast" -#: ../../whatsnew/3.9.rst:330 +#: ../../whatsnew/3.9.rst:327 msgid "" "Added the *indent* option to :func:`~ast.dump` which allows it to produce a " "multiline indented output. (Contributed by Serhiy Storchaka in :issue:" "`37995`.)" msgstr "" -#: ../../whatsnew/3.9.rst:334 +#: ../../whatsnew/3.9.rst:331 msgid "" "Added :func:`ast.unparse` as a function in the :mod:`ast` module that can be " "used to unparse an :class:`ast.AST` object and produce a string with code " @@ -448,17 +448,17 @@ msgid "" "(Contributed by Pablo Galindo and Batuhan Taskaya in :issue:`38870`.)" msgstr "" -#: ../../whatsnew/3.9.rst:339 +#: ../../whatsnew/3.9.rst:336 msgid "" "Added docstrings to AST nodes that contains the ASDL signature used to " "construct that node. (Contributed by Batuhan Taskaya in :issue:`39638`.)" msgstr "" -#: ../../whatsnew/3.9.rst:343 +#: ../../whatsnew/3.9.rst:340 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.9.rst:345 +#: ../../whatsnew/3.9.rst:342 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " @@ -468,7 +468,7 @@ msgid "" "`37228`.)" msgstr "" -#: ../../whatsnew/3.9.rst:352 +#: ../../whatsnew/3.9.rst:349 msgid "" "Added a new :term:`coroutine` :meth:`~asyncio.loop." "shutdown_default_executor` that schedules a shutdown for the default " @@ -477,13 +477,13 @@ msgid "" "new :term:`coroutine`. (Contributed by Kyle Stanley in :issue:`34037`.)" msgstr "" -#: ../../whatsnew/3.9.rst:358 +#: ../../whatsnew/3.9.rst:355 msgid "" "Added :class:`asyncio.PidfdChildWatcher`, a Linux-specific child watcher " "implementation that polls process file descriptors. (:issue:`38692`)" msgstr "" -#: ../../whatsnew/3.9.rst:361 +#: ../../whatsnew/3.9.rst:358 msgid "" "Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used " "for running IO-bound functions in a separate thread to avoid blocking the " @@ -492,7 +492,7 @@ msgid "" "by Kyle Stanley and Yury Selivanov in :issue:`32309`.)" msgstr "" -#: ../../whatsnew/3.9.rst:367 +#: ../../whatsnew/3.9.rst:364 msgid "" "When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now " "wait until the cancellation is complete also in the case when *timeout* is " @@ -500,25 +500,25 @@ msgid "" "Pranskevichus in :issue:`32751`.)" msgstr "" -#: ../../whatsnew/3.9.rst:372 +#: ../../whatsnew/3.9.rst:369 msgid "" ":mod:`asyncio` now raises :exc:`TyperError` when calling incompatible " "methods with an :class:`ssl.SSLSocket` socket. (Contributed by Ido Michael " "in :issue:`37404`.)" msgstr "" -#: ../../whatsnew/3.9.rst:377 +#: ../../whatsnew/3.9.rst:374 msgid "compileall" msgstr "compileall" -#: ../../whatsnew/3.9.rst:379 +#: ../../whatsnew/3.9.rst:376 msgid "" "Added new possibility to use hardlinks for duplicated ``.pyc`` files: " "*hardlink_dupes* parameter and --hardlink-dupes command line option. " "(Contributed by Lumír 'Frenzy' Balhar in :issue:`40495`.)" msgstr "" -#: ../../whatsnew/3.9.rst:382 +#: ../../whatsnew/3.9.rst:379 msgid "" "Added new options for path manipulation in resulting ``.pyc`` files: " "*stripdir*, *prependdir*, *limit_sl_dest* parameters and -s, -p, -e command " @@ -527,11 +527,11 @@ msgid "" "issue:`38112`.)" msgstr "" -#: ../../whatsnew/3.9.rst:387 +#: ../../whatsnew/3.9.rst:384 msgid "concurrent.futures" msgstr "concurrent.futures" -#: ../../whatsnew/3.9.rst:389 +#: ../../whatsnew/3.9.rst:386 msgid "" "Added a new *cancel_futures* parameter to :meth:`concurrent.futures.Executor." "shutdown` that cancels all pending futures which have not started running, " @@ -539,7 +539,7 @@ msgid "" "(Contributed by Kyle Stanley in :issue:`39349`.)" msgstr "" -#: ../../whatsnew/3.9.rst:395 +#: ../../whatsnew/3.9.rst:392 msgid "" "Removed daemon threads from :class:`~concurrent.futures.ThreadPoolExecutor` " "and :class:`~concurrent.futures.ProcessPoolExecutor`. This improves " @@ -547,7 +547,7 @@ msgid "" "processes. (Contributed by Kyle Stanley in :issue:`39812`.)" msgstr "" -#: ../../whatsnew/3.9.rst:400 +#: ../../whatsnew/3.9.rst:397 msgid "" "Workers in :class:`~concurrent.futures.ProcessPoolExecutor` are now spawned " "on demand, only when there are no available idle workers to reuse. This " @@ -555,22 +555,22 @@ msgid "" "workers. (Contributed by Kyle Stanley in :issue:`39207`.)" msgstr "" -#: ../../whatsnew/3.9.rst:406 +#: ../../whatsnew/3.9.rst:403 msgid "curses" msgstr "curses" -#: ../../whatsnew/3.9.rst:408 +#: ../../whatsnew/3.9.rst:405 msgid "" "Added :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, :func:" "`curses.get_tabsize`, and :func:`curses.set_tabsize` functions. (Contributed " "by Anthony Sottile in :issue:`38312`.)" msgstr "" -#: ../../whatsnew/3.9.rst:413 +#: ../../whatsnew/3.9.rst:410 msgid "datetime" msgstr "datetime" -#: ../../whatsnew/3.9.rst:414 +#: ../../whatsnew/3.9.rst:411 msgid "" "The :meth:`~datetime.date.isocalendar()` of :class:`datetime.date` and :meth:" "`~datetime.datetime.isocalendar()` of :class:`datetime.datetime` methods now " @@ -578,33 +578,33 @@ msgid "" "(Contributed by Donghee Na in :issue:`24416`.)" msgstr "" -#: ../../whatsnew/3.9.rst:420 +#: ../../whatsnew/3.9.rst:417 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.9.rst:422 +#: ../../whatsnew/3.9.rst:419 msgid "" "The :command:`upload` command now creates SHA2-256 and Blake2b-256 hash " "digests. It skips MD5 on platforms that block MD5 digest. (Contributed by " "Christian Heimes in :issue:`40698`.)" msgstr "" -#: ../../whatsnew/3.9.rst:427 +#: ../../whatsnew/3.9.rst:424 msgid "fcntl" msgstr "fcntl" -#: ../../whatsnew/3.9.rst:429 +#: ../../whatsnew/3.9.rst:426 msgid "" "Added constants :const:`~fcntl.F_OFD_GETLK`, :const:`~fcntl.F_OFD_SETLK` " "and :const:`~fcntl.F_OFD_SETLKW`. (Contributed by Donghee Na in :issue:" "`38602`.)" msgstr "" -#: ../../whatsnew/3.9.rst:434 +#: ../../whatsnew/3.9.rst:431 msgid "ftplib" msgstr "ftplib" -#: ../../whatsnew/3.9.rst:436 +#: ../../whatsnew/3.9.rst:433 msgid "" ":class:`~ftplib.FTP` and :class:`~ftplib.FTP_TLS` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -612,11 +612,11 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:441 +#: ../../whatsnew/3.9.rst:438 msgid "gc" msgstr "gc" -#: ../../whatsnew/3.9.rst:443 +#: ../../whatsnew/3.9.rst:440 msgid "" "When the garbage collector makes a collection in which some objects " "resurrect (they are reachable from outside the isolated cycles after the " @@ -625,24 +625,24 @@ msgid "" "issue:`38379`.)" msgstr "" -#: ../../whatsnew/3.9.rst:448 +#: ../../whatsnew/3.9.rst:445 msgid "" "Added a new function :func:`gc.is_finalized` to check if an object has been " "finalized by the garbage collector. (Contributed by Pablo Galindo in :issue:" "`39322`.)" msgstr "" -#: ../../whatsnew/3.9.rst:453 +#: ../../whatsnew/3.9.rst:450 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.9.rst:455 +#: ../../whatsnew/3.9.rst:452 msgid "" "The :mod:`hashlib` module can now use SHA3 hashes and SHAKE XOF from OpenSSL " "when available. (Contributed by Christian Heimes in :issue:`37630`.)" msgstr "" -#: ../../whatsnew/3.9.rst:459 +#: ../../whatsnew/3.9.rst:456 msgid "" "Builtin hash modules can now be disabled with ``./configure --without-" "builtin-hashlib-hashes`` or selectively enabled with e.g. ``./configure --" @@ -650,55 +650,55 @@ msgid "" "implementation. (Contributed by Christian Heimes in :issue:`40479`)" msgstr "" -#: ../../whatsnew/3.9.rst:467 +#: ../../whatsnew/3.9.rst:464 msgid "http" msgstr "http" -#: ../../whatsnew/3.9.rst:469 +#: ../../whatsnew/3.9.rst:466 msgid "" "HTTP status codes ``103 EARLY_HINTS``, ``418 IM_A_TEAPOT`` and ``425 " "TOO_EARLY`` are added to :class:`http.HTTPStatus`. (Contributed by Donghee " "Na in :issue:`39509` and Ross Rhodes in :issue:`39507`.)" msgstr "" -#: ../../whatsnew/3.9.rst:473 +#: ../../whatsnew/3.9.rst:470 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.9.rst:475 +#: ../../whatsnew/3.9.rst:472 msgid "" "Added option to toggle cursor blink off. (Contributed by Zackery Spytz in :" "issue:`4603`.)" msgstr "" -#: ../../whatsnew/3.9.rst:478 +#: ../../whatsnew/3.9.rst:475 msgid "" "Escape key now closes IDLE completion windows. (Contributed by Johnny " "Najera in :issue:`38944`.)" msgstr "" -#: ../../whatsnew/3.9.rst:481 +#: ../../whatsnew/3.9.rst:478 msgid "" "Added keywords to module name completion list. (Contributed by Terry J. " "Reedy in :issue:`37765`.)" msgstr "" -#: ../../whatsnew/3.9.rst:484 +#: ../../whatsnew/3.9.rst:481 msgid "New in 3.9 maintenance releases" msgstr "" -#: ../../whatsnew/3.9.rst:486 +#: ../../whatsnew/3.9.rst:483 msgid "" "Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User " "hooks were previously ignored. (Contributed by Ken Hilton in :issue:" "`43008`.)" msgstr "" -#: ../../whatsnew/3.9.rst:490 +#: ../../whatsnew/3.9.rst:487 msgid "The changes above have been backported to 3.8 maintenance releases." msgstr "" -#: ../../whatsnew/3.9.rst:492 +#: ../../whatsnew/3.9.rst:489 msgid "" "Rearrange the settings dialog. Split the General tab into Windows and Shell/" "Ed tabs. Move help sources, which extend the Help menu, to the Extensions " @@ -709,17 +709,17 @@ msgid "" "`33962`.)" msgstr "" -#: ../../whatsnew/3.9.rst:500 +#: ../../whatsnew/3.9.rst:497 msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" -#: ../../whatsnew/3.9.rst:504 +#: ../../whatsnew/3.9.rst:501 msgid "imaplib" msgstr "imaplib" -#: ../../whatsnew/3.9.rst:506 +#: ../../whatsnew/3.9.rst:503 msgid "" ":class:`~imaplib.IMAP4` and :class:`~imaplib.IMAP4_SSL` now have an optional " "*timeout* parameter for their constructors. Also, the :meth:`~imaplib.IMAP4." @@ -729,7 +729,7 @@ msgid "" "issue:`38615`.)" msgstr "" -#: ../../whatsnew/3.9.rst:513 +#: ../../whatsnew/3.9.rst:510 msgid "" ":meth:`imaplib.IMAP4.unselect` is added. :meth:`imaplib.IMAP4.unselect` " "frees server's resources associated with the selected mailbox and returns " @@ -739,11 +739,11 @@ msgid "" "Donghee Na in :issue:`40375`.)" msgstr "" -#: ../../whatsnew/3.9.rst:521 +#: ../../whatsnew/3.9.rst:518 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.9.rst:523 +#: ../../whatsnew/3.9.rst:520 msgid "" "To improve consistency with import statements, :func:`importlib.util." "resolve_name` now raises :exc:`ImportError` instead of :exc:`ValueError` for " @@ -751,47 +751,47 @@ msgid "" "`37444`.)" msgstr "" -#: ../../whatsnew/3.9.rst:528 +#: ../../whatsnew/3.9.rst:525 msgid "" "Import loaders which publish immutable module objects can now publish " "immutable packages in addition to individual modules. (Contributed by Dino " "Viehland in :issue:`39336`.)" msgstr "" -#: ../../whatsnew/3.9.rst:532 +#: ../../whatsnew/3.9.rst:529 msgid "" "Added :func:`importlib.resources.files` function with support for " "subdirectories in package data, matching backport in ``importlib_resources`` " "version 1.5. (Contributed by Jason R. Coombs in :issue:`39791`.)" msgstr "" -#: ../../whatsnew/3.9.rst:537 +#: ../../whatsnew/3.9.rst:534 msgid "" "Refreshed ``importlib.metadata`` from ``importlib_metadata`` version 1.6.1." msgstr "" -#: ../../whatsnew/3.9.rst:540 +#: ../../whatsnew/3.9.rst:537 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.9.rst:542 +#: ../../whatsnew/3.9.rst:539 msgid "" ":attr:`inspect.BoundArguments.arguments` is changed from ``OrderedDict`` to " "regular dict. (Contributed by Inada Naoki in :issue:`36350` and :issue:" "`39775`.)" msgstr "" -#: ../../whatsnew/3.9.rst:546 +#: ../../whatsnew/3.9.rst:543 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.9.rst:548 +#: ../../whatsnew/3.9.rst:545 msgid "" ":mod:`ipaddress` now supports IPv6 Scoped Addresses (IPv6 address with " "suffix ``%``)." msgstr "" -#: ../../whatsnew/3.9.rst:550 +#: ../../whatsnew/3.9.rst:547 msgid "" "Scoped IPv6 addresses can be parsed using :class:`ipaddress.IPv6Address`. If " "present, scope zone ID is available through the :attr:`~ipaddress." @@ -799,59 +799,59 @@ msgid "" "`34788`.)" msgstr "" -#: ../../whatsnew/3.9.rst:554 +#: ../../whatsnew/3.9.rst:551 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. (Contributed by Christian Heimes in :" "issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:559 +#: ../../whatsnew/3.9.rst:556 msgid "math" msgstr "math" -#: ../../whatsnew/3.9.rst:561 +#: ../../whatsnew/3.9.rst:558 msgid "" "Expanded the :func:`math.gcd` function to handle multiple arguments. " "Formerly, it only supported two arguments. (Contributed by Serhiy Storchaka " "in :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:565 +#: ../../whatsnew/3.9.rst:562 msgid "" "Added :func:`math.lcm`: return the least common multiple of specified " "arguments. (Contributed by Mark Dickinson, Ananthakrishnan and Serhiy " "Storchaka in :issue:`39479` and :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:569 +#: ../../whatsnew/3.9.rst:566 msgid "" "Added :func:`math.nextafter`: return the next floating-point value after *x* " "towards *y*. (Contributed by Victor Stinner in :issue:`39288`.)" msgstr "" -#: ../../whatsnew/3.9.rst:573 +#: ../../whatsnew/3.9.rst:570 msgid "" "Added :func:`math.ulp`: return the value of the least significant bit of a " "float. (Contributed by Victor Stinner in :issue:`39310`.)" msgstr "" -#: ../../whatsnew/3.9.rst:578 +#: ../../whatsnew/3.9.rst:575 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.9.rst:580 +#: ../../whatsnew/3.9.rst:577 msgid "" "The :class:`multiprocessing.SimpleQueue` class has a new :meth:" "`~multiprocessing.SimpleQueue.close` method to explicitly close the queue. " "(Contributed by Victor Stinner in :issue:`30966`.)" msgstr "" -#: ../../whatsnew/3.9.rst:586 +#: ../../whatsnew/3.9.rst:583 msgid "nntplib" msgstr "nntplib" -#: ../../whatsnew/3.9.rst:588 +#: ../../whatsnew/3.9.rst:585 msgid "" ":class:`~nntplib.NNTP` and :class:`~nntplib.NNTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -859,65 +859,65 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:593 +#: ../../whatsnew/3.9.rst:590 msgid "os" msgstr "os" -#: ../../whatsnew/3.9.rst:595 +#: ../../whatsnew/3.9.rst:592 msgid "" "Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:" "`si_code`. (Contributed by Donghee Na in :issue:`38493`.)" msgstr "" -#: ../../whatsnew/3.9.rst:598 +#: ../../whatsnew/3.9.rst:595 msgid "" "Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :const:" "`os.P_PIDFD` (:issue:`38713`) for process management with file descriptors." msgstr "" -#: ../../whatsnew/3.9.rst:602 +#: ../../whatsnew/3.9.rst:599 msgid "" "The :func:`os.unsetenv` function is now also available on Windows. " "(Contributed by Victor Stinner in :issue:`39413`.)" msgstr "" -#: ../../whatsnew/3.9.rst:605 +#: ../../whatsnew/3.9.rst:602 msgid "" "The :func:`os.putenv` and :func:`os.unsetenv` functions are now always " "available. (Contributed by Victor Stinner in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:609 +#: ../../whatsnew/3.9.rst:606 msgid "" "Added :func:`os.waitstatus_to_exitcode` function: convert a wait status to " "an exit code. (Contributed by Victor Stinner in :issue:`40094`.)" msgstr "" -#: ../../whatsnew/3.9.rst:614 +#: ../../whatsnew/3.9.rst:611 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.9.rst:616 +#: ../../whatsnew/3.9.rst:613 msgid "" "Added :meth:`pathlib.Path.readlink()` which acts similarly to :func:`os." "readlink`. (Contributed by Girts Folkmanis in :issue:`30618`)" msgstr "" -#: ../../whatsnew/3.9.rst:621 +#: ../../whatsnew/3.9.rst:618 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.9.rst:623 +#: ../../whatsnew/3.9.rst:620 msgid "" "On Windows now :class:`~pdb.Pdb` supports ``~/.pdbrc``. (Contributed by Tim " "Hopper and Dan Lidral-Porter in :issue:`20523`.)" msgstr "" -#: ../../whatsnew/3.9.rst:627 +#: ../../whatsnew/3.9.rst:624 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.9.rst:629 +#: ../../whatsnew/3.9.rst:626 msgid "" ":class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -925,53 +925,53 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:634 +#: ../../whatsnew/3.9.rst:631 msgid "pprint" msgstr "pprint" -#: ../../whatsnew/3.9.rst:636 +#: ../../whatsnew/3.9.rst:633 msgid "" ":mod:`pprint` can now pretty-print :class:`types.SimpleNamespace`. " "(Contributed by Carl Bordum Hansen in :issue:`37376`.)" msgstr "" -#: ../../whatsnew/3.9.rst:640 +#: ../../whatsnew/3.9.rst:637 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.9.rst:642 +#: ../../whatsnew/3.9.rst:639 msgid "" "The documentation string is now shown not only for class, function, method " "etc, but for any object that has its own ``__doc__`` attribute. (Contributed " "by Serhiy Storchaka in :issue:`40257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:647 +#: ../../whatsnew/3.9.rst:644 msgid "random" msgstr "random" -#: ../../whatsnew/3.9.rst:649 +#: ../../whatsnew/3.9.rst:646 msgid "" "Added a new :attr:`random.Random.randbytes` method: generate random bytes. " "(Contributed by Victor Stinner in :issue:`40286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:653 +#: ../../whatsnew/3.9.rst:650 msgid "signal" msgstr "signal" -#: ../../whatsnew/3.9.rst:655 +#: ../../whatsnew/3.9.rst:652 msgid "" "Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to " "signals to a process using a file descriptor instead of a pid. (:issue:" "`38712`)" msgstr "" -#: ../../whatsnew/3.9.rst:659 +#: ../../whatsnew/3.9.rst:656 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.9.rst:661 +#: ../../whatsnew/3.9.rst:658 msgid "" ":class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -979,41 +979,41 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:665 +#: ../../whatsnew/3.9.rst:662 msgid "" ":class:`~smtplib.LMTP` constructor now has an optional *timeout* parameter. " "(Contributed by Donghee Na in :issue:`39329`.)" msgstr "" -#: ../../whatsnew/3.9.rst:669 +#: ../../whatsnew/3.9.rst:666 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.9.rst:671 +#: ../../whatsnew/3.9.rst:668 msgid "" "The :mod:`socket` module now exports the :const:`~socket." "CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. (Contributed by " "Stefan Tatschner and Zackery Spytz in :issue:`25780`.)" msgstr "" -#: ../../whatsnew/3.9.rst:675 +#: ../../whatsnew/3.9.rst:672 msgid "" "The socket module now supports the :const:`~socket.CAN_J1939` protocol on " "platforms that support it. (Contributed by Karl Ding in :issue:`40291`.)" msgstr "" -#: ../../whatsnew/3.9.rst:678 +#: ../../whatsnew/3.9.rst:675 msgid "" "The socket module now has the :func:`socket.send_fds` and :func:`socket." "recv_fds` functions. (Contributed by Joannah Nanjekye, Shinya Okano and " "Victor Stinner in :issue:`28724`.)" msgstr "" -#: ../../whatsnew/3.9.rst:684 +#: ../../whatsnew/3.9.rst:681 msgid "time" msgstr "time" -#: ../../whatsnew/3.9.rst:686 +#: ../../whatsnew/3.9.rst:683 msgid "" "On AIX, :func:`~time.thread_time` is now implemented with " "``thread_cputime()`` which has nanosecond resolution, rather than " @@ -1021,11 +1021,11 @@ msgid "" "milliseconds. (Contributed by Batuhan Taskaya in :issue:`40192`)" msgstr "" -#: ../../whatsnew/3.9.rst:692 +#: ../../whatsnew/3.9.rst:689 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.9.rst:694 +#: ../../whatsnew/3.9.rst:691 msgid "" "Added a new :data:`sys.platlibdir` attribute: name of the platform-specific " "library directory. It is used to build the path of standard library and the " @@ -1035,29 +1035,29 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:700 +#: ../../whatsnew/3.9.rst:697 msgid "" "Previously, :data:`sys.stderr` was block-buffered when non-interactive. Now " "``stderr`` defaults to always being line-buffered. (Contributed by Jendrik " "Seipp in :issue:`13601`.)" msgstr "" -#: ../../whatsnew/3.9.rst:705 +#: ../../whatsnew/3.9.rst:702 msgid "tracemalloc" msgstr "tracemalloc" -#: ../../whatsnew/3.9.rst:707 +#: ../../whatsnew/3.9.rst:704 msgid "" "Added :func:`tracemalloc.reset_peak` to set the peak size of traced memory " "blocks to the current size, to measure the peak of specific pieces of code. " "(Contributed by Huon Wilson in :issue:`40630`.)" msgstr "" -#: ../../whatsnew/3.9.rst:712 ../../whatsnew/3.9.rst:1495 +#: ../../whatsnew/3.9.rst:709 ../../whatsnew/3.9.rst:1492 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.9.rst:714 +#: ../../whatsnew/3.9.rst:711 msgid "" ":pep:`593` introduced an :data:`typing.Annotated` type to decorate existing " "types with context-specific metadata and new ``include_extras`` parameter " @@ -1065,20 +1065,20 @@ msgid "" "(Contributed by Till Varoquaux and Konstantin Kashin.)" msgstr "" -#: ../../whatsnew/3.9.rst:720 +#: ../../whatsnew/3.9.rst:717 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.9.rst:722 +#: ../../whatsnew/3.9.rst:719 msgid "" "The Unicode database has been updated to version 13.0.0. (:issue:`39926`)." msgstr "" -#: ../../whatsnew/3.9.rst:725 +#: ../../whatsnew/3.9.rst:722 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.9.rst:727 +#: ../../whatsnew/3.9.rst:724 msgid "" "The activation scripts provided by :mod:`venv` now all specify their prompt " "customization consistently by always using the value specified by " @@ -1088,11 +1088,11 @@ msgid "" "Cannon in :issue:`37663`.)" msgstr "" -#: ../../whatsnew/3.9.rst:735 +#: ../../whatsnew/3.9.rst:732 msgid "xml" msgstr "xml" -#: ../../whatsnew/3.9.rst:737 +#: ../../whatsnew/3.9.rst:734 msgid "" "White space characters within attributes are now preserved when serializing :" "mod:`xml.etree.ElementTree` to XML file. EOLNs are no longer normalized to " @@ -1100,32 +1100,32 @@ msgid "" "2.11 of XML spec. (Contributed by Mefistotelis in :issue:`39011`.)" msgstr "" -#: ../../whatsnew/3.9.rst:745 +#: ../../whatsnew/3.9.rst:742 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.9.rst:747 +#: ../../whatsnew/3.9.rst:744 msgid "" "Optimized the idiom for assignment a temporary variable in comprehensions. " "Now ``for y in [expr]`` in comprehensions is as fast as a simple assignment " "``y = expr``. For example:" msgstr "" -#: ../../whatsnew/3.9.rst:751 +#: ../../whatsnew/3.9.rst:748 msgid "sums = [s for s in [0] for x in data for s in [s + x]]" msgstr "sums = [s for s in [0] for x in data for s in [s + x]]" -#: ../../whatsnew/3.9.rst:753 +#: ../../whatsnew/3.9.rst:750 msgid "" "Unlike the ``:=`` operator this idiom does not leak a variable to the outer " "scope." msgstr "" -#: ../../whatsnew/3.9.rst:756 +#: ../../whatsnew/3.9.rst:753 msgid "(Contributed by Serhiy Storchaka in :issue:`32856`.)" msgstr "(由 Serhiy Storchaka 在 :issue:`32856` 中貢獻。)" -#: ../../whatsnew/3.9.rst:758 +#: ../../whatsnew/3.9.rst:755 msgid "" "Optimized signal handling in multithreaded applications. If a thread " "different than the main thread gets a signal, the bytecode evaluation loop " @@ -1134,27 +1134,27 @@ msgid "" "interpreter can handle signals." msgstr "" -#: ../../whatsnew/3.9.rst:764 +#: ../../whatsnew/3.9.rst:761 msgid "" "Previously, the bytecode evaluation loop was interrupted at each instruction " "until the main thread handles signals. (Contributed by Victor Stinner in :" "issue:`40010`.)" msgstr "" -#: ../../whatsnew/3.9.rst:768 +#: ../../whatsnew/3.9.rst:765 msgid "" "Optimized the :mod:`subprocess` module on FreeBSD using ``closefrom()``. " "(Contributed by Ed Maste, Conrad Meyer, Kyle Evans, Kubilay Kocak and Victor " "Stinner in :issue:`38061`.)" msgstr "" -#: ../../whatsnew/3.9.rst:772 +#: ../../whatsnew/3.9.rst:769 msgid "" ":c:func:`PyLong_FromDouble` is now up to 1.87x faster for values that fit " "into :c:expr:`long`. (Contributed by Sergey Fedoseev in :issue:`37986`.)" msgstr "" -#: ../../whatsnew/3.9.rst:776 +#: ../../whatsnew/3.9.rst:773 msgid "" "A number of Python builtins (:class:`range`, :class:`tuple`, :class:`set`, :" "class:`frozenset`, :class:`list`, :class:`dict`) are now sped up by using :" @@ -1162,14 +1162,14 @@ msgid "" "Jeroen Demeyer and Petr Viktorin in :issue:`37207`.)" msgstr "" -#: ../../whatsnew/3.9.rst:781 +#: ../../whatsnew/3.9.rst:778 msgid "" "Optimized :func:`~set.difference_update` for the case when the other set is " "much larger than the base set. (Suggested by Evgeny Kapun with code " "contributed by Michele Orrù in :issue:`8425`.)" msgstr "" -#: ../../whatsnew/3.9.rst:785 +#: ../../whatsnew/3.9.rst:782 msgid "" "Python's small object allocator (``obmalloc.c``) now allows (no more than) " "one empty arena to remain available for immediate reuse, without returning " @@ -1178,26 +1178,26 @@ msgid "" "in :issue:`37257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:791 +#: ../../whatsnew/3.9.rst:788 msgid "" ":term:`floor division` of float operation now has a better performance. Also " "the message of :exc:`ZeroDivisionError` for this operation is updated. " "(Contributed by Donghee Na in :issue:`39434`.)" msgstr "" -#: ../../whatsnew/3.9.rst:795 +#: ../../whatsnew/3.9.rst:792 msgid "" "Decoding short ASCII strings with UTF-8 and ascii codecs is now about 15% " "faster. (Contributed by Inada Naoki in :issue:`37348`.)" msgstr "" -#: ../../whatsnew/3.9.rst:798 +#: ../../whatsnew/3.9.rst:795 msgid "" "Here's a summary of performance improvements from Python 3.4 through Python " "3.9:" msgstr "" -#: ../../whatsnew/3.9.rst:845 +#: ../../whatsnew/3.9.rst:842 msgid "" "These results were generated from the variable access benchmark script at: " "``Tools/scripts/var_access_benchmark.py``. The benchmark script displays " @@ -1208,18 +1208,18 @@ msgid "" "python.org/downloads/macos/>`_." msgstr "" -#: ../../whatsnew/3.9.rst:855 +#: ../../whatsnew/3.9.rst:852 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.9.rst:857 +#: ../../whatsnew/3.9.rst:854 msgid "" "The distutils ``bdist_msi`` command is now deprecated, use ``bdist_wheel`` " "(wheel packages) instead. (Contributed by Hugo van Kemenade in :issue:" "`39586`.)" msgstr "" -#: ../../whatsnew/3.9.rst:861 +#: ../../whatsnew/3.9.rst:858 msgid "" "Currently :func:`math.factorial` accepts :class:`float` instances with non-" "negative integer values (like ``5.0``). It raises a :exc:`ValueError` for " @@ -1228,7 +1228,7 @@ msgid "" "Serhiy Storchaka in :issue:`37315`.)" msgstr "" -#: ../../whatsnew/3.9.rst:867 +#: ../../whatsnew/3.9.rst:864 msgid "" "The :mod:`parser` and :mod:`symbol` modules are deprecated and will be " "removed in future versions of Python. For the majority of use cases, users " @@ -1236,7 +1236,7 @@ msgid "" "stage, using the :mod:`ast` module." msgstr "" -#: ../../whatsnew/3.9.rst:872 +#: ../../whatsnew/3.9.rst:869 msgid "" "The Public C API functions :c:func:`!PyParser_SimpleParseStringFlags`, :c:" "func:`!PyParser_SimpleParseStringFlagsFilename`, :c:func:`!" @@ -1244,7 +1244,7 @@ msgid "" "and will be removed in Python 3.10 together with the old parser." msgstr "" -#: ../../whatsnew/3.9.rst:877 +#: ../../whatsnew/3.9.rst:874 msgid "" "Using :data:`NotImplemented` in a boolean context has been deprecated, as it " "is almost exclusively the result of incorrect rich comparator " @@ -1252,7 +1252,7 @@ msgid "" "Python. (Contributed by Josh Rosenberg in :issue:`35712`.)" msgstr "" -#: ../../whatsnew/3.9.rst:883 +#: ../../whatsnew/3.9.rst:880 msgid "" "The :mod:`random` module currently accepts any hashable type as a possible " "seed value. Unfortunately, some of those types are not guaranteed to have a " @@ -1261,7 +1261,7 @@ msgid "" "`bytes`, and :class:`bytearray`." msgstr "" -#: ../../whatsnew/3.9.rst:889 +#: ../../whatsnew/3.9.rst:886 msgid "" "Opening the :class:`~gzip.GzipFile` file for writing without specifying the " "*mode* argument is deprecated. In future Python versions it will always be " @@ -1270,39 +1270,39 @@ msgid "" "issue:`28286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:895 +#: ../../whatsnew/3.9.rst:892 msgid "" "Deprecated the ``split()`` method of :class:`_tkinter.TkappType` in favour " "of the ``splitlist()`` method which has more consistent and predicable " "behavior. (Contributed by Serhiy Storchaka in :issue:`38371`.)" msgstr "" -#: ../../whatsnew/3.9.rst:900 +#: ../../whatsnew/3.9.rst:897 msgid "" "The explicit passing of coroutine objects to :func:`asyncio.wait` has been " "deprecated and will be removed in version 3.11. (Contributed by Yury " "Selivanov and Kyle Stanley in :issue:`34790`.)" msgstr "" -#: ../../whatsnew/3.9.rst:904 +#: ../../whatsnew/3.9.rst:901 msgid "" "binhex4 and hexbin4 standards are now deprecated. The :mod:`binhex` module " "and the following :mod:`binascii` functions are now deprecated:" msgstr "" -#: ../../whatsnew/3.9.rst:907 +#: ../../whatsnew/3.9.rst:904 msgid ":func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx`" msgstr ":func:`~binascii.b2a_hqx`\\ 、\\ :func:`~binascii.a2b_hqx`" -#: ../../whatsnew/3.9.rst:908 +#: ../../whatsnew/3.9.rst:905 msgid ":func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx`" msgstr ":func:`~binascii.rlecode_hqx`\\ 、\\ :func:`~binascii.rledecode_hqx`" -#: ../../whatsnew/3.9.rst:910 +#: ../../whatsnew/3.9.rst:907 msgid "(Contributed by Victor Stinner in :issue:`39353`.)" msgstr "(由 Victor Stinner 在 :issue:`39353` 中貢獻。)" -#: ../../whatsnew/3.9.rst:912 +#: ../../whatsnew/3.9.rst:909 msgid "" ":mod:`ast` classes ``slice``, ``Index`` and ``ExtSlice`` are considered " "deprecated and will be removed in future Python versions. ``value`` itself " @@ -1311,7 +1311,7 @@ msgid "" "Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:918 +#: ../../whatsnew/3.9.rst:915 msgid "" ":mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` are " "considered deprecated and will be removed in future Python versions. They " @@ -1320,7 +1320,7 @@ msgid "" "`39969` and Serhiy Storchaka in :issue:`39988`.)" msgstr "" -#: ../../whatsnew/3.9.rst:925 +#: ../../whatsnew/3.9.rst:922 msgid "" "The :c:func:`!PyEval_InitThreads` and :c:func:`!PyEval_ThreadsInitialized` " "functions are now deprecated and will be removed in Python 3.11. Calling :c:" @@ -1329,20 +1329,20 @@ msgid "" "in :issue:`39877`.)" msgstr "" -#: ../../whatsnew/3.9.rst:931 +#: ../../whatsnew/3.9.rst:928 msgid "" "Passing ``None`` as the first argument to the :func:`shlex.split` function " "has been deprecated. (Contributed by Zackery Spytz in :issue:`33262`.)" msgstr "" -#: ../../whatsnew/3.9.rst:934 +#: ../../whatsnew/3.9.rst:931 msgid "" ":func:`!smtpd.MailmanProxy` is now deprecated as it is unusable without an " "external module, ``mailman``. (Contributed by Samuel Colvin in :issue:" "`35800`.)" msgstr "" -#: ../../whatsnew/3.9.rst:937 +#: ../../whatsnew/3.9.rst:934 msgid "" "The :mod:`lib2to3` module now emits a :exc:`PendingDeprecationWarning`. " "Python 3.9 switched to a PEG parser (see :pep:`617`), and Python 3.10 may " @@ -1352,22 +1352,22 @@ msgid "" "`parso`_. (Contributed by Carl Meyer in :issue:`40360`.)" msgstr "" -#: ../../whatsnew/3.9.rst:945 +#: ../../whatsnew/3.9.rst:942 msgid "" "The *random* parameter of :func:`random.shuffle` has been deprecated. " "(Contributed by Raymond Hettinger in :issue:`40465`)" msgstr "" -#: ../../whatsnew/3.9.rst:954 ../../whatsnew/3.9.rst:1409 +#: ../../whatsnew/3.9.rst:951 ../../whatsnew/3.9.rst:1406 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.9.rst:956 +#: ../../whatsnew/3.9.rst:953 msgid "" "The erroneous version at :data:`unittest.mock.__version__` has been removed." msgstr "" -#: ../../whatsnew/3.9.rst:958 +#: ../../whatsnew/3.9.rst:955 msgid "" ":class:`nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been " "removed. These methods are deprecated since Python 3.3. Generally, these " @@ -1377,14 +1377,14 @@ msgid "" "`39366`.)" msgstr "" -#: ../../whatsnew/3.9.rst:965 +#: ../../whatsnew/3.9.rst:962 msgid "" ":class:`array.array`: ``tostring()`` and ``fromstring()`` methods have been " "removed. They were aliases to ``tobytes()`` and ``frombytes()``, deprecated " "since Python 3.2. (Contributed by Victor Stinner in :issue:`38916`.)" msgstr "" -#: ../../whatsnew/3.9.rst:970 +#: ../../whatsnew/3.9.rst:967 msgid "" "The undocumented ``sys.callstats()`` function has been removed. Since Python " "3.7, it was deprecated and always returned :const:`None`. It required a " @@ -1392,7 +1392,7 @@ msgid "" "3.7. (Contributed by Victor Stinner in :issue:`37414`.)" msgstr "" -#: ../../whatsnew/3.9.rst:975 +#: ../../whatsnew/3.9.rst:972 msgid "" "The ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions have " "been removed. They were deprecated since Python 3.2. Use :func:`sys." @@ -1400,21 +1400,21 @@ msgid "" "by Victor Stinner in :issue:`37392`.)" msgstr "" -#: ../../whatsnew/3.9.rst:980 +#: ../../whatsnew/3.9.rst:977 msgid "" "The C function ``PyImport_Cleanup()`` has been removed. It was documented " "as: \"Empty the module table. For internal use only.\" (Contributed by " "Victor Stinner in :issue:`36710`.)" msgstr "" -#: ../../whatsnew/3.9.rst:984 +#: ../../whatsnew/3.9.rst:981 msgid "" "``_dummy_thread`` and ``dummy_threading`` modules have been removed. These " "modules were deprecated since Python 3.7 which requires threading support. " "(Contributed by Victor Stinner in :issue:`37312`.)" msgstr "" -#: ../../whatsnew/3.9.rst:988 +#: ../../whatsnew/3.9.rst:985 msgid "" "``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to " "``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open()` have " @@ -1422,14 +1422,14 @@ msgid "" "Stinner in :issue:`37320`.)" msgstr "" -#: ../../whatsnew/3.9.rst:993 +#: ../../whatsnew/3.9.rst:990 msgid "" "The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread` " "has been removed. It was deprecated since Python 3.8. Use :meth:`~threading." "Thread.is_alive()` instead. (Contributed by Donghee Na in :issue:`37804`.)" msgstr "" -#: ../../whatsnew/3.9.rst:998 +#: ../../whatsnew/3.9.rst:995 msgid "" "Methods ``getchildren()`` and ``getiterator()`` of classes :class:`~xml." "etree.ElementTree.ElementTree` and :class:`~xml.etree.ElementTree.Element` " @@ -1439,7 +1439,7 @@ msgid "" "getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1006 +#: ../../whatsnew/3.9.rst:1003 msgid "" "The old :mod:`plistlib` API has been removed, it was deprecated since Python " "3.4. Use the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:" @@ -1448,7 +1448,7 @@ msgid "" "are always used instead. (Contributed by Jon Janzen in :issue:`36409`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1012 +#: ../../whatsnew/3.9.rst:1009 msgid "" "The C function ``PyGen_NeedsFinalizing`` has been removed. It was not " "documented, tested, or used anywhere within CPython after the implementation " @@ -1456,7 +1456,7 @@ msgid "" "in :issue:`15088`)" msgstr "" -#: ../../whatsnew/3.9.rst:1017 +#: ../../whatsnew/3.9.rst:1014 msgid "" "``base64.encodestring()`` and ``base64.decodestring()``, aliases deprecated " "since Python 3.1, have been removed: use :func:`base64.encodebytes` and :" @@ -1464,14 +1464,14 @@ msgid "" "`39351`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1022 +#: ../../whatsnew/3.9.rst:1019 msgid "" "``fractions.gcd()`` function has been removed, it was deprecated since " "Python 3.5 (:issue:`22486`): use :func:`math.gcd` instead. (Contributed by " "Victor Stinner in :issue:`39350`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1026 +#: ../../whatsnew/3.9.rst:1023 msgid "" "The *buffering* parameter of :class:`bz2.BZ2File` has been removed. Since " "Python 3.0, it was ignored and using it emitted a :exc:`DeprecationWarning`. " @@ -1479,7 +1479,7 @@ msgid "" "Victor Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1031 +#: ../../whatsnew/3.9.rst:1028 msgid "" "The *encoding* parameter of :func:`json.loads` has been removed. As of " "Python 3.1, it was deprecated and ignored; using it has emitted a :exc:" @@ -1487,7 +1487,7 @@ msgid "" "`39377`)" msgstr "" -#: ../../whatsnew/3.9.rst:1036 +#: ../../whatsnew/3.9.rst:1033 msgid "" "``with (await asyncio.lock):`` and ``with (yield from asyncio.lock):`` " "statements are not longer supported, use ``async with lock`` instead. The " @@ -1495,7 +1495,7 @@ msgid "" "(Contributed by Andrew Svetlov in :issue:`34793`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1041 +#: ../../whatsnew/3.9.rst:1038 msgid "" "The :func:`sys.getcounts` function, the ``-X showalloccount`` command line " "option and the ``show_alloc_count`` field of the C structure :c:type:" @@ -1504,7 +1504,7 @@ msgid "" "`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1047 +#: ../../whatsnew/3.9.rst:1044 msgid "" "The ``_field_types`` attribute of the :class:`typing.NamedTuple` class has " "been removed. It was deprecated since Python 3.8. Use the " @@ -1512,14 +1512,14 @@ msgid "" "issue:`40182`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1052 +#: ../../whatsnew/3.9.rst:1049 msgid "" "The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was " "deprecated since 2006, and only returning ``False`` when it's called. " "(Contributed by Batuhan Taskaya in :issue:`40208`)" msgstr "" -#: ../../whatsnew/3.9.rst:1056 +#: ../../whatsnew/3.9.rst:1053 msgid "" "The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks` " "have been removed. They were deprecated since Python 3.7 and you can use :" @@ -1527,7 +1527,7 @@ msgid "" "(Contributed by Rémi Lapeyre in :issue:`40967`)" msgstr "" -#: ../../whatsnew/3.9.rst:1061 +#: ../../whatsnew/3.9.rst:1058 msgid "" "The ``unescape()`` method in the :class:`html.parser.HTMLParser` class has " "been removed (it was deprecated since Python 3.4). :func:`html.unescape` " @@ -1535,21 +1535,21 @@ msgid "" "unicode characters." msgstr "" -#: ../../whatsnew/3.9.rst:1068 ../../whatsnew/3.9.rst:1335 +#: ../../whatsnew/3.9.rst:1065 ../../whatsnew/3.9.rst:1332 msgid "Porting to Python 3.9" msgstr "" -#: ../../whatsnew/3.9.rst:1070 +#: ../../whatsnew/3.9.rst:1067 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.9.rst:1075 +#: ../../whatsnew/3.9.rst:1072 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.9.rst:1077 +#: ../../whatsnew/3.9.rst:1074 msgid "" ":func:`__import__` and :func:`importlib.util.resolve_name` now raise :exc:" "`ImportError` where it previously raised :exc:`ValueError`. Callers catching " @@ -1557,26 +1557,26 @@ msgid "" "versions will need to catch both using ``except (ImportError, ValueError):``." msgstr "" -#: ../../whatsnew/3.9.rst:1082 +#: ../../whatsnew/3.9.rst:1079 msgid "" "The :mod:`venv` activation scripts no longer special-case when " "``__VENV_PROMPT__`` is set to ``\"\"``." msgstr "" -#: ../../whatsnew/3.9.rst:1085 +#: ../../whatsnew/3.9.rst:1082 msgid "" "The :meth:`select.epoll.unregister` method no longer ignores the :const:" "`~errno.EBADF` error. (Contributed by Victor Stinner in :issue:`39239`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1089 +#: ../../whatsnew/3.9.rst:1086 msgid "" "The *compresslevel* parameter of :class:`bz2.BZ2File` became keyword-only, " "since the *buffering* parameter has been removed. (Contributed by Victor " "Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1093 +#: ../../whatsnew/3.9.rst:1090 msgid "" "Simplified AST for subscription. Simple indices will be represented by their " "value, extended slices will be represented as tuples. ``Index(value)`` will " @@ -1584,21 +1584,21 @@ msgid "" "Load())``. (Contributed by Serhiy Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1099 +#: ../../whatsnew/3.9.rst:1096 msgid "" "The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` " "environment variable when the :option:`-E` or :option:`-I` command line " "options are being used." msgstr "" -#: ../../whatsnew/3.9.rst:1103 +#: ../../whatsnew/3.9.rst:1100 msgid "" "The *encoding* parameter has been added to the classes :class:`ftplib.FTP` " "and :class:`ftplib.FTP_TLS` as a keyword-only parameter, and the default " "encoding is changed from Latin-1 to UTF-8 to follow :rfc:`2640`." msgstr "" -#: ../../whatsnew/3.9.rst:1107 +#: ../../whatsnew/3.9.rst:1104 msgid "" ":meth:`asyncio.loop.shutdown_default_executor` has been added to :class:" "`~asyncio.AbstractEventLoop`, meaning alternative event loops that inherit " @@ -1606,7 +1606,7 @@ msgid "" "issue:`34037`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1112 +#: ../../whatsnew/3.9.rst:1109 msgid "" "The constant values of future flags in the :mod:`__future__` module is " "updated in order to prevent collision with compiler flags. Previously " @@ -1614,7 +1614,7 @@ msgid "" "(Contributed by Batuhan Taskaya in :issue:`39562`)" msgstr "" -#: ../../whatsnew/3.9.rst:1117 +#: ../../whatsnew/3.9.rst:1114 msgid "" "``array('u')`` now uses :c:type:`wchar_t` as C type instead of " "``Py_UNICODE``. This change doesn't affect to its behavior because " @@ -1622,7 +1622,7 @@ msgid "" "by Inada Naoki in :issue:`34538`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1122 +#: ../../whatsnew/3.9.rst:1119 msgid "" "The :func:`logging.getLogger` API now returns the root logger when passed " "the name ``'root'``, whereas previously it returned a non-root logger named " @@ -1632,7 +1632,7 @@ msgid "" "(Contributed by Vinay Sajip in :issue:`37742`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1129 +#: ../../whatsnew/3.9.rst:1126 msgid "" "Division handling of :class:`~pathlib.PurePath` now returns :data:" "`NotImplemented` instead of raising a :exc:`TypeError` when passed something " @@ -1641,7 +1641,7 @@ msgid "" "types. (Contributed by Roger Aiudi in :issue:`34775`)." msgstr "" -#: ../../whatsnew/3.9.rst:1135 +#: ../../whatsnew/3.9.rst:1132 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. Leading zeros are ambiguous and " @@ -1651,7 +1651,7 @@ msgid "" "leading zeros. (Contributed by Christian Heimes in :issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:1143 +#: ../../whatsnew/3.9.rst:1140 msgid "" ":func:`codecs.lookup` now normalizes the encoding name the same way as :func:" "`encodings.normalize_encoding`, except that :func:`codecs.lookup` also " @@ -1660,11 +1660,11 @@ msgid "" "in :issue:`37751`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1151 +#: ../../whatsnew/3.9.rst:1148 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.9.rst:1153 +#: ../../whatsnew/3.9.rst:1150 msgid "" "Instances of :ref:`heap-allocated types ` (such as those created " "with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their " @@ -1675,7 +1675,7 @@ msgid "" "heap-allocated types visit the object's type." msgstr "" -#: ../../whatsnew/3.9.rst:1174 +#: ../../whatsnew/3.9.rst:1171 msgid "" "If your traverse function delegates to ``tp_traverse`` of its base class (or " "another type), ensure that ``Py_TYPE(self)`` is visited only once. Note that " @@ -1683,19 +1683,19 @@ msgid "" "``tp_traverse``." msgstr "" -#: ../../whatsnew/3.9.rst:1179 +#: ../../whatsnew/3.9.rst:1176 msgid "For example, if your ``tp_traverse`` function includes:" msgstr "" -#: ../../whatsnew/3.9.rst:1185 +#: ../../whatsnew/3.9.rst:1182 msgid "then add:" msgstr "" -#: ../../whatsnew/3.9.rst:1198 +#: ../../whatsnew/3.9.rst:1195 msgid "(See :issue:`35810` and :issue:`40217` for more information.)" msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`\\ 。)" -#: ../../whatsnew/3.9.rst:1200 +#: ../../whatsnew/3.9.rst:1197 msgid "" "The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, " "``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. " @@ -1703,11 +1703,11 @@ msgid "" "issue:`29548`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1206 +#: ../../whatsnew/3.9.rst:1203 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.9.rst:1208 +#: ../../whatsnew/3.9.rst:1205 msgid "" "The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the :" "keyword:`assert` statement. Previously, the assert statement would not work " @@ -1715,37 +1715,37 @@ msgid "" "(Contributed by Zackery Spytz in :issue:`34880`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1213 +#: ../../whatsnew/3.9.rst:1210 msgid "" "The :opcode:`COMPARE_OP` opcode was split into four distinct instructions:" msgstr "" -#: ../../whatsnew/3.9.rst:1215 +#: ../../whatsnew/3.9.rst:1212 msgid "``COMPARE_OP`` for rich comparisons" msgstr "" -#: ../../whatsnew/3.9.rst:1216 +#: ../../whatsnew/3.9.rst:1213 msgid "``IS_OP`` for 'is' and 'is not' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1217 +#: ../../whatsnew/3.9.rst:1214 msgid "``CONTAINS_OP`` for 'in' and 'not in' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1218 +#: ../../whatsnew/3.9.rst:1215 msgid "" "``JUMP_IF_NOT_EXC_MATCH`` for checking exceptions in 'try-except' statements." msgstr "" -#: ../../whatsnew/3.9.rst:1221 +#: ../../whatsnew/3.9.rst:1218 msgid "(Contributed by Mark Shannon in :issue:`39156`.)" msgstr "(由 Mark Shannon 在 :issue:`39156` 中貢獻。)" -#: ../../whatsnew/3.9.rst:1225 +#: ../../whatsnew/3.9.rst:1222 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.9.rst:1227 +#: ../../whatsnew/3.9.rst:1224 msgid "" "Added ``--with-platlibdir`` option to the ``configure`` script: name of the " "platform-specific library directory, stored in the new :data:`sys." @@ -1754,26 +1754,26 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1233 +#: ../../whatsnew/3.9.rst:1230 msgid "" "The ``COUNT_ALLOCS`` special build macro has been removed. (Contributed by " "Victor Stinner in :issue:`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1236 +#: ../../whatsnew/3.9.rst:1233 msgid "" "On non-Windows platforms, the :c:func:`setenv` and :c:func:`unsetenv` " "functions are now required to build Python. (Contributed by Victor Stinner " "in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1240 +#: ../../whatsnew/3.9.rst:1237 msgid "" "On non-Windows platforms, creating ``bdist_wininst`` installers is now " "officially unsupported. (See :issue:`10945` for more details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1243 +#: ../../whatsnew/3.9.rst:1240 msgid "" "When building Python on macOS from source, ``_tkinter`` now links with non-" "system Tcl and Tk frameworks if they are installed in ``/Library/" @@ -1784,13 +1784,13 @@ msgid "" "(Contributed by Ned Deily in :issue:`34956`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1252 +#: ../../whatsnew/3.9.rst:1249 msgid "" "Python can now be built for Windows 10 ARM64. (Contributed by Steve Dower " "in :issue:`33125`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1255 +#: ../../whatsnew/3.9.rst:1252 msgid "" "Some individual tests are now skipped when ``--pgo`` is used. The tests in " "question increased the PGO task time significantly and likely didn't help " @@ -1806,11 +1806,11 @@ msgid "" "details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1270 +#: ../../whatsnew/3.9.rst:1267 msgid "C API Changes" msgstr "C API 變更" -#: ../../whatsnew/3.9.rst:1275 +#: ../../whatsnew/3.9.rst:1272 msgid "" ":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module " "with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` " @@ -1819,20 +1819,20 @@ msgid "" "(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1282 +#: ../../whatsnew/3.9.rst:1279 msgid "" "Added :c:func:`PyFrame_GetCode` function: get a frame code. Added :c:func:" "`PyFrame_GetBack` function: get the frame next outer frame. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1286 +#: ../../whatsnew/3.9.rst:1283 msgid "" "Added :c:func:`PyFrame_GetLineNumber` to the limited C API. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1289 +#: ../../whatsnew/3.9.rst:1286 msgid "" "Added :c:func:`PyThreadState_GetInterpreter` and :c:func:" "`PyInterpreterState_Get` functions to get the interpreter. Added :c:func:" @@ -1842,7 +1842,7 @@ msgid "" "issue:`39947`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1297 +#: ../../whatsnew/3.9.rst:1294 msgid "" "Added a new public :c:func:`PyObject_CallNoArgs` function to the C API, " "which calls a callable Python object without any arguments. It is the most " @@ -1850,11 +1850,11 @@ msgid "" "(Contributed by Victor Stinner in :issue:`37194`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1302 ../../whatsnew/3.9.rst:1420 +#: ../../whatsnew/3.9.rst:1299 ../../whatsnew/3.9.rst:1417 msgid "Changes in the limited C API (if ``Py_LIMITED_API`` macro is defined):" msgstr "" -#: ../../whatsnew/3.9.rst:1304 +#: ../../whatsnew/3.9.rst:1301 msgid "" "Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall` " "as regular functions for the limited API. Previously, there were defined as " @@ -1863,23 +1863,23 @@ msgid "" "the limited C API)." msgstr "" -#: ../../whatsnew/3.9.rst:1310 +#: ../../whatsnew/3.9.rst:1307 msgid "" "``PyObject_INIT()`` and ``PyObject_INIT_VAR()`` become regular \"opaque\" " "function to hide implementation details." msgstr "" -#: ../../whatsnew/3.9.rst:1313 ../../whatsnew/3.9.rst:1447 +#: ../../whatsnew/3.9.rst:1310 ../../whatsnew/3.9.rst:1444 msgid "(Contributed by Victor Stinner in :issue:`38644` and :issue:`39542`.)" msgstr "(由 Victor Stinner 在 38644 和 39542 中貢獻。)" -#: ../../whatsnew/3.9.rst:1315 +#: ../../whatsnew/3.9.rst:1312 msgid "" "The :c:func:`PyModule_AddType` function is added to help adding a type to a " "module. (Contributed by Donghee Na in :issue:`40024`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1319 +#: ../../whatsnew/3.9.rst:1316 msgid "" "Added the functions :c:func:`PyObject_GC_IsTracked` and :c:func:" "`PyObject_GC_IsFinalized` to the public API to allow to query if Python " @@ -1888,27 +1888,27 @@ msgid "" "issue:`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1325 +#: ../../whatsnew/3.9.rst:1322 msgid "" "Added :c:func:`_PyObject_FunctionStr` to get a user-friendly string " "representation of a function-like object. (Patch by Jeroen Demeyer in :issue:" "`37645`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1329 +#: ../../whatsnew/3.9.rst:1326 msgid "" "Added :c:func:`PyObject_CallOneArg` for calling an object with one " "positional argument (Patch by Jeroen Demeyer in :issue:`37483`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1337 +#: ../../whatsnew/3.9.rst:1334 msgid "" "``PyInterpreterState.eval_frame`` (:pep:`523`) now requires a new mandatory " "*tstate* parameter (``PyThreadState*``). (Contributed by Victor Stinner in :" "issue:`38500`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1341 +#: ../../whatsnew/3.9.rst:1338 msgid "" "Extension modules: :c:member:`~PyModuleDef.m_traverse`, :c:member:" "`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` functions of :c:" @@ -1920,12 +1920,12 @@ msgid "" "`PyModule_GetState`) is ``NULL``." msgstr "" -#: ../../whatsnew/3.9.rst:1350 +#: ../../whatsnew/3.9.rst:1347 msgid "" "Extension modules without module state (``m_size <= 0``) are not affected." msgstr "" -#: ../../whatsnew/3.9.rst:1352 +#: ../../whatsnew/3.9.rst:1349 msgid "" "If :c:func:`Py_AddPendingCall` is called in a subinterpreter, the function " "is now scheduled to be called from the subinterpreter, rather than being " @@ -1933,7 +1933,7 @@ msgid "" "of scheduled calls. (Contributed by Victor Stinner in :issue:`39984`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1358 +#: ../../whatsnew/3.9.rst:1355 msgid "" "The Windows registry is no longer used to initialize :data:`sys.path` when " "the ``-E`` option is used (if :c:member:`PyConfig.use_environment` is set to " @@ -1941,21 +1941,21 @@ msgid "" "by Zackery Spytz in :issue:`8901`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1363 +#: ../../whatsnew/3.9.rst:1360 msgid "" "The global variable :c:data:`PyStructSequence_UnnamedField` is now a " "constant and refers to a constant string. (Contributed by Serhiy Storchaka " "in :issue:`38650`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1367 +#: ../../whatsnew/3.9.rst:1364 msgid "" "The :c:type:`PyGC_Head` structure is now opaque. It is only defined in the " "internal C API (``pycore_gc.h``). (Contributed by Victor Stinner in :issue:" "`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1371 +#: ../../whatsnew/3.9.rst:1368 msgid "" "The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, :c:" "func:`!PyUnicode_FromUnicode`, :c:func:`!PyUnicode_AsUnicode`, " @@ -1964,7 +1964,7 @@ msgid "" "Python 3.3. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1378 +#: ../../whatsnew/3.9.rst:1375 msgid "" "The :c:func:`Py_FatalError` function is replaced with a macro which logs " "automatically the name of the current function, unless the " @@ -1972,22 +1972,22 @@ msgid "" "issue:`39882`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1383 +#: ../../whatsnew/3.9.rst:1380 msgid "" "The vectorcall protocol now requires that the caller passes only strings as " "keyword names. (See :issue:`37540` for more information.)" msgstr "" -#: ../../whatsnew/3.9.rst:1386 +#: ../../whatsnew/3.9.rst:1383 msgid "" "Implementation details of a number of macros and functions are now hidden:" msgstr "" -#: ../../whatsnew/3.9.rst:1388 +#: ../../whatsnew/3.9.rst:1385 msgid ":c:func:`PyObject_IS_GC` macro was converted to a function." msgstr "" -#: ../../whatsnew/3.9.rst:1390 +#: ../../whatsnew/3.9.rst:1387 msgid "" "The :c:func:`PyObject_NEW` macro becomes an alias to the :c:macro:" "`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro becomes an " @@ -1995,38 +1995,38 @@ msgid "" "directly the :c:member:`PyTypeObject.tp_basicsize` member." msgstr "" -#: ../../whatsnew/3.9.rst:1395 +#: ../../whatsnew/3.9.rst:1392 msgid "" ":c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function: " "the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset` " "member." msgstr "" -#: ../../whatsnew/3.9.rst:1399 +#: ../../whatsnew/3.9.rst:1396 msgid "" ":c:func:`PyObject_CheckBuffer` macro was converted to a function: the macro " "accessed directly the :c:member:`PyTypeObject.tp_as_buffer` member." msgstr "" -#: ../../whatsnew/3.9.rst:1402 +#: ../../whatsnew/3.9.rst:1399 msgid "" ":c:func:`PyIndex_Check` is now always declared as an opaque function to hide " "implementation details: removed the ``PyIndex_Check()`` macro. The macro " "accessed directly the :c:member:`PyTypeObject.tp_as_number` member." msgstr "" -#: ../../whatsnew/3.9.rst:1406 +#: ../../whatsnew/3.9.rst:1403 msgid "(See :issue:`40170` for more details.)" msgstr "(更多資訊請見 :issue:`40170`\\ 。)" -#: ../../whatsnew/3.9.rst:1411 +#: ../../whatsnew/3.9.rst:1408 msgid "" "Excluded ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of " "``pyfpe.h`` from the limited C API. (Contributed by Victor Stinner in :issue:" "`38835`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1415 +#: ../../whatsnew/3.9.rst:1412 msgid "" "The ``tp_print`` slot of :ref:`PyTypeObject ` has been " "removed. It was used for printing objects to files in Python 2.7 and before. " @@ -2034,89 +2034,89 @@ msgid "" "Demeyer in :issue:`36974`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1422 +#: ../../whatsnew/3.9.rst:1419 msgid "Excluded the following functions from the limited C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1424 +#: ../../whatsnew/3.9.rst:1421 msgid "" "``PyThreadState_DeleteCurrent()`` (Contributed by Joannah Nanjekye in :issue:" "`37878`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1426 +#: ../../whatsnew/3.9.rst:1423 msgid "``_Py_CheckRecursionLimit``" msgstr "``_Py_CheckRecursionLimit``" -#: ../../whatsnew/3.9.rst:1427 +#: ../../whatsnew/3.9.rst:1424 msgid "``_Py_NewReference()``" msgstr "``_Py_NewReference()``" -#: ../../whatsnew/3.9.rst:1428 +#: ../../whatsnew/3.9.rst:1425 msgid "``_Py_ForgetReference()``" msgstr "``_Py_ForgetReference()``" -#: ../../whatsnew/3.9.rst:1429 +#: ../../whatsnew/3.9.rst:1426 msgid "``_PyTraceMalloc_NewReference()``" msgstr "``_PyTraceMalloc_NewReference()``" -#: ../../whatsnew/3.9.rst:1430 +#: ../../whatsnew/3.9.rst:1427 msgid "``_Py_GetRefTotal()``" msgstr "``_Py_GetRefTotal()``" -#: ../../whatsnew/3.9.rst:1431 +#: ../../whatsnew/3.9.rst:1428 msgid "The trashcan mechanism which never worked in the limited C API." msgstr "" -#: ../../whatsnew/3.9.rst:1432 +#: ../../whatsnew/3.9.rst:1429 msgid "``PyTrash_UNWIND_LEVEL``" msgstr "``PyTrash_UNWIND_LEVEL``" -#: ../../whatsnew/3.9.rst:1433 +#: ../../whatsnew/3.9.rst:1430 msgid "``Py_TRASHCAN_BEGIN_CONDITION``" msgstr "``Py_TRASHCAN_BEGIN_CONDITION``" -#: ../../whatsnew/3.9.rst:1434 +#: ../../whatsnew/3.9.rst:1431 msgid "``Py_TRASHCAN_BEGIN``" msgstr "``Py_TRASHCAN_BEGIN``" -#: ../../whatsnew/3.9.rst:1435 +#: ../../whatsnew/3.9.rst:1432 msgid "``Py_TRASHCAN_END``" msgstr "``Py_TRASHCAN_END``" -#: ../../whatsnew/3.9.rst:1436 +#: ../../whatsnew/3.9.rst:1433 msgid "``Py_TRASHCAN_SAFE_BEGIN``" msgstr "``Py_TRASHCAN_SAFE_BEGIN``" -#: ../../whatsnew/3.9.rst:1437 +#: ../../whatsnew/3.9.rst:1434 msgid "``Py_TRASHCAN_SAFE_END``" msgstr "``Py_TRASHCAN_SAFE_END``" -#: ../../whatsnew/3.9.rst:1439 +#: ../../whatsnew/3.9.rst:1436 msgid "Moved following functions and definitions to the internal C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1441 +#: ../../whatsnew/3.9.rst:1438 msgid "``_PyDebug_PrintTotalRefs()``" msgstr "``_PyDebug_PrintTotalRefs()``" -#: ../../whatsnew/3.9.rst:1442 +#: ../../whatsnew/3.9.rst:1439 msgid "``_Py_PrintReferences()``" msgstr "``_Py_PrintReferences()``" -#: ../../whatsnew/3.9.rst:1443 +#: ../../whatsnew/3.9.rst:1440 msgid "``_Py_PrintReferenceAddresses()``" msgstr "``_Py_PrintReferenceAddresses()``" -#: ../../whatsnew/3.9.rst:1444 +#: ../../whatsnew/3.9.rst:1441 msgid "``_Py_tracemalloc_config``" msgstr "``_Py_tracemalloc_config``" -#: ../../whatsnew/3.9.rst:1445 +#: ../../whatsnew/3.9.rst:1442 msgid "``_Py_AddToAllObjects()`` (specific to ``Py_TRACE_REFS`` build)" msgstr "" -#: ../../whatsnew/3.9.rst:1449 +#: ../../whatsnew/3.9.rst:1446 msgid "" "Removed ``_PyRuntime.getframe`` hook and removed ``_PyThreadState_GetFrame`` " "macro which was an alias to ``_PyRuntime.getframe``. They were only exposed " @@ -2124,72 +2124,72 @@ msgid "" "(Contributed by Victor Stinner in :issue:`39946`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1454 +#: ../../whatsnew/3.9.rst:1451 msgid "" "Removed the following functions from the C API. Call :c:func:`PyGC_Collect` " "explicitly to clear all free lists. (Contributed by Inada Naoki and Victor " "Stinner in :issue:`37340`, :issue:`38896` and :issue:`40428`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1459 +#: ../../whatsnew/3.9.rst:1456 msgid "``PyAsyncGen_ClearFreeLists()``" msgstr "``PyAsyncGen_ClearFreeLists()``" -#: ../../whatsnew/3.9.rst:1460 +#: ../../whatsnew/3.9.rst:1457 msgid "``PyContext_ClearFreeList()``" msgstr "``PyContext_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1461 +#: ../../whatsnew/3.9.rst:1458 msgid "``PyDict_ClearFreeList()``" msgstr "``PyDict_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1462 +#: ../../whatsnew/3.9.rst:1459 msgid "``PyFloat_ClearFreeList()``" msgstr "``PyFloat_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1463 +#: ../../whatsnew/3.9.rst:1460 msgid "``PyFrame_ClearFreeList()``" msgstr "``PyFrame_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1464 +#: ../../whatsnew/3.9.rst:1461 msgid "``PyList_ClearFreeList()``" msgstr "``PyList_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1465 +#: ../../whatsnew/3.9.rst:1462 msgid "" "``PyMethod_ClearFreeList()`` and ``PyCFunction_ClearFreeList()``: the free " "lists of bound method objects have been removed." msgstr "" -#: ../../whatsnew/3.9.rst:1467 +#: ../../whatsnew/3.9.rst:1464 msgid "" "``PySet_ClearFreeList()``: the set free list has been removed in Python 3.4." msgstr "" -#: ../../whatsnew/3.9.rst:1469 +#: ../../whatsnew/3.9.rst:1466 msgid "``PyTuple_ClearFreeList()``" msgstr "``PyTuple_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1470 +#: ../../whatsnew/3.9.rst:1467 msgid "" "``PyUnicode_ClearFreeList()``: the Unicode free list has been removed in " "Python 3.3." msgstr "" -#: ../../whatsnew/3.9.rst:1473 +#: ../../whatsnew/3.9.rst:1470 msgid "" "Removed ``_PyUnicode_ClearStaticStrings()`` function. (Contributed by Victor " "Stinner in :issue:`39465`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1476 +#: ../../whatsnew/3.9.rst:1473 msgid "" "Removed ``Py_UNICODE_MATCH``. It has been deprecated by :pep:`393`, and " "broken since Python 3.3. The :c:func:`PyUnicode_Tailmatch` function can be " "used instead. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1481 +#: ../../whatsnew/3.9.rst:1478 msgid "" "Cleaned header files of interfaces defined but with no implementation. The " "public API symbols being removed are: " @@ -2202,26 +2202,26 @@ msgid "" "`39372`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1492 +#: ../../whatsnew/3.9.rst:1489 msgid "Notable changes in Python 3.9.1" msgstr "Python 3.9.1 中顯著的變更" -#: ../../whatsnew/3.9.rst:1497 +#: ../../whatsnew/3.9.rst:1494 msgid "" "The behavior of :class:`typing.Literal` was changed to conform with :pep:" "`586` and to match the behavior of static type checkers specified in the PEP." msgstr "" -#: ../../whatsnew/3.9.rst:1500 +#: ../../whatsnew/3.9.rst:1497 msgid "``Literal`` now de-duplicates parameters." msgstr "" -#: ../../whatsnew/3.9.rst:1501 +#: ../../whatsnew/3.9.rst:1498 msgid "" "Equality comparisons between ``Literal`` objects are now order independent." msgstr "" -#: ../../whatsnew/3.9.rst:1502 +#: ../../whatsnew/3.9.rst:1499 msgid "" "``Literal`` comparisons now respect types. For example, ``Literal[0] == " "Literal[False]`` previously evaluated to ``True``. It is now ``False``. To " @@ -2229,7 +2229,7 @@ msgid "" "differentiating types." msgstr "" -#: ../../whatsnew/3.9.rst:1506 +#: ../../whatsnew/3.9.rst:1503 msgid "" "``Literal`` objects will now raise a :exc:`TypeError` exception during " "equality comparisons if any of their parameters are not :term:`hashable`. " @@ -2237,15 +2237,15 @@ msgid "" "error::" msgstr "" -#: ../../whatsnew/3.9.rst:1518 +#: ../../whatsnew/3.9.rst:1515 msgid "(Contributed by Yurii Karabas in :issue:`42345`.)" msgstr "(由 Yurii Karabas 在 :issue:`42345` 中貢獻。)" -#: ../../whatsnew/3.9.rst:1521 +#: ../../whatsnew/3.9.rst:1518 msgid "macOS 11.0 (Big Sur) and Apple Silicon Mac support" msgstr "" -#: ../../whatsnew/3.9.rst:1523 +#: ../../whatsnew/3.9.rst:1520 msgid "" "As of 3.9.1, Python now fully supports building and running on macOS 11.0 " "(Big Sur) and on Apple Silicon Macs (based on the ``ARM64`` architecture). A " @@ -2257,19 +2257,19 @@ msgid "" "version in use at runtime (\"weaklinking\")." msgstr "" -#: ../../whatsnew/3.9.rst:1532 +#: ../../whatsnew/3.9.rst:1529 msgid "(Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.)" msgstr "(由 Ronald Oussoren 和 Lawrence D'Anna 在 :issue:`41100` 中貢獻。)" -#: ../../whatsnew/3.9.rst:1535 +#: ../../whatsnew/3.9.rst:1532 msgid "Notable changes in Python 3.9.2" msgstr "Python 3.9.2 中顯著的變更" -#: ../../whatsnew/3.9.rst:1538 +#: ../../whatsnew/3.9.rst:1535 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.9.rst:1540 +#: ../../whatsnew/3.9.rst:1537 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2285,11 +2285,11 @@ msgid "" "Python 3.10. (Contributed by Ken Jin in :issue:`42195`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1554 ../../whatsnew/3.9.rst:1579 +#: ../../whatsnew/3.9.rst:1551 ../../whatsnew/3.9.rst:1576 msgid "urllib.parse" msgstr "urllib.parse" -#: ../../whatsnew/3.9.rst:1556 +#: ../../whatsnew/3.9.rst:1553 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." @@ -2301,11 +2301,11 @@ msgid "" "Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1567 +#: ../../whatsnew/3.9.rst:1564 msgid "Notable changes in Python 3.9.3" msgstr "Python 3.9.3 中顯著的變更" -#: ../../whatsnew/3.9.rst:1569 +#: ../../whatsnew/3.9.rst:1566 msgid "" "A security fix alters the :class:`ftplib.FTP` behavior to not trust the IPv4 " "address sent from the remote server when setting up a passive data channel. " @@ -2314,11 +2314,11 @@ msgid "" "instance to ``True``. (See :gh:`87451`)" msgstr "" -#: ../../whatsnew/3.9.rst:1576 +#: ../../whatsnew/3.9.rst:1573 msgid "Notable changes in Python 3.9.5" msgstr "Python 3.9.5 中顯著的變更" -#: ../../whatsnew/3.9.rst:1581 +#: ../../whatsnew/3.9.rst:1578 msgid "" "The presence of newline or tab characters in parts of a URL allows for some " "forms of attacks. Following the WHATWG specification that updates :rfc:" @@ -2328,33 +2328,32 @@ msgid "" "variable ``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" msgstr "" -#: ../../whatsnew/3.9.rst:1589 +#: ../../whatsnew/3.9.rst:1586 msgid "Notable security feature in 3.9.14" msgstr "" -#: ../../whatsnew/3.9.rst:1591 +#: ../../whatsnew/3.9.rst:1588 msgid "" "Converting between :class:`int` and :class:`str` in bases other than 2 " "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " "now raises a :exc:`ValueError` if the number of digits in string form is " "above a limit to avoid potential denial of service attacks due to the " -"algorithmic complexity. This is a mitigation for `CVE-2020-10735 `_. This limit can be " -"configured or disabled by environment variable, command line flag, or :mod:" -"`sys` APIs. See the :ref:`integer string conversion length limitation " -"` documentation. The default limit is 4300 digits in " -"string form." +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." msgstr "" -#: ../../whatsnew/3.9.rst:1603 +#: ../../whatsnew/3.9.rst:1599 msgid "Notable changes in 3.9.17" msgstr "" -#: ../../whatsnew/3.9.rst:1606 +#: ../../whatsnew/3.9.rst:1602 msgid "tarfile" msgstr "tarfile" -#: ../../whatsnew/3.9.rst:1608 +#: ../../whatsnew/3.9.rst:1604 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " diff --git a/whatsnew/index.po b/whatsnew/index.po index 62bc2ed6bb..f3125a66e5 100644 --- a/whatsnew/index.po +++ b/whatsnew/index.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-16 00:03+0000\n" "PO-Revision-Date: 2022-07-07 11:37+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -38,11 +38,10 @@ msgstr "" #: ../../whatsnew/index.rst:36 msgid "" -"The \"Changelog\" is an HTML version of the `file built `_ from the contents of the :source:`Misc/NEWS.d` directory " -"tree, which contains *all* nontrivial changes to Python for the current " -"version." +"The \"Changelog\" is an HTML version of the :pypi:`file built` from " +"the contents of the :source:`Misc/NEWS.d` directory tree, which contains " +"*all* nontrivial changes to Python for the current version." msgstr "" -"「Changelog(更動日誌)」是從 :source:`Misc/NEWS.d` 目錄樹的內容\\ `建置 " -"`_\\ 的一個 HTML 檔案版本,其中包含了 Python " -"目前版本中的\\ *所有*\\ 重要變更。" +"「Changelog(更動日誌)」是從 :source:`Misc/NEWS.d` 目錄樹內容\\ :pypi:`檔案" +"建置 `\\ 的一個 HTML 版本,其中包含了 Python 目前版本中的\\ *所有*\\ " +"重要變更。"