1
- # Copyright (C) 2001-2025, Python Software Foundation
1
+ # Copyright (C) 2001 Python Software Foundation
2
2
# This file is distributed under the same license as the Python package.
3
3
#
4
4
# Translators:
7
7
#
8
8
msgid ""
9
9
msgstr ""
10
- "Project-Id-Version : Python 3.13 \n "
10
+ "Project-Id-Version : Python 3.14 \n "
11
11
"Report-Msgid-Bugs-To : \n "
12
12
"POT-Creation-Date : 2025-09-08 15:25+0800\n "
13
13
"PO-Revision-Date : 2022-10-16 15:35+0800\n "
@@ -64,7 +64,6 @@ msgid ""
64
64
msgstr ""
65
65
66
66
#: ../../c-api/allocation.rst:48
67
- #, fuzzy
68
67
msgid ""
69
68
"Allocates a new Python object using the C structure type *TYPE* and the "
70
69
"Python type object *typeobj* (``PyTypeObject*``) by "
@@ -73,9 +72,9 @@ msgid ""
73
72
"object (i.e. its reference count will be one)."
74
73
msgstr ""
75
74
"使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配"
76
- "一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始 "
77
- "化;呼叫者會擁有那個對於物件的唯一參照(物件的參照計數為一)。記憶體分配大小 "
78
- "由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位來指定 。"
75
+ "一個新的 Python 物件。它會呼叫 :c:func:`PyObject_Malloc` 來分配記憶體, "
76
+ "並且會像 :c:func:`PyObject_Init` 一樣初始化它。呼叫者會擁有該物件的唯一參照 "
77
+ "(也就是它的參照計數會是 1) 。"
79
78
80
79
#: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107
81
80
msgid ""
@@ -97,16 +96,18 @@ msgid ""
97
96
"(:meth:`~object.__new__`), or :c:member:`~PyTypeObject.tp_init` "
98
97
"(:meth:`~object.__init__`)."
99
98
msgstr ""
99
+ "這個巨集不會呼叫 :c:member:`~PyTypeObject.tp_alloc`、:c:member:`~PyTypeObject.tp_new` "
100
+ "(:meth:`~object.__new__`)、或 :c:member:`~PyTypeObject.tp_init` "
101
+ "(:meth:`~object.__init__`)。"
100
102
101
103
#: ../../c-api/allocation.rst:65
102
- #, fuzzy
103
104
msgid ""
104
105
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
105
106
"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` "
106
107
"instead."
107
108
msgstr ""
108
- "注意,如果 *typeobj* 有 :c:macro:`Py_TPFLAGS_HAVE_GC` 設定,則此函式不適用。 "
109
- "對於這種物件, 請改用 :c:func :`PyObject_GC_New`。"
109
+ "這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 "
110
+ ":c:macro:`Py_TPFLAGS_HAVE_GC` 的物件; 請改用 :c:macro :`PyObject_GC_New`。"
110
111
111
112
#: ../../c-api/allocation.rst:68
112
113
msgid ""
@@ -130,27 +131,27 @@ msgstr ""
130
131
131
132
#: ../../c-api/allocation.rst:83
132
133
msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
133
- msgstr ""
134
+ msgstr "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type); "
134
135
135
136
#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
136
137
msgid ":c:func:`PyObject_Free`"
137
- msgstr ""
138
+ msgstr ":c:func:`PyObject_Free` "
138
139
139
140
#: ../../c-api/allocation.rst:88
140
141
msgid ":c:macro:`PyObject_GC_New`"
141
- msgstr ""
142
+ msgstr ":c:macro:`PyObject_GC_New` "
142
143
143
144
#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139
144
145
msgid ":c:func:`PyType_GenericAlloc`"
145
- msgstr ""
146
+ msgstr ":c:func:`PyType_GenericAlloc` "
146
147
147
148
#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140
148
149
msgid ":c:member:`~PyTypeObject.tp_alloc`"
149
- msgstr ""
150
+ msgstr ":c:member:`~PyTypeObject.tp_alloc` "
150
151
151
152
#: ../../c-api/allocation.rst:95
152
153
msgid "Like :c:macro:`PyObject_New` except:"
153
- msgstr ""
154
+ msgstr "和 :c:macro:`PyObject_New` 類似,但有以下差異: "
154
155
155
156
#: ../../c-api/allocation.rst:97
156
157
msgid ""
@@ -161,7 +162,7 @@ msgstr ""
161
162
162
163
#: ../../c-api/allocation.rst:100
163
164
msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
164
- msgstr ""
165
+ msgstr "記憶體會像 :c:func:`PyObject_InitVar` 一樣被初始化。 "
165
166
166
167
#: ../../c-api/allocation.rst:102
167
168
msgid ""
@@ -172,14 +173,13 @@ msgid ""
172
173
msgstr ""
173
174
174
175
#: ../../c-api/allocation.rst:114
175
- #, fuzzy
176
176
msgid ""
177
177
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
178
178
"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` "
179
179
"instead."
180
180
msgstr ""
181
- "注意,如果 *typeobj* 有 :c:macro:`Py_TPFLAGS_HAVE_GC` 設定,則此函式不適用。 "
182
- "對於這種物件, 請改用 :c:func :`PyObject_GC_NewVar`。"
181
+ "這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 "
182
+ ":c:macro:`Py_TPFLAGS_HAVE_GC` 的物件; 請改用 :c:macro :`PyObject_GC_NewVar`。"
183
183
184
184
#: ../../c-api/allocation.rst:118
185
185
msgid ""
@@ -191,14 +191,15 @@ msgstr ""
191
191
msgid ""
192
192
"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
193
193
msgstr ""
194
+ "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
194
195
195
196
#: ../../c-api/allocation.rst:138
196
197
msgid ":c:macro:`PyObject_GC_NewVar`"
197
- msgstr ""
198
+ msgstr ":c:macro:`PyObject_GC_NewVar` "
198
199
199
200
#: ../../c-api/allocation.rst:145
200
201
msgid "Same as :c:func:`PyObject_Free`."
201
- msgstr ""
202
+ msgstr "和 :c:func:`PyObject_Free` 相同。 "
202
203
203
204
#: ../../c-api/allocation.rst:149
204
205
msgid ""
@@ -216,42 +217,3 @@ msgstr ":ref:`moduleobjects`"
216
217
#: ../../c-api/allocation.rst:157
217
218
msgid "To allocate and create extension modules."
218
219
msgstr "分配記憶體和建立擴充模組。"
219
-
220
- #~ msgid ""
221
- #~ "Initialize a newly allocated object *op* with its type and initial "
222
- #~ "reference. Returns the initialized object. Other fields of the object "
223
- #~ "are not affected."
224
- #~ msgstr ""
225
- #~ "用它的型別和初始參照來初始化新分配物件 *op*。已初始化的物件會被回傳。物件"
226
- #~ "的其他欄位不受影響。"
227
-
228
- #~ msgid ""
229
- #~ "Allocate a new Python object using the C structure type *TYPE* and the "
230
- #~ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by "
231
- #~ "the Python object header are not initialized. The allocated memory "
232
- #~ "allows for the *TYPE* structure plus *size* (``Py_ssize_t``) fields of "
233
- #~ "the size given by the :c:member:`~PyTypeObject.tp_itemsize` field of "
234
- #~ "*typeobj*. This is useful for implementing objects like tuples, which "
235
- #~ "are able to determine their size at construction time. Embedding the "
236
- #~ "array of fields into the same allocation decreases the number of "
237
- #~ "allocations, improving the memory management efficiency."
238
- #~ msgstr ""
239
- #~ "使用 C 的結構型別 *TYPE* 和 Python 的型別物件 *typeobj* "
240
- #~ "(``PyTypeObject*``) 分配一個新的 Python 物件。未在該 Python 物件標頭中定義"
241
- #~ "的欄位不會被初始化。記憶體空間預留了 *TYPE* 結構大小再加上 *typeobj* 物件"
242
- #~ "中 :c:member:`~PyTypeObject.tp_itemsize` 欄位提供的 *size* "
243
- #~ "(``Py_ssize_t``) 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大"
244
- #~ "小的物件是很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配"
245
- #~ "的次數,這提高了記憶體管理的效率。"
246
-
247
- #~ msgid ""
248
- #~ "Releases memory allocated to an object using :c:macro:`PyObject_New` "
249
- #~ "or :c:macro:`PyObject_NewVar`. This is normally called from "
250
- #~ "the :c:member:`~PyTypeObject.tp_dealloc` handler specified in the "
251
- #~ "object's type. The fields of the object should not be accessed after "
252
- #~ "this call as the memory is no longer a valid Python object."
253
- #~ msgstr ""
254
- #~ "釋放由 :c:macro:`PyObject_New` 或者 :c:macro:`PyObject_NewVar` 分配給物件"
255
- #~ "的記憶體。這通常是在物件型別所指定的 :c:member:`~PyTypeObject.tp_dealloc` "
256
- #~ "handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配"
257
- #~ "的記憶體已不再是一個有效的 Python 物件。"
0 commit comments