Skip to content

Sync with CPython 3.13 #1133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: 3.13
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 118 additions & 19 deletions c-api/code.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"POT-Creation-Date: 2025-08-03 00:19+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -252,85 +252,184 @@ msgid ""
"it before returning."
msgstr ""

#: ../../c-api/code.rst:215
#: ../../c-api/code.rst:217
#, fuzzy
msgid "Code Object Flags"
msgstr "程式碼物件"

#: ../../c-api/code.rst:219
msgid ""
"Code objects contain a bit-field of flags, which can be retrieved as the :"
"attr:`~codeobject.co_flags` Python attribute (for example using :c:func:"
"`PyObject_GetAttrString`), and set using a *flags* argument to :c:func:"
"`PyUnstable_Code_New` and similar functions."
msgstr ""

#: ../../c-api/code.rst:224
msgid ""
"Flags whose names start with ``CO_FUTURE_`` correspond to features normally "
"selectable by :ref:`future statements <future>`. These flags can be used in :"
"c:member:`PyCompilerFlags.cf_flags`. Note that many ``CO_FUTURE_`` flags are "
"mandatory in current versions of Python, and setting them has no effect."
msgstr ""

#: ../../c-api/code.rst:230
msgid ""
"The following flags are available. For their meaning, see the linked "
"documentation of their Python equivalents."
msgstr ""

#: ../../c-api/code.rst:238
msgid "Flag"
msgstr ""

#: ../../c-api/code.rst:239
msgid "Meaning"
msgstr ""

#: ../../c-api/code.rst:241
msgid ":py:data:`inspect.CO_OPTIMIZED`"
msgstr ""

#: ../../c-api/code.rst:243
msgid ":py:data:`inspect.CO_NEWLOCALS`"
msgstr ""

#: ../../c-api/code.rst:245
msgid ":py:data:`inspect.CO_VARARGS`"
msgstr ""

#: ../../c-api/code.rst:247
msgid ":py:data:`inspect.CO_VARKEYWORDS`"
msgstr ""

#: ../../c-api/code.rst:249
msgid ":py:data:`inspect.CO_NESTED`"
msgstr ""

#: ../../c-api/code.rst:251
msgid ":py:data:`inspect.CO_GENERATOR`"
msgstr ""

#: ../../c-api/code.rst:253
msgid ":py:data:`inspect.CO_COROUTINE`"
msgstr ""

#: ../../c-api/code.rst:255
msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`"
msgstr ""

#: ../../c-api/code.rst:257
msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`"
msgstr ""

#: ../../c-api/code.rst:260
msgid "no effect (:py:data:`__future__.division`)"
msgstr ""

#: ../../c-api/code.rst:262
msgid "no effect (:py:data:`__future__.absolute_import`)"
msgstr ""

#: ../../c-api/code.rst:264
msgid "no effect (:py:data:`__future__.with_statement`)"
msgstr ""

#: ../../c-api/code.rst:266
msgid "no effect (:py:data:`__future__.print_function`)"
msgstr ""

#: ../../c-api/code.rst:268
msgid "no effect (:py:data:`__future__.unicode_literals`)"
msgstr ""

#: ../../c-api/code.rst:270
msgid "no effect (:py:data:`__future__.generator_stop`)"
msgstr ""

#: ../../c-api/code.rst:272
msgid ":py:data:`__future__.annotations`"
msgstr ""

#: ../../c-api/code.rst:276
msgid "Extra information"
msgstr ""

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

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

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

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

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

#: ../../c-api/code.rst:239
#: ../../c-api/code.rst:300
msgid "as ``_PyEval_RequestCodeExtraIndex``"
msgstr ""

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

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

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

#: ../../c-api/code.rst:257
#: ../../c-api/code.rst:318
msgid "as ``_PyCode_GetExtra``"
msgstr ""

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

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

#: ../../c-api/code.rst:272
#: ../../c-api/code.rst:333
msgid "as ``_PyCode_SetExtra``"
msgstr ""

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

#: ../../c-api/code.rst:237
#: ../../c-api/code.rst:298
msgid "_PyEval_RequestCodeExtraIndex (C function)"
msgstr "_PyEval_RequestCodeExtraIndex(C 函式)"

#: ../../c-api/code.rst:255
#: ../../c-api/code.rst:316
msgid "_PyCode_GetExtra (C function)"
msgstr "_PyCode_GetExtra(C 函式)"

#: ../../c-api/code.rst:270
#: ../../c-api/code.rst:331
msgid "_PyCode_SetExtra (C function)"
msgstr "_PyCode_SetExtra(C 函式)"
10 changes: 6 additions & 4 deletions c-api/veryhigh.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-22 00:13+0000\n"
"POT-Creation-Date: 2025-08-03 00:19+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -400,10 +400,12 @@ msgid ""
"mod:`!ast` Python module, which exports these constants under the same names."
msgstr ""

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

#: ../../c-api/veryhigh.rst:301 ../../c-api/veryhigh.rst:309
Expand Down
Loading