Skip to content

Commit 3e6386b

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 321ec5e0
1 parent 14f78f3 commit 3e6386b

File tree

2 files changed

+199
-171
lines changed

2 files changed

+199
-171
lines changed

c-api/code.po

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-07-30 00:03+0000\n"
10+
"POT-Creation-Date: 2024-02-10 00:03+0000\n"
1111
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
1212
"Last-Translator: Liang-Bo Wang <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,181 +37,181 @@ msgstr ""
3737

3838
#: ../../c-api/code.rst:24
3939
msgid ""
40-
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
41-
"`code` type."
40+
"This is an instance of :c:type:`PyTypeObject` representing the Python :ref:"
41+
"`code object <code-objects>`."
4242
msgstr ""
4343

4444
#: ../../c-api/code.rst:30
4545
msgid ""
46-
"Return true if *co* is a :class:`code` object. This function always "
47-
"succeeds."
46+
"Return true if *co* is a :ref:`code object <code-objects>`. This function "
47+
"always succeeds."
4848
msgstr ""
4949

50-
#: ../../c-api/code.rst:34
50+
#: ../../c-api/code.rst:35
5151
msgid "Return the number of free variables in *co*."
5252
msgstr ""
5353

54-
#: ../../c-api/code.rst:38
54+
#: ../../c-api/code.rst:39
5555
msgid ""
5656
"Return a new code object. If you need a dummy code object to create a "
5757
"frame, use :c:func:`PyCode_NewEmpty` instead."
5858
msgstr ""
5959

60-
#: ../../c-api/code.rst:41
60+
#: ../../c-api/code.rst:42
6161
msgid ""
6262
"Since the definition of the bytecode changes often, calling :c:func:"
6363
"`PyUnstable_Code_New` directly can bind you to a precise Python version."
6464
msgstr ""
6565

66-
#: ../../c-api/code.rst:44
66+
#: ../../c-api/code.rst:45
6767
msgid ""
6868
"The many arguments of this function are inter-dependent in complex ways, "
6969
"meaning that subtle changes to values are likely to result in incorrect "
7070
"execution or VM crashes. Use this function only with extreme care."
7171
msgstr ""
7272

73-
#: ../../c-api/code.rst:48
73+
#: ../../c-api/code.rst:49
7474
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
7575
msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
7676

77-
#: ../../c-api/code.rst:55
77+
#: ../../c-api/code.rst:56
7878
msgid ""
7979
"Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name "
8080
"is deprecated, but will remain available until the signature changes again."
8181
msgstr ""
8282

83-
#: ../../c-api/code.rst:61
83+
#: ../../c-api/code.rst:62
8484
msgid ""
8585
"Similar to :c:func:`PyUnstable_Code_New`, but with an extra "
8686
"\"posonlyargcount\" for positional-only arguments. The same caveats that "
8787
"apply to ``PyUnstable_Code_New`` also apply to this function."
8888
msgstr ""
8989

90-
#: ../../c-api/code.rst:66
90+
#: ../../c-api/code.rst:67
9191
msgid "as ``PyCode_NewWithPosOnlyArgs``"
9292
msgstr ""
9393

94-
#: ../../c-api/code.rst:68
94+
#: ../../c-api/code.rst:69
9595
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
9696
msgstr "新增 ``qualname`` 和 ``exceptiontable`` 參數。"
9797

98-
#: ../../c-api/code.rst:73
98+
#: ../../c-api/code.rst:74
9999
msgid ""
100100
"Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is "
101101
"deprecated, but will remain available until the signature changes again."
102102
msgstr ""
103103

104-
#: ../../c-api/code.rst:79
104+
#: ../../c-api/code.rst:80
105105
msgid ""
106106
"Return a new empty code object with the specified filename, function name, "
107107
"and first line number. The resulting code object will raise an ``Exception`` "
108108
"if executed."
109109
msgstr ""
110110

111-
#: ../../c-api/code.rst:85
111+
#: ../../c-api/code.rst:86
112112
msgid ""
113113
"Return the line number of the instruction that occurs on or before "
114114
"``byte_offset`` and ends after it. If you just need the line number of a "
115115
"frame, use :c:func:`PyFrame_GetLineNumber` instead."
116116
msgstr ""
117117

118-
#: ../../c-api/code.rst:88
118+
#: ../../c-api/code.rst:89
119119
msgid ""
120120
"For efficiently iterating over the line numbers in a code object, use `the "
121121
"API described in PEP 626 <https://peps.python.org/pep-0626/#out-of-process-"
122122
"debuggers-and-profilers>`_."
123123
msgstr ""
124124

125-
#: ../../c-api/code.rst:93
125+
#: ../../c-api/code.rst:94
126126
msgid ""
127127
"Sets the passed ``int`` pointers to the source code line and column numbers "
128128
"for the instruction at ``byte_offset``. Sets the value to ``0`` when "
129129
"information is not available for any particular element."
130130
msgstr ""
131131

132-
#: ../../c-api/code.rst:97
132+
#: ../../c-api/code.rst:98
133133
msgid "Returns ``1`` if the function succeeds and 0 otherwise."
134134
msgstr ""
135135

136-
#: ../../c-api/code.rst:103
136+
#: ../../c-api/code.rst:104
137137
msgid ""
138138
"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
139139
"reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
140140
"object. On error, ``NULL`` is returned and an exception is raised."
141141
msgstr ""
142142

143-
#: ../../c-api/code.rst:108
143+
#: ../../c-api/code.rst:109
144144
msgid ""
145145
"This ``PyBytesObject`` may be created on-demand by the interpreter and does "
146146
"not necessarily represent the bytecode actually executed by CPython. The "
147147
"primary use case for this function is debuggers and profilers."
148148
msgstr ""
149149

150-
#: ../../c-api/code.rst:116
150+
#: ../../c-api/code.rst:117
151151
msgid ""
152152
"Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
153153
"reference to a :c:type:`PyTupleObject` containing the names of the local "
154154
"variables. On error, ``NULL`` is returned and an exception is raised."
155155
msgstr ""
156156

157-
#: ../../c-api/code.rst:125
157+
#: ../../c-api/code.rst:126
158158
msgid ""
159159
"Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
160160
"reference to a :c:type:`PyTupleObject` containing the names of the local "
161161
"variables that are referenced by nested functions. On error, ``NULL`` is "
162162
"returned and an exception is raised."
163163
msgstr ""
164164

165-
#: ../../c-api/code.rst:134
165+
#: ../../c-api/code.rst:135
166166
msgid ""
167167
"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
168168
"reference to a :c:type:`PyTupleObject` containing the names of the free "
169169
"variables. On error, ``NULL`` is returned and an exception is raised."
170170
msgstr ""
171171

172-
#: ../../c-api/code.rst:142
172+
#: ../../c-api/code.rst:143
173173
msgid ""
174174
"Register *callback* as a code object watcher for the current interpreter. "
175175
"Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case "
176176
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
177177
"exception."
178178
msgstr ""
179179

180-
#: ../../c-api/code.rst:151
180+
#: ../../c-api/code.rst:152
181181
msgid ""
182182
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
183183
"`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or "
184184
"``-1`` and set an exception on error (e.g. if the given *watcher_id* was "
185185
"never registered.)"
186186
msgstr ""
187187

188-
#: ../../c-api/code.rst:160
188+
#: ../../c-api/code.rst:161
189189
msgid ""
190190
"Enumeration of possible code object watcher events: - "
191191
"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``"
192192
msgstr ""
193193

194-
#: ../../c-api/code.rst:168
194+
#: ../../c-api/code.rst:169
195195
msgid "Type of a code object watcher callback function."
196196
msgstr ""
197197

198-
#: ../../c-api/code.rst:170
198+
#: ../../c-api/code.rst:171
199199
msgid ""
200200
"If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after "
201201
"`co` has been fully initialized. Otherwise, the callback is invoked before "
202202
"the destruction of *co* takes place, so the prior state of *co* can be "
203203
"inspected."
204204
msgstr ""
205205

206-
#: ../../c-api/code.rst:175
206+
#: ../../c-api/code.rst:176
207207
msgid ""
208208
"If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback "
209209
"to the about-to-be-destroyed code object will resurrect it and prevent it "
210210
"from being freed at this time. When the resurrected object is destroyed "
211211
"later, any watcher callbacks active at that time will be called again."
212212
msgstr ""
213213

214-
#: ../../c-api/code.rst:180
214+
#: ../../c-api/code.rst:181
215215
msgid ""
216216
"Users of this API should not rely on internal runtime implementation "
217217
"details. Such details may include, but are not limited to, the exact order "
@@ -221,14 +221,14 @@ msgid ""
221221
"the Python code being executed."
222222
msgstr ""
223223

224-
#: ../../c-api/code.rst:187
224+
#: ../../c-api/code.rst:188
225225
msgid ""
226226
"If the callback sets an exception, it must return ``-1``; this exception "
227227
"will be printed as an unraisable exception using :c:func:"
228228
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
229229
msgstr ""
230230

231-
#: ../../c-api/code.rst:191
231+
#: ../../c-api/code.rst:192
232232
msgid ""
233233
"There may already be a pending exception set on entry to the callback. In "
234234
"this case, the callback should return ``0`` with the same exception still "
@@ -237,85 +237,85 @@ msgid ""
237237
"it before returning."
238238
msgstr ""
239239

240-
#: ../../c-api/code.rst:201
240+
#: ../../c-api/code.rst:202
241241
msgid "Extra information"
242242
msgstr ""
243243

244-
#: ../../c-api/code.rst:203
244+
#: ../../c-api/code.rst:204
245245
msgid ""
246246
"To support low-level extensions to frame evaluation, such as external just-"
247247
"in-time compilers, it is possible to attach arbitrary extra data to code "
248248
"objects."
249249
msgstr ""
250250

251-
#: ../../c-api/code.rst:207
251+
#: ../../c-api/code.rst:208
252252
msgid ""
253253
"These functions are part of the unstable C API tier: this functionality is a "
254254
"CPython implementation detail, and the API may change without deprecation "
255255
"warnings."
256256
msgstr ""
257257

258-
#: ../../c-api/code.rst:213
258+
#: ../../c-api/code.rst:214
259259
msgid "Return a new an opaque index value used to adding data to code objects."
260260
msgstr ""
261261

262-
#: ../../c-api/code.rst:215
262+
#: ../../c-api/code.rst:216
263263
msgid ""
264264
"You generally call this function once (per interpreter) and use the result "
265265
"with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on "
266266
"individual code objects."
267267
msgstr ""
268268

269-
#: ../../c-api/code.rst:219
269+
#: ../../c-api/code.rst:220
270270
msgid ""
271271
"If *free* is not ``NULL``: when a code object is deallocated, *free* will be "
272272
"called on non-``NULL`` data stored under the new index. Use :c:func:"
273273
"`Py_DecRef` when storing :c:type:`PyObject`."
274274
msgstr ""
275275

276-
#: ../../c-api/code.rst:225
276+
#: ../../c-api/code.rst:226
277277
msgid "as ``_PyEval_RequestCodeExtraIndex``"
278278
msgstr ""
279279

280-
#: ../../c-api/code.rst:229
280+
#: ../../c-api/code.rst:230
281281
msgid ""
282282
"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name "
283283
"is deprecated, but will be available until the API changes."
284284
msgstr ""
285285

286-
#: ../../c-api/code.rst:235
286+
#: ../../c-api/code.rst:236
287287
msgid ""
288288
"Set *extra* to the extra data stored under the given index. Return 0 on "
289289
"success. Set an exception and return -1 on failure."
290290
msgstr ""
291291

292-
#: ../../c-api/code.rst:238
292+
#: ../../c-api/code.rst:239
293293
msgid ""
294294
"If no data was set under the index, set *extra* to ``NULL`` and return 0 "
295295
"without setting an exception."
296296
msgstr ""
297297

298-
#: ../../c-api/code.rst:243
298+
#: ../../c-api/code.rst:244
299299
msgid "as ``_PyCode_GetExtra``"
300300
msgstr ""
301301

302-
#: ../../c-api/code.rst:247
302+
#: ../../c-api/code.rst:248
303303
msgid ""
304304
"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, "
305305
"but will be available until the API changes."
306306
msgstr ""
307307

308-
#: ../../c-api/code.rst:253
308+
#: ../../c-api/code.rst:254
309309
msgid ""
310310
"Set the extra data stored under the given index to *extra*. Return 0 on "
311311
"success. Set an exception and return -1 on failure."
312312
msgstr ""
313313

314-
#: ../../c-api/code.rst:258
314+
#: ../../c-api/code.rst:259
315315
msgid "as ``_PyCode_SetExtra``"
316316
msgstr ""
317317

318-
#: ../../c-api/code.rst:262
318+
#: ../../c-api/code.rst:263
319319
msgid ""
320320
"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, "
321321
"but will be available until the API changes."
@@ -333,22 +333,22 @@ msgstr "code(程式碼)"
333333
msgid "code object"
334334
msgstr "code object(程式碼物件)"
335335

336-
#: ../../c-api/code.rst:51
336+
#: ../../c-api/code.rst:52
337337
msgid "PyCode_New"
338338
msgstr "PyCode_New"
339339

340-
#: ../../c-api/code.rst:64
340+
#: ../../c-api/code.rst:65
341341
msgid "PyCode_NewWithPosOnlyArgs"
342342
msgstr "PyCode_NewWithPosOnlyArgs"
343343

344-
#: ../../c-api/code.rst:223
344+
#: ../../c-api/code.rst:224
345345
msgid "_PyEval_RequestCodeExtraIndex"
346346
msgstr "_PyEval_RequestCodeExtraIndex"
347347

348-
#: ../../c-api/code.rst:241
348+
#: ../../c-api/code.rst:242
349349
msgid "_PyCode_GetExtra"
350350
msgstr "_PyCode_GetExtra"
351351

352-
#: ../../c-api/code.rst:256
352+
#: ../../c-api/code.rst:257
353353
msgid "_PyCode_SetExtra"
354354
msgstr "_PyCode_SetExtra"

0 commit comments

Comments
 (0)