diff --git a/c-api/allocation.po b/c-api/allocation.po index c7b9399553..53b2905968 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2022-10-16 15:35+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -49,48 +49,49 @@ msgstr "" #: ../../c-api/allocation.rst:32 msgid "" "Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *type*. Fields not defined by the Python object header " -"are not initialized; the object's reference count will be one. The size of " -"the memory allocation is determined from the :c:member:`~PyTypeObject." -"tp_basicsize` field of the type object." +"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " +"Python object header are not initialized; the object's reference count will " +"be one. The size of the memory allocation is determined from the :c:member:" +"`~PyTypeObject.tp_basicsize` field of the type object." msgstr "" -"使用 C 結構型別 *TYPE* 和 Python 型別物件 *type* 分配一個新的 Python 物件。未" -"在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;物件的參照計數將為" -"一。記憶體分配大小由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位" -"來指定。" +"使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配" +"一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始" +"化;物件的參照計數將為一。記憶體分配大小由 type 物件的 :c:member:" +"`~PyTypeObject.tp_basicsize` 欄位來指定。" -#: ../../c-api/allocation.rst:41 +#: ../../c-api/allocation.rst:42 msgid "" "Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *type*. Fields not defined by the Python object header " -"are not initialized. The allocated memory allows for the *TYPE* structure " -"plus *size* fields of the size given by the :c:member:`~PyTypeObject." -"tp_itemsize` field of *type*. This is useful for implementing objects like " -"tuples, which are able to determine their size at construction time. " -"Embedding the array of fields into the same allocation decreases the number " -"of allocations, improving the memory management efficiency." +"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " +"Python object header are not initialized. The allocated memory allows for " +"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given " +"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is " +"useful for implementing objects like tuples, which are able to determine " +"their size at construction time. Embedding the array of fields into the " +"same allocation decreases the number of allocations, improving the memory " +"management efficiency." msgstr "" -"使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *type* 分配一個新的 Python 物" -"件。未在該 Python 物件標頭中定義的欄位不會被初始化。記憶體空間預留了 *TYPE* " -"結構大小再加上 *type* 物件中 :c:member:`~PyTypeObject.tp_itemsize` 欄位提供" -"的 *size* 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大小的物件是" -"很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配的次數,這提" -"高了記憶體管理的效率。" +"使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *typeobj* (``PyTypeObject*``) " +"分配一個新的 Python 物件。未在該 Python 物件標頭中定義的欄位不會被初始化。記" +"憶體空間預留了 *TYPE* 結構大小再加上 *typeobj* 物件中 :c:member:" +"`~PyTypeObject.tp_itemsize` 欄位提供的 *size* (``Py_ssize_t``) 欄位的值。這對" +"於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌" +"入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率。" -#: ../../c-api/allocation.rst:53 +#: ../../c-api/allocation.rst:56 msgid "" -"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:" -"func:`PyObject_NewVar`. This is normally called from the :c:member:" +"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:" +"macro:`PyObject_NewVar`. This is normally called from the :c:member:" "`~PyTypeObject.tp_dealloc` handler specified in the object's type. The " "fields of the object should not be accessed after this call as the memory is " "no longer a valid Python object." msgstr "" -"釋放由 :c:func:`PyObject_New` 或者 :c:func:`PyObject_NewVar` 分配給物件的記憶" -"體。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` handler " -"中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的記憶體已" -"不再是一個有效的 Python 物件。" +"釋放由 :c:macro:`PyObject_New` 或者 :c:macro:`PyObject_NewVar` 分配給物件的記" +"憶體。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` " +"handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的" +"記憶體已不再是一個有效的 Python 物件。" -#: ../../c-api/allocation.rst:62 +#: ../../c-api/allocation.rst:65 msgid "" "Object which is visible in Python as ``None``. This should only be accessed " "using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " @@ -99,10 +100,10 @@ msgstr "" "這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存" "取,該巨集的拿到指向該物件的指標。" -#: ../../c-api/allocation.rst:69 +#: ../../c-api/allocation.rst:72 msgid ":c:func:`PyModule_Create`" msgstr ":c:func:`PyModule_Create`" -#: ../../c-api/allocation.rst:70 +#: ../../c-api/allocation.rst:73 msgid "To allocate and create extension modules." msgstr "分配記憶體和建立擴充模組。" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 1791d5ded2..066e019e9c 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-18 00:16+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2022-01-24 22:34+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -177,8 +177,8 @@ msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``." msgstr "使用它進行數值比較,例如 ``#if PY_VERSION_HEX >= ...``。" #: ../../c-api/apiabiversion.rst:63 -msgid "This version is also available via the symbol :data:`Py_Version`." -msgstr "該版本也可透過符號 :data:`Py_Version` 獲得。" +msgid "This version is also available via the symbol :c:var:`Py_Version`." +msgstr "該版本也可透過符號 :c:var:`Py_Version` 獲得。" #: ../../c-api/apiabiversion.rst:67 msgid "" diff --git a/c-api/arg.po b/c-api/arg.po index 0e89cafb71..3b28780c5b 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-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -824,7 +824,7 @@ msgstr "" #: ../../c-api/arg.rst:471 msgid "" "This is an example of the use of this function, taken from the sources for " -"the :mod:`_weakref` helper module for weak references::" +"the :mod:`!_weakref` helper module for weak references::" msgstr "" #: ../../c-api/arg.rst:487 diff --git a/c-api/buffer.po b/c-api/buffer.po index 01df994fde..6ce805e8d0 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -7,7 +7,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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:30+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -70,7 +70,7 @@ msgstr "" msgid "" "An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." "write` method of file objects: any object that can export a series of bytes " -"through the buffer interface can be written to a file. While :meth:`write` " +"through the buffer interface can be written to a file. While :meth:`!write` " "only needs read-only access to the internal contents of the object passed to " "it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " "access to the contents of their argument. The buffer interface allows " diff --git a/c-api/bytes.po b/c-api/bytes.po index 92f4b489b0..ae0d5ed2b7 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -87,8 +87,8 @@ msgid "Comment" msgstr "" #: ../../c-api/bytes.rst:67 -msgid ":attr:`%%`" -msgstr ":attr:`%%`" +msgid "``%%``" +msgstr "``%%``" #: ../../c-api/bytes.rst:67 msgid "*n/a*" @@ -99,8 +99,8 @@ msgid "The literal % character." msgstr "" #: ../../c-api/bytes.rst:69 -msgid ":attr:`%c`" -msgstr ":attr:`%c`" +msgid "``%c``" +msgstr "``%c``" #: ../../c-api/bytes.rst:69 ../../c-api/bytes.rst:72 ../../c-api/bytes.rst:90 #: ../../c-api/bytes.rst:93 @@ -112,16 +112,16 @@ msgid "A single byte, represented as a C int." msgstr "" #: ../../c-api/bytes.rst:72 -msgid ":attr:`%d`" -msgstr ":attr:`%d`" +msgid "``%d``" +msgstr "``%d``" #: ../../c-api/bytes.rst:72 msgid "Equivalent to ``printf(\"%d\")``. [1]_" msgstr "等價於 ``printf(\"%d\")``. [1]_" #: ../../c-api/bytes.rst:75 -msgid ":attr:`%u`" -msgstr ":attr:`%u`" +msgid "``%u``" +msgstr "``%u``" #: ../../c-api/bytes.rst:75 msgid "unsigned int" @@ -132,8 +132,8 @@ msgid "Equivalent to ``printf(\"%u\")``. [1]_" msgstr "等價於 ``printf(\"%u\")``. [1]_" #: ../../c-api/bytes.rst:78 -msgid ":attr:`%ld`" -msgstr ":attr:`%ld`" +msgid "``%ld``" +msgstr "``%ld``" #: ../../c-api/bytes.rst:78 msgid "long" @@ -144,8 +144,8 @@ msgid "Equivalent to ``printf(\"%ld\")``. [1]_" msgstr "等價於 ``printf(\"%ld\")``. [1]_" #: ../../c-api/bytes.rst:81 -msgid ":attr:`%lu`" -msgstr ":attr:`%lu`" +msgid "``%lu``" +msgstr "``%lu``" #: ../../c-api/bytes.rst:81 msgid "unsigned long" @@ -156,8 +156,8 @@ msgid "Equivalent to ``printf(\"%lu\")``. [1]_" msgstr "等價於 ``printf(\"%lu\")``. [1]_" #: ../../c-api/bytes.rst:84 -msgid ":attr:`%zd`" -msgstr ":attr:`%zd`" +msgid "``%zd``" +msgstr "``%zd``" #: ../../c-api/bytes.rst:84 msgid ":c:type:`\\ Py_ssize_t`" @@ -168,8 +168,8 @@ msgid "Equivalent to ``printf(\"%zd\")``. [1]_" msgstr "等價於 ``printf(\"%zd\")``. [1]_" #: ../../c-api/bytes.rst:87 -msgid ":attr:`%zu`" -msgstr ":attr:`%zu`" +msgid "``%zu``" +msgstr "``%zu``" #: ../../c-api/bytes.rst:87 msgid "size_t" @@ -180,24 +180,24 @@ msgid "Equivalent to ``printf(\"%zu\")``. [1]_" msgstr "等價於 ``printf(\"%zu\")``. [1]_" #: ../../c-api/bytes.rst:90 -msgid ":attr:`%i`" -msgstr ":attr:`%i`" +msgid "``%i``" +msgstr "``%i``" #: ../../c-api/bytes.rst:90 msgid "Equivalent to ``printf(\"%i\")``. [1]_" msgstr "等價於 ``printf(\"%i\")``. [1]_" #: ../../c-api/bytes.rst:93 -msgid ":attr:`%x`" -msgstr ":attr:`%x`" +msgid "``%x``" +msgstr "``%x``" #: ../../c-api/bytes.rst:93 msgid "Equivalent to ``printf(\"%x\")``. [1]_" msgstr "等價於 ``printf(\"%x\")``. [1]_" #: ../../c-api/bytes.rst:96 -msgid ":attr:`%s`" -msgstr ":attr:`%s`" +msgid "``%s``" +msgstr "``%s``" #: ../../c-api/bytes.rst:96 msgid "const char\\*" @@ -208,8 +208,8 @@ msgid "A null-terminated C character array." msgstr "" #: ../../c-api/bytes.rst:99 -msgid ":attr:`%p`" -msgstr ":attr:`%p`" +msgid "``%p``" +msgstr "``%p``" #: ../../c-api/bytes.rst:99 msgid "const void\\*" diff --git a/c-api/capsule.po b/c-api/capsule.po index 771a696ffb..395dca4c92 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:30+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -93,7 +93,7 @@ msgstr "" msgid "" "The *name* parameter must compare exactly to the name stored in the capsule. " "If the name stored in the capsule is ``NULL``, the *name* passed in must " -"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare " +"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare " "capsule names." msgstr "" @@ -166,8 +166,8 @@ msgstr "" #: ../../c-api/capsule.rst:123 msgid "" "In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " -"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) " -"are guaranteed to succeed." +"to any of the accessors (any function starting with ``PyCapsule_Get``) are " +"guaranteed to succeed." msgstr "" #: ../../c-api/capsule.rst:127 diff --git a/c-api/code.po b/c-api/code.po index 25c4a6f10f..beed548be4 100644 --- a/c-api/code.po +++ b/c-api/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-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-29 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-" @@ -60,7 +60,7 @@ msgstr "" #: ../../c-api/code.rst:41 msgid "" "Since the definition of the bytecode changes often, calling :c:func:" -"`PyCode_New` directly can bind you to a precise Python version." +"`PyUnstable_Code_New` directly can bind you to a precise Python version." msgstr "" #: ../../c-api/code.rst:44 @@ -82,9 +82,9 @@ msgstr "" #: ../../c-api/code.rst:61 msgid "" -"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for " -"positional-only arguments. The same caveats that apply to ``PyCode_New`` " -"also apply to this function." +"Similar to :c:func:`PyUnstable_Code_New`, but with an extra " +"\"posonlyargcount\" for positional-only arguments. The same caveats that " +"apply to ``PyUnstable_Code_New`` also apply to this function." msgstr "" #: ../../c-api/code.rst:66 diff --git a/c-api/codec.po b/c-api/codec.po index 126e008ecf..68de1f7702 100644 --- a/c-api/codec.po +++ b/c-api/codec.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2023-07-24 17:51+0000\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,10 +28,10 @@ msgstr "註冊一個新的編解碼器搜索函式。" #: ../../c-api/codec.rst:10 msgid "" -"As side effect, this tries to load the :mod:`encodings` package, if not yet " +"As side effect, this tries to load the :mod:`!encodings` package, if not yet " "done, to make sure that it is always first in the list of search functions." msgstr "" -"作為副作用 (side effect),這會嘗試載入 :mod:`encodings`\\ (如果尚未完成)," +"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成)," "以確保它始終位於搜索函式列表中的第一個。" #: ../../c-api/codec.rst:15 diff --git a/c-api/complex.po b/c-api/complex.po index 1a4140e607..647379d243 100644 --- a/c-api/complex.po +++ b/c-api/complex.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: 2023-07-29 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-" @@ -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:macro:`EDOM`." +"c:macro:`!EDOM`." msgstr "" #: ../../c-api/complex.rst:72 @@ -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:macro:`EDOM`." +"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." msgstr "" #: ../../c-api/complex.rst:80 diff --git a/c-api/conversion.po b/c-api/conversion.po index 4644530aad..e5d28293e8 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-08 00:21+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -189,11 +189,11 @@ msgstr "" #: ../../c-api/conversion.rst:121 msgid "" "Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`strcmp` except that it ignores the case." +"identically to :c:func:`!strcmp` except that it ignores the case." msgstr "" #: ../../c-api/conversion.rst:127 msgid "" "Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`strncmp` except that it ignores the case." +"identically to :c:func:`!strncmp` except that it ignores the case." msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 443fd46d9f..c539882ea8 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: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -118,7 +118,7 @@ msgid "" "This utility function prints a warning message to ``sys.stderr`` when an " "exception has been set but it is impossible for the interpreter to actually " "raise the exception. It is used, for example, when an exception occurs in " -"an :meth:`__del__` method." +"an :meth:`~object.__del__` method." msgstr "" #: ../../c-api/exceptions.rst:88 @@ -203,7 +203,7 @@ msgid "" "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 :c:macro:`EINTR`, indicating an " +"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 " @@ -215,7 +215,7 @@ msgid "" "Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " "if *filenameObject* is not ``NULL``, it is passed to the constructor of " "*type* as a third parameter. In the case of :exc:`OSError` exception, this " -"is used to define the :attr:`filename` attribute of the exception instance." +"is used to define the :attr:`!filename` attribute of the exception instance." msgstr "" #: ../../c-api/exceptions.rst:186 @@ -235,12 +235,12 @@ msgstr "" #: ../../c-api/exceptions.rst:202 msgid "" "This is a convenience function to raise :exc:`WindowsError`. 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 " +"*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``." msgstr "" @@ -649,13 +649,13 @@ msgstr "" #: ../../c-api/exceptions.rst:634 msgid "" -"The default Python signal handler for :c:macro:`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 :c:macro:`SIGINT` signal arriving. This is " +"Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 13e0eb53de..6e8d0434fb 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -58,8 +58,8 @@ msgstr "" #: ../../c-api/gcsupport.rst:28 msgid "" -"The memory for the object must be allocated using :c:func:`PyObject_GC_New` " -"or :c:func:`PyObject_GC_NewVar`." +"The memory for the object must be allocated using :c:macro:`PyObject_GC_New` " +"or :c:macro:`PyObject_GC_NewVar`." msgstr "" #: ../../c-api/gcsupport.rst:31 @@ -105,19 +105,19 @@ msgstr "" #: ../../c-api/gcsupport.rst:57 msgid "" -"Analogous to :c:func:`PyObject_New` but for container objects with the :c:" +"Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" "macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" #: ../../c-api/gcsupport.rst:62 msgid "" -"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :c:" -"macro:`Py_TPFLAGS_HAVE_GC` flag set." +"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" +"c:macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" #: ../../c-api/gcsupport.rst:67 msgid "" -"Analogous to :c:func:`PyObject_GC_New` but allocates *extra_size* bytes at " +"Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at " "the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). " "The allocated memory is initialized to zeros, except for the :c:type:`Python " "object header `." @@ -139,7 +139,7 @@ msgstr "" #: ../../c-api/gcsupport.rst:88 msgid "" -"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the " +"Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the " "resized object or ``NULL`` on failure. *op* must not be tracked by the " "collector yet." msgstr "" @@ -187,8 +187,8 @@ msgstr "" #: ../../c-api/gcsupport.rst:131 msgid "" -"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" -"func:`PyObject_GC_NewVar`." +"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" +"c:macro:`PyObject_GC_NewVar`." msgstr "" #: ../../c-api/gcsupport.rst:137 @@ -203,7 +203,7 @@ msgstr "" #: ../../c-api/gcsupport.rst:146 msgid "" -"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros " +"The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" diff --git a/c-api/import.po b/c-api/import.po index 51c28be036..357ddf9c79 100644 --- a/c-api/import.po +++ b/c-api/import.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: 2023-07-29 00:03+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-" @@ -147,14 +147,14 @@ msgstr "" msgid "" "The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set " "already, with the appropriate values. The spec's loader will be set to the " -"module's ``__loader__`` (if set) and to an instance of :class:" -"`SourceFileLoader` otherwise." +"module's ``__loader__`` (if set) and to an instance of :class:`~importlib." +"machinery.SourceFileLoader` otherwise." msgstr "" #: ../../c-api/import.rst:140 msgid "" -"The module's :attr:`__file__` attribute will be set to the code object's :c:" -"member:`co_filename`. If applicable, :attr:`__cached__` will also be set." +"The module's :attr:`__file__` attribute will be set to the code object's :" +"attr:`!co_filename`. If applicable, :attr:`__cached__` will also be set." msgstr "" #: ../../c-api/import.rst:144 @@ -255,7 +255,7 @@ msgstr "" #: ../../c-api/import.rst:228 msgid "" -"Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item " +"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item " "*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " "dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " "is found that can handle the path item. Return ``None`` if no hook could; " @@ -318,26 +318,28 @@ msgstr "" #: ../../c-api/import.rst:297 msgid "" -"Structure describing a single entry in the list of built-in modules. Each " -"of these structures gives the name and initialization function for a module " -"built into the interpreter. The name is an ASCII encoded string. Programs " -"which embed Python may use an array of these structures in conjunction with :" -"c:func:`PyImport_ExtendInittab` to provide additional built-in modules. The " -"structure is defined in :file:`Include/import.h` as::" +"Structure describing a single entry in the list of built-in modules. " +"Programs which embed Python may use an array of these structures in " +"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional " +"built-in modules. The structure consists of two members:" msgstr "" -#: ../../c-api/import.rst:312 +#: ../../c-api/import.rst:305 +msgid "The module name, as an ASCII encoded string." +msgstr "" + +#: ../../c-api/import.rst:314 msgid "" "Add a collection of modules to the table of built-in modules. The *newtab* " -"array must end with a sentinel entry which contains ``NULL`` for the :attr:" -"`name` field; failure to provide the sentinel value can result in a memory " -"fault. Returns ``0`` on success or ``-1`` if insufficient memory could be " -"allocated to extend the internal table. In the event of failure, no modules " -"are added to the internal table. This must be called before :c:func:" -"`Py_Initialize`." +"array must end with a sentinel entry which contains ``NULL`` for the :c:" +"member:`~_inittab.name` field; failure to provide the sentinel value can " +"result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient " +"memory could be allocated to extend the internal table. In the event of " +"failure, no modules are added to the internal table. This must be called " +"before :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/import.rst:319 +#: ../../c-api/import.rst:321 msgid "" "If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " "or :c:func:`PyImport_ExtendInittab` must be called before each Python " diff --git a/c-api/init.po b/c-api/init.po index df7fd57324..ea7e11da21 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 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-" @@ -58,8 +58,8 @@ msgid ":c:func:`PyImport_ExtendInittab`" msgstr ":c:func:`PyImport_ExtendInittab`" #: ../../c-api/init.rst:28 -msgid ":c:func:`PyInitFrozenExtensions`" -msgstr ":c:func:`PyInitFrozenExtensions`" +msgid ":c:func:`!PyInitFrozenExtensions`" +msgstr ":c:func:`!PyInitFrozenExtensions`" #: ../../c-api/init.rst:29 msgid ":c:func:`PyMem_SetAllocator`" @@ -296,7 +296,7 @@ msgstr "" #: ../../c-api/init.rst:160 msgid "" -"Ignore all :envvar:`PYTHON*` environment variables, e.g. :envvar:" +"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" "`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." msgstr "" @@ -391,8 +391,8 @@ msgstr "" #: ../../c-api/init.rst:232 msgid "" -"If the flag is non-zero, use :class:`io.FileIO` instead of :class:" -"`WindowsConsoleIO` for :mod:`sys` standard streams." +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :mod:`sys` standard streams." msgstr "" #: ../../c-api/init.rst:235 @@ -585,16 +585,16 @@ msgstr "" #: ../../c-api/init.rst:403 msgid "" "**Bugs and caveats:** The destruction of modules and objects in modules is " -"done in random order; this may cause destructors (:meth:`__del__` methods) " -"to fail when they depend on other objects (even functions) or modules. " -"Dynamically loaded extension modules loaded by Python are not unloaded. " -"Small amounts of memory allocated by the Python interpreter may not be freed " -"(if you find a leak, please report it). Memory tied up in circular " -"references between objects is not freed. Some memory allocated by extension " -"modules may not be freed. Some extensions may not work properly if their " -"initialization routine is called more than once; this can happen if an " -"application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` more " -"than once." +"done in random order; this may cause destructors (:meth:`~object.__del__` " +"methods) to fail when they depend on other objects (even functions) or " +"modules. Dynamically loaded extension modules loaded by Python are not " +"unloaded. Small amounts of memory allocated by the Python interpreter may " +"not be freed (if you find a leak, please report it). Memory tied up in " +"circular references between objects is not freed. Some memory allocated by " +"extension modules may not be freed. Some extensions may not work properly " +"if their initialization routine is called more than once; this can happen if " +"an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` " +"more than once." msgstr "" #: ../../c-api/init.rst:414 @@ -680,11 +680,10 @@ msgid "" "this storage." msgstr "" -#: ../../c-api/init.rst:487 ../../c-api/init.rst:638 ../../c-api/init.rst:753 -#: ../../c-api/init.rst:789 ../../c-api/init.rst:815 +#: ../../c-api/init.rst:487 msgid "" "Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" -"`wchar_*` string." +"`wchar_t *` string." msgstr "" #: ../../c-api/init.rst:497 @@ -814,6 +813,13 @@ msgid "" "required after calling :c:func:`Py_Initialize`." msgstr "" +#: ../../c-api/init.rst:638 ../../c-api/init.rst:753 ../../c-api/init.rst:789 +#: ../../c-api/init.rst:815 +msgid "" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" +"`wchar_*` string." +msgstr "" + #: ../../c-api/init.rst:641 msgid "" "The path argument is copied internally, so the caller may free it after the " @@ -1141,7 +1147,7 @@ msgid "" "them afterwards. In addition, it resets any :ref:`lock-objects` in the " "child. When extending or embedding Python, there is no way to inform Python " "of additional (non-Python) locks that need to be acquired before or reset " -"after a fork. OS facilities such as :c:func:`pthread_atfork` would need to " +"after a fork. OS facilities such as :c:func:`!pthread_atfork` would need to " "be used to accomplish the same thing. Additionally, when extending or " "embedding Python, calling :c:func:`fork` directly rather than through :func:" "`os.fork` (and returning to or calling into Python) may result in a deadlock " @@ -1192,46 +1198,49 @@ msgstr "" #: ../../c-api/init.rst:1025 msgid "" "This data structure represents the state of a single thread. The only " -"public data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which " -"points to this thread's interpreter state." +"public data member is:" +msgstr "" + +#: ../../c-api/init.rst:1030 +msgid "This thread's interpreter state." msgstr "" -#: ../../c-api/init.rst:1038 +#: ../../c-api/init.rst:1041 msgid "Deprecated function which does nothing." msgstr "" -#: ../../c-api/init.rst:1040 +#: ../../c-api/init.rst:1043 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: ../../c-api/init.rst:1042 +#: ../../c-api/init.rst:1045 msgid "The function now does nothing." msgstr "此函式現在不會做任何事情。" -#: ../../c-api/init.rst:1045 +#: ../../c-api/init.rst:1048 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." msgstr "" -#: ../../c-api/init.rst:1049 +#: ../../c-api/init.rst:1052 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" -#: ../../c-api/init.rst:1059 +#: ../../c-api/init.rst:1062 msgid "" "Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. " "This function can be called without holding the GIL, and therefore can be " "used to avoid calls to the locking API when running single-threaded." msgstr "" -#: ../../c-api/init.rst:1063 +#: ../../c-api/init.rst:1066 msgid "The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`." msgstr "" -#: ../../c-api/init.rst:1071 +#: ../../c-api/init.rst:1074 msgid "" "Release the global interpreter lock (if it has been created) and reset the " "thread state to ``NULL``, returning the previous thread state (which is not " @@ -1239,7 +1248,7 @@ msgid "" "acquired it." msgstr "" -#: ../../c-api/init.rst:1079 +#: ../../c-api/init.rst:1082 msgid "" "Acquire the global interpreter lock (if it has been created) and set the " "thread state to *tstate*, which must not be ``NULL``. If the lock has been " @@ -1247,37 +1256,37 @@ msgid "" "ensues." msgstr "" -#: ../../c-api/init.rst:1085 ../../c-api/init.rst:1131 -#: ../../c-api/init.rst:1413 ../../c-api/init.rst:1451 +#: ../../c-api/init.rst:1088 ../../c-api/init.rst:1134 +#: ../../c-api/init.rst:1416 msgid "" "Calling this function from a thread when the runtime is finalizing will " "terminate the thread, even if the thread was not created by Python. You can " -"use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " +"use :c:func:`!_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " "interpreter is in process of being finalized before calling this function to " "avoid unwanted termination." msgstr "" -#: ../../c-api/init.rst:1093 +#: ../../c-api/init.rst:1096 msgid "" "Return the current thread state. The global interpreter lock must be held. " "When the current thread state is ``NULL``, this issues a fatal error (so " "that the caller needn't check for ``NULL``)." msgstr "" -#: ../../c-api/init.rst:1100 +#: ../../c-api/init.rst:1103 msgid "" "Swap the current thread state with the thread state given by the argument " "*tstate*, which may be ``NULL``. The global interpreter lock must be held " "and is not released." msgstr "" -#: ../../c-api/init.rst:1105 +#: ../../c-api/init.rst:1108 msgid "" "The following functions use thread-local storage, and are not compatible " "with sub-interpreters:" msgstr "" -#: ../../c-api/init.rst:1110 +#: ../../c-api/init.rst:1113 msgid "" "Ensure that the current thread is ready to call the Python C API regardless " "of the current state of Python, or of the global interpreter lock. This may " @@ -1290,7 +1299,7 @@ msgid "" "is acceptable." msgstr "" -#: ../../c-api/init.rst:1120 +#: ../../c-api/init.rst:1123 msgid "" "The return value is an opaque \"handle\" to the thread state when :c:func:" "`PyGILState_Ensure` was called, and must be passed to :c:func:" @@ -1300,13 +1309,13 @@ msgid "" "func:`PyGILState_Release`." msgstr "" -#: ../../c-api/init.rst:1127 +#: ../../c-api/init.rst:1130 msgid "" "When the function returns, the current thread will hold the GIL and be able " "to call arbitrary Python code. Failure is a fatal error." msgstr "" -#: ../../c-api/init.rst:1139 +#: ../../c-api/init.rst:1142 msgid "" "Release any resources previously acquired. After this call, Python's state " "will be the same as it was prior to the corresponding :c:func:" @@ -1314,13 +1323,13 @@ msgid "" "caller, hence the use of the GILState API)." msgstr "" -#: ../../c-api/init.rst:1144 +#: ../../c-api/init.rst:1147 msgid "" "Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" "func:`PyGILState_Release` on the same thread." msgstr "" -#: ../../c-api/init.rst:1150 +#: ../../c-api/init.rst:1153 msgid "" "Get the current thread state for this thread. May return ``NULL`` if no " "GILState API has been used on the current thread. Note that the main thread " @@ -1328,7 +1337,7 @@ msgid "" "made on the main thread. This is mainly a helper/diagnostic function." msgstr "" -#: ../../c-api/init.rst:1158 +#: ../../c-api/init.rst:1161 msgid "" "Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. " "This function can be called from any thread at any time. Only if it has had " @@ -1339,13 +1348,13 @@ msgid "" "otherwise behave differently." msgstr "" -#: ../../c-api/init.rst:1170 +#: ../../c-api/init.rst:1173 msgid "" "The following macros are normally used without a trailing semicolon; look " "for example usage in the Python source distribution." msgstr "" -#: ../../c-api/init.rst:1176 +#: ../../c-api/init.rst:1179 msgid "" "This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" "``. Note that it contains an opening brace; it must be matched with a " @@ -1353,7 +1362,7 @@ msgid "" "discussion of this macro." msgstr "" -#: ../../c-api/init.rst:1184 +#: ../../c-api/init.rst:1187 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " "contains a closing brace; it must be matched with an earlier :c:macro:" @@ -1361,40 +1370,40 @@ msgid "" "macro." msgstr "" -#: ../../c-api/init.rst:1192 +#: ../../c-api/init.rst:1195 msgid "" "This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" "c:macro:`Py_END_ALLOW_THREADS` without the closing brace." msgstr "" -#: ../../c-api/init.rst:1198 +#: ../../c-api/init.rst:1201 msgid "" "This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" "c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " "declaration." msgstr "" -#: ../../c-api/init.rst:1204 +#: ../../c-api/init.rst:1207 msgid "Low-level API" msgstr "低階 API" -#: ../../c-api/init.rst:1206 +#: ../../c-api/init.rst:1209 msgid "" "All of the following functions must be called after :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/init.rst:1208 +#: ../../c-api/init.rst:1211 msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." msgstr "" -#: ../../c-api/init.rst:1214 +#: ../../c-api/init.rst:1217 msgid "" "Create a new interpreter state object. The global interpreter lock need not " "be held, but may be held if it is necessary to serialize calls to this " "function." msgstr "" -#: ../../c-api/init.rst:1218 +#: ../../c-api/init.rst:1221 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_New`` with no arguments." @@ -1402,13 +1411,13 @@ msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``cpython." "PyInterpreterState_New``。" -#: ../../c-api/init.rst:1223 +#: ../../c-api/init.rst:1226 msgid "" "Reset all information in an interpreter state object. The global " "interpreter lock must be held." msgstr "" -#: ../../c-api/init.rst:1226 +#: ../../c-api/init.rst:1229 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_Clear`` with no arguments." @@ -1416,40 +1425,40 @@ msgstr "" "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``cpython." "PyInterpreterState_Clear``。" -#: ../../c-api/init.rst:1231 +#: ../../c-api/init.rst:1234 msgid "" "Destroy an interpreter state object. The global interpreter lock need not " "be held. The interpreter state must have been reset with a previous call " "to :c:func:`PyInterpreterState_Clear`." msgstr "" -#: ../../c-api/init.rst:1238 +#: ../../c-api/init.rst:1241 msgid "" "Create a new thread state object belonging to the given interpreter object. " "The global interpreter lock need not be held, but may be held if it is " "necessary to serialize calls to this function." msgstr "" -#: ../../c-api/init.rst:1245 +#: ../../c-api/init.rst:1248 msgid "" "Reset all information in a thread state object. The global interpreter lock " "must be held." msgstr "" -#: ../../c-api/init.rst:1248 +#: ../../c-api/init.rst:1251 msgid "" "This function now calls the :c:member:`PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -#: ../../c-api/init.rst:1255 +#: ../../c-api/init.rst:1258 msgid "" "Destroy a thread state object. The global interpreter lock need not be " "held. The thread state must have been reset with a previous call to :c:func:" "`PyThreadState_Clear`." msgstr "" -#: ../../c-api/init.rst:1262 +#: ../../c-api/init.rst:1265 msgid "" "Destroy the current thread state and release the global interpreter lock. " "Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not be " @@ -1457,119 +1466,119 @@ msgid "" "`PyThreadState_Clear`." msgstr "" -#: ../../c-api/init.rst:1270 +#: ../../c-api/init.rst:1273 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1272 +#: ../../c-api/init.rst:1275 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: ../../c-api/init.rst:1275 +#: ../../c-api/init.rst:1278 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "也請見 :c:func:`PyEval_GetFrame`\\ 。" -#: ../../c-api/init.rst:1277 ../../c-api/init.rst:1286 -#: ../../c-api/init.rst:1295 +#: ../../c-api/init.rst:1280 ../../c-api/init.rst:1289 +#: ../../c-api/init.rst:1298 msgid "*tstate* must not be ``NULL``." msgstr "*tstate* 不可為 ``NULL``。" -#: ../../c-api/init.rst:1284 +#: ../../c-api/init.rst:1287 msgid "" "Get the unique thread state identifier of the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1293 +#: ../../c-api/init.rst:1296 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1302 +#: ../../c-api/init.rst:1305 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1304 +#: ../../c-api/init.rst:1307 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "" -#: ../../c-api/init.rst:1311 +#: ../../c-api/init.rst:1314 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." msgstr "" -#: ../../c-api/init.rst:1314 +#: ../../c-api/init.rst:1317 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -#: ../../c-api/init.rst:1322 +#: ../../c-api/init.rst:1325 msgid "Get the current interpreter." msgstr "" -#: ../../c-api/init.rst:1324 +#: ../../c-api/init.rst:1327 msgid "" "Issue a fatal error if there no current Python thread state or no current " "interpreter. It cannot return NULL." msgstr "" -#: ../../c-api/init.rst:1327 ../../c-api/init.rst:1337 +#: ../../c-api/init.rst:1330 ../../c-api/init.rst:1340 msgid "The caller must hold the GIL." msgstr "" -#: ../../c-api/init.rst:1334 +#: ../../c-api/init.rst:1337 msgid "" "Return the interpreter's unique ID. If there was any error in doing so then " "``-1`` is returned and an error is set." msgstr "" -#: ../../c-api/init.rst:1344 +#: ../../c-api/init.rst:1347 msgid "" "Return a dictionary in which interpreter-specific data may be stored. If " "this function returns ``NULL`` then no exception has been raised and the " "caller should assume no interpreter-specific dict is available." msgstr "" -#: ../../c-api/init.rst:1348 +#: ../../c-api/init.rst:1351 msgid "" "This is not a replacement for :c:func:`PyModule_GetState()`, which " "extensions should use to store interpreter-specific state information." msgstr "" -#: ../../c-api/init.rst:1355 +#: ../../c-api/init.rst:1358 msgid "Type of a frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1357 +#: ../../c-api/init.rst:1360 msgid "" "The *throwflag* parameter is used by the ``throw()`` method of generators: " "if non-zero, handle the current exception." msgstr "" -#: ../../c-api/init.rst:1360 +#: ../../c-api/init.rst:1363 msgid "The function now takes a *tstate* parameter." msgstr "" -#: ../../c-api/init.rst:1363 +#: ../../c-api/init.rst:1366 msgid "" "The *frame* parameter changed from ``PyFrameObject*`` to " "``_PyInterpreterFrame*``." msgstr "" -#: ../../c-api/init.rst:1368 +#: ../../c-api/init.rst:1371 msgid "Get the frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1370 ../../c-api/init.rst:1378 +#: ../../c-api/init.rst:1373 ../../c-api/init.rst:1381 msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." msgstr "" -#: ../../c-api/init.rst:1376 +#: ../../c-api/init.rst:1379 msgid "Set the frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1385 +#: ../../c-api/init.rst:1388 msgid "" "Return a dictionary in which extensions can store thread-specific state " "information. Each extension should use a unique key to use to store state " @@ -1578,7 +1587,7 @@ msgid "" "raised and the caller should assume no current thread state is available." msgstr "" -#: ../../c-api/init.rst:1394 +#: ../../c-api/init.rst:1397 msgid "" "Asynchronously raise an exception in a thread. The *id* argument is the " "thread id of the target thread; *exc* is the exception object to be raised. " @@ -1590,33 +1599,33 @@ msgid "" "raises no exceptions." msgstr "" -#: ../../c-api/init.rst:1402 +#: ../../c-api/init.rst:1405 msgid "" "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." msgstr "" -#: ../../c-api/init.rst:1408 +#: ../../c-api/init.rst:1411 msgid "" "Acquire the global interpreter lock and set the current thread state to " "*tstate*, which must not be ``NULL``. The lock must have been created " "earlier. If this thread already has the lock, deadlock ensues." msgstr "" -#: ../../c-api/init.rst:1419 ../../c-api/init.rst:1457 +#: ../../c-api/init.rst:1422 ../../c-api/init.rst:1460 msgid "" "Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" "`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " "current thread if called while the interpreter is finalizing." msgstr "" -#: ../../c-api/init.rst:1424 +#: ../../c-api/init.rst:1427 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../c-api/init.rst:1430 +#: ../../c-api/init.rst:1433 msgid "" "Reset the current thread state to ``NULL`` and release the global " "interpreter lock. The lock must have been created earlier and must be held " @@ -1625,41 +1634,50 @@ msgid "" "isn't, a fatal error is reported." msgstr "" -#: ../../c-api/init.rst:1436 +#: ../../c-api/init.rst:1439 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../c-api/init.rst:1442 +#: ../../c-api/init.rst:1445 msgid "" "Acquire the global interpreter lock. The lock must have been created " "earlier. If this thread already has the lock, a deadlock ensues." msgstr "" -#: ../../c-api/init.rst:1445 +#: ../../c-api/init.rst:1448 msgid "" "This function does not update the current thread state. Please use :c:func:" "`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` instead." msgstr "" -#: ../../c-api/init.rst:1465 +#: ../../c-api/init.rst:1454 +msgid "" +"Calling this function from a thread when the runtime is finalizing will " +"terminate the thread, even if the thread was not created by Python. You can " +"use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " +"interpreter is in process of being finalized before calling this function to " +"avoid unwanted termination." +msgstr "" + +#: ../../c-api/init.rst:1468 msgid "" "Release the global interpreter lock. The lock must have been created " "earlier." msgstr "" -#: ../../c-api/init.rst:1467 +#: ../../c-api/init.rst:1470 msgid "" "This function does not update the current thread state. Please use :c:func:" "`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` instead." msgstr "" -#: ../../c-api/init.rst:1476 +#: ../../c-api/init.rst:1479 msgid "Sub-interpreter support" msgstr "" -#: ../../c-api/init.rst:1478 +#: ../../c-api/init.rst:1481 msgid "" "While in most uses, you will only embed a single Python interpreter, there " "are cases where you need to create several independent interpreters in the " @@ -1667,7 +1685,7 @@ msgid "" "to do that." msgstr "" -#: ../../c-api/init.rst:1483 +#: ../../c-api/init.rst:1486 msgid "" "The \"main\" interpreter is the first one created when the runtime " "initializes. It is usually the only Python interpreter in a process. Unlike " @@ -1678,14 +1696,114 @@ msgid "" "returns a pointer to its state." msgstr "" -#: ../../c-api/init.rst:1490 +#: ../../c-api/init.rst:1493 msgid "" "You can switch between sub-interpreters using the :c:func:" "`PyThreadState_Swap` function. You can create and destroy them using the " "following functions:" msgstr "" -#: ../../c-api/init.rst:1504 +#: ../../c-api/init.rst:1499 +msgid "" +"Structure containing most parameters to configure a sub-interpreter. Its " +"values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " +"modified by the runtime." +msgstr "" + +#: ../../c-api/init.rst:1505 +msgid "Structure fields:" +msgstr "" + +#: ../../c-api/init.rst:1509 +msgid "" +"If this is ``0`` then the sub-interpreter will use its own \"object\" " +"allocator state. Otherwise it will use (share) the main interpreter's." +msgstr "" + +#: ../../c-api/init.rst:1513 +msgid "" +"If this is ``0`` then :c:member:`~PyInterpreterConfig." +"check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` " +"then :c:member:`~PyInterpreterConfig.gil` must not be :c:macro:" +"`PyInterpreterConfig_OWN_GIL`." +msgstr "" + +#: ../../c-api/init.rst:1521 +msgid "" +"If this is ``0`` then the runtime will not support forking the process in " +"any thread where the sub-interpreter is currently active. Otherwise fork is " +"unrestricted." +msgstr "" + +#: ../../c-api/init.rst:1525 +msgid "" +"Note that the :mod:`subprocess` module still works when fork is disallowed." +msgstr "" + +#: ../../c-api/init.rst:1530 +msgid "" +"If this is ``0`` then the runtime will not support replacing the current " +"process via exec (e.g. :func:`os.execv`) in any thread where the sub-" +"interpreter is currently active. Otherwise exec is unrestricted." +msgstr "" + +#: ../../c-api/init.rst:1535 +msgid "" +"Note that the :mod:`subprocess` module still works when exec is disallowed." +msgstr "" + +#: ../../c-api/init.rst:1540 +msgid "" +"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " +"create threads. Otherwise threads are allowed." +msgstr "" + +#: ../../c-api/init.rst:1546 +msgid "" +"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " +"create daemon threads. Otherwise daemon threads are allowed (as long as :c:" +"member:`~PyInterpreterConfig.allow_threads` is non-zero)." +msgstr "" + +#: ../../c-api/init.rst:1553 +msgid "" +"If this is ``0`` then all extension modules may be imported, including " +"legacy (single-phase init) modules, in any thread where the sub-interpreter " +"is currently active. Otherwise only multi-phase init extension modules (see :" +"pep:`489`) may be imported." +msgstr "" + +#: ../../c-api/init.rst:1559 +msgid "" +"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." +"use_main_obmalloc` is ``0``." +msgstr "" + +#: ../../c-api/init.rst:1564 +msgid "" +"This determines the operation of the GIL for the sub-interpreter. It may be " +"one of the following:" +msgstr "" + +#: ../../c-api/init.rst:1571 +msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." +msgstr "" + +#: ../../c-api/init.rst:1575 +msgid "Use (share) the main interpreter's GIL." +msgstr "" + +#: ../../c-api/init.rst:1579 +msgid "Use the sub-interpreter's own GIL." +msgstr "" + +#: ../../c-api/init.rst:1581 +msgid "" +"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" +"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." +msgstr "" + +#: ../../c-api/init.rst:1595 msgid "" "Create a new sub-interpreter. This is an (almost) totally separate " "environment for the execution of Python code. In particular, the new " @@ -1698,25 +1816,54 @@ msgid "" "underlying file descriptors)." msgstr "" -#: ../../c-api/init.rst:1514 +#: ../../c-api/init.rst:1605 +msgid "" +"The given *config* controls the options with which the interpreter is " +"initialized." +msgstr "" + +#: ../../c-api/init.rst:1608 +msgid "" +"Upon success, *tstate_p* will be set to the first thread state created in " +"the new sub-interpreter. This thread state is made in the current thread " +"state. Note that no actual thread is created; see the discussion of thread " +"states below. If creation of the new interpreter is unsuccessful, " +"*tstate_p* is set to ``NULL``; no exception is set since the exception state " +"is stored in the current thread state and there may not be a current thread " +"state." +msgstr "" + +#: ../../c-api/init.rst:1617 msgid "" -"The return value points to the first thread state created in the new sub-" -"interpreter. This thread state is made in the current thread state. Note " -"that no actual thread is created; see the discussion of thread states " -"below. If creation of the new interpreter is unsuccessful, ``NULL`` is " -"returned; no exception is set since the exception state is stored in the " -"current thread state and there may not be a current thread state. (Like all " -"other Python/C API functions, the global interpreter lock must be held " -"before calling this function and is still held when it returns; however, " -"unlike most other Python/C API functions, there needn't be a current thread " -"state on entry.)" +"Like all other Python/C API functions, the global interpreter lock must be " +"held before calling this function and is still held when it returns. " +"Likewise a current thread state must be set on entry. On success, the " +"returned thread state will be set as current. If the sub-interpreter is " +"created with its own GIL then the GIL of the calling interpreter will be " +"released. When the function returns, the new interpreter's GIL will be held " +"by the current thread and the previously interpreter's GIL will remain " +"released here." msgstr "" -#: ../../c-api/init.rst:1529 +#: ../../c-api/init.rst:1628 +msgid "" +"Sub-interpreters are most effective when isolated from each other, with " +"certain functionality restricted::" +msgstr "" + +#: ../../c-api/init.rst:1642 +msgid "" +"Note that the config is used only briefly and does not get modified. During " +"initialization the config's values are converted into various :c:type:" +"`PyInterpreterState` values. A read-only copy of the config may be stored " +"internally on the :c:type:`PyInterpreterState`." +msgstr "" + +#: ../../c-api/init.rst:1651 msgid "Extension modules are shared between (sub-)interpreters as follows:" msgstr "" -#: ../../c-api/init.rst:1531 +#: ../../c-api/init.rst:1653 msgid "" "For modules using multi-phase initialization, e.g. :c:func:" "`PyModule_FromDefAndSpec`, a separate module object is created and " @@ -1724,7 +1871,7 @@ msgid "" "are shared between these module objects." msgstr "" -#: ../../c-api/init.rst:1537 +#: ../../c-api/init.rst:1659 msgid "" "For modules using single-phase initialization, e.g. :c:func:" "`PyModule_Create`, the first time a particular extension is imported, it is " @@ -1736,7 +1883,7 @@ msgid "" "might cause unwanted behavior (see `Bugs and caveats`_ below)." msgstr "" -#: ../../c-api/init.rst:1548 +#: ../../c-api/init.rst:1670 msgid "" "Note that this is different from what happens when an extension is imported " "after the interpreter has been completely re-initialized by calling :c:func:" @@ -1746,23 +1893,84 @@ msgid "" "shared between these modules." msgstr "" -#: ../../c-api/init.rst:1562 +#: ../../c-api/init.rst:1690 +msgid "" +"Create a new sub-interpreter. This is essentially just a wrapper around :c:" +"func:`Py_NewInterpreterFromConfig` with a config that preserves the existing " +"behavior. The result is an unisolated sub-interpreter that shares the main " +"interpreter's GIL, allows fork/exec, allows daemon threads, and allows " +"single-phase init modules." +msgstr "" + +#: ../../c-api/init.rst:1702 msgid "" "Destroy the (sub-)interpreter represented by the given thread state. The " "given thread state must be the current thread state. See the discussion of " "thread states below. When the call returns, the current thread state is " "``NULL``. All thread states associated with this interpreter are " -"destroyed. (The global interpreter lock must be held before calling this " -"function and is still held when it returns.) :c:func:`Py_FinalizeEx` will " -"destroy all sub-interpreters that haven't been explicitly destroyed at that " -"point." +"destroyed. The global interpreter lock used by the target interpreter must " +"be held before calling this function. No GIL is held when it returns." +msgstr "" + +#: ../../c-api/init.rst:1710 +msgid "" +":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " +"explicitly destroyed at that point." +msgstr "" + +#: ../../c-api/init.rst:1715 +msgid "A Per-Interpreter GIL" msgstr "" -#: ../../c-api/init.rst:1572 +#: ../../c-api/init.rst:1717 +msgid "" +"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " +"that is completely isolated from other interpreters, including having its " +"own GIL. The most important benefit of this isolation is that such an " +"interpreter can execute Python code without being blocked by other " +"interpreters or blocking any others. Thus a single Python process can truly " +"take advantage of multiple CPU cores when running Python code. The " +"isolation also encourages a different approach to concurrency than that of " +"just using threads. (See :pep:`554`.)" +msgstr "" + +#: ../../c-api/init.rst:1727 +msgid "" +"Using an isolated interpreter requires vigilance in preserving that " +"isolation. That especially means not sharing any objects or mutable state " +"without guarantees about thread-safety. Even objects that are otherwise " +"immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of " +"the refcount. One simple but less-efficient approach around this is to use " +"a global lock around all use of some state (or object). Alternately, " +"effectively immutable objects (like integers or strings) can be made safe in " +"spite of their refcounts by making them \"immortal\". In fact, this has been " +"done for the builtin singletons, small integers, and a number of other " +"builtin objects." +msgstr "" + +#: ../../c-api/init.rst:1738 +msgid "" +"If you preserve isolation then you will have access to proper multi-core " +"computing without the complications that come with free-threading. Failure " +"to preserve isolation will expose you to the full consequences of free-" +"threading, including races and hard-to-debug crashes." +msgstr "" + +#: ../../c-api/init.rst:1743 +msgid "" +"Aside from that, one of the main challenges of using multiple isolated " +"interpreters is how to communicate between them safely (not break isolation) " +"and efficiently. The runtime and stdlib do not provide any standard " +"approach to this yet. A future stdlib module would help mitigate the effort " +"of preserving isolation and expose effective tools for communicating (and " +"sharing) data between interpreters." +msgstr "" + +#: ../../c-api/init.rst:1754 msgid "Bugs and caveats" msgstr "" -#: ../../c-api/init.rst:1574 +#: ../../c-api/init.rst:1756 msgid "" "Because sub-interpreters (and the main interpreter) are part of the same " "process, the insulation between them isn't perfect --- for example, using " @@ -1775,7 +1983,7 @@ msgid "" "should be avoided if possible." msgstr "" -#: ../../c-api/init.rst:1584 +#: ../../c-api/init.rst:1766 msgid "" "Special care should be taken to avoid sharing user-defined functions, " "methods, instances or classes between sub-interpreters, since import " @@ -1784,7 +1992,7 @@ msgid "" "objects from which the above are reachable." msgstr "" -#: ../../c-api/init.rst:1590 +#: ../../c-api/init.rst:1772 msgid "" "Also note that combining this functionality with ``PyGILState_*`` APIs is " "delicate, because these APIs assume a bijection between Python thread states " @@ -1796,25 +2004,25 @@ msgid "" "created threads will probably be broken when using sub-interpreters." msgstr "" -#: ../../c-api/init.rst:1601 +#: ../../c-api/init.rst:1783 msgid "Asynchronous Notifications" msgstr "" -#: ../../c-api/init.rst:1603 +#: ../../c-api/init.rst:1785 msgid "" "A mechanism is provided to make asynchronous notifications to the main " "interpreter thread. These notifications take the form of a function pointer " "and a void pointer argument." msgstr "" -#: ../../c-api/init.rst:1612 +#: ../../c-api/init.rst:1794 msgid "" "Schedule a function to be called from the main interpreter thread. On " "success, ``0`` is returned and *func* is queued for being called in the main " "thread. On failure, ``-1`` is returned without setting any exception." msgstr "" -#: ../../c-api/init.rst:1616 +#: ../../c-api/init.rst:1798 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -1822,17 +2030,17 @@ msgid "" "these conditions met:" msgstr "" -#: ../../c-api/init.rst:1621 +#: ../../c-api/init.rst:1803 msgid "on a :term:`bytecode` boundary;" msgstr "" -#: ../../c-api/init.rst:1622 +#: ../../c-api/init.rst:1804 msgid "" "with the main thread holding the :term:`global interpreter lock` (*func* can " "therefore use the full C API)." msgstr "" -#: ../../c-api/init.rst:1625 +#: ../../c-api/init.rst:1807 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -1840,20 +2048,20 @@ msgid "" "if the global interpreter lock is released." msgstr "" -#: ../../c-api/init.rst:1630 +#: ../../c-api/init.rst:1812 msgid "" "This function doesn't need a current thread state to run, and it doesn't " "need the global interpreter lock." msgstr "" -#: ../../c-api/init.rst:1633 +#: ../../c-api/init.rst:1815 msgid "" "To call this function in a subinterpreter, the caller must hold the GIL. " "Otherwise, the function *func* can be scheduled to be called from the wrong " "interpreter." msgstr "" -#: ../../c-api/init.rst:1638 +#: ../../c-api/init.rst:1820 msgid "" "This is a low-level function, only useful for very special cases. There is " "no guarantee that *func* will be called as quick as possible. If the main " @@ -1863,7 +2071,7 @@ msgid "" "`PyGILState API`." msgstr "" -#: ../../c-api/init.rst:1645 +#: ../../c-api/init.rst:1827 msgid "" "If this function is called in a subinterpreter, the function *func* is now " "scheduled to be called from the subinterpreter, rather than being called " @@ -1871,18 +2079,18 @@ msgid "" "scheduled calls." msgstr "" -#: ../../c-api/init.rst:1656 +#: ../../c-api/init.rst:1838 msgid "Profiling and Tracing" msgstr "" -#: ../../c-api/init.rst:1661 +#: ../../c-api/init.rst:1843 msgid "" "The Python interpreter provides some low-level support for attaching " "profiling and execution tracing facilities. These are used for profiling, " "debugging, and coverage analysis tools." msgstr "" -#: ../../c-api/init.rst:1665 +#: ../../c-api/init.rst:1847 msgid "" "This C interface allows the profiling or tracing code to avoid the overhead " "of calling through Python-level callable objects, making a direct C function " @@ -1892,7 +2100,7 @@ msgid "" "reported to the Python-level trace functions in previous versions." msgstr "" -#: ../../c-api/init.rst:1675 +#: ../../c-api/init.rst:1857 msgid "" "The type of the trace function registered using :c:func:`PyEval_SetProfile` " "and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " @@ -1904,74 +2112,66 @@ msgid "" "value of *what*:" msgstr "" -#: ../../c-api/init.rst:1684 +#: ../../c-api/init.rst:1866 msgid "Value of *what*" msgstr "" -#: ../../c-api/init.rst:1684 +#: ../../c-api/init.rst:1866 msgid "Meaning of *arg*" msgstr "" -#: ../../c-api/init.rst:1686 -#, fuzzy +#: ../../c-api/init.rst:1868 msgid ":c:data:`PyTrace_CALL`" -msgstr ":const:`PyTrace_CALL`" +msgstr ":c:data:`PyTrace_CALL`" -#: ../../c-api/init.rst:1686 ../../c-api/init.rst:1691 -#: ../../c-api/init.rst:1702 +#: ../../c-api/init.rst:1868 ../../c-api/init.rst:1873 +#: ../../c-api/init.rst:1884 msgid "Always :c:data:`Py_None`." msgstr "" -#: ../../c-api/init.rst:1688 -#, fuzzy +#: ../../c-api/init.rst:1870 msgid ":c:data:`PyTrace_EXCEPTION`" -msgstr ":const:`PyTrace_EXCEPTION`" +msgstr ":c:data:`PyTrace_EXCEPTION`" -#: ../../c-api/init.rst:1688 +#: ../../c-api/init.rst:1870 msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "" -#: ../../c-api/init.rst:1691 -#, fuzzy +#: ../../c-api/init.rst:1873 msgid ":c:data:`PyTrace_LINE`" -msgstr ":const:`PyTrace_LINE`" +msgstr ":c:data:`PyTrace_LINE`" -#: ../../c-api/init.rst:1693 -#, fuzzy +#: ../../c-api/init.rst:1875 msgid ":c:data:`PyTrace_RETURN`" -msgstr ":const:`PyTrace_RETURN`" +msgstr ":c:data:`PyTrace_RETURN`" -#: ../../c-api/init.rst:1693 +#: ../../c-api/init.rst:1875 msgid "" "Value being returned to the caller, or ``NULL`` if caused by an exception." msgstr "" -#: ../../c-api/init.rst:1696 -#, fuzzy +#: ../../c-api/init.rst:1878 msgid ":c:data:`PyTrace_C_CALL`" -msgstr ":const:`PyTrace_C_CALL`" +msgstr ":c:data:`PyTrace_C_CALL`" -#: ../../c-api/init.rst:1696 ../../c-api/init.rst:1698 -#: ../../c-api/init.rst:1700 +#: ../../c-api/init.rst:1878 ../../c-api/init.rst:1880 +#: ../../c-api/init.rst:1882 msgid "Function object being called." msgstr "" -#: ../../c-api/init.rst:1698 -#, fuzzy +#: ../../c-api/init.rst:1880 msgid ":c:data:`PyTrace_C_EXCEPTION`" -msgstr ":const:`PyTrace_C_EXCEPTION`" +msgstr ":c:data:`PyTrace_C_EXCEPTION`" -#: ../../c-api/init.rst:1700 -#, fuzzy +#: ../../c-api/init.rst:1882 msgid ":c:data:`PyTrace_C_RETURN`" -msgstr ":const:`PyTrace_C_RETURN`" +msgstr ":c:data:`PyTrace_C_RETURN`" -#: ../../c-api/init.rst:1702 -#, fuzzy +#: ../../c-api/init.rst:1884 msgid ":c:data:`PyTrace_OPCODE`" -msgstr ":const:`PyTrace_OPCODE`" +msgstr ":c:data:`PyTrace_OPCODE`" -#: ../../c-api/init.rst:1707 +#: ../../c-api/init.rst:1889 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "a new call to a function or method is being reported, or a new entry into a " @@ -1980,7 +2180,7 @@ msgid "" "the corresponding frame." msgstr "" -#: ../../c-api/init.rst:1716 +#: ../../c-api/init.rst:1898 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "an exception has been raised. The callback function is called with this " @@ -1992,7 +2192,7 @@ msgid "" "profiler." msgstr "" -#: ../../c-api/init.rst:1727 +#: ../../c-api/init.rst:1909 msgid "" "The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " "function (but not a profiling function) when a line-number event is being " @@ -2000,31 +2200,31 @@ msgid "" "*0* on that frame." msgstr "" -#: ../../c-api/init.rst:1734 +#: ../../c-api/init.rst:1916 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a call is about to return." msgstr "" -#: ../../c-api/init.rst:1740 +#: ../../c-api/init.rst:1922 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function is about to be called." msgstr "" -#: ../../c-api/init.rst:1746 +#: ../../c-api/init.rst:1928 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has raised an exception." msgstr "" -#: ../../c-api/init.rst:1752 +#: ../../c-api/init.rst:1934 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has returned." msgstr "" -#: ../../c-api/init.rst:1758 +#: ../../c-api/init.rst:1940 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " "not profiling functions) when a new opcode is about to be executed. This " @@ -2032,7 +2232,7 @@ msgid "" "attr:`f_trace_opcodes` to *1* on the frame." msgstr "" -#: ../../c-api/init.rst:1766 +#: ../../c-api/init.rst:1948 msgid "" "Set the profiler function to *func*. The *obj* parameter is passed to the " "function as its first parameter, and may be any Python object, or ``NULL``. " @@ -2042,29 +2242,29 @@ msgid "" "`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." msgstr "" -#: ../../c-api/init.rst:1773 +#: ../../c-api/init.rst:1955 msgid "See also the :func:`sys.setprofile` function." msgstr "" -#: ../../c-api/init.rst:1775 ../../c-api/init.rst:1782 -#: ../../c-api/init.rst:1801 ../../c-api/init.rst:1808 +#: ../../c-api/init.rst:1957 ../../c-api/init.rst:1964 +#: ../../c-api/init.rst:1983 ../../c-api/init.rst:1990 msgid "The caller must hold the :term:`GIL`." msgstr "呼叫者必須持有 :term:`GIL`。" -#: ../../c-api/init.rst:1779 +#: ../../c-api/init.rst:1961 msgid "" "Like :c:func:`PyEval_SetProfile` but sets the profile function in all " "running threads belonging to the current interpreter instead of the setting " "it only on the current thread." msgstr "" -#: ../../c-api/init.rst:1784 +#: ../../c-api/init.rst:1966 msgid "" "As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " "while setting the profile functions in all threads." msgstr "" -#: ../../c-api/init.rst:1792 +#: ../../c-api/init.rst:1974 msgid "" "Set the tracing function to *func*. This is similar to :c:func:" "`PyEval_SetProfile`, except the tracing function does receive line-number " @@ -2075,65 +2275,65 @@ msgid "" "*what* parameter." msgstr "" -#: ../../c-api/init.rst:1799 +#: ../../c-api/init.rst:1981 msgid "See also the :func:`sys.settrace` function." msgstr "也請見 :func:`sys.settrace` 函式。" -#: ../../c-api/init.rst:1805 +#: ../../c-api/init.rst:1987 msgid "" "Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running " "threads belonging to the current interpreter instead of the setting it only " "on the current thread." msgstr "" -#: ../../c-api/init.rst:1810 +#: ../../c-api/init.rst:1992 msgid "" "As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " "while setting the trace functions in all threads." msgstr "" -#: ../../c-api/init.rst:1819 +#: ../../c-api/init.rst:2001 msgid "Advanced Debugger Support" msgstr "" -#: ../../c-api/init.rst:1824 +#: ../../c-api/init.rst:2006 msgid "" "These functions are only intended to be used by advanced debugging tools." msgstr "" -#: ../../c-api/init.rst:1829 +#: ../../c-api/init.rst:2011 msgid "" "Return the interpreter state object at the head of the list of all such " "objects." msgstr "" -#: ../../c-api/init.rst:1834 +#: ../../c-api/init.rst:2016 msgid "Return the main interpreter state object." msgstr "" -#: ../../c-api/init.rst:1839 +#: ../../c-api/init.rst:2021 msgid "" "Return the next interpreter state object after *interp* from the list of all " "such objects." msgstr "" -#: ../../c-api/init.rst:1845 +#: ../../c-api/init.rst:2027 msgid "" "Return the pointer to the first :c:type:`PyThreadState` object in the list " "of threads associated with the interpreter *interp*." msgstr "" -#: ../../c-api/init.rst:1851 +#: ../../c-api/init.rst:2033 msgid "" "Return the next thread state object after *tstate* from the list of all such " "objects belonging to the same :c:type:`PyInterpreterState` object." msgstr "" -#: ../../c-api/init.rst:1858 +#: ../../c-api/init.rst:2040 msgid "Thread Local Storage Support" msgstr "" -#: ../../c-api/init.rst:1862 +#: ../../c-api/init.rst:2044 msgid "" "The Python interpreter provides low-level support for thread-local storage " "(TLS) which wraps the underlying native TLS implementation to support the " @@ -2143,19 +2343,19 @@ msgid "" "thread." msgstr "" -#: ../../c-api/init.rst:1869 +#: ../../c-api/init.rst:2051 msgid "" "The GIL does *not* need to be held when calling these functions; they supply " "their own locking." msgstr "" -#: ../../c-api/init.rst:1872 +#: ../../c-api/init.rst:2054 msgid "" "Note that :file:`Python.h` does not include the declaration of the TLS APIs, " "you need to include :file:`pythread.h` to use thread-local storage." msgstr "" -#: ../../c-api/init.rst:1876 +#: ../../c-api/init.rst:2058 msgid "" "None of these API functions handle memory management on behalf of the :c:" "expr:`void*` values. You need to allocate and deallocate them yourself. If " @@ -2163,22 +2363,22 @@ msgid "" "don't do refcount operations on them either." msgstr "" -#: ../../c-api/init.rst:1884 +#: ../../c-api/init.rst:2066 msgid "Thread Specific Storage (TSS) API" msgstr "" -#: ../../c-api/init.rst:1886 +#: ../../c-api/init.rst:2068 msgid "" "TSS API is introduced to supersede the use of the existing TLS API within " "the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " "instead of :c:expr:`int` to represent thread keys." msgstr "" -#: ../../c-api/init.rst:1892 +#: ../../c-api/init.rst:2074 msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" msgstr "" -#: ../../c-api/init.rst:1897 +#: ../../c-api/init.rst:2079 msgid "" "This data structure represents the state of a thread key, the definition of " "which may depend on the underlying TLS implementation, and it has an " @@ -2186,52 +2386,52 @@ msgid "" "public members in this structure." msgstr "" -#: ../../c-api/init.rst:1902 +#: ../../c-api/init.rst:2084 msgid "" "When :ref:`Py_LIMITED_API ` is not defined, static allocation of " "this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." msgstr "" -#: ../../c-api/init.rst:1908 +#: ../../c-api/init.rst:2090 msgid "" "This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " "that this macro won't be defined with :ref:`Py_LIMITED_API `." msgstr "" -#: ../../c-api/init.rst:1913 +#: ../../c-api/init.rst:2095 msgid "Dynamic Allocation" msgstr "" -#: ../../c-api/init.rst:1915 +#: ../../c-api/init.rst:2097 msgid "" "Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " "built with :ref:`Py_LIMITED_API `, where static allocation of this " "type is not possible due to its implementation being opaque at build time." msgstr "" -#: ../../c-api/init.rst:1922 +#: ../../c-api/init.rst:2104 msgid "" "Return a value which is the same state as a value initialized with :c:macro:" "`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." msgstr "" -#: ../../c-api/init.rst:1929 +#: ../../c-api/init.rst:2111 msgid "" "Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " "calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " "have been unassigned. This is a no-op if the *key* argument is ``NULL``." msgstr "" -#: ../../c-api/init.rst:1935 +#: ../../c-api/init.rst:2117 msgid "" "A freed key becomes a dangling pointer. You should reset the key to ``NULL``." msgstr "" -#: ../../c-api/init.rst:1940 +#: ../../c-api/init.rst:2122 msgid "Methods" -msgstr "" +msgstr "方法" -#: ../../c-api/init.rst:1942 +#: ../../c-api/init.rst:2124 msgid "" "The parameter *key* of these functions must not be ``NULL``. Moreover, the " "behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " @@ -2239,13 +2439,13 @@ msgid "" "func:`PyThread_tss_create`." msgstr "" -#: ../../c-api/init.rst:1950 +#: ../../c-api/init.rst:2132 msgid "" "Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " "by :c:func:`PyThread_tss_create`." msgstr "" -#: ../../c-api/init.rst:1956 +#: ../../c-api/init.rst:2138 msgid "" "Return a zero value on successful initialization of a TSS key. The behavior " "is undefined if the value pointed to by the *key* argument is not " @@ -2254,7 +2454,7 @@ msgid "" "no-op and immediately returns success." msgstr "" -#: ../../c-api/init.rst:1965 +#: ../../c-api/init.rst:2147 msgid "" "Destroy a TSS key to forget the values associated with the key across all " "threads, and change the key's initialization state to uninitialized. A " @@ -2263,31 +2463,31 @@ msgid "" "key -- calling it on an already destroyed key is a no-op." msgstr "" -#: ../../c-api/init.rst:1974 +#: ../../c-api/init.rst:2156 msgid "" "Return a zero value to indicate successfully associating a :c:expr:`void*` " "value with a TSS key in the current thread. Each thread has a distinct " "mapping of the key to a :c:expr:`void*` value." msgstr "" -#: ../../c-api/init.rst:1981 +#: ../../c-api/init.rst:2163 msgid "" "Return the :c:expr:`void*` value associated with a TSS key in the current " "thread. This returns ``NULL`` if no value is associated with the key in the " "current thread." msgstr "" -#: ../../c-api/init.rst:1989 +#: ../../c-api/init.rst:2171 msgid "Thread Local Storage (TLS) API" msgstr "" -#: ../../c-api/init.rst:1991 +#: ../../c-api/init.rst:2173 msgid "" "This API is superseded by :ref:`Thread Specific Storage (TSS) API `." msgstr "" -#: ../../c-api/init.rst:1996 +#: ../../c-api/init.rst:2178 msgid "" "This version of the API does not support platforms where the native TLS key " "is defined in a way that cannot be safely cast to ``int``. On such " @@ -2296,7 +2496,7 @@ msgid "" "platforms." msgstr "" -#: ../../c-api/init.rst:2001 +#: ../../c-api/init.rst:2183 msgid "" "Due to the compatibility problem noted above, this version of the API should " "not be used in new code." @@ -2319,19 +2519,20 @@ msgid "path (in module sys)" msgstr "path(sys 模組中)" #: ../../c-api/init.rst:334 ../../c-api/init.rst:589 ../../c-api/init.rst:615 -#: ../../c-api/init.rst:1054 ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:1057 ../../c-api/init.rst:1587 +#: ../../c-api/init.rst:1682 msgid "module" msgstr "模組" -#: ../../c-api/init.rst:334 ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:334 ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "builtins" msgstr "builtins(內建)" -#: ../../c-api/init.rst:334 ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:334 ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "__main__" msgstr "__main__" -#: ../../c-api/init.rst:334 ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:334 ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "sys" msgstr "sys" @@ -2351,11 +2552,11 @@ msgstr "PySys_SetArgv()" msgid "PySys_SetArgvEx()" msgstr "PySys_SetArgvEx()" -#: ../../c-api/init.rst:334 ../../c-api/init.rst:1525 ../../c-api/init.rst:1560 +#: ../../c-api/init.rst:334 ../../c-api/init.rst:1647 ../../c-api/init.rst:1700 msgid "Py_FinalizeEx()" msgstr "Py_FinalizeEx()" -#: ../../c-api/init.rst:430 ../../c-api/init.rst:467 ../../c-api/init.rst:1525 +#: ../../c-api/init.rst:430 ../../c-api/init.rst:467 ../../c-api/init.rst:1647 msgid "Py_Initialize()" msgstr "Py_Initialize()" @@ -2435,42 +2636,42 @@ msgstr "Py_BEGIN_ALLOW_THREADS" msgid "Py_END_ALLOW_THREADS" msgstr "Py_END_ALLOW_THREADS" -#: ../../c-api/init.rst:904 ../../c-api/init.rst:1032 +#: ../../c-api/init.rst:904 ../../c-api/init.rst:1035 msgid "PyEval_RestoreThread()" msgstr "PyEval_RestoreThread()" -#: ../../c-api/init.rst:904 ../../c-api/init.rst:1032 +#: ../../c-api/init.rst:904 ../../c-api/init.rst:1035 msgid "PyEval_SaveThread()" msgstr "PyEval_SaveThread()" -#: ../../c-api/init.rst:1032 +#: ../../c-api/init.rst:1035 msgid "PyEval_AcquireThread()" msgstr "PyEval_AcquireThread()" -#: ../../c-api/init.rst:1032 +#: ../../c-api/init.rst:1035 msgid "PyEval_ReleaseThread()" msgstr "PyEval_ReleaseThread()" -#: ../../c-api/init.rst:1054 +#: ../../c-api/init.rst:1057 msgid "_thread" msgstr "_thread" -#: ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "stdout (in module sys)" msgstr "stdout(sys 模組中)" -#: ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "stderr (in module sys)" msgstr "stderr(sys 模組中)" -#: ../../c-api/init.rst:1496 +#: ../../c-api/init.rst:1587 ../../c-api/init.rst:1682 msgid "stdin (in module sys)" msgstr "stdin(sys 模組中)" -#: ../../c-api/init.rst:1555 +#: ../../c-api/init.rst:1677 msgid "close() (in module os)" msgstr "close()(sys 模組中)" -#: ../../c-api/init.rst:1610 +#: ../../c-api/init.rst:1792 msgid "Py_AddPendingCall()" msgstr "Py_AddPendingCall()" diff --git a/c-api/init_config.po b/c-api/init_config.po index 2ed97a20cd..3515990b20 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -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-29 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-" @@ -113,7 +113,7 @@ msgid "*index* must be greater than or equal to ``0``." msgstr "" #: ../../c-api/init_config.rst:104 ../../c-api/init_config.rst:124 -#: ../../c-api/init_config.rst:225 ../../c-api/init_config.rst:530 +#: ../../c-api/init_config.rst:231 ../../c-api/init_config.rst:540 msgid "Structure fields:" msgstr "" @@ -150,246 +150,246 @@ msgstr "錯誤訊息。" msgid "Name of the function which created an error, can be ``NULL``." msgstr "" -#: ../../c-api/init_config.rst:138 +#: ../../c-api/init_config.rst:140 msgid "Functions to create a status:" msgstr "" -#: ../../c-api/init_config.rst:142 +#: ../../c-api/init_config.rst:144 msgid "Success." msgstr "" -#: ../../c-api/init_config.rst:146 +#: ../../c-api/init_config.rst:148 msgid "Initialization error with a message." msgstr "" -#: ../../c-api/init_config.rst:148 +#: ../../c-api/init_config.rst:150 msgid "*err_msg* must not be ``NULL``." msgstr "*err_msg* 不可為 ``NULL``。" -#: ../../c-api/init_config.rst:152 +#: ../../c-api/init_config.rst:154 msgid "Memory allocation failure (out of memory)." msgstr "" -#: ../../c-api/init_config.rst:156 +#: ../../c-api/init_config.rst:158 msgid "Exit Python with the specified exit code." msgstr "" -#: ../../c-api/init_config.rst:158 +#: ../../c-api/init_config.rst:160 msgid "Functions to handle a status:" msgstr "" -#: ../../c-api/init_config.rst:162 +#: ../../c-api/init_config.rst:164 msgid "" "Is the status an error or an exit? If true, the exception must be handled; " "by calling :c:func:`Py_ExitStatusException` for example." msgstr "" -#: ../../c-api/init_config.rst:167 +#: ../../c-api/init_config.rst:169 msgid "Is the result an error?" msgstr "" -#: ../../c-api/init_config.rst:171 +#: ../../c-api/init_config.rst:173 msgid "Is the result an exit?" msgstr "" -#: ../../c-api/init_config.rst:175 +#: ../../c-api/init_config.rst:177 msgid "" "Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " "exit with a non-zero exit code if *status* is an error. Must only be called " "if ``PyStatus_Exception(status)`` is non-zero." msgstr "" -#: ../../c-api/init_config.rst:180 +#: ../../c-api/init_config.rst:182 msgid "" "Internally, Python uses macros which set ``PyStatus.func``, whereas " "functions to create a status set ``func`` to ``NULL``." msgstr "" -#: ../../c-api/init_config.rst:183 +#: ../../c-api/init_config.rst:185 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../c-api/init_config.rst:207 +#: ../../c-api/init_config.rst:209 msgid "PyPreConfig" msgstr "PyPreConfig" -#: ../../c-api/init_config.rst:211 +#: ../../c-api/init_config.rst:213 msgid "Structure used to preinitialize Python." msgstr "" -#: ../../c-api/init_config.rst:213 +#: ../../c-api/init_config.rst:217 msgid "Function to initialize a preconfiguration:" msgstr "" -#: ../../c-api/init_config.rst:217 +#: ../../c-api/init_config.rst:221 msgid "" "Initialize the preconfiguration with :ref:`Python Configuration `." msgstr "" -#: ../../c-api/init_config.rst:222 +#: ../../c-api/init_config.rst:226 msgid "" "Initialize the preconfiguration with :ref:`Isolated Configuration `." msgstr "" -#: ../../c-api/init_config.rst:229 +#: ../../c-api/init_config.rst:235 msgid "Name of the Python memory allocators:" msgstr "" -#: ../../c-api/init_config.rst:231 +#: ../../c-api/init_config.rst:237 msgid "" "``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " "defaults)." msgstr "" -#: ../../c-api/init_config.rst:233 +#: ../../c-api/init_config.rst:239 msgid "" "``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " "`." msgstr "" -#: ../../c-api/init_config.rst:235 +#: ../../c-api/init_config.rst:241 msgid "" "``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." msgstr "" -#: ../../c-api/init_config.rst:238 +#: ../../c-api/init_config.rst:244 msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." msgstr "" -#: ../../c-api/init_config.rst:239 +#: ../../c-api/init_config.rst:245 msgid "" "``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" "ref:`debug hooks `." msgstr "" -#: ../../c-api/init_config.rst:241 +#: ../../c-api/init_config.rst:247 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " "`." msgstr "" -#: ../../c-api/init_config.rst:243 +#: ../../c-api/init_config.rst:249 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " "allocator ` with :ref:`debug hooks `." msgstr "" -#: ../../c-api/init_config.rst:247 +#: ../../c-api/init_config.rst:253 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " "supported if Python is :option:`configured using --without-pymalloc <--" "without-pymalloc>`." msgstr "" -#: ../../c-api/init_config.rst:251 +#: ../../c-api/init_config.rst:257 msgid "See :ref:`Memory Management `." msgstr "請見\\ :ref:`記憶體管理 `\\ 。" -#: ../../c-api/init_config.rst:253 +#: ../../c-api/init_config.rst:259 msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "預設:\\ ``PYMEM_ALLOCATOR_NOT_SET``\\ 。" -#: ../../c-api/init_config.rst:257 +#: ../../c-api/init_config.rst:263 msgid "Set the LC_CTYPE locale to the user preferred locale." msgstr "" -#: ../../c-api/init_config.rst:259 +#: ../../c-api/init_config.rst:265 msgid "" "If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:" "member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." msgstr "" -#: ../../c-api/init_config.rst:262 ../../c-api/init_config.rst:273 +#: ../../c-api/init_config.rst:268 ../../c-api/init_config.rst:279 msgid "See the :term:`locale encoding`." msgstr "請見 :term:`locale encoding`\\ 。" -#: ../../c-api/init_config.rst:264 ../../c-api/init_config.rst:319 -#: ../../c-api/init_config.rst:670 +#: ../../c-api/init_config.rst:270 ../../c-api/init_config.rst:325 +#: ../../c-api/init_config.rst:680 msgid "Default: ``1`` in Python config, ``0`` in isolated config." msgstr "" -#: ../../c-api/init_config.rst:268 +#: ../../c-api/init_config.rst:274 msgid "If equals to ``2``, coerce the C locale." msgstr "" -#: ../../c-api/init_config.rst:270 +#: ../../c-api/init_config.rst:276 msgid "" "If equals to ``1``, read the LC_CTYPE locale to decide if it should be " "coerced." msgstr "" -#: ../../c-api/init_config.rst:275 ../../c-api/init_config.rst:281 +#: ../../c-api/init_config.rst:281 ../../c-api/init_config.rst:287 msgid "Default: ``-1`` in Python config, ``0`` in isolated config." msgstr "" -#: ../../c-api/init_config.rst:279 +#: ../../c-api/init_config.rst:285 msgid "If non-zero, emit a warning if the C locale is coerced." msgstr "" -#: ../../c-api/init_config.rst:285 +#: ../../c-api/init_config.rst:291 msgid "" ":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." msgstr "" -#: ../../c-api/init_config.rst:288 ../../c-api/init_config.rst:679 -#: ../../c-api/init_config.rst:721 ../../c-api/init_config.rst:1174 +#: ../../c-api/init_config.rst:294 ../../c-api/init_config.rst:689 +#: ../../c-api/init_config.rst:731 ../../c-api/init_config.rst:1184 msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: ../../c-api/init_config.rst:292 +#: ../../c-api/init_config.rst:298 msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" -#: ../../c-api/init_config.rst:294 ../../c-api/init_config.rst:866 +#: ../../c-api/init_config.rst:300 ../../c-api/init_config.rst:876 msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" -#: ../../c-api/init_config.rst:298 +#: ../../c-api/init_config.rst:304 msgid "If non-zero:" msgstr "如果不為 0:" -#: ../../c-api/init_config.rst:300 +#: ../../c-api/init_config.rst:306 msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," msgstr "將 :c:member:`PyPreConfig.utf8_mode` 設為 ``0``\\ 、" -#: ../../c-api/init_config.rst:301 +#: ../../c-api/init_config.rst:307 msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," msgstr "將 :c:member:`PyConfig.filesystem_encoding` 設為 ``\"mbcs\"``\\ 、" -#: ../../c-api/init_config.rst:302 +#: ../../c-api/init_config.rst:308 msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." msgstr "將 :c:member:`PyConfig.filesystem_errors` 設為 ``\"replace\"``\\ 。" -#: ../../c-api/init_config.rst:304 +#: ../../c-api/init_config.rst:310 msgid "" "Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " "variable value." msgstr "" -#: ../../c-api/init_config.rst:307 ../../c-api/init_config.rst:880 +#: ../../c-api/init_config.rst:313 ../../c-api/init_config.rst:890 msgid "" "Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " "Windows specific code." msgstr "" -#: ../../c-api/init_config.rst:310 ../../c-api/init_config.rst:618 -#: ../../c-api/init_config.rst:625 ../../c-api/init_config.rst:692 -#: ../../c-api/init_config.rst:801 ../../c-api/init_config.rst:815 -#: ../../c-api/init_config.rst:829 ../../c-api/init_config.rst:883 -#: ../../c-api/init_config.rst:897 ../../c-api/init_config.rst:957 -#: ../../c-api/init_config.rst:1009 ../../c-api/init_config.rst:1069 -#: ../../c-api/init_config.rst:1109 ../../c-api/init_config.rst:1138 -#: ../../c-api/init_config.rst:1225 +#: ../../c-api/init_config.rst:316 ../../c-api/init_config.rst:628 +#: ../../c-api/init_config.rst:635 ../../c-api/init_config.rst:702 +#: ../../c-api/init_config.rst:811 ../../c-api/init_config.rst:825 +#: ../../c-api/init_config.rst:839 ../../c-api/init_config.rst:893 +#: ../../c-api/init_config.rst:907 ../../c-api/init_config.rst:967 +#: ../../c-api/init_config.rst:1019 ../../c-api/init_config.rst:1079 +#: ../../c-api/init_config.rst:1119 ../../c-api/init_config.rst:1148 +#: ../../c-api/init_config.rst:1235 msgid "Default: ``0``." msgstr "預設:\\ ``0``。" -#: ../../c-api/init_config.rst:314 +#: ../../c-api/init_config.rst:320 msgid "" "If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" "`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " @@ -397,95 +397,95 @@ msgid "" "Arguments `." msgstr "" -#: ../../c-api/init_config.rst:323 +#: ../../c-api/init_config.rst:329 msgid "" "Use :ref:`environment variables `? See :c:member:`PyConfig." "use_environment`." msgstr "" -#: ../../c-api/init_config.rst:326 ../../c-api/init_config.rst:1199 +#: ../../c-api/init_config.rst:332 ../../c-api/init_config.rst:1209 msgid "Default: ``1`` in Python config and ``0`` in isolated config." msgstr "" -#: ../../c-api/init_config.rst:330 +#: ../../c-api/init_config.rst:336 msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../c-api/init_config.rst:332 +#: ../../c-api/init_config.rst:338 msgid "" "Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " "the :envvar:`PYTHONUTF8` environment variable." msgstr "" -#: ../../c-api/init_config.rst:335 +#: ../../c-api/init_config.rst:341 msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." msgstr "" -#: ../../c-api/init_config.rst:337 +#: ../../c-api/init_config.rst:343 msgid "Default: ``-1`` in Python config and ``0`` in isolated config." msgstr "" -#: ../../c-api/init_config.rst:343 +#: ../../c-api/init_config.rst:349 msgid "Preinitialize Python with PyPreConfig" msgstr "" -#: ../../c-api/init_config.rst:345 +#: ../../c-api/init_config.rst:351 msgid "The preinitialization of Python:" msgstr "" -#: ../../c-api/init_config.rst:347 +#: ../../c-api/init_config.rst:353 msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" msgstr "" -#: ../../c-api/init_config.rst:348 +#: ../../c-api/init_config.rst:354 msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" msgstr "" -#: ../../c-api/init_config.rst:349 +#: ../../c-api/init_config.rst:355 msgid "" "Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." "utf8_mode`)" msgstr "" -#: ../../c-api/init_config.rst:352 +#: ../../c-api/init_config.rst:358 msgid "" "The current preconfiguration (``PyPreConfig`` type) is stored in " "``_PyRuntime.preconfig``." msgstr "" -#: ../../c-api/init_config.rst:355 +#: ../../c-api/init_config.rst:361 msgid "Functions to preinitialize Python:" msgstr "" -#: ../../c-api/init_config.rst:359 ../../c-api/init_config.rst:365 -#: ../../c-api/init_config.rst:374 +#: ../../c-api/init_config.rst:365 ../../c-api/init_config.rst:371 +#: ../../c-api/init_config.rst:380 msgid "Preinitialize Python from *preconfig* preconfiguration." msgstr "" -#: ../../c-api/init_config.rst:361 ../../c-api/init_config.rst:370 -#: ../../c-api/init_config.rst:379 +#: ../../c-api/init_config.rst:367 ../../c-api/init_config.rst:376 +#: ../../c-api/init_config.rst:385 msgid "*preconfig* must not be ``NULL``." msgstr "*preconfig* 不可為 ``NULL``。" -#: ../../c-api/init_config.rst:367 +#: ../../c-api/init_config.rst:373 msgid "" "Parse *argv* command line arguments (bytes strings) if :c:member:" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: ../../c-api/init_config.rst:376 +#: ../../c-api/init_config.rst:382 msgid "" "Parse *argv* command line arguments (wide strings) if :c:member:" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: ../../c-api/init_config.rst:381 ../../c-api/init_config.rst:1287 +#: ../../c-api/init_config.rst:387 ../../c-api/init_config.rst:1297 msgid "" "The caller is responsible to handle exceptions (error or exit) using :c:func:" "`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." msgstr "" -#: ../../c-api/init_config.rst:384 +#: ../../c-api/init_config.rst:390 msgid "" "For :ref:`Python Configuration ` (:c:func:" "`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " @@ -495,7 +495,7 @@ msgid "" "`Python UTF-8 Mode `." msgstr "" -#: ../../c-api/init_config.rst:391 +#: ../../c-api/init_config.rst:397 msgid "" "``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " "before :c:func:`Py_InitializeFromConfig` to install a custom memory " @@ -503,7 +503,7 @@ msgid "" "`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" -#: ../../c-api/init_config.rst:396 +#: ../../c-api/init_config.rst:402 msgid "" "Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " "be used before the Python preinitialization, whereas calling directly " @@ -511,90 +511,90 @@ msgid "" "not be called before the Python preinitialization." msgstr "" -#: ../../c-api/init_config.rst:401 +#: ../../c-api/init_config.rst:407 msgid "" "Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " "`::" msgstr "" -#: ../../c-api/init_config.rst:423 +#: ../../c-api/init_config.rst:429 msgid "PyConfig" msgstr "PyConfig" -#: ../../c-api/init_config.rst:427 +#: ../../c-api/init_config.rst:433 msgid "Structure containing most parameters to configure Python." msgstr "" -#: ../../c-api/init_config.rst:429 +#: ../../c-api/init_config.rst:435 msgid "" "When done, the :c:func:`PyConfig_Clear` function must be used to release the " "configuration memory." msgstr "" -#: ../../c-api/init_config.rst:432 +#: ../../c-api/init_config.rst:440 msgid "Structure methods:" msgstr "" -#: ../../c-api/init_config.rst:436 +#: ../../c-api/init_config.rst:444 msgid "" "Initialize configuration with the :ref:`Python Configuration `." msgstr "" -#: ../../c-api/init_config.rst:441 +#: ../../c-api/init_config.rst:449 msgid "" "Initialize configuration with the :ref:`Isolated Configuration `." msgstr "" -#: ../../c-api/init_config.rst:446 +#: ../../c-api/init_config.rst:454 msgid "Copy the wide character string *str* into ``*config_str``." msgstr "" -#: ../../c-api/init_config.rst:448 ../../c-api/init_config.rst:455 -#: ../../c-api/init_config.rst:462 ../../c-api/init_config.rst:470 -#: ../../c-api/init_config.rst:476 ../../c-api/init_config.rst:493 +#: ../../c-api/init_config.rst:456 ../../c-api/init_config.rst:463 +#: ../../c-api/init_config.rst:470 ../../c-api/init_config.rst:478 +#: ../../c-api/init_config.rst:484 ../../c-api/init_config.rst:501 msgid ":ref:`Preinitialize Python ` if needed." msgstr "" -#: ../../c-api/init_config.rst:452 +#: ../../c-api/init_config.rst:460 msgid "" "Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " "``*config_str``." msgstr "" -#: ../../c-api/init_config.rst:459 +#: ../../c-api/init_config.rst:467 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " "from the *argv* list of wide character strings." msgstr "" -#: ../../c-api/init_config.rst:466 +#: ../../c-api/init_config.rst:474 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " "from the *argv* list of bytes strings. Decode bytes using :c:func:" "`Py_DecodeLocale`." msgstr "" -#: ../../c-api/init_config.rst:474 +#: ../../c-api/init_config.rst:482 msgid "Set the list of wide strings *list* to *length* and *items*." msgstr "" -#: ../../c-api/init_config.rst:480 +#: ../../c-api/init_config.rst:488 msgid "Read all Python configuration." msgstr "" -#: ../../c-api/init_config.rst:482 +#: ../../c-api/init_config.rst:490 msgid "Fields which are already initialized are left unchanged." msgstr "" -#: ../../c-api/init_config.rst:484 +#: ../../c-api/init_config.rst:492 msgid "" "Fields for :ref:`path configuration ` are no longer " "calculated or modified when calling this function, as of Python 3.11." msgstr "" -#: ../../c-api/init_config.rst:487 ../../c-api/init_config.rst:986 +#: ../../c-api/init_config.rst:495 ../../c-api/init_config.rst:996 msgid "" "The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " "arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " @@ -603,25 +603,25 @@ msgid "" "as Python options." msgstr "" -#: ../../c-api/init_config.rst:495 +#: ../../c-api/init_config.rst:503 msgid "" "The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" "`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " "arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." msgstr "" -#: ../../c-api/init_config.rst:501 +#: ../../c-api/init_config.rst:509 msgid "" ":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " "under :ref:`Python Path Configuration ` may no longer be " "updated until :c:func:`Py_InitializeFromConfig` is called." msgstr "" -#: ../../c-api/init_config.rst:509 +#: ../../c-api/init_config.rst:517 msgid "Release configuration memory." msgstr "" -#: ../../c-api/init_config.rst:511 +#: ../../c-api/init_config.rst:519 msgid "" "Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " "In that case, the Python preinitialization configuration (:c:type:" @@ -630,436 +630,436 @@ msgid "" "before calling a :c:type:`PyConfig` method:" msgstr "" -#: ../../c-api/init_config.rst:517 +#: ../../c-api/init_config.rst:525 msgid ":c:member:`PyConfig.dev_mode`" msgstr ":c:member:`PyConfig.dev_mode`" -#: ../../c-api/init_config.rst:518 +#: ../../c-api/init_config.rst:526 msgid ":c:member:`PyConfig.isolated`" msgstr ":c:member:`PyConfig.isolated`" -#: ../../c-api/init_config.rst:519 +#: ../../c-api/init_config.rst:527 msgid ":c:member:`PyConfig.parse_argv`" msgstr ":c:member:`PyConfig.parse_argv`" -#: ../../c-api/init_config.rst:520 +#: ../../c-api/init_config.rst:528 msgid ":c:member:`PyConfig.use_environment`" msgstr ":c:member:`PyConfig.use_environment`" -#: ../../c-api/init_config.rst:522 +#: ../../c-api/init_config.rst:530 msgid "" "Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " "is used, this method must be called before other methods, since the " "preinitialization configuration depends on command line arguments (if :c:" -"member:`parse_argv` is non-zero)." +"member:`~PyConfig.parse_argv` is non-zero)." msgstr "" -#: ../../c-api/init_config.rst:527 +#: ../../c-api/init_config.rst:535 msgid "" "The caller of these methods is responsible to handle exceptions (error or " "exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." msgstr "" -#: ../../c-api/init_config.rst:534 +#: ../../c-api/init_config.rst:544 msgid "Command line arguments: :data:`sys.argv`." msgstr "" -#: ../../c-api/init_config.rst:536 +#: ../../c-api/init_config.rst:546 msgid "" "Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." "argv` the same way the regular Python parses Python command line arguments " "and then to strip Python arguments from :c:member:`~PyConfig.argv`." msgstr "" -#: ../../c-api/init_config.rst:541 +#: ../../c-api/init_config.rst:551 msgid "" "If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " "that :data:`sys.argv` always exists and is never empty." msgstr "" -#: ../../c-api/init_config.rst:544 ../../c-api/init_config.rst:571 -#: ../../c-api/init_config.rst:583 ../../c-api/init_config.rst:591 -#: ../../c-api/init_config.rst:699 ../../c-api/init_config.rst:708 -#: ../../c-api/init_config.rst:790 ../../c-api/init_config.rst:927 -#: ../../c-api/init_config.rst:1028 ../../c-api/init_config.rst:1046 -#: ../../c-api/init_config.rst:1060 ../../c-api/init_config.rst:1077 -#: ../../c-api/init_config.rst:1090 ../../c-api/init_config.rst:1098 +#: ../../c-api/init_config.rst:554 ../../c-api/init_config.rst:581 +#: ../../c-api/init_config.rst:593 ../../c-api/init_config.rst:601 +#: ../../c-api/init_config.rst:709 ../../c-api/init_config.rst:718 +#: ../../c-api/init_config.rst:800 ../../c-api/init_config.rst:937 +#: ../../c-api/init_config.rst:1038 ../../c-api/init_config.rst:1056 +#: ../../c-api/init_config.rst:1070 ../../c-api/init_config.rst:1087 +#: ../../c-api/init_config.rst:1100 ../../c-api/init_config.rst:1108 msgid "Default: ``NULL``." msgstr "預設值:\\ ``NULL``\\ 。" -#: ../../c-api/init_config.rst:546 +#: ../../c-api/init_config.rst:556 msgid "See also the :c:member:`~PyConfig.orig_argv` member." msgstr "" -#: ../../c-api/init_config.rst:550 +#: ../../c-api/init_config.rst:560 msgid "" "If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" "data:`sys.path` at startup:" msgstr "" -#: ../../c-api/init_config.rst:553 +#: ../../c-api/init_config.rst:563 msgid "" "If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " "module``), prepend the current working directory." msgstr "" -#: ../../c-api/init_config.rst:555 +#: ../../c-api/init_config.rst:565 msgid "" "If running a script (``python script.py``), prepend the script's directory. " "If it's a symbolic link, resolve symbolic links." msgstr "" -#: ../../c-api/init_config.rst:557 +#: ../../c-api/init_config.rst:567 msgid "" "Otherwise (``python -c code`` and ``python``), prepend an empty string, " "which means the current working directory." msgstr "" -#: ../../c-api/init_config.rst:560 +#: ../../c-api/init_config.rst:570 msgid "" "Set to ``1`` by the :option:`-P` command line option and the :envvar:" "`PYTHONSAFEPATH` environment variable." msgstr "" -#: ../../c-api/init_config.rst:563 +#: ../../c-api/init_config.rst:573 msgid "Default: ``0`` in Python config, ``1`` in isolated config." msgstr "" -#: ../../c-api/init_config.rst:569 +#: ../../c-api/init_config.rst:579 msgid ":data:`sys.base_exec_prefix`." msgstr ":data:`sys.base_exec_prefix`\\ 。" -#: ../../c-api/init_config.rst:573 ../../c-api/init_config.rst:585 -#: ../../c-api/init_config.rst:593 ../../c-api/init_config.rst:701 -#: ../../c-api/init_config.rst:710 ../../c-api/init_config.rst:944 -#: ../../c-api/init_config.rst:1030 +#: ../../c-api/init_config.rst:583 ../../c-api/init_config.rst:595 +#: ../../c-api/init_config.rst:603 ../../c-api/init_config.rst:711 +#: ../../c-api/init_config.rst:720 ../../c-api/init_config.rst:954 +#: ../../c-api/init_config.rst:1040 msgid "Part of the :ref:`Python Path Configuration ` output." msgstr "" -#: ../../c-api/init_config.rst:577 +#: ../../c-api/init_config.rst:587 msgid "Python base executable: :data:`sys._base_executable`." msgstr "" -#: ../../c-api/init_config.rst:579 +#: ../../c-api/init_config.rst:589 msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." msgstr "" -#: ../../c-api/init_config.rst:581 +#: ../../c-api/init_config.rst:591 msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." msgstr "" -#: ../../c-api/init_config.rst:589 +#: ../../c-api/init_config.rst:599 msgid ":data:`sys.base_prefix`." msgstr ":data:`sys.base_prefix`\\ 。" -#: ../../c-api/init_config.rst:597 +#: ../../c-api/init_config.rst:607 msgid "" "If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " "disable buffering on the C streams stdout and stderr." msgstr "" -#: ../../c-api/init_config.rst:600 +#: ../../c-api/init_config.rst:610 msgid "" "Set to ``0`` by the :option:`-u` command line option and the :envvar:" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../c-api/init_config.rst:603 +#: ../../c-api/init_config.rst:613 msgid "stdin is always opened in buffered mode." msgstr "" -#: ../../c-api/init_config.rst:605 ../../c-api/init_config.rst:638 -#: ../../c-api/init_config.rst:1126 ../../c-api/init_config.rst:1257 +#: ../../c-api/init_config.rst:615 ../../c-api/init_config.rst:648 +#: ../../c-api/init_config.rst:1136 ../../c-api/init_config.rst:1267 msgid "Default: ``1``." msgstr "預設值:\\ ``1``\\ 。" -#: ../../c-api/init_config.rst:609 +#: ../../c-api/init_config.rst:619 msgid "" "If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:" "`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." msgstr "" -#: ../../c-api/init_config.rst:613 +#: ../../c-api/init_config.rst:623 msgid "" "If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " "cases." msgstr "" -#: ../../c-api/init_config.rst:616 +#: ../../c-api/init_config.rst:626 msgid "Incremented by the :option:`-b` command line option." msgstr "" -#: ../../c-api/init_config.rst:622 +#: ../../c-api/init_config.rst:632 msgid "" "If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." "TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " "details." msgstr "" -#: ../../c-api/init_config.rst:631 +#: ../../c-api/init_config.rst:641 msgid "" "If equals to ``0``, disables the inclusion of the end line and column " "mappings in code objects. Also disables traceback printing carets to " "specific error locations." msgstr "" -#: ../../c-api/init_config.rst:635 +#: ../../c-api/init_config.rst:645 msgid "" "Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " "by the :option:`-X no_debug_ranges <-X>` command line option." msgstr "" -#: ../../c-api/init_config.rst:644 +#: ../../c-api/init_config.rst:654 msgid "" "Control the validation behavior of hash-based ``.pyc`` files: value of the :" "option:`--check-hash-based-pycs` command line option." msgstr "" -#: ../../c-api/init_config.rst:647 +#: ../../c-api/init_config.rst:657 msgid "Valid values:" msgstr "" -#: ../../c-api/init_config.rst:649 +#: ../../c-api/init_config.rst:659 msgid "" "``L\"always\"``: Hash the source file for invalidation regardless of value " "of the 'check_source' flag." msgstr "" -#: ../../c-api/init_config.rst:651 +#: ../../c-api/init_config.rst:661 msgid "``L\"never\"``: Assume that hash-based pycs always are valid." msgstr "" -#: ../../c-api/init_config.rst:652 +#: ../../c-api/init_config.rst:662 msgid "" "``L\"default\"``: The 'check_source' flag in hash-based pycs determines " "invalidation." msgstr "" -#: ../../c-api/init_config.rst:655 +#: ../../c-api/init_config.rst:665 msgid "Default: ``L\"default\"``." msgstr "預設:\\ ``L\"default\"``。" -#: ../../c-api/init_config.rst:657 +#: ../../c-api/init_config.rst:667 msgid "See also :pep:`552` \"Deterministic pycs\"." msgstr "" -#: ../../c-api/init_config.rst:661 +#: ../../c-api/init_config.rst:671 msgid "If non-zero, configure C standard streams:" msgstr "" -#: ../../c-api/init_config.rst:663 +#: ../../c-api/init_config.rst:673 msgid "" "On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." msgstr "" -#: ../../c-api/init_config.rst:665 +#: ../../c-api/init_config.rst:675 msgid "" "If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " "stdin, stdout and stderr streams." msgstr "" -#: ../../c-api/init_config.rst:667 +#: ../../c-api/init_config.rst:677 msgid "" "If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " "stdin and stdout (only stdout on Windows)." msgstr "" -#: ../../c-api/init_config.rst:674 +#: ../../c-api/init_config.rst:684 msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" -#: ../../c-api/init_config.rst:676 +#: ../../c-api/init_config.rst:686 msgid "" "Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" "`PYTHONDEVMODE` environment variable." msgstr "" -#: ../../c-api/init_config.rst:683 +#: ../../c-api/init_config.rst:693 msgid "Dump Python references?" msgstr "" -#: ../../c-api/init_config.rst:685 +#: ../../c-api/init_config.rst:695 msgid "If non-zero, dump all objects which are still alive at exit." msgstr "" -#: ../../c-api/init_config.rst:687 +#: ../../c-api/init_config.rst:697 msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: ../../c-api/init_config.rst:689 +#: ../../c-api/init_config.rst:699 msgid "" "Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: see " "the :option:`configure --with-trace-refs option <--with-trace-refs>`." msgstr "" -#: ../../c-api/init_config.rst:696 +#: ../../c-api/init_config.rst:706 msgid "" "The site-specific directory prefix where the platform-dependent Python files " "are installed: :data:`sys.exec_prefix`." msgstr "" -#: ../../c-api/init_config.rst:705 +#: ../../c-api/init_config.rst:715 msgid "" "The absolute path of the executable binary for the Python interpreter: :data:" "`sys.executable`." msgstr "" -#: ../../c-api/init_config.rst:714 +#: ../../c-api/init_config.rst:724 msgid "Enable faulthandler?" msgstr "" -#: ../../c-api/init_config.rst:716 +#: ../../c-api/init_config.rst:726 msgid "If non-zero, call :func:`faulthandler.enable` at startup." msgstr "" -#: ../../c-api/init_config.rst:718 +#: ../../c-api/init_config.rst:728 msgid "" "Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" "`PYTHONFAULTHANDLER` environment variable." msgstr "" -#: ../../c-api/init_config.rst:725 +#: ../../c-api/init_config.rst:735 msgid "" ":term:`Filesystem encoding `: :func:" "`sys.getfilesystemencoding`." msgstr "" -#: ../../c-api/init_config.rst:728 +#: ../../c-api/init_config.rst:738 msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." msgstr "" -#: ../../c-api/init_config.rst:730 +#: ../../c-api/init_config.rst:740 msgid "" "On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" "`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" "zero." msgstr "" -#: ../../c-api/init_config.rst:734 +#: ../../c-api/init_config.rst:744 msgid "Default encoding on other platforms:" msgstr "" -#: ../../c-api/init_config.rst:736 +#: ../../c-api/init_config.rst:746 msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: ../../c-api/init_config.rst:737 +#: ../../c-api/init_config.rst:747 msgid "" "``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " "ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " "encoding (usually Latin1)." msgstr "" -#: ../../c-api/init_config.rst:740 +#: ../../c-api/init_config.rst:750 msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" -#: ../../c-api/init_config.rst:741 +#: ../../c-api/init_config.rst:751 msgid "" "Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" -#: ../../c-api/init_config.rst:744 +#: ../../c-api/init_config.rst:754 msgid "" "At Python startup, the encoding name is normalized to the Python codec name. " "For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." msgstr "" -#: ../../c-api/init_config.rst:747 +#: ../../c-api/init_config.rst:757 msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" -#: ../../c-api/init_config.rst:751 +#: ../../c-api/init_config.rst:761 msgid "" ":term:`Filesystem error handler `: :" "func:`sys.getfilesystemencodeerrors`." msgstr "" -#: ../../c-api/init_config.rst:754 +#: ../../c-api/init_config.rst:764 msgid "" "On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" "member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " "non-zero." msgstr "" -#: ../../c-api/init_config.rst:758 +#: ../../c-api/init_config.rst:768 msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" -#: ../../c-api/init_config.rst:760 +#: ../../c-api/init_config.rst:770 msgid "Supported error handlers:" msgstr "" -#: ../../c-api/init_config.rst:762 +#: ../../c-api/init_config.rst:772 msgid "``\"strict\"``" msgstr "``\"strict\"``" -#: ../../c-api/init_config.rst:763 +#: ../../c-api/init_config.rst:773 msgid "``\"surrogateescape\"``" msgstr "``\"surrogateescape\"``" -#: ../../c-api/init_config.rst:764 +#: ../../c-api/init_config.rst:774 msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" -#: ../../c-api/init_config.rst:766 +#: ../../c-api/init_config.rst:776 msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" -#: ../../c-api/init_config.rst:771 +#: ../../c-api/init_config.rst:781 msgid "Randomized hash function seed." msgstr "" -#: ../../c-api/init_config.rst:773 +#: ../../c-api/init_config.rst:783 msgid "" "If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " "Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." msgstr "" -#: ../../c-api/init_config.rst:776 +#: ../../c-api/init_config.rst:786 msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" -#: ../../c-api/init_config.rst:778 +#: ../../c-api/init_config.rst:788 msgid "" "Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: ../../c-api/init_config.rst:783 +#: ../../c-api/init_config.rst:793 msgid "Python home directory." msgstr "" -#: ../../c-api/init_config.rst:785 +#: ../../c-api/init_config.rst:795 msgid "" "If :c:func:`Py_SetPythonHome` has been called, use its argument if it is not " "``NULL``." msgstr "" -#: ../../c-api/init_config.rst:788 +#: ../../c-api/init_config.rst:798 msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" -#: ../../c-api/init_config.rst:792 ../../c-api/init_config.rst:909 -#: ../../c-api/init_config.rst:929 ../../c-api/init_config.rst:1018 -#: ../../c-api/init_config.rst:1048 +#: ../../c-api/init_config.rst:802 ../../c-api/init_config.rst:919 +#: ../../c-api/init_config.rst:939 ../../c-api/init_config.rst:1028 +#: ../../c-api/init_config.rst:1058 msgid "Part of the :ref:`Python Path Configuration ` input." msgstr "" -#: ../../c-api/init_config.rst:796 +#: ../../c-api/init_config.rst:806 msgid "If non-zero, profile import time." msgstr "" -#: ../../c-api/init_config.rst:798 +#: ../../c-api/init_config.rst:808 msgid "" "Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:" "`PYTHONPROFILEIMPORTTIME` environment variable." msgstr "" -#: ../../c-api/init_config.rst:805 +#: ../../c-api/init_config.rst:815 msgid "Enter interactive mode after executing a script or a command." msgstr "" -#: ../../c-api/init_config.rst:807 +#: ../../c-api/init_config.rst:817 msgid "" "If greater than ``0``, enable inspect: when a script is passed as first " "argument or the -c option is used, enter interactive mode after executing " @@ -1067,30 +1067,30 @@ msgid "" "a terminal." msgstr "" -#: ../../c-api/init_config.rst:812 +#: ../../c-api/init_config.rst:822 msgid "" "Incremented by the :option:`-i` command line option. Set to ``1`` if the :" "envvar:`PYTHONINSPECT` environment variable is non-empty." msgstr "" -#: ../../c-api/init_config.rst:819 +#: ../../c-api/init_config.rst:829 msgid "Install Python signal handlers?" msgstr "" -#: ../../c-api/init_config.rst:821 ../../c-api/init_config.rst:992 -#: ../../c-api/init_config.rst:1016 ../../c-api/init_config.rst:1209 +#: ../../c-api/init_config.rst:831 ../../c-api/init_config.rst:1002 +#: ../../c-api/init_config.rst:1026 ../../c-api/init_config.rst:1219 msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: ../../c-api/init_config.rst:825 +#: ../../c-api/init_config.rst:835 msgid "If greater than ``0``, enable the interactive mode (REPL)." msgstr "" -#: ../../c-api/init_config.rst:827 +#: ../../c-api/init_config.rst:837 msgid "Incremented by the :option:`-i` command line option." msgstr "" -#: ../../c-api/init_config.rst:833 +#: ../../c-api/init_config.rst:843 msgid "" "Configures the :ref:`integer string conversion length limitation " "`. An initial value of ``-1`` means the value will be " @@ -1100,30 +1100,30 @@ msgid "" "str_digits_check_threshold`) are unsupported and will produce an error." msgstr "" -#: ../../c-api/init_config.rst:841 +#: ../../c-api/init_config.rst:851 msgid "" "Configured by the :option:`-X int_max_str_digits <-X>` command line flag or " "the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable." msgstr "" -#: ../../c-api/init_config.rst:844 +#: ../../c-api/init_config.rst:854 msgid "" "Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info." "default_max_str_digits`) in isolated mode." msgstr "" -#: ../../c-api/init_config.rst:851 +#: ../../c-api/init_config.rst:861 msgid "If greater than ``0``, enable isolated mode:" msgstr "" -#: ../../c-api/init_config.rst:853 +#: ../../c-api/init_config.rst:863 msgid "" "Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " "unsafe path to :data:`sys.path` at Python startup, such as the current " "directory, the script's directory or an empty string." msgstr "" -#: ../../c-api/init_config.rst:857 +#: ../../c-api/init_config.rst:867 msgid "" "Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` " "environment variables." @@ -1131,76 +1131,77 @@ msgstr "" "將 :c:member:`~PyConfig.use_environment` 設定為 ``0``:忽略 ``PYTHON`` 環境變" "數。" -#: ../../c-api/init_config.rst:859 +#: ../../c-api/init_config.rst:869 msgid "" "Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " "site directory to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:861 +#: ../../c-api/init_config.rst:871 msgid "" "Python REPL doesn't import :mod:`readline` nor enable default readline " "configuration on interactive prompts." msgstr "" -#: ../../c-api/init_config.rst:864 +#: ../../c-api/init_config.rst:874 msgid "Set to ``1`` by the :option:`-I` command line option." msgstr "" -#: ../../c-api/init_config.rst:868 +#: ../../c-api/init_config.rst:878 msgid "" "See also the :ref:`Isolated Configuration ` and :c:" "member:`PyPreConfig.isolated`." msgstr "" -#: ../../c-api/init_config.rst:873 +#: ../../c-api/init_config.rst:883 msgid "" -"If non-zero, use :class:`io.FileIO` instead of :class:`io.WindowsConsoleIO` " -"for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`." +"If non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys." +"stderr`." msgstr "" -#: ../../c-api/init_config.rst:877 +#: ../../c-api/init_config.rst:887 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " "is set to a non-empty string." msgstr "" -#: ../../c-api/init_config.rst:885 +#: ../../c-api/init_config.rst:895 msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." msgstr "" -#: ../../c-api/init_config.rst:889 +#: ../../c-api/init_config.rst:899 msgid "" "If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " "` at exit." msgstr "" -#: ../../c-api/init_config.rst:892 +#: ../../c-api/init_config.rst:902 msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" -#: ../../c-api/init_config.rst:894 +#: ../../c-api/init_config.rst:904 msgid "" "The option is ignored if Python is :option:`configured using the --without-" "pymalloc option <--without-pymalloc>`." msgstr "" -#: ../../c-api/init_config.rst:901 +#: ../../c-api/init_config.rst:911 msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" -#: ../../c-api/init_config.rst:903 +#: ../../c-api/init_config.rst:913 msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" -#: ../../c-api/init_config.rst:905 +#: ../../c-api/init_config.rst:915 msgid "" "Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" "`configure --with-platlibdir option <--with-platlibdir>` (default: " "``\"lib\"``, or ``\"DLLs\"`` on Windows)." msgstr "" -#: ../../c-api/init_config.rst:913 +#: ../../c-api/init_config.rst:923 msgid "" "This macro is now used on Windows to locate the standard library extension " "modules, typically under ``DLLs``. However, for compatibility, note that " @@ -1208,21 +1209,21 @@ msgid "" "and virtual environments." msgstr "" -#: ../../c-api/init_config.rst:922 +#: ../../c-api/init_config.rst:932 msgid "" "Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" -"data:`os.path.pathsep`)." +"data:`os.pathsep`)." msgstr "" -#: ../../c-api/init_config.rst:925 +#: ../../c-api/init_config.rst:935 msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" -#: ../../c-api/init_config.rst:934 +#: ../../c-api/init_config.rst:944 msgid "Module search paths: :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:936 +#: ../../c-api/init_config.rst:946 msgid "" "If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" "`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." @@ -1230,41 +1231,41 @@ msgid "" "to ``1``." msgstr "" -#: ../../c-api/init_config.rst:941 +#: ../../c-api/init_config.rst:951 msgid "" "Default: empty list (``module_search_paths``) and ``0`` " "(``module_search_paths_set``)." msgstr "" -#: ../../c-api/init_config.rst:948 +#: ../../c-api/init_config.rst:958 msgid "Compilation optimization level:" msgstr "" -#: ../../c-api/init_config.rst:950 +#: ../../c-api/init_config.rst:960 msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" -#: ../../c-api/init_config.rst:951 +#: ../../c-api/init_config.rst:961 msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" -#: ../../c-api/init_config.rst:952 +#: ../../c-api/init_config.rst:962 msgid "``2``: Level 1, strip docstrings." msgstr "" -#: ../../c-api/init_config.rst:954 +#: ../../c-api/init_config.rst:964 msgid "" "Incremented by the :option:`-O` command line option. Set to the :envvar:" "`PYTHONOPTIMIZE` environment variable value." msgstr "" -#: ../../c-api/init_config.rst:961 +#: ../../c-api/init_config.rst:971 msgid "" "The list of the original command line arguments passed to the Python " "executable: :data:`sys.orig_argv`." msgstr "" -#: ../../c-api/init_config.rst:964 +#: ../../c-api/init_config.rst:974 msgid "" "If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." "argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " @@ -1273,388 +1274,388 @@ msgid "" "parse_argv` is non-zero)." msgstr "" -#: ../../c-api/init_config.rst:971 +#: ../../c-api/init_config.rst:981 msgid "" "See also the :c:member:`~PyConfig.argv` member and the :c:func:" "`Py_GetArgcArgv` function." msgstr "" -#: ../../c-api/init_config.rst:974 ../../c-api/init_config.rst:1244 -#: ../../c-api/init_config.rst:1263 +#: ../../c-api/init_config.rst:984 ../../c-api/init_config.rst:1254 +#: ../../c-api/init_config.rst:1273 msgid "Default: empty list." msgstr "" -#: ../../c-api/init_config.rst:980 +#: ../../c-api/init_config.rst:990 msgid "Parse command line arguments?" msgstr "" -#: ../../c-api/init_config.rst:982 +#: ../../c-api/init_config.rst:992 msgid "" "If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " "regular Python parses :ref:`command line arguments `, and " "strip Python arguments from :c:member:`~PyConfig.argv`." msgstr "" -#: ../../c-api/init_config.rst:994 +#: ../../c-api/init_config.rst:1004 msgid "" "The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" "`PyConfig.parse_argv` equals to ``1``." msgstr "" -#: ../../c-api/init_config.rst:1000 +#: ../../c-api/init_config.rst:1010 msgid "" "Parser debug mode. If greater than ``0``, turn on parser debugging output " "(for expert only, depending on compilation options)." msgstr "" -#: ../../c-api/init_config.rst:1003 +#: ../../c-api/init_config.rst:1013 msgid "" "Incremented by the :option:`-d` command line option. Set to the :envvar:" "`PYTHONDEBUG` environment variable value." msgstr "" -#: ../../c-api/init_config.rst:1006 +#: ../../c-api/init_config.rst:1016 msgid "" "Need a :ref:`debug build of Python ` (the ``Py_DEBUG`` macro " "must be defined)." msgstr "" -#: ../../c-api/init_config.rst:1013 +#: ../../c-api/init_config.rst:1023 msgid "" "If non-zero, calculation of path configuration is allowed to log warnings " "into ``stderr``. If equals to ``0``, suppress these warnings." msgstr "" -#: ../../c-api/init_config.rst:1020 +#: ../../c-api/init_config.rst:1030 msgid "Now also applies on Windows." msgstr "" -#: ../../c-api/init_config.rst:1025 +#: ../../c-api/init_config.rst:1035 msgid "" "The site-specific directory prefix where the platform independent Python " "files are installed: :data:`sys.prefix`." msgstr "" -#: ../../c-api/init_config.rst:1034 +#: ../../c-api/init_config.rst:1044 msgid "" "Program name used to initialize :c:member:`~PyConfig.executable` and in " "early error messages during Python initialization." msgstr "" -#: ../../c-api/init_config.rst:1037 +#: ../../c-api/init_config.rst:1047 msgid "If :func:`Py_SetProgramName` has been called, use its argument." msgstr "" -#: ../../c-api/init_config.rst:1038 +#: ../../c-api/init_config.rst:1048 msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" -#: ../../c-api/init_config.rst:1039 +#: ../../c-api/init_config.rst:1049 msgid "" "If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" "`__PYVENV_LAUNCHER__` environment variable if set." msgstr "" -#: ../../c-api/init_config.rst:1041 +#: ../../c-api/init_config.rst:1051 msgid "" "Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." msgstr "" -#: ../../c-api/init_config.rst:1043 +#: ../../c-api/init_config.rst:1053 msgid "" "Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " "platforms." msgstr "" -#: ../../c-api/init_config.rst:1052 +#: ../../c-api/init_config.rst:1062 msgid "" "Directory where cached ``.pyc`` files are written: :data:`sys." "pycache_prefix`." msgstr "" -#: ../../c-api/init_config.rst:1055 +#: ../../c-api/init_config.rst:1065 msgid "" "Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " "the :envvar:`PYTHONPYCACHEPREFIX` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1058 +#: ../../c-api/init_config.rst:1068 msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" -#: ../../c-api/init_config.rst:1064 +#: ../../c-api/init_config.rst:1074 msgid "" "Quiet mode. If greater than ``0``, don't display the copyright and version " "at Python startup in interactive mode." msgstr "" -#: ../../c-api/init_config.rst:1067 +#: ../../c-api/init_config.rst:1077 msgid "Incremented by the :option:`-q` command line option." msgstr "" -#: ../../c-api/init_config.rst:1073 +#: ../../c-api/init_config.rst:1083 msgid "Value of the :option:`-c` command line option." msgstr "" -#: ../../c-api/init_config.rst:1075 ../../c-api/init_config.rst:1096 +#: ../../c-api/init_config.rst:1085 ../../c-api/init_config.rst:1106 msgid "Used by :c:func:`Py_RunMain`." msgstr "" -#: ../../c-api/init_config.rst:1081 +#: ../../c-api/init_config.rst:1091 msgid "" "Filename passed on the command line: trailing command line argument without :" "option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` function." msgstr "" -#: ../../c-api/init_config.rst:1085 +#: ../../c-api/init_config.rst:1095 msgid "" "For example, it is set to ``script.py`` by the ``python3 script.py arg`` " "command line." msgstr "" -#: ../../c-api/init_config.rst:1088 +#: ../../c-api/init_config.rst:1098 msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." msgstr "也請見 :c:member:`PyConfig.skip_source_first_line` 選項。" -#: ../../c-api/init_config.rst:1094 +#: ../../c-api/init_config.rst:1104 msgid "Value of the :option:`-m` command line option." msgstr "" -#: ../../c-api/init_config.rst:1102 +#: ../../c-api/init_config.rst:1112 msgid "Show total reference count at exit?" msgstr "" -#: ../../c-api/init_config.rst:1104 +#: ../../c-api/init_config.rst:1114 msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." msgstr "" -#: ../../c-api/init_config.rst:1106 +#: ../../c-api/init_config.rst:1116 msgid "" "Need a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " "macro must be defined)." msgstr "" -#: ../../c-api/init_config.rst:1113 +#: ../../c-api/init_config.rst:1123 msgid "Import the :mod:`site` module at startup?" msgstr "" -#: ../../c-api/init_config.rst:1115 +#: ../../c-api/init_config.rst:1125 msgid "" "If equal to zero, disable the import of the module site and the site-" "dependent manipulations of :data:`sys.path` that it entails." msgstr "" -#: ../../c-api/init_config.rst:1118 +#: ../../c-api/init_config.rst:1128 msgid "" "Also disable these manipulations if the :mod:`site` module is explicitly " "imported later (call :func:`site.main` if you want them to be triggered)." msgstr "" -#: ../../c-api/init_config.rst:1121 +#: ../../c-api/init_config.rst:1131 msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" -#: ../../c-api/init_config.rst:1123 +#: ../../c-api/init_config.rst:1133 msgid "" -":data:`sys.flags.no_site` is set to the inverted value of :c:member:" -"`~PyConfig.site_import`." +":data:`sys.flags.no_site ` is set to the inverted value of :c:" +"member:`~PyConfig.site_import`." msgstr "" -#: ../../c-api/init_config.rst:1130 +#: ../../c-api/init_config.rst:1140 msgid "" "If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " "source." msgstr "" -#: ../../c-api/init_config.rst:1133 +#: ../../c-api/init_config.rst:1143 msgid "" "It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " "DOS specific hack only." msgstr "" -#: ../../c-api/init_config.rst:1136 +#: ../../c-api/init_config.rst:1146 msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" -#: ../../c-api/init_config.rst:1143 +#: ../../c-api/init_config.rst:1153 msgid "" "Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" "data:`sys.stderr` (but :data:`sys.stderr` always uses " "``\"backslashreplace\"`` error handler)." msgstr "" -#: ../../c-api/init_config.rst:1147 +#: ../../c-api/init_config.rst:1157 msgid "" "If :c:func:`Py_SetStandardStreamEncoding` has been called, use its *error* " "and *errors* arguments if they are not ``NULL``." msgstr "" -#: ../../c-api/init_config.rst:1150 +#: ../../c-api/init_config.rst:1160 msgid "" "Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" -#: ../../c-api/init_config.rst:1153 +#: ../../c-api/init_config.rst:1163 msgid "Default encoding:" msgstr "" -#: ../../c-api/init_config.rst:1155 +#: ../../c-api/init_config.rst:1165 msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: ../../c-api/init_config.rst:1156 +#: ../../c-api/init_config.rst:1166 msgid "Otherwise, use the :term:`locale encoding`." msgstr "" -#: ../../c-api/init_config.rst:1158 +#: ../../c-api/init_config.rst:1168 msgid "Default error handler:" msgstr "" -#: ../../c-api/init_config.rst:1160 +#: ../../c-api/init_config.rst:1170 msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" -#: ../../c-api/init_config.rst:1161 +#: ../../c-api/init_config.rst:1171 msgid "" "``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " "if the LC_CTYPE locale is \"C\" or \"POSIX\"." msgstr "" -#: ../../c-api/init_config.rst:1163 +#: ../../c-api/init_config.rst:1173 msgid "``\"strict\"`` otherwise." msgstr "" -#: ../../c-api/init_config.rst:1167 +#: ../../c-api/init_config.rst:1177 msgid "Enable tracemalloc?" msgstr "" -#: ../../c-api/init_config.rst:1169 +#: ../../c-api/init_config.rst:1179 msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" -#: ../../c-api/init_config.rst:1171 +#: ../../c-api/init_config.rst:1181 msgid "" "Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" "envvar:`PYTHONTRACEMALLOC` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1178 +#: ../../c-api/init_config.rst:1188 msgid "Enable compatibility mode with the perf profiler?" msgstr "" -#: ../../c-api/init_config.rst:1180 +#: ../../c-api/init_config.rst:1190 msgid "" "If non-zero, initialize the perf trampoline. See :ref:`perf_profiling` for " "more information." msgstr "" -#: ../../c-api/init_config.rst:1183 +#: ../../c-api/init_config.rst:1193 msgid "" "Set by :option:`-X perf <-X>` command line option and by the :envvar:" "`PYTHONPERFSUPPORT` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1186 +#: ../../c-api/init_config.rst:1196 msgid "Default: ``-1``." msgstr "預設值:``1``。" -#: ../../c-api/init_config.rst:1192 +#: ../../c-api/init_config.rst:1202 msgid "Use :ref:`environment variables `?" msgstr "" -#: ../../c-api/init_config.rst:1194 +#: ../../c-api/init_config.rst:1204 msgid "" "If equals to zero, ignore the :ref:`environment variables `." msgstr "" -#: ../../c-api/init_config.rst:1197 +#: ../../c-api/init_config.rst:1207 msgid "Set to ``0`` by the :option:`-E` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1203 +#: ../../c-api/init_config.rst:1213 msgid "If non-zero, add the user site directory to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:1205 +#: ../../c-api/init_config.rst:1215 msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." msgstr "" -#: ../../c-api/init_config.rst:1207 +#: ../../c-api/init_config.rst:1217 msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1213 +#: ../../c-api/init_config.rst:1223 msgid "" "Verbose mode. If greater than ``0``, print a message each time a module is " "imported, showing the place (filename or built-in module) from which it is " "loaded." msgstr "" -#: ../../c-api/init_config.rst:1217 +#: ../../c-api/init_config.rst:1227 msgid "" "If greater than or equal to ``2``, print a message for each file that is " "checked for when searching for a module. Also provides information on module " "cleanup at exit." msgstr "" -#: ../../c-api/init_config.rst:1221 +#: ../../c-api/init_config.rst:1231 msgid "Incremented by the :option:`-v` command line option." msgstr "" -#: ../../c-api/init_config.rst:1223 +#: ../../c-api/init_config.rst:1233 msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" -#: ../../c-api/init_config.rst:1229 +#: ../../c-api/init_config.rst:1239 msgid "" "Options of the :mod:`warnings` module to build warnings filters, lowest to " "highest priority: :data:`sys.warnoptions`." msgstr "" -#: ../../c-api/init_config.rst:1232 +#: ../../c-api/init_config.rst:1242 msgid "" "The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " "order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " "of :data:`warnings.filters` which is checked first (highest priority)." msgstr "" -#: ../../c-api/init_config.rst:1237 +#: ../../c-api/init_config.rst:1247 msgid "" "The :option:`-W` command line options adds its value to :c:member:`~PyConfig." "warnoptions`, it can be used multiple times." msgstr "" -#: ../../c-api/init_config.rst:1240 +#: ../../c-api/init_config.rst:1250 msgid "" "The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " "warning options. Multiple options can be specified, separated by commas (``," "``)." msgstr "" -#: ../../c-api/init_config.rst:1248 +#: ../../c-api/init_config.rst:1258 msgid "" "If equal to ``0``, Python won't try to write ``.pyc`` files on the import of " "source modules." msgstr "" -#: ../../c-api/init_config.rst:1251 +#: ../../c-api/init_config.rst:1261 msgid "" "Set to ``0`` by the :option:`-B` command line option and the :envvar:" "`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" -#: ../../c-api/init_config.rst:1254 +#: ../../c-api/init_config.rst:1264 msgid "" ":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" "member:`~PyConfig.write_bytecode`." msgstr "" -#: ../../c-api/init_config.rst:1261 +#: ../../c-api/init_config.rst:1271 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: ../../c-api/init_config.rst:1265 +#: ../../c-api/init_config.rst:1275 msgid "" "If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " "arguments are parsed the same way the regular Python parses :ref:`command " @@ -1662,29 +1663,29 @@ msgid "" "c:member:`~PyConfig.argv`." msgstr "" -#: ../../c-api/init_config.rst:1270 +#: ../../c-api/init_config.rst:1280 msgid "" "The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " "see the :option:`-X` command line option." msgstr "" -#: ../../c-api/init_config.rst:1275 +#: ../../c-api/init_config.rst:1285 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: ../../c-api/init_config.rst:1279 +#: ../../c-api/init_config.rst:1289 msgid "Initialization with PyConfig" msgstr "" -#: ../../c-api/init_config.rst:1281 +#: ../../c-api/init_config.rst:1291 msgid "Function to initialize Python:" msgstr "" -#: ../../c-api/init_config.rst:1285 +#: ../../c-api/init_config.rst:1295 msgid "Initialize Python from *config* configuration." msgstr "" -#: ../../c-api/init_config.rst:1290 +#: ../../c-api/init_config.rst:1300 msgid "" "If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" "func:`PyImport_ExtendInittab` are used, they must be set or called after " @@ -1693,17 +1694,17 @@ msgid "" "`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" -#: ../../c-api/init_config.rst:1297 +#: ../../c-api/init_config.rst:1307 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" -#: ../../c-api/init_config.rst:1300 +#: ../../c-api/init_config.rst:1310 msgid "Example setting the program name::" msgstr "" -#: ../../c-api/init_config.rst:1328 +#: ../../c-api/init_config.rst:1338 msgid "" "More complete example modifying the default configuration, read the " "configuration, and then override some parameters. Note that since 3.11, many " @@ -1712,18 +1713,18 @@ msgid "" "called will be left unchanged by initialization::" msgstr "" -#: ../../c-api/init_config.rst:1391 +#: ../../c-api/init_config.rst:1401 msgid "Isolated Configuration" msgstr "" -#: ../../c-api/init_config.rst:1393 +#: ../../c-api/init_config.rst:1403 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" "`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " "Python from the system. For example, to embed Python into an application." msgstr "" -#: ../../c-api/init_config.rst:1398 +#: ../../c-api/init_config.rst:1408 msgid "" "This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " @@ -1731,115 +1732,115 @@ msgid "" "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: ../../c-api/init_config.rst:1403 +#: ../../c-api/init_config.rst:1413 msgid "" "Configuration files are still used with this configuration to determine " "paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " "avoid computing the default path configuration." msgstr "" -#: ../../c-api/init_config.rst:1411 +#: ../../c-api/init_config.rst:1421 msgid "Python Configuration" msgstr "" -#: ../../c-api/init_config.rst:1413 +#: ../../c-api/init_config.rst:1423 msgid "" ":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" "`PyConfig_InitPythonConfig` functions create a configuration to build a " "customized Python which behaves as the regular Python." msgstr "" -#: ../../c-api/init_config.rst:1417 +#: ../../c-api/init_config.rst:1427 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" -#: ../../c-api/init_config.rst:1420 +#: ../../c-api/init_config.rst:1430 msgid "" "This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " "Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" "`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." msgstr "" -#: ../../c-api/init_config.rst:1429 +#: ../../c-api/init_config.rst:1439 msgid "Python Path Configuration" msgstr "" -#: ../../c-api/init_config.rst:1431 +#: ../../c-api/init_config.rst:1441 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: ../../c-api/init_config.rst:1433 +#: ../../c-api/init_config.rst:1443 msgid "Path configuration inputs:" msgstr "" -#: ../../c-api/init_config.rst:1435 +#: ../../c-api/init_config.rst:1445 msgid ":c:member:`PyConfig.home`" msgstr ":c:member:`PyConfig.home`" -#: ../../c-api/init_config.rst:1436 +#: ../../c-api/init_config.rst:1446 msgid ":c:member:`PyConfig.platlibdir`" msgstr ":c:member:`PyConfig.platlibdir`" -#: ../../c-api/init_config.rst:1437 +#: ../../c-api/init_config.rst:1447 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr ":c:member:`PyConfig.pathconfig_warnings`" -#: ../../c-api/init_config.rst:1438 +#: ../../c-api/init_config.rst:1448 msgid ":c:member:`PyConfig.program_name`" msgstr ":c:member:`PyConfig.program_name`" -#: ../../c-api/init_config.rst:1439 +#: ../../c-api/init_config.rst:1449 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr ":c:member:`PyConfig.pythonpath_env`" -#: ../../c-api/init_config.rst:1440 +#: ../../c-api/init_config.rst:1450 msgid "current working directory: to get absolute paths" msgstr "" -#: ../../c-api/init_config.rst:1441 +#: ../../c-api/init_config.rst:1451 msgid "" "``PATH`` environment variable to get the program full path (from :c:member:" "`PyConfig.program_name`)" msgstr "" -#: ../../c-api/init_config.rst:1443 +#: ../../c-api/init_config.rst:1453 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "``__PYVENV_LAUNCHER__`` 環境變數" -#: ../../c-api/init_config.rst:1444 +#: ../../c-api/init_config.rst:1454 msgid "" "(Windows only) Application paths in the registry under " "\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " "HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" -#: ../../c-api/init_config.rst:1448 +#: ../../c-api/init_config.rst:1458 msgid "Path configuration output fields:" msgstr "" -#: ../../c-api/init_config.rst:1450 +#: ../../c-api/init_config.rst:1460 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr ":c:member:`PyConfig.base_exec_prefix`" -#: ../../c-api/init_config.rst:1451 +#: ../../c-api/init_config.rst:1461 msgid ":c:member:`PyConfig.base_executable`" msgstr ":c:member:`PyConfig.base_executable`" -#: ../../c-api/init_config.rst:1452 +#: ../../c-api/init_config.rst:1462 msgid ":c:member:`PyConfig.base_prefix`" msgstr ":c:member:`PyConfig.base_prefix`" -#: ../../c-api/init_config.rst:1453 +#: ../../c-api/init_config.rst:1463 msgid ":c:member:`PyConfig.exec_prefix`" msgstr ":c:member:`PyConfig.exec_prefix`" -#: ../../c-api/init_config.rst:1454 +#: ../../c-api/init_config.rst:1464 msgid ":c:member:`PyConfig.executable`" msgstr ":c:member:`PyConfig.executable`" -#: ../../c-api/init_config.rst:1455 +#: ../../c-api/init_config.rst:1465 msgid "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" @@ -1847,11 +1848,11 @@ msgstr "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" -#: ../../c-api/init_config.rst:1457 +#: ../../c-api/init_config.rst:1467 msgid ":c:member:`PyConfig.prefix`" msgstr ":c:member:`PyConfig.prefix`" -#: ../../c-api/init_config.rst:1459 +#: ../../c-api/init_config.rst:1469 msgid "" "If at least one \"output field\" is not set, Python calculates the path " "configuration to fill unset fields. If :c:member:`~PyConfig." @@ -1860,7 +1861,7 @@ msgid "" "module_search_paths_set` is set to ``1``." msgstr "" -#: ../../c-api/init_config.rst:1465 +#: ../../c-api/init_config.rst:1475 msgid "" "It is possible to completely ignore the function calculating the default " "path configuration by setting explicitly all path configuration output " @@ -1870,52 +1871,52 @@ msgid "" "modification." msgstr "" -#: ../../c-api/init_config.rst:1472 +#: ../../c-api/init_config.rst:1482 msgid "" "Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " "when calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" -#: ../../c-api/init_config.rst:1475 +#: ../../c-api/init_config.rst:1485 msgid "" "If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." "base_exec_prefix` fields are not set, they inherit their value from :c:" "member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: ../../c-api/init_config.rst:1479 +#: ../../c-api/init_config.rst:1489 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" -#: ../../c-api/init_config.rst:1481 +#: ../../c-api/init_config.rst:1491 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " "contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." "run_filename` to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:1484 +#: ../../c-api/init_config.rst:1494 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: ../../c-api/init_config.rst:1486 +#: ../../c-api/init_config.rst:1496 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" -#: ../../c-api/init_config.rst:1488 +#: ../../c-api/init_config.rst:1498 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:1490 +#: ../../c-api/init_config.rst:1500 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:1492 +#: ../../c-api/init_config.rst:1502 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " "modified by the :mod:`site` module. If :c:member:`~PyConfig." @@ -1924,170 +1925,170 @@ msgid "" "data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:1498 +#: ../../c-api/init_config.rst:1508 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: ../../c-api/init_config.rst:1500 +#: ../../c-api/init_config.rst:1510 msgid "``pyvenv.cfg``" msgstr "``pyvenv.cfg``" -#: ../../c-api/init_config.rst:1501 +#: ../../c-api/init_config.rst:1511 msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" -#: ../../c-api/init_config.rst:1502 +#: ../../c-api/init_config.rst:1512 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: ../../c-api/init_config.rst:1504 +#: ../../c-api/init_config.rst:1514 msgid "If a ``._pth`` file is present:" msgstr "" -#: ../../c-api/init_config.rst:1506 +#: ../../c-api/init_config.rst:1516 msgid "Set :c:member:`~PyConfig.isolated` to ``1``." msgstr "將 :c:member:`~PyConfig.isolated` 設定為 ``1``。" -#: ../../c-api/init_config.rst:1507 +#: ../../c-api/init_config.rst:1517 msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." msgstr "將 :c:member:`~PyConfig.use_environment` 設定為 ``0``。" -#: ../../c-api/init_config.rst:1508 +#: ../../c-api/init_config.rst:1518 msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "將 :c:member:`~PyConfig.site_import` 設定為 ``0``。" -#: ../../c-api/init_config.rst:1509 +#: ../../c-api/init_config.rst:1519 msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." msgstr "將 :c:member:`~PyConfig.safe_path` 設定為 ``1``。" -#: ../../c-api/init_config.rst:1511 +#: ../../c-api/init_config.rst:1521 msgid "" "The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" "`PyConfig.base_executable`" msgstr "" -#: ../../c-api/init_config.rst:1516 +#: ../../c-api/init_config.rst:1526 msgid "Py_RunMain()" msgstr "Py_RunMain()" -#: ../../c-api/init_config.rst:1520 +#: ../../c-api/init_config.rst:1530 msgid "" "Execute the command (:c:member:`PyConfig.run_command`), the script (:c:" "member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." "run_module`) specified on the command line or in the configuration." msgstr "" -#: ../../c-api/init_config.rst:1525 +#: ../../c-api/init_config.rst:1535 msgid "By default and when if :option:`-i` option is used, run the REPL." msgstr "" -#: ../../c-api/init_config.rst:1527 +#: ../../c-api/init_config.rst:1537 msgid "" "Finally, finalizes Python and returns an exit status that can be passed to " "the ``exit()`` function." msgstr "" -#: ../../c-api/init_config.rst:1530 +#: ../../c-api/init_config.rst:1540 msgid "" "See :ref:`Python Configuration ` for an example of " "customized Python always running in isolated mode using :c:func:`Py_RunMain`." msgstr "" -#: ../../c-api/init_config.rst:1536 +#: ../../c-api/init_config.rst:1546 msgid "Py_GetArgcArgv()" msgstr "Py_GetArgcArgv()" -#: ../../c-api/init_config.rst:1540 +#: ../../c-api/init_config.rst:1550 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: ../../c-api/init_config.rst:1542 +#: ../../c-api/init_config.rst:1552 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: ../../c-api/init_config.rst:1546 +#: ../../c-api/init_config.rst:1556 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: ../../c-api/init_config.rst:1548 +#: ../../c-api/init_config.rst:1558 msgid "" "This section is a private provisional API introducing multi-phase " "initialization, the core feature of :pep:`432`:" msgstr "" -#: ../../c-api/init_config.rst:1551 +#: ../../c-api/init_config.rst:1561 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: ../../c-api/init_config.rst:1553 +#: ../../c-api/init_config.rst:1563 msgid "Builtin types;" msgstr "" -#: ../../c-api/init_config.rst:1554 +#: ../../c-api/init_config.rst:1564 msgid "Builtin exceptions;" msgstr "" -#: ../../c-api/init_config.rst:1555 +#: ../../c-api/init_config.rst:1565 msgid "Builtin and frozen modules;" msgstr "" -#: ../../c-api/init_config.rst:1556 +#: ../../c-api/init_config.rst:1566 msgid "" "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " "doesn't exist yet)." msgstr "" -#: ../../c-api/init_config.rst:1559 +#: ../../c-api/init_config.rst:1569 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: ../../c-api/init_config.rst:1561 +#: ../../c-api/init_config.rst:1571 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: ../../c-api/init_config.rst:1562 +#: ../../c-api/init_config.rst:1572 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: ../../c-api/init_config.rst:1563 +#: ../../c-api/init_config.rst:1573 msgid "Install signal handlers;" msgstr "" -#: ../../c-api/init_config.rst:1564 +#: ../../c-api/init_config.rst:1574 msgid "" "Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" "data:`sys.path`);" msgstr "" -#: ../../c-api/init_config.rst:1566 +#: ../../c-api/init_config.rst:1576 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: ../../c-api/init_config.rst:1567 +#: ../../c-api/init_config.rst:1577 msgid "Import the :mod:`site` module;" msgstr "" -#: ../../c-api/init_config.rst:1568 +#: ../../c-api/init_config.rst:1578 msgid "etc." msgstr "" -#: ../../c-api/init_config.rst:1570 +#: ../../c-api/init_config.rst:1580 msgid "Private provisional API:" msgstr "" -#: ../../c-api/init_config.rst:1572 +#: ../../c-api/init_config.rst:1582 msgid "" ":c:member:`PyConfig._init_main`: if set to ``0``, :c:func:" "`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." msgstr "" -#: ../../c-api/init_config.rst:1577 +#: ../../c-api/init_config.rst:1587 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: ../../c-api/init_config.rst:1579 +#: ../../c-api/init_config.rst:1589 msgid "" "No module is imported during the \"Core\" phase and the ``importlib`` module " "is not configured: the :ref:`Path Configuration ` is only " @@ -2096,14 +2097,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: ../../c-api/init_config.rst:1585 +#: ../../c-api/init_config.rst:1595 msgid "" "It may become possible to calculate the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " "one of the :pep:`432` motivation." msgstr "" -#: ../../c-api/init_config.rst:1589 +#: ../../c-api/init_config.rst:1599 msgid "" "The \"Core\" phase is not properly defined: what should be and what should " "not be available at this phase is not specified yet. The API is marked as " @@ -2111,7 +2112,7 @@ msgid "" "until a proper public API is designed." msgstr "" -#: ../../c-api/init_config.rst:1594 +#: ../../c-api/init_config.rst:1604 msgid "" "Example running Python code between \"Core\" and \"Main\" initialization " "phases::" diff --git a/c-api/intro.po b/c-api/intro.po index 6aade09464..3434e5e689 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -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-29 00:03+0000\n" "PO-Revision-Date: 2023-04-25 18:01+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -847,12 +847,12 @@ msgstr "" #: ../../c-api/intro.rst:618 msgid "" "A simple example of detecting exceptions and passing them on is shown in " -"the :c:func:`sum_sequence` example above. It so happens that this example " +"the :c:func:`!sum_sequence` example above. It so happens that this example " "doesn't need to clean up any owned references when it detects an error. The " "following example function shows some error cleanup. First, to remind you " "why you like Python, we show the equivalent Python code::" msgstr "" -"上面的 :c:func:`sum_sequence` 範例展示了一個檢測例外並將其繼續傳遞的例子。碰" +"上面的 :c:func:`!sum_sequence` 範例展示了一個檢測例外並將其繼續傳遞的例子。碰" "巧這個例子在檢測到錯誤時不需要清理任何擁有的參照。以下範例函式展示了一些錯誤" "清理。首先,為了提醒你為什麼喜歡 Python,我們展示了等效的 Python 程式碼:\n" "\n" diff --git a/c-api/memory.po b/c-api/memory.po index 7688c51e7a..70ab0af2cf 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: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -178,8 +178,8 @@ msgstr "" msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " -"and :c:func:`free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting " -"zero bytes." +"and :c:func:`!free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when " +"requesting zero bytes." msgstr "" #: ../../c-api/memory.rst:146 ../../c-api/memory.rst:217 @@ -557,19 +557,19 @@ msgid "" "following fields:" msgstr "" -#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:649 +#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:651 msgid "Field" msgstr "" -#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:649 +#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:651 msgid "Meaning" msgstr "" -#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:651 +#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:653 msgid "``void *ctx``" msgstr "``void *ctx``" -#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:651 +#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:653 msgid "user context passed as first argument" msgstr "" @@ -607,7 +607,7 @@ msgstr "" #: ../../c-api/memory.rst:425 msgid "" -"The :c:type:`PyMemAllocator` structure was renamed to :c:type:" +"The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" @@ -615,98 +615,98 @@ msgstr "" msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: ../../c-api/memory.rst:436 ../../c-api/memory.rst:445 -#: ../../c-api/memory.rst:454 +#: ../../c-api/memory.rst:438 ../../c-api/memory.rst:447 +#: ../../c-api/memory.rst:456 msgid "Functions:" msgstr "函式:" -#: ../../c-api/memory.rst:438 +#: ../../c-api/memory.rst:440 msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawMalloc`" -#: ../../c-api/memory.rst:439 +#: ../../c-api/memory.rst:441 msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawRealloc`" -#: ../../c-api/memory.rst:440 +#: ../../c-api/memory.rst:442 msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`" -#: ../../c-api/memory.rst:441 +#: ../../c-api/memory.rst:443 msgid ":c:func:`PyMem_RawFree`" msgstr ":c:func:`PyMem_RawFree`" -#: ../../c-api/memory.rst:447 +#: ../../c-api/memory.rst:449 msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Malloc`," -#: ../../c-api/memory.rst:448 +#: ../../c-api/memory.rst:450 msgid ":c:func:`PyMem_Realloc`" msgstr ":c:func:`PyMem_Realloc`" -#: ../../c-api/memory.rst:449 +#: ../../c-api/memory.rst:451 msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`" -#: ../../c-api/memory.rst:450 +#: ../../c-api/memory.rst:452 msgid ":c:func:`PyMem_Free`" msgstr ":c:func:`PyMem_Free`" -#: ../../c-api/memory.rst:456 +#: ../../c-api/memory.rst:458 msgid ":c:func:`PyObject_Malloc`" msgstr ":c:func:`PyObject_Malloc`" -#: ../../c-api/memory.rst:457 +#: ../../c-api/memory.rst:459 msgid ":c:func:`PyObject_Realloc`" msgstr ":c:func:`PyObject_Realloc`" -#: ../../c-api/memory.rst:458 +#: ../../c-api/memory.rst:460 msgid ":c:func:`PyObject_Calloc`" msgstr ":c:func:`PyObject_Calloc`" -#: ../../c-api/memory.rst:459 +#: ../../c-api/memory.rst:461 msgid ":c:func:`PyObject_Free`" msgstr ":c:func:`PyObject_Free`" -#: ../../c-api/memory.rst:463 +#: ../../c-api/memory.rst:465 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:468 +#: ../../c-api/memory.rst:470 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:470 +#: ../../c-api/memory.rst:472 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: ../../c-api/memory.rst:473 +#: ../../c-api/memory.rst:475 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: the :term:`GIL ` is not held when the " "allocator is called." msgstr "" -#: ../../c-api/memory.rst:477 +#: ../../c-api/memory.rst:479 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" -#: ../../c-api/memory.rst:481 +#: ../../c-api/memory.rst:483 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: ../../c-api/memory.rst:486 +#: ../../c-api/memory.rst:488 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: ../../c-api/memory.rst:488 +#: ../../c-api/memory.rst:490 msgid "" "It can be called after :c:func:`Py_PreInitialize` and before :c:func:" "`Py_InitializeFromConfig` to install a custom memory allocator. There are no " @@ -716,7 +716,7 @@ msgid "" "domains>` for more information." msgstr "" -#: ../../c-api/memory.rst:496 +#: ../../c-api/memory.rst:498 msgid "" "If called after Python has finish initializing (after :c:func:" "`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " @@ -724,17 +724,17 @@ msgid "" "arbitrary one is **not supported**." msgstr "" -#: ../../c-api/memory.rst:505 +#: ../../c-api/memory.rst:507 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:512 +#: ../../c-api/memory.rst:514 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: ../../c-api/memory.rst:514 +#: ../../c-api/memory.rst:516 msgid "" "When :ref:`Python is built in debug mode `, the :c:func:" "`PyMem_SetupDebugHooks` function is called at the :ref:`Python " @@ -742,19 +742,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:519 +#: ../../c-api/memory.rst:521 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" -#: ../../c-api/memory.rst:522 +#: ../../c-api/memory.rst:524 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" -#: ../../c-api/memory.rst:525 +#: ../../c-api/memory.rst:527 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -764,25 +764,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: ../../c-api/memory.rst:532 +#: ../../c-api/memory.rst:534 msgid "Runtime checks:" msgstr "" -#: ../../c-api/memory.rst:534 +#: ../../c-api/memory.rst:536 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: ../../c-api/memory.rst:536 +#: ../../c-api/memory.rst:538 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: ../../c-api/memory.rst:537 +#: ../../c-api/memory.rst:539 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: ../../c-api/memory.rst:538 +#: ../../c-api/memory.rst:540 msgid "" "Check that the :term:`GIL ` is held when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -790,7 +790,7 @@ msgid "" "called." msgstr "" -#: ../../c-api/memory.rst:543 +#: ../../c-api/memory.rst:545 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -798,7 +798,7 @@ msgid "" "memory block was traced." msgstr "" -#: ../../c-api/memory.rst:548 +#: ../../c-api/memory.rst:550 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -808,49 +808,49 @@ msgid "" "from a Python slice):" msgstr "" -#: ../../c-api/memory.rst:555 +#: ../../c-api/memory.rst:557 msgid "``p[-2*S:-S]``" msgstr "``p[-2*S:-S]``" -#: ../../c-api/memory.rst:555 +#: ../../c-api/memory.rst:557 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" -#: ../../c-api/memory.rst:562 +#: ../../c-api/memory.rst:564 msgid "``p[-S]``" msgstr "``p[-S]``" -#: ../../c-api/memory.rst:558 +#: ../../c-api/memory.rst:560 msgid "API identifier (ASCII character):" msgstr "" -#: ../../c-api/memory.rst:560 +#: ../../c-api/memory.rst:562 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: ../../c-api/memory.rst:561 +#: ../../c-api/memory.rst:563 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: ../../c-api/memory.rst:562 +#: ../../c-api/memory.rst:564 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: ../../c-api/memory.rst:565 +#: ../../c-api/memory.rst:567 msgid "``p[-S+1:0]``" msgstr "``p[-S+1:0]``" -#: ../../c-api/memory.rst:565 +#: ../../c-api/memory.rst:567 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: ../../c-api/memory.rst:574 +#: ../../c-api/memory.rst:576 msgid "``p[0:N]``" msgstr "``p[0:N]``" -#: ../../c-api/memory.rst:568 +#: ../../c-api/memory.rst:570 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -861,25 +861,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: ../../c-api/memory.rst:577 +#: ../../c-api/memory.rst:579 msgid "``p[N:N+S]``" msgstr "``p[N:N+S]``" -#: ../../c-api/memory.rst:577 +#: ../../c-api/memory.rst:579 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: ../../c-api/memory.rst:588 +#: ../../c-api/memory.rst:590 msgid "``p[N+S:N+2*S]``" msgstr "``p[N+S:N+2*S]``" -#: ../../c-api/memory.rst:580 +#: ../../c-api/memory.rst:582 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" -#: ../../c-api/memory.rst:583 +#: ../../c-api/memory.rst:585 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -889,7 +889,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: ../../c-api/memory.rst:590 +#: ../../c-api/memory.rst:592 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -902,7 +902,7 @@ msgid "" "getting used)." msgstr "" -#: ../../c-api/memory.rst:599 +#: ../../c-api/memory.rst:601 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -911,7 +911,7 @@ msgid "" "`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: ../../c-api/memory.rst:607 +#: ../../c-api/memory.rst:609 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -919,11 +919,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: ../../c-api/memory.rst:617 +#: ../../c-api/memory.rst:619 msgid "The pymalloc allocator" msgstr "" -#: ../../c-api/memory.rst:619 +#: ../../c-api/memory.rst:621 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -932,114 +932,114 @@ msgid "" "512 bytes." msgstr "" -#: ../../c-api/memory.rst:624 +#: ../../c-api/memory.rst:626 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: ../../c-api/memory.rst:628 +#: ../../c-api/memory.rst:630 msgid "The arena allocator uses the following functions:" msgstr "" -#: ../../c-api/memory.rst:630 -msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows," +#: ../../c-api/memory.rst:632 +msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: ../../c-api/memory.rst:631 -msgid ":c:func:`mmap` and :c:func:`munmap` if available," +#: ../../c-api/memory.rst:633 +msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: ../../c-api/memory.rst:632 +#: ../../c-api/memory.rst:634 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: ../../c-api/memory.rst:634 +#: ../../c-api/memory.rst:636 msgid "" "This allocator is disabled if Python is configured with the :option:`--" "without-pymalloc` option. It can also be disabled at runtime using the :" "envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." msgstr "" -#: ../../c-api/memory.rst:639 +#: ../../c-api/memory.rst:641 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: ../../c-api/memory.rst:645 +#: ../../c-api/memory.rst:647 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: ../../c-api/memory.rst:653 +#: ../../c-api/memory.rst:655 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "``void* alloc(void *ctx, size_t size)``" -#: ../../c-api/memory.rst:653 +#: ../../c-api/memory.rst:655 msgid "allocate an arena of size bytes" msgstr "" -#: ../../c-api/memory.rst:655 +#: ../../c-api/memory.rst:657 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "``void free(void *ctx, void *ptr, size_t size)``" -#: ../../c-api/memory.rst:655 +#: ../../c-api/memory.rst:657 msgid "free an arena" msgstr "" -#: ../../c-api/memory.rst:660 +#: ../../c-api/memory.rst:662 msgid "Get the arena allocator." msgstr "" -#: ../../c-api/memory.rst:664 +#: ../../c-api/memory.rst:666 msgid "Set the arena allocator." msgstr "" -#: ../../c-api/memory.rst:668 +#: ../../c-api/memory.rst:670 msgid "tracemalloc C API" msgstr "" -#: ../../c-api/memory.rst:674 +#: ../../c-api/memory.rst:676 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: ../../c-api/memory.rst:676 +#: ../../c-api/memory.rst:678 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: ../../c-api/memory.rst:679 +#: ../../c-api/memory.rst:681 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: ../../c-api/memory.rst:683 +#: ../../c-api/memory.rst:685 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: ../../c-api/memory.rst:686 +#: ../../c-api/memory.rst:688 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: ../../c-api/memory.rst:692 +#: ../../c-api/memory.rst:694 msgid "Examples" msgstr "範例" -#: ../../c-api/memory.rst:694 +#: ../../c-api/memory.rst:696 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: ../../c-api/memory.rst:707 +#: ../../c-api/memory.rst:709 msgid "The same code using the type-oriented function set::" msgstr "" -#: ../../c-api/memory.rst:719 +#: ../../c-api/memory.rst:721 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -1049,14 +1049,14 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: ../../c-api/memory.rst:734 +#: ../../c-api/memory.rst:736 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " -"Python heap, objects in Python are allocated and released with :c:func:" -"`PyObject_New`, :c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`." +"Python heap, objects in Python are allocated and released with :c:macro:" +"`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`." msgstr "" -#: ../../c-api/memory.rst:738 +#: ../../c-api/memory.rst:740 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/module.po b/c-api/module.po index 751c9c7f8c..bfca4455de 100644 --- a/c-api/module.po +++ b/c-api/module.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -117,7 +117,7 @@ msgstr "" #: ../../c-api/module.rst:121 msgid "" -":c:func:`PyModule_GetFilename` raises :c:type:`UnicodeEncodeError` on " +":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on " "unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." msgstr "" @@ -171,8 +171,8 @@ msgstr "" #: ../../c-api/module.rst:165 msgid "" "This memory area is allocated based on *m_size* on module creation, and " -"freed when the module object is deallocated, after the :c:member:`m_free` " -"function has been called, if present." +"freed when the module object is deallocated, after the :c:member:" +"`~PyModuleDef.m_free` function has been called, if present." msgstr "" #: ../../c-api/module.rst:169 @@ -224,9 +224,9 @@ msgid "" "This function is not called if the module state was requested but is not " "allocated yet. This is the case immediately after the module is created and " "before the module is executed (:c:data:`Py_mod_exec` function). More " -"precisely, this function is not called if :c:member:`m_size` is greater than " -"0 and the module state (as returned by :c:func:`PyModule_GetState`) is " -"``NULL``." +"precisely, this function is not called if :c:member:`~PyModuleDef.m_size` is " +"greater than 0 and the module state (as returned by :c:func:" +"`PyModule_GetState`) is ``NULL``." msgstr "" #: ../../c-api/module.rst:209 ../../c-api/module.rst:230 @@ -303,8 +303,8 @@ msgid "" "initialization\". Extension modules created this way behave more like Python " "modules: the initialization is split between the *creation phase*, when the " "module object is created, and the *execution phase*, when it is populated. " -"The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__` " -"methods of classes." +"The distinction is similar to the :py:meth:`!__new__` and :py:meth:`!" +"__init__` methods of classes." msgstr "" #: ../../c-api/module.rst:288 @@ -316,8 +316,8 @@ msgid "" "modules created from the same definition should be independent: changes to " "one should not affect the others. This means that all state should be " "specific to the module object (using e.g. using :c:func:" -"`PyModule_GetState`), or its contents (such as the module's :attr:`__dict__` " -"or individual classes created with :c:func:`PyType_FromSpec`)." +"`PyModule_GetState`), or its contents (such as the module's :attr:`~object." +"__dict__` or individual classes created with :c:func:`PyType_FromSpec`)." msgstr "" #: ../../c-api/module.rst:298 diff --git a/c-api/none.po b/c-api/none.po index 9f532a2634..a4dc2654ef 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -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-29 00:03+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-" @@ -27,8 +27,8 @@ msgstr "``None`` 物件" msgid "" "Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in " "the Python/C API. Since ``None`` is a singleton, testing for object " -"identity (using ``==`` in C) is sufficient. There is no :c:func:" -"`PyNone_Check` function for the same reason." +"identity (using ``==`` in C) is sufficient. There is no :c:func:`!" +"PyNone_Check` function for the same reason." msgstr "" #: ../../c-api/none.rst:18 diff --git a/c-api/object.po b/c-api/object.po index 1e23b76317..9c7f786d81 100644 --- a/c-api/object.po +++ b/c-api/object.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -271,7 +271,7 @@ msgstr "" msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " -"a :attr:`__bases__` attribute (which must be a tuple of base classes)." +"a :attr:`~class.__bases__` attribute (which must be a tuple of base classes)." msgstr "" #: ../../c-api/object.rst:264 @@ -290,14 +290,14 @@ msgstr "" #: ../../c-api/object.rst:275 msgid "" "An instance *inst* can override what is considered its class by having a :" -"attr:`__class__` attribute." +"attr:`~instance.__class__` attribute." msgstr "" #: ../../c-api/object.rst:278 msgid "" "An object *cls* can override if it is considered a class, and what its base " -"classes are, by having a :attr:`__bases__` attribute (which must be a tuple " -"of base classes)." +"classes are, by having a :attr:`~class.__bases__` attribute (which must be a " +"tuple of base classes)." msgstr "" #: ../../c-api/object.rst:287 diff --git a/c-api/set.po b/c-api/set.po index eecf572d6e..b347ab2d3b 100644 --- a/c-api/set.po +++ b/c-api/set.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: 2023-07-29 00:03+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-" @@ -128,8 +128,8 @@ msgstr "" #: ../../c-api/set.rst:112 msgid "" "Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " -"to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :" -"class:`set`, :class:`frozenset`, or an instance of a subtype." +"to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not a :class:" +"`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" #: ../../c-api/set.rst:119 @@ -139,11 +139,11 @@ msgstr "" #: ../../c-api/set.rst:124 msgid "" "Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " -"encountered. Unlike the Python :meth:`__contains__` method, this function " -"does not automatically convert unhashable sets into temporary frozensets. " -"Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:" -"`PyExc_SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, " -"or an instance of a subtype." +"encountered. Unlike the Python :meth:`~object.__contains__` method, this " +"function does not automatically convert unhashable sets into temporary " +"frozensets. Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:" +"`SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, or an " +"instance of a subtype." msgstr "" #: ../../c-api/set.rst:133 @@ -169,9 +169,8 @@ msgid "" "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " "missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " "the Python :meth:`~set.discard` method, this function does not automatically " -"convert unhashable sets into temporary frozensets. Raise :exc:" -"`PyExc_SystemError` if *set* is not an instance of :class:`set` or its " -"subtype." +"convert unhashable sets into temporary frozensets. Raise :exc:`SystemError` " +"if *set* is not an instance of :class:`set` or its subtype." msgstr "" #: ../../c-api/set.rst:158 diff --git a/c-api/structures.po b/c-api/structures.po index df5d611176..5eb3082c9e 100644 --- a/c-api/structures.po +++ b/c-api/structures.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: 2023-07-29 00:03+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-" @@ -58,11 +58,11 @@ msgstr "" #: ../../c-api/structures.rst:38 msgid "" -"This is an extension of :c:type:`PyObject` that adds the :attr:`ob_size` " -"field. This is only used for objects that have some notion of *length*. " -"This type does not often appear in the Python/C API. Access to the members " -"must be done by using the macros :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, " -"and :c:macro:`Py_SIZE`." +"This is an extension of :c:type:`PyObject` that adds the :c:member:" +"`~PyVarObject.ob_size` field. This is only used for objects that have some " +"notion of *length*. This type does not often appear in the Python/C API. " +"Access to the members must be done by using the macros :c:macro:" +"`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`." msgstr "" #: ../../c-api/structures.rst:47 @@ -164,8 +164,8 @@ msgstr "" #: ../../c-api/structures.rst:154 msgid "" "This is a macro which expands to initialization values for a new :c:type:" -"`PyVarObject` type, including the :attr:`ob_size` field. This macro expands " -"to::" +"`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. " +"This macro expands to::" msgstr "" #: ../../c-api/structures.rst:163 @@ -220,43 +220,43 @@ msgid "" msgstr "" #: ../../c-api/structures.rst:233 -msgid "name of the method" +msgid "Name of the method." msgstr "" #: ../../c-api/structures.rst:237 -msgid "pointer to the C implementation" +msgid "Pointer to the C implementation." msgstr "" #: ../../c-api/structures.rst:241 -msgid "flags bits indicating how the call should be constructed" +msgid "Flags bits indicating how the call should be constructed." msgstr "" #: ../../c-api/structures.rst:245 -msgid "points to the contents of the docstring" +msgid "Points to the contents of the docstring." msgstr "" #: ../../c-api/structures.rst:247 msgid "" -"The :c:member:`ml_meth` is a C function pointer. The functions may be of " -"different types, but they always return :c:expr:`PyObject*`. If the " -"function is not of the :c:type:`PyCFunction`, the compiler will require a " -"cast in the method table. Even though :c:type:`PyCFunction` defines the " +"The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions " +"may be of different types, but they always return :c:expr:`PyObject*`. If " +"the function is not of the :c:type:`PyCFunction`, the compiler will require " +"a cast in the method table. Even though :c:type:`PyCFunction` defines the " "first parameter as :c:expr:`PyObject*`, it is common that the method " "implementation uses the specific C type of the *self* object." msgstr "" -#: ../../c-api/structures.rst:254 +#: ../../c-api/structures.rst:255 msgid "" -"The :c:member:`ml_flags` field is a bitfield which can include the following " -"flags. The individual flags indicate either a calling convention or a " -"binding convention." +"The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include " +"the following flags. The individual flags indicate either a calling " +"convention or a binding convention." msgstr "" -#: ../../c-api/structures.rst:258 +#: ../../c-api/structures.rst:260 msgid "There are these calling conventions:" msgstr "" -#: ../../c-api/structures.rst:262 +#: ../../c-api/structures.rst:264 msgid "" "This is the typical calling convention, where the methods have the type :c:" "type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " @@ -266,7 +266,7 @@ msgid "" "func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: ../../c-api/structures.rst:272 +#: ../../c-api/structures.rst:274 msgid "" "Can only be used in certain combinations with other flags: :ref:" "`METH_VARARGS | METH_KEYWORDS `, :ref:" @@ -275,11 +275,11 @@ msgid "" "METH_KEYWORDS>`." msgstr "" -#: ../../c-api/structures.rst:286 +#: ../../c-api/structures.rst:288 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:281 +#: ../../c-api/structures.rst:283 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -288,7 +288,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: ../../c-api/structures.rst:290 +#: ../../c-api/structures.rst:292 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`_PyCFunctionFast`. The first parameter is *self*, the " @@ -297,15 +297,15 @@ msgid "" "the array)." msgstr "" -#: ../../c-api/structures.rst:300 +#: ../../c-api/structures.rst:302 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: ../../c-api/structures.rst:317 +#: ../../c-api/structures.rst:319 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:306 +#: ../../c-api/structures.rst:308 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword " @@ -317,17 +317,17 @@ msgid "" "the positional arguments." msgstr "" -#: ../../c-api/structures.rst:321 +#: ../../c-api/structures.rst:323 msgid "" "Can only be used in the combination with other flags: :ref:`METH_METHOD | " "METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: ../../c-api/structures.rst:338 +#: ../../c-api/structures.rst:340 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:328 +#: ../../c-api/structures.rst:330 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -335,14 +335,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" -#: ../../c-api/structures.rst:333 +#: ../../c-api/structures.rst:335 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" -#: ../../c-api/structures.rst:342 +#: ../../c-api/structures.rst:344 msgid "" "Methods without parameters don't need to check whether arguments are given " "if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " @@ -351,13 +351,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: ../../c-api/structures.rst:348 +#: ../../c-api/structures.rst:350 msgid "" "The function must have 2 parameters. Since the second parameter is unused, :" "c:macro:`Py_UNUSED` can be used to prevent a compiler warning." msgstr "" -#: ../../c-api/structures.rst:354 +#: ../../c-api/structures.rst:356 msgid "" "Methods with a single object argument can be listed with the :c:macro:" "`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " @@ -366,7 +366,7 @@ msgid "" "single argument." msgstr "" -#: ../../c-api/structures.rst:360 +#: ../../c-api/structures.rst:362 msgid "" "These two constants are not used to indicate the calling convention but the " "binding when use with methods of classes. These may not be used for " @@ -374,90 +374,90 @@ msgid "" "any given method." msgstr "" -#: ../../c-api/structures.rst:370 +#: ../../c-api/structures.rst:372 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " "what is created when using the :func:`classmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:380 +#: ../../c-api/structures.rst:382 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " "what is created when using the :func:`staticmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:384 +#: ../../c-api/structures.rst:386 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" -#: ../../c-api/structures.rst:390 +#: ../../c-api/structures.rst:392 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " "wrappers are loaded before the method table, the existence of a " "*sq_contains* slot, for example, would generate a wrapped method named :meth:" -"`__contains__` and preclude the loading of a corresponding PyCFunction with " -"the same name. With the flag defined, the PyCFunction will be loaded in " -"place of the wrapper object and will co-exist with the slot. This is " -"helpful because calls to PyCFunctions are optimized more than wrapper object " -"calls." +"`~object.__contains__` and preclude the loading of a corresponding " +"PyCFunction with the same name. With the flag defined, the PyCFunction will " +"be loaded in place of the wrapper object and will co-exist with the slot. " +"This is helpful because calls to PyCFunctions are optimized more than " +"wrapper object calls." msgstr "" -#: ../../c-api/structures.rst:402 +#: ../../c-api/structures.rst:404 msgid "Accessing attributes of extension types" msgstr "" -#: ../../c-api/structures.rst:406 +#: ../../c-api/structures.rst:408 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. Its fields are, in order:" msgstr "" -#: ../../c-api/structures.rst:411 +#: ../../c-api/structures.rst:413 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" -#: ../../c-api/structures.rst:414 +#: ../../c-api/structures.rst:416 msgid "The string should be static, no copy is made of it." msgstr "" -#: ../../c-api/structures.rst:418 +#: ../../c-api/structures.rst:420 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" -#: ../../c-api/structures.rst:422 +#: ../../c-api/structures.rst:424 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" -#: ../../c-api/structures.rst:427 +#: ../../c-api/structures.rst:429 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: ../../c-api/structures.rst:431 +#: ../../c-api/structures.rst:433 msgid "" "The docstring, or NULL. The string should be static, no copy is made of it. " "Typically, it is defined using :c:macro:`PyDoc_STR`." msgstr "" -#: ../../c-api/structures.rst:435 +#: ../../c-api/structures.rst:437 msgid "" -"By default (when :c:member:`flags` is ``0``), members allow both read and " -"write access. Use the :c:macro:`Py_READONLY` flag for read-only access. " -"Certain types, like :c:macro:`Py_T_STRING`, imply :c:macro:`Py_READONLY`. " -"Only :c:macro:`Py_T_OBJECT_EX` (and legacy :c:macro:`T_OBJECT`) members can " -"be deleted." +"By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow " +"both read and write access. Use the :c:macro:`Py_READONLY` flag for read-" +"only access. Certain types, like :c:macro:`Py_T_STRING`, imply :c:macro:" +"`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and legacy :c:macro:" +"`T_OBJECT`) members can be deleted." msgstr "" -#: ../../c-api/structures.rst:444 +#: ../../c-api/structures.rst:446 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " @@ -466,11 +466,11 @@ msgid "" "``Py_T_PYSSIZET`` and ``Py_READONLY``, for example::" msgstr "" -#: ../../c-api/structures.rst:456 +#: ../../c-api/structures.rst:458 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: ../../c-api/structures.rst:458 +#: ../../c-api/structures.rst:460 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" "`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " @@ -479,77 +479,77 @@ msgid "" "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: ../../c-api/structures.rst:466 +#: ../../c-api/structures.rst:468 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:471 +#: ../../c-api/structures.rst:473 msgid "" "Get an attribute belonging to the object at address *obj_addr*. The " "attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." msgstr "" -#: ../../c-api/structures.rst:477 +#: ../../c-api/structures.rst:479 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:482 +#: ../../c-api/structures.rst:484 msgid "" "Set an attribute belonging to the object at address *obj_addr* to object " "*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " "``0`` if successful and a negative value on failure." msgstr "" -#: ../../c-api/structures.rst:488 +#: ../../c-api/structures.rst:490 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:494 +#: ../../c-api/structures.rst:496 msgid "Member flags" msgstr "" -#: ../../c-api/structures.rst:496 +#: ../../c-api/structures.rst:498 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: ../../c-api/structures.rst:500 +#: ../../c-api/structures.rst:502 msgid "Not writable." msgstr "" -#: ../../c-api/structures.rst:504 +#: ../../c-api/structures.rst:506 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: ../../c-api/structures.rst:509 +#: ../../c-api/structures.rst:511 msgid "" "Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " "entry indicates an offset from the subclass-specific data, rather than from " "``PyObject``." msgstr "" -#: ../../c-api/structures.rst:513 +#: ../../c-api/structures.rst:515 msgid "" "Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " -"negative :c:member:`~PyTypeDef.basicsize`. It is mandatory in that case." +"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case." msgstr "" -#: ../../c-api/structures.rst:518 +#: ../../c-api/structures.rst:520 msgid "" "This flag is only used in :c:type:`PyTypeSlot`. When setting :c:member:" "`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" "c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." msgstr "" -#: ../../c-api/structures.rst:530 +#: ../../c-api/structures.rst:532 msgid "" "The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " @@ -558,7 +558,7 @@ msgid "" "nothing." msgstr "" -#: ../../c-api/structures.rst:541 +#: ../../c-api/structures.rst:543 msgid "" "The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" "macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " @@ -567,11 +567,11 @@ msgid "" "names." msgstr "" -#: ../../c-api/structures.rst:550 +#: ../../c-api/structures.rst:552 msgid "Member types" msgstr "" -#: ../../c-api/structures.rst:552 +#: ../../c-api/structures.rst:554 msgid "" ":c:member:`PyMemberDef.type` can be one of the following macros " "corresponding to various C types. When the member is accessed in Python, it " @@ -580,147 +580,147 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: ../../c-api/structures.rst:560 +#: ../../c-api/structures.rst:562 msgid "" "Unless marked (D), attributes defined this way cannot be deleted using e.g. :" "keyword:`del` or :py:func:`delattr`." msgstr "" -#: ../../c-api/structures.rst:564 +#: ../../c-api/structures.rst:566 msgid "Macro name" msgstr "" -#: ../../c-api/structures.rst:564 +#: ../../c-api/structures.rst:566 msgid "C type" msgstr "" -#: ../../c-api/structures.rst:564 +#: ../../c-api/structures.rst:566 msgid "Python type" msgstr "" -#: ../../c-api/structures.rst:566 +#: ../../c-api/structures.rst:568 msgid ":c:expr:`char`" msgstr "" -#: ../../c-api/structures.rst:566 ../../c-api/structures.rst:567 #: ../../c-api/structures.rst:568 ../../c-api/structures.rst:569 #: ../../c-api/structures.rst:570 ../../c-api/structures.rst:571 #: ../../c-api/structures.rst:572 ../../c-api/structures.rst:573 #: ../../c-api/structures.rst:574 ../../c-api/structures.rst:575 -#: ../../c-api/structures.rst:576 +#: ../../c-api/structures.rst:576 ../../c-api/structures.rst:577 +#: ../../c-api/structures.rst:578 msgid ":py:class:`int`" msgstr ":py:class:`int`" -#: ../../c-api/structures.rst:567 +#: ../../c-api/structures.rst:569 msgid ":c:expr:`short`" msgstr ":c:expr:`short`" -#: ../../c-api/structures.rst:568 +#: ../../c-api/structures.rst:570 msgid ":c:expr:`int`" msgstr ":c:expr:`int`" -#: ../../c-api/structures.rst:569 +#: ../../c-api/structures.rst:571 msgid ":c:expr:`long`" msgstr ":c:expr:`long`" -#: ../../c-api/structures.rst:570 +#: ../../c-api/structures.rst:572 msgid ":c:expr:`long long`" msgstr ":c:expr:`long long`" -#: ../../c-api/structures.rst:571 +#: ../../c-api/structures.rst:573 msgid ":c:expr:`unsigned char`" msgstr ":c:expr:`unsigned char`" -#: ../../c-api/structures.rst:572 +#: ../../c-api/structures.rst:574 msgid ":c:expr:`unsigned int`" msgstr ":c:expr:`unsigned int`" -#: ../../c-api/structures.rst:573 +#: ../../c-api/structures.rst:575 msgid ":c:expr:`unsigned short`" msgstr ":c:expr:`unsigned short`" -#: ../../c-api/structures.rst:574 +#: ../../c-api/structures.rst:576 msgid ":c:expr:`unsigned long`" msgstr ":c:expr:`unsigned long`" -#: ../../c-api/structures.rst:575 +#: ../../c-api/structures.rst:577 msgid ":c:expr:`unsigned long long`" msgstr ":c:expr:`unsigned long long`" -#: ../../c-api/structures.rst:576 +#: ../../c-api/structures.rst:578 msgid ":c:expr:`Py_ssize_t`" msgstr ":c:expr:`Py_ssize_t`" -#: ../../c-api/structures.rst:577 +#: ../../c-api/structures.rst:579 msgid ":c:expr:`float`" msgstr ":c:expr:`float`" -#: ../../c-api/structures.rst:577 ../../c-api/structures.rst:578 +#: ../../c-api/structures.rst:579 ../../c-api/structures.rst:580 msgid ":py:class:`float`" msgstr ":py:class:`float`" -#: ../../c-api/structures.rst:578 +#: ../../c-api/structures.rst:580 msgid ":c:expr:`double`" msgstr ":c:expr:`double`" -#: ../../c-api/structures.rst:579 +#: ../../c-api/structures.rst:581 msgid ":c:expr:`char` (written as 0 or 1)" msgstr ":c:expr:`char` (寫成 0 或 1)" -#: ../../c-api/structures.rst:579 +#: ../../c-api/structures.rst:581 msgid ":py:class:`bool`" msgstr ":py:class:`bool`" -#: ../../c-api/structures.rst:581 +#: ../../c-api/structures.rst:583 msgid ":c:expr:`const char *` (*)" msgstr ":c:expr:`const char *` (*)" -#: ../../c-api/structures.rst:581 ../../c-api/structures.rst:582 +#: ../../c-api/structures.rst:583 ../../c-api/structures.rst:584 msgid ":py:class:`str` (RO)" msgstr ":py:class:`str` (RO)" -#: ../../c-api/structures.rst:582 +#: ../../c-api/structures.rst:584 msgid ":c:expr:`const char[]` (*)" msgstr ":c:expr:`const char[]` (*)" -#: ../../c-api/structures.rst:583 +#: ../../c-api/structures.rst:585 msgid ":c:expr:`char` (0-127)" msgstr ":c:expr:`char` (0-127)" -#: ../../c-api/structures.rst:583 +#: ../../c-api/structures.rst:585 msgid ":py:class:`str` (**)" msgstr ":py:class:`str` (**)" -#: ../../c-api/structures.rst:584 +#: ../../c-api/structures.rst:586 msgid ":c:expr:`PyObject *`" msgstr ":c:expr:`PyObject *`" -#: ../../c-api/structures.rst:584 +#: ../../c-api/structures.rst:586 msgid ":py:class:`object` (D)" msgstr ":py:class:`object` (D)" -#: ../../c-api/structures.rst:587 +#: ../../c-api/structures.rst:589 msgid "" "(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " "the C representation is a pointer; with :c:macro:`!Py_T_STRING_INLINE` the " "string is stored directly in the structure." msgstr "" -#: ../../c-api/structures.rst:592 +#: ../../c-api/structures.rst:594 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: ../../c-api/structures.rst:594 +#: ../../c-api/structures.rst:596 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:596 +#: ../../c-api/structures.rst:598 msgid "" "(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " "``NULL`` pointer raises :py:exc:`AttributeError`." msgstr "" -#: ../../c-api/structures.rst:622 +#: ../../c-api/structures.rst:624 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -728,174 +728,174 @@ msgid "" "with the following deprecated types:" msgstr "" -#: ../../c-api/structures.rst:630 +#: ../../c-api/structures.rst:632 msgid "" "Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " "in surprising behavior in Python: deleting the attribute effectively sets it " "to ``None``." msgstr "" -#: ../../c-api/structures.rst:636 +#: ../../c-api/structures.rst:638 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:639 +#: ../../c-api/structures.rst:641 msgid "Defining Getters and Setters" msgstr "" -#: ../../c-api/structures.rst:643 +#: ../../c-api/structures.rst:645 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: ../../c-api/structures.rst:648 +#: ../../c-api/structures.rst:650 msgid "attribute name" msgstr "" -#: ../../c-api/structures.rst:652 +#: ../../c-api/structures.rst:654 msgid "C function to get the attribute." msgstr "" -#: ../../c-api/structures.rst:656 +#: ../../c-api/structures.rst:658 msgid "" "Optional C function to set or delete the attribute, if omitted the attribute " "is readonly." msgstr "" -#: ../../c-api/structures.rst:660 +#: ../../c-api/structures.rst:662 msgid "optional docstring" msgstr "" -#: ../../c-api/structures.rst:664 +#: ../../c-api/structures.rst:666 msgid "" "Optional function pointer, providing additional data for getter and setter." msgstr "" -#: ../../c-api/structures.rst:666 +#: ../../c-api/structures.rst:668 msgid "" "The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a function pointer (the associated ``closure``)::" msgstr "" -#: ../../c-api/structures.rst:671 +#: ../../c-api/structures.rst:673 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: ../../c-api/structures.rst:674 +#: ../../c-api/structures.rst:676 msgid "" "``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " "the value to be set) and a function pointer (the associated ``closure``)::" msgstr "" -#: ../../c-api/structures.rst:679 +#: ../../c-api/structures.rst:681 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." msgstr "" -#: ../../c-api/structures.rst:368 ../../c-api/structures.rst:378 +#: ../../c-api/structures.rst:370 ../../c-api/structures.rst:380 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../c-api/structures.rst:368 +#: ../../c-api/structures.rst:370 msgid "classmethod" msgstr "classmethod" -#: ../../c-api/structures.rst:378 +#: ../../c-api/structures.rst:380 msgid "staticmethod" msgstr "staticmethod" -#: ../../c-api/structures.rst:523 +#: ../../c-api/structures.rst:525 msgid "READ_RESTRICTED" msgstr "READ_RESTRICTED" -#: ../../c-api/structures.rst:523 +#: ../../c-api/structures.rst:525 msgid "WRITE_RESTRICTED" msgstr "WRITE_RESTRICTED" -#: ../../c-api/structures.rst:523 +#: ../../c-api/structures.rst:525 msgid "RESTRICTED" msgstr "RESTRICTED" -#: ../../c-api/structures.rst:536 +#: ../../c-api/structures.rst:538 msgid "READONLY" msgstr "READONLY" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_BYTE" msgstr "T_BYTE" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_SHORT" msgstr "T_SHORT" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_INT" msgstr "T_INT" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_LONG" msgstr "T_LONG" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_LONGLONG" msgstr "T_LONGLONG" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_UBYTE" msgstr "T_UBYTE" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_USHORT" msgstr "T_USHORT" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_UINT" msgstr "T_UINT" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_ULONG" msgstr "T_ULONG" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_ULONGULONG" msgstr "T_ULONGULONG" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_PYSSIZET" msgstr "T_PYSSIZET" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_FLOAT" msgstr "T_FLOAT" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_DOUBLE" msgstr "T_DOUBLE" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_BOOL" msgstr "T_BOOL" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_CHAR" msgstr "T_CHAR" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_STRING" msgstr "T_STRING" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_STRING_INPLACE" msgstr "T_STRING_INPLACE" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "T_OBJECT_EX" msgstr "T_OBJECT_EX" -#: ../../c-api/structures.rst:599 +#: ../../c-api/structures.rst:601 msgid "structmember.h" msgstr "structmember.h" diff --git a/c-api/sys.po b/c-api/sys.po index 32c959133e..c047265062 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -10,7 +10,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: 2023-07-29 00:03+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-" @@ -210,8 +210,8 @@ msgstr "" #: ../../c-api/sys.rst:168 msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:`PyConfig." -"legacy_windows_fs_encoding` is zero;" +"The function now uses the UTF-8 encoding on Windows if :c:member:" +"`PyPreConfig.legacy_windows_fs_encoding` is zero;" msgstr "" #: ../../c-api/sys.rst:175 @@ -249,8 +249,8 @@ msgstr "" #: ../../c-api/sys.rst:210 msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:`PyConfig." -"legacy_windows_fs_encoding` is zero." +"The function now uses the UTF-8 encoding on Windows if :c:member:" +"`PyPreConfig.legacy_windows_fs_encoding` is zero." msgstr "" #: ../../c-api/sys.rst:218 @@ -484,7 +484,7 @@ msgid "" "This function should only be invoked when a condition is detected that would " "make it dangerous to continue using the Python interpreter; e.g., when the " "object administration appears to be corrupted. On Unix, the standard C " -"library function :c:func:`abort` is called which will attempt to produce a :" +"library function :c:func:`!abort` is called which will attempt to produce a :" "file:`core` file." msgstr "" diff --git a/c-api/tuple.po b/c-api/tuple.po index 6078edfe92..9e7803170e 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -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-28 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -21,7 +21,7 @@ msgstr "" #: ../../c-api/tuple.rst:6 msgid "Tuple Objects" -msgstr "元組(Tuple)物件" +msgstr "Tuple(元組)物件" #: ../../c-api/tuple.rst:13 msgid "This subtype of :c:type:`PyObject` represents a Python tuple object." @@ -126,11 +126,11 @@ msgid "" "`SystemError`." msgstr "" -#: ../../c-api/tuple.rst:115 +#: ../../c-api/tuple.rst:117 msgid "Struct Sequence Objects" msgstr "" -#: ../../c-api/tuple.rst:117 +#: ../../c-api/tuple.rst:119 msgid "" "Struct sequence objects are the C equivalent of :func:`~collections." "namedtuple` objects, i.e. a sequence whose items can also be accessed " @@ -138,138 +138,98 @@ msgid "" "specific struct sequence type." msgstr "" -#: ../../c-api/tuple.rst:124 +#: ../../c-api/tuple.rst:126 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" "`PyStructSequence_New`." msgstr "" -#: ../../c-api/tuple.rst:130 +#: ../../c-api/tuple.rst:132 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" -#: ../../c-api/tuple.rst:135 +#: ../../c-api/tuple.rst:137 msgid "" "The same as ``PyStructSequence_InitType``, but returns ``0`` on success and " "``-1`` on failure." msgstr "" -#: ../../c-api/tuple.rst:143 +#: ../../c-api/tuple.rst:145 msgid "Contains the meta information of a struct sequence type to create." msgstr "" -#: ../../c-api/tuple.rst:146 ../../c-api/tuple.rst:169 -msgid "Field" -msgstr "" - -#: ../../c-api/tuple.rst:146 ../../c-api/tuple.rst:169 -msgid "C Type" -msgstr "C Type" - -#: ../../c-api/tuple.rst:146 ../../c-api/tuple.rst:169 -msgid "Meaning" -msgstr "" - -#: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:171 -msgid "``name``" -msgstr "``name``" - -#: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:150 -#: ../../c-api/tuple.rst:171 ../../c-api/tuple.rst:176 -msgid "``const char *``" -msgstr "``const char *``" - -#: ../../c-api/tuple.rst:148 -msgid "name of the struct sequence type" -msgstr "" - -#: ../../c-api/tuple.rst:150 ../../c-api/tuple.rst:176 -msgid "``doc``" -msgstr "``doc``" - -#: ../../c-api/tuple.rst:150 -msgid "pointer to docstring for the type or ``NULL`` to omit" +#: ../../c-api/tuple.rst:149 +msgid "Name of the struct sequence type." msgstr "" #: ../../c-api/tuple.rst:153 -msgid "``fields``" -msgstr "``fields``" - -#: ../../c-api/tuple.rst:153 -msgid "``PyStructSequence_Field *``" -msgstr "``PyStructSequence_Field *``" - -#: ../../c-api/tuple.rst:153 -msgid "pointer to ``NULL``-terminated array with field names of the new type" +msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:156 -msgid "``n_in_sequence``" -msgstr "``n_in_sequence``" - -#: ../../c-api/tuple.rst:156 -msgid "``int``" -msgstr "``int``" +#: ../../c-api/tuple.rst:157 +msgid "Pointer to ``NULL``-terminated array with field names of the new type." +msgstr "" -#: ../../c-api/tuple.rst:156 -msgid "number of fields visible to the Python side (if used as tuple)" +#: ../../c-api/tuple.rst:161 +msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: ../../c-api/tuple.rst:163 +#: ../../c-api/tuple.rst:166 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " -"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :attr:" -"`fields` array of the :c:type:`PyStructSequence_Desc` determines which field " -"of the struct sequence is described." +"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" +"member:`~PyStructSequence_Desc.fields` array of the :c:type:" +"`PyStructSequence_Desc` determines which field of the struct sequence is " +"described." msgstr "" -#: ../../c-api/tuple.rst:171 +#: ../../c-api/tuple.rst:174 msgid "" -"name for the field or ``NULL`` to end the list of named fields, set to :c:" -"data:`PyStructSequence_UnnamedField` to leave unnamed" +"Name for the field or ``NULL`` to end the list of named fields, set to :c:" +"data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: ../../c-api/tuple.rst:176 -msgid "field docstring or ``NULL`` to omit" +#: ../../c-api/tuple.rst:179 +msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:182 +#: ../../c-api/tuple.rst:184 msgid "Special value for a field name to leave it unnamed." msgstr "" -#: ../../c-api/tuple.rst:184 +#: ../../c-api/tuple.rst:186 msgid "The type was changed from ``char *``." msgstr "" -#: ../../c-api/tuple.rst:190 +#: ../../c-api/tuple.rst:192 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." msgstr "" -#: ../../c-api/tuple.rst:196 +#: ../../c-api/tuple.rst:198 msgid "" "Return the object at position *pos* in the struct sequence pointed to by " "*p*. No bounds checking is performed." msgstr "" -#: ../../c-api/tuple.rst:202 +#: ../../c-api/tuple.rst:204 msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../c-api/tuple.rst:207 +#: ../../c-api/tuple.rst:209 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" -#: ../../c-api/tuple.rst:213 ../../c-api/tuple.rst:223 +#: ../../c-api/tuple.rst:215 ../../c-api/tuple.rst:225 msgid "This function \"steals\" a reference to *o*." msgstr "" -#: ../../c-api/tuple.rst:218 +#: ../../c-api/tuple.rst:220 msgid "" "Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static " "inlined function." diff --git a/c-api/type.po b/c-api/type.po index 0c874d569d..a9f1005b76 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,7 +7,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: 2023-07-29 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-" @@ -118,8 +118,8 @@ msgid "" "Mark *type* as watched. The callback granted *watcher_id* by :c:func:" "`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` " "reports a change to *type*. (The callback may be called only once for a " -"series of consecutive modifications to *type*, if :c:func:`PyType_Lookup` is " -"not called on *type* between the modifications; this is an implementation " +"series of consecutive modifications to *type*, if :c:func:`!_PyType_Lookup` " +"is not called on *type* between the modifications; this is an implementation " "detail and subject to change.)" msgstr "" @@ -582,7 +582,7 @@ msgstr "" #: ../../c-api/type.rst:480 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " -"some platforms. To avoid issues, use the *bases* argument of :py:func:" +"some platforms. To avoid issues, use the *bases* argument of :c:func:" "`PyType_FromSpecWithBases` instead." msgstr "" diff --git a/c-api/typehints.po b/c-api/typehints.po index 7a522c1395..5c064a160f 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2022-10-16 16:16+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,8 +65,8 @@ msgstr "" "::" #: ../../c-api/typehints.rst:38 -msgid "The data model method :meth:`__class_getitem__`." -msgstr "資料模型方法 :meth:`__class_getitem__`。" +msgid "The data model method :meth:`~object.__class_getitem__`." +msgstr "資料模型方法 :meth:`~object.__class_getitem__`。" #: ../../c-api/typehints.rst:44 msgid "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 3afafa2283..5bca8b7244 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -607,11 +607,11 @@ msgid "Columns:" msgstr "" #: ../../c-api/typeobj.rst:166 -msgid "**\"O\"**: set on :c:type:`PyBaseObject_Type`" +msgid "**\"O\"**: set on :c:data:`PyBaseObject_Type`" msgstr "" #: ../../c-api/typeobj.rst:168 -msgid "**\"T\"**: set on :c:type:`PyType_Type`" +msgid "**\"T\"**: set on :c:data:`PyType_Type`" msgstr "" #: ../../c-api/typeobj.rst:170 @@ -1165,20 +1165,21 @@ msgstr "" #: ../../c-api/typeobj.rst:487 msgid "" "The type object structure extends the :c:type:`PyVarObject` structure. The :" -"attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, " -"usually called from a class statement). Note that :c:data:`PyType_Type` (the " -"metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means " -"that its instances (i.e. type objects) *must* have the :attr:`ob_size` field." +"c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :" +"c:func:`!type_new`, usually called from a class statement). Note that :c:" +"data:`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject." +"tp_itemsize`, which means that its instances (i.e. type objects) *must* have " +"the :c:member:`~PyVarObject.ob_size` field." msgstr "" #: ../../c-api/typeobj.rst:496 msgid "" "This is the type object's reference count, initialized to ``1`` by the " "``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " -"objects `, the type's instances (objects whose :attr:`ob_type` " -"points back to the type) do *not* count as references. But for :ref:" -"`dynamically allocated type objects `, the instances *do* count " -"as references." +"objects `, the type's instances (objects whose :c:member:" +"`~PyObject.ob_type` points back to the type) do *not* count as references. " +"But for :ref:`dynamically allocated type objects `, the " +"instances *do* count as references." msgstr "" #: ../../c-api/typeobj.rst:503 ../../c-api/typeobj.rst:526 @@ -1201,19 +1202,19 @@ msgstr "" #: ../../c-api/typeobj.rst:1276 ../../c-api/typeobj.rst:1306 #: ../../c-api/typeobj.rst:1328 ../../c-api/typeobj.rst:1354 #: ../../c-api/typeobj.rst:1422 ../../c-api/typeobj.rst:1489 -#: ../../c-api/typeobj.rst:1548 ../../c-api/typeobj.rst:1584 -#: ../../c-api/typeobj.rst:1609 ../../c-api/typeobj.rst:1632 -#: ../../c-api/typeobj.rst:1645 ../../c-api/typeobj.rst:1660 -#: ../../c-api/typeobj.rst:1674 ../../c-api/typeobj.rst:1704 -#: ../../c-api/typeobj.rst:1736 ../../c-api/typeobj.rst:1762 -#: ../../c-api/typeobj.rst:1780 ../../c-api/typeobj.rst:1809 -#: ../../c-api/typeobj.rst:1853 ../../c-api/typeobj.rst:1870 -#: ../../c-api/typeobj.rst:1911 ../../c-api/typeobj.rst:1933 -#: ../../c-api/typeobj.rst:1965 ../../c-api/typeobj.rst:1993 -#: ../../c-api/typeobj.rst:2006 ../../c-api/typeobj.rst:2016 -#: ../../c-api/typeobj.rst:2033 ../../c-api/typeobj.rst:2050 -#: ../../c-api/typeobj.rst:2064 ../../c-api/typeobj.rst:2110 -#: ../../c-api/typeobj.rst:2133 +#: ../../c-api/typeobj.rst:1550 ../../c-api/typeobj.rst:1586 +#: ../../c-api/typeobj.rst:1611 ../../c-api/typeobj.rst:1634 +#: ../../c-api/typeobj.rst:1647 ../../c-api/typeobj.rst:1662 +#: ../../c-api/typeobj.rst:1676 ../../c-api/typeobj.rst:1706 +#: ../../c-api/typeobj.rst:1738 ../../c-api/typeobj.rst:1764 +#: ../../c-api/typeobj.rst:1782 ../../c-api/typeobj.rst:1811 +#: ../../c-api/typeobj.rst:1855 ../../c-api/typeobj.rst:1872 +#: ../../c-api/typeobj.rst:1913 ../../c-api/typeobj.rst:1935 +#: ../../c-api/typeobj.rst:1967 ../../c-api/typeobj.rst:1995 +#: ../../c-api/typeobj.rst:2008 ../../c-api/typeobj.rst:2018 +#: ../../c-api/typeobj.rst:2035 ../../c-api/typeobj.rst:2052 +#: ../../c-api/typeobj.rst:2066 ../../c-api/typeobj.rst:2112 +#: ../../c-api/typeobj.rst:2135 msgid "**Inheritance:**" msgstr "" @@ -1237,17 +1238,17 @@ msgstr "" #: ../../c-api/typeobj.rst:521 msgid "" "This should be done before any instances of the type are created. :c:func:" -"`PyType_Ready` checks if :attr:`ob_type` is ``NULL``, and if so, initializes " -"it to the :attr:`ob_type` field of the base class. :c:func:`PyType_Ready` " -"will not change this field if it is non-zero." +"`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if " +"so, initializes it to the :c:member:`~PyObject.ob_type` field of the base " +"class. :c:func:`PyType_Ready` will not change this field if it is non-zero." msgstr "" #: ../../c-api/typeobj.rst:528 ../../c-api/typeobj.rst:709 #: ../../c-api/typeobj.rst:826 ../../c-api/typeobj.rst:918 -#: ../../c-api/typeobj.rst:938 ../../c-api/typeobj.rst:1611 -#: ../../c-api/typeobj.rst:1634 ../../c-api/typeobj.rst:1764 -#: ../../c-api/typeobj.rst:1782 ../../c-api/typeobj.rst:1855 -#: ../../c-api/typeobj.rst:1967 ../../c-api/typeobj.rst:2112 +#: ../../c-api/typeobj.rst:938 ../../c-api/typeobj.rst:1613 +#: ../../c-api/typeobj.rst:1636 ../../c-api/typeobj.rst:1766 +#: ../../c-api/typeobj.rst:1784 ../../c-api/typeobj.rst:1857 +#: ../../c-api/typeobj.rst:1969 ../../c-api/typeobj.rst:2114 msgid "This field is inherited by subtypes." msgstr "" @@ -1297,8 +1298,8 @@ msgstr "" msgid "" "Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " "may set a value when the field is set to ``NULL`` then there will also be a " -"\"Default\" section. (Note that many fields set on :c:type:" -"`PyBaseObject_Type` and :c:type:`PyType_Type` effectively act as defaults.)" +"\"Default\" section. (Note that many fields set on :c:data:" +"`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)" msgstr "" #: ../../c-api/typeobj.rst:577 @@ -1308,8 +1309,8 @@ msgid "" "module name, followed by a dot, followed by the type name; for built-in " "types, it should be just the type name. If the module is a submodule of a " "package, the full package name is part of the full module name. For " -"example, a type named :class:`T` defined in module :mod:`M` in subpackage :" -"mod:`Q` in package :mod:`P` should have the :c:member:`~PyTypeObject." +"example, a type named :class:`!T` defined in module :mod:`!M` in subpackage :" +"mod:`!Q` in package :mod:`!P` should have the :c:member:`~PyTypeObject." "tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" @@ -1361,28 +1362,30 @@ msgstr "" #: ../../c-api/typeobj.rst:621 msgid "" -"For a type with variable-length instances, the instances must have an :attr:" -"`ob_size` field, and the instance size is :c:member:`~PyTypeObject." -"tp_basicsize` plus N times :c:member:`~PyTypeObject.tp_itemsize`, where N is " -"the \"length\" of the object. The value of N is typically stored in the " -"instance's :attr:`ob_size` field. There are exceptions: for example, ints " -"use a negative :attr:`ob_size` to indicate a negative number, and N is " -"``abs(ob_size)`` there. Also, the presence of an :attr:`ob_size` field in " -"the instance layout doesn't mean that the instance structure is variable-" -"length (for example, the structure for the list type has fixed-length " -"instances, yet those instances have a meaningful :attr:`ob_size` field)." +"For a type with variable-length instances, the instances must have an :c:" +"member:`~PyVarObject.ob_size` field, and the instance size is :c:member:" +"`~PyTypeObject.tp_basicsize` plus N times :c:member:`~PyTypeObject." +"tp_itemsize`, where N is the \"length\" of the object. The value of N is " +"typically stored in the instance's :c:member:`~PyVarObject.ob_size` field. " +"There are exceptions: for example, ints use a negative :c:member:" +"`~PyVarObject.ob_size` to indicate a negative number, and N is " +"``abs(ob_size)`` there. Also, the presence of an :c:member:`~PyVarObject." +"ob_size` field in the instance layout doesn't mean that the instance " +"structure is variable-length (for example, the structure for the list type " +"has fixed-length instances, yet those instances have a meaningful :c:member:" +"`~PyVarObject.ob_size` field)." msgstr "" #: ../../c-api/typeobj.rst:632 msgid "" "The basic size includes the fields in the instance declared by the macro :c:" "macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to " -"declare the instance struct) and this in turn includes the :attr:`_ob_prev` " -"and :attr:`_ob_next` fields if they are present. This means that the only " -"correct way to get an initializer for the :c:member:`~PyTypeObject." -"tp_basicsize` is to use the ``sizeof`` operator on the struct used to " -"declare the instance layout. The basic size does not include the GC header " -"size." +"declare the instance struct) and this in turn includes the :c:member:" +"`~PyObject._ob_prev` and :c:member:`~PyObject._ob_next` fields if they are " +"present. This means that the only correct way to get an initializer for " +"the :c:member:`~PyTypeObject.tp_basicsize` is to use the ``sizeof`` operator " +"on the struct used to declare the instance layout. The basic size does not " +"include the GC header size." msgstr "" #: ../../c-api/typeobj.rst:640 @@ -1430,9 +1433,9 @@ msgid "" "set), it is permissible to call the object deallocator directly instead of " "via :c:member:`~PyTypeObject.tp_free`. The object deallocator should be the " "one used to allocate the instance; this is normally :c:func:`PyObject_Del` " -"if the instance was allocated using :c:func:`PyObject_New` or :c:func:" -"`PyObject_VarNew`, or :c:func:`PyObject_GC_Del` if the instance was " -"allocated using :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`." +"if the instance was allocated using :c:macro:`PyObject_New` or :c:macro:" +"`PyObject_NewVar`, or :c:func:`PyObject_GC_Del` if the instance was " +"allocated using :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`." msgstr "" #: ../../c-api/typeobj.rst:680 @@ -1489,9 +1492,9 @@ msgstr "" msgid "" "Before version 3.12, it was not recommended for :ref:`mutable heap types " "` to implement the vectorcall protocol. When a user sets :attr:" -"`~type.__call__` in Python code, only *tp_call* is updated, likely making it " -"inconsistent with the vectorcall function. Since 3.12, setting ``__call__`` " -"will disable vectorcall optimization by clearing the :c:macro:" +"`~object.__call__` in Python code, only *tp_call* is updated, likely making " +"it inconsistent with the vectorcall function. Since 3.12, setting " +"``__call__`` will disable vectorcall optimization by clearing the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" @@ -1516,8 +1519,12 @@ msgid "" msgstr "" #: ../../c-api/typeobj.rst:767 ../../c-api/typeobj.rst:959 -msgid "Group: :attr:`tp_getattr`, :attr:`tp_getattro`" +msgid "" +"Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." +"tp_getattro`" msgstr "" +"群組::c:member:`~PyTypeObject.tp_getattr`、:c:member:`~PyTypeObject." +"tp_getattro`" #: ../../c-api/typeobj.rst:769 msgid "" @@ -1542,8 +1549,12 @@ msgid "" msgstr "" #: ../../c-api/typeobj.rst:784 ../../c-api/typeobj.rst:985 -msgid "Group: :attr:`tp_setattr`, :attr:`tp_setattro`" +msgid "" +"Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." +"tp_setattro`" msgstr "" +"群組::c:member:`~PyTypeObject.tp_setattr`、:c:member:`~PyTypeObject." +"tp_setattro`" #: ../../c-api/typeobj.rst:786 msgid "" @@ -1592,12 +1603,12 @@ msgstr "" #: ../../c-api/typeobj.rst:828 ../../c-api/typeobj.rst:940 #: ../../c-api/typeobj.rst:965 ../../c-api/typeobj.rst:991 -#: ../../c-api/typeobj.rst:1032 ../../c-api/typeobj.rst:1557 -#: ../../c-api/typeobj.rst:1591 ../../c-api/typeobj.rst:1708 -#: ../../c-api/typeobj.rst:1741 ../../c-api/typeobj.rst:1816 -#: ../../c-api/typeobj.rst:1857 ../../c-api/typeobj.rst:1875 -#: ../../c-api/typeobj.rst:1917 ../../c-api/typeobj.rst:1938 -#: ../../c-api/typeobj.rst:1969 +#: ../../c-api/typeobj.rst:1032 ../../c-api/typeobj.rst:1559 +#: ../../c-api/typeobj.rst:1593 ../../c-api/typeobj.rst:1710 +#: ../../c-api/typeobj.rst:1743 ../../c-api/typeobj.rst:1818 +#: ../../c-api/typeobj.rst:1859 ../../c-api/typeobj.rst:1877 +#: ../../c-api/typeobj.rst:1919 ../../c-api/typeobj.rst:1940 +#: ../../c-api/typeobj.rst:1971 msgid "**Default:**" msgstr "**預設:**" @@ -1666,9 +1677,10 @@ msgstr "" #: ../../c-api/typeobj.rst:886 msgid "" -"When this field is not set (*and* :attr:`tp_richcompare` is not set), an " -"attempt to take the hash of the object raises :exc:`TypeError`. This is the " -"same as setting it to :c:func:`PyObject_HashNotImplemented`." +"When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " +"is not set), an attempt to take the hash of the object raises :exc:" +"`TypeError`. This is the same as setting it to :c:func:" +"`PyObject_HashNotImplemented`." msgstr "" #: ../../c-api/typeobj.rst:890 @@ -1682,9 +1694,13 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: ../../c-api/typeobj.rst:900 ../../c-api/typeobj.rst:1550 -msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" +#: ../../c-api/typeobj.rst:900 ../../c-api/typeobj.rst:1552 +msgid "" +"Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." +"tp_richcompare`" msgstr "" +"群組::c:member:`~PyTypeObject.tp_hash`、:c:member:`~PyTypeObject." +"tp_richcompare`" #: ../../c-api/typeobj.rst:902 msgid "" @@ -1754,7 +1770,7 @@ msgid "" msgstr "" #: ../../c-api/typeobj.rst:967 -msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." +msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" #: ../../c-api/typeobj.rst:974 @@ -1779,7 +1795,7 @@ msgid "" msgstr "" #: ../../c-api/typeobj.rst:993 -msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." +msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" #: ../../c-api/typeobj.rst:998 @@ -1825,7 +1841,7 @@ msgstr "" #: ../../c-api/typeobj.rst:1034 msgid "" -":c:type:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " +":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" @@ -1846,11 +1862,11 @@ msgstr "" msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " -"case, the :attr:`ob_type` field of its instances is considered a reference " -"to the type, and the type object is INCREF'ed when a new instance is " -"created, and DECREF'ed when an instance is destroyed (this does not apply to " -"instances of subtypes; only the type referenced by the instance's ob_type " -"gets INCREF'ed or DECREF'ed)." +"case, the :c:member:`~PyObject.ob_type` field of its instances is considered " +"a reference to the type, and the type object is INCREF'ed when a new " +"instance is created, and DECREF'ed when an instance is destroyed (this does " +"not apply to instances of subtypes; only the type referenced by the " +"instance's ob_type gets INCREF'ed or DECREF'ed)." msgstr "" #: ../../c-api/typeobj.rst:1058 ../../c-api/typeobj.rst:1069 @@ -1881,8 +1897,8 @@ msgstr "" #: ../../c-api/typeobj.rst:1094 msgid "" "This bit is set when the object supports garbage collection. If this bit is " -"set, instances must be created using :c:func:`PyObject_GC_New` and destroyed " -"using :c:func:`PyObject_GC_Del`. More information in section :ref:" +"set, instances must be created using :c:macro:`PyObject_GC_New` and " +"destroyed using :c:func:`PyObject_GC_Del`. More information in section :ref:" "`supporting-cycle-detection`. This bit also implies that the GC-related " "fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject." "tp_clear` are present in the type object." @@ -1891,16 +1907,18 @@ msgstr "" #: ../../c-api/typeobj.rst:1103 ../../c-api/typeobj.rst:1424 #: ../../c-api/typeobj.rst:1491 msgid "" -"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" +"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." +"tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" #: ../../c-api/typeobj.rst:1105 msgid "" -"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :" -"attr:`tp_traverse` and :attr:`tp_clear` fields, i.e. if the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :attr:" -"`tp_traverse` and :attr:`tp_clear` fields in the subtype exist and have " -"``NULL`` values." +"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" +"member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " +"fields, i.e. if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the " +"subtype and the :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields in the subtype exist and have ``NULL`` " +"values." msgstr "" #: ../../c-api/typeobj.rst:1115 @@ -1975,14 +1993,14 @@ msgstr "" #: ../../c-api/typeobj.rst:1178 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" -"`~PyObject.tp_itemsize`." +"`~PyTypeObject.tp_itemsize`." msgstr "" #: ../../c-api/typeobj.rst:1181 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " -"the end of the instance's memory area, at an offset of :c:expr:`Py_TYPE(obj)-" -">tp_basicsize` (which may be different in each subclass)." +"the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" +">tp_basicsize`` (which may be different in each subclass)." msgstr "" #: ../../c-api/typeobj.rst:1186 @@ -2168,8 +2186,8 @@ msgid "" "collector to detect reference cycles. A typical implementation of a :c:" "member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` " "on each of the instance's members that are Python objects that the instance " -"owns. For example, this is function :c:func:`local_traverse` from the :mod:" -"`_thread` extension module::" +"owns. For example, this is function :c:func:`!local_traverse` from the :mod:" +"`!_thread` extension module::" msgstr "" #: ../../c-api/typeobj.rst:1384 @@ -2327,68 +2345,44 @@ msgid "" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: ../../c-api/typeobj.rst:1517 +#: ../../c-api/typeobj.rst:1519 msgid "Constant" msgstr "常數" -#: ../../c-api/typeobj.rst:1517 +#: ../../c-api/typeobj.rst:1519 msgid "Comparison" msgstr "" -#: ../../c-api/typeobj.rst:1519 -msgid ":c:macro:`Py_LT`" -msgstr ":c:macro:`Py_LT`" - -#: ../../c-api/typeobj.rst:1519 +#: ../../c-api/typeobj.rst:1521 msgid "``<``" msgstr "``<``" -#: ../../c-api/typeobj.rst:1521 -msgid ":c:macro:`Py_LE`" -msgstr ":c:macro:`Py_LE`" - -#: ../../c-api/typeobj.rst:1521 +#: ../../c-api/typeobj.rst:1523 msgid "``<=``" msgstr "``<=``" -#: ../../c-api/typeobj.rst:1523 -msgid ":c:macro:`Py_EQ`" -msgstr ":c:macro:`Py_EQ`" - -#: ../../c-api/typeobj.rst:1523 +#: ../../c-api/typeobj.rst:1525 msgid "``==``" msgstr "``==``" -#: ../../c-api/typeobj.rst:1525 -msgid ":c:macro:`Py_NE`" -msgstr ":c:macro:`Py_NE`" - -#: ../../c-api/typeobj.rst:1525 +#: ../../c-api/typeobj.rst:1527 msgid "``!=``" msgstr "``!=``" -#: ../../c-api/typeobj.rst:1527 -msgid ":c:macro:`Py_GT`" -msgstr ":c:macro:`Py_GT`" - -#: ../../c-api/typeobj.rst:1527 +#: ../../c-api/typeobj.rst:1529 msgid "``>``" msgstr "``>``" -#: ../../c-api/typeobj.rst:1529 -msgid ":c:macro:`Py_GE`" -msgstr ":c:macro:`Py_GE`" - -#: ../../c-api/typeobj.rst:1529 +#: ../../c-api/typeobj.rst:1531 msgid "``>=``" msgstr "``>=``" -#: ../../c-api/typeobj.rst:1532 +#: ../../c-api/typeobj.rst:1534 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: ../../c-api/typeobj.rst:1536 +#: ../../c-api/typeobj.rst:1538 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2396,15 +2390,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: ../../c-api/typeobj.rst:1542 +#: ../../c-api/typeobj.rst:1544 msgid "The return value's reference count is properly incremented." msgstr "" -#: ../../c-api/typeobj.rst:1544 +#: ../../c-api/typeobj.rst:1546 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: ../../c-api/typeobj.rst:1552 +#: ../../c-api/typeobj.rst:1554 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2412,21 +2406,22 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1559 +#: ../../c-api/typeobj.rst:1561 msgid "" -":c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` " -"implementation, which may be inherited. However, if only :attr:`tp_hash` is " -"defined, not even the inherited function is used and instances of the type " -"will not be able to participate in any comparisons." +":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." +"tp_richcompare` implementation, which may be inherited. However, if only :c:" +"member:`~PyTypeObject.tp_hash` is defined, not even the inherited function " +"is used and instances of the type will not be able to participate in any " +"comparisons." msgstr "" -#: ../../c-api/typeobj.rst:1568 +#: ../../c-api/typeobj.rst:1570 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1571 +#: ../../c-api/typeobj.rst:1573 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2436,19 +2431,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1578 +#: ../../c-api/typeobj.rst:1580 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1581 +#: ../../c-api/typeobj.rst:1583 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" -#: ../../c-api/typeobj.rst:1586 +#: ../../c-api/typeobj.rst:1588 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2457,7 +2452,7 @@ msgid "" "not be a problem." msgstr "" -#: ../../c-api/typeobj.rst:1593 +#: ../../c-api/typeobj.rst:1595 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject." @@ -2465,24 +2460,24 @@ msgid "" "unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1601 +#: ../../c-api/typeobj.rst:1603 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: ../../c-api/typeobj.rst:1605 +#: ../../c-api/typeobj.rst:1607 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: ../../c-api/typeobj.rst:1616 +#: ../../c-api/typeobj.rst:1618 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1621 +#: ../../c-api/typeobj.rst:1623 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2490,74 +2485,74 @@ msgid "" "this type are iterators." msgstr "" -#: ../../c-api/typeobj.rst:1626 +#: ../../c-api/typeobj.rst:1628 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: ../../c-api/typeobj.rst:1630 +#: ../../c-api/typeobj.rst:1632 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: ../../c-api/typeobj.rst:1639 +#: ../../c-api/typeobj.rst:1641 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: ../../c-api/typeobj.rst:1642 +#: ../../c-api/typeobj.rst:1644 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1647 +#: ../../c-api/typeobj.rst:1649 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1653 +#: ../../c-api/typeobj.rst:1655 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: ../../c-api/typeobj.rst:1657 +#: ../../c-api/typeobj.rst:1659 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1662 +#: ../../c-api/typeobj.rst:1664 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1668 +#: ../../c-api/typeobj.rst:1670 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: ../../c-api/typeobj.rst:1671 +#: ../../c-api/typeobj.rst:1673 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1676 +#: ../../c-api/typeobj.rst:1678 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1682 +#: ../../c-api/typeobj.rst:1684 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2565,7 +2560,7 @@ msgid "" "metatype." msgstr "" -#: ../../c-api/typeobj.rst:1690 +#: ../../c-api/typeobj.rst:1692 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2573,7 +2568,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: ../../c-api/typeobj.rst:1695 +#: ../../c-api/typeobj.rst:1697 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "func:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2581,95 +2576,95 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: ../../c-api/typeobj.rst:1701 +#: ../../c-api/typeobj.rst:1703 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: ../../c-api/typeobj.rst:1706 +#: ../../c-api/typeobj.rst:1708 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: ../../c-api/typeobj.rst:1710 +#: ../../c-api/typeobj.rst:1712 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: ../../c-api/typeobj.rst:1716 +#: ../../c-api/typeobj.rst:1718 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1718 +#: ../../c-api/typeobj.rst:1720 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " "attributes for the type. Once :c:func:`PyType_Ready` has initialized the " "type, extra attributes for the type may be added to this dictionary only if " -"they don't correspond to overloaded operations (like :meth:`__add__`). Once " -"initialization for the type has finished, this field should be treated as " -"read-only." +"they don't correspond to overloaded operations (like :meth:`~object." +"__add__`). Once initialization for the type has finished, this field should " +"be treated as read-only." msgstr "" -#: ../../c-api/typeobj.rst:1726 +#: ../../c-api/typeobj.rst:1728 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retreive the dictionary for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1732 +#: ../../c-api/typeobj.rst:1734 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1738 +#: ../../c-api/typeobj.rst:1740 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1743 +#: ../../c-api/typeobj.rst:1745 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: ../../c-api/typeobj.rst:1748 +#: ../../c-api/typeobj.rst:1750 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: ../../c-api/typeobj.rst:1754 +#: ../../c-api/typeobj.rst:1756 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: ../../c-api/typeobj.rst:1756 ../../c-api/typeobj.rst:1772 -#: ../../c-api/typeobj.rst:1836 ../../c-api/typeobj.rst:1866 -#: ../../c-api/typeobj.rst:1890 +#: ../../c-api/typeobj.rst:1758 ../../c-api/typeobj.rst:1774 +#: ../../c-api/typeobj.rst:1838 ../../c-api/typeobj.rst:1868 +#: ../../c-api/typeobj.rst:1892 msgid "The function signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1769 +#: ../../c-api/typeobj.rst:1771 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: ../../c-api/typeobj.rst:1776 +#: ../../c-api/typeobj.rst:1778 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: ../../c-api/typeobj.rst:1787 +#: ../../c-api/typeobj.rst:1789 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1790 +#: ../../c-api/typeobj.rst:1792 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2677,19 +2672,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1795 +#: ../../c-api/typeobj.rst:1797 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1798 +#: ../../c-api/typeobj.rst:1800 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: ../../c-api/typeobj.rst:1800 +#: ../../c-api/typeobj.rst:1802 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -2698,13 +2693,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: ../../c-api/typeobj.rst:1806 +#: ../../c-api/typeobj.rst:1808 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: ../../c-api/typeobj.rst:1811 +#: ../../c-api/typeobj.rst:1813 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -2712,39 +2707,40 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: ../../c-api/typeobj.rst:1818 +#: ../../c-api/typeobj.rst:1820 msgid "" "This slot has no default. For :ref:`static types `, if the " -"field is ``NULL`` then no :attr:`__dict__` gets created for instances." +"field is ``NULL`` then no :attr:`~object.__dict__` gets created for " +"instances." msgstr "" -#: ../../c-api/typeobj.rst:1821 +#: ../../c-api/typeobj.rst:1823 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1829 +#: ../../c-api/typeobj.rst:1831 msgid "An optional pointer to an instance initialization function." msgstr "" -#: ../../c-api/typeobj.rst:1831 +#: ../../c-api/typeobj.rst:1833 msgid "" -"This function corresponds to the :meth:`__init__` method of classes. Like :" -"meth:`__init__`, it is possible to create an instance without calling :meth:" -"`__init__`, and it is possible to reinitialize an instance by calling its :" -"meth:`__init__` method again." +"This function corresponds to the :meth:`~object.__init__` method of " +"classes. Like :meth:`!__init__`, it is possible to create an instance " +"without calling :meth:`!__init__`, and it is possible to reinitialize an " +"instance by calling its :meth:`!__init__` method again." msgstr "" -#: ../../c-api/typeobj.rst:1840 +#: ../../c-api/typeobj.rst:1842 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" -"`__init__`." +"`~object.__init__`." msgstr "" -#: ../../c-api/typeobj.rst:1844 +#: ../../c-api/typeobj.rst:1846 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2756,43 +2752,43 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: ../../c-api/typeobj.rst:1851 +#: ../../c-api/typeobj.rst:1853 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: ../../c-api/typeobj.rst:1859 +#: ../../c-api/typeobj.rst:1861 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: ../../c-api/typeobj.rst:1864 +#: ../../c-api/typeobj.rst:1866 msgid "An optional pointer to an instance allocation function." msgstr "" -#: ../../c-api/typeobj.rst:1872 +#: ../../c-api/typeobj.rst:1874 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: ../../c-api/typeobj.rst:1877 +#: ../../c-api/typeobj.rst:1879 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: ../../c-api/typeobj.rst:1881 +#: ../../c-api/typeobj.rst:1883 msgid "" -"For static subtypes, :c:type:`PyBaseObject_Type` uses :c:func:" +"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: ../../c-api/typeobj.rst:1888 +#: ../../c-api/typeobj.rst:1890 msgid "An optional pointer to an instance creation function." msgstr "" -#: ../../c-api/typeobj.rst:1894 +#: ../../c-api/typeobj.rst:1896 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2801,7 +2797,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: ../../c-api/typeobj.rst:1900 +#: ../../c-api/typeobj.rst:1902 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2813,20 +2809,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: ../../c-api/typeobj.rst:1908 +#: ../../c-api/typeobj.rst:1910 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: ../../c-api/typeobj.rst:1913 +#: ../../c-api/typeobj.rst:1915 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" -#: ../../c-api/typeobj.rst:1919 +#: ../../c-api/typeobj.rst:1921 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -2834,39 +2830,40 @@ msgid "" "factory function." msgstr "" -#: ../../c-api/typeobj.rst:1927 +#: ../../c-api/typeobj.rst:1929 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1931 +#: ../../c-api/typeobj.rst:1933 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: ../../c-api/typeobj.rst:1935 +#: ../../c-api/typeobj.rst:1937 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: ../../c-api/typeobj.rst:1940 +#: ../../c-api/typeobj.rst:1942 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" "func:`PyType_GenericAlloc` and the value of the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit." msgstr "" -#: ../../c-api/typeobj.rst:1944 -msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." +#: ../../c-api/typeobj.rst:1946 +msgid "" +"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`." msgstr "" -#: ../../c-api/typeobj.rst:1949 +#: ../../c-api/typeobj.rst:1951 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: ../../c-api/typeobj.rst:1951 +#: ../../c-api/typeobj.rst:1953 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -2878,89 +2875,89 @@ msgid "" "instance. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1961 +#: ../../c-api/typeobj.rst:1963 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" -#: ../../c-api/typeobj.rst:1971 +#: ../../c-api/typeobj.rst:1973 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: ../../c-api/typeobj.rst:1977 +#: ../../c-api/typeobj.rst:1979 msgid "Tuple of base types." msgstr "" -#: ../../c-api/typeobj.rst:1979 ../../c-api/typeobj.rst:2003 +#: ../../c-api/typeobj.rst:1981 ../../c-api/typeobj.rst:2005 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: ../../c-api/typeobj.rst:1982 +#: ../../c-api/typeobj.rst:1984 msgid "" "For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " "` can be used instead of the *bases* argument of :c:func:" "`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: ../../c-api/typeobj.rst:1989 +#: ../../c-api/typeobj.rst:1991 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: ../../c-api/typeobj.rst:1995 ../../c-api/typeobj.rst:2018 -#: ../../c-api/typeobj.rst:2035 ../../c-api/typeobj.rst:2052 -#: ../../c-api/typeobj.rst:2066 +#: ../../c-api/typeobj.rst:1997 ../../c-api/typeobj.rst:2020 +#: ../../c-api/typeobj.rst:2037 ../../c-api/typeobj.rst:2054 +#: ../../c-api/typeobj.rst:2068 msgid "This field is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:2000 +#: ../../c-api/typeobj.rst:2002 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: ../../c-api/typeobj.rst:2008 +#: ../../c-api/typeobj.rst:2010 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2014 +#: ../../c-api/typeobj.rst:2016 msgid "Unused. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2023 +#: ../../c-api/typeobj.rst:2025 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: ../../c-api/typeobj.rst:2025 +#: ../../c-api/typeobj.rst:2027 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__`." msgstr "" -#: ../../c-api/typeobj.rst:2030 +#: ../../c-api/typeobj.rst:2032 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: ../../c-api/typeobj.rst:2040 +#: ../../c-api/typeobj.rst:2042 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2045 +#: ../../c-api/typeobj.rst:2047 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -2968,21 +2965,21 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: ../../c-api/typeobj.rst:2057 +#: ../../c-api/typeobj.rst:2059 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: ../../c-api/typeobj.rst:2062 +#: ../../c-api/typeobj.rst:2064 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2071 +#: ../../c-api/typeobj.rst:2073 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2075 +#: ../../c-api/typeobj.rst:2077 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -2992,14 +2989,14 @@ msgid "" "object in a sane state." msgstr "" -#: ../../c-api/typeobj.rst:2082 +#: ../../c-api/typeobj.rst:2084 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: ../../c-api/typeobj.rst:2099 +#: ../../c-api/typeobj.rst:2101 msgid "" "Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." "tp_dealloc` may be called from any Python thread, not just the thread which " @@ -3012,84 +3009,84 @@ msgid "" "which called tp_dealloc will not violate any assumptions of the library." msgstr "" -#: ../../c-api/typeobj.rst:2118 +#: ../../c-api/typeobj.rst:2120 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: ../../c-api/typeobj.rst:2122 +#: ../../c-api/typeobj.rst:2124 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: ../../c-api/typeobj.rst:2127 +#: ../../c-api/typeobj.rst:2129 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " "If ``tp_vectorcall`` is ``NULL``, the default call implementation using :" -"attr:`__new__` and :attr:`__init__` is used." +"meth:`~object.__new__` and :meth:`~object.__init__` is used." msgstr "" -#: ../../c-api/typeobj.rst:2135 +#: ../../c-api/typeobj.rst:2137 msgid "This field is never inherited." msgstr "" -#: ../../c-api/typeobj.rst:2137 +#: ../../c-api/typeobj.rst:2139 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: ../../c-api/typeobj.rst:2142 +#: ../../c-api/typeobj.rst:2144 msgid "Internal. Do not use." msgstr "" -#: ../../c-api/typeobj.rst:2150 +#: ../../c-api/typeobj.rst:2152 msgid "Static Types" msgstr "" -#: ../../c-api/typeobj.rst:2152 +#: ../../c-api/typeobj.rst:2154 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2156 +#: ../../c-api/typeobj.rst:2158 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: ../../c-api/typeobj.rst:2158 +#: ../../c-api/typeobj.rst:2160 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: ../../c-api/typeobj.rst:2160 +#: ../../c-api/typeobj.rst:2162 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: ../../c-api/typeobj.rst:2162 +#: ../../c-api/typeobj.rst:2164 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: ../../c-api/typeobj.rst:2166 +#: ../../c-api/typeobj.rst:2168 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: ../../c-api/typeobj.rst:2174 +#: ../../c-api/typeobj.rst:2176 msgid "Heap Types" msgstr "" -#: ../../c-api/typeobj.rst:2176 +#: ../../c-api/typeobj.rst:2178 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -3097,29 +3094,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: ../../c-api/typeobj.rst:2181 +#: ../../c-api/typeobj.rst:2183 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: ../../c-api/typeobj.rst:2189 +#: ../../c-api/typeobj.rst:2191 msgid "Number Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2196 +#: ../../c-api/typeobj.rst:2198 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: ../../c-api/typeobj.rst:2202 ../../c-api/typeobj.rst:2526 +#: ../../c-api/typeobj.rst:2204 ../../c-api/typeobj.rst:2528 msgid "Here is the structure definition::" msgstr "" -#: ../../c-api/typeobj.rst:2249 +#: ../../c-api/typeobj.rst:2251 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3129,31 +3126,31 @@ msgid "" "and set an exception." msgstr "" -#: ../../c-api/typeobj.rst:2258 +#: ../../c-api/typeobj.rst:2260 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: ../../c-api/typeobj.rst:2303 +#: ../../c-api/typeobj.rst:2305 msgid "Mapping Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2310 +#: ../../c-api/typeobj.rst:2312 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: ../../c-api/typeobj.rst:2315 +#: ../../c-api/typeobj.rst:2317 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: ../../c-api/typeobj.rst:2321 +#: ../../c-api/typeobj.rst:2323 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3161,27 +3158,27 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2329 +#: ../../c-api/typeobj.rst:2331 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" -"`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and :c:func:" -"`PyObject_DelSlice`. It has the same signature as :c:func:`!" +"`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" +"`PySequence_DelSlice`. It has the same signature as :c:func:`!" "PyObject_SetItem`, but *v* can also be set to ``NULL`` to delete an item. " "If this slot is ``NULL``, the object does not support item assignment and " "deletion." msgstr "" -#: ../../c-api/typeobj.rst:2340 +#: ../../c-api/typeobj.rst:2342 msgid "Sequence Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2347 +#: ../../c-api/typeobj.rst:2349 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: ../../c-api/typeobj.rst:2352 +#: ../../c-api/typeobj.rst:2354 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3189,21 +3186,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: ../../c-api/typeobj.rst:2359 +#: ../../c-api/typeobj.rst:2361 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2365 +#: ../../c-api/typeobj.rst:2367 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2371 +#: ../../c-api/typeobj.rst:2373 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3212,15 +3209,16 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2377 +#: ../../c-api/typeobj.rst:2379 msgid "" -"Negative indexes are handled as follows: if the :attr:`sq_length` slot is " -"filled, it is called and the sequence length is used to compute a positive " -"index which is passed to :attr:`sq_item`. If :attr:`sq_length` is ``NULL``, " -"the index is passed as is to the function." +"Negative indexes are handled as follows: if the :c:member:" +"`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " +"length is used to compute a positive index which is passed to :c:member:" +"`~PySequenceMethods.sq_item`. If :c:member:`!sq_length` is ``NULL``, the " +"index is passed as is to the function." msgstr "" -#: ../../c-api/typeobj.rst:2384 +#: ../../c-api/typeobj.rst:2386 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3229,14 +3227,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: ../../c-api/typeobj.rst:2393 +#: ../../c-api/typeobj.rst:2395 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: ../../c-api/typeobj.rst:2400 +#: ../../c-api/typeobj.rst:2402 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3246,7 +3244,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2409 +#: ../../c-api/typeobj.rst:2411 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3256,72 +3254,72 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2420 +#: ../../c-api/typeobj.rst:2422 msgid "Buffer Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2428 +#: ../../c-api/typeobj.rst:2430 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: ../../c-api/typeobj.rst:2434 ../../c-api/typeobj.rst:2483 -#: ../../c-api/typeobj.rst:2537 ../../c-api/typeobj.rst:2548 -#: ../../c-api/typeobj.rst:2560 ../../c-api/typeobj.rst:2569 +#: ../../c-api/typeobj.rst:2436 ../../c-api/typeobj.rst:2485 +#: ../../c-api/typeobj.rst:2539 ../../c-api/typeobj.rst:2550 +#: ../../c-api/typeobj.rst:2562 ../../c-api/typeobj.rst:2572 msgid "The signature of this function is::" msgstr "" -#: ../../c-api/typeobj.rst:2438 +#: ../../c-api/typeobj.rst:2440 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: ../../c-api/typeobj.rst:2442 +#: ../../c-api/typeobj.rst:2444 msgid "" "Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " "set :c:expr:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:2445 +#: ../../c-api/typeobj.rst:2447 msgid "Fill in the requested fields." msgstr "" -#: ../../c-api/typeobj.rst:2447 +#: ../../c-api/typeobj.rst:2449 msgid "Increment an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2449 +#: ../../c-api/typeobj.rst:2451 msgid "" "Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." msgstr "" -#: ../../c-api/typeobj.rst:2451 +#: ../../c-api/typeobj.rst:2453 msgid "Return ``0``." msgstr "" -#: ../../c-api/typeobj.rst:2453 +#: ../../c-api/typeobj.rst:2455 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: ../../c-api/typeobj.rst:2456 +#: ../../c-api/typeobj.rst:2458 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "expr:`view->obj` to a new reference to itself." msgstr "" -#: ../../c-api/typeobj.rst:2459 +#: ../../c-api/typeobj.rst:2461 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:expr:`view->obj` will be a new reference to the root object." msgstr "" -#: ../../c-api/typeobj.rst:2463 +#: ../../c-api/typeobj.rst:2465 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3329,7 +3327,7 @@ msgid "" "types>`." msgstr "" -#: ../../c-api/typeobj.rst:2468 +#: ../../c-api/typeobj.rst:2470 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3338,19 +3336,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: ../../c-api/typeobj.rst:2475 +#: ../../c-api/typeobj.rst:2477 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: ../../c-api/typeobj.rst:2478 +#: ../../c-api/typeobj.rst:2480 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: ../../c-api/typeobj.rst:2487 +#: ../../c-api/typeobj.rst:2489 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3358,15 +3356,15 @@ msgid "" "these optional steps:" msgstr "" -#: ../../c-api/typeobj.rst:2492 +#: ../../c-api/typeobj.rst:2494 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2494 +#: ../../c-api/typeobj.rst:2496 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: ../../c-api/typeobj.rst:2496 +#: ../../c-api/typeobj.rst:2498 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3374,155 +3372,155 @@ msgid "" "*view* argument." msgstr "" -#: ../../c-api/typeobj.rst:2502 +#: ../../c-api/typeobj.rst:2504 msgid "" "This function MUST NOT decrement :c:expr:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: ../../c-api/typeobj.rst:2507 +#: ../../c-api/typeobj.rst:2509 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: ../../c-api/typeobj.rst:2515 +#: ../../c-api/typeobj.rst:2517 msgid "Async Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2523 +#: ../../c-api/typeobj.rst:2525 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: ../../c-api/typeobj.rst:2541 +#: ../../c-api/typeobj.rst:2543 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: ../../c-api/typeobj.rst:2544 +#: ../../c-api/typeobj.rst:2546 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: ../../c-api/typeobj.rst:2552 +#: ../../c-api/typeobj.rst:2554 msgid "" -"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " -"for details." +"Must return an :term:`asynchronous iterator` object. See :meth:`~object." +"__anext__` for details." msgstr "" -#: ../../c-api/typeobj.rst:2555 +#: ../../c-api/typeobj.rst:2557 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: ../../c-api/typeobj.rst:2564 +#: ../../c-api/typeobj.rst:2566 msgid "" -"Must return an :term:`awaitable` object. See :meth:`__anext__` for details. " -"This slot may be set to ``NULL``." +"Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " +"details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2573 +#: ../../c-api/typeobj.rst:2576 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2582 +#: ../../c-api/typeobj.rst:2585 msgid "Slot Type typedefs" msgstr "" -#: ../../c-api/typeobj.rst:2586 +#: ../../c-api/typeobj.rst:2589 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " "length for the instance, suitably aligned, and initialized to zeros, but " -"with :attr:`ob_refcnt` set to ``1`` and :attr:`ob_type` set to the type " -"argument. If the type's :c:member:`~PyTypeObject.tp_itemsize` is non-zero, " -"the object's :attr:`ob_size` field should be initialized to *nitems* and the " -"length of the allocated memory block should be ``tp_basicsize + " -"nitems*tp_itemsize``, rounded up to a multiple of ``sizeof(void*)``; " -"otherwise, *nitems* is not used and the length of the block should be :c:" -"member:`~PyTypeObject.tp_basicsize`." +"with :c:member:`~PyObject.ob_refcnt` set to ``1`` and :c:member:`~PyObject." +"ob_type` set to the type argument. If the type's :c:member:`~PyTypeObject." +"tp_itemsize` is non-zero, the object's :c:member:`~PyVarObject.ob_size` " +"field should be initialized to *nitems* and the length of the allocated " +"memory block should be ``tp_basicsize + nitems*tp_itemsize``, rounded up to " +"a multiple of ``sizeof(void*)``; otherwise, *nitems* is not used and the " +"length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/typeobj.rst:2596 +#: ../../c-api/typeobj.rst:2599 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: ../../c-api/typeobj.rst:2603 +#: ../../c-api/typeobj.rst:2606 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "請見 :c:member:`~PyTypeObject.tp_free`。" -#: ../../c-api/typeobj.rst:2607 +#: ../../c-api/typeobj.rst:2610 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "請見 :c:member:`~PyTypeObject.tp_new`。" -#: ../../c-api/typeobj.rst:2611 +#: ../../c-api/typeobj.rst:2614 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "請見 :c:member:`~PyTypeObject.tp_init`。" -#: ../../c-api/typeobj.rst:2615 +#: ../../c-api/typeobj.rst:2618 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "請見 :c:member:`~PyTypeObject.tp_repr`。" -#: ../../c-api/typeobj.rst:2619 ../../c-api/typeobj.rst:2628 +#: ../../c-api/typeobj.rst:2622 ../../c-api/typeobj.rst:2631 msgid "Return the value of the named attribute for the object." msgstr "" -#: ../../c-api/typeobj.rst:2623 ../../c-api/typeobj.rst:2634 +#: ../../c-api/typeobj.rst:2626 ../../c-api/typeobj.rst:2637 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: ../../c-api/typeobj.rst:2630 +#: ../../c-api/typeobj.rst:2633 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`。" -#: ../../c-api/typeobj.rst:2637 +#: ../../c-api/typeobj.rst:2640 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`。" -#: ../../c-api/typeobj.rst:2641 +#: ../../c-api/typeobj.rst:2644 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_get`。" -#: ../../c-api/typeobj.rst:2645 +#: ../../c-api/typeobj.rst:2648 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_set`。" -#: ../../c-api/typeobj.rst:2649 +#: ../../c-api/typeobj.rst:2652 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "請見 :c:member:`~PyTypeObject.tp_hash`。" -#: ../../c-api/typeobj.rst:2653 +#: ../../c-api/typeobj.rst:2656 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`。" -#: ../../c-api/typeobj.rst:2657 +#: ../../c-api/typeobj.rst:2660 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "請見 :c:member:`~PyTypeObject.tp_iter`。" -#: ../../c-api/typeobj.rst:2661 +#: ../../c-api/typeobj.rst:2664 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`。" -#: ../../c-api/typeobj.rst:2675 +#: ../../c-api/typeobj.rst:2678 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "請見 :c:member:`~PyAsyncMethods.am_send`。" -#: ../../c-api/typeobj.rst:2691 +#: ../../c-api/typeobj.rst:2694 msgid "Examples" msgstr "範例" -#: ../../c-api/typeobj.rst:2693 +#: ../../c-api/typeobj.rst:2696 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3530,33 +3528,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: ../../c-api/typeobj.rst:2698 +#: ../../c-api/typeobj.rst:2701 msgid "A basic :ref:`static type `::" msgstr "" -#: ../../c-api/typeobj.rst:2715 +#: ../../c-api/typeobj.rst:2718 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: ../../c-api/typeobj.rst:2759 +#: ../../c-api/typeobj.rst:2762 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: ../../c-api/typeobj.rst:2784 +#: ../../c-api/typeobj.rst:2787 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: ../../c-api/typeobj.rst:2803 +#: ../../c-api/typeobj.rst:2806 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: ../../c-api/typeobj.rst:2814 +#: ../../c-api/typeobj.rst:2817 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" diff --git a/c-api/unicode.po b/c-api/unicode.po index ad1c353b75..7739b467b3 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -9,7 +9,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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -796,8 +796,8 @@ msgstr "" #: ../../c-api/unicode.rst:610 msgid "" "Copy characters from one Unicode object into another. This function " -"performs character conversion when necessary and falls back to :c:func:" -"`memcpy` if possible. Returns ``-1`` and sets an exception on error, " +"performs character conversion when necessary and falls back to :c:func:`!" +"memcpy` if possible. Returns ``-1`` and sets an exception on error, " "otherwise returns the number of copied characters." msgstr "" @@ -906,7 +906,7 @@ msgstr "" #: ../../c-api/unicode.rst:723 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " -"length using :c:func:`strlen`." +"length using :c:func:`!strlen`." msgstr "" #: ../../c-api/unicode.rst:731 @@ -1065,7 +1065,7 @@ msgstr "" #: ../../c-api/unicode.rst:882 msgid "" -"Returns a buffer allocated by :c:func:`PyMem_New` (use :c:func:`PyMem_Free` " +"Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " "to free it) on success. On error, returns ``NULL`` and *\\*size* is " "undefined. Raises a :exc:`MemoryError` if memory allocation is failed." msgstr "" @@ -1429,10 +1429,10 @@ msgstr "" msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " -"codecs included in the :mod:`encodings` package). The codec uses mappings to " -"encode and decode characters. The mapping objects provided must support " -"the :meth:`__getitem__` mapping interface; dictionaries and sequences work " -"well." +"codecs included in the :mod:`!encodings` package). The codec uses mappings " +"to encode and decode characters. The mapping objects provided must support " +"the :meth:`~object.__getitem__` mapping interface; dictionaries and " +"sequences work well." msgstr "" #: ../../c-api/unicode.rst:1219 @@ -1490,7 +1490,7 @@ msgstr "" #: ../../c-api/unicode.rst:1260 msgid "" -"Mapping tables need only provide the :meth:`__getitem__` interface; " +"Mapping tables need only provide the :meth:`~object.__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index a2b365a7f3..2179083511 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -7,7 +7,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: 2023-07-28 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -389,9 +389,9 @@ msgstr "" #: ../../c-api/veryhigh.rst:356 msgid "" -"Whenever ``PyCompilerFlags *flags`` is ``NULL``, :attr:`cf_flags` is treated " -"as equal to ``0``, and any modification due to ``from __future__ import`` is " -"discarded." +"Whenever ``PyCompilerFlags *flags`` is ``NULL``, :c:member:`~PyCompilerFlags." +"cf_flags` is treated as equal to ``0``, and any modification due to ``from " +"__future__ import`` is discarded." msgstr "" #: ../../c-api/veryhigh.rst:362 @@ -407,7 +407,7 @@ msgstr "" #: ../../c-api/veryhigh.rst:369 msgid "" "The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " -"flag is set in *cf_flags*." +"flag is set in :c:member:`~PyCompilerFlags.cf_flags`." msgstr "" #: ../../c-api/veryhigh.rst:372 diff --git a/c-api/weakref.po b/c-api/weakref.po index 9afb921434..9b51f1de97 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-26 00:17+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -73,7 +73,7 @@ msgstr "" #: ../../c-api/weakref.rst:56 msgid "" "Return the referenced object from a weak reference, *ref*. If the referent " -"is no longer live, returns :const:`Py_None`." +"is no longer live, returns ``Py_None``." msgstr "" #: ../../c-api/weakref.rst:61 diff --git a/extending/embedding.po b/extending/embedding.po index 7195772150..eada804fa8 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: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -253,9 +253,9 @@ msgstr "" #: ../../extending/embedding.rst:252 msgid "" -"These two lines initialize the ``numargs`` variable, and make the :func:`emb." -"numargs` function accessible to the embedded Python interpreter. With these " -"extensions, the Python script can do things like" +"These two lines initialize the ``numargs`` variable, and make the :func:`!" +"emb.numargs` function accessible to the embedded Python interpreter. With " +"these extensions, the Python script can do things like" msgstr "" #: ../../extending/embedding.rst:261 diff --git a/extending/extending.po b/extending/extending.po index cd754900a3..958e723db0 100644 --- a/extending/extending.po +++ b/extending/extending.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: 2023-07-29 00:03+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-" @@ -268,7 +268,7 @@ msgid "" "as :c:data:`PyExc_ZeroDivisionError`, which you can use directly. Of course, " "you should choose exceptions wisely --- don't use :c:data:`PyExc_TypeError` " "to mean that a file couldn't be opened (that should probably be :c:data:" -"`PyExc_IOError`). If something's wrong with the argument list, the :c:func:" +"`PyExc_OSError`). If something's wrong with the argument list, the :c:func:" "`PyArg_ParseTuple` function usually raises :c:data:`PyExc_TypeError`. If " "you have an argument whose value must be in a particular range or must " "satisfy other conditions, :c:data:`PyExc_ValueError` is appropriate." @@ -282,13 +282,13 @@ msgstr "" #: ../../extending/extending.rst:209 msgid "" -"and initialize it in your module's initialization function (:c:func:" -"`PyInit_spam`) with an exception object::" +"and initialize it in your module's initialization function (:c:func:`!" +"PyInit_spam`) with an exception object::" msgstr "" #: ../../extending/extending.rst:233 msgid "" -"Note that the Python name for the exception object is :exc:`spam.error`. " +"Note that the Python name for the exception object is :exc:`!spam.error`. " "The :c:func:`PyErr_NewException` function may create a class with the base " "class being :exc:`Exception` (unless another class is passed in instead of " "``NULL``), described in :ref:`bltin-exceptions`." @@ -313,8 +313,8 @@ msgstr "" #: ../../extending/extending.rst:248 msgid "" -"The :exc:`spam.error` exception can be raised in your extension module using " -"a call to :c:func:`PyErr_SetString` as shown below::" +"The :exc:`!spam.error` exception can be raised in your extension module " +"using a call to :c:func:`PyErr_SetString` as shown below::" msgstr "" #: ../../extending/extending.rst:271 @@ -378,8 +378,8 @@ msgstr "" #: ../../extending/extending.rst:318 msgid "" -"I promised to show how :c:func:`spam_system` is called from Python programs. " -"First, we need to list its name and address in a \"method table\"::" +"I promised to show how :c:func:`!spam_system` is called from Python " +"programs. First, we need to list its name and address in a \"method table\"::" msgstr "" #: ../../extending/extending.rst:329 @@ -416,7 +416,7 @@ msgstr "" msgid "" "This structure, in turn, must be passed to the interpreter in the module's " "initialization function. The initialization function must be named :c:func:" -"`PyInit_name`, where *name* is the name of the module, and should be the " +"`!PyInit_name`, where *name* is the name of the module, and should be the " "only non-\\ ``static`` item defined in the module file::" msgstr "" @@ -429,8 +429,8 @@ msgstr "" #: ../../extending/extending.rst:370 msgid "" -"When the Python program imports module :mod:`spam` for the first time, :c:" -"func:`PyInit_spam` is called. (See below for comments about embedding " +"When the Python program imports module :mod:`!spam` for the first time, :c:" +"func:`!PyInit_spam` is called. (See below for comments about embedding " "Python.) It calls :c:func:`PyModule_Create`, which returns a module object, " "and inserts built-in function objects into the newly created module based " "upon the table (an array of :c:type:`PyMethodDef` structures) found in the " @@ -443,7 +443,7 @@ msgstr "" #: ../../extending/extending.rst:381 msgid "" -"When embedding Python, the :c:func:`PyInit_spam` function is not called " +"When embedding Python, the :c:func:`!PyInit_spam` function is not called " "automatically unless there's an entry in the :c:data:`PyImport_Inittab` " "table. To add the module to the initialization table, use :c:func:" "`PyImport_AppendInittab`, optionally followed by an import of the module::" @@ -987,16 +987,16 @@ msgid "" "references to all its items, so when item 1 is replaced, it has to dispose " "of the original item 1. Now let's suppose the original item 1 was an " "instance of a user-defined class, and let's further suppose that the class " -"defined a :meth:`__del__` method. If this class instance has a reference " -"count of 1, disposing of it will call its :meth:`__del__` method." +"defined a :meth:`!__del__` method. If this class instance has a reference " +"count of 1, disposing of it will call its :meth:`!__del__` method." msgstr "" #: ../../extending/extending.rst:1036 msgid "" -"Since it is written in Python, the :meth:`__del__` method can execute " +"Since it is written in Python, the :meth:`!__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " -"reference to ``item`` in :c:func:`bug`? You bet! Assuming that the list " -"passed into :c:func:`bug` is accessible to the :meth:`__del__` method, it " +"reference to ``item`` in :c:func:`!bug`? You bet! Assuming that the list " +"passed into :c:func:`!bug` is accessible to the :meth:`!__del__` method, it " "could execute a statement to the effect of ``del list[0]``, and assuming " "this was the last reference to that object, it would free the memory " "associated with it, thereby invalidating ``item``." @@ -1012,7 +1012,7 @@ msgstr "" msgid "" "This is a true story. An older version of Python contained variants of this " "bug and someone spent a considerable amount of time in a C debugger to " -"figure out why his :meth:`__del__` methods would fail..." +"figure out why his :meth:`!__del__` methods would fail..." msgstr "" #: ../../extending/extending.rst:1062 @@ -1197,22 +1197,23 @@ msgstr "" #: ../../extending/extending.rst:1211 msgid "" -"The exporting module is a modification of the :mod:`spam` module from " -"section :ref:`extending-simpleexample`. The function :func:`spam.system` " +"The exporting module is a modification of the :mod:`!spam` module from " +"section :ref:`extending-simpleexample`. The function :func:`!spam.system` " "does not call the C library function :c:func:`system` directly, but a " -"function :c:func:`PySpam_System`, which would of course do something more " +"function :c:func:`!PySpam_System`, which would of course do something more " "complicated in reality (such as adding \"spam\" to every command). This " -"function :c:func:`PySpam_System` is also exported to other extension modules." +"function :c:func:`!PySpam_System` is also exported to other extension " +"modules." msgstr "" #: ../../extending/extending.rst:1218 msgid "" -"The function :c:func:`PySpam_System` is a plain C function, declared " +"The function :c:func:`!PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" #: ../../extending/extending.rst:1227 -msgid "The function :c:func:`spam_system` is modified in a trivial way::" +msgid "The function :c:func:`!spam_system` is modified in a trivial way::" msgstr "" #: ../../extending/extending.rst:1241 @@ -1234,7 +1235,7 @@ msgstr "" #: ../../extending/extending.rst:1280 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " -"would disappear when :func:`PyInit_spam` terminates!" +"would disappear when :c:func:`!PyInit_spam` terminates!" msgstr "" #: ../../extending/extending.rst:1283 @@ -1246,8 +1247,8 @@ msgstr "" #: ../../extending/extending.rst:1334 msgid "" "All that a client module must do in order to have access to the function :c:" -"func:`PySpam_System` is to call the function (or rather macro) :c:func:" -"`import_spam` in its initialization function::" +"func:`!PySpam_System` is to call the function (or rather macro) :c:func:`!" +"import_spam` in its initialization function::" msgstr "" #: ../../extending/extending.rst:1352 diff --git a/extending/newtypes.po b/extending/newtypes.po index ae549979a1..d352b52139 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: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -270,8 +270,8 @@ msgstr "" msgid "" "One entry should be defined for each method provided by the type; no entries " "are needed for methods inherited from a base type. One additional entry is " -"needed at the end; it is a sentinel that marks the end of the array. The :" -"attr:`ml_name` field of the sentinel must be ``NULL``." +"needed at the end; it is a sentinel that marks the end of the array. The :c:" +"member:`~PyMethodDef.ml_name` field of the sentinel must be ``NULL``." msgstr "" #: ../../extending/newtypes.rst:275 @@ -286,11 +286,12 @@ msgstr "" msgid "" "For each entry in the table, a :term:`descriptor` will be constructed and " "added to the type which will be able to extract a value from the instance " -"structure. The :attr:`type` field should contain a type code like :c:macro:" -"`Py_T_INT` or :c:macro:`Py_T_DOUBLE`; the value will be used to determine " -"how to convert Python values to and from C values. The :attr:`flags` field " -"is used to store flags which control how the attribute can be accessed: you " -"can set it to :c:macro:`Py_READONLY` to prevent Python code from setting it." +"structure. The :c:member:`~PyMemberDef.type` field should contain a type " +"code like :c:macro:`Py_T_INT` or :c:macro:`Py_T_DOUBLE`; the value will be " +"used to determine how to convert Python values to and from C values. The :c:" +"member:`~PyMemberDef.flags` field is used to store flags which control how " +"the attribute can be accessed: you can set it to :c:macro:`Py_READONLY` to " +"prevent Python code from setting it." msgstr "" #: ../../extending/newtypes.rst:295 @@ -306,7 +307,7 @@ msgstr "" #: ../../extending/newtypes.rst:301 msgid "" "As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry " -"with a :attr:`name` value of ``NULL`` is required." +"with a :c:member:`~PyMethodDef.name` value of ``NULL`` is required." msgstr "" #: ../../extending/newtypes.rst:315 @@ -328,7 +329,7 @@ msgstr "" msgid "" "The :c:member:`~PyTypeObject.tp_getattr` handler is called when the object " "requires an attribute look-up. It is called in the same situations where " -"the :meth:`__getattr__` method of a class would be called." +"the :meth:`~object.__getattr__` method of a class would be called." msgstr "" #: ../../extending/newtypes.rst:329 @@ -341,11 +342,11 @@ msgstr "" #: ../../extending/newtypes.rst:345 msgid "" "The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:" -"`__setattr__` or :meth:`__delattr__` method of a class instance would be " -"called. When an attribute should be deleted, the third parameter will be " -"``NULL``. Here is an example that simply raises an exception; if this were " -"really all you wanted, the :c:member:`~PyTypeObject.tp_setattr` handler " -"should be set to ``NULL``. ::" +"`~object.__setattr__` or :meth:`~object.__delattr__` method of a class " +"instance would be called. When an attribute should be deleted, the third " +"parameter will be ``NULL``. Here is an example that simply raises an " +"exception; if this were really all you wanted, the :c:member:`~PyTypeObject." +"tp_setattr` handler should be set to ``NULL``. ::" msgstr "" #: ../../extending/newtypes.rst:359 @@ -356,7 +357,7 @@ msgstr "" msgid "" "The :c:member:`~PyTypeObject.tp_richcompare` handler is called when " "comparisons are needed. It is analogous to the :ref:`rich comparison " -"methods `, like :meth:`__lt__`, and also called by :c:func:" +"methods `, like :meth:`!__lt__`, and also called by :c:func:" "`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." msgstr "" @@ -470,7 +471,7 @@ msgid "" "take exactly one parameter, the instance for which they are being called, " "and return a new reference. In the case of an error, they should set an " "exception and return ``NULL``. :c:member:`~PyTypeObject.tp_iter` " -"corresponds to the Python :meth:`__iter__` method, while :c:member:" +"corresponds to the Python :meth:`~object.__iter__` method, while :c:member:" "`~PyTypeObject.tp_iternext` corresponds to the Python :meth:`~iterator." "__next__` method." msgstr "" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index b1cbf67407..b28bcd6288 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,7 +5,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: 2023-07-29 00:03+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" @@ -53,8 +53,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:38 msgid "" "This sort of thing can only be explained by example, so here's a minimal, " -"but complete, module that defines a new type named :class:`Custom` inside a " -"C extension module :mod:`custom`:" +"but complete, module that defines a new type named :class:`!Custom` inside a " +"C extension module :mod:`!custom`:" msgstr "" #: ../../extending/newtypes_tutorial.rst:43 @@ -73,20 +73,20 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:53 msgid "" -"What a :class:`Custom` **object** contains: this is the ``CustomObject`` " -"struct, which is allocated once for each :class:`Custom` instance." +"What a :class:`!Custom` **object** contains: this is the ``CustomObject`` " +"struct, which is allocated once for each :class:`!Custom` instance." msgstr "" #: ../../extending/newtypes_tutorial.rst:55 msgid "" -"How the :class:`Custom` **type** behaves: this is the ``CustomType`` struct, " -"which defines a set of flags and function pointers that the interpreter " -"inspects when specific operations are requested." +"How the :class:`!Custom` **type** behaves: this is the ``CustomType`` " +"struct, which defines a set of flags and function pointers that the " +"interpreter inspects when specific operations are requested." msgstr "" #: ../../extending/newtypes_tutorial.rst:58 msgid "" -"How to initialize the :mod:`custom` module: this is the ``PyInit_custom`` " +"How to initialize the :mod:`!custom` module: this is the ``PyInit_custom`` " "function and the associated ``custommodule`` struct." msgstr "" @@ -156,16 +156,16 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:129 msgid "" "Note that the name is a dotted name that includes both the module name and " -"the name of the type within the module. The module in this case is :mod:" -"`custom` and the type is :class:`Custom`, so we set the type name to :class:" -"`custom.Custom`. Using the real dotted import path is important to make your " -"type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" +"the name of the type within the module. The module in this case is :mod:`!" +"custom` and the type is :class:`!Custom`, so we set the type name to :class:" +"`!custom.Custom`. Using the real dotted import path is important to make " +"your type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" msgstr "" #: ../../extending/newtypes_tutorial.rst:138 msgid "" "This is so that Python knows how much memory to allocate when creating new :" -"class:`Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " +"class:`!Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " "used for variable-sized objects and should otherwise be zero." msgstr "" @@ -175,9 +175,9 @@ msgid "" "same :c:member:`~PyTypeObject.tp_basicsize` as its base type, you may have " "problems with multiple inheritance. A Python subclass of your type will " "have to list your type first in its :attr:`~class.__bases__`, or else it " -"will not be able to call your type's :meth:`__new__` method without getting " -"an error. You can avoid this problem by ensuring that your type has a " -"larger value for :c:member:`~PyTypeObject.tp_basicsize` than its base type " +"will not be able to call your type's :meth:`~object.__new__` method without " +"getting an error. You can avoid this problem by ensuring that your type has " +"a larger value for :c:member:`~PyTypeObject.tp_basicsize` than its base type " "does. Most of the time, this will be true anyway, because either your base " "type will be :class:`object`, or else you will be adding data members to " "your base type, and therefore increasing its size." @@ -202,29 +202,29 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:166 msgid "" "To enable object creation, we have to provide a :c:member:`~PyTypeObject." -"tp_new` handler. This is the equivalent of the Python method :meth:" -"`__new__`, but has to be specified explicitly. In this case, we can just " -"use the default implementation provided by the API function :c:func:" +"tp_new` handler. This is the equivalent of the Python method :meth:`~object." +"__new__`, but has to be specified explicitly. In this case, we can just use " +"the default implementation provided by the API function :c:func:" "`PyType_GenericNew`. ::" msgstr "" #: ../../extending/newtypes_tutorial.rst:173 msgid "" "Everything else in the file should be familiar, except for some code in :c:" -"func:`PyInit_custom`::" +"func:`!PyInit_custom`::" msgstr "" #: ../../extending/newtypes_tutorial.rst:179 msgid "" -"This initializes the :class:`Custom` type, filling in a number of members to " -"the appropriate default values, including :attr:`ob_type` that we initially " -"set to ``NULL``. ::" +"This initializes the :class:`!Custom` type, filling in a number of members " +"to the appropriate default values, including :c:member:`~PyObject.ob_type` " +"that we initially set to ``NULL``. ::" msgstr "" #: ../../extending/newtypes_tutorial.rst:190 msgid "" "This adds the type to the module dictionary. This allows us to create :" -"class:`Custom` instances by calling the :class:`Custom` class:" +"class:`!Custom` instances by calling the :class:`!Custom` class:" msgstr "" #: ../../extending/newtypes_tutorial.rst:198 @@ -256,7 +256,7 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:223 msgid "" -"While this documentation showcases the standard :mod:`distutils` module for " +"While this documentation showcases the standard :mod:`!distutils` module for " "building C extensions, it is recommended in real-world use cases to use the " "newer and better-maintained ``setuptools`` library. Documentation on how to " "do this is out of scope for this document and can be found in the `Python " @@ -271,8 +271,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:233 msgid "" "Let's extend the basic example to add some data and methods. Let's also " -"make the type usable as a base class. We'll create a new module, :mod:" -"`custom2` that adds these capabilities:" +"make the type usable as a base class. We'll create a new module, :mod:`!" +"custom2` that adds these capabilities:" msgstr "" #: ../../extending/newtypes_tutorial.rst:240 @@ -281,7 +281,7 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:242 msgid "" -"The :class:`Custom` type now has three data attributes in its C struct, " +"The :class:`!Custom` type now has three data attributes in its C struct, " "*first*, *last*, and *number*. The *first* and *last* variables are Python " "strings containing first and last names. The *number* attribute is a C " "integer." @@ -308,8 +308,8 @@ msgid "" "``NULL`` (which might happen here if ``tp_new`` failed midway). It then " "calls the :c:member:`~PyTypeObject.tp_free` member of the object's type " "(computed by ``Py_TYPE(self)``) to free the object's memory. Note that the " -"object's type might not be :class:`CustomType`, because the object may be an " -"instance of a subclass." +"object's type might not be :class:`!CustomType`, because the object may be " +"an instance of a subclass." msgstr "" #: ../../extending/newtypes_tutorial.rst:279 @@ -335,11 +335,11 @@ msgstr "" msgid "" "The ``tp_new`` handler is responsible for creating (as opposed to " "initializing) objects of the type. It is exposed in Python as the :meth:" -"`__new__` method. It is not required to define a ``tp_new`` member, and " -"indeed many extension types will simply reuse :c:func:`PyType_GenericNew` as " -"done in the first version of the ``Custom`` type above. In this case, we " -"use the ``tp_new`` handler to initialize the ``first`` and ``last`` " -"attributes to non-``NULL`` default values." +"`~object.__new__` method. It is not required to define a ``tp_new`` member, " +"and indeed many extension types will simply reuse :c:func:" +"`PyType_GenericNew` as done in the first version of the :class:`!Custom` " +"type above. In this case, we use the ``tp_new`` handler to initialize the " +"``first`` and ``last`` attributes to non-``NULL`` default values." msgstr "" #: ../../extending/newtypes_tutorial.rst:321 @@ -381,8 +381,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:347 msgid "" "If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " -"that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:" -"`__new__`), you must *not* try to determine what method to call using method " +"that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:`~object." +"__new__`), you must *not* try to determine what method to call using method " "resolution order at runtime. Always statically determine what type you are " "going to call, and call its :c:member:`~PyTypeObject.tp_new` directly, or " "via ``type->tp_base->tp_new``. If you do not do this, Python subclasses of " @@ -404,17 +404,17 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:390 msgid "" "The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the :meth:" -"`__init__` method. It is used to initialize an object after it's created. " -"Initializers always accept positional and keyword arguments, and they should " -"return either ``0`` on success or ``-1`` on error." +"`~object.__init__` method. It is used to initialize an object after it's " +"created. Initializers always accept positional and keyword arguments, and " +"they should return either ``0`` on success or ``-1`` on error." msgstr "" #: ../../extending/newtypes_tutorial.rst:395 msgid "" "Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " "called at all (for example, the :mod:`pickle` module by default doesn't " -"call :meth:`__init__` on unpickled instances). It can also be called " -"multiple times. Anyone can call the :meth:`__init__` method on our " +"call :meth:`~object.__init__` on unpickled instances). It can also be " +"called multiple times. Anyone can call the :meth:`!__init__` method on our " "objects. For this reason, we have to be extra careful when assigning the " "new attribute values. We might be tempted, for example to assign the " "``first`` member like this::" @@ -485,14 +485,14 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:456 msgid "" -"We define a single method, :meth:`Custom.name()`, that outputs the objects " +"We define a single method, :meth:`!Custom.name()`, that outputs the objects " "name as the concatenation of the first and last names. ::" msgstr "" #: ../../extending/newtypes_tutorial.rst:473 msgid "" -"The method is implemented as a C function that takes a :class:`Custom` (or :" -"class:`Custom` subclass) instance as the first argument. Methods always " +"The method is implemented as a C function that takes a :class:`!Custom` (or :" +"class:`!Custom` subclass) instance as the first argument. Methods always " "take an instance as the first argument. Methods often take positional and " "keyword arguments as well, but in this case we don't take any and don't need " "to accept a positional argument tuple or keyword argument dictionary. This " @@ -501,8 +501,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:485 msgid "" -"Note that we have to check for the possibility that our :attr:`first` and :" -"attr:`last` members are ``NULL``. This is because they can be deleted, in " +"Note that we have to check for the possibility that our :attr:`!first` and :" +"attr:`!last` members are ``NULL``. This is because they can be deleted, in " "which case they are set to ``NULL``. It would be better to prevent deletion " "of these attributes and to restrict the attribute values to be strings. " "We'll see how to do that in the next section." @@ -534,7 +534,7 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:515 msgid "" -"We rename :c:func:`PyInit_custom` to :c:func:`PyInit_custom2`, update the " +"We rename :c:func:`!PyInit_custom` to :c:func:`!PyInit_custom2`, update the " "module name in the :c:type:`PyModuleDef` struct, and update the full class " "name in the :c:type:`PyTypeObject` struct." msgstr "" @@ -549,23 +549,23 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:534 msgid "" -"In this section, we'll provide finer control over how the :attr:`first` and :" -"attr:`last` attributes are set in the :class:`Custom` example. In the " -"previous version of our module, the instance variables :attr:`first` and :" -"attr:`last` could be set to non-string values or even deleted. We want to " +"In this section, we'll provide finer control over how the :attr:`!first` " +"and :attr:`!last` attributes are set in the :class:`!Custom` example. In the " +"previous version of our module, the instance variables :attr:`!first` and :" +"attr:`!last` could be set to non-string values or even deleted. We want to " "make sure that these attributes always contain strings." msgstr "" #: ../../extending/newtypes_tutorial.rst:543 msgid "" -"To provide greater control, over the :attr:`first` and :attr:`last` " +"To provide greater control, over the :attr:`!first` and :attr:`!last` " "attributes, we'll use custom getter and setter functions. Here are the " -"functions for getting and setting the :attr:`first` attribute::" +"functions for getting and setting the :attr:`!first` attribute::" msgstr "" #: ../../extending/newtypes_tutorial.rst:574 msgid "" -"The getter function is passed a :class:`Custom` object and a \"closure\", " +"The getter function is passed a :class:`!Custom` object and a \"closure\", " "which is a void pointer. In this case, the closure is ignored. (The " "closure supports an advanced usage in which definition data is passed to the " "getter and setter. This could, for example, be used to allow a single set of " @@ -575,10 +575,10 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:580 msgid "" -"The setter function is passed the :class:`Custom` object, the new value, and " -"the closure. The new value may be ``NULL``, in which case the attribute is " -"being deleted. In our setter, we raise an error if the attribute is deleted " -"or if its new value is not a string." +"The setter function is passed the :class:`!Custom` object, the new value, " +"and the closure. The new value may be ``NULL``, in which case the attribute " +"is being deleted. In our setter, we raise an error if the attribute is " +"deleted or if its new value is not a string." msgstr "" #: ../../extending/newtypes_tutorial.rst:585 @@ -644,19 +644,19 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:669 msgid "" -"In the second version of the :class:`Custom` example, we allowed any kind of " -"object to be stored in the :attr:`first` or :attr:`last` attributes [#]_. " -"Besides, in the second and third versions, we allowed subclassing :class:" -"`Custom`, and subclasses may add arbitrary attributes. For any of those two " -"reasons, :class:`Custom` objects can participate in cycles:" +"In the second version of the :class:`!Custom` example, we allowed any kind " +"of object to be stored in the :attr:`!first` or :attr:`!last` attributes " +"[#]_. Besides, in the second and third versions, we allowed subclassing :" +"class:`!Custom`, and subclasses may add arbitrary attributes. For any of " +"those two reasons, :class:`!Custom` objects can participate in cycles:" msgstr "" #: ../../extending/newtypes_tutorial.rst:683 msgid "" -"To allow a :class:`Custom` instance participating in a reference cycle to be " -"properly detected and collected by the cyclic GC, our :class:`Custom` type " -"needs to fill two additional slots and to enable a flag that enables these " -"slots:" +"To allow a :class:`!Custom` instance participating in a reference cycle to " +"be properly detected and collected by the cyclic GC, our :class:`!Custom` " +"type needs to fill two additional slots and to enable a flag that enables " +"these slots:" msgstr "" #: ../../extending/newtypes_tutorial.rst:690 @@ -668,8 +668,8 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:710 msgid "" "For each subobject that can participate in cycles, we need to call the :c:" -"func:`visit` function, which is passed to the traversal method. The :c:func:" -"`visit` function takes as arguments the subobject and the extra argument " +"func:`!visit` function, which is passed to the traversal method. The :c:func:" +"`!visit` function takes as arguments the subobject and the extra argument " "*arg* passed to the traversal method. It returns an integer value that must " "be returned if it is non-zero." msgstr "" @@ -751,15 +751,15 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:794 msgid "" -"In this example we will create a :class:`SubList` type that inherits from " +"In this example we will create a :class:`!SubList` type that inherits from " "the built-in :class:`list` type. The new type will be completely compatible " -"with regular lists, but will have an additional :meth:`increment` method " +"with regular lists, but will have an additional :meth:`!increment` method " "that increases an internal counter:" msgstr "" #: ../../extending/newtypes_tutorial.rst:814 msgid "" -"As you can see, the source code closely resembles the :class:`Custom` " +"As you can see, the source code closely resembles the :class:`!Custom` " "examples in previous sections. We will break down the main differences " "between them. ::" msgstr "" @@ -773,15 +773,15 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:826 msgid "" -"When a Python object is a :class:`SubList` instance, its ``PyObject *`` " +"When a Python object is a :class:`!SubList` instance, its ``PyObject *`` " "pointer can be safely cast to both ``PyListObject *`` and ``SubListObject " "*``::" msgstr "" #: ../../extending/newtypes_tutorial.rst:838 msgid "" -"We see above how to call through to the :attr:`__init__` method of the base " -"type." +"We see above how to call through to the :meth:`~object.__init__` method of " +"the base type." msgstr "" #: ../../extending/newtypes_tutorial.rst:841 @@ -814,7 +814,7 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:881 msgid "" "After that, calling :c:func:`PyType_Ready` and adding the type object to the " -"module is the same as with the basic :class:`Custom` examples." +"module is the same as with the basic :class:`!Custom` examples." msgstr "" #: ../../extending/newtypes_tutorial.rst:886 diff --git a/howto/clinic.po b/howto/clinic.po index eb225b5e6e..e873f731db 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-25 00:04+0000\n" +"POT-Creation-Date: 2023-07-28 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-" @@ -30,35 +30,45 @@ msgstr "作者" msgid "Larry Hastings" msgstr "Larry Hastings" +#: ../../howto/clinic.rst:11 +msgid "**Source code:** :source:`Tools/clinic/clinic.py`." +msgstr "**原始碼:** :source:`Tools/clinic/clinic.py`。" + #: ../../howto/clinic.rst:7 msgid "Abstract" msgstr "摘要" -#: ../../howto/clinic.rst:14 +#: ../../howto/clinic.rst:15 msgid "" "Argument Clinic is a preprocessor for CPython C files. Its purpose is to " "automate all the boilerplate involved with writing argument parsing code for " "\"builtins\", module level functions, and class methods. This document is " -"divided in three major sections:" +"divided in four major sections:" msgstr "" -#: ../../howto/clinic.rst:20 +#: ../../howto/clinic.rst:21 msgid "" ":ref:`clinic-background` talks about the basic concepts and goals of " "Argument Clinic." msgstr "" -#: ../../howto/clinic.rst:22 +#: ../../howto/clinic.rst:23 +msgid "" +":ref:`clinic-reference` describes the command-line interface and Argument " +"Clinic terminology." +msgstr "" + +#: ../../howto/clinic.rst:25 msgid "" ":ref:`clinic-tutorial` guides you through all the steps required to adapt an " "existing C function to Argument Clinic." msgstr "" -#: ../../howto/clinic.rst:24 +#: ../../howto/clinic.rst:27 msgid ":ref:`clinic-howtos` details how to handle specific tasks." msgstr "" -#: ../../howto/clinic.rst:29 +#: ../../howto/clinic.rst:32 msgid "" "Argument Clinic is considered internal-only for CPython. Its use is not " "supported for files outside CPython, and no guarantees are made regarding " @@ -69,15 +79,15 @@ msgid "" "and break all your code." msgstr "" -#: ../../howto/clinic.rst:42 +#: ../../howto/clinic.rst:45 msgid "Background" msgstr "" -#: ../../howto/clinic.rst:46 +#: ../../howto/clinic.rst:49 msgid "The goals of Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:48 +#: ../../howto/clinic.rst:51 msgid "" "Argument Clinic's primary goal is to take over responsibility for all " "argument parsing code inside CPython. This means that, when you convert a " @@ -88,7 +98,7 @@ msgid "" "*kwargs``) magically converted into the C variables and types you need." msgstr "" -#: ../../howto/clinic.rst:58 +#: ../../howto/clinic.rst:61 msgid "" "In order for Argument Clinic to accomplish its primary goal, it must be easy " "to use. Currently, working with CPython's argument parsing library is a " @@ -96,7 +106,7 @@ msgid "" "places. When you use Argument Clinic, you don't have to repeat yourself." msgstr "" -#: ../../howto/clinic.rst:64 +#: ../../howto/clinic.rst:67 msgid "" "Obviously, no one would want to use Argument Clinic unless it's solving " "their problem—and without creating new problems of its own. So it's " @@ -108,14 +118,14 @@ msgid "" "parsing library. That would make for the fastest argument parsing possible!)" msgstr "" -#: ../../howto/clinic.rst:76 +#: ../../howto/clinic.rst:79 msgid "" "Additionally, Argument Clinic must be flexible enough to work with any " "approach to argument parsing. Python has some functions with some very " "strange parsing behaviors; Argument Clinic's goal is to support all of them." msgstr "" -#: ../../howto/clinic.rst:81 +#: ../../howto/clinic.rst:84 msgid "" "Finally, the original motivation for Argument Clinic was to provide " "introspection \"signatures\" for CPython builtins. It used to be, the " @@ -123,7 +133,7 @@ msgid "" "builtin. With Argument Clinic, that's a thing of the past!" msgstr "" -#: ../../howto/clinic.rst:87 +#: ../../howto/clinic.rst:90 msgid "" "One idea you should keep in mind, as you work with Argument Clinic: the more " "information you give it, the better job it'll be able to do. Argument Clinic " @@ -132,147 +142,221 @@ msgid "" "things with all the information you give it." msgstr "" -#: ../../howto/clinic.rst:97 -msgid "Basic concepts and usage" +#: ../../howto/clinic.rst:100 +msgid "Basic concepts" msgstr "" -#: ../../howto/clinic.rst:99 +#: ../../howto/clinic.rst:102 msgid "" -"Argument Clinic ships with CPython; you'll find it in :source:`Tools/clinic/" -"clinic.py`. If you run that script, specifying a C file as an argument:" +"When Argument Clinic is run on a file, either via the :ref:`clinic-cli` or " +"via ``make clinic``, it will scan over the input files looking for :term:" +"`start lines `:" msgstr "" -#: ../../howto/clinic.rst:107 +#: ../../howto/clinic.rst:110 +msgid "When it finds one, it reads everything up to the :term:`end line`:" +msgstr "" + +#: ../../howto/clinic.rst:116 msgid "" -"Argument Clinic will scan over the file looking for lines that look exactly " -"like this:" +"Everything in between these two lines is Argument Clinic :term:`input`. When " +"Argument Clinic parses input, it generates :term:`output`. The output is " +"rewritten into the C file immediately after the input, followed by a :term:" +"`checksum line`. All of these lines, including the :term:`start line` and :" +"term:`checksum line`, are collectively called an Argument Clinic :term:" +"`block`:" msgstr "" -#: ../../howto/clinic.rst:114 +#: ../../howto/clinic.rst:131 msgid "" -"When it finds one, it reads everything up to a line that looks exactly like " -"this:" +"If you run Argument Clinic on the same file a second time, Argument Clinic " +"will discard the old :term:`output` and write out the new output with a " +"fresh :term:`checksum line`. If the :term:`input` hasn't changed, the output " +"won't change either." msgstr "" -#: ../../howto/clinic.rst:121 +#: ../../howto/clinic.rst:138 msgid "" -"Everything in between these two lines is input for Argument Clinic. All of " -"these lines, including the beginning and ending comment lines, are " -"collectively called an Argument Clinic \"block\"." +"You should never modify the output of an Argument Clinic block, as any " +"change will be lost in future Argument Clinic runs; Argument Clinic will " +"detect an output checksum mismatch and regenerate the correct output. If you " +"are not happy with the generated output, you should instead change the input " +"until it produces the output you want." msgstr "" -#: ../../howto/clinic.rst:125 +#: ../../howto/clinic.rst:149 +msgid "Reference" +msgstr "" + +#: ../../howto/clinic.rst:155 +msgid "Terminology" +msgstr "" + +#: ../../howto/clinic.rst:158 +msgid "start line" +msgstr "" + +#: ../../howto/clinic.rst:160 msgid "" -"When Argument Clinic parses one of these blocks, it generates output. This " -"output is rewritten into the C file immediately after the block, followed by " -"a comment containing a checksum. The Argument Clinic block now looks like " -"this:" +"The line ``/*[clinic input]``. This line marks the beginning of Argument " +"Clinic input. Note that the *start line* opens a C block comment." msgstr "" -#: ../../howto/clinic.rst:138 +#: ../../howto/clinic.rst:163 +msgid "end line" +msgstr "" + +#: ../../howto/clinic.rst:165 msgid "" -"If you run Argument Clinic on the same file a second time, Argument Clinic " -"will discard the old output and write out the new output with a fresh " -"checksum line. However, if the input hasn't changed, the output won't " -"change either." +"The line ``[clinic start generated code]*/``. The *end line* marks the _end_ " +"of Argument Clinic :term:`input`, but at the same time marks the _start_ of " +"Argument Clinic :term:`output`, thus the text *\"clinic start start " +"generated code\"* Note that the *end line* closes the C block comment opened " +"by the *start line*." msgstr "" -#: ../../howto/clinic.rst:142 +#: ../../howto/clinic.rst:171 +msgid "checksum" +msgstr "" + +#: ../../howto/clinic.rst:173 msgid "" -"You should never modify the output portion of an Argument Clinic block. " -"Instead, change the input until it produces the output you want. (That's " -"the purpose of the checksum—to detect if someone changed the output, as " -"these edits would be lost the next time Argument Clinic writes out fresh " -"output.)" +"A hash to distinguish unique :term:`inputs ` and :term:`outputs " +"`." +msgstr "" + +#: ../../howto/clinic.rst:175 +msgid "checksum line" msgstr "" -#: ../../howto/clinic.rst:147 +#: ../../howto/clinic.rst:177 msgid "" -"For the sake of clarity, here's the terminology we'll use with Argument " -"Clinic:" +"A line that looks like ``/*[clinic end generated code: ...]*/``. The three " +"dots will be replaced by a :term:`checksum` generated from the :term:" +"`input`, and a :term:`checksum` generated from the :term:`output`. The " +"checksum line marks the end of Argument Clinic generated code, and is used " +"by Argument Clinic to determine if it needs to regenerate output." msgstr "" -#: ../../howto/clinic.rst:149 +#: ../../howto/clinic.rst:183 +msgid "input" +msgstr "" + +#: ../../howto/clinic.rst:185 msgid "" -"The first line of the comment (``/*[clinic input]``) is the *start line*." +"The text between the :term:`start line` and the :term:`end line`. Note that " +"the start and end lines open and close a C block comment; the *input* is " +"thus a part of that same C block comment." +msgstr "" + +#: ../../howto/clinic.rst:188 +msgid "output" +msgstr "" + +#: ../../howto/clinic.rst:190 +msgid "The text between the :term:`end line` and the :term:`checksum line`." msgstr "" -#: ../../howto/clinic.rst:150 +#: ../../howto/clinic.rst:191 +msgid "block" +msgstr "" + +#: ../../howto/clinic.rst:193 msgid "" -"The last line of the initial comment (``[clinic start generated code]*/``) " -"is the *end line*." +"All text from the :term:`start line` to the :term:`checksum line` " +"inclusively." msgstr "" -#: ../../howto/clinic.rst:151 +#: ../../howto/clinic.rst:199 +msgid "Command-line interface" +msgstr "" + +#: ../../howto/clinic.rst:201 msgid "" -"The last line (``/*[clinic end generated code: checksum=...]*/``) is the " -"*checksum line*." +"The Argument Clinic :abbr:`CLI (Command-Line Interface)` is typically used " +"to process a single source file, like this:" msgstr "" -#: ../../howto/clinic.rst:152 -msgid "In between the start line and the end line is the *input*." +#: ../../howto/clinic.rst:208 +msgid "The CLI supports the following options:" msgstr "" -#: ../../howto/clinic.rst:153 -msgid "In between the end line and the checksum line is the *output*." +#: ../../howto/clinic.rst:215 +msgid "Print CLI usage." msgstr "" -#: ../../howto/clinic.rst:154 -msgid "" -"All the text collectively, from the start line to the checksum line " -"inclusively, is the *block*. (A block that hasn't been successfully " -"processed by Argument Clinic yet doesn't have output or a checksum line, but " -"it's still considered a block.)" +#: ../../howto/clinic.rst:219 +msgid "Force output regeneration." msgstr "" -#: ../../howto/clinic.rst:163 +#: ../../howto/clinic.rst:223 +msgid "Redirect file output to OUTPUT" +msgstr "" + +#: ../../howto/clinic.rst:227 +msgid "Enable verbose mode." +msgstr "" + +#: ../../howto/clinic.rst:231 +msgid "Print a list of all supported converters and return converters." +msgstr "" + +#: ../../howto/clinic.rst:235 +msgid "Walk :option:`--srcdir` to run over all relevant files." +msgstr "" + +#: ../../howto/clinic.rst:239 +msgid "The directory tree to walk in :option:`--make` mode." +msgstr "" + +#: ../../howto/clinic.rst:243 +msgid "The list of files to process." +msgstr "" + +#: ../../howto/clinic.rst:249 msgid "Tutorial" msgstr "" -#: ../../howto/clinic.rst:165 +#: ../../howto/clinic.rst:251 msgid "" "The best way to get a sense of how Argument Clinic works is to convert a " "function to work with it. Here, then, are the bare minimum steps you'd need " "to follow to convert a function to work with Argument Clinic. Note that for " "code you plan to check in to CPython, you really should take the conversion " -"farther, using some of the advanced concepts you'll see later on in the " -"document (like \"return converters\" and \"self converters\"). But we'll " -"keep it simple for this walkthrough so you can learn." -msgstr "" - -#: ../../howto/clinic.rst:174 -msgid "Let's dive in!" +"farther, using some of the :ref:`advanced concepts ` you'll " +"see later on in the document, like :ref:`clinic-howto-return-converters` " +"and :ref:`clinic-howto-self-converter`. But we'll keep it simple for this " +"walkthrough so you can learn." msgstr "" -#: ../../howto/clinic.rst:176 +#: ../../howto/clinic.rst:262 msgid "" -"Make sure you're working with a freshly updated checkout of the CPython " -"trunk." +"First, make sure you're working with a freshly updated checkout of the " +"CPython trunk." msgstr "" -#: ../../howto/clinic.rst:179 +#: ../../howto/clinic.rst:265 msgid "" -"Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :c:" -"func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work with " -"Argument Clinic yet. For my example I'm using :py:meth:`_pickle.Pickler.dump " -"`." +"Next, find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :" +"c:func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work with " +"Argument Clinic yet. For this tutorial, we'll be using :py:meth:`_pickle." +"Pickler.dump `." msgstr "" -#: ../../howto/clinic.rst:185 +#: ../../howto/clinic.rst:271 msgid "" "If the call to the :c:func:`!PyArg_Parse*` function uses any of the " -"following format units:" +"following format units...:" msgstr "" -#: ../../howto/clinic.rst:197 +#: ../../howto/clinic.rst:283 msgid "" -"or if it has multiple calls to :c:func:`PyArg_ParseTuple`, you should choose " -"a different function. Argument Clinic *does* support all of these " -"scenarios. But these are advanced topics—let's do something simpler for " -"your first function." +"... or if it has multiple calls to :c:func:`PyArg_ParseTuple`, you should " +"choose a different function. (See :ref:`clinic-howto-advanced-converters` " +"for those scenarios.)" msgstr "" -#: ../../howto/clinic.rst:202 +#: ../../howto/clinic.rst:287 msgid "" "Also, if the function has multiple calls to :c:func:`!PyArg_ParseTuple` or :" "c:func:`PyArg_ParseTupleAndKeywords` where it supports different types for " @@ -282,215 +366,218 @@ msgid "" "functions or polymorphic parameters." msgstr "" -#: ../../howto/clinic.rst:209 -msgid "Add the following boilerplate above the function, creating our block::" +#: ../../howto/clinic.rst:294 +msgid "" +"Next, add the following boilerplate above the function, creating our input " +"block::" msgstr "" -#: ../../howto/clinic.rst:214 +#: ../../howto/clinic.rst:300 msgid "" "Cut the docstring and paste it in between the ``[clinic]`` lines, removing " "all the junk that makes it a properly quoted C string. When you're done you " "should have just the text, based at the left margin, with no line wider than " -"80 characters. (Argument Clinic will preserve indents inside the docstring.)" +"80 characters. Argument Clinic will preserve indents inside the docstring." msgstr "" -#: ../../howto/clinic.rst:220 +#: ../../howto/clinic.rst:306 msgid "" "If the old docstring had a first line that looked like a function signature, " -"throw that line away. (The docstring doesn't need it anymore—when you use :" -"py:func:`help` on your builtin in the future, the first line will be built " -"automatically based on the function's signature.)" +"throw that line away; The docstring doesn't need it anymore --- when you " +"use :py:func:`help` on your builtin in the future, the first line will be " +"built automatically based on the function's signature." msgstr "" -#: ../../howto/clinic.rst:226 ../../howto/clinic.rst:247 -#: ../../howto/clinic.rst:271 ../../howto/clinic.rst:329 -#: ../../howto/clinic.rst:369 ../../howto/clinic.rst:396 -#: ../../howto/clinic.rst:502 ../../howto/clinic.rst:554 -msgid "Sample::" +#: ../../howto/clinic.rst:311 +msgid "Example docstring summary line::" msgstr "" -#: ../../howto/clinic.rst:232 +#: ../../howto/clinic.rst:317 msgid "" "If your docstring doesn't have a \"summary\" line, Argument Clinic will " -"complain. So let's make sure it has one. The \"summary\" line should be a " +"complain, so let's make sure it has one. The \"summary\" line should be a " "paragraph consisting of a single 80-column line at the beginning of the " -"docstring." +"docstring. (See :pep:`257` regarding docstring conventions.)" +msgstr "" + +#: ../../howto/clinic.rst:323 +msgid "" +"Our example docstring consists solely of a summary line, so the sample code " +"doesn't have to change for this step." msgstr "" -#: ../../howto/clinic.rst:237 +#: ../../howto/clinic.rst:326 msgid "" -"(Our example docstring consists solely of a summary line, so the sample code " -"doesn't have to change for this step.)" +"Now, above the docstring, enter the name of the function, followed by a " +"blank line. This should be the Python name of the function, and should be " +"the full dotted path to the function --- it should start with the name of " +"the module, include any sub-modules, and if the function is a method on a " +"class it should include the class name too." msgstr "" -#: ../../howto/clinic.rst:240 +#: ../../howto/clinic.rst:333 msgid "" -"Above the docstring, enter the name of the function, followed by a blank " -"line. This should be the Python name of the function, and should be the " -"full dotted path to the function—it should start with the name of the " -"module, include any sub-modules, and if the function is a method on a class " -"it should include the class name too." +"In our example, :mod:`!_pickle` is the module, :py:class:`!Pickler` is the " +"class, and :py:meth:`!dump` is the method, so the name becomes :py:meth:`!" +"_pickle.Pickler.dump`::" msgstr "" -#: ../../howto/clinic.rst:255 +#: ../../howto/clinic.rst:343 msgid "" "If this is the first time that module or class has been used with Argument " "Clinic in this C file, you must declare the module and/or class. Proper " "Argument Clinic hygiene prefers declaring these in a separate block " "somewhere near the top of the C file, in the same way that include files and " -"statics go at the top. (In our sample code we'll just show the two blocks " -"next to each other.)" +"statics go at the top. In our sample code we'll just show the two blocks " +"next to each other." msgstr "" -#: ../../howto/clinic.rst:263 +#: ../../howto/clinic.rst:351 msgid "" "The name of the class and module should be the same as the one seen by " "Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:" "`PyTypeObject` as appropriate." msgstr "" -#: ../../howto/clinic.rst:267 +#: ../../howto/clinic.rst:355 msgid "" "When you declare a class, you must also specify two aspects of its type in " "C: the type declaration you'd use for a pointer to an instance of this " -"class, and a pointer to the :c:type:`!PyTypeObject` for this class." +"class, and a pointer to the :c:type:`!PyTypeObject` for this class::" msgstr "" -#: ../../howto/clinic.rst:287 +#: ../../howto/clinic.rst:370 msgid "" "Declare each of the parameters to the function. Each parameter should get " "its own line. All the parameter lines should be indented from the function " -"name and the docstring." -msgstr "" - -#: ../../howto/clinic.rst:291 -msgid "The general form of these parameter lines is as follows:" +"name and the docstring. The general form of these parameter lines is as " +"follows:" msgstr "" -#: ../../howto/clinic.rst:297 +#: ../../howto/clinic.rst:379 msgid "If the parameter has a default value, add that after the converter:" msgstr "" -#: ../../howto/clinic.rst:304 +#: ../../howto/clinic.rst:386 msgid "" "Argument Clinic's support for \"default values\" is quite sophisticated; " -"please see :ref:`the section below on default values ` for " -"more information." +"see :ref:`clinic-howto-default-values` for more information." msgstr "" -#: ../../howto/clinic.rst:308 -msgid "Add a blank line below the parameters." +#: ../../howto/clinic.rst:389 +msgid "Next, add a blank line below the parameters." msgstr "" -#: ../../howto/clinic.rst:310 +#: ../../howto/clinic.rst:391 msgid "" -"What's a \"converter\"? It establishes both the type of the variable used " -"in C, and the method to convert the Python value into a C value at runtime. " -"For now you're going to use what's called a \"legacy converter\"—a " +"What's a \"converter\"? It establishes both the type of the variable used in " +"C, and the method to convert the Python value into a C value at runtime. For " +"now you're going to use what's called a \"legacy converter\" --- a " "convenience syntax intended to make porting old code into Argument Clinic " "easier." msgstr "" -#: ../../howto/clinic.rst:317 +#: ../../howto/clinic.rst:398 msgid "" "For each parameter, copy the \"format unit\" for that parameter from the :c:" "func:`PyArg_Parse` format argument and specify *that* as its converter, as a " -"quoted string. (\"format unit\" is the formal name for the one-to-three " +"quoted string. The \"format unit\" is the formal name for the one-to-three " "character substring of the *format* parameter that tells the argument " -"parsing function what the type of the variable is and how to convert it. " -"For more on format units please see :ref:`arg-parsing`.)" +"parsing function what the type of the variable is and how to convert it. For " +"more on format units please see :ref:`arg-parsing`." msgstr "" -#: ../../howto/clinic.rst:326 +#: ../../howto/clinic.rst:407 msgid "" "For multicharacter format units like ``z#``, use the entire two-or-three " "character string." msgstr "" -#: ../../howto/clinic.rst:344 +#: ../../howto/clinic.rst:410 ../../howto/clinic.rst:445 +#: ../../howto/clinic.rst:473 ../../howto/clinic.rst:579 +#: ../../howto/clinic.rst:632 +msgid "Sample::" +msgstr "" + +#: ../../howto/clinic.rst:425 msgid "" "If your function has ``|`` in the format string, meaning some parameters " -"have default values, you can ignore it. Argument Clinic infers which " +"have default values, you can ignore it. Argument Clinic infers which " "parameters are optional based on whether or not they have default values." msgstr "" -#: ../../howto/clinic.rst:349 +#: ../../howto/clinic.rst:430 msgid "" "If your function has ``$`` in the format string, meaning it takes keyword-" "only arguments, specify ``*`` on a line by itself before the first keyword-" "only argument, indented the same as the parameter lines." msgstr "" -#: ../../howto/clinic.rst:354 -msgid "" -"(:py:meth:`!_pickle.Pickler.dump` has neither, so our sample is unchanged.)" -msgstr "" - -#: ../../howto/clinic.rst:357 +#: ../../howto/clinic.rst:435 msgid "" -"If the existing C function calls :c:func:`PyArg_ParseTuple` (as opposed to :" -"c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are positional-" -"only." +":py:meth:`!_pickle.Pickler.dump` has neither, so our sample is unchanged." msgstr "" -#: ../../howto/clinic.rst:361 +#: ../../howto/clinic.rst:437 msgid "" -"To mark all parameters as positional-only in Argument Clinic, add a ``/`` on " -"a line by itself after the last parameter, indented the same as the " -"parameter lines." +"Next, if the existing C function calls :c:func:`PyArg_ParseTuple` (as " +"opposed to :c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments " +"are positional-only." msgstr "" -#: ../../howto/clinic.rst:365 +#: ../../howto/clinic.rst:441 msgid "" -"Currently this is all-or-nothing; either all parameters are positional-only, " -"or none of them are. (In the future Argument Clinic may relax this " -"restriction.)" +"To mark parameters as positional-only in Argument Clinic, add a ``/`` on a " +"line by itself after the last positional-only parameter, indented the same " +"as the parameter lines." msgstr "" -#: ../../howto/clinic.rst:385 +#: ../../howto/clinic.rst:461 msgid "" -"It's helpful to write a per-parameter docstring for each parameter. But per-" -"parameter docstrings are optional; you can skip this step if you prefer." +"It can be helpful to write a per-parameter docstring for each parameter. " +"Since per-parameter docstrings are optional, you can skip this step if you " +"prefer." msgstr "" -#: ../../howto/clinic.rst:389 +#: ../../howto/clinic.rst:465 msgid "" -"Here's how to add a per-parameter docstring. The first line of the per-" -"parameter docstring must be indented further than the parameter definition. " -"The left margin of this first line establishes the left margin for the whole " -"per-parameter docstring; all the text you write will be outdented by this " -"amount. You can write as much text as you like, across multiple lines if " -"you wish." +"Nevertheless, here's how to add a per-parameter docstring. The first line of " +"the per-parameter docstring must be indented further than the parameter " +"definition. The left margin of this first line establishes the left margin " +"for the whole per-parameter docstring; all the text you write will be " +"outdented by this amount. You can write as much text as you like, across " +"multiple lines if you wish." msgstr "" -#: ../../howto/clinic.rst:413 +#: ../../howto/clinic.rst:490 msgid "" -"Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With " +"Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With " "luck everything worked---your block now has output, and a :file:`.c.h` file " -"has been generated! Reopen the file in your text editor to see::" +"has been generated! Reload the file in your text editor to see the generated " +"code::" msgstr "" -#: ../../howto/clinic.rst:432 +#: ../../howto/clinic.rst:509 msgid "" "Obviously, if Argument Clinic didn't produce any output, it's because it " -"found an error in your input. Keep fixing your errors and retrying until " +"found an error in your input. Keep fixing your errors and retrying until " "Argument Clinic processes your file without complaint." msgstr "" -#: ../../howto/clinic.rst:436 +#: ../../howto/clinic.rst:514 msgid "" "For readability, most of the glue code has been generated to a :file:`.c.h` " "file. You'll need to include that in your original :file:`.c` file, " "typically right after the clinic module block::" msgstr "" -#: ../../howto/clinic.rst:442 +#: ../../howto/clinic.rst:520 msgid "" "Double-check that the argument-parsing code Argument Clinic generated looks " "basically the same as the existing code." msgstr "" -#: ../../howto/clinic.rst:445 +#: ../../howto/clinic.rst:523 msgid "" "First, ensure both places use the same argument-parsing function. The " "existing code must call either :c:func:`PyArg_ParseTuple` or :c:func:" @@ -498,49 +585,49 @@ msgid "" "Clinic calls the *exact* same function." msgstr "" -#: ../../howto/clinic.rst:451 +#: ../../howto/clinic.rst:529 msgid "" "Second, the format string passed in to :c:func:`!PyArg_ParseTuple` or :c:" "func:`!PyArg_ParseTupleAndKeywords` should be *exactly* the same as the hand-" "written one in the existing function, up to the colon or semi-colon." msgstr "" -#: ../../howto/clinic.rst:456 +#: ../../howto/clinic.rst:534 msgid "" -"(Argument Clinic always generates its format strings with a ``:`` followed " -"by the name of the function. If the existing code's format string ends with " -"``;``, to provide usage help, this change is harmless—don't worry about it.)" +"Argument Clinic always generates its format strings with a ``:`` followed by " +"the name of the function. If the existing code's format string ends with ``;" +"``, to provide usage help, this change is harmless --- don't worry about it." msgstr "" -#: ../../howto/clinic.rst:461 +#: ../../howto/clinic.rst:539 msgid "" -"Third, for parameters whose format units require two arguments (like a " -"length variable, or an encoding string, or a pointer to a conversion " -"function), ensure that the second argument is *exactly* the same between the " -"two invocations." +"Third, for parameters whose format units require two arguments, like a " +"length variable, an encoding string, or a pointer to a conversion function, " +"ensure that the second argument is *exactly* the same between the two " +"invocations." msgstr "" -#: ../../howto/clinic.rst:466 +#: ../../howto/clinic.rst:544 msgid "" -"Fourth, inside the output portion of the block you'll find a preprocessor " +"Fourth, inside the output portion of the block, you'll find a preprocessor " "macro defining the appropriate static :c:type:`PyMethodDef` structure for " "this builtin::" msgstr "" -#: ../../howto/clinic.rst:473 +#: ../../howto/clinic.rst:551 msgid "" "This static structure should be *exactly* the same as the existing static :c:" "type:`!PyMethodDef` structure for this builtin." msgstr "" -#: ../../howto/clinic.rst:476 +#: ../../howto/clinic.rst:554 msgid "" "If any of these items differ in *any way*, adjust your Argument Clinic " "function specification and rerun ``Tools/clinic/clinic.py`` until they *are* " "the same." msgstr "" -#: ../../howto/clinic.rst:481 +#: ../../howto/clinic.rst:558 msgid "" "Notice that the last line of its output is the declaration of your \"impl\" " "function. This is where the builtin's implementation goes. Delete the " @@ -551,74 +638,70 @@ msgid "" "used different names for these variables, fix it." msgstr "" -#: ../../howto/clinic.rst:489 +#: ../../howto/clinic.rst:566 msgid "" -"Let's reiterate, just because it's kind of weird. Your code should now look " +"Let's reiterate, just because it's kind of weird. Your code should now look " "like this::" msgstr "" -#: ../../howto/clinic.rst:498 +#: ../../howto/clinic.rst:575 msgid "" "Argument Clinic generated the checksum line and the function prototype just " -"above it. You should write the opening (and closing) curly braces for the " +"above it. You should write the opening and closing curly braces for the " "function, and the implementation inside." msgstr "" -#: ../../howto/clinic.rst:543 +#: ../../howto/clinic.rst:621 msgid "" "Remember the macro with the :c:type:`PyMethodDef` structure for this " -"function? Find the existing :c:type:`!PyMethodDef` structure for this " -"function and replace it with a reference to the macro. (If the builtin is " -"at module scope, this will probably be very near the end of the file; if the " +"function? Find the existing :c:type:`!PyMethodDef` structure for this " +"function and replace it with a reference to the macro. If the builtin is at " +"module scope, this will probably be very near the end of the file; if the " "builtin is a class method, this will probably be below but relatively near " -"to the implementation.)" +"to the implementation." msgstr "" -#: ../../howto/clinic.rst:550 +#: ../../howto/clinic.rst:628 msgid "" -"Note that the body of the macro contains a trailing comma. So when you " -"replace the existing static :c:type:`!PyMethodDef` structure with the macro, " -"*don't* add a comma to the end." +"Note that the body of the macro contains a trailing comma; when you replace " +"the existing static :c:type:`!PyMethodDef` structure with the macro, *don't* " +"add a comma to the end." msgstr "" -#: ../../howto/clinic.rst:563 +#: ../../howto/clinic.rst:640 msgid "Argument Clinic may generate new instances of ``_Py_ID``. For example::" msgstr "" -#: ../../howto/clinic.rst:567 +#: ../../howto/clinic.rst:644 msgid "" "If it does, you'll have to run ``make regen-global-objects`` to regenerate " "the list of precompiled identifiers at this point." msgstr "" -#: ../../howto/clinic.rst:571 +#: ../../howto/clinic.rst:647 msgid "" -"Compile, then run the relevant portions of the regression-test suite. This " -"change should not introduce any new compile-time warnings or errors, and " -"there should be no externally visible change to Python's behavior." +"Finally, compile, then run the relevant portions of the regression-test " +"suite. This change should not introduce any new compile-time warnings or " +"errors, and there should be no externally visible change to Python's " +"behavior, except for one difference: :py:func:`inspect.signature` run on " +"your function should now provide a valid signature!" msgstr "" -#: ../../howto/clinic.rst:575 -msgid "" -"Well, except for one difference: :py:func:`inspect.signature` run on your " -"function should now provide a valid signature!" -msgstr "" - -#: ../../howto/clinic.rst:578 +#: ../../howto/clinic.rst:653 msgid "" "Congratulations, you've ported your first function to work with Argument " "Clinic!" msgstr "" -#: ../../howto/clinic.rst:584 +#: ../../howto/clinic.rst:659 msgid "How-to guides" msgstr "" -#: ../../howto/clinic.rst:588 +#: ../../howto/clinic.rst:663 msgid "How to rename C functions and variables generated by Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:590 +#: ../../howto/clinic.rst:665 msgid "" "Argument Clinic automatically names the functions it generates for you. " "Occasionally this may cause a problem, if the generated name collides with " @@ -630,19 +713,19 @@ msgid "" "impl function." msgstr "" -#: ../../howto/clinic.rst:598 +#: ../../howto/clinic.rst:673 msgid "" "For example, if we wanted to rename the C function names generated for :py:" "meth:`pickle.Pickler.dump`, it'd look like this::" msgstr "" -#: ../../howto/clinic.rst:606 +#: ../../howto/clinic.rst:681 msgid "" "The base function would now be named :c:func:`!pickler_dumper`, and the impl " "function would now be named :c:func:`!pickler_dumper_impl`." msgstr "" -#: ../../howto/clinic.rst:610 +#: ../../howto/clinic.rst:685 msgid "" "Similarly, you may have a problem where you want to give a parameter a " "specific Python name, but that name may be inconvenient in C. Argument " @@ -650,21 +733,21 @@ msgid "" "using the same ``\"as\"`` syntax::" msgstr "" -#: ../../howto/clinic.rst:624 +#: ../../howto/clinic.rst:699 msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be *file*, but the C variable would be named ``file_obj``." msgstr "" -#: ../../howto/clinic.rst:627 +#: ../../howto/clinic.rst:702 msgid "You can use this to rename the *self* parameter too!" msgstr "" -#: ../../howto/clinic.rst:631 +#: ../../howto/clinic.rst:706 msgid "How to convert functions using ``PyArg_UnpackTuple``" msgstr "" -#: ../../howto/clinic.rst:633 +#: ../../howto/clinic.rst:708 msgid "" "To convert a function parsing its arguments with :c:func:" "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " @@ -673,17 +756,17 @@ msgid "" "a line by itself after the last argument)." msgstr "" -#: ../../howto/clinic.rst:639 +#: ../../howto/clinic.rst:714 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." msgstr "" -#: ../../howto/clinic.rst:644 +#: ../../howto/clinic.rst:719 msgid "How to use optional groups" msgstr "" -#: ../../howto/clinic.rst:646 +#: ../../howto/clinic.rst:721 msgid "" "Some legacy functions have a tricky approach to parsing their arguments: " "they count the number of positional arguments, then use a ``switch`` " @@ -694,7 +777,7 @@ msgid "" "created." msgstr "" -#: ../../howto/clinic.rst:653 +#: ../../howto/clinic.rst:728 msgid "" "While functions using this approach can often be converted to use :c:func:`!" "PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " @@ -708,7 +791,7 @@ msgid "" "don't pass in *x* you may not pass in *y* either.)" msgstr "" -#: ../../howto/clinic.rst:665 +#: ../../howto/clinic.rst:740 msgid "" "In any case, the goal of Argument Clinic is to support argument parsing for " "all existing CPython builtins without changing their semantics. Therefore " @@ -718,7 +801,7 @@ msgid "" "required arguments. They can *only* be used with positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:673 +#: ../../howto/clinic.rst:748 msgid "" "Optional groups are *only* intended for use when converting functions that " "make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " @@ -729,7 +812,7 @@ msgid "" "possible." msgstr "" -#: ../../howto/clinic.rst:682 +#: ../../howto/clinic.rst:757 msgid "" "To specify an optional group, add a ``[`` on a line by itself before the " "parameters you wish to group together, and a ``]`` on a line by itself after " @@ -738,11 +821,11 @@ msgid "" "optional::" msgstr "" -#: ../../howto/clinic.rst:711 +#: ../../howto/clinic.rst:786 msgid "Notes:" msgstr "註解:" -#: ../../howto/clinic.rst:713 +#: ../../howto/clinic.rst:788 msgid "" "For every optional group, one additional parameter will be passed into the " "impl function representing the group. The parameter will be an int named " @@ -755,34 +838,34 @@ msgid "" "I mean whether or not the parameters received arguments in this invocation.)" msgstr "" -#: ../../howto/clinic.rst:724 +#: ../../howto/clinic.rst:799 msgid "" "If there are no required arguments, the optional groups will behave as if " "they're to the right of the required arguments." msgstr "" -#: ../../howto/clinic.rst:727 +#: ../../howto/clinic.rst:802 msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." msgstr "" -#: ../../howto/clinic.rst:730 +#: ../../howto/clinic.rst:805 msgid "Optional groups can only contain positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:732 +#: ../../howto/clinic.rst:807 msgid "" "Optional groups are *only* intended for legacy code. Please do not use " "optional groups for new code." msgstr "" -#: ../../howto/clinic.rst:737 +#: ../../howto/clinic.rst:812 msgid "" "How to use real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" -#: ../../howto/clinic.rst:739 +#: ../../howto/clinic.rst:814 msgid "" "To save time, and to minimize how much you need to learn to achieve your " "first port to Argument Clinic, the walkthrough above tells you to use " @@ -791,38 +874,38 @@ msgid "" "be clear, their use is acceptable when porting code for Python 3.4." msgstr "" -#: ../../howto/clinic.rst:746 +#: ../../howto/clinic.rst:821 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" msgstr "" -#: ../../howto/clinic.rst:750 +#: ../../howto/clinic.rst:825 msgid "" "The proper converters are far easier to read and clearer in their intent." msgstr "" -#: ../../howto/clinic.rst:751 +#: ../../howto/clinic.rst:826 msgid "" "There are some format units that are unsupported as \"legacy converters\", " "because they require arguments, and the legacy converter syntax doesn't " "support specifying arguments." msgstr "" -#: ../../howto/clinic.rst:754 +#: ../../howto/clinic.rst:829 msgid "" "In the future we may have a new argument parsing library that isn't " "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " "won't be available to parameters using legacy converters." msgstr "" -#: ../../howto/clinic.rst:758 +#: ../../howto/clinic.rst:833 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." msgstr "" -#: ../../howto/clinic.rst:761 +#: ../../howto/clinic.rst:836 msgid "" "In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " "like a Python function call. However, if there are no explicit arguments to " @@ -830,17 +913,17 @@ msgid "" "parentheses. Thus ``bool`` and ``bool()`` are exactly the same converters." msgstr "" -#: ../../howto/clinic.rst:767 +#: ../../howto/clinic.rst:842 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" msgstr "" -#: ../../howto/clinic.rst:775 +#: ../../howto/clinic.rst:850 msgid "*c_default*" msgstr "*c_default*" -#: ../../howto/clinic.rst:771 +#: ../../howto/clinic.rst:846 msgid "" "The default value for this parameter when defined in C. Specifically, this " "will be the initializer for the variable declared in the \"parse " @@ -848,36 +931,36 @@ msgid "" "how to use this. Specified as a string." msgstr "" -#: ../../howto/clinic.rst:780 +#: ../../howto/clinic.rst:855 msgid "*annotation*" msgstr "*annotation*" -#: ../../howto/clinic.rst:778 +#: ../../howto/clinic.rst:853 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." msgstr "" -#: ../../howto/clinic.rst:783 +#: ../../howto/clinic.rst:858 msgid "*unused*" msgstr "*unused*" -#: ../../howto/clinic.rst:783 +#: ../../howto/clinic.rst:858 msgid "" "Wrap the argument with :c:macro:`Py_UNUSED` in the impl function signature." msgstr "" -#: ../../howto/clinic.rst:785 +#: ../../howto/clinic.rst:860 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" msgstr "" -#: ../../howto/clinic.rst:794 +#: ../../howto/clinic.rst:869 msgid "*accept*" msgstr "*accept*" -#: ../../howto/clinic.rst:789 +#: ../../howto/clinic.rst:864 msgid "" "A set of Python types (and possibly pseudo-types); this restricts the " "allowable Python argument to values of these types. (This is not a general-" @@ -885,68 +968,68 @@ msgid "" "shown in the legacy converter table.)" msgstr "" -#: ../../howto/clinic.rst:794 +#: ../../howto/clinic.rst:869 msgid "To accept ``None``, add ``NoneType`` to this set." msgstr "" -#: ../../howto/clinic.rst:799 +#: ../../howto/clinic.rst:874 msgid "*bitwise*" msgstr "*bitwise*" -#: ../../howto/clinic.rst:797 +#: ../../howto/clinic.rst:872 msgid "" "Only supported for unsigned integers. The native integer value of this " "Python argument will be written to the parameter without any range checking, " "even for negative values." msgstr "" -#: ../../howto/clinic.rst:804 +#: ../../howto/clinic.rst:879 msgid "*converter*" msgstr "*converter*" -#: ../../howto/clinic.rst:802 +#: ../../howto/clinic.rst:877 msgid "" "Only supported by the ``object`` converter. Specifies the name of a :ref:`C " "\"converter function\" ` to use to convert this object to a " "native type." msgstr "" -#: ../../howto/clinic.rst:809 +#: ../../howto/clinic.rst:884 msgid "*encoding*" msgstr "*encoding*" -#: ../../howto/clinic.rst:807 +#: ../../howto/clinic.rst:882 msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." msgstr "" -#: ../../howto/clinic.rst:813 +#: ../../howto/clinic.rst:888 msgid "*subclass_of*" msgstr "*subclass_of*" -#: ../../howto/clinic.rst:812 +#: ../../howto/clinic.rst:887 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." msgstr "" -#: ../../howto/clinic.rst:818 +#: ../../howto/clinic.rst:893 msgid "*type*" msgstr "" -#: ../../howto/clinic.rst:816 +#: ../../howto/clinic.rst:891 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " "type that will be used to declare the variable. Default value is " "``\"PyObject *\"``." msgstr "" -#: ../../howto/clinic.rst:824 +#: ../../howto/clinic.rst:899 msgid "*zeroes*" msgstr "*zeroes*" -#: ../../howto/clinic.rst:821 +#: ../../howto/clinic.rst:896 msgid "" "Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " "permitted inside the value. The length of the string will be passed in to " @@ -954,7 +1037,7 @@ msgid "" "``_length``." msgstr "" -#: ../../howto/clinic.rst:826 +#: ../../howto/clinic.rst:901 msgid "" "Please note, not every possible combination of arguments will work. Usually " "these arguments are implemented by specific :c:func:`PyArg_ParseTuple` " @@ -965,350 +1048,350 @@ msgid "" "(Or, at least, not yet.)" msgstr "" -#: ../../howto/clinic.rst:834 +#: ../../howto/clinic.rst:909 msgid "" "Below is a table showing the mapping of legacy converters into real Argument " "Clinic converters. On the left is the legacy converter, on the right is the " "text you'd replace it with." msgstr "" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:914 msgid "``'B'``" msgstr "``'B'``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:914 msgid "``unsigned_char(bitwise=True)``" msgstr "``unsigned_char(bitwise=True)``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:915 msgid "``'b'``" msgstr "``'b'``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:915 msgid "``unsigned_char``" msgstr "``unsigned_char``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:916 msgid "``'c'``" msgstr "``'c'``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:916 msgid "``char``" msgstr "``char``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:917 msgid "``'C'``" msgstr "``'C'``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:917 msgid "``int(accept={str})``" msgstr "``int(accept={str})``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:918 msgid "``'d'``" msgstr "``'d'``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:918 msgid "``double``" msgstr "``double``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:919 msgid "``'D'``" msgstr "``'D'``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:919 msgid "``Py_complex``" msgstr "``Py_complex``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:920 msgid "``'es'``" msgstr "``'es'``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:920 msgid "``str(encoding='name_of_encoding')``" msgstr "``str(encoding='name_of_encoding')``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:921 msgid "``'es#'``" msgstr "``'es#'``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:921 msgid "``str(encoding='name_of_encoding', zeroes=True)``" msgstr "``str(encoding='name_of_encoding', zeroes=True)``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:922 msgid "``'et'``" msgstr "``'et'``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:922 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:923 msgid "``'et#'``" msgstr "``'et#'``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:923 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" msgstr "" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:924 msgid "``'f'``" msgstr "``'f'``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:924 msgid "``float``" msgstr "``float``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:925 msgid "``'h'``" msgstr "``'h'``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:925 msgid "``short``" msgstr "``short``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:926 msgid "``'H'``" msgstr "``'H'``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:926 msgid "``unsigned_short(bitwise=True)``" msgstr "``unsigned_short(bitwise=True)``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:927 msgid "``'i'``" msgstr "``'i'``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:927 msgid "``int``" msgstr "``int``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:928 msgid "``'I'``" msgstr "``'I'``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:928 msgid "``unsigned_int(bitwise=True)``" msgstr "``unsigned_int(bitwise=True)``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:929 msgid "``'k'``" msgstr "``'k'``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:929 msgid "``unsigned_long(bitwise=True)``" msgstr "``unsigned_long(bitwise=True)``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:930 msgid "``'K'``" msgstr "``'K'``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:930 msgid "``unsigned_long_long(bitwise=True)``" msgstr "``unsigned_long_long(bitwise=True)``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:931 msgid "``'l'``" msgstr "``'l'``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:931 msgid "``long``" msgstr "``long``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:932 msgid "``'L'``" msgstr "``'L'``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:932 msgid "``long long``" msgstr "``long long``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:933 msgid "``'n'``" msgstr "``'n'``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:933 msgid "``Py_ssize_t``" msgstr "``Py_ssize_t``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:934 msgid "``'O'``" msgstr "``'O'``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:934 msgid "``object``" msgstr "``object``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:935 msgid "``'O!'``" msgstr "``'O!'``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:935 msgid "``object(subclass_of='&PySomething_Type')``" msgstr "``object(subclass_of='&PySomething_Type')``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:936 msgid "``'O&'``" msgstr "``'O&'``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:936 msgid "``object(converter='name_of_c_function')``" msgstr "``object(converter='name_of_c_function')``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:937 msgid "``'p'``" msgstr "``'p'``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:937 msgid "``bool``" msgstr "``bool``" -#: ../../howto/clinic.rst:863 +#: ../../howto/clinic.rst:938 msgid "``'S'``" msgstr "``'S'``" -#: ../../howto/clinic.rst:863 +#: ../../howto/clinic.rst:938 msgid "``PyBytesObject``" msgstr "``PyBytesObject``" -#: ../../howto/clinic.rst:864 +#: ../../howto/clinic.rst:939 msgid "``'s'``" msgstr "``'s'``" -#: ../../howto/clinic.rst:864 +#: ../../howto/clinic.rst:939 msgid "``str``" msgstr "``str``" -#: ../../howto/clinic.rst:865 +#: ../../howto/clinic.rst:940 msgid "``'s#'``" msgstr "``'s#'``" -#: ../../howto/clinic.rst:865 +#: ../../howto/clinic.rst:940 msgid "``str(zeroes=True)``" msgstr "``str(zeroes=True)``" -#: ../../howto/clinic.rst:866 +#: ../../howto/clinic.rst:941 msgid "``'s*'``" msgstr "``'s*'``" -#: ../../howto/clinic.rst:866 +#: ../../howto/clinic.rst:941 msgid "``Py_buffer(accept={buffer, str})``" msgstr "``Py_buffer(accept={buffer, str})``" -#: ../../howto/clinic.rst:867 +#: ../../howto/clinic.rst:942 msgid "``'U'``" msgstr "``'U'``" -#: ../../howto/clinic.rst:867 +#: ../../howto/clinic.rst:942 msgid "``unicode``" msgstr "``unicode``" -#: ../../howto/clinic.rst:868 +#: ../../howto/clinic.rst:943 msgid "``'u'``" msgstr "``'u'``" -#: ../../howto/clinic.rst:868 +#: ../../howto/clinic.rst:943 msgid "``wchar_t``" msgstr "``wchar_t``" -#: ../../howto/clinic.rst:869 +#: ../../howto/clinic.rst:944 msgid "``'u#'``" msgstr "``'u#'``" -#: ../../howto/clinic.rst:869 +#: ../../howto/clinic.rst:944 msgid "``wchar_t(zeroes=True)``" msgstr "``wchar_t(zeroes=True)``" -#: ../../howto/clinic.rst:870 +#: ../../howto/clinic.rst:945 msgid "``'w*'``" msgstr "``'w*'``" -#: ../../howto/clinic.rst:870 +#: ../../howto/clinic.rst:945 msgid "``Py_buffer(accept={rwbuffer})``" msgstr "``Py_buffer(accept={rwbuffer})``" -#: ../../howto/clinic.rst:871 +#: ../../howto/clinic.rst:946 msgid "``'Y'``" msgstr "``'Y'``" -#: ../../howto/clinic.rst:871 +#: ../../howto/clinic.rst:946 msgid "``PyByteArrayObject``" msgstr "``PyByteArrayObject``" -#: ../../howto/clinic.rst:872 +#: ../../howto/clinic.rst:947 msgid "``'y'``" msgstr "``'y'``" -#: ../../howto/clinic.rst:872 +#: ../../howto/clinic.rst:947 msgid "``str(accept={bytes})``" msgstr "``str(accept={bytes})``" -#: ../../howto/clinic.rst:873 +#: ../../howto/clinic.rst:948 msgid "``'y#'``" msgstr "``'y#'``" -#: ../../howto/clinic.rst:873 +#: ../../howto/clinic.rst:948 msgid "``str(accept={robuffer}, zeroes=True)``" msgstr "``str(accept={robuffer}, zeroes=True)``" -#: ../../howto/clinic.rst:874 +#: ../../howto/clinic.rst:949 msgid "``'y*'``" msgstr "``'y*'``" -#: ../../howto/clinic.rst:874 +#: ../../howto/clinic.rst:949 msgid "``Py_buffer``" msgstr "``Py_buffer``" -#: ../../howto/clinic.rst:875 +#: ../../howto/clinic.rst:950 msgid "``'Z'``" msgstr "``'Z'``" -#: ../../howto/clinic.rst:875 +#: ../../howto/clinic.rst:950 msgid "``wchar_t(accept={str, NoneType})``" msgstr "``wchar_t(accept={str, NoneType})``" -#: ../../howto/clinic.rst:876 +#: ../../howto/clinic.rst:951 msgid "``'Z#'``" msgstr "``'Z#'``" -#: ../../howto/clinic.rst:876 +#: ../../howto/clinic.rst:951 msgid "``wchar_t(accept={str, NoneType}, zeroes=True)``" msgstr "``wchar_t(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:877 +#: ../../howto/clinic.rst:952 msgid "``'z'``" msgstr "``'z'``" -#: ../../howto/clinic.rst:877 +#: ../../howto/clinic.rst:952 msgid "``str(accept={str, NoneType})``" msgstr "``str(accept={str, NoneType})``" -#: ../../howto/clinic.rst:878 +#: ../../howto/clinic.rst:953 msgid "``'z#'``" msgstr "``'z#'``" -#: ../../howto/clinic.rst:878 +#: ../../howto/clinic.rst:953 msgid "``str(accept={str, NoneType}, zeroes=True)``" msgstr "``str(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:879 +#: ../../howto/clinic.rst:954 msgid "``'z*'``" msgstr "``'z*'``" -#: ../../howto/clinic.rst:879 +#: ../../howto/clinic.rst:954 msgid "``Py_buffer(accept={buffer, str, NoneType})``" msgstr "``Py_buffer(accept={buffer, str, NoneType})``" -#: ../../howto/clinic.rst:882 +#: ../../howto/clinic.rst:957 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" msgstr "" -#: ../../howto/clinic.rst:895 +#: ../../howto/clinic.rst:970 msgid "" "One advantage of real converters is that they're more flexible than legacy " "converters. For example, the ``unsigned_int`` converter (and all the " @@ -1317,7 +1400,7 @@ msgid "" "negative numbers. You just can't do that with a legacy converter!" msgstr "" -#: ../../howto/clinic.rst:901 +#: ../../howto/clinic.rst:976 msgid "" "Argument Clinic will show you all the converters it has available. For each " "converter it'll show you all the parameters it accepts, along with the " @@ -1325,11 +1408,11 @@ msgid "" "converters`` to see the full list." msgstr "" -#: ../../howto/clinic.rst:908 +#: ../../howto/clinic.rst:983 msgid "How to use the ``Py_buffer`` converter" msgstr "" -#: ../../howto/clinic.rst:910 +#: ../../howto/clinic.rst:985 msgid "" "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " "or ``'z*'`` legacy converters), you *must* not call :c:func:" @@ -1337,17 +1420,17 @@ msgid "" "that does it for you (in the parsing function)." msgstr "" -#: ../../howto/clinic.rst:917 +#: ../../howto/clinic.rst:994 msgid "How to use advanced converters" msgstr "" -#: ../../howto/clinic.rst:919 +#: ../../howto/clinic.rst:996 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." msgstr "" -#: ../../howto/clinic.rst:922 +#: ../../howto/clinic.rst:999 msgid "" "The trick is, all those format units take arguments—either conversion " "functions, or types, or strings specifying an encoding. (But \"legacy " @@ -1358,7 +1441,7 @@ msgid "" "start with ``e``)." msgstr "" -#: ../../howto/clinic.rst:930 +#: ../../howto/clinic.rst:1007 msgid "" "When using *subclass_of*, you may also want to use the other custom argument " "for ``object()``: *type*, which lets you set the type actually used for the " @@ -1367,7 +1450,7 @@ msgid "" "``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``." msgstr "" -#: ../../howto/clinic.rst:936 +#: ../../howto/clinic.rst:1013 msgid "" "One possible problem with using Argument Clinic: it takes away some possible " "flexibility for the format units starting with ``e``. When writing a :c:" @@ -1380,31 +1463,31 @@ msgid "" "parameters whose format units start with ``e``." msgstr "" -#: ../../howto/clinic.rst:949 +#: ../../howto/clinic.rst:1027 msgid "How to assign default values to parameter" msgstr "" -#: ../../howto/clinic.rst:951 +#: ../../howto/clinic.rst:1029 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" msgstr "" -#: ../../howto/clinic.rst:960 +#: ../../howto/clinic.rst:1038 msgid "They can also use any of Python's built-in constants:" msgstr "" -#: ../../howto/clinic.rst:968 +#: ../../howto/clinic.rst:1046 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." msgstr "" -#: ../../howto/clinic.rst:973 +#: ../../howto/clinic.rst:1051 msgid "The ``NULL`` default value" msgstr "" -#: ../../howto/clinic.rst:975 +#: ../../howto/clinic.rst:1053 msgid "" "For string and object parameters, you can set them to ``None`` to indicate " "that there's no default. However, that means the C variable will be " @@ -1414,45 +1497,45 @@ msgid "" "with ``NULL``." msgstr "" -#: ../../howto/clinic.rst:984 +#: ../../howto/clinic.rst:1062 msgid "Symbolic default values" msgstr "" -#: ../../howto/clinic.rst:986 +#: ../../howto/clinic.rst:1064 msgid "" "The default value you provide for a parameter can't be any arbitrary " "expression. Currently the following are explicitly supported:" msgstr "" -#: ../../howto/clinic.rst:989 +#: ../../howto/clinic.rst:1067 msgid "Numeric constants (integer and float)" msgstr "" -#: ../../howto/clinic.rst:990 +#: ../../howto/clinic.rst:1068 msgid "String constants" msgstr "" -#: ../../howto/clinic.rst:991 +#: ../../howto/clinic.rst:1069 msgid "``True``, ``False``, and ``None``" msgstr "" -#: ../../howto/clinic.rst:992 +#: ../../howto/clinic.rst:1070 msgid "" "Simple symbolic constants like :py:data:`sys.maxsize`, which must start with " "the name of the module" msgstr "" -#: ../../howto/clinic.rst:995 +#: ../../howto/clinic.rst:1073 msgid "" "(In the future, this may need to get even more elaborate, to allow full " "expressions like ``CONSTANT - 1``.)" msgstr "" -#: ../../howto/clinic.rst:1000 +#: ../../howto/clinic.rst:1078 msgid "Expressions as default values" msgstr "" -#: ../../howto/clinic.rst:1002 +#: ../../howto/clinic.rst:1080 msgid "" "The default value for a parameter can be more than just a literal value. It " "can be an entire expression, using math operators and looking up attributes " @@ -1460,11 +1543,11 @@ msgid "" "obvious semantics." msgstr "" -#: ../../howto/clinic.rst:1007 +#: ../../howto/clinic.rst:1085 msgid "Consider the following example:" msgstr "" -#: ../../howto/clinic.rst:1013 +#: ../../howto/clinic.rst:1091 msgid "" ":py:data:`sys.maxsize` can have different values on different platforms. " "Therefore Argument Clinic can't simply evaluate that expression locally and " @@ -1472,7 +1555,7 @@ msgid "" "evaluated at runtime, when the user asks for the function's signature." msgstr "" -#: ../../howto/clinic.rst:1018 +#: ../../howto/clinic.rst:1096 msgid "" "What namespace is available when the expression is evaluated? It's " "evaluated in the context of the module the builtin came from. So, if your " @@ -1480,7 +1563,7 @@ msgid "" "it:" msgstr "" -#: ../../howto/clinic.rst:1026 +#: ../../howto/clinic.rst:1104 msgid "" "If the symbol isn't found in the current module, it fails over to looking " "in :py:data:`sys.modules`. That's how it can find :py:data:`sys.maxsize` " @@ -1489,7 +1572,7 @@ msgid "" "are preloaded by Python itself.)" msgstr "" -#: ../../howto/clinic.rst:1031 +#: ../../howto/clinic.rst:1109 msgid "" "Evaluating default values only at runtime means Argument Clinic can't " "compute the correct equivalent C default value. So you need to tell it " @@ -1497,7 +1580,7 @@ msgid "" "expression in C, using the *c_default* parameter to the converter:" msgstr "" -#: ../../howto/clinic.rst:1040 +#: ../../howto/clinic.rst:1118 msgid "" "Another complication: Argument Clinic can't know in advance whether or not " "the expression you supply is valid. It parses it to make sure it looks " @@ -1505,38 +1588,38 @@ msgid "" "expressions to specify values that are guaranteed to be valid at runtime!" msgstr "" -#: ../../howto/clinic.rst:1045 +#: ../../howto/clinic.rst:1123 msgid "" "Finally, because expressions must be representable as static C values, there " "are many restrictions on legal expressions. Here's a list of Python " "features you're not permitted to use:" msgstr "" -#: ../../howto/clinic.rst:1049 +#: ../../howto/clinic.rst:1127 msgid "Function calls." msgstr "" -#: ../../howto/clinic.rst:1050 +#: ../../howto/clinic.rst:1128 msgid "Inline if statements (``3 if foo else 5``)." msgstr "" -#: ../../howto/clinic.rst:1051 +#: ../../howto/clinic.rst:1129 msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." msgstr "" -#: ../../howto/clinic.rst:1052 +#: ../../howto/clinic.rst:1130 msgid "List/set/dict comprehensions and generator expressions." msgstr "" -#: ../../howto/clinic.rst:1053 +#: ../../howto/clinic.rst:1131 msgid "Tuple/list/set/dict literals." msgstr "" -#: ../../howto/clinic.rst:1057 +#: ../../howto/clinic.rst:1137 msgid "How to use return converters" msgstr "" -#: ../../howto/clinic.rst:1059 +#: ../../howto/clinic.rst:1139 msgid "" "By default, the impl function Argument Clinic generates for you returns :c:" "type:`PyObject * `. But your C function often computes some C " @@ -1546,38 +1629,38 @@ msgid "" "a Python type too?" msgstr "" -#: ../../howto/clinic.rst:1067 +#: ../../howto/clinic.rst:1147 msgid "" "That's what a \"return converter\" does. It changes your impl function to " "return some C type, then adds code to the generated (non-impl) function to " "handle converting that value into the appropriate :c:type:`!PyObject *`." msgstr "" -#: ../../howto/clinic.rst:1071 +#: ../../howto/clinic.rst:1151 msgid "" "The syntax for return converters is similar to that of parameter converters. " "You specify the return converter like it was a return annotation on the " "function itself, using ``->`` notation." msgstr "" -#: ../../howto/clinic.rst:1075 +#: ../../howto/clinic.rst:1155 msgid "For example:" msgstr "" -#: ../../howto/clinic.rst:1088 +#: ../../howto/clinic.rst:1168 msgid "" "Return converters behave much the same as parameter converters; they take " "arguments, the arguments are all keyword-only, and if you're not changing " "any of the default arguments you can omit the parentheses." msgstr "" -#: ../../howto/clinic.rst:1092 +#: ../../howto/clinic.rst:1172 msgid "" "(If you use both ``\"as\"`` *and* a return converter for your function, the " "``\"as\"`` should come before the return converter.)" msgstr "" -#: ../../howto/clinic.rst:1095 +#: ../../howto/clinic.rst:1175 msgid "" "There's one additional complication when using return converters: how do you " "indicate an error has occurred? Normally, a function returns a valid (non-" @@ -1590,127 +1673,127 @@ msgid "" "you return like normal." msgstr "" -#: ../../howto/clinic.rst:1104 +#: ../../howto/clinic.rst:1184 msgid "Currently Argument Clinic supports only a few return converters:" msgstr "" -#: ../../howto/clinic.rst:1118 +#: ../../howto/clinic.rst:1198 msgid "" "None of these take parameters. For all of these, return ``-1`` to indicate " "error." msgstr "" -#: ../../howto/clinic.rst:1121 +#: ../../howto/clinic.rst:1201 msgid "" "To see all the return converters Argument Clinic supports, along with their " "parameters (if any), just run ``Tools/clinic/clinic.py --converters`` for " "the full list." msgstr "" -#: ../../howto/clinic.rst:1127 +#: ../../howto/clinic.rst:1207 msgid "How to clone existing functions" msgstr "" -#: ../../howto/clinic.rst:1129 +#: ../../howto/clinic.rst:1209 msgid "" "If you have a number of functions that look similar, you may be able to use " "Clinic's \"clone\" feature. When you clone an existing function, you reuse:" msgstr "" -#: ../../howto/clinic.rst:1133 +#: ../../howto/clinic.rst:1213 msgid "its parameters, including" msgstr "" -#: ../../howto/clinic.rst:1135 +#: ../../howto/clinic.rst:1215 msgid "their names," msgstr "" -#: ../../howto/clinic.rst:1137 +#: ../../howto/clinic.rst:1217 msgid "their converters, with all parameters," msgstr "" -#: ../../howto/clinic.rst:1139 +#: ../../howto/clinic.rst:1219 msgid "their default values," msgstr "" -#: ../../howto/clinic.rst:1141 +#: ../../howto/clinic.rst:1221 msgid "their per-parameter docstrings," msgstr "" -#: ../../howto/clinic.rst:1143 +#: ../../howto/clinic.rst:1223 msgid "" "their *kind* (whether they're positional only, positional or keyword, or " "keyword only), and" msgstr "" -#: ../../howto/clinic.rst:1146 +#: ../../howto/clinic.rst:1226 msgid "its return converter." msgstr "" -#: ../../howto/clinic.rst:1148 +#: ../../howto/clinic.rst:1228 msgid "" "The only thing not copied from the original function is its docstring; the " "syntax allows you to specify a new docstring." msgstr "" -#: ../../howto/clinic.rst:1151 +#: ../../howto/clinic.rst:1231 msgid "Here's the syntax for cloning a function::" msgstr "" -#: ../../howto/clinic.rst:1159 +#: ../../howto/clinic.rst:1239 msgid "" "(The functions can be in different modules or classes. I wrote ``module." "class`` in the sample just to illustrate that you must use the full path to " "*both* functions.)" msgstr "" -#: ../../howto/clinic.rst:1163 +#: ../../howto/clinic.rst:1243 msgid "" "Sorry, there's no syntax for partially cloning a function, or cloning a " "function then modifying it. Cloning is an all-or nothing proposition." msgstr "" -#: ../../howto/clinic.rst:1166 +#: ../../howto/clinic.rst:1246 msgid "" "Also, the function you are cloning from must have been previously defined in " "the current file." msgstr "" -#: ../../howto/clinic.rst:1171 +#: ../../howto/clinic.rst:1251 msgid "How to call Python code" msgstr "" -#: ../../howto/clinic.rst:1173 +#: ../../howto/clinic.rst:1253 msgid "" "The rest of the advanced topics require you to write Python code which lives " "inside your C file and modifies Argument Clinic's runtime state. This is " "simple: you simply define a Python block." msgstr "" -#: ../../howto/clinic.rst:1177 +#: ../../howto/clinic.rst:1257 msgid "" "A Python block uses different delimiter lines than an Argument Clinic " "function block. It looks like this::" msgstr "" -#: ../../howto/clinic.rst:1184 +#: ../../howto/clinic.rst:1264 msgid "" "All the code inside the Python block is executed at the time it's parsed. " "All text written to stdout inside the block is redirected into the " "\"output\" after the block." msgstr "" -#: ../../howto/clinic.rst:1188 +#: ../../howto/clinic.rst:1268 msgid "" "As an example, here's a Python block that adds a static integer variable to " "the C code::" msgstr "" -#: ../../howto/clinic.rst:1199 +#: ../../howto/clinic.rst:1281 msgid "How to use the \"self converter\"" msgstr "" -#: ../../howto/clinic.rst:1201 +#: ../../howto/clinic.rst:1283 msgid "" "Argument Clinic automatically adds a \"self\" parameter for you using a " "default converter. It automatically sets the ``type`` of this parameter to " @@ -1721,13 +1804,13 @@ msgid "" "self_converter` or a subclass thereof." msgstr "" -#: ../../howto/clinic.rst:1210 +#: ../../howto/clinic.rst:1292 msgid "" "What's the point? This lets you override the type of ``self``, or give it a " "different default name." msgstr "" -#: ../../howto/clinic.rst:1213 +#: ../../howto/clinic.rst:1295 msgid "" "How do you specify the custom type you want to cast ``self`` to? If you only " "have one or two functions with the same type for ``self``, you can directly " @@ -1735,18 +1818,18 @@ msgid "" "want to use as the *type* parameter::" msgstr "" -#: ../../howto/clinic.rst:1229 +#: ../../howto/clinic.rst:1311 msgid "" "On the other hand, if you have a lot of functions that will use the same " "type for ``self``, it's best to create your own converter, subclassing :" "class:`!self_converter` but overwriting the :py:attr:`!type` member::" msgstr "" -#: ../../howto/clinic.rst:1251 +#: ../../howto/clinic.rst:1333 msgid "How to use the \"defining class\" converter" msgstr "" -#: ../../howto/clinic.rst:1253 +#: ../../howto/clinic.rst:1335 msgid "" "Argument Clinic facilitates gaining access to the defining class of a " "method. This is useful for :ref:`heap type ` methods that need " @@ -1756,25 +1839,25 @@ msgid "" "example from a module method." msgstr "" -#: ../../howto/clinic.rst:1259 +#: ../../howto/clinic.rst:1341 msgid "" "Example from :source:`Modules/zlibmodule.c`. First, ``defining_class`` is " "added to the clinic input::" msgstr "" -#: ../../howto/clinic.rst:1271 +#: ../../howto/clinic.rst:1353 msgid "" "After running the Argument Clinic tool, the following function signature is " "generated::" msgstr "" -#: ../../howto/clinic.rst:1281 +#: ../../howto/clinic.rst:1363 msgid "" "The following code can now use ``PyType_GetModuleState(cls)`` to fetch the " "module state::" msgstr "" -#: ../../howto/clinic.rst:1287 +#: ../../howto/clinic.rst:1369 msgid "" "Each method may only have one argument using this converter, and it must " "appear after ``self``, or, if ``self`` is not used, as the first argument. " @@ -1782,14 +1865,14 @@ msgid "" "appear in the :py:attr:`!__text_signature__`." msgstr "" -#: ../../howto/clinic.rst:1292 +#: ../../howto/clinic.rst:1374 msgid "" "The ``defining_class`` converter is not compatible with :py:meth:`!__init__` " "and :py:meth:`!__new__` methods, which cannot use the :c:macro:`METH_METHOD` " "convention." msgstr "" -#: ../../howto/clinic.rst:1296 +#: ../../howto/clinic.rst:1378 msgid "" "It is not possible to use ``defining_class`` with slot methods. In order to " "fetch the module state from such methods, use :c:func:" @@ -1798,15 +1881,15 @@ msgid "" "``setattro`` slot method in :source:`Modules/_threadmodule.c`::" msgstr "" -#: ../../howto/clinic.rst:1311 +#: ../../howto/clinic.rst:1393 msgid "See also :pep:`573`." msgstr "也請見 :pep:`573`\\ 。" -#: ../../howto/clinic.rst:1315 +#: ../../howto/clinic.rst:1397 msgid "How to write a custom converter" msgstr "" -#: ../../howto/clinic.rst:1317 +#: ../../howto/clinic.rst:1399 msgid "" "As we hinted at in the previous section... you can write your own " "converters! A converter is simply a Python class that inherits from :py:" @@ -1815,7 +1898,7 @@ msgid "" "a :c:func:`PyArg_ParseTuple` \"converter function\"." msgstr "" -#: ../../howto/clinic.rst:1323 +#: ../../howto/clinic.rst:1405 msgid "" "Your converter class should be named ``*something*_converter``. If the name " "follows this convention, then your converter class will be automatically " @@ -1824,7 +1907,7 @@ msgid "" "metaclass.)" msgstr "" -#: ../../howto/clinic.rst:1329 +#: ../../howto/clinic.rst:1411 msgid "" "You shouldn't subclass :py:meth:`!CConverter.__init__`. Instead, you should " "write a :py:meth:`!converter_init` function. :py:meth:`!converter_init` " @@ -1833,38 +1916,38 @@ msgid "" "Argument Clinic will be passed along to your :py:meth:`!converter_init`." msgstr "" -#: ../../howto/clinic.rst:1336 +#: ../../howto/clinic.rst:1418 msgid "" "There are some additional members of :py:class:`!CConverter` you may wish to " "specify in your subclass. Here's the current list:" msgstr "" -#: ../../howto/clinic.rst:1345 +#: ../../howto/clinic.rst:1427 msgid "" "The C type to use for this variable. :attr:`!type` should be a Python string " "specifying the type, e.g. ``'int'``. If this is a pointer type, the type " "string should end with ``' *'``." msgstr "" -#: ../../howto/clinic.rst:1352 +#: ../../howto/clinic.rst:1434 msgid "" "The Python default value for this parameter, as a Python value. Or the magic " "value ``unspecified`` if there is no default." msgstr "" -#: ../../howto/clinic.rst:1357 +#: ../../howto/clinic.rst:1439 msgid "" ":attr:`!default` as it should appear in Python code, as a string. Or " "``None`` if there is no default." msgstr "" -#: ../../howto/clinic.rst:1363 +#: ../../howto/clinic.rst:1445 msgid "" ":attr:`!default` as it should appear in C code, as a string. Or ``None`` if " "there is no default." msgstr "" -#: ../../howto/clinic.rst:1369 +#: ../../howto/clinic.rst:1451 msgid "" "The default value used to initialize the C variable when there is no " "default, but not specifying a default may result in an \"uninitialized " @@ -1875,29 +1958,29 @@ msgid "" "non-empty string." msgstr "" -#: ../../howto/clinic.rst:1381 +#: ../../howto/clinic.rst:1463 msgid "The name of the C converter function, as a string." msgstr "" -#: ../../howto/clinic.rst:1385 +#: ../../howto/clinic.rst:1467 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into the impl function." msgstr "" -#: ../../howto/clinic.rst:1391 +#: ../../howto/clinic.rst:1473 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into :c:func:`PyArg_ParseTuple`." msgstr "" -#: ../../howto/clinic.rst:1396 +#: ../../howto/clinic.rst:1478 msgid "" "Here's the simplest example of a custom converter, from :source:`Modules/" "zlibmodule.c`::" msgstr "" -#: ../../howto/clinic.rst:1407 +#: ../../howto/clinic.rst:1489 msgid "" "This block adds a converter to Argument Clinic named ``ssize_t``. " "Parameters declared as ``ssize_t`` will be declared as type :c:type:" @@ -1906,7 +1989,7 @@ msgid "" "automatically support default values." msgstr "" -#: ../../howto/clinic.rst:1413 +#: ../../howto/clinic.rst:1495 msgid "" "More sophisticated custom converters can insert custom C code to handle " "initialization and cleanup. You can see more examples of custom converters " @@ -1914,18 +1997,18 @@ msgid "" "CConverter`." msgstr "" -#: ../../howto/clinic.rst:1420 +#: ../../howto/clinic.rst:1502 msgid "How to write a custom return converter" msgstr "" -#: ../../howto/clinic.rst:1422 +#: ../../howto/clinic.rst:1504 msgid "" "Writing a custom return converter is much like writing a custom converter. " "Except it's somewhat simpler, because return converters are themselves much " "simpler." msgstr "" -#: ../../howto/clinic.rst:1426 +#: ../../howto/clinic.rst:1508 msgid "" "Return converters must subclass :py:class:`!CReturnConverter`. There are no " "examples yet of custom return converters, because they are not widely used " @@ -1934,60 +2017,60 @@ msgid "" "CReturnConverter` and all its subclasses." msgstr "" -#: ../../howto/clinic.rst:1435 +#: ../../howto/clinic.rst:1517 msgid "How to convert ``METH_O`` and ``METH_NOARGS`` functions" msgstr "" -#: ../../howto/clinic.rst:1437 +#: ../../howto/clinic.rst:1519 msgid "" "To convert a function using :c:macro:`METH_O`, make sure the function's " "single argument is using the ``object`` converter, and mark the arguments as " "positional-only::" msgstr "" -#: ../../howto/clinic.rst:1449 +#: ../../howto/clinic.rst:1531 msgid "" "To convert a function using :c:macro:`METH_NOARGS`, just don't specify any " "arguments." msgstr "" -#: ../../howto/clinic.rst:1452 +#: ../../howto/clinic.rst:1534 msgid "" "You can still use a self converter, a return converter, and specify a *type* " "argument to the object converter for :c:macro:`METH_O`." msgstr "" -#: ../../howto/clinic.rst:1457 +#: ../../howto/clinic.rst:1539 msgid "How to convert ``tp_new`` and ``tp_init`` functions" msgstr "" -#: ../../howto/clinic.rst:1459 +#: ../../howto/clinic.rst:1541 msgid "" "You can convert :c:member:`~PyTypeObject.tp_new` and :c:member:" "`~PyTypeObject.tp_init` functions. Just name them ``__new__`` or " "``__init__`` as appropriate. Notes:" msgstr "" -#: ../../howto/clinic.rst:1463 +#: ../../howto/clinic.rst:1545 msgid "" "The function name generated for ``__new__`` doesn't end in ``__new__`` like " "it would by default. It's just the name of the class, converted into a " "valid C identifier." msgstr "" -#: ../../howto/clinic.rst:1467 +#: ../../howto/clinic.rst:1549 msgid "No :c:type:`PyMethodDef` ``#define`` is generated for these functions." msgstr "" -#: ../../howto/clinic.rst:1469 +#: ../../howto/clinic.rst:1551 msgid "``__init__`` functions return ``int``, not ``PyObject *``." msgstr "" -#: ../../howto/clinic.rst:1471 +#: ../../howto/clinic.rst:1553 msgid "Use the docstring as the class docstring." msgstr "" -#: ../../howto/clinic.rst:1473 +#: ../../howto/clinic.rst:1555 msgid "" "Although ``__new__`` and ``__init__`` functions must always accept both the " "``args`` and ``kwargs`` objects, when converting you may specify any " @@ -1996,11 +2079,11 @@ msgid "" "it receives any.)" msgstr "" -#: ../../howto/clinic.rst:1481 +#: ../../howto/clinic.rst:1563 msgid "How to change and redirect Clinic's output" msgstr "" -#: ../../howto/clinic.rst:1483 +#: ../../howto/clinic.rst:1565 msgid "" "It can be inconvenient to have Clinic's output interspersed with your " "conventional hand-edited C code. Luckily, Clinic is configurable: you can " @@ -2009,7 +2092,7 @@ msgid "" "Clinic's generated output." msgstr "" -#: ../../howto/clinic.rst:1489 +#: ../../howto/clinic.rst:1571 msgid "" "While changing Clinic's output in this manner can be a boon to readability, " "it may result in Clinic code using types before they are defined, or your " @@ -2021,15 +2104,15 @@ msgid "" "rearranging your code to fix definition-before-use problems.)" msgstr "" -#: ../../howto/clinic.rst:1498 +#: ../../howto/clinic.rst:1580 msgid "Let's start with defining some terminology:" msgstr "" -#: ../../howto/clinic.rst:1525 +#: ../../howto/clinic.rst:1607 msgid "*field*" msgstr "" -#: ../../howto/clinic.rst:1501 +#: ../../howto/clinic.rst:1583 msgid "" "A field, in this context, is a subsection of Clinic's output. For example, " "the ``#define`` for the :c:type:`PyMethodDef` structure is a field, called " @@ -2037,7 +2120,7 @@ msgid "" "function definition:" msgstr "" -#: ../../howto/clinic.rst:1516 +#: ../../howto/clinic.rst:1598 msgid "" "All the names are of the form ``\"_\"``, where ``\"\"`` is the " "semantic object represented (the parsing function, the impl function, the " @@ -2050,45 +2133,45 @@ msgid "" "``\"_define\"``, representing that it's a preprocessor #define.)" msgstr "" -#: ../../howto/clinic.rst:1559 +#: ../../howto/clinic.rst:1641 msgid "*destination*" msgstr "" -#: ../../howto/clinic.rst:1528 +#: ../../howto/clinic.rst:1610 msgid "" "A destination is a place Clinic can write output to. There are five built-" "in destinations:" msgstr "" -#: ../../howto/clinic.rst:1533 ../../howto/clinic.rst:1608 -#: ../../howto/clinic.rst:1686 +#: ../../howto/clinic.rst:1615 ../../howto/clinic.rst:1690 +#: ../../howto/clinic.rst:1768 msgid "``block``" msgstr "``block``" -#: ../../howto/clinic.rst:1532 +#: ../../howto/clinic.rst:1614 msgid "" "The default destination: printed in the output section of the current Clinic " "block." msgstr "" -#: ../../howto/clinic.rst:1539 ../../howto/clinic.rst:1635 -#: ../../howto/clinic.rst:1689 +#: ../../howto/clinic.rst:1621 ../../howto/clinic.rst:1717 +#: ../../howto/clinic.rst:1771 msgid "``buffer``" msgstr "``buffer``" -#: ../../howto/clinic.rst:1536 +#: ../../howto/clinic.rst:1618 msgid "" "A text buffer where you can save text for later. Text sent here is appended " "to the end of any existing text. It's an error to have any text left in the " "buffer when Clinic finishes processing a file." msgstr "" -#: ../../howto/clinic.rst:1550 ../../howto/clinic.rst:1621 -#: ../../howto/clinic.rst:1715 +#: ../../howto/clinic.rst:1632 ../../howto/clinic.rst:1703 +#: ../../howto/clinic.rst:1797 msgid "``file``" msgstr "``file``" -#: ../../howto/clinic.rst:1542 +#: ../../howto/clinic.rst:1624 msgid "" "A separate \"clinic file\" that will be created automatically by Clinic. The " "filename chosen for the file is ``{basename}.clinic{extension}``, where " @@ -2097,65 +2180,65 @@ msgid "" "for :file:`_pickle.c` would be written to :file:`_pickle.clinic.c`.)" msgstr "" -#: ../../howto/clinic.rst:1549 +#: ../../howto/clinic.rst:1631 msgid "" "**Important: When using a** ``file`` **destination, you** *must check in* " "**the generated file!**" msgstr "" -#: ../../howto/clinic.rst:1555 ../../howto/clinic.rst:1648 -#: ../../howto/clinic.rst:1719 +#: ../../howto/clinic.rst:1637 ../../howto/clinic.rst:1730 +#: ../../howto/clinic.rst:1801 msgid "``two-pass``" msgstr "``two-pass``" -#: ../../howto/clinic.rst:1553 +#: ../../howto/clinic.rst:1635 msgid "" "A buffer like ``buffer``. However, a two-pass buffer can only be dumped " "once, and it prints out all text sent to it during all processing, even from " "Clinic blocks *after* the dumping point." msgstr "" -#: ../../howto/clinic.rst:1559 ../../howto/clinic.rst:1682 +#: ../../howto/clinic.rst:1641 ../../howto/clinic.rst:1764 msgid "``suppress``" msgstr "``suppress``" -#: ../../howto/clinic.rst:1558 +#: ../../howto/clinic.rst:1640 msgid "The text is suppressed—thrown away." msgstr "" -#: ../../howto/clinic.rst:1561 +#: ../../howto/clinic.rst:1643 msgid "Clinic defines five new directives that let you reconfigure its output." msgstr "" -#: ../../howto/clinic.rst:1563 +#: ../../howto/clinic.rst:1645 msgid "The first new directive is ``dump``:" msgstr "" -#: ../../howto/clinic.rst:1569 +#: ../../howto/clinic.rst:1651 msgid "" "This dumps the current contents of the named destination into the output of " "the current block, and empties it. This only works with ``buffer`` and " "``two-pass`` destinations." msgstr "" -#: ../../howto/clinic.rst:1573 +#: ../../howto/clinic.rst:1655 msgid "" "The second new directive is ``output``. The most basic form of ``output`` " "is like this:" msgstr "" -#: ../../howto/clinic.rst:1580 +#: ../../howto/clinic.rst:1662 msgid "" "This tells Clinic to output *field* to *destination*. ``output`` also " "supports a special meta-destination, called ``everything``, which tells " "Clinic to output *all* fields to that *destination*." msgstr "" -#: ../../howto/clinic.rst:1584 +#: ../../howto/clinic.rst:1666 msgid "``output`` has a number of other functions:" msgstr "" -#: ../../howto/clinic.rst:1593 +#: ../../howto/clinic.rst:1675 msgid "" "``output push`` and ``output pop`` allow you to push and pop configurations " "on an internal configuration stack, so that you can temporarily modify the " @@ -2164,25 +2247,25 @@ msgid "" "when you wish to restore the previous configuration." msgstr "" -#: ../../howto/clinic.rst:1600 +#: ../../howto/clinic.rst:1682 msgid "" "``output preset`` sets Clinic's output to one of several built-in preset " "configurations, as follows:" msgstr "" -#: ../../howto/clinic.rst:1604 +#: ../../howto/clinic.rst:1686 msgid "" "Clinic's original starting configuration. Writes everything immediately " "after the input block." msgstr "" -#: ../../howto/clinic.rst:1607 +#: ../../howto/clinic.rst:1689 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write " "everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1611 +#: ../../howto/clinic.rst:1693 msgid "" "Designed to write everything to the \"clinic file\" that it can. You then " "``#include`` this file near the top of your file. You may need to rearrange " @@ -2190,17 +2273,17 @@ msgid "" "declarations for various ``typedef`` and ``PyTypeObject`` definitions." msgstr "" -#: ../../howto/clinic.rst:1617 +#: ../../howto/clinic.rst:1699 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write the " "``impl_definition`` to ``block``, and write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1621 +#: ../../howto/clinic.rst:1703 msgid "The default filename is ``\"{dirname}/clinic/{basename}.h\"``." msgstr "" -#: ../../howto/clinic.rst:1624 +#: ../../howto/clinic.rst:1706 msgid "" "Save up most of the output from Clinic, to be written into your file near " "the end. For Python files implementing modules or builtin types, it's " @@ -2210,14 +2293,14 @@ msgid "" "static ``PyMethodDef`` arrays defined in the middle of the file." msgstr "" -#: ../../howto/clinic.rst:1633 +#: ../../howto/clinic.rst:1715 msgid "" "Suppress the ``parser_prototype``, ``impl_prototype``, and " "``docstring_prototype``, write the ``impl_definition`` to ``block``, and " "write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1638 +#: ../../howto/clinic.rst:1720 msgid "" "Similar to the ``buffer`` preset, but writes forward declarations to the " "``two-pass`` buffer, and definitions to the ``buffer``. This is similar to " @@ -2226,18 +2309,18 @@ msgid "" "near the end just like you would when using the ``buffer`` preset." msgstr "" -#: ../../howto/clinic.rst:1645 +#: ../../howto/clinic.rst:1727 msgid "" "Suppresses the ``impl_prototype``, write the ``impl_definition`` to " "``block``, write ``docstring_prototype``, ``methoddef_define``, and " "``parser_prototype`` to ``two-pass``, write everything else to ``buffer``." msgstr "" -#: ../../howto/clinic.rst:1659 +#: ../../howto/clinic.rst:1741 msgid "``partial-buffer``" msgstr "``partial-buffer``" -#: ../../howto/clinic.rst:1651 +#: ../../howto/clinic.rst:1733 msgid "" "Similar to the ``buffer`` preset, but writes more things to ``block``, only " "writing the really big chunks of generated code to ``buffer``. This avoids " @@ -2247,137 +2330,137 @@ msgid "" "preset." msgstr "" -#: ../../howto/clinic.rst:1658 +#: ../../howto/clinic.rst:1740 msgid "" "Suppresses the ``impl_prototype``, write the ``docstring_definition`` and " "``parser_definition`` to ``buffer``, write everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1661 +#: ../../howto/clinic.rst:1743 msgid "The third new directive is ``destination``:" msgstr "" -#: ../../howto/clinic.rst:1667 +#: ../../howto/clinic.rst:1749 msgid "This performs an operation on the destination named ``name``." msgstr "" -#: ../../howto/clinic.rst:1669 +#: ../../howto/clinic.rst:1751 msgid "There are two defined subcommands: ``new`` and ``clear``." msgstr "" -#: ../../howto/clinic.rst:1671 +#: ../../howto/clinic.rst:1753 msgid "The ``new`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1677 +#: ../../howto/clinic.rst:1759 msgid "" "This creates a new destination with name ```` and type ````." msgstr "" -#: ../../howto/clinic.rst:1679 +#: ../../howto/clinic.rst:1761 msgid "There are five destination types:" msgstr "" -#: ../../howto/clinic.rst:1682 +#: ../../howto/clinic.rst:1764 msgid "Throws the text away." msgstr "" -#: ../../howto/clinic.rst:1685 +#: ../../howto/clinic.rst:1767 msgid "" "Writes the text to the current block. This is what Clinic originally did." msgstr "" -#: ../../howto/clinic.rst:1689 +#: ../../howto/clinic.rst:1771 msgid "A simple text buffer, like the \"buffer\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1692 +#: ../../howto/clinic.rst:1774 msgid "" "A text file. The file destination takes an extra argument, a template to " "use for building the filename, like so:" msgstr "" -#: ../../howto/clinic.rst:1695 +#: ../../howto/clinic.rst:1777 msgid "destination new " msgstr "" -#: ../../howto/clinic.rst:1697 +#: ../../howto/clinic.rst:1779 msgid "" "The template can use three strings internally that will be replaced by bits " "of the filename:" msgstr "" -#: ../../howto/clinic.rst:1700 +#: ../../howto/clinic.rst:1782 msgid "{path}" msgstr "{path}" -#: ../../howto/clinic.rst:1701 +#: ../../howto/clinic.rst:1783 msgid "The full path to the file, including directory and full filename." msgstr "" -#: ../../howto/clinic.rst:1702 +#: ../../howto/clinic.rst:1784 msgid "{dirname}" msgstr "{dirname}" -#: ../../howto/clinic.rst:1703 +#: ../../howto/clinic.rst:1785 msgid "The name of the directory the file is in." msgstr "" -#: ../../howto/clinic.rst:1704 +#: ../../howto/clinic.rst:1786 msgid "{basename}" msgstr "{basename}" -#: ../../howto/clinic.rst:1705 +#: ../../howto/clinic.rst:1787 msgid "Just the name of the file, not including the directory." msgstr "" -#: ../../howto/clinic.rst:1707 +#: ../../howto/clinic.rst:1789 msgid "{basename_root}" msgstr "{basename_root}" -#: ../../howto/clinic.rst:1707 +#: ../../howto/clinic.rst:1789 msgid "" "Basename with the extension clipped off (everything up to but not including " "the last '.')." msgstr "" -#: ../../howto/clinic.rst:1711 +#: ../../howto/clinic.rst:1793 msgid "{basename_extension}" msgstr "{basename_extension}" -#: ../../howto/clinic.rst:1710 +#: ../../howto/clinic.rst:1792 msgid "" "The last '.' and everything after it. If the basename does not contain a " "period, this will be the empty string." msgstr "" -#: ../../howto/clinic.rst:1713 +#: ../../howto/clinic.rst:1795 msgid "" "If there are no periods in the filename, {basename} and {filename} are the " "same, and {extension} is empty. \"{basename}{extension}\" is always exactly " "the same as \"{filename}\".\"" msgstr "" -#: ../../howto/clinic.rst:1718 +#: ../../howto/clinic.rst:1800 msgid "A two-pass buffer, like the \"two-pass\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1721 +#: ../../howto/clinic.rst:1803 msgid "The ``clear`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1727 +#: ../../howto/clinic.rst:1809 msgid "" "It removes all the accumulated text up to this point in the destination. (I " "don't know what you'd need this for, but I thought maybe it'd be useful " "while someone's experimenting.)" msgstr "" -#: ../../howto/clinic.rst:1731 +#: ../../howto/clinic.rst:1813 msgid "The fourth new directive is ``set``:" msgstr "" -#: ../../howto/clinic.rst:1738 +#: ../../howto/clinic.rst:1820 msgid "" "``set`` lets you set two internal variables in Clinic. ``line_prefix`` is a " "string that will be prepended to every line of Clinic's output; " @@ -2385,35 +2468,35 @@ msgid "" "output." msgstr "" -#: ../../howto/clinic.rst:1742 +#: ../../howto/clinic.rst:1824 msgid "Both of these support two format strings:" msgstr "" -#: ../../howto/clinic.rst:1745 +#: ../../howto/clinic.rst:1827 msgid "``{block comment start}``" msgstr "``{block comment start}``" -#: ../../howto/clinic.rst:1745 +#: ../../howto/clinic.rst:1827 msgid "" "Turns into the string ``/*``, the start-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1748 +#: ../../howto/clinic.rst:1830 msgid "``{block comment end}``" msgstr "``{block comment end}``" -#: ../../howto/clinic.rst:1748 +#: ../../howto/clinic.rst:1830 msgid "" "Turns into the string ``*/``, the end-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1750 +#: ../../howto/clinic.rst:1832 msgid "" "The final new directive is one you shouldn't need to use directly, called " "``preserve``:" msgstr "" -#: ../../howto/clinic.rst:1757 +#: ../../howto/clinic.rst:1839 msgid "" "This tells Clinic that the current contents of the output should be kept, " "unmodified. This is used internally by Clinic when dumping output into " @@ -2422,36 +2505,36 @@ msgid "" "gets overwritten." msgstr "" -#: ../../howto/clinic.rst:1764 +#: ../../howto/clinic.rst:1846 msgid "How to use the ``#ifdef`` trick" msgstr "" -#: ../../howto/clinic.rst:1766 +#: ../../howto/clinic.rst:1848 msgid "" "If you're converting a function that isn't available on all platforms, " "there's a trick you can use to make life a little easier. The existing code " "probably looks like this::" msgstr "" -#: ../../howto/clinic.rst:1777 +#: ../../howto/clinic.rst:1859 msgid "" "And then in the ``PyMethodDef`` structure at the bottom the existing code " "will have:" msgstr "" -#: ../../howto/clinic.rst:1786 +#: ../../howto/clinic.rst:1868 msgid "" "In this scenario, you should enclose the body of your impl function inside " "the ``#ifdef``, like so::" msgstr "" -#: ../../howto/clinic.rst:1800 +#: ../../howto/clinic.rst:1882 msgid "" "Then, remove those three lines from the :c:type:`PyMethodDef` structure, " "replacing them with the macro Argument Clinic generated:" msgstr "" -#: ../../howto/clinic.rst:1807 +#: ../../howto/clinic.rst:1889 msgid "" "(You can find the real name for this macro inside the generated code. Or you " "can calculate it yourself: it's the name of your function as defined on the " @@ -2459,27 +2542,27 @@ msgid "" "uppercased, and ``\"_METHODDEF\"`` added to the end.)" msgstr "" -#: ../../howto/clinic.rst:1812 +#: ../../howto/clinic.rst:1894 msgid "" "Perhaps you're wondering: what if ``HAVE_FUNCTIONNAME`` isn't defined? The " "``MODULE_FUNCTIONNAME_METHODDEF`` macro won't be defined either!" msgstr "" -#: ../../howto/clinic.rst:1815 +#: ../../howto/clinic.rst:1897 msgid "" "Here's where Argument Clinic gets very clever. It actually detects that the " "Argument Clinic block might be deactivated by the ``#ifdef``. When that " "happens, it generates a little extra code that looks like this::" msgstr "" -#: ../../howto/clinic.rst:1823 +#: ../../howto/clinic.rst:1905 msgid "" "That means the macro always works. If the function is defined, this turns " "into the correct structure, including the trailing comma. If the function " "is undefined, this turns into nothing." msgstr "" -#: ../../howto/clinic.rst:1827 +#: ../../howto/clinic.rst:1909 msgid "" "However, this causes one ticklish problem: where should Argument Clinic put " "this extra code when using the \"block\" output preset? It can't go in the " @@ -2487,24 +2570,24 @@ msgid "" "the whole point!)" msgstr "" -#: ../../howto/clinic.rst:1831 +#: ../../howto/clinic.rst:1913 msgid "" "In this situation, Argument Clinic writes the extra code to the \"buffer\" " "destination. This may mean that you get a complaint from Argument Clinic:" msgstr "" -#: ../../howto/clinic.rst:1839 +#: ../../howto/clinic.rst:1921 msgid "" "When this happens, just open your file, find the ``dump buffer`` block that " "Argument Clinic added to your file (it'll be at the very bottom), then move " "it above the :c:type:`PyMethodDef` structure where that macro is used." msgstr "" -#: ../../howto/clinic.rst:1845 +#: ../../howto/clinic.rst:1927 msgid "How to use Argument Clinic in Python files" msgstr "" -#: ../../howto/clinic.rst:1847 +#: ../../howto/clinic.rst:1929 msgid "" "It's actually possible to use Argument Clinic to preprocess Python files. " "There's no point to using Argument Clinic blocks, of course, as the output " @@ -2512,7 +2595,7 @@ msgid "" "Clinic to run Python blocks lets you use Python as a Python preprocessor!" msgstr "" -#: ../../howto/clinic.rst:1852 +#: ../../howto/clinic.rst:1934 msgid "" "Since Python comments are different from C comments, Argument Clinic blocks " "embedded in Python files look slightly different. They look like this:" diff --git a/howto/descriptor.po b/howto/descriptor.po index 14130dcaee..4b624d303c 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-25 00:20+0000\n" +"POT-Creation-Date: 2023-07-29 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-" @@ -551,8 +551,8 @@ msgstr "" #: ../../howto/descriptor.rst:782 msgid "" -"The full C implementation can be found in :c:func:`type_getattro()` and :c:" -"func:`_PyType_Lookup()` in :source:`Objects/typeobject.c`." +"The full C implementation can be found in :c:func:`!type_getattro` and :c:" +"func:`!_PyType_Lookup` in :source:`Objects/typeobject.c`." msgstr "" #: ../../howto/descriptor.rst:787 @@ -575,7 +575,7 @@ msgstr "" #: ../../howto/descriptor.rst:797 msgid "" -"The full C implementation can be found in :c:func:`super_getattro()` in :" +"The full C implementation can be found in :c:func:`!super_getattro` in :" "source:`Objects/typeobject.c`. A pure Python equivalent can be found in " "`Guido's Tutorial `_." @@ -643,8 +643,8 @@ msgstr "" #: ../../howto/descriptor.rst:839 msgid "" -"The implementation details are in :c:func:`type_new()` and :c:func:" -"`set_names()` in :source:`Objects/typeobject.c`." +"The implementation details are in :c:func:`!type_new` and :c:func:`!" +"set_names` in :source:`Objects/typeobject.c`." msgstr "" #: ../../howto/descriptor.rst:842 diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 7988568fb5..d422a77854 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.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: 2023-07-27 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -549,9 +549,10 @@ msgstr "" msgid "" "Slot methods—the fast C equivalents for special methods, such as :c:member:" "`~PyNumberMethods.nb_add` for :py:attr:`~object.__add__` or :c:member:" -"`~PyType.tp_new` for initialization—have a very simple API that doesn't " -"allow passing in the defining class, unlike with :c:type:`PyCMethod`. The " -"same goes for getters and setters defined with :c:type:`PyGetSetDef`." +"`~PyTypeObject.tp_new` for initialization—have a very simple API that " +"doesn't allow passing in the defining class, unlike with :c:type:" +"`PyCMethod`. The same goes for getters and setters defined with :c:type:" +"`PyGetSetDef`." msgstr "" #: ../../howto/isolating-extensions.rst:475 diff --git a/install/index.po b/install/index.po index ee720a6ebc..7495a79c10 100644 --- a/install/index.po +++ b/install/index.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: 2023-07-29 00:03+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-" @@ -551,8 +551,8 @@ msgstr "" #: ../../install/index.rst:375 msgid "" "To make Python find the distributions installed with this scheme, you may " -"have to :ref:`modify Python's search path ` or edit :mod:" -"`sitecustomize` (see :mod:`site`) to call :func:`site.addsitedir` or edit :" +"have to :ref:`modify Python's search path ` or edit :mod:`!" +"sitecustomize` (see :mod:`site`) to call :func:`site.addsitedir` or edit :" "data:`sys.path`." msgstr "" diff --git a/library/fcntl.po b/library/fcntl.po index 2265fdcd2c..5638093bd0 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -259,16 +259,15 @@ msgid "" msgstr "" #: ../../library/fcntl.rst:175 -msgid ":const:`0` -- relative to the start of the file (:const:`os.SEEK_SET`)" +msgid "``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)" msgstr "" #: ../../library/fcntl.rst:176 -msgid "" -":const:`1` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" +msgid "``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)" msgstr "" #: ../../library/fcntl.rst:177 -msgid ":const:`2` -- relative to the end of the file (:const:`os.SEEK_END`)" +msgid "``2`` -- relative to the end of the file (:const:`os.SEEK_END`)" msgstr "" #: ../../library/fcntl.rst:179 diff --git a/library/fractions.po b/library/fractions.po index 0c6547260d..ba6fd3084a 100644 --- a/library/fractions.po +++ b/library/fractions.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: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2016-01-31 07:18+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -41,8 +41,8 @@ msgstr "" msgid "" "The first version requires that *numerator* and *denominator* are instances " "of :class:`numbers.Rational` and returns a new :class:`Fraction` instance " -"with value ``numerator/denominator``. If *denominator* is :const:`0`, it " -"raises a :exc:`ZeroDivisionError`. The second version requires that " +"with value ``numerator/denominator``. If *denominator* is ``0``, it raises " +"a :exc:`ZeroDivisionError`. The second version requires that " "*other_fraction* is an instance of :class:`numbers.Rational` and returns a :" "class:`Fraction` instance with the same value. The next two versions accept " "either a :class:`float` or a :class:`decimal.Decimal` instance, and return " diff --git a/library/importlib.po b/library/importlib.po index 0d8ed9706a..9ebc47b3d0 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 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-" @@ -20,7 +20,7 @@ msgstr "" #: ../../library/importlib.rst:2 msgid ":mod:`!importlib` --- The implementation of :keyword:`!import`" -msgstr "" +msgstr ":mod:`!importlib` --- :keyword:`!import` 的實作" #: ../../library/importlib.rst:12 msgid "**Source code:** :source:`Lib/importlib/__init__.py`" @@ -670,15 +670,15 @@ msgstr "" #: ../../library/importlib.rst:488 msgid "Implementation of :meth:`Loader.exec_module`." -msgstr "" +msgstr ":meth:`Loader.exec_module` 的實作。" #: ../../library/importlib.rst:494 msgid "Implementation of :meth:`Loader.load_module`." -msgstr "" +msgstr ":meth:`Loader.load_module` 的實作。" #: ../../library/importlib.rst:496 msgid "use :meth:`exec_module` instead." -msgstr "" +msgstr "請改用 :meth:`exec_module`。" #: ../../library/importlib.rst:502 msgid "" @@ -728,7 +728,7 @@ msgstr "" msgid "Use :meth:`Loader.exec_module` instead." msgstr "" -#: ../../library/importlib.rst:548 ../../library/importlib.rst:982 +#: ../../library/importlib.rst:548 ../../library/importlib.rst:989 msgid "Returns :attr:`path`." msgstr "" @@ -1145,46 +1145,57 @@ msgid "" "support. The *path* argument is the path to the extension module's file." msgstr "" -#: ../../library/importlib.rst:948 +#: ../../library/importlib.rst:944 +msgid "" +"Note that, by default, importing an extension module will fail in " +"subinterpreters if it doesn't implement multi-phase init (see :pep:`489`), " +"even if it would otherwise import successfully." +msgstr "" + +#: ../../library/importlib.rst:950 +msgid "Multi-phase init is now required for use in subinterpreters." +msgstr "" + +#: ../../library/importlib.rst:955 msgid "Name of the module the loader supports." msgstr "" -#: ../../library/importlib.rst:952 +#: ../../library/importlib.rst:959 msgid "Path to the extension module." msgstr "" -#: ../../library/importlib.rst:956 +#: ../../library/importlib.rst:963 msgid "" "Creates the module object from the given specification in accordance with :" "pep:`489`." msgstr "" -#: ../../library/importlib.rst:963 +#: ../../library/importlib.rst:970 msgid "Initializes the given module object in accordance with :pep:`489`." msgstr "" -#: ../../library/importlib.rst:969 +#: ../../library/importlib.rst:976 msgid "" "Returns ``True`` if the file path points to a package's ``__init__`` module " "based on :attr:`EXTENSION_SUFFIXES`." msgstr "" -#: ../../library/importlib.rst:974 +#: ../../library/importlib.rst:981 msgid "Returns ``None`` as extension modules lack a code object." msgstr "" -#: ../../library/importlib.rst:978 +#: ../../library/importlib.rst:985 msgid "Returns ``None`` as extension modules do not have source code." msgstr "" -#: ../../library/importlib.rst:989 +#: ../../library/importlib.rst:996 msgid "" "A concrete implementation of :class:`importlib.abc.InspectLoader` for " "namespace packages. This is an alias for a private class and is only made " "public for introspecting the ``__loader__`` attribute on namespace packages::" msgstr "" -#: ../../library/importlib.rst:1007 +#: ../../library/importlib.rst:1014 msgid "" "A specification for a module's import-system-related state. This is " "typically exposed as the module's :attr:`__spec__` attribute. In the " @@ -1197,31 +1208,31 @@ msgid "" "reflected in the module's :attr:`__spec__.origin`, and vice versa." msgstr "" -#: ../../library/importlib.rst:1021 +#: ../../library/importlib.rst:1028 msgid "(:attr:`__name__`)" msgstr "(:attr:`__name__`)" -#: ../../library/importlib.rst:1023 +#: ../../library/importlib.rst:1030 msgid "" "The module's fully qualified name. The :term:`finder` should always set this " "attribute to a non-empty string." msgstr "" -#: ../../library/importlib.rst:1028 +#: ../../library/importlib.rst:1035 msgid "(:attr:`__loader__`)" msgstr "(:attr:`__loader__`)" -#: ../../library/importlib.rst:1030 +#: ../../library/importlib.rst:1037 msgid "" "The :term:`loader` used to load the module. The :term:`finder` should always " "set this attribute." msgstr "" -#: ../../library/importlib.rst:1035 +#: ../../library/importlib.rst:1042 msgid "(:attr:`__file__`)" msgstr "(:attr:`__file__`)" -#: ../../library/importlib.rst:1037 +#: ../../library/importlib.rst:1044 msgid "" "The location the :term:`loader` should use to load the module. For example, " "for modules loaded from a .py file this is the filename. The :term:`finder` " @@ -1230,11 +1241,11 @@ msgid "" "namespace packages), it should be set to ``None``." msgstr "" -#: ../../library/importlib.rst:1045 +#: ../../library/importlib.rst:1052 msgid "(:attr:`__path__`)" msgstr "(:attr:`__path__`)" -#: ../../library/importlib.rst:1047 +#: ../../library/importlib.rst:1054 msgid "" "The list of locations where the package's submodules will be found. Most of " "the time this is a single directory. The :term:`finder` should set this " @@ -1244,66 +1255,66 @@ msgid "" "packages." msgstr "" -#: ../../library/importlib.rst:1056 +#: ../../library/importlib.rst:1063 msgid "" "The :term:`finder` may set this attribute to an object containing " "additional, module-specific data to use when loading the module. Otherwise " "it should be set to ``None``." msgstr "" -#: ../../library/importlib.rst:1062 +#: ../../library/importlib.rst:1069 msgid "(:attr:`__cached__`)" msgstr "(:attr:`__cached__`)" -#: ../../library/importlib.rst:1064 +#: ../../library/importlib.rst:1071 msgid "" "The filename of a compiled version of the module's code. The :term:`finder` " "should always set this attribute but it may be ``None`` for modules that do " "not need compiled code stored." msgstr "" -#: ../../library/importlib.rst:1070 +#: ../../library/importlib.rst:1077 msgid "(:attr:`__package__`)" msgstr "(:attr:`__package__`)" -#: ../../library/importlib.rst:1072 +#: ../../library/importlib.rst:1079 msgid "" "(Read-only) The fully qualified name of the package the module is in (or the " "empty string for a top-level module). If the module is a package then this " "is the same as :attr:`name`." msgstr "" -#: ../../library/importlib.rst:1079 +#: ../../library/importlib.rst:1086 msgid "``True`` if the spec's :attr:`origin` refers to a loadable location," msgstr "" -#: ../../library/importlib.rst:1079 +#: ../../library/importlib.rst:1086 msgid "" "``False`` otherwise. This value impacts how :attr:`origin` is interpreted " "and how the module's :attr:`__file__` is populated." msgstr "" -#: ../../library/importlib.rst:1084 +#: ../../library/importlib.rst:1091 msgid ":mod:`importlib.util` -- Utility code for importers" msgstr "" -#: ../../library/importlib.rst:1090 +#: ../../library/importlib.rst:1097 msgid "**Source code:** :source:`Lib/importlib/util.py`" msgstr "**原始碼:**\\ :source:`Lib/importlib/util.py`" -#: ../../library/importlib.rst:1094 +#: ../../library/importlib.rst:1101 msgid "" "This module contains the various objects that help in the construction of " "an :term:`importer`." msgstr "" -#: ../../library/importlib.rst:1099 +#: ../../library/importlib.rst:1106 msgid "" "The bytes which represent the bytecode version number. If you need help with " "loading/writing bytecode then consider :class:`importlib.abc.SourceLoader`." msgstr "" -#: ../../library/importlib.rst:1106 +#: ../../library/importlib.rst:1113 msgid "" "Return the :pep:`3147`/:pep:`488` path to the byte-compiled file associated " "with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the " @@ -1313,7 +1324,7 @@ msgid "" "`NotImplementedError` will be raised)." msgstr "" -#: ../../library/importlib.rst:1113 +#: ../../library/importlib.rst:1120 msgid "" "The *optimization* parameter is used to specify the optimization level of " "the bytecode file. An empty string represents no optimization, so ``/foo/bar/" @@ -1326,7 +1337,7 @@ msgid "" "be alphanumeric, else :exc:`ValueError` is raised." msgstr "" -#: ../../library/importlib.rst:1123 +#: ../../library/importlib.rst:1130 msgid "" "The *debug_override* parameter is deprecated and can be used to override the " "system's value for ``__debug__``. A ``True`` value is the equivalent of " @@ -1335,18 +1346,18 @@ msgid "" "are not ``None`` then :exc:`TypeError` is raised." msgstr "" -#: ../../library/importlib.rst:1131 +#: ../../library/importlib.rst:1138 msgid "" "The *optimization* parameter was added and the *debug_override* parameter " "was deprecated." msgstr "" -#: ../../library/importlib.rst:1135 ../../library/importlib.rst:1151 -#: ../../library/importlib.rst:1240 +#: ../../library/importlib.rst:1142 ../../library/importlib.rst:1158 +#: ../../library/importlib.rst:1247 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../library/importlib.rst:1141 +#: ../../library/importlib.rst:1148 msgid "" "Given the *path* to a :pep:`3147` file name, return the associated source " "code file path. For example, if *path* is ``/foo/bar/__pycache__/baz." @@ -1356,25 +1367,25 @@ msgid "" "cache_tag` is not defined, :exc:`NotImplementedError` is raised." msgstr "" -#: ../../library/importlib.rst:1156 +#: ../../library/importlib.rst:1163 msgid "" "Decode the given bytes representing source code and return it as a string " "with universal newlines (as required by :meth:`importlib.abc.InspectLoader." "get_source`)." msgstr "" -#: ../../library/importlib.rst:1164 +#: ../../library/importlib.rst:1171 msgid "Resolve a relative module name to an absolute one." msgstr "" -#: ../../library/importlib.rst:1166 +#: ../../library/importlib.rst:1173 msgid "" "If **name** has no leading dots, then **name** is simply returned. This " "allows for usage such as ``importlib.util.resolve_name('sys', __spec__." "parent)`` without doing a check to see if the **package** argument is needed." msgstr "" -#: ../../library/importlib.rst:1171 +#: ../../library/importlib.rst:1178 msgid "" ":exc:`ImportError` is raised if **name** is a relative module name but " "**package** is a false value (e.g. ``None`` or the empty string). :exc:" @@ -1382,13 +1393,13 @@ msgid "" "package (e.g. requesting ``..bacon`` from within the ``spam`` package)." msgstr "" -#: ../../library/importlib.rst:1179 +#: ../../library/importlib.rst:1186 msgid "" "To improve consistency with import statements, raise :exc:`ImportError` " "instead of :exc:`ValueError` for invalid relative import attempts." msgstr "" -#: ../../library/importlib.rst:1186 +#: ../../library/importlib.rst:1193 msgid "" "Find the :term:`spec ` for a module, optionally relative to the " "specified **package** name. If the module is in :data:`sys.modules`, then " @@ -1398,30 +1409,30 @@ msgid "" "if no spec is found." msgstr "" -#: ../../library/importlib.rst:1193 +#: ../../library/importlib.rst:1200 msgid "" "If **name** is for a submodule (contains a dot), the parent module is " "automatically imported." msgstr "" -#: ../../library/importlib.rst:1196 +#: ../../library/importlib.rst:1203 msgid "**name** and **package** work the same as for :func:`import_module`." msgstr "" -#: ../../library/importlib.rst:1200 +#: ../../library/importlib.rst:1207 msgid "" "Raises :exc:`ModuleNotFoundError` instead of :exc:`AttributeError` if " "**package** is in fact not a package (i.e. lacks a :attr:`__path__` " "attribute)." msgstr "" -#: ../../library/importlib.rst:1207 +#: ../../library/importlib.rst:1214 msgid "" "Create a new module based on **spec** and :meth:`spec.loader.create_module " "`." msgstr "" -#: ../../library/importlib.rst:1210 +#: ../../library/importlib.rst:1217 msgid "" "If :meth:`spec.loader.create_module ` " "does not return ``None``, then any pre-existing attributes will not be " @@ -1429,14 +1440,14 @@ msgid "" "accessing **spec** or setting an attribute on the module." msgstr "" -#: ../../library/importlib.rst:1215 +#: ../../library/importlib.rst:1222 msgid "" "This function is preferred over using :class:`types.ModuleType` to create a " "new module as **spec** is used to set as many import-controlled attributes " "on the module as possible." msgstr "" -#: ../../library/importlib.rst:1223 +#: ../../library/importlib.rst:1230 msgid "" "A factory function for creating a :class:`~importlib.machinery.ModuleSpec` " "instance based on a loader. The parameters have the same meaning as they do " @@ -1445,7 +1456,7 @@ msgid "" "spec." msgstr "" -#: ../../library/importlib.rst:1233 +#: ../../library/importlib.rst:1240 msgid "" "A factory function for creating a :class:`~importlib.machinery.ModuleSpec` " "instance based on the path to a file. Missing information will be filled in " @@ -1453,20 +1464,49 @@ msgid "" "module will be file-based." msgstr "" -#: ../../library/importlib.rst:1245 +#: ../../library/importlib.rst:1252 msgid "" "Return the hash of *source_bytes* as bytes. A hash-based ``.pyc`` file " "embeds the :func:`source_hash` of the corresponding source file's contents " "in its header." msgstr "" -#: ../../library/importlib.rst:1253 +#: ../../library/importlib.rst:1260 +msgid "" +"A context manager that can temporarily skip the compatibility check for " +"extension modules. By default the check is enabled and will fail when a " +"single-phase init module is imported in a subinterpreter. It will also fail " +"for a multi-phase init module that doesn't explicitly support a per-" +"interpreter GIL, when imported in an interpreter with its own GIL." +msgstr "" + +#: ../../library/importlib.rst:1267 +msgid "" +"Note that this function is meant to accommodate an unusual case; one which " +"is likely to eventually go away. There's is a pretty good chance this is " +"not what you were looking for." +msgstr "" + +#: ../../library/importlib.rst:1271 +msgid "" +"You can get the same effect as this function by implementing the basic " +"interface of multi-phase init (:pep:`489`) and lying about support for " +"mulitple interpreters (or per-interpreter GIL)." +msgstr "" + +#: ../../library/importlib.rst:1276 +msgid "" +"Using this function to disable the check can lead to unexpected behavior and " +"even crashes. It should only be used during extension module development." +msgstr "" + +#: ../../library/importlib.rst:1284 msgid "" "A class which postpones the execution of the loader of a module until the " "module has an attribute accessed." msgstr "" -#: ../../library/importlib.rst:1256 +#: ../../library/importlib.rst:1287 msgid "" "This class **only** works with loaders that define :meth:`~importlib.abc." "Loader.exec_module` as control over what module type is used for the module " @@ -1479,7 +1519,7 @@ msgid "" "raised if such a substitution is detected." msgstr "" -#: ../../library/importlib.rst:1267 +#: ../../library/importlib.rst:1298 msgid "" "For projects where startup time is critical, this class allows for " "potentially minimizing the cost of loading a module if it is never used. For " @@ -1488,70 +1528,70 @@ msgid "" "postponed and thus occurring out of context." msgstr "" -#: ../../library/importlib.rst:1275 +#: ../../library/importlib.rst:1306 msgid "" "Began calling :meth:`~importlib.abc.Loader.create_module`, removing the " "compatibility warning for :class:`importlib.machinery.BuiltinImporter` and :" "class:`importlib.machinery.ExtensionFileLoader`." msgstr "" -#: ../../library/importlib.rst:1282 +#: ../../library/importlib.rst:1313 msgid "" "A class method which returns a callable that creates a lazy loader. This is " "meant to be used in situations where the loader is passed by class instead " "of by instance. ::" msgstr "" -#: ../../library/importlib.rst:1295 +#: ../../library/importlib.rst:1326 msgid "Examples" msgstr "範例" -#: ../../library/importlib.rst:1298 +#: ../../library/importlib.rst:1329 msgid "Importing programmatically" msgstr "" -#: ../../library/importlib.rst:1300 +#: ../../library/importlib.rst:1331 msgid "" "To programmatically import a module, use :func:`importlib.import_module`. ::" msgstr "" -#: ../../library/importlib.rst:1309 +#: ../../library/importlib.rst:1340 msgid "Checking if a module can be imported" msgstr "" -#: ../../library/importlib.rst:1311 +#: ../../library/importlib.rst:1342 msgid "" "If you need to find out if a module can be imported without actually doing " "the import, then you should use :func:`importlib.util.find_spec`." msgstr "" -#: ../../library/importlib.rst:1314 +#: ../../library/importlib.rst:1345 msgid "" "Note that if ``name`` is a submodule (contains a dot), :func:`importlib.util." "find_spec` will import the parent module. ::" msgstr "" -#: ../../library/importlib.rst:1337 +#: ../../library/importlib.rst:1368 msgid "Importing a source file directly" msgstr "" -#: ../../library/importlib.rst:1339 +#: ../../library/importlib.rst:1370 msgid "To import a Python source file directly, use the following recipe::" msgstr "" -#: ../../library/importlib.rst:1356 +#: ../../library/importlib.rst:1387 msgid "Implementing lazy imports" msgstr "" -#: ../../library/importlib.rst:1358 +#: ../../library/importlib.rst:1389 msgid "The example below shows how to implement lazy imports::" msgstr "" -#: ../../library/importlib.rst:1380 +#: ../../library/importlib.rst:1411 msgid "Setting up an importer" msgstr "" -#: ../../library/importlib.rst:1382 +#: ../../library/importlib.rst:1413 msgid "" "For deep customizations of import, you typically want to implement an :term:" "`importer`. This means managing both the :term:`finder` and :term:`loader` " @@ -1565,11 +1605,11 @@ msgid "" "for the appropriate classes defined within this package)::" msgstr "" -#: ../../library/importlib.rst:1414 +#: ../../library/importlib.rst:1445 msgid "Approximating :func:`importlib.import_module`" msgstr "" -#: ../../library/importlib.rst:1416 +#: ../../library/importlib.rst:1447 msgid "" "Import itself is implemented in Python code, making it possible to expose " "most of the import machinery through importlib. The following helps " diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 4849fe343f..417245ed9d 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -137,12 +137,12 @@ msgstr "" #: ../../library/logging.handlers.rst:98 msgid "" "Returns a new instance of the :class:`FileHandler` class. The specified file " -"is opened and used as the stream for logging. If *mode* is not specified, :" -"const:`'a'` is used. If *encoding* is not ``None``, it is used to open the " -"file with that encoding. If *delay* is true, then file opening is deferred " -"until the first call to :meth:`emit`. By default, the file grows " -"indefinitely. If *errors* is specified, it's used to determine how encoding " -"errors are handled." +"is opened and used as the stream for logging. If *mode* is not specified, " +"``'a'`` is used. If *encoding* is not ``None``, it is used to open the file " +"with that encoding. If *delay* is true, then file opening is deferred until " +"the first call to :meth:`emit`. By default, the file grows indefinitely. If " +"*errors* is specified, it's used to determine how encoding errors are " +"handled." msgstr "" #: ../../library/logging.handlers.rst:105 @@ -242,10 +242,10 @@ msgstr "" msgid "" "Returns a new instance of the :class:`WatchedFileHandler` class. The " "specified file is opened and used as the stream for logging. If *mode* is " -"not specified, :const:`'a'` is used. If *encoding* is not ``None``, it is " -"used to open the file with that encoding. If *delay* is true, then file " -"opening is deferred until the first call to :meth:`emit`. By default, the " -"file grows indefinitely. If *errors* is provided, it determines how encoding " +"not specified, ``'a'`` is used. If *encoding* is not ``None``, it is used " +"to open the file with that encoding. If *delay* is true, then file opening " +"is deferred until the first call to :meth:`emit`. By default, the file " +"grows indefinitely. If *errors* is provided, it determines how encoding " "errors are handled." msgstr "" diff --git a/library/os.po b/library/os.po index 20374949cb..624383d5bb 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: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+0000\n" "PO-Revision-Date: 2022-10-16 08:11+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -478,10 +478,10 @@ msgstr "" #: ../../library/os.rst:322 ../../library/os.rst:1086 ../../library/os.rst:1097 #: ../../library/os.rst:1110 ../../library/os.rst:1317 #: ../../library/os.rst:1588 ../../library/os.rst:1756 -#: ../../library/os.rst:2153 ../../library/os.rst:2489 -#: ../../library/os.rst:3332 ../../library/os.rst:3369 -#: ../../library/os.rst:3985 ../../library/os.rst:4483 -#: ../../library/os.rst:4494 ../../library/os.rst:4611 +#: ../../library/os.rst:2489 ../../library/os.rst:3332 +#: ../../library/os.rst:3369 ../../library/os.rst:3985 +#: ../../library/os.rst:4483 ../../library/os.rst:4494 +#: ../../library/os.rst:4611 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" @@ -563,16 +563,16 @@ msgstr "" #: ../../library/os.rst:402 msgid "" "On macOS, :func:`getgroups` behavior differs somewhat from other Unix " -"platforms. If the Python interpreter was built with a deployment target of :" -"const:`10.5` or earlier, :func:`getgroups` returns the list of effective " -"group ids associated with the current user process; this list is limited to " -"a system-defined number of entries, typically 16, and may be modified by " -"calls to :func:`setgroups` if suitably privileged. If built with a " -"deployment target greater than :const:`10.5`, :func:`getgroups` returns the " -"current group access list for the user associated with the effective user id " -"of the process; the group access list may change over the lifetime of the " -"process, it is not affected by calls to :func:`setgroups`, and its length is " -"not limited to 16. The deployment target value, :const:" +"platforms. If the Python interpreter was built with a deployment target of " +"``10.5`` or earlier, :func:`getgroups` returns the list of effective group " +"ids associated with the current user process; this list is limited to a " +"system-defined number of entries, typically 16, and may be modified by calls " +"to :func:`setgroups` if suitably privileged. If built with a deployment " +"target greater than ``10.5``, :func:`getgroups` returns the current group " +"access list for the user associated with the effective user id of the " +"process; the group access list may change over the lifetime of the process, " +"it is not affected by calls to :func:`setgroups`, and its length is not " +"limited to 16. The deployment target value, :const:" "`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig." "get_config_var`." msgstr "" @@ -2341,6 +2341,10 @@ msgstr "" "引發一個附帶引數 ``src``、``dst``、``src_dir_fd``、``dst_dir_fd`` 的\\ :ref:`" "稽核事件 ` ``os.link``。" +#: ../../library/os.rst:2153 +msgid ":ref:`Availability `: Unix, Windows, not Emscripten." +msgstr ":ref:`適用 `:Unix、Windows、非 Emscripten。" + #: ../../library/os.rst:2155 msgid "Added Windows support." msgstr "新支援 Windows。" @@ -2642,13 +2646,13 @@ msgstr "" #: ../../library/os.rst:2422 msgid "" "Extract the device major number from a raw device number (usually the :attr:" -"`st_dev` or :attr:`st_rdev` field from :c:type:`stat`)." +"`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" #: ../../library/os.rst:2428 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" -"`st_dev` or :attr:`st_rdev` field from :c:type:`stat`)." +"`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" #: ../../library/os.rst:2434 @@ -3242,7 +3246,7 @@ msgstr "" #: ../../library/os.rst:2939 msgid "" -"Object whose attributes correspond roughly to the members of the :c:type:" +"Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" @@ -3463,7 +3467,7 @@ msgstr "" #: ../../library/os.rst:3119 msgid "" "The standard module :mod:`stat` defines functions and constants that are " -"useful for extracting information from a :c:type:`stat` structure. (On " +"useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" @@ -3471,7 +3475,7 @@ msgstr "" msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " -"portable) members of the :c:type:`stat` structure, in the order :attr:" +"portable) members of the :c:struct:`stat` structure, in the order :attr:" "`st_mode`, :attr:`st_ino`, :attr:`st_dev`, :attr:`st_nlink`, :attr:" "`st_uid`, :attr:`st_gid`, :attr:`st_size`, :attr:`st_atime`, :attr:" "`st_mtime`, :attr:`st_ctime`. More items may be added at the end by some " @@ -3535,8 +3539,8 @@ msgstr "" msgid "" "Perform a :c:func:`statvfs` system call on the given path. The return value " "is an object whose attributes describe the filesystem on the given path, and " -"correspond to the members of the :c:type:`statvfs` structure, namely: :attr:" -"`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :attr:`f_bfree`, :attr:" +"correspond to the members of the :c:struct:`statvfs` structure, namely: :" +"attr:`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :attr:`f_bfree`, :attr:" "`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:`f_favail`, :attr:" "`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" diff --git a/library/signal.po b/library/signal.po index 186dbd0336..cf457f2349 100644 --- a/library/signal.po +++ b/library/signal.po @@ -7,7 +7,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: 2023-07-29 00:03+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-" @@ -771,7 +771,7 @@ msgstr "" #: ../../library/signal.rst:658 msgid "" "Like :func:`sigwaitinfo`, but takes an additional *timeout* argument " -"specifying a timeout. If *timeout* is specified as :const:`0`, a poll is " +"specifying a timeout. If *timeout* is specified as ``0``, a poll is " "performed. Returns :const:`None` if a timeout occurs." msgstr "" diff --git a/library/ssl.po b/library/ssl.po index 7cc942f17c..428b3e00d5 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-23 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -350,7 +350,7 @@ msgstr "" msgid "" "Mix the given *bytes* into the SSL pseudo-random number generator. The " "parameter *entropy* (a float) is a lower bound on the entropy contained in " -"string (so you can always use :const:`0.0`). See :rfc:`1750` for more " +"string (so you can always use ``0.0``). See :rfc:`1750` for more " "information on sources of entropy." msgstr "" diff --git a/library/subprocess.po b/library/subprocess.po index 30fab2a5d1..7f62188dbe 100644 --- a/library/subprocess.po +++ b/library/subprocess.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: 2023-07-29 00:03+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-" @@ -542,13 +542,13 @@ msgstr "" #: ../../library/subprocess.rst:468 msgid "" -":const:`0` means unbuffered (read and write are one system call and can " -"return short)" +"``0`` means unbuffered (read and write are one system call and can return " +"short)" msgstr "" #: ../../library/subprocess.rst:470 msgid "" -":const:`1` means line buffered (only usable if ``text=True`` or " +"``1`` means line buffered (only usable if ``text=True`` or " "``universal_newlines=True``)" msgstr "" @@ -566,9 +566,9 @@ msgstr "" 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 " -"3.3.1 it incorrectly defaulted to :const:`0` which was unbuffered and " -"allowed short reads. This was unintentional and did not match the behavior " -"of Python 2 as most code expected." +"3.3.1 it incorrectly defaulted to ``0`` which was unbuffered and allowed " +"short reads. This was unintentional and did not match the behavior of " +"Python 2 as most code expected." msgstr "" #: ../../library/subprocess.rst:484 @@ -638,10 +638,10 @@ msgstr "" #: ../../library/subprocess.rst:544 msgid "" -"If *close_fds* is true, all file descriptors except :const:`0`, :const:`1` " -"and :const:`2` will be closed before the child process is executed. " -"Otherwise when *close_fds* is false, file descriptors obey their inheritable " -"flag as described in :ref:`fd_inheritance`." +"If *close_fds* is true, all file descriptors except ``0``, ``1`` and ``2`` " +"will be closed before the child process is executed. Otherwise when " +"*close_fds* is false, file descriptors obey their inheritable flag as " +"described in :ref:`fd_inheritance`." msgstr "" #: ../../library/subprocess.rst:549 diff --git a/library/sys.po b/library/sys.po index 77368be496..7f8d4f11b0 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: 2023-07-23 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -835,7 +835,9 @@ msgstr "" msgid "" "Added ``warn_default_encoding`` attribute for :option:`-X` " "``warn_default_encoding`` flag." -msgstr "新增 ``warn_default_encoding`` 屬性,用於 :option:`-X` ``warn_default_encoding`` 旗標。" +msgstr "" +"新增 ``warn_default_encoding`` 屬性,用於 :option:`-X` " +"``warn_default_encoding`` 旗標。" #: ../../library/sys.rst:561 msgid "Added the ``safe_path`` attribute for :option:`-P` option." @@ -1278,7 +1280,7 @@ msgid "" msgstr "" #: ../../library/sys.rst:880 -msgid "*platform* will be :const:`2 (VER_PLATFORM_WIN32_NT)`." +msgid "*platform* will be ``2`` (VER_PLATFORM_WIN32_NT)." msgstr "" #: ../../library/sys.rst:882 @@ -1294,24 +1296,24 @@ msgid "Meaning" msgstr "" #: ../../library/sys.rst:887 -msgid ":const:`1 (VER_NT_WORKSTATION)`" -msgstr ":const:`1 (VER_NT_WORKSTATION)`" +msgid "``1`` (VER_NT_WORKSTATION)" +msgstr "``1`` (VER_NT_WORKSTATION)" #: ../../library/sys.rst:887 msgid "The system is a workstation." msgstr "" #: ../../library/sys.rst:889 -msgid ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" -msgstr ":const:`2 (VER_NT_DOMAIN_CONTROLLER)`" +msgid "``2`` (VER_NT_DOMAIN_CONTROLLER)" +msgstr "``2`` (VER_NT_DOMAIN_CONTROLLER)" #: ../../library/sys.rst:889 msgid "The system is a domain controller." msgstr "" #: ../../library/sys.rst:892 -msgid ":const:`3 (VER_NT_SERVER)`" -msgstr ":const:`3 (VER_NT_SERVER)`" +msgid "``3`` (VER_NT_SERVER)" +msgstr "``3`` (VER_NT_SERVER)" #: ../../library/sys.rst:892 msgid "The system is a server, but not a domain controller." diff --git a/library/turtle.po b/library/turtle.po index 6d7d9d2c35..6cba6b1450 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-07-26 00:03+0000\n" +"POT-Creation-Date: 2023-07-28 00:03+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,8 +122,8 @@ msgid "" "Experiment with those commands, and also with ``backward()`` and ``right()``." msgstr "" -#: ../../library/turtle.rst:96 ../../library/turtle.rst:397 -#: ../../library/turtle.rst:1067 +#: ../../library/turtle.rst:96 ../../library/turtle.rst:346 +#: ../../library/turtle.rst:1016 msgid "Pen control" msgstr "" @@ -334,115 +334,26 @@ msgstr "" msgid "The turtle's screen can be customised, for example::" msgstr "" -#: ../../library/turtle.rst:283 -msgid "Explanation" +#: ../../library/turtle.rst:281 +msgid "Turtle graphics reference" msgstr "" #: ../../library/turtle.rst:285 msgid "" -"The :mod:`turtle` module is an extended reimplementation of the same-named " -"module from the Python standard distribution up to version Python 2.5." -msgstr "" - -#: ../../library/turtle.rst:288 -msgid "" -"It tries to keep the merits of the old turtle module and to be (nearly) 100% " -"compatible with it. This means in the first place to enable the learning " -"programmer to use all the commands, classes and methods interactively when " -"using the module from within IDLE run with the ``-n`` switch." -msgstr "" - -#: ../../library/turtle.rst:293 -msgid "" -"The turtle module provides turtle graphics primitives, in both object-" -"oriented and procedure-oriented ways. Because it uses :mod:`tkinter` for " -"the underlying graphics, it needs a version of Python installed with Tk " -"support." -msgstr "" - -#: ../../library/turtle.rst:297 -msgid "The object-oriented interface uses essentially two+two classes:" -msgstr "" - -#: ../../library/turtle.rst:299 -msgid "" -"The :class:`TurtleScreen` class defines graphics windows as a playground for " -"the drawing turtles. Its constructor needs a :class:`tkinter.Canvas` or a :" -"class:`ScrolledCanvas` as argument. It should be used when :mod:`turtle` is " -"used as part of some application." -msgstr "" - -#: ../../library/turtle.rst:304 -msgid "" -"The function :func:`Screen` returns a singleton object of a :class:" -"`TurtleScreen` subclass. This function should be used when :mod:`turtle` is " -"used as a standalone tool for doing graphics. As a singleton object, " -"inheriting from its class is not possible." -msgstr "" - -#: ../../library/turtle.rst:309 -msgid "" -"All methods of TurtleScreen/Screen also exist as functions, i.e. as part of " -"the procedure-oriented interface." -msgstr "" - -#: ../../library/turtle.rst:312 -msgid "" -":class:`RawTurtle` (alias: :class:`RawPen`) defines Turtle objects which " -"draw on a :class:`TurtleScreen`. Its constructor needs a Canvas, " -"ScrolledCanvas or TurtleScreen as argument, so the RawTurtle objects know " -"where to draw." -msgstr "" - -#: ../../library/turtle.rst:316 -msgid "" -"Derived from RawTurtle is the subclass :class:`Turtle` (alias: :class:" -"`Pen`), which draws on \"the\" :class:`Screen` instance which is " -"automatically created, if not already present." -msgstr "" - -#: ../../library/turtle.rst:320 -msgid "" -"All methods of RawTurtle/Turtle also exist as functions, i.e. part of the " -"procedure-oriented interface." -msgstr "" - -#: ../../library/turtle.rst:323 -msgid "" -"The procedural interface provides functions which are derived from the " -"methods of the classes :class:`Screen` and :class:`Turtle`. They have the " -"same names as the corresponding methods. A screen object is automatically " -"created whenever a function derived from a Screen method is called. An " -"(unnamed) turtle object is automatically created whenever any of the " -"functions derived from a Turtle method is called." -msgstr "" - -#: ../../library/turtle.rst:330 -msgid "" -"To use multiple turtles on a screen one has to use the object-oriented " -"interface." -msgstr "" - -#: ../../library/turtle.rst:333 -msgid "" "In the following documentation the argument list for functions is given. " "Methods, of course, have the additional first argument *self* which is " "omitted here." msgstr "" -#: ../../library/turtle.rst:339 -msgid "Turtle graphics reference" -msgstr "" - -#: ../../library/turtle.rst:342 +#: ../../library/turtle.rst:291 msgid "Turtle methods" msgstr "" -#: ../../library/turtle.rst:374 ../../library/turtle.rst:484 +#: ../../library/turtle.rst:323 ../../library/turtle.rst:433 msgid "Turtle motion" msgstr "" -#: ../../library/turtle.rst:362 +#: ../../library/turtle.rst:311 msgid "Move and draw" msgstr "" @@ -486,7 +397,7 @@ msgstr ":func:`setheading` | :func:`seth`" msgid ":func:`home`" msgstr ":func:`home`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2739 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2723 msgid ":func:`circle`" msgstr ":func:`circle`" @@ -494,7 +405,7 @@ msgstr ":func:`circle`" msgid ":func:`dot`" msgstr ":func:`dot`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2717 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2701 msgid ":func:`stamp`" msgstr ":func:`stamp`" @@ -514,7 +425,7 @@ msgstr ":func:`undo`" msgid ":func:`speed`" msgstr ":func:`speed`" -#: ../../library/turtle.rst:370 ../../library/turtle.rst:916 +#: ../../library/turtle.rst:319 ../../library/turtle.rst:865 msgid "Tell Turtle's state" msgstr "" @@ -542,7 +453,7 @@ msgstr ":func:`heading`" msgid ":func:`distance`" msgstr ":func:`distance`" -#: ../../library/turtle.rst:374 +#: ../../library/turtle.rst:323 msgid "Setting and measurement" msgstr "" @@ -554,7 +465,7 @@ msgstr ":func:`degrees`" msgid ":func:`radians`" msgstr ":func:`radians`" -#: ../../library/turtle.rst:382 ../../library/turtle.rst:1070 +#: ../../library/turtle.rst:331 ../../library/turtle.rst:1019 msgid "Drawing state" msgstr "" @@ -578,7 +489,7 @@ msgstr ":func:`pen`" msgid ":func:`isdown`" msgstr ":func:`isdown`" -#: ../../library/turtle.rst:387 ../../library/turtle.rst:1162 +#: ../../library/turtle.rst:336 ../../library/turtle.rst:1111 msgid "Color control" msgstr "" @@ -594,7 +505,7 @@ msgstr ":func:`pencolor`" msgid ":func:`fillcolor`" msgstr ":func:`fillcolor`" -#: ../../library/turtle.rst:392 ../../library/turtle.rst:1294 +#: ../../library/turtle.rst:341 ../../library/turtle.rst:1243 msgid "Filling" msgstr "" @@ -610,7 +521,7 @@ msgstr ":func:`begin_fill`" msgid ":func:`end_fill`" msgstr ":func:`end_fill`" -#: ../../library/turtle.rst:397 ../../library/turtle.rst:1341 +#: ../../library/turtle.rst:346 ../../library/turtle.rst:1290 msgid "More drawing control" msgstr "" @@ -626,11 +537,11 @@ msgstr ":func:`clear`" msgid ":func:`write`" msgstr ":func:`write`" -#: ../../library/turtle.rst:414 ../../library/turtle.rst:1387 +#: ../../library/turtle.rst:363 ../../library/turtle.rst:1336 msgid "Turtle state" msgstr "" -#: ../../library/turtle.rst:403 ../../library/turtle.rst:1390 +#: ../../library/turtle.rst:352 ../../library/turtle.rst:1339 msgid "Visibility" msgstr "" @@ -646,7 +557,7 @@ msgstr ":func:`hideturtle` | :func:`ht`" msgid ":func:`isvisible`" msgstr ":func:`isvisible`" -#: ../../library/turtle.rst:414 ../../library/turtle.rst:1429 +#: ../../library/turtle.rst:363 ../../library/turtle.rst:1378 msgid "Appearance" msgstr "" @@ -686,11 +597,11 @@ msgstr ":func:`shapetransform`" msgid ":func:`get_shapepoly`" msgstr ":func:`get_shapepoly`" -#: ../../library/turtle.rst:419 ../../library/turtle.rst:1634 +#: ../../library/turtle.rst:368 ../../library/turtle.rst:1583 msgid "Using events" msgstr "" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2711 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2695 msgid ":func:`onclick`" msgstr ":func:`onclick`" @@ -698,11 +609,11 @@ msgstr ":func:`onclick`" msgid ":func:`onrelease`" msgstr ":func:`onrelease`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2694 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2678 msgid ":func:`ondrag`" msgstr ":func:`ondrag`" -#: ../../library/turtle.rst:430 ../../library/turtle.rst:1708 +#: ../../library/turtle.rst:379 ../../library/turtle.rst:1657 msgid "Special Turtle methods" msgstr "" @@ -718,7 +629,7 @@ msgstr ":func:`end_poly`" msgid ":func:`get_poly`" msgstr ":func:`get_poly`" -#: ../../library/turtle.rst:0 ../../library/turtle.rst:2733 +#: ../../library/turtle.rst:0 ../../library/turtle.rst:2717 msgid ":func:`clone`" msgstr ":func:`clone`" @@ -738,11 +649,11 @@ msgstr ":func:`setundobuffer`" msgid ":func:`undobufferentries`" msgstr ":func:`undobufferentries`" -#: ../../library/turtle.rst:433 +#: ../../library/turtle.rst:382 msgid "Methods of TurtleScreen/Screen" msgstr "" -#: ../../library/turtle.rst:441 ../../library/turtle.rst:1862 +#: ../../library/turtle.rst:390 ../../library/turtle.rst:1811 msgid "Window control" msgstr "" @@ -770,7 +681,7 @@ msgstr ":func:`screensize`" msgid ":func:`setworldcoordinates`" msgstr ":func:`setworldcoordinates`" -#: ../../library/turtle.rst:446 ../../library/turtle.rst:1985 +#: ../../library/turtle.rst:395 ../../library/turtle.rst:1934 msgid "Animation control" msgstr "" @@ -786,7 +697,7 @@ msgstr ":func:`tracer`" msgid ":func:`update`" msgstr ":func:`update`" -#: ../../library/turtle.rst:454 ../../library/turtle.rst:2038 +#: ../../library/turtle.rst:403 ../../library/turtle.rst:1987 msgid "Using screen events" msgstr "" @@ -814,7 +725,7 @@ msgstr ":func:`ontimer`" msgid ":func:`mainloop` | :func:`done`" msgstr ":func:`mainloop` | :func:`done`" -#: ../../library/turtle.rst:464 ../../library/turtle.rst:2183 +#: ../../library/turtle.rst:413 ../../library/turtle.rst:2132 msgid "Settings and special methods" msgstr "" @@ -850,7 +761,7 @@ msgstr ":func:`window_height`" msgid ":func:`window_width`" msgstr ":func:`window_width`" -#: ../../library/turtle.rst:468 ../../library/turtle.rst:2147 +#: ../../library/turtle.rst:417 ../../library/turtle.rst:2096 msgid "Input methods" msgstr "" @@ -862,7 +773,7 @@ msgstr ":func:`textinput`" msgid ":func:`numinput`" msgstr ":func:`numinput`" -#: ../../library/turtle.rst:475 +#: ../../library/turtle.rst:424 msgid "Methods specific to Screen" msgstr "" @@ -882,11 +793,11 @@ msgstr ":func:`setup`" msgid ":func:`title`" msgstr ":func:`title`" -#: ../../library/turtle.rst:478 +#: ../../library/turtle.rst:427 msgid "Methods of RawTurtle/Turtle and corresponding functions" msgstr "" -#: ../../library/turtle.rst:480 +#: ../../library/turtle.rst:429 msgid "" "Most of the examples in this section refer to a Turtle instance called " "``turtle``." @@ -896,70 +807,70 @@ msgstr "" msgid "Parameters" msgstr "參數" -#: ../../library/turtle.rst:489 ../../library/turtle.rst:534 -#: ../../library/turtle.rst:559 ../../library/turtle.rst:657 -#: ../../library/turtle.rst:680 ../../library/turtle.rst:703 +#: ../../library/turtle.rst:438 ../../library/turtle.rst:483 +#: ../../library/turtle.rst:508 ../../library/turtle.rst:606 +#: ../../library/turtle.rst:629 ../../library/turtle.rst:652 msgid "a number (integer or float)" msgstr "" -#: ../../library/turtle.rst:491 +#: ../../library/turtle.rst:440 msgid "" "Move the turtle forward by the specified *distance*, in the direction the " "turtle is headed." msgstr "" -#: ../../library/turtle.rst:511 ../../library/turtle.rst:753 -#: ../../library/turtle.rst:1020 ../../library/turtle.rst:1528 -#: ../../library/turtle.rst:1547 +#: ../../library/turtle.rst:460 ../../library/turtle.rst:702 +#: ../../library/turtle.rst:969 ../../library/turtle.rst:1477 +#: ../../library/turtle.rst:1496 msgid "a number" msgstr "" -#: ../../library/turtle.rst:513 +#: ../../library/turtle.rst:462 msgid "" "Move the turtle backward by *distance*, opposite to the direction the turtle " "is headed. Do not change the turtle's heading." msgstr "" -#: ../../library/turtle.rst:536 +#: ../../library/turtle.rst:485 msgid "" "Turn turtle right by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../library/turtle.rst:561 +#: ../../library/turtle.rst:510 msgid "" "Turn turtle left by *angle* units. (Units are by default degrees, but can " "be set via the :func:`degrees` and :func:`radians` functions.) Angle " "orientation depends on the turtle mode, see :func:`mode`." msgstr "" -#: ../../library/turtle.rst:585 +#: ../../library/turtle.rst:534 msgid "a number or a pair/vector of numbers" msgstr "" -#: ../../library/turtle.rst:586 ../../library/turtle.rst:619 -#: ../../library/turtle.rst:620 +#: ../../library/turtle.rst:535 ../../library/turtle.rst:568 +#: ../../library/turtle.rst:569 msgid "a number or ``None``" msgstr "" -#: ../../library/turtle.rst:588 +#: ../../library/turtle.rst:537 msgid "" "If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D` (e." "g. as returned by :func:`pos`)." msgstr "" -#: ../../library/turtle.rst:591 +#: ../../library/turtle.rst:540 msgid "" "Move turtle to an absolute position. If the pen is down, draw line. Do not " "change the turtle's orientation." msgstr "" -#: ../../library/turtle.rst:621 +#: ../../library/turtle.rst:570 msgid "a boolean" msgstr "" -#: ../../library/turtle.rst:623 +#: ../../library/turtle.rst:572 msgid "" "Move turtle to an absolute position. Unlike goto(x, y), a line will not be " "drawn. The turtle's orientation does not change. If currently filling, the " @@ -969,77 +880,77 @@ msgid "" "barrier like in goto(x, y)." msgstr "" -#: ../../library/turtle.rst:659 +#: ../../library/turtle.rst:608 msgid "" "Set the turtle's first coordinate to *x*, leave second coordinate unchanged." msgstr "" -#: ../../library/turtle.rst:682 +#: ../../library/turtle.rst:631 msgid "" "Set the turtle's second coordinate to *y*, leave first coordinate unchanged." msgstr "" -#: ../../library/turtle.rst:705 +#: ../../library/turtle.rst:654 msgid "" "Set the orientation of the turtle to *to_angle*. Here are some common " "directions in degrees:" msgstr "" -#: ../../library/turtle.rst:709 +#: ../../library/turtle.rst:658 msgid "standard mode" msgstr "" -#: ../../library/turtle.rst:709 +#: ../../library/turtle.rst:658 msgid "logo mode" msgstr "" -#: ../../library/turtle.rst:711 +#: ../../library/turtle.rst:660 msgid "0 - east" msgstr "" -#: ../../library/turtle.rst:711 +#: ../../library/turtle.rst:660 msgid "0 - north" msgstr "" -#: ../../library/turtle.rst:712 +#: ../../library/turtle.rst:661 msgid "90 - north" msgstr "" -#: ../../library/turtle.rst:712 +#: ../../library/turtle.rst:661 msgid "90 - east" msgstr "" -#: ../../library/turtle.rst:713 +#: ../../library/turtle.rst:662 msgid "180 - west" msgstr "" -#: ../../library/turtle.rst:713 +#: ../../library/turtle.rst:662 msgid "180 - south" msgstr "" -#: ../../library/turtle.rst:714 +#: ../../library/turtle.rst:663 msgid "270 - south" msgstr "" -#: ../../library/turtle.rst:714 +#: ../../library/turtle.rst:663 msgid "270 - west" msgstr "" -#: ../../library/turtle.rst:727 +#: ../../library/turtle.rst:676 msgid "" "Move turtle to the origin -- coordinates (0,0) -- and set its heading to its " "start-orientation (which depends on the mode, see :func:`mode`)." msgstr "" -#: ../../library/turtle.rst:754 +#: ../../library/turtle.rst:703 msgid "a number (or ``None``)" msgstr "" -#: ../../library/turtle.rst:755 ../../library/turtle.rst:848 +#: ../../library/turtle.rst:704 ../../library/turtle.rst:797 msgid "an integer (or ``None``)" msgstr "" -#: ../../library/turtle.rst:757 +#: ../../library/turtle.rst:706 msgid "" "Draw a circle with given *radius*. The center is *radius* units left of the " "turtle; *extent* -- an angle -- determines which part of the circle is " @@ -1050,117 +961,117 @@ msgid "" "changed by the amount of *extent*." msgstr "" -#: ../../library/turtle.rst:765 +#: ../../library/turtle.rst:714 msgid "" "As the circle is approximated by an inscribed regular polygon, *steps* " "determines the number of steps to use. If not given, it will be calculated " "automatically. May be used to draw regular polygons." msgstr "" -#: ../../library/turtle.rst:791 +#: ../../library/turtle.rst:740 msgid "an integer >= 1 (if given)" msgstr "" -#: ../../library/turtle.rst:792 +#: ../../library/turtle.rst:741 msgid "a colorstring or a numeric color tuple" msgstr "" -#: ../../library/turtle.rst:794 +#: ../../library/turtle.rst:743 msgid "" "Draw a circular dot with diameter *size*, using *color*. If *size* is not " "given, the maximum of pensize+4 and 2*pensize is used." msgstr "" -#: ../../library/turtle.rst:812 +#: ../../library/turtle.rst:761 msgid "" "Stamp a copy of the turtle shape onto the canvas at the current turtle " "position. Return a stamp_id for that stamp, which can be used to delete it " "by calling ``clearstamp(stamp_id)``." msgstr "" -#: ../../library/turtle.rst:826 +#: ../../library/turtle.rst:775 msgid "an integer, must be return value of previous :func:`stamp` call" msgstr "" -#: ../../library/turtle.rst:829 +#: ../../library/turtle.rst:778 msgid "Delete stamp with given *stampid*." msgstr "" -#: ../../library/turtle.rst:850 +#: ../../library/turtle.rst:799 msgid "" "Delete all or first/last *n* of turtle's stamps. If *n* is ``None``, delete " "all stamps, if *n* > 0 delete first *n* stamps, else if *n* < 0 delete last " "*n* stamps." msgstr "" -#: ../../library/turtle.rst:866 +#: ../../library/turtle.rst:815 msgid "" "Undo (repeatedly) the last turtle action(s). Number of available undo " "actions is determined by the size of the undobuffer." msgstr "" -#: ../../library/turtle.rst:881 +#: ../../library/turtle.rst:830 msgid "an integer in the range 0..10 or a speedstring (see below)" msgstr "" -#: ../../library/turtle.rst:883 +#: ../../library/turtle.rst:832 msgid "" "Set the turtle's speed to an integer value in the range 0..10. If no " "argument is given, return current speed." msgstr "" -#: ../../library/turtle.rst:886 +#: ../../library/turtle.rst:835 msgid "" "If input is a number greater than 10 or smaller than 0.5, speed is set to " "0. Speedstrings are mapped to speedvalues as follows:" msgstr "" -#: ../../library/turtle.rst:889 +#: ../../library/turtle.rst:838 msgid "\"fastest\": 0" msgstr "" -#: ../../library/turtle.rst:890 +#: ../../library/turtle.rst:839 msgid "\"fast\": 10" msgstr "" -#: ../../library/turtle.rst:891 +#: ../../library/turtle.rst:840 msgid "\"normal\": 6" msgstr "" -#: ../../library/turtle.rst:892 +#: ../../library/turtle.rst:841 msgid "\"slow\": 3" msgstr "" -#: ../../library/turtle.rst:893 +#: ../../library/turtle.rst:842 msgid "\"slowest\": 1" msgstr "" -#: ../../library/turtle.rst:895 +#: ../../library/turtle.rst:844 msgid "" "Speeds from 1 to 10 enforce increasingly faster animation of line drawing " "and turtle turning." msgstr "" -#: ../../library/turtle.rst:898 +#: ../../library/turtle.rst:847 msgid "" "Attention: *speed* = 0 means that *no* animation takes place. forward/back " "makes turtle jump and likewise left/right make the turtle turn instantly." msgstr "" -#: ../../library/turtle.rst:921 +#: ../../library/turtle.rst:870 msgid "" "Return the turtle's current location (x,y) (as a :class:`Vec2D` vector)." msgstr "" -#: ../../library/turtle.rst:932 ../../library/turtle.rst:995 +#: ../../library/turtle.rst:881 ../../library/turtle.rst:944 msgid "a number or a pair/vector of numbers or a turtle instance" msgstr "" -#: ../../library/turtle.rst:933 ../../library/turtle.rst:996 +#: ../../library/turtle.rst:882 ../../library/turtle.rst:945 msgid "a number if *x* is a number, else ``None``" msgstr "" -#: ../../library/turtle.rst:935 +#: ../../library/turtle.rst:884 msgid "" "Return the angle between the line from turtle position to position specified " "by (x,y), the vector or the other turtle. This depends on the turtle's " @@ -1168,116 +1079,116 @@ msgid "" "\"logo\"." msgstr "" -#: ../../library/turtle.rst:949 +#: ../../library/turtle.rst:898 msgid "Return the turtle's x coordinate." msgstr "" -#: ../../library/turtle.rst:965 +#: ../../library/turtle.rst:914 msgid "Return the turtle's y coordinate." msgstr "" -#: ../../library/turtle.rst:981 +#: ../../library/turtle.rst:930 msgid "" "Return the turtle's current heading (value depends on the turtle mode, see :" "func:`mode`)." msgstr "" -#: ../../library/turtle.rst:998 +#: ../../library/turtle.rst:947 msgid "" "Return the distance from the turtle to (x,y), the given vector, or the given " "other turtle, in turtle step units." msgstr "" -#: ../../library/turtle.rst:1016 +#: ../../library/turtle.rst:965 msgid "Settings for measurement" msgstr "" -#: ../../library/turtle.rst:1022 +#: ../../library/turtle.rst:971 msgid "" "Set angle measurement units, i.e. set number of \"degrees\" for a full " "circle. Default value is 360 degrees." msgstr "" -#: ../../library/turtle.rst:1045 +#: ../../library/turtle.rst:994 msgid "" "Set the angle measurement units to radians. Equivalent to ``degrees(2*math." "pi)``." msgstr "" -#: ../../library/turtle.rst:1076 +#: ../../library/turtle.rst:1025 msgid "Pull the pen down -- drawing when moving." msgstr "" -#: ../../library/turtle.rst:1083 +#: ../../library/turtle.rst:1032 msgid "Pull the pen up -- no drawing when moving." msgstr "" -#: ../../library/turtle.rst:1089 +#: ../../library/turtle.rst:1038 msgid "a positive number" msgstr "" -#: ../../library/turtle.rst:1091 +#: ../../library/turtle.rst:1040 msgid "" "Set the line thickness to *width* or return it. If resizemode is set to " "\"auto\" and turtleshape is a polygon, that polygon is drawn with the same " "line thickness. If no argument is given, the current pensize is returned." msgstr "" -#: ../../library/turtle.rst:1105 +#: ../../library/turtle.rst:1054 msgid "a dictionary with some or all of the below listed keys" msgstr "" -#: ../../library/turtle.rst:1106 +#: ../../library/turtle.rst:1055 msgid "one or more keyword-arguments with the below listed keys as keywords" msgstr "" -#: ../../library/turtle.rst:1108 +#: ../../library/turtle.rst:1057 msgid "" "Return or set the pen's attributes in a \"pen-dictionary\" with the " "following key/value pairs:" msgstr "" -#: ../../library/turtle.rst:1111 +#: ../../library/turtle.rst:1060 msgid "\"shown\": True/False" msgstr "" -#: ../../library/turtle.rst:1112 +#: ../../library/turtle.rst:1061 msgid "\"pendown\": True/False" msgstr "" -#: ../../library/turtle.rst:1113 +#: ../../library/turtle.rst:1062 msgid "\"pencolor\": color-string or color-tuple" msgstr "" -#: ../../library/turtle.rst:1114 +#: ../../library/turtle.rst:1063 msgid "\"fillcolor\": color-string or color-tuple" msgstr "" -#: ../../library/turtle.rst:1115 +#: ../../library/turtle.rst:1064 msgid "\"pensize\": positive number" msgstr "" -#: ../../library/turtle.rst:1116 +#: ../../library/turtle.rst:1065 msgid "\"speed\": number in range 0..10" msgstr "" -#: ../../library/turtle.rst:1117 +#: ../../library/turtle.rst:1066 msgid "\"resizemode\": \"auto\" or \"user\" or \"noresize\"" msgstr "" -#: ../../library/turtle.rst:1118 +#: ../../library/turtle.rst:1067 msgid "\"stretchfactor\": (positive number, positive number)" msgstr "" -#: ../../library/turtle.rst:1119 +#: ../../library/turtle.rst:1068 msgid "\"outline\": positive number" msgstr "" -#: ../../library/turtle.rst:1120 +#: ../../library/turtle.rst:1069 msgid "\"tilt\": number" msgstr "" -#: ../../library/turtle.rst:1122 +#: ../../library/turtle.rst:1071 msgid "" "This dictionary can be used as argument for a subsequent call to :func:`pen` " "to restore the former pen-state. Moreover one or more of these attributes " @@ -1285,182 +1196,182 @@ msgid "" "attributes in one statement." msgstr "" -#: ../../library/turtle.rst:1148 +#: ../../library/turtle.rst:1097 msgid "Return ``True`` if pen is down, ``False`` if it's up." msgstr "" -#: ../../library/turtle.rst:1166 +#: ../../library/turtle.rst:1115 msgid "Return or set the pencolor." msgstr "" -#: ../../library/turtle.rst:1168 ../../library/turtle.rst:1217 +#: ../../library/turtle.rst:1117 ../../library/turtle.rst:1166 msgid "Four input formats are allowed:" msgstr "" -#: ../../library/turtle.rst:1173 +#: ../../library/turtle.rst:1122 msgid "``pencolor()``" msgstr "``pencolor()``" -#: ../../library/turtle.rst:1171 +#: ../../library/turtle.rst:1120 msgid "" "Return the current pencolor as color specification string or as a tuple (see " "example). May be used as input to another color/pencolor/fillcolor call." msgstr "" -#: ../../library/turtle.rst:1177 +#: ../../library/turtle.rst:1126 msgid "``pencolor(colorstring)``" msgstr "``pencolor(colorstring)``" -#: ../../library/turtle.rst:1176 +#: ../../library/turtle.rst:1125 msgid "" "Set pencolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:1182 +#: ../../library/turtle.rst:1131 msgid "``pencolor((r, g, b))``" msgstr "``pencolor((r, g, b))``" -#: ../../library/turtle.rst:1180 +#: ../../library/turtle.rst:1129 msgid "" "Set pencolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:1186 +#: ../../library/turtle.rst:1135 msgid "``pencolor(r, g, b)``" msgstr "``pencolor(r, g, b)``" -#: ../../library/turtle.rst:1185 +#: ../../library/turtle.rst:1134 msgid "" "Set pencolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../library/turtle.rst:1188 +#: ../../library/turtle.rst:1137 msgid "" "If turtleshape is a polygon, the outline of that polygon is drawn with the " "newly set pencolor." msgstr "" -#: ../../library/turtle.rst:1215 +#: ../../library/turtle.rst:1164 msgid "Return or set the fillcolor." msgstr "" -#: ../../library/turtle.rst:1222 +#: ../../library/turtle.rst:1171 msgid "``fillcolor()``" msgstr "``fillcolor()``" -#: ../../library/turtle.rst:1220 +#: ../../library/turtle.rst:1169 msgid "" "Return the current fillcolor as color specification string, possibly in " "tuple format (see example). May be used as input to another color/pencolor/" "fillcolor call." msgstr "" -#: ../../library/turtle.rst:1226 +#: ../../library/turtle.rst:1175 msgid "``fillcolor(colorstring)``" msgstr "``fillcolor(colorstring)``" -#: ../../library/turtle.rst:1225 +#: ../../library/turtle.rst:1174 msgid "" "Set fillcolor to *colorstring*, which is a Tk color specification string, " "such as ``\"red\"``, ``\"yellow\"``, or ``\"#33cc8c\"``." msgstr "" -#: ../../library/turtle.rst:1231 +#: ../../library/turtle.rst:1180 msgid "``fillcolor((r, g, b))``" msgstr "``fillcolor((r, g, b))``" -#: ../../library/turtle.rst:1229 +#: ../../library/turtle.rst:1178 msgid "" "Set fillcolor to the RGB color represented by the tuple of *r*, *g*, and " "*b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where " "colormode is either 1.0 or 255 (see :func:`colormode`)." msgstr "" -#: ../../library/turtle.rst:1235 +#: ../../library/turtle.rst:1184 msgid "``fillcolor(r, g, b)``" msgstr "``fillcolor(r, g, b)``" -#: ../../library/turtle.rst:1234 +#: ../../library/turtle.rst:1183 msgid "" "Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of " "*r*, *g*, and *b* must be in the range 0..colormode." msgstr "" -#: ../../library/turtle.rst:1237 +#: ../../library/turtle.rst:1186 msgid "" "If turtleshape is a polygon, the interior of that polygon is drawn with the " "newly set fillcolor." msgstr "" -#: ../../library/turtle.rst:1258 +#: ../../library/turtle.rst:1207 msgid "Return or set pencolor and fillcolor." msgstr "" -#: ../../library/turtle.rst:1260 +#: ../../library/turtle.rst:1209 msgid "" "Several input formats are allowed. They use 0 to 3 arguments as follows:" msgstr "" -#: ../../library/turtle.rst:1266 +#: ../../library/turtle.rst:1215 msgid "``color()``" msgstr "``color()``" -#: ../../library/turtle.rst:1264 +#: ../../library/turtle.rst:1213 msgid "" "Return the current pencolor and the current fillcolor as a pair of color " "specification strings or tuples as returned by :func:`pencolor` and :func:" "`fillcolor`." msgstr "" -#: ../../library/turtle.rst:1270 +#: ../../library/turtle.rst:1219 msgid "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" msgstr "``color(colorstring)``, ``color((r,g,b))``, ``color(r,g,b)``" -#: ../../library/turtle.rst:1269 +#: ../../library/turtle.rst:1218 msgid "" "Inputs as in :func:`pencolor`, set both, fillcolor and pencolor, to the " "given value." msgstr "" -#: ../../library/turtle.rst:1274 +#: ../../library/turtle.rst:1223 msgid "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" msgstr "" "``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))``" -#: ../../library/turtle.rst:1273 +#: ../../library/turtle.rst:1222 msgid "" "Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and " "analogously if the other input format is used." msgstr "" -#: ../../library/turtle.rst:1276 +#: ../../library/turtle.rst:1225 msgid "" "If turtleshape is a polygon, outline and interior of that polygon is drawn " "with the newly set colors." msgstr "" -#: ../../library/turtle.rst:1290 +#: ../../library/turtle.rst:1239 msgid "See also: Screen method :func:`colormode`." msgstr "" -#: ../../library/turtle.rst:1304 +#: ../../library/turtle.rst:1253 msgid "Return fillstate (``True`` if filling, ``False`` else)." msgstr "" -#: ../../library/turtle.rst:1319 +#: ../../library/turtle.rst:1268 msgid "To be called just before drawing a shape to be filled." msgstr "" -#: ../../library/turtle.rst:1324 +#: ../../library/turtle.rst:1273 msgid "Fill the shape drawn after the last call to :func:`begin_fill`." msgstr "" -#: ../../library/turtle.rst:1326 +#: ../../library/turtle.rst:1275 msgid "" "Whether or not overlap regions for self-intersecting polygons or multiple " "shapes are filled depends on the operating system graphics, type of overlap, " @@ -1468,36 +1379,36 @@ msgid "" "all yellow or have some white regions." msgstr "" -#: ../../library/turtle.rst:1345 +#: ../../library/turtle.rst:1294 msgid "" "Delete the turtle's drawings from the screen, re-center the turtle and set " "variables to the default values." msgstr "" -#: ../../library/turtle.rst:1366 +#: ../../library/turtle.rst:1315 msgid "" "Delete the turtle's drawings from the screen. Do not move turtle. State " "and position of the turtle as well as drawings of other turtles are not " "affected." msgstr "" -#: ../../library/turtle.rst:1372 +#: ../../library/turtle.rst:1321 msgid "object to be written to the TurtleScreen" msgstr "" -#: ../../library/turtle.rst:1373 +#: ../../library/turtle.rst:1322 msgid "True/False" msgstr "" -#: ../../library/turtle.rst:1374 +#: ../../library/turtle.rst:1323 msgid "one of the strings \"left\", \"center\" or right\"" msgstr "" -#: ../../library/turtle.rst:1375 +#: ../../library/turtle.rst:1324 msgid "a triple (fontname, fontsize, fonttype)" msgstr "" -#: ../../library/turtle.rst:1377 +#: ../../library/turtle.rst:1326 msgid "" "Write text - the string representation of *arg* - at the current turtle " "position according to *align* (\"left\", \"center\" or \"right\") and with " @@ -1505,26 +1416,26 @@ msgid "" "corner of the text. By default, *move* is ``False``." msgstr "" -#: ../../library/turtle.rst:1395 +#: ../../library/turtle.rst:1344 msgid "" "Make the turtle invisible. It's a good idea to do this while you're in the " "middle of doing some complex drawing, because hiding the turtle speeds up " "the drawing observably." msgstr "" -#: ../../library/turtle.rst:1408 +#: ../../library/turtle.rst:1357 msgid "Make the turtle visible." msgstr "" -#: ../../library/turtle.rst:1418 +#: ../../library/turtle.rst:1367 msgid "Return ``True`` if the Turtle is shown, ``False`` if it's hidden." msgstr "" -#: ../../library/turtle.rst:1433 +#: ../../library/turtle.rst:1382 msgid "a string which is a valid shapename" msgstr "" -#: ../../library/turtle.rst:1435 +#: ../../library/turtle.rst:1384 msgid "" "Set turtle shape to shape with given *name* or, if name is not given, return " "name of current shape. Shape with *name* must exist in the TurtleScreen's " @@ -1534,45 +1445,45 @@ msgid "" "`register_shape`." msgstr "" -#: ../../library/turtle.rst:1453 +#: ../../library/turtle.rst:1402 msgid "one of the strings \"auto\", \"user\", \"noresize\"" msgstr "" -#: ../../library/turtle.rst:1455 +#: ../../library/turtle.rst:1404 msgid "" "Set resizemode to one of the values: \"auto\", \"user\", \"noresize\". If " "*rmode* is not given, return current resizemode. Different resizemodes have " "the following effects:" msgstr "" -#: ../../library/turtle.rst:1459 +#: ../../library/turtle.rst:1408 msgid "" "\"auto\": adapts the appearance of the turtle corresponding to the value of " "pensize." msgstr "" -#: ../../library/turtle.rst:1460 +#: ../../library/turtle.rst:1409 msgid "" "\"user\": adapts the appearance of the turtle according to the values of " "stretchfactor and outlinewidth (outline), which are set by :func:`shapesize`." msgstr "" -#: ../../library/turtle.rst:1463 +#: ../../library/turtle.rst:1412 msgid "\"noresize\": no adaption of the turtle's appearance takes place." msgstr "" -#: ../../library/turtle.rst:1465 +#: ../../library/turtle.rst:1414 msgid "" "``resizemode(\"user\")`` is called by :func:`shapesize` when used with " "arguments." msgstr "" -#: ../../library/turtle.rst:1480 ../../library/turtle.rst:1481 -#: ../../library/turtle.rst:1482 +#: ../../library/turtle.rst:1429 ../../library/turtle.rst:1430 +#: ../../library/turtle.rst:1431 msgid "positive number" msgstr "" -#: ../../library/turtle.rst:1484 +#: ../../library/turtle.rst:1433 msgid "" "Return or set the pen's attributes x/y-stretchfactors and/or outline. Set " "resizemode to \"user\". If and only if resizemode is set to \"user\", the " @@ -1582,12 +1493,12 @@ msgid "" "determines the width of the shape's outline." msgstr "" -#: ../../library/turtle.rst:1507 ../../library/turtle.rst:2166 -#: ../../library/turtle.rst:2167 ../../library/turtle.rst:2168 +#: ../../library/turtle.rst:1456 ../../library/turtle.rst:2115 +#: ../../library/turtle.rst:2116 ../../library/turtle.rst:2117 msgid "number (optional)" msgstr "" -#: ../../library/turtle.rst:1509 +#: ../../library/turtle.rst:1458 msgid "" "Set or return the current shearfactor. Shear the turtleshape according to " "the given shearfactor shear, which is the tangent of the shear angle. Do " @@ -1596,26 +1507,26 @@ msgid "" "by which lines parallel to the heading of the turtle are sheared." msgstr "" -#: ../../library/turtle.rst:1530 +#: ../../library/turtle.rst:1479 msgid "" "Rotate the turtleshape by *angle* from its current tilt-angle, but do *not* " "change the turtle's heading (direction of movement)." msgstr "" -#: ../../library/turtle.rst:1549 +#: ../../library/turtle.rst:1498 msgid "" "Rotate the turtleshape to point in the direction specified by *angle*, " "regardless of its current tilt-angle. *Do not* change the turtle's heading " "(direction of movement)." msgstr "" -#: ../../library/turtle.rst:1569 ../../library/turtle.rst:1592 -#: ../../library/turtle.rst:1593 ../../library/turtle.rst:1594 -#: ../../library/turtle.rst:1595 +#: ../../library/turtle.rst:1518 ../../library/turtle.rst:1541 +#: ../../library/turtle.rst:1542 ../../library/turtle.rst:1543 +#: ../../library/turtle.rst:1544 msgid "a number (optional)" msgstr "" -#: ../../library/turtle.rst:1571 +#: ../../library/turtle.rst:1520 msgid "" "Set or return the current tilt-angle. If angle is given, rotate the " "turtleshape to point in the direction specified by angle, regardless of its " @@ -1625,11 +1536,11 @@ msgid "" "turtle (its direction of movement)." msgstr "" -#: ../../library/turtle.rst:1597 +#: ../../library/turtle.rst:1546 msgid "Set or return the current transformation matrix of the turtle shape." msgstr "" -#: ../../library/turtle.rst:1599 +#: ../../library/turtle.rst:1548 msgid "" "If none of the matrix elements are given, return the transformation matrix " "as a tuple of 4 elements. Otherwise set the given elements and transform the " @@ -1639,101 +1550,101 @@ msgid "" "tiltangle according to the given matrix." msgstr "" -#: ../../library/turtle.rst:1621 +#: ../../library/turtle.rst:1570 msgid "" "Return the current shape polygon as tuple of coordinate pairs. This can be " "used to define a new shape or components of a compound shape." msgstr "" -#: ../../library/turtle.rst:1639 ../../library/turtle.rst:1661 -#: ../../library/turtle.rst:1686 ../../library/turtle.rst:2090 +#: ../../library/turtle.rst:1588 ../../library/turtle.rst:1610 +#: ../../library/turtle.rst:1635 ../../library/turtle.rst:2039 msgid "" "a function with two arguments which will be called with the coordinates of " "the clicked point on the canvas" msgstr "" -#: ../../library/turtle.rst:1641 ../../library/turtle.rst:1663 -#: ../../library/turtle.rst:1688 ../../library/turtle.rst:2092 +#: ../../library/turtle.rst:1590 ../../library/turtle.rst:1612 +#: ../../library/turtle.rst:1637 ../../library/turtle.rst:2041 msgid "number of the mouse-button, defaults to 1 (left mouse button)" msgstr "" -#: ../../library/turtle.rst:1642 ../../library/turtle.rst:1664 -#: ../../library/turtle.rst:1689 ../../library/turtle.rst:2093 +#: ../../library/turtle.rst:1591 ../../library/turtle.rst:1613 +#: ../../library/turtle.rst:1638 ../../library/turtle.rst:2042 msgid "" "``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise " "it will replace a former binding" msgstr "" -#: ../../library/turtle.rst:1645 +#: ../../library/turtle.rst:1594 msgid "" "Bind *fun* to mouse-click events on this turtle. If *fun* is ``None``, " "existing bindings are removed. Example for the anonymous turtle, i.e. the " "procedural way:" msgstr "" -#: ../../library/turtle.rst:1667 +#: ../../library/turtle.rst:1616 msgid "" "Bind *fun* to mouse-button-release events on this turtle. If *fun* is " "``None``, existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:1692 +#: ../../library/turtle.rst:1641 msgid "" "Bind *fun* to mouse-move events on this turtle. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:1695 +#: ../../library/turtle.rst:1644 msgid "" "Remark: Every sequence of mouse-move-events on a turtle is preceded by a " "mouse-click event on that turtle." msgstr "" -#: ../../library/turtle.rst:1703 +#: ../../library/turtle.rst:1652 msgid "" "Subsequently, clicking and dragging the Turtle will move it across the " "screen thereby producing handdrawings (if pen is down)." msgstr "" -#: ../../library/turtle.rst:1712 +#: ../../library/turtle.rst:1661 msgid "" "Start recording the vertices of a polygon. Current turtle position is first " "vertex of polygon." msgstr "" -#: ../../library/turtle.rst:1718 +#: ../../library/turtle.rst:1667 msgid "" "Stop recording the vertices of a polygon. Current turtle position is last " "vertex of polygon. This will be connected with the first vertex." msgstr "" -#: ../../library/turtle.rst:1724 +#: ../../library/turtle.rst:1673 msgid "Return the last recorded polygon." msgstr "" -#: ../../library/turtle.rst:1743 +#: ../../library/turtle.rst:1692 msgid "" "Create and return a clone of the turtle with same position, heading and " "turtle properties." msgstr "" -#: ../../library/turtle.rst:1756 +#: ../../library/turtle.rst:1705 msgid "" "Return the Turtle object itself. Only reasonable use: as a function to " "return the \"anonymous turtle\":" msgstr "" -#: ../../library/turtle.rst:1770 +#: ../../library/turtle.rst:1719 msgid "" "Return the :class:`TurtleScreen` object the turtle is drawing on. " "TurtleScreen methods can then be called for that object." msgstr "" -#: ../../library/turtle.rst:1784 +#: ../../library/turtle.rst:1733 msgid "an integer or ``None``" msgstr "" -#: ../../library/turtle.rst:1786 +#: ../../library/turtle.rst:1735 msgid "" "Set or disable undobuffer. If *size* is an integer, an empty undobuffer of " "given size is installed. *size* gives the maximum number of turtle actions " @@ -1741,71 +1652,71 @@ msgid "" "``None``, the undobuffer is disabled." msgstr "" -#: ../../library/turtle.rst:1799 +#: ../../library/turtle.rst:1748 msgid "Return number of entries in the undobuffer." msgstr "" -#: ../../library/turtle.rst:1812 +#: ../../library/turtle.rst:1761 msgid "Compound shapes" msgstr "" -#: ../../library/turtle.rst:1814 +#: ../../library/turtle.rst:1763 msgid "" "To use compound turtle shapes, which consist of several polygons of " "different color, you must use the helper class :class:`Shape` explicitly as " "described below:" msgstr "" -#: ../../library/turtle.rst:1818 +#: ../../library/turtle.rst:1767 msgid "Create an empty Shape object of type \"compound\"." msgstr "" -#: ../../library/turtle.rst:1819 +#: ../../library/turtle.rst:1768 msgid "" "Add as many components to this object as desired, using the :meth:`~Shape." "addcomponent` method." msgstr "" -#: ../../library/turtle.rst:1822 +#: ../../library/turtle.rst:1771 msgid "For example:" msgstr "舉例來說:" -#: ../../library/turtle.rst:1833 +#: ../../library/turtle.rst:1782 msgid "Now add the Shape to the Screen's shapelist and use it:" msgstr "" -#: ../../library/turtle.rst:1844 +#: ../../library/turtle.rst:1793 msgid "" "The :class:`Shape` class is used internally by the :func:`register_shape` " "method in different ways. The application programmer has to deal with the " "Shape class *only* when using compound shapes like shown above!" msgstr "" -#: ../../library/turtle.rst:1850 +#: ../../library/turtle.rst:1799 msgid "Methods of TurtleScreen/Screen and corresponding functions" msgstr "" -#: ../../library/turtle.rst:1852 +#: ../../library/turtle.rst:1801 msgid "" "Most of the examples in this section refer to a TurtleScreen instance called " "``screen``." msgstr "" -#: ../../library/turtle.rst:1866 +#: ../../library/turtle.rst:1815 msgid "" "a color string or three numbers in the range 0..colormode or a 3-tuple of " "such numbers" msgstr "" -#: ../../library/turtle.rst:1870 +#: ../../library/turtle.rst:1819 msgid "Set or return background color of the TurtleScreen." msgstr "" -#: ../../library/turtle.rst:1885 +#: ../../library/turtle.rst:1834 msgid "a string, name of a gif-file or ``\"nopic\"``, or ``None``" msgstr "" -#: ../../library/turtle.rst:1887 +#: ../../library/turtle.rst:1836 msgid "" "Set background image or return name of current backgroundimage. If " "*picname* is a filename, set the corresponding image as background. If " @@ -1813,44 +1724,44 @@ msgid "" "*picname* is ``None``, return the filename of the current backgroundimage. ::" msgstr "" -#: ../../library/turtle.rst:1903 +#: ../../library/turtle.rst:1852 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``clearscreen``. The global function ``clear`` is a different one " "derived from the Turtle method ``clear``." msgstr "" -#: ../../library/turtle.rst:1910 +#: ../../library/turtle.rst:1859 msgid "" "Delete all drawings and all turtles from the TurtleScreen. Reset the now " "empty TurtleScreen to its initial state: white background, no background " "image, no event bindings and tracing on." msgstr "" -#: ../../library/turtle.rst:1919 +#: ../../library/turtle.rst:1868 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``resetscreen``. The global function ``reset`` is another one derived " "from the Turtle method ``reset``." msgstr "" -#: ../../library/turtle.rst:1926 +#: ../../library/turtle.rst:1875 msgid "Reset all Turtles on the Screen to their initial state." msgstr "" -#: ../../library/turtle.rst:1931 +#: ../../library/turtle.rst:1880 msgid "positive integer, new width of canvas in pixels" msgstr "" -#: ../../library/turtle.rst:1932 +#: ../../library/turtle.rst:1881 msgid "positive integer, new height of canvas in pixels" msgstr "" -#: ../../library/turtle.rst:1933 +#: ../../library/turtle.rst:1882 msgid "colorstring or color-tuple, new background color" msgstr "" -#: ../../library/turtle.rst:1935 +#: ../../library/turtle.rst:1884 msgid "" "If no arguments are given, return current (canvaswidth, canvasheight). Else " "resize the canvas the turtles are drawing on. Do not alter the drawing " @@ -1859,59 +1770,59 @@ msgid "" "outside the canvas before." msgstr "" -#: ../../library/turtle.rst:1947 +#: ../../library/turtle.rst:1896 msgid "e.g. to search for an erroneously escaped turtle ;-)" msgstr "" -#: ../../library/turtle.rst:1952 +#: ../../library/turtle.rst:1901 msgid "a number, x-coordinate of lower left corner of canvas" msgstr "" -#: ../../library/turtle.rst:1953 +#: ../../library/turtle.rst:1902 msgid "a number, y-coordinate of lower left corner of canvas" msgstr "" -#: ../../library/turtle.rst:1954 +#: ../../library/turtle.rst:1903 msgid "a number, x-coordinate of upper right corner of canvas" msgstr "" -#: ../../library/turtle.rst:1955 +#: ../../library/turtle.rst:1904 msgid "a number, y-coordinate of upper right corner of canvas" msgstr "" -#: ../../library/turtle.rst:1957 +#: ../../library/turtle.rst:1906 msgid "" "Set up user-defined coordinate system and switch to mode \"world\" if " "necessary. This performs a ``screen.reset()``. If mode \"world\" is " "already active, all drawings are redrawn according to the new coordinates." msgstr "" -#: ../../library/turtle.rst:1961 +#: ../../library/turtle.rst:1910 msgid "" "**ATTENTION**: in user-defined coordinate systems angles may appear " "distorted." msgstr "" -#: ../../library/turtle.rst:1989 +#: ../../library/turtle.rst:1938 msgid "positive integer" msgstr "" -#: ../../library/turtle.rst:1991 +#: ../../library/turtle.rst:1940 msgid "" "Set or return the drawing *delay* in milliseconds. (This is approximately " "the time interval between two consecutive canvas updates.) The longer the " "drawing delay, the slower the animation." msgstr "" -#: ../../library/turtle.rst:1995 +#: ../../library/turtle.rst:1944 msgid "Optional argument:" msgstr "" -#: ../../library/turtle.rst:2009 ../../library/turtle.rst:2010 +#: ../../library/turtle.rst:1958 ../../library/turtle.rst:1959 msgid "nonnegative integer" msgstr "" -#: ../../library/turtle.rst:2012 +#: ../../library/turtle.rst:1961 msgid "" "Turn turtle animation on/off and set delay for update drawings. If *n* is " "given, only each n-th regular screen update is really performed. (Can be " @@ -1920,75 +1831,75 @@ msgid "" "delay value (see :func:`delay`)." msgstr "" -#: ../../library/turtle.rst:2032 +#: ../../library/turtle.rst:1981 msgid "Perform a TurtleScreen update. To be used when tracer is turned off." msgstr "" -#: ../../library/turtle.rst:2034 +#: ../../library/turtle.rst:1983 msgid "See also the RawTurtle/Turtle method :func:`speed`." msgstr "" -#: ../../library/turtle.rst:2042 +#: ../../library/turtle.rst:1991 msgid "" "Set focus on TurtleScreen (in order to collect key-events). Dummy arguments " "are provided in order to be able to pass :func:`listen` to the onclick " "method." msgstr "" -#: ../../library/turtle.rst:2049 ../../library/turtle.rst:2069 +#: ../../library/turtle.rst:1998 ../../library/turtle.rst:2018 msgid "a function with no arguments or ``None``" msgstr "" -#: ../../library/turtle.rst:2050 ../../library/turtle.rst:2070 +#: ../../library/turtle.rst:1999 ../../library/turtle.rst:2019 msgid "a string: key (e.g. \"a\") or key-symbol (e.g. \"space\")" msgstr "" -#: ../../library/turtle.rst:2052 +#: ../../library/turtle.rst:2001 msgid "" "Bind *fun* to key-release event of key. If *fun* is ``None``, event " "bindings are removed. Remark: in order to be able to register key-events, " "TurtleScreen must have the focus. (See method :func:`listen`.)" msgstr "" -#: ../../library/turtle.rst:2072 +#: ../../library/turtle.rst:2021 msgid "" "Bind *fun* to key-press event of key if key is given, or to any key-press-" "event if no key is given. Remark: in order to be able to register key-" "events, TurtleScreen must have focus. (See method :func:`listen`.)" msgstr "" -#: ../../library/turtle.rst:2096 +#: ../../library/turtle.rst:2045 msgid "" "Bind *fun* to mouse-click events on this screen. If *fun* is ``None``, " "existing bindings are removed." msgstr "" -#: ../../library/turtle.rst:2099 +#: ../../library/turtle.rst:2048 msgid "" "Example for a TurtleScreen instance named ``screen`` and a Turtle instance " "named ``turtle``:" msgstr "" -#: ../../library/turtle.rst:2110 +#: ../../library/turtle.rst:2059 msgid "" "This TurtleScreen method is available as a global function only under the " "name ``onscreenclick``. The global function ``onclick`` is another one " "derived from the Turtle method ``onclick``." msgstr "" -#: ../../library/turtle.rst:2117 +#: ../../library/turtle.rst:2066 msgid "a function with no arguments" msgstr "" -#: ../../library/turtle.rst:2118 +#: ../../library/turtle.rst:2067 msgid "a number >= 0" msgstr "" -#: ../../library/turtle.rst:2120 +#: ../../library/turtle.rst:2069 msgid "Install a timer that calls *fun* after *t* milliseconds." msgstr "" -#: ../../library/turtle.rst:2138 +#: ../../library/turtle.rst:2087 msgid "" "Starts event loop - calling Tkinter's mainloop function. Must be the last " "statement in a turtle graphics program. Must *not* be used if a script is " @@ -1996,12 +1907,12 @@ msgid "" "turtle graphics. ::" msgstr "" -#: ../../library/turtle.rst:2151 ../../library/turtle.rst:2152 -#: ../../library/turtle.rst:2164 ../../library/turtle.rst:2165 +#: ../../library/turtle.rst:2100 ../../library/turtle.rst:2101 +#: ../../library/turtle.rst:2113 ../../library/turtle.rst:2114 msgid "string" msgstr "string(字串)" -#: ../../library/turtle.rst:2154 +#: ../../library/turtle.rst:2103 msgid "" "Pop up a dialog window for input of a string. Parameter title is the title " "of the dialog window, prompt is a text mostly describing what information to " @@ -2009,7 +1920,7 @@ msgid "" "``None``. ::" msgstr "" -#: ../../library/turtle.rst:2170 +#: ../../library/turtle.rst:2119 msgid "" "Pop up a dialog window for input of a number. title is the title of the " "dialog window, prompt is a text mostly describing what numerical information " @@ -2020,17 +1931,17 @@ msgid "" "return ``None``. ::" msgstr "" -#: ../../library/turtle.rst:2187 +#: ../../library/turtle.rst:2136 msgid "one of the strings \"standard\", \"logo\" or \"world\"" msgstr "" -#: ../../library/turtle.rst:2189 +#: ../../library/turtle.rst:2138 msgid "" "Set turtle mode (\"standard\", \"logo\" or \"world\") and perform reset. If " "mode is not given, current mode is returned." msgstr "" -#: ../../library/turtle.rst:2192 +#: ../../library/turtle.rst:2141 msgid "" "Mode \"standard\" is compatible with old :mod:`turtle`. Mode \"logo\" is " "compatible with most Logo turtle graphics. Mode \"world\" uses user-defined " @@ -2038,121 +1949,121 @@ msgid "" "if ``x/y`` unit-ratio doesn't equal 1." msgstr "" -#: ../../library/turtle.rst:2198 +#: ../../library/turtle.rst:2147 msgid "Mode" msgstr "" -#: ../../library/turtle.rst:2198 +#: ../../library/turtle.rst:2147 msgid "Initial turtle heading" msgstr "" -#: ../../library/turtle.rst:2198 +#: ../../library/turtle.rst:2147 msgid "positive angles" msgstr "" -#: ../../library/turtle.rst:2200 +#: ../../library/turtle.rst:2149 msgid "\"standard\"" msgstr "" -#: ../../library/turtle.rst:2200 +#: ../../library/turtle.rst:2149 msgid "to the right (east)" msgstr "" -#: ../../library/turtle.rst:2200 +#: ../../library/turtle.rst:2149 msgid "counterclockwise" msgstr "" -#: ../../library/turtle.rst:2201 +#: ../../library/turtle.rst:2150 msgid "\"logo\"" msgstr "" -#: ../../library/turtle.rst:2201 +#: ../../library/turtle.rst:2150 msgid "upward (north)" msgstr "" -#: ../../library/turtle.rst:2201 +#: ../../library/turtle.rst:2150 msgid "clockwise" msgstr "" -#: ../../library/turtle.rst:2214 +#: ../../library/turtle.rst:2163 msgid "one of the values 1.0 or 255" msgstr "" -#: ../../library/turtle.rst:2216 +#: ../../library/turtle.rst:2165 msgid "" "Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* " "values of color triples have to be in the range 0..*cmode*." msgstr "" -#: ../../library/turtle.rst:2237 +#: ../../library/turtle.rst:2186 msgid "" "Return the Canvas of this TurtleScreen. Useful for insiders who know what " "to do with a Tkinter Canvas." msgstr "" -#: ../../library/turtle.rst:2250 +#: ../../library/turtle.rst:2199 msgid "Return a list of names of all currently available turtle shapes." msgstr "" -#: ../../library/turtle.rst:2262 +#: ../../library/turtle.rst:2211 msgid "There are three different ways to call this function:" msgstr "" -#: ../../library/turtle.rst:2264 +#: ../../library/turtle.rst:2213 msgid "" "*name* is the name of a gif-file and *shape* is ``None``: Install the " "corresponding image shape. ::" msgstr "" -#: ../../library/turtle.rst:2270 +#: ../../library/turtle.rst:2219 msgid "" "Image shapes *do not* rotate when turning the turtle, so they do not display " "the heading of the turtle!" msgstr "" -#: ../../library/turtle.rst:2273 +#: ../../library/turtle.rst:2222 msgid "" "*name* is an arbitrary string and *shape* is a tuple of pairs of " "coordinates: Install the corresponding polygon shape." msgstr "" -#: ../../library/turtle.rst:2281 +#: ../../library/turtle.rst:2230 msgid "" "*name* is an arbitrary string and *shape* is a (compound) :class:`Shape` " "object: Install the corresponding compound shape." msgstr "" -#: ../../library/turtle.rst:2284 +#: ../../library/turtle.rst:2233 msgid "" "Add a turtle shape to TurtleScreen's shapelist. Only thusly registered " "shapes can be used by issuing the command ``shape(shapename)``." msgstr "" -#: ../../library/turtle.rst:2290 +#: ../../library/turtle.rst:2239 msgid "Return the list of turtles on the screen." msgstr "" -#: ../../library/turtle.rst:2301 +#: ../../library/turtle.rst:2250 msgid "Return the height of the turtle window. ::" msgstr "" -#: ../../library/turtle.rst:2309 +#: ../../library/turtle.rst:2258 msgid "Return the width of the turtle window. ::" msgstr "" -#: ../../library/turtle.rst:2318 +#: ../../library/turtle.rst:2267 msgid "Methods specific to Screen, not inherited from TurtleScreen" msgstr "" -#: ../../library/turtle.rst:2322 +#: ../../library/turtle.rst:2271 msgid "Shut the turtlegraphics window." msgstr "" -#: ../../library/turtle.rst:2327 +#: ../../library/turtle.rst:2276 msgid "Bind ``bye()`` method to mouse clicks on the Screen." msgstr "" -#: ../../library/turtle.rst:2330 +#: ../../library/turtle.rst:2279 msgid "" "If the value \"using_IDLE\" in the configuration dictionary is ``False`` " "(default value), also enter mainloop. Remark: If IDLE with the ``-n`` " @@ -2161,246 +2072,295 @@ msgid "" "client script." msgstr "" -#: ../../library/turtle.rst:2339 +#: ../../library/turtle.rst:2288 msgid "" "Set the size and position of the main window. Default values of arguments " "are stored in the configuration dictionary and can be changed via a :file:" "`turtle.cfg` file." msgstr "" -#: ../../library/turtle.rst:2343 +#: ../../library/turtle.rst:2292 msgid "" "if an integer, a size in pixels, if a float, a fraction of the screen; " "default is 50% of screen" msgstr "" -#: ../../library/turtle.rst:2345 +#: ../../library/turtle.rst:2294 msgid "" "if an integer, the height in pixels, if a float, a fraction of the screen; " "default is 75% of screen" msgstr "" -#: ../../library/turtle.rst:2347 +#: ../../library/turtle.rst:2296 msgid "" "if positive, starting position in pixels from the left edge of the screen, " "if negative from the right edge, if ``None``, center window horizontally" msgstr "" -#: ../../library/turtle.rst:2350 +#: ../../library/turtle.rst:2299 msgid "" "if positive, starting position in pixels from the top edge of the screen, if " "negative from the bottom edge, if ``None``, center window vertically" msgstr "" -#: ../../library/turtle.rst:2365 +#: ../../library/turtle.rst:2314 msgid "a string that is shown in the titlebar of the turtle graphics window" msgstr "" -#: ../../library/turtle.rst:2368 +#: ../../library/turtle.rst:2317 msgid "Set title of turtle window to *titlestring*." msgstr "" -#: ../../library/turtle.rst:2377 +#: ../../library/turtle.rst:2326 msgid "Public classes" msgstr "" -#: ../../library/turtle.rst:2383 +#: ../../library/turtle.rst:2332 msgid "" "a :class:`tkinter.Canvas`, a :class:`ScrolledCanvas` or a :class:" "`TurtleScreen`" msgstr "" -#: ../../library/turtle.rst:2386 +#: ../../library/turtle.rst:2335 msgid "" "Create a turtle. The turtle has all methods described above as \"methods of " "Turtle/RawTurtle\"." msgstr "" -#: ../../library/turtle.rst:2392 +#: ../../library/turtle.rst:2341 msgid "" "Subclass of RawTurtle, has the same interface but draws on a default :class:" "`Screen` object created automatically when needed for the first time." msgstr "" -#: ../../library/turtle.rst:2398 +#: ../../library/turtle.rst:2347 msgid "a :class:`tkinter.Canvas`" msgstr "" -#: ../../library/turtle.rst:2400 +#: ../../library/turtle.rst:2349 msgid "" "Provides screen oriented methods like :func:`bgcolor` etc. that are " "described above." msgstr "" -#: ../../library/turtle.rst:2405 +#: ../../library/turtle.rst:2354 msgid "" "Subclass of TurtleScreen, with :ref:`four methods added `." msgstr "" -#: ../../library/turtle.rst:2410 +#: ../../library/turtle.rst:2359 msgid "" "some Tkinter widget to contain the ScrolledCanvas, i.e. a Tkinter-canvas " "with scrollbars added" msgstr "" -#: ../../library/turtle.rst:2413 +#: ../../library/turtle.rst:2362 msgid "" "Used by class Screen, which thus automatically provides a ScrolledCanvas as " "playground for the turtles." msgstr "" -#: ../../library/turtle.rst:2418 +#: ../../library/turtle.rst:2367 msgid "one of the strings \"polygon\", \"image\", \"compound\"" msgstr "" -#: ../../library/turtle.rst:2420 +#: ../../library/turtle.rst:2369 msgid "" "Data structure modeling shapes. The pair ``(type_, data)`` must follow this " "specification:" msgstr "" -#: ../../library/turtle.rst:2425 +#: ../../library/turtle.rst:2374 msgid "*type_*" msgstr "*type_*" -#: ../../library/turtle.rst:2425 +#: ../../library/turtle.rst:2374 msgid "*data*" msgstr "" -#: ../../library/turtle.rst:2427 +#: ../../library/turtle.rst:2376 msgid "\"polygon\"" msgstr "" -#: ../../library/turtle.rst:2427 +#: ../../library/turtle.rst:2376 msgid "a polygon-tuple, i.e. a tuple of pairs of coordinates" msgstr "" -#: ../../library/turtle.rst:2428 +#: ../../library/turtle.rst:2377 msgid "\"image\"" msgstr "" -#: ../../library/turtle.rst:2428 +#: ../../library/turtle.rst:2377 msgid "an image (in this form only used internally!)" msgstr "" -#: ../../library/turtle.rst:2429 +#: ../../library/turtle.rst:2378 msgid "\"compound\"" msgstr "" -#: ../../library/turtle.rst:2429 +#: ../../library/turtle.rst:2378 msgid "" "``None`` (a compound shape has to be constructed using the :meth:" "`addcomponent` method)" msgstr "" -#: ../../library/turtle.rst:2435 +#: ../../library/turtle.rst:2384 msgid "a polygon, i.e. a tuple of pairs of numbers" msgstr "" -#: ../../library/turtle.rst:2436 +#: ../../library/turtle.rst:2385 msgid "a color the *poly* will be filled with" msgstr "" -#: ../../library/turtle.rst:2437 +#: ../../library/turtle.rst:2386 msgid "a color for the poly's outline (if given)" msgstr "" -#: ../../library/turtle.rst:2439 +#: ../../library/turtle.rst:2388 msgid "Example:" msgstr "例如:" -#: ../../library/turtle.rst:2449 +#: ../../library/turtle.rst:2398 msgid "See :ref:`compoundshapes`." msgstr "請見\\ :ref:`compoundshapes`\\ 。" -#: ../../library/turtle.rst:2454 +#: ../../library/turtle.rst:2403 msgid "" "A two-dimensional vector class, used as a helper class for implementing " "turtle graphics. May be useful for turtle graphics programs too. Derived " "from tuple, so a vector is a tuple!" msgstr "" -#: ../../library/turtle.rst:2458 +#: ../../library/turtle.rst:2407 msgid "Provides (for *a*, *b* vectors, *k* number):" msgstr "" -#: ../../library/turtle.rst:2460 +#: ../../library/turtle.rst:2409 msgid "``a + b`` vector addition" msgstr "" -#: ../../library/turtle.rst:2461 +#: ../../library/turtle.rst:2410 msgid "``a - b`` vector subtraction" msgstr "" -#: ../../library/turtle.rst:2462 +#: ../../library/turtle.rst:2411 msgid "``a * b`` inner product" msgstr "" -#: ../../library/turtle.rst:2463 +#: ../../library/turtle.rst:2412 msgid "``k * a`` and ``a * k`` multiplication with scalar" msgstr "" -#: ../../library/turtle.rst:2464 +#: ../../library/turtle.rst:2413 msgid "``abs(a)`` absolute value of a" msgstr "" -#: ../../library/turtle.rst:2465 +#: ../../library/turtle.rst:2414 msgid "``a.rotate(angle)`` rotation" msgstr "" -#: ../../library/turtle.rst:2469 +#: ../../library/turtle.rst:2420 +msgid "Explanation" +msgstr "" + +#: ../../library/turtle.rst:2422 +msgid "" +"A turtle object draws on a screen object, and there a number of key classes " +"in the turtle object-oriented interface that can be used to create them and " +"relate them to each other." +msgstr "" + +#: ../../library/turtle.rst:2426 +msgid "" +"A :class:`Turtle` instance will automatically create a :class:`Screen` " +"instance if one is not already present." +msgstr "" + +#: ../../library/turtle.rst:2429 +msgid "" +"``Turtle`` is a subclass of :class:`RawTurtle`, which *doesn't* " +"automatically create a drawing surface - a *canvas* will need to be provided " +"or created for it. The *canvas* can be a :class:`tkinter.Canvas`, :class:" +"`ScrolledCanvas` or :class:`TurtleScreen`." +msgstr "" + +#: ../../library/turtle.rst:2435 +msgid "" +":class:`TurtleScreen` is the basic drawing surface for a turtle. :class:" +"`Screen` is a subclass of ``TurtleScreen``, and includes :ref:`some " +"additional methods ` for managing its appearance (including " +"size and title) and behaviour. ``TurtleScreen``'s constructor needs a :class:" +"`tkinter.Canvas` or a :class:`ScrolledCanvas` as an argument." +msgstr "" + +#: ../../library/turtle.rst:2442 +msgid "" +"The functional interface for turtle graphics uses the various methods of " +"``Turtle`` and ``TurtleScreen``/``Screen``. Behind the scenes, a screen " +"object is automatically created whenever a function derived from a " +"``Screen`` method is called. Similarly, a turtle object is automatically " +"created whenever any of the functions derived from a Turtle method is called." +msgstr "" + +#: ../../library/turtle.rst:2448 +msgid "" +"To use multiple turtles on a screen, the object-oriented interface must be " +"used." +msgstr "" + +#: ../../library/turtle.rst:2453 msgid "Help and configuration" msgstr "" -#: ../../library/turtle.rst:2472 +#: ../../library/turtle.rst:2456 msgid "How to use help" msgstr "" -#: ../../library/turtle.rst:2474 +#: ../../library/turtle.rst:2458 msgid "" "The public methods of the Screen and Turtle classes are documented " "extensively via docstrings. So these can be used as online-help via the " "Python help facilities:" msgstr "" -#: ../../library/turtle.rst:2478 +#: ../../library/turtle.rst:2462 msgid "" "When using IDLE, tooltips show the signatures and first lines of the " "docstrings of typed in function-/method calls." msgstr "" -#: ../../library/turtle.rst:2481 +#: ../../library/turtle.rst:2465 msgid "Calling :func:`help` on methods or functions displays the docstrings::" msgstr "" -#: ../../library/turtle.rst:2512 +#: ../../library/turtle.rst:2496 msgid "" "The docstrings of the functions which are derived from methods have a " "modified form::" msgstr "" -#: ../../library/turtle.rst:2546 +#: ../../library/turtle.rst:2530 msgid "" "These modified docstrings are created automatically together with the " "function definitions that are derived from the methods at import time." msgstr "" -#: ../../library/turtle.rst:2551 +#: ../../library/turtle.rst:2535 msgid "Translation of docstrings into different languages" msgstr "" -#: ../../library/turtle.rst:2553 +#: ../../library/turtle.rst:2537 msgid "" "There is a utility to create a dictionary the keys of which are the method " "names and the values of which are the docstrings of the public methods of " "the classes Screen and Turtle." msgstr "" -#: ../../library/turtle.rst:2559 +#: ../../library/turtle.rst:2543 msgid "a string, used as filename" msgstr "" -#: ../../library/turtle.rst:2561 +#: ../../library/turtle.rst:2545 msgid "" "Create and write docstring-dictionary to a Python script with the given " "filename. This function has to be called explicitly (it is not used by the " @@ -2409,37 +2369,37 @@ msgid "" "for translation of the docstrings into different languages." msgstr "" -#: ../../library/turtle.rst:2567 +#: ../../library/turtle.rst:2551 msgid "" "If you (or your students) want to use :mod:`turtle` with online help in your " "native language, you have to translate the docstrings and save the resulting " "file as e.g. :file:`turtle_docstringdict_german.py`." msgstr "" -#: ../../library/turtle.rst:2571 +#: ../../library/turtle.rst:2555 msgid "" "If you have an appropriate entry in your :file:`turtle.cfg` file this " "dictionary will be read in at import time and will replace the original " "English docstrings." msgstr "" -#: ../../library/turtle.rst:2574 +#: ../../library/turtle.rst:2558 msgid "" "At the time of this writing there are docstring dictionaries in German and " "in Italian. (Requests please to glingl@aon.at.)" msgstr "" -#: ../../library/turtle.rst:2580 +#: ../../library/turtle.rst:2564 msgid "How to configure Screen and Turtles" msgstr "" -#: ../../library/turtle.rst:2582 +#: ../../library/turtle.rst:2566 msgid "" "The built-in default configuration mimics the appearance and behaviour of " "the old turtle module in order to retain best possible compatibility with it." msgstr "" -#: ../../library/turtle.rst:2585 +#: ../../library/turtle.rst:2569 msgid "" "If you want to use a different configuration which better reflects the " "features of this module or which better fits to your needs, e.g. for use in " @@ -2448,54 +2408,54 @@ msgid "" "settings." msgstr "" -#: ../../library/turtle.rst:2590 +#: ../../library/turtle.rst:2574 msgid "" "The built in configuration would correspond to the following ``turtle.cfg``:" msgstr "" -#: ../../library/turtle.rst:2615 +#: ../../library/turtle.rst:2599 msgid "Short explanation of selected entries:" msgstr "" -#: ../../library/turtle.rst:2617 +#: ../../library/turtle.rst:2601 msgid "" "The first four lines correspond to the arguments of the :func:`Screen.setup " "` method." msgstr "" -#: ../../library/turtle.rst:2619 +#: ../../library/turtle.rst:2603 msgid "" "Line 5 and 6 correspond to the arguments of the method :func:`Screen." "screensize `." msgstr "" -#: ../../library/turtle.rst:2621 +#: ../../library/turtle.rst:2605 msgid "" "*shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For " "more info try ``help(shape)``." msgstr "" -#: ../../library/turtle.rst:2623 +#: ../../library/turtle.rst:2607 msgid "" "If you want to use no fill color (i.e. make the turtle transparent), you " "have to write ``fillcolor = \"\"`` (but all nonempty strings must not have " "quotes in the cfg file)." msgstr "" -#: ../../library/turtle.rst:2626 +#: ../../library/turtle.rst:2610 msgid "" "If you want to reflect the turtle its state, you have to use ``resizemode = " "auto``." msgstr "" -#: ../../library/turtle.rst:2628 +#: ../../library/turtle.rst:2612 msgid "" "If you set e.g. ``language = italian`` the docstringdict :file:" "`turtle_docstringdict_italian.py` will be loaded at import time (if present " "on the import path, e.g. in the same directory as :mod:`turtle`)." msgstr "" -#: ../../library/turtle.rst:2631 +#: ../../library/turtle.rst:2615 msgid "" "The entries *exampleturtle* and *examplescreen* define the names of these " "objects as they occur in the docstrings. The transformation of method-" @@ -2503,301 +2463,301 @@ msgid "" "docstrings." msgstr "" -#: ../../library/turtle.rst:2635 +#: ../../library/turtle.rst:2619 msgid "" "*using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its " "``-n`` switch (\"no subprocess\"). This will prevent :func:`exitonclick` to " "enter the mainloop." msgstr "" -#: ../../library/turtle.rst:2639 +#: ../../library/turtle.rst:2623 msgid "" "There can be a :file:`turtle.cfg` file in the directory where :mod:`turtle` " "is stored and an additional one in the current working directory. The " "latter will override the settings of the first one." msgstr "" -#: ../../library/turtle.rst:2643 +#: ../../library/turtle.rst:2627 msgid "" "The :file:`Lib/turtledemo` directory contains a :file:`turtle.cfg` file. " "You can study it as an example and see its effects when running the demos " "(preferably not from within the demo-viewer)." msgstr "" -#: ../../library/turtle.rst:2649 +#: ../../library/turtle.rst:2633 msgid ":mod:`turtledemo` --- Demo scripts" msgstr "" -#: ../../library/turtle.rst:2654 +#: ../../library/turtle.rst:2638 msgid "" "The :mod:`turtledemo` package includes a set of demo scripts. These scripts " "can be run and viewed using the supplied demo viewer as follows::" msgstr "" -#: ../../library/turtle.rst:2659 +#: ../../library/turtle.rst:2643 msgid "" "Alternatively, you can run the demo scripts individually. For example, ::" msgstr "" -#: ../../library/turtle.rst:2663 +#: ../../library/turtle.rst:2647 msgid "The :mod:`turtledemo` package directory contains:" msgstr "" -#: ../../library/turtle.rst:2665 +#: ../../library/turtle.rst:2649 msgid "" "A demo viewer :file:`__main__.py` which can be used to view the sourcecode " "of the scripts and run them at the same time." msgstr "" -#: ../../library/turtle.rst:2667 +#: ../../library/turtle.rst:2651 msgid "" "Multiple scripts demonstrating different features of the :mod:`turtle` " "module. Examples can be accessed via the Examples menu. They can also be " "run standalone." msgstr "" -#: ../../library/turtle.rst:2670 +#: ../../library/turtle.rst:2654 msgid "" "A :file:`turtle.cfg` file which serves as an example of how to write and use " "such files." msgstr "" -#: ../../library/turtle.rst:2673 +#: ../../library/turtle.rst:2657 msgid "The demo scripts are:" msgstr "" -#: ../../library/turtle.rst:2680 +#: ../../library/turtle.rst:2664 msgid "Name" msgstr "" -#: ../../library/turtle.rst:2680 +#: ../../library/turtle.rst:2664 msgid "Description" msgstr "描述" -#: ../../library/turtle.rst:2680 +#: ../../library/turtle.rst:2664 msgid "Features" msgstr "" -#: ../../library/turtle.rst:2682 +#: ../../library/turtle.rst:2666 msgid "bytedesign" msgstr "" -#: ../../library/turtle.rst:2682 +#: ../../library/turtle.rst:2666 msgid "complex classical turtle graphics pattern" msgstr "" -#: ../../library/turtle.rst:2682 +#: ../../library/turtle.rst:2666 msgid ":func:`tracer`, delay, :func:`update`" msgstr "" -#: ../../library/turtle.rst:2685 +#: ../../library/turtle.rst:2669 msgid "chaos" msgstr "" -#: ../../library/turtle.rst:2685 +#: ../../library/turtle.rst:2669 msgid "" "graphs Verhulst dynamics, shows that computer's computations can generate " "results sometimes against the common sense expectations" msgstr "" -#: ../../library/turtle.rst:2685 +#: ../../library/turtle.rst:2669 msgid "world coordinates" msgstr "" -#: ../../library/turtle.rst:2691 +#: ../../library/turtle.rst:2675 msgid "clock" msgstr "" -#: ../../library/turtle.rst:2691 +#: ../../library/turtle.rst:2675 msgid "analog clock showing time of your computer" msgstr "" -#: ../../library/turtle.rst:2691 +#: ../../library/turtle.rst:2675 msgid "turtles as clock's hands, ontimer" msgstr "" -#: ../../library/turtle.rst:2694 +#: ../../library/turtle.rst:2678 msgid "colormixer" msgstr "" -#: ../../library/turtle.rst:2694 +#: ../../library/turtle.rst:2678 msgid "experiment with r, g, b" msgstr "" -#: ../../library/turtle.rst:2696 +#: ../../library/turtle.rst:2680 msgid "forest" msgstr "" -#: ../../library/turtle.rst:2696 +#: ../../library/turtle.rst:2680 msgid "3 breadth-first trees" msgstr "" -#: ../../library/turtle.rst:2696 +#: ../../library/turtle.rst:2680 msgid "randomization" msgstr "" -#: ../../library/turtle.rst:2698 +#: ../../library/turtle.rst:2682 msgid "fractalcurves" msgstr "" -#: ../../library/turtle.rst:2698 +#: ../../library/turtle.rst:2682 msgid "Hilbert & Koch curves" msgstr "" -#: ../../library/turtle.rst:2698 +#: ../../library/turtle.rst:2682 msgid "recursion" msgstr "" -#: ../../library/turtle.rst:2700 +#: ../../library/turtle.rst:2684 msgid "lindenmayer" msgstr "" -#: ../../library/turtle.rst:2700 +#: ../../library/turtle.rst:2684 msgid "ethnomathematics (indian kolams)" msgstr "" -#: ../../library/turtle.rst:2700 +#: ../../library/turtle.rst:2684 msgid "L-System" msgstr "" -#: ../../library/turtle.rst:2703 +#: ../../library/turtle.rst:2687 msgid "minimal_hanoi" msgstr "minimal_hanoi" -#: ../../library/turtle.rst:2703 +#: ../../library/turtle.rst:2687 msgid "Towers of Hanoi" msgstr "" -#: ../../library/turtle.rst:2703 +#: ../../library/turtle.rst:2687 msgid "Rectangular Turtles as Hanoi discs (shape, shapesize)" msgstr "" -#: ../../library/turtle.rst:2707 +#: ../../library/turtle.rst:2691 msgid "nim" msgstr "" -#: ../../library/turtle.rst:2707 +#: ../../library/turtle.rst:2691 msgid "" "play the classical nim game with three heaps of sticks against the computer." msgstr "" -#: ../../library/turtle.rst:2707 +#: ../../library/turtle.rst:2691 msgid "turtles as nimsticks, event driven (mouse, keyboard)" msgstr "" -#: ../../library/turtle.rst:2711 +#: ../../library/turtle.rst:2695 msgid "paint" msgstr "" -#: ../../library/turtle.rst:2711 +#: ../../library/turtle.rst:2695 msgid "super minimalistic drawing program" msgstr "" -#: ../../library/turtle.rst:2714 +#: ../../library/turtle.rst:2698 msgid "peace" msgstr "" -#: ../../library/turtle.rst:2714 +#: ../../library/turtle.rst:2698 msgid "elementary" msgstr "" -#: ../../library/turtle.rst:2714 +#: ../../library/turtle.rst:2698 msgid "turtle: appearance and animation" msgstr "" -#: ../../library/turtle.rst:2717 +#: ../../library/turtle.rst:2701 msgid "penrose" msgstr "" -#: ../../library/turtle.rst:2717 +#: ../../library/turtle.rst:2701 msgid "aperiodic tiling with kites and darts" msgstr "" -#: ../../library/turtle.rst:2720 +#: ../../library/turtle.rst:2704 msgid "planet_and_moon" msgstr "planet_and_moon" -#: ../../library/turtle.rst:2720 +#: ../../library/turtle.rst:2704 msgid "simulation of gravitational system" msgstr "" -#: ../../library/turtle.rst:2720 +#: ../../library/turtle.rst:2704 msgid "compound shapes, :class:`Vec2D`" msgstr "" -#: ../../library/turtle.rst:2723 +#: ../../library/turtle.rst:2707 msgid "rosette" msgstr "" -#: ../../library/turtle.rst:2723 +#: ../../library/turtle.rst:2707 msgid "a pattern from the wikipedia article on turtle graphics" msgstr "" -#: ../../library/turtle.rst:2723 +#: ../../library/turtle.rst:2707 msgid ":func:`clone`, :func:`undo`" msgstr ":func:`clone`, :func:`undo`" -#: ../../library/turtle.rst:2726 +#: ../../library/turtle.rst:2710 msgid "round_dance" msgstr "round_dance" -#: ../../library/turtle.rst:2726 +#: ../../library/turtle.rst:2710 msgid "dancing turtles rotating pairwise in opposite direction" msgstr "" -#: ../../library/turtle.rst:2726 +#: ../../library/turtle.rst:2710 msgid "compound shapes, clone shapesize, tilt, get_shapepoly, update" msgstr "" -#: ../../library/turtle.rst:2730 +#: ../../library/turtle.rst:2714 msgid "sorting_animate" msgstr "sorting_animate" -#: ../../library/turtle.rst:2730 +#: ../../library/turtle.rst:2714 msgid "visual demonstration of different sorting methods" msgstr "" -#: ../../library/turtle.rst:2730 +#: ../../library/turtle.rst:2714 msgid "simple alignment, randomization" msgstr "" -#: ../../library/turtle.rst:2733 +#: ../../library/turtle.rst:2717 msgid "tree" msgstr "" -#: ../../library/turtle.rst:2733 +#: ../../library/turtle.rst:2717 msgid "a (graphical) breadth first tree (using generators)" msgstr "" -#: ../../library/turtle.rst:2736 +#: ../../library/turtle.rst:2720 msgid "two_canvases" msgstr "two_canvases" -#: ../../library/turtle.rst:2736 +#: ../../library/turtle.rst:2720 msgid "simple design" msgstr "" -#: ../../library/turtle.rst:2736 +#: ../../library/turtle.rst:2720 msgid "turtles on two canvases" msgstr "" -#: ../../library/turtle.rst:2739 +#: ../../library/turtle.rst:2723 msgid "yinyang" msgstr "" -#: ../../library/turtle.rst:2739 +#: ../../library/turtle.rst:2723 msgid "another elementary example" msgstr "" -#: ../../library/turtle.rst:2742 +#: ../../library/turtle.rst:2726 msgid "Have fun!" msgstr "" -#: ../../library/turtle.rst:2746 +#: ../../library/turtle.rst:2730 msgid "Changes since Python 2.6" msgstr "" -#: ../../library/turtle.rst:2748 +#: ../../library/turtle.rst:2732 msgid "" "The methods :func:`Turtle.tracer `, :func:`Turtle.window_width " "` and :func:`Turtle.window_height ` have been " @@ -2808,14 +2768,14 @@ msgid "" "methods.)" msgstr "" -#: ../../library/turtle.rst:2756 +#: ../../library/turtle.rst:2740 msgid "" "The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:" "`begin_fill` and :func:`end_fill` have changed slightly: now every filling " "process must be completed with an ``end_fill()`` call." msgstr "" -#: ../../library/turtle.rst:2761 +#: ../../library/turtle.rst:2745 msgid "" "A method :func:`Turtle.filling ` has been added. It returns a " "boolean value: ``True`` if a filling process is under way, ``False`` " @@ -2823,11 +2783,11 @@ msgid "" "in Python 2.6." msgstr "" -#: ../../library/turtle.rst:2767 +#: ../../library/turtle.rst:2751 msgid "Changes since Python 3.0" msgstr "" -#: ../../library/turtle.rst:2769 +#: ../../library/turtle.rst:2753 msgid "" "The :class:`Turtle` methods :func:`shearfactor`, :func:`shapetransform` and :" "func:`get_shapepoly` have been added. Thus the full range of regular linear " @@ -2836,28 +2796,28 @@ msgid "" "set the tilt angle. :func:`settiltangle` has been deprecated." msgstr "" -#: ../../library/turtle.rst:2776 +#: ../../library/turtle.rst:2760 msgid "" "The :class:`Screen` method :func:`onkeypress` has been added as a complement " "to :func:`onkey`. As the latter binds actions to the key release event, an " "alias: :func:`onkeyrelease` was also added for it." msgstr "" -#: ../../library/turtle.rst:2780 +#: ../../library/turtle.rst:2764 msgid "" "The method :func:`Screen.mainloop ` has been added, so there is no " "longer a need to use the standalone :func:`mainloop` function when working " "with :class:`Screen` and :class:`Turtle` objects." msgstr "" -#: ../../library/turtle.rst:2784 +#: ../../library/turtle.rst:2768 msgid "" "Two input methods have been added: :func:`Screen.textinput ` and :" "func:`Screen.numinput `. These pop up input dialogs and return " "strings and numbers respectively." msgstr "" -#: ../../library/turtle.rst:2788 +#: ../../library/turtle.rst:2772 msgid "" "Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py` " "have been added to the :file:`Lib/turtledemo` directory." diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index e0ace5f079..685e9a2976 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -987,7 +987,7 @@ msgstr "" #: ../../whatsnew/2.3.rst:966 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/2.3.rst:968 msgid "" @@ -2008,8 +2008,8 @@ msgstr "" #: ../../whatsnew/2.3.rst:1849 msgid "" -"To allocate and free Python objects, use the \"object\" family :c:func:" -"`PyObject_New`, :c:func:`PyObject_NewVar`, and :c:func:`PyObject_Del`." +"To allocate and free Python objects, use the \"object\" family :c:macro:" +"`PyObject_New`, :c:macro:`PyObject_NewVar`, and :c:func:`PyObject_Del`." msgstr "" #: ../../whatsnew/2.3.rst:1852 diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index 64d2ceea80..2dbfd429e4 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-27 00:03+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-" @@ -859,7 +859,7 @@ msgstr "" #: ../../whatsnew/2.4.rst:774 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/2.4.rst:776 msgid "" @@ -1703,7 +1703,7 @@ msgstr "" #: ../../whatsnew/2.4.rst:1494 msgid "" -"The :c:type:`tracebackobject` type has been renamed to :c:type:" +"The :c:type:`!tracebackobject` type has been renamed to :c:type:" "`PyTracebackObject`." msgstr "" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 6c31bbe5f3..17d26a33fd 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -1105,10 +1105,10 @@ msgstr "" #: ../../whatsnew/2.5.rst:957 msgid "" -"A corresponding :attr:`nb_index` slot was added to the C-level :c:type:" -"`PyNumberMethods` structure to let C extensions implement this protocol. " -"``PyNumber_Index(obj)`` can be used in extension code to call the :meth:" -"`__index__` function and retrieve its result." +"A corresponding :c:member:`~PyNumberMethods.nb_index` slot was added to the " +"C-level :c:type:`PyNumberMethods` structure to let C extensions implement " +"this protocol. ``PyNumber_Index(obj)`` can be used in extension code to call " +"the :meth:`__index__` function and retrieve its result." msgstr "" #: ../../whatsnew/2.5.rst:965 @@ -1121,7 +1121,7 @@ msgstr "由 Travis Oliphant 撰寫 PEP 與實作。" #: ../../whatsnew/2.5.rst:974 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/2.5.rst:976 msgid "" @@ -1178,7 +1178,7 @@ msgstr "" #: ../../whatsnew/2.5.rst:1026 msgid "(Implemented by Georg Brandl following a suggestion by Tom Lynn.)" -msgstr "" +msgstr "(由 Georg Brandl 實作、後有 Tom Lynn 提出建議。)" #: ../../whatsnew/2.5.rst:1030 msgid "" @@ -1250,7 +1250,7 @@ msgstr "" #: ../../whatsnew/2.5.rst:1091 msgid "(Implemented by Marc-André Lemburg.)" -msgstr "" +msgstr "(由 Marc-André Lemburg 實作。)" #: ../../whatsnew/2.5.rst:1093 msgid "" @@ -1273,7 +1273,7 @@ msgstr "" #: ../../whatsnew/2.5.rst:1108 msgid "(Implemented by Brett Cannon.)" -msgstr "" +msgstr "(由 Brett Cannon 實作。)" #: ../../whatsnew/2.5.rst:1116 msgid "Interactive Interpreter Changes" @@ -2559,11 +2559,11 @@ msgstr "" msgid "" "Previously these different families all reduced to the platform's :c:func:" "`malloc` and :c:func:`free` functions. This meant it didn't matter if you " -"got things wrong and allocated memory with the :c:func:`PyMem` function but " -"freed it with the :c:func:`PyObject` function. With 2.5's changes to " -"obmalloc, these families now do different things and mismatches will " -"probably result in a segfault. You should carefully test your C extension " -"modules with Python 2.5." +"got things wrong and allocated memory with the ``PyMem`` function but freed " +"it with the ``PyObject`` function. With 2.5's changes to obmalloc, these " +"families now do different things and mismatches will probably result in a " +"segfault. You should carefully test your C extension modules with Python " +"2.5." msgstr "" #: ../../whatsnew/2.5.rst:2159 diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index a241c7b6a9..dde7069360 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -1612,7 +1612,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:1485 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/2.6.rst:1487 msgid "Some smaller changes made to the core Python language are:" @@ -2832,7 +2832,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:2513 msgid "(Contributed by Brett Cannon.)" -msgstr "" +msgstr "(由 Brett Cannon 貢獻。)" #: ../../whatsnew/2.6.rst:2515 msgid "" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 6f410de620..e5008d3cd9 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -675,7 +675,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:672 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/2.7.rst:674 msgid "Some smaller changes made to the core Python language are:" @@ -781,7 +781,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:782 msgid "(Implemented by Mark Dickinson; :issue:`3166`.)" -msgstr "" +msgstr "(由 Mark Dickinson 實作;:issue:`3166`。)" #: ../../whatsnew/2.7.rst:784 msgid "" @@ -2160,7 +2160,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1893 msgid "(Implemented by Antoine Pitrou; :issue:`4444`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 實作;:issue:`4444`。)" #: ../../whatsnew/2.7.rst:1897 msgid "" diff --git a/whatsnew/3.1.po b/whatsnew/3.1.po index 74bd83bd96..eb995e6eb8 100644 --- a/whatsnew/3.1.po +++ b/whatsnew/3.1.po @@ -119,7 +119,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:117 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.1.rst:119 msgid "Some smaller changes made to the core Python language are:" @@ -145,6 +145,8 @@ msgid "" "(Contributed by Fredrik Johansson, Victor Stinner, Raymond Hettinger, and " "Mark Dickinson; :issue:`3439`.)" msgstr "" +"(由 Fredrik Johansson、Victor Stinner、Raymond Hettinger 和 Mark Dickinson " +"貢獻;:issue:`3439`。)" #: ../../whatsnew/3.1.rst:144 msgid "" @@ -159,7 +161,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:153 msgid "(Contributed by Eric Smith; :issue:`5237`.)" -msgstr "" +msgstr "(由 Eric Smith 貢獻;:issue:`5237`。)" #: ../../whatsnew/3.1.rst:155 msgid "" @@ -173,7 +175,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:162 msgid "(Contributed by Georg Brandl; :issue:`5675`.)" -msgstr "" +msgstr "(由 Georg Brandl 貢獻;:issue:`5675`。)" #: ../../whatsnew/3.1.rst:164 msgid "" @@ -192,6 +194,8 @@ msgid "" "(Contributed by Georg Brandl and Mattias Brändström; `appspot issue 53094 " "`_.)" msgstr "" +"(由 Georg Brandl 和 Mattias Brändström 貢獻;`appspot 問題 53094 " +"`_。)" #: ../../whatsnew/3.1.rst:178 msgid "" @@ -201,7 +205,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:184 msgid "(Contributed by Mark Dickinson; :issue:`4707`.)" -msgstr "" +msgstr "(由 Mark Dickinson 貢獻;:issue:`4707`。)" #: ../../whatsnew/3.1.rst:186 msgid "" @@ -258,7 +262,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:222 msgid "(Contributed by Eric Smith and Mark Dickinson; :issue:`1580`)" -msgstr "" +msgstr "(由 Eric Smith 和 Mark Dickinson 貢獻;:issue:`1580`)" #: ../../whatsnew/3.1.rst:225 msgid "New, Improved, and Deprecated Modules" @@ -272,7 +276,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:233 msgid "(Contributed by Raymond Hettinger; :issue:`1696199`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻;:issue:`1696199`。)" #: ../../whatsnew/3.1.rst:235 msgid "" @@ -283,7 +287,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:239 msgid "(Contributed by Guilherme Polo; :issue:`2983`.)" -msgstr "" +msgstr "(由 Guilherme Polo 貢獻;:issue:`2983`。)" #: ../../whatsnew/3.1.rst:241 msgid "" @@ -293,7 +297,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:248 msgid "(Contributed by Antoine Pitrou.)" -msgstr "" +msgstr "(由 Antoine Pitrou 貢獻。)" #: ../../whatsnew/3.1.rst:250 msgid "" @@ -311,7 +315,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:261 msgid "(Contributed by Raymond Hettinger and Mark Dickinson.)" -msgstr "" +msgstr "(由 Raymond Hettinger 和 Mark Dickinso 貢獻。)" #: ../../whatsnew/3.1.rst:263 msgid "" @@ -326,7 +330,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:282 msgid "(Contributed by Raymond Hettinger.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻。)" #: ../../whatsnew/3.1.rst:284 msgid "" @@ -339,7 +343,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:301 msgid "(Contributed by Raymond Hettinger; :issue:`1818`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻;:issue:`1818`。)" #: ../../whatsnew/3.1.rst:303 msgid "" @@ -349,7 +353,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:306 msgid "(Contributed by Gregory Smith.)" -msgstr "" +msgstr "(由 Gregory Smith 貢獻。)" #: ../../whatsnew/3.1.rst:308 msgid "" @@ -361,7 +365,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:316 msgid "(Contributed by Vinay Sajip; :issue:`4384`)." -msgstr "" +msgstr "(由 Vinay Sajip 貢獻;:issue:`4384`)。" #: ../../whatsnew/3.1.rst:318 msgid "" @@ -372,7 +376,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:322 msgid "(Contributed by Andi Vajda; :issue:`4195`.)" -msgstr "" +msgstr "(由 Andi Vajda 貢獻;:issue:`4195`。)" #: ../../whatsnew/3.1.rst:324 msgid "" @@ -382,7 +386,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:327 msgid "(Contributed by Alexander Belopolsky; :issue:`4201`.)" -msgstr "" +msgstr "(由 Alexander Belopolsky 貢獻;:issue:`4201`。)" #: ../../whatsnew/3.1.rst:329 msgid ":class:`functools.partial` objects can now be pickled." @@ -402,7 +406,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:337 msgid "(Contributed by David Laban; :issue:`4739`.)" -msgstr "" +msgstr "(由 David Laban 貢獻;:issue:`4739`。)" #: ../../whatsnew/3.1.rst:339 msgid "" @@ -429,7 +433,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:368 msgid "(Contributed by Benjamin Peterson and Antoine Pitrou.)" -msgstr "" +msgstr "(由 Benjamin Peterson 和 Antoine Pitrou 貢獻。)" #: ../../whatsnew/3.1.rst:370 msgid "" @@ -443,7 +447,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:378 msgid "(Contributed by Ross Light; :issue:`4285`.)" -msgstr "" +msgstr "(由 Ross Light 貢獻;:issue:`4285`。)" #: ../../whatsnew/3.1.rst:380 msgid "The :mod:`nntplib` and :mod:`imaplib` modules now support IPv6." @@ -451,7 +455,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:382 msgid "(Contributed by Derek Morr; :issue:`1655` and :issue:`1664`.)" -msgstr "" +msgstr "(由 Derek Morr 貢獻;:issue:`1655` 和 :issue:`1664`。)" #: ../../whatsnew/3.1.rst:384 msgid "" @@ -478,7 +482,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:406 msgid "" "(Contributed by Alexandre Vassalotti and Antoine Pitrou, :issue:`6137`.)" -msgstr "" +msgstr "(由 Alexandre Vassalotti 和 Antoine Pitrou 貢獻,:issue:`6137`。)" #: ../../whatsnew/3.1.rst:408 msgid "" @@ -491,11 +495,11 @@ msgstr "" #: ../../whatsnew/3.1.rst:414 msgid "(Contributed by Brett Cannon.)" -msgstr "" +msgstr "(由 Brett Cannon 貢獻。)" #: ../../whatsnew/3.1.rst:417 msgid "Optimizations" -msgstr "" +msgstr "最佳化" #: ../../whatsnew/3.1.rst:419 msgid "Major performance enhancements have been added:" @@ -512,7 +516,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:428 msgid "(Contributed by Amaury Forgeot d'Arc and Antoine Pitrou.)" -msgstr "" +msgstr "(由 Amaury Forgeot d'Arc 和 Antoine Pitrou 貢獻。)" #: ../../whatsnew/3.1.rst:430 msgid "" @@ -524,7 +528,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:435 msgid "(Contributed by Antoine Pitrou, :issue:`4688`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 貢獻,:issue:`4688`。)" #: ../../whatsnew/3.1.rst:437 msgid "" @@ -538,7 +542,7 @@ msgstr "" msgid "" "(Contributed by Antoine Pitrou along with a number of other participants, :" "issue:`4753`)." -msgstr "" +msgstr "(由 Antoine Pitrou 和其他一些參與者共同貢獻,:issue:`4753`)。" #: ../../whatsnew/3.1.rst:446 msgid "" @@ -548,7 +552,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:449 msgid "" "(Contributed by Antoine Pitrou and Amaury Forgeot d'Arc, :issue:`4868`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 和 Amaury Forgeot d'Arc 貢獻,:issue:`4868`。)" #: ../../whatsnew/3.1.rst:451 msgid "" @@ -564,6 +568,8 @@ msgid "" "(Contributed by Bob Ippolito and converted to Py3.1 by Antoine Pitrou and " "Benjamin Peterson; :issue:`4136`.)" msgstr "" +"(由 Bob Ippolito 貢獻,由 Antoine Pitrou 和 Benjamin Peterson 轉換為 Py3." +"1;:issue:`4136`。)" #: ../../whatsnew/3.1.rst:460 msgid "" @@ -573,7 +579,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:463 msgid "(Contributed by Jake McGuire and Antoine Pitrou; :issue:`5084`.)" -msgstr "" +msgstr "(由 Jake McGuire 和 Antoine Pitrou 貢獻;:issue:`5084`。)" #: ../../whatsnew/3.1.rst:466 msgid "IDLE" @@ -587,7 +593,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:471 msgid "(Contributed by Roger D. Serwy; :issue:`5150`.)" -msgstr "" +msgstr "(由 Roger D. Serwy 貢獻;:issue:`5150`。)" #: ../../whatsnew/3.1.rst:474 msgid "Build and C API Changes" @@ -620,7 +626,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:497 msgid "(Contributed by Mark Dickinson; :issue:`4258`.)" -msgstr "" +msgstr "(由 Mark Dickinson 貢獻;:issue:`4258`。)" #: ../../whatsnew/3.1.rst:499 msgid "" @@ -630,7 +636,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:502 msgid "(Contributed by Mark Dickinson and Lisandro Dalcrin; :issue:`5175`.)" -msgstr "" +msgstr "(由 Mark Dickinson 和 Lisandro Dalcrin 貢獻;:issue:`5175`。)" #: ../../whatsnew/3.1.rst:504 msgid "" @@ -639,7 +645,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:506 msgid "(Contributed by Mark Dickinson; :issue:`4910`.)" -msgstr "" +msgstr "(由 Mark Dickinson 貢獻;:issue:`4910`。)" #: ../../whatsnew/3.1.rst:508 msgid "" @@ -650,7 +656,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:511 msgid "(Contributed by Mark Dickinson; :issue:`5914`.)" -msgstr "" +msgstr "(由 Mark Dickinson 貢獻;:issue:`5914`。)" #: ../../whatsnew/3.1.rst:513 msgid "" @@ -663,7 +669,7 @@ msgstr "" #: ../../whatsnew/3.1.rst:519 msgid "(Contributed by Larry Hastings; :issue:`5630`.)" -msgstr "" +msgstr "(由 Larry Hastings 貢獻;:issue:`5630`。)" #: ../../whatsnew/3.1.rst:522 msgid "Porting to Python 3.1" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 2fa09db3b8..84c95a3415 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -948,7 +948,7 @@ msgstr "" #: ../../whatsnew/3.10.rst:806 msgid "Other Language Changes" -msgstr "其他語言變化" +msgstr "其他語言更動" #: ../../whatsnew/3.10.rst:808 msgid "" diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index bf152464dd..904feb82e4 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.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: 2023-07-27 00:03+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-" @@ -439,7 +439,7 @@ msgstr "由 Phillip Eby 撰寫 PEP。" #: ../../whatsnew/3.2.rst:436 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.2.rst:438 msgid "Some smaller changes made to the core Python language are:" @@ -488,7 +488,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:498 msgid "(Contributed by Marcin Wojdyr in :issue:`1772833`)." -msgstr "" +msgstr "(由 Marcin Wojdyr 在 :issue:`1772833` 中貢獻)。" #: ../../whatsnew/3.2.rst:500 msgid "" @@ -549,12 +549,12 @@ msgstr "(請見 :issue:`4617`\\ 。)" #: ../../whatsnew/3.2.rst:569 msgid "" -"The internal :c:type:`structsequence` tool now creates subclasses of tuple. " -"This means that C structures like those returned by :func:`os.stat`, :func:" -"`time.gmtime`, and :data:`sys.version_info` now work like a :term:`named " -"tuple` and now work with functions and methods that expect a tuple as an " -"argument. This is a big step forward in making the C structures as flexible " -"as their pure Python counterparts:" +":ref:`Struct sequence types ` are now subclasses of " +"tuple. This means that C structures like those returned by :func:`os.stat`, :" +"func:`time.gmtime`, and :data:`sys.version_info` now work like a :term:" +"`named tuple` and now work with functions and methods that expect a tuple as " +"an argument. This is a big step forward in making the C structures as " +"flexible as their pure Python counterparts:" msgstr "" #: ../../whatsnew/3.2.rst:582 @@ -623,6 +623,8 @@ msgid "" "(Contributed by Daniel Stutzbach in :issue:`9213`, by Alexander Belopolsky " "in :issue:`2690`, and by Nick Coghlan in :issue:`10889`.)" msgstr "" +"(由 Daniel Stutzbach 在 :issue:`9213`、Alexander Belopolsky 在 " +":issue:`2690`、Nick Coghlan 在 :issue:`10889` 中貢獻。)" #: ../../whatsnew/3.2.rst:640 msgid "" @@ -832,7 +834,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:753 msgid "(Contributed by Florent Xicluna and Fredrik Lundh, :issue:`6472`.)" -msgstr "" +msgstr "(由 Florent Xicluna 和 Fredrik Lundh 貢獻,:issue:`6472`。)" #: ../../whatsnew/3.2.rst:756 msgid "functools" @@ -916,7 +918,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:917 ../../whatsnew/3.2.rst:1787 #: ../../whatsnew/3.2.rst:1831 msgid "(Contributed by Raymond Hettinger.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻。)" #: ../../whatsnew/3.2.rst:828 msgid "" @@ -951,7 +953,7 @@ msgstr "" msgid "" "(Contributed by Raymond Hettinger and incorporating design suggestions from " "Mark Dickinson.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻,並結合了 Mark Dickinson 的設計建議。)" #: ../../whatsnew/3.2.rst:861 msgid "collections" @@ -1068,6 +1070,8 @@ msgid "" "(Contributed by Kristján Valur Jónsson with an API review by Jeffrey Yasskin " "in :issue:`8777`.)" msgstr "" +"(在 :issue:`8777` 中由 Kristján Valur Jónsson 貢獻、Jeffrey Yasskin 進行 " +"API 審查。)" #: ../../whatsnew/3.2.rst:987 msgid "datetime and time" @@ -1125,6 +1129,9 @@ msgid "" "`1289118`, :issue:`5094`, :issue:`6641`, :issue:`2706`, :issue:`1777412`, :" "issue:`8013`, and :issue:`10827`.)" msgstr "" +"(由 Alexander Belopolsky 和 Victor Stinner 在 :issue:`1289118`" +"、:issue:`5094`、:issue:`6641`、:issue:`2706`、:issue:`1777412`、:issue:`8013` " +"和 :issue:`10827` 中貢獻。)" #: ../../whatsnew/3.2.rst:1046 msgid "math" @@ -1168,7 +1175,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1094 msgid "(Contributed by Mark Dickinson.)" -msgstr "" +msgstr "(由 Mark Dickinson 貢獻。)" #: ../../whatsnew/3.2.rst:1097 msgid "abc" @@ -1205,7 +1212,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1145 msgid "(Contributed by Antoine Pitrou in :issue:`5506`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`5506` 中貢獻。)" #: ../../whatsnew/3.2.rst:1148 msgid "reprlib" @@ -1229,7 +1236,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1171 msgid "(Contributed by Raymond Hettinger in :issue:`9826` and :issue:`9840`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 在 :issue:`9826` 和 :issue:`9840` 中貢獻。)" #: ../../whatsnew/3.2.rst:1174 msgid "logging" @@ -1369,7 +1376,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1290 msgid "(Contributed by Michael Foord in :issue:`9110`.)" -msgstr "" +msgstr "(由 Michael Foord 在 :issue:`9110` 中貢獻。)" #: ../../whatsnew/3.2.rst:1293 msgid "decimal and fractions" @@ -1433,7 +1440,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1342 msgid "(Contributed by Mark Dickinson and Raymond Hettinger.)" -msgstr "" +msgstr "(由 Mark Dickinson 和 Raymond Hettinger 貢獻。)" #: ../../whatsnew/3.2.rst:1345 msgid "ftp" @@ -1457,6 +1464,8 @@ msgid "" "(Contributed by Tarek Ziadé and Giampaolo Rodolà in :issue:`4972`, and by " "Georg Brandl in :issue:`8046` and :issue:`1286`.)" msgstr "" +"(由 Tarek Ziadé 和 Giampaolo Rodolà 在 :issue:`4972` 中貢獻,由 Georg " +"Brandl 在 :issue:`8046` 和 :issue:`1286` 中貢獻。)" #: ../../whatsnew/3.2.rst:1372 msgid "" @@ -1468,7 +1477,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1376 msgid "(Contributed by Giampaolo Rodolà; :issue:`8806`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 貢獻;:issue:`8806`。)" #: ../../whatsnew/3.2.rst:1379 msgid "popen" @@ -1485,6 +1494,7 @@ msgid "" "(Contributed by Antoine Pitrou and Brian Curtin in :issue:`7461` and :issue:" "`10554`.)" msgstr "" +"(由 Antoine Pitrou 和 Brian Curtin 在 :issue:`7461` 和 :issue:`10554` 中貢獻。)" #: ../../whatsnew/3.2.rst:1388 msgid "select" @@ -1528,6 +1538,9 @@ msgid "" "Aides and Brian Curtin in :issue:`9962`, :issue:`1675951`, :issue:`7471` " "and :issue:`2846`.)" msgstr "" +"(由 Anand B. Pillai 在 :issue:`3488` 中貢獻;由 Antoine Pitrou、Nir Aides " +"和 Brian Curtin 在 :issue:`9962`、:issue:`1675951`、:issue:`7471` 和 :issue: " +"`2846` 中貢獻。)" #: ../../whatsnew/3.2.rst:1430 msgid "" @@ -1600,7 +1613,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1516 msgid "(Implemented by Benjamin Peterson and Georg Brandl.)" -msgstr "" +msgstr "(由 Benjamin Peterson 和 Georg Brandl 實作。)" #: ../../whatsnew/3.2.rst:1519 msgid "os" @@ -1630,7 +1643,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1539 msgid "(Contributed by Victor Stinner.)" -msgstr "" +msgstr "(由 Victor Stinner 貢獻。)" #: ../../whatsnew/3.2.rst:1542 msgid "shutil" @@ -1655,7 +1668,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1553 ../../whatsnew/3.2.rst:1591 msgid "(Contributed by Tarek Ziadé.)" -msgstr "" +msgstr "(由 Tarek Ziadé 貢獻。)" #: ../../whatsnew/3.2.rst:1555 msgid "" @@ -1701,7 +1714,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1606 msgid "(Contributed by R. David Murray and Shashwat Anand; :issue:`8845`.)" -msgstr "" +msgstr "(由 R. David Murray 和 Shashwat Anand 貢獻;:issue:`8845`。)" #: ../../whatsnew/3.2.rst:1609 msgid "html" @@ -1805,6 +1818,8 @@ msgid "" "(Contributed by Antoine Pitrou in :issue:`8850`, :issue:`1589`, :issue:" "`8322`, :issue:`5639`, :issue:`4870`, :issue:`8484`, and :issue:`8321`.)" msgstr "" +"(由 Antoine Pitrou 在 :issue:`8850`、:issue:`1589`、:issue:`8322`、:issue:`5" +"639`、:issue:`4870`、:issue:`8484` 和 :issue:`8321` 中貢獻。)" #: ../../whatsnew/3.2.rst:1677 msgid "nntp" @@ -1829,7 +1844,7 @@ msgstr "" msgid "" "(Contributed by Antoine Pitrou in :issue:`9360` and Andrew Vant in :issue:" "`1926`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`9360` 中和 Andrew Vant 在 :issue:`1926` 中貢獻。)" #: ../../whatsnew/3.2.rst:1691 msgid "certificates" @@ -1859,7 +1874,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1706 msgid "(Contributed by Lorenzo M. Catucci and Antoine Pitrou, :issue:`4471`.)" -msgstr "" +msgstr "(由 Lorenzo M. Catucci 和 Antoine Pitrou 於 :issue:`4471` 貢獻。)" #: ../../whatsnew/3.2.rst:1709 msgid "http.client" @@ -1936,7 +1951,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1758 ../../whatsnew/3.2.rst:1767 #: ../../whatsnew/3.2.rst:1923 msgid "(Contributed by Michael Foord.)" -msgstr "" +msgstr "(由 Michael Foord 貢獻。)" #: ../../whatsnew/3.2.rst:1760 msgid "" @@ -1953,7 +1968,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1777 msgid "(Contributed by Antoine Pitrou, :issue:`9754`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 於 :issue:`9754` 貢獻。)" #: ../../whatsnew/3.2.rst:1779 msgid "" @@ -1992,7 +2007,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1806 msgid "(Contributed by Raymond Hettinger and implemented by Ezio Melotti.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻,由 Ezio Melotti 實作。)" #: ../../whatsnew/3.2.rst:1808 msgid "" @@ -2056,7 +2071,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1824 msgid "(Contributed by Ezio Melotti; :issue:`9424`.)" -msgstr "" +msgstr "(由 Ezio Melotti 貢獻;:issue:`9424`。)" #: ../../whatsnew/3.2.rst:1826 msgid "" @@ -2084,7 +2099,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1845 msgid "(Contributed by Raymond Hettinger; :issue:`9025`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻;:issue:`9025`。)" #: ../../whatsnew/3.2.rst:1848 msgid "poplib" @@ -2100,7 +2115,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1855 msgid "(Contributed by Giampaolo Rodolà; :issue:`8807`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 貢獻;:issue:`8807`。)" #: ../../whatsnew/3.2.rst:1858 msgid "asyncore" @@ -2118,7 +2133,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1867 msgid "(Contributed by Giampaolo Rodolà; :issue:`6706`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 貢獻;:issue:`6706`。)" #: ../../whatsnew/3.2.rst:1870 msgid "tempfile" @@ -2133,7 +2148,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1879 msgid "(Contributed by Neil Schemenauer and Nick Coghlan; :issue:`5178`.)" -msgstr "" +msgstr "(由 Neil Schedulenauer 和 Nick Coghlan 貢獻;:issue:`5178`。)" #: ../../whatsnew/3.2.rst:1882 msgid "inspect" @@ -2148,7 +2163,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1903 msgid "(Contributed by Rodolpho Eckhardt and Nick Coghlan, :issue:`10220`.)" -msgstr "" +msgstr "(由 Rodolfo Eckhardt 和 Nick Coghlan 於 :issue:`10220` 貢獻。)" #: ../../whatsnew/3.2.rst:1905 msgid "" @@ -2171,7 +2186,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1936 msgid "(Contributed by Ron Adam; :issue:`2001`.)" -msgstr "" +msgstr "(由 Ron Adam 貢獻;:issue:`2001`。)" #: ../../whatsnew/3.2.rst:1939 msgid "dis" @@ -2201,7 +2216,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:1994 msgid "(Contributed by Nick Coghlan in :issue:`9147`.)" -msgstr "" +msgstr "(由 Nick Coghlan 在 :issue:`9147` 中貢獻。)" #: ../../whatsnew/3.2.rst:1997 msgid "dbm" @@ -2262,7 +2277,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2044 msgid "(Contributed by Tarek Ziadé in :issue:`6693`.)" -msgstr "" +msgstr "(由 Tarek Ziadé 在 :issue:`6693` 中貢獻。)" #: ../../whatsnew/3.2.rst:2047 msgid "sysconfig" @@ -2369,7 +2384,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2129 msgid "(Contributed by Georg Brandl, Antonio Cuni and Ilya Sandler.)" -msgstr "" +msgstr "(由 Georg Brandl、Antonio Cuni 和 Ilya Sandler 貢獻。)" #: ../../whatsnew/3.2.rst:2132 msgid "configparser" @@ -2563,7 +2578,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2332 msgid "(Contributed by Antoine Pitrou.)" -msgstr "" +msgstr "(由 Antoine Pitrou 貢獻。)" #: ../../whatsnew/3.2.rst:2334 msgid "" @@ -2625,6 +2640,8 @@ msgid "" "(Contributed by Alexandre Vassalotti, Antoine Pitrou and the Unladen Swallow " "team in :issue:`9410` and :issue:`3873`.)" msgstr "" +"(由 Alexandre Vassalotti、Antoine Pitrou 和 Unladen Swallow 團隊在 :issue:`9410` " +"和 :issue:`3873` 中貢獻。)" #: ../../whatsnew/3.2.rst:2373 msgid "" @@ -2653,6 +2670,8 @@ msgid "" "(Contributed by Antoine Pitrou in :issue:`7451` and by Raymond Hettinger and " "Antoine Pitrou in :issue:`10314`.)" msgstr "" +"(由 Antoine Pitrou 在 :issue:`7451` 中貢獻、由 Raymond Hettinger 和 Antoine Pitrou " +"在 :issue:`10314` 中貢獻。)" #: ../../whatsnew/3.2.rst:2390 msgid "" @@ -2663,7 +2682,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2394 msgid "(Contributed by Antoine Pitrou; :issue:`3001`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 貢獻;:issue:`3001`。)" #: ../../whatsnew/3.2.rst:2396 msgid "" @@ -2813,7 +2832,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2488 msgid "(Contributed by Alexander Belopolsky in :issue:`9528`.)" -msgstr "" +msgstr "(由 Alexander Belopolsky 在 :issue:`9528` 中貢獻。)" #: ../../whatsnew/3.2.rst:2490 msgid "" @@ -2824,7 +2843,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2494 msgid "(Contributed by Georg Brandl in :issue:`7962`.)" -msgstr "" +msgstr "(由 Georg Brandl 在 :issue:`7962` 中貢獻。)" #: ../../whatsnew/3.2.rst:2498 msgid "IDLE" @@ -2838,7 +2857,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2503 msgid "(Contributed by Raymond Hettinger; :issue:`5150`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 貢獻;:issue:`5150`。)" #: ../../whatsnew/3.2.rst:2505 msgid "IDLE on Mac OS X now works with both Carbon AquaTk and Cocoa AquaTk." @@ -2847,7 +2866,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2507 msgid "" "(Contributed by Kevin Walzer, Ned Deily, and Ronald Oussoren; :issue:`6075`.)" -msgstr "" +msgstr "(由 Kevin Walzer、Ned Deily 和 Ronald Oussoren 貢獻;:issue:`6075`。)" #: ../../whatsnew/3.2.rst:2510 msgid "Code Repository" @@ -2913,7 +2932,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2547 msgid "(Contributed by Antoine Pitrou; :issue:`9203`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 貢獻;:issue:`9203`。)" #: ../../whatsnew/3.2.rst:2549 msgid "" @@ -2923,7 +2942,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2552 msgid "(Contributed by Amaury Forgeot D'Arc; :issue:`9210`.)" -msgstr "" +msgstr "(由 Amaury Forgeot D'Arc 貢獻;:issue:`9210`。)" #: ../../whatsnew/3.2.rst:2554 msgid "" @@ -2940,6 +2959,7 @@ msgid "" "(Suggested by Raymond Hettinger and implemented by Benjamin Peterson; :issue:" "`9778`.)" msgstr "" +"(由 Raymond Hettinger 建議並由 Benjamin Peterson 實作;:issue:`9778`。)" #: ../../whatsnew/3.2.rst:2564 msgid "" @@ -3142,7 +3162,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2682 msgid "(Contributed by Georg Brandl; :issue:`5675`.)" -msgstr "" +msgstr "(由 Georg Brandl 貢獻;:issue:`5675`。)" #: ../../whatsnew/3.2.rst:2684 msgid "" @@ -3158,6 +3178,8 @@ msgid "" "(Contributed by Georg Brandl and Mattias Brändström; `appspot issue 53094 " "`_.)" msgstr "" +"(由 Georg Brandl 和 Mattias Brändström 貢獻;`appspot 問題 53094 " +"`_。)" #: ../../whatsnew/3.2.rst:2698 msgid "" @@ -3211,7 +3233,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2727 msgid "(Contributed by Antoine Pitrou, :issue:`10711`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 於 :issue:`10711` 貢獻。)" #: ../../whatsnew/3.2.rst:2729 msgid "" @@ -3221,7 +3243,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2732 msgid "(Contributed by Antoine Pitrou, :issue:`10272`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 於 :issue:`10272` 貢獻。)" #: ../../whatsnew/3.2.rst:2734 msgid "" @@ -3240,7 +3262,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:2742 msgid "(Contributed by Giampaolo Rodola in :issue:`6706`.)" -msgstr "" +msgstr "(由 Giampaolo Rodola 在 :issue:`6706` 中貢獻。)" #: ../../whatsnew/3.2.rst:2744 msgid "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 0d5d3b7c0f..f99076c0d2 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: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-29 00:03+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-" @@ -290,7 +290,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:199 msgid "(Contributed by Stefan Krah in :issue:`10181`.)" -msgstr "" +msgstr "(由 Stefan Krah 在 :issue:`10181` 中貢獻。)" #: ../../whatsnew/3.3.rst:203 msgid ":pep:`3118` - Revising the Buffer Protocol" @@ -987,11 +987,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:773 msgid "(Implementation by Brett Cannon)" -msgstr "" +msgstr "(由 Brett Cannon 實作)" #: ../../whatsnew/3.3.rst:777 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.3.rst:779 msgid "Some smaller changes made to the core Python language are:" @@ -1006,7 +1006,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:785 msgid "(Contributed by Ezio Melotti in :issue:`12753`.)" -msgstr "" +msgstr "(由 Ezio Melotti 在 :issue:`12753` 中貢獻。)" #: ../../whatsnew/3.3.rst:787 msgid "Unicode database updated to UCD version 6.1.0" @@ -1028,7 +1028,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:797 msgid "(Contributed by Petri Lehtinen in :issue:`12170`.)" -msgstr "" +msgstr "(由 Petri Lehtinen 在 :issue:`12170` 中貢獻。)" #: ../../whatsnew/3.3.rst:799 msgid "" @@ -1052,7 +1052,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:810 msgid "(Contributed by Antoine Pitrou in :issue:`13748`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`13748` 中貢獻。)" #: ../../whatsnew/3.3.rst:812 msgid "" @@ -1062,7 +1062,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:815 msgid "(Contributed by Filip Gruszczyński in :issue:`13521`.)" -msgstr "" +msgstr "(由 Filip Gruszczyński 在 :issue:`13521` 中貢獻。)" #: ../../whatsnew/3.3.rst:817 msgid "" @@ -1072,7 +1072,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:820 msgid "(Contributed by Benjamin Peterson.)" -msgstr "" +msgstr "(由 Benjamin Peterson 貢獻。)" #: ../../whatsnew/3.3.rst:824 msgid "A Finer-Grained Import Lock" @@ -1097,7 +1097,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:837 msgid "(Contributed by Antoine Pitrou in :issue:`9260`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`9260` 中貢獻。)" #: ../../whatsnew/3.3.rst:841 msgid "Builtin functions and types" @@ -1175,7 +1175,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:897 msgid "(Contributed by Google and Peter Moody in :pep:`3144`.)" -msgstr "" +msgstr "(由 Google 和 Peter Moody 在 :pep:`3144` 中貢獻。)" #: ../../whatsnew/3.3.rst:900 msgid "lzma" @@ -1190,7 +1190,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:906 msgid "(Contributed by Nadeem Vawda and Per Øyvind Karlsen in :issue:`6715`.)" -msgstr "" +msgstr "(由 Nadeem Vawda 和 Per Øyvind Karlsen 在 :issue:`6715` 中貢獻。)" #: ../../whatsnew/3.3.rst:910 msgid "Improved Modules" @@ -1228,7 +1228,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:927 msgid "(Contributed by Darren Dale in :issue:`11610`.)" -msgstr "" +msgstr "(由 Darren Dale 在 :issue:`11610` 中貢獻。)" #: ../../whatsnew/3.3.rst:929 msgid "" @@ -1248,7 +1248,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:939 msgid "(Contributed by Oren Tirosh and Hirokazu Yamamoto in :issue:`1172711`.)" -msgstr "" +msgstr "(由 Oren Tirosh 和 Hirokazu Yamamoto 在 :issue:`1172711` 中貢獻。)" #: ../../whatsnew/3.3.rst:943 msgid "base64" @@ -1297,7 +1297,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:970 msgid "(Contributed by Nadeem Vawda in :issue:`5863`.)" -msgstr "" +msgstr "(由 Nadeem Vawda 在 :issue:`5863` 中貢獻。)" #: ../../whatsnew/3.3.rst:972 msgid "" @@ -1309,7 +1309,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:977 msgid "(Contributed by Nir Aides in :issue:`1625`.)" -msgstr "" +msgstr "(由 Nir Aides 在 :issue:`1625` 中貢獻。)" #: ../../whatsnew/3.3.rst:979 msgid "" @@ -1464,7 +1464,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1074 msgid "(Contributed by Iñigo Serna in :issue:`6755`.)" -msgstr "" +msgstr "(由 Iñigo Serna 在 :issue:`6755` 中貢獻。)" #: ../../whatsnew/3.3.rst:1077 msgid "datetime" @@ -1622,12 +1622,12 @@ msgid ":const:`MAX_PREC`" msgstr ":const:`MAX_PREC`" #: ../../whatsnew/3.3.rst:1141 ../../whatsnew/3.3.rst:1143 -msgid ":const:`425000000`" -msgstr ":const:`425000000`" +msgid "``425000000``" +msgstr "``425000000``" #: ../../whatsnew/3.3.rst:1141 ../../whatsnew/3.3.rst:1143 -msgid ":const:`999999999999999999`" -msgstr ":const:`999999999999999999`" +msgid "``999999999999999999``" +msgstr "``999999999999999999``" #: ../../whatsnew/3.3.rst:1143 msgid ":const:`MAX_EMAX`" @@ -1638,19 +1638,19 @@ msgid ":const:`MIN_EMIN`" msgstr ":const:`MIN_EMIN`" #: ../../whatsnew/3.3.rst:1145 -msgid ":const:`-425000000`" -msgstr ":const:`-425000000`" +msgid "``-425000000``" +msgstr "``-425000000``" #: ../../whatsnew/3.3.rst:1145 -msgid ":const:`-999999999999999999`" -msgstr ":const:`-999999999999999999`" +msgid "``-999999999999999999``" +msgstr "``-999999999999999999``" #: ../../whatsnew/3.3.rst:1148 msgid "" "In the context templates (:class:`~decimal.DefaultContext`, :class:`~decimal." "BasicContext` and :class:`~decimal.ExtendedContext`) the magnitude of :attr:" -"`~decimal.Context.Emax` and :attr:`~decimal.Context.Emin` has changed to :" -"const:`999999`." +"`~decimal.Context.Emax` and :attr:`~decimal.Context.Emin` has changed to " +"``999999``." msgstr "" #: ../../whatsnew/3.3.rst:1153 @@ -2044,7 +2044,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1456 msgid "(Contributed by Sijin Joseph in :issue:`8808`.)" -msgstr "" +msgstr "(由 Sijin Joseph 在 :issue:`8808` 中貢獻。)" #: ../../whatsnew/3.3.rst:1460 msgid "inspect" @@ -2060,7 +2060,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1467 msgid "(Contributed by Meador Inge and Nick Coghlan in :issue:`13062`.)" -msgstr "" +msgstr "(由 Meador Inge 與 Nick Coghlan 在 :issue:`13062` 中貢獻。)" #: ../../whatsnew/3.3.rst:1469 msgid "" @@ -2072,7 +2072,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1474 msgid "(Contributed by Meador Inge in :issue:`15153`.)" -msgstr "" +msgstr "(由 Meador Inge 於 :issue:`15153` 中貢獻。)" #: ../../whatsnew/3.3.rst:1477 msgid "io" @@ -2087,7 +2087,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1483 msgid "(Contributed by David Townshend in :issue:`12760`.)" -msgstr "" +msgstr "(由 David Townshend 於 :issue:`12760` 中貢獻。)" #: ../../whatsnew/3.3.rst:1485 msgid "" @@ -2140,7 +2140,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1518 msgid "(Written by Mark Dickinson in :issue:`11888`.)" -msgstr "" +msgstr "(由 Mark Dickinson 於 :issue:`11888` 中撰寫)" #: ../../whatsnew/3.3.rst:1522 msgid "mmap" @@ -2208,7 +2208,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1572 msgid "(Contributed by Giampaolo Rodolà in :issue:`9795`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 於 :issue:`9795` 中貢獻。)" #: ../../whatsnew/3.3.rst:1576 msgid "os" @@ -2237,6 +2237,7 @@ msgstr "" msgid "" "(Patch submitted by Ross Lagerwall and Giampaolo Rodolà in :issue:`10882`.)" msgstr "" +"(由 Ross Lagerwall 和 Giampaolo Rodolà 於 :issue:`10882` 提交補丁。)" #: ../../whatsnew/3.3.rst:1593 msgid "" @@ -2295,7 +2296,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1630 msgid "(Patch submitted by Giampaolo Rodolà in :issue:`10784`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 於 :issue:`10784` 提交補丁。)" #: ../../whatsnew/3.3.rst:1632 msgid "" @@ -2452,7 +2453,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1713 msgid "(Contributed by Georg Brandl in :issue:`14210`)" -msgstr "" +msgstr "(由 Georg Brandl 在 :issue:`14210` 中貢獻)" #: ../../whatsnew/3.3.rst:1717 msgid "pickle" @@ -2466,7 +2467,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1723 msgid "(Contributed by Richard Oudkerk in :issue:`14166`.)" -msgstr "" +msgstr "(由 Richard Oudkerk 在 :issue:`14166` 中貢獻。)" #: ../../whatsnew/3.3.rst:1727 msgid "pydoc" @@ -2490,7 +2491,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1739 msgid "(Contributed by Serhiy Storchaka in :issue:`3665`.)" -msgstr "" +msgstr "(由 Serhiy Storchaka 在 :issue:`3665` 中貢獻。)" #: ../../whatsnew/3.3.rst:1743 msgid "sched" @@ -2738,7 +2739,7 @@ msgstr ":func:`~socket.socket.recvmsg_into`" msgid "" "(Contributed by David Watson in :issue:`6560`, based on an earlier patch by " "Heiko Wundram)" -msgstr "" +msgstr "(由 David Watson 在 :issue:`6560` 中貢獻,其基於 Heiko Wundram 的早期補丁)" #: ../../whatsnew/3.3.rst:1888 msgid "" @@ -2751,7 +2752,7 @@ msgstr "" msgid "" "(Contributed by Matthias Fuchs, updated by Tiago Gonçalves in :issue:" "`10141`.)" -msgstr "" +msgstr "(在 :issue:`10141` 中由 Matthias Fuchs 貢獻、並由 Tiago Gonçalves 更新。)" #: ../../whatsnew/3.3.rst:1894 msgid "" @@ -2818,7 +2819,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1934 msgid "(Contributed by Victor Stinner in :issue:`12049`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`12049` 中貢獻。)" #: ../../whatsnew/3.3.rst:1936 msgid "" @@ -2897,7 +2898,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1981 msgid "(Contributed by Giampaolo Rodolà in :issue:`14807`.)" -msgstr "" +msgstr "(由 Giampaolo Rodolà 在 :issue:`14807` 中貢獻。)" #: ../../whatsnew/3.3.rst:1985 msgid "struct" @@ -3186,6 +3187,8 @@ msgid "" "(Contributed by Serhiy Storchaka, :issue:`14624`, :issue:`14738` and :issue:" "`15026`.)" msgstr "" +"(由 Serhiy Storchaka 於 :issue:`14624`、:issue:`14738` 和 :issue:`15026` " +"貢獻。)" #: ../../whatsnew/3.3.rst:2170 msgid "Build and C API Changes" @@ -3237,11 +3240,11 @@ msgstr ":c:func:`PyUnicode_ReadChar`, :c:func:`PyUnicode_WriteChar`" #: ../../whatsnew/3.3.rst:2189 msgid "Low-level API:" -msgstr "" +msgstr "低階 API:" #: ../../whatsnew/3.3.rst:2191 msgid ":c:type:`Py_UCS1`, :c:type:`Py_UCS2`, :c:type:`Py_UCS4` types" -msgstr "" +msgstr ":c:type:`Py_UCS1`、:c:type:`Py_UCS2`、:c:type:`Py_UCS4` 型別" #: ../../whatsnew/3.3.rst:2192 msgid ":c:type:`PyASCIIObject` and :c:type:`PyCompactUnicodeObject` structures" @@ -3269,13 +3272,10 @@ msgstr "" #: ../../whatsnew/3.3.rst:2198 msgid "" -":c:macro:`PyUnicode_KIND` with :c:type:`PyUnicode_Kind` enum: :c:data:" +":c:macro:`PyUnicode_KIND` with :c:enum:`PyUnicode_Kind` enum: :c:data:" "`PyUnicode_WCHAR_KIND`, :c:data:`PyUnicode_1BYTE_KIND`, :c:data:" "`PyUnicode_2BYTE_KIND`, :c:data:`PyUnicode_4BYTE_KIND`" msgstr "" -":c:macro:`PyUnicode_KIND` with :c:type:`PyUnicode_Kind` enum: :c:data:" -"`PyUnicode_WCHAR_KIND`, :c:data:`PyUnicode_1BYTE_KIND`, :c:data:" -"`PyUnicode_2BYTE_KIND`, :c:data:`PyUnicode_4BYTE_KIND`" #: ../../whatsnew/3.3.rst:2201 msgid "" @@ -3528,11 +3528,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:2317 msgid "" ":c:func:`PyUnicode_EncodeLatin1`: use :c:func:`PyUnicode_AsLatin1String`" -msgstr "" +msgstr ":c:func:`PyUnicode_EncodeLatin1`:使用 :c:func:`PyUnicode_AsLatin1String`" #: ../../whatsnew/3.3.rst:2318 msgid ":c:func:`PyUnicode_EncodeASCII`: use :c:func:`PyUnicode_AsASCIIString`" -msgstr "" +msgstr ":c:func:`PyUnicode_EncodeASCII`:使用 :c:func:`PyUnicode_AsASCIIString`" #: ../../whatsnew/3.3.rst:2319 msgid ":c:func:`PyUnicode_EncodeCharmap`" @@ -3553,6 +3553,8 @@ msgid "" ":c:func:`PyUnicode_EncodeDecimal`, :c:func:" "`PyUnicode_TransformDecimalToASCII`" msgstr "" +":c:func:`PyUnicode_EncodeDecimal`、:c:func:" +"`PyUnicode_TransformDecimalToASCII`" #: ../../whatsnew/3.3.rst:2328 msgid "Deprecated features" @@ -3825,7 +3827,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:2503 msgid "(implemented in :issue:`14040`.)" -msgstr "" +msgstr "(於 :issue:`14040` 中實作。)" #: ../../whatsnew/3.3.rst:2507 msgid "Command Line Switch Changes" @@ -3839,7 +3841,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:2512 msgid "(:issue:`10998`, contributed by Éric Araujo.)" -msgstr "" +msgstr "(由 Éric Araujo 於 :issue:`10998` 中實作。)" #: ../../whatsnew/3.3.rst:2514 msgid "" @@ -3851,7 +3853,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:2518 msgid "" "(:issue:`11591`, contributed by Carl Meyer with editions by Éric Araujo.)" -msgstr "" +msgstr "(:issue:`11591`,由 Carl Meyer 貢獻並由 Éric Araujo 修訂。)" #: ../../whatsnew/3.3.rst:396 msgid "yield" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 0d3eefaa6b..c4446f704f 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -495,6 +495,7 @@ msgid "" "(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`, :issue:" "`17828` and :issue:`19619`.)" msgstr "" +"(由 Nick Coghlan 在 :issue:`7475`、:issue:`17827`、:issue:`17828` 和 :issue:`19619` 中貢獻。)" #: ../../whatsnew/3.4.rst:381 msgid "PEP 451: A ModuleSpec Type for the Import System" @@ -522,7 +523,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:401 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.4.rst:403 msgid "Some smaller changes made to the core Python language are:" @@ -1017,6 +1018,8 @@ msgid "" "(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver in :issue:" "`11816` and Claudiu Popa in :issue:`17916`.)" msgstr "" +"(由 Nick Coghlan、Ryan Kelly 和 Thomas Kluyver 在 :issue:`11816` 中以及 Claudiu " +"Popa 在 :issue:`17916` 中貢獻。)" #: ../../whatsnew/3.4.rst:770 msgid "" @@ -1297,7 +1300,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:971 msgid "idlelib and IDLE" -msgstr "" +msgstr "idlelib 與 IDLE" #: ../../whatsnew/3.4.rst:973 msgid "" @@ -2447,7 +2450,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:1798 msgid "CPython Implementation Changes" -msgstr "" +msgstr "CPython 實作變更" #: ../../whatsnew/3.4.rst:1804 msgid "PEP 445: Customization of CPython Memory Allocators" @@ -2743,7 +2746,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2012 msgid "Significant Optimizations" -msgstr "" +msgstr "顯著最佳化" #: ../../whatsnew/3.4.rst:2014 msgid "" @@ -2935,7 +2938,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2146 msgid "Deprecated Features" -msgstr "" +msgstr "已棄用功能" #: ../../whatsnew/3.4.rst:2148 msgid "" @@ -2965,7 +2968,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2166 msgid "OS/2 (:issue:`16135`)." -msgstr "" +msgstr "OS/2 (:issue:`16135`)。" #: ../../whatsnew/3.4.rst:2167 msgid "Windows 2000 (changeset e52df05b496a)." @@ -2978,11 +2981,11 @@ msgstr "" #: ../../whatsnew/3.4.rst:2169 msgid "VMS (:issue:`16136`)." -msgstr "" +msgstr "VMS (:issue:`16136`)。" #: ../../whatsnew/3.4.rst:2173 msgid "API and Feature Removals" -msgstr "" +msgstr "API 與功能的移除" #: ../../whatsnew/3.4.rst:2175 msgid "" @@ -3065,7 +3068,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2224 msgid "Code Cleanups" -msgstr "" +msgstr "程式碼的清除" #: ../../whatsnew/3.4.rst:2226 msgid "" @@ -3128,7 +3131,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2267 msgid "Changes in the Python API" -msgstr "" +msgstr "Python API 的變更" #: ../../whatsnew/3.4.rst:2269 msgid "" @@ -3501,7 +3504,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2519 msgid "Changed in 3.4.3" -msgstr "" +msgstr "3.4.3 中的變更" #: ../../whatsnew/3.4.rst:2524 msgid "" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index a079ea1c87..a1af180a8a 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: 2023-07-24 00:03+0000\n" +"POT-Creation-Date: 2023-07-27 00:03+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-" @@ -788,7 +788,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:701 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.5.rst:703 msgid "Some smaller changes made to the core Python language are:" @@ -1115,7 +1115,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:928 msgid "(Contributed by Berker Peksag in :issue:`24064`.)" -msgstr "" +msgstr "(由 Berker Peksag 在 :issue:`24064` 中貢獻。)" #: ../../whatsnew/3.5.rst:930 msgid "" @@ -1227,7 +1227,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1016 msgid "(Contributed by Łukasz Langa in :issue:`18159`.)" -msgstr "" +msgstr "(由 Łukasz Langa 在 :issue:`18159` 中貢獻。)" #: ../../whatsnew/3.5.rst:1020 msgid "contextlib" @@ -1243,7 +1243,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1035 msgid "(Contributed by Berker Peksag in :issue:`22389`.)" -msgstr "" +msgstr "(由 Berker Peksag 在 :issue:`22389` 中貢獻。)" #: ../../whatsnew/3.5.rst:1039 msgid "csv" @@ -1376,7 +1376,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1134 msgid "(Contributed by Ethan Furman in :issue:`21706`.)" -msgstr "" +msgstr "(由 Ethan Furman 在 :issue:`21706` 中貢獻。)" #: ../../whatsnew/3.5.rst:1138 msgid "faulthandler" @@ -1437,7 +1437,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1189 msgid "(Contributed by Raymond Hettinger in :issue:`13742`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 在 :issue:`13742` 中貢獻。)" #: ../../whatsnew/3.5.rst:1193 msgid "http" @@ -1466,7 +1466,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1219 msgid "(Contributed by Martin Panter in :issue:`3566`.)" -msgstr "" +msgstr "(由 Martin Panter 在 :issue:`3566` 中貢獻。)" #: ../../whatsnew/3.5.rst:1223 msgid "idlelib and IDLE" @@ -1571,7 +1571,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1299 msgid "(Contributed by Yury Selivanov in :issue:`24190`.)" -msgstr "" +msgstr "(由 Yury Selivanov 在 :issue:`24190` 中貢獻。)" #: ../../whatsnew/3.5.rst:1301 msgid "" @@ -1631,7 +1631,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1348 msgid "(Contributed by Peter Moody and Antoine Pitrou in :issue:`16531`.)" -msgstr "" +msgstr "(由 Peter Moody 和 Antoine Pitrou 在 :issue:`16531` 中貢獻。)" #: ../../whatsnew/3.5.rst:1350 msgid "" @@ -1642,7 +1642,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1362 msgid "(Contributed by Leon Weber in :issue:`20480`.)" -msgstr "" +msgstr "(由 Leon Weber 在 :issue:`20480` 中貢獻。)" #: ../../whatsnew/3.5.rst:1366 msgid "json" @@ -1689,7 +1689,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1404 msgid "(Contributed by Cédric Krier in :issue:`13918`.)" -msgstr "" +msgstr "(由 Cédric Krier 在 :issue:`13918` 中貢獻。)" #: ../../whatsnew/3.5.rst:1408 msgid "logging" @@ -1705,7 +1705,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1423 msgid "(Contributed by Yury Selivanov in :issue:`20537`.)" -msgstr "" +msgstr "(由 Yury Selivanov 在 :issue:`20537` 中貢獻。)" #: ../../whatsnew/3.5.rst:1425 msgid "" @@ -1840,7 +1840,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1518 msgid "(Contributed by Rafik Draoui and Serhiy Storchaka in :issue:`10395`.)" -msgstr "" +msgstr "(由 Rafik Draoui 和 Serhiy Storchaka 在 :issue:`10395` 中貢獻。)" #: ../../whatsnew/3.5.rst:1522 msgid "pathlib" @@ -1855,7 +1855,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1534 msgid "(Contributed by Vajrasky Kok and Antoine Pitrou in :issue:`19775`.)" -msgstr "" +msgstr "(由 Vajrasky Kok 和 Antoine Pitrou 在 :issue:`19775` 中貢獻。)" #: ../../whatsnew/3.5.rst:1536 msgid "" @@ -1895,7 +1895,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1563 msgid "(Contributed by Christopher Welborn in :issue:`20218`.)" -msgstr "" +msgstr "(由 Christopher Welborn 在 :issue:`20218` 中貢獻。)" #: ../../whatsnew/3.5.rst:1567 msgid "pickle" @@ -1932,7 +1932,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1596 msgid "(Contributed by Serhiy Storchaka in :issue:`9179`.)" -msgstr "" +msgstr "(由 Serhiy Storchaka 在 :issue:`9179` 中貢獻。)" #: ../../whatsnew/3.5.rst:1598 msgid "" @@ -1957,7 +1957,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1619 msgid "(Contributed by Serhiy Storchaka in :issue:`22578`.)" -msgstr "" +msgstr "(由 Serhiy Storchaka 在 :issue:`22578` 中貢獻。)" #: ../../whatsnew/3.5.rst:1623 msgid "readline" @@ -2144,7 +2144,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1753 msgid "(Contributed by Geert Jansen in :issue:`21965`.)" -msgstr "" +msgstr "(由 Geert Jansen 在 :issue:`21965` 中貢獻。)" #: ../../whatsnew/3.5.rst:1755 msgid "" @@ -2175,7 +2175,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:1773 msgid "(Contributed by Benjamin Peterson in :issue:`20188`.)" -msgstr "" +msgstr "(由 Benjamin Peterson 在 :issue:`20188` 中貢獻。)" #: ../../whatsnew/3.5.rst:1775 msgid "" @@ -2762,7 +2762,7 @@ msgstr ":c:func:`PyObject_Calloc`." #: ../../whatsnew/3.5.rst:2181 msgid "(Contributed by Victor Stinner in :issue:`21233`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`21233` 中貢獻。)" #: ../../whatsnew/3.5.rst:2183 msgid "New encoding/decoding helper functions:" @@ -2778,7 +2778,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:2188 msgid "(Contributed by Victor Stinner in :issue:`18395`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`18395` 中貢獻。)" #: ../../whatsnew/3.5.rst:2190 msgid "" @@ -3311,8 +3311,9 @@ msgstr "" #: ../../whatsnew/3.5.rst:2534 msgid "" "As part of the :pep:`492` implementation, the ``tp_reserved`` slot of :c:" -"type:`PyTypeObject` was replaced with a :c:member:`tp_as_async` slot. Refer " -"to :ref:`coro-objects` for new types, structures and functions." +"type:`PyTypeObject` was replaced with a :c:member:`~PyTypeObject." +"tp_as_async` slot. Refer to :ref:`coro-objects` for new types, structures " +"and functions." msgstr "" #: ../../whatsnew/3.5.rst:2541 @@ -3346,7 +3347,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:2558 ../../whatsnew/3.5.rst:2571 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`23404` 中貢獻。)" #: ../../whatsnew/3.5.rst:2564 msgid "Removal of ``make touch`` build target" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 343925f93d..47fd83b3b1 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -840,7 +840,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:738 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.6.rst:740 msgid "Some smaller changes made to the core Python language are:" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 27c812d576..237fc0e345 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-27 00:03+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-" @@ -693,7 +693,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:495 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.7.rst:497 msgid "" @@ -989,7 +989,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:723 msgid "(Contributed by Yury Selivanov in :issue:`32662`.)" -msgstr "" +msgstr "(由 Yury Selivanov 在 :issue:`32662` 中貢獻。)" #: ../../whatsnew/3.7.rst:725 msgid "" @@ -2251,6 +2251,8 @@ msgid "" "(Contributed by Nick Coghlan and Victor Stinner in :issue:`20361`, :issue:" "`32043`, and :issue:`32230`.)" msgstr "" +"(由 Nick Coghlan 和 Victor Stinner 在 :issue:`20361`、:issue:" +"`32043` 和 :issue:`32230` 中貢獻。)" #: ../../whatsnew/3.7.rst:1597 msgid "" @@ -2370,9 +2372,9 @@ msgstr "" #: ../../whatsnew/3.7.rst:1677 msgid "" -"The fields :c:member:`name` and :c:member:`doc` of structures :c:type:" +"The fields :c:member:`!name` and :c:member:`!doc` of structures :c:type:" "`PyMemberDef`, :c:type:`PyGetSetDef`, :c:type:`PyStructSequence_Field`, :c:" -"type:`PyStructSequence_Desc`, and :c:type:`wrapperbase` are now of type " +"type:`PyStructSequence_Desc`, and :c:struct:`wrapperbase` are now of type " "``const char *`` rather of ``char *``. (Contributed by Serhiy Storchaka in :" "issue:`28761`.)" msgstr "" @@ -3322,7 +3324,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:2362 msgid "(Contributed by Serhiy Storchaka in :issue:`25054` and :issue:`32308`.)" -msgstr "" +msgstr "(由 Serhiy Storchaka 在 :issue:`25054` 和 :issue:`32308` 中貢獻。)" #: ../../whatsnew/3.7.rst:2364 msgid "" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index aedd30d9c2..56b4ba2e38 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: 2023-07-22 00:04+0000\n" +"POT-Creation-Date: 2023-07-29 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-" @@ -95,7 +95,7 @@ msgstr "完整敘述請見 :pep:`572`\\ 。" #: ../../whatsnew/3.8.rst:116 msgid "(Contributed by Emily Morehouse in :issue:`35224`.)" -msgstr "" +msgstr "(由 Emily Morehouse 在 :issue:`35224` 中貢獻。)" #: ../../whatsnew/3.8.rst:120 msgid "Positional-only parameters" @@ -167,7 +167,7 @@ msgstr "完整敘述請見 :pep:`570`\\ 。" #: ../../whatsnew/3.8.rst:187 msgid "(Contributed by Pablo Galindo in :issue:`36540`.)" -msgstr "" +msgstr "(由 Pablo Galindo 在 :issue:`36540` 中貢獻。)" #: ../../whatsnew/3.8.rst:193 msgid "Parallel filesystem cache for compiled bytecode files" @@ -189,7 +189,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:205 msgid "(Contributed by Carl Meyer in :issue:`33499`.)" -msgstr "" +msgstr "(由 Carl Meyer 在 :issue:`33499` 中貢獻。)" #: ../../whatsnew/3.8.rst:209 msgid "Debug build uses the same ABI as release build" @@ -281,7 +281,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:280 msgid "(Contributed by Eric V. Smith and Larry Hastings in :issue:`36817`.)" -msgstr "" +msgstr "(由 Eric V. Smith 和 Larry Hastings 在 :issue:`36817` 中貢獻。)" #: ../../whatsnew/3.8.rst:284 msgid "PEP 578: Python Runtime Audit Hooks" @@ -460,7 +460,7 @@ msgstr "完整敘述請見 :pep:`587`\\ 。" #: ../../whatsnew/3.8.rst:348 msgid "(Contributed by Victor Stinner in :issue:`36763`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`36763` 中貢獻。)" #: ../../whatsnew/3.8.rst:352 msgid "PEP 590: Vectorcall: a fast calling protocol for CPython" @@ -488,6 +488,7 @@ msgid "" "(Contributed by Jeroen Demeyer, Mark Shannon and Petr Viktorin in :issue:" "`36974`.)" msgstr "" +"(由 Jeroen Demeyer、Mark Shannon 和 Petr Viktorin 在 :issue:`36974` 中貢獻。)" #: ../../whatsnew/3.8.rst:369 msgid "Pickle protocol 5 with out-of-band data buffers" @@ -514,11 +515,11 @@ msgstr "完整敘述請見 :pep:`574`\\ 。" #: ../../whatsnew/3.8.rst:382 msgid "(Contributed by Antoine Pitrou in :issue:`36785`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`36785` 中貢獻。)" #: ../../whatsnew/3.8.rst:386 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.8.rst:388 msgid "" @@ -554,7 +555,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:414 msgid "" "(Contributed by Jonathan Eunice and Serhiy Storchaka in :issue:`30688`.)" -msgstr "" +msgstr "(由 Jonathan Eunice 和 Serhiy Storchaka 在 :issue:`30688` 中貢獻。)" #: ../../whatsnew/3.8.rst:416 msgid "" @@ -580,7 +581,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:437 msgid "(Contributed by David Cuthbert and Jordan Chapman in :issue:`32117`.)" -msgstr "" +msgstr "(由 David Cuthbert 和 Jordan Chapman 在 :issue:`32117` 中貢獻。)" #: ../../whatsnew/3.8.rst:439 msgid "" @@ -628,7 +629,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:479 msgid "(Contributed by Victor Stinner in :issue:`37032`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`37032` 中貢獻。)" #: ../../whatsnew/3.8.rst:481 msgid "" @@ -651,7 +652,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:505 msgid "(Contributed by Mark Dickinson in :issue:`36027`.)" -msgstr "" +msgstr "(由 Mark Dickinson 在 :issue:`36027` 中貢獻。)" #: ../../whatsnew/3.8.rst:507 msgid "" @@ -668,7 +669,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:532 msgid "(Contributed by Jörn Heissler in :issue:`35224`.)" -msgstr "" +msgstr "(由 Jörn Heissler 在 :issue:`35224` 中貢獻。)" #: ../../whatsnew/3.8.rst:534 msgid "" @@ -694,7 +695,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:564 msgid "(Contributed by Barry Warsaw and Jason R. Coombs in :issue:`34632`.)" -msgstr "" +msgstr "(由 Barry Warsaw 和 Jason R. Coombs 在 :issue:`34632` 中貢獻。)" #: ../../whatsnew/3.8.rst:568 msgid "Improved Modules" @@ -719,7 +720,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:580 msgid "(Contributed by Ivan Levkivskyi in :issue:`33416`.)" -msgstr "" +msgstr "(由 Ivan Levkivskyi 在 :issue:`33416` 中貢獻。)" #: ../../whatsnew/3.8.rst:582 msgid "The :func:`ast.parse` function has some new flags:" @@ -746,7 +747,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:594 msgid "(Contributed by Guido van Rossum in :issue:`35766`.)" -msgstr "" +msgstr "(由 Guido van Rossum 在 :issue:`35766` 中貢獻。)" #: ../../whatsnew/3.8.rst:598 msgid "asyncio" @@ -774,7 +775,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:632 msgid "(Contributed by Yury Selivanov in :issue:`32314`.)" -msgstr "" +msgstr "(由 Yury Selivanov 在 :issue:`32314` 中貢獻。)" #: ../../whatsnew/3.8.rst:634 msgid "" @@ -786,7 +787,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:649 msgid "(Contributed by Yury Selivanov in :issue:`37028`.)" -msgstr "" +msgstr "(由 Yury Selivanov 在 :issue:`37028` 中貢獻。)" #: ../../whatsnew/3.8.rst:651 ../../whatsnew/3.8.rst:1970 msgid "" @@ -883,7 +884,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:722 msgid "(Contributed by Scott Sanderson in :issue:`29235`.)" -msgstr "" +msgstr "(由 Scott Sanderson 在 :issue:`29235` 中貢獻。)" #: ../../whatsnew/3.8.rst:726 msgid "csv" @@ -948,7 +949,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:777 msgid "(Contributed by Raymond Hettinger in :issue:`36772`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 在 :issue:`36772` 中貢獻。)" #: ../../whatsnew/3.8.rst:779 msgid "" @@ -958,7 +959,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:793 msgid "(Contributed by Carl Meyer in :issue:`21145`)" -msgstr "" +msgstr "(由 Carl Meyer 在 :issue:`21145` 中貢獻)" #: ../../whatsnew/3.8.rst:796 msgid "" @@ -969,7 +970,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:818 msgid "(Contributed by Ethan Smith in :issue:`32380`)" -msgstr "" +msgstr "(由 Ethan Smith 在 :issue:`32380` 中貢獻)" #: ../../whatsnew/3.8.rst:821 msgid "gc" @@ -1091,7 +1092,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:904 msgid "(Contributed by Raymond Hettinger in :issue:`36326`.)" -msgstr "" +msgstr "(由 Raymond Hettinger 在 :issue:`36326` 中貢獻。)" #: ../../whatsnew/3.8.rst:908 msgid "io" @@ -1117,7 +1118,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:926 msgid "(Contributed by Lisa Roach in :issue:`34659`.)" -msgstr "" +msgstr "(由 Lisa Roach 在 :issue:`34659` 中貢獻。)" #: ../../whatsnew/3.8.rst:930 msgid "json.tool" @@ -1181,7 +1182,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:973 msgid "(Contributed by Pablo Galindo in :issue:`35606`.)" -msgstr "" +msgstr "(由 Pablo Galindo 在 :issue:`35606` 中貢獻。)" #: ../../whatsnew/3.8.rst:975 msgid "" @@ -1194,6 +1195,8 @@ msgid "" "(Contributed by Yash Aggarwal, Keller Fuchs, Serhiy Storchaka, and Raymond " "Hettinger in :issue:`37128`, :issue:`37178`, and :issue:`35431`.)" msgstr "" +"(由 Yash Aggarwal、Keller Fuchs、Serhiy Storchaka 和 Raymond Hettinger 在 " +":issue:`37128`、:issue:`37178` 和 :issue:`35431` 中貢獻。)" #: ../../whatsnew/3.8.rst:985 msgid "" @@ -1205,7 +1208,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:997 msgid "(Contributed by Mark Dickinson in :issue:`36887`.)" -msgstr "" +msgstr "(由 Mark Dickinson 在 :issue:`36887` 中貢獻。)" #: ../../whatsnew/3.8.rst:999 msgid "" @@ -1283,7 +1286,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1048 ../../whatsnew/3.8.rst:1073 msgid "(Contributed by Steve Dower in :issue:`37834`.)" -msgstr "" +msgstr "(由 Steve Dower 在 :issue:`37834` 中貢獻。)" #: ../../whatsnew/3.8.rst:1052 msgid "os.path" @@ -1390,7 +1393,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1137 msgid "(Contributed by Rémi Lapeyre in :issue:`30670`.)" -msgstr "" +msgstr "(由 Rémi Lapeyre 在 :issue:`30670` 中貢獻。)" #: ../../whatsnew/3.8.rst:1141 msgid "py_compile" @@ -1801,7 +1804,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1469 msgid "(Contributed by Joannah Nanjekye and Victor Stinner in :issue:`35537`.)" -msgstr "" +msgstr "(由 Joannah Nanjekye 和 Victor Stinner 在 :issue:`35537` 中貢獻。)" #: ../../whatsnew/3.8.rst:1471 msgid "" @@ -1962,6 +1965,8 @@ msgid "" "(Contributed by Victor Stinner in :issue:`35134` and :issue:`35081`, work " "initiated by Eric Snow in Python 3.7.)" msgstr "" +"(由 Victor Stinner 在 :issue:`35134` 和 :issue:`35081` 中貢獻,該工作由 Eric Snow 在 Python " +"3.7 中發起。)" #: ../../whatsnew/3.8.rst:1570 msgid "" @@ -1990,7 +1995,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1580 msgid "(Contributed by Victor Stinner in :issue:`35059`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`35059` 中貢獻。)" #: ../../whatsnew/3.8.rst:1582 msgid "" @@ -2028,7 +2033,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1604 msgid "(Contributed by Antoine Pitrou in :issue:`32430`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`32430` 中貢獻。)" #: ../../whatsnew/3.8.rst:1606 msgid "" @@ -2406,9 +2411,8 @@ msgid "" "terminate the current thread if called while the interpreter is finalizing, " "making them consistent with :c:func:`PyEval_RestoreThread`, :c:func:" "`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`. If this behavior is " -"not desired, guard the call by checking :c:func:`_Py_IsFinalizing` or :c:" -"func:`sys.is_finalizing`. (Contributed by Joannah Nanjekye in :issue:" -"`36475`.)" +"not desired, guard the call by checking :c:func:`_Py_IsFinalizing` or :func:" +"`sys.is_finalizing`. (Contributed by Joannah Nanjekye in :issue:`36475`.)" msgstr "" #: ../../whatsnew/3.8.rst:1858 @@ -2693,7 +2697,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:2062 msgid "" "Remove :c:macro:`Py_INCREF` on the type object after allocating an instance " -"- if any. This may happen after calling :c:func:`PyObject_New`, :c:func:" +"- if any. This may happen after calling :c:macro:`PyObject_New`, :c:macro:" "`PyObject_NewVar`, :c:func:`PyObject_GC_New`, :c:func:`PyObject_GC_NewVar`, " "or any other custom allocator that uses :c:func:`PyObject_Init` or :c:func:" "`PyObject_INIT`." @@ -2712,7 +2716,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:2102 msgid "(Contributed by Eddie Elizondo in :issue:`35810`.)" -msgstr "" +msgstr "(由 Eddie Elizondo 在 :issue:`35810` 中貢獻。)" #: ../../whatsnew/3.8.rst:2104 msgid "" @@ -2722,7 +2726,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:2113 msgid "(Contributed by Zackery Spytz in :issue:`33407`.)" -msgstr "" +msgstr "(由 Zackery Spytz 在 :issue:`33407` 中貢獻。)" #: ../../whatsnew/3.8.rst:2115 msgid "" @@ -2736,7 +2740,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:2122 msgid "(Contributed by Antoine Pitrou in :issue:`32388`.)" -msgstr "" +msgstr "(由 Antoine Pitrou 在 :issue:`32388` 中貢獻。)" #: ../../whatsnew/3.8.rst:2124 msgid "" @@ -2764,7 +2768,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:2143 msgid "(Contributed by Steve Dower in :issue:`37351`.)" -msgstr "" +msgstr "(由 Steve Dower 在 :issue:`37351` 中貢獻。)" #: ../../whatsnew/3.8.rst:2147 msgid "CPython bytecode changes" @@ -2792,6 +2796,8 @@ msgid "" "(Contributed by Mark Shannon, Antoine Pitrou and Serhiy Storchaka in :issue:" "`17611`.)" msgstr "" +"(由 Mark Shannon、Antoine Pitrou 和 Serhiy Storchaka 在 :issue:`17611` " +"中貢獻。)" #: ../../whatsnew/3.8.rst:2164 msgid "" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 5a561bed6e..2dd9c0da9f 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.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: 2023-07-29 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-" @@ -304,7 +304,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:217 msgid "Other Language Changes" -msgstr "" +msgstr "其他語言更動" #: ../../whatsnew/3.9.rst:219 msgid "" @@ -1127,7 +1127,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:757 msgid "(Contributed by Serhiy Storchaka in :issue:`32856`.)" -msgstr "" +msgstr "(由 Serhiy Storchaka 在 :issue:`32856` 中貢獻。)" #: ../../whatsnew/3.9.rst:759 msgid "" @@ -1304,7 +1304,7 @@ msgstr ":func:`~binascii.rlecode_hqx`\\ 、\\ :func:`~binascii.rledecode_hqx`" #: ../../whatsnew/3.9.rst:911 msgid "(Contributed by Victor Stinner in :issue:`39353`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 :issue:`39353` 中貢獻。)" #: ../../whatsnew/3.9.rst:913 msgid "" @@ -1743,7 +1743,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1222 msgid "(Contributed by Mark Shannon in :issue:`39156`.)" -msgstr "" +msgstr "(由 Mark Shannon 在 :issue:`39156` 中貢獻。)" #: ../../whatsnew/3.9.rst:1226 msgid "Build Changes" @@ -1875,7 +1875,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1314 ../../whatsnew/3.9.rst:1448 msgid "(Contributed by Victor Stinner in :issue:`38644` and :issue:`39542`.)" -msgstr "" +msgstr "(由 Victor Stinner 在 38644 和 39542 中貢獻。)" #: ../../whatsnew/3.9.rst:1316 msgid "" @@ -1993,10 +1993,10 @@ msgstr "" #: ../../whatsnew/3.9.rst:1391 msgid "" -"The :c:func:`PyObject_NEW` macro becomes an alias to the :c:func:" +"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 " -"alias to the :c:func:`PyObject_NewVar` macro. They no longer access directly " -"the :c:member:`PyTypeObject.tp_basicsize` member." +"alias to the :c:macro:`PyObject_NewVar` macro. They no longer access " +"directly the :c:member:`PyTypeObject.tp_basicsize` member." msgstr "" #: ../../whatsnew/3.9.rst:1396 @@ -2243,7 +2243,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1519 msgid "(Contributed by Yurii Karabas in :issue:`42345`.)" -msgstr "" +msgstr "(由 Yurii Karabas 在 :issue:`42345` 中貢獻。)" #: ../../whatsnew/3.9.rst:1522 msgid "macOS 11.0 (Big Sur) and Apple Silicon Mac support" @@ -2263,7 +2263,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1533 msgid "(Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.)" -msgstr "" +msgstr "(由 Ronald Oussoren 和 Lawrence D'Anna 在 :issue:`41100` 中貢獻。)" #: ../../whatsnew/3.9.rst:1536 msgid "Notable changes in Python 3.9.2"