3
3
# This file is distributed under the same license as the Python package.
4
4
#
5
5
# Translators:
6
+ # Liang-Bo Wang <[email protected] >, 2016
7
+ # Matt Wang <[email protected] >, 2021
8
+ #
6
9
msgid ""
7
10
msgstr ""
8
11
"Project-Id-Version : Python 3.11\n "
9
12
"Report-Msgid-Bugs-To : \n "
10
13
"POT-Creation-Date : 2022-07-06 00:17+0000\n "
11
- "PO-Revision-Date : 2016-01-31 07:06+0000 \n "
12
- "
Last-Translator :
Liang-Bo Wang <[email protected] >\n"
14
+ "PO-Revision-Date : 2021-12-16 15:39+0800 \n "
15
+ "
Last-Translator :
Matt Wang <[email protected] >\n"
13
16
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
17
"tw)\n "
15
18
"Language : zh_TW\n "
16
19
"MIME-Version : 1.0\n "
17
20
"Content-Type : text/plain; charset=UTF-8\n "
18
21
"Content-Transfer-Encoding : 8bit\n "
19
22
"Plural-Forms : nplurals=1; plural=0;\n "
23
+ "X-Generator : Poedit 3.0.1\n "
20
24
21
25
#: ../../c-api/allocation.rst:6
22
26
msgid "Allocating Objects on the Heap"
23
- msgstr ""
27
+ msgstr "在 heap 上分配物件 "
24
28
25
29
#: ../../c-api/allocation.rst:17
26
30
msgid ""
@@ -30,12 +34,17 @@ msgid ""
30
34
"detector's set of observed objects. Other fields of the object are not "
31
35
"affected."
32
36
msgstr ""
37
+ "用它的型別和初始參照來初始化新分配物件 *op*\\ 。已初始化的物件會被回傳。如果 "
38
+ "*type* 表示了該物件參與迴圈垃圾檢查器,則將其新增到檢查器的觀察物件集合中。物"
39
+ "件的其他欄位不受影響。"
33
40
34
41
#: ../../c-api/allocation.rst:26
35
42
msgid ""
36
43
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
37
44
"length information for a variable-size object."
38
45
msgstr ""
46
+ "它會做到 :c:func:`PyObject_Init` 的所有功能,並且會初始化一個大小可變物件的長"
47
+ "度資訊。"
39
48
40
49
#: ../../c-api/allocation.rst:32
41
50
msgid ""
@@ -45,6 +54,10 @@ msgid ""
45
54
"the memory allocation is determined from the :c:member:`~PyTypeObject."
46
55
"tp_basicsize` field of the type object."
47
56
msgstr ""
57
+ "使用 C 結構型別 *TYPE* 和 Python 型別物件 *type* 分配一個新的 Python 物件。未"
58
+ "在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;物件的參照計數將為"
59
+ "一。記憶體分配大小由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位"
60
+ "來指定。"
48
61
49
62
#: ../../c-api/allocation.rst:41
50
63
msgid ""
@@ -57,6 +70,12 @@ msgid ""
57
70
"Embedding the array of fields into the same allocation decreases the number "
58
71
"of allocations, improving the memory management efficiency."
59
72
msgstr ""
73
+ "使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *type* 分配一個新的 Python 物"
74
+ "件。未在該 Python 物件標頭中定義的欄位不會被初始化。記憶體空間預留了 *TYPE* "
75
+ "結構大小再加上 *type* 物件中 :c:member:`~PyTypeObject.tp_itemsize` 欄位提供"
76
+ "的 *size* 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大小的物件是"
77
+ "很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配的次數,這提"
78
+ "高了記憶體管理的效率。"
60
79
61
80
#: ../../c-api/allocation.rst:53
62
81
msgid ""
@@ -66,18 +85,24 @@ msgid ""
66
85
"fields of the object should not be accessed after this call as the memory is "
67
86
"no longer a valid Python object."
68
87
msgstr ""
88
+ "釋放由 :c:func:`PyObject_New` 或者 :c:func:`PyObject_NewVar` 分配給物件的記憶"
89
+ "體。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` handler "
90
+ "中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的記憶體已"
91
+ "不再是一個有效的 Python 物件。"
69
92
70
93
#: ../../c-api/allocation.rst:62
71
94
msgid ""
72
95
"Object which is visible in Python as ``None``. This should only be accessed "
73
96
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
74
97
"object."
75
98
msgstr ""
99
+ "這個物件像是 Python 中的 ``None``\\ 。它只應該透過 :c:macro:`Py_None` 巨集來"
100
+ "存取,該巨集的拿到指向該物件的指標。"
76
101
77
102
#: ../../c-api/allocation.rst:69
78
103
msgid ":c:func:`PyModule_Create`"
79
104
msgstr ":c:func:`PyModule_Create`"
80
105
81
106
#: ../../c-api/allocation.rst:70
82
107
msgid "To allocate and create extension modules."
83
- msgstr ""
108
+ msgstr "分配記憶體和建立擴充模組。 "
0 commit comments