@@ -10,7 +10,7 @@ msgid ""
1010msgstr ""
1111"Project-Id-Version : Python 3.12\n "
1212"Report-Msgid-Bugs-To : \n "
13- "POT-Creation-Date : 2022 -07-06 00:17 +0000\n "
13+ "POT-Creation-Date : 2023 -07-29 00:03 +0000\n "
1414"PO-Revision-Date : 2022-10-16 15:35+0800\n "
1515"Last-Translator : Matt Wang <mattwang44@gmail.com>\n "
1616"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -49,48 +49,49 @@ msgstr ""
4949#: ../../c-api/allocation.rst:32
5050msgid ""
5151"Allocate a new Python object using the C structure type *TYPE* and the "
52- "Python type object *type*. Fields not defined by the Python object header "
53- "are not initialized; the object's reference count will be one. The size of "
54- "the memory allocation is determined from the :c:member:`~PyTypeObject. "
55- "tp_basicsize` field of the type object."
52+ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
53+ "Python object header are not initialized; the object's reference count will "
54+ "be one. The size of the memory allocation is determined from the :c:member:"
55+ "`~PyTypeObject. tp_basicsize` field of the type object."
5656msgstr ""
57- "使用 C 結構型別 *TYPE* 和 Python 型別物件 *type* 分配一個新的 Python 物件。未 "
58- "在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;物件的參照計數將為 "
59- "一 。記憶體分配大小由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位 "
60- "來指定 。"
57+ "使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配 "
58+ "一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始 "
59+ "化;物件的參照計數將為一 。記憶體分配大小由 type 物件的 :c:member:"
60+ "`~PyTypeObject.tp_basicsize` 欄位來指定 。"
6161
62- #: ../../c-api/allocation.rst:41
62+ #: ../../c-api/allocation.rst:42
6363msgid ""
6464"Allocate a new Python object using the C structure type *TYPE* and the "
65- "Python type object *type*. Fields not defined by the Python object header "
66- "are not initialized. The allocated memory allows for the *TYPE* structure "
67- "plus *size* fields of the size given by the :c:member:`~PyTypeObject."
68- "tp_itemsize` field of *type*. This is useful for implementing objects like "
69- "tuples, which are able to determine their size at construction time. "
70- "Embedding the array of fields into the same allocation decreases the number "
71- "of allocations, improving the memory management efficiency."
65+ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
66+ "Python object header are not initialized. The allocated memory allows for "
67+ "the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
68+ "by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
69+ "useful for implementing objects like tuples, which are able to determine "
70+ "their size at construction time. Embedding the array of fields into the "
71+ "same allocation decreases the number of allocations, improving the memory "
72+ "management efficiency."
7273msgstr ""
73- "使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *type* 分配一個新的 Python 物 "
74- "件 。未在該 Python 物件標頭中定義的欄位不會被初始化。記憶體空間預留了 *TYPE* "
75- "結構大小再加上 *type * 物件中 :c:member:`~PyTypeObject.tp_itemsize` 欄位提供 "
76- "的 *size* 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大小的物件是 "
77- "很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配的次數,這提 "
78- "高了記憶體管理的效率 。"
74+ "使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *typeobj* (``PyTypeObject*``) "
75+ "分配一個新的 Python 物件 。未在該 Python 物件標頭中定義的欄位不會被初始化。記 "
76+ "憶體空間預留了 *TYPE* 結構大小再加上 *typeobj * 物件中 :c:member:"
77+ "`~PyTypeObject.tp_itemsize` 欄位提供的 *size* (``Py_ssize_t``) 欄位的值。這對 "
78+ "於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌 "
79+ "入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率 。"
7980
80- #: ../../c-api/allocation.rst:53
81+ #: ../../c-api/allocation.rst:56
8182msgid ""
82- "Releases memory allocated to an object using :c:func :`PyObject_New` or :c:"
83- "func :`PyObject_NewVar`. This is normally called from the :c:member:"
83+ "Releases memory allocated to an object using :c:macro :`PyObject_New` or :c:"
84+ "macro :`PyObject_NewVar`. This is normally called from the :c:member:"
8485"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The "
8586"fields of the object should not be accessed after this call as the memory is "
8687"no longer a valid Python object."
8788msgstr ""
88- "釋放由 :c:func :`PyObject_New` 或者 :c:func :`PyObject_NewVar` 分配給物件的記憶 "
89- "體 。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` handler "
90- "中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的記憶體已 "
91- "不再是一個有效的 Python 物件。"
89+ "釋放由 :c:macro :`PyObject_New` 或者 :c:macro :`PyObject_NewVar` 分配給物件的記 "
90+ "憶體 。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` "
91+ "handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的 "
92+ "記憶體已不再是一個有效的 Python 物件。"
9293
93- #: ../../c-api/allocation.rst:62
94+ #: ../../c-api/allocation.rst:65
9495msgid ""
9596"Object which is visible in Python as ``None``. This should only be accessed "
9697"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -99,10 +100,10 @@ msgstr ""
99100"這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存"
100101"取,該巨集的拿到指向該物件的指標。"
101102
102- #: ../../c-api/allocation.rst:69
103+ #: ../../c-api/allocation.rst:72
103104msgid ":c:func:`PyModule_Create`"
104105msgstr ":c:func:`PyModule_Create`"
105106
106- #: ../../c-api/allocation.rst:70
107+ #: ../../c-api/allocation.rst:73
107108msgid "To allocate and create extension modules."
108109msgstr "分配記憶體和建立擴充模組。"
0 commit comments