1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2022, Python Software Foundation
1
+ # Copyright (C) 2001-2023, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
3
#
5
4
# Translators:
6
5
# Leon H., 2017
6
+ # Matt Wang <mattwang44@gmail.com>, 2023
7
7
msgid ""
8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.11\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2022-05-21 17:35+0000\n "
12
- "PO-Revision-Date : 2017-09-22 18:26+0000 \n "
13
- "Last-Translator : Leon H. \n "
12
+ "PO-Revision-Date : 2023-07-01 14:19+0800 \n "
13
+ "Last-Translator : Matt Wang <mattwang44@gmail.com> \n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
15
15
"tw)\n "
16
16
"Language : zh_TW\n "
17
17
"MIME-Version : 1.0\n "
18
18
"Content-Type : text/plain; charset=UTF-8\n "
19
19
"Content-Transfer-Encoding : 8bit\n "
20
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Poedit 3.3.2\n "
21
22
22
23
#: ../../c-api/refcounting.rst:8
23
24
msgid "Reference Counting"
@@ -27,52 +28,64 @@ msgstr "參照計數"
27
28
msgid ""
28
29
"The macros in this section are used for managing reference counts of Python "
29
30
"objects."
30
- msgstr ""
31
+ msgstr "本節中的巨集用於管理 Python 物件的參照計數。 "
31
32
32
33
#: ../../c-api/refcounting.rst:16
33
34
msgid "Increment the reference count for object *o*."
34
- msgstr ""
35
+ msgstr "增加物件 *o* 的參照計數。 "
35
36
36
37
#: ../../c-api/refcounting.rst:18
37
38
msgid ""
38
39
"This function is usually used to convert a :term:`borrowed reference` to a :"
39
40
"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be "
40
41
"used to create a new :term:`strong reference`."
41
42
msgstr ""
43
+ "此函式通常用於將\\ :term:`借用參照 <borrowed reference>`\\ 原地 (in-place) 轉"
44
+ "換為\\ :term:`強參照 <strong reference>`。:c:func:`Py_NewRef` 函式可用於建立"
45
+ "新的\\ :term:`強參照 <strong reference>`。"
42
46
43
47
#: ../../c-api/refcounting.rst:22
44
48
msgid ""
45
49
"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, "
46
50
"use :c:func:`Py_XINCREF`."
47
51
msgstr ""
52
+ "該物件不能為 ``NULL``;如果你不確定它不是 ``NULL``,請使用 :c:func:"
53
+ "`Py_XINCREF`。"
48
54
49
55
#: ../../c-api/refcounting.rst:28
50
56
msgid ""
51
57
"Increment the reference count for object *o*. The object may be ``NULL``, "
52
58
"in which case the macro has no effect."
53
59
msgstr ""
60
+ "增加物件 *o* 的參照計數。該物件可能是 ``NULL``,在這種情況下巨集不起作用。"
54
61
55
62
#: ../../c-api/refcounting.rst:31
56
63
msgid "See also :c:func:`Py_XNewRef`."
57
- msgstr "另請見 :c:func:`Py_XNewRef`\\ 。"
64
+ msgstr "另請見 :c:func:`Py_XNewRef`。"
58
65
59
66
#: ../../c-api/refcounting.rst:36
60
67
msgid ""
61
68
"Create a new :term:`strong reference` to an object: increment the reference "
62
69
"count of the object *o* and return the object *o*."
63
70
msgstr ""
71
+ "建立對物件的新\\ :term:`強參照 <strong reference>`:增加物件 *o* 的參照計數並"
72
+ "回傳物件 *o*。"
64
73
65
74
#: ../../c-api/refcounting.rst:39
66
75
msgid ""
67
76
"When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` "
68
77
"should be called on it to decrement the object reference count."
69
78
msgstr ""
79
+ "當不再需要\\ :term:`強參照 <strong reference>`\\ 時,應對其呼叫 :c:func:"
80
+ "`Py_DECREF` 以減少物件參照計數。"
70
81
71
82
#: ../../c-api/refcounting.rst:42
72
83
msgid ""
73
84
"The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be "
74
85
"``NULL``."
75
86
msgstr ""
87
+ "物件 *o* 不能為 ``NULL``;如果 *o* 可以為 ``NULL``,則使用 :c:func:"
88
+ "`Py_XNewRef`。"
76
89
77
90
#: ../../c-api/refcounting.rst:45
78
91
msgid "For example::"
@@ -94,33 +107,38 @@ msgstr "另請參閱 :c:func:`Py_INCREF`\\ 。"
94
107
95
108
#: ../../c-api/refcounting.rst:61
96
109
msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL."
97
- msgstr ""
110
+ msgstr "與 :c:func:`Py_NewRef` 類似,但物件 *o* 可以為 NULL。 "
98
111
99
112
#: ../../c-api/refcounting.rst:63
100
113
msgid "If the object *o* is ``NULL``, the function just returns ``NULL``."
101
- msgstr ""
114
+ msgstr "如果物件 *o* 為 ``NULL``,則該函式僅回傳 ``NULL``。 "
102
115
103
116
#: ../../c-api/refcounting.rst:70
104
117
msgid "Decrement the reference count for object *o*."
105
- msgstr ""
118
+ msgstr "減少物件 *o* 的參照計數。 "
106
119
107
120
#: ../../c-api/refcounting.rst:72
108
121
msgid ""
109
122
"If the reference count reaches zero, the object's type's deallocation "
110
123
"function (which must not be ``NULL``) is invoked."
111
124
msgstr ""
125
+ "如果參照計數達到零,則調用物件之型別的釋放函式 (deallocation function)(不得"
126
+ "為 ``NULL``)。"
112
127
113
128
#: ../../c-api/refcounting.rst:75
114
129
msgid ""
115
130
"This function is usually used to delete a :term:`strong reference` before "
116
131
"exiting its scope."
117
132
msgstr ""
133
+ "此函式通常用於在退出作用域之前刪除\\ :term:`強參照 <strong reference>`。"
118
134
119
135
#: ../../c-api/refcounting.rst:78
120
136
msgid ""
121
137
"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, "
122
138
"use :c:func:`Py_XDECREF`."
123
139
msgstr ""
140
+ "該物件不能為 ``NULL``;如果你不確定它不是 ``NULL``,請改用 :c:func:"
141
+ "`Py_XDECREF`。"
124
142
125
143
#: ../../c-api/refcounting.rst:83
126
144
msgid ""
@@ -134,13 +152,21 @@ msgid ""
134
152
"update the list data structure, and then call :c:func:`Py_DECREF` for the "
135
153
"temporary variable."
136
154
msgstr ""
155
+ "釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`__del__` 方"
156
+ "法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但執行的程式碼可以自"
157
+ "由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之前,可從全域"
158
+ "變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程式碼應將已刪"
159
+ "除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數呼叫 :c:func:"
160
+ "`Py_DECREF`。"
137
161
138
162
#: ../../c-api/refcounting.rst:95
139
163
msgid ""
140
164
"Decrement the reference count for object *o*. The object may be ``NULL``, "
141
165
"in which case the macro has no effect; otherwise the effect is the same as "
142
166
"for :c:func:`Py_DECREF`, and the same warning applies."
143
167
msgstr ""
168
+ "減少物件 *o* 的參照計數。該物件可能是 ``NULL``,在這種情況下巨集不起作用;否"
169
+ "則效果與 :c:func:`Py_DECREF` 相同,且使得應用了相同的警告。"
144
170
145
171
#: ../../c-api/refcounting.rst:102
146
172
msgid ""
@@ -151,28 +177,40 @@ msgid ""
151
177
"object passed because the macro carefully uses a temporary variable and sets "
152
178
"the argument to ``NULL`` before decrementing its reference count."
153
179
msgstr ""
180
+ "減少物件 *o* 的參照計數。該物件可能是 ``NULL``,在這種情況下巨集不起作用;否"
181
+ "則,效果與 :c:func:`Py_DECREF` 相同,只是引數也設定為 ``NULL``。:c:func:"
182
+ "`Py_DECREF` 的警告不適用於傳遞的物件,因為巨集在遞減其參照計數之前小心地使用臨"
183
+ "時變數並將參數設定為 ``NULL``。"
154
184
155
185
#: ../../c-api/refcounting.rst:109
156
186
msgid ""
157
187
"It is a good idea to use this macro whenever decrementing the reference "
158
188
"count of an object that might be traversed during garbage collection."
159
189
msgstr ""
190
+ "每當要減少垃圾收集期間可能被遍歷到之物件的參照計數時,使用此巨集是個好主意。"
160
191
161
192
#: ../../c-api/refcounting.rst:114
162
193
msgid ""
163
194
"Increment the reference count for object *o*. A function version of :c:func:"
164
195
"`Py_XINCREF`. It can be used for runtime dynamic embedding of Python."
165
196
msgstr ""
197
+ "增加物件 *o* 的參照計數。:c:func:`Py_XINCREF` 的函式版本。它可用於 Python 的"
198
+ "執行環境動態嵌入。"
166
199
167
200
#: ../../c-api/refcounting.rst:120
168
201
msgid ""
169
202
"Decrement the reference count for object *o*. A function version of :c:func:"
170
203
"`Py_XDECREF`. It can be used for runtime dynamic embedding of Python."
171
204
msgstr ""
205
+ "減少物件 *o* 的參照計數。:c:func:`Py_XDECREF` 的函式版本。它可用於 Python 的"
206
+ "執行環境動態嵌入。"
172
207
173
208
#: ../../c-api/refcounting.rst:124
174
209
msgid ""
175
210
"The following functions or macros are only for use within the interpreter "
176
211
"core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:"
177
212
"`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`."
178
213
msgstr ""
214
+ "以下函式或巨集僅在直譯器核心內使用::c:func:`_Py_Dealloc`、:c:func:"
215
+ "`_Py_ForgetReference`、:c:func:`_Py_NewReference` 以及全域變數 :c:data:"
216
+ "`_Py_RefTotal`。"
0 commit comments