Skip to content

Commit 51e85cf

Browse files
sync with cpython 3b28cb0f
1 parent f3fb9ca commit 51e85cf

File tree

3 files changed

+200
-104
lines changed

3 files changed

+200
-104
lines changed

c-api/code.po

Lines changed: 118 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.13\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-06-27 07:36+0000\n"
10+
"POT-Creation-Date: 2025-08-03 00:19+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-"
@@ -252,85 +252,184 @@ msgid ""
252252
"it before returning."
253253
msgstr ""
254254

255-
#: ../../c-api/code.rst:215
255+
#: ../../c-api/code.rst:217
256+
#, fuzzy
257+
msgid "Code Object Flags"
258+
msgstr "程式碼物件"
259+
260+
#: ../../c-api/code.rst:219
261+
msgid ""
262+
"Code objects contain a bit-field of flags, which can be retrieved as the :"
263+
"attr:`~codeobject.co_flags` Python attribute (for example using :c:func:"
264+
"`PyObject_GetAttrString`), and set using a *flags* argument to :c:func:"
265+
"`PyUnstable_Code_New` and similar functions."
266+
msgstr ""
267+
268+
#: ../../c-api/code.rst:224
269+
msgid ""
270+
"Flags whose names start with ``CO_FUTURE_`` correspond to features normally "
271+
"selectable by :ref:`future statements <future>`. These flags can be used in :"
272+
"c:member:`PyCompilerFlags.cf_flags`. Note that many ``CO_FUTURE_`` flags are "
273+
"mandatory in current versions of Python, and setting them has no effect."
274+
msgstr ""
275+
276+
#: ../../c-api/code.rst:230
277+
msgid ""
278+
"The following flags are available. For their meaning, see the linked "
279+
"documentation of their Python equivalents."
280+
msgstr ""
281+
282+
#: ../../c-api/code.rst:238
283+
msgid "Flag"
284+
msgstr ""
285+
286+
#: ../../c-api/code.rst:239
287+
msgid "Meaning"
288+
msgstr ""
289+
290+
#: ../../c-api/code.rst:241
291+
msgid ":py:data:`inspect.CO_OPTIMIZED`"
292+
msgstr ""
293+
294+
#: ../../c-api/code.rst:243
295+
msgid ":py:data:`inspect.CO_NEWLOCALS`"
296+
msgstr ""
297+
298+
#: ../../c-api/code.rst:245
299+
msgid ":py:data:`inspect.CO_VARARGS`"
300+
msgstr ""
301+
302+
#: ../../c-api/code.rst:247
303+
msgid ":py:data:`inspect.CO_VARKEYWORDS`"
304+
msgstr ""
305+
306+
#: ../../c-api/code.rst:249
307+
msgid ":py:data:`inspect.CO_NESTED`"
308+
msgstr ""
309+
310+
#: ../../c-api/code.rst:251
311+
msgid ":py:data:`inspect.CO_GENERATOR`"
312+
msgstr ""
313+
314+
#: ../../c-api/code.rst:253
315+
msgid ":py:data:`inspect.CO_COROUTINE`"
316+
msgstr ""
317+
318+
#: ../../c-api/code.rst:255
319+
msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`"
320+
msgstr ""
321+
322+
#: ../../c-api/code.rst:257
323+
msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`"
324+
msgstr ""
325+
326+
#: ../../c-api/code.rst:260
327+
msgid "no effect (:py:data:`__future__.division`)"
328+
msgstr ""
329+
330+
#: ../../c-api/code.rst:262
331+
msgid "no effect (:py:data:`__future__.absolute_import`)"
332+
msgstr ""
333+
334+
#: ../../c-api/code.rst:264
335+
msgid "no effect (:py:data:`__future__.with_statement`)"
336+
msgstr ""
337+
338+
#: ../../c-api/code.rst:266
339+
msgid "no effect (:py:data:`__future__.print_function`)"
340+
msgstr ""
341+
342+
#: ../../c-api/code.rst:268
343+
msgid "no effect (:py:data:`__future__.unicode_literals`)"
344+
msgstr ""
345+
346+
#: ../../c-api/code.rst:270
347+
msgid "no effect (:py:data:`__future__.generator_stop`)"
348+
msgstr ""
349+
350+
#: ../../c-api/code.rst:272
351+
msgid ":py:data:`__future__.annotations`"
352+
msgstr ""
353+
354+
#: ../../c-api/code.rst:276
256355
msgid "Extra information"
257356
msgstr ""
258357

259-
#: ../../c-api/code.rst:217
358+
#: ../../c-api/code.rst:278
260359
msgid ""
261360
"To support low-level extensions to frame evaluation, such as external just-"
262361
"in-time compilers, it is possible to attach arbitrary extra data to code "
263362
"objects."
264363
msgstr ""
265364

266-
#: ../../c-api/code.rst:221
365+
#: ../../c-api/code.rst:282
267366
msgid ""
268367
"These functions are part of the unstable C API tier: this functionality is a "
269368
"CPython implementation detail, and the API may change without deprecation "
270369
"warnings."
271370
msgstr ""
272371

273-
#: ../../c-api/code.rst:227
372+
#: ../../c-api/code.rst:288
274373
msgid "Return a new an opaque index value used to adding data to code objects."
275374
msgstr ""
276375

277-
#: ../../c-api/code.rst:229
376+
#: ../../c-api/code.rst:290
278377
msgid ""
279378
"You generally call this function once (per interpreter) and use the result "
280379
"with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on "
281380
"individual code objects."
282381
msgstr ""
283382

284-
#: ../../c-api/code.rst:233
383+
#: ../../c-api/code.rst:294
285384
msgid ""
286385
"If *free* is not ``NULL``: when a code object is deallocated, *free* will be "
287386
"called on non-``NULL`` data stored under the new index. Use :c:func:"
288387
"`Py_DecRef` when storing :c:type:`PyObject`."
289388
msgstr ""
290389

291-
#: ../../c-api/code.rst:239
390+
#: ../../c-api/code.rst:300
292391
msgid "as ``_PyEval_RequestCodeExtraIndex``"
293392
msgstr ""
294393

295-
#: ../../c-api/code.rst:243
394+
#: ../../c-api/code.rst:304
296395
msgid ""
297396
"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name "
298397
"is deprecated, but will be available until the API changes."
299398
msgstr ""
300399

301-
#: ../../c-api/code.rst:249
400+
#: ../../c-api/code.rst:310
302401
msgid ""
303402
"Set *extra* to the extra data stored under the given index. Return 0 on "
304403
"success. Set an exception and return -1 on failure."
305404
msgstr ""
306405

307-
#: ../../c-api/code.rst:252
406+
#: ../../c-api/code.rst:313
308407
msgid ""
309408
"If no data was set under the index, set *extra* to ``NULL`` and return 0 "
310409
"without setting an exception."
311410
msgstr ""
312411

313-
#: ../../c-api/code.rst:257
412+
#: ../../c-api/code.rst:318
314413
msgid "as ``_PyCode_GetExtra``"
315414
msgstr ""
316415

317-
#: ../../c-api/code.rst:261
416+
#: ../../c-api/code.rst:322
318417
msgid ""
319418
"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, "
320419
"but will be available until the API changes."
321420
msgstr ""
322421

323-
#: ../../c-api/code.rst:267
422+
#: ../../c-api/code.rst:328
324423
msgid ""
325424
"Set the extra data stored under the given index to *extra*. Return 0 on "
326425
"success. Set an exception and return -1 on failure."
327426
msgstr ""
328427

329-
#: ../../c-api/code.rst:272
428+
#: ../../c-api/code.rst:333
330429
msgid "as ``_PyCode_SetExtra``"
331430
msgstr ""
332431

333-
#: ../../c-api/code.rst:276
432+
#: ../../c-api/code.rst:337
334433
msgid ""
335434
"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, "
336435
"but will be available until the API changes."
@@ -356,14 +455,14 @@ msgstr "PyCode_New(C 函式)"
356455
msgid "PyCode_NewWithPosOnlyArgs (C function)"
357456
msgstr "PyCode_NewWithPosOnlyArgs(C 函式)"
358457

359-
#: ../../c-api/code.rst:237
458+
#: ../../c-api/code.rst:298
360459
msgid "_PyEval_RequestCodeExtraIndex (C function)"
361460
msgstr "_PyEval_RequestCodeExtraIndex(C 函式)"
362461

363-
#: ../../c-api/code.rst:255
462+
#: ../../c-api/code.rst:316
364463
msgid "_PyCode_GetExtra (C function)"
365464
msgstr "_PyCode_GetExtra(C 函式)"
366465

367-
#: ../../c-api/code.rst:270
466+
#: ../../c-api/code.rst:331
368467
msgid "_PyCode_SetExtra (C function)"
369468
msgstr "_PyCode_SetExtra(C 函式)"

c-api/veryhigh.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.13\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-01-22 00:13+0000\n"
10+
"POT-Creation-Date: 2025-08-03 00:19+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -400,10 +400,12 @@ msgid ""
400400
"mod:`!ast` Python module, which exports these constants under the same names."
401401
msgstr ""
402402

403-
#: ../../c-api/veryhigh.rst:366
403+
#: ../../c-api/veryhigh.rst:364
404404
msgid ""
405-
"This bit can be set in *flags* to cause division operator ``/`` to be "
406-
"interpreted as \"true division\" according to :pep:`238`."
405+
"The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags "
406+
"such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally "
407+
"selectable using :ref:`future statements <future>`. See :ref:"
408+
"`c_codeobject_flags` for a complete list."
407409
msgstr ""
408410

409411
#: ../../c-api/veryhigh.rst:301 ../../c-api/veryhigh.rst:309

0 commit comments

Comments
 (0)