77msgstr ""
88"Project-Id-Version : Python 3.13\n "
99"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 "
1111"PO-Revision-Date : 2015-12-09 17:51+0000\n "
1212"Last-Translator : Liang-Bo Wang <me@liang2.tw>\n "
1313"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -48,180 +48,185 @@ msgid ""
4848msgstr ""
4949
5050#: ../../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."
5254msgstr ""
5355
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."
5660msgstr ""
5761
58- #: ../../c-api/code.rst:43
62+ #: ../../c-api/code.rst:45
5963msgid ""
6064"Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`. The "
6165"old name is deprecated, but will remain available until the signature "
6266"changes again."
6367msgstr ""
6468
65- #: ../../c-api/code.rst:49
69+ #: ../../c-api/code.rst:51
6670msgid ""
6771"Return a new code object. If you need a dummy code object to create a "
6872"frame, use :c:func:`PyCode_NewEmpty` instead."
6973msgstr ""
7074
71- #: ../../c-api/code.rst:52
75+ #: ../../c-api/code.rst:54
7276msgid ""
7377"Since the definition of the bytecode changes often, calling :c:func:"
7478"`PyUnstable_Code_New` directly can bind you to a precise Python version."
7579msgstr ""
7680
77- #: ../../c-api/code.rst:55
81+ #: ../../c-api/code.rst:57
7882msgid ""
7983"The many arguments of this function are inter-dependent in complex ways, "
8084"meaning that subtle changes to values are likely to result in incorrect "
8185"execution or VM crashes. Use this function only with extreme care."
8286msgstr ""
8387
84- #: ../../c-api/code.rst:59
88+ #: ../../c-api/code.rst:61
8589msgid "Added ``qualname`` and ``exceptiontable`` parameters."
8690msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
8791
88- #: ../../c-api/code.rst:66
92+ #: ../../c-api/code.rst:68
8993msgid ""
9094"Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name "
9195"is deprecated, but will remain available until the signature changes again."
9296msgstr ""
9397
94- #: ../../c-api/code.rst:72
98+ #: ../../c-api/code.rst:74
9599msgid ""
96100"Similar to :c:func:`PyUnstable_Code_New`, but with an extra "
97101"\" posonlyargcount\" for positional-only arguments. The same caveats that "
98102"apply to ``PyUnstable_Code_New`` also apply to this function."
99103msgstr ""
100104
101- #: ../../c-api/code.rst:77
105+ #: ../../c-api/code.rst:79
102106msgid "as ``PyCode_NewWithPosOnlyArgs``"
103107msgstr ""
104108
105- #: ../../c-api/code.rst:79
109+ #: ../../c-api/code.rst:81
106110msgid "Added ``qualname`` and ``exceptiontable`` parameters."
107111msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
108112
109- #: ../../c-api/code.rst:84
113+ #: ../../c-api/code.rst:86
110114msgid ""
111115"Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is "
112116"deprecated, but will remain available until the signature changes again."
113117msgstr ""
114118
115- #: ../../c-api/code.rst:90
119+ #: ../../c-api/code.rst:92
116120msgid ""
117121"Return a new empty code object with the specified filename, function name, "
118122"and first line number. The resulting code object will raise an ``Exception`` "
119123"if executed."
120124msgstr ""
121125
122- #: ../../c-api/code.rst:96
126+ #: ../../c-api/code.rst:98
123127msgid ""
124128"Return the line number of the instruction that occurs on or before "
125129"``byte_offset`` and ends after it. If you just need the line number of a "
126130"frame, use :c:func:`PyFrame_GetLineNumber` instead."
127131msgstr ""
128132
129- #: ../../c-api/code.rst:99
133+ #: ../../c-api/code.rst:101
130134msgid ""
131135"For efficiently iterating over the line numbers in a code object, use :pep:"
132136"`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`."
133137msgstr ""
134138
135- #: ../../c-api/code.rst:104
139+ #: ../../c-api/code.rst:106
136140msgid ""
137141"Sets the passed ``int`` pointers to the source code line and column numbers "
138142"for the instruction at ``byte_offset``. Sets the value to ``0`` when "
139143"information is not available for any particular element."
140144msgstr ""
141145
142- #: ../../c-api/code.rst:108
146+ #: ../../c-api/code.rst:110
143147msgid "Returns ``1`` if the function succeeds and 0 otherwise."
144148msgstr ""
145149
146- #: ../../c-api/code.rst:114
150+ #: ../../c-api/code.rst:116
147151msgid ""
148152"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
149153"reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
150154"object. On error, ``NULL`` is returned and an exception is raised."
151155msgstr ""
152156
153- #: ../../c-api/code.rst:119
157+ #: ../../c-api/code.rst:121
154158msgid ""
155159"This ``PyBytesObject`` may be created on-demand by the interpreter and does "
156160"not necessarily represent the bytecode actually executed by CPython. The "
157161"primary use case for this function is debuggers and profilers."
158162msgstr ""
159163
160- #: ../../c-api/code.rst:127
164+ #: ../../c-api/code.rst:129
161165msgid ""
162166"Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
163167"reference to a :c:type:`PyTupleObject` containing the names of the local "
164168"variables. On error, ``NULL`` is returned and an exception is raised."
165169msgstr ""
166170
167- #: ../../c-api/code.rst:136
171+ #: ../../c-api/code.rst:138
168172msgid ""
169173"Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
170174"reference to a :c:type:`PyTupleObject` containing the names of the local "
171175"variables that are referenced by nested functions. On error, ``NULL`` is "
172176"returned and an exception is raised."
173177msgstr ""
174178
175- #: ../../c-api/code.rst:145
179+ #: ../../c-api/code.rst:147
176180msgid ""
177181"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."
180185msgstr ""
181186
182- #: ../../c-api/code.rst:153
187+ #: ../../c-api/code.rst:156
183188msgid ""
184189"Register *callback* as a code object watcher for the current interpreter. "
185190"Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case "
186191"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
187192"exception."
188193msgstr ""
189194
190- #: ../../c-api/code.rst:162
195+ #: ../../c-api/code.rst:165
191196msgid ""
192197"Clear watcher identified by *watcher_id* previously returned from :c:func:"
193198"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or "
194199"``-1`` and set an exception on error (e.g. if the given *watcher_id* was "
195200"never registered.)"
196201msgstr ""
197202
198- #: ../../c-api/code.rst:171
203+ #: ../../c-api/code.rst:174
199204msgid ""
200205"Enumeration of possible code object watcher events: - "
201206"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``"
202207msgstr ""
203208
204- #: ../../c-api/code.rst:179
209+ #: ../../c-api/code.rst:182
205210msgid "Type of a code object watcher callback function."
206211msgstr ""
207212
208- #: ../../c-api/code.rst:181
213+ #: ../../c-api/code.rst:184
209214msgid ""
210215"If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after "
211216"`co` has been fully initialized. Otherwise, the callback is invoked before "
212217"the destruction of *co* takes place, so the prior state of *co* can be "
213218"inspected."
214219msgstr ""
215220
216- #: ../../c-api/code.rst:186
221+ #: ../../c-api/code.rst:189
217222msgid ""
218223"If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback "
219224"to the about-to-be-destroyed code object will resurrect it and prevent it "
220225"from being freed at this time. When the resurrected object is destroyed "
221226"later, any watcher callbacks active at that time will be called again."
222227msgstr ""
223228
224- #: ../../c-api/code.rst:191
229+ #: ../../c-api/code.rst:194
225230msgid ""
226231"Users of this API should not rely on internal runtime implementation "
227232"details. Such details may include, but are not limited to, the exact order "
@@ -231,14 +236,14 @@ msgid ""
231236"the Python code being executed."
232237msgstr ""
233238
234- #: ../../c-api/code.rst:198
239+ #: ../../c-api/code.rst:201
235240msgid ""
236241"If the callback sets an exception, it must return ``-1``; this exception "
237242"will be printed as an unraisable exception using :c:func:"
238243"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
239244msgstr ""
240245
241- #: ../../c-api/code.rst:202
246+ #: ../../c-api/code.rst:205
242247msgid ""
243248"There may already be a pending exception set on entry to the callback. In "
244249"this case, the callback should return ``0`` with the same exception still "
@@ -247,85 +252,85 @@ msgid ""
247252"it before returning."
248253msgstr ""
249254
250- #: ../../c-api/code.rst:212
255+ #: ../../c-api/code.rst:215
251256msgid "Extra information"
252257msgstr ""
253258
254- #: ../../c-api/code.rst:214
259+ #: ../../c-api/code.rst:217
255260msgid ""
256261"To support low-level extensions to frame evaluation, such as external just-"
257262"in-time compilers, it is possible to attach arbitrary extra data to code "
258263"objects."
259264msgstr ""
260265
261- #: ../../c-api/code.rst:218
266+ #: ../../c-api/code.rst:221
262267msgid ""
263268"These functions are part of the unstable C API tier: this functionality is a "
264269"CPython implementation detail, and the API may change without deprecation "
265270"warnings."
266271msgstr ""
267272
268- #: ../../c-api/code.rst:224
273+ #: ../../c-api/code.rst:227
269274msgid "Return a new an opaque index value used to adding data to code objects."
270275msgstr ""
271276
272- #: ../../c-api/code.rst:226
277+ #: ../../c-api/code.rst:229
273278msgid ""
274279"You generally call this function once (per interpreter) and use the result "
275280"with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on "
276281"individual code objects."
277282msgstr ""
278283
279- #: ../../c-api/code.rst:230
284+ #: ../../c-api/code.rst:233
280285msgid ""
281286"If *free* is not ``NULL``: when a code object is deallocated, *free* will be "
282287"called on non-``NULL`` data stored under the new index. Use :c:func:"
283288"`Py_DecRef` when storing :c:type:`PyObject`."
284289msgstr ""
285290
286- #: ../../c-api/code.rst:236
291+ #: ../../c-api/code.rst:239
287292msgid "as ``_PyEval_RequestCodeExtraIndex``"
288293msgstr ""
289294
290- #: ../../c-api/code.rst:240
295+ #: ../../c-api/code.rst:243
291296msgid ""
292297"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name "
293298"is deprecated, but will be available until the API changes."
294299msgstr ""
295300
296- #: ../../c-api/code.rst:246
301+ #: ../../c-api/code.rst:249
297302msgid ""
298303"Set *extra* to the extra data stored under the given index. Return 0 on "
299304"success. Set an exception and return -1 on failure."
300305msgstr ""
301306
302- #: ../../c-api/code.rst:249
307+ #: ../../c-api/code.rst:252
303308msgid ""
304309"If no data was set under the index, set *extra* to ``NULL`` and return 0 "
305310"without setting an exception."
306311msgstr ""
307312
308- #: ../../c-api/code.rst:254
313+ #: ../../c-api/code.rst:257
309314msgid "as ``_PyCode_GetExtra``"
310315msgstr ""
311316
312- #: ../../c-api/code.rst:258
317+ #: ../../c-api/code.rst:261
313318msgid ""
314319"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, "
315320"but will be available until the API changes."
316321msgstr ""
317322
318- #: ../../c-api/code.rst:264
323+ #: ../../c-api/code.rst:267
319324msgid ""
320325"Set the extra data stored under the given index to *extra*. Return 0 on "
321326"success. Set an exception and return -1 on failure."
322327msgstr ""
323328
324- #: ../../c-api/code.rst:269
329+ #: ../../c-api/code.rst:272
325330msgid "as ``_PyCode_SetExtra``"
326331msgstr ""
327332
328- #: ../../c-api/code.rst:273
333+ #: ../../c-api/code.rst:276
329334msgid ""
330335"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, "
331336"but will be available until the API changes."
@@ -343,22 +348,22 @@ msgstr "code(程式碼)"
343348msgid "code object"
344349msgstr "code object(程式碼物件)"
345350
346- #: ../../c-api/code.rst:62
351+ #: ../../c-api/code.rst:64
347352msgid "PyCode_New (C function)"
348353msgstr "PyCode_New(C 函式)"
349354
350- #: ../../c-api/code.rst:75
355+ #: ../../c-api/code.rst:77
351356msgid "PyCode_NewWithPosOnlyArgs (C function)"
352357msgstr "PyCode_NewWithPosOnlyArgs(C 函式)"
353358
354- #: ../../c-api/code.rst:234
359+ #: ../../c-api/code.rst:237
355360msgid "_PyEval_RequestCodeExtraIndex (C function)"
356361msgstr "_PyEval_RequestCodeExtraIndex(C 函式)"
357362
358- #: ../../c-api/code.rst:252
363+ #: ../../c-api/code.rst:255
359364msgid "_PyCode_GetExtra (C function)"
360365msgstr "_PyCode_GetExtra(C 函式)"
361366
362- #: ../../c-api/code.rst:267
367+ #: ../../c-api/code.rst:270
363368msgid "_PyCode_SetExtra (C function)"
364369msgstr "_PyCode_SetExtra(C 函式)"
0 commit comments