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