Skip to content

Sync with CPython 3.12 #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 24, 2023
8 changes: 4 additions & 4 deletions c-api/arg.po
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2023-07-24 00:03+0000\n"
"PO-Revision-Date: 2022-10-16 03:21+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -662,7 +662,7 @@ msgstr ""
#: ../../c-api/arg.rst:345
msgid ""
"It is possible to pass \"long\" integers (integers whose value exceeds the "
"platform's :const:`LONG_MAX`) however no proper range checking is done --- "
"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- "
"the most significant bits are silently truncated when the receiving field is "
"too small to receive the value (actually, the semantics are inherited from "
"downcasts in C --- your mileage may vary)."
Expand Down Expand Up @@ -807,7 +807,7 @@ msgstr ""
msgid ""
"A simpler form of parameter retrieval which does not use a format string to "
"specify the types of the arguments. Functions which use this method to "
"retrieve their parameters should be declared as :const:`METH_VARARGS` in "
"retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in "
"function or method tables. The tuple containing the actual parameters "
"should be passed as *args*; it must actually be a tuple. The length of the "
"tuple must be at least *min* and no more than *max*; *min* and *max* may be "
Expand Down Expand Up @@ -943,7 +943,7 @@ msgstr "``u`` (:class:`str`) [const wchar_t \\*]"

#: ../../c-api/arg.rst:550
msgid ""
"Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or "
"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or "
"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is "
"``NULL``, ``None`` is returned."
msgstr ""
Expand Down
8 changes: 4 additions & 4 deletions c-api/buffer.po
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2023-07-24 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -321,7 +321,7 @@ msgstr ""

#: ../../c-api/buffer.rst:228
msgid ""
"All :c:data:`Py_buffer` fields are unambiguously defined by the request type."
"All :c:type:`Py_buffer` fields are unambiguously defined by the request type."
msgstr ""

#: ../../c-api/buffer.rst:232
Expand Down Expand Up @@ -606,8 +606,8 @@ msgstr ""

#: ../../c-api/buffer.rst:467
msgid ""
"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer."
"format`. On error, raise an exception and return -1."
"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:"
"`~Py_buffer.format`. On error, raise an exception and return -1."
msgstr ""

#: ../../c-api/buffer.rst:475
Expand Down
32 changes: 16 additions & 16 deletions c-api/call.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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: 2023-07-22 00:04+0000\n"
"PO-Revision-Date: 2022-10-16 03:20+0800\n"
"Last-Translator: Matt Wang <mattwag44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -111,11 +111,11 @@ msgstr ""

#: ../../c-api/call.rst:62
msgid ""
"The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class "
"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 "
"internally sets :c:member:`~PyTypeObject.tp_call` only, and thus may make it "
"behave differently than the vectorcall function.) In earlier Python "
"versions, vectorcall should only be used with :const:`immutable "
"versions, vectorcall should only be used with :c:macro:`immutable "
"<Py_TPFLAGS_IMMUTABLETYPE>` or static types."
msgstr ""

Expand All @@ -132,13 +132,13 @@ msgstr ""

#: ../../c-api/call.rst:74
msgid ""
"Classes can implement the vectorcall protocol by enabling the :const:"
"Classes can implement the vectorcall protocol by enabling the :c:macro:"
"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject."
"tp_vectorcall_offset` to the offset inside the object structure where a "
"*vectorcallfunc* appears. This is a pointer to a function with the following "
"signature:"
msgstr ""
"類別可以透過啟用 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標並將 :c:member:"
"類別可以透過啟用 :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標並將 :c:member:"
"`~PyTypeObject.tp_vectorcall_offset` 設定為物件結構中有出現 *vectorcallfunc* "
"的 offset 來實作 vectorcall 協定。這是一個指向具有以下簽章之函式的指標:"

Expand All @@ -163,10 +163,10 @@ msgstr "*nargsf* 是位置引數的數量加上可能會有的"

#: ../../c-api/call.rst:87
msgid ""
":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of "
":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of "
"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`."
msgstr ""
":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位"
":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位"
"置引數數量,請使用 :c:func:`PyVectorcall_NARGS`。"

#: ../../c-api/call.rst:94
Expand Down Expand Up @@ -205,12 +205,12 @@ msgstr ""
#: ../../c-api/call.rst:106
msgid ""
"Whenever they can do so cheaply (without additional allocation), callers are "
"encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will "
"encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will "
"allow callables such as bound methods to make their onward calls (which "
"include a prepended *self* argument) very efficiently."
msgstr ""
"當可以以幾乎無代價的方式(無需佔據額外的記憶體)來達成,那麼會推薦呼叫者使"
"用 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。這樣做會讓如 bound method(繫結方"
"用 :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`。這樣做會讓如 bound method(繫結方"
"法)之類的可呼叫函式非常有效地繼續向前呼叫(這類函式包含一個在首位的 *self* "
"引數)。"

Expand Down Expand Up @@ -315,11 +315,11 @@ msgstr ""
msgid ""
"This is a specialized function, intended to be put in the :c:member:"
"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. "
"It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does "
"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does "
"not fall back to ``tp_call``."
msgstr ""
"這是一個專門函式,其目的是被放入 :c:member:`~PyTypeObject.tp_call` 擴充槽或是"
"用於 ``tp_call`` 的實作。它不會檢查 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標"
"用於 ``tp_call`` 的實作。它不會檢查 :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標"
"並且它不會退回 (fall back) 使用 ``tp_call``。"

#: ../../c-api/call.rst:186
Expand Down Expand Up @@ -654,24 +654,24 @@ msgid ""
"method is given as a Python string *name*. The object whose method is called "
"is *args[0]*, and the *args* array starting at *args[1]* represents the "
"arguments of the call. There must be at least one positional argument. "
"*nargsf* is the number of positional arguments including *args[0]*, plus :"
"const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may "
"*nargsf* is the number of positional arguments including *args[0]*, plus :c:"
"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may "
"temporarily be changed. Keyword arguments can be passed just like in :c:func:"
"`PyObject_Vectorcall`."
msgstr ""
"使用 vectorcall 呼叫慣例來呼叫一個 method。method 的名稱以 Python 字串 "
"*name* 的格式給定。被呼叫 method 的物件為 *args[0]*,而 *args* 陣列從 "
"*args[1]* 開始的部分則代表呼叫的引數。必須傳入至少一個位置引數。*nargsf* 為包"
"括 *args[0]* 在內的位置引數的數量,如果 ``args[0]`` 的值可能被臨時改變則要再"
"加上 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。關鍵字引數可以像在 :c:func:"
"加上 :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`。關鍵字引數可以像在 :c:func:"
"`PyObject_Vectorcall` 中一樣被傳入。"

#: ../../c-api/call.rst:399
msgid ""
"If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this "
"If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this "
"will call the unbound method object with the full *args* vector as arguments."
msgstr ""
"如果物件具有 :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* "
"如果物件具有 :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* "
"向量作為引數來呼叫 unbound method(未繫結方法)物件。"

#: ../../c-api/call.rst:410
Expand Down
6 changes: 3 additions & 3 deletions c-api/complex.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-30 15:31+0000\n"
"POT-Creation-Date: 2023-07-22 00:04+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -82,7 +82,7 @@ msgstr ""
#: ../../c-api/complex.rst:66
msgid ""
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
"c:data:`EDOM`."
"c:macro:`EDOM`."
msgstr ""

#: ../../c-api/complex.rst:72
Expand All @@ -94,7 +94,7 @@ msgstr ""
#: ../../c-api/complex.rst:75
msgid ""
"If *num* is null and *exp* is not a positive real number, this method "
"returns zero and sets :c:data:`errno` to :c:data:`EDOM`."
"returns zero and sets :c:data:`errno` to :c:macro:`EDOM`."
msgstr ""

#: ../../c-api/complex.rst:80
Expand Down
26 changes: 13 additions & 13 deletions c-api/exceptions.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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: 2023-07-24 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:05+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -202,8 +202,8 @@ msgid ""
"function has returned an error and set the C variable :c:data:`errno`. It "
"constructs a tuple object whose first item is the integer :c:data:`errno` "
"value and whose second item is the corresponding error message (gotten from :"
"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On "
"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an "
"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On "
"Unix, when the :c:data:`errno` value is :c:macro:`EINTR`, indicating an "
"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if "
"that set the error indicator, leaves it set to that. The function always "
"returns ``NULL``, so a wrapper function around a system call can write "
Expand Down Expand Up @@ -649,14 +649,14 @@ msgstr ""

#: ../../c-api/exceptions.rst:634
msgid ""
"The default Python signal handler for :const:`SIGINT` raises the :exc:"
"The default Python signal handler for :c:macro:`SIGINT` raises the :exc:"
"`KeyboardInterrupt` exception."
msgstr ""

#: ../../c-api/exceptions.rst:645
msgid ""
"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent "
"to ``PyErr_SetInterruptEx(SIGINT)``."
"Simulate the effect of a :c:macro:`SIGINT` signal arriving. This is "
"equivalent to ``PyErr_SetInterruptEx(SIGINT)``."
msgstr ""

#: ../../c-api/exceptions.rst:649 ../../c-api/exceptions.rst:676
Expand All @@ -682,8 +682,8 @@ msgstr ""

#: ../../c-api/exceptions.rst:668
msgid ""
"If the given signal isn't handled by Python (it was set to :data:`signal."
"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored."
"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:671
Expand Down Expand Up @@ -776,7 +776,7 @@ msgstr ""

#: ../../c-api/exceptions.rst:757
msgid ""
"Return the cause (either an exception instance, or :const:`None`, set by "
"Return the cause (either an exception instance, or ``None``, set by "
"``raise ... from ...``) associated with the exception as a new reference, as "
"accessible from Python through :attr:`__cause__`."
msgstr ""
Expand All @@ -785,7 +785,7 @@ msgstr ""
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 :const:`None`. This steals a reference to *cause*."
"exception instance or ``None``. This steals a reference to *cause*."
msgstr ""

#: ../../c-api/exceptions.rst:768
Expand Down Expand Up @@ -894,9 +894,9 @@ msgstr ""

#: ../../c-api/exceptions.rst:877
msgid ""
"If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack "
"overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :"
"exc:`MemoryError` and returns a nonzero value."
"If :c:macro:`USE_STACKCHECK` is defined, this function checks if the OS "
"stack overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it "
"sets a :exc:`MemoryError` and returns a nonzero value."
msgstr ""

#: ../../c-api/exceptions.rst:881
Expand Down
10 changes: 5 additions & 5 deletions c-api/file.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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: 2023-07-22 00:04+0000\n"
"PO-Revision-Date: 2023-04-24 20:38+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -162,11 +162,11 @@ msgstr ""
#: ../../c-api/file.rst:95
msgid ""
"Write object *obj* to file object *p*. The only supported flag for *flags* "
"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written "
"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; "
"the appropriate exception will be set."
"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is "
"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on "
"failure; the appropriate exception will be set."
msgstr ""
"將物件 *obj* 寫入檔案物件 *p*。 *flags* 唯一支援的旗標是 :const:"
"將物件 *obj* 寫入檔案物件 *p*。 *flags* 唯一支援的旗標是 :c:macro:"
"`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在"
"成功回傳 ``0`` 或在失敗回傳 ``-1``;將設定適當的例外。"

Expand Down
14 changes: 7 additions & 7 deletions c-api/float.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-30 15:31+0000\n"
"POT-Creation-Date: 2023-07-22 00:04+0000\n"
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -138,9 +138,9 @@ msgid ""
"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:"
"`int` argument, non-zero if you want the bytes string in little-endian "
"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you "
"want big-endian format (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` "
"constant can be used to use the native endian: it is equal to ``1`` on big "
"endian processor, or ``0`` on little endian processor."
"want big-endian format (exponent first, at *p*). The :c:macro:"
"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal "
"to ``1`` on big endian processor, or ``0`` on little endian processor."
msgstr ""

#: ../../c-api/float.rst:116
Expand Down Expand Up @@ -182,9 +182,9 @@ msgid ""
"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:"
"expr:`int` argument, non-zero if the bytes string is in little-endian format "
"(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-"
"endian (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` constant can be "
"used to use the native endian: it is equal to ``1`` on big endian processor, "
"or ``0`` on little endian processor."
"endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can "
"be used to use the native endian: it is equal to ``1`` on big endian "
"processor, or ``0`` on little endian processor."
msgstr ""

#: ../../c-api/float.rst:147
Expand Down
Loading