Skip to content

Sync with CPython 3.12 #807

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

Merged
merged 13 commits into from
Feb 7, 2024
19 changes: 10 additions & 9 deletions .scripts/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions c-api/file.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-22 00:04+0000\n"
"POT-Creation-Date: 2024-02-05 00:03+0000\n"
"PO-Revision-Date: 2023-04-24 20:38+0800\n"
"Last-Translator: Matt Wang <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -111,14 +111,19 @@ msgstr ""
"數。"

#: ../../c-api/file.rst:68
msgid "The handler is a function of type:"
msgstr ""

#: ../../c-api/file.rst:72
#, fuzzy
msgid ""
"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, "
"void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, "
"where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
msgstr ""
"處理程式是 :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)` 型別的函"
"式,其中 *path* 保證為 :c:type:`PyUnicodeObject`。"

#: ../../c-api/file.rst:71
#: ../../c-api/file.rst:76
msgid ""
"The *userData* pointer is passed into the hook function. Since hook "
"functions may be called from different runtimes, this pointer should not "
Expand All @@ -127,7 +132,7 @@ msgstr ""
"*userData* 指標被傳遞到掛鉤函式 (hook function) 中。由於可能會從不同的執行環"
"境 (runtime) 呼叫掛鉤函式,因此該指標不應直接指向 Python 狀態。"

#: ../../c-api/file.rst:75
#: ../../c-api/file.rst:80
msgid ""
"As this hook is intentionally used during import, avoid importing new "
"modules during its execution unless they are known to be frozen or available "
Expand All @@ -136,7 +141,7 @@ msgstr ""
"由於此掛鉤函式是在導入期間有意使用的,因此請避免在其執行期間導入新模組,除非"
"它們已知有被凍結或在 ``sys.modules`` 中可用。"

#: ../../c-api/file.rst:79
#: ../../c-api/file.rst:84
#, fuzzy
msgid ""
"Once a hook has been set, it cannot be removed or replaced, and later calls "
Expand All @@ -147,19 +152,19 @@ msgstr ""
"`PyFile_SetOpenCodeHook` 將失敗。失敗時,函式回傳 -1 並在直譯器已初始化時設定"
"例外。"

#: ../../c-api/file.rst:83
#: ../../c-api/file.rst:88
msgid "This function is safe to call before :c:func:`Py_Initialize`."
msgstr "在 :c:func:`Py_Initialize` 之前呼叫此函式是安全的。"

#: ../../c-api/file.rst:85
#: ../../c-api/file.rst:90
msgid ""
"Raises an :ref:`auditing event <auditing>` ``setopencodehook`` with no "
"arguments."
msgstr ""
"不帶引數地引發一個\\ :ref:`稽核事件 (auditing event) <auditing>` "
"``setopencodehook``\\ 。"

#: ../../c-api/file.rst:95
#: ../../c-api/file.rst:100
msgid ""
"Write object *obj* to file object *p*. The only supported flag for *flags* "
"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is "
Expand All @@ -170,7 +175,7 @@ msgstr ""
"`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在"
"成功回傳 ``0`` 或在失敗回傳 ``-1``;將設定適當的例外。"

#: ../../c-api/file.rst:103
#: ../../c-api/file.rst:108
msgid ""
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
"failure; the appropriate exception will be set."
Expand All @@ -190,6 +195,6 @@ msgstr "file(檔案)"
msgid "EOFError (built-in exception)"
msgstr "EOFError(內建例外)"

#: ../../c-api/file.rst:93
#: ../../c-api/file.rst:98
msgid "Py_PRINT_RAW"
msgstr "Py_PRINT_RAW"
Loading