7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.13\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2024-09-24 07:20 +0000\n "
10
+ "POT-Creation-Date : 2024-10-09 00:13 +0000\n "
11
11
"PO-Revision-Date : 2015-12-09 17:51+0000\n "
12
12
"
Last-Translator :
Liang-Bo Wang <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -48,180 +48,185 @@ msgid ""
48
48
msgstr ""
49
49
50
50
#: ../../c-api/code.rst:35
51
- msgid "Return the number of free variables in a code object."
51
+ msgid ""
52
+ "Return the number of :term:`free (closure) variables <closure variable>` in "
53
+ "a code object."
52
54
msgstr ""
53
55
54
- #: ../../c-api/code.rst:39
55
- msgid "Return the position of the first free variable in a code object."
56
+ #: ../../c-api/code.rst:40
57
+ msgid ""
58
+ "Return the position of the first :term:`free (closure) variable <closure "
59
+ "variable>` in a code object."
56
60
msgstr ""
57
61
58
- #: ../../c-api/code.rst:43
62
+ #: ../../c-api/code.rst:45
59
63
msgid ""
60
64
"Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`. The "
61
65
"old name is deprecated, but will remain available until the signature "
62
66
"changes again."
63
67
msgstr ""
64
68
65
- #: ../../c-api/code.rst:49
69
+ #: ../../c-api/code.rst:51
66
70
msgid ""
67
71
"Return a new code object. If you need a dummy code object to create a "
68
72
"frame, use :c:func:`PyCode_NewEmpty` instead."
69
73
msgstr ""
70
74
71
- #: ../../c-api/code.rst:52
75
+ #: ../../c-api/code.rst:54
72
76
msgid ""
73
77
"Since the definition of the bytecode changes often, calling :c:func:"
74
78
"`PyUnstable_Code_New` directly can bind you to a precise Python version."
75
79
msgstr ""
76
80
77
- #: ../../c-api/code.rst:55
81
+ #: ../../c-api/code.rst:57
78
82
msgid ""
79
83
"The many arguments of this function are inter-dependent in complex ways, "
80
84
"meaning that subtle changes to values are likely to result in incorrect "
81
85
"execution or VM crashes. Use this function only with extreme care."
82
86
msgstr ""
83
87
84
- #: ../../c-api/code.rst:59
88
+ #: ../../c-api/code.rst:61
85
89
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
86
90
msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
87
91
88
- #: ../../c-api/code.rst:66
92
+ #: ../../c-api/code.rst:68
89
93
msgid ""
90
94
"Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name "
91
95
"is deprecated, but will remain available until the signature changes again."
92
96
msgstr ""
93
97
94
- #: ../../c-api/code.rst:72
98
+ #: ../../c-api/code.rst:74
95
99
msgid ""
96
100
"Similar to :c:func:`PyUnstable_Code_New`, but with an extra "
97
101
"\" posonlyargcount\" for positional-only arguments. The same caveats that "
98
102
"apply to ``PyUnstable_Code_New`` also apply to this function."
99
103
msgstr ""
100
104
101
- #: ../../c-api/code.rst:77
105
+ #: ../../c-api/code.rst:79
102
106
msgid "as ``PyCode_NewWithPosOnlyArgs``"
103
107
msgstr ""
104
108
105
- #: ../../c-api/code.rst:79
109
+ #: ../../c-api/code.rst:81
106
110
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
107
111
msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
108
112
109
- #: ../../c-api/code.rst:84
113
+ #: ../../c-api/code.rst:86
110
114
msgid ""
111
115
"Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is "
112
116
"deprecated, but will remain available until the signature changes again."
113
117
msgstr ""
114
118
115
- #: ../../c-api/code.rst:90
119
+ #: ../../c-api/code.rst:92
116
120
msgid ""
117
121
"Return a new empty code object with the specified filename, function name, "
118
122
"and first line number. The resulting code object will raise an ``Exception`` "
119
123
"if executed."
120
124
msgstr ""
121
125
122
- #: ../../c-api/code.rst:96
126
+ #: ../../c-api/code.rst:98
123
127
msgid ""
124
128
"Return the line number of the instruction that occurs on or before "
125
129
"``byte_offset`` and ends after it. If you just need the line number of a "
126
130
"frame, use :c:func:`PyFrame_GetLineNumber` instead."
127
131
msgstr ""
128
132
129
- #: ../../c-api/code.rst:99
133
+ #: ../../c-api/code.rst:101
130
134
msgid ""
131
135
"For efficiently iterating over the line numbers in a code object, use :pep:"
132
136
"`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`."
133
137
msgstr ""
134
138
135
- #: ../../c-api/code.rst:104
139
+ #: ../../c-api/code.rst:106
136
140
msgid ""
137
141
"Sets the passed ``int`` pointers to the source code line and column numbers "
138
142
"for the instruction at ``byte_offset``. Sets the value to ``0`` when "
139
143
"information is not available for any particular element."
140
144
msgstr ""
141
145
142
- #: ../../c-api/code.rst:108
146
+ #: ../../c-api/code.rst:110
143
147
msgid "Returns ``1`` if the function succeeds and 0 otherwise."
144
148
msgstr ""
145
149
146
- #: ../../c-api/code.rst:114
150
+ #: ../../c-api/code.rst:116
147
151
msgid ""
148
152
"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
149
153
"reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
150
154
"object. On error, ``NULL`` is returned and an exception is raised."
151
155
msgstr ""
152
156
153
- #: ../../c-api/code.rst:119
157
+ #: ../../c-api/code.rst:121
154
158
msgid ""
155
159
"This ``PyBytesObject`` may be created on-demand by the interpreter and does "
156
160
"not necessarily represent the bytecode actually executed by CPython. The "
157
161
"primary use case for this function is debuggers and profilers."
158
162
msgstr ""
159
163
160
- #: ../../c-api/code.rst:127
164
+ #: ../../c-api/code.rst:129
161
165
msgid ""
162
166
"Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
163
167
"reference to a :c:type:`PyTupleObject` containing the names of the local "
164
168
"variables. On error, ``NULL`` is returned and an exception is raised."
165
169
msgstr ""
166
170
167
- #: ../../c-api/code.rst:136
171
+ #: ../../c-api/code.rst:138
168
172
msgid ""
169
173
"Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
170
174
"reference to a :c:type:`PyTupleObject` containing the names of the local "
171
175
"variables that are referenced by nested functions. On error, ``NULL`` is "
172
176
"returned and an exception is raised."
173
177
msgstr ""
174
178
175
- #: ../../c-api/code.rst:145
179
+ #: ../../c-api/code.rst:147
176
180
msgid ""
177
181
"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
178
- "reference to a :c:type:`PyTupleObject` containing the names of the free "
179
- "variables. On error, ``NULL`` is returned and an exception is raised."
182
+ "reference to a :c:type:`PyTupleObject` containing the names of the :term:"
183
+ "`free (closure) variables <closure variable>`. On error, ``NULL`` is "
184
+ "returned and an exception is raised."
180
185
msgstr ""
181
186
182
- #: ../../c-api/code.rst:153
187
+ #: ../../c-api/code.rst:156
183
188
msgid ""
184
189
"Register *callback* as a code object watcher for the current interpreter. "
185
190
"Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case "
186
191
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
187
192
"exception."
188
193
msgstr ""
189
194
190
- #: ../../c-api/code.rst:162
195
+ #: ../../c-api/code.rst:165
191
196
msgid ""
192
197
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
193
198
"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or "
194
199
"``-1`` and set an exception on error (e.g. if the given *watcher_id* was "
195
200
"never registered.)"
196
201
msgstr ""
197
202
198
- #: ../../c-api/code.rst:171
203
+ #: ../../c-api/code.rst:174
199
204
msgid ""
200
205
"Enumeration of possible code object watcher events: - "
201
206
"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``"
202
207
msgstr ""
203
208
204
- #: ../../c-api/code.rst:179
209
+ #: ../../c-api/code.rst:182
205
210
msgid "Type of a code object watcher callback function."
206
211
msgstr ""
207
212
208
- #: ../../c-api/code.rst:181
213
+ #: ../../c-api/code.rst:184
209
214
msgid ""
210
215
"If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after "
211
216
"`co` has been fully initialized. Otherwise, the callback is invoked before "
212
217
"the destruction of *co* takes place, so the prior state of *co* can be "
213
218
"inspected."
214
219
msgstr ""
215
220
216
- #: ../../c-api/code.rst:186
221
+ #: ../../c-api/code.rst:189
217
222
msgid ""
218
223
"If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback "
219
224
"to the about-to-be-destroyed code object will resurrect it and prevent it "
220
225
"from being freed at this time. When the resurrected object is destroyed "
221
226
"later, any watcher callbacks active at that time will be called again."
222
227
msgstr ""
223
228
224
- #: ../../c-api/code.rst:191
229
+ #: ../../c-api/code.rst:194
225
230
msgid ""
226
231
"Users of this API should not rely on internal runtime implementation "
227
232
"details. Such details may include, but are not limited to, the exact order "
@@ -231,14 +236,14 @@ msgid ""
231
236
"the Python code being executed."
232
237
msgstr ""
233
238
234
- #: ../../c-api/code.rst:198
239
+ #: ../../c-api/code.rst:201
235
240
msgid ""
236
241
"If the callback sets an exception, it must return ``-1``; this exception "
237
242
"will be printed as an unraisable exception using :c:func:"
238
243
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
239
244
msgstr ""
240
245
241
- #: ../../c-api/code.rst:202
246
+ #: ../../c-api/code.rst:205
242
247
msgid ""
243
248
"There may already be a pending exception set on entry to the callback. In "
244
249
"this case, the callback should return ``0`` with the same exception still "
@@ -247,85 +252,85 @@ msgid ""
247
252
"it before returning."
248
253
msgstr ""
249
254
250
- #: ../../c-api/code.rst:212
255
+ #: ../../c-api/code.rst:215
251
256
msgid "Extra information"
252
257
msgstr ""
253
258
254
- #: ../../c-api/code.rst:214
259
+ #: ../../c-api/code.rst:217
255
260
msgid ""
256
261
"To support low-level extensions to frame evaluation, such as external just-"
257
262
"in-time compilers, it is possible to attach arbitrary extra data to code "
258
263
"objects."
259
264
msgstr ""
260
265
261
- #: ../../c-api/code.rst:218
266
+ #: ../../c-api/code.rst:221
262
267
msgid ""
263
268
"These functions are part of the unstable C API tier: this functionality is a "
264
269
"CPython implementation detail, and the API may change without deprecation "
265
270
"warnings."
266
271
msgstr ""
267
272
268
- #: ../../c-api/code.rst:224
273
+ #: ../../c-api/code.rst:227
269
274
msgid "Return a new an opaque index value used to adding data to code objects."
270
275
msgstr ""
271
276
272
- #: ../../c-api/code.rst:226
277
+ #: ../../c-api/code.rst:229
273
278
msgid ""
274
279
"You generally call this function once (per interpreter) and use the result "
275
280
"with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on "
276
281
"individual code objects."
277
282
msgstr ""
278
283
279
- #: ../../c-api/code.rst:230
284
+ #: ../../c-api/code.rst:233
280
285
msgid ""
281
286
"If *free* is not ``NULL``: when a code object is deallocated, *free* will be "
282
287
"called on non-``NULL`` data stored under the new index. Use :c:func:"
283
288
"`Py_DecRef` when storing :c:type:`PyObject`."
284
289
msgstr ""
285
290
286
- #: ../../c-api/code.rst:236
291
+ #: ../../c-api/code.rst:239
287
292
msgid "as ``_PyEval_RequestCodeExtraIndex``"
288
293
msgstr ""
289
294
290
- #: ../../c-api/code.rst:240
295
+ #: ../../c-api/code.rst:243
291
296
msgid ""
292
297
"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name "
293
298
"is deprecated, but will be available until the API changes."
294
299
msgstr ""
295
300
296
- #: ../../c-api/code.rst:246
301
+ #: ../../c-api/code.rst:249
297
302
msgid ""
298
303
"Set *extra* to the extra data stored under the given index. Return 0 on "
299
304
"success. Set an exception and return -1 on failure."
300
305
msgstr ""
301
306
302
- #: ../../c-api/code.rst:249
307
+ #: ../../c-api/code.rst:252
303
308
msgid ""
304
309
"If no data was set under the index, set *extra* to ``NULL`` and return 0 "
305
310
"without setting an exception."
306
311
msgstr ""
307
312
308
- #: ../../c-api/code.rst:254
313
+ #: ../../c-api/code.rst:257
309
314
msgid "as ``_PyCode_GetExtra``"
310
315
msgstr ""
311
316
312
- #: ../../c-api/code.rst:258
317
+ #: ../../c-api/code.rst:261
313
318
msgid ""
314
319
"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, "
315
320
"but will be available until the API changes."
316
321
msgstr ""
317
322
318
- #: ../../c-api/code.rst:264
323
+ #: ../../c-api/code.rst:267
319
324
msgid ""
320
325
"Set the extra data stored under the given index to *extra*. Return 0 on "
321
326
"success. Set an exception and return -1 on failure."
322
327
msgstr ""
323
328
324
- #: ../../c-api/code.rst:269
329
+ #: ../../c-api/code.rst:272
325
330
msgid "as ``_PyCode_SetExtra``"
326
331
msgstr ""
327
332
328
- #: ../../c-api/code.rst:273
333
+ #: ../../c-api/code.rst:276
329
334
msgid ""
330
335
"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, "
331
336
"but will be available until the API changes."
@@ -343,22 +348,22 @@ msgstr "code(程式碼)"
343
348
msgid "code object"
344
349
msgstr "code object(程式碼物件)"
345
350
346
- #: ../../c-api/code.rst:62
351
+ #: ../../c-api/code.rst:64
347
352
msgid "PyCode_New (C function)"
348
353
msgstr "PyCode_New(C 函式)"
349
354
350
- #: ../../c-api/code.rst:75
355
+ #: ../../c-api/code.rst:77
351
356
msgid "PyCode_NewWithPosOnlyArgs (C function)"
352
357
msgstr "PyCode_NewWithPosOnlyArgs(C 函式)"
353
358
354
- #: ../../c-api/code.rst:234
359
+ #: ../../c-api/code.rst:237
355
360
msgid "_PyEval_RequestCodeExtraIndex (C function)"
356
361
msgstr "_PyEval_RequestCodeExtraIndex(C 函式)"
357
362
358
- #: ../../c-api/code.rst:252
363
+ #: ../../c-api/code.rst:255
359
364
msgid "_PyCode_GetExtra (C function)"
360
365
msgstr "_PyCode_GetExtra(C 函式)"
361
366
362
- #: ../../c-api/code.rst:267
367
+ #: ../../c-api/code.rst:270
363
368
msgid "_PyCode_SetExtra (C function)"
364
369
msgstr "_PyCode_SetExtra(C 函式)"
0 commit comments