diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dae76878a3..a6bd32c1cd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,8 +9,15 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.13"
+
- name: Install Dependencies
run: sudo apt-get install gettext
+ - name: Install uv
+ uses: astral-sh/setup-uv@v6
+
- name: Validate
run: VERSION=${{ github.event.repository.default_branch }} JOBS=4 MODE=html make all
diff --git a/.github/workflows/deploy-gh-page.yml b/.github/workflows/deploy-gh-page.yml
index f1fad14f30..2c7442c1a8 100644
--- a/.github/workflows/deploy-gh-page.yml
+++ b/.github/workflows/deploy-gh-page.yml
@@ -14,11 +14,14 @@ jobs:
- name: Install Dependencies
run: sudo apt-get install gettext
+ - name: Install uv
+ uses: astral-sh/setup-uv@v6
+
- name: Build
run: JOBS=4 MODE=html make all
- name: Deploy to gh page
- uses: JamesIves/github-pages-deploy-action@v4.6.8
+ uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
diff --git a/.github/workflows/py313-sync-cpython.yml b/.github/workflows/py313-sync-cpython.yml
index 9305dbc4b2..f3362c52c5 100644
--- a/.github/workflows/py313-sync-cpython.yml
+++ b/.github/workflows/py313-sync-cpython.yml
@@ -30,8 +30,11 @@ jobs:
- name: Install Dependencies
run: sudo apt-get install gettext
+ - name: Install uv
+ uses: astral-sh/setup-uv@v6
+
- name: Sync with CPython
- run: make clone && make merge && make rm_cpython
+ run: make clone merge rm_cpython wrap
- uses: tibdex/github-app-token@v2
id: generate-token
diff --git a/.github/workflows/summarize_progress.yml b/.github/workflows/summarize_progress.yml
index 3ffccb41a9..ec594b0666 100644
--- a/.github/workflows/summarize_progress.yml
+++ b/.github/workflows/summarize_progress.yml
@@ -1,6 +1,7 @@
name: summarize_progress
on:
+ workflow_dispatch:
schedule:
- cron: '30 23 * * 5'
@@ -16,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- name: Install poetry
- uses: abatilo/actions-poetry@v3
+ uses: abatilo/actions-poetry@v4
- name: Execute Check Process
run: |
@@ -37,7 +38,7 @@ jobs:
shell: bash
- name: Commit wiki code
- uses: stefanzweifel/git-auto-commit-action@v5
+ uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Weekly Update -- Summarize Progress
- repository: markdown
\ No newline at end of file
+ repository: markdown
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7cf6db96a6..33a264ab44 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,6 +7,6 @@
repos:
- repo: https://git.afpy.org/AFPy/powrap
# there's no release tag in repo, use the latest commit hash id instead
- rev: a34a9fed116d24562fbe4bb8d456ade85f056c36
+ rev: v1.0.2
hooks:
- id: powrap
\ No newline at end of file
diff --git a/.scripts/summarize_progress/main.py b/.scripts/summarize_progress/main.py
index 328fbfde6e..cee4ffca34 100644
--- a/.scripts/summarize_progress/main.py
+++ b/.scripts/summarize_progress/main.py
@@ -97,8 +97,9 @@ def format_issue_link(url: str) -> str:
return f"[{url.split('/')[-1]}]({url})" if len(url) > 0 else ''
-def format_line_file(filename: str, data: dict) -> str:
- return f"|`{filename}`|{data['progress']}|{format_issue_link(data['issue'])}|{data['assignee']}|\r\n"
+def format_line_file(dirname: str, filename: str, data: dict) -> str:
+ return f"|[`{filename}`](https://github.com/python/python-docs-zh-tw/tree/3.13/{dirname}/{filename})" + \
+ f"|{data['progress']}|{format_issue_link(data['issue'])}|{data['assignee']}|\r\n"
def format_line_directory(dirname: str) -> str:
@@ -152,7 +153,7 @@ def format_line_directory(dirname: str) -> str:
filedict_sorted = dict(sorted(filedict.items()))
for filename, filedata in filedict_sorted.items():
- writeliner.append(format_line_file(filename, filedata))
+ writeliner.append(format_line_file(dirname, filename, filedata))
with open(
f"summarize_progress/result.md",
diff --git a/Makefile b/Makefile
index f255eb901d..c0da35f4af 100644
--- a/Makefile
+++ b/Makefile
@@ -89,21 +89,21 @@ prepare_cpython: ## Prepare CPython clone at `../cpython/`.
$(VENV)/bin/activate:
- python3 -m venv $(VENV)
+ uv venv $(VENV)
$(VENV)/bin/sphinx-build: $(VENV)/bin/activate
- . $(VENV)/bin/activate; python3 -m pip install sphinx python-docs-theme
+ . $(VENV)/bin/activate; uv pip install sphinx python-docs-theme
$(VENV)/bin/sphinx-lint: $(VENV)/bin/activate
- . $(VENV)/bin/activate; python3 -m pip install sphinx-lint
+ . $(VENV)/bin/activate; uv pip install sphinx-lint
$(VENV)/bin/blurb: $(VENV)/bin/activate
- . $(VENV)/bin/activate; python3 -m pip install blurb
+ . $(VENV)/bin/activate; uv pip install blurb
.PHONY: upgrade_venv
upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc
- @. $(VENV)/bin/activate; python3 -m pip install -q --upgrade sphinx python-docs-theme blurb sphinx-lint
+ @. $(VENV)/bin/activate; uv pip install -q --upgrade sphinx python-docs-theme blurb sphinx-lint
.PHONY: progress
@@ -156,6 +156,10 @@ rm_cpython: ## Remove cloned cpython repo
lint: $(VENV)/bin/sphinx-lint ## Run sphinx-lint
$(VENV)/bin/sphinx-lint --enable default-role
+.PHONY: wrap
+wrap: ## Run powrap on modified po files
+ uvx powrap --modified
+
# This allows us to accept extra arguments (by doing nothing when we get a job that doesn't match, rather than throwing an error)
%:
@:
diff --git a/README.rst b/README.rst
index c239b4a89a..4a5fcd7f1e 100644
--- a/README.rst
+++ b/README.rst
@@ -84,6 +84,7 @@ the PSF for inclusion in the documentation.
- `安裝好 git `_\ (Windows
上請參考 https://gitforwindows.org/)
- 一個 ``.po`` 檔的編輯器。推薦使用 `Poedit `_,若熟悉 po 檔用一般文字編輯器亦可。
+- 參考 `uv Installation `_ 安裝 uv,以便在本機端預覽翻譯成果。
- macOS 的使用者還需要先利用 `homebrew `_ 安裝 gettext,屆時 Sphinx 會使用到。
.. code-block:: bash
@@ -232,7 +233,7 @@ the PSF for inclusion in the documentation.
其中最簡單的貢獻方式就是更新 *fuzzy entries*,讓曾經翻譯的內容保持與最新版本的文件
同步。請參考\ `尋找有翻譯過但需校閱的 fuzzy entries`_ 段落。
-此外,當前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
+此外,目前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
po 檔皆為首要的翻譯對象。你也可以幫忙校對已經翻譯過的內容。
diff --git a/TRANSLATORS b/TRANSLATORS
index 0eac99e39c..772cb45f33 100644
--- a/TRANSLATORS
+++ b/TRANSLATORS
@@ -18,6 +18,7 @@ Steven Hsu (StevenHsuYL)
Taihsiang Ho (tai271828)
Tsai, Chia-Wen
Wei-Hsiang (Matt) Wang
+Weilin Du (LamentXU)
Wilson Wang (Josix)
Yu Chun Yang
Jason (chairco)
diff --git a/about.po b/about.po
index 34c5041570..a95b16de88 100644
--- a/about.po
+++ b/about.po
@@ -1,5 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
@@ -14,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-08-05 00:19+0000\n"
+"POT-Creation-Date: 2025-01-01 00:15+0000\n"
"PO-Revision-Date: 2022-05-12 00:11+0800\n"
"Last-Translator: hsiao yi \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -27,18 +26,19 @@ msgstr ""
"X-Generator: Poedit 3.0.1\n"
#: ../../about.rst:3
-msgid "About these documents"
-msgstr "關於這些說明文件"
+msgid "About this documentation"
+msgstr "關於這份說明文件"
#: ../../about.rst:6
msgid ""
-"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, "
-"a document processor specifically written for the Python documentation."
+"Python's documentation is generated from `reStructuredText`_ sources using "
+"`Sphinx`_, a documentation generator originally created for Python and now "
+"maintained as an independent project."
msgstr ""
-"這些說明文件是透過 `Sphinx`_ (一個專為 Python 說明文件所撰寫的文件處理器)將"
-"使用 `reStructuredText`_ 撰寫的原始檔轉換而成。"
+"Python 說明文件是透過使用 `Sphinx`_\\ (一個原為 Python 而生的文件產生器、目"
+"前是以獨立專案形式來維護)將使用 `reStructuredText`_ 撰寫的原始檔轉換而成。"
-#: ../../about.rst:15
+#: ../../about.rst:16
msgid ""
"Development of the documentation and its toolchain is an entirely volunteer "
"effort, just like Python itself. If you want to contribute, please take a "
@@ -49,26 +49,26 @@ msgstr ""
"報臭蟲,請見 :ref:`reporting-bugs` 頁面,內含相關資訊。我們永遠歡迎新的自願者"
"加入!"
-#: ../../about.rst:20
+#: ../../about.rst:21
msgid "Many thanks go to:"
msgstr "致謝:"
-#: ../../about.rst:22
+#: ../../about.rst:23
msgid ""
"Fred L. Drake, Jr., the creator of the original Python documentation toolset "
-"and writer of much of the content;"
+"and author of much of the content;"
msgstr ""
"Fred L. Drake, Jr.,原始 Python 文件工具集的創造者以及一大部份內容的作者;"
-#: ../../about.rst:24
+#: ../../about.rst:25
msgid ""
"the `Docutils `_ project for creating "
"reStructuredText and the Docutils suite;"
msgstr ""
-"創造 reStructuredText 和 Docutils 工具組的 `Docutils `_ 專案;"
+"創造 reStructuredText 和 Docutils 工具組的 `Docutils `_ 專案;"
-#: ../../about.rst:26
+#: ../../about.rst:27
msgid ""
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
"got many good ideas."
@@ -76,11 +76,11 @@ msgstr ""
"Fredrik Lundh 先生,Sphinx 從他的 Alternative Python Reference 計劃中獲得許多"
"的好主意。"
-#: ../../about.rst:31
-msgid "Contributors to the Python Documentation"
+#: ../../about.rst:32
+msgid "Contributors to the Python documentation"
msgstr "Python 文件的貢獻者們"
-#: ../../about.rst:33
+#: ../../about.rst:34
msgid ""
"Many people have contributed to the Python language, the Python standard "
"library, and the Python documentation. See :source:`Misc/ACKS` in the "
@@ -89,7 +89,7 @@ msgstr ""
"許多人都曾為 Python 這門語言、Python 標準函式庫和 Python 說明文件貢獻過。"
"Python 所發佈的原始碼中含有部份貢獻者的清單,請見 :source:`Misc/ACKS` 。"
-#: ../../about.rst:37
+#: ../../about.rst:38
msgid ""
"It is only with the input and contributions of the Python community that "
"Python has such wonderful documentation -- Thank You!"
diff --git a/c-api/allocation.po b/c-api/allocation.po
index c4605012ef..e8713614a1 100644
--- a/c-api/allocation.po
+++ b/c-api/allocation.po
@@ -1,5 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
@@ -10,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-08-09 00:03+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2022-10-16 15:35+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -29,16 +28,13 @@ msgstr "在 heap 上分配物件"
#: ../../c-api/allocation.rst:17
msgid ""
"Initialize a newly allocated object *op* with its type and initial "
-"reference. Returns the initialized object. If *type* indicates that the "
-"object participates in the cyclic garbage detector, it is added to the "
-"detector's set of observed objects. Other fields of the object are not "
-"affected."
+"reference. Returns the initialized object. Other fields of the object are "
+"not affected."
msgstr ""
-"用它的型別和初始參照來初始化新分配物件 *op*。已初始化的物件會被回傳。如果 "
-"*type* 表示了該物件參與迴圈垃圾檢查器,則將其新增到檢查器的觀察物件集合中。物"
-"件的其他欄位不受影響。"
+"用它的型別和初始參照來初始化新分配物件 *op*。已初始化的物件會被回傳。物件的其"
+"他欄位不受影響。"
-#: ../../c-api/allocation.rst:26
+#: ../../c-api/allocation.rst:24
msgid ""
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
"length information for a variable-size object."
@@ -46,7 +42,7 @@ msgstr ""
"它會做到 :c:func:`PyObject_Init` 的所有功能,並且會初始化一個大小可變物件的長"
"度資訊。"
-#: ../../c-api/allocation.rst:32
+#: ../../c-api/allocation.rst:30
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
@@ -60,7 +56,14 @@ msgstr ""
"化;呼叫者會擁有那個對於物件的唯一參照(物件的參照計數為一)。記憶體分配大小"
"由 type 物件的 :c:member:`~PyTypeObject.tp_basicsize` 欄位來指定。"
-#: ../../c-api/allocation.rst:43
+#: ../../c-api/allocation.rst:38
+msgid ""
+"Note that this function is unsuitable if *typeobj* has :c:macro:"
+"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
+"instead."
+msgstr ""
+
+#: ../../c-api/allocation.rst:45
msgid ""
"Allocate a new Python object using the C structure type *TYPE* and the "
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
@@ -79,7 +82,14 @@ msgstr ""
"於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌"
"入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率。"
-#: ../../c-api/allocation.rst:57
+#: ../../c-api/allocation.rst:56
+msgid ""
+"Note that this function is unsuitable if *typeobj* has :c:macro:"
+"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` "
+"instead."
+msgstr ""
+
+#: ../../c-api/allocation.rst:63
msgid ""
"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:"
"macro:`PyObject_NewVar`. This is normally called from the :c:member:"
@@ -92,7 +102,7 @@ msgstr ""
"handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的"
"記憶體已不再是一個有效的 Python 物件。"
-#: ../../c-api/allocation.rst:66
+#: ../../c-api/allocation.rst:72
msgid ""
"Object which is visible in Python as ``None``. This should only be accessed "
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -101,10 +111,10 @@ msgstr ""
"這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存"
"取,該巨集的拿到指向該物件的指標。"
-#: ../../c-api/allocation.rst:73
-msgid ":c:func:`PyModule_Create`"
-msgstr ":c:func:`PyModule_Create`"
+#: ../../c-api/allocation.rst:79
+msgid ":ref:`moduleobjects`"
+msgstr ":ref:`moduleobjects`"
-#: ../../c-api/allocation.rst:74
+#: ../../c-api/allocation.rst:80
msgid "To allocate and create extension modules."
msgstr "分配記憶體和建立擴充模組。"
diff --git a/c-api/arg.po b/c-api/arg.po
index f62175c411..921b3bae7f 100644
--- a/c-api/arg.po
+++ b/c-api/arg.po
@@ -1,5 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
@@ -7,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-05-06 05:40+0000\n"
"PO-Revision-Date: 2022-10-16 03:21+0800\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -25,7 +24,7 @@ msgstr "剖析引數與建置數值"
#: ../../c-api/arg.rst:8
msgid ""
-"These functions are useful when creating your own extensions functions and "
+"These functions are useful when creating your own extension functions and "
"methods. Additional information and examples are available in :ref:"
"`extending-index`."
msgstr ""
@@ -41,7 +40,7 @@ msgstr ""
#: ../../c-api/arg.rst:19
msgid "Parsing arguments"
-msgstr ""
+msgstr "剖析引數"
#: ../../c-api/arg.rst:21
msgid ""
@@ -152,7 +151,7 @@ msgstr ""
#: ../../c-api/arg.rst:100
msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]"
-msgstr "``s*``\\ (:class:`str` 或 :term:`bytes-like object`)[Py_buffer]"
+msgstr "``s*`` (:class:`str` 或 :term:`bytes-like object`) [Py_buffer]"
#: ../../c-api/arg.rst:101
msgid ""
@@ -167,6 +166,8 @@ msgid ""
"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :"
"c:type:`Py_ssize_t`]"
msgstr ""
+"``s#`` (:class:`str`、唯讀的 :term:`bytes-like object`) [const char \\*, :c:"
+"type:`Py_ssize_t`]"
#: ../../c-api/arg.rst:107
msgid ""
@@ -177,9 +178,9 @@ msgid ""
"encoding."
msgstr ""
-#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:581
+#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:593
msgid "``z`` (:class:`str` or ``None``) [const char \\*]"
-msgstr "``z``\\ (:class:`str` 或 ``None``)[const char \\*]"
+msgstr "``z`` (:class:`str` 或 ``None``) [const char \\*]"
#: ../../c-api/arg.rst:114
msgid ""
@@ -191,7 +192,7 @@ msgstr ""
msgid ""
"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]"
msgstr ""
-"``z*``\\ (:class:`str`、:term:`bytes-like object` 或 ``None``)[Py_buffer]"
+"``z*`` (:class:`str`、:term:`bytes-like object` 或 ``None``) [Py_buffer]"
#: ../../c-api/arg.rst:118
msgid ""
@@ -204,6 +205,8 @@ msgid ""
"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) "
"[const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
+"``z#`` (:class:`str`、唯讀的 :term:`bytes-like object` 或 ``None``) [const "
+"char \\*, :c:type:`Py_ssize_t`]"
#: ../../c-api/arg.rst:122
msgid ""
@@ -213,7 +216,7 @@ msgstr ""
#: ../../c-api/arg.rst:125
msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]"
-msgstr "``y``\\ (唯讀 :term:`bytes-like object`)[const char \\*]"
+msgstr "``y`` (唯讀的 :term:`bytes-like object`) [const char \\*]"
#: ../../c-api/arg.rst:126
msgid ""
@@ -244,6 +247,8 @@ msgid ""
"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:"
"`Py_ssize_t`]"
msgstr ""
+"``y#`` (唯讀的 :term:`bytes-like object`) [const char \\*, :c:type:"
+"`Py_ssize_t`]"
#: ../../c-api/arg.rst:142
msgid ""
@@ -287,7 +292,7 @@ msgstr ""
#: ../../c-api/arg.rst:160
msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]"
-msgstr "``w*`` (可讀寫 :term:`bytes-like object`) [Py_buffer]"
+msgstr "``w*`` (可讀寫 :term:`bytes-like object`) [Py_buffer]"
#: ../../c-api/arg.rst:161
msgid ""
@@ -331,6 +336,8 @@ msgid ""
"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char "
"\\*encoding, char \\*\\*buffer]"
msgstr ""
+"``et`` (:class:`str`、:class:`bytes` 或 :class:`bytearray`) [const char "
+"\\*encoding, char \\*\\*buffer]"
#: ../../c-api/arg.rst:184
msgid ""
@@ -344,6 +351,8 @@ msgid ""
"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:"
"`Py_ssize_t` \\*buffer_length]"
msgstr ""
+"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:"
+"`Py_ssize_t` \\*buffer_length]"
#: ../../c-api/arg.rst:189
msgid ""
@@ -367,7 +376,7 @@ msgstr ""
#: ../../c-api/arg.rst:203
msgid "There are two modes of operation:"
-msgstr ""
+msgstr "有兩個操作模式:"
#: ../../c-api/arg.rst:205
msgid ""
@@ -417,38 +426,59 @@ msgid "Numbers"
msgstr "數字"
#: ../../c-api/arg.rst:232
+msgid ""
+"These formats allow representing Python numbers or single characters as C "
+"numbers. Formats that require :class:`int`, :class:`float` or :class:"
+"`complex` can also use the corresponding special methods :meth:`~object."
+"__index__`, :meth:`~object.__float__` or :meth:`~object.__complex__` to "
+"convert the Python object to the required type."
+msgstr ""
+
+#: ../../c-api/arg.rst:238
+msgid ""
+"For signed integer formats, :exc:`OverflowError` is raised if the value is "
+"out of range for the C type. For unsigned integer formats, no range checking "
+"is done --- the most significant bits are silently truncated when the "
+"receiving field is too small to receive the value."
+msgstr ""
+
+#: ../../c-api/arg.rst:244
msgid "``b`` (:class:`int`) [unsigned char]"
msgstr "``b`` (:class:`int`) [unsigned char]"
-#: ../../c-api/arg.rst:233
+#: ../../c-api/arg.rst:245
msgid ""
-"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :"
-"c:expr:`unsigned char`."
+"Convert a nonnegative Python integer to an unsigned tiny integer, stored in "
+"a C :c:expr:`unsigned char`."
msgstr ""
+"將一個 Python 非負整數轉換成無符號 tiny integer(小整數),儲存在 C 的 :c:"
+"expr:`unsigned`"
-#: ../../c-api/arg.rst:236 ../../c-api/arg.rst:615
+#: ../../c-api/arg.rst:248 ../../c-api/arg.rst:627
msgid "``B`` (:class:`int`) [unsigned char]"
msgstr "``B`` (:class:`int`) [unsigned char]"
-#: ../../c-api/arg.rst:237
+#: ../../c-api/arg.rst:249
msgid ""
-"Convert a Python integer to a tiny int without overflow checking, stored in "
-"a C :c:expr:`unsigned char`."
+"Convert a Python integer to a tiny integer without overflow checking, stored "
+"in a C :c:expr:`unsigned char`."
msgstr ""
+"將一個 Python 整數轉換成 tiny integer,轉換過程無溢位檢查,儲存在 C 的 :c:"
+"expr:`unsigned char`。"
-#: ../../c-api/arg.rst:240 ../../c-api/arg.rst:609
+#: ../../c-api/arg.rst:252 ../../c-api/arg.rst:621
msgid "``h`` (:class:`int`) [short int]"
msgstr "``h`` (:class:`int`) [short int]"
-#: ../../c-api/arg.rst:241
+#: ../../c-api/arg.rst:253
msgid "Convert a Python integer to a C :c:expr:`short int`."
msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`short int`。"
-#: ../../c-api/arg.rst:243 ../../c-api/arg.rst:618
+#: ../../c-api/arg.rst:255 ../../c-api/arg.rst:630
msgid "``H`` (:class:`int`) [unsigned short int]"
msgstr "``H`` (:class:`int`) [unsigned short int]"
-#: ../../c-api/arg.rst:244
+#: ../../c-api/arg.rst:256
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned short int`, without "
"overflow checking."
@@ -456,57 +486,57 @@ msgstr ""
"將一個 Python 整數轉換成 C 的 :c:expr:`unsigned short int`,轉換過程無溢位檢"
"查。"
-#: ../../c-api/arg.rst:247 ../../c-api/arg.rst:603
+#: ../../c-api/arg.rst:259 ../../c-api/arg.rst:615
msgid "``i`` (:class:`int`) [int]"
msgstr "``i`` (:class:`int`) [int]"
-#: ../../c-api/arg.rst:248
+#: ../../c-api/arg.rst:260
msgid "Convert a Python integer to a plain C :c:expr:`int`."
msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`int`。"
-#: ../../c-api/arg.rst:250 ../../c-api/arg.rst:621
+#: ../../c-api/arg.rst:262 ../../c-api/arg.rst:633
msgid "``I`` (:class:`int`) [unsigned int]"
msgstr "``I`` (:class:`int`) [unsigned int]"
-#: ../../c-api/arg.rst:251
+#: ../../c-api/arg.rst:263
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow "
"checking."
msgstr ""
"將一個 Python 整數轉換成 C 的 :c:expr:`unsigned int`,轉換過程無溢位檢查。"
-#: ../../c-api/arg.rst:254 ../../c-api/arg.rst:612
+#: ../../c-api/arg.rst:266 ../../c-api/arg.rst:624
msgid "``l`` (:class:`int`) [long int]"
msgstr "``l`` (:class:`int`) [long int]"
-#: ../../c-api/arg.rst:255
+#: ../../c-api/arg.rst:267
msgid "Convert a Python integer to a C :c:expr:`long int`."
msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`long int`。"
-#: ../../c-api/arg.rst:257 ../../c-api/arg.rst:624
+#: ../../c-api/arg.rst:269 ../../c-api/arg.rst:636
msgid "``k`` (:class:`int`) [unsigned long]"
msgstr "``k`` (:class:`int`) [unsigned long]"
-#: ../../c-api/arg.rst:258
+#: ../../c-api/arg.rst:270
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned long` without overflow "
"checking."
msgstr ""
"將一個 Python 整數轉換成 C 的 :c:expr:`unsigned long`,轉換過程無溢位檢查。"
-#: ../../c-api/arg.rst:261 ../../c-api/arg.rst:627
+#: ../../c-api/arg.rst:273 ../../c-api/arg.rst:639
msgid "``L`` (:class:`int`) [long long]"
msgstr "``L`` (:class:`int`) [long long]"
-#: ../../c-api/arg.rst:262
+#: ../../c-api/arg.rst:274
msgid "Convert a Python integer to a C :c:expr:`long long`."
msgstr "將一個 Python 整數轉換成 C 的 :c:expr:`long long`。"
-#: ../../c-api/arg.rst:264 ../../c-api/arg.rst:630
+#: ../../c-api/arg.rst:276 ../../c-api/arg.rst:644
msgid "``K`` (:class:`int`) [unsigned long long]"
msgstr "``K`` (:class:`int`) [unsigned long long]"
-#: ../../c-api/arg.rst:265
+#: ../../c-api/arg.rst:277
msgid ""
"Convert a Python integer to a C :c:expr:`unsigned long long` without "
"overflow checking."
@@ -514,71 +544,71 @@ msgstr ""
"將一個 Python 整數轉換成 C 的 :c:expr:`unsigned long long`,轉換過程無溢位檢"
"查。"
-#: ../../c-api/arg.rst:268 ../../c-api/arg.rst:633
+#: ../../c-api/arg.rst:280 ../../c-api/arg.rst:647
msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]"
msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:269
+#: ../../c-api/arg.rst:281
msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`."
msgstr "將一個 Python 整數轉換成 C 的 :c:type:`Py_ssize_t`。"
-#: ../../c-api/arg.rst:271
+#: ../../c-api/arg.rst:283
msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]"
-msgstr "``c``\\ (:class:`bytes` 或長度為 1 的 :class:`bytearray`)[char]"
+msgstr "``c`` (:class:`bytes` 或長度為 1 的 :class:`bytearray`) [char]"
-#: ../../c-api/arg.rst:272
+#: ../../c-api/arg.rst:284
msgid ""
"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` "
"object of length 1, to a C :c:expr:`char`."
msgstr ""
-#: ../../c-api/arg.rst:275
+#: ../../c-api/arg.rst:287
msgid "Allow :class:`bytearray` objects."
msgstr "允許 :class:`bytearray` 物件。"
-#: ../../c-api/arg.rst:278 ../../c-api/arg.rst:640
+#: ../../c-api/arg.rst:290 ../../c-api/arg.rst:654
msgid "``C`` (:class:`str` of length 1) [int]"
-msgstr "``C``\\ (長度為 1 的 :class:`str`)[int]"
+msgstr "``C`` (長度為 1 的 :class:`str`) [int]"
-#: ../../c-api/arg.rst:279
+#: ../../c-api/arg.rst:291
msgid ""
"Convert a Python character, represented as a :class:`str` object of length "
"1, to a C :c:expr:`int`."
msgstr ""
-#: ../../c-api/arg.rst:282 ../../c-api/arg.rst:647
+#: ../../c-api/arg.rst:294 ../../c-api/arg.rst:661
msgid "``f`` (:class:`float`) [float]"
msgstr "``f`` (:class:`float`) [float]"
-#: ../../c-api/arg.rst:283
+#: ../../c-api/arg.rst:295
msgid "Convert a Python floating-point number to a C :c:expr:`float`."
msgstr "將一個 Python 浮點數轉換成 C 的 :c:type::c:expr:`float`。"
-#: ../../c-api/arg.rst:285 ../../c-api/arg.rst:644
+#: ../../c-api/arg.rst:297 ../../c-api/arg.rst:658
msgid "``d`` (:class:`float`) [double]"
msgstr "``d`` (:class:`float`) [double]"
-#: ../../c-api/arg.rst:286
+#: ../../c-api/arg.rst:298
msgid "Convert a Python floating-point number to a C :c:expr:`double`."
msgstr "將一個 Python 浮點數轉換成 C 的 :c:type::c:expr:`double`。"
-#: ../../c-api/arg.rst:288
+#: ../../c-api/arg.rst:300
msgid "``D`` (:class:`complex`) [Py_complex]"
msgstr "``D`` (:class:`complex`) [Py_complex]"
-#: ../../c-api/arg.rst:289
+#: ../../c-api/arg.rst:301
msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure."
msgstr "將一個 Python 複數轉換成 C 的 :c:type:`Py_complex` 結構。"
-#: ../../c-api/arg.rst:292
+#: ../../c-api/arg.rst:304
msgid "Other objects"
msgstr "其他物件"
-#: ../../c-api/arg.rst:294 ../../c-api/arg.rst:653
+#: ../../c-api/arg.rst:306 ../../c-api/arg.rst:667
msgid "``O`` (object) [PyObject \\*]"
-msgstr "``O``\\ (物件)[PyObject \\*]"
+msgstr "``O`` (object) [PyObject \\*]"
-#: ../../c-api/arg.rst:295
+#: ../../c-api/arg.rst:307
msgid ""
"Store a Python object (without any conversion) in a C object pointer. The C "
"program thus receives the actual object that was passed. A new :term:"
@@ -586,11 +616,11 @@ msgid ""
"not increased). The pointer stored is not ``NULL``."
msgstr ""
-#: ../../c-api/arg.rst:301
+#: ../../c-api/arg.rst:313
msgid "``O!`` (object) [*typeobject*, PyObject \\*]"
-msgstr "``O!``\\ (物件)[*typeobject*, PyObject \\*]"
+msgstr "``O!`` (object) [*typeobject*, PyObject \\*]"
-#: ../../c-api/arg.rst:302
+#: ../../c-api/arg.rst:314
msgid ""
"Store a Python object in a C object pointer. This is similar to ``O``, but "
"takes two C arguments: the first is the address of a Python type object, the "
@@ -599,11 +629,11 @@ msgid ""
"required type, :exc:`TypeError` is raised."
msgstr ""
-#: ../../c-api/arg.rst:310 ../../c-api/arg.rst:671
-msgid "``O&`` (object) [*converter*, *anything*]"
-msgstr "``O&``\\ (物件)[*converter*, *anything*]"
+#: ../../c-api/arg.rst:322
+msgid "``O&`` (object) [*converter*, *address*]"
+msgstr "``O&`` (object) [*converter*, *address*]"
-#: ../../c-api/arg.rst:311
+#: ../../c-api/arg.rst:323
msgid ""
"Convert a Python object to a C variable through a *converter* function. "
"This takes two arguments: the first is a function, the second is the address "
@@ -611,11 +641,11 @@ msgid ""
"*converter* function in turn is called as follows::"
msgstr ""
-#: ../../c-api/arg.rst:316
+#: ../../c-api/arg.rst:328
msgid "status = converter(object, address);"
msgstr "status = converter(object, address);"
-#: ../../c-api/arg.rst:318
+#: ../../c-api/arg.rst:330
msgid ""
"where *object* is the Python object to be converted and *address* is the :c:"
"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The "
@@ -625,24 +655,30 @@ msgid ""
"unmodified."
msgstr ""
-#: ../../c-api/arg.rst:324
+#: ../../c-api/arg.rst:339
msgid ""
-"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a "
-"second time if the argument parsing eventually fails, giving the converter a "
-"chance to release any memory that it had already allocated. In this second "
-"call, the *object* parameter will be ``NULL``; *address* will have the same "
-"value as in the original call."
+"If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get "
+"called a second time if the argument parsing eventually fails, giving the "
+"converter a chance to release any memory that it had already allocated. In "
+"this second call, the *object* parameter will be ``NULL``; *address* will "
+"have the same value as in the original call."
msgstr ""
-#: ../../c-api/arg.rst:330
-msgid "``Py_CLEANUP_SUPPORTED`` was added."
-msgstr "加入 ``Py_CLEANUP_SUPPORTED``。"
+#: ../../c-api/arg.rst:345
+msgid ""
+"Examples of converters: :c:func:`PyUnicode_FSConverter` and :c:func:"
+"`PyUnicode_FSDecoder`."
+msgstr ""
+
+#: ../../c-api/arg.rst:348
+msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added."
+msgstr "新增 :c:macro:`!Py_CLEANUP_SUPPORTED`。"
-#: ../../c-api/arg.rst:333
+#: ../../c-api/arg.rst:351
msgid "``p`` (:class:`bool`) [int]"
msgstr "``p`` (:class:`bool`) [int]"
-#: ../../c-api/arg.rst:334
+#: ../../c-api/arg.rst:352
msgid ""
"Tests the value passed in for truth (a boolean **p**\\ redicate) and "
"converts the result to its equivalent C true/false integer value. Sets the "
@@ -651,37 +687,28 @@ msgid ""
"how Python tests values for truth."
msgstr ""
-#: ../../c-api/arg.rst:342 ../../c-api/arg.rst:677
+#: ../../c-api/arg.rst:360 ../../c-api/arg.rst:691
msgid "``(items)`` (:class:`tuple`) [*matching-items*]"
msgstr "``(items)`` (:class:`tuple`) [*matching-items*]"
-#: ../../c-api/arg.rst:343
+#: ../../c-api/arg.rst:361
msgid ""
"The object must be a Python sequence whose length is the number of format "
"units in *items*. The C arguments must correspond to the individual format "
"units in *items*. Format units for sequences may be nested."
msgstr ""
-#: ../../c-api/arg.rst:347
-msgid ""
-"It is possible to pass \"long\" integers (integers whose value exceeds the "
-"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- "
-"the most significant bits are silently truncated when the receiving field is "
-"too small to receive the value (actually, the semantics are inherited from "
-"downcasts in C --- your mileage may vary)."
-msgstr ""
-
-#: ../../c-api/arg.rst:353
+#: ../../c-api/arg.rst:365
msgid ""
"A few other characters have a meaning in a format string. These may not "
"occur inside nested parentheses. They are:"
msgstr ""
-#: ../../c-api/arg.rst:356
+#: ../../c-api/arg.rst:368
msgid "``|``"
msgstr "``|``"
-#: ../../c-api/arg.rst:357
+#: ../../c-api/arg.rst:369
msgid ""
"Indicates that the remaining arguments in the Python argument list are "
"optional. The C variables corresponding to optional arguments should be "
@@ -690,11 +717,11 @@ msgid ""
"corresponding C variable(s)."
msgstr ""
-#: ../../c-api/arg.rst:363
+#: ../../c-api/arg.rst:375
msgid "``$``"
msgstr "``$``"
-#: ../../c-api/arg.rst:364
+#: ../../c-api/arg.rst:376
msgid ""
":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining "
"arguments in the Python argument list are keyword-only. Currently, all "
@@ -702,36 +729,36 @@ msgid ""
"be specified before ``$`` in the format string."
msgstr ""
-#: ../../c-api/arg.rst:372
+#: ../../c-api/arg.rst:384
msgid "``:``"
msgstr "``:``"
-#: ../../c-api/arg.rst:373
+#: ../../c-api/arg.rst:385
msgid ""
"The list of format units ends here; the string after the colon is used as "
"the function name in error messages (the \"associated value\" of the "
"exception that :c:func:`PyArg_ParseTuple` raises)."
msgstr ""
-#: ../../c-api/arg.rst:377
+#: ../../c-api/arg.rst:389
msgid "``;``"
msgstr "``;``"
-#: ../../c-api/arg.rst:378
+#: ../../c-api/arg.rst:390
msgid ""
"The list of format units ends here; the string after the semicolon is used "
"as the error message *instead* of the default error message. ``:`` and ``;"
"`` mutually exclude each other."
msgstr ""
-#: ../../c-api/arg.rst:382
+#: ../../c-api/arg.rst:394
msgid ""
"Note that any Python object references which are provided to the caller are "
"*borrowed* references; do not release them (i.e. do not decrement their "
"reference count)!"
msgstr ""
-#: ../../c-api/arg.rst:386
+#: ../../c-api/arg.rst:398
msgid ""
"Additional arguments passed to these functions must be addresses of "
"variables whose type is determined by the format string; these are used to "
@@ -741,7 +768,7 @@ msgid ""
"unit in that case."
msgstr ""
-#: ../../c-api/arg.rst:392
+#: ../../c-api/arg.rst:404
msgid ""
"For the conversion to succeed, the *arg* object must match the format and "
"the format must be exhausted. On success, the ``PyArg_Parse*`` functions "
@@ -751,24 +778,24 @@ msgid ""
"the following format units are left untouched."
msgstr ""
-#: ../../c-api/arg.rst:401
+#: ../../c-api/arg.rst:413
msgid "API Functions"
msgstr "API 函式"
-#: ../../c-api/arg.rst:405
+#: ../../c-api/arg.rst:417
msgid ""
"Parse the parameters of a function that takes only positional parameters "
"into local variables. Returns true on success; on failure, it returns false "
"and raises the appropriate exception."
msgstr ""
-#: ../../c-api/arg.rst:412
+#: ../../c-api/arg.rst:424
msgid ""
"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list "
"rather than a variable number of arguments."
msgstr ""
-#: ../../c-api/arg.rst:418
+#: ../../c-api/arg.rst:430
msgid ""
"Parse the parameters of a function that takes both positional and keyword "
"parameters into local variables. The *keywords* argument is a ``NULL``-"
@@ -778,51 +805,51 @@ msgid ""
"failure, it returns false and raises the appropriate exception."
msgstr ""
-#: ../../c-api/arg.rst:429
+#: ../../c-api/arg.rst:441
msgid ""
"The *keywords* parameter declaration is :c:expr:`char * const *` in C and :c:"
"expr:`const char * const *` in C++. This can be overridden with the :c:macro:"
"`PY_CXX_CONST` macro."
msgstr ""
-#: ../../c-api/arg.rst:433
+#: ../../c-api/arg.rst:445
msgid ""
"Added support for :ref:`positional-only parameters `."
-msgstr ""
+msgstr "新增對\\ :ref:`僅限位置參數 `\\ 的支援。"
-#: ../../c-api/arg.rst:437
+#: ../../c-api/arg.rst:449
msgid ""
"The *keywords* parameter has now type :c:expr:`char * const *` in C and :c:"
"expr:`const char * const *` in C++, instead of :c:expr:`char **`. Added "
"support for non-ASCII keyword parameter names."
msgstr ""
-#: ../../c-api/arg.rst:446
+#: ../../c-api/arg.rst:458
msgid ""
"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a "
"va_list rather than a variable number of arguments."
msgstr ""
-#: ../../c-api/arg.rst:452
+#: ../../c-api/arg.rst:464
msgid ""
"Ensure that the keys in the keywords argument dictionary are strings. This "
"is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since "
"the latter already does this check."
msgstr ""
-#: ../../c-api/arg.rst:461
+#: ../../c-api/arg.rst:473
msgid ""
"Parse the parameter of a function that takes a single positional parameter "
"into a local variable. Returns true on success; on failure, it returns "
"false and raises the appropriate exception."
msgstr ""
-#: ../../c-api/arg.rst:465
+#: ../../c-api/arg.rst:477
msgid "Example::"
-msgstr ""
+msgstr "舉例來說: ::"
-#: ../../c-api/arg.rst:467
+#: ../../c-api/arg.rst:479
msgid ""
"// Function using METH_O calling convention\n"
"static PyObject*\n"
@@ -836,7 +863,7 @@ msgid ""
"}"
msgstr ""
-#: ../../c-api/arg.rst:481
+#: ../../c-api/arg.rst:493
msgid ""
"A simpler form of parameter retrieval which does not use a format string to "
"specify the types of the arguments. Functions which use this method to "
@@ -854,13 +881,13 @@ msgid ""
"if there was a failure."
msgstr ""
-#: ../../c-api/arg.rst:496
+#: ../../c-api/arg.rst:508
msgid ""
"This is an example of the use of this function, taken from the sources for "
"the :mod:`!_weakref` helper module for weak references::"
msgstr ""
-#: ../../c-api/arg.rst:499
+#: ../../c-api/arg.rst:511
msgid ""
"static PyObject *\n"
"weakref_ref(PyObject *self, PyObject *args)\n"
@@ -888,17 +915,17 @@ msgstr ""
" return result;\n"
"}"
-#: ../../c-api/arg.rst:512
+#: ../../c-api/arg.rst:524
msgid ""
"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely "
"equivalent to this call to :c:func:`PyArg_ParseTuple`::"
msgstr ""
-#: ../../c-api/arg.rst:515
+#: ../../c-api/arg.rst:527
msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)"
msgstr "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)"
-#: ../../c-api/arg.rst:519
+#: ../../c-api/arg.rst:531
msgid ""
"The value to be inserted, if any, before :c:expr:`char * const *` in the "
"*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` "
@@ -907,11 +934,11 @@ msgid ""
"to the desired value before including :file:`Python.h`."
msgstr ""
-#: ../../c-api/arg.rst:533
+#: ../../c-api/arg.rst:545
msgid "Building values"
-msgstr ""
+msgstr "建置數值"
-#: ../../c-api/arg.rst:537
+#: ../../c-api/arg.rst:549
msgid ""
"Create a new value based on a format string similar to those accepted by the "
"``PyArg_Parse*`` family of functions and a sequence of values. Returns the "
@@ -919,7 +946,7 @@ msgid ""
"``NULL`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:542
+#: ../../c-api/arg.rst:554
msgid ""
":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple "
"only if its format string contains two or more format units. If the format "
@@ -928,7 +955,7 @@ msgid ""
"it to return a tuple of size 0 or one, parenthesize the format string."
msgstr ""
-#: ../../c-api/arg.rst:548
+#: ../../c-api/arg.rst:560
msgid ""
"When memory buffers are passed as parameters to supply data to build "
"objects, as for the ``s`` and ``s#`` formats, the required data is copied. "
@@ -939,7 +966,7 @@ msgid ""
"`Py_BuildValue` returns."
msgstr ""
-#: ../../c-api/arg.rst:556
+#: ../../c-api/arg.rst:568
msgid ""
"In the following description, the quoted form is the format unit; the entry "
"in (round) parentheses is the Python object type that the format unit will "
@@ -947,155 +974,155 @@ msgid ""
"be passed."
msgstr ""
-#: ../../c-api/arg.rst:560
+#: ../../c-api/arg.rst:572
msgid ""
"The characters space, tab, colon and comma are ignored in format strings "
"(but not within format units such as ``s#``). This can be used to make long "
"format strings a tad more readable."
msgstr ""
-#: ../../c-api/arg.rst:564
+#: ../../c-api/arg.rst:576
msgid "``s`` (:class:`str` or ``None``) [const char \\*]"
-msgstr "``s``\\ (:class:`str` 或 ``None``)[const char \\*]"
+msgstr "``s`` (:class:`str` 或 ``None``) [const char \\*]"
-#: ../../c-api/arg.rst:565
+#: ../../c-api/arg.rst:577
msgid ""
"Convert a null-terminated C string to a Python :class:`str` object using "
"``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used."
msgstr ""
-#: ../../c-api/arg.rst:568
+#: ../../c-api/arg.rst:580
msgid ""
"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-"``s#``\\ (:class:`str` 或 ``None``)[const char \\*, :c:type:`Py_ssize_t`]"
+"``s#`` (:class:`str` 或 ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:569
+#: ../../c-api/arg.rst:581
msgid ""
"Convert a C string and its length to a Python :class:`str` object using "
"``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is "
"ignored and ``None`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:573
+#: ../../c-api/arg.rst:585
msgid "``y`` (:class:`bytes`) [const char \\*]"
msgstr "``y`` (:class:`bytes`) [const char \\*]"
-#: ../../c-api/arg.rst:574
+#: ../../c-api/arg.rst:586
msgid ""
"This converts a C string to a Python :class:`bytes` object. If the C string "
"pointer is ``NULL``, ``None`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:577
+#: ../../c-api/arg.rst:589
msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:578
+#: ../../c-api/arg.rst:590
msgid ""
"This converts a C string and its lengths to a Python object. If the C "
"string pointer is ``NULL``, ``None`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:582 ../../c-api/arg.rst:598
+#: ../../c-api/arg.rst:594 ../../c-api/arg.rst:610
msgid "Same as ``s``."
msgstr "和 ``s`` 相同。"
-#: ../../c-api/arg.rst:584
+#: ../../c-api/arg.rst:596
msgid ""
"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-"``z#``\\ (:class:`str` 或 ``None``)[const char \\*, :c:type:`Py_ssize_t`]"
+"``z#`` (:class:`str` 或 ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:585 ../../c-api/arg.rst:601
+#: ../../c-api/arg.rst:597 ../../c-api/arg.rst:613
msgid "Same as ``s#``."
msgstr "和 ``s#`` 相同。"
-#: ../../c-api/arg.rst:587
+#: ../../c-api/arg.rst:599
msgid "``u`` (:class:`str`) [const wchar_t \\*]"
msgstr "``u`` (:class:`str`) [const wchar_t \\*]"
-#: ../../c-api/arg.rst:588
+#: ../../c-api/arg.rst:600
msgid ""
"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or "
"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is "
"``NULL``, ``None`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:592
+#: ../../c-api/arg.rst:604
msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]"
msgstr "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:593
+#: ../../c-api/arg.rst:605
msgid ""
"Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python "
"Unicode object. If the Unicode buffer pointer is ``NULL``, the length is "
"ignored and ``None`` is returned."
msgstr ""
-#: ../../c-api/arg.rst:597
+#: ../../c-api/arg.rst:609
msgid "``U`` (:class:`str` or ``None``) [const char \\*]"
-msgstr "``U``\\ (:class:`str` 或 ``None``)[const char \\*]"
+msgstr "``U`` (:class:`str` 或 ``None``) [const char \\*]"
-#: ../../c-api/arg.rst:600
+#: ../../c-api/arg.rst:612
msgid ""
"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
msgstr ""
-"``U#``\\ (:class:`str` 或 ``None``)[const char \\*, :c:type:`Py_ssize_t`]"
+"``U#`` (:class:`str` 或 ``None``) [const char \\*, :c:type:`Py_ssize_t`]"
-#: ../../c-api/arg.rst:604
+#: ../../c-api/arg.rst:616
msgid "Convert a plain C :c:expr:`int` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`int` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:606
+#: ../../c-api/arg.rst:618
msgid "``b`` (:class:`int`) [char]"
msgstr "``b`` (:class:`int`) [char]"
-#: ../../c-api/arg.rst:607
+#: ../../c-api/arg.rst:619
msgid "Convert a plain C :c:expr:`char` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`char` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:610
+#: ../../c-api/arg.rst:622
msgid "Convert a plain C :c:expr:`short int` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`short int` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:613
+#: ../../c-api/arg.rst:625
msgid "Convert a C :c:expr:`long int` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`long int` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:616
+#: ../../c-api/arg.rst:628
msgid "Convert a C :c:expr:`unsigned char` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`unsigned char` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:619
+#: ../../c-api/arg.rst:631
msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`unsigned short int` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:622
+#: ../../c-api/arg.rst:634
msgid "Convert a C :c:expr:`unsigned int` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`unsigned int` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:625
+#: ../../c-api/arg.rst:637
msgid "Convert a C :c:expr:`unsigned long` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`unsigned long` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:628
+#: ../../c-api/arg.rst:640
msgid "Convert a C :c:expr:`long long` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`long long` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:631
+#: ../../c-api/arg.rst:645
msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object."
msgstr "將一個 C 的 :c:expr:`unsigned long long` 轉換成 Python 整數物件。"
-#: ../../c-api/arg.rst:634
+#: ../../c-api/arg.rst:648
msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer."
msgstr "將一個 C 的 :c:type:`Py_ssize_t` 轉換成 Python 整數。"
-#: ../../c-api/arg.rst:636
+#: ../../c-api/arg.rst:650
msgid "``c`` (:class:`bytes` of length 1) [char]"
-msgstr "``c``\\ (長度為 1 的 :class:`bytes`)[char]"
+msgstr "``c`` (長度為 1 的 :class:`bytes`) [char]"
-#: ../../c-api/arg.rst:637
+#: ../../c-api/arg.rst:651
msgid ""
"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` "
"object of length 1."
@@ -1103,7 +1130,7 @@ msgstr ""
"將一個 C 中代表一個位元組的 :c:expr:`int` 轉換成 Python 中長度為一的 :class:"
"`bytes`。"
-#: ../../c-api/arg.rst:641
+#: ../../c-api/arg.rst:655
msgid ""
"Convert a C :c:expr:`int` representing a character to Python :class:`str` "
"object of length 1."
@@ -1111,23 +1138,23 @@ msgstr ""
"將一個 C 中代表一個字元的 :c:expr:`int` 轉換成 Python 中長度為一的 :class:"
"`str`。"
-#: ../../c-api/arg.rst:645
+#: ../../c-api/arg.rst:659
msgid "Convert a C :c:expr:`double` to a Python floating-point number."
msgstr "將一個 C 的 :c:expr:`double` 轉換成 Python 浮點數。"
-#: ../../c-api/arg.rst:648
+#: ../../c-api/arg.rst:662
msgid "Convert a C :c:expr:`float` to a Python floating-point number."
msgstr "將一個 C 的 :c:expr:`float` 轉換成 Python 浮點數。"
-#: ../../c-api/arg.rst:650
+#: ../../c-api/arg.rst:664
msgid "``D`` (:class:`complex`) [Py_complex \\*]"
msgstr "``D`` (:class:`complex`) [Py_complex \\*]"
-#: ../../c-api/arg.rst:651
+#: ../../c-api/arg.rst:665
msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number."
msgstr "將一個 C 的 :c:type:`Py_complex` 結構轉換成 Python 複數。"
-#: ../../c-api/arg.rst:654
+#: ../../c-api/arg.rst:668
msgid ""
"Pass a Python object untouched but create a new :term:`strong reference` to "
"it (i.e. its reference count is incremented by one). If the object passed in "
@@ -1137,26 +1164,30 @@ msgid ""
"no exception has been raised yet, :exc:`SystemError` is set."
msgstr ""
-#: ../../c-api/arg.rst:663
+#: ../../c-api/arg.rst:677
msgid "``S`` (object) [PyObject \\*]"
-msgstr "``S``\\ (物件)[PyObject \\*]"
+msgstr "``S`` (object) [PyObject \\*]"
-#: ../../c-api/arg.rst:664
+#: ../../c-api/arg.rst:678
msgid "Same as ``O``."
msgstr "和 ``O`` 相同。"
-#: ../../c-api/arg.rst:666
+#: ../../c-api/arg.rst:680
msgid "``N`` (object) [PyObject \\*]"
-msgstr "``N``\\ (物件)[PyObject \\*]"
+msgstr "``N`` (object) [PyObject \\*]"
-#: ../../c-api/arg.rst:667
+#: ../../c-api/arg.rst:681
msgid ""
"Same as ``O``, except it doesn't create a new :term:`strong reference`. "
"Useful when the object is created by a call to an object constructor in the "
"argument list."
msgstr ""
-#: ../../c-api/arg.rst:672
+#: ../../c-api/arg.rst:685
+msgid "``O&`` (object) [*converter*, *anything*]"
+msgstr "``O&`` (object) [*converter*, *anything*]"
+
+#: ../../c-api/arg.rst:686
msgid ""
"Convert *anything* to a Python object through a *converter* function. The "
"function is called with *anything* (which should be compatible with :c:expr:"
@@ -1164,40 +1195,40 @@ msgid ""
"``NULL`` if an error occurred."
msgstr ""
-#: ../../c-api/arg.rst:678
+#: ../../c-api/arg.rst:692
msgid ""
"Convert a sequence of C values to a Python tuple with the same number of "
"items."
msgstr ""
-#: ../../c-api/arg.rst:680
+#: ../../c-api/arg.rst:694
msgid "``[items]`` (:class:`list`) [*matching-items*]"
msgstr "``[items]`` (:class:`list`) [*matching-items*]"
-#: ../../c-api/arg.rst:681
+#: ../../c-api/arg.rst:695
msgid ""
"Convert a sequence of C values to a Python list with the same number of "
"items."
msgstr ""
-#: ../../c-api/arg.rst:683
+#: ../../c-api/arg.rst:697
msgid "``{items}`` (:class:`dict`) [*matching-items*]"
msgstr "``{items}`` (:class:`dict`) [*matching-items*]"
-#: ../../c-api/arg.rst:684
+#: ../../c-api/arg.rst:698
msgid ""
"Convert a sequence of C values to a Python dictionary. Each pair of "
"consecutive C values adds one item to the dictionary, serving as key and "
"value, respectively."
msgstr ""
-#: ../../c-api/arg.rst:688
+#: ../../c-api/arg.rst:702
msgid ""
"If there is an error in the format string, the :exc:`SystemError` exception "
"is set and ``NULL`` returned."
msgstr ""
-#: ../../c-api/arg.rst:693
+#: ../../c-api/arg.rst:707
msgid ""
"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list "
"rather than a variable number of arguments."
diff --git a/c-api/buffer.po b/c-api/buffer.po
index d183ac606f..5248994757 100644
--- a/c-api/buffer.po
+++ b/c-api/buffer.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-24 23:08+0000\n"
+"POT-Creation-Date: 2025-05-02 00:15+0000\n"
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -41,24 +41,26 @@ msgstr ""
#: ../../c-api/buffer.rst:29
msgid ""
-"Python provides such a facility at the C level in the form of the :ref:"
-"`buffer protocol `. This protocol has two sides:"
+"Python provides such a facility at the C and Python level in the form of "
+"the :ref:`buffer protocol `. This protocol has two sides:"
msgstr ""
#: ../../c-api/buffer.rst:34
msgid ""
"on the producer side, a type can export a \"buffer interface\" which allows "
"objects of that type to expose information about their underlying buffer. "
-"This interface is described in the section :ref:`buffer-structs`;"
+"This interface is described in the section :ref:`buffer-structs`; for Python "
+"see :ref:`python-buffer-protocol`."
msgstr ""
-#: ../../c-api/buffer.rst:38
+#: ../../c-api/buffer.rst:39
msgid ""
"on the consumer side, several means are available to obtain a pointer to the "
-"raw underlying data of an object (for example a method parameter)."
+"raw underlying data of an object (for example a method parameter). For "
+"Python see :class:`memoryview`."
msgstr ""
-#: ../../c-api/buffer.rst:41
+#: ../../c-api/buffer.rst:43
msgid ""
"Simple objects such as :class:`bytes` and :class:`bytearray` expose their "
"underlying buffer in byte-oriented form. Other forms are possible; for "
@@ -66,7 +68,7 @@ msgid ""
"values."
msgstr ""
-#: ../../c-api/buffer.rst:45
+#: ../../c-api/buffer.rst:47
msgid ""
"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase."
"write` method of file objects: any object that can export a series of bytes "
@@ -78,23 +80,23 @@ msgid ""
"buffers."
msgstr ""
-#: ../../c-api/buffer.rst:53
+#: ../../c-api/buffer.rst:55
msgid ""
"There are two ways for a consumer of the buffer interface to acquire a "
"buffer over a target object:"
msgstr ""
-#: ../../c-api/buffer.rst:56
+#: ../../c-api/buffer.rst:58
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
msgstr ""
-#: ../../c-api/buffer.rst:58
+#: ../../c-api/buffer.rst:60
msgid ""
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
"``y*``, ``w*`` or ``s*`` :ref:`format codes `."
msgstr ""
-#: ../../c-api/buffer.rst:61
+#: ../../c-api/buffer.rst:63
msgid ""
"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer "
"isn't needed anymore. Failure to do so could lead to various issues such as "
@@ -102,10 +104,16 @@ msgid ""
msgstr ""
#: ../../c-api/buffer.rst:69
+msgid ""
+"The buffer protocol is now accessible in Python, see :ref:`python-buffer-"
+"protocol` and :class:`memoryview`."
+msgstr ""
+
+#: ../../c-api/buffer.rst:75
msgid "Buffer structure"
msgstr ""
-#: ../../c-api/buffer.rst:71
+#: ../../c-api/buffer.rst:77
msgid ""
"Buffer structures (or simply \"buffers\") are useful as a way to expose the "
"binary data from another object to the Python programmer. They can also be "
@@ -117,7 +125,7 @@ msgid ""
"in its native, in-memory format."
msgstr ""
-#: ../../c-api/buffer.rst:80
+#: ../../c-api/buffer.rst:86
msgid ""
"Contrary to most data types exposed by the Python interpreter, buffers are "
"not :c:type:`PyObject` pointers but rather simple C structures. This allows "
@@ -126,14 +134,14 @@ msgid ""
"created."
msgstr ""
-#: ../../c-api/buffer.rst:86
+#: ../../c-api/buffer.rst:92
msgid ""
"For short instructions how to write an exporting object, see :ref:`Buffer "
"Object Structures `. For obtaining a buffer, see :c:func:"
"`PyObject_GetBuffer`."
msgstr ""
-#: ../../c-api/buffer.rst:94
+#: ../../c-api/buffer.rst:100
msgid ""
"A pointer to the start of the logical structure described by the buffer "
"fields. This can be any location within the underlying physical memory block "
@@ -141,13 +149,13 @@ msgid ""
"the value may point to the end of the memory block."
msgstr ""
-#: ../../c-api/buffer.rst:99
+#: ../../c-api/buffer.rst:105
msgid ""
"For :term:`contiguous` arrays, the value points to the beginning of the "
"memory block."
msgstr ""
-#: ../../c-api/buffer.rst:104
+#: ../../c-api/buffer.rst:110
msgid ""
"A new reference to the exporting object. The reference is owned by the "
"consumer and automatically released (i.e. reference count decremented) and "
@@ -155,14 +163,14 @@ msgid ""
"of the return value of any standard C-API function."
msgstr ""
-#: ../../c-api/buffer.rst:111
+#: ../../c-api/buffer.rst:117
msgid ""
"As a special case, for *temporary* buffers that are wrapped by :c:func:"
"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is "
"``NULL``. In general, exporting objects MUST NOT use this scheme."
msgstr ""
-#: ../../c-api/buffer.rst:118
+#: ../../c-api/buffer.rst:124
msgid ""
"``product(shape) * itemsize``. For contiguous arrays, this is the length of "
"the underlying memory block. For non-contiguous arrays, it is the length "
@@ -170,7 +178,7 @@ msgid ""
"representation."
msgstr ""
-#: ../../c-api/buffer.rst:123
+#: ../../c-api/buffer.rst:129
msgid ""
"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if "
"the buffer has been obtained by a request that guarantees contiguity. In "
@@ -178,19 +186,19 @@ msgid ""
"`PyBUF_WRITABLE`."
msgstr ""
-#: ../../c-api/buffer.rst:129
+#: ../../c-api/buffer.rst:135
msgid ""
"An indicator of whether the buffer is read-only. This field is controlled by "
"the :c:macro:`PyBUF_WRITABLE` flag."
msgstr ""
-#: ../../c-api/buffer.rst:134
+#: ../../c-api/buffer.rst:140
msgid ""
"Item size in bytes of a single element. Same as the value of :func:`struct."
"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values."
msgstr ""
-#: ../../c-api/buffer.rst:137
+#: ../../c-api/buffer.rst:143
msgid ""
"Important exception: If a consumer requests a buffer without the :c:macro:"
"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to "
@@ -198,32 +206,32 @@ msgid ""
"original format."
msgstr ""
-#: ../../c-api/buffer.rst:142
+#: ../../c-api/buffer.rst:148
msgid ""
"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * "
"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer."
"itemsize` to navigate the buffer."
msgstr ""
-#: ../../c-api/buffer.rst:146
+#: ../../c-api/buffer.rst:152
msgid ""
"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:"
"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must "
"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``."
msgstr ""
-#: ../../c-api/buffer.rst:152
+#: ../../c-api/buffer.rst:158
msgid ""
"A *NULL* terminated string in :mod:`struct` module style syntax describing "
"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned "
"bytes) is assumed."
msgstr ""
-#: ../../c-api/buffer.rst:156
+#: ../../c-api/buffer.rst:162
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
msgstr ""
-#: ../../c-api/buffer.rst:160
+#: ../../c-api/buffer.rst:166
msgid ""
"The number of dimensions the memory represents as an n-dimensional array. If "
"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing "
@@ -232,7 +240,7 @@ msgid ""
"number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`."
msgstr ""
-#: ../../c-api/buffer.rst:168
+#: ../../c-api/buffer.rst:174
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"indicating the shape of the memory as an n-dimensional array. Note that "
@@ -240,34 +248,34 @@ msgid ""
"`~Py_buffer.len`."
msgstr ""
-#: ../../c-api/buffer.rst:173
+#: ../../c-api/buffer.rst:179
msgid ""
"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` "
"requires special attention. See `complex arrays`_ for further information."
msgstr ""
-#: ../../c-api/buffer.rst:177
+#: ../../c-api/buffer.rst:183
msgid "The shape array is read-only for the consumer."
msgstr ""
-#: ../../c-api/buffer.rst:181
+#: ../../c-api/buffer.rst:187
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"giving the number of bytes to skip to get to a new element in each dimension."
msgstr ""
-#: ../../c-api/buffer.rst:185
+#: ../../c-api/buffer.rst:191
msgid ""
"Stride values can be any integer. For regular arrays, strides are usually "
"positive, but a consumer MUST be able to handle the case ``strides[n] <= "
"0``. See `complex arrays`_ for further information."
msgstr ""
-#: ../../c-api/buffer.rst:189
+#: ../../c-api/buffer.rst:195
msgid "The strides array is read-only for the consumer."
msgstr ""
-#: ../../c-api/buffer.rst:193
+#: ../../c-api/buffer.rst:199
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If "
"``suboffsets[n] >= 0``, the values stored along the nth dimension are "
@@ -276,24 +284,24 @@ msgid ""
"that no de-referencing should occur (striding in a contiguous memory block)."
msgstr ""
-#: ../../c-api/buffer.rst:200
+#: ../../c-api/buffer.rst:206
msgid ""
"If all suboffsets are negative (i.e. no de-referencing is needed), then this "
"field must be ``NULL`` (the default value)."
msgstr ""
-#: ../../c-api/buffer.rst:203
+#: ../../c-api/buffer.rst:209
msgid ""
"This type of array representation is used by the Python Imaging Library "
"(PIL). See `complex arrays`_ for further information how to access elements "
"of such an array."
msgstr ""
-#: ../../c-api/buffer.rst:207
+#: ../../c-api/buffer.rst:213
msgid "The suboffsets array is read-only for the consumer."
msgstr ""
-#: ../../c-api/buffer.rst:211
+#: ../../c-api/buffer.rst:217
msgid ""
"This is for use internally by the exporting object. For example, this might "
"be re-cast as an integer by the exporter and used to store flags about "
@@ -301,22 +309,22 @@ msgid ""
"the buffer is released. The consumer MUST NOT alter this value."
msgstr ""
-#: ../../c-api/buffer.rst:218
+#: ../../c-api/buffer.rst:224
msgid "Constants:"
msgstr "常數:"
-#: ../../c-api/buffer.rst:222
+#: ../../c-api/buffer.rst:228
msgid ""
"The maximum number of dimensions the memory represents. Exporters MUST "
"respect this limit, consumers of multi-dimensional buffers SHOULD be able to "
"handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64."
msgstr ""
-#: ../../c-api/buffer.rst:231
+#: ../../c-api/buffer.rst:237
msgid "Buffer request types"
msgstr ""
-#: ../../c-api/buffer.rst:233
+#: ../../c-api/buffer.rst:239
msgid ""
"Buffers are usually obtained by sending a buffer request to an exporting "
"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical "
@@ -324,16 +332,16 @@ msgid ""
"argument to specify the exact buffer type it can handle."
msgstr ""
-#: ../../c-api/buffer.rst:238
+#: ../../c-api/buffer.rst:244
msgid ""
"All :c:type:`Py_buffer` fields are unambiguously defined by the request type."
msgstr ""
-#: ../../c-api/buffer.rst:242
+#: ../../c-api/buffer.rst:248
msgid "request-independent fields"
msgstr ""
-#: ../../c-api/buffer.rst:243
+#: ../../c-api/buffer.rst:249
msgid ""
"The following fields are not influenced by *flags* and must always be filled "
"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:"
@@ -341,11 +349,11 @@ msgid ""
"itemsize`, :c:member:`~Py_buffer.ndim`."
msgstr ""
-#: ../../c-api/buffer.rst:248
+#: ../../c-api/buffer.rst:254
msgid "readonly, format"
msgstr ""
-#: ../../c-api/buffer.rst:252
+#: ../../c-api/buffer.rst:258
msgid ""
"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter "
"MUST provide a writable buffer or else report failure. Otherwise, the "
@@ -354,13 +362,13 @@ msgid ""
"PyBUF_WRITABLE` can be used to request a simple writable buffer."
msgstr ""
-#: ../../c-api/buffer.rst:260
+#: ../../c-api/buffer.rst:266
msgid ""
"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be "
"filled in correctly. Otherwise, this field MUST be ``NULL``."
msgstr ""
-#: ../../c-api/buffer.rst:264
+#: ../../c-api/buffer.rst:270
msgid ""
":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next "
"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:"
@@ -368,159 +376,159 @@ msgid ""
"writable buffer."
msgstr ""
-#: ../../c-api/buffer.rst:268
+#: ../../c-api/buffer.rst:274
msgid ""
":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:"
"`PyBUF_SIMPLE`, because the latter already implies format ``B`` (unsigned "
"bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own."
msgstr ""
-#: ../../c-api/buffer.rst:274
+#: ../../c-api/buffer.rst:280
msgid "shape, strides, suboffsets"
msgstr ""
-#: ../../c-api/buffer.rst:276
+#: ../../c-api/buffer.rst:282
msgid ""
"The flags that control the logical structure of the memory are listed in "
"decreasing order of complexity. Note that each flag contains all bits of the "
"flags below it."
msgstr ""
-#: ../../c-api/buffer.rst:283 ../../c-api/buffer.rst:307
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
+#: ../../c-api/buffer.rst:338
msgid "Request"
msgstr ""
-#: ../../c-api/buffer.rst:283 ../../c-api/buffer.rst:307
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
+#: ../../c-api/buffer.rst:338
msgid "shape"
msgstr ""
-#: ../../c-api/buffer.rst:283 ../../c-api/buffer.rst:307
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
+#: ../../c-api/buffer.rst:338
msgid "strides"
msgstr ""
-#: ../../c-api/buffer.rst:283 ../../c-api/buffer.rst:307
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
+#: ../../c-api/buffer.rst:338
msgid "suboffsets"
msgstr ""
-#: ../../c-api/buffer.rst:285 ../../c-api/buffer.rst:287
-#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:309
-#: ../../c-api/buffer.rst:311 ../../c-api/buffer.rst:313
-#: ../../c-api/buffer.rst:315 ../../c-api/buffer.rst:334
-#: ../../c-api/buffer.rst:336 ../../c-api/buffer.rst:338
-#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:342
-#: ../../c-api/buffer.rst:344 ../../c-api/buffer.rst:346
-#: ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:291 ../../c-api/buffer.rst:293
+#: ../../c-api/buffer.rst:295 ../../c-api/buffer.rst:315
+#: ../../c-api/buffer.rst:317 ../../c-api/buffer.rst:319
+#: ../../c-api/buffer.rst:321 ../../c-api/buffer.rst:340
+#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:344
+#: ../../c-api/buffer.rst:346 ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:352
+#: ../../c-api/buffer.rst:354
msgid "yes"
msgstr ""
-#: ../../c-api/buffer.rst:285 ../../c-api/buffer.rst:334
-#: ../../c-api/buffer.rst:336
+#: ../../c-api/buffer.rst:291 ../../c-api/buffer.rst:340
+#: ../../c-api/buffer.rst:342
msgid "if needed"
msgstr ""
-#: ../../c-api/buffer.rst:287 ../../c-api/buffer.rst:289
-#: ../../c-api/buffer.rst:291 ../../c-api/buffer.rst:309
-#: ../../c-api/buffer.rst:311 ../../c-api/buffer.rst:313
-#: ../../c-api/buffer.rst:315 ../../c-api/buffer.rst:338
-#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:342
-#: ../../c-api/buffer.rst:344 ../../c-api/buffer.rst:346
-#: ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:293 ../../c-api/buffer.rst:295
+#: ../../c-api/buffer.rst:297 ../../c-api/buffer.rst:315
+#: ../../c-api/buffer.rst:317 ../../c-api/buffer.rst:319
+#: ../../c-api/buffer.rst:321 ../../c-api/buffer.rst:344
+#: ../../c-api/buffer.rst:346 ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:352
+#: ../../c-api/buffer.rst:354
msgid "NULL"
msgstr "NULL"
-#: ../../c-api/buffer.rst:298
+#: ../../c-api/buffer.rst:304
msgid "contiguity requests"
msgstr ""
-#: ../../c-api/buffer.rst:300
+#: ../../c-api/buffer.rst:306
msgid ""
"C or Fortran :term:`contiguity ` can be explicitly requested, "
"with and without stride information. Without stride information, the buffer "
"must be C-contiguous."
msgstr ""
-#: ../../c-api/buffer.rst:307 ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:313 ../../c-api/buffer.rst:338
msgid "contig"
msgstr ""
-#: ../../c-api/buffer.rst:309 ../../c-api/buffer.rst:315
-#: ../../c-api/buffer.rst:346 ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:315 ../../c-api/buffer.rst:321
+#: ../../c-api/buffer.rst:352 ../../c-api/buffer.rst:354
msgid "C"
msgstr "C"
-#: ../../c-api/buffer.rst:311
+#: ../../c-api/buffer.rst:317
msgid "F"
msgstr "F"
-#: ../../c-api/buffer.rst:313
+#: ../../c-api/buffer.rst:319
msgid "C or F"
msgstr "C 或 F"
-#: ../../c-api/buffer.rst:315
+#: ../../c-api/buffer.rst:321
msgid ":c:macro:`PyBUF_ND`"
msgstr ":c:macro:`PyBUF_ND`"
-#: ../../c-api/buffer.rst:320
+#: ../../c-api/buffer.rst:326
msgid "compound requests"
msgstr ""
-#: ../../c-api/buffer.rst:322
+#: ../../c-api/buffer.rst:328
msgid ""
"All possible requests are fully defined by some combination of the flags in "
"the previous section. For convenience, the buffer protocol provides "
"frequently used combinations as single flags."
msgstr ""
-#: ../../c-api/buffer.rst:326
+#: ../../c-api/buffer.rst:332
msgid ""
"In the following table *U* stands for undefined contiguity. The consumer "
"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity."
msgstr ""
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:338
msgid "readonly"
msgstr ""
-#: ../../c-api/buffer.rst:332
+#: ../../c-api/buffer.rst:338
msgid "format"
msgstr ""
-#: ../../c-api/buffer.rst:334 ../../c-api/buffer.rst:336
-#: ../../c-api/buffer.rst:338 ../../c-api/buffer.rst:340
-#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:344
+#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:342
+#: ../../c-api/buffer.rst:344 ../../c-api/buffer.rst:346
+#: ../../c-api/buffer.rst:348 ../../c-api/buffer.rst:350
msgid "U"
msgstr "U"
-#: ../../c-api/buffer.rst:334 ../../c-api/buffer.rst:338
-#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:346
+#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:344
+#: ../../c-api/buffer.rst:348 ../../c-api/buffer.rst:352
msgid "0"
msgstr "0"
-#: ../../c-api/buffer.rst:336 ../../c-api/buffer.rst:340
-#: ../../c-api/buffer.rst:344 ../../c-api/buffer.rst:348
+#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:346
+#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:354
msgid "1 or 0"
msgstr "1 或 0"
-#: ../../c-api/buffer.rst:353
+#: ../../c-api/buffer.rst:359
msgid "Complex arrays"
msgstr ""
-#: ../../c-api/buffer.rst:356
+#: ../../c-api/buffer.rst:362
msgid "NumPy-style: shape and strides"
msgstr ""
-#: ../../c-api/buffer.rst:358
+#: ../../c-api/buffer.rst:364
msgid ""
"The logical structure of NumPy-style arrays is defined by :c:member:"
"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer."
"shape` and :c:member:`~Py_buffer.strides`."
msgstr ""
-#: ../../c-api/buffer.rst:361
+#: ../../c-api/buffer.rst:367
msgid ""
"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer."
"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In "
@@ -528,14 +536,14 @@ msgid ""
"strides` are ``NULL``."
msgstr ""
-#: ../../c-api/buffer.rst:365
+#: ../../c-api/buffer.rst:371
msgid ""
"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a "
"standard n-dimensional C-array. Otherwise, the consumer must access an n-"
"dimensional array as follows:"
msgstr ""
-#: ../../c-api/buffer.rst:369
+#: ../../c-api/buffer.rst:375
msgid ""
"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
"strides[n-1];\n"
@@ -545,14 +553,14 @@ msgstr ""
"strides[n-1];\n"
"item = *((typeof(item) *)ptr);"
-#: ../../c-api/buffer.rst:375
+#: ../../c-api/buffer.rst:381
msgid ""
"As noted above, :c:member:`~Py_buffer.buf` can point to any location within "
"the actual memory block. An exporter can check the validity of a buffer with "
"this function:"
msgstr ""
-#: ../../c-api/buffer.rst:379
+#: ../../c-api/buffer.rst:385
msgid ""
"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n"
" \"\"\"Verify that the parameters represent a valid array within\n"
@@ -581,11 +589,11 @@ msgid ""
" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
msgstr ""
-#: ../../c-api/buffer.rst:409
+#: ../../c-api/buffer.rst:415
msgid "PIL-style: shape, strides and suboffsets"
msgstr ""
-#: ../../c-api/buffer.rst:411
+#: ../../c-api/buffer.rst:417
msgid ""
"In addition to the regular items, PIL-style arrays can contain pointers that "
"must be followed in order to get to the next element in a dimension. For "
@@ -596,14 +604,14 @@ msgid ""
"x[2][3]`` arrays that can be located anywhere in memory."
msgstr ""
-#: ../../c-api/buffer.rst:420
+#: ../../c-api/buffer.rst:426
msgid ""
"Here is a function that returns a pointer to the element in an N-D array "
"pointed to by an N-dimensional index when there are both non-``NULL`` "
"strides and suboffsets::"
msgstr ""
-#: ../../c-api/buffer.rst:424
+#: ../../c-api/buffer.rst:430
msgid ""
"void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n"
" Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n"
@@ -631,25 +639,25 @@ msgstr ""
" return (void*)pointer;\n"
"}"
-#: ../../c-api/buffer.rst:439
+#: ../../c-api/buffer.rst:445
msgid "Buffer-related functions"
msgstr ""
-#: ../../c-api/buffer.rst:443
+#: ../../c-api/buffer.rst:449
msgid ""
"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When "
"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` "
"will succeed. This function always succeeds."
msgstr ""
-#: ../../c-api/buffer.rst:450
+#: ../../c-api/buffer.rst:456
msgid ""
"Send a request to *exporter* to fill in *view* as specified by *flags*. If "
"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:"
"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
msgstr ""
-#: ../../c-api/buffer.rst:455
+#: ../../c-api/buffer.rst:461
msgid ""
"On success, fill in *view*, set ``view->obj`` to a new reference to "
"*exporter* and return 0. In the case of chained buffer providers that "
@@ -657,7 +665,7 @@ msgid ""
"instead of *exporter* (See :ref:`Buffer Object Structures `)."
msgstr ""
-#: ../../c-api/buffer.rst:460
+#: ../../c-api/buffer.rst:466
msgid ""
"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls "
"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:"
@@ -665,7 +673,7 @@ msgid ""
"`PyBuffer_Release` must be called exactly once."
msgstr ""
-#: ../../c-api/buffer.rst:468
+#: ../../c-api/buffer.rst:474
msgid ""
"Release the buffer *view* and release the :term:`strong reference` (i.e. "
"decrement the reference count) to the view's supporting object, ``view-"
@@ -673,19 +681,19 @@ msgid ""
"used, otherwise reference leaks may occur."
msgstr ""
-#: ../../c-api/buffer.rst:473
+#: ../../c-api/buffer.rst:479
msgid ""
"It is an error to call this function on a buffer that was not obtained via :"
"c:func:`PyObject_GetBuffer`."
msgstr ""
-#: ../../c-api/buffer.rst:479
+#: ../../c-api/buffer.rst:485
msgid ""
"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:"
"`~Py_buffer.format`. On error, raise an exception and return -1."
msgstr ""
-#: ../../c-api/buffer.rst:487
+#: ../../c-api/buffer.rst:493
msgid ""
"Return ``1`` if the memory defined by the *view* is C-style (*order* is "
"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either "
@@ -693,69 +701,69 @@ msgid ""
"succeeds."
msgstr ""
-#: ../../c-api/buffer.rst:494
+#: ../../c-api/buffer.rst:500
msgid ""
"Get the memory area pointed to by the *indices* inside the given *view*. "
"*indices* must point to an array of ``view->ndim`` indices."
msgstr ""
-#: ../../c-api/buffer.rst:500
+#: ../../c-api/buffer.rst:506
msgid ""
"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or "
"``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on "
"success, ``-1`` on error."
msgstr ""
-#: ../../c-api/buffer.rst:507
+#: ../../c-api/buffer.rst:513
msgid ""
"Copy *len* bytes from *src* to its contiguous representation in *buf*. "
"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style "
"ordering or either one). ``0`` is returned on success, ``-1`` on error."
msgstr ""
-#: ../../c-api/buffer.rst:511
+#: ../../c-api/buffer.rst:517
msgid "This function fails if *len* != *src->len*."
msgstr ""
-#: ../../c-api/buffer.rst:516
+#: ../../c-api/buffer.rst:522
msgid ""
"Copy data from *src* to *dest* buffer. Can convert between C-style and or "
"Fortran-style buffers."
msgstr ""
-#: ../../c-api/buffer.rst:519
+#: ../../c-api/buffer.rst:525
msgid "``0`` is returned on success, ``-1`` on error."
msgstr ""
-#: ../../c-api/buffer.rst:523
+#: ../../c-api/buffer.rst:529
msgid ""
"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style "
"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the "
"given shape with the given number of bytes per element."
msgstr ""
-#: ../../c-api/buffer.rst:530
+#: ../../c-api/buffer.rst:536
msgid ""
"Handle buffer requests for an exporter that wants to expose *buf* of size "
"*len* with writability set according to *readonly*. *buf* is interpreted as "
"a sequence of unsigned bytes."
msgstr ""
-#: ../../c-api/buffer.rst:534
+#: ../../c-api/buffer.rst:540
msgid ""
"The *flags* argument indicates the request type. This function always fills "
"in *view* as specified by flags, unless *buf* has been designated as read-"
"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*."
msgstr ""
-#: ../../c-api/buffer.rst:538
+#: ../../c-api/buffer.rst:544
msgid ""
"On success, set ``view->obj`` to a new reference to *exporter* and return 0. "
"Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and "
"return ``-1``;"
msgstr ""
-#: ../../c-api/buffer.rst:542
+#: ../../c-api/buffer.rst:548
msgid ""
"If this function is used as part of a :ref:`getbufferproc `, "
"*exporter* MUST be set to the exporting object and *flags* must be passed "
@@ -782,14 +790,14 @@ msgstr "buffer object(緩衝物件)"
msgid "PyBufferProcs (C type)"
msgstr "PyBufferProcs(C 型別)"
-#: ../../c-api/buffer.rst:295
+#: ../../c-api/buffer.rst:301
msgid "contiguous"
msgstr "contiguous(連續的)"
-#: ../../c-api/buffer.rst:295
+#: ../../c-api/buffer.rst:301
msgid "C-contiguous"
msgstr "C-contiguous(C 連續的)"
-#: ../../c-api/buffer.rst:295
+#: ../../c-api/buffer.rst:301
msgid "Fortran contiguous"
msgstr "Fortran contiguous(Fortran 連續的)"
diff --git a/c-api/bytearray.po b/c-api/bytearray.po
index 57d7d62324..183f9f7fa0 100644
--- a/c-api/bytearray.po
+++ b/c-api/bytearray.po
@@ -65,7 +65,7 @@ msgid ""
"Return a new bytearray object from any object, *o*, that implements the :ref:"
"`buffer protocol `."
msgstr ""
-"由任意物件 *o* 回傳一個新的位元組陣列物件,並實作了\\ :ref:`緩衝協議 (buffer "
+"由任意物件 *o* 回傳一個新的位元組陣列物件,並實作了\\ :ref:`緩衝協定 (buffer "
"protocol) `。"
#: ../../c-api/bytearray.rst:45 ../../c-api/bytearray.rst:52
diff --git a/c-api/capsule.po b/c-api/capsule.po
index 42a0ea59ac..8962dc66fc 100644
--- a/c-api/capsule.po
+++ b/c-api/capsule.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-01 22:24+0800\n"
+"POT-Creation-Date: 2025-06-29 00:17+0000\n"
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -150,15 +150,29 @@ msgstr ""
#: ../../c-api/capsule.rst:108
msgid ""
+"This function splits *name* on the ``.`` character, and imports the first "
+"element. It then processes further elements using attribute lookups."
+msgstr ""
+
+#: ../../c-api/capsule.rst:111
+msgid ""
"Return the capsule's internal *pointer* on success. On failure, set an "
"exception and return ``NULL``."
msgstr ""
-#: ../../c-api/capsule.rst:111
+#: ../../c-api/capsule.rst:116
+msgid ""
+"If *name* points to an attribute of some submodule or subpackage, this "
+"submodule or subpackage must be previously imported using other means (for "
+"example, by using :c:func:`PyImport_ImportModule`) for the attribute lookups "
+"to succeed."
+msgstr ""
+
+#: ../../c-api/capsule.rst:121
msgid "*no_block* has no effect anymore."
msgstr ""
-#: ../../c-api/capsule.rst:117
+#: ../../c-api/capsule.rst:127
msgid ""
"Determines whether or not *capsule* is a valid capsule. A valid capsule is "
"non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` "
@@ -167,41 +181,41 @@ msgid ""
"compared.)"
msgstr ""
-#: ../../c-api/capsule.rst:123
+#: ../../c-api/capsule.rst:133
msgid ""
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
"to any of the accessors (any function starting with ``PyCapsule_Get``) are "
"guaranteed to succeed."
msgstr ""
-#: ../../c-api/capsule.rst:127
+#: ../../c-api/capsule.rst:137
msgid ""
"Return a nonzero value if the object is valid and matches the name passed "
"in. Return ``0`` otherwise. This function will not fail."
msgstr ""
-#: ../../c-api/capsule.rst:133
+#: ../../c-api/capsule.rst:143
msgid "Set the context pointer inside *capsule* to *context*."
msgstr ""
-#: ../../c-api/capsule.rst:135 ../../c-api/capsule.rst:142
-#: ../../c-api/capsule.rst:151 ../../c-api/capsule.rst:159
+#: ../../c-api/capsule.rst:145 ../../c-api/capsule.rst:152
+#: ../../c-api/capsule.rst:161 ../../c-api/capsule.rst:169
msgid ""
"Return ``0`` on success. Return nonzero and set an exception on failure."
msgstr ""
-#: ../../c-api/capsule.rst:140
+#: ../../c-api/capsule.rst:150
msgid "Set the destructor inside *capsule* to *destructor*."
msgstr ""
-#: ../../c-api/capsule.rst:147
+#: ../../c-api/capsule.rst:157
msgid ""
"Set the name inside *capsule* to *name*. If non-``NULL``, the name must "
"outlive the capsule. If the previous *name* stored in the capsule was not "
"``NULL``, no attempt is made to free it."
msgstr ""
-#: ../../c-api/capsule.rst:156
+#: ../../c-api/capsule.rst:166
msgid ""
"Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
"``NULL``."
diff --git a/c-api/cell.po b/c-api/cell.po
index 26beccfb9a..1b56cd0661 100644
--- a/c-api/cell.po
+++ b/c-api/cell.po
@@ -89,7 +89,7 @@ msgid ""
"reference to any current content of the cell. *value* may be ``NULL``. "
"*cell* must be non-``NULL``."
msgstr ""
-"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件當前內容的參"
+"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件目前內容的參"
"照。*value* 可以為 ``NULL``。*cell* 必須不為 ``NULL``。"
#: ../../c-api/cell.rst:58
diff --git a/c-api/code.po b/c-api/code.po
index 19d27d2885..3ce283f533 100644
--- a/c-api/code.po
+++ b/c-api/code.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-09 00:13+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -213,7 +213,7 @@ msgstr ""
#: ../../c-api/code.rst:184
msgid ""
"If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after "
-"`co` has been fully initialized. Otherwise, the callback is invoked before "
+"*co* has been fully initialized. Otherwise, the callback is invoked before "
"the destruction of *co* takes place, so the prior state of *co* can be "
"inspected."
msgstr ""
diff --git a/c-api/codec.po b/c-api/codec.po
index 3cd05b00bc..6fd7c61a7f 100644
--- a/c-api/codec.po
+++ b/c-api/codec.po
@@ -24,7 +24,7 @@ msgstr "編解碼器註冊表和支援函式"
#: ../../c-api/codec.rst:8
msgid "Register a new codec search function."
-msgstr "註冊一個新的編解碼器搜索函式。"
+msgstr "註冊一個新的編解碼器搜尋函式。"
#: ../../c-api/codec.rst:10
msgid ""
@@ -32,7 +32,7 @@ msgid ""
"done, to make sure that it is always first in the list of search functions."
msgstr ""
"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成),"
-"以確保它始終位於搜索函式列表中的第一個。"
+"以確保它始終位於搜尋函式列表中的第一個。"
#: ../../c-api/codec.rst:15
msgid ""
@@ -40,7 +40,7 @@ msgid ""
"search function is not registered, do nothing. Return 0 on success. Raise an "
"exception and return -1 on error."
msgstr ""
-"取消註冊編解碼器搜索函式並清除註冊表 (registry) 的快取。如果搜索函式並未被註"
+"取消註冊編解碼器搜尋函式並清除註冊表 (registry) 的快取。如果搜尋函式並未被註"
"冊,則不執行任何操作。成功回傳 0,發生錯誤時會引發例外並回傳 -1。"
#: ../../c-api/codec.rst:23
diff --git a/c-api/complex.po b/c-api/complex.po
index a6448fac77..a22103f9b4 100644
--- a/c-api/complex.po
+++ b/c-api/complex.po
@@ -81,14 +81,14 @@ msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數之和
#: ../../c-api/complex.rst:49
msgid ""
-"Return the difference between two complex numbers, using the C :c:type:"
-"`Py_complex` representation."
+"Return the difference between two complex numbers, using the "
+"C :c:type:`Py_complex` representation."
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數間的差。"
#: ../../c-api/complex.rst:55
msgid ""
-"Return the negation of the complex number *num*, using the C :c:type:"
-"`Py_complex` representation."
+"Return the negation of the complex number *num*, using the "
+"C :c:type:`Py_complex` representation."
msgstr ""
"以 C 的 :c:type:`Py_complex` 表示形式來回傳複數 *num* 的相反數 (negation)。"
@@ -106,16 +106,16 @@ msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的商
#: ../../c-api/complex.rst:70
msgid ""
-"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
-"c:macro:`!EDOM`."
+"If *divisor* is null, this method returns zero and sets :c:data:`errno` "
+"to :c:macro:`!EDOM`."
msgstr ""
-"如果 *divisor* 為 null,則此方法會回傳零並將 :c:data:`errno` 設定為 :c:macro:"
-"`!EDOM`。"
+"如果 *divisor* 為 null,則此方法會回傳零並將 :c:data:`errno` 設定"
+"為 :c:macro:`!EDOM`。"
#: ../../c-api/complex.rst:76
msgid ""
-"Return the exponentiation of *num* by *exp*, using the C :c:type:"
-"`Py_complex` representation."
+"Return the exponentiation of *num* by *exp*, using the "
+"C :c:type:`Py_complex` representation."
msgstr ""
"以 C 的 :c:type:`Py_complex` 表示形式來回傳 *num* 的 *exp* 次方的結果。"
@@ -141,13 +141,13 @@ msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python complex number "
"type. It is the same object as :class:`complex` in the Python layer."
msgstr ""
-"這個 :c:type:`PyTypeObject` 的實例代表 Python 複數型別。它與 Python 層中的 :"
-"class:`complex` 是同一個物件。"
+"這個 :c:type:`PyTypeObject` 的實例代表 Python 複數型別。它與 Python 層中"
+"的 :class:`complex` 是同一個物件。"
#: ../../c-api/complex.rst:100
msgid ""
-"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
-"c:type:`PyComplexObject`. This function always succeeds."
+"Return true if its argument is a :c:type:`PyComplexObject` or a subtype "
+"of :c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
"如果其引數是一個 :c:type:`PyComplexObject` 或者是 :c:type:`PyComplexObject` "
"的子型別,則會回傳 true。這個函式不會失敗。"
@@ -181,25 +181,24 @@ msgid "Return the real part of *op* as a C :c:expr:`double`."
msgstr "以 C 的 :c:expr:`double` 形式回傳 *op* 的實部。"
#: ../../c-api/complex.rst:126
-#, fuzzy
msgid ""
-"If *op* is not a Python complex number object but has a :meth:`~object."
-"__complex__` method, this method will first be called to convert *op* to a "
-"Python complex number object. If :meth:`!__complex__` is not defined then "
-"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result."
+"If *op* is not a Python complex number object but has "
+"a :meth:`~object.__complex__` method, this method will first be called to "
+"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
+"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and "
+"returns its result."
msgstr ""
"如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
"首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
-"未定義,那麼它會回退到 :meth:`~object.__float__`。如果 :meth:`!__float__` 未"
-"定義,則它將繼續回退為 :meth:`~object.__index__`。"
+"未定義,那麼它會回退到呼叫 :func:`PyFloat_AsDouble` 並回傳其結果。"
#: ../../c-api/complex.rst:132 ../../c-api/complex.rst:148
msgid ""
"Upon failure, this method returns ``-1.0`` with an exception set, so one "
"should call :c:func:`PyErr_Occurred` to check for errors."
msgstr ""
-"失敗時,此方法回傳 ``-1.0`` 並設定例外,因此應該呼叫 :c:func:"
-"`PyErr_Occurred` 來檢查錯誤。"
+"失敗時,此方法回傳 ``-1.0`` 並設定例外,因此應該呼"
+"叫 :c:func:`PyErr_Occurred` 來檢查錯誤。"
#: ../../c-api/complex.rst:135 ../../c-api/complex.rst:151
msgid "Use :meth:`~object.__complex__` if available."
@@ -210,18 +209,16 @@ msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
msgstr "將 *op* 的虛部作為 C 的 :c:expr:`double` 回傳。"
#: ../../c-api/complex.rst:142
-#, fuzzy
msgid ""
-"If *op* is not a Python complex number object but has a :meth:`~object."
-"__complex__` method, this method will first be called to convert *op* to a "
-"Python complex number object. If :meth:`!__complex__` is not defined then "
-"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on "
-"success."
+"If *op* is not a Python complex number object but has "
+"a :meth:`~object.__complex__` method, this method will first be called to "
+"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
+"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and "
+"returns ``0.0`` on success."
msgstr ""
"如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
"首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
-"未定義,那麼它會回退到 :meth:`~object.__float__`。如果 :meth:`!__float__` 未"
-"定義,則它將繼續回退為 :meth:`~object.__index__`。"
+"未定義,那麼它會回退到呼叫 :func:`PyFloat_AsDouble` 並於成功時回傳 ``0.0``。"
#: ../../c-api/complex.rst:156
msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
@@ -229,11 +226,11 @@ msgstr "回傳複數 *op* 的 :c:type:`Py_complex` 值。"
#: ../../c-api/complex.rst:158
msgid ""
-"If *op* is not a Python complex number object but has a :meth:`~object."
-"__complex__` method, this method will first be called to convert *op* to a "
-"Python complex number object. If :meth:`!__complex__` is not defined then "
-"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not "
-"defined then it falls back to :meth:`~object.__index__`."
+"If *op* is not a Python complex number object but has "
+"a :meth:`~object.__complex__` method, this method will first be called to "
+"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
+"not defined then it falls back to :meth:`~object.__float__`. If :meth:`!"
+"__float__` is not defined then it falls back to :meth:`~object.__index__`."
msgstr ""
"如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
"首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
@@ -242,9 +239,9 @@ msgstr ""
#: ../../c-api/complex.rst:164
msgid ""
-"Upon failure, this method returns :c:type:`Py_complex` with :c:member:"
-"`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should "
-"call :c:func:`PyErr_Occurred` to check for errors."
+"Upon failure, this method returns :c:type:`Py_complex` "
+"with :c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, "
+"so one should call :c:func:`PyErr_Occurred` to check for errors."
msgstr ""
"失敗時,此方法回傳 :c:type:`Py_complex` 並將 :c:member:`~Py_complex.real` 設"
"為 ``-1.0``,並設定例外,因此應該呼叫 :c:func:`PyErr_Occurred` 來檢查錯誤。"
diff --git a/c-api/contextvars.po b/c-api/contextvars.po
index 8e7184e42d..07a22f1e5f 100644
--- a/c-api/contextvars.po
+++ b/c-api/contextvars.po
@@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-01 22:24+0800\n"
-"PO-Revision-Date: 2018-07-15 18:56+0800\n"
+"PO-Revision-Date: 2025-06-27 00:11+0800\n"
"Last-Translator: \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
@@ -14,10 +14,11 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.6\n"
#: ../../c-api/contextvars.rst:6
msgid "Context Variables Objects"
-msgstr "情境變數物件"
+msgstr "情境變數物件(Context Variables Objects)"
#: ../../c-api/contextvars.rst:15
msgid ""
@@ -25,6 +26,9 @@ msgid ""
"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
msgstr ""
+"在 Python 3.7.1 中所有情境變數 C API 的簽名都被\\ **改為**\\ 使用 :c:type:"
+"`PyObject` 指標,而不是 :c:type:`PyContext`、:c:type:`PyContextVar` 或 :c:"
+"type:`PyContextToken`,例如:"
#: ../../c-api/contextvars.rst:20
msgid ""
@@ -34,6 +38,11 @@ msgid ""
"// in 3.7.1+:\n"
"PyObject *PyContext_New(void);"
msgstr ""
+"// 在 3.7.0:\n"
+"PyContext *PyContext_New(void);\n"
+"\n"
+"// 在 3.7.1+:\n"
+"PyObject *PyContext_New(void);"
#: ../../c-api/contextvars.rst:26
msgid "See :issue:`34762` for more details."
@@ -42,83 +51,90 @@ msgstr "更多細節請見 :issue:`34762`。"
#: ../../c-api/contextvars.rst:29
msgid ""
"This section details the public C API for the :mod:`contextvars` module."
-msgstr ""
+msgstr "本節詳述 :mod:`contextvars` 模組的公開 C API。"
#: ../../c-api/contextvars.rst:33
msgid ""
"The C structure used to represent a :class:`contextvars.Context` object."
-msgstr ""
+msgstr "用來代表 :class:`contextvars.Context` 物件的 C 結構。"
#: ../../c-api/contextvars.rst:38
msgid ""
"The C structure used to represent a :class:`contextvars.ContextVar` object."
-msgstr ""
+msgstr "用來代表 :class:`contextvars.ContextVar` 物件的 C 結構。"
#: ../../c-api/contextvars.rst:43
msgid "The C structure used to represent a :class:`contextvars.Token` object."
-msgstr ""
+msgstr "用來代表 :class:`contextvars.Token` 物件的 C 結構。"
#: ../../c-api/contextvars.rst:47
msgid "The type object representing the *context* type."
-msgstr ""
+msgstr "代表 *context* 型別的型別物件。"
#: ../../c-api/contextvars.rst:51
msgid "The type object representing the *context variable* type."
-msgstr ""
+msgstr "代表 *情境變數* 型別的型別物件。"
#: ../../c-api/contextvars.rst:55
msgid "The type object representing the *context variable token* type."
-msgstr ""
+msgstr "代表 *情境變數 token* 型別的型別物件。"
#: ../../c-api/contextvars.rst:58
msgid "Type-check macros:"
-msgstr ""
+msgstr "型別檢查巨集:"
#: ../../c-api/contextvars.rst:62
msgid ""
"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
+"如果 *o* 的型別為 :c:data:`PyContext_Type` 則回傳 true。*o* 不得為 ``NULL``。"
+"此函式一定會成功回傳。"
#: ../../c-api/contextvars.rst:67
msgid ""
"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
+"如果 *o* 的類型為 :c:data:`PyContextVar_Type` 則回傳 true。*o* 不得為 "
+"``NULL``。此函式一定會成功回傳。"
#: ../../c-api/contextvars.rst:72
msgid ""
"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
"``NULL``. This function always succeeds."
msgstr ""
+"如果 *o* 的類型為 :c:data:`PyContextToken_Type` 則回傳 true。 *o* 不得為 "
+"``NULL``。此函式一定會成功回傳。"
#: ../../c-api/contextvars.rst:76
msgid "Context object management functions:"
-msgstr ""
+msgstr "情境物件管理函式:"
#: ../../c-api/contextvars.rst:80
msgid ""
"Create a new empty context object. Returns ``NULL`` if an error has "
"occurred."
-msgstr ""
+msgstr "建立一個新的空的情境物件。 如果發生錯誤,則回傳 ``NULL``。"
#: ../../c-api/contextvars.rst:85
msgid ""
"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
"if an error has occurred."
-msgstr ""
+msgstr "建立傳入的 *ctx* 情境物件的淺層複製 (shallow copy)。如果發生錯誤,則回傳 ``NULL``。"
#: ../../c-api/contextvars.rst:90
msgid ""
"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
"error has occurred."
-msgstr ""
+msgstr "建立目前執行緒上的情境的淺層複製。如果發生錯誤,則回傳 ``NULL``。"
#: ../../c-api/contextvars.rst:95
msgid ""
"Set *ctx* as the current context for the current thread. Returns ``0`` on "
"success, and ``-1`` on error."
msgstr ""
+"設定 *ctx* 為目前執行緒上的目前情境。成功時回傳 ``0``,錯誤時回傳 ``-1``。"
#: ../../c-api/contextvars.rst:100
msgid ""
@@ -126,10 +142,12 @@ msgid ""
"context for the current thread. Returns ``0`` on success, and ``-1`` on "
"error."
msgstr ""
+"關閉 *ctx* 情境,並將目前執行緒的目前情境設回之前的情境。 成功時回傳 ``0``,"
+"錯誤時回傳 ``-1``。"
#: ../../c-api/contextvars.rst:105
msgid "Context variable functions:"
-msgstr ""
+msgstr "情境變數函式:"
#: ../../c-api/contextvars.rst:109
msgid ""
@@ -138,6 +156,9 @@ msgid ""
"value for the context variable, or ``NULL`` for no default. If an error has "
"occurred, this function returns ``NULL``."
msgstr ""
+"建立一個新的 ``ContextVar`` 物件。*name* 參數用於自我檢查(introspection)和"
+"除錯目的。*def* 參數指定情境變數的預設值,亦可用 ``NULL`` 表示沒有預設值。 如"
+"果發生錯誤,此函式會回傳 ``NULL``。"
#: ../../c-api/contextvars.rst:116
msgid ""
@@ -145,20 +166,24 @@ msgid ""
"occurred during lookup, and ``0`` if no error occurred, whether or not a "
"value was found."
msgstr ""
+"取得情境變數的值。如果在查找過程中發生錯誤則回傳 ``-1``,如果沒有發生錯誤則無"
+"論是否找到值都會回傳 ``0``。"
#: ../../c-api/contextvars.rst:120
msgid ""
"If the context variable was found, *value* will be a pointer to it. If the "
"context variable was *not* found, *value* will point to:"
msgstr ""
+"如果找到情境變數,*value* 將會是指向它的指標。如果 *沒有* 找到情境變數,"
+"*value* 將會指到:"
#: ../../c-api/contextvars.rst:123
msgid "*default_value*, if not ``NULL``;"
-msgstr ""
+msgstr "*default_value* 預設值,但前提是預設值不是 ``NULL``;"
#: ../../c-api/contextvars.rst:124
msgid "the default value of *var*, if not ``NULL``;"
-msgstr ""
+msgstr "*var* 的預設值,但前提是預設值不是 ``NULL``;"
#: ../../c-api/contextvars.rst:125
msgid "``NULL``"
@@ -166,13 +191,15 @@ msgstr "``NULL``"
#: ../../c-api/contextvars.rst:127
msgid "Except for ``NULL``, the function returns a new reference."
-msgstr ""
+msgstr "除了 ``NULL`` 之外,此函式會回傳一個新的參照(reference)。"
#: ../../c-api/contextvars.rst:131
msgid ""
"Set the value of *var* to *value* in the current context. Returns a new "
"token object for this change, or ``NULL`` if an error has occurred."
msgstr ""
+"在目前的情境中將 *var* 的值設為 *value*。會回傳一個用來代表此變更的新 token "
+"物件,如果發生錯誤則回傳 ``NULL``。"
#: ../../c-api/contextvars.rst:136
msgid ""
@@ -180,3 +207,6 @@ msgid ""
"func:`PyContextVar_Set` that returned the *token* was called. This function "
"returns ``0`` on success and ``-1`` on error."
msgstr ""
+"將 *var* 情境變數的狀態設回之前的狀態,亦即上一次回傳 token 的 :c:func:"
+"`PyContextVar_Set` 被呼叫前的狀態。此函式在成功時回傳 ``0``,錯誤時回傳 "
+"``-1``。"
diff --git a/c-api/datetime.po b/c-api/datetime.po
index aca575f97c..60f4918fdc 100644
--- a/c-api/datetime.po
+++ b/c-api/datetime.po
@@ -38,7 +38,7 @@ msgid ""
msgstr ""
":mod:`datetime` 模組提供各種日期和時間物件。在使用任何這些函式之前,必須將標"
"頭檔 :file:`datetime.h` 引入於原始碼中(請注意,:file:`Python.h` 並無引入該標"
-"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被調用,而這通常作為模組初始"
+"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被叫用,而這通常作為模組初始"
"化函式的一部分。該巨集將指向 C 結構的指標放入靜態變數 :c:data:`!"
"PyDateTimeAPI` 中,該變數會被以下巨集使用。"
diff --git a/c-api/dict.po b/c-api/dict.po
index 5a9c30db1f..b11b75f775 100644
--- a/c-api/dict.po
+++ b/c-api/dict.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-02-21 00:13+0000\n"
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
"Last-Translator: Liang-Bo Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -34,8 +34,8 @@ msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python dictionary "
"type. This is the same object as :class:`dict` in the Python layer."
msgstr ""
-":c:type:`PyTypeObject` 實例代表一個 Python 字典型態。此與 Python 層中的 :"
-"class:`dict` 為同一個物件。"
+":c:type:`PyTypeObject` 實例代表一個 Python 字典型態。此與 Python 層中"
+"的 :class:`dict` 為同一個物件。"
#: ../../c-api/dict.rst:24
msgid ""
@@ -77,9 +77,9 @@ msgstr ""
#: ../../c-api/dict.rst:60
msgid ""
-"This is the same as :c:func:`PyDict_Contains`, but *key* is specified as a :"
-"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"This is the same as :c:func:`PyDict_Contains`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
#: ../../c-api/dict.rst:69
@@ -88,32 +88,32 @@ msgstr ""
#: ../../c-api/dict.rst:74
msgid ""
-"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :"
-"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` "
-"on success or ``-1`` on failure. This function *does not* steal a reference "
-"to *val*."
+"Insert *val* into the dictionary *p* with a key of *key*. *key* must "
+"be :term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return "
+"``0`` on success or ``-1`` on failure. This function *does not* steal a "
+"reference to *val*."
msgstr ""
#: ../../c-api/dict.rst:82
msgid ""
-"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:"
-"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
#: ../../c-api/dict.rst:89
msgid ""
-"Remove the entry in dictionary *p* with key *key*. *key* must be :term:"
-"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the "
-"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on "
-"failure."
+"Remove the entry in dictionary *p* with key *key*. *key* must "
+"be :term:`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is "
+"not in the dictionary, :exc:`KeyError` is raised. Return ``0`` on success or "
+"``-1`` on failure."
msgstr ""
#: ../../c-api/dict.rst:97
msgid ""
-"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:"
-"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
#: ../../c-api/dict.rst:104
@@ -134,11 +134,11 @@ msgstr ""
#: ../../c-api/dict.rst:110 ../../c-api/dict.rst:207
msgid "On error, raise an exception and return ``-1``."
-msgstr ""
+msgstr "錯誤發生時,引發一個例外並回傳 ``-1``。"
#: ../../c-api/dict.rst:114
msgid "See also the :c:func:`PyObject_GetItem` function."
-msgstr ""
+msgstr "另見 :c:func:`PyObject_GetItem` 函式。"
#: ../../c-api/dict.rst:119
msgid ""
@@ -149,9 +149,9 @@ msgstr ""
#: ../../c-api/dict.rst:125
msgid ""
-"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
-"`~object.__eq__` methods are silently ignored. Prefer the :c:func:"
-"`PyDict_GetItemWithError` function instead."
+"Exceptions that occur while this calls :meth:`~object.__hash__` "
+"and :meth:`~object.__eq__` methods are silently ignored. Prefer "
+"the :c:func:`PyDict_GetItemWithError` function instead."
msgstr ""
#: ../../c-api/dict.rst:129
@@ -169,24 +169,25 @@ msgstr ""
#: ../../c-api/dict.rst:144
msgid ""
-"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
-"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
#: ../../c-api/dict.rst:150
msgid ""
-"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
-"`~object.__eq__` methods or while creating the temporary :class:`str` object "
-"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` "
-"function with your own :c:func:`PyUnicode_FromString` *key* instead."
+"Exceptions that occur while this calls :meth:`~object.__hash__` "
+"and :meth:`~object.__eq__` methods or while creating the "
+"temporary :class:`str` object are silently ignored. Prefer using "
+"the :c:func:`PyDict_GetItemWithError` function with your "
+"own :c:func:`PyUnicode_FromString` *key* instead."
msgstr ""
#: ../../c-api/dict.rst:159
msgid ""
-"Similar than :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:"
-"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"Similar to :c:func:`PyDict_GetItemRef`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
#: ../../c-api/dict.rst:168
@@ -239,7 +240,7 @@ msgstr ""
#: ../../c-api/dict.rst:209
msgid ""
-"This is similar to :meth:`dict.pop`, but without the default value and not "
+"Similar to :meth:`dict.pop`, but without the default value and not "
"raising :exc:`KeyError` if the key missing."
msgstr ""
@@ -252,37 +253,37 @@ msgstr ""
#: ../../c-api/dict.rst:226
msgid ""
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
-msgstr ""
+msgstr "回傳一個包含字典中所有項目的 :c:type:`PyListObject`。"
#: ../../c-api/dict.rst:231
msgid ""
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
-msgstr ""
+msgstr "回傳一個包含字典中所有鍵的 :c:type:`PyListObject`。"
#: ../../c-api/dict.rst:236
msgid ""
"Return a :c:type:`PyListObject` containing all the values from the "
"dictionary *p*."
-msgstr ""
+msgstr "回傳一個包含字典 *p* 中所有值的 :c:type:`PyListObject`。"
#: ../../c-api/dict.rst:244
msgid ""
"Return the number of items in the dictionary. This is equivalent to "
"``len(p)`` on a dictionary."
-msgstr ""
+msgstr "回傳字典中項目的數量。此與於字典呼叫 ``len(p)`` 等效。"
#: ../../c-api/dict.rst:250
msgid ""
-"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
-"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
-"first call to this function to start the iteration; the function returns "
-"true for each pair in the dictionary, and false once all pairs have been "
-"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:"
-"`PyObject*` variables that will be filled in with each key and value, "
-"respectively, or may be ``NULL``. Any references returned through them are "
-"borrowed. *ppos* should not be altered during iteration. Its value "
-"represents offsets within the internal dictionary structure, and since the "
-"structure is sparse, the offsets are not consecutive."
+"Iterate over all key-value pairs in the dictionary *p*. "
+"The :c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
+"prior to the first call to this function to start the iteration; the "
+"function returns true for each pair in the dictionary, and false once all "
+"pairs have been reported. The parameters *pkey* and *pvalue* should either "
+"point to :c:expr:`PyObject*` variables that will be filled in with each key "
+"and value, respectively, or may be ``NULL``. Any references returned "
+"through them are borrowed. *ppos* should not be altered during iteration. "
+"Its value represents offsets within the internal dictionary structure, and "
+"since the structure is sparse, the offsets are not consecutive."
msgstr ""
#: ../../c-api/dict.rst:261
@@ -348,8 +349,9 @@ msgstr ""
#: ../../c-api/dict.rst:293
msgid ""
"The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:"
-"`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::"
+"threading>` build without external synchronization. You can "
+"use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while "
+"iterating over it::"
msgstr ""
#: ../../c-api/dict.rst:298
@@ -360,6 +362,11 @@ msgid ""
"}\n"
"Py_END_CRITICAL_SECTION();"
msgstr ""
+"Py_BEGIN_CRITICAL_SECTION(self->dict);\n"
+"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
+" ...\n"
+"}\n"
+"Py_END_CRITICAL_SECTION();"
#: ../../c-api/dict.rst:307
msgid ""
@@ -373,10 +380,10 @@ msgstr ""
#: ../../c-api/dict.rst:317
msgid ""
-"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
-"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
-"to the iterating over a sequence of key value pairs if the second argument "
-"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an "
+"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
+"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
+"back to the iterating over a sequence of key value pairs if the second "
+"argument has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an "
"exception was raised."
msgstr ""
@@ -411,15 +418,15 @@ msgstr ""
#: ../../c-api/dict.rst:349
msgid ""
-"Clear watcher identified by *watcher_id* previously returned from :c:func:"
-"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
-"given *watcher_id* was never registered.)"
+"Clear watcher identified by *watcher_id* previously returned "
+"from :c:func:`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error "
+"(e.g. if the given *watcher_id* was never registered.)"
msgstr ""
#: ../../c-api/dict.rst:357
msgid ""
-"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
-"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
+"Mark dictionary *dict* as watched. The callback granted *watcher_id* "
+"by :c:func:`PyDict_AddWatcher` will be called when *dict* is modified or "
"deallocated. Return ``0`` on success or ``-1`` on error."
msgstr ""
@@ -485,8 +492,8 @@ msgstr ""
#: ../../c-api/dict.rst:409
msgid ""
"If the callback sets an exception, it must return ``-1``; this exception "
-"will be printed as an unraisable exception using :c:func:"
-"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
+"will be printed as an unraisable exception "
+"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
msgstr ""
#: ../../c-api/dict.rst:413
diff --git a/c-api/exceptions.po b/c-api/exceptions.po
index a2e93cc598..925d646e9a 100644
--- a/c-api/exceptions.po
+++ b/c-api/exceptions.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-11 00:13+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:05+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -268,7 +268,7 @@ msgstr ""
#: ../../c-api/exceptions.rst:253 ../../c-api/exceptions.rst:263
#: ../../c-api/exceptions.rst:271 ../../c-api/exceptions.rst:281
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../c-api/exceptions.rst:239
msgid ""
@@ -799,24 +799,34 @@ msgid ""
"as the docstring for the exception class."
msgstr ""
-#: ../../c-api/exceptions.rst:753
+#: ../../c-api/exceptions.rst:754
+msgid ""
+"Return non-zero if *ob* is an exception class, zero otherwise. This function "
+"always succeeds."
+msgstr ""
+
+#: ../../c-api/exceptions.rst:759
+msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*."
+msgstr ""
+
+#: ../../c-api/exceptions.rst:763
msgid "Exception Objects"
msgstr "例外物件"
-#: ../../c-api/exceptions.rst:757
+#: ../../c-api/exceptions.rst:767
msgid ""
"Return the traceback associated with the exception as a new reference, as "
"accessible from Python through the :attr:`~BaseException.__traceback__` "
"attribute. If there is no traceback associated, this returns ``NULL``."
msgstr ""
-#: ../../c-api/exceptions.rst:765
+#: ../../c-api/exceptions.rst:775
msgid ""
"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to "
"clear it."
msgstr ""
-#: ../../c-api/exceptions.rst:771
+#: ../../c-api/exceptions.rst:781
msgid ""
"Return the context (another exception instance during whose handling *ex* "
"was raised) associated with the exception as a new reference, as accessible "
@@ -824,14 +834,14 @@ msgid ""
"there is no context associated, this returns ``NULL``."
msgstr ""
-#: ../../c-api/exceptions.rst:779
+#: ../../c-api/exceptions.rst:789
msgid ""
"Set the context associated with the exception to *ctx*. Use ``NULL`` to "
"clear it. There is no type check to make sure that *ctx* is an exception "
"instance. This steals a reference to *ctx*."
msgstr ""
-#: ../../c-api/exceptions.rst:786
+#: ../../c-api/exceptions.rst:796
msgid ""
"Return the cause (either an exception instance, or ``None``, set by "
"``raise ... from ...``) associated with the exception as a new reference, as "
@@ -839,28 +849,28 @@ msgid ""
"attribute."
msgstr ""
-#: ../../c-api/exceptions.rst:794
+#: ../../c-api/exceptions.rst:804
msgid ""
"Set the cause associated with the exception to *cause*. Use ``NULL`` to "
"clear it. There is no type check to make sure that *cause* is either an "
"exception instance or ``None``. This steals a reference to *cause*."
msgstr ""
-#: ../../c-api/exceptions.rst:798
+#: ../../c-api/exceptions.rst:808
msgid ""
"The :attr:`~BaseException.__suppress_context__` attribute is implicitly set "
"to ``True`` by this function."
msgstr ""
-#: ../../c-api/exceptions.rst:804
+#: ../../c-api/exceptions.rst:814
msgid "Return :attr:`~BaseException.args` of exception *ex*."
msgstr ""
-#: ../../c-api/exceptions.rst:809
+#: ../../c-api/exceptions.rst:819
msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*."
msgstr ""
-#: ../../c-api/exceptions.rst:813
+#: ../../c-api/exceptions.rst:823
msgid ""
"Implement part of the interpreter's implementation of :keyword:`!except*`. "
"*orig* is the original exception that was caught, and *excs* is the list of "
@@ -872,72 +882,72 @@ msgid ""
"if there is nothing to reraise."
msgstr ""
-#: ../../c-api/exceptions.rst:827
+#: ../../c-api/exceptions.rst:837
msgid "Unicode Exception Objects"
msgstr ""
-#: ../../c-api/exceptions.rst:829
+#: ../../c-api/exceptions.rst:839
msgid ""
"The following functions are used to create and modify Unicode exceptions "
"from C."
msgstr ""
-#: ../../c-api/exceptions.rst:833
+#: ../../c-api/exceptions.rst:843
msgid ""
"Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, "
"*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are "
"UTF-8 encoded strings."
msgstr ""
-#: ../../c-api/exceptions.rst:840
+#: ../../c-api/exceptions.rst:850
msgid "Return the *encoding* attribute of the given exception object."
msgstr ""
-#: ../../c-api/exceptions.rst:846
+#: ../../c-api/exceptions.rst:856
msgid "Return the *object* attribute of the given exception object."
msgstr ""
-#: ../../c-api/exceptions.rst:852
+#: ../../c-api/exceptions.rst:862
msgid ""
"Get the *start* attribute of the given exception object and place it into "
"*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` "
"on failure."
msgstr ""
-#: ../../c-api/exceptions.rst:860
+#: ../../c-api/exceptions.rst:870
msgid ""
"Set the *start* attribute of the given exception object to *start*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../../c-api/exceptions.rst:867
+#: ../../c-api/exceptions.rst:877
msgid ""
"Get the *end* attribute of the given exception object and place it into "
"*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on "
"failure."
msgstr ""
-#: ../../c-api/exceptions.rst:875
+#: ../../c-api/exceptions.rst:885
msgid ""
"Set the *end* attribute of the given exception object to *end*. Return "
"``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../../c-api/exceptions.rst:882
+#: ../../c-api/exceptions.rst:892
msgid "Return the *reason* attribute of the given exception object."
msgstr ""
-#: ../../c-api/exceptions.rst:888
+#: ../../c-api/exceptions.rst:898
msgid ""
"Set the *reason* attribute of the given exception object to *reason*. "
"Return ``0`` on success, ``-1`` on failure."
msgstr ""
-#: ../../c-api/exceptions.rst:895
+#: ../../c-api/exceptions.rst:905
msgid "Recursion Control"
msgstr ""
-#: ../../c-api/exceptions.rst:897
+#: ../../c-api/exceptions.rst:907
msgid ""
"These two functions provide a way to perform safe recursive calls at the C "
"level, both in the core and in extension modules. They are needed if the "
@@ -947,44 +957,44 @@ msgid ""
"recursion handling."
msgstr ""
-#: ../../c-api/exceptions.rst:906
+#: ../../c-api/exceptions.rst:916
msgid "Marks a point where a recursive C-level call is about to be performed."
msgstr ""
-#: ../../c-api/exceptions.rst:908
+#: ../../c-api/exceptions.rst:918
msgid ""
"If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS "
"stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it "
"sets a :exc:`MemoryError` and returns a nonzero value."
msgstr ""
-#: ../../c-api/exceptions.rst:912
+#: ../../c-api/exceptions.rst:922
msgid ""
"The function then checks if the recursion limit is reached. If this is the "
"case, a :exc:`RecursionError` is set and a nonzero value is returned. "
"Otherwise, zero is returned."
msgstr ""
-#: ../../c-api/exceptions.rst:916
+#: ../../c-api/exceptions.rst:926
msgid ""
"*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` "
"to be concatenated to the :exc:`RecursionError` message caused by the "
"recursion depth limit."
msgstr ""
-#: ../../c-api/exceptions.rst:920 ../../c-api/exceptions.rst:928
+#: ../../c-api/exceptions.rst:930 ../../c-api/exceptions.rst:938
msgid ""
"This function is now also available in the :ref:`limited API `."
msgstr ""
-#: ../../c-api/exceptions.rst:925
+#: ../../c-api/exceptions.rst:935
msgid ""
"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each "
"*successful* invocation of :c:func:`Py_EnterRecursiveCall`."
msgstr ""
-#: ../../c-api/exceptions.rst:931
+#: ../../c-api/exceptions.rst:941
msgid ""
"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types "
"requires special recursion handling. In addition to protecting the stack, :"
@@ -993,13 +1003,13 @@ msgid ""
"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`."
msgstr ""
-#: ../../c-api/exceptions.rst:939
+#: ../../c-api/exceptions.rst:949
msgid ""
"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` "
"implementation to detect cycles."
msgstr ""
-#: ../../c-api/exceptions.rst:942
+#: ../../c-api/exceptions.rst:952
msgid ""
"If the object has already been processed, the function returns a positive "
"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation "
@@ -1007,30 +1017,30 @@ msgid ""
"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``."
msgstr ""
-#: ../../c-api/exceptions.rst:948
+#: ../../c-api/exceptions.rst:958
msgid ""
"The function will return a negative integer if the recursion limit is "
"reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation "
"should typically return ``NULL``."
msgstr ""
-#: ../../c-api/exceptions.rst:952
+#: ../../c-api/exceptions.rst:962
msgid ""
"Otherwise, the function returns zero and the :c:member:`~PyTypeObject."
"tp_repr` implementation can continue normally."
msgstr ""
-#: ../../c-api/exceptions.rst:957
+#: ../../c-api/exceptions.rst:967
msgid ""
"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :"
"c:func:`Py_ReprEnter` that returns zero."
msgstr ""
-#: ../../c-api/exceptions.rst:964
+#: ../../c-api/exceptions.rst:974
msgid "Standard Exceptions"
msgstr ""
-#: ../../c-api/exceptions.rst:966
+#: ../../c-api/exceptions.rst:976
msgid ""
"All standard Python exceptions are available as global variables whose names "
"are ``PyExc_`` followed by the Python exception name. These have the type :"
@@ -1038,459 +1048,467 @@ msgid ""
"all the variables:"
msgstr ""
-#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1163
-#: ../../c-api/exceptions.rst:1208
+#: ../../c-api/exceptions.rst:1039 ../../c-api/exceptions.rst:1179
+#: ../../c-api/exceptions.rst:1225
msgid "C Name"
msgstr "C 名稱"
-#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1208
+#: ../../c-api/exceptions.rst:1039 ../../c-api/exceptions.rst:1225
msgid "Python Name"
msgstr "Python 名稱"
-#: ../../c-api/exceptions.rst:1028 ../../c-api/exceptions.rst:1163
-#: ../../c-api/exceptions.rst:1208
+#: ../../c-api/exceptions.rst:1039 ../../c-api/exceptions.rst:1179
+#: ../../c-api/exceptions.rst:1225
msgid "Notes"
msgstr "註解"
-#: ../../c-api/exceptions.rst:1030
+#: ../../c-api/exceptions.rst:1041
msgid ":c:data:`PyExc_BaseException`"
msgstr ":c:data:`PyExc_BaseException`"
-#: ../../c-api/exceptions.rst:1030
+#: ../../c-api/exceptions.rst:1041
msgid ":exc:`BaseException`"
msgstr ":exc:`BaseException`"
-#: ../../c-api/exceptions.rst:1030 ../../c-api/exceptions.rst:1032
-#: ../../c-api/exceptions.rst:1034 ../../c-api/exceptions.rst:1080
-#: ../../c-api/exceptions.rst:1092
+#: ../../c-api/exceptions.rst:1041 ../../c-api/exceptions.rst:1043
+#: ../../c-api/exceptions.rst:1045 ../../c-api/exceptions.rst:1047
+#: ../../c-api/exceptions.rst:1093 ../../c-api/exceptions.rst:1105
msgid "[1]_"
msgstr "[1]_"
-#: ../../c-api/exceptions.rst:1032
+#: ../../c-api/exceptions.rst:1043
+msgid ":c:data:`PyExc_BaseExceptionGroup`"
+msgstr ":c:data:`PyExc_BaseExceptionGroup`"
+
+#: ../../c-api/exceptions.rst:1043
+msgid ":exc:`BaseExceptionGroup`"
+msgstr ":exc:`BaseExceptionGroup`"
+
+#: ../../c-api/exceptions.rst:1045
msgid ":c:data:`PyExc_Exception`"
msgstr ":c:data:`PyExc_Exception`"
-#: ../../c-api/exceptions.rst:1032
+#: ../../c-api/exceptions.rst:1045
msgid ":exc:`Exception`"
msgstr ":exc:`Exception`"
-#: ../../c-api/exceptions.rst:1034
+#: ../../c-api/exceptions.rst:1047
msgid ":c:data:`PyExc_ArithmeticError`"
msgstr ":c:data:`PyExc_ArithmeticError`"
-#: ../../c-api/exceptions.rst:1034
+#: ../../c-api/exceptions.rst:1047
msgid ":exc:`ArithmeticError`"
msgstr ":exc:`ArithmeticError`"
-#: ../../c-api/exceptions.rst:1036
+#: ../../c-api/exceptions.rst:1049
msgid ":c:data:`PyExc_AssertionError`"
msgstr ":c:data:`PyExc_AssertionError`"
-#: ../../c-api/exceptions.rst:1036
+#: ../../c-api/exceptions.rst:1049
msgid ":exc:`AssertionError`"
msgstr ":exc:`AssertionError`"
-#: ../../c-api/exceptions.rst:1038
+#: ../../c-api/exceptions.rst:1051
msgid ":c:data:`PyExc_AttributeError`"
msgstr ":c:data:`PyExc_AttributeError`"
-#: ../../c-api/exceptions.rst:1038
+#: ../../c-api/exceptions.rst:1051
msgid ":exc:`AttributeError`"
msgstr ":exc:`AttributeError`"
-#: ../../c-api/exceptions.rst:1040
+#: ../../c-api/exceptions.rst:1053
msgid ":c:data:`PyExc_BlockingIOError`"
msgstr ":c:data:`PyExc_BlockingIOError`"
-#: ../../c-api/exceptions.rst:1040
+#: ../../c-api/exceptions.rst:1053
msgid ":exc:`BlockingIOError`"
msgstr ":exc:`BlockingIOError`"
-#: ../../c-api/exceptions.rst:1042
+#: ../../c-api/exceptions.rst:1055
msgid ":c:data:`PyExc_BrokenPipeError`"
msgstr ":c:data:`PyExc_BrokenPipeError`"
-#: ../../c-api/exceptions.rst:1042
+#: ../../c-api/exceptions.rst:1055
msgid ":exc:`BrokenPipeError`"
msgstr ":exc:`BrokenPipeError`"
-#: ../../c-api/exceptions.rst:1044
+#: ../../c-api/exceptions.rst:1057
msgid ":c:data:`PyExc_BufferError`"
msgstr ":c:data:`PyExc_BufferError`"
-#: ../../c-api/exceptions.rst:1044
+#: ../../c-api/exceptions.rst:1057
msgid ":exc:`BufferError`"
msgstr ":exc:`BufferError`"
-#: ../../c-api/exceptions.rst:1046
+#: ../../c-api/exceptions.rst:1059
msgid ":c:data:`PyExc_ChildProcessError`"
msgstr ":c:data:`PyExc_ChildProcessError`"
-#: ../../c-api/exceptions.rst:1046
+#: ../../c-api/exceptions.rst:1059
msgid ":exc:`ChildProcessError`"
msgstr ":exc:`ChildProcessError`"
-#: ../../c-api/exceptions.rst:1048
+#: ../../c-api/exceptions.rst:1061
msgid ":c:data:`PyExc_ConnectionAbortedError`"
msgstr ":c:data:`PyExc_ConnectionAbortedError`"
-#: ../../c-api/exceptions.rst:1048
+#: ../../c-api/exceptions.rst:1061
msgid ":exc:`ConnectionAbortedError`"
msgstr ":exc:`ConnectionAbortedError`"
-#: ../../c-api/exceptions.rst:1050
+#: ../../c-api/exceptions.rst:1063
msgid ":c:data:`PyExc_ConnectionError`"
msgstr ":c:data:`PyExc_ConnectionError`"
-#: ../../c-api/exceptions.rst:1050
+#: ../../c-api/exceptions.rst:1063
msgid ":exc:`ConnectionError`"
msgstr ":exc:`ConnectionError`"
-#: ../../c-api/exceptions.rst:1052
+#: ../../c-api/exceptions.rst:1065
msgid ":c:data:`PyExc_ConnectionRefusedError`"
msgstr ":c:data:`PyExc_ConnectionRefusedError`"
-#: ../../c-api/exceptions.rst:1052
+#: ../../c-api/exceptions.rst:1065
msgid ":exc:`ConnectionRefusedError`"
msgstr ":exc:`ConnectionRefusedError`"
-#: ../../c-api/exceptions.rst:1054
+#: ../../c-api/exceptions.rst:1067
msgid ":c:data:`PyExc_ConnectionResetError`"
msgstr ":c:data:`PyExc_ConnectionResetError`"
-#: ../../c-api/exceptions.rst:1054
+#: ../../c-api/exceptions.rst:1067
msgid ":exc:`ConnectionResetError`"
msgstr ":exc:`ConnectionResetError`"
-#: ../../c-api/exceptions.rst:1056
+#: ../../c-api/exceptions.rst:1069
msgid ":c:data:`PyExc_EOFError`"
msgstr ":c:data:`PyExc_EOFError`"
-#: ../../c-api/exceptions.rst:1056
+#: ../../c-api/exceptions.rst:1069
msgid ":exc:`EOFError`"
msgstr ":exc:`EOFError`"
-#: ../../c-api/exceptions.rst:1058
+#: ../../c-api/exceptions.rst:1071
msgid ":c:data:`PyExc_FileExistsError`"
msgstr ":c:data:`PyExc_FileExistsError`"
-#: ../../c-api/exceptions.rst:1058
+#: ../../c-api/exceptions.rst:1071
msgid ":exc:`FileExistsError`"
msgstr ":exc:`FileExistsError`"
-#: ../../c-api/exceptions.rst:1060
+#: ../../c-api/exceptions.rst:1073
msgid ":c:data:`PyExc_FileNotFoundError`"
msgstr ":c:data:`PyExc_FileNotFoundError`"
-#: ../../c-api/exceptions.rst:1060
+#: ../../c-api/exceptions.rst:1073
msgid ":exc:`FileNotFoundError`"
msgstr ":exc:`FileNotFoundError`"
-#: ../../c-api/exceptions.rst:1062
+#: ../../c-api/exceptions.rst:1075
msgid ":c:data:`PyExc_FloatingPointError`"
msgstr ":c:data:`PyExc_FloatingPointError`"
-#: ../../c-api/exceptions.rst:1062
+#: ../../c-api/exceptions.rst:1075
msgid ":exc:`FloatingPointError`"
msgstr ":exc:`FloatingPointError`"
-#: ../../c-api/exceptions.rst:1064
+#: ../../c-api/exceptions.rst:1077
msgid ":c:data:`PyExc_GeneratorExit`"
msgstr ":c:data:`PyExc_GeneratorExit`"
-#: ../../c-api/exceptions.rst:1064
+#: ../../c-api/exceptions.rst:1077
msgid ":exc:`GeneratorExit`"
msgstr ":exc:`GeneratorExit`"
-#: ../../c-api/exceptions.rst:1066
+#: ../../c-api/exceptions.rst:1079
msgid ":c:data:`PyExc_ImportError`"
msgstr ":c:data:`PyExc_ImportError`"
-#: ../../c-api/exceptions.rst:1066
+#: ../../c-api/exceptions.rst:1079
msgid ":exc:`ImportError`"
msgstr ":exc:`ImportError`"
-#: ../../c-api/exceptions.rst:1068
+#: ../../c-api/exceptions.rst:1081
msgid ":c:data:`PyExc_IndentationError`"
msgstr ":c:data:`PyExc_IndentationError`"
-#: ../../c-api/exceptions.rst:1068
+#: ../../c-api/exceptions.rst:1081
msgid ":exc:`IndentationError`"
msgstr ":exc:`IndentationError`"
-#: ../../c-api/exceptions.rst:1070
+#: ../../c-api/exceptions.rst:1083
msgid ":c:data:`PyExc_IndexError`"
msgstr ":c:data:`PyExc_IndexError`"
-#: ../../c-api/exceptions.rst:1070
+#: ../../c-api/exceptions.rst:1083
msgid ":exc:`IndexError`"
msgstr ":exc:`IndexError`"
-#: ../../c-api/exceptions.rst:1072
+#: ../../c-api/exceptions.rst:1085
msgid ":c:data:`PyExc_InterruptedError`"
msgstr ":c:data:`PyExc_InterruptedError`"
-#: ../../c-api/exceptions.rst:1072
+#: ../../c-api/exceptions.rst:1085
msgid ":exc:`InterruptedError`"
msgstr ":exc:`InterruptedError`"
-#: ../../c-api/exceptions.rst:1074
+#: ../../c-api/exceptions.rst:1087
msgid ":c:data:`PyExc_IsADirectoryError`"
msgstr ":c:data:`PyExc_IsADirectoryError`"
-#: ../../c-api/exceptions.rst:1074
+#: ../../c-api/exceptions.rst:1087
msgid ":exc:`IsADirectoryError`"
msgstr ":exc:`IsADirectoryError`"
-#: ../../c-api/exceptions.rst:1076
+#: ../../c-api/exceptions.rst:1089
msgid ":c:data:`PyExc_KeyError`"
msgstr ":c:data:`PyExc_KeyError`"
-#: ../../c-api/exceptions.rst:1076
+#: ../../c-api/exceptions.rst:1089
msgid ":exc:`KeyError`"
msgstr ":exc:`KeyError`"
-#: ../../c-api/exceptions.rst:1078
+#: ../../c-api/exceptions.rst:1091
msgid ":c:data:`PyExc_KeyboardInterrupt`"
msgstr ":c:data:`PyExc_KeyboardInterrupt`"
-#: ../../c-api/exceptions.rst:1078
+#: ../../c-api/exceptions.rst:1091
msgid ":exc:`KeyboardInterrupt`"
msgstr ":exc:`KeyboardInterrupt`"
-#: ../../c-api/exceptions.rst:1080
+#: ../../c-api/exceptions.rst:1093
msgid ":c:data:`PyExc_LookupError`"
msgstr ":c:data:`PyExc_LookupError`"
-#: ../../c-api/exceptions.rst:1080
+#: ../../c-api/exceptions.rst:1093
msgid ":exc:`LookupError`"
msgstr ":exc:`LookupError`"
-#: ../../c-api/exceptions.rst:1082
+#: ../../c-api/exceptions.rst:1095
msgid ":c:data:`PyExc_MemoryError`"
msgstr ":c:data:`PyExc_MemoryError`"
-#: ../../c-api/exceptions.rst:1082
+#: ../../c-api/exceptions.rst:1095
msgid ":exc:`MemoryError`"
msgstr ":exc:`MemoryError`"
-#: ../../c-api/exceptions.rst:1084
+#: ../../c-api/exceptions.rst:1097
msgid ":c:data:`PyExc_ModuleNotFoundError`"
msgstr ":c:data:`PyExc_ModuleNotFoundError`"
-#: ../../c-api/exceptions.rst:1084
+#: ../../c-api/exceptions.rst:1097
msgid ":exc:`ModuleNotFoundError`"
msgstr ":exc:`ModuleNotFoundError`"
-#: ../../c-api/exceptions.rst:1086
+#: ../../c-api/exceptions.rst:1099
msgid ":c:data:`PyExc_NameError`"
msgstr ":c:data:`PyExc_NameError`"
-#: ../../c-api/exceptions.rst:1086
+#: ../../c-api/exceptions.rst:1099
msgid ":exc:`NameError`"
msgstr ":exc:`NameError`"
-#: ../../c-api/exceptions.rst:1088
+#: ../../c-api/exceptions.rst:1101
msgid ":c:data:`PyExc_NotADirectoryError`"
msgstr ":c:data:`PyExc_NotADirectoryError`"
-#: ../../c-api/exceptions.rst:1088
+#: ../../c-api/exceptions.rst:1101
msgid ":exc:`NotADirectoryError`"
msgstr ":exc:`NotADirectoryError`"
-#: ../../c-api/exceptions.rst:1090
+#: ../../c-api/exceptions.rst:1103
msgid ":c:data:`PyExc_NotImplementedError`"
msgstr ":c:data:`PyExc_NotImplementedError`"
-#: ../../c-api/exceptions.rst:1090
+#: ../../c-api/exceptions.rst:1103
msgid ":exc:`NotImplementedError`"
msgstr ":exc:`NotImplementedError`"
-#: ../../c-api/exceptions.rst:1092
+#: ../../c-api/exceptions.rst:1105
msgid ":c:data:`PyExc_OSError`"
msgstr ":c:data:`PyExc_OSError`"
-#: ../../c-api/exceptions.rst:1092
+#: ../../c-api/exceptions.rst:1105
msgid ":exc:`OSError`"
msgstr ":exc:`OSError`"
-#: ../../c-api/exceptions.rst:1094
+#: ../../c-api/exceptions.rst:1107
msgid ":c:data:`PyExc_OverflowError`"
msgstr ":c:data:`PyExc_OverflowError`"
-#: ../../c-api/exceptions.rst:1094
+#: ../../c-api/exceptions.rst:1107
msgid ":exc:`OverflowError`"
msgstr ":exc:`OverflowError`"
-#: ../../c-api/exceptions.rst:1096
+#: ../../c-api/exceptions.rst:1109
msgid ":c:data:`PyExc_PermissionError`"
msgstr ":c:data:`PyExc_PermissionError`"
-#: ../../c-api/exceptions.rst:1096
+#: ../../c-api/exceptions.rst:1109
msgid ":exc:`PermissionError`"
msgstr ":exc:`PermissionError`"
-#: ../../c-api/exceptions.rst:1098
+#: ../../c-api/exceptions.rst:1111
msgid ":c:data:`PyExc_ProcessLookupError`"
msgstr ":c:data:`PyExc_ProcessLookupError`"
-#: ../../c-api/exceptions.rst:1098
+#: ../../c-api/exceptions.rst:1111
msgid ":exc:`ProcessLookupError`"
msgstr ":exc:`ProcessLookupError`"
-#: ../../c-api/exceptions.rst:1100
+#: ../../c-api/exceptions.rst:1113
msgid ":c:data:`PyExc_PythonFinalizationError`"
msgstr ":c:data:`PyExc_PythonFinalizationError`"
-#: ../../c-api/exceptions.rst:1100
+#: ../../c-api/exceptions.rst:1113
msgid ":exc:`PythonFinalizationError`"
msgstr ":exc:`PythonFinalizationError`"
-#: ../../c-api/exceptions.rst:1102
+#: ../../c-api/exceptions.rst:1115
msgid ":c:data:`PyExc_RecursionError`"
msgstr ":c:data:`PyExc_RecursionError`"
-#: ../../c-api/exceptions.rst:1102
+#: ../../c-api/exceptions.rst:1115
msgid ":exc:`RecursionError`"
msgstr ":exc:`RecursionError`"
-#: ../../c-api/exceptions.rst:1104
+#: ../../c-api/exceptions.rst:1117
msgid ":c:data:`PyExc_ReferenceError`"
msgstr ":c:data:`PyExc_ReferenceError`"
-#: ../../c-api/exceptions.rst:1104
+#: ../../c-api/exceptions.rst:1117
msgid ":exc:`ReferenceError`"
msgstr ":exc:`ReferenceError`"
-#: ../../c-api/exceptions.rst:1106
+#: ../../c-api/exceptions.rst:1119
msgid ":c:data:`PyExc_RuntimeError`"
msgstr ":c:data:`PyExc_RuntimeError`"
-#: ../../c-api/exceptions.rst:1106
+#: ../../c-api/exceptions.rst:1119
msgid ":exc:`RuntimeError`"
msgstr ":exc:`RuntimeError`"
-#: ../../c-api/exceptions.rst:1108
+#: ../../c-api/exceptions.rst:1121
msgid ":c:data:`PyExc_StopAsyncIteration`"
msgstr ":c:data:`PyExc_StopAsyncIteration`"
-#: ../../c-api/exceptions.rst:1108
+#: ../../c-api/exceptions.rst:1121
msgid ":exc:`StopAsyncIteration`"
msgstr ":exc:`StopAsyncIteration`"
-#: ../../c-api/exceptions.rst:1110
+#: ../../c-api/exceptions.rst:1123
msgid ":c:data:`PyExc_StopIteration`"
msgstr ":c:data:`PyExc_StopIteration`"
-#: ../../c-api/exceptions.rst:1110
+#: ../../c-api/exceptions.rst:1123
msgid ":exc:`StopIteration`"
msgstr ":exc:`StopIteration`"
-#: ../../c-api/exceptions.rst:1112
+#: ../../c-api/exceptions.rst:1125
msgid ":c:data:`PyExc_SyntaxError`"
msgstr ":c:data:`PyExc_SyntaxError`"
-#: ../../c-api/exceptions.rst:1112
+#: ../../c-api/exceptions.rst:1125
msgid ":exc:`SyntaxError`"
msgstr ":exc:`SyntaxError`"
-#: ../../c-api/exceptions.rst:1114
+#: ../../c-api/exceptions.rst:1127
msgid ":c:data:`PyExc_SystemError`"
msgstr ":c:data:`PyExc_SystemError`"
-#: ../../c-api/exceptions.rst:1114
+#: ../../c-api/exceptions.rst:1127
msgid ":exc:`SystemError`"
msgstr ":exc:`SystemError`"
-#: ../../c-api/exceptions.rst:1116
+#: ../../c-api/exceptions.rst:1129
msgid ":c:data:`PyExc_SystemExit`"
msgstr ":c:data:`PyExc_SystemExit`"
-#: ../../c-api/exceptions.rst:1116
+#: ../../c-api/exceptions.rst:1129
msgid ":exc:`SystemExit`"
msgstr ":exc:`SystemExit`"
-#: ../../c-api/exceptions.rst:1118
+#: ../../c-api/exceptions.rst:1131
msgid ":c:data:`PyExc_TabError`"
msgstr ":c:data:`PyExc_TabError`"
-#: ../../c-api/exceptions.rst:1118
+#: ../../c-api/exceptions.rst:1131
msgid ":exc:`TabError`"
msgstr ":exc:`TabError`"
-#: ../../c-api/exceptions.rst:1120
+#: ../../c-api/exceptions.rst:1133
msgid ":c:data:`PyExc_TimeoutError`"
msgstr ":c:data:`PyExc_TimeoutError`"
-#: ../../c-api/exceptions.rst:1120
+#: ../../c-api/exceptions.rst:1133
msgid ":exc:`TimeoutError`"
msgstr ":exc:`TimeoutError`"
-#: ../../c-api/exceptions.rst:1122
+#: ../../c-api/exceptions.rst:1135
msgid ":c:data:`PyExc_TypeError`"
msgstr ":c:data:`PyExc_TypeError`"
-#: ../../c-api/exceptions.rst:1122
+#: ../../c-api/exceptions.rst:1135
msgid ":exc:`TypeError`"
msgstr ":exc:`TypeError`"
-#: ../../c-api/exceptions.rst:1124
+#: ../../c-api/exceptions.rst:1137
msgid ":c:data:`PyExc_UnboundLocalError`"
msgstr ":c:data:`PyExc_UnboundLocalError`"
-#: ../../c-api/exceptions.rst:1124
+#: ../../c-api/exceptions.rst:1137
msgid ":exc:`UnboundLocalError`"
msgstr ":exc:`UnboundLocalError`"
-#: ../../c-api/exceptions.rst:1126
+#: ../../c-api/exceptions.rst:1139
msgid ":c:data:`PyExc_UnicodeDecodeError`"
msgstr ":c:data:`PyExc_UnicodeDecodeError`"
-#: ../../c-api/exceptions.rst:1126
+#: ../../c-api/exceptions.rst:1139
msgid ":exc:`UnicodeDecodeError`"
msgstr ":exc:`UnicodeDecodeError`"
-#: ../../c-api/exceptions.rst:1128
+#: ../../c-api/exceptions.rst:1141
msgid ":c:data:`PyExc_UnicodeEncodeError`"
msgstr ":c:data:`PyExc_UnicodeEncodeError`"
-#: ../../c-api/exceptions.rst:1128
+#: ../../c-api/exceptions.rst:1141
msgid ":exc:`UnicodeEncodeError`"
msgstr ":exc:`UnicodeEncodeError`"
-#: ../../c-api/exceptions.rst:1130
+#: ../../c-api/exceptions.rst:1143
msgid ":c:data:`PyExc_UnicodeError`"
msgstr ":c:data:`PyExc_UnicodeError`"
-#: ../../c-api/exceptions.rst:1130
+#: ../../c-api/exceptions.rst:1143
msgid ":exc:`UnicodeError`"
msgstr ":exc:`UnicodeError`"
-#: ../../c-api/exceptions.rst:1132
+#: ../../c-api/exceptions.rst:1145
msgid ":c:data:`PyExc_UnicodeTranslateError`"
msgstr ":c:data:`PyExc_UnicodeTranslateError`"
-#: ../../c-api/exceptions.rst:1132
+#: ../../c-api/exceptions.rst:1145
msgid ":exc:`UnicodeTranslateError`"
msgstr ":exc:`UnicodeTranslateError`"
-#: ../../c-api/exceptions.rst:1134
+#: ../../c-api/exceptions.rst:1147
msgid ":c:data:`PyExc_ValueError`"
msgstr ":c:data:`PyExc_ValueError`"
-#: ../../c-api/exceptions.rst:1134
+#: ../../c-api/exceptions.rst:1147
msgid ":exc:`ValueError`"
msgstr ":exc:`ValueError`"
-#: ../../c-api/exceptions.rst:1136
+#: ../../c-api/exceptions.rst:1149
msgid ":c:data:`PyExc_ZeroDivisionError`"
msgstr ":c:data:`PyExc_ZeroDivisionError`"
-#: ../../c-api/exceptions.rst:1136
+#: ../../c-api/exceptions.rst:1149
msgid ":exc:`ZeroDivisionError`"
msgstr ":exc:`ZeroDivisionError`"
-#: ../../c-api/exceptions.rst:1139
+#: ../../c-api/exceptions.rst:1152
msgid ""
":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:"
"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:"
@@ -1510,57 +1528,61 @@ msgstr ""
"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` 和 :c:data:"
"`PyExc_TimeoutError` 是在 :pep:`3151` 被引入。"
-#: ../../c-api/exceptions.rst:1149
+#: ../../c-api/exceptions.rst:1162
msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`."
msgstr ":c:data:`PyExc_StopAsyncIteration` 和 :c:data:`PyExc_RecursionError`。"
-#: ../../c-api/exceptions.rst:1152
+#: ../../c-api/exceptions.rst:1165
msgid ":c:data:`PyExc_ModuleNotFoundError`."
msgstr ":c:data:`PyExc_ModuleNotFoundError`。"
-#: ../../c-api/exceptions.rst:1155
+#: ../../c-api/exceptions.rst:1168
+msgid ":c:data:`PyExc_BaseExceptionGroup`."
+msgstr ":c:data:`PyExc_BaseExceptionGroup`"
+
+#: ../../c-api/exceptions.rst:1171
msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:"
msgstr ""
-#: ../../c-api/exceptions.rst:1165
+#: ../../c-api/exceptions.rst:1181
msgid ":c:data:`!PyExc_EnvironmentError`"
msgstr ":c:data:`!PyExc_EnvironmentError`"
-#: ../../c-api/exceptions.rst:1167
+#: ../../c-api/exceptions.rst:1183
msgid ":c:data:`!PyExc_IOError`"
msgstr ":c:data:`!PyExc_IOError`"
-#: ../../c-api/exceptions.rst:1169
+#: ../../c-api/exceptions.rst:1185
msgid ":c:data:`!PyExc_WindowsError`"
msgstr ":c:data:`!PyExc_WindowsError`"
-#: ../../c-api/exceptions.rst:1169
+#: ../../c-api/exceptions.rst:1185
msgid "[2]_"
msgstr "[2]_"
-#: ../../c-api/exceptions.rst:1172
+#: ../../c-api/exceptions.rst:1188
msgid "These aliases used to be separate exception types."
msgstr ""
-#: ../../c-api/exceptions.rst:1175 ../../c-api/exceptions.rst:1236
+#: ../../c-api/exceptions.rst:1191 ../../c-api/exceptions.rst:1258
msgid "Notes:"
msgstr "註解:"
-#: ../../c-api/exceptions.rst:1178
+#: ../../c-api/exceptions.rst:1194
msgid "This is a base class for other standard exceptions."
msgstr ""
-#: ../../c-api/exceptions.rst:1181
+#: ../../c-api/exceptions.rst:1197
msgid ""
"Only defined on Windows; protect code that uses this by testing that the "
"preprocessor macro ``MS_WINDOWS`` is defined."
msgstr ""
-#: ../../c-api/exceptions.rst:1187
+#: ../../c-api/exceptions.rst:1203
msgid "Standard Warning Categories"
msgstr ""
-#: ../../c-api/exceptions.rst:1189
+#: ../../c-api/exceptions.rst:1205
msgid ""
"All standard Python warning categories are available as global variables "
"whose names are ``PyExc_`` followed by the Python exception name. These have "
@@ -1568,103 +1590,115 @@ msgid ""
"here are all the variables:"
msgstr ""
-#: ../../c-api/exceptions.rst:1210
+#: ../../c-api/exceptions.rst:1227
msgid ":c:data:`PyExc_Warning`"
msgstr ":c:data:`PyExc_Warning`"
-#: ../../c-api/exceptions.rst:1210
+#: ../../c-api/exceptions.rst:1227
msgid ":exc:`Warning`"
msgstr ":exc:`Warning`"
-#: ../../c-api/exceptions.rst:1210
+#: ../../c-api/exceptions.rst:1227
msgid "[3]_"
msgstr "[3]_"
-#: ../../c-api/exceptions.rst:1212
+#: ../../c-api/exceptions.rst:1229
msgid ":c:data:`PyExc_BytesWarning`"
msgstr ":c:data:`PyExc_BytesWarning`"
-#: ../../c-api/exceptions.rst:1212
+#: ../../c-api/exceptions.rst:1229
msgid ":exc:`BytesWarning`"
msgstr ":exc:`BytesWarning`"
-#: ../../c-api/exceptions.rst:1214
+#: ../../c-api/exceptions.rst:1231
msgid ":c:data:`PyExc_DeprecationWarning`"
msgstr ":c:data:`PyExc_DeprecationWarning`"
-#: ../../c-api/exceptions.rst:1214
+#: ../../c-api/exceptions.rst:1231
msgid ":exc:`DeprecationWarning`"
msgstr ":exc:`DeprecationWarning`"
-#: ../../c-api/exceptions.rst:1216
+#: ../../c-api/exceptions.rst:1233
+msgid ":c:data:`PyExc_EncodingWarning`"
+msgstr ":c:data:`PyExc_EncodingWarning`"
+
+#: ../../c-api/exceptions.rst:1233
+msgid ":exc:`EncodingWarning`"
+msgstr ":exc:`EncodingWarning`"
+
+#: ../../c-api/exceptions.rst:1235
msgid ":c:data:`PyExc_FutureWarning`"
msgstr ":c:data:`PyExc_FutureWarning`"
-#: ../../c-api/exceptions.rst:1216
+#: ../../c-api/exceptions.rst:1235
msgid ":exc:`FutureWarning`"
msgstr ":exc:`FutureWarning`"
-#: ../../c-api/exceptions.rst:1218
+#: ../../c-api/exceptions.rst:1237
msgid ":c:data:`PyExc_ImportWarning`"
msgstr ":c:data:`PyExc_ImportWarning`"
-#: ../../c-api/exceptions.rst:1218
+#: ../../c-api/exceptions.rst:1237
msgid ":exc:`ImportWarning`"
msgstr ":exc:`ImportWarning`"
-#: ../../c-api/exceptions.rst:1220
+#: ../../c-api/exceptions.rst:1239
msgid ":c:data:`PyExc_PendingDeprecationWarning`"
msgstr ":c:data:`PyExc_PendingDeprecationWarning`"
-#: ../../c-api/exceptions.rst:1220
+#: ../../c-api/exceptions.rst:1239
msgid ":exc:`PendingDeprecationWarning`"
msgstr ":exc:`PendingDeprecationWarning`"
-#: ../../c-api/exceptions.rst:1222
+#: ../../c-api/exceptions.rst:1241
msgid ":c:data:`PyExc_ResourceWarning`"
msgstr ":c:data:`PyExc_ResourceWarning`"
-#: ../../c-api/exceptions.rst:1222
+#: ../../c-api/exceptions.rst:1241
msgid ":exc:`ResourceWarning`"
msgstr ":exc:`ResourceWarning`"
-#: ../../c-api/exceptions.rst:1224
+#: ../../c-api/exceptions.rst:1243
msgid ":c:data:`PyExc_RuntimeWarning`"
msgstr ":c:data:`PyExc_RuntimeWarning`"
-#: ../../c-api/exceptions.rst:1224
+#: ../../c-api/exceptions.rst:1243
msgid ":exc:`RuntimeWarning`"
msgstr ":exc:`RuntimeWarning`"
-#: ../../c-api/exceptions.rst:1226
+#: ../../c-api/exceptions.rst:1245
msgid ":c:data:`PyExc_SyntaxWarning`"
msgstr ":c:data:`PyExc_SyntaxWarning`"
-#: ../../c-api/exceptions.rst:1226
+#: ../../c-api/exceptions.rst:1245
msgid ":exc:`SyntaxWarning`"
msgstr ":exc:`SyntaxWarning`"
-#: ../../c-api/exceptions.rst:1228
+#: ../../c-api/exceptions.rst:1247
msgid ":c:data:`PyExc_UnicodeWarning`"
msgstr ":c:data:`PyExc_UnicodeWarning`"
-#: ../../c-api/exceptions.rst:1228
+#: ../../c-api/exceptions.rst:1247
msgid ":exc:`UnicodeWarning`"
msgstr ":exc:`UnicodeWarning`"
-#: ../../c-api/exceptions.rst:1230
+#: ../../c-api/exceptions.rst:1249
msgid ":c:data:`PyExc_UserWarning`"
msgstr ":c:data:`PyExc_UserWarning`"
-#: ../../c-api/exceptions.rst:1230
+#: ../../c-api/exceptions.rst:1249
msgid ":exc:`UserWarning`"
msgstr ":exc:`UserWarning`"
-#: ../../c-api/exceptions.rst:1233
+#: ../../c-api/exceptions.rst:1252
msgid ":c:data:`PyExc_ResourceWarning`."
msgstr ":c:data:`PyExc_ResourceWarning`."
-#: ../../c-api/exceptions.rst:1239
+#: ../../c-api/exceptions.rst:1255
+msgid ":c:data:`PyExc_EncodingWarning`."
+msgstr ":c:data:`PyExc_EncodingWarning`"
+
+#: ../../c-api/exceptions.rst:1261
msgid "This is a base class for other standard warning categories."
msgstr ""
@@ -1691,274 +1725,282 @@ msgstr "SIGINT(C 巨集)"
msgid "KeyboardInterrupt (built-in exception)"
msgstr "KeyboardInterrupt(內建例外)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_BaseException (C var)"
msgstr "PyExc_BaseException(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
+msgid "PyExc_BaseExceptionGroup (C var)"
+msgstr "PyExc_BaseExceptionGroup(C 變數)"
+
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_Exception (C var)"
msgstr "PyExc_Exception(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ArithmeticError (C var)"
msgstr "PyExc_ArithmeticError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_AssertionError (C var)"
msgstr "PyExc_AssertionError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_AttributeError (C var)"
msgstr "PyExc_AttributeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_BlockingIOError (C var)"
msgstr "PyExc_BlockingIOError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_BrokenPipeError (C var)"
msgstr "PyExc_BrokenPipeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_BufferError (C var)"
msgstr "PyExc_BufferError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ChildProcessError (C var)"
msgstr "PyExc_ChildProcessError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ConnectionAbortedError (C var)"
msgstr "PyExc_ConnectionAbortedError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ConnectionError (C var)"
msgstr "PyExc_ConnectionError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ConnectionRefusedError (C var)"
msgstr "PyExc_ConnectionRefusedError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ConnectionResetError (C var)"
msgstr "PyExc_ConnectionResetError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_EOFError (C var)"
msgstr "PyExc_EOFError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_FileExistsError (C var)"
msgstr "PyExc_FileExistsError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_FileNotFoundError (C var)"
msgstr "PyExc_FileNotFoundError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_FloatingPointError (C var)"
msgstr "PyExc_FloatingPointError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_GeneratorExit (C var)"
msgstr "PyExc_GeneratorExit(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ImportError (C var)"
msgstr "PyExc_ImportError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_IndentationError (C var)"
msgstr "PyExc_IndentationError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_IndexError (C var)"
msgstr "PyExc_IndexError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_InterruptedError (C var)"
msgstr "PyExc_InterruptedError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_IsADirectoryError (C var)"
msgstr "PyExc_IsADirectoryError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_KeyError (C var)"
msgstr "PyExc_KeyError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_KeyboardInterrupt (C var)"
msgstr "PyExc_KeyboardInterrupt(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_LookupError (C var)"
msgstr "PyExc_LookupError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_MemoryError (C var)"
msgstr "PyExc_MemoryError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ModuleNotFoundError (C var)"
msgstr "PyExc_ModuleNotFoundError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_NameError (C var)"
msgstr "PyExc_NameError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_NotADirectoryError (C var)"
msgstr "PyExc_NotADirectoryError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_NotImplementedError (C var)"
msgstr "PyExc_NotImplementedError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_OSError (C var)"
msgstr "PyExc_OSError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_OverflowError (C var)"
msgstr "PyExc_OverflowError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_PermissionError (C var)"
msgstr "PyExc_PermissionError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ProcessLookupError (C var)"
msgstr "PyExc_ProcessLookupError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_PythonFinalizationError (C var)"
msgstr "PyExc_PythonFinalizationError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_RecursionError (C var)"
msgstr "PyExc_RecursionError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ReferenceError (C var)"
msgstr "PyExc_ReferenceError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_RuntimeError (C var)"
msgstr "PyExc_RuntimeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_StopAsyncIteration (C var)"
msgstr "PyExc_StopAsyncIteration(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_StopIteration (C var)"
msgstr "PyExc_StopIteration(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_SyntaxError (C var)"
msgstr "PyExc_SyntaxError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_SystemError (C var)"
msgstr "PyExc_SystemError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_SystemExit (C var)"
msgstr "PyExc_SystemExit(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_TabError (C var)"
msgstr "PyExc_TabError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_TimeoutError (C var)"
msgstr "PyExc_TimeoutError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_TypeError (C var)"
msgstr "PyExc_TypeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_UnboundLocalError (C var)"
msgstr "PyExc_UnboundLocalError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_UnicodeDecodeError (C var)"
msgstr "PyExc_UnicodeDecodeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_UnicodeEncodeError (C var)"
msgstr "PyExc_UnicodeEncodeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_UnicodeError (C var)"
msgstr "PyExc_UnicodeError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_UnicodeTranslateError (C var)"
msgstr "PyExc_UnicodeTranslateError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ValueError (C var)"
msgstr "PyExc_ValueError(C 變數)"
-#: ../../c-api/exceptions.rst:971
+#: ../../c-api/exceptions.rst:981
msgid "PyExc_ZeroDivisionError (C var)"
msgstr "PyExc_ZeroDivisionError(C 變數)"
-#: ../../c-api/exceptions.rst:1157
+#: ../../c-api/exceptions.rst:1173
msgid "PyExc_EnvironmentError (C var)"
msgstr "PyExc_EnvironmentError(C 變數)"
-#: ../../c-api/exceptions.rst:1157
+#: ../../c-api/exceptions.rst:1173
msgid "PyExc_IOError (C var)"
msgstr "PyExc_IOError(C 變數)"
-#: ../../c-api/exceptions.rst:1157
+#: ../../c-api/exceptions.rst:1173
msgid "PyExc_WindowsError (C var)"
msgstr "PyExc_WindowsError(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_Warning (C var)"
msgstr "PyExc_Warning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_BytesWarning (C var)"
msgstr "PyExc_BytesWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_DeprecationWarning (C var)"
msgstr "PyExc_DeprecationWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
+msgid "PyExc_EncodingWarning (C var)"
+msgstr "PyExc_EncodingWarning(C 變數)"
+
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_FutureWarning (C var)"
msgstr "PyExc_FutureWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_ImportWarning (C var)"
msgstr "PyExc_ImportWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_PendingDeprecationWarning (C var)"
msgstr "PyExc_PendingDeprecationWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_ResourceWarning (C var)"
msgstr "PyExc_ResourceWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_RuntimeWarning (C var)"
msgstr "PyExc_RuntimeWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_SyntaxWarning (C var)"
msgstr "PyExc_SyntaxWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_UnicodeWarning (C var)"
msgstr "PyExc_UnicodeWarning(C 變數)"
-#: ../../c-api/exceptions.rst:1194
+#: ../../c-api/exceptions.rst:1210
msgid "PyExc_UserWarning (C var)"
msgstr "PyExc_UserWarning(C 變數)"
diff --git a/c-api/file.po b/c-api/file.po
index ccf0d607eb..cb40f45c72 100644
--- a/c-api/file.po
+++ b/c-api/file.po
@@ -38,7 +38,7 @@ msgid ""
msgstr ""
"這些 API 是用於內建檔案物件的 Python 2 C API 的最小模擬 (minimal emulation),"
"它過去依賴於 C 標準函式庫對於緩衝 I/O (:c:expr:`FILE*`) 的支援。在 Python 3 "
-"中,檔案和串流使用新的 :mod:`io` 模組,它在操作系統的低階無緩衝 I/O 上定義了"
+"中,檔案和串流使用新的 :mod:`io` 模組,它在作業系統的低階無緩衝 I/O 上定義了"
"多個層級。下面描述的函式是這些新 API 的便捷 C 包裝器,主要用於直譯器中的內部"
"錯誤報告;建議第三方程式碼改為存取 :mod:`io` API。"
@@ -55,7 +55,7 @@ msgstr ""
"從已打開檔案 *fd* 的檔案描述器建立一個 Python 檔案物件。引數 *name*、"
"*encoding*、*errors* 和 *newline* 可以為 ``NULL`` 以使用預設值; *buffering* "
"可以是 *-1* 以使用預設值。 *name* 被忽略並保留以實作向後相容性。失敗時回傳 "
-"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文檔。"
+"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文件。"
#: ../../c-api/file.rst:31
msgid ""
@@ -63,7 +63,7 @@ msgid ""
"level file descriptors can produce various issues (such as unexpected "
"ordering of data)."
msgstr ""
-"由於 Python 串流有自己的緩衝層,將它們與操作系統層級檔案描述器混合使用會產生"
+"由於 Python 串流有自己的緩衝層,將它們與作業系統層級檔案描述器混合使用會產生"
"各種問題(例如資料的排序不符合預期)。"
#: ../../c-api/file.rst:35
diff --git a/c-api/frame.po b/c-api/frame.po
index 1e518a36e3..1bbe0b32c7 100644
--- a/c-api/frame.po
+++ b/c-api/frame.po
@@ -1,17 +1,16 @@
-# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2024-12-12 00:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -43,7 +42,7 @@ msgstr ""
#: ../../c-api/frame.rst:20
msgid "See also :ref:`Reflection `."
-msgstr ""
+msgstr "另請參閱 :ref:`Reflection `。"
#: ../../c-api/frame.rst:24
msgid ""
@@ -155,34 +154,61 @@ msgid ""
msgstr ""
#: ../../c-api/frame.rst:134
-msgid "As part of :pep:`667`, return a proxy object for optimized scopes."
+msgid ""
+"As part of :pep:`667`, return an instance of :c:var:"
+"`PyFrameLocalsProxy_Type`."
msgstr ""
#: ../../c-api/frame.rst:140
msgid "Return the line number that *frame* is currently executing."
msgstr ""
-#: ../../c-api/frame.rst:145
+#: ../../c-api/frame.rst:144
+msgid "Frame Locals Proxies"
+msgstr ""
+
+#: ../../c-api/frame.rst:148
+msgid ""
+"The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object "
+"exposes a write-through view of the underlying locals dictionary for the "
+"frame. This ensures that the variables exposed by ``f_locals`` are always up "
+"to date with the live local variables in the frame itself."
+msgstr ""
+
+#: ../../c-api/frame.rst:154
+msgid "See :pep:`667` for more information."
+msgstr ""
+
+#: ../../c-api/frame.rst:158
+msgid "The type of frame :func:`locals` proxy objects."
+msgstr ""
+
+#: ../../c-api/frame.rst:162
+msgid "Return non-zero if *obj* is a frame :func:`locals` proxy."
+msgstr ""
+
+#: ../../c-api/frame.rst:165
msgid "Internal Frames"
msgstr ""
-#: ../../c-api/frame.rst:147
+#: ../../c-api/frame.rst:167
msgid "Unless using :pep:`523`, you will not need this."
msgstr ""
-#: ../../c-api/frame.rst:151
+#: ../../c-api/frame.rst:171
msgid "The interpreter's internal frame representation."
msgstr ""
-#: ../../c-api/frame.rst:157
+#: ../../c-api/frame.rst:177
msgid "Return a :term:`strong reference` to the code object for the frame."
msgstr ""
-#: ../../c-api/frame.rst:164
+#: ../../c-api/frame.rst:184
msgid "Return the byte offset into the last executed instruction."
msgstr ""
-#: ../../c-api/frame.rst:171
+#: ../../c-api/frame.rst:191
msgid ""
"Return the currently executing line number, or -1 if there is no line number."
msgstr ""
diff --git a/c-api/function.po b/c-api/function.po
index c9e9a6c79f..9328805cc2 100644
--- a/c-api/function.po
+++ b/c-api/function.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-12-13 00:03+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2022-11-12 15:45+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -126,8 +126,8 @@ msgid ""
msgstr ""
"設定函式物件 *op* 的引數預設值。*defaults* 必須是 ``Py_None`` 或一個 tuple。"
-#: ../../c-api/function.rst:86 ../../c-api/function.rst:109
-#: ../../c-api/function.rst:123
+#: ../../c-api/function.rst:86 ../../c-api/function.rst:116
+#: ../../c-api/function.rst:130
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
msgstr "引發 :exc:`SystemError` 且在失敗時回傳 ``-1``。"
@@ -139,9 +139,17 @@ msgstr "為一個給定的函式物件 *func* 設定 vectorcall 欄位。"
msgid ""
"Warning: extensions using this API must preserve the behavior of the "
"unaltered (default) vectorcall function!"
+msgstr "警告:使用此 API 的擴充套件必須保留未更改(預設)vectorcall 函式的行為!"
+
+#: ../../c-api/function.rst:101
+msgid ""
+"Return the keyword-only argument default values of the function object *op*. "
+"This can be a dictionary of arguments or ``NULL``."
msgstr ""
+"回傳函式物件 *op* 的僅限關鍵字引數預設值,這可以是一個含有多個引數的字典或 "
+"``NULL``。"
-#: ../../c-api/function.rst:100
+#: ../../c-api/function.rst:107
msgid ""
"Return the closure associated with the function object *op*. This can be "
"``NULL`` or a tuple of cell objects."
@@ -149,7 +157,7 @@ msgstr ""
"回傳與函式物件 *op* 相關聯的閉包,這可以是個 ``NULL`` 或是一個包含 cell 物件"
"的 tuple。"
-#: ../../c-api/function.rst:106
+#: ../../c-api/function.rst:113
msgid ""
"Set the closure associated with the function object *op*. *closure* must be "
"``Py_None`` or a tuple of cell objects."
@@ -157,20 +165,27 @@ msgstr ""
"設定與函式物件 *op* 相關聯的閉包,*closure* 必須是 ``Py_None`` 或是一個包含 "
"cell 物件的 tuple。"
-#: ../../c-api/function.rst:114
+#: ../../c-api/function.rst:121
msgid ""
"Return the annotations of the function object *op*. This can be a mutable "
"dictionary or ``NULL``."
msgstr ""
"回傳函式物件 *op* 的標註,這可以是一個可變動的 (mutable) 字典或 ``NULL``。"
-#: ../../c-api/function.rst:120
+#: ../../c-api/function.rst:127
msgid ""
"Set the annotations for the function object *op*. *annotations* must be a "
"dictionary or ``Py_None``."
msgstr "設定函式物件 *op* 的標註,*annotations* 必須是一個字典或 ``Py_None``。"
-#: ../../c-api/function.rst:128
+#: ../../c-api/function.rst:141
+msgid ""
+"These functions are similar to their ``PyFunction_Get*`` counterparts, but "
+"do not do type checking. Passing anything other than an instance of :c:data:"
+"`PyFunction_Type` is undefined behavior."
+msgstr ""
+
+#: ../../c-api/function.rst:148
msgid ""
"Register *callback* as a function watcher for the current interpreter. "
"Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In "
@@ -178,7 +193,7 @@ msgid ""
"exception."
msgstr ""
-#: ../../c-api/function.rst:138
+#: ../../c-api/function.rst:158
msgid ""
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on "
@@ -186,19 +201,35 @@ msgid ""
"*watcher_id* was never registered.)"
msgstr ""
-#: ../../c-api/function.rst:148
-msgid ""
-"Enumeration of possible function watcher events: - "
-"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - "
-"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - "
-"``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
+#: ../../c-api/function.rst:168
+msgid "Enumeration of possible function watcher events:"
msgstr ""
-#: ../../c-api/function.rst:160
+#: ../../c-api/function.rst:170
+msgid "``PyFunction_EVENT_CREATE``"
+msgstr "``PyFunction_EVENT_CREATE``"
+
+#: ../../c-api/function.rst:171
+msgid "``PyFunction_EVENT_DESTROY``"
+msgstr "``PyFunction_EVENT_DESTROY``"
+
+#: ../../c-api/function.rst:172
+msgid "``PyFunction_EVENT_MODIFY_CODE``"
+msgstr "``PyFunction_EVENT_MODIFY_CODE``"
+
+#: ../../c-api/function.rst:173
+msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``"
+msgstr "``PyFunction_EVENT_MODIFY_DEFAULTS``"
+
+#: ../../c-api/function.rst:174
+msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
+msgstr "``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
+
+#: ../../c-api/function.rst:181
msgid "Type of a function watcher callback function."
msgstr ""
-#: ../../c-api/function.rst:162
+#: ../../c-api/function.rst:183
msgid ""
"If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` "
"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:"
@@ -206,16 +237,16 @@ msgid ""
"for the attribute that is being modified."
msgstr ""
-#: ../../c-api/function.rst:167
+#: ../../c-api/function.rst:188
msgid ""
"The callback may inspect but must not modify *func*; doing so could have "
"unpredictable effects, including infinite recursion."
msgstr ""
-#: ../../c-api/function.rst:170
+#: ../../c-api/function.rst:191
msgid ""
"If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked "
-"after `func` has been fully initialized. Otherwise, the callback is invoked "
+"after *func* has been fully initialized. Otherwise, the callback is invoked "
"before the modification to *func* takes place, so the prior state of *func* "
"can be inspected. The runtime is permitted to optimize away the creation of "
"function objects when possible. In such cases no event will be emitted. "
@@ -224,7 +255,7 @@ msgid ""
"semantics of the Python code being executed."
msgstr ""
-#: ../../c-api/function.rst:179
+#: ../../c-api/function.rst:200
msgid ""
"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the "
"callback to the about-to-be-destroyed function will resurrect it, preventing "
@@ -232,14 +263,14 @@ msgid ""
"later, any watcher callbacks active at that time will be called again."
msgstr ""
-#: ../../c-api/function.rst:184
+#: ../../c-api/function.rst:205
msgid ""
"If the callback sets an exception, it must return ``-1``; this exception "
"will be printed as an unraisable exception using :c:func:"
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
msgstr ""
-#: ../../c-api/function.rst:188
+#: ../../c-api/function.rst:209
msgid ""
"There may already be a pending exception set on entry to the callback. In "
"this case, the callback should return ``0`` with the same exception still "
diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po
index 51c11e9884..8ad9b1c6a1 100644
--- a/c-api/gcsupport.po
+++ b/c-api/gcsupport.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-01 22:24+0800\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:31+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -255,9 +255,10 @@ msgstr ""
#: ../../c-api/gcsupport.rst:185
msgid ""
-"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
-"*arg*. If *visit* returns a non-zero value, then return it. Using this "
-"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
+"If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, "
+"with arguments *o* and *arg*. If *visit* returns a non-zero value, then "
+"return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers "
+"look like::"
msgstr ""
#: ../../c-api/gcsupport.rst:190
@@ -369,7 +370,7 @@ msgstr ""
msgid ""
"Type of the visitor function to be passed to :c:func:"
"`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to "
-"``PyUnstable_GC_VisitObjects``. Return ``0`` to continue iteration, return "
-"``1`` to stop iteration. Other return values are reserved for now so "
+"``PyUnstable_GC_VisitObjects``. Return ``1`` to continue iteration, return "
+"``0`` to stop iteration. Other return values are reserved for now so "
"behavior on returning anything else is undefined."
msgstr ""
diff --git a/c-api/hash.po b/c-api/hash.po
index 42324bd36d..01b52c5549 100644
--- a/c-api/hash.po
+++ b/c-api/hash.po
@@ -22,10 +22,9 @@ msgid "PyHash API"
msgstr "PyHash API"
#: ../../c-api/hash.rst:6
-#, fuzzy
msgid ""
"See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`."
-msgstr "另請參閱 :c:member:`PyTypeObject.tp_hash` 成員。"
+msgstr "另請參閱 :c:member:`PyTypeObject.tp_hash` 成員和 :ref:`numeric-hash`。"
#: ../../c-api/hash.rst:10
msgid "Hash value type: signed integer."
diff --git a/c-api/init.po b/c-api/init.po
index 4dbcd74843..e003fd46a4 100644
--- a/c-api/init.po
+++ b/c-api/init.po
@@ -1,4 +1,3 @@
-# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
@@ -8,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-11 00:13+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2023-04-24 20:49+0800\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -420,7 +419,7 @@ msgstr "更多詳情請見 :pep:`529`。"
#: ../../c-api/init.rst:238 ../../c-api/init.rst:256
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../c-api/init.rst:244
msgid ""
@@ -719,29 +718,18 @@ msgstr ""
#: ../../c-api/init.rst:491
msgid ""
-"The return value will be ``0`` if the interpreter exits normally (i.e., "
-"without an exception), ``1`` if the interpreter exits due to an exception, "
-"or ``2`` if the argument list does not represent a valid Python command line."
-msgstr ""
-
-#: ../../c-api/init.rst:496
-msgid ""
-"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this "
-"function will not return ``1``, but exit the process, as long as "
-"``Py_InspectFlag`` is not set. If ``Py_InspectFlag`` is set, execution will "
-"drop into the interactive Python prompt, at which point a second otherwise "
-"unhandled :exc:`SystemExit` will still exit the process, while any other "
-"means of exiting will set the return value as described above."
+"The return value is ``2`` if the argument list does not represent a valid "
+"Python command line, and otherwise the same as :c:func:`Py_RunMain`."
msgstr ""
-#: ../../c-api/init.rst:503
+#: ../../c-api/init.rst:494
msgid ""
"In terms of the CPython runtime configuration APIs documented in the :ref:"
"`runtime configuration ` section (and without accounting for "
"error handling), ``Py_Main`` is approximately equivalent to::"
msgstr ""
-#: ../../c-api/init.rst:507
+#: ../../c-api/init.rst:498
msgid ""
"PyConfig config;\n"
"PyConfig_InitPythonConfig(&config);\n"
@@ -752,7 +740,7 @@ msgid ""
"Py_RunMain();"
msgstr ""
-#: ../../c-api/init.rst:515
+#: ../../c-api/init.rst:506
msgid ""
"In normal usage, an embedding application will call this function *instead* "
"of calling :c:func:`Py_Initialize`, :c:func:`Py_InitializeEx` or :c:func:"
@@ -765,11 +753,11 @@ msgid ""
"first initialized)."
msgstr ""
-#: ../../c-api/init.rst:528
+#: ../../c-api/init.rst:519
msgid "Executes the main module in a fully configured CPython runtime."
msgstr ""
-#: ../../c-api/init.rst:530
+#: ../../c-api/init.rst:521
msgid ""
"Executes the command (:c:member:`PyConfig.run_command`), the script (:c:"
"member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig."
@@ -778,54 +766,60 @@ msgid ""
"``__main__`` module's global namespace."
msgstr ""
-#: ../../c-api/init.rst:536
+#: ../../c-api/init.rst:527
msgid ""
"If :c:member:`PyConfig.inspect` is not set (the default), the return value "
"will be ``0`` if the interpreter exits normally (that is, without raising an "
-"exception), or ``1`` if the interpreter exits due to an exception. If an "
-"otherwise unhandled :exc:`SystemExit` is raised, the function will "
-"immediately exit the process instead of returning ``1``."
+"exception), the exit status of an unhandled :exc:`SystemExit`, or ``1`` for "
+"any other unhandled exception."
msgstr ""
-#: ../../c-api/init.rst:542
+#: ../../c-api/init.rst:532
msgid ""
"If :c:member:`PyConfig.inspect` is set (such as when the :option:`-i` option "
"is used), rather than returning when the interpreter exits, execution will "
"instead resume in an interactive Python prompt (REPL) using the ``__main__`` "
"module's global namespace. If the interpreter exited with an exception, it "
"is immediately raised in the REPL session. The function return value is then "
-"determined by the way the *REPL session* terminates: returning ``0`` if the "
-"session terminates without raising an unhandled exception, exiting "
-"immediately for an unhandled :exc:`SystemExit`, and returning ``1`` for any "
-"other unhandled exception."
+"determined by the way the *REPL session* terminates: ``0``, ``1``, or the "
+"status of a :exc:`SystemExit`, as specified above."
msgstr ""
-#: ../../c-api/init.rst:552
+#: ../../c-api/init.rst:540
msgid ""
-"This function always finalizes the Python interpreter regardless of whether "
-"it returns a value or immediately exits the process due to an unhandled :exc:"
-"`SystemExit` exception."
+"This function always finalizes the Python interpreter before it returns."
msgstr ""
-#: ../../c-api/init.rst:556
+#: ../../c-api/init.rst:542
msgid ""
"See :ref:`Python Configuration ` for an example of a "
"customized Python that always runs in isolated mode using :c:func:"
"`Py_RunMain`."
msgstr ""
-#: ../../c-api/init.rst:562
+#: ../../c-api/init.rst:548
+msgid ""
+"Register an :mod:`atexit` callback for the target interpreter *interp*. This "
+"is similar to :c:func:`Py_AtExit`, but takes an explicit interpreter and "
+"data pointer for the callback."
+msgstr ""
+
+#: ../../c-api/init.rst:552
+msgid "The :term:`GIL` must be held for *interp*."
+msgstr ""
+
+#: ../../c-api/init.rst:557
msgid "Process-wide parameters"
msgstr ""
-#: ../../c-api/init.rst:572
+#: ../../c-api/init.rst:567
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"program_name` should be used instead, see :ref:`Python Initialization "
"Configuration `."
msgstr ""
-#: ../../c-api/init.rst:576
+#: ../../c-api/init.rst:571
msgid ""
"This function should be called before :c:func:`Py_Initialize` is called for "
"the first time, if it is called at all. It tells the interpreter the value "
@@ -839,37 +833,37 @@ msgid ""
"this storage."
msgstr ""
-#: ../../c-api/init.rst:587 ../../c-api/init.rst:826 ../../c-api/init.rst:862
-#: ../../c-api/init.rst:888
+#: ../../c-api/init.rst:582 ../../c-api/init.rst:824 ../../c-api/init.rst:860
+#: ../../c-api/init.rst:886
msgid ""
"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:"
-"`wchar_*` string."
+"`wchar_t*` string."
msgstr ""
-#: ../../c-api/init.rst:595
+#: ../../c-api/init.rst:590
msgid ""
"Return the program name set with :c:member:`PyConfig.program_name`, or the "
"default. The returned string points into static storage; the caller should "
"not modify its value."
msgstr ""
-#: ../../c-api/init.rst:599 ../../c-api/init.rst:621 ../../c-api/init.rst:665
-#: ../../c-api/init.rst:686 ../../c-api/init.rst:712 ../../c-api/init.rst:900
+#: ../../c-api/init.rst:594 ../../c-api/init.rst:616 ../../c-api/init.rst:662
+#: ../../c-api/init.rst:684 ../../c-api/init.rst:710 ../../c-api/init.rst:898
msgid ""
"This function should not be called before :c:func:`Py_Initialize`, otherwise "
"it returns ``NULL``."
msgstr "此函式不應該在 :c:func:`Py_Initialize` 之前呼叫,否則會回傳 ``NULL``。"
-#: ../../c-api/init.rst:602 ../../c-api/init.rst:624 ../../c-api/init.rst:668
-#: ../../c-api/init.rst:689 ../../c-api/init.rst:717 ../../c-api/init.rst:903
+#: ../../c-api/init.rst:597 ../../c-api/init.rst:619 ../../c-api/init.rst:665
+#: ../../c-api/init.rst:687 ../../c-api/init.rst:715 ../../c-api/init.rst:901
msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`."
msgstr "如果在 :c:func:`Py_Initialize` 之前呼叫,現在會回傳 ``NULL``。"
-#: ../../c-api/init.rst:605 ../../c-api/init.rst:692
+#: ../../c-api/init.rst:600 ../../c-api/init.rst:690
msgid "Get :data:`sys.executable` instead."
msgstr ""
-#: ../../c-api/init.rst:611
+#: ../../c-api/init.rst:606
msgid ""
"Return the *prefix* for installed platform-independent files. This is "
"derived through a number of complicated rules from the program name set "
@@ -879,15 +873,17 @@ msgid ""
"should not modify its value. This corresponds to the :makevar:`prefix` "
"variable in the top-level :file:`Makefile` and the :option:`--prefix` "
"argument to the :program:`configure` script at build time. The value is "
-"available to Python code as ``sys.prefix``. It is only useful on Unix. See "
-"also the next function."
+"available to Python code as ``sys.base_prefix``. It is only useful on Unix. "
+"See also the next function."
msgstr ""
-#: ../../c-api/init.rst:627
-msgid "Get :data:`sys.prefix` instead."
+#: ../../c-api/init.rst:622
+msgid ""
+"Get :data:`sys.base_prefix` instead, or :data:`sys.prefix` if :ref:`virtual "
+"environments ` need to be handled."
msgstr ""
-#: ../../c-api/init.rst:633
+#: ../../c-api/init.rst:629
msgid ""
"Return the *exec-prefix* for installed platform-*dependent* files. This is "
"derived through a number of complicated rules from the program name set "
@@ -897,11 +893,11 @@ msgid ""
"caller should not modify its value. This corresponds to the :makevar:"
"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-"
"prefix`` argument to the :program:`configure` script at build time. The "
-"value is available to Python code as ``sys.exec_prefix``. It is only useful "
-"on Unix."
+"value is available to Python code as ``sys.base_exec_prefix``. It is only "
+"useful on Unix."
msgstr ""
-#: ../../c-api/init.rst:643
+#: ../../c-api/init.rst:640
msgid ""
"Background: The exec-prefix differs from the prefix when platform dependent "
"files (such as executables and shared libraries) are installed in a "
@@ -910,7 +906,7 @@ msgid ""
"independent may be installed in :file:`/usr/local`."
msgstr ""
-#: ../../c-api/init.rst:649
+#: ../../c-api/init.rst:646
msgid ""
"Generally speaking, a platform is a combination of hardware and software "
"families, e.g. Sparc machines running the Solaris 2.x operating system are "
@@ -924,7 +920,7 @@ msgid ""
"independent from the Python version by which they were compiled!)."
msgstr ""
-#: ../../c-api/init.rst:660
+#: ../../c-api/init.rst:657
msgid ""
"System administrators will know how to configure the :program:`mount` or :"
"program:`automount` programs to share :file:`/usr/local` between platforms "
@@ -932,11 +928,13 @@ msgid ""
"platform."
msgstr ""
-#: ../../c-api/init.rst:671
-msgid "Get :data:`sys.exec_prefix` instead."
+#: ../../c-api/init.rst:668
+msgid ""
+"Get :data:`sys.base_exec_prefix` instead, or :data:`sys.exec_prefix` if :ref:"
+"`virtual environments ` need to be handled."
msgstr ""
-#: ../../c-api/init.rst:680
+#: ../../c-api/init.rst:678
msgid ""
"Return the full program name of the Python executable; this is computed as "
"a side-effect of deriving the default module search path from the program "
@@ -945,7 +943,7 @@ msgid ""
"available to Python code as ``sys.executable``."
msgstr ""
-#: ../../c-api/init.rst:702
+#: ../../c-api/init.rst:700
msgid ""
"Return the default module search path; this is computed from the program "
"name (set by :c:member:`PyConfig.program_name`) and some environment "
@@ -958,21 +956,21 @@ msgid ""
"for loading modules."
msgstr ""
-#: ../../c-api/init.rst:720
+#: ../../c-api/init.rst:718
msgid "Get :data:`sys.path` instead."
msgstr ""
-#: ../../c-api/init.rst:726
+#: ../../c-api/init.rst:724
msgid ""
"Return the version of this Python interpreter. This is a string that looks "
"something like ::"
msgstr ""
-#: ../../c-api/init.rst:729
+#: ../../c-api/init.rst:727
msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\""
msgstr "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\""
-#: ../../c-api/init.rst:733
+#: ../../c-api/init.rst:731
msgid ""
"The first word (up to the first space character) is the current Python "
"version; the first characters are the major and minor version separated by a "
@@ -981,11 +979,11 @@ msgid ""
"version`."
msgstr ""
-#: ../../c-api/init.rst:738
+#: ../../c-api/init.rst:736
msgid "See also the :c:var:`Py_Version` constant."
-msgstr ""
+msgstr "另請參閱 :c:var:`Py_Version` 常數。"
-#: ../../c-api/init.rst:745
+#: ../../c-api/init.rst:743
msgid ""
"Return the platform identifier for the current platform. On Unix, this is "
"formed from the \"official\" name of the operating system, converted to "
@@ -996,50 +994,50 @@ msgid ""
"available to Python code as ``sys.platform``."
msgstr ""
-#: ../../c-api/init.rst:756
+#: ../../c-api/init.rst:754
msgid ""
"Return the official copyright string for the current Python version, for "
"example"
msgstr ""
-#: ../../c-api/init.rst:758
+#: ../../c-api/init.rst:756
msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
msgstr "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
-#: ../../c-api/init.rst:762
+#: ../../c-api/init.rst:760
msgid ""
"The returned string points into static storage; the caller should not modify "
"its value. The value is available to Python code as ``sys.copyright``."
msgstr ""
-#: ../../c-api/init.rst:768
+#: ../../c-api/init.rst:766
msgid ""
"Return an indication of the compiler used to build the current Python "
"version, in square brackets, for example::"
msgstr ""
-#: ../../c-api/init.rst:771
+#: ../../c-api/init.rst:769
msgid "\"[GCC 2.7.2.2]\""
msgstr "\"[GCC 2.7.2.2]\""
-#: ../../c-api/init.rst:775 ../../c-api/init.rst:789
+#: ../../c-api/init.rst:773 ../../c-api/init.rst:787
msgid ""
"The returned string points into static storage; the caller should not modify "
"its value. The value is available to Python code as part of the variable "
"``sys.version``."
msgstr ""
-#: ../../c-api/init.rst:782
+#: ../../c-api/init.rst:780
msgid ""
"Return information about the sequence number and build date and time of the "
"current Python interpreter instance, for example ::"
msgstr ""
-#: ../../c-api/init.rst:785
+#: ../../c-api/init.rst:783
msgid "\"#67, Aug 1 1997, 22:34:28\""
msgstr "\"#67, Aug 1 1997, 22:34:28\""
-#: ../../c-api/init.rst:801
+#: ../../c-api/init.rst:799
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` "
@@ -1047,7 +1045,7 @@ msgid ""
"config>`."
msgstr ""
-#: ../../c-api/init.rst:806
+#: ../../c-api/init.rst:804
msgid ""
"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are "
"similar to those passed to the program's :c:func:`main` function with the "
@@ -1058,84 +1056,84 @@ msgid ""
"fatal condition is signalled using :c:func:`Py_FatalError`."
msgstr ""
-#: ../../c-api/init.rst:814
+#: ../../c-api/init.rst:812
msgid ""
"If *updatepath* is zero, this is all the function does. If *updatepath* is "
"non-zero, the function also modifies :data:`sys.path` according to the "
"following algorithm:"
msgstr ""
-#: ../../c-api/init.rst:818
+#: ../../c-api/init.rst:816
msgid ""
"If the name of an existing script is passed in ``argv[0]``, the absolute "
"path of the directory where the script is located is prepended to :data:`sys."
"path`."
msgstr ""
-#: ../../c-api/init.rst:821
+#: ../../c-api/init.rst:819
msgid ""
"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an "
"existing file name), an empty string is prepended to :data:`sys.path`, which "
"is the same as prepending the current working directory (``\".\"``)."
msgstr ""
-#: ../../c-api/init.rst:829 ../../c-api/init.rst:865
+#: ../../c-api/init.rst:827 ../../c-api/init.rst:863
msgid ""
"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` "
"members of the :ref:`Python Initialization Configuration `."
msgstr ""
-#: ../../c-api/init.rst:833
+#: ../../c-api/init.rst:831
msgid ""
"It is recommended that applications embedding the Python interpreter for "
"purposes other than executing a single script pass ``0`` as *updatepath*, "
"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`."
msgstr ""
-#: ../../c-api/init.rst:838
+#: ../../c-api/init.rst:836
msgid ""
"On versions before 3.1.3, you can achieve the same effect by manually "
"popping the first :data:`sys.path` element after having called :c:func:"
"`PySys_SetArgv`, for example using::"
msgstr ""
-#: ../../c-api/init.rst:842
+#: ../../c-api/init.rst:840
msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");"
msgstr "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");"
-#: ../../c-api/init.rst:854
+#: ../../c-api/init.rst:852
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:"
"`Python Initialization Configuration `."
msgstr ""
-#: ../../c-api/init.rst:858
+#: ../../c-api/init.rst:856
msgid ""
"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to "
"``1`` unless the :program:`python` interpreter was started with the :option:"
"`-I`."
msgstr ""
-#: ../../c-api/init.rst:868
+#: ../../c-api/init.rst:866
msgid "The *updatepath* value depends on :option:`-I`."
msgstr ""
-#: ../../c-api/init.rst:875
+#: ../../c-api/init.rst:873
msgid ""
"This API is kept for backward compatibility: setting :c:member:`PyConfig."
"home` should be used instead, see :ref:`Python Initialization Configuration "
"`."
msgstr ""
-#: ../../c-api/init.rst:879
+#: ../../c-api/init.rst:877
msgid ""
"Set the default \"home\" directory, that is, the location of the standard "
"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument "
"string."
msgstr ""
-#: ../../c-api/init.rst:883
+#: ../../c-api/init.rst:881
msgid ""
"The argument should point to a zero-terminated character string in static "
"storage whose contents will not change for the duration of the program's "
@@ -1143,24 +1141,24 @@ msgid ""
"this storage."
msgstr ""
-#: ../../c-api/init.rst:896
+#: ../../c-api/init.rst:894
msgid ""
"Return the default \"home\", that is, the value set by :c:member:`PyConfig."
"home`, or the value of the :envvar:`PYTHONHOME` environment variable if it "
"is set."
msgstr ""
-#: ../../c-api/init.rst:906
+#: ../../c-api/init.rst:904
msgid ""
"Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment variable "
"instead."
msgstr "改為取得 :c:member:`PyConfig.home` 或 :envvar:`PYTHONHOME` 環境變數。"
-#: ../../c-api/init.rst:914
+#: ../../c-api/init.rst:912
msgid "Thread State and the Global Interpreter Lock"
msgstr ""
-#: ../../c-api/init.rst:921
+#: ../../c-api/init.rst:919
msgid ""
"The Python interpreter is not fully thread-safe. In order to support multi-"
"threaded Python programs, there's a global lock, called the :term:`global "
@@ -1172,7 +1170,7 @@ msgid ""
"once instead of twice."
msgstr ""
-#: ../../c-api/init.rst:931
+#: ../../c-api/init.rst:929
msgid ""
"Therefore, the rule exists that only the thread that has acquired the :term:"
"`GIL` may operate on Python objects or call Python/C API functions. In order "
@@ -1182,7 +1180,7 @@ msgid ""
"a file, so that other Python threads can run in the meantime."
msgstr ""
-#: ../../c-api/init.rst:941
+#: ../../c-api/init.rst:939
msgid ""
"The Python interpreter keeps some thread-specific bookkeeping information "
"inside a data structure called :c:type:`PyThreadState`. There's also one "
@@ -1190,17 +1188,17 @@ msgid ""
"retrieved using :c:func:`PyThreadState_Get`."
msgstr ""
-#: ../../c-api/init.rst:947
+#: ../../c-api/init.rst:945
msgid "Releasing the GIL from extension code"
msgstr ""
-#: ../../c-api/init.rst:949
+#: ../../c-api/init.rst:947
msgid ""
"Most extension code manipulating the :term:`GIL` has the following simple "
"structure::"
msgstr ""
-#: ../../c-api/init.rst:952
+#: ../../c-api/init.rst:950
msgid ""
"Save the thread state in a local variable.\n"
"Release the global interpreter lock.\n"
@@ -1209,29 +1207,29 @@ msgid ""
"Restore the thread state from the local variable."
msgstr ""
-#: ../../c-api/init.rst:958
+#: ../../c-api/init.rst:956
msgid "This is so common that a pair of macros exists to simplify it::"
msgstr ""
-#: ../../c-api/init.rst:960
+#: ../../c-api/init.rst:958
msgid ""
"Py_BEGIN_ALLOW_THREADS\n"
"... Do some blocking I/O operation ...\n"
"Py_END_ALLOW_THREADS"
msgstr ""
-#: ../../c-api/init.rst:968
+#: ../../c-api/init.rst:966
msgid ""
"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a "
"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the "
"block."
msgstr ""
-#: ../../c-api/init.rst:972
+#: ../../c-api/init.rst:970
msgid "The block above expands to the following code::"
msgstr ""
-#: ../../c-api/init.rst:974
+#: ../../c-api/init.rst:972
msgid ""
"PyThreadState *_save;\n"
"\n"
@@ -1240,7 +1238,7 @@ msgid ""
"PyEval_RestoreThread(_save);"
msgstr ""
-#: ../../c-api/init.rst:984
+#: ../../c-api/init.rst:982
msgid ""
"Here is how these functions work: the global interpreter lock is used to "
"protect the pointer to the current thread state. When releasing the lock "
@@ -1251,7 +1249,7 @@ msgid ""
"state, the lock must be acquired before storing the thread state pointer."
msgstr ""
-#: ../../c-api/init.rst:993
+#: ../../c-api/init.rst:991
msgid ""
"Calling system I/O functions is the most common use case for releasing the "
"GIL, but it can also be useful before calling long-running computations "
@@ -1261,11 +1259,11 @@ msgid ""
"compressing or hashing data."
msgstr ""
-#: ../../c-api/init.rst:1004
+#: ../../c-api/init.rst:1002
msgid "Non-Python created threads"
msgstr ""
-#: ../../c-api/init.rst:1006
+#: ../../c-api/init.rst:1004
msgid ""
"When threads are created using the dedicated Python APIs (such as the :mod:"
"`threading` module), a thread state is automatically associated to them and "
@@ -1275,7 +1273,7 @@ msgid ""
"for them."
msgstr ""
-#: ../../c-api/init.rst:1013
+#: ../../c-api/init.rst:1011
msgid ""
"If you need to call Python code from these threads (often this will be part "
"of a callback API provided by the aforementioned third-party library), you "
@@ -1286,14 +1284,14 @@ msgid ""
"finally free the thread state data structure."
msgstr ""
-#: ../../c-api/init.rst:1021
+#: ../../c-api/init.rst:1019
msgid ""
"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions "
"do all of the above automatically. The typical idiom for calling into "
"Python from a C thread is::"
msgstr ""
-#: ../../c-api/init.rst:1025
+#: ../../c-api/init.rst:1023
msgid ""
"PyGILState_STATE gstate;\n"
"gstate = PyGILState_Ensure();\n"
@@ -1306,7 +1304,7 @@ msgid ""
"PyGILState_Release(gstate);"
msgstr ""
-#: ../../c-api/init.rst:1035
+#: ../../c-api/init.rst:1033
msgid ""
"Note that the ``PyGILState_*`` functions assume there is only one global "
"interpreter (created automatically by :c:func:`Py_Initialize`). Python "
@@ -1315,11 +1313,11 @@ msgid ""
"``PyGILState_*`` API is unsupported."
msgstr ""
-#: ../../c-api/init.rst:1045
+#: ../../c-api/init.rst:1043
msgid "Cautions about fork()"
msgstr ""
-#: ../../c-api/init.rst:1047
+#: ../../c-api/init.rst:1045
msgid ""
"Another important thing to note about threads is their behaviour in the face "
"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a "
@@ -1328,7 +1326,7 @@ msgid ""
"CPython's runtime."
msgstr ""
-#: ../../c-api/init.rst:1053
+#: ../../c-api/init.rst:1051
msgid ""
"The fact that only the \"current\" thread remains means any locks held by "
"other threads will never be released. Python solves this for :func:`os.fork` "
@@ -1345,7 +1343,7 @@ msgid ""
"locks, but is not always able to."
msgstr ""
-#: ../../c-api/init.rst:1068
+#: ../../c-api/init.rst:1066
msgid ""
"The fact that all other threads go away also means that CPython's runtime "
"state there must be cleaned up properly, which :func:`os.fork` does. This "
@@ -1358,17 +1356,17 @@ msgid ""
"called immediately after."
msgstr ""
-#: ../../c-api/init.rst:1081
+#: ../../c-api/init.rst:1079
msgid "High-level API"
msgstr "高階 API"
-#: ../../c-api/init.rst:1083
+#: ../../c-api/init.rst:1081
msgid ""
"These are the most commonly used types and functions when writing C "
"extension code, or when embedding the Python interpreter:"
msgstr ""
-#: ../../c-api/init.rst:1088
+#: ../../c-api/init.rst:1086
msgid ""
"This data structure represents the state shared by a number of cooperating "
"threads. Threads belonging to the same interpreter share their module "
@@ -1376,7 +1374,7 @@ msgid ""
"in this structure."
msgstr ""
-#: ../../c-api/init.rst:1093
+#: ../../c-api/init.rst:1091
msgid ""
"Threads belonging to different interpreters initially share nothing, except "
"process state like available memory, open file descriptors and such. The "
@@ -1384,41 +1382,41 @@ msgid ""
"which interpreter they belong."
msgstr ""
-#: ../../c-api/init.rst:1101
+#: ../../c-api/init.rst:1099
msgid ""
"This data structure represents the state of a single thread. The only "
"public data member is:"
msgstr ""
-#: ../../c-api/init.rst:1106
+#: ../../c-api/init.rst:1104
msgid "This thread's interpreter state."
msgstr ""
-#: ../../c-api/init.rst:1117
+#: ../../c-api/init.rst:1115
msgid "Deprecated function which does nothing."
msgstr ""
-#: ../../c-api/init.rst:1119
+#: ../../c-api/init.rst:1117
msgid ""
"In Python 3.6 and older, this function created the GIL if it didn't exist."
msgstr ""
-#: ../../c-api/init.rst:1121
+#: ../../c-api/init.rst:1119
msgid "The function now does nothing."
msgstr "此函式現在不會做任何事情。"
-#: ../../c-api/init.rst:1124
+#: ../../c-api/init.rst:1122
msgid ""
"This function is now called by :c:func:`Py_Initialize()`, so you don't have "
"to call it yourself anymore."
msgstr ""
-#: ../../c-api/init.rst:1128
+#: ../../c-api/init.rst:1126
msgid ""
"This function cannot be called before :c:func:`Py_Initialize()` anymore."
msgstr ""
-#: ../../c-api/init.rst:1138
+#: ../../c-api/init.rst:1136
msgid ""
"Release the global interpreter lock (if it has been created) and reset the "
"thread state to ``NULL``, returning the previous thread state (which is not "
@@ -1426,7 +1424,7 @@ msgid ""
"acquired it."
msgstr ""
-#: ../../c-api/init.rst:1146
+#: ../../c-api/init.rst:1144
msgid ""
"Acquire the global interpreter lock (if it has been created) and set the "
"thread state to *tstate*, which must not be ``NULL``. If the lock has been "
@@ -1434,8 +1432,8 @@ msgid ""
"ensues."
msgstr ""
-#: ../../c-api/init.rst:1152 ../../c-api/init.rst:1211
-#: ../../c-api/init.rst:1493
+#: ../../c-api/init.rst:1150 ../../c-api/init.rst:1210
+#: ../../c-api/init.rst:1506
msgid ""
"Calling this function from a thread when the runtime is finalizing will "
"terminate the thread, even if the thread was not created by Python. You can "
@@ -1444,44 +1442,49 @@ msgid ""
"avoid unwanted termination."
msgstr ""
-#: ../../c-api/init.rst:1160
+#: ../../c-api/init.rst:1158
msgid ""
"Return the current thread state. The global interpreter lock must be held. "
"When the current thread state is ``NULL``, this issues a fatal error (so "
"that the caller needn't check for ``NULL``)."
msgstr ""
-#: ../../c-api/init.rst:1164
+#: ../../c-api/init.rst:1162
msgid "See also :c:func:`PyThreadState_GetUnchecked`."
msgstr "也請見 :c:func:`PyThreadState_GetUnchecked`。"
-#: ../../c-api/init.rst:1169
+#: ../../c-api/init.rst:1167
msgid ""
"Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a "
"fatal error if it is NULL. The caller is responsible to check if the result "
"is NULL."
msgstr ""
-#: ../../c-api/init.rst:1173
+#: ../../c-api/init.rst:1171
msgid ""
"In Python 3.5 to 3.12, the function was private and known as "
"``_PyThreadState_UncheckedGet()``."
msgstr ""
-#: ../../c-api/init.rst:1180
+#: ../../c-api/init.rst:1178
msgid ""
"Swap the current thread state with the thread state given by the argument "
-"*tstate*, which may be ``NULL``. The global interpreter lock must be held "
-"and is not released."
+"*tstate*, which may be ``NULL``."
+msgstr ""
+
+#: ../../c-api/init.rst:1181
+msgid ""
+"The :term:`GIL` does not need to be held, but will be held upon returning if "
+"*tstate* is non-``NULL``."
msgstr ""
-#: ../../c-api/init.rst:1185
+#: ../../c-api/init.rst:1184
msgid ""
"The following functions use thread-local storage, and are not compatible "
"with sub-interpreters:"
msgstr ""
-#: ../../c-api/init.rst:1190
+#: ../../c-api/init.rst:1189
msgid ""
"Ensure that the current thread is ready to call the Python C API regardless "
"of the current state of Python, or of the global interpreter lock. This may "
@@ -1494,7 +1497,7 @@ msgid ""
"is acceptable."
msgstr ""
-#: ../../c-api/init.rst:1200
+#: ../../c-api/init.rst:1199
msgid ""
"The return value is an opaque \"handle\" to the thread state when :c:func:"
"`PyGILState_Ensure` was called, and must be passed to :c:func:"
@@ -1504,13 +1507,13 @@ msgid ""
"func:`PyGILState_Release`."
msgstr ""
-#: ../../c-api/init.rst:1207
+#: ../../c-api/init.rst:1206
msgid ""
"When the function returns, the current thread will hold the GIL and be able "
"to call arbitrary Python code. Failure is a fatal error."
msgstr ""
-#: ../../c-api/init.rst:1219
+#: ../../c-api/init.rst:1218
msgid ""
"Release any resources previously acquired. After this call, Python's state "
"will be the same as it was prior to the corresponding :c:func:"
@@ -1518,13 +1521,13 @@ msgid ""
"caller, hence the use of the GILState API)."
msgstr ""
-#: ../../c-api/init.rst:1224
+#: ../../c-api/init.rst:1223
msgid ""
"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:"
"func:`PyGILState_Release` on the same thread."
msgstr ""
-#: ../../c-api/init.rst:1230
+#: ../../c-api/init.rst:1229
msgid ""
"Get the current thread state for this thread. May return ``NULL`` if no "
"GILState API has been used on the current thread. Note that the main thread "
@@ -1532,7 +1535,7 @@ msgid ""
"made on the main thread. This is mainly a helper/diagnostic function."
msgstr ""
-#: ../../c-api/init.rst:1238
+#: ../../c-api/init.rst:1237
msgid ""
"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. "
"This function can be called from any thread at any time. Only if it has had "
@@ -1543,13 +1546,13 @@ msgid ""
"otherwise behave differently."
msgstr ""
-#: ../../c-api/init.rst:1250
+#: ../../c-api/init.rst:1249
msgid ""
"The following macros are normally used without a trailing semicolon; look "
"for example usage in the Python source distribution."
msgstr ""
-#: ../../c-api/init.rst:1256
+#: ../../c-api/init.rst:1255
msgid ""
"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();"
"``. Note that it contains an opening brace; it must be matched with a "
@@ -1557,7 +1560,7 @@ msgid ""
"discussion of this macro."
msgstr ""
-#: ../../c-api/init.rst:1264
+#: ../../c-api/init.rst:1263
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it "
"contains a closing brace; it must be matched with an earlier :c:macro:"
@@ -1565,40 +1568,40 @@ msgid ""
"macro."
msgstr ""
-#: ../../c-api/init.rst:1272
+#: ../../c-api/init.rst:1271
msgid ""
"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :"
"c:macro:`Py_END_ALLOW_THREADS` without the closing brace."
msgstr ""
-#: ../../c-api/init.rst:1278
+#: ../../c-api/init.rst:1277
msgid ""
"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :"
"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable "
"declaration."
msgstr ""
-#: ../../c-api/init.rst:1284
+#: ../../c-api/init.rst:1283
msgid "Low-level API"
msgstr "低階 API"
-#: ../../c-api/init.rst:1286
+#: ../../c-api/init.rst:1285
msgid ""
"All of the following functions must be called after :c:func:`Py_Initialize`."
msgstr ""
-#: ../../c-api/init.rst:1288
+#: ../../c-api/init.rst:1287
msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`."
msgstr ""
-#: ../../c-api/init.rst:1294
+#: ../../c-api/init.rst:1293
msgid ""
"Create a new interpreter state object. The global interpreter lock need not "
"be held, but may be held if it is necessary to serialize calls to this "
"function."
msgstr ""
-#: ../../c-api/init.rst:1298
+#: ../../c-api/init.rst:1297
msgid ""
"Raises an :ref:`auditing event ` ``cpython."
"PyInterpreterState_New`` with no arguments."
@@ -1606,13 +1609,13 @@ msgstr ""
"引發一個不附帶引數的\\ :ref:`稽核事件 ` ``cpython."
"PyInterpreterState_New``。"
-#: ../../c-api/init.rst:1303
+#: ../../c-api/init.rst:1302
msgid ""
"Reset all information in an interpreter state object. The global "
"interpreter lock must be held."
msgstr ""
-#: ../../c-api/init.rst:1306
+#: ../../c-api/init.rst:1305
msgid ""
"Raises an :ref:`auditing event ` ``cpython."
"PyInterpreterState_Clear`` with no arguments."
@@ -1620,40 +1623,44 @@ msgstr ""
"引發一個不附帶引數的\\ :ref:`稽核事件 ` ``cpython."
"PyInterpreterState_Clear``。"
-#: ../../c-api/init.rst:1311
+#: ../../c-api/init.rst:1310
msgid ""
"Destroy an interpreter state object. The global interpreter lock need not "
"be held. The interpreter state must have been reset with a previous call "
"to :c:func:`PyInterpreterState_Clear`."
msgstr ""
-#: ../../c-api/init.rst:1318
+#: ../../c-api/init.rst:1317
msgid ""
"Create a new thread state object belonging to the given interpreter object. "
"The global interpreter lock need not be held, but may be held if it is "
"necessary to serialize calls to this function."
msgstr ""
-#: ../../c-api/init.rst:1325
+#: ../../c-api/init.rst:1324
msgid ""
"Reset all information in a thread state object. The global interpreter lock "
"must be held."
msgstr ""
-#: ../../c-api/init.rst:1328
+#: ../../c-api/init.rst:1327
msgid ""
"This function now calls the :c:member:`PyThreadState.on_delete` callback. "
"Previously, that happened in :c:func:`PyThreadState_Delete`."
msgstr ""
-#: ../../c-api/init.rst:1335
+#: ../../c-api/init.rst:1331
+msgid "The :c:member:`PyThreadState.on_delete` callback was removed."
+msgstr ":c:member:`PyThreadState.on_delete` 回呼已被移除。"
+
+#: ../../c-api/init.rst:1337
msgid ""
"Destroy a thread state object. The global interpreter lock need not be "
"held. The thread state must have been reset with a previous call to :c:func:"
"`PyThreadState_Clear`."
msgstr ""
-#: ../../c-api/init.rst:1342
+#: ../../c-api/init.rst:1344
msgid ""
"Destroy the current thread state and release the global interpreter lock. "
"Like :c:func:`PyThreadState_Delete`, the global interpreter lock must be "
@@ -1661,119 +1668,126 @@ msgid ""
"`PyThreadState_Clear`."
msgstr ""
-#: ../../c-api/init.rst:1350
+#: ../../c-api/init.rst:1352
msgid "Get the current frame of the Python thread state *tstate*."
msgstr ""
-#: ../../c-api/init.rst:1352
+#: ../../c-api/init.rst:1354
msgid ""
"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently "
"executing."
msgstr ""
-#: ../../c-api/init.rst:1355
+#: ../../c-api/init.rst:1357
msgid "See also :c:func:`PyEval_GetFrame`."
msgstr "也請見 :c:func:`PyEval_GetFrame`。"
-#: ../../c-api/init.rst:1357 ../../c-api/init.rst:1366
-#: ../../c-api/init.rst:1375
+#: ../../c-api/init.rst:1359 ../../c-api/init.rst:1368
+#: ../../c-api/init.rst:1377
msgid "*tstate* must not be ``NULL``."
msgstr "*tstate* 不可為 ``NULL``。"
-#: ../../c-api/init.rst:1364
+#: ../../c-api/init.rst:1366
msgid ""
"Get the unique thread state identifier of the Python thread state *tstate*."
msgstr ""
-#: ../../c-api/init.rst:1373
+#: ../../c-api/init.rst:1375
msgid "Get the interpreter of the Python thread state *tstate*."
msgstr ""
-#: ../../c-api/init.rst:1382
+#: ../../c-api/init.rst:1384
msgid "Suspend tracing and profiling in the Python thread state *tstate*."
msgstr ""
-#: ../../c-api/init.rst:1384
+#: ../../c-api/init.rst:1386
msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function."
msgstr ""
-#: ../../c-api/init.rst:1391
+#: ../../c-api/init.rst:1393
msgid ""
"Resume tracing and profiling in the Python thread state *tstate* suspended "
"by the :c:func:`PyThreadState_EnterTracing` function."
msgstr ""
-#: ../../c-api/init.rst:1394
+#: ../../c-api/init.rst:1396
msgid ""
"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions."
msgstr ""
-#: ../../c-api/init.rst:1402
+#: ../../c-api/init.rst:1404
msgid "Get the current interpreter."
msgstr ""
-#: ../../c-api/init.rst:1404
+#: ../../c-api/init.rst:1406
msgid ""
"Issue a fatal error if there no current Python thread state or no current "
"interpreter. It cannot return NULL."
msgstr ""
-#: ../../c-api/init.rst:1407 ../../c-api/init.rst:1417
+#: ../../c-api/init.rst:1409 ../../c-api/init.rst:1419
+#: ../../c-api/init.rst:1441
msgid "The caller must hold the GIL."
msgstr ""
-#: ../../c-api/init.rst:1414
+#: ../../c-api/init.rst:1416
msgid ""
"Return the interpreter's unique ID. If there was any error in doing so then "
"``-1`` is returned and an error is set."
msgstr ""
-#: ../../c-api/init.rst:1424
+#: ../../c-api/init.rst:1426
msgid ""
"Return a dictionary in which interpreter-specific data may be stored. If "
"this function returns ``NULL`` then no exception has been raised and the "
"caller should assume no interpreter-specific dict is available."
msgstr ""
-#: ../../c-api/init.rst:1428
+#: ../../c-api/init.rst:1430
msgid ""
"This is not a replacement for :c:func:`PyModule_GetState()`, which "
"extensions should use to store interpreter-specific state information."
msgstr ""
-#: ../../c-api/init.rst:1435
+#: ../../c-api/init.rst:1438
+msgid ""
+"Return a :term:`strong reference` to the ``__main__`` :ref:`module object "
+"` for the given interpreter."
+msgstr ""
+
+#: ../../c-api/init.rst:1448
msgid "Type of a frame evaluation function."
msgstr ""
-#: ../../c-api/init.rst:1437
+#: ../../c-api/init.rst:1450
msgid ""
"The *throwflag* parameter is used by the ``throw()`` method of generators: "
"if non-zero, handle the current exception."
msgstr ""
-#: ../../c-api/init.rst:1440
+#: ../../c-api/init.rst:1453
msgid "The function now takes a *tstate* parameter."
msgstr ""
-#: ../../c-api/init.rst:1443
+#: ../../c-api/init.rst:1456
msgid ""
"The *frame* parameter changed from ``PyFrameObject*`` to "
"``_PyInterpreterFrame*``."
msgstr ""
-#: ../../c-api/init.rst:1448
+#: ../../c-api/init.rst:1461
msgid "Get the frame evaluation function."
msgstr ""
-#: ../../c-api/init.rst:1450 ../../c-api/init.rst:1458
+#: ../../c-api/init.rst:1463 ../../c-api/init.rst:1471
msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"."
msgstr ""
-#: ../../c-api/init.rst:1456
+#: ../../c-api/init.rst:1469
msgid "Set the frame evaluation function."
msgstr ""
-#: ../../c-api/init.rst:1465
+#: ../../c-api/init.rst:1478
msgid ""
"Return a dictionary in which extensions can store thread-specific state "
"information. Each extension should use a unique key to use to store state "
@@ -1782,7 +1796,7 @@ msgid ""
"raised and the caller should assume no current thread state is available."
msgstr ""
-#: ../../c-api/init.rst:1474
+#: ../../c-api/init.rst:1487
msgid ""
"Asynchronously raise an exception in a thread. The *id* argument is the "
"thread id of the target thread; *exc* is the exception object to be raised. "
@@ -1794,33 +1808,33 @@ msgid ""
"raises no exceptions."
msgstr ""
-#: ../../c-api/init.rst:1482
+#: ../../c-api/init.rst:1495
msgid ""
"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:"
"`unsigned long`."
msgstr ""
-#: ../../c-api/init.rst:1488
+#: ../../c-api/init.rst:1501
msgid ""
"Acquire the global interpreter lock and set the current thread state to "
"*tstate*, which must not be ``NULL``. The lock must have been created "
"earlier. If this thread already has the lock, deadlock ensues."
msgstr ""
-#: ../../c-api/init.rst:1499
+#: ../../c-api/init.rst:1512
msgid ""
"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:"
"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the "
"current thread if called while the interpreter is finalizing."
msgstr ""
-#: ../../c-api/init.rst:1504
+#: ../../c-api/init.rst:1517
msgid ""
":c:func:`PyEval_RestoreThread` is a higher-level function which is always "
"available (even when threads have not been initialized)."
msgstr ""
-#: ../../c-api/init.rst:1510
+#: ../../c-api/init.rst:1523
msgid ""
"Reset the current thread state to ``NULL`` and release the global "
"interpreter lock. The lock must have been created earlier and must be held "
@@ -1829,17 +1843,17 @@ msgid ""
"isn't, a fatal error is reported."
msgstr ""
-#: ../../c-api/init.rst:1516
+#: ../../c-api/init.rst:1529
msgid ""
":c:func:`PyEval_SaveThread` is a higher-level function which is always "
"available (even when threads have not been initialized)."
msgstr ""
-#: ../../c-api/init.rst:1523
+#: ../../c-api/init.rst:1536
msgid "Sub-interpreter support"
msgstr ""
-#: ../../c-api/init.rst:1525
+#: ../../c-api/init.rst:1538
msgid ""
"While in most uses, you will only embed a single Python interpreter, there "
"are cases where you need to create several independent interpreters in the "
@@ -1847,7 +1861,7 @@ msgid ""
"to do that."
msgstr ""
-#: ../../c-api/init.rst:1530
+#: ../../c-api/init.rst:1543
msgid ""
"The \"main\" interpreter is the first one created when the runtime "
"initializes. It is usually the only Python interpreter in a process. Unlike "
@@ -1858,31 +1872,31 @@ msgid ""
"returns a pointer to its state."
msgstr ""
-#: ../../c-api/init.rst:1537
+#: ../../c-api/init.rst:1550
msgid ""
"You can switch between sub-interpreters using the :c:func:"
"`PyThreadState_Swap` function. You can create and destroy them using the "
"following functions:"
msgstr ""
-#: ../../c-api/init.rst:1543
+#: ../../c-api/init.rst:1556
msgid ""
"Structure containing most parameters to configure a sub-interpreter. Its "
"values are used only in :c:func:`Py_NewInterpreterFromConfig` and never "
"modified by the runtime."
msgstr ""
-#: ../../c-api/init.rst:1549
+#: ../../c-api/init.rst:1562
msgid "Structure fields:"
msgstr ""
-#: ../../c-api/init.rst:1553
+#: ../../c-api/init.rst:1566
msgid ""
"If this is ``0`` then the sub-interpreter will use its own \"object\" "
"allocator state. Otherwise it will use (share) the main interpreter's."
msgstr ""
-#: ../../c-api/init.rst:1557
+#: ../../c-api/init.rst:1570
msgid ""
"If this is ``0`` then :c:member:`~PyInterpreterConfig."
"check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` "
@@ -1890,44 +1904,44 @@ msgid ""
"`PyInterpreterConfig_OWN_GIL`."
msgstr ""
-#: ../../c-api/init.rst:1565
+#: ../../c-api/init.rst:1578
msgid ""
"If this is ``0`` then the runtime will not support forking the process in "
"any thread where the sub-interpreter is currently active. Otherwise fork is "
"unrestricted."
msgstr ""
-#: ../../c-api/init.rst:1569
+#: ../../c-api/init.rst:1582
msgid ""
"Note that the :mod:`subprocess` module still works when fork is disallowed."
msgstr ""
-#: ../../c-api/init.rst:1574
+#: ../../c-api/init.rst:1587
msgid ""
"If this is ``0`` then the runtime will not support replacing the current "
"process via exec (e.g. :func:`os.execv`) in any thread where the sub-"
"interpreter is currently active. Otherwise exec is unrestricted."
msgstr ""
-#: ../../c-api/init.rst:1579
+#: ../../c-api/init.rst:1592
msgid ""
"Note that the :mod:`subprocess` module still works when exec is disallowed."
msgstr ""
-#: ../../c-api/init.rst:1584
+#: ../../c-api/init.rst:1597
msgid ""
"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't "
"create threads. Otherwise threads are allowed."
msgstr ""
-#: ../../c-api/init.rst:1590
+#: ../../c-api/init.rst:1603
msgid ""
"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't "
"create daemon threads. Otherwise daemon threads are allowed (as long as :c:"
"member:`~PyInterpreterConfig.allow_threads` is non-zero)."
msgstr ""
-#: ../../c-api/init.rst:1597
+#: ../../c-api/init.rst:1610
msgid ""
"If this is ``0`` then all extension modules may be imported, including "
"legacy (single-phase init) modules, in any thread where the sub-interpreter "
@@ -1936,37 +1950,37 @@ msgid ""
"`Py_mod_multiple_interpreters`.)"
msgstr ""
-#: ../../c-api/init.rst:1604
+#: ../../c-api/init.rst:1617
msgid ""
"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig."
"use_main_obmalloc` is ``0``."
msgstr ""
-#: ../../c-api/init.rst:1609
+#: ../../c-api/init.rst:1622
msgid ""
"This determines the operation of the GIL for the sub-interpreter. It may be "
"one of the following:"
msgstr ""
-#: ../../c-api/init.rst:1616
+#: ../../c-api/init.rst:1629
msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)."
msgstr ""
-#: ../../c-api/init.rst:1620
+#: ../../c-api/init.rst:1633
msgid "Use (share) the main interpreter's GIL."
msgstr ""
-#: ../../c-api/init.rst:1624
+#: ../../c-api/init.rst:1637
msgid "Use the sub-interpreter's own GIL."
msgstr ""
-#: ../../c-api/init.rst:1626
+#: ../../c-api/init.rst:1639
msgid ""
"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:"
"`PyInterpreterConfig.use_main_obmalloc` must be ``0``."
msgstr ""
-#: ../../c-api/init.rst:1640
+#: ../../c-api/init.rst:1653
msgid ""
"Create a new sub-interpreter. This is an (almost) totally separate "
"environment for the execution of Python code. In particular, the new "
@@ -1979,13 +1993,13 @@ msgid ""
"underlying file descriptors)."
msgstr ""
-#: ../../c-api/init.rst:1650
+#: ../../c-api/init.rst:1663
msgid ""
"The given *config* controls the options with which the interpreter is "
"initialized."
msgstr ""
-#: ../../c-api/init.rst:1653
+#: ../../c-api/init.rst:1666
msgid ""
"Upon success, *tstate_p* will be set to the first thread state created in "
"the new sub-interpreter. This thread state is made in the current thread "
@@ -1996,7 +2010,7 @@ msgid ""
"state."
msgstr ""
-#: ../../c-api/init.rst:1662
+#: ../../c-api/init.rst:1675
msgid ""
"Like all other Python/C API functions, the global interpreter lock must be "
"held before calling this function and is still held when it returns. "
@@ -2008,13 +2022,13 @@ msgid ""
"released here."
msgstr ""
-#: ../../c-api/init.rst:1673
+#: ../../c-api/init.rst:1686
msgid ""
"Sub-interpreters are most effective when isolated from each other, with "
"certain functionality restricted::"
msgstr ""
-#: ../../c-api/init.rst:1676
+#: ../../c-api/init.rst:1689
msgid ""
"PyInterpreterConfig config = {\n"
" .use_main_obmalloc = 0,\n"
@@ -2025,7 +2039,11 @@ msgid ""
" .check_multi_interp_extensions = 1,\n"
" .gil = PyInterpreterConfig_OWN_GIL,\n"
"};\n"
-"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);"
+"PyThreadState *tstate = NULL;\n"
+"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n"
+"if (PyStatus_Exception(status)) {\n"
+" Py_ExitStatusException(status);\n"
+"}"
msgstr ""
"PyInterpreterConfig config = {\n"
" .use_main_obmalloc = 0,\n"
@@ -2036,9 +2054,13 @@ msgstr ""
" .check_multi_interp_extensions = 1,\n"
" .gil = PyInterpreterConfig_OWN_GIL,\n"
"};\n"
-"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);"
+"PyThreadState *tstate = NULL;\n"
+"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n"
+"if (PyStatus_Exception(status)) {\n"
+" Py_ExitStatusException(status);\n"
+"}"
-#: ../../c-api/init.rst:1687
+#: ../../c-api/init.rst:1704
msgid ""
"Note that the config is used only briefly and does not get modified. During "
"initialization the config's values are converted into various :c:type:"
@@ -2046,11 +2068,11 @@ msgid ""
"internally on the :c:type:`PyInterpreterState`."
msgstr ""
-#: ../../c-api/init.rst:1696
+#: ../../c-api/init.rst:1713
msgid "Extension modules are shared between (sub-)interpreters as follows:"
msgstr ""
-#: ../../c-api/init.rst:1698
+#: ../../c-api/init.rst:1715
msgid ""
"For modules using multi-phase initialization, e.g. :c:func:"
"`PyModule_FromDefAndSpec`, a separate module object is created and "
@@ -2058,7 +2080,7 @@ msgid ""
"are shared between these module objects."
msgstr ""
-#: ../../c-api/init.rst:1704
+#: ../../c-api/init.rst:1721
msgid ""
"For modules using single-phase initialization, e.g. :c:func:"
"`PyModule_Create`, the first time a particular extension is imported, it is "
@@ -2070,7 +2092,7 @@ msgid ""
"might cause unwanted behavior (see `Bugs and caveats`_ below)."
msgstr ""
-#: ../../c-api/init.rst:1715
+#: ../../c-api/init.rst:1732
msgid ""
"Note that this is different from what happens when an extension is imported "
"after the interpreter has been completely re-initialized by calling :c:func:"
@@ -2080,7 +2102,7 @@ msgid ""
"shared between these modules."
msgstr ""
-#: ../../c-api/init.rst:1735
+#: ../../c-api/init.rst:1752
msgid ""
"Create a new sub-interpreter. This is essentially just a wrapper around :c:"
"func:`Py_NewInterpreterFromConfig` with a config that preserves the existing "
@@ -2089,7 +2111,7 @@ msgid ""
"single-phase init modules."
msgstr ""
-#: ../../c-api/init.rst:1747
+#: ../../c-api/init.rst:1764
msgid ""
"Destroy the (sub-)interpreter represented by the given thread state. The "
"given thread state must be the current thread state. See the discussion of "
@@ -2099,17 +2121,17 @@ msgid ""
"be held before calling this function. No GIL is held when it returns."
msgstr ""
-#: ../../c-api/init.rst:1755
+#: ../../c-api/init.rst:1772
msgid ""
":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been "
"explicitly destroyed at that point."
msgstr ""
-#: ../../c-api/init.rst:1760
+#: ../../c-api/init.rst:1777
msgid "A Per-Interpreter GIL"
-msgstr ""
+msgstr "直譯器各別持有的 GIL"
-#: ../../c-api/init.rst:1762
+#: ../../c-api/init.rst:1779
msgid ""
"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter "
"that is completely isolated from other interpreters, including having its "
@@ -2121,7 +2143,7 @@ msgid ""
"just using threads. (See :pep:`554`.)"
msgstr ""
-#: ../../c-api/init.rst:1772
+#: ../../c-api/init.rst:1789
msgid ""
"Using an isolated interpreter requires vigilance in preserving that "
"isolation. That especially means not sharing any objects or mutable state "
@@ -2135,7 +2157,7 @@ msgid ""
"builtin objects."
msgstr ""
-#: ../../c-api/init.rst:1783
+#: ../../c-api/init.rst:1800
msgid ""
"If you preserve isolation then you will have access to proper multi-core "
"computing without the complications that come with free-threading. Failure "
@@ -2143,7 +2165,7 @@ msgid ""
"threading, including races and hard-to-debug crashes."
msgstr ""
-#: ../../c-api/init.rst:1788
+#: ../../c-api/init.rst:1805
msgid ""
"Aside from that, one of the main challenges of using multiple isolated "
"interpreters is how to communicate between them safely (not break isolation) "
@@ -2153,11 +2175,11 @@ msgid ""
"sharing) data between interpreters."
msgstr ""
-#: ../../c-api/init.rst:1799
+#: ../../c-api/init.rst:1816
msgid "Bugs and caveats"
msgstr ""
-#: ../../c-api/init.rst:1801
+#: ../../c-api/init.rst:1818
msgid ""
"Because sub-interpreters (and the main interpreter) are part of the same "
"process, the insulation between them isn't perfect --- for example, using "
@@ -2170,7 +2192,7 @@ msgid ""
"should be avoided if possible."
msgstr ""
-#: ../../c-api/init.rst:1811
+#: ../../c-api/init.rst:1828
msgid ""
"Special care should be taken to avoid sharing user-defined functions, "
"methods, instances or classes between sub-interpreters, since import "
@@ -2179,7 +2201,7 @@ msgid ""
"objects from which the above are reachable."
msgstr ""
-#: ../../c-api/init.rst:1817
+#: ../../c-api/init.rst:1834
msgid ""
"Also note that combining this functionality with ``PyGILState_*`` APIs is "
"delicate, because these APIs assume a bijection between Python thread states "
@@ -2191,25 +2213,25 @@ msgid ""
"created threads will probably be broken when using sub-interpreters."
msgstr ""
-#: ../../c-api/init.rst:1828
+#: ../../c-api/init.rst:1845
msgid "Asynchronous Notifications"
msgstr ""
-#: ../../c-api/init.rst:1830
+#: ../../c-api/init.rst:1847
msgid ""
"A mechanism is provided to make asynchronous notifications to the main "
"interpreter thread. These notifications take the form of a function pointer "
"and a void pointer argument."
msgstr ""
-#: ../../c-api/init.rst:1837
+#: ../../c-api/init.rst:1854
msgid ""
"Schedule a function to be called from the main interpreter thread. On "
"success, ``0`` is returned and *func* is queued for being called in the main "
"thread. On failure, ``-1`` is returned without setting any exception."
msgstr ""
-#: ../../c-api/init.rst:1841
+#: ../../c-api/init.rst:1858
msgid ""
"When successfully queued, *func* will be *eventually* called from the main "
"interpreter thread with the argument *arg*. It will be called "
@@ -2217,17 +2239,17 @@ msgid ""
"these conditions met:"
msgstr ""
-#: ../../c-api/init.rst:1846
+#: ../../c-api/init.rst:1863
msgid "on a :term:`bytecode` boundary;"
msgstr ""
-#: ../../c-api/init.rst:1847
+#: ../../c-api/init.rst:1864
msgid ""
"with the main thread holding the :term:`global interpreter lock` (*func* can "
"therefore use the full C API)."
msgstr ""
-#: ../../c-api/init.rst:1850
+#: ../../c-api/init.rst:1867
msgid ""
"*func* must return ``0`` on success, or ``-1`` on failure with an exception "
"set. *func* won't be interrupted to perform another asynchronous "
@@ -2235,20 +2257,20 @@ msgid ""
"if the global interpreter lock is released."
msgstr ""
-#: ../../c-api/init.rst:1855
+#: ../../c-api/init.rst:1872
msgid ""
"This function doesn't need a current thread state to run, and it doesn't "
"need the global interpreter lock."
msgstr ""
-#: ../../c-api/init.rst:1858
+#: ../../c-api/init.rst:1875
msgid ""
"To call this function in a subinterpreter, the caller must hold the GIL. "
"Otherwise, the function *func* can be scheduled to be called from the wrong "
"interpreter."
msgstr ""
-#: ../../c-api/init.rst:1863
+#: ../../c-api/init.rst:1880
msgid ""
"This is a low-level function, only useful for very special cases. There is "
"no guarantee that *func* will be called as quick as possible. If the main "
@@ -2258,7 +2280,7 @@ msgid ""
"`PyGILState API`."
msgstr ""
-#: ../../c-api/init.rst:1872
+#: ../../c-api/init.rst:1889
msgid ""
"If this function is called in a subinterpreter, the function *func* is now "
"scheduled to be called from the subinterpreter, rather than being called "
@@ -2266,18 +2288,18 @@ msgid ""
"scheduled calls."
msgstr ""
-#: ../../c-api/init.rst:1881
+#: ../../c-api/init.rst:1898
msgid "Profiling and Tracing"
msgstr ""
-#: ../../c-api/init.rst:1886
+#: ../../c-api/init.rst:1903
msgid ""
"The Python interpreter provides some low-level support for attaching "
"profiling and execution tracing facilities. These are used for profiling, "
"debugging, and coverage analysis tools."
msgstr ""
-#: ../../c-api/init.rst:1890
+#: ../../c-api/init.rst:1907
msgid ""
"This C interface allows the profiling or tracing code to avoid the overhead "
"of calling through Python-level callable objects, making a direct C function "
@@ -2287,7 +2309,7 @@ msgid ""
"reported to the Python-level trace functions in previous versions."
msgstr ""
-#: ../../c-api/init.rst:1900
+#: ../../c-api/init.rst:1917
msgid ""
"The type of the trace function registered using :c:func:`PyEval_SetProfile` "
"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to "
@@ -2299,66 +2321,66 @@ msgid ""
"value of *what*:"
msgstr ""
-#: ../../c-api/init.rst:1909
+#: ../../c-api/init.rst:1926
msgid "Value of *what*"
msgstr ""
-#: ../../c-api/init.rst:1909
+#: ../../c-api/init.rst:1926
msgid "Meaning of *arg*"
msgstr "*arg* 的含義"
-#: ../../c-api/init.rst:1911
+#: ../../c-api/init.rst:1928
msgid ":c:data:`PyTrace_CALL`"
msgstr ":c:data:`PyTrace_CALL`"
-#: ../../c-api/init.rst:1911 ../../c-api/init.rst:1916
-#: ../../c-api/init.rst:1927
+#: ../../c-api/init.rst:1928 ../../c-api/init.rst:1933
+#: ../../c-api/init.rst:1944
msgid "Always :c:data:`Py_None`."
msgstr ""
-#: ../../c-api/init.rst:1913
+#: ../../c-api/init.rst:1930
msgid ":c:data:`PyTrace_EXCEPTION`"
msgstr ":c:data:`PyTrace_EXCEPTION`"
-#: ../../c-api/init.rst:1913
+#: ../../c-api/init.rst:1930
msgid "Exception information as returned by :func:`sys.exc_info`."
msgstr ""
-#: ../../c-api/init.rst:1916
+#: ../../c-api/init.rst:1933
msgid ":c:data:`PyTrace_LINE`"
msgstr ":c:data:`PyTrace_LINE`"
-#: ../../c-api/init.rst:1918
+#: ../../c-api/init.rst:1935
msgid ":c:data:`PyTrace_RETURN`"
msgstr ":c:data:`PyTrace_RETURN`"
-#: ../../c-api/init.rst:1918
+#: ../../c-api/init.rst:1935
msgid ""
"Value being returned to the caller, or ``NULL`` if caused by an exception."
msgstr ""
-#: ../../c-api/init.rst:1921
+#: ../../c-api/init.rst:1938
msgid ":c:data:`PyTrace_C_CALL`"
msgstr ":c:data:`PyTrace_C_CALL`"
-#: ../../c-api/init.rst:1921 ../../c-api/init.rst:1923
-#: ../../c-api/init.rst:1925
+#: ../../c-api/init.rst:1938 ../../c-api/init.rst:1940
+#: ../../c-api/init.rst:1942
msgid "Function object being called."
msgstr "被呼叫的函式物件。"
-#: ../../c-api/init.rst:1923
+#: ../../c-api/init.rst:1940
msgid ":c:data:`PyTrace_C_EXCEPTION`"
msgstr ":c:data:`PyTrace_C_EXCEPTION`"
-#: ../../c-api/init.rst:1925
+#: ../../c-api/init.rst:1942
msgid ":c:data:`PyTrace_C_RETURN`"
msgstr ":c:data:`PyTrace_C_RETURN`"
-#: ../../c-api/init.rst:1927
+#: ../../c-api/init.rst:1944
msgid ":c:data:`PyTrace_OPCODE`"
msgstr ":c:data:`PyTrace_OPCODE`"
-#: ../../c-api/init.rst:1932
+#: ../../c-api/init.rst:1949
msgid ""
"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when "
"a new call to a function or method is being reported, or a new entry into a "
@@ -2367,7 +2389,7 @@ msgid ""
"the corresponding frame."
msgstr ""
-#: ../../c-api/init.rst:1941
+#: ../../c-api/init.rst:1958
msgid ""
"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when "
"an exception has been raised. The callback function is called with this "
@@ -2379,7 +2401,7 @@ msgid ""
"profiler."
msgstr ""
-#: ../../c-api/init.rst:1952
+#: ../../c-api/init.rst:1969
msgid ""
"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` "
"function (but not a profiling function) when a line-number event is being "
@@ -2387,31 +2409,31 @@ msgid ""
"f_trace_lines` to *0* on that frame."
msgstr ""
-#: ../../c-api/init.rst:1960
+#: ../../c-api/init.rst:1977
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a call is about to return."
msgstr ""
-#: ../../c-api/init.rst:1966
+#: ../../c-api/init.rst:1983
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function is about to be called."
msgstr ""
-#: ../../c-api/init.rst:1972
+#: ../../c-api/init.rst:1989
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has raised an exception."
msgstr ""
-#: ../../c-api/init.rst:1978
+#: ../../c-api/init.rst:1995
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when "
"a C function has returned."
msgstr ""
-#: ../../c-api/init.rst:1984
+#: ../../c-api/init.rst:2001
msgid ""
"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but "
"not profiling functions) when a new opcode is about to be executed. This "
@@ -2419,7 +2441,7 @@ msgid ""
"attr:`~frame.f_trace_opcodes` to *1* on the frame."
msgstr ""
-#: ../../c-api/init.rst:1992
+#: ../../c-api/init.rst:2009
msgid ""
"Set the profiler function to *func*. The *obj* parameter is passed to the "
"function as its first parameter, and may be any Python object, or ``NULL``. "
@@ -2429,29 +2451,29 @@ msgid ""
"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`."
msgstr ""
-#: ../../c-api/init.rst:1999
+#: ../../c-api/init.rst:2016
msgid "See also the :func:`sys.setprofile` function."
-msgstr ""
+msgstr "另請參閱 :func:`sys.setprofile` 函式。"
-#: ../../c-api/init.rst:2001 ../../c-api/init.rst:2008
-#: ../../c-api/init.rst:2027 ../../c-api/init.rst:2034
+#: ../../c-api/init.rst:2018 ../../c-api/init.rst:2025
+#: ../../c-api/init.rst:2044 ../../c-api/init.rst:2051
msgid "The caller must hold the :term:`GIL`."
msgstr "呼叫者必須持有 :term:`GIL`。"
-#: ../../c-api/init.rst:2005
+#: ../../c-api/init.rst:2022
msgid ""
"Like :c:func:`PyEval_SetProfile` but sets the profile function in all "
"running threads belonging to the current interpreter instead of the setting "
"it only on the current thread."
msgstr ""
-#: ../../c-api/init.rst:2010
+#: ../../c-api/init.rst:2027
msgid ""
"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised "
"while setting the profile functions in all threads."
msgstr ""
-#: ../../c-api/init.rst:2018
+#: ../../c-api/init.rst:2035
msgid ""
"Set the tracing function to *func*. This is similar to :c:func:"
"`PyEval_SetProfile`, except the tracing function does receive line-number "
@@ -2462,28 +2484,28 @@ msgid ""
"*what* parameter."
msgstr ""
-#: ../../c-api/init.rst:2025
+#: ../../c-api/init.rst:2042
msgid "See also the :func:`sys.settrace` function."
msgstr "也請見 :func:`sys.settrace` 函式。"
-#: ../../c-api/init.rst:2031
+#: ../../c-api/init.rst:2048
msgid ""
"Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running "
"threads belonging to the current interpreter instead of the setting it only "
"on the current thread."
msgstr ""
-#: ../../c-api/init.rst:2036
+#: ../../c-api/init.rst:2053
msgid ""
"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised "
"while setting the trace functions in all threads."
msgstr ""
-#: ../../c-api/init.rst:2042
+#: ../../c-api/init.rst:2059
msgid "Reference tracing"
msgstr ""
-#: ../../c-api/init.rst:2048
+#: ../../c-api/init.rst:2065
msgid ""
"The type of the trace function registered using :c:func:"
"`PyRefTracer_SetTracer`. The first parameter is a Python object that has "
@@ -2493,19 +2515,19 @@ msgid ""
"provided when :c:func:`PyRefTracer_SetTracer` was called."
msgstr ""
-#: ../../c-api/init.rst:2058
+#: ../../c-api/init.rst:2075
msgid ""
"The value for the *event* parameter to :c:type:`PyRefTracer` functions when "
"a Python object has been created."
msgstr ""
-#: ../../c-api/init.rst:2063
+#: ../../c-api/init.rst:2080
msgid ""
"The value for the *event* parameter to :c:type:`PyRefTracer` functions when "
"a Python object has been destroyed."
msgstr ""
-#: ../../c-api/init.rst:2068
+#: ../../c-api/init.rst:2085
msgid ""
"Register a reference tracer function. The function will be called when a new "
"Python has been created or when an object is going to be destroyed. If "
@@ -2514,7 +2536,7 @@ msgid ""
"return ``-1`` on error."
msgstr ""
-#: ../../c-api/init.rst:2074
+#: ../../c-api/init.rst:2091
msgid ""
"Not that tracer functions **must not** create Python objects inside or "
"otherwise the call will be re-entrant. The tracer also **must not** clear "
@@ -2522,11 +2544,11 @@ msgid ""
"the tracer function is called."
msgstr ""
-#: ../../c-api/init.rst:2079 ../../c-api/init.rst:2090
+#: ../../c-api/init.rst:2096 ../../c-api/init.rst:2107
msgid "The GIL must be held when calling this function."
msgstr ""
-#: ../../c-api/init.rst:2085
+#: ../../c-api/init.rst:2102
msgid ""
"Get the registered reference tracer function and the value of the opaque "
"data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was "
@@ -2534,48 +2556,48 @@ msgid ""
"set the **data** pointer to NULL."
msgstr ""
-#: ../../c-api/init.rst:2097
+#: ../../c-api/init.rst:2114
msgid "Advanced Debugger Support"
msgstr ""
-#: ../../c-api/init.rst:2102
+#: ../../c-api/init.rst:2119
msgid ""
"These functions are only intended to be used by advanced debugging tools."
msgstr ""
-#: ../../c-api/init.rst:2107
+#: ../../c-api/init.rst:2124
msgid ""
"Return the interpreter state object at the head of the list of all such "
"objects."
msgstr ""
-#: ../../c-api/init.rst:2112
+#: ../../c-api/init.rst:2129
msgid "Return the main interpreter state object."
msgstr ""
-#: ../../c-api/init.rst:2117
+#: ../../c-api/init.rst:2134
msgid ""
"Return the next interpreter state object after *interp* from the list of all "
"such objects."
msgstr ""
-#: ../../c-api/init.rst:2123
+#: ../../c-api/init.rst:2140
msgid ""
"Return the pointer to the first :c:type:`PyThreadState` object in the list "
"of threads associated with the interpreter *interp*."
msgstr ""
-#: ../../c-api/init.rst:2129
+#: ../../c-api/init.rst:2146
msgid ""
"Return the next thread state object after *tstate* from the list of all such "
"objects belonging to the same :c:type:`PyInterpreterState` object."
msgstr ""
-#: ../../c-api/init.rst:2136
+#: ../../c-api/init.rst:2153
msgid "Thread Local Storage Support"
msgstr ""
-#: ../../c-api/init.rst:2140
+#: ../../c-api/init.rst:2157
msgid ""
"The Python interpreter provides low-level support for thread-local storage "
"(TLS) which wraps the underlying native TLS implementation to support the "
@@ -2585,19 +2607,19 @@ msgid ""
"thread."
msgstr ""
-#: ../../c-api/init.rst:2147
+#: ../../c-api/init.rst:2164
msgid ""
"The GIL does *not* need to be held when calling these functions; they supply "
"their own locking."
msgstr ""
-#: ../../c-api/init.rst:2150
+#: ../../c-api/init.rst:2167
msgid ""
"Note that :file:`Python.h` does not include the declaration of the TLS APIs, "
"you need to include :file:`pythread.h` to use thread-local storage."
msgstr ""
-#: ../../c-api/init.rst:2154
+#: ../../c-api/init.rst:2171
msgid ""
"None of these API functions handle memory management on behalf of the :c:"
"expr:`void*` values. You need to allocate and deallocate them yourself. If "
@@ -2605,22 +2627,22 @@ msgid ""
"don't do refcount operations on them either."
msgstr ""
-#: ../../c-api/init.rst:2162
+#: ../../c-api/init.rst:2179
msgid "Thread Specific Storage (TSS) API"
msgstr ""
-#: ../../c-api/init.rst:2164
+#: ../../c-api/init.rst:2181
msgid ""
"TSS API is introduced to supersede the use of the existing TLS API within "
"the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` "
"instead of :c:expr:`int` to represent thread keys."
msgstr ""
-#: ../../c-api/init.rst:2170
+#: ../../c-api/init.rst:2187
msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)"
msgstr ""
-#: ../../c-api/init.rst:2175
+#: ../../c-api/init.rst:2192
msgid ""
"This data structure represents the state of a thread key, the definition of "
"which may depend on the underlying TLS implementation, and it has an "
@@ -2628,52 +2650,52 @@ msgid ""
"public members in this structure."
msgstr ""
-#: ../../c-api/init.rst:2180
+#: ../../c-api/init.rst:2197
msgid ""
"When :ref:`Py_LIMITED_API ` is not defined, static allocation of "
"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed."
msgstr ""
-#: ../../c-api/init.rst:2186
+#: ../../c-api/init.rst:2203
msgid ""
"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note "
"that this macro won't be defined with :ref:`Py_LIMITED_API `."
msgstr ""
-#: ../../c-api/init.rst:2191
+#: ../../c-api/init.rst:2208
msgid "Dynamic Allocation"
msgstr ""
-#: ../../c-api/init.rst:2193
+#: ../../c-api/init.rst:2210
msgid ""
"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules "
"built with :ref:`Py_LIMITED_API `, where static allocation of this "
"type is not possible due to its implementation being opaque at build time."
msgstr ""
-#: ../../c-api/init.rst:2200
+#: ../../c-api/init.rst:2217
msgid ""
"Return a value which is the same state as a value initialized with :c:macro:"
"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure."
msgstr ""
-#: ../../c-api/init.rst:2207
+#: ../../c-api/init.rst:2224
msgid ""
"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first "
"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals "
"have been unassigned. This is a no-op if the *key* argument is ``NULL``."
msgstr ""
-#: ../../c-api/init.rst:2213
+#: ../../c-api/init.rst:2230
msgid ""
"A freed key becomes a dangling pointer. You should reset the key to ``NULL``."
msgstr ""
-#: ../../c-api/init.rst:2218
+#: ../../c-api/init.rst:2235
msgid "Methods"
msgstr "方法"
-#: ../../c-api/init.rst:2220
+#: ../../c-api/init.rst:2237
msgid ""
"The parameter *key* of these functions must not be ``NULL``. Moreover, the "
"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are "
@@ -2681,13 +2703,13 @@ msgid ""
"func:`PyThread_tss_create`."
msgstr ""
-#: ../../c-api/init.rst:2228
+#: ../../c-api/init.rst:2245
msgid ""
"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized "
"by :c:func:`PyThread_tss_create`."
msgstr ""
-#: ../../c-api/init.rst:2234
+#: ../../c-api/init.rst:2251
msgid ""
"Return a zero value on successful initialization of a TSS key. The behavior "
"is undefined if the value pointed to by the *key* argument is not "
@@ -2696,7 +2718,7 @@ msgid ""
"no-op and immediately returns success."
msgstr ""
-#: ../../c-api/init.rst:2243
+#: ../../c-api/init.rst:2260
msgid ""
"Destroy a TSS key to forget the values associated with the key across all "
"threads, and change the key's initialization state to uninitialized. A "
@@ -2705,31 +2727,31 @@ msgid ""
"key -- calling it on an already destroyed key is a no-op."
msgstr ""
-#: ../../c-api/init.rst:2252
+#: ../../c-api/init.rst:2269
msgid ""
"Return a zero value to indicate successfully associating a :c:expr:`void*` "
"value with a TSS key in the current thread. Each thread has a distinct "
"mapping of the key to a :c:expr:`void*` value."
msgstr ""
-#: ../../c-api/init.rst:2259
+#: ../../c-api/init.rst:2276
msgid ""
"Return the :c:expr:`void*` value associated with a TSS key in the current "
"thread. This returns ``NULL`` if no value is associated with the key in the "
"current thread."
msgstr ""
-#: ../../c-api/init.rst:2267
+#: ../../c-api/init.rst:2284
msgid "Thread Local Storage (TLS) API"
msgstr "執行緒局部儲存 (Thread Local Storage, TLS) API:"
-#: ../../c-api/init.rst:2269
+#: ../../c-api/init.rst:2286
msgid ""
"This API is superseded by :ref:`Thread Specific Storage (TSS) API `."
msgstr ""
-#: ../../c-api/init.rst:2274
+#: ../../c-api/init.rst:2291
msgid ""
"This version of the API does not support platforms where the native TLS key "
"is defined in a way that cannot be safely cast to ``int``. On such "
@@ -2738,62 +2760,62 @@ msgid ""
"platforms."
msgstr ""
-#: ../../c-api/init.rst:2279
+#: ../../c-api/init.rst:2296
msgid ""
"Due to the compatibility problem noted above, this version of the API should "
"not be used in new code."
msgstr ""
-#: ../../c-api/init.rst:2290
+#: ../../c-api/init.rst:2307
msgid "Synchronization Primitives"
msgstr ""
-#: ../../c-api/init.rst:2292
+#: ../../c-api/init.rst:2309
msgid "The C-API provides a basic mutual exclusion lock."
msgstr ""
-#: ../../c-api/init.rst:2296
+#: ../../c-api/init.rst:2313
msgid ""
"A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to "
"zero to represent the unlocked state. For example::"
msgstr ""
-#: ../../c-api/init.rst:2299
+#: ../../c-api/init.rst:2316
msgid "PyMutex mutex = {0};"
msgstr ""
-#: ../../c-api/init.rst:2301
+#: ../../c-api/init.rst:2318
msgid ""
"Instances of :c:type:`!PyMutex` should not be copied or moved. Both the "
"contents and address of a :c:type:`!PyMutex` are meaningful, and it must "
"remain at a fixed, writable location in memory."
msgstr ""
-#: ../../c-api/init.rst:2307
+#: ../../c-api/init.rst:2324
msgid ""
"A :c:type:`!PyMutex` currently occupies one byte, but the size should be "
"considered unstable. The size may change in future Python releases without "
"a deprecation period."
msgstr ""
-#: ../../c-api/init.rst:2315
+#: ../../c-api/init.rst:2332
msgid ""
"Lock mutex *m*. If another thread has already locked it, the calling thread "
"will block until the mutex is unlocked. While blocked, the thread will "
"temporarily release the :term:`GIL` if it is held."
msgstr ""
-#: ../../c-api/init.rst:2323
+#: ../../c-api/init.rst:2340
msgid ""
"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will "
"issue a fatal error."
msgstr ""
-#: ../../c-api/init.rst:2331
+#: ../../c-api/init.rst:2348
msgid "Python Critical Section API"
msgstr ""
-#: ../../c-api/init.rst:2333
+#: ../../c-api/init.rst:2350
msgid ""
"The critical section API provides a deadlock avoidance layer on top of per-"
"object locks for :term:`free-threaded ` CPython. They are "
@@ -2801,7 +2823,7 @@ msgid ""
"no-ops in versions of Python with the global interpreter lock."
msgstr ""
-#: ../../c-api/init.rst:2338
+#: ../../c-api/init.rst:2355
msgid ""
"Critical sections avoid deadlocks by implicitly suspending active critical "
"sections and releasing the locks during calls to :c:func:"
@@ -2811,7 +2833,7 @@ msgid ""
"-- they are useful because their behavior is similar to the :term:`GIL`."
msgstr ""
-#: ../../c-api/init.rst:2345
+#: ../../c-api/init.rst:2362
msgid ""
"The functions and structs used by the macros are exposed for cases where C "
"macros are not available. They should only be used as in the given macro "
@@ -2819,7 +2841,7 @@ msgid ""
"future Python versions."
msgstr ""
-#: ../../c-api/init.rst:2352
+#: ../../c-api/init.rst:2369
msgid ""
"Operations that need to lock two objects at once must use :c:macro:"
"`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to "
@@ -2828,11 +2850,11 @@ msgid ""
"lock more than two objects at once."
msgstr ""
-#: ../../c-api/init.rst:2358
+#: ../../c-api/init.rst:2375
msgid "Example usage::"
msgstr ""
-#: ../../c-api/init.rst:2360
+#: ../../c-api/init.rst:2377
msgid ""
"static PyObject *\n"
"set_field(MyObject *self, PyObject *value)\n"
@@ -2844,73 +2866,73 @@ msgid ""
"}"
msgstr ""
-#: ../../c-api/init.rst:2369
+#: ../../c-api/init.rst:2386
msgid ""
"In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which "
"can call arbitrary code through an object's deallocation function. The "
-"critical section API avoids potentital deadlocks due to reentrancy and lock "
+"critical section API avoids potential deadlocks due to reentrancy and lock "
"ordering by allowing the runtime to temporarily suspend the critical section "
"if the code triggered by the finalizer blocks and calls :c:func:"
"`PyEval_SaveThread`."
msgstr ""
-#: ../../c-api/init.rst:2377
+#: ../../c-api/init.rst:2394
msgid ""
"Acquires the per-object lock for the object *op* and begins a critical "
"section."
msgstr ""
-#: ../../c-api/init.rst:2380 ../../c-api/init.rst:2394
-#: ../../c-api/init.rst:2409 ../../c-api/init.rst:2423
+#: ../../c-api/init.rst:2397 ../../c-api/init.rst:2411
+#: ../../c-api/init.rst:2426 ../../c-api/init.rst:2440
msgid "In the free-threaded build, this macro expands to::"
msgstr ""
-#: ../../c-api/init.rst:2382
+#: ../../c-api/init.rst:2399
msgid ""
"{\n"
" PyCriticalSection _py_cs;\n"
" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))"
msgstr ""
-#: ../../c-api/init.rst:2386 ../../c-api/init.rst:2415
+#: ../../c-api/init.rst:2403 ../../c-api/init.rst:2432
msgid "In the default build, this macro expands to ``{``."
msgstr ""
-#: ../../c-api/init.rst:2392
+#: ../../c-api/init.rst:2409
msgid "Ends the critical section and releases the per-object lock."
msgstr ""
-#: ../../c-api/init.rst:2396
+#: ../../c-api/init.rst:2413
msgid ""
" PyCriticalSection_End(&_py_cs);\n"
"}"
msgstr ""
-#: ../../c-api/init.rst:2399 ../../c-api/init.rst:2428
+#: ../../c-api/init.rst:2416 ../../c-api/init.rst:2445
msgid "In the default build, this macro expands to ``}``."
msgstr ""
-#: ../../c-api/init.rst:2405
+#: ../../c-api/init.rst:2422
msgid ""
"Acquires the per-objects locks for the objects *a* and *b* and begins a "
"critical section. The locks are acquired in a consistent order (lowest "
"address first) to avoid lock ordering deadlocks."
msgstr ""
-#: ../../c-api/init.rst:2411
+#: ../../c-api/init.rst:2428
msgid ""
"{\n"
" PyCriticalSection2 _py_cs2;\n"
-" PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
+" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
msgstr ""
-#: ../../c-api/init.rst:2421
+#: ../../c-api/init.rst:2438
msgid "Ends the critical section and releases the per-object locks."
msgstr ""
-#: ../../c-api/init.rst:2425
+#: ../../c-api/init.rst:2442
msgid ""
-" PyCriticalSection_End2(&_py_cs2);\n"
+" PyCriticalSection2_End(&_py_cs2);\n"
"}"
msgstr ""
@@ -2922,147 +2944,147 @@ msgstr "PyEval_InitThreads()"
msgid "modules (in module sys)"
msgstr "modules(sys 模組中)"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:698
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:696
msgid "path (in module sys)"
msgstr "path(sys 模組中)"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:698 ../../c-api/init.rst:1133
-#: ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:696 ../../c-api/init.rst:1131
+#: ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "module"
msgstr "模組"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "builtins"
msgstr "builtins(內建)"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "__main__"
msgstr "__main__"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "sys"
msgstr "sys"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:698
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:696
msgid "search"
msgstr "search(搜尋)"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:698
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:696
msgid "path"
msgstr "path(路徑)"
-#: ../../c-api/init.rst:350 ../../c-api/init.rst:1692 ../../c-api/init.rst:1745
+#: ../../c-api/init.rst:350 ../../c-api/init.rst:1709 ../../c-api/init.rst:1762
msgid "Py_FinalizeEx (C function)"
msgstr "Py_FinalizeEx(C 函式)"
-#: ../../c-api/init.rst:567
+#: ../../c-api/init.rst:562
msgid "Py_Initialize()"
msgstr "Py_Initialize()"
-#: ../../c-api/init.rst:567 ../../c-api/init.rst:796
+#: ../../c-api/init.rst:562 ../../c-api/init.rst:794
msgid "main()"
msgstr "main()"
-#: ../../c-api/init.rst:567
+#: ../../c-api/init.rst:562
msgid "Py_GetPath()"
msgstr "Py_GetPath()"
-#: ../../c-api/init.rst:677
+#: ../../c-api/init.rst:675
msgid "executable (in module sys)"
msgstr "executable(sys 模組中)"
-#: ../../c-api/init.rst:731 ../../c-api/init.rst:773 ../../c-api/init.rst:787
+#: ../../c-api/init.rst:729 ../../c-api/init.rst:771 ../../c-api/init.rst:785
msgid "version (in module sys)"
msgstr "version(sys 模組中)"
-#: ../../c-api/init.rst:743
+#: ../../c-api/init.rst:741
msgid "platform (in module sys)"
msgstr "platform(sys 模組中)"
-#: ../../c-api/init.rst:760
+#: ../../c-api/init.rst:758
msgid "copyright (in module sys)"
msgstr "copyright(sys 模組中)"
-#: ../../c-api/init.rst:796
+#: ../../c-api/init.rst:794
msgid "Py_FatalError()"
msgstr "Py_FatalError()"
-#: ../../c-api/init.rst:796
+#: ../../c-api/init.rst:794
msgid "argv (in module sys)"
msgstr "argv(sys 模組中)"
-#: ../../c-api/init.rst:916
+#: ../../c-api/init.rst:914
msgid "global interpreter lock"
msgstr "global interpreter lock(全域直譯器鎖)"
-#: ../../c-api/init.rst:916
+#: ../../c-api/init.rst:914
msgid "interpreter lock"
msgstr "interpreter lock(直譯器鎖)"
-#: ../../c-api/init.rst:916
+#: ../../c-api/init.rst:914
msgid "lock, interpreter"
msgstr "lock, interpreter(鎖、直譯器)"
-#: ../../c-api/init.rst:929
+#: ../../c-api/init.rst:927
msgid "setswitchinterval (in module sys)"
msgstr "setswitchinterval (sys 模組中)"
-#: ../../c-api/init.rst:938
+#: ../../c-api/init.rst:936
msgid "PyThreadState (C type)"
msgstr "PyThreadState(C 型別)"
-#: ../../c-api/init.rst:964
+#: ../../c-api/init.rst:962
msgid "Py_BEGIN_ALLOW_THREADS (C macro)"
msgstr "Py_BEGIN_ALLOW_THREADS(C 巨集)"
-#: ../../c-api/init.rst:964
+#: ../../c-api/init.rst:962
msgid "Py_END_ALLOW_THREADS (C macro)"
msgstr "Py_END_ALLOW_THREADS(C 巨集)"
-#: ../../c-api/init.rst:980
+#: ../../c-api/init.rst:978
msgid "PyEval_RestoreThread (C function)"
msgstr "PyEval_RestoreThread(C 函式)"
-#: ../../c-api/init.rst:980
+#: ../../c-api/init.rst:978
msgid "PyEval_SaveThread (C function)"
msgstr "PyEval_SaveThread(C 函式)"
-#: ../../c-api/init.rst:1111
+#: ../../c-api/init.rst:1109
msgid "PyEval_AcquireThread()"
msgstr "PyEval_AcquireThread()"
-#: ../../c-api/init.rst:1111
+#: ../../c-api/init.rst:1109
msgid "PyEval_ReleaseThread()"
msgstr "PyEval_ReleaseThread()"
-#: ../../c-api/init.rst:1111
+#: ../../c-api/init.rst:1109
msgid "PyEval_SaveThread()"
msgstr "PyEval_SaveThread()"
-#: ../../c-api/init.rst:1111
+#: ../../c-api/init.rst:1109
msgid "PyEval_RestoreThread()"
msgstr "PyEval_RestoreThread()"
-#: ../../c-api/init.rst:1133
+#: ../../c-api/init.rst:1131
msgid "_thread"
msgstr "_thread"
-#: ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "stdout (in module sys)"
msgstr "stdout(sys 模組中)"
-#: ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "stderr (in module sys)"
msgstr "stderr(sys 模組中)"
-#: ../../c-api/init.rst:1632 ../../c-api/init.rst:1727
+#: ../../c-api/init.rst:1645 ../../c-api/init.rst:1744
msgid "stdin (in module sys)"
msgstr "stdin(sys 模組中)"
-#: ../../c-api/init.rst:1692
+#: ../../c-api/init.rst:1709
msgid "Py_Initialize (C function)"
msgstr "Py_Initialize(C 函式)"
-#: ../../c-api/init.rst:1722
+#: ../../c-api/init.rst:1739
msgid "close (in module os)"
msgstr "close(os 模組中)"
diff --git a/c-api/init_config.po b/c-api/init_config.po
index 92b1a1a024..434dd0394e 100644
--- a/c-api/init_config.po
+++ b/c-api/init_config.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-09 00:13+0000\n"
+"POT-Creation-Date: 2025-03-14 00:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -810,7 +810,7 @@ msgstr "預設值:``NULL``。"
#: ../../c-api/init_config.rst:580
msgid "See also the :c:member:`~PyConfig.orig_argv` member."
-msgstr ""
+msgstr "另請參閱 :c:member:`~PyConfig.orig_argv` 成員。"
#: ../../c-api/init_config.rst:584
msgid ""
@@ -1108,7 +1108,7 @@ msgstr ""
#: ../../c-api/init_config.rst:791
msgid "See also the :c:member:`~PyConfig.filesystem_errors` member."
-msgstr ""
+msgstr "另請參閱 :c:member:`~PyConfig.filesystem_errors` 成員。"
#: ../../c-api/init_config.rst:795
msgid ""
@@ -1141,11 +1141,11 @@ msgstr "``\"surrogateescape\"``"
#: ../../c-api/init_config.rst:808
msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)"
-msgstr ""
+msgstr "``\"surrogatepass\"``\\ (僅支援 UTF-8 編碼)"
#: ../../c-api/init_config.rst:810
msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member."
-msgstr ""
+msgstr "另請參閱 :c:member:`~PyConfig.filesystem_encoding` 成員。"
#: ../../c-api/init_config.rst:815
msgid "Randomized hash function seed."
@@ -1159,7 +1159,7 @@ msgstr ""
#: ../../c-api/init_config.rst:820
msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable."
-msgstr ""
+msgstr "由 :envvar:`PYTHONHASHSEED` 環境變數設定。"
#: ../../c-api/init_config.rst:822
msgid ""
@@ -1174,7 +1174,7 @@ msgstr ""
#: ../../c-api/init_config.rst:830
msgid "Set by the :envvar:`PYTHONHOME` environment variable."
-msgstr ""
+msgstr "由 :envvar:`PYTHONHOME` 環境變數設定。"
#: ../../c-api/init_config.rst:834 ../../c-api/init_config.rst:964
#: ../../c-api/init_config.rst:984 ../../c-api/init_config.rst:1073
@@ -2171,7 +2171,7 @@ msgstr ""
#: ../../c-api/init_config.rst:1556
msgid "If :c:member:`~PyConfig.isolated` is zero:"
-msgstr ""
+msgstr "如果 :c:member:`~PyConfig.isolated` 為零:"
#: ../../c-api/init_config.rst:1558
msgid ""
@@ -2212,7 +2212,7 @@ msgstr ""
#: ../../c-api/init_config.rst:1574
msgid "``pybuilddir.txt`` (Unix only)"
-msgstr ""
+msgstr "``pybuilddir.txt``\\ (僅限 Unix)"
#: ../../c-api/init_config.rst:1576
msgid "If a ``._pth`` file is present:"
@@ -2250,7 +2250,7 @@ msgstr ""
#: ../../c-api/init_config.rst:1594
msgid "See also :c:member:`PyConfig.orig_argv` member."
-msgstr ""
+msgstr "也請參與 :c:member:`PyConfig.orig_argv` 成員。"
#: ../../c-api/init_config.rst:1598
msgid "Multi-Phase Initialization Private Provisional API"
@@ -2403,14 +2403,8 @@ msgstr ""
#: ../../c-api/init_config.rst:558
msgid "main()"
-msgstr ""
+msgstr "main()"
#: ../../c-api/init_config.rst:558
msgid "argv (in module sys)"
msgstr ""
-
-#~ msgid "Py_RunMain()"
-#~ msgstr "Py_RunMain()"
-
-#~ msgid "Command line arguments: :data:`sys.argv`."
-#~ msgstr "命令列引數::data:`sys.argv`。"
diff --git a/c-api/intro.po b/c-api/intro.po
index 9854c7f4d0..4c39517d62 100644
--- a/c-api/intro.po
+++ b/c-api/intro.po
@@ -1,5 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
@@ -8,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2023-04-25 18:01+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -179,8 +178,8 @@ msgid ""
"option:`prefix <--prefix>` include the platform specific headers from :"
"option:`exec_prefix <--exec-prefix>`."
msgstr ""
-"要引入標頭,請將兩個(如果不同)目錄放在編譯器的引入搜索路徑 (search path) "
-"中。*不要*\\ 將父目錄放在搜索路徑上,然後使用 ``#include ``;這會在多平台建置上壞掉,因為 :option:`prefix <--prefix>` 下獨立於平台的"
"標頭包括來自 :option:`exec_prefix <--exec-prefix>` 的平台特定標頭。"
@@ -225,7 +224,7 @@ msgstr ""
#: ../../c-api/intro.rst:119
msgid ""
"static struct PyModuleDef spam_module = {\n"
-" PyModuleDef_HEAD_INIT,\n"
+" .m_base = PyModuleDef_HEAD_INIT,\n"
" .m_name = \"spam\",\n"
" ...\n"
"};\n"
@@ -233,11 +232,11 @@ msgid ""
"PyMODINIT_FUNC\n"
"PyInit_spam(void)\n"
"{\n"
-" return PyModule_Create(&spam_module);\n"
+" return PyModuleDef_Init(&spam_module);\n"
"}"
msgstr ""
"static struct PyModuleDef spam_module = {\n"
-" PyModuleDef_HEAD_INIT,\n"
+" .m_base = PyModuleDef_HEAD_INIT,\n"
" .m_name = \"spam\",\n"
" ...\n"
"};\n"
@@ -245,7 +244,7 @@ msgstr ""
"PyMODINIT_FUNC\n"
"PyInit_spam(void)\n"
"{\n"
-" return PyModule_Create(&spam_module);\n"
+" return PyModuleDef_Init(&spam_module);\n"
"}"
#: ../../c-api/intro.rst:134
@@ -255,7 +254,7 @@ msgstr "回傳 ``x`` 的絕對值。"
#: ../../c-api/intro.rst:140
msgid ""
"Ask the compiler to always inline a static inline function. The compiler can "
-"ignore it and decides to not inline the function."
+"ignore it and decide to not inline the function."
msgstr ""
"要求編譯器總是嵌入靜態行內函式 (static inline function),編譯器可以忽略它並決"
"定不嵌入該函式。"
@@ -600,7 +599,7 @@ msgid ""
msgstr ""
"然而,一個常見的陷阱是從一個 list 中提取一個物件並保留它一段時間而不取得其參"
"照。某些其他操作可能會從列表中刪除該物件,減少其參照計數並可能取消分配它。真"
-"正的危險是看似無害的操作可能會呼叫可以執行此操作的任意 Python 程式碼;有一個"
+"正的危險是看似無害的操作可能會叫用可以執行此操作的任意 Python 程式碼;有一個"
"程式碼路徑允許控制權從 :c:func:`Py_DECREF` 回歸使用者,因此幾乎任何操作都有潛"
"在危險。"
@@ -702,7 +701,7 @@ msgid ""
msgstr ""
"這裡 :c:func:`PyLong_FromLong` 會回傳一個新的參照,它立即被 :c:func:"
"`PyTuple_SetItem` 竊取。如果你想繼續使用一個物件,儘管對它的參照將被竊取,請"
-"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來獲取另一個參照。"
+"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來取得另一個參照。"
#: ../../c-api/intro.rst:427
msgid ""
@@ -839,7 +838,7 @@ msgstr ""
"重要的是要意識到你是否擁有一個函式回傳的參照只取決於你呼叫哪個函式 --- *羽毛 "
"(plumage)*(作為引數傳遞給函式的物件之型別)\\ *不會進入它!*\\ 因此,如果你"
"使用 :c:func:`PyList_GetItem` 從 list 中提取一個項目,你不會擁有其參照 --- 但"
-"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中獲取相同的項目(且恰好"
+"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中取得相同的項目(且恰好"
"使用完全相同的引數),你確實會擁有對回傳物件的參照。"
#: ../../c-api/intro.rst:497
@@ -987,8 +986,8 @@ msgid ""
"general) function to set the exception state, and :c:func:`PyErr_Clear` "
"clears the exception state."
msgstr ""
-"例外的狀態會在個別執行緒的存儲空間 (per-thread storage) 中維護(這相當於在非"
-"執行緒應用程式中使用全域存儲空間)。執行緒可以處於兩種狀態之一:發生例外或未"
+"例外的狀態會在個別執行緒的儲存空間 (per-thread storage) 中維護(這相當於在非"
+"執行緒應用程式中使用全域儲存空間)。執行緒可以處於兩種狀態之一:發生例外或未"
"發生例外。函式 :c:func:`PyErr_Occurred` 可用於檢查這一點:當例外發生時,它回"
"傳對例外型別物件的借用參照,否則回傳 ``NULL``。設定例外狀態的函式有很多::c:"
"func:`PyErr_SetString` 是最常見的(儘管不是最通用的)設定例外狀態的函式,而 :"
@@ -1189,8 +1188,8 @@ msgid ""
msgstr ""
"在大多數系統上(特別是在 Unix 和 Windows 上,儘管細節略有不同),:c:func:"
"`Py_Initialize` 會假設Python 函式庫相對於 Python 直譯器可執行檔案的位置固定,"
-"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜索路徑。或者"
-"更詳細地說,它會在 shell 命令搜索路徑(環境變數 :envvar:`PATH`)中找到名為 :"
+"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜尋路徑。或者"
+"更詳細地說,它會在 shell 命令搜尋路徑(環境變數 :envvar:`PATH`)中找到名為 :"
"file:`python` 的可執行檔案,並在其父目錄中查找一個名為 :file:`lib/python{X.Y}"
"` 的目錄的相對位置。"
@@ -1212,7 +1211,6 @@ msgstr ""
"錄。"
#: ../../c-api/intro.rst:778
-#, fuzzy
msgid ""
"The embedding application can steer the search by setting :c:member:"
"`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. "
@@ -1222,8 +1220,8 @@ msgid ""
"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:"
"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)."
msgstr ""
-"嵌入的應用程式可以透過在呼叫 :c:func:`Py_Initialize` *之前*\\ 呼叫 "
-"``Py_SetProgramName(file)`` 來引導搜索。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
+"嵌入的應用程式可以透過在呼叫 :c:func:`Py_InitializeFromConfig` *之前*\\ 設定 "
+":c:member:`PyConfig.program_name` 來引導搜尋。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
"它並且 :envvar:`PYTHONPATH` 仍然插入在標準路徑的前面。需要完全控制權的應用程"
"式必須實作自己的 :c:func:`Py_GetPath`、:c:func:`Py_GetPrefix`、:c:func:"
"`Py_GetExecPrefix` 和 :c:func:`Py_GetProgramFullPath`\\(全部定義在 :file:"
@@ -1245,7 +1243,7 @@ msgstr ""
"有時會希望能夠「取消初始化 (uninitialize)」Python。例如,應用程式可能想要重新"
"開始(再次呼叫 :c:func:`Py_Initialize`)或者應用程式簡單地完成了對 Python 的"
"使用並想要釋放 Python 分配的記憶體。這可以透過呼叫 :c:func:`Py_FinalizeEx` 來"
-"完成。如果 Python 當前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
+"完成。如果 Python 目前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
"true。有關這些功能的更多資訊將在後面的章節中給出。請注意 :c:func:"
"`Py_FinalizeEx` *不會*\\ 釋放由 Python 直譯器分配的所有記憶體,例如目前無法釋"
"放被擴充模組所分配的記憶體。"
@@ -1309,7 +1307,7 @@ msgid ""
"well. Upon exit, all existing references are printed. (In interactive mode "
"this happens after every statement run by the interpreter.)"
msgstr ""
-"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`調用 --with-"
+"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`設定 --with-"
"trace-refs 選項 <--with-trace-refs>`)。當有定義時,透過向每個 :c:type:"
"`PyObject` 新增兩個額外欄位來維護有效物件的循環雙向鍊表 (circular doubly "
"linked list)。全體分配也有被追蹤。退出時將印出所有現行參照。(在交互模式下,"
@@ -1323,6 +1321,80 @@ msgstr ""
"有關更多詳細資訊,請參閱 Python 原始碼發布版中的 :file:`Misc/SpecialBuilds."
"txt`。"
+#: ../../c-api/intro.rst:842
+msgid "Recommended third party tools"
+msgstr ""
+
+#: ../../c-api/intro.rst:844
+msgid ""
+"The following third party tools offer both simpler and more sophisticated "
+"approaches to creating C, C++ and Rust extensions for Python:"
+msgstr ""
+
+#: ../../c-api/intro.rst:847
+msgid "`Cython `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:848
+msgid "`cffi `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:849
+msgid "`HPy `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:850
+msgid "`nanobind `_ (C++)"
+msgstr ""
+
+#: ../../c-api/intro.rst:851
+msgid "`Numba `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:852
+msgid "`pybind11 `_ (C++)"
+msgstr ""
+
+#: ../../c-api/intro.rst:853
+msgid "`PyO3 `_ (Rust)"
+msgstr ""
+
+#: ../../c-api/intro.rst:854
+msgid "`SWIG `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:856
+msgid ""
+"Using tools such as these can help avoid writing code that is tightly bound "
+"to a particular version of CPython, avoid reference counting errors, and "
+"focus more on your own code than on using the CPython API. In general, new "
+"versions of Python can be supported by updating the tool, and your code will "
+"often use newer and more efficient APIs automatically. Some tools also "
+"support compiling for other implementations of Python from a single set of "
+"sources."
+msgstr ""
+
+#: ../../c-api/intro.rst:863
+msgid ""
+"These projects are not supported by the same people who maintain Python, and "
+"issues need to be raised with the projects directly. Remember to check that "
+"the project is still maintained and supported, as the list above may become "
+"outdated."
+msgstr ""
+
+#: ../../c-api/intro.rst:870
+msgid ""
+"`Python Packaging User Guide: Binary Extensions `_"
+msgstr ""
+
+#: ../../c-api/intro.rst:871
+msgid ""
+"The Python Packaging User Guide not only covers several available tools that "
+"simplify the creation of binary extensions, but also discusses the various "
+"reasons why creating an extension module may be desirable in the first place."
+msgstr ""
+
#: ../../c-api/intro.rst:288
msgid "object"
msgstr "object(物件)"
diff --git a/c-api/iter.po b/c-api/iter.po
index ac90b9dc26..dbb2602f1d 100644
--- a/c-api/iter.po
+++ b/c-api/iter.po
@@ -22,7 +22,7 @@ msgstr ""
#: ../../c-api/iter.rst:6
msgid "Iterator Protocol"
-msgstr "疊代器協議"
+msgstr "疊代器協定"
#: ../../c-api/iter.rst:8
msgid "There are two functions specifically for working with iterators."
@@ -41,7 +41,7 @@ msgid ""
"Return non-zero if the object *o* provides the :class:`AsyncIterator` "
"protocol, and ``0`` otherwise. This function always succeeds."
msgstr ""
-"如果物件 *o* 有提供 :class:`AsyncIterator` 協議,則回傳非零,否則回傳 0。這個"
+"如果物件 *o* 有提供 :class:`AsyncIterator` 協定,則回傳非零,否則回傳 0。這個"
"函式一定會執行成功。"
#: ../../c-api/iter.rst:24
diff --git a/c-api/list.po b/c-api/list.po
index 8627316f79..5b7fb4a6e1 100644
--- a/c-api/list.po
+++ b/c-api/list.po
@@ -33,8 +33,8 @@ msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
"This is the same object as :class:`list` in the Python layer."
msgstr ""
-"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中的 :"
-"class:`list` 是同一個物件。"
+"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中"
+"的 :class:`list` 是同一個物件。"
#: ../../c-api/list.rst:24
msgid ""
@@ -57,20 +57,20 @@ msgid "Return a new list of length *len* on success, or ``NULL`` on failure."
msgstr "成功時回傳長度為 *len* 的新串列,失敗時回傳 ``NULL``。"
#: ../../c-api/list.rst:40
-#, fuzzy
msgid ""
"If *len* is greater than zero, the returned list object's items are set to "
-"``NULL``. Thus you cannot use abstract API functions such as :c:func:"
-"`PySequence_SetItem` or expose the object to Python code before setting all "
-"items to a real object with :c:func:`PyList_SetItem` or :c:func:"
-"`PyList_SET_ITEM()`. The following APIs are safe APIs before the list is "
-"fully initialized: :c:func:`PyList_SetItem()` and :c:func:"
-"`PyList_SET_ITEM()`."
+"``NULL``. Thus you cannot use abstract API functions such "
+"as :c:func:`PySequence_SetItem` or expose the object to Python code before "
+"setting all items to a real object with :c:func:`PyList_SetItem` "
+"or :c:func:`PyList_SET_ITEM()`. The following APIs are safe APIs before the "
+"list is fully initialized: :c:func:`PyList_SetItem()` "
+"and :c:func:`PyList_SET_ITEM()`."
msgstr ""
-"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使用 :"
-"c:func:`PyList_SetItem` 來將所有項目設定為一個真實物件前,你無法使用像是 :c:"
-"func:`PySequence_SetItem` 的使用抽象 API 函式,也不能將物件暴露 (expose) 給 "
-"Python 程式碼。"
+"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使"
+"用 :c:func:`PyList_SetItem` 或 :c:func:`PyList_SET_ITEM()` 來將所有項目設定為"
+"一個真實物件前,你無法使用像是 :c:func:`PySequence_SetItem` 的抽象 API 函式,"
+"也不能將物件暴露 (expose) 給 Python 程式碼。以下 API 在串列完全初始化之前是安"
+"全的::c:func:`PyList_SetItem()` 和 :c:func:`PyList_SET_ITEM()`。"
#: ../../c-api/list.rst:53
msgid ""
@@ -83,7 +83,6 @@ msgid "Similar to :c:func:`PyList_Size`, but without error checking."
msgstr "與 :c:func:`PyList_Size` 類似,但沒有錯誤檢查。"
#: ../../c-api/list.rst:64
-#, fuzzy
msgid ""
"Return the object at position *index* in the list pointed to by *list*. The "
"position must be non-negative; indexing from the end of the list is not "
@@ -91,8 +90,8 @@ msgid ""
"``NULL`` and set an :exc:`IndexError` exception."
msgstr ""
"回傳 *list* 指向的串列中位於 *index* 位置的物件。該位置不可為負數;並不支援從"
-"串列尾末開始索引。如果 *index* 超出邊界範圍(<0 或 >=len(list))則回傳 "
-"``NULL`` 並設定 :exc:`IndexError` 例外。"
+"串列尾末開始索引。如果 *index* 超出邊界範圍 (:code:`<0 or >=len(list)`) 則回"
+"傳 ``NULL`` 並設定 :exc:`IndexError` 例外。"
#: ../../c-api/list.rst:74
msgid ""
@@ -130,15 +129,17 @@ msgstr ""
#: ../../c-api/list.rst:100
msgid ""
-"Bounds checking is performed as an assertion if Python is built in :ref:"
-"`debug mode ` or :option:`with assertions <--with-assertions>`."
+"Bounds checking is performed as an assertion if Python is built "
+"in :ref:`debug mode ` or :option:`with assertions <--with-"
+"assertions>`."
msgstr ""
#: ../../c-api/list.rst:106
msgid ""
-"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
-"`PyList_SetItem`, does *not* discard a reference to any item that is being "
-"replaced; any reference in *list* at position *i* will be leaked."
+"This macro \"steals\" a reference to *item*, and, "
+"unlike :c:func:`PyList_SetItem`, does *not* discard a reference to any item "
+"that is being replaced; any reference in *list* at position *i* will be "
+"leaked."
msgstr ""
"該巨集「竊取」對 *item* 的參照,並且與 :c:func:`PyList_SetItem` 不同的是,它"
"\\ *不會*\\ 丟棄對任意被替換項目的參照;*list* 中位置 *i* 的任何參照都將被洩"
@@ -226,8 +227,8 @@ msgid ""
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is the equivalent of ``list.reverse()``."
msgstr ""
-"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 ``list."
-"reverse()``。"
+"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 "
+"``list.reverse()``。"
#: ../../c-api/list.rst:182
msgid ""
diff --git a/c-api/long.po b/c-api/long.po
index 281c5ae8a4..a32b953e3e 100644
--- a/c-api/long.po
+++ b/c-api/long.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-14 00:14+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:06+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -402,10 +402,10 @@ msgstr ""
#: ../../c-api/long.rst:385
msgid ""
-"If the returned value is greater than than *n_bytes*, the value was "
-"truncated: as many of the lowest bits of the value as could fit are written, "
-"and the higher bits are ignored. This matches the typical behavior of a C-"
-"style downcast."
+"If the returned value is greater than *n_bytes*, the value was truncated: as "
+"many of the lowest bits of the value as could fit are written, and the "
+"higher bits are ignored. This matches the typical behavior of a C-style "
+"downcast."
msgstr ""
#: ../../c-api/long.rst:392
@@ -496,7 +496,7 @@ msgstr ""
#: ../../c-api/long.rst:456
msgid ""
"*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults "
-"that behave most like a C cast, or a combintation of the other flags in the "
+"that behave most like a C cast, or a combination of the other flags in the "
"table below. Note that ``-1`` cannot be combined with other flags."
msgstr ""
@@ -640,11 +640,11 @@ msgstr "object(物件)"
#: ../../c-api/long.rst:8
msgid "long integer"
-msgstr "long integer(長整数)"
+msgstr "long integer(長整數)"
#: ../../c-api/long.rst:8
msgid "integer"
-msgstr "integer(整数)"
+msgstr "integer(整數)"
#: ../../c-api/long.rst:144
msgid "LONG_MAX (C macro)"
@@ -653,7 +653,7 @@ msgstr "LONG_MAX(C 巨集)"
#: ../../c-api/long.rst:144 ../../c-api/long.rst:204 ../../c-api/long.rst:247
#: ../../c-api/long.rst:262 ../../c-api/long.rst:278 ../../c-api/long.rst:294
msgid "OverflowError (built-in exception)"
-msgstr "OverflowError(内建例外)"
+msgstr "OverflowError(內建例外)"
#: ../../c-api/long.rst:247
msgid "PY_SSIZE_T_MAX (C macro)"
diff --git a/c-api/marshal.po b/c-api/marshal.po
index 3e1eb7377f..88d77fe2c1 100644
--- a/c-api/marshal.po
+++ b/c-api/marshal.po
@@ -1,15 +1,16 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
+# Adrian Liaw , 2018
+# Matt Wang , 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-20 00:03+0000\n"
-"PO-Revision-Date: 2018-05-23 14:06+0000\n"
-"Last-Translator: Adrian Liaw \n"
+"PO-Revision-Date: 2025-06-28 02:44+0800\n"
+"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
@@ -17,10 +18,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 3.6\n"
#: ../../c-api/marshal.rst:6
msgid "Data marshalling support"
-msgstr "資料 marshal 的支援"
+msgstr "資料 marshal 操作的支援"
#: ../../c-api/marshal.rst:8
msgid ""
@@ -30,10 +32,13 @@ msgid ""
"read the data back. Files used to store marshalled data must be opened in "
"binary mode."
msgstr ""
+"這些例程允許 C 程式碼使用與 :mod:`marshal` 模組相同的資料格式來處理序列化物"
+"件。有函式可以將資料寫入序列化格式,還有其他函式可以用來讀取回資料。用來儲存 "
+"marshal 過的資料的檔案必須以二進位模式開啟。"
#: ../../c-api/marshal.rst:14
msgid "Numeric values are stored with the least significant byte first."
-msgstr ""
+msgstr "數值會以最低有效位元組 (the least significant byte) 優先的方式儲存。"
#: ../../c-api/marshal.rst:16
msgid ""
@@ -42,6 +47,9 @@ msgid ""
"unmarshalling. Version 2 uses a binary format for floating-point numbers. "
"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)."
msgstr ""
+"這個模組支援兩個版本的資料格式:版本 0 是歷史版本,版本 1 在檔案中共享駐留字"
+"串 (interned strings),並在 unmarshal 時使用。版本 2 使用二進位格式來儲存浮點"
+"數。``Py_MARSHAL_VERSION`` 表示目前的檔案格式(目前為 2)。"
#: ../../c-api/marshal.rst:24
msgid ""
@@ -49,28 +57,35 @@ msgid ""
"the least-significant 32 bits of *value*; regardless of the size of the "
"native :c:expr:`long` type. *version* indicates the file format."
msgstr ""
+"將一個 :c:expr:`long` 整數 *value* marshal 為 *file*。這只會寫入 *value* 的最"
+"低有效 32 位元;無論原生 :c:expr:`long` 型別的大小如何。*version* 表示檔案的格"
+"式。"
#: ../../c-api/marshal.rst:28 ../../c-api/marshal.rst:36
msgid ""
-"This function can fail, in which case it sets the error indicator. Use :c:"
-"func:`PyErr_Occurred` to check for that."
+"This function can fail, in which case it sets the error indicator. "
+"Use :c:func:`PyErr_Occurred` to check for that."
msgstr ""
+"這個函式可能會失敗,這時會設定錯誤指示器。使用 :c:func:`PyErr_Occurred` 來檢"
+"查是否發生錯誤。"
#: ../../c-api/marshal.rst:33
msgid ""
"Marshal a Python object, *value*, to *file*. *version* indicates the file "
"format."
msgstr ""
+"將一個 Python 物件 *value* marshal 為 *file*。*version* 表示檔案的格式。"
#: ../../c-api/marshal.rst:41
msgid ""
"Return a bytes object containing the marshalled representation of *value*. "
"*version* indicates the file format."
msgstr ""
+"回傳一個位元組物件,包含 *value* 的 marshal 表示。*version* 為檔案的格式。"
#: ../../c-api/marshal.rst:45
msgid "The following functions allow marshalled values to be read back in."
-msgstr ""
+msgstr "以下函式允許將 marshal 過後的值讀取回來。"
#: ../../c-api/marshal.rst:50
msgid ""
@@ -78,12 +93,14 @@ msgid ""
"for reading. Only a 32-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`long`."
msgstr ""
+"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`long`。"
+"無論 :c:expr:`long` 的原生大小如何,這個函式只能讀取 32 位元的值。"
#: ../../c-api/marshal.rst:54 ../../c-api/marshal.rst:64
msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`) and returns "
"``-1``."
-msgstr ""
+msgstr "在錯誤發生時,會設定合適的例外(:exc:`EOFError`)並回傳 ``-1``。"
#: ../../c-api/marshal.rst:60
msgid ""
@@ -91,12 +108,15 @@ msgid ""
"for reading. Only a 16-bit value can be read in using this function, "
"regardless of the native size of :c:expr:`short`."
msgstr ""
+"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`short`。"
+"無論 :c:expr:`short` 的原生大小如何,這個函式只能讀取 16 位元的值。"
#: ../../c-api/marshal.rst:70
msgid ""
"Return a Python object from the data stream in a :c:expr:`FILE*` opened for "
"reading."
msgstr ""
+"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。"
#: ../../c-api/marshal.rst:73 ../../c-api/marshal.rst:87
#: ../../c-api/marshal.rst:96
@@ -104,6 +124,8 @@ msgid ""
"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` "
"or :exc:`TypeError`) and returns ``NULL``."
msgstr ""
+"在錯誤發生時,會設定合適的例外(:exc:`EOFError`、:exc:`ValueError` "
+"或 :exc:`TypeError`)並回傳 ``NULL``。"
#: ../../c-api/marshal.rst:79
msgid ""
@@ -115,9 +137,16 @@ msgid ""
"file. Only use these variant if you are certain that you won't be reading "
"anything else from the file."
msgstr ""
+"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。"
+"與 :c:func:`PyMarshal_ReadObjectFromFile` 不同,這個函式假設不會從檔案中讀取"
+"其他物件,允許它積極地將檔案資料載入記憶體,以便反序列化可以從記憶體中的資料"
+"操作,而不是從檔案中逐位元組讀取。只有在確定不會從檔案中讀取其他內容時,才使"
+"用這個變體。"
#: ../../c-api/marshal.rst:93
msgid ""
"Return a Python object from the data stream in a byte buffer containing "
"*len* bytes pointed to by *data*."
msgstr ""
+"從一個包含 *len* 位元組、被 *data* 指向的位元組緩衝區中的資料串流回傳一個 "
+"Python 物件。"
diff --git a/c-api/module.po b/c-api/module.po
index bfd8be22ed..89ec8b6dcf 100644
--- a/c-api/module.po
+++ b/c-api/module.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-10 00:13+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:32+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -50,7 +50,7 @@ msgid ""
msgstr ""
#: ../../c-api/module.rst:46 ../../c-api/module.rst:272
-#: ../../c-api/module.rst:474
+#: ../../c-api/module.rst:492
msgid "Return ``NULL`` with an exception set on error."
msgstr "在失敗時回傳 ``NULL`` 並設定例外。"
@@ -311,31 +311,54 @@ msgid ""
"initialization\". Extension modules created this way behave more like Python "
"modules: the initialization is split between the *creation phase*, when the "
"module object is created, and the *execution phase*, when it is populated. "
-"The distinction is similar to the :py:meth:`!__new__` and :py:meth:`!"
-"__init__` methods of classes."
+"The distinction is similar to the :py:meth:`~object.__new__` and :py:meth:"
+"`~object.__init__` methods of classes."
msgstr ""
#: ../../c-api/module.rst:294
msgid ""
"Unlike modules created using single-phase initialization, these modules are "
-"not singletons: if the *sys.modules* entry is removed and the module is re-"
-"imported, a new module object is created, and the old module is subject to "
-"normal garbage collection -- as with Python modules. By default, multiple "
-"modules created from the same definition should be independent: changes to "
-"one should not affect the others. This means that all state should be "
-"specific to the module object (using e.g. using :c:func:"
-"`PyModule_GetState`), or its contents (such as the module's :attr:`~object."
-"__dict__` or individual classes created with :c:func:`PyType_FromSpec`)."
+"not singletons. For example, if the :py:attr:`sys.modules` entry is removed "
+"and the module is re-imported, a new module object is created, and typically "
+"populated with fresh method and type objects. The old module is subject to "
+"normal garbage collection. This mirrors the behavior of pure-Python modules."
msgstr ""
-#: ../../c-api/module.rst:304
+#: ../../c-api/module.rst:302
+msgid ""
+"Additional module instances may be created in :ref:`sub-interpreters ` or after after Python runtime reinitialization (:c:"
+"func:`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing "
+"Python objects between module instances would likely cause crashes or "
+"undefined behavior."
+msgstr ""
+
+#: ../../c-api/module.rst:309
+msgid ""
+"To avoid such issues, each instance of an extension module should be "
+"*isolated*: changes to one instance should not implicitly affect the others, "
+"and all state, including references to Python objects, should be specific to "
+"a particular module instance. See :ref:`isolating-extensions-howto` for more "
+"details and a practical guide."
+msgstr ""
+
+#: ../../c-api/module.rst:315
+msgid ""
+"A simpler way to avoid these issues is :ref:`raising an error on repeated "
+"initialization `."
+msgstr ""
+
+#: ../../c-api/module.rst:318
msgid ""
"All modules created using multi-phase initialization are expected to "
-"support :ref:`sub-interpreters `. Making sure "
-"multiple modules are independent is typically enough to achieve this."
+"support :ref:`sub-interpreters `, or otherwise "
+"explicitly signal a lack of support. This is usually achieved by isolation "
+"or blocking repeated initialization, as above. A module may also be limited "
+"to the main interpreter using the :c:data:`Py_mod_multiple_interpreters` "
+"slot."
msgstr ""
-#: ../../c-api/module.rst:308
+#: ../../c-api/module.rst:326
msgid ""
"To request multi-phase initialization, the initialization function "
"(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :"
@@ -343,65 +366,65 @@ msgid ""
"instance must be initialized with the following function:"
msgstr ""
-#: ../../c-api/module.rst:315
+#: ../../c-api/module.rst:333
msgid ""
"Ensures a module definition is a properly initialized Python object that "
"correctly reports its type and reference count."
msgstr ""
-#: ../../c-api/module.rst:318
+#: ../../c-api/module.rst:336
msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred."
msgstr ""
-#: ../../c-api/module.rst:322
+#: ../../c-api/module.rst:340
msgid ""
"The *m_slots* member of the module definition must point to an array of "
"``PyModuleDef_Slot`` structures:"
msgstr ""
-#: ../../c-api/module.rst:329
+#: ../../c-api/module.rst:347
msgid "A slot ID, chosen from the available values explained below."
msgstr ""
-#: ../../c-api/module.rst:333
+#: ../../c-api/module.rst:351
msgid "Value of the slot, whose meaning depends on the slot ID."
msgstr ""
-#: ../../c-api/module.rst:337
+#: ../../c-api/module.rst:355
msgid "The *m_slots* array must be terminated by a slot with id 0."
msgstr ""
-#: ../../c-api/module.rst:339
+#: ../../c-api/module.rst:357
msgid "The available slot types are:"
msgstr ""
-#: ../../c-api/module.rst:343
+#: ../../c-api/module.rst:361
msgid ""
"Specifies a function that is called to create the module object itself. The "
"*value* pointer of this slot must point to a function of the signature:"
msgstr ""
-#: ../../c-api/module.rst:350
+#: ../../c-api/module.rst:368
msgid ""
"The function receives a :py:class:`~importlib.machinery.ModuleSpec` "
"instance, as defined in :PEP:`451`, and the module definition. It should "
"return a new module object, or set an error and return ``NULL``."
msgstr ""
-#: ../../c-api/module.rst:355
+#: ../../c-api/module.rst:373
msgid ""
"This function should be kept minimal. In particular, it should not call "
"arbitrary Python code, as trying to import the same module again may result "
"in an infinite loop."
msgstr ""
-#: ../../c-api/module.rst:359
+#: ../../c-api/module.rst:377
msgid ""
"Multiple ``Py_mod_create`` slots may not be specified in one module "
"definition."
msgstr ""
-#: ../../c-api/module.rst:362
+#: ../../c-api/module.rst:380
msgid ""
"If ``Py_mod_create`` is not specified, the import machinery will create a "
"normal module object using :c:func:`PyModule_New`. The name is taken from "
@@ -410,7 +433,7 @@ msgid ""
"through symlinks, all while sharing a single module definition."
msgstr ""
-#: ../../c-api/module.rst:368
+#: ../../c-api/module.rst:386
msgid ""
"There is no requirement for the returned object to be an instance of :c:type:"
"`PyModule_Type`. Any type can be used, as long as it supports setting and "
@@ -420,7 +443,7 @@ msgid ""
"``Py_mod_create``."
msgstr ""
-#: ../../c-api/module.rst:377
+#: ../../c-api/module.rst:395
msgid ""
"Specifies a function that is called to *execute* the module. This is "
"equivalent to executing the code of a Python module: typically, this "
@@ -428,61 +451,61 @@ msgid ""
"function is:"
msgstr ""
-#: ../../c-api/module.rst:386
+#: ../../c-api/module.rst:404
msgid ""
"If multiple ``Py_mod_exec`` slots are specified, they are processed in the "
"order they appear in the *m_slots* array."
msgstr ""
-#: ../../c-api/module.rst:391 ../../c-api/module.rst:424
+#: ../../c-api/module.rst:409 ../../c-api/module.rst:442
msgid "Specifies one of the following values:"
msgstr ""
-#: ../../c-api/module.rst:397
+#: ../../c-api/module.rst:415
msgid "The module does not support being imported in subinterpreters."
msgstr ""
-#: ../../c-api/module.rst:401
+#: ../../c-api/module.rst:419
msgid ""
"The module supports being imported in subinterpreters, but only when they "
"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)"
msgstr ""
-#: ../../c-api/module.rst:407
+#: ../../c-api/module.rst:425
msgid ""
"The module supports being imported in subinterpreters, even when they have "
"their own GIL. (See :ref:`isolating-extensions-howto`.)"
msgstr ""
-#: ../../c-api/module.rst:411
+#: ../../c-api/module.rst:429
msgid ""
"This slot determines whether or not importing this module in a "
"subinterpreter will fail."
msgstr ""
-#: ../../c-api/module.rst:414
+#: ../../c-api/module.rst:432
msgid ""
"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one "
"module definition."
msgstr ""
-#: ../../c-api/module.rst:417
+#: ../../c-api/module.rst:435
msgid ""
"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery "
-"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``."
+"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``."
msgstr ""
-#: ../../c-api/module.rst:430
+#: ../../c-api/module.rst:448
msgid ""
"The module depends on the presence of the global interpreter lock (GIL), and "
"may access global state without synchronization."
msgstr ""
-#: ../../c-api/module.rst:435
+#: ../../c-api/module.rst:453
msgid "The module is safe to run without an active GIL."
msgstr ""
-#: ../../c-api/module.rst:437
+#: ../../c-api/module.rst:455
msgid ""
"This slot is ignored by Python builds not configured with :option:`--disable-"
"gil`. Otherwise, it determines whether or not importing this module will "
@@ -490,26 +513,26 @@ msgid ""
"threaded-cpython` for more detail."
msgstr ""
-#: ../../c-api/module.rst:442
+#: ../../c-api/module.rst:460
msgid ""
"Multiple ``Py_mod_gil`` slots may not be specified in one module definition."
msgstr ""
-#: ../../c-api/module.rst:444
+#: ../../c-api/module.rst:462
msgid ""
"If ``Py_mod_gil`` is not specified, the import machinery defaults to "
"``Py_MOD_GIL_USED``."
msgstr ""
-#: ../../c-api/module.rst:449
+#: ../../c-api/module.rst:467
msgid "See :PEP:`489` for more details on multi-phase initialization."
msgstr ""
-#: ../../c-api/module.rst:452
+#: ../../c-api/module.rst:470
msgid "Low-level module creation functions"
msgstr ""
-#: ../../c-api/module.rst:454
+#: ../../c-api/module.rst:472
msgid ""
"The following functions are called under the hood when using multi-phase "
"initialization. They can be used directly, for example when creating module "
@@ -517,14 +540,14 @@ msgid ""
"``PyModule_ExecDef`` must be called to fully initialize a module."
msgstr ""
-#: ../../c-api/module.rst:461
+#: ../../c-api/module.rst:479
msgid ""
"Create a new module object, given the definition in *def* and the ModuleSpec "
"*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with "
"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`."
msgstr ""
-#: ../../c-api/module.rst:469
+#: ../../c-api/module.rst:487
msgid ""
"Create a new module object, given the definition in *def* and the ModuleSpec "
"*spec*, assuming the API version *module_api_version*. If that version does "
@@ -532,24 +555,24 @@ msgid ""
"emitted."
msgstr ""
-#: ../../c-api/module.rst:478
+#: ../../c-api/module.rst:496
msgid ""
"Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` "
"instead; only use this if you are sure you need it."
msgstr ""
-#: ../../c-api/module.rst:485
+#: ../../c-api/module.rst:503
msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*."
msgstr ""
-#: ../../c-api/module.rst:491
+#: ../../c-api/module.rst:509
msgid ""
"Set the docstring for *module* to *docstring*. This function is called "
"automatically when creating a module from ``PyModuleDef``, using either "
"``PyModule_Create`` or ``PyModule_FromDefAndSpec``."
msgstr ""
-#: ../../c-api/module.rst:500
+#: ../../c-api/module.rst:518
msgid ""
"Add the functions from the ``NULL`` terminated *functions* array to "
"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on "
@@ -561,11 +584,11 @@ msgid ""
"``PyModule_FromDefAndSpec``."
msgstr ""
-#: ../../c-api/module.rst:512
+#: ../../c-api/module.rst:530
msgid "Support functions"
msgstr "支援的函式"
-#: ../../c-api/module.rst:514
+#: ../../c-api/module.rst:532
msgid ""
"The module initialization function (if using single phase initialization) or "
"a function called from a module execution slot (if using multi-phase "
@@ -573,29 +596,23 @@ msgid ""
"module state:"
msgstr ""
-#: ../../c-api/module.rst:521
+#: ../../c-api/module.rst:539
msgid ""
"Add an object to *module* as *name*. This is a convenience function which "
"can be used from the module's initialization function."
msgstr ""
-#: ../../c-api/module.rst:524
+#: ../../c-api/module.rst:542
msgid ""
"On success, return ``0``. On error, raise an exception and return ``-1``."
msgstr ""
-#: ../../c-api/module.rst:526
-msgid ""
-"Return ``-1`` if *value* is ``NULL``. It must be called with an exception "
-"raised in this case."
-msgstr ""
-
-#: ../../c-api/module.rst:529 ../../c-api/module.rst:576
-#: ../../c-api/module.rst:603
+#: ../../c-api/module.rst:544 ../../c-api/module.rst:595
+#: ../../c-api/module.rst:622
msgid "Example usage::"
msgstr "用法範例: ::"
-#: ../../c-api/module.rst:531
+#: ../../c-api/module.rst:546
msgid ""
"static int\n"
"add_spam(PyObject *module, int value)\n"
@@ -621,13 +638,20 @@ msgstr ""
" return res;\n"
" }"
-#: ../../c-api/module.rst:543
+#: ../../c-api/module.rst:558
+msgid ""
+"To be convenient, the function accepts ``NULL`` *value* with an exception "
+"set. In this case, return ``-1`` and just leave the raised exception "
+"unchanged."
+msgstr ""
+
+#: ../../c-api/module.rst:562
msgid ""
"The example can also be written without checking explicitly if *obj* is "
"``NULL``::"
msgstr ""
-#: ../../c-api/module.rst:546
+#: ../../c-api/module.rst:565
msgid ""
"static int\n"
"add_spam(PyObject *module, int value)\n"
@@ -647,13 +671,13 @@ msgstr ""
" return res;\n"
" }"
-#: ../../c-api/module.rst:555
+#: ../../c-api/module.rst:574
msgid ""
"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this "
"case, since *obj* can be ``NULL``."
msgstr ""
-#: ../../c-api/module.rst:558
+#: ../../c-api/module.rst:577
msgid ""
"The number of different *name* strings passed to this function should be "
"kept small, usually by only using statically allocated strings as *name*. "
@@ -663,7 +687,7 @@ msgid ""
"internally to create a key object."
msgstr ""
-#: ../../c-api/module.rst:571
+#: ../../c-api/module.rst:590
msgid ""
"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to "
"*value*. It can be called with a result of function that returns a new "
@@ -671,39 +695,39 @@ msgid ""
"variable."
msgstr ""
-#: ../../c-api/module.rst:578
+#: ../../c-api/module.rst:597
msgid ""
"if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n"
" goto error;\n"
"}"
msgstr ""
-#: ../../c-api/module.rst:587
+#: ../../c-api/module.rst:606
msgid ""
"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to "
"*value* on success (if it returns ``0``)."
msgstr ""
-#: ../../c-api/module.rst:590
+#: ../../c-api/module.rst:609
msgid ""
"The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions "
"are recommended, since it is easy to introduce reference leaks by misusing "
"the :c:func:`PyModule_AddObject` function."
msgstr ""
-#: ../../c-api/module.rst:597
+#: ../../c-api/module.rst:616
msgid ""
"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
"releases the reference to *value* **on success**."
msgstr ""
-#: ../../c-api/module.rst:600
+#: ../../c-api/module.rst:619
msgid ""
"This means that its return value must be checked, and calling code must :c:"
"func:`Py_XDECREF` *value* manually on error."
msgstr ""
-#: ../../c-api/module.rst:605
+#: ../../c-api/module.rst:624
msgid ""
"PyObject *obj = PyBytes_FromString(value);\n"
"if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n"
@@ -717,24 +741,24 @@ msgid ""
"// Py_XDECREF(obj) is not needed here."
msgstr ""
-#: ../../c-api/module.rst:618
+#: ../../c-api/module.rst:637
msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`."
msgstr ""
-#: ../../c-api/module.rst:623
+#: ../../c-api/module.rst:642
msgid ""
"Add an integer constant to *module* as *name*. This convenience function "
"can be used from the module's initialization function. Return ``-1`` with an "
"exception set on error, ``0`` on success."
msgstr ""
-#: ../../c-api/module.rst:627
+#: ../../c-api/module.rst:646
msgid ""
"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:"
"func:`PyModule_AddObjectRef`; see their documentation for details."
msgstr ""
-#: ../../c-api/module.rst:633
+#: ../../c-api/module.rst:652
msgid ""
"Add a string constant to *module* as *name*. This convenience function can "
"be used from the module's initialization function. The string *value* must "
@@ -742,14 +766,14 @@ msgid ""
"on success."
msgstr ""
-#: ../../c-api/module.rst:638
+#: ../../c-api/module.rst:657
msgid ""
"This is a convenience function that calls :c:func:"
"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their "
"documentation for details."
msgstr ""
-#: ../../c-api/module.rst:645
+#: ../../c-api/module.rst:664
msgid ""
"Add an int constant to *module*. The name and the value are taken from "
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
@@ -757,11 +781,11 @@ msgid ""
"with an exception set on error, ``0`` on success."
msgstr ""
-#: ../../c-api/module.rst:653
+#: ../../c-api/module.rst:672
msgid "Add a string constant to *module*."
-msgstr ""
+msgstr "將字串常數加入到 *module* 中。"
-#: ../../c-api/module.rst:657
+#: ../../c-api/module.rst:676
msgid ""
"Add a type object to *module*. The type object is finalized by calling "
"internally :c:func:`PyType_Ready`. The name of the type object is taken from "
@@ -769,7 +793,7 @@ msgid ""
"``-1`` with an exception set on error, ``0`` on success."
msgstr ""
-#: ../../c-api/module.rst:667
+#: ../../c-api/module.rst:686
msgid ""
"Indicate that *module* does or does not support running without the global "
"interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. "
@@ -780,25 +804,25 @@ msgid ""
"Return ``-1`` with an exception set on error, ``0`` on success."
msgstr ""
-#: ../../c-api/module.rst:680
+#: ../../c-api/module.rst:699
msgid "Module lookup"
msgstr "模組查找"
-#: ../../c-api/module.rst:682
+#: ../../c-api/module.rst:701
msgid ""
"Single-phase initialization creates singleton modules that can be looked up "
"in the context of the current interpreter. This allows the module object to "
"be retrieved later with only a reference to the module definition."
msgstr ""
-#: ../../c-api/module.rst:686
+#: ../../c-api/module.rst:705
msgid ""
"These functions will not work on modules created using multi-phase "
"initialization, since multiple such modules can be created from a single "
"definition."
msgstr ""
-#: ../../c-api/module.rst:691
+#: ../../c-api/module.rst:710
msgid ""
"Returns the module object that was created from *def* for the current "
"interpreter. This method requires that the module object has been attached "
@@ -807,18 +831,18 @@ msgid ""
"to the interpreter state yet, it returns ``NULL``."
msgstr ""
-#: ../../c-api/module.rst:698
+#: ../../c-api/module.rst:717
msgid ""
"Attaches the module object passed to the function to the interpreter state. "
"This allows the module object to be accessible via :c:func:"
"`PyState_FindModule`."
msgstr ""
-#: ../../c-api/module.rst:701
+#: ../../c-api/module.rst:720
msgid "Only effective on modules created using single-phase initialization."
msgstr ""
-#: ../../c-api/module.rst:703
+#: ../../c-api/module.rst:722
msgid ""
"Python calls ``PyState_AddModule`` automatically after importing a module, "
"so it is unnecessary (but harmless) to call it from module initialization "
@@ -829,15 +853,15 @@ msgid ""
"state updates)."
msgstr ""
-#: ../../c-api/module.rst:711 ../../c-api/module.rst:722
+#: ../../c-api/module.rst:730 ../../c-api/module.rst:741
msgid "The caller must hold the GIL."
msgstr ""
-#: ../../c-api/module.rst:713
+#: ../../c-api/module.rst:732
msgid "Return ``-1`` with an exception set on error, ``0`` on success."
msgstr "成功時回傳 ``0``,在失敗時回傳 ``-1`` 並設定例外。"
-#: ../../c-api/module.rst:719
+#: ../../c-api/module.rst:738
msgid ""
"Removes the module object created from *def* from the interpreter state. "
"Return ``-1`` with an exception set on error, ``0`` on success."
diff --git a/c-api/monitoring.po b/c-api/monitoring.po
index ef4d13984c..ac7e58b853 100644
--- a/c-api/monitoring.po
+++ b/c-api/monitoring.po
@@ -1,17 +1,16 @@
-# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-24 07:20+0000\n"
+"POT-Creation-Date: 2025-03-20 00:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,11 +18,11 @@ msgstr ""
#: ../../c-api/monitoring.rst:6
msgid "Monitoring C API"
-msgstr ""
+msgstr "監控 C API"
#: ../../c-api/monitoring.rst:8
msgid "Added in version 3.13."
-msgstr ""
+msgstr "於 3.13 版本中新增。"
#: ../../c-api/monitoring.rst:10
msgid ""
@@ -76,43 +75,43 @@ msgstr ""
#: ../../c-api/monitoring.rst:41
msgid "See :mod:`sys.monitoring` for descriptions of the events."
-msgstr ""
+msgstr "關於事件的敘述請見 :mod:`sys.monitoring`。"
#: ../../c-api/monitoring.rst:45
msgid "Fire a ``PY_START`` event."
-msgstr ""
+msgstr "發出一個 ``PY_START`` 事件。"
#: ../../c-api/monitoring.rst:50
msgid "Fire a ``PY_RESUME`` event."
-msgstr ""
+msgstr "發出一個 ``PY_RESUME`` 事件。"
#: ../../c-api/monitoring.rst:55
msgid "Fire a ``PY_RETURN`` event."
-msgstr ""
+msgstr "發出一個 ``PY_RETURN`` 事件。"
#: ../../c-api/monitoring.rst:60
msgid "Fire a ``PY_YIELD`` event."
-msgstr ""
+msgstr "發出一個 ``PY_YIELD`` 事件。"
#: ../../c-api/monitoring.rst:65
msgid "Fire a ``CALL`` event."
-msgstr ""
+msgstr "發出一個 ``CALL`` 事件。"
#: ../../c-api/monitoring.rst:70
msgid "Fire a ``LINE`` event."
-msgstr ""
+msgstr "發出一個 ``LINE`` 事件。"
#: ../../c-api/monitoring.rst:75
msgid "Fire a ``JUMP`` event."
-msgstr ""
+msgstr "發出一個 ``JUMP`` 事件。"
#: ../../c-api/monitoring.rst:80
msgid "Fire a ``BRANCH`` event."
-msgstr ""
+msgstr "發出一個 ``BRANCH`` 事件。"
#: ../../c-api/monitoring.rst:85
msgid "Fire a ``C_RETURN`` event."
-msgstr ""
+msgstr "發出一個 ``C_RETURN`` 事件。"
#: ../../c-api/monitoring.rst:90
msgid ""
@@ -184,9 +183,9 @@ msgstr ""
msgid ""
"The ``version`` argument is a pointer to a value which should be allocated "
"by the user together with ``state_array`` and initialized to 0, and then set "
-"only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this function to "
-"determine whether event states have changed since the previous call, and to "
-"return quickly if they have not."
+"only by :c:func:`!PyMonitoring_EnterScope` itself. It allows this function "
+"to determine whether event states have changed since the previous call, and "
+"to return quickly if they have not."
msgstr ""
#: ../../c-api/monitoring.rst:154
@@ -201,7 +200,7 @@ msgstr ""
#: ../../c-api/monitoring.rst:161
msgid "The macros for *event_types* are:"
-msgstr ""
+msgstr "*event_types* 的巨集有:"
#: ../../c-api/monitoring.rst:169
msgid "Macro"
@@ -209,7 +208,7 @@ msgstr "巨集"
#: ../../c-api/monitoring.rst:169
msgid "Event"
-msgstr ""
+msgstr "事件"
#: ../../c-api/monitoring.rst:171
msgid ":monitoring-event:`BRANCH`"
@@ -283,3 +282,13 @@ msgstr ":monitoring-event:`STOP_ITERATION`"
msgid ""
"Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`."
msgstr ""
+
+#: ../../c-api/monitoring.rst:197
+msgid ""
+"Return true if the event corresponding to the event ID *ev* is a :ref:`local "
+"event `."
+msgstr ""
+
+#: ../../c-api/monitoring.rst:204
+msgid "This function is :term:`soft deprecated`."
+msgstr ""
diff --git a/c-api/none.po b/c-api/none.po
index eb714cd111..2a360b0167 100644
--- a/c-api/none.po
+++ b/c-api/none.po
@@ -38,9 +38,8 @@ msgid ""
msgstr ""
#: ../../c-api/none.rst:21
-#, fuzzy
msgid ":c:data:`Py_None` is :term:`immortal`."
-msgstr ":c:data:`Py_None` 為不滅的 (immortal)。"
+msgstr ":c:data:`Py_None` 為\\ :term:`不滅的 (immortal) `。"
#: ../../c-api/none.rst:26
msgid "Return :c:data:`Py_None` from a function."
diff --git a/c-api/object.po b/c-api/object.po
index d557e3d5c6..85e8adfd09 100644
--- a/c-api/object.po
+++ b/c-api/object.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-27 00:14+0000\n"
+"POT-Creation-Date: 2025-01-05 00:15+0000\n"
"PO-Revision-Date: 2018-05-23 14:32+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -28,23 +28,23 @@ msgstr ""
#: ../../c-api/object.rst:13
msgid "Set an exception and return ``NULL`` if *constant_id* is invalid."
-msgstr ""
+msgstr "如果 *constant_id* 無效,則設定一個例外並回傳 ``NULL``。"
#: ../../c-api/object.rst:15
msgid "*constant_id* must be one of these constant identifiers:"
-msgstr ""
+msgstr "*constant_id* 必須是這些常數識別字之一:"
#: ../../c-api/object.rst:20
msgid "Constant Identifier"
-msgstr ""
+msgstr "常數識別字"
#: ../../c-api/object.rst:20
msgid "Value"
-msgstr ""
+msgstr "數值"
#: ../../c-api/object.rst:20
msgid "Returned object"
-msgstr ""
+msgstr "回傳物件"
#: ../../c-api/object.rst:22 ../../c-api/object.rst:27
msgid "``0``"
@@ -126,7 +126,7 @@ msgstr ""
#: ../../c-api/object.rst:42
msgid "In CPython, all of these constants are :term:`immortal`."
-msgstr ""
+msgstr "在 CPython 中,所有這些常數都是\\ :term:`不滅 `\\ 的。"
#: ../../c-api/object.rst:47
msgid ""
@@ -135,8 +135,8 @@ msgstr ""
#: ../../c-api/object.rst:50
msgid ""
-"This function is primarily intended for backwards compatibility: using :c:"
-"func:`Py_GetConstant` is recommended for new code."
+"This function is primarily intended for backwards compatibility: "
+"using :c:func:`Py_GetConstant` is recommended for new code."
msgstr ""
#: ../../c-api/object.rst:53
@@ -154,15 +154,16 @@ msgstr ""
#: ../../c-api/object.rst:67
msgid ""
"Properly handle returning :c:data:`Py_NotImplemented` from within a C "
-"function (that is, create a new :term:`strong reference` to :const:"
-"`NotImplemented` and return it)."
+"function (that is, create a new :term:`strong reference` "
+"to :const:`NotImplemented` and return it)."
msgstr ""
#: ../../c-api/object.rst:74
msgid ""
-"Flag to be used with multiple functions that print the object (like :c:func:"
-"`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, these "
-"function would use the :func:`str` of the object instead of the :func:`repr`."
+"Flag to be used with multiple functions that print the object "
+"(like :c:func:`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, "
+"these function would use the :func:`str` of the object instead of "
+"the :func:`repr`."
msgstr ""
#: ../../c-api/object.rst:82
@@ -195,124 +196,128 @@ msgstr ""
#: ../../c-api/object.rst:113
msgid ""
-"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:"
-"`~object.__getattribute__` methods are silently ignored. For proper error "
-"handling, use :c:func:`PyObject_HasAttrWithError`, :c:func:"
-"`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead."
+"Exceptions that occur when this calls :meth:`~object.__getattr__` "
+"and :meth:`~object.__getattribute__` methods aren't propagated, but instead "
+"given to :func:`sys.unraisablehook`. For proper error handling, "
+"use :c:func:`PyObject_HasAttrWithError`, :c:func:`PyObject_GetOptionalAttr` "
+"or :c:func:`PyObject_GetAttr` instead."
msgstr ""
-#: ../../c-api/object.rst:121
+#: ../../c-api/object.rst:122
msgid ""
"This is the same as :c:func:`PyObject_HasAttr`, but *attr_name* is specified "
-"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
-#: ../../c-api/object.rst:127
+#: ../../c-api/object.rst:128
msgid ""
-"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:"
-"`~object.__getattribute__` methods or while creating the temporary :class:"
-"`str` object are silently ignored. For proper error handling, use :c:func:"
-"`PyObject_HasAttrStringWithError`, :c:func:`PyObject_GetOptionalAttrString` "
+"Exceptions that occur when this calls :meth:`~object.__getattr__` "
+"and :meth:`~object.__getattribute__` methods or while creating the "
+"temporary :class:`str` object are silently ignored. For proper error "
+"handling, "
+"use :c:func:`PyObject_HasAttrStringWithError`, :c:func:`PyObject_GetOptionalAttrString` "
"or :c:func:`PyObject_GetAttrString` instead."
msgstr ""
-#: ../../c-api/object.rst:137
+#: ../../c-api/object.rst:138
msgid ""
"Retrieve an attribute named *attr_name* from object *o*. Returns the "
"attribute value on success, or ``NULL`` on failure. This is the equivalent "
"of the Python expression ``o.attr_name``."
msgstr ""
-#: ../../c-api/object.rst:141
+#: ../../c-api/object.rst:142
msgid ""
-"If the missing attribute should not be treated as a failure, you can use :c:"
-"func:`PyObject_GetOptionalAttr` instead."
+"If the missing attribute should not be treated as a failure, you can "
+"use :c:func:`PyObject_GetOptionalAttr` instead."
msgstr ""
-#: ../../c-api/object.rst:147
+#: ../../c-api/object.rst:148
msgid ""
"This is the same as :c:func:`PyObject_GetAttr`, but *attr_name* is specified "
-"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
-#: ../../c-api/object.rst:151
+#: ../../c-api/object.rst:152
msgid ""
-"If the missing attribute should not be treated as a failure, you can use :c:"
-"func:`PyObject_GetOptionalAttrString` instead."
+"If the missing attribute should not be treated as a failure, you can "
+"use :c:func:`PyObject_GetOptionalAttrString` instead."
msgstr ""
-#: ../../c-api/object.rst:157
+#: ../../c-api/object.rst:158
msgid ""
-"Variant of :c:func:`PyObject_GetAttr` which doesn't raise :exc:"
-"`AttributeError` if the attribute is not found."
+"Variant of :c:func:`PyObject_GetAttr` which doesn't "
+"raise :exc:`AttributeError` if the attribute is not found."
msgstr ""
-#: ../../c-api/object.rst:160
+#: ../../c-api/object.rst:161
msgid ""
-"If the attribute is found, return ``1`` and set *\\*result* to a new :term:"
-"`strong reference` to the attribute. If the attribute is not found, return "
-"``0`` and set *\\*result* to ``NULL``; the :exc:`AttributeError` is "
-"silenced. If an error other than :exc:`AttributeError` is raised, return "
-"``-1`` and set *\\*result* to ``NULL``."
+"If the attribute is found, return ``1`` and set *\\*result* to a "
+"new :term:`strong reference` to the attribute. If the attribute is not "
+"found, return ``0`` and set *\\*result* to ``NULL``; "
+"the :exc:`AttributeError` is silenced. If an error other "
+"than :exc:`AttributeError` is raised, return ``-1`` and set *\\*result* to "
+"``NULL``."
msgstr ""
-#: ../../c-api/object.rst:172
+#: ../../c-api/object.rst:173
msgid ""
"This is the same as :c:func:`PyObject_GetOptionalAttr`, but *attr_name* is "
"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
"a :c:expr:`PyObject*`."
msgstr ""
-#: ../../c-api/object.rst:180
+#: ../../c-api/object.rst:181
msgid ""
"Generic attribute getter function that is meant to be put into a type "
"object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary "
-"of classes in the object's MRO as well as an attribute in the object's :attr:"
-"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data "
-"descriptors take preference over instance attributes, while non-data "
-"descriptors don't. Otherwise, an :exc:`AttributeError` is raised."
+"of classes in the object's MRO as well as an attribute in the "
+"object's :attr:`~object.__dict__` (if present). As outlined "
+"in :ref:`descriptors`, data descriptors take preference over instance "
+"attributes, while non-data descriptors don't. Otherwise, "
+"an :exc:`AttributeError` is raised."
msgstr ""
-#: ../../c-api/object.rst:190
+#: ../../c-api/object.rst:191
msgid ""
"Set the value of the attribute named *attr_name*, for object *o*, to the "
"value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on "
"success. This is the equivalent of the Python statement ``o.attr_name = v``."
msgstr ""
-#: ../../c-api/object.rst:195
+#: ../../c-api/object.rst:196
msgid ""
"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated "
"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no "
"plans to remove it."
msgstr ""
-#: ../../c-api/object.rst:202
+#: ../../c-api/object.rst:203
msgid ""
"This is the same as :c:func:`PyObject_SetAttr`, but *attr_name* is specified "
-"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
-#: ../../c-api/object.rst:206
+#: ../../c-api/object.rst:207
msgid ""
"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated "
"in favour of using :c:func:`PyObject_DelAttrString`."
msgstr ""
-#: ../../c-api/object.rst:209
+#: ../../c-api/object.rst:210
msgid ""
"The number of different attribute names passed to this function should be "
"kept small, usually by using a statically allocated string as *attr_name*. "
-"For attribute names that aren't known at compile time, prefer calling :c:"
-"func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` directly. For "
-"more details, see :c:func:`PyUnicode_InternFromString`, which may be used "
-"internally to create a key object."
+"For attribute names that aren't known at compile time, prefer "
+"calling :c:func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` "
+"directly. For more details, see :c:func:`PyUnicode_InternFromString`, which "
+"may be used internally to create a key object."
msgstr ""
-#: ../../c-api/object.rst:219
+#: ../../c-api/object.rst:220
msgid ""
"Generic attribute setter and deleter function that is meant to be put into a "
"type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a "
@@ -324,36 +329,36 @@ msgid ""
"returned."
msgstr ""
-#: ../../c-api/object.rst:231
+#: ../../c-api/object.rst:232
msgid ""
"Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on "
"failure. This is the equivalent of the Python statement ``del o.attr_name``."
msgstr ""
-#: ../../c-api/object.rst:237
+#: ../../c-api/object.rst:238
msgid ""
"This is the same as :c:func:`PyObject_DelAttr`, but *attr_name* is specified "
-"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
-"`PyObject*`."
+"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
msgstr ""
-#: ../../c-api/object.rst:241
+#: ../../c-api/object.rst:242
msgid ""
"The number of different attribute names passed to this function should be "
"kept small, usually by using a statically allocated string as *attr_name*. "
-"For attribute names that aren't known at compile time, prefer calling :c:"
-"func:`PyUnicode_FromString` and :c:func:`PyObject_DelAttr` directly. For "
-"more details, see :c:func:`PyUnicode_InternFromString`, which may be used "
-"internally to create a key object for lookup."
+"For attribute names that aren't known at compile time, prefer "
+"calling :c:func:`PyUnicode_FromString` and :c:func:`PyObject_DelAttr` "
+"directly. For more details, see :c:func:`PyUnicode_InternFromString`, which "
+"may be used internally to create a key object for lookup."
msgstr ""
-#: ../../c-api/object.rst:252
+#: ../../c-api/object.rst:253
msgid ""
"A generic implementation for the getter of a ``__dict__`` descriptor. It "
"creates the dictionary if necessary."
msgstr ""
-#: ../../c-api/object.rst:255
+#: ../../c-api/object.rst:256
msgid ""
"This function may also be called to get the :py:attr:`~object.__dict__` of "
"the object *o*. Pass ``NULL`` for *context* when calling it. Since this "
@@ -362,67 +367,67 @@ msgid ""
"the object."
msgstr ""
-#: ../../c-api/object.rst:261
+#: ../../c-api/object.rst:262
msgid "On failure, returns ``NULL`` with an exception set."
msgstr "在失敗時,會回傳 ``NULL`` 並設定例外。"
-#: ../../c-api/object.rst:268
+#: ../../c-api/object.rst:269
msgid ""
"A generic implementation for the setter of a ``__dict__`` descriptor. This "
"implementation does not allow the dictionary to be deleted."
msgstr ""
-#: ../../c-api/object.rst:276
+#: ../../c-api/object.rst:277
msgid ""
"Return a pointer to :py:attr:`~object.__dict__` of the object *obj*. If "
"there is no ``__dict__``, return ``NULL`` without setting an exception."
msgstr ""
-#: ../../c-api/object.rst:279
+#: ../../c-api/object.rst:280
msgid ""
"This function may need to allocate memory for the dictionary, so it may be "
"more efficient to call :c:func:`PyObject_GetAttr` when accessing an "
"attribute on the object."
msgstr ""
-#: ../../c-api/object.rst:286
+#: ../../c-api/object.rst:287
msgid ""
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
-"which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :"
-"c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to "
-"``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. This is the "
-"equivalent of the Python expression ``o1 op o2``, where ``op`` is the "
-"operator corresponding to *opid*. Returns the value of the comparison on "
-"success, or ``NULL`` on failure."
+"which must be one "
+"of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_GT`, "
+"or :c:macro:`Py_GE`, corresponding to ``<``, ``<=``, ``==``, ``!=``, ``>``, "
+"or ``>=`` respectively. This is the equivalent of the Python expression ``o1 "
+"op o2``, where ``op`` is the operator corresponding to *opid*. Returns the "
+"value of the comparison on success, or ``NULL`` on failure."
msgstr ""
-#: ../../c-api/object.rst:296
+#: ../../c-api/object.rst:297
msgid ""
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
"like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if "
"the result is false, ``1`` otherwise."
msgstr ""
-#: ../../c-api/object.rst:301
+#: ../../c-api/object.rst:302
msgid ""
"If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` "
"will always return ``1`` for :c:macro:`Py_EQ` and ``0`` for :c:macro:`Py_NE`."
msgstr ""
-#: ../../c-api/object.rst:306
+#: ../../c-api/object.rst:307
msgid ""
"Format *obj* using *format_spec*. This is equivalent to the Python "
"expression ``format(obj, format_spec)``."
msgstr ""
-#: ../../c-api/object.rst:309
+#: ../../c-api/object.rst:310
msgid ""
"*format_spec* may be ``NULL``. In this case the call is equivalent to "
"``format(obj)``. Returns the formatted string on success, ``NULL`` on "
"failure."
msgstr ""
-#: ../../c-api/object.rst:317
+#: ../../c-api/object.rst:318
msgid ""
"Compute a string representation of object *o*. Returns the string "
"representation on success, ``NULL`` on failure. This is the equivalent of "
@@ -430,22 +435,22 @@ msgid ""
"function."
msgstr ""
-#: ../../c-api/object.rst:321 ../../c-api/object.rst:345
+#: ../../c-api/object.rst:322 ../../c-api/object.rst:346
msgid ""
"This function now includes a debug assertion to help ensure that it does not "
"silently discard an active exception."
msgstr ""
-#: ../../c-api/object.rst:329
+#: ../../c-api/object.rst:330
msgid ""
"As :c:func:`PyObject_Repr`, compute a string representation of object *o*, "
-"but escape the non-ASCII characters in the string returned by :c:func:"
-"`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a "
-"string similar to that returned by :c:func:`PyObject_Repr` in Python 2. "
-"Called by the :func:`ascii` built-in function."
+"but escape the non-ASCII characters in the string returned "
+"by :c:func:`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This "
+"generates a string similar to that returned by :c:func:`PyObject_Repr` in "
+"Python 2. Called by the :func:`ascii` built-in function."
msgstr ""
-#: ../../c-api/object.rst:340
+#: ../../c-api/object.rst:341
msgid ""
"Compute a string representation of object *o*. Returns the string "
"representation on success, ``NULL`` on failure. This is the equivalent of "
@@ -453,7 +458,7 @@ msgid ""
"function and, therefore, by the :func:`print` function."
msgstr ""
-#: ../../c-api/object.rst:354
+#: ../../c-api/object.rst:355
msgid ""
"Compute a bytes representation of object *o*. ``NULL`` is returned on "
"failure and a bytes object on success. This is equivalent to the Python "
@@ -462,73 +467,73 @@ msgid ""
"bytes object."
msgstr ""
-#: ../../c-api/object.rst:363
+#: ../../c-api/object.rst:364
msgid ""
"Return ``1`` if the class *derived* is identical to or derived from the "
"class *cls*, otherwise return ``0``. In case of an error, return ``-1``."
msgstr ""
-#: ../../c-api/object.rst:366 ../../c-api/object.rst:385
+#: ../../c-api/object.rst:367 ../../c-api/object.rst:386
msgid ""
"If *cls* is a tuple, the check will be done against every entry in *cls*. "
"The result will be ``1`` when at least one of the checks returns ``1``, "
"otherwise it will be ``0``."
msgstr ""
-#: ../../c-api/object.rst:370
+#: ../../c-api/object.rst:371
msgid ""
"If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to "
"determine the subclass status as described in :pep:`3119`. Otherwise, "
-"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i."
-"e. contained in :attr:`cls.__mro__ `."
+"*derived* is a subclass of *cls* if it is a direct or indirect subclass, "
+"i.e. contained in :attr:`cls.__mro__ `."
msgstr ""
-#: ../../c-api/object.rst:375
+#: ../../c-api/object.rst:376
msgid ""
"Normally only class objects, i.e. instances of :class:`type` or a derived "
"class, are considered classes. However, objects can override this by having "
"a :attr:`~type.__bases__` attribute (which must be a tuple of base classes)."
msgstr ""
-#: ../../c-api/object.rst:382
+#: ../../c-api/object.rst:383
msgid ""
"Return ``1`` if *inst* is an instance of the class *cls* or a subclass of "
"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception."
msgstr ""
-#: ../../c-api/object.rst:389
+#: ../../c-api/object.rst:390
msgid ""
"If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to "
"determine the subclass status as described in :pep:`3119`. Otherwise, "
"*inst* is an instance of *cls* if its class is a subclass of *cls*."
msgstr ""
-#: ../../c-api/object.rst:393
+#: ../../c-api/object.rst:394
msgid ""
-"An instance *inst* can override what is considered its class by having a :"
-"attr:`~object.__class__` attribute."
+"An instance *inst* can override what is considered its class by having "
+"a :attr:`~object.__class__` attribute."
msgstr ""
-#: ../../c-api/object.rst:396
+#: ../../c-api/object.rst:397
msgid ""
"An object *cls* can override if it is considered a class, and what its base "
"classes are, by having a :attr:`~type.__bases__` attribute (which must be a "
"tuple of base classes)."
msgstr ""
-#: ../../c-api/object.rst:405
+#: ../../c-api/object.rst:406
msgid ""
"Compute and return the hash value of an object *o*. On failure, return "
"``-1``. This is the equivalent of the Python expression ``hash(o)``."
msgstr ""
-#: ../../c-api/object.rst:408
+#: ../../c-api/object.rst:409
msgid ""
"The return type is now Py_hash_t. This is a signed integer the same size "
"as :c:type:`Py_ssize_t`."
msgstr ""
-#: ../../c-api/object.rst:415
+#: ../../c-api/object.rst:416
msgid ""
"Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` "
"and return ``-1``. This function receives special treatment when stored in a "
@@ -536,21 +541,21 @@ msgid ""
"that it is not hashable."
msgstr ""
-#: ../../c-api/object.rst:423
+#: ../../c-api/object.rst:424
msgid ""
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
"otherwise. This is equivalent to the Python expression ``not not o``. On "
"failure, return ``-1``."
msgstr ""
-#: ../../c-api/object.rst:430
+#: ../../c-api/object.rst:431
msgid ""
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
"otherwise. This is equivalent to the Python expression ``not o``. On "
"failure, return ``-1``."
msgstr ""
-#: ../../c-api/object.rst:439
+#: ../../c-api/object.rst:440
msgid ""
"When *o* is non-``NULL``, returns a type object corresponding to the object "
"type of object *o*. On failure, raises :exc:`SystemError` and returns "
@@ -561,13 +566,13 @@ msgid ""
"when a new :term:`strong reference` is needed."
msgstr ""
-#: ../../c-api/object.rst:451
+#: ../../c-api/object.rst:452
msgid ""
"Return non-zero if the object *o* is of type *type* or a subtype of *type*, "
"and ``0`` otherwise. Both parameters must be non-``NULL``."
msgstr ""
-#: ../../c-api/object.rst:460
+#: ../../c-api/object.rst:461
msgid ""
"Return the length of object *o*. If the object *o* provides either the "
"sequence and mapping protocols, the sequence length is returned. On error, "
@@ -575,7 +580,7 @@ msgid ""
"``len(o)``."
msgstr ""
-#: ../../c-api/object.rst:467
+#: ../../c-api/object.rst:468
msgid ""
"Return an estimated length for the object *o*. First try to return its "
"actual length, then an estimate using :meth:`~object.__length_hint__`, and "
@@ -584,36 +589,43 @@ msgid ""
"defaultvalue)``."
msgstr ""
-#: ../../c-api/object.rst:477
+#: ../../c-api/object.rst:478
msgid ""
"Return element of *o* corresponding to the object *key* or ``NULL`` on "
"failure. This is the equivalent of the Python expression ``o[key]``."
msgstr ""
-#: ../../c-api/object.rst:483
+#: ../../c-api/object.rst:484
msgid ""
"Map the object *key* to the value *v*. Raise an exception and return ``-1`` "
"on failure; return ``0`` on success. This is the equivalent of the Python "
"statement ``o[key] = v``. This function *does not* steal a reference to *v*."
msgstr ""
-#: ../../c-api/object.rst:491
+#: ../../c-api/object.rst:492
msgid ""
"Remove the mapping for the object *key* from the object *o*. Return ``-1`` "
"on failure. This is equivalent to the Python statement ``del o[key]``."
msgstr ""
-#: ../../c-api/object.rst:497
+#: ../../c-api/object.rst:498
+msgid ""
+"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as "
+"a :c:expr:`const char*` UTF-8 encoded bytes string, rather than "
+"a :c:expr:`PyObject*`."
+msgstr ""
+
+#: ../../c-api/object.rst:505
msgid ""
"This is equivalent to the Python expression ``dir(o)``, returning a "
"(possibly empty) list of strings appropriate for the object argument, or "
"``NULL`` if there was an error. If the argument is ``NULL``, this is like "
"the Python ``dir()``, returning the names of the current locals; in this "
-"case, if no execution frame is active then ``NULL`` is returned but :c:func:"
-"`PyErr_Occurred` will return false."
+"case, if no execution frame is active then ``NULL`` is returned "
+"but :c:func:`PyErr_Occurred` will return false."
msgstr ""
-#: ../../c-api/object.rst:506
+#: ../../c-api/object.rst:514
msgid ""
"This is equivalent to the Python expression ``iter(o)``. It returns a new "
"iterator for the object argument, or the object itself if the object is "
@@ -621,113 +633,122 @@ msgid ""
"object cannot be iterated."
msgstr ""
-#: ../../c-api/object.rst:514
+#: ../../c-api/object.rst:522
msgid ""
-"This is the equivalent to the Python expression ``aiter(o)``. Takes an :"
-"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. "
-"This is typically a new iterator but if the argument is an :class:"
-"`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and returns "
-"``NULL`` if the object cannot be iterated."
+"This is equivalent to the Python ``__iter__(self): return self`` method. It "
+"is intended for :term:`iterator` types, to be used in "
+"the :c:member:`PyTypeObject.tp_iter` slot."
msgstr ""
-#: ../../c-api/object.rst:524
+#: ../../c-api/object.rst:528
+msgid ""
+"This is the equivalent to the Python expression ``aiter(o)``. Takes "
+"an :class:`AsyncIterable` object and returns an :class:`AsyncIterator` for "
+"it. This is typically a new iterator but if the argument is "
+"an :class:`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and "
+"returns ``NULL`` if the object cannot be iterated."
+msgstr ""
+
+#: ../../c-api/object.rst:538
msgid "Get a pointer to subclass-specific data reserved for *cls*."
msgstr ""
-#: ../../c-api/object.rst:526
+#: ../../c-api/object.rst:540
msgid ""
"The object *o* must be an instance of *cls*, and *cls* must have been "
"created using negative :c:member:`PyType_Spec.basicsize`. Python does not "
"check this."
msgstr ""
-#: ../../c-api/object.rst:530
+#: ../../c-api/object.rst:544
msgid "On error, set an exception and return ``NULL``."
-msgstr ""
+msgstr "錯誤時設定一個例外並回傳 ``NULL``。"
-#: ../../c-api/object.rst:536
+#: ../../c-api/object.rst:550
msgid ""
"Return the size of the instance memory space reserved for *cls*, i.e. the "
"size of the memory :c:func:`PyObject_GetTypeData` returns."
msgstr ""
-#: ../../c-api/object.rst:539
+#: ../../c-api/object.rst:553
msgid ""
"This may be larger than requested using :c:member:`-PyType_Spec.basicsize "
-"`; it is safe to use this larger size (e.g. with :c:"
-"func:`!memset`)."
+"`; it is safe to use this larger size (e.g. "
+"with :c:func:`!memset`)."
msgstr ""
-#: ../../c-api/object.rst:542
+#: ../../c-api/object.rst:556
msgid ""
-"The type *cls* **must** have been created using negative :c:member:"
-"`PyType_Spec.basicsize`. Python does not check this."
+"The type *cls* **must** have been created using "
+"negative :c:member:`PyType_Spec.basicsize`. Python does not check this."
msgstr ""
-#: ../../c-api/object.rst:546
+#: ../../c-api/object.rst:560
msgid "On error, set an exception and return a negative value."
-msgstr ""
+msgstr "錯誤時設定一個例外並回傳一個負值。"
-#: ../../c-api/object.rst:552
+#: ../../c-api/object.rst:566
msgid ""
-"Get a pointer to per-item data for a class with :c:macro:"
-"`Py_TPFLAGS_ITEMS_AT_END`."
+"Get a pointer to per-item data for a class "
+"with :c:macro:`Py_TPFLAGS_ITEMS_AT_END`."
msgstr ""
-#: ../../c-api/object.rst:555
+#: ../../c-api/object.rst:569
msgid ""
"On error, set an exception and return ``NULL``. :py:exc:`TypeError` is "
"raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set."
msgstr ""
+"錯誤時設定一個例外並回傳 ``NULL``。如果 *o* 沒有設"
+"定 :c:macro:`Py_TPFLAGS_ITEMS_AT_END`,則會引發 :py:exc:`TypeError`。"
-#: ../../c-api/object.rst:563
+#: ../../c-api/object.rst:577
msgid "Visit the managed dictionary of *obj*."
msgstr ""
-#: ../../c-api/object.rst:565 ../../c-api/object.rst:574
+#: ../../c-api/object.rst:579 ../../c-api/object.rst:588
msgid ""
"This function must only be called in a traverse function of the type which "
"has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set."
msgstr ""
-#: ../../c-api/object.rst:572
+#: ../../c-api/object.rst:586
msgid "Clear the managed dictionary of *obj*."
msgstr ""
-#: ../../c-api/object.rst:315 ../../c-api/object.rst:327
-#: ../../c-api/object.rst:352 ../../c-api/object.rst:403
-#: ../../c-api/object.rst:437 ../../c-api/object.rst:458
+#: ../../c-api/object.rst:316 ../../c-api/object.rst:328
+#: ../../c-api/object.rst:353 ../../c-api/object.rst:404
+#: ../../c-api/object.rst:438 ../../c-api/object.rst:459
msgid "built-in function"
msgstr "bulit-in function(內建函式)"
-#: ../../c-api/object.rst:315
+#: ../../c-api/object.rst:316
msgid "repr"
msgstr "repr"
-#: ../../c-api/object.rst:327
+#: ../../c-api/object.rst:328
msgid "ascii"
msgstr "ascii"
-#: ../../c-api/object.rst:335
+#: ../../c-api/object.rst:336
msgid "string"
msgstr "string(字串)"
-#: ../../c-api/object.rst:335
+#: ../../c-api/object.rst:336
msgid "PyObject_Str (C function)"
msgstr "PyObject_Str(C 函式)"
-#: ../../c-api/object.rst:352
+#: ../../c-api/object.rst:353
msgid "bytes"
msgstr "bytes(位元組)"
-#: ../../c-api/object.rst:403
+#: ../../c-api/object.rst:404
msgid "hash"
msgstr "hash(雜湊)"
-#: ../../c-api/object.rst:437
+#: ../../c-api/object.rst:438
msgid "type"
msgstr "type(型別)"
-#: ../../c-api/object.rst:458
+#: ../../c-api/object.rst:459
msgid "len"
msgstr "len"
diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po
index 6c8314aa43..09e683c2bb 100644
--- a/c-api/perfmaps.po
+++ b/c-api/perfmaps.po
@@ -75,7 +75,7 @@ msgid ""
"information about the cause of a failure."
msgstr ""
"建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
-"傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"
+"傳 ``-2``。檢查 ``errno`` 以取得更多造成失敗的資訊。"
#: ../../c-api/perfmaps.rst:35
msgid ""
diff --git a/c-api/refcounting.po b/c-api/refcounting.po
index d5cacea802..01ae7ce871 100644
--- a/c-api/refcounting.po
+++ b/c-api/refcounting.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-24 07:20+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2023-08-06 14:19+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -238,9 +238,9 @@ msgid ""
"object in a temporary variable, update the list data structure, and then "
"call :c:func:`Py_DECREF` for the temporary variable."
msgstr ""
-"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object."
+"釋放函式可以導致任意 Python 程式碼被叫用(例如,當釋放具有 :meth:`~object."
"__del__` 方法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但執行的程"
-"式碼可以自由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之"
+"式碼可以自由存取所有 Python 全域變數。這意味著在叫用 :c:func:`Py_DECREF` 之"
"前,可從全域變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程"
"式碼應將已刪除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數"
"呼叫 :c:func:`Py_DECREF`。"
@@ -331,11 +331,11 @@ msgstr "Py_SETREF(dst, src);"
#: ../../c-api/refcounting.rst:204
msgid ""
-"That arranges to set *dst* to *src* _before_ releasing the reference to the "
+"That arranges to set *dst* to *src* *before* releasing the reference to the "
"old value of *dst*, so that any code triggered as a side-effect of *dst* "
"getting torn down no longer believes *dst* points to a valid object."
msgstr ""
-"這會在釋放對 *dst* 舊值的參照\\ _之前_\\ 將 *dst* 設定為 *src*,使得因 *dst* "
+"這會在釋放對 *dst* 舊值的參照\\ *之前*\\ 將 *dst* 設定為 *src*,使得因 *dst* "
"被拆除而觸發的任何副作用 (side-effect) 之程式碼不會相信 *dst* 是指向一個有效"
"物件。"
diff --git a/c-api/sequence.po b/c-api/sequence.po
index edb70e4c6f..88d5a0d4fa 100644
--- a/c-api/sequence.po
+++ b/c-api/sequence.po
@@ -202,7 +202,7 @@ msgstr ""
#: ../../c-api/sequence.rst:21 ../../c-api/sequence.rst:123
msgid "built-in function"
-msgstr "built-in function(内建函式)"
+msgstr "built-in function(內建函式)"
#: ../../c-api/sequence.rst:21
msgid "len"
@@ -210,4 +210,4 @@ msgstr "len"
#: ../../c-api/sequence.rst:123
msgid "tuple"
-msgstr "tuple(元组)"
+msgstr "tuple(元組)"
diff --git a/c-api/slice.po b/c-api/slice.po
index a2b3dbc7a7..fbac58a43a 100644
--- a/c-api/slice.po
+++ b/c-api/slice.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-02-18 00:13+0000\n"
"PO-Revision-Date: 2018-05-23 14:07+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -88,8 +88,8 @@ msgstr "成功時回傳 ``0`` ,在失敗時回傳 ``-1`` 並設定例外。"
#: ../../c-api/slice.rst:60
msgid ""
"This function is considered not safe for resizable sequences. Its invocation "
-"should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:"
-"`PySlice_AdjustIndices` where ::"
+"should be replaced by a combination of :c:func:`PySlice_Unpack` "
+"and :c:func:`PySlice_AdjustIndices` where ::"
msgstr ""
#: ../../c-api/slice.rst:64
@@ -156,14 +156,20 @@ msgstr ""
#: ../../c-api/slice.rst:118
msgid "Ellipsis Object"
-msgstr ""
+msgstr "Ellipsis 物件"
#: ../../c-api/slice.rst:123
msgid ""
-"The Python ``Ellipsis`` object. This object has no methods. Like :c:data:"
-"`Py_None`, it is an :term:`immortal` singleton object."
+"The type of Python :const:`Ellipsis` object. Same "
+"as :class:`types.EllipsisType` in the Python layer."
+msgstr ""
+
+#: ../../c-api/slice.rst:129
+msgid ""
+"The Python ``Ellipsis`` object. This object has no methods. "
+"Like :c:data:`Py_None`, it is an :term:`immortal` singleton object."
msgstr ""
-#: ../../c-api/slice.rst:126
+#: ../../c-api/slice.rst:132
msgid ":c:data:`Py_Ellipsis` is immortal."
msgstr ":c:data:`Py_Ellipsis` 為不滅的 (immortal)。"
diff --git a/c-api/stable.po b/c-api/stable.po
index 919634426e..a69db51911 100644
--- a/c-api/stable.po
+++ b/c-api/stable.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-01-19 00:03+0000\n"
+"POT-Creation-Date: 2024-12-04 00:14+0000\n"
"PO-Revision-Date: 2023-01-24 21:07+0800\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,10 +37,10 @@ msgstr ""
#: ../../c-api/stable.rst:15
msgid ""
"CPython's Application Binary Interface (ABI) is forward- and backwards-"
-"compatible across a minor release (if these are compiled the same way; see :"
-"ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will "
-"work on 3.10.8 and vice versa, but will need to be compiled separately for "
-"3.9.x and 3.11.x."
+"compatible across a minor release (if these are compiled the same way; "
+"see :ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 "
+"will work on 3.10.8 and vice versa, but will need to be compiled separately "
+"for 3.9.x and 3.11.x."
msgstr ""
"CPython 的應用程式二進位介面 (Application Binary Interface, ABI) 在次要版本中"
"是向前和向後相容的(如果它們以相同的方式編譯;請參閱下面的\\ :ref:`stable-"
@@ -65,8 +65,8 @@ msgid ""
"releases. When :c:macro:`Py_LIMITED_API` is defined, only this subset is "
"exposed from ``Python.h``."
msgstr ""
-":ref:`受限 API `,在多個次要版本之間相容。當有定義 :c:macro:"
-"`Py_LIMITED_API` 時,只有這個子集會從 ``Python.h`` 公開。"
+":ref:`受限 API `,在多個次要版本之間相容。當有定"
+"義 :c:macro:`Py_LIMITED_API` 時,只有這個子集會從 ``Python.h`` 公開。"
#: ../../c-api/stable.rst:29
msgid "These are discussed in more detail below."
@@ -76,14 +76,14 @@ msgstr "下面將更詳細地討論這些內容。"
msgid ""
"Names prefixed by an underscore, such as ``_Py_InternalState``, are private "
"API that can change without notice even in patch releases. If you need to "
-"use this API, consider reaching out to `CPython developers `_ to discuss adding public API for your use "
-"case."
+"use this API, consider reaching out to `CPython developers `_ to discuss adding public API for "
+"your use case."
msgstr ""
"帶有底線前綴的名稱是私有 API (private API),像是 ``_Py_InternalState``,即使"
"在補丁版本 (patch release) 中也可能被更改,不會另行通知。如果你需要使用這個 "
-"API,可以聯繫 `CPython 開發者 `_ 並針對你的使用方法來討論是否新增公開的 API。"
+"API,可以聯繫 `CPython 開發者 `_ 並針對你的使用方法來討論是否新增公開的 API。"
#: ../../c-api/stable.rst:40
msgid "Unstable C API"
@@ -134,13 +134,13 @@ msgstr "受限 C API"
#: ../../c-api/stable.rst:67
msgid ""
"Python 3.2 introduced the *Limited API*, a subset of Python's C API. "
-"Extensions that only use the Limited API can be compiled once and work with "
-"multiple versions of Python. Contents of the Limited API are :ref:`listed "
+"Extensions that only use the Limited API can be compiled once and be loaded "
+"on multiple versions of Python. Contents of the Limited API are :ref:`listed "
"below `."
msgstr ""
"Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。"
-"僅使用受限 API 的擴充可以只編譯一次就使用於多個版本的 Python。受限 API 的內容"
-"\\ :ref:`列在下方 `。"
+"僅使用受限 API 的擴充可以只編譯一次就被載入於多個版本的 Python。受限 API 的內"
+"容\\ :ref:`列在下方 `。"
#: ../../c-api/stable.rst:74
msgid ""
@@ -153,13 +153,12 @@ msgstr ""
msgid ""
"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` "
"corresponding to the lowest Python version your extension supports. The "
-"extension will work without recompilation with all Python 3 releases from "
-"the specified one onward, and can use Limited API introduced up to that "
-"version."
+"extension will be ABI-compatible with all Python 3 releases from the "
+"specified one onward, and can use Limited API introduced up to that version."
msgstr ""
-"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:"
-"macro:`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 "
-"Python 3 版本一起使用,並且可以使用過去版本有引入的受限 API。"
+"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本"
+"的 :c:macro:`PY_VERSION_HEX` 值。該擴充與從指定版本開始的所有 Python 3 版本"
+"之 ABI 相容,並且可以使用過去版本有引入的受限 API。"
#: ../../c-api/stable.rst:83
msgid ""
@@ -186,12 +185,21 @@ msgstr "穩定 ABI"
#: ../../c-api/stable.rst:96
msgid ""
"To enable this, Python provides a *Stable ABI*: a set of symbols that will "
-"remain compatible across Python 3.x versions."
+"remain ABI-compatible across Python 3.x versions."
msgstr ""
"為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python "
-"3.x 版本之間保持相容的符號。"
+"3.x 版本之間保持 ABI 相容的符號。"
-#: ../../c-api/stable.rst:99
+#: ../../c-api/stable.rst:101
+msgid ""
+"The Stable ABI prevents ABI issues, like linker errors due to missing "
+"symbols or data corruption due to changes in structure layouts or function "
+"signatures. However, other changes in Python can change the *behavior* of "
+"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for "
+"details."
+msgstr ""
+
+#: ../../c-api/stable.rst:107
msgid ""
"The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support "
@@ -200,16 +208,16 @@ msgstr ""
"穩定 ABI 被包含在\\ :ref:`受限 API ` 中開放的符號,但也包含其"
"他符號 - 例如,支援舊版受限 API 所必需的函式。"
-#: ../../c-api/stable.rst:103
+#: ../../c-api/stable.rst:111
msgid ""
"On Windows, extensions that use the Stable ABI should be linked against "
-"``python3.dll`` rather than a version-specific library such as ``python39."
-"dll``."
+"``python3.dll`` rather than a version-specific library such as "
+"``python39.dll``."
msgstr ""
"在 Windows 上,使用穩定 ABI 的擴充應該連接到 ``python3.dll`` 而不是特定版本的"
"函式庫,例如 ``python39.dll``。"
-#: ../../c-api/stable.rst:107
+#: ../../c-api/stable.rst:115
msgid ""
"On some platforms, Python will look for and load shared library files named "
"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such "
@@ -222,7 +230,7 @@ msgstr ""
"用者(或者打包工具)身上,例如使用 3.10+ 受限 API 建置的擴充不會為較低版本的 "
"Python 所安裝。"
-#: ../../c-api/stable.rst:114
+#: ../../c-api/stable.rst:122
msgid ""
"All functions in the Stable ABI are present as functions in Python's shared "
"library, not solely as macros. This makes them usable from languages that "
@@ -231,28 +239,28 @@ msgstr ""
"穩定 ABI 中的所有函式都作為函式存在於 Python 的共享函式庫中,而不僅是作為巨"
"集。這使得它們可被用於不使用 C 預處理器 (preprocessor) 的語言。"
-#: ../../c-api/stable.rst:120
+#: ../../c-api/stable.rst:128
msgid "Limited API Scope and Performance"
msgstr "受限 API 範圍和性能"
-#: ../../c-api/stable.rst:122
+#: ../../c-api/stable.rst:130
msgid ""
"The goal for the Limited API is to allow everything that is possible with "
"the full C API, but possibly with a performance penalty."
msgstr ""
"受限 API 的目標是允許使用完整的 C API 進行所有可能的操作,但可能會降低性能。"
-#: ../../c-api/stable.rst:125
+#: ../../c-api/stable.rst:133
msgid ""
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro "
"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it "
"can rely on version-specific implementation details of the list object."
msgstr ""
-"例如,雖然 :c:func:`PyList_GetItem` 可用,但它的「不安全」巨集變體 :c:func:"
-"`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list 物件的特定"
-"版本實作細節。"
+"例如,雖然 :c:func:`PyList_GetItem` 可用,但它的「不安全」巨集變"
+"體 :c:func:`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list "
+"物件的特定版本實作細節。"
-#: ../../c-api/stable.rst:130
+#: ../../c-api/stable.rst:138
msgid ""
"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or "
"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, "
@@ -263,7 +271,7 @@ msgstr ""
"``Py_LIMITED_API`` 會禁用嵌入,從而隨著 Python 資料結構的改進而提高穩定性,但"
"可能會降低性能。"
-#: ../../c-api/stable.rst:135
+#: ../../c-api/stable.rst:143
msgid ""
"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile "
"a Limited API extension with a version-specific ABI. This can improve "
@@ -272,28 +280,29 @@ msgid ""
"where a version-specific one is not available – for example, for prereleases "
"of an upcoming Python version."
msgstr ""
-"通過省略 ``Py_LIMITED_API`` 定義,可以使用特定版本的 ABI 編譯受限 API 擴充。"
+"透過省略 ``Py_LIMITED_API`` 定義,可以使用特定版本的 ABI 編譯受限 API 擴充。"
"這可以提高該 Python 版本的性能,但會限制相容性。使用 ``Py_LIMITED_API`` 編譯"
"將產生一個擴充,可以在特定版本的擴充不可用的地方發布 — 例如,用於即將發布的 "
"Python 版本的預發布版本 (prerelease)。"
-#: ../../c-api/stable.rst:144
+#: ../../c-api/stable.rst:152
msgid "Limited API Caveats"
msgstr "受限 API 注意事項"
-#: ../../c-api/stable.rst:146
+#: ../../c-api/stable.rst:154
msgid ""
"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee "
-"that code conforms to the :ref:`Limited API ` or the :ref:"
-"`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but "
-"an API also includes other issues, such as expected semantics."
+"that code conforms to the :ref:`Limited API ` or "
+"the :ref:`Stable ABI `. ``Py_LIMITED_API`` only covers "
+"definitions, but an API also includes other issues, such as expected "
+"semantics."
msgstr ""
"請注意,使用 ``Py_LIMITED_API`` 進行編譯\\ *不*\\ 完全保證程式碼符合\\ :ref:`"
"受限 API ` 或\\ :ref:`穩定 ABI `。"
"``Py_LIMITED_API`` 僅涵蓋定義,但 API 還包括其他議題,例如預期的語義 "
"(semantic)。"
-#: ../../c-api/stable.rst:151
+#: ../../c-api/stable.rst:159
msgid ""
"One issue that ``Py_LIMITED_API`` does not guard against is calling a "
"function with arguments that are invalid in a lower Python version. For "
@@ -307,7 +316,7 @@ msgstr ""
"現在代表選擇預設行為,但在 Python 3.8 中,引數將被直接使用,導致 ``NULL`` 取"
"消參照 (dereference) 且崩潰 (crash)。類似的引數適用於結構 (struct) 的欄位。"
-#: ../../c-api/stable.rst:158
+#: ../../c-api/stable.rst:166
msgid ""
"Another issue is that some struct fields are currently not hidden when "
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
@@ -315,7 +324,7 @@ msgstr ""
"另一個問題是,當有定義 ``Py_LIMITED_API`` 時,一些結構欄位目前不會被隱藏,即"
"使它們是受限 API 的一部分。"
-#: ../../c-api/stable.rst:161
+#: ../../c-api/stable.rst:169
msgid ""
"For these reasons, we recommend testing an extension with *all* minor Python "
"versions it supports, and preferably to build with the *lowest* such version."
@@ -323,7 +332,7 @@ msgstr ""
"出於這些原因,我們建議要以它支援的\\ *所有*\\ 次要 Python 版本來測試擴充,並"
"且最好使用\\ *最低*\\ 版本進行建置。"
-#: ../../c-api/stable.rst:164
+#: ../../c-api/stable.rst:172
msgid ""
"We also recommend reviewing documentation of all used API to check if it is "
"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a "
@@ -334,7 +343,7 @@ msgstr ""
"義 ``Py_LIMITED_API``,一些私有聲明也會因為技術原因(或者甚至是無意地,例如臭"
"蟲)而被公開出來。"
-#: ../../c-api/stable.rst:169
+#: ../../c-api/stable.rst:177
msgid ""
"Also note that the Limited API is not necessarily stable: compiling with "
"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with "
@@ -346,22 +355,22 @@ msgstr ""
"行編譯意味著擴充將能以 Python 3.12 運行,但不一定能以 Python 3.12 *編譯*。特"
"別是如果穩定 ABI 保持穩定,部分受限 API 可能會被棄用和刪除。"
-#: ../../c-api/stable.rst:179
+#: ../../c-api/stable.rst:187
msgid "Platform Considerations"
msgstr "平台注意事項"
-#: ../../c-api/stable.rst:181
+#: ../../c-api/stable.rst:189
msgid ""
"ABI stability depends not only on Python, but also on the compiler used, "
-"lower-level libraries and compiler options. For the purposes of the :ref:"
-"`Stable ABI `, these details define a “platform”. They usually "
-"depend on the OS type and processor architecture"
+"lower-level libraries and compiler options. For the purposes of "
+"the :ref:`Stable ABI `, these details define a “platform”. They "
+"usually depend on the OS type and processor architecture"
msgstr ""
"ABI 穩定性不僅取決於 Python,還取決於使用的編譯器、低階函式庫和編譯器選項。出"
"於\\ :ref:`穩定 ABI ` 的目的,這些細節定義了一個「平台」。它們通"
"常取決於作業系統種類和處理器架構"
-#: ../../c-api/stable.rst:186
+#: ../../c-api/stable.rst:194
msgid ""
"It is the responsibility of each particular distributor of Python to ensure "
"that all Python versions on a particular platform are built in a way that "
@@ -372,11 +381,11 @@ msgstr ""
"定 ABI 的方式建置。``python.org`` 和許多第三方發布者發布的 Windows 和 macOS "
"版本就是這種情況。"
-#: ../../c-api/stable.rst:196
+#: ../../c-api/stable.rst:204
msgid "Contents of Limited API"
msgstr "受限 API 的內容"
-#: ../../c-api/stable.rst:199
+#: ../../c-api/stable.rst:207
msgid ""
"Currently, the :ref:`Limited API ` includes the following "
"items:"
diff --git a/c-api/structures.po b/c-api/structures.po
index 76d856ee90..eacbf76707 100644
--- a/c-api/structures.po
+++ b/c-api/structures.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-03-11 00:14+0000\n"
"PO-Revision-Date: 2018-05-23 14:07+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -57,11 +57,11 @@ msgstr ""
#: ../../c-api/structures.rst:38
msgid ""
-"This is an extension of :c:type:`PyObject` that adds the :c:member:"
-"`~PyVarObject.ob_size` field. This is only used for objects that have some "
-"notion of *length*. This type does not often appear in the Python/C API. "
-"Access to the members must be done by using the macros :c:macro:"
-"`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`."
+"This is an extension of :c:type:`PyObject` that adds "
+"the :c:member:`~PyVarObject.ob_size` field. This is only used for objects "
+"that have some notion of *length*. This type does not often appear in the "
+"Python/C API. Access to the members must be done by using the "
+"macros :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`."
msgstr ""
#: ../../c-api/structures.rst:47
@@ -95,80 +95,85 @@ msgstr "請見上面 :c:type:`PyVarObject` 的文件。"
#: ../../c-api/structures.rst:68
msgid ""
+"The base class of all other objects, the same as :class:`object` in Python."
+msgstr ""
+
+#: ../../c-api/structures.rst:73
+msgid ""
"Test if the *x* object is the *y* object, the same as ``x is y`` in Python."
msgstr ""
-#: ../../c-api/structures.rst:75
+#: ../../c-api/structures.rst:80
msgid ""
"Test if an object is the ``None`` singleton, the same as ``x is None`` in "
"Python."
msgstr ""
-#: ../../c-api/structures.rst:83
+#: ../../c-api/structures.rst:88
msgid ""
"Test if an object is the ``True`` singleton, the same as ``x is True`` in "
"Python."
msgstr ""
-#: ../../c-api/structures.rst:91
+#: ../../c-api/structures.rst:96
msgid ""
"Test if an object is the ``False`` singleton, the same as ``x is False`` in "
"Python."
msgstr ""
-#: ../../c-api/structures.rst:99
+#: ../../c-api/structures.rst:104
msgid "Get the type of the Python object *o*."
msgstr ""
-#: ../../c-api/structures.rst:101
+#: ../../c-api/structures.rst:106
msgid "Return a :term:`borrowed reference`."
msgstr ""
-#: ../../c-api/structures.rst:103
+#: ../../c-api/structures.rst:108
msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type."
msgstr ""
-#: ../../c-api/structures.rst:105
+#: ../../c-api/structures.rst:110
msgid ""
":c:func:`Py_TYPE()` is changed to an inline static function. The parameter "
"type is no longer :c:expr:`const PyObject*`."
msgstr ""
-#: ../../c-api/structures.rst:112
+#: ../../c-api/structures.rst:117
msgid ""
"Return non-zero if the object *o* type is *type*. Return zero otherwise. "
"Equivalent to: ``Py_TYPE(o) == type``."
msgstr ""
-#: ../../c-api/structures.rst:120
+#: ../../c-api/structures.rst:125
msgid "Set the object *o* type to *type*."
msgstr "將物件 *o* 的型別設為 *type*。"
-#: ../../c-api/structures.rst:127
+#: ../../c-api/structures.rst:132
msgid "Get the size of the Python object *o*."
msgstr "取得 Python 物件 *o* 的大小。"
-#: ../../c-api/structures.rst:129
+#: ../../c-api/structures.rst:134
msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size."
msgstr ""
-#: ../../c-api/structures.rst:131
+#: ../../c-api/structures.rst:136
msgid ""
":c:func:`Py_SIZE()` is changed to an inline static function. The parameter "
"type is no longer :c:expr:`const PyVarObject*`."
msgstr ""
-#: ../../c-api/structures.rst:138
+#: ../../c-api/structures.rst:143
msgid "Set the object *o* size to *size*."
msgstr "將物件 *o* 的大小設為 *size*。"
-#: ../../c-api/structures.rst:145
+#: ../../c-api/structures.rst:150
msgid ""
-"This is a macro which expands to initialization values for a new :c:type:"
-"`PyObject` type. This macro expands to::"
+"This is a macro which expands to initialization values for a "
+"new :c:type:`PyObject` type. This macro expands to::"
msgstr ""
-#: ../../c-api/structures.rst:148
+#: ../../c-api/structures.rst:153
msgid ""
"_PyObject_EXTRA_INIT\n"
"1, type,"
@@ -176,14 +181,14 @@ msgstr ""
"_PyObject_EXTRA_INIT\n"
"1, type,"
-#: ../../c-api/structures.rst:154
+#: ../../c-api/structures.rst:159
msgid ""
-"This is a macro which expands to initialization values for a new :c:type:"
-"`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. "
-"This macro expands to::"
+"This is a macro which expands to initialization values for a "
+"new :c:type:`PyVarObject` type, including "
+"the :c:member:`~PyVarObject.ob_size` field. This macro expands to::"
msgstr ""
-#: ../../c-api/structures.rst:158
+#: ../../c-api/structures.rst:163
msgid ""
"_PyObject_EXTRA_INIT\n"
"1, type, size,"
@@ -191,11 +196,11 @@ msgstr ""
"_PyObject_EXTRA_INIT\n"
"1, type, size,"
-#: ../../c-api/structures.rst:163
+#: ../../c-api/structures.rst:168
msgid "Implementing functions and methods"
msgstr "實作函式與方法"
-#: ../../c-api/structures.rst:167
+#: ../../c-api/structures.rst:172
msgid ""
"Type of the functions used to implement most Python callables in C. "
"Functions of this type take two :c:expr:`PyObject*` parameters and return "
@@ -205,11 +210,11 @@ msgid ""
"reference."
msgstr ""
-#: ../../c-api/structures.rst:174
+#: ../../c-api/structures.rst:179
msgid "The function signature is::"
msgstr ""
-#: ../../c-api/structures.rst:176
+#: ../../c-api/structures.rst:181
msgid ""
"PyObject *PyCFunction(PyObject *self,\n"
" PyObject *args);"
@@ -217,14 +222,14 @@ msgstr ""
"PyObject *PyCFunction(PyObject *self,\n"
" PyObject *args);"
-#: ../../c-api/structures.rst:181
+#: ../../c-api/structures.rst:186
msgid ""
"Type of the functions used to implement Python callables in C with "
"signature :ref:`METH_VARARGS | METH_KEYWORDS `. "
"The function signature is::"
msgstr ""
-#: ../../c-api/structures.rst:185
+#: ../../c-api/structures.rst:190
msgid ""
"PyObject *PyCFunctionWithKeywords(PyObject *self,\n"
" PyObject *args,\n"
@@ -234,51 +239,49 @@ msgstr ""
" PyObject *args,\n"
" PyObject *kwargs);"
-#: ../../c-api/structures.rst:192
+#: ../../c-api/structures.rst:197
msgid ""
"Type of the functions used to implement Python callables in C with "
"signature :c:macro:`METH_FASTCALL`. The function signature is::"
msgstr ""
-#: ../../c-api/structures.rst:196
-#, fuzzy
+#: ../../c-api/structures.rst:201
msgid ""
"PyObject *PyCFunctionFast(PyObject *self,\n"
" PyObject *const *args,\n"
" Py_ssize_t nargs);"
msgstr ""
-"PyObject *_PyCFunctionFast(PyObject *self,\n"
-" PyObject *const *args,\n"
-" Py_ssize_t nargs);"
+"PyObject *PyCFunctionFast(PyObject *self,\n"
+" PyObject *const *args,\n"
+" Py_ssize_t nargs);"
-#: ../../c-api/structures.rst:202
+#: ../../c-api/structures.rst:207
msgid ""
"Type of the functions used to implement Python callables in C with "
"signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::"
msgstr ""
-#: ../../c-api/structures.rst:206
-#, fuzzy
+#: ../../c-api/structures.rst:211
msgid ""
"PyObject *PyCFunctionFastWithKeywords(PyObject *self,\n"
" PyObject *const *args,\n"
" Py_ssize_t nargs,\n"
" PyObject *kwnames);"
msgstr ""
-"PyObject *_PyCFunctionFastWithKeywords(PyObject *self,\n"
-" PyObject *const *args,\n"
-" Py_ssize_t nargs,\n"
-" PyObject *kwnames);"
+"PyObject *PyCFunctionFastWithKeywords(PyObject *self,\n"
+" PyObject *const *args,\n"
+" Py_ssize_t nargs,\n"
+" PyObject *kwnames);"
-#: ../../c-api/structures.rst:213
+#: ../../c-api/structures.rst:218
msgid ""
"Type of the functions used to implement Python callables in C with "
"signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::"
msgstr ""
-#: ../../c-api/structures.rst:217
+#: ../../c-api/structures.rst:222
msgid ""
"PyObject *PyCMethod(PyObject *self,\n"
" PyTypeObject *defining_class,\n"
@@ -292,29 +295,29 @@ msgstr ""
" Py_ssize_t nargs,\n"
" PyObject *kwnames)"
-#: ../../c-api/structures.rst:228
+#: ../../c-api/structures.rst:233
msgid ""
"Structure used to describe a method of an extension type. This structure "
"has four fields:"
msgstr ""
-#: ../../c-api/structures.rst:233
+#: ../../c-api/structures.rst:238
msgid "Name of the method."
msgstr ""
-#: ../../c-api/structures.rst:237
+#: ../../c-api/structures.rst:242
msgid "Pointer to the C implementation."
msgstr ""
-#: ../../c-api/structures.rst:241
+#: ../../c-api/structures.rst:246
msgid "Flags bits indicating how the call should be constructed."
msgstr ""
-#: ../../c-api/structures.rst:245
+#: ../../c-api/structures.rst:250
msgid "Points to the contents of the docstring."
msgstr ""
-#: ../../c-api/structures.rst:247
+#: ../../c-api/structures.rst:252
msgid ""
"The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions "
"may be of different types, but they always return :c:expr:`PyObject*`. If "
@@ -324,41 +327,42 @@ msgid ""
"implementation uses the specific C type of the *self* object."
msgstr ""
-#: ../../c-api/structures.rst:255
+#: ../../c-api/structures.rst:260
msgid ""
"The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include "
"the following flags. The individual flags indicate either a calling "
"convention or a binding convention."
msgstr ""
-#: ../../c-api/structures.rst:260
+#: ../../c-api/structures.rst:265
msgid "There are these calling conventions:"
msgstr ""
-#: ../../c-api/structures.rst:264
+#: ../../c-api/structures.rst:269
msgid ""
-"This is the typical calling convention, where the methods have the type :c:"
-"type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The "
-"first one is the *self* object for methods; for module functions, it is the "
-"module object. The second parameter (often called *args*) is a tuple object "
-"representing all arguments. This parameter is typically processed using :c:"
-"func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`."
+"This is the typical calling convention, where the methods have the "
+"type :c:type:`PyCFunction`. The function expects two :c:expr:`PyObject*` "
+"values. The first one is the *self* object for methods; for module "
+"functions, it is the module object. The second parameter (often called "
+"*args*) is a tuple object representing all arguments. This parameter is "
+"typically processed using :c:func:`PyArg_ParseTuple` "
+"or :c:func:`PyArg_UnpackTuple`."
msgstr ""
-#: ../../c-api/structures.rst:274
+#: ../../c-api/structures.rst:279
msgid ""
-"Can only be used in certain combinations with other flags: :ref:"
-"`METH_VARARGS | METH_KEYWORDS `, :ref:"
-"`METH_FASTCALL | METH_KEYWORDS ` and :ref:"
-"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `."
+"Can only be used in certain combinations with other "
+"flags: :ref:`METH_VARARGS | METH_KEYWORDS `, :ref:`METH_FASTCALL | METH_KEYWORDS ` and :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS "
+"`."
msgstr ""
-#: ../../c-api/structures.rst:282
+#: ../../c-api/structures.rst:287
msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`"
msgstr ":c:expr:`METH_VARARGS | METH_KEYWORDS`"
-#: ../../c-api/structures.rst:283
+#: ../../c-api/structures.rst:288
msgid ""
"Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. "
"The function expects three parameters: *self*, *args*, *kwargs* where "
@@ -367,7 +371,7 @@ msgid ""
"using :c:func:`PyArg_ParseTupleAndKeywords`."
msgstr ""
-#: ../../c-api/structures.rst:292
+#: ../../c-api/structures.rst:297
msgid ""
"Fast calling convention supporting only positional arguments. The methods "
"have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the "
@@ -376,15 +380,15 @@ msgid ""
"the array)."
msgstr ""
-#: ../../c-api/structures.rst:302
+#: ../../c-api/structures.rst:307
msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `."
msgstr ""
-#: ../../c-api/structures.rst:307
+#: ../../c-api/structures.rst:312
msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`"
msgstr ":c:expr:`METH_FASTCALL | METH_KEYWORDS`"
-#: ../../c-api/structures.rst:308
+#: ../../c-api/structures.rst:313
msgid ""
"Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, "
"with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword "
@@ -396,17 +400,17 @@ msgid ""
"the positional arguments."
msgstr ""
-#: ../../c-api/structures.rst:323
+#: ../../c-api/structures.rst:328
msgid ""
"Can only be used in the combination with other flags: :ref:`METH_METHOD | "
"METH_FASTCALL | METH_KEYWORDS `."
msgstr ""
-#: ../../c-api/structures.rst:329
+#: ../../c-api/structures.rst:334
msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`"
msgstr ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`"
-#: ../../c-api/structures.rst:330
+#: ../../c-api/structures.rst:335
msgid ""
"Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that "
@@ -414,14 +418,14 @@ msgid ""
"``Py_TYPE(self)``."
msgstr ""
-#: ../../c-api/structures.rst:335
+#: ../../c-api/structures.rst:340
msgid ""
"The method needs to be of type :c:type:`PyCMethod`, the same as for "
"``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added "
"after ``self``."
msgstr ""
-#: ../../c-api/structures.rst:344
+#: ../../c-api/structures.rst:349
msgid ""
"Methods without parameters don't need to check whether arguments are given "
"if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of "
@@ -430,22 +434,22 @@ msgid ""
"the second parameter will be ``NULL``."
msgstr ""
-#: ../../c-api/structures.rst:350
+#: ../../c-api/structures.rst:355
msgid ""
-"The function must have 2 parameters. Since the second parameter is unused, :"
-"c:macro:`Py_UNUSED` can be used to prevent a compiler warning."
+"The function must have 2 parameters. Since the second parameter is "
+"unused, :c:macro:`Py_UNUSED` can be used to prevent a compiler warning."
msgstr ""
-#: ../../c-api/structures.rst:356
+#: ../../c-api/structures.rst:361
msgid ""
-"Methods with a single object argument can be listed with the :c:macro:"
-"`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a "
-"``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with the "
-"*self* parameter, and a :c:expr:`PyObject*` parameter representing the "
+"Methods with a single object argument can be listed with "
+"the :c:macro:`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` "
+"with a ``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with "
+"the *self* parameter, and a :c:expr:`PyObject*` parameter representing the "
"single argument."
msgstr ""
-#: ../../c-api/structures.rst:362
+#: ../../c-api/structures.rst:367
msgid ""
"These two constants are not used to indicate the calling convention but the "
"binding when use with methods of classes. These may not be used for "
@@ -453,53 +457,53 @@ msgid ""
"any given method."
msgstr ""
-#: ../../c-api/structures.rst:372
+#: ../../c-api/structures.rst:377
msgid ""
"The method will be passed the type object as the first parameter rather than "
"an instance of the type. This is used to create *class methods*, similar to "
"what is created when using the :func:`classmethod` built-in function."
msgstr ""
-#: ../../c-api/structures.rst:382
+#: ../../c-api/structures.rst:387
msgid ""
"The method will be passed ``NULL`` as the first parameter rather than an "
"instance of the type. This is used to create *static methods*, similar to "
"what is created when using the :func:`staticmethod` built-in function."
msgstr ""
-#: ../../c-api/structures.rst:386
+#: ../../c-api/structures.rst:391
msgid ""
"One other constant controls whether a method is loaded in place of another "
"definition with the same method name."
msgstr ""
-#: ../../c-api/structures.rst:392
+#: ../../c-api/structures.rst:397
msgid ""
"The method will be loaded in place of existing definitions. Without "
"*METH_COEXIST*, the default is to skip repeated definitions. Since slot "
"wrappers are loaded before the method table, the existence of a "
-"*sq_contains* slot, for example, would generate a wrapped method named :meth:"
-"`~object.__contains__` and preclude the loading of a corresponding "
-"PyCFunction with the same name. With the flag defined, the PyCFunction will "
-"be loaded in place of the wrapper object and will co-exist with the slot. "
-"This is helpful because calls to PyCFunctions are optimized more than "
-"wrapper object calls."
+"*sq_contains* slot, for example, would generate a wrapped method "
+"named :meth:`~object.__contains__` and preclude the loading of a "
+"corresponding PyCFunction with the same name. With the flag defined, the "
+"PyCFunction will be loaded in place of the wrapper object and will co-exist "
+"with the slot. This is helpful because calls to PyCFunctions are optimized "
+"more than wrapper object calls."
msgstr ""
-#: ../../c-api/structures.rst:404
+#: ../../c-api/structures.rst:409
msgid ""
"Turn *ml* into a Python :term:`callable` object. The caller must ensure that "
"*ml* outlives the :term:`callable`. Typically, *ml* is defined as a static "
"variable."
msgstr ""
-#: ../../c-api/structures.rst:408
+#: ../../c-api/structures.rst:413
msgid ""
"The *self* parameter will be passed as the *self* argument to the C function "
"in ``ml->ml_meth`` when invoked. *self* can be ``NULL``."
msgstr ""
-#: ../../c-api/structures.rst:412
+#: ../../c-api/structures.rst:417
msgid ""
"The :term:`callable` object's ``__module__`` attribute can be set from the "
"given *module* argument. *module* should be a Python string, which will be "
@@ -507,89 +511,89 @@ msgid ""
"can be set to :const:`None` or ``NULL``."
msgstr ""
-#: ../../c-api/structures.rst:418
+#: ../../c-api/structures.rst:423
msgid ":attr:`function.__module__`"
msgstr ":attr:`function.__module__`"
-#: ../../c-api/structures.rst:420
+#: ../../c-api/structures.rst:425
msgid ""
"The *cls* parameter will be passed as the *defining_class* argument to the C "
"function. Must be set if :c:macro:`METH_METHOD` is set on ``ml->ml_flags``."
msgstr ""
-#: ../../c-api/structures.rst:429
+#: ../../c-api/structures.rst:434
msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``."
msgstr "等價於 ``PyCMethod_New(ml, self, module, NULL)``。"
-#: ../../c-api/structures.rst:434
+#: ../../c-api/structures.rst:439
msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``."
msgstr "等價於 ``PyCMethod_New(ml, self, NULL, NULL)``。"
-#: ../../c-api/structures.rst:438
+#: ../../c-api/structures.rst:443
msgid "Accessing attributes of extension types"
msgstr ""
-#: ../../c-api/structures.rst:442
+#: ../../c-api/structures.rst:447
msgid ""
"Structure which describes an attribute of a type which corresponds to a C "
"struct member. When defining a class, put a NULL-terminated array of these "
"structures in the :c:member:`~PyTypeObject.tp_members` slot."
msgstr ""
-#: ../../c-api/structures.rst:447
+#: ../../c-api/structures.rst:452
msgid "Its fields are, in order:"
msgstr ""
-#: ../../c-api/structures.rst:451
+#: ../../c-api/structures.rst:456
msgid ""
"Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array."
msgstr ""
-#: ../../c-api/structures.rst:454
+#: ../../c-api/structures.rst:459
msgid "The string should be static, no copy is made of it."
msgstr ""
-#: ../../c-api/structures.rst:458
+#: ../../c-api/structures.rst:463
msgid ""
"The type of the member in the C struct. See :ref:`PyMemberDef-types` for the "
"possible values."
msgstr ""
-#: ../../c-api/structures.rst:463
+#: ../../c-api/structures.rst:468
msgid ""
"The offset in bytes that the member is located on the type’s object struct."
msgstr ""
-#: ../../c-api/structures.rst:467
+#: ../../c-api/structures.rst:472
msgid ""
"Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR."
msgstr ""
-#: ../../c-api/structures.rst:471
+#: ../../c-api/structures.rst:476
msgid ""
"The docstring, or NULL. The string should be static, no copy is made of it. "
"Typically, it is defined using :c:macro:`PyDoc_STR`."
msgstr ""
-#: ../../c-api/structures.rst:475
+#: ../../c-api/structures.rst:480
msgid ""
"By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow "
"both read and write access. Use the :c:macro:`Py_READONLY` flag for read-"
-"only access. Certain types, like :c:macro:`Py_T_STRING`, imply :c:macro:"
-"`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and legacy :c:macro:"
-"`T_OBJECT`) members can be deleted."
+"only access. Certain types, like :c:macro:`Py_T_STRING`, "
+"imply :c:macro:`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and "
+"legacy :c:macro:`T_OBJECT`) members can be deleted."
msgstr ""
-#: ../../c-api/structures.rst:484
+#: ../../c-api/structures.rst:489
msgid ""
"For heap-allocated types (created using :c:func:`PyType_FromSpec` or "
"similar), ``PyMemberDef`` may contain a definition for the special member "
-"``\"__vectorcalloffset__\"``, corresponding to :c:member:`~PyTypeObject."
-"tp_vectorcall_offset` in type objects. These must be defined with "
-"``Py_T_PYSSIZET`` and ``Py_READONLY``, for example::"
+"``\"__vectorcalloffset__\"``, corresponding "
+"to :c:member:`~PyTypeObject.tp_vectorcall_offset` in type objects. These "
+"must be defined with ``Py_T_PYSSIZET`` and ``Py_READONLY``, for example::"
msgstr ""
-#: ../../c-api/structures.rst:490
+#: ../../c-api/structures.rst:495
msgid ""
"static PyMemberDef spam_type_members[] = {\n"
" {\"__vectorcalloffset__\", Py_T_PYSSIZET,\n"
@@ -603,90 +607,92 @@ msgstr ""
" {NULL} /* Sentinel */\n"
"};"
-#: ../../c-api/structures.rst:496
+#: ../../c-api/structures.rst:501
msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)"
msgstr ""
-#: ../../c-api/structures.rst:498
+#: ../../c-api/structures.rst:503
msgid ""
-"The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:"
-"`~PyTypeObject.tp_weaklistoffset` can be defined similarly using "
-"``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but "
+"The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` "
+"and :c:member:`~PyTypeObject.tp_weaklistoffset` can be defined similarly "
+"using ``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but "
"extensions are strongly encouraged to use :c:macro:`Py_TPFLAGS_MANAGED_DICT` "
"and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead."
msgstr ""
-#: ../../c-api/structures.rst:506
+#: ../../c-api/structures.rst:511
msgid ""
"``PyMemberDef`` is always available. Previously, it required including "
"``\"structmember.h\"``."
msgstr ""
-#: ../../c-api/structures.rst:511
+#: ../../c-api/structures.rst:516
msgid ""
"Get an attribute belonging to the object at address *obj_addr*. The "
"attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error."
msgstr ""
-#: ../../c-api/structures.rst:517
+#: ../../c-api/structures.rst:522
msgid ""
"``PyMember_GetOne`` is always available. Previously, it required including "
"``\"structmember.h\"``."
msgstr ""
-#: ../../c-api/structures.rst:522
+#: ../../c-api/structures.rst:527
msgid ""
"Set an attribute belonging to the object at address *obj_addr* to object "
"*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns "
"``0`` if successful and a negative value on failure."
msgstr ""
-#: ../../c-api/structures.rst:528
+#: ../../c-api/structures.rst:533
msgid ""
"``PyMember_SetOne`` is always available. Previously, it required including "
"``\"structmember.h\"``."
msgstr ""
-#: ../../c-api/structures.rst:534
+#: ../../c-api/structures.rst:539
msgid "Member flags"
msgstr ""
-#: ../../c-api/structures.rst:536
+#: ../../c-api/structures.rst:541
msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:"
msgstr ""
-#: ../../c-api/structures.rst:540
+#: ../../c-api/structures.rst:545
msgid "Not writable."
msgstr "不可寫入。"
-#: ../../c-api/structures.rst:544
+#: ../../c-api/structures.rst:549
msgid ""
"Emit an ``object.__getattr__`` :ref:`audit event ` before "
"reading."
msgstr ""
-#: ../../c-api/structures.rst:549
+#: ../../c-api/structures.rst:554
msgid ""
"Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` "
"entry indicates an offset from the subclass-specific data, rather than from "
"``PyObject``."
msgstr ""
-#: ../../c-api/structures.rst:553
+#: ../../c-api/structures.rst:558
msgid ""
-"Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using "
-"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case."
+"Can only be used as part of :c:member:`Py_tp_members "
+"` :c:type:`slot ` when creating a "
+"class using negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in "
+"that case."
msgstr ""
-#: ../../c-api/structures.rst:558
+#: ../../c-api/structures.rst:563
msgid ""
-"This flag is only used in :c:type:`PyType_Slot`. When setting :c:member:"
-"`~PyTypeObject.tp_members` during class creation, Python clears it and sets :"
-"c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct."
+"This flag is only used in :c:type:`PyType_Slot`. When "
+"setting :c:member:`~PyTypeObject.tp_members` during class creation, Python "
+"clears it and sets :c:member:`PyMemberDef.offset` to the offset from the "
+"``PyObject`` struct."
msgstr ""
-#: ../../c-api/structures.rst:570
+#: ../../c-api/structures.rst:575
msgid ""
"The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!"
"WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are "
@@ -695,20 +701,20 @@ msgid ""
"nothing."
msgstr ""
-#: ../../c-api/structures.rst:581
+#: ../../c-api/structures.rst:586
msgid ""
-"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:"
-"macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new "
-"names are now always available. Previously, these required ``#include "
+"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. "
+"The :c:macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The "
+"new names are now always available. Previously, these required ``#include "
"\"structmember.h\"``. The header is still available and it provides the old "
"names."
msgstr ""
-#: ../../c-api/structures.rst:590
+#: ../../c-api/structures.rst:595
msgid "Member types"
msgstr ""
-#: ../../c-api/structures.rst:592
+#: ../../c-api/structures.rst:597
msgid ""
":c:member:`PyMemberDef.type` can be one of the following macros "
"corresponding to various C types. When the member is accessed in Python, it "
@@ -717,147 +723,147 @@ msgid ""
"exception such as :exc:`TypeError` or :exc:`ValueError` is raised."
msgstr ""
-#: ../../c-api/structures.rst:600
+#: ../../c-api/structures.rst:605
msgid ""
-"Unless marked (D), attributes defined this way cannot be deleted using e.g. :"
-"keyword:`del` or :py:func:`delattr`."
+"Unless marked (D), attributes defined this way cannot be deleted using "
+"e.g. :keyword:`del` or :py:func:`delattr`."
msgstr ""
-#: ../../c-api/structures.rst:604
+#: ../../c-api/structures.rst:609
msgid "Macro name"
msgstr "巨集名稱"
-#: ../../c-api/structures.rst:604
+#: ../../c-api/structures.rst:609
msgid "C type"
msgstr ""
-#: ../../c-api/structures.rst:604
+#: ../../c-api/structures.rst:609
msgid "Python type"
msgstr ""
-#: ../../c-api/structures.rst:606
+#: ../../c-api/structures.rst:611
msgid ":c:expr:`char`"
msgstr ":c:expr:`char`"
-#: ../../c-api/structures.rst:606 ../../c-api/structures.rst:607
-#: ../../c-api/structures.rst:608 ../../c-api/structures.rst:609
-#: ../../c-api/structures.rst:610 ../../c-api/structures.rst:611
-#: ../../c-api/structures.rst:612 ../../c-api/structures.rst:613
-#: ../../c-api/structures.rst:614 ../../c-api/structures.rst:615
-#: ../../c-api/structures.rst:616
+#: ../../c-api/structures.rst:611 ../../c-api/structures.rst:612
+#: ../../c-api/structures.rst:613 ../../c-api/structures.rst:614
+#: ../../c-api/structures.rst:615 ../../c-api/structures.rst:616
+#: ../../c-api/structures.rst:617 ../../c-api/structures.rst:618
+#: ../../c-api/structures.rst:619 ../../c-api/structures.rst:620
+#: ../../c-api/structures.rst:621
msgid ":py:class:`int`"
msgstr ":py:class:`int`"
-#: ../../c-api/structures.rst:607
+#: ../../c-api/structures.rst:612
msgid ":c:expr:`short`"
msgstr ":c:expr:`short`"
-#: ../../c-api/structures.rst:608
+#: ../../c-api/structures.rst:613
msgid ":c:expr:`int`"
msgstr ":c:expr:`int`"
-#: ../../c-api/structures.rst:609
+#: ../../c-api/structures.rst:614
msgid ":c:expr:`long`"
msgstr ":c:expr:`long`"
-#: ../../c-api/structures.rst:610
+#: ../../c-api/structures.rst:615
msgid ":c:expr:`long long`"
msgstr ":c:expr:`long long`"
-#: ../../c-api/structures.rst:611
+#: ../../c-api/structures.rst:616
msgid ":c:expr:`unsigned char`"
msgstr ":c:expr:`unsigned char`"
-#: ../../c-api/structures.rst:612
+#: ../../c-api/structures.rst:617
msgid ":c:expr:`unsigned int`"
msgstr ":c:expr:`unsigned int`"
-#: ../../c-api/structures.rst:613
+#: ../../c-api/structures.rst:618
msgid ":c:expr:`unsigned short`"
msgstr ":c:expr:`unsigned short`"
-#: ../../c-api/structures.rst:614
+#: ../../c-api/structures.rst:619
msgid ":c:expr:`unsigned long`"
msgstr ":c:expr:`unsigned long`"
-#: ../../c-api/structures.rst:615
+#: ../../c-api/structures.rst:620
msgid ":c:expr:`unsigned long long`"
msgstr ":c:expr:`unsigned long long`"
-#: ../../c-api/structures.rst:616
+#: ../../c-api/structures.rst:621
msgid ":c:expr:`Py_ssize_t`"
msgstr ":c:expr:`Py_ssize_t`"
-#: ../../c-api/structures.rst:617
+#: ../../c-api/structures.rst:622
msgid ":c:expr:`float`"
msgstr ":c:expr:`float`"
-#: ../../c-api/structures.rst:617 ../../c-api/structures.rst:618
+#: ../../c-api/structures.rst:622 ../../c-api/structures.rst:623
msgid ":py:class:`float`"
msgstr ":py:class:`float`"
-#: ../../c-api/structures.rst:618
+#: ../../c-api/structures.rst:623
msgid ":c:expr:`double`"
msgstr ":c:expr:`double`"
-#: ../../c-api/structures.rst:619
+#: ../../c-api/structures.rst:624
msgid ":c:expr:`char` (written as 0 or 1)"
msgstr ":c:expr:`char` (寫成 0 或 1)"
-#: ../../c-api/structures.rst:619
+#: ../../c-api/structures.rst:624
msgid ":py:class:`bool`"
msgstr ":py:class:`bool`"
-#: ../../c-api/structures.rst:621
+#: ../../c-api/structures.rst:626
msgid ":c:expr:`const char *` (*)"
msgstr ":c:expr:`const char *` (*)"
-#: ../../c-api/structures.rst:621 ../../c-api/structures.rst:622
+#: ../../c-api/structures.rst:626 ../../c-api/structures.rst:627
msgid ":py:class:`str` (RO)"
msgstr ":py:class:`str` (RO)"
-#: ../../c-api/structures.rst:622
+#: ../../c-api/structures.rst:627
msgid ":c:expr:`const char[]` (*)"
msgstr ":c:expr:`const char[]` (*)"
-#: ../../c-api/structures.rst:623
+#: ../../c-api/structures.rst:628
msgid ":c:expr:`char` (0-127)"
msgstr ":c:expr:`char` (0-127)"
-#: ../../c-api/structures.rst:623
+#: ../../c-api/structures.rst:628
msgid ":py:class:`str` (**)"
msgstr ":py:class:`str` (**)"
-#: ../../c-api/structures.rst:624
+#: ../../c-api/structures.rst:629
msgid ":c:expr:`PyObject *`"
msgstr ":c:expr:`PyObject *`"
-#: ../../c-api/structures.rst:624
+#: ../../c-api/structures.rst:629
msgid ":py:class:`object` (D)"
msgstr ":py:class:`object` (D)"
-#: ../../c-api/structures.rst:627
+#: ../../c-api/structures.rst:632
msgid ""
"(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` "
"the C representation is a pointer; with :c:macro:`!Py_T_STRING_INPLACE` the "
"string is stored directly in the structure."
msgstr ""
-#: ../../c-api/structures.rst:632
+#: ../../c-api/structures.rst:637
msgid "(**): String of length 1. Only ASCII is accepted."
msgstr ""
-#: ../../c-api/structures.rst:634
+#: ../../c-api/structures.rst:639
msgid "(RO): Implies :c:macro:`Py_READONLY`."
msgstr ""
-#: ../../c-api/structures.rst:636
+#: ../../c-api/structures.rst:641
msgid ""
"(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a "
"``NULL`` pointer raises :py:exc:`AttributeError`."
msgstr ""
-#: ../../c-api/structures.rst:662
+#: ../../c-api/structures.rst:667
msgid ""
"In previous versions, the macros were only available with ``#include "
"\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as "
@@ -865,174 +871,174 @@ msgid ""
"with the following deprecated types:"
msgstr ""
-#: ../../c-api/structures.rst:670
+#: ../../c-api/structures.rst:675
msgid ""
"Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results "
"in surprising behavior in Python: deleting the attribute effectively sets it "
"to ``None``."
msgstr ""
-#: ../../c-api/structures.rst:676
+#: ../../c-api/structures.rst:681
msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`."
msgstr ""
-#: ../../c-api/structures.rst:679
+#: ../../c-api/structures.rst:684
msgid "Defining Getters and Setters"
msgstr ""
-#: ../../c-api/structures.rst:683
+#: ../../c-api/structures.rst:688
msgid ""
"Structure to define property-like access for a type. See also description of "
"the :c:member:`PyTypeObject.tp_getset` slot."
msgstr ""
-#: ../../c-api/structures.rst:688
+#: ../../c-api/structures.rst:693
msgid "attribute name"
msgstr "屬性名稱"
-#: ../../c-api/structures.rst:692
+#: ../../c-api/structures.rst:697
msgid "C function to get the attribute."
msgstr ""
-#: ../../c-api/structures.rst:696
+#: ../../c-api/structures.rst:701
msgid ""
"Optional C function to set or delete the attribute. If ``NULL``, the "
"attribute is read-only."
msgstr ""
-#: ../../c-api/structures.rst:701
+#: ../../c-api/structures.rst:706
msgid "optional docstring"
msgstr "可選的文件字串"
-#: ../../c-api/structures.rst:705
+#: ../../c-api/structures.rst:710
msgid ""
"Optional user data pointer, providing additional data for getter and setter."
msgstr ""
-#: ../../c-api/structures.rst:709
+#: ../../c-api/structures.rst:714
msgid ""
"The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) "
"and a user data pointer (the associated ``closure``):"
msgstr ""
-#: ../../c-api/structures.rst:712
+#: ../../c-api/structures.rst:717
msgid ""
"It should return a new reference on success or ``NULL`` with a set exception "
"on failure."
msgstr ""
-#: ../../c-api/structures.rst:717
+#: ../../c-api/structures.rst:722
msgid ""
"``set`` functions take two :c:expr:`PyObject*` parameters (the instance and "
"the value to be set) and a user data pointer (the associated ``closure``):"
msgstr ""
-#: ../../c-api/structures.rst:720
+#: ../../c-api/structures.rst:725
msgid ""
"In case the attribute should be deleted the second parameter is ``NULL``. "
"Should return ``0`` on success or ``-1`` with a set exception on failure."
msgstr ""
-#: ../../c-api/structures.rst:370 ../../c-api/structures.rst:380
+#: ../../c-api/structures.rst:375 ../../c-api/structures.rst:385
msgid "built-in function"
msgstr "built-in function(內建函式)"
-#: ../../c-api/structures.rst:370
+#: ../../c-api/structures.rst:375
msgid "classmethod"
msgstr "classmethod"
-#: ../../c-api/structures.rst:380
+#: ../../c-api/structures.rst:385
msgid "staticmethod"
msgstr "staticmethod"
-#: ../../c-api/structures.rst:563
+#: ../../c-api/structures.rst:568
msgid "READ_RESTRICTED (C macro)"
msgstr "READ_RESTRICTED(C 巨集)"
-#: ../../c-api/structures.rst:563
+#: ../../c-api/structures.rst:568
msgid "WRITE_RESTRICTED (C macro)"
msgstr "WRITE_RESTRICTED(C 巨集)"
-#: ../../c-api/structures.rst:563
+#: ../../c-api/structures.rst:568
msgid "RESTRICTED (C macro)"
msgstr "RESTRICTED(C 巨集)"
-#: ../../c-api/structures.rst:576
+#: ../../c-api/structures.rst:581
msgid "READONLY (C macro)"
msgstr "READONLY(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_BYTE (C macro)"
msgstr "T_BYTE(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_SHORT (C macro)"
msgstr "T_SHORT(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_INT (C macro)"
msgstr "T_INT(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_LONG (C macro)"
msgstr "T_LONG(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_LONGLONG (C macro)"
msgstr "T_LONGLONG(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_UBYTE (C macro)"
msgstr "T_UBYTE(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_USHORT (C macro)"
msgstr "T_USHORT(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_UINT (C macro)"
msgstr "T_UINT(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_ULONG (C macro)"
msgstr "T_ULONG(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_ULONGULONG (C macro)"
msgstr "T_ULONGULONG(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_PYSSIZET (C macro)"
msgstr "T_PYSSIZET(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_FLOAT (C macro)"
msgstr "T_FLOAT(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_DOUBLE (C macro)"
msgstr "T_DOUBLE(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_BOOL (C macro)"
msgstr "T_BOOL(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_CHAR (C macro)"
msgstr "T_CHAR(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_STRING (C macro)"
msgstr "T_STRING(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_STRING_INPLACE (C macro)"
msgstr "T_STRING_INPLACE(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "T_OBJECT_EX (C macro)"
msgstr "T_OBJECT_EX(C 巨集)"
-#: ../../c-api/structures.rst:639
+#: ../../c-api/structures.rst:644
msgid "structmember.h"
msgstr "structmember.h"
diff --git a/c-api/sys.po b/c-api/sys.po
index 5fa011518f..79a6fb3f3f 100644
--- a/c-api/sys.po
+++ b/c-api/sys.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2024-12-12 00:15+0000\n"
"PO-Revision-Date: 2018-05-23 14:07+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -371,7 +371,7 @@ msgstr ""
#: ../../c-api/sys.rst:314
msgid "See also :c:func:`PySys_AuditTuple`."
-msgstr ""
+msgstr "請參閱 :c:func:`PySys_AuditTuple`。"
#: ../../c-api/sys.rst:320
msgid ""
@@ -486,6 +486,10 @@ msgid ""
"should be called by *func*."
msgstr ""
+#: ../../c-api/sys.rst:432
+msgid ":c:func:`PyUnstable_AtExit` for passing a ``void *data`` argument."
+msgstr ""
+
#: ../../c-api/sys.rst:101
msgid "USE_STACKCHECK (C macro)"
msgstr "USE_STACKCHECK(C 巨集)"
diff --git a/c-api/time.po b/c-api/time.po
index 7636335954..401edfe389 100644
--- a/c-api/time.po
+++ b/c-api/time.po
@@ -1,17 +1,17 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2024, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
-#, fuzzy
+# Translators:
+# Matt Wang , 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-24 07:20+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"PO-Revision-Date: 2025-05-25 04:26+0800\n"
+"Last-Translator: Matt Wang \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,34 +19,37 @@ msgstr ""
#: ../../c-api/time.rst:6
msgid "PyTime C API"
-msgstr ""
+msgstr "PyTime C API"
#: ../../c-api/time.rst:10
msgid ""
"The clock C API provides access to system clocks. It is similar to the "
"Python :mod:`time` module."
-msgstr ""
+msgstr "時鐘 C API 提供對系統時鐘的存取。它類似於 Python 的 :mod:`time` 模組。"
#: ../../c-api/time.rst:13
msgid ""
"For C API related to the :mod:`datetime` module, see :ref:`datetimeobjects`."
msgstr ""
+"對於與 :mod:`datetime` 模組相關的 C API,請參閱 :ref:`datetimeobjects`。"
#: ../../c-api/time.rst:17
msgid "Types"
-msgstr ""
+msgstr "型別"
#: ../../c-api/time.rst:21
msgid ""
"A timestamp or duration in nanoseconds, represented as a signed 64-bit "
"integer."
-msgstr ""
+msgstr "以奈秒為單位的時間戳記或持續時長,以有符號的 64 位元整數表示。"
#: ../../c-api/time.rst:24
msgid ""
-"The reference point for timestamps depends on the clock used. For example, :"
-"c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch."
+"The reference point for timestamps depends on the clock used. For "
+"example, :c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch."
msgstr ""
+"時間戳記的參照點取決於所使用的時鐘。例如 :c:func:`PyTime_Time` 回傳相對於 "
+"UNIX 紀元 (UNIX epoch) 的時間戳記。"
#: ../../c-api/time.rst:27
msgid ""
@@ -54,18 +57,21 @@ msgid ""
"epoch (January 1st, 1970) as reference, the supported date range is around "
"[1677-09-21; 2262-04-11]. The exact limits are exposed as constants:"
msgstr ""
+"支援的範圍約為 [-292.3 年;+292.3 年]。以 Unix 紀元 (1970 年 1 月 1 日) 為參"
+"照,支援的日期範圍約為 [1677-09-21; 2262-04-11]。確切的限制是以常數的形式公開"
+"出來:"
#: ../../c-api/time.rst:34
msgid "Minimum value of :c:type:`PyTime_t`."
-msgstr ""
+msgstr ":c:type:`PyTime_t` 的最小值。"
#: ../../c-api/time.rst:38
msgid "Maximum value of :c:type:`PyTime_t`."
-msgstr ""
+msgstr ":c:type:`PyTime_t` 的最大值。"
#: ../../c-api/time.rst:42
msgid "Clock Functions"
-msgstr ""
+msgstr "時鐘函式"
#: ../../c-api/time.rst:44
msgid ""
@@ -73,12 +79,14 @@ msgid ""
"to the value of a particular clock. Details of each clock are given in the "
"documentation of the corresponding Python function."
msgstr ""
+"以下的函式接受一個指向 :c:expr:`PyTime_t` 的指標,並將其設定為特定時鐘的值。"
+"每個時鐘的詳細資訊紀錄在相對應的 Python 函式說明文件中。"
#: ../../c-api/time.rst:49
msgid ""
"The functions return ``0`` on success, or ``-1`` (with an exception set) on "
"failure."
-msgstr ""
+msgstr "函式成功時會回傳 ``0`` 或在失敗時回傳 ``-1``\\ (並設定一個例外)。"
#: ../../c-api/time.rst:52
msgid ""
@@ -87,44 +95,51 @@ msgid ""
"range. (On current systems, integer overflows are likely caused by "
"misconfigured system time.)"
msgstr ""
+"在整數溢位時,它們會設定 :c:data:`PyExc_OverflowError` 例外,並將 "
+"``*result`` 設定為夾在 ``[PyTime_MIN; PyTime_MAX]`` 範圍內的值。(在目前的系"
+"統上,整數溢位很可能是由於錯誤設定的系統時間所造成。)"
#: ../../c-api/time.rst:58
msgid ""
"As any other C API (unless otherwise specified), the functions must be "
"called with the :term:`GIL` held."
msgstr ""
+"如同任何其他 C API(除非另有指定),必須在持有 :term:`GIL` 的情況下呼叫函式。"
#: ../../c-api/time.rst:63
msgid ""
"Read the monotonic clock. See :func:`time.monotonic` for important details "
"on this clock."
-msgstr ""
+msgstr "讀取單調時鐘。請參閱 :func:`time.monotonic` 取得此時鐘的重要詳細資訊。"
#: ../../c-api/time.rst:68
msgid ""
"Read the performance counter. See :func:`time.perf_counter` for important "
"details on this clock."
msgstr ""
+"讀取效能計數器。請參閱 :func:`time.perf_counter` 以取得此時鐘的重要詳細資訊。"
#: ../../c-api/time.rst:73
msgid ""
"Read the “wall clock” time. See :func:`time.time` for details important on "
"this clock."
msgstr ""
+"讀取「牆上時鐘 (wall clock)」的時間。請參閱 :func:`time.time` 以取得詳細資"
+"訊。"
#: ../../c-api/time.rst:78
msgid "Raw Clock Functions"
-msgstr ""
+msgstr "原始時鐘函式"
#: ../../c-api/time.rst:80
msgid ""
"Similar to clock functions, but don't set an exception on error and don't "
"require the caller to hold the GIL."
-msgstr ""
+msgstr "類似於時鐘函式,但不會在出錯時設定例外,也不需要讓呼叫者持有 GIL。"
#: ../../c-api/time.rst:83
msgid "On success, the functions return ``0``."
-msgstr ""
+msgstr "成功時函式會回傳 ``0``。"
#: ../../c-api/time.rst:85
msgid ""
@@ -133,35 +148,42 @@ msgid ""
"call the regular (non-``Raw``) function. Note that the regular function may "
"succeed after the ``Raw`` one failed."
msgstr ""
+"失敗時,它們會將 ``*result`` 設為 ``0`` 並回傳 ``-1``, 而\\ *不*\\ 設定例外。"
+"要取得錯誤原因,請取得 GIL 並呼叫常規(非 ``Raw``)函式。請注意,常規函式可能"
+"會在 ``Raw`` 的函式失敗後成功。"
#: ../../c-api/time.rst:92
msgid ""
"Similar to :c:func:`PyTime_Monotonic`, but don't set an exception on error "
"and don't require holding the GIL."
msgstr ""
+"類似於 :c:func:`PyTime_Monotonic`,但不會在出錯時設定例外,也不需要持有 GIL。"
#: ../../c-api/time.rst:97
msgid ""
"Similar to :c:func:`PyTime_PerfCounter`, but don't set an exception on error "
"and don't require holding the GIL."
msgstr ""
+"類似於 :c:func:`PyTime_PerfCounter`,但不會在出錯時設定例外,也不需要持有 "
+"GIL。"
#: ../../c-api/time.rst:102
msgid ""
"Similar to :c:func:`PyTime_Time`, but don't set an exception on error and "
"don't require holding the GIL."
msgstr ""
+"類似於 :c:func:`PyTime_Time`,但不會在出錯時設定例外,也不需要持有 GIL。"
#: ../../c-api/time.rst:107
msgid "Conversion functions"
-msgstr ""
+msgstr "轉換函式"
#: ../../c-api/time.rst:111
msgid "Convert a timestamp to a number of seconds as a C :c:expr:`double`."
-msgstr ""
+msgstr "將時間戳記轉換為 C :c:expr:`double` 的秒數。"
#: ../../c-api/time.rst:113
msgid ""
"The function cannot fail, but note that :c:expr:`double` has limited "
"accuracy for large values."
-msgstr ""
+msgstr "此函式不會失敗,但請注意 :c:expr:`double` 對於大數值的精確度有限。"
diff --git a/c-api/tuple.po b/c-api/tuple.po
index 0392e13819..d70d49e967 100644
--- a/c-api/tuple.po
+++ b/c-api/tuple.po
@@ -72,16 +72,16 @@ msgstr ""
#: ../../c-api/tuple.rst:61
msgid ""
"Return the object at position *pos* in the tuple pointed to by *p*. If "
-"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:"
-"`IndexError` exception."
+"*pos* is negative or out of bounds, return ``NULL`` and set "
+"an :exc:`IndexError` exception."
msgstr ""
#: ../../c-api/tuple.rst:64
msgid ""
"The returned reference is borrowed from the tuple *p* (that is: it is only "
"valid as long as you hold a reference to *p*). To get a :term:`strong "
-"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` or :c:"
-"func:`PySequence_GetItem`."
+"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` "
+"or :c:func:`PySequence_GetItem`."
msgstr ""
#: ../../c-api/tuple.rst:73
@@ -122,15 +122,17 @@ msgstr ""
#: ../../c-api/tuple.rst:102 ../../c-api/tuple.rst:218
#: ../../c-api/tuple.rst:236
msgid ""
-"Bounds checking is performed as an assertion if Python is built in :ref:"
-"`debug mode ` or :option:`with assertions <--with-assertions>`."
+"Bounds checking is performed as an assertion if Python is built "
+"in :ref:`debug mode ` or :option:`with assertions <--with-"
+"assertions>`."
msgstr ""
#: ../../c-api/tuple.rst:107
msgid ""
-"This function \"steals\" a reference to *o*, and, unlike :c:func:"
-"`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
-"replaced; any reference in the tuple at position *pos* will be leaked."
+"This function \"steals\" a reference to *o*, and, "
+"unlike :c:func:`PyTuple_SetItem`, does *not* discard a reference to any item "
+"that is being replaced; any reference in the tuple at position *pos* will be "
+"leaked."
msgstr ""
#: ../../c-api/tuple.rst:115
@@ -144,8 +146,8 @@ msgid ""
"Client code should never assume that the resulting value of ``*p`` will be "
"the same as before calling this function. If the object referenced by ``*p`` "
"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
-"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:"
-"`SystemError`."
+"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` "
+"or :exc:`SystemError`."
msgstr ""
#: ../../c-api/tuple.rst:130
@@ -154,22 +156,22 @@ msgstr ""
#: ../../c-api/tuple.rst:132
msgid ""
-"Struct sequence objects are the C equivalent of :func:`~collections."
-"namedtuple` objects, i.e. a sequence whose items can also be accessed "
-"through attributes. To create a struct sequence, you first have to create a "
-"specific struct sequence type."
+"Struct sequence objects are the C equivalent "
+"of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
+"also be accessed through attributes. To create a struct sequence, you first "
+"have to create a specific struct sequence type."
msgstr ""
#: ../../c-api/tuple.rst:139
msgid ""
"Create a new struct sequence type from the data in *desc*, described below. "
-"Instances of the resulting type can be created with :c:func:"
-"`PyStructSequence_New`."
+"Instances of the resulting type can be created "
+"with :c:func:`PyStructSequence_New`."
msgstr ""
#: ../../c-api/tuple.rst:142 ../../c-api/tuple.rst:211
msgid "Return ``NULL`` with an exception set on failure."
-msgstr ""
+msgstr "失敗時回傳 ``NULL`` 並設定例外。"
#: ../../c-api/tuple.rst:147
msgid "Initializes a struct sequence type *type* from *desc* in place."
@@ -206,16 +208,16 @@ msgstr ""
#: ../../c-api/tuple.rst:182
msgid ""
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
-"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:"
-"member:`~PyStructSequence_Desc.fields` array of the :c:type:"
-"`PyStructSequence_Desc` determines which field of the struct sequence is "
-"described."
+"tuple, all fields are typed as :c:expr:`PyObject*`. The index in "
+"the :c:member:`~PyStructSequence_Desc.fields` array of "
+"the :c:type:`PyStructSequence_Desc` determines which field of the struct "
+"sequence is described."
msgstr ""
#: ../../c-api/tuple.rst:190
msgid ""
-"Name for the field or ``NULL`` to end the list of named fields, set to :c:"
-"data:`PyStructSequence_UnnamedField` to leave unnamed."
+"Name for the field or ``NULL`` to end the list of named fields, set "
+"to :c:data:`PyStructSequence_UnnamedField` to leave unnamed."
msgstr ""
#: ../../c-api/tuple.rst:195
@@ -232,8 +234,8 @@ msgstr ""
#: ../../c-api/tuple.rst:208
msgid ""
-"Creates an instance of *type*, which must have been created with :c:func:"
-"`PyStructSequence_NewType`."
+"Creates an instance of *type*, which must have been created "
+"with :c:func:`PyStructSequence_NewType`."
msgstr ""
#: ../../c-api/tuple.rst:216
diff --git a/c-api/type.po b/c-api/type.po
index 9ca76377b5..3ddebe9e5c 100644
--- a/c-api/type.po
+++ b/c-api/type.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-27 00:14+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -98,21 +98,27 @@ msgid ""
"exception."
msgstr ""
-#: ../../c-api/type.rst:90
+#: ../../c-api/type.rst:85
+msgid ""
+"In free-threaded builds, :c:func:`PyType_AddWatcher` is not thread-safe, so "
+"it must be called at start up (before spawning the first thread)."
+msgstr ""
+
+#: ../../c-api/type.rst:93
msgid ""
"Clear watcher identified by *watcher_id* (previously returned from :c:func:"
"`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error (e.g. if "
"*watcher_id* was never registered.)"
msgstr ""
-#: ../../c-api/type.rst:94
+#: ../../c-api/type.rst:97
msgid ""
"An extension should never call ``PyType_ClearWatcher`` with a *watcher_id* "
"that was not returned to it by a previous call to :c:func:"
"`PyType_AddWatcher`."
msgstr ""
-#: ../../c-api/type.rst:103
+#: ../../c-api/type.rst:106
msgid ""
"Mark *type* as watched. The callback granted *watcher_id* by :c:func:"
"`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` "
@@ -122,61 +128,61 @@ msgid ""
"detail and subject to change.)"
msgstr ""
-#: ../../c-api/type.rst:110
+#: ../../c-api/type.rst:113
msgid ""
"An extension should never call ``PyType_Watch`` with a *watcher_id* that was "
"not returned to it by a previous call to :c:func:`PyType_AddWatcher`."
msgstr ""
-#: ../../c-api/type.rst:118
+#: ../../c-api/type.rst:121
msgid "Type of a type-watcher callback function."
msgstr ""
-#: ../../c-api/type.rst:120
+#: ../../c-api/type.rst:123
msgid ""
"The callback must not modify *type* or cause :c:func:`PyType_Modified` to be "
"called on *type* or any type in its MRO; violating this rule could cause "
"infinite recursion."
msgstr ""
-#: ../../c-api/type.rst:129
+#: ../../c-api/type.rst:132
msgid ""
"Return non-zero if the type object *o* sets the feature *feature*. Type "
"features are denoted by single bit flags."
msgstr ""
-#: ../../c-api/type.rst:135
+#: ../../c-api/type.rst:138
msgid ""
"Return true if the type object includes support for the cycle detector; this "
"tests the type flag :c:macro:`Py_TPFLAGS_HAVE_GC`."
msgstr ""
-#: ../../c-api/type.rst:141
+#: ../../c-api/type.rst:144
msgid "Return true if *a* is a subtype of *b*."
msgstr ""
-#: ../../c-api/type.rst:143
+#: ../../c-api/type.rst:146
msgid ""
"This function only checks for actual subtypes, which means that :meth:`~type."
"__subclasscheck__` is not called on *b*. Call :c:func:`PyObject_IsSubclass` "
"to do the same check that :func:`issubclass` would do."
msgstr ""
-#: ../../c-api/type.rst:151
+#: ../../c-api/type.rst:154
msgid ""
"Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type "
"object. Use Python's default memory allocation mechanism to allocate a new "
"instance and initialize all its contents to ``NULL``."
msgstr ""
-#: ../../c-api/type.rst:157
+#: ../../c-api/type.rst:160
msgid ""
"Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type "
"object. Create a new instance using the type's :c:member:`~PyTypeObject."
"tp_alloc` slot."
msgstr ""
-#: ../../c-api/type.rst:162
+#: ../../c-api/type.rst:165
msgid ""
"Finalize a type object. This should be called on all type objects to finish "
"their initialization. This function is responsible for adding inherited "
@@ -184,7 +190,7 @@ msgid ""
"and sets an exception on error."
msgstr ""
-#: ../../c-api/type.rst:168
+#: ../../c-api/type.rst:171
msgid ""
"If some of the base classes implements the GC protocol and the provided type "
"does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC "
@@ -195,32 +201,32 @@ msgid ""
"handle."
msgstr ""
-#: ../../c-api/type.rst:178
+#: ../../c-api/type.rst:181
msgid ""
"Return the type's name. Equivalent to getting the type's :attr:`~type."
"__name__` attribute."
msgstr ""
-#: ../../c-api/type.rst:185
+#: ../../c-api/type.rst:188
msgid ""
"Return the type's qualified name. Equivalent to getting the type's :attr:"
"`~type.__qualname__` attribute."
msgstr ""
-#: ../../c-api/type.rst:192
+#: ../../c-api/type.rst:195
msgid ""
"Return the type's fully qualified name. Equivalent to ``f\"{type.__module__}."
"{type.__qualname__}\"``, or :attr:`type.__qualname__` if :attr:`type."
"__module__` is not a string or is equal to ``\"builtins\"``."
msgstr ""
-#: ../../c-api/type.rst:200
+#: ../../c-api/type.rst:203
msgid ""
"Return the type's module name. Equivalent to getting the :attr:`type."
"__module__` attribute."
msgstr ""
-#: ../../c-api/type.rst:207
+#: ../../c-api/type.rst:210
msgid ""
"Return the function pointer stored in the given slot. If the result is "
"``NULL``, this indicates that either the slot is ``NULL``, or that the "
@@ -228,30 +234,30 @@ msgid ""
"result pointer into the appropriate function type."
msgstr ""
-#: ../../c-api/type.rst:213
+#: ../../c-api/type.rst:216
msgid ""
"See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument."
msgstr ""
-#: ../../c-api/type.rst:217
+#: ../../c-api/type.rst:220
msgid ""
":c:func:`PyType_GetSlot` can now accept all types. Previously, it was "
"limited to :ref:`heap types `."
msgstr ""
-#: ../../c-api/type.rst:223
+#: ../../c-api/type.rst:226
msgid ""
"Return the module object associated with the given type when the type was "
"created using :c:func:`PyType_FromModuleAndSpec`."
msgstr ""
-#: ../../c-api/type.rst:226 ../../c-api/type.rst:246
+#: ../../c-api/type.rst:229 ../../c-api/type.rst:249
msgid ""
"If no module is associated with the given type, sets :py:class:`TypeError` "
"and returns ``NULL``."
msgstr ""
-#: ../../c-api/type.rst:229
+#: ../../c-api/type.rst:232
msgid ""
"This function is usually used to get the module in which a method is "
"defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may "
@@ -262,31 +268,31 @@ msgid ""
"type:`!PyCMethod` cannot be used."
msgstr ""
-#: ../../c-api/type.rst:242
+#: ../../c-api/type.rst:245
msgid ""
"Return the state of the module object associated with the given type. This "
"is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:"
"func:`PyType_GetModule`."
msgstr ""
-#: ../../c-api/type.rst:249
+#: ../../c-api/type.rst:252
msgid ""
"If the *type* has an associated module but its state is ``NULL``, returns "
"``NULL`` without setting an exception."
msgstr ""
-#: ../../c-api/type.rst:256
+#: ../../c-api/type.rst:259
msgid ""
"Find the first superclass whose module was created from the given :c:type:"
"`PyModuleDef` *def*, and return that module."
msgstr ""
-#: ../../c-api/type.rst:259
+#: ../../c-api/type.rst:262
msgid ""
"If no module is found, raises a :py:class:`TypeError` and returns ``NULL``."
msgstr ""
-#: ../../c-api/type.rst:261
+#: ../../c-api/type.rst:264
msgid ""
"This function is intended to be used together with :c:func:"
"`PyModule_GetState()` to get module state from slot methods (such as :c:"
@@ -295,40 +301,47 @@ msgid ""
"type:`PyCMethod` calling convention."
msgstr ""
-#: ../../c-api/type.rst:271
+#: ../../c-api/type.rst:270
+msgid ""
+"The returned reference is :term:`borrowed ` from *type*, "
+"and will be valid as long as you hold a reference to *type*. Do not release "
+"it with :c:func:`Py_DECREF` or similar."
+msgstr ""
+
+#: ../../c-api/type.rst:278
msgid "Attempt to assign a version tag to the given type."
msgstr ""
-#: ../../c-api/type.rst:273
+#: ../../c-api/type.rst:280
msgid ""
"Returns 1 if the type already had a valid version tag or a new one was "
"assigned, or 0 if a new tag could not be assigned."
msgstr ""
-#: ../../c-api/type.rst:280
+#: ../../c-api/type.rst:287
msgid "Creating Heap-Allocated Types"
msgstr ""
-#: ../../c-api/type.rst:282
+#: ../../c-api/type.rst:289
msgid ""
"The following functions and structs are used to create :ref:`heap types "
"`."
msgstr ""
-#: ../../c-api/type.rst:287
+#: ../../c-api/type.rst:294
msgid ""
"Create and return a :ref:`heap type ` from the *spec* (see :c:"
"macro:`Py_TPFLAGS_HEAPTYPE`)."
msgstr ""
-#: ../../c-api/type.rst:290
+#: ../../c-api/type.rst:297
msgid ""
"The metaclass *metaclass* is used to construct the resulting type object. "
"When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or "
"*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)."
msgstr ""
-#: ../../c-api/type.rst:294
+#: ../../c-api/type.rst:301
msgid ""
"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not "
"supported, except if ``tp_new`` is ``NULL``. (For backwards compatibility, "
@@ -337,7 +350,7 @@ msgid ""
"deprecated and in Python 3.14+ such metaclasses will not be supported.)"
msgstr ""
-#: ../../c-api/type.rst:301
+#: ../../c-api/type.rst:308
msgid ""
"The *bases* argument can be used to specify base classes; it can either be "
"only one class or a tuple of classes. If *bases* is ``NULL``, the "
@@ -346,7 +359,7 @@ msgid ""
"derives from :class:`object`."
msgstr ""
-#: ../../c-api/type.rst:307
+#: ../../c-api/type.rst:314
msgid ""
"The *module* argument can be used to record the module in which the new "
"class is defined. It must be a module object or ``NULL``. If not ``NULL``, "
@@ -355,11 +368,11 @@ msgid ""
"subclasses; it must be specified for each class individually."
msgstr ""
-#: ../../c-api/type.rst:314
+#: ../../c-api/type.rst:321
msgid "This function calls :c:func:`PyType_Ready` on the new type."
msgstr ""
-#: ../../c-api/type.rst:316
+#: ../../c-api/type.rst:323
msgid ""
"Note that this function does *not* fully match the behavior of calling :py:"
"class:`type() ` or using the :keyword:`class` statement. With user-"
@@ -368,41 +381,41 @@ msgid ""
"Specifically:"
msgstr ""
-#: ../../c-api/type.rst:323
+#: ../../c-api/type.rst:330
msgid ""
":py:meth:`~object.__new__` is not called on the new class (and it must be "
"set to ``type.__new__``)."
msgstr ""
-#: ../../c-api/type.rst:325
+#: ../../c-api/type.rst:332
msgid ":py:meth:`~object.__init__` is not called on the new class."
msgstr ""
-#: ../../c-api/type.rst:326
+#: ../../c-api/type.rst:333
msgid ":py:meth:`~object.__init_subclass__` is not called on any bases."
msgstr ""
-#: ../../c-api/type.rst:327
+#: ../../c-api/type.rst:334
msgid ":py:meth:`~object.__set_name__` is not called on new descriptors."
msgstr ""
-#: ../../c-api/type.rst:333
+#: ../../c-api/type.rst:340
msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``."
msgstr "等價於 ``PyType_FromMetaclass(NULL, module, spec, bases)``。"
-#: ../../c-api/type.rst:339
+#: ../../c-api/type.rst:346
msgid ""
"The function now accepts a single class as the *bases* argument and ``NULL`` "
"as the ``tp_doc`` slot."
msgstr ""
-#: ../../c-api/type.rst:344 ../../c-api/type.rst:361
+#: ../../c-api/type.rst:351 ../../c-api/type.rst:368
msgid ""
"The function now finds and uses a metaclass corresponding to the provided "
"base classes. Previously, only :class:`type` instances were returned."
msgstr ""
-#: ../../c-api/type.rst:347 ../../c-api/type.rst:364 ../../c-api/type.rst:380
+#: ../../c-api/type.rst:354 ../../c-api/type.rst:371 ../../c-api/type.rst:387
msgid ""
"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which "
"may result in incomplete initialization. Creating classes whose metaclass "
@@ -410,60 +423,62 @@ msgid ""
"it will be no longer allowed."
msgstr ""
-#: ../../c-api/type.rst:355
+#: ../../c-api/type.rst:362
msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``."
msgstr "等價於 ``PyType_FromMetaclass(NULL, NULL, spec, bases)``。"
-#: ../../c-api/type.rst:372
+#: ../../c-api/type.rst:379
msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``."
msgstr "等價於 ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``。"
-#: ../../c-api/type.rst:376
+#: ../../c-api/type.rst:383
msgid ""
"The function now finds and uses a metaclass corresponding to the base "
"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` "
"instances were returned."
msgstr ""
-#: ../../c-api/type.rst:397
+#: ../../c-api/type.rst:404
msgid "Structure defining a type's behavior."
msgstr ""
-#: ../../c-api/type.rst:401
+#: ../../c-api/type.rst:408
msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`."
msgstr ""
-#: ../../c-api/type.rst:405
+#: ../../c-api/type.rst:412
msgid ""
"If positive, specifies the size of the instance in bytes. It is used to set :"
"c:member:`PyTypeObject.tp_basicsize`."
msgstr ""
-#: ../../c-api/type.rst:408
+#: ../../c-api/type.rst:415
msgid ""
"If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be "
"inherited."
msgstr ""
-#: ../../c-api/type.rst:411
+#: ../../c-api/type.rst:418
msgid ""
"If negative, the absolute value specifies how much space instances of the "
"class need *in addition* to the superclass. Use :c:func:"
"`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved "
-"this way."
+"this way. For negative :c:member:`!basicsize`, Python will insert padding "
+"when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s alignment "
+"requirements."
msgstr ""
-#: ../../c-api/type.rst:418
+#: ../../c-api/type.rst:428
msgid "Previously, this field could not be negative."
msgstr ""
-#: ../../c-api/type.rst:422
+#: ../../c-api/type.rst:432
msgid ""
"Size of one element of a variable-size type, in bytes. Used to set :c:member:"
"`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats."
msgstr ""
-#: ../../c-api/type.rst:426
+#: ../../c-api/type.rst:436
msgid ""
"If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending "
"arbitrary variable-sized classes is dangerous, since some types use a fixed "
@@ -472,58 +487,58 @@ msgid ""
"only possible in the following situations:"
msgstr ""
-#: ../../c-api/type.rst:433
+#: ../../c-api/type.rst:443
msgid ""
"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)."
msgstr ""
-#: ../../c-api/type.rst:435
+#: ../../c-api/type.rst:445
msgid ""
"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that "
"the memory layout of the base class is known."
msgstr ""
-#: ../../c-api/type.rst:437
+#: ../../c-api/type.rst:447
msgid ""
"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the "
"subclass does not access the instance's memory directly."
msgstr ""
-#: ../../c-api/type.rst:440
+#: ../../c-api/type.rst:450
msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag."
msgstr ""
-#: ../../c-api/type.rst:444
+#: ../../c-api/type.rst:454
msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`."
msgstr ""
-#: ../../c-api/type.rst:446
+#: ../../c-api/type.rst:456
msgid ""
"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:"
"`PyType_FromSpecWithBases` sets it automatically."
msgstr ""
-#: ../../c-api/type.rst:451
+#: ../../c-api/type.rst:461
msgid ""
"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot "
"value ``{0, NULL}``."
msgstr ""
-#: ../../c-api/type.rst:454
+#: ../../c-api/type.rst:464
msgid "Each slot ID should be specified at most once."
msgstr ""
-#: ../../c-api/type.rst:464
+#: ../../c-api/type.rst:474
msgid ""
"Structure defining optional functionality of a type, containing a slot ID "
"and a value pointer."
msgstr ""
-#: ../../c-api/type.rst:469
+#: ../../c-api/type.rst:479
msgid "A slot ID."
msgstr ""
-#: ../../c-api/type.rst:471
+#: ../../c-api/type.rst:481
msgid ""
"Slot IDs are named like the field names of the structures :c:type:"
"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:"
@@ -531,30 +546,30 @@ msgid ""
"prefix. For example, use:"
msgstr ""
-#: ../../c-api/type.rst:477
+#: ../../c-api/type.rst:487
msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`"
msgstr ""
-#: ../../c-api/type.rst:478
+#: ../../c-api/type.rst:488
msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`"
msgstr ""
-#: ../../c-api/type.rst:479
+#: ../../c-api/type.rst:489
msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`"
msgstr ""
-#: ../../c-api/type.rst:481
+#: ../../c-api/type.rst:491
msgid ""
"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:"
msgstr ""
-#: ../../c-api/type.rst:483
+#: ../../c-api/type.rst:493
msgid ""
":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:"
"`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)"
msgstr ""
-#: ../../c-api/type.rst:485
+#: ../../c-api/type.rst:495
msgid ""
":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:"
"`Py_TPFLAGS_MANAGED_DICT` instead if possible)"
@@ -562,7 +577,7 @@ msgstr ""
":c:member:`~PyTypeObject.tp_dictoffset`\\ (如果可能,請改用 :c:macro:"
"`Py_TPFLAGS_MANAGED_DICT`)"
-#: ../../c-api/type.rst:487
+#: ../../c-api/type.rst:497
msgid ""
":c:member:`~PyTypeObject.tp_vectorcall_offset` (use "
"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)"
@@ -570,7 +585,7 @@ msgstr ""
":c:member:`~PyTypeObject.tp_vectorcall_offset`\\ (請用 :ref:`PyMemberDef "
"` 中的 ``\"__vectorcalloffset__\"``)"
-#: ../../c-api/type.rst:491
+#: ../../c-api/type.rst:501
msgid ""
"If it is not possible to switch to a ``MANAGED`` flag (for example, for "
"vectorcall or to support Python older than 3.12), specify the offset in :c:"
@@ -578,48 +593,48 @@ msgid ""
"documentation ` for details."
msgstr ""
-#: ../../c-api/type.rst:497
+#: ../../c-api/type.rst:507
msgid "The following fields cannot be set at all when creating a heap type:"
msgstr ""
-#: ../../c-api/type.rst:499
+#: ../../c-api/type.rst:509
msgid ""
":c:member:`~PyTypeObject.tp_vectorcall` (use :c:member:`~PyTypeObject."
"tp_new` and/or :c:member:`~PyTypeObject.tp_init`)"
msgstr ""
-#: ../../c-api/type.rst:503
+#: ../../c-api/type.rst:513
msgid ""
"Internal fields: :c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject."
"tp_mro`, :c:member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject."
"tp_subclasses`, and :c:member:`~PyTypeObject.tp_weaklist`."
msgstr ""
-#: ../../c-api/type.rst:510
+#: ../../c-api/type.rst:520
msgid ""
"Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on "
"some platforms. To avoid issues, use the *bases* argument of :c:func:"
"`PyType_FromSpecWithBases` instead."
msgstr ""
-#: ../../c-api/type.rst:517
+#: ../../c-api/type.rst:525
msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API."
msgstr ""
-#: ../../c-api/type.rst:519
+#: ../../c-api/type.rst:528
msgid ""
":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs."
"bf_releasebuffer` are now available under the :ref:`limited API `."
msgstr ""
-#: ../../c-api/type.rst:526
+#: ../../c-api/type.rst:535
msgid ""
"The desired value of the slot. In most cases, this is a pointer to a "
"function."
msgstr ""
-#: ../../c-api/type.rst:529
+#: ../../c-api/type.rst:538
msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``."
msgstr ""
diff --git a/c-api/typeobj.po b/c-api/typeobj.po
index 951587ed1f..7751ec68ce 100644
--- a/c-api/typeobj.po
+++ b/c-api/typeobj.po
@@ -1,5 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
@@ -7,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-27 00:14+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:33+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -19,8 +18,8 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../c-api/typeobj.rst:6
-msgid "Type Objects"
-msgstr "型別物件"
+msgid "Type Object Structures"
+msgstr "型別物件結構"
#: ../../c-api/typeobj.rst:8
msgid ""
@@ -129,7 +128,7 @@ msgstr ":c:member:`~PyTypeObject.tp_basicsize`"
#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:46
#: ../../c-api/typeobj.rst:48 ../../c-api/typeobj.rst:52
#: ../../c-api/typeobj.rst:99 ../../c-api/typeobj.rst:120
-#: ../../c-api/typeobj.rst:416
+#: ../../c-api/typeobj.rst:417
msgid ":c:type:`Py_ssize_t`"
msgstr ":c:type:`Py_ssize_t`"
@@ -142,7 +141,7 @@ msgid ":c:member:`~PyTypeObject.tp_dealloc`"
msgstr ":c:member:`~PyTypeObject.tp_dealloc`"
#: ../../c-api/typeobj.rst:50 ../../c-api/typeobj.rst:142
-#: ../../c-api/typeobj.rst:146 ../../c-api/typeobj.rst:346
+#: ../../c-api/typeobj.rst:146 ../../c-api/typeobj.rst:347
msgid ":c:type:`destructor`"
msgstr ":c:type:`destructor`"
@@ -154,7 +153,7 @@ msgstr ":c:member:`~PyTypeObject.tp_vectorcall_offset`"
msgid "(:c:member:`~PyTypeObject.tp_getattr`)"
msgstr "(:c:member:`~PyTypeObject.tp_getattr`)"
-#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:370
+#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:371
msgid ":c:type:`getattrfunc`"
msgstr ":c:type:`getattrfunc`"
@@ -173,7 +172,7 @@ msgstr "G"
msgid "(:c:member:`~PyTypeObject.tp_setattr`)"
msgstr "(:c:member:`~PyTypeObject.tp_setattr`)"
-#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:375
+#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:376
msgid ":c:type:`setattrfunc`"
msgstr ":c:type:`setattrfunc`"
@@ -191,6 +190,7 @@ msgstr ":c:type:`PyAsyncMethods` *"
#: ../../c-api/typeobj.rst:60 ../../c-api/typeobj.rst:64
#: ../../c-api/typeobj.rst:66 ../../c-api/typeobj.rst:68
+#: ../../c-api/typeobj.rst:82
msgid ":ref:`sub-slots`"
msgstr ":ref:`sub-slots`"
@@ -205,7 +205,7 @@ msgid ":c:member:`~PyTypeObject.tp_repr`"
msgstr ":c:member:`~PyTypeObject.tp_repr`"
#: ../../c-api/typeobj.rst:62 ../../c-api/typeobj.rst:74
-#: ../../c-api/typeobj.rst:368
+#: ../../c-api/typeobj.rst:369
msgid ":c:type:`reprfunc`"
msgstr ":c:type:`reprfunc`"
@@ -241,7 +241,7 @@ msgstr ":c:type:`PyMappingMethods` *"
msgid ":c:member:`~PyTypeObject.tp_hash`"
msgstr ":c:member:`~PyTypeObject.tp_hash`"
-#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:404
+#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:405
msgid ":c:type:`hashfunc`"
msgstr ":c:type:`hashfunc`"
@@ -254,7 +254,7 @@ msgid ":c:member:`~PyTypeObject.tp_call`"
msgstr ":c:member:`~PyTypeObject.tp_call`"
#: ../../c-api/typeobj.rst:72 ../../c-api/typeobj.rst:237
-#: ../../c-api/typeobj.rst:240 ../../c-api/typeobj.rst:440
+#: ../../c-api/typeobj.rst:240 ../../c-api/typeobj.rst:441
msgid ":c:type:`ternaryfunc`"
msgstr ":c:type:`ternaryfunc`"
@@ -274,7 +274,7 @@ msgstr "__str__"
msgid ":c:member:`~PyTypeObject.tp_getattro`"
msgstr ":c:member:`~PyTypeObject.tp_getattro`"
-#: ../../c-api/typeobj.rst:76 ../../c-api/typeobj.rst:381
+#: ../../c-api/typeobj.rst:76 ../../c-api/typeobj.rst:382
msgid ":c:type:`getattrofunc`"
msgstr ":c:type:`getattrofunc`"
@@ -282,7 +282,7 @@ msgstr ":c:type:`getattrofunc`"
msgid ":c:member:`~PyTypeObject.tp_setattro`"
msgstr ":c:member:`~PyTypeObject.tp_setattro`"
-#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:386
+#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:387
msgid ":c:type:`setattrofunc`"
msgstr ":c:type:`setattrofunc`"
@@ -321,7 +321,7 @@ msgstr "__doc__"
msgid ":c:member:`~PyTypeObject.tp_traverse`"
msgstr ":c:member:`~PyTypeObject.tp_traverse`"
-#: ../../c-api/typeobj.rst:88 ../../c-api/typeobj.rst:350
+#: ../../c-api/typeobj.rst:88 ../../c-api/typeobj.rst:351
msgid ":c:type:`traverseproc`"
msgstr ":c:type:`traverseproc`"
@@ -330,7 +330,7 @@ msgid ":c:member:`~PyTypeObject.tp_clear`"
msgstr ":c:member:`~PyTypeObject.tp_clear`"
#: ../../c-api/typeobj.rst:90 ../../c-api/typeobj.rst:130
-#: ../../c-api/typeobj.rst:248 ../../c-api/typeobj.rst:429
+#: ../../c-api/typeobj.rst:248 ../../c-api/typeobj.rst:430
msgid ":c:type:`inquiry`"
msgstr ":c:type:`inquiry`"
@@ -338,7 +338,7 @@ msgstr ":c:type:`inquiry`"
msgid ":c:member:`~PyTypeObject.tp_richcompare`"
msgstr ":c:member:`~PyTypeObject.tp_richcompare`"
-#: ../../c-api/typeobj.rst:92 ../../c-api/typeobj.rst:406
+#: ../../c-api/typeobj.rst:92 ../../c-api/typeobj.rst:407
msgid ":c:type:`richcmpfunc`"
msgstr ":c:type:`richcmpfunc`"
@@ -354,7 +354,7 @@ msgstr "(:c:member:`~PyTypeObject.tp_weaklistoffset`)"
msgid ":c:member:`~PyTypeObject.tp_iter`"
msgstr ":c:member:`~PyTypeObject.tp_iter`"
-#: ../../c-api/typeobj.rst:101 ../../c-api/typeobj.rst:412
+#: ../../c-api/typeobj.rst:101 ../../c-api/typeobj.rst:413
msgid ":c:type:`getiterfunc`"
msgstr ":c:type:`getiterfunc`"
@@ -366,7 +366,7 @@ msgstr "__iter__"
msgid ":c:member:`~PyTypeObject.tp_iternext`"
msgstr ":c:member:`~PyTypeObject.tp_iternext`"
-#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:414
+#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:415
msgid ":c:type:`iternextfunc`"
msgstr ":c:type:`iternextfunc`"
@@ -417,15 +417,15 @@ msgstr ":c:member:`~PyTypeObject.tp_dict`"
#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:113
#: ../../c-api/typeobj.rst:132 ../../c-api/typeobj.rst:134
#: ../../c-api/typeobj.rst:136 ../../c-api/typeobj.rst:140
-#: ../../c-api/typeobj.rst:341 ../../c-api/typeobj.rst:346
-#: ../../c-api/typeobj.rst:356 ../../c-api/typeobj.rst:368
-#: ../../c-api/typeobj.rst:370 ../../c-api/typeobj.rst:381
-#: ../../c-api/typeobj.rst:392 ../../c-api/typeobj.rst:404
-#: ../../c-api/typeobj.rst:406 ../../c-api/typeobj.rst:412
-#: ../../c-api/typeobj.rst:414 ../../c-api/typeobj.rst:416
-#: ../../c-api/typeobj.rst:429 ../../c-api/typeobj.rst:431
-#: ../../c-api/typeobj.rst:435 ../../c-api/typeobj.rst:440
-#: ../../c-api/typeobj.rst:446
+#: ../../c-api/typeobj.rst:342 ../../c-api/typeobj.rst:347
+#: ../../c-api/typeobj.rst:357 ../../c-api/typeobj.rst:369
+#: ../../c-api/typeobj.rst:371 ../../c-api/typeobj.rst:382
+#: ../../c-api/typeobj.rst:393 ../../c-api/typeobj.rst:405
+#: ../../c-api/typeobj.rst:407 ../../c-api/typeobj.rst:413
+#: ../../c-api/typeobj.rst:415 ../../c-api/typeobj.rst:417
+#: ../../c-api/typeobj.rst:430 ../../c-api/typeobj.rst:432
+#: ../../c-api/typeobj.rst:436 ../../c-api/typeobj.rst:441
+#: ../../c-api/typeobj.rst:447
msgid ":c:type:`PyObject` *"
msgstr ":c:type:`PyObject` *"
@@ -437,7 +437,7 @@ msgstr "__dict__"
msgid ":c:member:`~PyTypeObject.tp_descr_get`"
msgstr ":c:member:`~PyTypeObject.tp_descr_get`"
-#: ../../c-api/typeobj.rst:115 ../../c-api/typeobj.rst:392
+#: ../../c-api/typeobj.rst:115 ../../c-api/typeobj.rst:393
msgid ":c:type:`descrgetfunc`"
msgstr ":c:type:`descrgetfunc`"
@@ -449,7 +449,7 @@ msgstr "__get__"
msgid ":c:member:`~PyTypeObject.tp_descr_set`"
msgstr ":c:member:`~PyTypeObject.tp_descr_set`"
-#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:398
+#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:399
msgid ":c:type:`descrsetfunc`"
msgstr ":c:type:`descrsetfunc`"
@@ -465,7 +465,7 @@ msgstr "(:c:member:`~PyTypeObject.tp_dictoffset`)"
msgid ":c:member:`~PyTypeObject.tp_init`"
msgstr ":c:member:`~PyTypeObject.tp_init`"
-#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:362
+#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:363
msgid ":c:type:`initproc`"
msgstr ":c:type:`initproc`"
@@ -477,7 +477,7 @@ msgstr "__init__"
msgid ":c:member:`~PyTypeObject.tp_alloc`"
msgstr ":c:member:`~PyTypeObject.tp_alloc`"
-#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:341
+#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:342
msgid ":c:type:`allocfunc`"
msgstr ":c:type:`allocfunc`"
@@ -485,7 +485,7 @@ msgstr ":c:type:`allocfunc`"
msgid ":c:member:`~PyTypeObject.tp_new`"
msgstr ":c:member:`~PyTypeObject.tp_new`"
-#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:356
+#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:357
msgid ":c:type:`newfunc`"
msgstr ":c:type:`newfunc`"
@@ -497,7 +497,7 @@ msgstr "__new__"
msgid ":c:member:`~PyTypeObject.tp_free`"
msgstr ":c:member:`~PyTypeObject.tp_free`"
-#: ../../c-api/typeobj.rst:128 ../../c-api/typeobj.rst:348
+#: ../../c-api/typeobj.rst:128 ../../c-api/typeobj.rst:349
msgid ":c:type:`freefunc`"
msgstr ":c:type:`freefunc`"
@@ -534,7 +534,7 @@ msgid "[:c:member:`~PyTypeObject.tp_subclasses`]"
msgstr "[:c:member:`~PyTypeObject.tp_subclasses`]"
#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:138
-#: ../../c-api/typeobj.rst:279 ../../c-api/typeobj.rst:348
+#: ../../c-api/typeobj.rst:279 ../../c-api/typeobj.rst:349
msgid "void *"
msgstr "void *"
@@ -668,7 +668,7 @@ msgstr ":c:member:`~PyAsyncMethods.am_await`"
#: ../../c-api/typeobj.rst:244 ../../c-api/typeobj.rst:246
#: ../../c-api/typeobj.rst:250 ../../c-api/typeobj.rst:277
#: ../../c-api/typeobj.rst:281 ../../c-api/typeobj.rst:291
-#: ../../c-api/typeobj.rst:431
+#: ../../c-api/typeobj.rst:432
msgid ":c:type:`unaryfunc`"
msgstr ":c:type:`unaryfunc`"
@@ -718,7 +718,7 @@ msgstr ":c:member:`~PyNumberMethods.nb_add`"
#: ../../c-api/typeobj.rst:289 ../../c-api/typeobj.rst:293
#: ../../c-api/typeobj.rst:296 ../../c-api/typeobj.rst:302
#: ../../c-api/typeobj.rst:311 ../../c-api/typeobj.rst:322
-#: ../../c-api/typeobj.rst:435
+#: ../../c-api/typeobj.rst:436
msgid ":c:type:`binaryfunc`"
msgstr ":c:type:`binaryfunc`"
@@ -1007,7 +1007,7 @@ msgid ":c:member:`~PyMappingMethods.mp_length`"
msgstr ":c:member:`~PyMappingMethods.mp_length`"
#: ../../c-api/typeobj.rst:300 ../../c-api/typeobj.rst:309
-#: ../../c-api/typeobj.rst:416
+#: ../../c-api/typeobj.rst:417
msgid ":c:type:`lenfunc`"
msgstr ":c:type:`lenfunc`"
@@ -1027,7 +1027,7 @@ msgstr "__getitem__"
msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`"
msgstr ":c:member:`~PyMappingMethods.mp_ass_subscript`"
-#: ../../c-api/typeobj.rst:304 ../../c-api/typeobj.rst:462
+#: ../../c-api/typeobj.rst:304 ../../c-api/typeobj.rst:463
msgid ":c:type:`objobjargproc`"
msgstr ":c:type:`objobjargproc`"
@@ -1052,7 +1052,7 @@ msgid ":c:member:`~PySequenceMethods.sq_repeat`"
msgstr ":c:member:`~PySequenceMethods.sq_repeat`"
#: ../../c-api/typeobj.rst:313 ../../c-api/typeobj.rst:315
-#: ../../c-api/typeobj.rst:324 ../../c-api/typeobj.rst:446
+#: ../../c-api/typeobj.rst:324 ../../c-api/typeobj.rst:447
msgid ":c:type:`ssizeargfunc`"
msgstr ":c:type:`ssizeargfunc`"
@@ -1068,7 +1068,7 @@ msgstr ":c:member:`~PySequenceMethods.sq_item`"
msgid ":c:member:`~PySequenceMethods.sq_ass_item`"
msgstr ":c:member:`~PySequenceMethods.sq_ass_item`"
-#: ../../c-api/typeobj.rst:317 ../../c-api/typeobj.rst:451
+#: ../../c-api/typeobj.rst:317 ../../c-api/typeobj.rst:452
msgid ":c:type:`ssizeobjargproc`"
msgstr ":c:type:`ssizeobjargproc`"
@@ -1080,7 +1080,7 @@ msgstr "__setitem__ __delitem__"
msgid ":c:member:`~PySequenceMethods.sq_contains`"
msgstr ":c:member:`~PySequenceMethods.sq_contains`"
-#: ../../c-api/typeobj.rst:320 ../../c-api/typeobj.rst:457
+#: ../../c-api/typeobj.rst:320 ../../c-api/typeobj.rst:458
msgid ":c:type:`objobjproc`"
msgstr ":c:type:`objobjproc`"
@@ -1104,6 +1104,11 @@ msgstr ":c:member:`~PyBufferProcs.bf_getbuffer`"
msgid ":c:func:`getbufferproc`"
msgstr ":c:func:`getbufferproc`"
+#: ../../c-api/typeobj.rst:328
+#, fuzzy
+msgid "__buffer__"
+msgstr "__buffer__"
+
#: ../../c-api/typeobj.rst:330
msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`"
msgstr ":c:member:`~PyBufferProcs.bf_releasebuffer`"
@@ -1112,24 +1117,28 @@ msgstr ":c:member:`~PyBufferProcs.bf_releasebuffer`"
msgid ":c:func:`releasebufferproc`"
msgstr ":c:func:`releasebufferproc`"
-#: ../../c-api/typeobj.rst:336
+#: ../../c-api/typeobj.rst:330
+msgid "__release_\\ buffer\\__"
+msgstr ""
+
+#: ../../c-api/typeobj.rst:337
msgid "slot typedefs"
msgstr ""
-#: ../../c-api/typeobj.rst:339
+#: ../../c-api/typeobj.rst:340
msgid "typedef"
msgstr "typedef"
-#: ../../c-api/typeobj.rst:339
+#: ../../c-api/typeobj.rst:340
msgid "Parameter Types"
msgstr ""
-#: ../../c-api/typeobj.rst:339
+#: ../../c-api/typeobj.rst:340
msgid "Return Type"
msgstr ""
-#: ../../c-api/typeobj.rst:346 ../../c-api/typeobj.rst:348
-#: ../../c-api/typeobj.rst:424
+#: ../../c-api/typeobj.rst:347 ../../c-api/typeobj.rst:349
+#: ../../c-api/typeobj.rst:425
msgid "void"
msgstr "void"
@@ -1137,20 +1146,20 @@ msgstr "void"
msgid ":c:type:`visitproc`"
msgstr ":c:type:`visitproc`"
-#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:350
-#: ../../c-api/typeobj.rst:362 ../../c-api/typeobj.rst:375
-#: ../../c-api/typeobj.rst:386 ../../c-api/typeobj.rst:398
-#: ../../c-api/typeobj.rst:418 ../../c-api/typeobj.rst:429
-#: ../../c-api/typeobj.rst:451 ../../c-api/typeobj.rst:457
-#: ../../c-api/typeobj.rst:462
+#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:351
+#: ../../c-api/typeobj.rst:363 ../../c-api/typeobj.rst:376
+#: ../../c-api/typeobj.rst:387 ../../c-api/typeobj.rst:399
+#: ../../c-api/typeobj.rst:419 ../../c-api/typeobj.rst:430
+#: ../../c-api/typeobj.rst:452 ../../c-api/typeobj.rst:458
+#: ../../c-api/typeobj.rst:463
msgid "int"
msgstr "int"
-#: ../../c-api/typeobj.rst:404
+#: ../../c-api/typeobj.rst:405
msgid "Py_hash_t"
msgstr "Py_hash_t"
-#: ../../c-api/typeobj.rst:418
+#: ../../c-api/typeobj.rst:419
msgid ":c:type:`getbufferproc`"
msgstr ":c:type:`getbufferproc`"
@@ -1158,26 +1167,26 @@ msgstr ":c:type:`getbufferproc`"
msgid ":c:type:`Py_buffer` *"
msgstr ":c:type:`Py_buffer` *"
-#: ../../c-api/typeobj.rst:424
+#: ../../c-api/typeobj.rst:425
msgid ":c:type:`releasebufferproc`"
msgstr ":c:type:`releasebufferproc`"
-#: ../../c-api/typeobj.rst:469
+#: ../../c-api/typeobj.rst:470
msgid "See :ref:`slot-typedefs` below for more detail."
msgstr "更多細節請見下方的 :ref:`slot-typedefs`。"
-#: ../../c-api/typeobj.rst:473
+#: ../../c-api/typeobj.rst:474
msgid "PyTypeObject Definition"
msgstr ""
-#: ../../c-api/typeobj.rst:475
+#: ../../c-api/typeobj.rst:476
msgid ""
"The structure definition for :c:type:`PyTypeObject` can be found in :file:"
-"`Include/object.h`. For convenience of reference, this repeats the "
+"`Include/cpython/object.h`. For convenience of reference, this repeats the "
"definition found there:"
msgstr ""
-#: ../../c-api/typeobj.rst:481
+#: ../../c-api/typeobj.rst:482
msgid ""
"typedef struct _typeobject {\n"
" PyObject_VAR_HEAD\n"
@@ -1267,11 +1276,11 @@ msgid ""
"} PyTypeObject;\n"
msgstr ""
-#: ../../c-api/typeobj.rst:485
+#: ../../c-api/typeobj.rst:486
msgid "PyObject Slots"
msgstr ""
-#: ../../c-api/typeobj.rst:487
+#: ../../c-api/typeobj.rst:488
msgid ""
"The type object structure extends the :c:type:`PyVarObject` structure. The :"
"c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :"
@@ -1281,7 +1290,7 @@ msgid ""
"the :c:member:`~PyVarObject.ob_size` field."
msgstr ""
-#: ../../c-api/typeobj.rst:496
+#: ../../c-api/typeobj.rst:497
msgid ""
"This is the type object's reference count, initialized to ``1`` by the "
"``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type "
@@ -1291,47 +1300,47 @@ msgid ""
"instances *do* count as references."
msgstr ""
-#: ../../c-api/typeobj.rst:503 ../../c-api/typeobj.rst:526
-#: ../../c-api/typeobj.rst:540 ../../c-api/typeobj.rst:584
-#: ../../c-api/typeobj.rst:627 ../../c-api/typeobj.rst:686
-#: ../../c-api/typeobj.rst:727 ../../c-api/typeobj.rst:744
-#: ../../c-api/typeobj.rst:761 ../../c-api/typeobj.rst:779
-#: ../../c-api/typeobj.rst:803 ../../c-api/typeobj.rst:820
-#: ../../c-api/typeobj.rst:832 ../../c-api/typeobj.rst:844
-#: ../../c-api/typeobj.rst:877 ../../c-api/typeobj.rst:899
-#: ../../c-api/typeobj.rst:919 ../../c-api/typeobj.rst:940
-#: ../../c-api/typeobj.rst:966 ../../c-api/typeobj.rst:985
-#: ../../c-api/typeobj.rst:1001 ../../c-api/typeobj.rst:1040
-#: ../../c-api/typeobj.rst:1051 ../../c-api/typeobj.rst:1061
-#: ../../c-api/typeobj.rst:1071 ../../c-api/typeobj.rst:1085
-#: ../../c-api/typeobj.rst:1103 ../../c-api/typeobj.rst:1126
-#: ../../c-api/typeobj.rst:1144 ../../c-api/typeobj.rst:1157
-#: ../../c-api/typeobj.rst:1179 ../../c-api/typeobj.rst:1223
-#: ../../c-api/typeobj.rst:1244 ../../c-api/typeobj.rst:1263
-#: ../../c-api/typeobj.rst:1293 ../../c-api/typeobj.rst:1315
-#: ../../c-api/typeobj.rst:1341 ../../c-api/typeobj.rst:1426
-#: ../../c-api/typeobj.rst:1500 ../../c-api/typeobj.rst:1561
-#: ../../c-api/typeobj.rst:1597 ../../c-api/typeobj.rst:1622
-#: ../../c-api/typeobj.rst:1645 ../../c-api/typeobj.rst:1658
-#: ../../c-api/typeobj.rst:1673 ../../c-api/typeobj.rst:1687
-#: ../../c-api/typeobj.rst:1717 ../../c-api/typeobj.rst:1749
-#: ../../c-api/typeobj.rst:1775 ../../c-api/typeobj.rst:1793
-#: ../../c-api/typeobj.rst:1822 ../../c-api/typeobj.rst:1866
-#: ../../c-api/typeobj.rst:1883 ../../c-api/typeobj.rst:1924
-#: ../../c-api/typeobj.rst:1946 ../../c-api/typeobj.rst:1978
-#: ../../c-api/typeobj.rst:2006 ../../c-api/typeobj.rst:2019
-#: ../../c-api/typeobj.rst:2029 ../../c-api/typeobj.rst:2046
-#: ../../c-api/typeobj.rst:2063 ../../c-api/typeobj.rst:2077
-#: ../../c-api/typeobj.rst:2123 ../../c-api/typeobj.rst:2146
+#: ../../c-api/typeobj.rst:504 ../../c-api/typeobj.rst:527
+#: ../../c-api/typeobj.rst:544 ../../c-api/typeobj.rst:588
+#: ../../c-api/typeobj.rst:666 ../../c-api/typeobj.rst:742
+#: ../../c-api/typeobj.rst:783 ../../c-api/typeobj.rst:800
+#: ../../c-api/typeobj.rst:817 ../../c-api/typeobj.rst:835
+#: ../../c-api/typeobj.rst:859 ../../c-api/typeobj.rst:876
+#: ../../c-api/typeobj.rst:888 ../../c-api/typeobj.rst:900
+#: ../../c-api/typeobj.rst:933 ../../c-api/typeobj.rst:955
+#: ../../c-api/typeobj.rst:975 ../../c-api/typeobj.rst:996
+#: ../../c-api/typeobj.rst:1022 ../../c-api/typeobj.rst:1041
+#: ../../c-api/typeobj.rst:1057 ../../c-api/typeobj.rst:1096
+#: ../../c-api/typeobj.rst:1107 ../../c-api/typeobj.rst:1117
+#: ../../c-api/typeobj.rst:1127 ../../c-api/typeobj.rst:1141
+#: ../../c-api/typeobj.rst:1159 ../../c-api/typeobj.rst:1182
+#: ../../c-api/typeobj.rst:1200 ../../c-api/typeobj.rst:1213
+#: ../../c-api/typeobj.rst:1235 ../../c-api/typeobj.rst:1279
+#: ../../c-api/typeobj.rst:1300 ../../c-api/typeobj.rst:1319
+#: ../../c-api/typeobj.rst:1349 ../../c-api/typeobj.rst:1371
+#: ../../c-api/typeobj.rst:1397 ../../c-api/typeobj.rst:1482
+#: ../../c-api/typeobj.rst:1556 ../../c-api/typeobj.rst:1617
+#: ../../c-api/typeobj.rst:1653 ../../c-api/typeobj.rst:1678
+#: ../../c-api/typeobj.rst:1701 ../../c-api/typeobj.rst:1714
+#: ../../c-api/typeobj.rst:1729 ../../c-api/typeobj.rst:1743
+#: ../../c-api/typeobj.rst:1773 ../../c-api/typeobj.rst:1805
+#: ../../c-api/typeobj.rst:1831 ../../c-api/typeobj.rst:1849
+#: ../../c-api/typeobj.rst:1878 ../../c-api/typeobj.rst:1922
+#: ../../c-api/typeobj.rst:1939 ../../c-api/typeobj.rst:1980
+#: ../../c-api/typeobj.rst:2002 ../../c-api/typeobj.rst:2034
+#: ../../c-api/typeobj.rst:2062 ../../c-api/typeobj.rst:2075
+#: ../../c-api/typeobj.rst:2085 ../../c-api/typeobj.rst:2102
+#: ../../c-api/typeobj.rst:2119 ../../c-api/typeobj.rst:2133
+#: ../../c-api/typeobj.rst:2166 ../../c-api/typeobj.rst:2189
msgid "**Inheritance:**"
msgstr ""
-#: ../../c-api/typeobj.rst:505 ../../c-api/typeobj.rst:542
-#: ../../c-api/typeobj.rst:586
+#: ../../c-api/typeobj.rst:506 ../../c-api/typeobj.rst:546
+#: ../../c-api/typeobj.rst:590
msgid "This field is not inherited by subtypes."
msgstr ""
-#: ../../c-api/typeobj.rst:510
+#: ../../c-api/typeobj.rst:511
msgid ""
"This is the type's type, in other words its metatype. It is initialized by "
"the argument to the ``PyObject_HEAD_INIT`` macro, and its value should "
@@ -1343,11 +1352,11 @@ msgid ""
"doing anything else. This is typically done like this::"
msgstr ""
-#: ../../c-api/typeobj.rst:519
+#: ../../c-api/typeobj.rst:520
msgid "Foo_Type.ob_type = &PyType_Type;"
msgstr "Foo_Type.ob_type = &PyType_Type;"
-#: ../../c-api/typeobj.rst:521
+#: ../../c-api/typeobj.rst:522
msgid ""
"This should be done before any instances of the type are created. :c:func:"
"`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if "
@@ -1355,31 +1364,37 @@ msgid ""
"class. :c:func:`PyType_Ready` will not change this field if it is non-zero."
msgstr ""
-#: ../../c-api/typeobj.rst:528 ../../c-api/typeobj.rst:688
-#: ../../c-api/typeobj.rst:805 ../../c-api/typeobj.rst:901
-#: ../../c-api/typeobj.rst:921 ../../c-api/typeobj.rst:1624
-#: ../../c-api/typeobj.rst:1647 ../../c-api/typeobj.rst:1777
-#: ../../c-api/typeobj.rst:1795 ../../c-api/typeobj.rst:1868
-#: ../../c-api/typeobj.rst:1980 ../../c-api/typeobj.rst:2125
+#: ../../c-api/typeobj.rst:529 ../../c-api/typeobj.rst:744
+#: ../../c-api/typeobj.rst:861 ../../c-api/typeobj.rst:957
+#: ../../c-api/typeobj.rst:977 ../../c-api/typeobj.rst:1680
+#: ../../c-api/typeobj.rst:1703 ../../c-api/typeobj.rst:1833
+#: ../../c-api/typeobj.rst:1851 ../../c-api/typeobj.rst:1924
+#: ../../c-api/typeobj.rst:2036 ../../c-api/typeobj.rst:2168
msgid "This field is inherited by subtypes."
msgstr ""
-#: ../../c-api/typeobj.rst:532
+#: ../../c-api/typeobj.rst:533
msgid "PyVarObject Slots"
msgstr ""
-#: ../../c-api/typeobj.rst:536
+#: ../../c-api/typeobj.rst:537
msgid ""
"For :ref:`statically allocated type objects `, this should be "
"initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning."
msgstr ""
-#: ../../c-api/typeobj.rst:546
+#: ../../c-api/typeobj.rst:541
+msgid ""
+"This field should be accessed using the :c:func:`Py_SIZE()` and :c:func:"
+"`Py_SET_SIZE()` macros."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:550
msgid "PyTypeObject Slots"
msgstr ""
-#: ../../c-api/typeobj.rst:548
+#: ../../c-api/typeobj.rst:552
msgid ""
"Each slot has a section describing inheritance. If :c:func:`PyType_Ready` "
"may set a value when the field is set to ``NULL`` then there will also be a "
@@ -1387,7 +1402,7 @@ msgid ""
"`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)"
msgstr ""
-#: ../../c-api/typeobj.rst:555
+#: ../../c-api/typeobj.rst:559
msgid ""
"Pointer to a NUL-terminated string containing the name of the type. For "
"types that are accessible as module globals, the string should be the full "
@@ -1399,14 +1414,14 @@ msgid ""
"tp_name` initializer ``\"P.Q.M.T\"``."
msgstr ""
-#: ../../c-api/typeobj.rst:563
+#: ../../c-api/typeobj.rst:567
msgid ""
"For :ref:`dynamically allocated type objects `, this should just "
"be the type name, and the module name explicitly stored in the type dict as "
"the value for key ``'__module__'``."
msgstr ""
-#: ../../c-api/typeobj.rst:568
+#: ../../c-api/typeobj.rst:572
msgid ""
"For :ref:`statically allocated type objects `, the *tp_name* "
"field should contain a dot. Everything before the last dot is made "
@@ -1414,7 +1429,7 @@ msgid ""
"the last dot is made accessible as the :attr:`~type.__name__` attribute."
msgstr ""
-#: ../../c-api/typeobj.rst:574
+#: ../../c-api/typeobj.rst:578
msgid ""
"If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is "
"made accessible as the :attr:`~type.__name__` attribute, and the :attr:"
@@ -1424,80 +1439,136 @@ msgid ""
"created with pydoc."
msgstr ""
-#: ../../c-api/typeobj.rst:580
+#: ../../c-api/typeobj.rst:584
msgid ""
"This field must not be ``NULL``. It is the only required field in :c:func:"
"`PyTypeObject` (other than potentially :c:member:`~PyTypeObject."
"tp_itemsize`)."
msgstr ""
-#: ../../c-api/typeobj.rst:592
+#: ../../c-api/typeobj.rst:596
msgid ""
"These fields allow calculating the size in bytes of instances of the type."
msgstr ""
-#: ../../c-api/typeobj.rst:594
+#: ../../c-api/typeobj.rst:598
msgid ""
"There are two kinds of types: types with fixed-length instances have a zero :"
-"c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length "
-"instances have a non-zero :c:member:`~PyTypeObject.tp_itemsize` field. For "
-"a type with fixed-length instances, all instances have the same size, given "
-"in :c:member:`~PyTypeObject.tp_basicsize`."
+"c:member:`!tp_itemsize` field, types with variable-length instances have a "
+"non-zero :c:member:`!tp_itemsize` field. For a type with fixed-length "
+"instances, all instances have the same size, given in :c:member:`!"
+"tp_basicsize`. (Exceptions to this rule can be made using :c:func:"
+"`PyUnstable_Object_GC_NewWithExtraData`.)"
msgstr ""
-#: ../../c-api/typeobj.rst:599
+#: ../../c-api/typeobj.rst:605
msgid ""
"For a type with variable-length instances, the instances must have an :c:"
-"member:`~PyVarObject.ob_size` field, and the instance size is :c:member:"
-"`~PyTypeObject.tp_basicsize` plus N times :c:member:`~PyTypeObject."
-"tp_itemsize`, where N is the \"length\" of the object. The value of N is "
-"typically stored in the instance's :c:member:`~PyVarObject.ob_size` field. "
-"There are exceptions: for example, ints use a negative :c:member:"
-"`~PyVarObject.ob_size` to indicate a negative number, and N is "
-"``abs(ob_size)`` there. Also, the presence of an :c:member:`~PyVarObject."
-"ob_size` field in the instance layout doesn't mean that the instance "
-"structure is variable-length (for example, the structure for the list type "
-"has fixed-length instances, yet those instances have a meaningful :c:member:"
-"`~PyVarObject.ob_size` field)."
+"member:`~PyVarObject.ob_size` field, and the instance size is :c:member:`!"
+"tp_basicsize` plus N times :c:member:`!tp_itemsize`, where N is the "
+"\"length\" of the object."
msgstr ""
#: ../../c-api/typeobj.rst:610
msgid ""
-"The basic size includes the fields in the instance declared by the macro :c:"
-"macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to "
-"declare the instance struct) and this in turn includes the :c:member:"
-"`~PyObject._ob_prev` and :c:member:`~PyObject._ob_next` fields if they are "
-"present. This means that the only correct way to get an initializer for "
-"the :c:member:`~PyTypeObject.tp_basicsize` is to use the ``sizeof`` operator "
-"on the struct used to declare the instance layout. The basic size does not "
-"include the GC header size."
+"Functions like :c:func:`PyObject_NewVar` will take the value of N as an "
+"argument, and store in the instance's :c:member:`~PyVarObject.ob_size` "
+"field. Note that the :c:member:`~PyVarObject.ob_size` field may later be "
+"used for other purposes. For example, :py:type:`int` instances use the bits "
+"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way; the "
+"underlying storage and its size should be accessed using :c:func:"
+"`PyLong_Export`."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:620
+msgid ""
+"The :c:member:`~PyVarObject.ob_size` field should be accessed using the :c:"
+"func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:623
+msgid ""
+"Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the "
+"instance layout doesn't mean that the instance structure is variable-length. "
+"For example, the :py:type:`list` type has fixed-length instances, yet those "
+"instances have a :c:member:`~PyVarObject.ob_size` field. (As with :py:type:"
+"`int`, avoid reading lists' :c:member:`!ob_size` directly. Call :c:func:"
+"`PyList_Size` instead.)"
+msgstr ""
+
+#: ../../c-api/typeobj.rst:630
+msgid ""
+"The :c:member:`!tp_basicsize` includes size needed for data of the type's :c:"
+"member:`~PyTypeObject.tp_base`, plus any extra data needed by each instance."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:634
+msgid ""
+"The correct way to set :c:member:`!tp_basicsize` is to use the ``sizeof`` "
+"operator on the struct used to declare the instance layout. This struct must "
+"include the struct used to declare the base type. In other words, :c:member:"
+"`!tp_basicsize` must be greater than or equal to the base's :c:member:`!"
+"tp_basicsize`."
msgstr ""
-#: ../../c-api/typeobj.rst:618
+#: ../../c-api/typeobj.rst:640
msgid ""
-"A note about alignment: if the variable items require a particular "
-"alignment, this should be taken care of by the value of :c:member:"
-"`~PyTypeObject.tp_basicsize`. Example: suppose a type implements an array "
-"of ``double``. :c:member:`~PyTypeObject.tp_itemsize` is ``sizeof(double)``. "
-"It is the programmer's responsibility that :c:member:`~PyTypeObject."
-"tp_basicsize` is a multiple of ``sizeof(double)`` (assuming this is the "
-"alignment requirement for ``double``)."
+"Since every type is a subtype of :py:type:`object`, this struct must "
+"include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on whether :c:"
+"member:`~PyVarObject.ob_size` should be included). These are usually defined "
+"by the macro :c:macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD`, "
+"respectively."
msgstr ""
-#: ../../c-api/typeobj.rst:625
+#: ../../c-api/typeobj.rst:646
msgid ""
-"For any type with variable-length instances, this field must not be ``NULL``."
+"The basic size does not include the GC header size, as that header is not "
+"part of :c:macro:`PyObject_HEAD`."
msgstr ""
-#: ../../c-api/typeobj.rst:629
+#: ../../c-api/typeobj.rst:649
msgid ""
-"These fields are inherited separately by subtypes. If the base type has a "
-"non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to "
-"set :c:member:`~PyTypeObject.tp_itemsize` to a different non-zero value in a "
-"subtype (though this depends on the implementation of the base type)."
+"For cases where struct used to declare the base type is unknown, see :c:"
+"member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`."
msgstr ""
-#: ../../c-api/typeobj.rst:637
+#: ../../c-api/typeobj.rst:652
+msgid "Notes about alignment:"
+msgstr ""
+
+#: ../../c-api/typeobj.rst:654
+msgid ""
+":c:member:`!tp_basicsize` must be a multiple of ``_Alignof(PyObject)``. When "
+"using ``sizeof`` on a ``struct`` that includes :c:macro:`PyObject_HEAD`, as "
+"recommended, the compiler ensures this. When not using a C ``struct``, or "
+"when using compiler extensions like ``__attribute__((packed))``, it is up to "
+"you."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:659
+msgid ""
+"If the variable items require a particular alignment, :c:member:`!"
+"tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that "
+"alignment. For example, if a type's variable part stores a ``double``, it is "
+"your responsibility that both fields are a multiple of ``_Alignof(double)``."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:668
+msgid ""
+"These fields are inherited separately by subtypes. (That is, if the field is "
+"set to zero, :c:func:`PyType_Ready` will copy the value from the base type, "
+"indicating that the instances do not need additional storage.)"
+msgstr ""
+
+#: ../../c-api/typeobj.rst:673
+msgid ""
+"If the base type has a non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is "
+"generally not safe to set :c:member:`~PyTypeObject.tp_itemsize` to a "
+"different non-zero value in a subtype (though this depends on the "
+"implementation of the base type)."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:680
msgid ""
"A pointer to the instance destructor function. This function must be "
"defined unless the type guarantees that its instances will never be "
@@ -1505,11 +1576,11 @@ msgid ""
"The function signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:641
+#: ../../c-api/typeobj.rst:684
msgid "void tp_dealloc(PyObject *self);"
msgstr "void tp_dealloc(PyObject *self);"
-#: ../../c-api/typeobj.rst:643
+#: ../../c-api/typeobj.rst:686
msgid ""
"The destructor function is called by the :c:func:`Py_DECREF` and :c:func:"
"`Py_XDECREF` macros when the new reference count is zero. At this point, "
@@ -1527,14 +1598,14 @@ msgid ""
"allocated using :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`."
msgstr ""
-#: ../../c-api/typeobj.rst:658
+#: ../../c-api/typeobj.rst:701
msgid ""
"If the type supports garbage collection (has the :c:macro:"
"`Py_TPFLAGS_HAVE_GC` flag bit set), the destructor should call :c:func:"
"`PyObject_GC_UnTrack` before clearing any member fields."
msgstr ""
-#: ../../c-api/typeobj.rst:662
+#: ../../c-api/typeobj.rst:705
msgid ""
"static void foo_dealloc(foo_object *self) {\n"
" PyObject_GC_UnTrack(self);\n"
@@ -1548,7 +1619,7 @@ msgstr ""
" Py_TYPE(self)->tp_free((PyObject *)self);\n"
"}"
-#: ../../c-api/typeobj.rst:670
+#: ../../c-api/typeobj.rst:713
msgid ""
"Finally, if the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the "
"deallocator should release the owned reference to its type object (via :c:"
@@ -1556,7 +1627,7 @@ msgid ""
"dangling pointers, the recommended way to achieve this is:"
msgstr ""
-#: ../../c-api/typeobj.rst:676
+#: ../../c-api/typeobj.rst:719
msgid ""
"static void foo_dealloc(foo_object *self) {\n"
" PyTypeObject *tp = Py_TYPE(self);\n"
@@ -1566,28 +1637,41 @@ msgid ""
"}"
msgstr ""
-#: ../../c-api/typeobj.rst:693
+#: ../../c-api/typeobj.rst:730
+msgid ""
+"In a garbage collected Python, :c:member:`!tp_dealloc` may be called from "
+"any Python thread, not just the thread which created the object (if the "
+"object becomes part of a refcount cycle, that cycle might be collected by a "
+"garbage collection on any thread). This is not a problem for Python API "
+"calls, since the thread on which :c:member:`!tp_dealloc` is called will own "
+"the Global Interpreter Lock (GIL). However, if the object being destroyed "
+"in turn destroys objects from some other C or C++ library, care should be "
+"taken to ensure that destroying those objects on the thread which called :c:"
+"member:`!tp_dealloc` will not violate any assumptions of the library."
+msgstr ""
+
+#: ../../c-api/typeobj.rst:749
msgid ""
"An optional offset to a per-instance function that implements calling the "
"object using the :ref:`vectorcall protocol `, a more efficient "
"alternative of the simpler :c:member:`~PyTypeObject.tp_call`."
msgstr ""
-#: ../../c-api/typeobj.rst:698
+#: ../../c-api/typeobj.rst:754
msgid ""
"This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is "
"set. If so, this must be a positive integer containing the offset in the "
"instance of a :c:type:`vectorcallfunc` pointer."
msgstr ""
-#: ../../c-api/typeobj.rst:702
+#: ../../c-api/typeobj.rst:758
msgid ""
"The *vectorcallfunc* pointer may be ``NULL``, in which case the instance "
"behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the "
"instance falls back to :c:member:`~PyTypeObject.tp_call`."
msgstr ""
-#: ../../c-api/typeobj.rst:706
+#: ../../c-api/typeobj.rst:762
msgid ""
"Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:"
"`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the "
@@ -1595,13 +1679,13 @@ msgid ""
"`PyVectorcall_Call`."
msgstr ""
-#: ../../c-api/typeobj.rst:713
+#: ../../c-api/typeobj.rst:769
msgid ""
"Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was "
"used for printing to a file. In Python 3.0 to 3.7, it was unused."
msgstr ""
-#: ../../c-api/typeobj.rst:719
+#: ../../c-api/typeobj.rst:775
msgid ""
"Before version 3.12, it was not recommended for :ref:`mutable heap types "
"` to implement the vectorcall protocol. When a user sets :attr:"
@@ -1611,7 +1695,7 @@ msgid ""
"`Py_TPFLAGS_HAVE_VECTORCALL` flag."
msgstr ""
-#: ../../c-api/typeobj.rst:729
+#: ../../c-api/typeobj.rst:785
msgid ""
"This field is always inherited. However, the :c:macro:"
"`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, "
@@ -1619,11 +1703,11 @@ msgid ""
"func:`PyVectorcall_Call` is explicitly called."
msgstr ""
-#: ../../c-api/typeobj.rst:738
+#: ../../c-api/typeobj.rst:794
msgid "An optional pointer to the get-attribute-string function."
msgstr ""
-#: ../../c-api/typeobj.rst:740
+#: ../../c-api/typeobj.rst:796
msgid ""
"This field is deprecated. When it is defined, it should point to a function "
"that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, "
@@ -1631,7 +1715,7 @@ msgid ""
"attribute name."
msgstr ""
-#: ../../c-api/typeobj.rst:746 ../../c-api/typeobj.rst:942
+#: ../../c-api/typeobj.rst:802 ../../c-api/typeobj.rst:998
msgid ""
"Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject."
"tp_getattro`"
@@ -1639,7 +1723,7 @@ msgstr ""
"群組::c:member:`~PyTypeObject.tp_getattr`、:c:member:`~PyTypeObject."
"tp_getattro`"
-#: ../../c-api/typeobj.rst:748
+#: ../../c-api/typeobj.rst:804
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` "
@@ -1648,12 +1732,12 @@ msgid ""
"tp_getattro` are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:755 ../../c-api/typeobj.rst:955
+#: ../../c-api/typeobj.rst:811 ../../c-api/typeobj.rst:1011
msgid ""
"An optional pointer to the function for setting and deleting attributes."
msgstr ""
-#: ../../c-api/typeobj.rst:757
+#: ../../c-api/typeobj.rst:813
msgid ""
"This field is deprecated. When it is defined, it should point to a function "
"that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, "
@@ -1661,7 +1745,7 @@ msgid ""
"attribute name."
msgstr ""
-#: ../../c-api/typeobj.rst:763 ../../c-api/typeobj.rst:968
+#: ../../c-api/typeobj.rst:819 ../../c-api/typeobj.rst:1024
msgid ""
"Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject."
"tp_setattro`"
@@ -1669,7 +1753,7 @@ msgstr ""
"群組::c:member:`~PyTypeObject.tp_setattr`、:c:member:`~PyTypeObject."
"tp_setattro`"
-#: ../../c-api/typeobj.rst:765
+#: ../../c-api/typeobj.rst:821
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` "
@@ -1678,38 +1762,38 @@ msgid ""
"tp_setattro` are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:772
+#: ../../c-api/typeobj.rst:828
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement :term:`awaitable` and :term:`asynchronous iterator` "
"protocols at the C-level. See :ref:`async-structs` for details."
msgstr ""
-#: ../../c-api/typeobj.rst:776
+#: ../../c-api/typeobj.rst:832
msgid "Formerly known as ``tp_compare`` and ``tp_reserved``."
msgstr ""
-#: ../../c-api/typeobj.rst:781
+#: ../../c-api/typeobj.rst:837
msgid ""
"The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
-#: ../../c-api/typeobj.rst:789
+#: ../../c-api/typeobj.rst:845
msgid ""
"An optional pointer to a function that implements the built-in function :"
"func:`repr`."
msgstr ""
-#: ../../c-api/typeobj.rst:792
+#: ../../c-api/typeobj.rst:848
msgid "The signature is the same as for :c:func:`PyObject_Repr`::"
msgstr ""
-#: ../../c-api/typeobj.rst:794
+#: ../../c-api/typeobj.rst:850
msgid "PyObject *tp_repr(PyObject *self);"
msgstr "PyObject *tp_repr(PyObject *self);"
-#: ../../c-api/typeobj.rst:796
+#: ../../c-api/typeobj.rst:852
msgid ""
"The function must return a string or a Unicode object. Ideally, this "
"function should return a string that, when passed to :func:`eval`, given a "
@@ -1718,85 +1802,85 @@ msgid ""
"``'>'`` from which both the type and the value of the object can be deduced."
msgstr ""
-#: ../../c-api/typeobj.rst:807 ../../c-api/typeobj.rst:886
-#: ../../c-api/typeobj.rst:923 ../../c-api/typeobj.rst:948
-#: ../../c-api/typeobj.rst:974 ../../c-api/typeobj.rst:1015
-#: ../../c-api/typeobj.rst:1570 ../../c-api/typeobj.rst:1604
-#: ../../c-api/typeobj.rst:1721 ../../c-api/typeobj.rst:1754
-#: ../../c-api/typeobj.rst:1829 ../../c-api/typeobj.rst:1870
-#: ../../c-api/typeobj.rst:1888 ../../c-api/typeobj.rst:1930
-#: ../../c-api/typeobj.rst:1951 ../../c-api/typeobj.rst:1982
+#: ../../c-api/typeobj.rst:863 ../../c-api/typeobj.rst:942
+#: ../../c-api/typeobj.rst:979 ../../c-api/typeobj.rst:1004
+#: ../../c-api/typeobj.rst:1030 ../../c-api/typeobj.rst:1071
+#: ../../c-api/typeobj.rst:1626 ../../c-api/typeobj.rst:1660
+#: ../../c-api/typeobj.rst:1777 ../../c-api/typeobj.rst:1810
+#: ../../c-api/typeobj.rst:1885 ../../c-api/typeobj.rst:1926
+#: ../../c-api/typeobj.rst:1944 ../../c-api/typeobj.rst:1986
+#: ../../c-api/typeobj.rst:2007 ../../c-api/typeobj.rst:2038
msgid "**Default:**"
msgstr "**預設:**"
-#: ../../c-api/typeobj.rst:809
+#: ../../c-api/typeobj.rst:865
msgid ""
"When this field is not set, a string of the form ``<%s object at %p>`` is "
"returned, where ``%s`` is replaced by the type name, and ``%p`` by the "
"object's memory address."
msgstr ""
-#: ../../c-api/typeobj.rst:816
+#: ../../c-api/typeobj.rst:872
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the number protocol. These fields are documented "
"in :ref:`number-structs`."
msgstr ""
-#: ../../c-api/typeobj.rst:822
+#: ../../c-api/typeobj.rst:878
msgid ""
"The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
-#: ../../c-api/typeobj.rst:828
+#: ../../c-api/typeobj.rst:884
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the sequence protocol. These fields are documented "
"in :ref:`sequence-structs`."
msgstr ""
-#: ../../c-api/typeobj.rst:834
+#: ../../c-api/typeobj.rst:890
msgid ""
"The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
-#: ../../c-api/typeobj.rst:840
+#: ../../c-api/typeobj.rst:896
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the mapping protocol. These fields are documented "
"in :ref:`mapping-structs`."
msgstr ""
-#: ../../c-api/typeobj.rst:846
+#: ../../c-api/typeobj.rst:902
msgid ""
"The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
-#: ../../c-api/typeobj.rst:854
+#: ../../c-api/typeobj.rst:910
msgid ""
"An optional pointer to a function that implements the built-in function :"
"func:`hash`."
msgstr ""
-#: ../../c-api/typeobj.rst:857
+#: ../../c-api/typeobj.rst:913
msgid "The signature is the same as for :c:func:`PyObject_Hash`::"
msgstr ""
-#: ../../c-api/typeobj.rst:859
+#: ../../c-api/typeobj.rst:915
msgid "Py_hash_t tp_hash(PyObject *);"
msgstr "Py_hash_t tp_hash(PyObject *);"
-#: ../../c-api/typeobj.rst:861
+#: ../../c-api/typeobj.rst:917
msgid ""
"The value ``-1`` should not be returned as a normal return value; when an "
"error occurs during the computation of the hash value, the function should "
"set an exception and return ``-1``."
msgstr ""
-#: ../../c-api/typeobj.rst:865
+#: ../../c-api/typeobj.rst:921
msgid ""
"When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` "
"is not set), an attempt to take the hash of the object raises :exc:"
@@ -1804,7 +1888,7 @@ msgid ""
"`PyObject_HashNotImplemented`."
msgstr ""
-#: ../../c-api/typeobj.rst:869
+#: ../../c-api/typeobj.rst:925
msgid ""
"This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to "
"block inheritance of the hash method from a parent type. This is interpreted "
@@ -1815,7 +1899,7 @@ msgid ""
"`PyObject_HashNotImplemented`."
msgstr ""
-#: ../../c-api/typeobj.rst:879 ../../c-api/typeobj.rst:1563
+#: ../../c-api/typeobj.rst:935 ../../c-api/typeobj.rst:1619
msgid ""
"Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject."
"tp_richcompare`"
@@ -1823,7 +1907,7 @@ msgstr ""
"群組::c:member:`~PyTypeObject.tp_hash`、:c:member:`~PyTypeObject."
"tp_richcompare`"
-#: ../../c-api/typeobj.rst:881
+#: ../../c-api/typeobj.rst:937
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject."
@@ -1832,22 +1916,22 @@ msgid ""
"are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:888
+#: ../../c-api/typeobj.rst:944
msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`."
msgstr ""
-#: ../../c-api/typeobj.rst:893
+#: ../../c-api/typeobj.rst:949
msgid ""
"An optional pointer to a function that implements calling the object. This "
"should be ``NULL`` if the object is not callable. The signature is the same "
"as for :c:func:`PyObject_Call`::"
msgstr ""
-#: ../../c-api/typeobj.rst:897
+#: ../../c-api/typeobj.rst:953
msgid "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);"
msgstr "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);"
-#: ../../c-api/typeobj.rst:906
+#: ../../c-api/typeobj.rst:962
msgid ""
"An optional pointer to a function that implements the built-in operation :"
"func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls "
@@ -1856,15 +1940,15 @@ msgid ""
"this handler.)"
msgstr ""
-#: ../../c-api/typeobj.rst:911
+#: ../../c-api/typeobj.rst:967
msgid "The signature is the same as for :c:func:`PyObject_Str`::"
msgstr ""
-#: ../../c-api/typeobj.rst:913
+#: ../../c-api/typeobj.rst:969
msgid "PyObject *tp_str(PyObject *self);"
msgstr "PyObject *tp_str(PyObject *self);"
-#: ../../c-api/typeobj.rst:915
+#: ../../c-api/typeobj.rst:971
msgid ""
"The function must return a string or a Unicode object. It should be a "
"\"friendly\" string representation of the object, as this is the "
@@ -1872,32 +1956,32 @@ msgid ""
"function."
msgstr ""
-#: ../../c-api/typeobj.rst:925
+#: ../../c-api/typeobj.rst:981
msgid ""
"When this field is not set, :c:func:`PyObject_Repr` is called to return a "
"string representation."
msgstr ""
-#: ../../c-api/typeobj.rst:931
+#: ../../c-api/typeobj.rst:987
msgid "An optional pointer to the get-attribute function."
msgstr ""
-#: ../../c-api/typeobj.rst:933
+#: ../../c-api/typeobj.rst:989
msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::"
msgstr ""
-#: ../../c-api/typeobj.rst:935
+#: ../../c-api/typeobj.rst:991
msgid "PyObject *tp_getattro(PyObject *self, PyObject *attr);"
msgstr "PyObject *tp_getattro(PyObject *self, PyObject *attr);"
-#: ../../c-api/typeobj.rst:937
+#: ../../c-api/typeobj.rst:993
msgid ""
"It is usually convenient to set this field to :c:func:"
"`PyObject_GenericGetAttr`, which implements the normal way of looking for "
"object attributes."
msgstr ""
-#: ../../c-api/typeobj.rst:944
+#: ../../c-api/typeobj.rst:1000
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` "
@@ -1906,19 +1990,19 @@ msgid ""
"tp_getattro` are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:950
+#: ../../c-api/typeobj.rst:1006
msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`."
msgstr ""
-#: ../../c-api/typeobj.rst:957
+#: ../../c-api/typeobj.rst:1013
msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::"
msgstr ""
-#: ../../c-api/typeobj.rst:959
+#: ../../c-api/typeobj.rst:1015
msgid "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);"
msgstr "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);"
-#: ../../c-api/typeobj.rst:961
+#: ../../c-api/typeobj.rst:1017
msgid ""
"In addition, setting *value* to ``NULL`` to delete an attribute must be "
"supported. It is usually convenient to set this field to :c:func:"
@@ -1926,7 +2010,7 @@ msgid ""
"attributes."
msgstr ""
-#: ../../c-api/typeobj.rst:970
+#: ../../c-api/typeobj.rst:1026
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` "
@@ -1935,24 +2019,24 @@ msgid ""
"tp_setattro` are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:976
+#: ../../c-api/typeobj.rst:1032
msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`."
msgstr ""
-#: ../../c-api/typeobj.rst:981
+#: ../../c-api/typeobj.rst:1037
msgid ""
"Pointer to an additional structure that contains fields relevant only to "
"objects which implement the buffer interface. These fields are documented "
"in :ref:`buffer-structs`."
msgstr ""
-#: ../../c-api/typeobj.rst:987
+#: ../../c-api/typeobj.rst:1043
msgid ""
"The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the "
"contained fields are inherited individually."
msgstr ""
-#: ../../c-api/typeobj.rst:993
+#: ../../c-api/typeobj.rst:1049
msgid ""
"This field is a bit mask of various flags. Some flags indicate variant "
"semantics for certain situations; others are used to indicate that certain "
@@ -1964,7 +2048,7 @@ msgid ""
"accessed and must be considered to have a zero or ``NULL`` value instead."
msgstr ""
-#: ../../c-api/typeobj.rst:1003
+#: ../../c-api/typeobj.rst:1059
msgid ""
"Inheritance of this field is complicated. Most flag bits are inherited "
"individually, i.e. if the base type has a flag bit set, the subtype inherits "
@@ -1980,7 +2064,7 @@ msgid ""
"*really* inherited individually?"
msgstr ""
-#: ../../c-api/typeobj.rst:1017
+#: ../../c-api/typeobj.rst:1073
msgid ""
":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | "
"Py_TPFLAGS_BASETYPE``."
@@ -1988,11 +2072,11 @@ msgstr ""
":c:data:`PyBaseObject_Type` 使用 ``Py_TPFLAGS_DEFAULT | "
"Py_TPFLAGS_BASETYPE``。"
-#: ../../c-api/typeobj.rst:1020
+#: ../../c-api/typeobj.rst:1076
msgid "**Bit Masks:**"
msgstr ""
-#: ../../c-api/typeobj.rst:1024
+#: ../../c-api/typeobj.rst:1080
msgid ""
"The following bit masks are currently defined; these can be ORed together "
"using the ``|`` operator to form the value of the :c:member:`~PyTypeObject."
@@ -2001,7 +2085,7 @@ msgid ""
"zero."
msgstr ""
-#: ../../c-api/typeobj.rst:1031
+#: ../../c-api/typeobj.rst:1087
msgid ""
"This bit is set when the type object itself is allocated on the heap, for "
"example, types created dynamically using :c:func:`PyType_FromSpec`. In this "
@@ -2014,32 +2098,32 @@ msgid ""
"reference cycle with their own module object."
msgstr ""
-#: ../../c-api/typeobj.rst:1042 ../../c-api/typeobj.rst:1053
-#: ../../c-api/typeobj.rst:1063 ../../c-api/typeobj.rst:1073
-#: ../../c-api/typeobj.rst:1105
+#: ../../c-api/typeobj.rst:1098 ../../c-api/typeobj.rst:1109
+#: ../../c-api/typeobj.rst:1119 ../../c-api/typeobj.rst:1129
+#: ../../c-api/typeobj.rst:1161
msgid "???"
msgstr "???"
-#: ../../c-api/typeobj.rst:1047
+#: ../../c-api/typeobj.rst:1103
msgid ""
"This bit is set when the type can be used as the base type of another type. "
"If this bit is clear, the type cannot be subtyped (similar to a \"final\" "
"class in Java)."
msgstr ""
-#: ../../c-api/typeobj.rst:1058
+#: ../../c-api/typeobj.rst:1114
msgid ""
"This bit is set when the type object has been fully initialized by :c:func:"
"`PyType_Ready`."
msgstr ""
-#: ../../c-api/typeobj.rst:1068
+#: ../../c-api/typeobj.rst:1124
msgid ""
"This bit is set while :c:func:`PyType_Ready` is in the process of "
"initializing the type object."
msgstr ""
-#: ../../c-api/typeobj.rst:1078
+#: ../../c-api/typeobj.rst:1134
msgid ""
"This bit is set when the object supports garbage collection. If this bit is "
"set, instances must be created using :c:macro:`PyObject_GC_New` and "
@@ -2049,14 +2133,14 @@ msgid ""
"tp_clear` are present in the type object."
msgstr ""
-#: ../../c-api/typeobj.rst:1087 ../../c-api/typeobj.rst:1428
-#: ../../c-api/typeobj.rst:1502
+#: ../../c-api/typeobj.rst:1143 ../../c-api/typeobj.rst:1484
+#: ../../c-api/typeobj.rst:1558
msgid ""
"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject."
"tp_traverse`, :c:member:`~PyTypeObject.tp_clear`"
msgstr ""
-#: ../../c-api/typeobj.rst:1089
+#: ../../c-api/typeobj.rst:1145
msgid ""
"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:"
"member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` "
@@ -2066,105 +2150,106 @@ msgid ""
"values."
msgstr ""
-#: ../../c-api/typeobj.rst:1099
+#: ../../c-api/typeobj.rst:1155
msgid ""
"This is a bitmask of all the bits that pertain to the existence of certain "
"fields in the type object and its extension structures. Currently, it "
"includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`."
msgstr ""
-#: ../../c-api/typeobj.rst:1110
+#: ../../c-api/typeobj.rst:1166
msgid "This bit indicates that objects behave like unbound methods."
msgstr ""
-#: ../../c-api/typeobj.rst:1112
+#: ../../c-api/typeobj.rst:1168
msgid "If this flag is set for ``type(meth)``, then:"
msgstr ""
-#: ../../c-api/typeobj.rst:1114
+#: ../../c-api/typeobj.rst:1170
msgid ""
"``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be "
"equivalent to ``meth(obj, *args, **kwds)``."
msgstr ""
-#: ../../c-api/typeobj.rst:1117
+#: ../../c-api/typeobj.rst:1173
msgid ""
"``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to "
"``meth(*args, **kwds)``."
msgstr ""
-#: ../../c-api/typeobj.rst:1120
+#: ../../c-api/typeobj.rst:1176
msgid ""
"This flag enables an optimization for typical method calls like ``obj."
"meth()``: it avoids creating a temporary \"bound method\" object for ``obj."
"meth``."
msgstr ""
-#: ../../c-api/typeobj.rst:1128
+#: ../../c-api/typeobj.rst:1184
msgid ""
"This flag is never inherited by types without the :c:macro:"
"`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited "
"whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:1134
+#: ../../c-api/typeobj.rst:1190
msgid ""
-"This bit indicates that instances of the class have a `~object.__dict__` "
-"attribute, and that the space for the dictionary is managed by the VM."
+"This bit indicates that instances of the class have a :attr:`~object."
+"__dict__` attribute, and that the space for the dictionary is managed by the "
+"VM."
msgstr ""
-#: ../../c-api/typeobj.rst:1137
+#: ../../c-api/typeobj.rst:1193
msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set."
msgstr ""
-#: ../../c-api/typeobj.rst:1139
+#: ../../c-api/typeobj.rst:1195
msgid ""
"The type traverse function must call :c:func:`PyObject_VisitManagedDict` and "
"its clear function must call :c:func:`PyObject_ClearManagedDict`."
msgstr ""
-#: ../../c-api/typeobj.rst:1146
+#: ../../c-api/typeobj.rst:1202
msgid ""
"This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` "
"field is set in a superclass."
msgstr ""
-#: ../../c-api/typeobj.rst:1152
+#: ../../c-api/typeobj.rst:1208
msgid ""
"This bit indicates that instances of the class should be weakly "
"referenceable."
msgstr ""
-#: ../../c-api/typeobj.rst:1159
+#: ../../c-api/typeobj.rst:1215
msgid ""
"This flag is inherited unless the :c:member:`~PyTypeObject."
"tp_weaklistoffset` field is set in a superclass."
msgstr ""
-#: ../../c-api/typeobj.rst:1165
+#: ../../c-api/typeobj.rst:1221
msgid ""
"Only usable with variable-size types, i.e. ones with non-zero :c:member:"
"`~PyTypeObject.tp_itemsize`."
msgstr ""
-#: ../../c-api/typeobj.rst:1168
+#: ../../c-api/typeobj.rst:1224
msgid ""
"Indicates that the variable-sized portion of an instance of this type is at "
"the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-"
">tp_basicsize`` (which may be different in each subclass)."
msgstr ""
-#: ../../c-api/typeobj.rst:1173
+#: ../../c-api/typeobj.rst:1229
msgid ""
"When setting this flag, be sure that all superclasses either use this memory "
"layout, or are not variable-sized. Python does not check this."
msgstr ""
-#: ../../c-api/typeobj.rst:1181
+#: ../../c-api/typeobj.rst:1237
msgid "This flag is inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:1195
+#: ../../c-api/typeobj.rst:1251
msgid ""
"These flags are used by functions such as :c:func:`PyLong_Check` to quickly "
"determine if a type is a subclass of a built-in type; such specific checks "
@@ -2174,90 +2259,90 @@ msgid ""
"behave differently depending on what kind of check is used."
msgstr ""
-#: ../../c-api/typeobj.rst:1206
+#: ../../c-api/typeobj.rst:1262
msgid ""
"This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is "
"present in the type structure."
msgstr ""
-#: ../../c-api/typeobj.rst:1211
+#: ../../c-api/typeobj.rst:1267
msgid ""
"This flag isn't necessary anymore, as the interpreter assumes the :c:member:"
"`~PyTypeObject.tp_finalize` slot is always present in the type structure."
msgstr ""
-#: ../../c-api/typeobj.rst:1219
+#: ../../c-api/typeobj.rst:1275
msgid ""
"This bit is set when the class implements the :ref:`vectorcall protocol "
"`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for "
"details."
msgstr ""
-#: ../../c-api/typeobj.rst:1225
+#: ../../c-api/typeobj.rst:1281
msgid ""
"This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:1232
+#: ../../c-api/typeobj.rst:1288
msgid ""
"This flag is now removed from a class when the class's :py:meth:`~object."
"__call__` method is reassigned."
msgstr ""
-#: ../../c-api/typeobj.rst:1235
+#: ../../c-api/typeobj.rst:1291
msgid "This flag can now be inherited by mutable classes."
msgstr ""
-#: ../../c-api/typeobj.rst:1239
+#: ../../c-api/typeobj.rst:1295
msgid ""
"This bit is set for type objects that are immutable: type attributes cannot "
"be set nor deleted."
msgstr ""
-#: ../../c-api/typeobj.rst:1241
+#: ../../c-api/typeobj.rst:1297
msgid ""
":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types "
"`."
msgstr ""
-#: ../../c-api/typeobj.rst:1246
+#: ../../c-api/typeobj.rst:1302
msgid "This flag is not inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:1252
+#: ../../c-api/typeobj.rst:1308
msgid ""
"Disallow creating instances of the type: set :c:member:`~PyTypeObject."
"tp_new` to NULL and don't create the ``__new__`` key in the type dictionary."
msgstr ""
-#: ../../c-api/typeobj.rst:1256
+#: ../../c-api/typeobj.rst:1312
msgid ""
"The flag must be set before creating the type, not after. For example, it "
"must be set before :c:func:`PyType_Ready` is called on the type."
msgstr ""
-#: ../../c-api/typeobj.rst:1259
+#: ../../c-api/typeobj.rst:1315
msgid ""
"The flag is set automatically on :ref:`static types ` if :c:"
"member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:"
"member:`~PyTypeObject.tp_new` is NULL."
msgstr ""
-#: ../../c-api/typeobj.rst:1265
+#: ../../c-api/typeobj.rst:1321
msgid ""
"This flag is not inherited. However, subclasses will not be instantiable "
"unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is "
"only possible via the C API)."
msgstr ""
-#: ../../c-api/typeobj.rst:1272
+#: ../../c-api/typeobj.rst:1328
msgid ""
"To disallow instantiating a class directly but allow instantiating its "
"subclasses (e.g. for an :term:`abstract base class`), do not use this flag. "
"Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses."
msgstr ""
-#: ../../c-api/typeobj.rst:1283
+#: ../../c-api/typeobj.rst:1339
msgid ""
"This bit indicates that instances of the class may match mapping patterns "
"when used as the subject of a :keyword:`match` block. It is automatically "
@@ -2265,23 +2350,23 @@ msgid ""
"unset when registering :class:`collections.abc.Sequence`."
msgstr ""
-#: ../../c-api/typeobj.rst:1290 ../../c-api/typeobj.rst:1312
+#: ../../c-api/typeobj.rst:1346 ../../c-api/typeobj.rst:1368
msgid ""
":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are "
"mutually exclusive; it is an error to enable both flags simultaneously."
msgstr ""
-#: ../../c-api/typeobj.rst:1295
+#: ../../c-api/typeobj.rst:1351
msgid ""
"This flag is inherited by types that do not already set :c:macro:"
"`Py_TPFLAGS_SEQUENCE`."
msgstr ""
-#: ../../c-api/typeobj.rst:1298 ../../c-api/typeobj.rst:1320
+#: ../../c-api/typeobj.rst:1354 ../../c-api/typeobj.rst:1376
msgid ":pep:`634` -- Structural Pattern Matching: Specification"
msgstr ""
-#: ../../c-api/typeobj.rst:1305
+#: ../../c-api/typeobj.rst:1361
msgid ""
"This bit indicates that instances of the class may match sequence patterns "
"when used as the subject of a :keyword:`match` block. It is automatically "
@@ -2289,53 +2374,53 @@ msgid ""
"unset when registering :class:`collections.abc.Mapping`."
msgstr ""
-#: ../../c-api/typeobj.rst:1317
+#: ../../c-api/typeobj.rst:1373
msgid ""
"This flag is inherited by types that do not already set :c:macro:"
"`Py_TPFLAGS_MAPPING`."
msgstr ""
-#: ../../c-api/typeobj.rst:1327
+#: ../../c-api/typeobj.rst:1383
msgid ""
"Internal. Do not set or unset this flag. To indicate that a class has "
"changed call :c:func:`PyType_Modified`"
msgstr ""
-#: ../../c-api/typeobj.rst:1331
+#: ../../c-api/typeobj.rst:1387
msgid ""
"This flag is present in header files, but is not be used. It will be removed "
"in a future version of CPython"
msgstr ""
-#: ../../c-api/typeobj.rst:1337
+#: ../../c-api/typeobj.rst:1393
msgid ""
"An optional pointer to a NUL-terminated C string giving the docstring for "
"this type object. This is exposed as the :attr:`~type.__doc__` attribute on "
"the type and instances of the type."
msgstr ""
-#: ../../c-api/typeobj.rst:1343
+#: ../../c-api/typeobj.rst:1399
msgid "This field is *not* inherited by subtypes."
msgstr ""
-#: ../../c-api/typeobj.rst:1348
+#: ../../c-api/typeobj.rst:1404
msgid ""
"An optional pointer to a traversal function for the garbage collector. This "
"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The "
"signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1351
+#: ../../c-api/typeobj.rst:1407
msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);"
msgstr "int tp_traverse(PyObject *self, visitproc visit, void *arg);"
-#: ../../c-api/typeobj.rst:1353 ../../c-api/typeobj.rst:1497
+#: ../../c-api/typeobj.rst:1409 ../../c-api/typeobj.rst:1553
msgid ""
"More information about Python's garbage collection scheme can be found in "
"section :ref:`supporting-cycle-detection`."
msgstr ""
-#: ../../c-api/typeobj.rst:1356
+#: ../../c-api/typeobj.rst:1412
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage "
"collector to detect reference cycles. A typical implementation of a :c:"
@@ -2345,7 +2430,7 @@ msgid ""
"`!_thread` extension module::"
msgstr ""
-#: ../../c-api/typeobj.rst:1362
+#: ../../c-api/typeobj.rst:1418
msgid ""
"static int\n"
"local_traverse(localobject *self, visitproc visit, void *arg)\n"
@@ -2365,7 +2450,7 @@ msgstr ""
" return 0;\n"
"}"
-#: ../../c-api/typeobj.rst:1371
+#: ../../c-api/typeobj.rst:1427
msgid ""
"Note that :c:func:`Py_VISIT` is called only on those members that can "
"participate in reference cycles. Although there is also a ``self->key`` "
@@ -2373,48 +2458,50 @@ msgid ""
"part of a reference cycle."
msgstr ""
-#: ../../c-api/typeobj.rst:1375
+#: ../../c-api/typeobj.rst:1431
msgid ""
"On the other hand, even if you know a member can never be part of a cycle, "
"as a debugging aid you may want to visit it anyway just so the :mod:`gc` "
"module's :func:`~gc.get_referents` function will include it."
msgstr ""
-#: ../../c-api/typeobj.rst:1379
+#: ../../c-api/typeobj.rst:1435
msgid ""
"Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::"
msgstr ""
-#: ../../c-api/typeobj.rst:1381
+#: ../../c-api/typeobj.rst:1437
msgid "Py_VISIT(Py_TYPE(self));"
-msgstr ""
+msgstr "Py_VISIT(Py_TYPE(self));"
-#: ../../c-api/typeobj.rst:1383
+#: ../../c-api/typeobj.rst:1439
msgid ""
"It is only needed since Python 3.9. To support Python 3.8 and older, this "
"line must be conditional::"
msgstr ""
-#: ../../c-api/typeobj.rst:1386
+#: ../../c-api/typeobj.rst:1442
msgid ""
"#if PY_VERSION_HEX >= 0x03090000\n"
" Py_VISIT(Py_TYPE(self));\n"
"#endif"
msgstr ""
+"#if PY_VERSION_HEX >= 0x03090000\n"
+" Py_VISIT(Py_TYPE(self));\n"
+"#endif"
-#: ../../c-api/typeobj.rst:1390
+#: ../../c-api/typeobj.rst:1446
msgid ""
"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:"
"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:"
"`PyObject_VisitManagedDict` like this::"
msgstr ""
-#: ../../c-api/typeobj.rst:1394
-#, fuzzy
+#: ../../c-api/typeobj.rst:1450
msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);"
-msgstr "PyObject *tp_iternext(PyObject *self);"
+msgstr "PyObject_VisitManagedDict((PyObject*)self, visit, arg);"
-#: ../../c-api/typeobj.rst:1397
+#: ../../c-api/typeobj.rst:1453
msgid ""
"When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members "
"that the instance *owns* (by having :term:`strong references ` hold a reference to "
"their type. Their traversal function must therefore either visit :c:func:"
@@ -2443,14 +2530,14 @@ msgid ""
"superclass). If they do not, the type object may not be garbage-collected."
msgstr ""
-#: ../../c-api/typeobj.rst:1421
+#: ../../c-api/typeobj.rst:1477
msgid ""
"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in "
"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses."
msgstr ""
-#: ../../c-api/typeobj.rst:1430
+#: ../../c-api/typeobj.rst:1486
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:"
@@ -2458,18 +2545,18 @@ msgid ""
"are all inherited from the base type if they are all zero in the subtype."
msgstr ""
-#: ../../c-api/typeobj.rst:1438
+#: ../../c-api/typeobj.rst:1494
msgid ""
"An optional pointer to a clear function for the garbage collector. This is "
"only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The "
"signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1441
+#: ../../c-api/typeobj.rst:1497
msgid "int tp_clear(PyObject *);"
msgstr "int tp_clear(PyObject *);"
-#: ../../c-api/typeobj.rst:1443
+#: ../../c-api/typeobj.rst:1499
msgid ""
"The :c:member:`~PyTypeObject.tp_clear` member function is used to break "
"reference cycles in cyclic garbage detected by the garbage collector. Taken "
@@ -2484,7 +2571,7 @@ msgid ""
"good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`."
msgstr ""
-#: ../../c-api/typeobj.rst:1453
+#: ../../c-api/typeobj.rst:1509
msgid ""
"Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the "
"instance's references to those of its members that may be Python objects, "
@@ -2492,7 +2579,7 @@ msgid ""
"example::"
msgstr ""
-#: ../../c-api/typeobj.rst:1457
+#: ../../c-api/typeobj.rst:1513
msgid ""
"static int\n"
"local_clear(localobject *self)\n"
@@ -2514,7 +2601,7 @@ msgstr ""
" return 0;\n"
"}"
-#: ../../c-api/typeobj.rst:1467
+#: ../../c-api/typeobj.rst:1523
msgid ""
"The :c:func:`Py_CLEAR` macro should be used, because clearing references is "
"delicate: the reference to the contained object must not be released (via :"
@@ -2529,19 +2616,18 @@ msgid ""
"performs the operations in a safe order."
msgstr ""
-#: ../../c-api/typeobj.rst:1479
+#: ../../c-api/typeobj.rst:1535
msgid ""
"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:"
"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:"
"`PyObject_ClearManagedDict` like this::"
msgstr ""
-#: ../../c-api/typeobj.rst:1483
-#, fuzzy
+#: ../../c-api/typeobj.rst:1539
msgid "PyObject_ClearManagedDict((PyObject*)self);"
-msgstr "PyObject *am_anext(PyObject *self);"
+msgstr "PyObject_ClearManagedDict((PyObject*)self);"
-#: ../../c-api/typeobj.rst:1485
+#: ../../c-api/typeobj.rst:1541
msgid ""
"Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before "
"an instance is deallocated. For example, when reference counting is enough "
@@ -2549,7 +2635,7 @@ msgid ""
"is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly."
msgstr ""
-#: ../../c-api/typeobj.rst:1491
+#: ../../c-api/typeobj.rst:1547
msgid ""
"Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break "
"reference cycles, it's not necessary to clear contained objects like Python "
@@ -2559,7 +2645,7 @@ msgid ""
"invoke :c:member:`~PyTypeObject.tp_clear`."
msgstr ""
-#: ../../c-api/typeobj.rst:1504
+#: ../../c-api/typeobj.rst:1560
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :"
@@ -2567,22 +2653,22 @@ msgid ""
"are all inherited from the base type if they are all zero in the subtype."
msgstr ""
-#: ../../c-api/typeobj.rst:1512
+#: ../../c-api/typeobj.rst:1568
msgid ""
"An optional pointer to the rich comparison function, whose signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1514
+#: ../../c-api/typeobj.rst:1570
msgid "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);"
msgstr "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);"
-#: ../../c-api/typeobj.rst:1516
+#: ../../c-api/typeobj.rst:1572
msgid ""
"The first parameter is guaranteed to be an instance of the type that is "
"defined by :c:type:`PyTypeObject`."
msgstr ""
-#: ../../c-api/typeobj.rst:1519
+#: ../../c-api/typeobj.rst:1575
msgid ""
"The function should return the result of the comparison (usually ``Py_True`` "
"or ``Py_False``). If the comparison is undefined, it must return "
@@ -2590,50 +2676,50 @@ msgid ""
"set an exception condition."
msgstr ""
-#: ../../c-api/typeobj.rst:1524
+#: ../../c-api/typeobj.rst:1580
msgid ""
"The following constants are defined to be used as the third argument for :c:"
"member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:"
msgstr ""
-#: ../../c-api/typeobj.rst:1530
+#: ../../c-api/typeobj.rst:1586
msgid "Constant"
msgstr "常數"
-#: ../../c-api/typeobj.rst:1530
+#: ../../c-api/typeobj.rst:1586
msgid "Comparison"
msgstr ""
-#: ../../c-api/typeobj.rst:1532
+#: ../../c-api/typeobj.rst:1588
msgid "``<``"
msgstr "``<``"
-#: ../../c-api/typeobj.rst:1534
+#: ../../c-api/typeobj.rst:1590
msgid "``<=``"
msgstr "``<=``"
-#: ../../c-api/typeobj.rst:1536
+#: ../../c-api/typeobj.rst:1592
msgid "``==``"
msgstr "``==``"
-#: ../../c-api/typeobj.rst:1538
+#: ../../c-api/typeobj.rst:1594
msgid "``!=``"
msgstr "``!=``"
-#: ../../c-api/typeobj.rst:1540
+#: ../../c-api/typeobj.rst:1596
msgid "``>``"
msgstr "``>``"
-#: ../../c-api/typeobj.rst:1542
+#: ../../c-api/typeobj.rst:1598
msgid "``>=``"
msgstr "``>=``"
-#: ../../c-api/typeobj.rst:1545
+#: ../../c-api/typeobj.rst:1601
msgid ""
"The following macro is defined to ease writing rich comparison functions:"
msgstr ""
-#: ../../c-api/typeobj.rst:1549
+#: ../../c-api/typeobj.rst:1605
msgid ""
"Return ``Py_True`` or ``Py_False`` from the function, depending on the "
"result of a comparison. VAL_A and VAL_B must be orderable by C comparison "
@@ -2641,15 +2727,15 @@ msgid ""
"specifies the requested operation, as for :c:func:`PyObject_RichCompare`."
msgstr ""
-#: ../../c-api/typeobj.rst:1555
+#: ../../c-api/typeobj.rst:1611
msgid "The returned value is a new :term:`strong reference`."
msgstr ""
-#: ../../c-api/typeobj.rst:1557
+#: ../../c-api/typeobj.rst:1613
msgid "On error, sets an exception and returns ``NULL`` from the function."
msgstr ""
-#: ../../c-api/typeobj.rst:1565
+#: ../../c-api/typeobj.rst:1621
msgid ""
"This field is inherited by subtypes together with :c:member:`~PyTypeObject."
"tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:"
@@ -2657,7 +2743,7 @@ msgid ""
"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:1572
+#: ../../c-api/typeobj.rst:1628
msgid ""
":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject."
"tp_richcompare` implementation, which may be inherited. However, if only :c:"
@@ -2666,13 +2752,13 @@ msgid ""
"comparisons."
msgstr ""
-#: ../../c-api/typeobj.rst:1581
+#: ../../c-api/typeobj.rst:1637
msgid ""
"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` "
"should be used instead, if at all possible."
msgstr ""
-#: ../../c-api/typeobj.rst:1584
+#: ../../c-api/typeobj.rst:1640
msgid ""
"If the instances of this type are weakly referenceable, this field is "
"greater than zero and contains the offset in the instance structure of the "
@@ -2682,19 +2768,19 @@ msgid ""
"`PyObject*` which is initialized to ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:1591
+#: ../../c-api/typeobj.rst:1647
msgid ""
"Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that "
"is the list head for weak references to the type object itself."
msgstr ""
-#: ../../c-api/typeobj.rst:1594
+#: ../../c-api/typeobj.rst:1650
msgid ""
"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit "
"and :c:member:`~PyTypeObject.tp_weaklistoffset`."
msgstr ""
-#: ../../c-api/typeobj.rst:1599
+#: ../../c-api/typeobj.rst:1655
msgid ""
"This field is inherited by subtypes, but see the rules listed below. A "
"subtype may override this offset; this means that the subtype uses a "
@@ -2703,7 +2789,7 @@ msgid ""
"not be a problem."
msgstr ""
-#: ../../c-api/typeobj.rst:1606
+#: ../../c-api/typeobj.rst:1662
msgid ""
"If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:"
"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject."
@@ -2711,32 +2797,32 @@ msgid ""
"unsafe to use this field."
msgstr ""
-#: ../../c-api/typeobj.rst:1614
+#: ../../c-api/typeobj.rst:1670
msgid ""
"An optional pointer to a function that returns an :term:`iterator` for the "
"object. Its presence normally signals that the instances of this type are :"
"term:`iterable` (although sequences may be iterable without this function)."
msgstr ""
-#: ../../c-api/typeobj.rst:1618
+#: ../../c-api/typeobj.rst:1674
msgid "This function has the same signature as :c:func:`PyObject_GetIter`::"
msgstr ""
-#: ../../c-api/typeobj.rst:1620
+#: ../../c-api/typeobj.rst:1676
msgid "PyObject *tp_iter(PyObject *self);"
msgstr "PyObject *tp_iter(PyObject *self);"
-#: ../../c-api/typeobj.rst:1629
+#: ../../c-api/typeobj.rst:1685
msgid ""
"An optional pointer to a function that returns the next item in an :term:"
"`iterator`. The signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1632
+#: ../../c-api/typeobj.rst:1688
msgid "PyObject *tp_iternext(PyObject *self);"
msgstr "PyObject *tp_iternext(PyObject *self);"
-#: ../../c-api/typeobj.rst:1634
+#: ../../c-api/typeobj.rst:1690
msgid ""
"When the iterator is exhausted, it must return ``NULL``; a :exc:"
"`StopIteration` exception may or may not be set. When another error occurs, "
@@ -2744,74 +2830,74 @@ msgid ""
"this type are iterators."
msgstr ""
-#: ../../c-api/typeobj.rst:1639
+#: ../../c-api/typeobj.rst:1695
msgid ""
"Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` "
"function, and that function should return the iterator instance itself (not "
"a new iterator instance)."
msgstr ""
-#: ../../c-api/typeobj.rst:1643
+#: ../../c-api/typeobj.rst:1699
msgid "This function has the same signature as :c:func:`PyIter_Next`."
msgstr ""
-#: ../../c-api/typeobj.rst:1652
+#: ../../c-api/typeobj.rst:1708
msgid ""
"An optional pointer to a static ``NULL``-terminated array of :c:type:"
"`PyMethodDef` structures, declaring regular methods of this type."
msgstr ""
-#: ../../c-api/typeobj.rst:1655
+#: ../../c-api/typeobj.rst:1711
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor."
msgstr ""
-#: ../../c-api/typeobj.rst:1660
+#: ../../c-api/typeobj.rst:1716
msgid ""
"This field is not inherited by subtypes (methods are inherited through a "
"different mechanism)."
msgstr ""
-#: ../../c-api/typeobj.rst:1666
+#: ../../c-api/typeobj.rst:1722
msgid ""
"An optional pointer to a static ``NULL``-terminated array of :c:type:"
"`PyMemberDef` structures, declaring regular data members (fields or slots) "
"of instances of this type."
msgstr ""
-#: ../../c-api/typeobj.rst:1670
+#: ../../c-api/typeobj.rst:1726
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor."
msgstr ""
-#: ../../c-api/typeobj.rst:1675
+#: ../../c-api/typeobj.rst:1731
msgid ""
"This field is not inherited by subtypes (members are inherited through a "
"different mechanism)."
msgstr ""
-#: ../../c-api/typeobj.rst:1681
+#: ../../c-api/typeobj.rst:1737
msgid ""
"An optional pointer to a static ``NULL``-terminated array of :c:type:"
"`PyGetSetDef` structures, declaring computed attributes of instances of this "
"type."
msgstr ""
-#: ../../c-api/typeobj.rst:1684
+#: ../../c-api/typeobj.rst:1740
msgid ""
"For each entry in the array, an entry is added to the type's dictionary "
"(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor."
msgstr ""
-#: ../../c-api/typeobj.rst:1689
+#: ../../c-api/typeobj.rst:1745
msgid ""
"This field is not inherited by subtypes (computed attributes are inherited "
"through a different mechanism)."
msgstr ""
-#: ../../c-api/typeobj.rst:1695
+#: ../../c-api/typeobj.rst:1751
msgid ""
"An optional pointer to a base type from which type properties are "
"inherited. At this level, only single inheritance is supported; multiple "
@@ -2819,7 +2905,7 @@ msgid ""
"metatype."
msgstr ""
-#: ../../c-api/typeobj.rst:1703
+#: ../../c-api/typeobj.rst:1759
msgid ""
"Slot initialization is subject to the rules of initializing globals. C99 "
"requires the initializers to be \"address constants\". Function designators "
@@ -2827,7 +2913,7 @@ msgid ""
"valid C99 address constants."
msgstr ""
-#: ../../c-api/typeobj.rst:1708
+#: ../../c-api/typeobj.rst:1764
msgid ""
"However, the unary '&' operator applied to a non-static variable like :c:"
"data:`PyBaseObject_Type` is not required to produce an address constant. "
@@ -2835,27 +2921,27 @@ msgid ""
"strictly standard conforming in this particular behavior."
msgstr ""
-#: ../../c-api/typeobj.rst:1714
+#: ../../c-api/typeobj.rst:1770
msgid ""
"Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the "
"extension module's init function."
msgstr ""
-#: ../../c-api/typeobj.rst:1719
+#: ../../c-api/typeobj.rst:1775
msgid "This field is not inherited by subtypes (obviously)."
msgstr ""
-#: ../../c-api/typeobj.rst:1723
+#: ../../c-api/typeobj.rst:1779
msgid ""
"This field defaults to ``&PyBaseObject_Type`` (which to Python programmers "
"is known as the type :class:`object`)."
msgstr ""
-#: ../../c-api/typeobj.rst:1729
+#: ../../c-api/typeobj.rst:1785
msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`."
msgstr ""
-#: ../../c-api/typeobj.rst:1731
+#: ../../c-api/typeobj.rst:1787
msgid ""
"This field should normally be initialized to ``NULL`` before PyType_Ready is "
"called; it may also be initialized to a dictionary containing initial "
@@ -2866,73 +2952,73 @@ msgid ""
"be treated as read-only."
msgstr ""
-#: ../../c-api/typeobj.rst:1739
+#: ../../c-api/typeobj.rst:1795
msgid ""
"Some types may not store their dictionary in this slot. Use :c:func:"
"`PyType_GetDict` to retrieve the dictionary for an arbitrary type."
msgstr ""
-#: ../../c-api/typeobj.rst:1745
+#: ../../c-api/typeobj.rst:1801
msgid ""
"Internals detail: For static builtin types, this is always ``NULL``. "
"Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:"
"func:`PyType_GetDict` to get the dict for an arbitrary type."
msgstr ""
-#: ../../c-api/typeobj.rst:1751
+#: ../../c-api/typeobj.rst:1807
msgid ""
"This field is not inherited by subtypes (though the attributes defined in "
"here are inherited through a different mechanism)."
msgstr ""
-#: ../../c-api/typeobj.rst:1756
+#: ../../c-api/typeobj.rst:1812
msgid ""
"If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new "
"dictionary to it."
msgstr ""
-#: ../../c-api/typeobj.rst:1761
+#: ../../c-api/typeobj.rst:1817
msgid ""
"It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:"
"member:`~PyTypeObject.tp_dict` with the dictionary C-API."
msgstr ""
-#: ../../c-api/typeobj.rst:1767
+#: ../../c-api/typeobj.rst:1823
msgid "An optional pointer to a \"descriptor get\" function."
msgstr ""
-#: ../../c-api/typeobj.rst:1769 ../../c-api/typeobj.rst:1785
-#: ../../c-api/typeobj.rst:1849 ../../c-api/typeobj.rst:1879
-#: ../../c-api/typeobj.rst:1903
+#: ../../c-api/typeobj.rst:1825 ../../c-api/typeobj.rst:1841
+#: ../../c-api/typeobj.rst:1905 ../../c-api/typeobj.rst:1935
+#: ../../c-api/typeobj.rst:1959
msgid "The function signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1771
+#: ../../c-api/typeobj.rst:1827
msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);"
msgstr ""
"PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);"
-#: ../../c-api/typeobj.rst:1782
+#: ../../c-api/typeobj.rst:1838
msgid ""
"An optional pointer to a function for setting and deleting a descriptor's "
"value."
msgstr ""
-#: ../../c-api/typeobj.rst:1787
+#: ../../c-api/typeobj.rst:1843
msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);"
msgstr "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);"
-#: ../../c-api/typeobj.rst:1789
+#: ../../c-api/typeobj.rst:1845
msgid "The *value* argument is set to ``NULL`` to delete the value."
msgstr ""
-#: ../../c-api/typeobj.rst:1800
+#: ../../c-api/typeobj.rst:1856
msgid ""
"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` "
"should be used instead, if at all possible."
msgstr ""
-#: ../../c-api/typeobj.rst:1803
+#: ../../c-api/typeobj.rst:1859
msgid ""
"If the instances of this type have a dictionary containing instance "
"variables, this field is non-zero and contains the offset in the instances "
@@ -2940,19 +3026,19 @@ msgid ""
"func:`PyObject_GenericGetAttr`."
msgstr ""
-#: ../../c-api/typeobj.rst:1808
+#: ../../c-api/typeobj.rst:1864
msgid ""
"Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is "
"the dictionary for attributes of the type object itself."
msgstr ""
-#: ../../c-api/typeobj.rst:1811
+#: ../../c-api/typeobj.rst:1867
msgid ""
"The value specifies the offset of the dictionary from the start of the "
"instance structure."
msgstr ""
-#: ../../c-api/typeobj.rst:1813
+#: ../../c-api/typeobj.rst:1869
msgid ""
"The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-"
"only. To get the pointer to the dictionary call :c:func:"
@@ -2961,13 +3047,13 @@ msgid ""
"to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object."
msgstr ""
-#: ../../c-api/typeobj.rst:1819
+#: ../../c-api/typeobj.rst:1875
msgid ""
-"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit "
-"and :c:member:`~PyTypeObject.tp_dictoffset`."
+"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:"
+"member:`~PyTypeObject.tp_dictoffset`."
msgstr ""
-#: ../../c-api/typeobj.rst:1824
+#: ../../c-api/typeobj.rst:1880
msgid ""
"This field is inherited by subtypes. A subtype should not override this "
"offset; doing so could be unsafe, if C code tries to access the dictionary "
@@ -2975,25 +3061,25 @@ msgid ""
"`Py_TPFLAGS_MANAGED_DICT`."
msgstr ""
-#: ../../c-api/typeobj.rst:1831
+#: ../../c-api/typeobj.rst:1887
msgid ""
"This slot has no default. For :ref:`static types `, if the "
"field is ``NULL`` then no :attr:`~object.__dict__` gets created for "
"instances."
msgstr ""
-#: ../../c-api/typeobj.rst:1834
+#: ../../c-api/typeobj.rst:1890
msgid ""
"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:"
"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` "
"will be set to ``-1``, to indicate that it is unsafe to use this field."
msgstr ""
-#: ../../c-api/typeobj.rst:1842
+#: ../../c-api/typeobj.rst:1898
msgid "An optional pointer to an instance initialization function."
msgstr ""
-#: ../../c-api/typeobj.rst:1844
+#: ../../c-api/typeobj.rst:1900
msgid ""
"This function corresponds to the :meth:`~object.__init__` method of "
"classes. Like :meth:`!__init__`, it is possible to create an instance "
@@ -3001,18 +3087,18 @@ msgid ""
"instance by calling its :meth:`!__init__` method again."
msgstr ""
-#: ../../c-api/typeobj.rst:1851
+#: ../../c-api/typeobj.rst:1907
msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);"
msgstr "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);"
-#: ../../c-api/typeobj.rst:1853
+#: ../../c-api/typeobj.rst:1909
msgid ""
"The self argument is the instance to be initialized; the *args* and *kwds* "
"arguments represent positional and keyword arguments of the call to :meth:"
"`~object.__init__`."
msgstr ""
-#: ../../c-api/typeobj.rst:1857
+#: ../../c-api/typeobj.rst:1913
msgid ""
"The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called "
"when an instance is created normally by calling its type, after the type's :"
@@ -3024,53 +3110,53 @@ msgid ""
"subtype's :c:member:`~PyTypeObject.tp_init` is called."
msgstr ""
-#: ../../c-api/typeobj.rst:1864
+#: ../../c-api/typeobj.rst:1920
msgid "Returns ``0`` on success, ``-1`` and sets an exception on error."
msgstr ""
-#: ../../c-api/typeobj.rst:1872
+#: ../../c-api/typeobj.rst:1928
msgid ""
"For :ref:`static types ` this field does not have a default."
msgstr ""
-#: ../../c-api/typeobj.rst:1877
+#: ../../c-api/typeobj.rst:1933
msgid "An optional pointer to an instance allocation function."
msgstr ""
-#: ../../c-api/typeobj.rst:1881
+#: ../../c-api/typeobj.rst:1937
msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);"
msgstr "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);"
-#: ../../c-api/typeobj.rst:1885
+#: ../../c-api/typeobj.rst:1941
msgid ""
"This field is inherited by static subtypes, but not by dynamic subtypes "
"(subtypes created by a class statement)."
msgstr ""
-#: ../../c-api/typeobj.rst:1890
+#: ../../c-api/typeobj.rst:1946
msgid ""
"For dynamic subtypes, this field is always set to :c:func:"
"`PyType_GenericAlloc`, to force a standard heap allocation strategy."
msgstr ""
-#: ../../c-api/typeobj.rst:1894
+#: ../../c-api/typeobj.rst:1950
msgid ""
"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:"
"`PyType_GenericAlloc`. That is the recommended value for all statically "
"defined types."
msgstr ""
-#: ../../c-api/typeobj.rst:1901
+#: ../../c-api/typeobj.rst:1957
msgid "An optional pointer to an instance creation function."
msgstr ""
-#: ../../c-api/typeobj.rst:1905
+#: ../../c-api/typeobj.rst:1961
msgid ""
"PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);"
msgstr ""
"PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);"
-#: ../../c-api/typeobj.rst:1907
+#: ../../c-api/typeobj.rst:1963
msgid ""
"The *subtype* argument is the type of the object being created; the *args* "
"and *kwds* arguments represent positional and keyword arguments of the call "
@@ -3079,7 +3165,7 @@ msgid ""
"that type (but not an unrelated type)."
msgstr ""
-#: ../../c-api/typeobj.rst:1913
+#: ../../c-api/typeobj.rst:1969
msgid ""
"The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-"
">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do "
@@ -3091,20 +3177,20 @@ msgid ""
"be deferred to :c:member:`~PyTypeObject.tp_init`."
msgstr ""
-#: ../../c-api/typeobj.rst:1921
+#: ../../c-api/typeobj.rst:1977
msgid ""
"Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow "
"creating instances of the type in Python."
msgstr ""
-#: ../../c-api/typeobj.rst:1926
+#: ../../c-api/typeobj.rst:1982
msgid ""
"This field is inherited by subtypes, except it is not inherited by :ref:"
"`static types ` whose :c:member:`~PyTypeObject.tp_base` is "
"``NULL`` or ``&PyBaseObject_Type``."
msgstr ""
-#: ../../c-api/typeobj.rst:1932
+#: ../../c-api/typeobj.rst:1988
msgid ""
"For :ref:`static types ` this field has no default. This means "
"if the slot is defined as ``NULL``, the type cannot be called to create new "
@@ -3112,44 +3198,44 @@ msgid ""
"factory function."
msgstr ""
-#: ../../c-api/typeobj.rst:1940
+#: ../../c-api/typeobj.rst:1996
msgid ""
"An optional pointer to an instance deallocation function. Its signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1942
+#: ../../c-api/typeobj.rst:1998
msgid "void tp_free(void *self);"
msgstr "void tp_free(void *self);"
-#: ../../c-api/typeobj.rst:1944
+#: ../../c-api/typeobj.rst:2000
msgid ""
"An initializer that is compatible with this signature is :c:func:"
"`PyObject_Free`."
msgstr ""
-#: ../../c-api/typeobj.rst:1948
+#: ../../c-api/typeobj.rst:2004
msgid ""
"This field is inherited by static subtypes, but not by dynamic subtypes "
"(subtypes created by a class statement)"
msgstr ""
-#: ../../c-api/typeobj.rst:1953
+#: ../../c-api/typeobj.rst:2009
msgid ""
"In dynamic subtypes, this field is set to a deallocator suitable to match :c:"
"func:`PyType_GenericAlloc` and the value of the :c:macro:"
"`Py_TPFLAGS_HAVE_GC` flag bit."
msgstr ""
-#: ../../c-api/typeobj.rst:1957
+#: ../../c-api/typeobj.rst:2013
msgid ""
"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`."
msgstr ""
-#: ../../c-api/typeobj.rst:1962
+#: ../../c-api/typeobj.rst:2018
msgid "An optional pointer to a function called by the garbage collector."
msgstr ""
-#: ../../c-api/typeobj.rst:1964
+#: ../../c-api/typeobj.rst:2020
msgid ""
"The garbage collector needs to know whether a particular object is "
"collectible or not. Normally, it is sufficient to look at the object's "
@@ -3161,93 +3247,93 @@ msgid ""
"instance. The signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:1972
+#: ../../c-api/typeobj.rst:2028
msgid "int tp_is_gc(PyObject *self);"
msgstr "int tp_is_gc(PyObject *self);"
-#: ../../c-api/typeobj.rst:1974
+#: ../../c-api/typeobj.rst:2030
msgid ""
"(The only example of this are types themselves. The metatype, :c:data:"
"`PyType_Type`, defines this function to distinguish between statically and :"
"ref:`dynamically allocated types `.)"
msgstr ""
-#: ../../c-api/typeobj.rst:1984
+#: ../../c-api/typeobj.rst:2040
msgid ""
"This slot has no default. If this field is ``NULL``, :c:macro:"
"`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent."
msgstr ""
-#: ../../c-api/typeobj.rst:1990
+#: ../../c-api/typeobj.rst:2046
msgid "Tuple of base types."
msgstr ""
-#: ../../c-api/typeobj.rst:1992 ../../c-api/typeobj.rst:2016
+#: ../../c-api/typeobj.rst:2048 ../../c-api/typeobj.rst:2072
msgid ""
"This field should be set to ``NULL`` and treated as read-only. Python will "
"fill it in when the type is :c:func:`initialized `."
msgstr ""
-#: ../../c-api/typeobj.rst:1995
+#: ../../c-api/typeobj.rst:2051
msgid ""
"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot "
"` can be used instead of the *bases* argument of :c:func:"
"`PyType_FromSpecWithBases`. The argument form is preferred."
msgstr ""
-#: ../../c-api/typeobj.rst:2002
+#: ../../c-api/typeobj.rst:2058
msgid ""
"Multiple inheritance does not work well for statically defined types. If you "
"set ``tp_bases`` to a tuple, Python will not raise an error, but some slots "
"will only be inherited from the first base."
msgstr ""
-#: ../../c-api/typeobj.rst:2008 ../../c-api/typeobj.rst:2031
-#: ../../c-api/typeobj.rst:2048 ../../c-api/typeobj.rst:2065
-#: ../../c-api/typeobj.rst:2079
+#: ../../c-api/typeobj.rst:2064 ../../c-api/typeobj.rst:2087
+#: ../../c-api/typeobj.rst:2104 ../../c-api/typeobj.rst:2121
+#: ../../c-api/typeobj.rst:2135
msgid "This field is not inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:2013
+#: ../../c-api/typeobj.rst:2069
msgid ""
"Tuple containing the expanded set of base types, starting with the type "
"itself and ending with :class:`object`, in Method Resolution Order."
msgstr ""
-#: ../../c-api/typeobj.rst:2021
+#: ../../c-api/typeobj.rst:2077
msgid ""
"This field is not inherited; it is calculated fresh by :c:func:"
"`PyType_Ready`."
msgstr ""
-#: ../../c-api/typeobj.rst:2027
+#: ../../c-api/typeobj.rst:2083
msgid "Unused. Internal use only."
msgstr ""
-#: ../../c-api/typeobj.rst:2036
+#: ../../c-api/typeobj.rst:2092
msgid ""
"A collection of subclasses. Internal use only. May be an invalid pointer."
msgstr ""
-#: ../../c-api/typeobj.rst:2038
+#: ../../c-api/typeobj.rst:2094
msgid ""
"To get a list of subclasses, call the Python method :py:meth:`~type."
"__subclasses__`."
msgstr ""
-#: ../../c-api/typeobj.rst:2043
+#: ../../c-api/typeobj.rst:2099
msgid ""
"For some types, this field does not hold a valid :c:expr:`PyObject*`. The "
"type was changed to :c:expr:`void*` to indicate this."
msgstr ""
-#: ../../c-api/typeobj.rst:2053
+#: ../../c-api/typeobj.rst:2109
msgid ""
"Weak reference list head, for weak references to this type object. Not "
"inherited. Internal use only."
msgstr ""
-#: ../../c-api/typeobj.rst:2058
+#: ../../c-api/typeobj.rst:2114
msgid ""
"Internals detail: For the static builtin types this is always ``NULL``, even "
"if weakrefs are added. Instead, the weakrefs for each are stored on "
@@ -3255,25 +3341,25 @@ msgid ""
"``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction."
msgstr ""
-#: ../../c-api/typeobj.rst:2070
+#: ../../c-api/typeobj.rst:2126
msgid ""
"This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead."
msgstr ""
-#: ../../c-api/typeobj.rst:2075
+#: ../../c-api/typeobj.rst:2131
msgid "Used to index into the method cache. Internal use only."
msgstr ""
-#: ../../c-api/typeobj.rst:2084
+#: ../../c-api/typeobj.rst:2140
msgid ""
"An optional pointer to an instance finalization function. Its signature is::"
msgstr ""
-#: ../../c-api/typeobj.rst:2086
+#: ../../c-api/typeobj.rst:2142
msgid "void tp_finalize(PyObject *self);"
msgstr "void tp_finalize(PyObject *self);"
-#: ../../c-api/typeobj.rst:2088
+#: ../../c-api/typeobj.rst:2144
msgid ""
"If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it "
"once when finalizing an instance. It is called either from the garbage "
@@ -3283,55 +3369,40 @@ msgid ""
"object in a sane state."
msgstr ""
-#: ../../c-api/typeobj.rst:2095
+#: ../../c-api/typeobj.rst:2151
msgid ""
":c:member:`~PyTypeObject.tp_finalize` should not mutate the current "
"exception status; therefore, a recommended way to write a non-trivial "
"finalizer is::"
msgstr ""
-#: ../../c-api/typeobj.rst:2098
+#: ../../c-api/typeobj.rst:2154
msgid ""
"static void\n"
"local_finalize(PyObject *self)\n"
"{\n"
-" PyObject *error_type, *error_value, *error_traceback;\n"
-"\n"
" /* Save the current exception, if any. */\n"
-" PyErr_Fetch(&error_type, &error_value, &error_traceback);\n"
+" PyObject *exc = PyErr_GetRaisedException();\n"
"\n"
" /* ... */\n"
"\n"
" /* Restore the saved exception. */\n"
-" PyErr_Restore(error_type, error_value, error_traceback);\n"
+" PyErr_SetRaisedException(exc);\n"
"}"
msgstr ""
-#: ../../c-api/typeobj.rst:2112
-msgid ""
-"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
-"tp_dealloc` may be called from any Python thread, not just the thread which "
-"created the object (if the object becomes part of a refcount cycle, that "
-"cycle might be collected by a garbage collection on any thread). This is "
-"not a problem for Python API calls, since the thread on which tp_dealloc is "
-"called will own the Global Interpreter Lock (GIL). However, if the object "
-"being destroyed in turn destroys objects from some other C or C++ library, "
-"care should be taken to ensure that destroying those objects on the thread "
-"which called tp_dealloc will not violate any assumptions of the library."
-msgstr ""
-
-#: ../../c-api/typeobj.rst:2131
+#: ../../c-api/typeobj.rst:2174
msgid ""
"Before version 3.8 it was necessary to set the :c:macro:"
"`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. "
"This is no longer required."
msgstr ""
-#: ../../c-api/typeobj.rst:2135
+#: ../../c-api/typeobj.rst:2178
msgid "\"Safe object finalization\" (:pep:`442`)"
msgstr ""
-#: ../../c-api/typeobj.rst:2140
+#: ../../c-api/typeobj.rst:2183
msgid ""
"Vectorcall function to use for calls of this type object. In other words, it "
"is used to implement :ref:`vectorcall ` for ``type.__call__``. "
@@ -3339,65 +3410,65 @@ msgid ""
"meth:`~object.__new__` and :meth:`~object.__init__` is used."
msgstr ""
-#: ../../c-api/typeobj.rst:2148
+#: ../../c-api/typeobj.rst:2191
msgid "This field is never inherited."
msgstr ""
-#: ../../c-api/typeobj.rst:2150
+#: ../../c-api/typeobj.rst:2193
msgid "(the field exists since 3.8 but it's only used since 3.9)"
msgstr ""
-#: ../../c-api/typeobj.rst:2155
+#: ../../c-api/typeobj.rst:2198
msgid "Internal. Do not use."
msgstr ""
-#: ../../c-api/typeobj.rst:2163
+#: ../../c-api/typeobj.rst:2206
msgid "Static Types"
msgstr ""
-#: ../../c-api/typeobj.rst:2165
+#: ../../c-api/typeobj.rst:2208
msgid ""
"Traditionally, types defined in C code are *static*, that is, a static :c:"
"type:`PyTypeObject` structure is defined directly in code and initialized "
"using :c:func:`PyType_Ready`."
msgstr ""
-#: ../../c-api/typeobj.rst:2169
+#: ../../c-api/typeobj.rst:2212
msgid ""
"This results in types that are limited relative to types defined in Python:"
msgstr ""
-#: ../../c-api/typeobj.rst:2171
+#: ../../c-api/typeobj.rst:2214
msgid ""
"Static types are limited to one base, i.e. they cannot use multiple "
"inheritance."
msgstr ""
-#: ../../c-api/typeobj.rst:2173
+#: ../../c-api/typeobj.rst:2216
msgid ""
"Static type objects (but not necessarily their instances) are immutable. It "
"is not possible to add or modify the type object's attributes from Python."
msgstr ""
-#: ../../c-api/typeobj.rst:2175
+#: ../../c-api/typeobj.rst:2218
msgid ""
"Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-"
"specific state."
msgstr ""
-#: ../../c-api/typeobj.rst:2179
+#: ../../c-api/typeobj.rst:2222
msgid ""
"Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API "
"` as an opaque struct, any extension modules using static "
"types must be compiled for a specific Python minor version."
msgstr ""
-#: ../../c-api/typeobj.rst:2187
+#: ../../c-api/typeobj.rst:2230
msgid "Heap Types"
msgstr ""
-#: ../../c-api/typeobj.rst:2189
+#: ../../c-api/typeobj.rst:2232
msgid ""
"An alternative to :ref:`static types ` is *heap-allocated "
"types*, or *heap types* for short, which correspond closely to classes "
@@ -3405,29 +3476,29 @@ msgid ""
"`Py_TPFLAGS_HEAPTYPE` flag set."
msgstr ""
-#: ../../c-api/typeobj.rst:2194
+#: ../../c-api/typeobj.rst:2237
msgid ""
"This is done by filling a :c:type:`PyType_Spec` structure and calling :c:"
"func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:"
"`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`."
msgstr ""
-#: ../../c-api/typeobj.rst:2202
+#: ../../c-api/typeobj.rst:2245
msgid "Number Object Structures"
msgstr ""
-#: ../../c-api/typeobj.rst:2209
+#: ../../c-api/typeobj.rst:2252
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the number protocol. Each function is used by the function of "
"similar name documented in the :ref:`number` section."
msgstr ""
-#: ../../c-api/typeobj.rst:2215 ../../c-api/typeobj.rst:2539
+#: ../../c-api/typeobj.rst:2258 ../../c-api/typeobj.rst:2582
msgid "Here is the structure definition::"
msgstr ""
-#: ../../c-api/typeobj.rst:2217
+#: ../../c-api/typeobj.rst:2260
msgid ""
"typedef struct {\n"
" binaryfunc nb_add;\n"
@@ -3515,7 +3586,7 @@ msgstr ""
" binaryfunc nb_inplace_matrix_multiply;\n"
"} PyNumberMethods;"
-#: ../../c-api/typeobj.rst:2262
+#: ../../c-api/typeobj.rst:2305
msgid ""
"Binary and ternary functions must check the type of all their operands, and "
"implement the necessary conversions (at least one of the operands is an "
@@ -3525,31 +3596,31 @@ msgid ""
"and set an exception."
msgstr ""
-#: ../../c-api/typeobj.rst:2271
+#: ../../c-api/typeobj.rst:2314
msgid ""
"The :c:member:`~PyNumberMethods.nb_reserved` field should always be "
"``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in "
"Python 3.0.1."
msgstr ""
-#: ../../c-api/typeobj.rst:2316
+#: ../../c-api/typeobj.rst:2359
msgid "Mapping Object Structures"
msgstr ""
-#: ../../c-api/typeobj.rst:2323
+#: ../../c-api/typeobj.rst:2366
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the mapping protocol. It has three members:"
msgstr ""
-#: ../../c-api/typeobj.rst:2328
+#: ../../c-api/typeobj.rst:2371
msgid ""
"This function is used by :c:func:`PyMapping_Size` and :c:func:"
"`PyObject_Size`, and has the same signature. This slot may be set to "
"``NULL`` if the object has no defined length."
msgstr ""
-#: ../../c-api/typeobj.rst:2334
+#: ../../c-api/typeobj.rst:2377
msgid ""
"This function is used by :c:func:`PyObject_GetItem` and :c:func:"
"`PySequence_GetSlice`, and has the same signature as :c:func:`!"
@@ -3557,7 +3628,7 @@ msgid ""
"`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise."
msgstr ""
-#: ../../c-api/typeobj.rst:2342
+#: ../../c-api/typeobj.rst:2385
msgid ""
"This function is used by :c:func:`PyObject_SetItem`, :c:func:"
"`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:"
@@ -3567,17 +3638,17 @@ msgid ""
"deletion."
msgstr ""
-#: ../../c-api/typeobj.rst:2353
+#: ../../c-api/typeobj.rst:2396
msgid "Sequence Object Structures"
msgstr ""
-#: ../../c-api/typeobj.rst:2360
+#: ../../c-api/typeobj.rst:2403
msgid ""
"This structure holds pointers to the functions which an object uses to "
"implement the sequence protocol."
msgstr ""
-#: ../../c-api/typeobj.rst:2365
+#: ../../c-api/typeobj.rst:2408
msgid ""
"This function is used by :c:func:`PySequence_Size` and :c:func:"
"`PyObject_Size`, and has the same signature. It is also used for handling "
@@ -3585,21 +3656,21 @@ msgid ""
"member:`~PySequenceMethods.sq_ass_item` slots."
msgstr ""
-#: ../../c-api/typeobj.rst:2372
+#: ../../c-api/typeobj.rst:2415
msgid ""
"This function is used by :c:func:`PySequence_Concat` and has the same "
"signature. It is also used by the ``+`` operator, after trying the numeric "
"addition via the :c:member:`~PyNumberMethods.nb_add` slot."
msgstr ""
-#: ../../c-api/typeobj.rst:2378
+#: ../../c-api/typeobj.rst:2421
msgid ""
"This function is used by :c:func:`PySequence_Repeat` and has the same "
"signature. It is also used by the ``*`` operator, after trying numeric "
"multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot."
msgstr ""
-#: ../../c-api/typeobj.rst:2384
+#: ../../c-api/typeobj.rst:2427
msgid ""
"This function is used by :c:func:`PySequence_GetItem` and has the same "
"signature. It is also used by :c:func:`PyObject_GetItem`, after trying the "
@@ -3608,7 +3679,7 @@ msgid ""
"``1``, it can be ``NULL`` otherwise."
msgstr ""
-#: ../../c-api/typeobj.rst:2390
+#: ../../c-api/typeobj.rst:2433
msgid ""
"Negative indexes are handled as follows: if the :c:member:"
"`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence "
@@ -3617,7 +3688,7 @@ msgid ""
"index is passed as is to the function."
msgstr ""
-#: ../../c-api/typeobj.rst:2397
+#: ../../c-api/typeobj.rst:2440
msgid ""
"This function is used by :c:func:`PySequence_SetItem` and has the same "
"signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:"
@@ -3626,14 +3697,14 @@ msgid ""
"``NULL`` if the object does not support item assignment and deletion."
msgstr ""
-#: ../../c-api/typeobj.rst:2406
+#: ../../c-api/typeobj.rst:2449
msgid ""
"This function may be used by :c:func:`PySequence_Contains` and has the same "
"signature. This slot may be left to ``NULL``, in this case :c:func:`!"
"PySequence_Contains` simply traverses the sequence until it finds a match."
msgstr ""
-#: ../../c-api/typeobj.rst:2413
+#: ../../c-api/typeobj.rst:2456
msgid ""
"This function is used by :c:func:`PySequence_InPlaceConcat` and has the same "
"signature. It should modify its first operand, and return it. This slot "
@@ -3643,7 +3714,7 @@ msgid ""
"c:member:`~PyNumberMethods.nb_inplace_add` slot."
msgstr ""
-#: ../../c-api/typeobj.rst:2422
+#: ../../c-api/typeobj.rst:2465
msgid ""
"This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same "
"signature. It should modify its first operand, and return it. This slot "
@@ -3653,76 +3724,76 @@ msgid ""
"via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot."
msgstr ""
-#: ../../c-api/typeobj.rst:2433
+#: ../../c-api/typeobj.rst:2476
msgid "Buffer Object Structures"
msgstr ""
-#: ../../c-api/typeobj.rst:2441
+#: ../../c-api/typeobj.rst:2484
msgid ""
"This structure holds pointers to the functions required by the :ref:`Buffer "
"protocol `. The protocol defines how an exporter object can "
"expose its internal data to consumer objects."
msgstr ""
-#: ../../c-api/typeobj.rst:2447 ../../c-api/typeobj.rst:2496
-#: ../../c-api/typeobj.rst:2550 ../../c-api/typeobj.rst:2561
-#: ../../c-api/typeobj.rst:2573 ../../c-api/typeobj.rst:2583
+#: ../../c-api/typeobj.rst:2490 ../../c-api/typeobj.rst:2539
+#: ../../c-api/typeobj.rst:2593 ../../c-api/typeobj.rst:2604
+#: ../../c-api/typeobj.rst:2616 ../../c-api/typeobj.rst:2626
msgid "The signature of this function is::"
msgstr ""
-#: ../../c-api/typeobj.rst:2449
+#: ../../c-api/typeobj.rst:2492
msgid "int (PyObject *exporter, Py_buffer *view, int flags);"
msgstr "int (PyObject *exporter, Py_buffer *view, int flags);"
-#: ../../c-api/typeobj.rst:2451
+#: ../../c-api/typeobj.rst:2494
msgid ""
"Handle a request to *exporter* to fill in *view* as specified by *flags*. "
"Except for point (3), an implementation of this function MUST take these "
"steps:"
msgstr ""
-#: ../../c-api/typeobj.rst:2455
+#: ../../c-api/typeobj.rst:2498
msgid ""
"Check if the request can be met. If not, raise :exc:`BufferError`, set :c:"
"expr:`view->obj` to ``NULL`` and return ``-1``."
msgstr ""
-#: ../../c-api/typeobj.rst:2458
+#: ../../c-api/typeobj.rst:2501
msgid "Fill in the requested fields."
msgstr ""
-#: ../../c-api/typeobj.rst:2460
+#: ../../c-api/typeobj.rst:2503
msgid "Increment an internal counter for the number of exports."
msgstr ""
-#: ../../c-api/typeobj.rst:2462
+#: ../../c-api/typeobj.rst:2505
msgid ""
"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`."
msgstr ""
-#: ../../c-api/typeobj.rst:2464
+#: ../../c-api/typeobj.rst:2507
msgid "Return ``0``."
msgstr "回傳 ``0``。"
-#: ../../c-api/typeobj.rst:2466
+#: ../../c-api/typeobj.rst:2509
msgid ""
"If *exporter* is part of a chain or tree of buffer providers, two main "
"schemes can be used:"
msgstr ""
-#: ../../c-api/typeobj.rst:2469
+#: ../../c-api/typeobj.rst:2512
msgid ""
"Re-export: Each member of the tree acts as the exporting object and sets :c:"
"expr:`view->obj` to a new reference to itself."
msgstr ""
-#: ../../c-api/typeobj.rst:2472
+#: ../../c-api/typeobj.rst:2515
msgid ""
"Redirect: The buffer request is redirected to the root object of the tree. "
"Here, :c:expr:`view->obj` will be a new reference to the root object."
msgstr ""
-#: ../../c-api/typeobj.rst:2476
+#: ../../c-api/typeobj.rst:2519
msgid ""
"The individual fields of *view* are described in section :ref:`Buffer "
"structure `, the rules how an exporter must react to "
@@ -3730,7 +3801,7 @@ msgid ""
"types>`."
msgstr ""
-#: ../../c-api/typeobj.rst:2481
+#: ../../c-api/typeobj.rst:2524
msgid ""
"All memory pointed to in the :c:type:`Py_buffer` structure belongs to the "
"exporter and must remain valid until there are no consumers left. :c:member:"
@@ -3739,23 +3810,23 @@ msgid ""
"internal` are read-only for the consumer."
msgstr ""
-#: ../../c-api/typeobj.rst:2488
+#: ../../c-api/typeobj.rst:2531
msgid ""
":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes "
"buffer while dealing correctly with all request types."
msgstr ""
-#: ../../c-api/typeobj.rst:2491
+#: ../../c-api/typeobj.rst:2534
msgid ""
":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps "
"this function."
msgstr ""
-#: ../../c-api/typeobj.rst:2498
+#: ../../c-api/typeobj.rst:2541
msgid "void (PyObject *exporter, Py_buffer *view);"
msgstr "void (PyObject *exporter, Py_buffer *view);"
-#: ../../c-api/typeobj.rst:2500
+#: ../../c-api/typeobj.rst:2543
msgid ""
"Handle a request to release the resources of the buffer. If no resources "
"need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be "
@@ -3763,15 +3834,15 @@ msgid ""
"these optional steps:"
msgstr ""
-#: ../../c-api/typeobj.rst:2505
+#: ../../c-api/typeobj.rst:2548
msgid "Decrement an internal counter for the number of exports."
msgstr ""
-#: ../../c-api/typeobj.rst:2507
+#: ../../c-api/typeobj.rst:2550
msgid "If the counter is ``0``, free all memory associated with *view*."
msgstr ""
-#: ../../c-api/typeobj.rst:2509
+#: ../../c-api/typeobj.rst:2552
msgid ""
"The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep "
"track of buffer-specific resources. This field is guaranteed to remain "
@@ -3779,30 +3850,30 @@ msgid ""
"*view* argument."
msgstr ""
-#: ../../c-api/typeobj.rst:2515
+#: ../../c-api/typeobj.rst:2558
msgid ""
"This function MUST NOT decrement :c:expr:`view->obj`, since that is done "
"automatically in :c:func:`PyBuffer_Release` (this scheme is useful for "
"breaking reference cycles)."
msgstr ""
-#: ../../c-api/typeobj.rst:2520
+#: ../../c-api/typeobj.rst:2563
msgid ""
":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this "
"function."
msgstr ""
-#: ../../c-api/typeobj.rst:2528
+#: ../../c-api/typeobj.rst:2571
msgid "Async Object Structures"
msgstr ""
-#: ../../c-api/typeobj.rst:2536
+#: ../../c-api/typeobj.rst:2579
msgid ""
"This structure holds pointers to the functions required to implement :term:"
"`awaitable` and :term:`asynchronous iterator` objects."
msgstr ""
-#: ../../c-api/typeobj.rst:2541
+#: ../../c-api/typeobj.rst:2584
msgid ""
"typedef struct {\n"
" unaryfunc am_await;\n"
@@ -3818,62 +3889,62 @@ msgstr ""
" sendfunc am_send;\n"
"} PyAsyncMethods;"
-#: ../../c-api/typeobj.rst:2552
+#: ../../c-api/typeobj.rst:2595
msgid "PyObject *am_await(PyObject *self);"
msgstr ""
-#: ../../c-api/typeobj.rst:2554
+#: ../../c-api/typeobj.rst:2597
msgid ""
"The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` "
"must return ``1`` for it."
msgstr ""
-#: ../../c-api/typeobj.rst:2557
+#: ../../c-api/typeobj.rst:2600
msgid ""
"This slot may be set to ``NULL`` if an object is not an :term:`awaitable`."
msgstr ""
-#: ../../c-api/typeobj.rst:2563
+#: ../../c-api/typeobj.rst:2606
msgid "PyObject *am_aiter(PyObject *self);"
msgstr "PyObject *am_aiter(PyObject *self);"
-#: ../../c-api/typeobj.rst:2565
+#: ../../c-api/typeobj.rst:2608
msgid ""
"Must return an :term:`asynchronous iterator` object. See :meth:`~object."
"__anext__` for details."
msgstr ""
-#: ../../c-api/typeobj.rst:2568
+#: ../../c-api/typeobj.rst:2611
msgid ""
"This slot may be set to ``NULL`` if an object does not implement "
"asynchronous iteration protocol."
msgstr ""
-#: ../../c-api/typeobj.rst:2575
+#: ../../c-api/typeobj.rst:2618
msgid "PyObject *am_anext(PyObject *self);"
msgstr "PyObject *am_anext(PyObject *self);"
-#: ../../c-api/typeobj.rst:2577
+#: ../../c-api/typeobj.rst:2620
msgid ""
"Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for "
"details. This slot may be set to ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:2585
+#: ../../c-api/typeobj.rst:2628
msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);"
msgstr ""
"PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);"
-#: ../../c-api/typeobj.rst:2587
+#: ../../c-api/typeobj.rst:2630
msgid ""
"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``."
msgstr ""
-#: ../../c-api/typeobj.rst:2596
+#: ../../c-api/typeobj.rst:2639
msgid "Slot Type typedefs"
msgstr ""
-#: ../../c-api/typeobj.rst:2600
+#: ../../c-api/typeobj.rst:2643
msgid ""
"The purpose of this function is to separate memory allocation from memory "
"initialization. It should return a pointer to a block of memory of adequate "
@@ -3887,80 +3958,80 @@ msgid ""
"length of the block should be :c:member:`~PyTypeObject.tp_basicsize`."
msgstr ""
-#: ../../c-api/typeobj.rst:2610
+#: ../../c-api/typeobj.rst:2653
msgid ""
"This function should not do any other instance initialization, not even to "
"allocate additional memory; that should be done by :c:member:`~PyTypeObject."
"tp_new`."
msgstr ""
-#: ../../c-api/typeobj.rst:2617
+#: ../../c-api/typeobj.rst:2660
msgid "See :c:member:`~PyTypeObject.tp_free`."
msgstr "請見 :c:member:`~PyTypeObject.tp_free`。"
-#: ../../c-api/typeobj.rst:2621
+#: ../../c-api/typeobj.rst:2664
msgid "See :c:member:`~PyTypeObject.tp_new`."
msgstr "請見 :c:member:`~PyTypeObject.tp_new`。"
-#: ../../c-api/typeobj.rst:2625
+#: ../../c-api/typeobj.rst:2668
msgid "See :c:member:`~PyTypeObject.tp_init`."
msgstr "請見 :c:member:`~PyTypeObject.tp_init`。"
-#: ../../c-api/typeobj.rst:2629
+#: ../../c-api/typeobj.rst:2672
msgid "See :c:member:`~PyTypeObject.tp_repr`."
msgstr "請見 :c:member:`~PyTypeObject.tp_repr`。"
-#: ../../c-api/typeobj.rst:2633 ../../c-api/typeobj.rst:2642
+#: ../../c-api/typeobj.rst:2676 ../../c-api/typeobj.rst:2685
msgid "Return the value of the named attribute for the object."
msgstr ""
-#: ../../c-api/typeobj.rst:2637 ../../c-api/typeobj.rst:2648
+#: ../../c-api/typeobj.rst:2680 ../../c-api/typeobj.rst:2691
msgid ""
"Set the value of the named attribute for the object. The value argument is "
"set to ``NULL`` to delete the attribute."
msgstr ""
-#: ../../c-api/typeobj.rst:2644
+#: ../../c-api/typeobj.rst:2687
msgid "See :c:member:`~PyTypeObject.tp_getattro`."
msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`。"
-#: ../../c-api/typeobj.rst:2651
+#: ../../c-api/typeobj.rst:2694
msgid "See :c:member:`~PyTypeObject.tp_setattro`."
msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`。"
-#: ../../c-api/typeobj.rst:2655
+#: ../../c-api/typeobj.rst:2698
msgid "See :c:member:`~PyTypeObject.tp_descr_get`."
msgstr "請見 :c:member:`~PyTypeObject.tp_descr_get`。"
-#: ../../c-api/typeobj.rst:2659
+#: ../../c-api/typeobj.rst:2702
msgid "See :c:member:`~PyTypeObject.tp_descr_set`."
msgstr "請見 :c:member:`~PyTypeObject.tp_descr_set`。"
-#: ../../c-api/typeobj.rst:2663
+#: ../../c-api/typeobj.rst:2706
msgid "See :c:member:`~PyTypeObject.tp_hash`."
msgstr "請見 :c:member:`~PyTypeObject.tp_hash`。"
-#: ../../c-api/typeobj.rst:2667
+#: ../../c-api/typeobj.rst:2710
msgid "See :c:member:`~PyTypeObject.tp_richcompare`."
msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`。"
-#: ../../c-api/typeobj.rst:2671
+#: ../../c-api/typeobj.rst:2714
msgid "See :c:member:`~PyTypeObject.tp_iter`."
msgstr "請見 :c:member:`~PyTypeObject.tp_iter`。"
-#: ../../c-api/typeobj.rst:2675
+#: ../../c-api/typeobj.rst:2718
msgid "See :c:member:`~PyTypeObject.tp_iternext`."
msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`。"
-#: ../../c-api/typeobj.rst:2689
+#: ../../c-api/typeobj.rst:2732
msgid "See :c:member:`~PyAsyncMethods.am_send`."
msgstr "請見 :c:member:`~PyAsyncMethods.am_send`。"
-#: ../../c-api/typeobj.rst:2705
+#: ../../c-api/typeobj.rst:2748
msgid "Examples"
msgstr "範例"
-#: ../../c-api/typeobj.rst:2707
+#: ../../c-api/typeobj.rst:2750
msgid ""
"The following are simple examples of Python type definitions. They include "
"common usage you may encounter. Some demonstrate tricky corner cases. For "
@@ -3968,11 +4039,11 @@ msgid ""
"and :ref:`new-types-topics`."
msgstr ""
-#: ../../c-api/typeobj.rst:2712
+#: ../../c-api/typeobj.rst:2755
msgid "A basic :ref:`static type `::"
msgstr ""
-#: ../../c-api/typeobj.rst:2714
+#: ../../c-api/typeobj.rst:2757
msgid ""
"typedef struct {\n"
" PyObject_HEAD\n"
@@ -3990,13 +4061,13 @@ msgid ""
"};"
msgstr ""
-#: ../../c-api/typeobj.rst:2729
+#: ../../c-api/typeobj.rst:2772
msgid ""
"You may also find older code (especially in the CPython code base) with a "
"more verbose initializer::"
msgstr ""
-#: ../../c-api/typeobj.rst:2732
+#: ../../c-api/typeobj.rst:2775
msgid ""
"static PyTypeObject MyObject_Type = {\n"
" PyVarObject_HEAD_INIT(NULL, 0)\n"
@@ -4080,11 +4151,11 @@ msgstr ""
" myobj_new, /* tp_new */\n"
"};"
-#: ../../c-api/typeobj.rst:2773
+#: ../../c-api/typeobj.rst:2816
msgid "A type that supports weakrefs, instance dicts, and hashing::"
msgstr ""
-#: ../../c-api/typeobj.rst:2775
+#: ../../c-api/typeobj.rst:2818
msgid ""
"typedef struct {\n"
" PyObject_HEAD\n"
@@ -4110,14 +4181,14 @@ msgid ""
"};"
msgstr ""
-#: ../../c-api/typeobj.rst:2798
+#: ../../c-api/typeobj.rst:2841
msgid ""
"A str subclass that cannot be subclassed and cannot be called to create "
"instances (e.g. uses a separate factory func) using :c:macro:"
"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::"
msgstr ""
-#: ../../c-api/typeobj.rst:2802
+#: ../../c-api/typeobj.rst:2845
msgid ""
"typedef struct {\n"
" PyUnicodeObject raw;\n"
@@ -4135,12 +4206,12 @@ msgid ""
"};"
msgstr ""
-#: ../../c-api/typeobj.rst:2817
+#: ../../c-api/typeobj.rst:2860
msgid ""
"The simplest :ref:`static type ` with fixed-length instances::"
msgstr ""
-#: ../../c-api/typeobj.rst:2819
+#: ../../c-api/typeobj.rst:2862
msgid ""
"typedef struct {\n"
" PyObject_HEAD\n"
@@ -4160,13 +4231,13 @@ msgstr ""
" .tp_name = \"mymod.MyObject\",\n"
"};"
-#: ../../c-api/typeobj.rst:2828
+#: ../../c-api/typeobj.rst:2871
msgid ""
"The simplest :ref:`static type ` with variable-length "
"instances::"
msgstr ""
-#: ../../c-api/typeobj.rst:2830
+#: ../../c-api/typeobj.rst:2873
msgid ""
"typedef struct {\n"
" PyObject_VAR_HEAD\n"
@@ -4192,14 +4263,14 @@ msgstr ""
" .tp_itemsize = sizeof(char *),\n"
"};"
-#: ../../c-api/typeobj.rst:787 ../../c-api/typeobj.rst:852
+#: ../../c-api/typeobj.rst:843 ../../c-api/typeobj.rst:908
msgid "built-in function"
msgstr "built-in function(內建函式)"
-#: ../../c-api/typeobj.rst:787
+#: ../../c-api/typeobj.rst:843
msgid "repr"
msgstr "repr"
-#: ../../c-api/typeobj.rst:852
+#: ../../c-api/typeobj.rst:908
msgid "hash"
msgstr "hash(雜湊)"
diff --git a/c-api/unicode.po b/c-api/unicode.po
index 8ebbcebe8f..71b90e9650 100644
--- a/c-api/unicode.po
+++ b/c-api/unicode.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-28 00:13+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -41,23 +41,25 @@ msgstr ""
#: ../../c-api/unicode.rst:20
msgid ""
"UTF-8 representation is created on demand and cached in the Unicode object."
-msgstr ""
+msgstr "UTF-8 表示法會在需要時建立並快取在 Unicode 物件中。"
#: ../../c-api/unicode.rst:23
msgid ""
"The :c:type:`Py_UNICODE` representation has been removed since Python 3.12 "
"with deprecated APIs. See :pep:`623` for more information."
msgstr ""
+"自 Python 3.12 起,已移除 :c:type:`Py_UNICODE` 表示法,並標示為已棄用的 API。"
+"更多資訊請參閱 :pep:`623`。"
#: ../../c-api/unicode.rst:29
msgid "Unicode Type"
-msgstr ""
+msgstr "Unicode 型別"
#: ../../c-api/unicode.rst:31
msgid ""
"These are the basic Unicode object types used for the Unicode implementation "
"in Python:"
-msgstr ""
+msgstr "這些是 Python 中用於 Unicode 實作的基本 Unicode 物件型別:"
#: ../../c-api/unicode.rst:38
msgid ""
@@ -88,43 +90,49 @@ msgstr ""
#: ../../c-api/unicode.rst:71
msgid ""
-"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. "
+"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. "
"It is exposed to Python code as ``str``."
msgstr ""
-#: ../../c-api/unicode.rst:75
+#: ../../c-api/unicode.rst:77
+msgid ""
+"This instance of :c:type:`PyTypeObject` represents the Python Unicode "
+"iterator type. It is used to iterate over Unicode string objects."
+msgstr ""
+
+#: ../../c-api/unicode.rst:81
msgid ""
"The following APIs are C macros and static inlined functions for fast checks "
"and access to internal read-only data of Unicode objects:"
msgstr ""
-#: ../../c-api/unicode.rst:80
+#: ../../c-api/unicode.rst:86
msgid ""
"Return true if the object *obj* is a Unicode object or an instance of a "
"Unicode subtype. This function always succeeds."
msgstr ""
-#: ../../c-api/unicode.rst:86
+#: ../../c-api/unicode.rst:92
msgid ""
"Return true if the object *obj* is a Unicode object, but not an instance of "
"a subtype. This function always succeeds."
msgstr ""
-#: ../../c-api/unicode.rst:92
+#: ../../c-api/unicode.rst:98
msgid "Returns ``0``. This API is kept only for backward compatibility."
-msgstr ""
+msgstr "回傳 ``0``。此 API 僅保留以維持向後相容性。"
-#: ../../c-api/unicode.rst:96
+#: ../../c-api/unicode.rst:102
msgid "This API does nothing since Python 3.12."
-msgstr ""
+msgstr "自 Python 3.12 起,此 API 不再執行任何動作。"
-#: ../../c-api/unicode.rst:102
+#: ../../c-api/unicode.rst:108
msgid ""
"Return the length of the Unicode string, in code points. *unicode* has to "
"be a Unicode object in the \"canonical\" representation (not checked)."
msgstr ""
-#: ../../c-api/unicode.rst:112
+#: ../../c-api/unicode.rst:118
msgid ""
"Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 "
"integer types for direct character access. No checks are performed if the "
@@ -132,15 +140,15 @@ msgid ""
"`PyUnicode_KIND` to select the right function."
msgstr ""
-#: ../../c-api/unicode.rst:124
+#: ../../c-api/unicode.rst:130
msgid "Return values of the :c:func:`PyUnicode_KIND` macro."
msgstr ""
-#: ../../c-api/unicode.rst:128
+#: ../../c-api/unicode.rst:134
msgid "``PyUnicode_WCHAR_KIND`` has been removed."
msgstr "``PyUnicode_WCHAR_KIND`` 已被移除。"
-#: ../../c-api/unicode.rst:134
+#: ../../c-api/unicode.rst:140
msgid ""
"Return one of the PyUnicode kind constants (see above) that indicate how "
"many bytes per character this Unicode object uses to store its data. "
@@ -148,13 +156,13 @@ msgid ""
"(not checked)."
msgstr ""
-#: ../../c-api/unicode.rst:143
+#: ../../c-api/unicode.rst:149
msgid ""
"Return a void pointer to the raw Unicode buffer. *unicode* has to be a "
"Unicode object in the \"canonical\" representation (not checked)."
msgstr ""
-#: ../../c-api/unicode.rst:152
+#: ../../c-api/unicode.rst:158
msgid ""
"Write into a canonical representation *data* (as obtained with :c:func:"
"`PyUnicode_DATA`). This function performs no sanity checks, and is intended "
@@ -164,158 +172,163 @@ msgid ""
"written to that location."
msgstr ""
-#: ../../c-api/unicode.rst:165
+#: ../../c-api/unicode.rst:171
msgid ""
"Read a code point from a canonical representation *data* (as obtained with :"
"c:func:`PyUnicode_DATA`). No checks or ready calls are performed."
msgstr ""
-#: ../../c-api/unicode.rst:173
+#: ../../c-api/unicode.rst:179
msgid ""
"Read a character from a Unicode object *unicode*, which must be in the "
"\"canonical\" representation. This is less efficient than :c:func:"
"`PyUnicode_READ` if you do multiple consecutive reads."
msgstr ""
-#: ../../c-api/unicode.rst:182
+#: ../../c-api/unicode.rst:188
msgid ""
"Return the maximum code point that is suitable for creating another string "
"based on *unicode*, which must be in the \"canonical\" representation. This "
"is always an approximation but more efficient than iterating over the string."
msgstr ""
-#: ../../c-api/unicode.rst:191
+#: ../../c-api/unicode.rst:197
msgid ""
"Return ``1`` if the string is a valid identifier according to the language "
"definition, section :ref:`identifiers`. Return ``0`` otherwise."
msgstr ""
-#: ../../c-api/unicode.rst:194
+#: ../../c-api/unicode.rst:200
msgid ""
"The function does not call :c:func:`Py_FatalError` anymore if the string is "
"not ready."
msgstr ""
-#: ../../c-api/unicode.rst:200
+#: ../../c-api/unicode.rst:206
msgid "Unicode Character Properties"
msgstr ""
-#: ../../c-api/unicode.rst:202
+#: ../../c-api/unicode.rst:208
msgid ""
"Unicode provides many different character properties. The most often needed "
"ones are available through these macros which are mapped to C functions "
"depending on the Python configuration."
msgstr ""
-#: ../../c-api/unicode.rst:209
+#: ../../c-api/unicode.rst:215
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a whitespace character."
-msgstr ""
+msgstr "根據 *ch* 是否為空白字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:214
+#: ../../c-api/unicode.rst:220
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a lowercase character."
-msgstr ""
+msgstr "根據 *ch* 是否為小寫字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:219
+#: ../../c-api/unicode.rst:225
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an uppercase character."
-msgstr ""
+msgstr "根據 *ch* 是否為大寫字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:224
+#: ../../c-api/unicode.rst:230
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a titlecase character."
-msgstr ""
+msgstr "根據 *ch* 是否為首字大寫字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:229
+#: ../../c-api/unicode.rst:235
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a linebreak character."
-msgstr ""
+msgstr "根據 *ch* 是否為換行字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:234
+#: ../../c-api/unicode.rst:240
msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character."
-msgstr ""
+msgstr "根據 *ch* 是否為十進位字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:239
+#: ../../c-api/unicode.rst:245
msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character."
-msgstr ""
+msgstr "根據 *ch* 是否為數字 (digit) 字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:244
+#: ../../c-api/unicode.rst:250
msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character."
-msgstr ""
+msgstr "根據 *ch* 是否為數值 (numeric) 字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:249
+#: ../../c-api/unicode.rst:255
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character."
-msgstr ""
+msgstr "根據 *ch* 是否為字母字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:254
+#: ../../c-api/unicode.rst:260
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character."
-msgstr ""
+msgstr "根據 *ch* 是否為字母數字 (alphanumeric) 字元來回傳 ``1`` 或 ``0``。"
-#: ../../c-api/unicode.rst:259
+#: ../../c-api/unicode.rst:265
msgid ""
-"Return ``1`` or ``0`` depending on whether *ch* is a printable character. "
-"Nonprintable characters are those characters defined in the Unicode "
-"character database as \"Other\" or \"Separator\", excepting the ASCII space "
-"(0x20) which is considered printable. (Note that printable characters in "
-"this context are those which should not be escaped when :func:`repr` is "
-"invoked on a string. It has no bearing on the handling of strings written "
-"to :data:`sys.stdout` or :data:`sys.stderr`.)"
+"Return ``1`` or ``0`` depending on whether *ch* is a printable character, in "
+"the sense of :meth:`str.isprintable`."
msgstr ""
+"根據 *ch* 是否為可列印字元(如 :meth:`str.isprintable` 所定義)來回傳 ``1`` "
+"或 ``0``。"
-#: ../../c-api/unicode.rst:268
+#: ../../c-api/unicode.rst:269
msgid "These APIs can be used for fast direct character conversions:"
-msgstr ""
+msgstr "這些 API 可用於快速直接字元轉換:"
-#: ../../c-api/unicode.rst:273
+#: ../../c-api/unicode.rst:274
msgid "Return the character *ch* converted to lower case."
-msgstr ""
+msgstr "回傳轉換為小寫的 *ch* 字元。"
-#: ../../c-api/unicode.rst:278
+#: ../../c-api/unicode.rst:279
msgid "Return the character *ch* converted to upper case."
-msgstr ""
+msgstr "回傳轉換為大寫的 *ch* 字元。"
-#: ../../c-api/unicode.rst:283
+#: ../../c-api/unicode.rst:284
msgid "Return the character *ch* converted to title case."
-msgstr ""
+msgstr "回傳轉換為首字大寫的 *ch* 字元。"
-#: ../../c-api/unicode.rst:288
+#: ../../c-api/unicode.rst:289
msgid ""
"Return the character *ch* converted to a decimal positive integer. Return "
"``-1`` if this is not possible. This function does not raise exceptions."
msgstr ""
+"回傳轉換為十進位正整數的 *ch* 字元,若無法轉換則回傳 ``-1``。此函式不會引發例"
+"外。"
-#: ../../c-api/unicode.rst:294
+#: ../../c-api/unicode.rst:295
msgid ""
"Return the character *ch* converted to a single digit integer. Return ``-1`` "
"if this is not possible. This function does not raise exceptions."
msgstr ""
+"回傳轉換為單一數字整數的 *ch* 字元,若無法轉換則回傳 ``-1``。此函式不會引發例"
+"外。"
-#: ../../c-api/unicode.rst:300
+#: ../../c-api/unicode.rst:301
msgid ""
"Return the character *ch* converted to a double. Return ``-1.0`` if this is "
"not possible. This function does not raise exceptions."
msgstr ""
+"回傳轉換為雙精度浮點數 (double) 的 *ch* 字元,若無法轉換則回傳 ``-1.0``。此函"
+"式不會引發例外。"
-#: ../../c-api/unicode.rst:304
+#: ../../c-api/unicode.rst:305
msgid "These APIs can be used to work with surrogates:"
-msgstr ""
+msgstr "這些 API 可用於處理代理字元:"
-#: ../../c-api/unicode.rst:308
+#: ../../c-api/unicode.rst:309
msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)."
-msgstr ""
+msgstr "檢查 *ch* 是否為代理字元 (surrogate, ``0xD800 <= ch <= 0xDFFF``)。"
-#: ../../c-api/unicode.rst:312
+#: ../../c-api/unicode.rst:313
msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)."
msgstr ""
+"檢查 *ch* 是否為高代理字元 (high surrogate, ``0xD800 <= ch <= 0xDBFF``)。"
-#: ../../c-api/unicode.rst:316
+#: ../../c-api/unicode.rst:317
msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)."
msgstr ""
+"檢查 *ch* 是否為低代理字元 (low surrogate, ``0xDC00 <= ch <= 0xDFFF``)。"
-#: ../../c-api/unicode.rst:320
+#: ../../c-api/unicode.rst:321
msgid ""
"Join two surrogate code points and return a single :c:type:`Py_UCS4` value. "
"*high* and *low* are respectively the leading and trailing surrogates in a "
@@ -323,34 +336,34 @@ msgid ""
"be in the range [0xDC00; 0xDFFF]."
msgstr ""
-#: ../../c-api/unicode.rst:327
+#: ../../c-api/unicode.rst:328
msgid "Creating and accessing Unicode strings"
msgstr ""
-#: ../../c-api/unicode.rst:329
+#: ../../c-api/unicode.rst:330
msgid ""
"To create Unicode objects and access their basic sequence properties, use "
"these APIs:"
msgstr ""
-#: ../../c-api/unicode.rst:334
+#: ../../c-api/unicode.rst:335
msgid ""
"Create a new Unicode object. *maxchar* should be the true maximum code "
"point to be placed in the string. As an approximation, it can be rounded up "
"to the nearest value in the sequence 127, 255, 65535, 1114111."
msgstr ""
-#: ../../c-api/unicode.rst:338
+#: ../../c-api/unicode.rst:339
msgid ""
"This is the recommended way to allocate a new Unicode object. Objects "
"created using this function are not resizable."
msgstr ""
-#: ../../c-api/unicode.rst:341
+#: ../../c-api/unicode.rst:342
msgid "On error, set an exception and return ``NULL``."
msgstr ""
-#: ../../c-api/unicode.rst:349
+#: ../../c-api/unicode.rst:350
msgid ""
"Create a new Unicode object with the given *kind* (possible values are :c:"
"macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:"
@@ -358,7 +371,7 @@ msgid ""
"1, 2 or 4 bytes per character, as given by the kind."
msgstr ""
-#: ../../c-api/unicode.rst:354
+#: ../../c-api/unicode.rst:355
msgid ""
"If necessary, the input *buffer* is copied and transformed into the "
"canonical representation. For example, if the *buffer* is a UCS4 string (:c:"
@@ -366,7 +379,7 @@ msgid ""
"range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)."
msgstr ""
-#: ../../c-api/unicode.rst:365
+#: ../../c-api/unicode.rst:366
msgid ""
"Create a Unicode object from the char buffer *str*. The bytes will be "
"interpreted as being UTF-8 encoded. The buffer is copied into the new "
@@ -374,29 +387,29 @@ msgid ""
"data is not allowed."
msgstr ""
-#: ../../c-api/unicode.rst:371
+#: ../../c-api/unicode.rst:372
msgid "This function raises :exc:`SystemError` when:"
-msgstr ""
+msgstr "此函式在以下情況下會引發 :exc:`SystemError`:"
-#: ../../c-api/unicode.rst:373
+#: ../../c-api/unicode.rst:374
msgid "*size* < 0,"
-msgstr ""
+msgstr "*size* < 0,"
-#: ../../c-api/unicode.rst:374
+#: ../../c-api/unicode.rst:375
msgid "*str* is ``NULL`` and *size* > 0"
-msgstr ""
+msgstr "*str* 為 ``NULL`` 且 *size* > 0"
-#: ../../c-api/unicode.rst:376
+#: ../../c-api/unicode.rst:377
msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore."
-msgstr ""
+msgstr "*str* == ``NULL`` 且 *size* > 0 不再被允許。"
-#: ../../c-api/unicode.rst:382
+#: ../../c-api/unicode.rst:383
msgid ""
"Create a Unicode object from a UTF-8 encoded null-terminated char buffer "
"*str*."
msgstr ""
-#: ../../c-api/unicode.rst:388
+#: ../../c-api/unicode.rst:389
msgid ""
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
"arguments, calculate the size of the resulting Python Unicode string and "
@@ -405,23 +418,23 @@ msgid ""
"*format* ASCII-encoded string."
msgstr ""
-#: ../../c-api/unicode.rst:394
+#: ../../c-api/unicode.rst:395
msgid ""
"A conversion specifier contains two or more characters and has the following "
"components, which must occur in this order:"
msgstr ""
-#: ../../c-api/unicode.rst:397
+#: ../../c-api/unicode.rst:398
msgid "The ``'%'`` character, which marks the start of the specifier."
msgstr ""
-#: ../../c-api/unicode.rst:399
+#: ../../c-api/unicode.rst:400
msgid ""
"Conversion flags (optional), which affect the result of some conversion "
"types."
msgstr ""
-#: ../../c-api/unicode.rst:402
+#: ../../c-api/unicode.rst:403
msgid ""
"Minimum field width (optional). If specified as an ``'*'`` (asterisk), the "
"actual width is given in the next argument, which must be of type :c:expr:"
@@ -429,7 +442,7 @@ msgid ""
"optional precision."
msgstr ""
-#: ../../c-api/unicode.rst:407
+#: ../../c-api/unicode.rst:408
msgid ""
"Precision (optional), given as a ``'.'`` (dot) followed by the precision. If "
"specified as ``'*'`` (an asterisk), the actual precision is given in the "
@@ -437,316 +450,316 @@ msgid ""
"comes after the precision."
msgstr ""
-#: ../../c-api/unicode.rst:412
+#: ../../c-api/unicode.rst:413
msgid "Length modifier (optional)."
msgstr ""
-#: ../../c-api/unicode.rst:414
+#: ../../c-api/unicode.rst:415
msgid "Conversion type."
msgstr ""
-#: ../../c-api/unicode.rst:416
+#: ../../c-api/unicode.rst:417
msgid "The conversion flag characters are:"
msgstr ""
-#: ../../c-api/unicode.rst:421
+#: ../../c-api/unicode.rst:422
msgid "Flag"
msgstr "旗標"
-#: ../../c-api/unicode.rst:421
+#: ../../c-api/unicode.rst:422
msgid "Meaning"
msgstr "含義"
-#: ../../c-api/unicode.rst:423
+#: ../../c-api/unicode.rst:424
msgid "``0``"
msgstr "``0``"
-#: ../../c-api/unicode.rst:423
+#: ../../c-api/unicode.rst:424
msgid "The conversion will be zero padded for numeric values."
msgstr ""
-#: ../../c-api/unicode.rst:425
+#: ../../c-api/unicode.rst:426
msgid "``-``"
msgstr "``-``"
-#: ../../c-api/unicode.rst:425
+#: ../../c-api/unicode.rst:426
msgid ""
"The converted value is left adjusted (overrides the ``0`` flag if both are "
"given)."
msgstr ""
-#: ../../c-api/unicode.rst:429
+#: ../../c-api/unicode.rst:430
msgid ""
"The length modifiers for following integer conversions (``d``, ``i``, ``o``, "
"``u``, ``x``, or ``X``) specify the type of the argument (:c:expr:`int` by "
"default):"
msgstr ""
-#: ../../c-api/unicode.rst:436
+#: ../../c-api/unicode.rst:437
msgid "Modifier"
msgstr ""
-#: ../../c-api/unicode.rst:436
+#: ../../c-api/unicode.rst:437
msgid "Types"
msgstr ""
-#: ../../c-api/unicode.rst:438
+#: ../../c-api/unicode.rst:439
msgid "``l``"
msgstr "``l``"
-#: ../../c-api/unicode.rst:438
+#: ../../c-api/unicode.rst:439
msgid ":c:expr:`long` or :c:expr:`unsigned long`"
msgstr ":c:expr:`long` 或 :c:expr:`unsigned long`"
-#: ../../c-api/unicode.rst:440
+#: ../../c-api/unicode.rst:441
msgid "``ll``"
msgstr "``ll``"
-#: ../../c-api/unicode.rst:440
+#: ../../c-api/unicode.rst:441
msgid ":c:expr:`long long` or :c:expr:`unsigned long long`"
msgstr ":c:expr:`long long` 或 :c:expr:`unsigned long long`"
-#: ../../c-api/unicode.rst:442
+#: ../../c-api/unicode.rst:443
msgid "``j``"
msgstr "``j``"
-#: ../../c-api/unicode.rst:442
+#: ../../c-api/unicode.rst:443
msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`"
msgstr ":c:type:`intmax_t` 或 :c:type:`uintmax_t`"
-#: ../../c-api/unicode.rst:444
+#: ../../c-api/unicode.rst:445
msgid "``z``"
msgstr "``z``"
-#: ../../c-api/unicode.rst:444
+#: ../../c-api/unicode.rst:445
msgid ":c:type:`size_t` or :c:type:`ssize_t`"
msgstr ":c:type:`size_t` 或 :c:type:`ssize_t`"
-#: ../../c-api/unicode.rst:446
+#: ../../c-api/unicode.rst:447
msgid "``t``"
msgstr "``t``"
-#: ../../c-api/unicode.rst:446
+#: ../../c-api/unicode.rst:447
msgid ":c:type:`ptrdiff_t`"
msgstr ":c:type:`ptrdiff_t`"
-#: ../../c-api/unicode.rst:449
+#: ../../c-api/unicode.rst:450
msgid ""
"The length modifier ``l`` for following conversions ``s`` or ``V`` specify "
"that the type of the argument is :c:expr:`const wchar_t*`."
msgstr ""
-#: ../../c-api/unicode.rst:452
+#: ../../c-api/unicode.rst:453
msgid "The conversion specifiers are:"
msgstr ""
-#: ../../c-api/unicode.rst:458
+#: ../../c-api/unicode.rst:459
msgid "Conversion Specifier"
msgstr ""
-#: ../../c-api/unicode.rst:459
+#: ../../c-api/unicode.rst:460
msgid "Type"
msgstr ""
-#: ../../c-api/unicode.rst:460
+#: ../../c-api/unicode.rst:461
msgid "Comment"
msgstr ""
-#: ../../c-api/unicode.rst:462
+#: ../../c-api/unicode.rst:463
msgid "``%``"
msgstr "``%``"
-#: ../../c-api/unicode.rst:463
+#: ../../c-api/unicode.rst:464
msgid "*n/a*"
msgstr "*n/a*"
-#: ../../c-api/unicode.rst:464
+#: ../../c-api/unicode.rst:465
msgid "The literal ``%`` character."
-msgstr ""
+msgstr "字面 ``%`` 字元。"
-#: ../../c-api/unicode.rst:466
+#: ../../c-api/unicode.rst:467
msgid "``d``, ``i``"
msgstr "``d``, ``i``"
-#: ../../c-api/unicode.rst:467 ../../c-api/unicode.rst:471
-#: ../../c-api/unicode.rst:475 ../../c-api/unicode.rst:479
-#: ../../c-api/unicode.rst:483
+#: ../../c-api/unicode.rst:468 ../../c-api/unicode.rst:472
+#: ../../c-api/unicode.rst:476 ../../c-api/unicode.rst:480
+#: ../../c-api/unicode.rst:484
msgid "Specified by the length modifier"
msgstr ""
-#: ../../c-api/unicode.rst:468
+#: ../../c-api/unicode.rst:469
msgid "The decimal representation of a signed C integer."
-msgstr ""
+msgstr "一個有符號 C 整數的十進位表示法。"
-#: ../../c-api/unicode.rst:470
+#: ../../c-api/unicode.rst:471
msgid "``u``"
msgstr "``u``"
-#: ../../c-api/unicode.rst:472
+#: ../../c-api/unicode.rst:473
msgid "The decimal representation of an unsigned C integer."
-msgstr ""
+msgstr "一個無符號 C 整數的十進位表示法。"
-#: ../../c-api/unicode.rst:474
+#: ../../c-api/unicode.rst:475
msgid "``o``"
msgstr "``o``"
-#: ../../c-api/unicode.rst:476
+#: ../../c-api/unicode.rst:477
msgid "The octal representation of an unsigned C integer."
-msgstr ""
+msgstr "一個無符號 C 整數的八進位表示法。"
-#: ../../c-api/unicode.rst:478
+#: ../../c-api/unicode.rst:479
msgid "``x``"
msgstr "``x``"
-#: ../../c-api/unicode.rst:480
+#: ../../c-api/unicode.rst:481
msgid "The hexadecimal representation of an unsigned C integer (lowercase)."
-msgstr ""
+msgstr "一個無符號 C 整數的十六進位表示法(小寫)。"
-#: ../../c-api/unicode.rst:482
+#: ../../c-api/unicode.rst:483
msgid "``X``"
msgstr "``X``"
-#: ../../c-api/unicode.rst:484
+#: ../../c-api/unicode.rst:485
msgid "The hexadecimal representation of an unsigned C integer (uppercase)."
-msgstr ""
+msgstr "一個無符號 C 整數的十六進位表示法(大寫)。"
-#: ../../c-api/unicode.rst:486
+#: ../../c-api/unicode.rst:487
msgid "``c``"
msgstr "``c``"
-#: ../../c-api/unicode.rst:487
+#: ../../c-api/unicode.rst:488
msgid ":c:expr:`int`"
msgstr ":c:expr:`int`"
-#: ../../c-api/unicode.rst:488
+#: ../../c-api/unicode.rst:489
msgid "A single character."
-msgstr ""
+msgstr "一個單一字元。"
-#: ../../c-api/unicode.rst:490
+#: ../../c-api/unicode.rst:491
msgid "``s``"
msgstr "``s``"
-#: ../../c-api/unicode.rst:491
+#: ../../c-api/unicode.rst:492
msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`"
msgstr ":c:expr:`const char*` 或 :c:expr:`const wchar_t*`"
-#: ../../c-api/unicode.rst:492
+#: ../../c-api/unicode.rst:493
msgid "A null-terminated C character array."
-msgstr ""
+msgstr "一個以 null 結尾的 C 字元陣列。"
-#: ../../c-api/unicode.rst:494
+#: ../../c-api/unicode.rst:495
msgid "``p``"
msgstr "``p``"
-#: ../../c-api/unicode.rst:495
+#: ../../c-api/unicode.rst:496
msgid ":c:expr:`const void*`"
msgstr ":c:expr:`const void*`"
-#: ../../c-api/unicode.rst:496
+#: ../../c-api/unicode.rst:497
msgid ""
"The hex representation of a C pointer. Mostly equivalent to "
"``printf(\"%p\")`` except that it is guaranteed to start with the literal "
"``0x`` regardless of what the platform's ``printf`` yields."
msgstr ""
-#: ../../c-api/unicode.rst:501
+#: ../../c-api/unicode.rst:502
msgid "``A``"
msgstr "``A``"
-#: ../../c-api/unicode.rst:502 ../../c-api/unicode.rst:506
-#: ../../c-api/unicode.rst:516 ../../c-api/unicode.rst:520
-#: ../../c-api/unicode.rst:524 ../../c-api/unicode.rst:529
+#: ../../c-api/unicode.rst:503 ../../c-api/unicode.rst:507
+#: ../../c-api/unicode.rst:517 ../../c-api/unicode.rst:521
+#: ../../c-api/unicode.rst:525 ../../c-api/unicode.rst:530
msgid ":c:expr:`PyObject*`"
msgstr ":c:expr:`PyObject*`"
-#: ../../c-api/unicode.rst:503
+#: ../../c-api/unicode.rst:504
msgid "The result of calling :func:`ascii`."
-msgstr ""
+msgstr "呼叫 :func:`ascii` 的結果。"
-#: ../../c-api/unicode.rst:505
+#: ../../c-api/unicode.rst:506
msgid "``U``"
msgstr "``U``"
-#: ../../c-api/unicode.rst:507
+#: ../../c-api/unicode.rst:508
msgid "A Unicode object."
-msgstr "一 Unicode 物件。"
+msgstr "一個 Unicode 物件。"
-#: ../../c-api/unicode.rst:509
+#: ../../c-api/unicode.rst:510
msgid "``V``"
msgstr "``V``"
-#: ../../c-api/unicode.rst:510
+#: ../../c-api/unicode.rst:511
msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`"
msgstr ":c:expr:`PyObject*`、:c:expr:`const char*` 或 :c:expr:`const wchar_t*`"
-#: ../../c-api/unicode.rst:511
+#: ../../c-api/unicode.rst:512
msgid ""
"A Unicode object (which may be ``NULL``) and a null-terminated C character "
"array as a second parameter (which will be used, if the first parameter is "
"``NULL``)."
msgstr ""
-#: ../../c-api/unicode.rst:515
+#: ../../c-api/unicode.rst:516
msgid "``S``"
msgstr "``S``"
-#: ../../c-api/unicode.rst:517
+#: ../../c-api/unicode.rst:518
msgid "The result of calling :c:func:`PyObject_Str`."
-msgstr ""
+msgstr "呼叫 :c:func:`PyObject_Str` 的結果。"
-#: ../../c-api/unicode.rst:519
+#: ../../c-api/unicode.rst:520
msgid "``R``"
msgstr "``R``"
-#: ../../c-api/unicode.rst:521
+#: ../../c-api/unicode.rst:522
msgid "The result of calling :c:func:`PyObject_Repr`."
-msgstr ""
+msgstr "呼叫 :c:func:`PyObject_Repr` 的結果。"
-#: ../../c-api/unicode.rst:523
+#: ../../c-api/unicode.rst:524
msgid "``T``"
msgstr "``T``"
-#: ../../c-api/unicode.rst:525
+#: ../../c-api/unicode.rst:526
msgid ""
"Get the fully qualified name of an object type; call :c:func:"
"`PyType_GetFullyQualifiedName`."
msgstr ""
-#: ../../c-api/unicode.rst:528
+#: ../../c-api/unicode.rst:529
msgid "``#T``"
msgstr "``#T``"
-#: ../../c-api/unicode.rst:530
+#: ../../c-api/unicode.rst:531
msgid ""
"Similar to ``T`` format, but use a colon (``:``) as separator between the "
"module name and the qualified name."
msgstr ""
-#: ../../c-api/unicode.rst:533
+#: ../../c-api/unicode.rst:534
msgid "``N``"
msgstr "``N``"
-#: ../../c-api/unicode.rst:534 ../../c-api/unicode.rst:539
+#: ../../c-api/unicode.rst:535 ../../c-api/unicode.rst:540
msgid ":c:expr:`PyTypeObject*`"
msgstr ":c:expr:`PyTypeObject*`"
-#: ../../c-api/unicode.rst:535
+#: ../../c-api/unicode.rst:536
msgid ""
"Get the fully qualified name of a type; call :c:func:"
"`PyType_GetFullyQualifiedName`."
msgstr ""
-#: ../../c-api/unicode.rst:538
+#: ../../c-api/unicode.rst:539
msgid "``#N``"
msgstr "``#N``"
-#: ../../c-api/unicode.rst:540
+#: ../../c-api/unicode.rst:541
msgid ""
"Similar to ``N`` format, but use a colon (``:``) as separator between the "
"module name and the qualified name."
msgstr ""
-#: ../../c-api/unicode.rst:544
+#: ../../c-api/unicode.rst:545
msgid ""
"The width formatter unit is number of characters rather than bytes. The "
"precision formatter unit is number of bytes or :c:type:`wchar_t` items (if "
@@ -756,28 +769,30 @@ msgid ""
"``PyObject*`` argument is not ``NULL``)."
msgstr ""
-#: ../../c-api/unicode.rst:552
+#: ../../c-api/unicode.rst:553
msgid ""
"Unlike to C :c:func:`printf` the ``0`` flag has effect even when a precision "
"is given for integer conversions (``d``, ``i``, ``u``, ``o``, ``x``, or "
"``X``)."
msgstr ""
-#: ../../c-api/unicode.rst:556
+#: ../../c-api/unicode.rst:557
msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added."
-msgstr ""
+msgstr "新增對 ``\"%lld\"`` 和 ``\"%llu\"`` 的支援。"
-#: ../../c-api/unicode.rst:559
+#: ../../c-api/unicode.rst:560
msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added."
-msgstr ""
+msgstr "新增對 ``\"%li\"``、``\"%lli\"`` 和 ``\"%zi\"`` 的支援。"
-#: ../../c-api/unicode.rst:562
+#: ../../c-api/unicode.rst:563
msgid ""
"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, "
"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added."
msgstr ""
+"新增對 ``\"%s\"``、``\"%A\"``、``\"%U\"``、``\"%V\"``、``\"%S\"``、"
+"``\"%R\"`` 的寬度和精確度格式化支援。"
-#: ../../c-api/unicode.rst:566
+#: ../../c-api/unicode.rst:567
msgid ""
"Support for conversion specifiers ``o`` and ``X``. Support for length "
"modifiers ``j`` and ``t``. Length modifiers are now applied to all integer "
@@ -786,68 +801,99 @@ msgid ""
"flag ``-``."
msgstr ""
-#: ../../c-api/unicode.rst:574
+#: ../../c-api/unicode.rst:575
msgid ""
"An unrecognized format character now sets a :exc:`SystemError`. In previous "
"versions it caused all the rest of the format string to be copied as-is to "
"the result string, and any extra arguments discarded."
msgstr ""
-#: ../../c-api/unicode.rst:578
+#: ../../c-api/unicode.rst:579
msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added."
-msgstr ""
+msgstr "新增對 ``%T``、``%#T``、``%N`` 和 ``%#N`` 格式的支援。"
-#: ../../c-api/unicode.rst:584
+#: ../../c-api/unicode.rst:585
msgid ""
"Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
-#: ../../c-api/unicode.rst:590
+#: ../../c-api/unicode.rst:591
msgid ""
"Copy an instance of a Unicode subtype to a new true Unicode object if "
"necessary. If *obj* is already a true Unicode object (not a subtype), return "
"a new :term:`strong reference` to the object."
msgstr ""
-#: ../../c-api/unicode.rst:594
+#: ../../c-api/unicode.rst:595
msgid ""
"Objects other than Unicode or its subtypes will cause a :exc:`TypeError`."
msgstr ""
#: ../../c-api/unicode.rst:600
-msgid "Decode an encoded object *obj* to a Unicode object."
+msgid "Create a Unicode Object from the given Unicode code point *ordinal*."
msgstr ""
#: ../../c-api/unicode.rst:602
msgid ""
+"The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is raised in "
+"the case it is not."
+msgstr ""
+
+#: ../../c-api/unicode.rst:609
+msgid "Decode an encoded object *obj* to a Unicode object."
+msgstr ""
+
+#: ../../c-api/unicode.rst:611
+msgid ""
":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects "
"` are decoded according to the given *encoding* and using "
"the error handling defined by *errors*. Both can be ``NULL`` to have the "
"interface use the default values (see :ref:`builtincodecs` for details)."
msgstr ""
-#: ../../c-api/unicode.rst:608
+#: ../../c-api/unicode.rst:617
msgid ""
"All other objects, including Unicode objects, cause a :exc:`TypeError` to be "
"set."
msgstr ""
-#: ../../c-api/unicode.rst:611
+#: ../../c-api/unicode.rst:620
msgid ""
"The API returns ``NULL`` if there was an error. The caller is responsible "
"for decref'ing the returned objects."
msgstr ""
-#: ../../c-api/unicode.rst:617
+#: ../../c-api/unicode.rst:626
+msgid ""
+"Return a mapping suitable for decoding a custom single-byte encoding. Given "
+"a Unicode string *string* of up to 256 characters representing an encoding "
+"table, returns either a compact internal mapping object or a dictionary "
+"mapping character ordinals to byte values. Raises a :exc:`TypeError` and "
+"return ``NULL`` on invalid input. .. versionadded:: 3.2"
+msgstr ""
+
+#: ../../c-api/unicode.rst:636
+msgid ""
+"Return the name of the default string encoding, ``\"utf-8\"``. See :func:"
+"`sys.getdefaultencoding`."
+msgstr ""
+
+#: ../../c-api/unicode.rst:639
+msgid ""
+"The returned string does not need to be freed, and is valid until "
+"interpreter shutdown."
+msgstr ""
+
+#: ../../c-api/unicode.rst:645
msgid "Return the length of the Unicode object, in code points."
msgstr ""
-#: ../../c-api/unicode.rst:619
+#: ../../c-api/unicode.rst:647
msgid "On error, set an exception and return ``-1``."
-msgstr ""
+msgstr "發生錯誤時,設定例外並回傳 ``-1``。"
-#: ../../c-api/unicode.rst:630
+#: ../../c-api/unicode.rst:658
msgid ""
"Copy characters from one Unicode object into another. This function "
"performs character conversion when necessary and falls back to :c:func:`!"
@@ -855,61 +901,61 @@ msgid ""
"otherwise returns the number of copied characters."
msgstr ""
-#: ../../c-api/unicode.rst:641
+#: ../../c-api/unicode.rst:669
msgid ""
"Fill a string with a character: write *fill_char* into ``unicode[start:"
"start+length]``."
msgstr ""
-#: ../../c-api/unicode.rst:644
+#: ../../c-api/unicode.rst:672
msgid ""
"Fail if *fill_char* is bigger than the string maximum character, or if the "
"string has more than 1 reference."
msgstr ""
-#: ../../c-api/unicode.rst:647
+#: ../../c-api/unicode.rst:675
msgid ""
"Return the number of written character, or return ``-1`` and raise an "
"exception on error."
msgstr ""
-#: ../../c-api/unicode.rst:656
+#: ../../c-api/unicode.rst:684
msgid ""
"Write a character to a string. The string must have been created through :c:"
"func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, "
"the string must not be shared, or have been hashed yet."
msgstr ""
-#: ../../c-api/unicode.rst:660
+#: ../../c-api/unicode.rst:688
msgid ""
"This function checks that *unicode* is a Unicode object, that the index is "
"not out of bounds, and that the object can be modified safely (i.e. that it "
"its reference count is one)."
msgstr ""
-#: ../../c-api/unicode.rst:664
+#: ../../c-api/unicode.rst:692
msgid "Return ``0`` on success, ``-1`` on error with an exception set."
-msgstr ""
+msgstr "成功時回傳 ``0``,發生錯誤時設定例外並回傳 ``-1``。"
-#: ../../c-api/unicode.rst:671
+#: ../../c-api/unicode.rst:699
msgid ""
"Read a character from a string. This function checks that *unicode* is a "
"Unicode object and the index is not out of bounds, in contrast to :c:func:"
"`PyUnicode_READ_CHAR`, which performs no error checking."
msgstr ""
-#: ../../c-api/unicode.rst:675
+#: ../../c-api/unicode.rst:703
msgid "Return character on success, ``-1`` on error with an exception set."
-msgstr ""
+msgstr "成功時回傳字元,發生錯誤時設定例外並回傳 ``-1``。"
-#: ../../c-api/unicode.rst:683
+#: ../../c-api/unicode.rst:711
msgid ""
"Return a substring of *unicode*, from character index *start* (included) to "
"character index *end* (excluded). Negative indices are not supported. On "
"error, set an exception and return ``NULL``."
msgstr ""
-#: ../../c-api/unicode.rst:693
+#: ../../c-api/unicode.rst:721
msgid ""
"Copy the string *unicode* into a UCS4 buffer, including a null character, if "
"*copy_null* is set. Returns ``NULL`` and sets an exception on error (in "
@@ -917,7 +963,7 @@ msgid ""
"*unicode*). *buffer* is returned on success."
msgstr ""
-#: ../../c-api/unicode.rst:703
+#: ../../c-api/unicode.rst:731
msgid ""
"Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:"
"func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:"
@@ -925,17 +971,17 @@ msgid ""
"appended."
msgstr ""
-#: ../../c-api/unicode.rst:712
+#: ../../c-api/unicode.rst:740
msgid "Locale Encoding"
msgstr ""
-#: ../../c-api/unicode.rst:714
+#: ../../c-api/unicode.rst:742
msgid ""
"The current locale encoding can be used to decode text from the operating "
"system."
msgstr ""
-#: ../../c-api/unicode.rst:721
+#: ../../c-api/unicode.rst:749
msgid ""
"Decode a string from UTF-8 on Android and VxWorks, or from the current "
"locale encoding on other platforms. The supported error handlers are "
@@ -944,21 +990,21 @@ msgid ""
"null character but cannot contain embedded null characters."
msgstr ""
-#: ../../c-api/unicode.rst:728
+#: ../../c-api/unicode.rst:756
msgid ""
"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :"
"term:`filesystem encoding and error handler`."
msgstr ""
-#: ../../c-api/unicode.rst:731 ../../c-api/unicode.rst:766
+#: ../../c-api/unicode.rst:759 ../../c-api/unicode.rst:794
msgid "This function ignores the :ref:`Python UTF-8 Mode `."
-msgstr ""
+msgstr "此函式會忽略 :ref:`Python UTF-8 模式 `。"
-#: ../../c-api/unicode.rst:735 ../../c-api/unicode.rst:832
+#: ../../c-api/unicode.rst:763 ../../c-api/unicode.rst:879
msgid "The :c:func:`Py_DecodeLocale` function."
msgstr ":c:func:`Py_DecodeLocale` 函式。"
-#: ../../c-api/unicode.rst:739
+#: ../../c-api/unicode.rst:767
msgid ""
"The function now also uses the current locale encoding for the "
"``surrogateescape`` error handler, except on Android. Previously, :c:func:"
@@ -966,13 +1012,15 @@ msgid ""
"locale encoding was used for ``strict``."
msgstr ""
-#: ../../c-api/unicode.rst:748
+#: ../../c-api/unicode.rst:776
msgid ""
"Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string "
"length using :c:func:`!strlen`."
msgstr ""
+"類似於 :c:func:`PyUnicode_DecodeLocaleAndSize`,但使用 :c:func:`!strlen` 計算"
+"字串長度。"
-#: ../../c-api/unicode.rst:756
+#: ../../c-api/unicode.rst:784
msgid ""
"Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current "
"locale encoding on other platforms. The supported error handlers are "
@@ -981,17 +1029,17 @@ msgid ""
"`bytes` object. *unicode* cannot contain embedded null characters."
msgstr ""
-#: ../../c-api/unicode.rst:763
+#: ../../c-api/unicode.rst:791
msgid ""
"Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:"
"`filesystem encoding and error handler`."
msgstr ""
-#: ../../c-api/unicode.rst:770 ../../c-api/unicode.rst:863
+#: ../../c-api/unicode.rst:798 ../../c-api/unicode.rst:910
msgid "The :c:func:`Py_EncodeLocale` function."
msgstr ":c:func:`Py_EncodeLocale` 函式。"
-#: ../../c-api/unicode.rst:774
+#: ../../c-api/unicode.rst:802
msgid ""
"The function now also uses the current locale encoding for the "
"``surrogateescape`` error handler, except on Android. Previously, :c:func:"
@@ -999,103 +1047,124 @@ msgid ""
"locale encoding was used for ``strict``."
msgstr ""
-#: ../../c-api/unicode.rst:783
+#: ../../c-api/unicode.rst:811
msgid "File System Encoding"
-msgstr ""
+msgstr "檔案系統編碼"
-#: ../../c-api/unicode.rst:785
+#: ../../c-api/unicode.rst:813
msgid ""
"Functions encoding to and decoding from the :term:`filesystem encoding and "
"error handler` (:pep:`383` and :pep:`529`)."
msgstr ""
-#: ../../c-api/unicode.rst:788
+#: ../../c-api/unicode.rst:816
msgid ""
"To encode file names to :class:`bytes` during argument parsing, the "
-"``\"O&\"`` converter should be used, passing :c:func:`PyUnicode_FSConverter` "
-"as the conversion function:"
+"``\"O&\"`` converter should be used, passing :c:func:`!"
+"PyUnicode_FSConverter` as the conversion function:"
msgstr ""
-#: ../../c-api/unicode.rst:794
+#: ../../c-api/unicode.rst:822
msgid ""
-"ParseTuple converter: encode :class:`str` objects -- obtained directly or "
-"through the :class:`os.PathLike` interface -- to :class:`bytes` using :c:"
-"func:`PyUnicode_EncodeFSDefault`; :class:`bytes` objects are output as-is. "
-"*result* must be a :c:expr:`PyBytesObject*` which must be released when it "
-"is no longer used."
+":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects "
+"-- obtained directly or through the :class:`os.PathLike` interface -- to :"
+"class:`bytes` using :c:func:`PyUnicode_EncodeFSDefault`; :class:`bytes` "
+"objects are output as-is. *result* must be an address of a C variable of "
+"type :c:expr:`PyObject*` (or :c:expr:`PyBytesObject*`). On success, set the "
+"variable to a new :term:`strong reference` to a :ref:`bytes object "
+"` which must be released when it is no longer used and return "
+"a non-zero value (:c:macro:`Py_CLEANUP_SUPPORTED`). Embedded null bytes are "
+"not allowed in the result. On failure, return ``0`` with an exception set."
msgstr ""
-#: ../../c-api/unicode.rst:802 ../../c-api/unicode.rst:819
-msgid "Accepts a :term:`path-like object`."
+#: ../../c-api/unicode.rst:834
+msgid ""
+"If *obj* is ``NULL``, the function releases a strong reference stored in the "
+"variable referred by *result* and returns ``1``."
msgstr ""
-#: ../../c-api/unicode.rst:805
+#: ../../c-api/unicode.rst:839 ../../c-api/unicode.rst:866
+msgid "Accepts a :term:`path-like object`."
+msgstr "接受一個 :term:`path-like object`。"
+
+#: ../../c-api/unicode.rst:842
msgid ""
"To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` "
-"converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the "
+"converter should be used, passing :c:func:`!PyUnicode_FSDecoder` as the "
"conversion function:"
msgstr ""
-#: ../../c-api/unicode.rst:811
+#: ../../c-api/unicode.rst:848
msgid ""
-"ParseTuple converter: decode :class:`bytes` objects -- obtained either "
-"directly or indirectly through the :class:`os.PathLike` interface -- to :"
-"class:`str` using :c:func:`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` "
-"objects are output as-is. *result* must be a :c:expr:`PyUnicodeObject*` "
-"which must be released when it is no longer used."
+":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects "
+"-- obtained either directly or indirectly through the :class:`os.PathLike` "
+"interface -- to :class:`str` using :c:func:"
+"`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` objects are output as-is. "
+"*result* must be an address of a C variable of type :c:expr:`PyObject*` (or :"
+"c:expr:`PyUnicodeObject*`). On success, set the variable to a new :term:"
+"`strong reference` to a :ref:`Unicode object ` which must be "
+"released when it is no longer used and return a non-zero value (:c:macro:"
+"`Py_CLEANUP_SUPPORTED`). Embedded null characters are not allowed in the "
+"result. On failure, return ``0`` with an exception set."
msgstr ""
-#: ../../c-api/unicode.rst:825
+#: ../../c-api/unicode.rst:861
+msgid ""
+"If *obj* is ``NULL``, release the strong reference to the object referred to "
+"by *result* and return ``1``."
+msgstr ""
+
+#: ../../c-api/unicode.rst:872
msgid "Decode a string from the :term:`filesystem encoding and error handler`."
msgstr ""
-#: ../../c-api/unicode.rst:827
+#: ../../c-api/unicode.rst:874
msgid ""
"If you need to decode a string from the current locale encoding, use :c:func:"
"`PyUnicode_DecodeLocaleAndSize`."
msgstr ""
-#: ../../c-api/unicode.rst:834 ../../c-api/unicode.rst:847
-#: ../../c-api/unicode.rst:867
+#: ../../c-api/unicode.rst:881 ../../c-api/unicode.rst:894
+#: ../../c-api/unicode.rst:914
msgid ""
"The :term:`filesystem error handler ` "
"is now used."
msgstr ""
-#: ../../c-api/unicode.rst:841
+#: ../../c-api/unicode.rst:888
msgid ""
"Decode a null-terminated string from the :term:`filesystem encoding and "
"error handler`."
msgstr ""
-#: ../../c-api/unicode.rst:844
+#: ../../c-api/unicode.rst:891
msgid ""
"If the string length is known, use :c:func:"
"`PyUnicode_DecodeFSDefaultAndSize`."
-msgstr ""
+msgstr "如果字串長度已知,請使用 :c:func:`PyUnicode_DecodeFSDefaultAndSize`。"
-#: ../../c-api/unicode.rst:854
+#: ../../c-api/unicode.rst:901
msgid ""
"Encode a Unicode object to the :term:`filesystem encoding and error "
"handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` "
"object can contain null bytes."
msgstr ""
-#: ../../c-api/unicode.rst:858
+#: ../../c-api/unicode.rst:905
msgid ""
"If you need to encode a string to the current locale encoding, use :c:func:"
"`PyUnicode_EncodeLocale`."
msgstr ""
-#: ../../c-api/unicode.rst:872
+#: ../../c-api/unicode.rst:919
msgid "wchar_t Support"
msgstr "wchar_t 支援"
-#: ../../c-api/unicode.rst:874
+#: ../../c-api/unicode.rst:921
msgid ":c:type:`wchar_t` support for platforms which support it:"
-msgstr ""
+msgstr "對支援 :c:type:`wchar_t` 的平台提供支援:"
-#: ../../c-api/unicode.rst:878
+#: ../../c-api/unicode.rst:925
msgid ""
"Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the "
"given *size*. Passing ``-1`` as the *size* indicates that the function must "
@@ -1103,7 +1172,7 @@ msgid ""
"failure."
msgstr ""
-#: ../../c-api/unicode.rst:886
+#: ../../c-api/unicode.rst:933
msgid ""
"Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. "
"At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly "
@@ -1111,13 +1180,13 @@ msgid ""
"`wchar_t` characters copied or ``-1`` in case of an error."
msgstr ""
-#: ../../c-api/unicode.rst:891
+#: ../../c-api/unicode.rst:938
msgid ""
"When *wstr* is ``NULL``, instead return the *size* that would be required to "
"store all of *unicode* including a terminating null."
msgstr ""
-#: ../../c-api/unicode.rst:894
+#: ../../c-api/unicode.rst:941
msgid ""
"Note that the resulting :c:expr:`wchar_t*` string may or may not be null-"
"terminated. It is the responsibility of the caller to make sure that the :c:"
@@ -1127,7 +1196,7 @@ msgid ""
"most C functions."
msgstr ""
-#: ../../c-api/unicode.rst:904
+#: ../../c-api/unicode.rst:951
msgid ""
"Convert the Unicode object to a wide character string. The output string "
"always ends with a null character. If *size* is not ``NULL``, write the "
@@ -1138,37 +1207,37 @@ msgid ""
"`wchar_t*` string contains null characters a :exc:`ValueError` is raised."
msgstr ""
-#: ../../c-api/unicode.rst:912
+#: ../../c-api/unicode.rst:959
msgid ""
"Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` "
"to free it) on success. On error, returns ``NULL`` and *\\*size* is "
"undefined. Raises a :exc:`MemoryError` if memory allocation is failed."
msgstr ""
-#: ../../c-api/unicode.rst:919
+#: ../../c-api/unicode.rst:966
msgid ""
"Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` "
"string contains null characters."
msgstr ""
-#: ../../c-api/unicode.rst:927
+#: ../../c-api/unicode.rst:974
msgid "Built-in Codecs"
-msgstr ""
+msgstr "內建編解碼器"
-#: ../../c-api/unicode.rst:929
+#: ../../c-api/unicode.rst:976
msgid ""
"Python provides a set of built-in codecs which are written in C for speed. "
"All of these codecs are directly usable via the following functions."
msgstr ""
-#: ../../c-api/unicode.rst:932
+#: ../../c-api/unicode.rst:979
msgid ""
"Many of the following APIs take two arguments encoding and errors, and they "
"have the same semantics as the ones of the built-in :func:`str` string "
"object constructor."
msgstr ""
-#: ../../c-api/unicode.rst:936
+#: ../../c-api/unicode.rst:983
msgid ""
"Setting encoding to ``NULL`` causes the default encoding to be used which is "
"UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for "
@@ -1176,28 +1245,28 @@ msgid ""
"handler` internally."
msgstr ""
-#: ../../c-api/unicode.rst:941
+#: ../../c-api/unicode.rst:988
msgid ""
"Error handling is set by errors which may also be set to ``NULL`` meaning to "
"use the default handling defined for the codec. Default error handling for "
"all built-in codecs is \"strict\" (:exc:`ValueError` is raised)."
msgstr ""
-#: ../../c-api/unicode.rst:945
+#: ../../c-api/unicode.rst:992
msgid ""
"The codecs all use a similar interface. Only deviations from the following "
"generic ones are documented for simplicity."
msgstr ""
-#: ../../c-api/unicode.rst:950
+#: ../../c-api/unicode.rst:997
msgid "Generic Codecs"
-msgstr ""
+msgstr "泛用編解碼器"
-#: ../../c-api/unicode.rst:952
+#: ../../c-api/unicode.rst:999
msgid "These are the generic codec APIs:"
-msgstr ""
+msgstr "這些是泛用編解碼器的 API:"
-#: ../../c-api/unicode.rst:958
+#: ../../c-api/unicode.rst:1005
msgid ""
"Create a Unicode object by decoding *size* bytes of the encoded string "
"*str*. *encoding* and *errors* have the same meaning as the parameters of "
@@ -1206,7 +1275,7 @@ msgid ""
"was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:968
+#: ../../c-api/unicode.rst:1015
msgid ""
"Encode a Unicode object and return the result as Python bytes object. "
"*encoding* and *errors* have the same meaning as the parameters of the same "
@@ -1215,21 +1284,21 @@ msgid ""
"was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:976
+#: ../../c-api/unicode.rst:1023
msgid "UTF-8 Codecs"
msgstr "UTF-8 編解碼器"
-#: ../../c-api/unicode.rst:978
+#: ../../c-api/unicode.rst:1025
msgid "These are the UTF-8 codec APIs:"
-msgstr ""
+msgstr "這些是 UTF-8 編解碼器的 API:"
-#: ../../c-api/unicode.rst:983
+#: ../../c-api/unicode.rst:1030
msgid ""
"Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string "
"*str*. Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:990
+#: ../../c-api/unicode.rst:1037
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If "
"*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will "
@@ -1237,20 +1306,20 @@ msgid ""
"of bytes that have been decoded will be stored in *consumed*."
msgstr ""
-#: ../../c-api/unicode.rst:998
+#: ../../c-api/unicode.rst:1045
msgid ""
"Encode a Unicode object using UTF-8 and return the result as Python bytes "
"object. Error handling is \"strict\". Return ``NULL`` if an exception was "
"raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1002 ../../c-api/unicode.rst:1017
+#: ../../c-api/unicode.rst:1049 ../../c-api/unicode.rst:1064
msgid ""
"The function fails if the string contains surrogate code points (``U+D800`` "
"- ``U+DFFF``)."
msgstr ""
-#: ../../c-api/unicode.rst:1008
+#: ../../c-api/unicode.rst:1055
msgid ""
"Return a pointer to the UTF-8 encoding of the Unicode object, and store the "
"size of the encoded representation (in bytes) in *size*. The *size* "
@@ -1259,13 +1328,15 @@ msgid ""
"regardless of whether there are any other null code points."
msgstr ""
-#: ../../c-api/unicode.rst:1014
+#: ../../c-api/unicode.rst:1061
msgid ""
"On error, set an exception, set *size* to ``-1`` (if it's not NULL) and "
"return ``NULL``."
msgstr ""
+"發生錯誤時,設定例外並將 *size* 設為 ``-1``\\ (如果不是 NULL),並回傳 "
+"``NULL``。"
-#: ../../c-api/unicode.rst:1020
+#: ../../c-api/unicode.rst:1067
msgid ""
"This caches the UTF-8 representation of the string in the Unicode object, "
"and subsequent calls will return a pointer to the same buffer. The caller "
@@ -1274,47 +1345,57 @@ msgid ""
"collected."
msgstr ""
-#: ../../c-api/unicode.rst:1027 ../../c-api/unicode.rst:1040
+#: ../../c-api/unicode.rst:1074 ../../c-api/unicode.rst:1096
msgid "The return type is now ``const char *`` rather of ``char *``."
-msgstr ""
+msgstr "回傳型別現在是 ``const char *`` 而不是 ``char *``。"
-#: ../../c-api/unicode.rst:1030
+#: ../../c-api/unicode.rst:1077
msgid "This function is a part of the :ref:`limited API `."
msgstr ""
-#: ../../c-api/unicode.rst:1036
+#: ../../c-api/unicode.rst:1083
msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size."
+msgstr "與 :c:func:`PyUnicode_AsUTF8AndSize` 類似,但不儲存大小。"
+
+#: ../../c-api/unicode.rst:1087
+msgid ""
+"This function does not have any special behavior for `null characters "
+"`_ embedded within *unicode*. "
+"As a result, strings containing null characters will remain in the returned "
+"string, which some C functions might interpret as the end of the string, "
+"leading to truncation. If truncation is an issue, it is recommended to use :"
+"c:func:`PyUnicode_AsUTF8AndSize` instead."
msgstr ""
-#: ../../c-api/unicode.rst:1045
+#: ../../c-api/unicode.rst:1101
msgid "UTF-32 Codecs"
msgstr "UTF-32 編解碼器"
-#: ../../c-api/unicode.rst:1047
+#: ../../c-api/unicode.rst:1103
msgid "These are the UTF-32 codec APIs:"
-msgstr ""
+msgstr "這些是 UTF-32 編解碼器的 API:"
-#: ../../c-api/unicode.rst:1053
+#: ../../c-api/unicode.rst:1109
msgid ""
"Decode *size* bytes from a UTF-32 encoded buffer string and return the "
"corresponding Unicode object. *errors* (if non-``NULL``) defines the error "
"handling. It defaults to \"strict\"."
msgstr ""
-#: ../../c-api/unicode.rst:1057 ../../c-api/unicode.rst:1107
+#: ../../c-api/unicode.rst:1113 ../../c-api/unicode.rst:1163
msgid ""
"If *byteorder* is non-``NULL``, the decoder starts decoding using the given "
"byte order::"
msgstr ""
-#: ../../c-api/unicode.rst:1060 ../../c-api/unicode.rst:1110
+#: ../../c-api/unicode.rst:1116 ../../c-api/unicode.rst:1166
msgid ""
"*byteorder == -1: little endian\n"
"*byteorder == 0: native order\n"
"*byteorder == 1: big endian"
msgstr ""
-#: ../../c-api/unicode.rst:1064
+#: ../../c-api/unicode.rst:1120
msgid ""
"If ``*byteorder`` is zero, and the first four bytes of the input data are a "
"byte order mark (BOM), the decoder switches to this byte order and the BOM "
@@ -1322,21 +1403,21 @@ msgid ""
"``-1`` or ``1``, any byte order mark is copied to the output."
msgstr ""
-#: ../../c-api/unicode.rst:1069
+#: ../../c-api/unicode.rst:1125
msgid ""
"After completion, *\\*byteorder* is set to the current byte order at the end "
"of input data."
msgstr ""
-#: ../../c-api/unicode.rst:1072 ../../c-api/unicode.rst:1123
+#: ../../c-api/unicode.rst:1128 ../../c-api/unicode.rst:1179
msgid "If *byteorder* is ``NULL``, the codec starts in native order mode."
msgstr ""
-#: ../../c-api/unicode.rst:1074 ../../c-api/unicode.rst:1125
+#: ../../c-api/unicode.rst:1130 ../../c-api/unicode.rst:1181
msgid "Return ``NULL`` if an exception was raised by the codec."
-msgstr ""
+msgstr "如果編解碼器引發例外則回傳 ``NULL``。"
-#: ../../c-api/unicode.rst:1080
+#: ../../c-api/unicode.rst:1136
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If "
"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not "
@@ -1345,29 +1426,29 @@ msgid ""
"number of bytes that have been decoded will be stored in *consumed*."
msgstr ""
-#: ../../c-api/unicode.rst:1089
+#: ../../c-api/unicode.rst:1145
msgid ""
"Return a Python byte string using the UTF-32 encoding in native byte order. "
"The string always starts with a BOM mark. Error handling is \"strict\". "
"Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1095
+#: ../../c-api/unicode.rst:1151
msgid "UTF-16 Codecs"
msgstr "UTF-16 編解碼器"
-#: ../../c-api/unicode.rst:1097
+#: ../../c-api/unicode.rst:1153
msgid "These are the UTF-16 codec APIs:"
-msgstr ""
+msgstr "這些是 UTF-16 編解碼器的 API:"
-#: ../../c-api/unicode.rst:1103
+#: ../../c-api/unicode.rst:1159
msgid ""
"Decode *size* bytes from a UTF-16 encoded buffer string and return the "
"corresponding Unicode object. *errors* (if non-``NULL``) defines the error "
"handling. It defaults to \"strict\"."
msgstr ""
-#: ../../c-api/unicode.rst:1114
+#: ../../c-api/unicode.rst:1170
msgid ""
"If ``*byteorder`` is zero, and the first two bytes of the input data are a "
"byte order mark (BOM), the decoder switches to this byte order and the BOM "
@@ -1376,13 +1457,13 @@ msgid ""
"result in either a ``\\ufeff`` or a ``\\ufffe`` character)."
msgstr ""
-#: ../../c-api/unicode.rst:1120
+#: ../../c-api/unicode.rst:1176
msgid ""
"After completion, ``*byteorder`` is set to the current byte order at the end "
"of input data."
msgstr ""
-#: ../../c-api/unicode.rst:1131
+#: ../../c-api/unicode.rst:1187
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If "
"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not "
@@ -1392,28 +1473,28 @@ msgid ""
"*consumed*."
msgstr ""
-#: ../../c-api/unicode.rst:1140
+#: ../../c-api/unicode.rst:1196
msgid ""
"Return a Python byte string using the UTF-16 encoding in native byte order. "
"The string always starts with a BOM mark. Error handling is \"strict\". "
"Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1146
+#: ../../c-api/unicode.rst:1202
msgid "UTF-7 Codecs"
msgstr "UTF-7 編解碼器"
-#: ../../c-api/unicode.rst:1148
+#: ../../c-api/unicode.rst:1204
msgid "These are the UTF-7 codec APIs:"
-msgstr ""
+msgstr "這些是 UTF-7 編解碼器的 API:"
-#: ../../c-api/unicode.rst:1153
+#: ../../c-api/unicode.rst:1209
msgid ""
"Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string "
"*str*. Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1160
+#: ../../c-api/unicode.rst:1216
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If "
"*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will "
@@ -1421,101 +1502,101 @@ msgid ""
"of bytes that have been decoded will be stored in *consumed*."
msgstr ""
-#: ../../c-api/unicode.rst:1167
+#: ../../c-api/unicode.rst:1223
msgid "Unicode-Escape Codecs"
msgstr ""
-#: ../../c-api/unicode.rst:1169
+#: ../../c-api/unicode.rst:1225
msgid "These are the \"Unicode Escape\" codec APIs:"
msgstr ""
-#: ../../c-api/unicode.rst:1175
+#: ../../c-api/unicode.rst:1231
msgid ""
"Create a Unicode object by decoding *size* bytes of the Unicode-Escape "
"encoded string *str*. Return ``NULL`` if an exception was raised by the "
"codec."
msgstr ""
-#: ../../c-api/unicode.rst:1181
+#: ../../c-api/unicode.rst:1237
msgid ""
"Encode a Unicode object using Unicode-Escape and return the result as a "
"bytes object. Error handling is \"strict\". Return ``NULL`` if an "
"exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1187
+#: ../../c-api/unicode.rst:1243
msgid "Raw-Unicode-Escape Codecs"
msgstr ""
-#: ../../c-api/unicode.rst:1189
+#: ../../c-api/unicode.rst:1245
msgid "These are the \"Raw Unicode Escape\" codec APIs:"
msgstr ""
-#: ../../c-api/unicode.rst:1195
+#: ../../c-api/unicode.rst:1251
msgid ""
"Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape "
"encoded string *str*. Return ``NULL`` if an exception was raised by the "
"codec."
msgstr ""
-#: ../../c-api/unicode.rst:1201
+#: ../../c-api/unicode.rst:1257
msgid ""
"Encode a Unicode object using Raw-Unicode-Escape and return the result as a "
"bytes object. Error handling is \"strict\". Return ``NULL`` if an "
"exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1207
+#: ../../c-api/unicode.rst:1263
msgid "Latin-1 Codecs"
msgstr "Latin-1 編解碼器"
-#: ../../c-api/unicode.rst:1209
+#: ../../c-api/unicode.rst:1265
msgid ""
"These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 "
"Unicode ordinals and only these are accepted by the codecs during encoding."
msgstr ""
-#: ../../c-api/unicode.rst:1215
+#: ../../c-api/unicode.rst:1271
msgid ""
"Create a Unicode object by decoding *size* bytes of the Latin-1 encoded "
"string *str*. Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1221
+#: ../../c-api/unicode.rst:1277
msgid ""
"Encode a Unicode object using Latin-1 and return the result as Python bytes "
"object. Error handling is \"strict\". Return ``NULL`` if an exception was "
"raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1227
+#: ../../c-api/unicode.rst:1283
msgid "ASCII Codecs"
msgstr "ASCII 編解碼器"
-#: ../../c-api/unicode.rst:1229
+#: ../../c-api/unicode.rst:1285
msgid ""
"These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All "
"other codes generate errors."
msgstr ""
-#: ../../c-api/unicode.rst:1235
+#: ../../c-api/unicode.rst:1291
msgid ""
"Create a Unicode object by decoding *size* bytes of the ASCII encoded string "
"*str*. Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1241
+#: ../../c-api/unicode.rst:1297
msgid ""
"Encode a Unicode object using ASCII and return the result as Python bytes "
"object. Error handling is \"strict\". Return ``NULL`` if an exception was "
"raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1247
+#: ../../c-api/unicode.rst:1303
msgid "Character Map Codecs"
msgstr ""
-#: ../../c-api/unicode.rst:1249
+#: ../../c-api/unicode.rst:1305
msgid ""
"This codec is special in that it can be used to implement many different "
"codecs (and this is in fact what was done to obtain most of the standard "
@@ -1525,18 +1606,18 @@ msgid ""
"sequences work well."
msgstr ""
-#: ../../c-api/unicode.rst:1255
+#: ../../c-api/unicode.rst:1311
msgid "These are the mapping codec APIs:"
-msgstr ""
+msgstr "這些是對映編解碼器的 API:"
-#: ../../c-api/unicode.rst:1260
+#: ../../c-api/unicode.rst:1316
msgid ""
"Create a Unicode object by decoding *size* bytes of the encoded string *str* "
"using the given *mapping* object. Return ``NULL`` if an exception was "
"raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1264
+#: ../../c-api/unicode.rst:1320
msgid ""
"If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* "
"must map bytes ordinals (integers in the range from 0 to 255) to Unicode "
@@ -1546,14 +1627,14 @@ msgid ""
"treated as undefined mappings and cause an error."
msgstr ""
-#: ../../c-api/unicode.rst:1275
+#: ../../c-api/unicode.rst:1331
msgid ""
"Encode a Unicode object using the given *mapping* object and return the "
"result as a bytes object. Error handling is \"strict\". Return ``NULL`` if "
"an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1279
+#: ../../c-api/unicode.rst:1335
msgid ""
"The *mapping* object must map Unicode ordinal integers to bytes objects, "
"integers in the range from 0 to 255 or ``None``. Unmapped character "
@@ -1561,41 +1642,41 @@ msgid ""
"``None`` are treated as \"undefined mapping\" and cause an error."
msgstr ""
-#: ../../c-api/unicode.rst:1285
+#: ../../c-api/unicode.rst:1341
msgid "The following codec API is special in that maps Unicode to Unicode."
msgstr ""
-#: ../../c-api/unicode.rst:1289
+#: ../../c-api/unicode.rst:1345
msgid ""
"Translate a string by applying a character mapping table to it and return "
"the resulting Unicode object. Return ``NULL`` if an exception was raised by "
"the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1293
+#: ../../c-api/unicode.rst:1349
msgid ""
"The mapping table must map Unicode ordinal integers to Unicode ordinal "
"integers or ``None`` (causing deletion of the character)."
msgstr ""
-#: ../../c-api/unicode.rst:1296
+#: ../../c-api/unicode.rst:1352
msgid ""
"Mapping tables need only provide the :meth:`~object.__getitem__` interface; "
"dictionaries and sequences work well. Unmapped character ordinals (ones "
"which cause a :exc:`LookupError`) are left untouched and are copied as-is."
msgstr ""
-#: ../../c-api/unicode.rst:1300
+#: ../../c-api/unicode.rst:1356
msgid ""
"*errors* has the usual meaning for codecs. It may be ``NULL`` which "
"indicates to use the default error handling."
msgstr ""
-#: ../../c-api/unicode.rst:1305
+#: ../../c-api/unicode.rst:1361
msgid "MBCS codecs for Windows"
-msgstr ""
+msgstr "Windows 的 MBCS 編解碼器"
-#: ../../c-api/unicode.rst:1307
+#: ../../c-api/unicode.rst:1363
msgid ""
"These are the MBCS codec APIs. They are currently only available on Windows "
"and use the Win32 MBCS converters to implement the conversions. Note that "
@@ -1603,13 +1684,13 @@ msgid ""
"is defined by the user settings on the machine running the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1314
+#: ../../c-api/unicode.rst:1370
msgid ""
"Create a Unicode object by decoding *size* bytes of the MBCS encoded string "
"*str*. Return ``NULL`` if an exception was raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1321
+#: ../../c-api/unicode.rst:1377
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If "
"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not "
@@ -1617,44 +1698,46 @@ msgid ""
"will be stored in *consumed*."
msgstr ""
-#: ../../c-api/unicode.rst:1329
+#: ../../c-api/unicode.rst:1386
+msgid ""
+"Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page "
+"specified by *code_page*."
+msgstr ""
+
+#: ../../c-api/unicode.rst:1392
msgid ""
"Encode a Unicode object using MBCS and return the result as Python bytes "
"object. Error handling is \"strict\". Return ``NULL`` if an exception was "
"raised by the codec."
msgstr ""
-#: ../../c-api/unicode.rst:1336
+#: ../../c-api/unicode.rst:1399
msgid ""
"Encode the Unicode object using the specified code page and return a Python "
"bytes object. Return ``NULL`` if an exception was raised by the codec. Use :"
"c:macro:`!CP_ACP` code page to get the MBCS encoder."
msgstr ""
-#: ../../c-api/unicode.rst:1344
-msgid "Methods & Slots"
-msgstr ""
-
-#: ../../c-api/unicode.rst:1350
+#: ../../c-api/unicode.rst:1409
msgid "Methods and Slot Functions"
msgstr ""
-#: ../../c-api/unicode.rst:1352
+#: ../../c-api/unicode.rst:1411
msgid ""
"The following APIs are capable of handling Unicode objects and strings on "
"input (we refer to them as strings in the descriptions) and return Unicode "
"objects or integers as appropriate."
msgstr ""
-#: ../../c-api/unicode.rst:1356
+#: ../../c-api/unicode.rst:1415
msgid "They all return ``NULL`` or ``-1`` if an exception occurs."
-msgstr ""
+msgstr "如果發生例外,則回傳 ``NULL`` 或 ``-1``。"
-#: ../../c-api/unicode.rst:1361
+#: ../../c-api/unicode.rst:1420
msgid "Concat two strings giving a new Unicode string."
msgstr ""
-#: ../../c-api/unicode.rst:1366
+#: ../../c-api/unicode.rst:1425
msgid ""
"Split a string giving a list of Unicode strings. If *sep* is ``NULL``, "
"splitting will be done at all whitespace substrings. Otherwise, splits "
@@ -1663,27 +1746,73 @@ msgid ""
"list."
msgstr ""
-#: ../../c-api/unicode.rst:1374
+#: ../../c-api/unicode.rst:1430 ../../c-api/unicode.rst:1440
+#: ../../c-api/unicode.rst:1461 ../../c-api/unicode.rst:1474
+msgid "On error, return ``NULL`` with an exception set."
+msgstr "於錯誤發生時回傳 ``NULL`` 並設定例外。"
+
+#: ../../c-api/unicode.rst:1432
+msgid "Equivalent to :py:meth:`str.split`."
+msgstr "等價於 :py:meth:`str.split`。"
+
+#: ../../c-api/unicode.rst:1437
+msgid ""
+"Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning "
+"at the end of the string."
+msgstr ""
+
+#: ../../c-api/unicode.rst:1442
+msgid "Equivalent to :py:meth:`str.rsplit`."
+msgstr "等價於 :py:meth:`str.rsplit`。"
+
+#: ../../c-api/unicode.rst:1447
msgid ""
"Split a Unicode string at line breaks, returning a list of Unicode strings. "
"CRLF is considered to be one line break. If *keepends* is ``0``, the Line "
"break characters are not included in the resulting strings."
msgstr ""
-#: ../../c-api/unicode.rst:1381
+#: ../../c-api/unicode.rst:1454
+msgid ""
+"Split a Unicode string at the first occurrence of *sep*, and return a 3-"
+"tuple containing the part before the separator, the separator itself, and "
+"the part after the separator. If the separator is not found, return a 3-"
+"tuple containing the string itself, followed by two empty strings."
+msgstr ""
+
+#: ../../c-api/unicode.rst:1459 ../../c-api/unicode.rst:1472
+msgid "*sep* must not be empty."
+msgstr "*sep* 不得為空。"
+
+#: ../../c-api/unicode.rst:1463
+msgid "Equivalent to :py:meth:`str.partition`."
+msgstr "等價於 :py:meth:`str.partition`。"
+
+#: ../../c-api/unicode.rst:1468
+msgid ""
+"Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the "
+"last occurrence of *sep*. If the separator is not found, return a 3-tuple "
+"containing two empty strings, followed by the string itself."
+msgstr ""
+
+#: ../../c-api/unicode.rst:1476
+msgid "Equivalent to :py:meth:`str.rpartition`."
+msgstr "等價於 :py:meth:`str.rpartition`。"
+
+#: ../../c-api/unicode.rst:1481
msgid ""
"Join a sequence of strings using the given *separator* and return the "
"resulting Unicode string."
msgstr ""
-#: ../../c-api/unicode.rst:1388
+#: ../../c-api/unicode.rst:1488
msgid ""
"Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail "
"end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` "
"a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred."
msgstr ""
-#: ../../c-api/unicode.rst:1396
+#: ../../c-api/unicode.rst:1496
msgid ""
"Return the first position of *substr* in ``unicode[start:end]`` using the "
"given *direction* (*direction* == ``1`` means to do a forward search, "
@@ -1692,7 +1821,7 @@ msgid ""
"``-2`` indicates that an error occurred and an exception has been set."
msgstr ""
-#: ../../c-api/unicode.rst:1406
+#: ../../c-api/unicode.rst:1506
msgid ""
"Return the first position of the character *ch* in ``unicode[start:end]`` "
"using the given *direction* (*direction* == ``1`` means to do a forward "
@@ -1702,37 +1831,37 @@ msgid ""
"set."
msgstr ""
-#: ../../c-api/unicode.rst:1414
+#: ../../c-api/unicode.rst:1514
msgid ""
"*start* and *end* are now adjusted to behave like ``unicode[start:end]``."
msgstr ""
-#: ../../c-api/unicode.rst:1421
+#: ../../c-api/unicode.rst:1521
msgid ""
"Return the number of non-overlapping occurrences of *substr* in "
"``unicode[start:end]``. Return ``-1`` if an error occurred."
msgstr ""
-#: ../../c-api/unicode.rst:1428
+#: ../../c-api/unicode.rst:1528
msgid ""
"Replace at most *maxcount* occurrences of *substr* in *unicode* with "
"*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` "
"means replace all occurrences."
msgstr ""
-#: ../../c-api/unicode.rst:1435
+#: ../../c-api/unicode.rst:1535
msgid ""
"Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, "
"and greater than, respectively."
msgstr ""
-#: ../../c-api/unicode.rst:1438
+#: ../../c-api/unicode.rst:1538
msgid ""
"This function returns ``-1`` upon failure, so one should call :c:func:"
"`PyErr_Occurred` to check for errors."
msgstr ""
-#: ../../c-api/unicode.rst:1444
+#: ../../c-api/unicode.rst:1544
msgid ""
"Compare a Unicode object with a char buffer which is interpreted as being "
"UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false "
@@ -1741,18 +1870,18 @@ msgid ""
"is returned."
msgstr ""
-#: ../../c-api/unicode.rst:1451 ../../c-api/unicode.rst:1472
+#: ../../c-api/unicode.rst:1551 ../../c-api/unicode.rst:1572
msgid "This function does not raise exceptions."
-msgstr ""
+msgstr "此函式不會引發例外。"
-#: ../../c-api/unicode.rst:1458
+#: ../../c-api/unicode.rst:1558
msgid ""
"Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* "
"length using :c:func:`!strlen`. If the Unicode object contains null "
"characters, false (``0``) is returned."
msgstr ""
-#: ../../c-api/unicode.rst:1467
+#: ../../c-api/unicode.rst:1567
msgid ""
"Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, "
"``1`` for less than, equal, and greater than, respectively. It is best to "
@@ -1760,47 +1889,47 @@ msgid ""
"string as ISO-8859-1 if it contains non-ASCII characters."
msgstr ""
-#: ../../c-api/unicode.rst:1477
+#: ../../c-api/unicode.rst:1577
msgid "Rich compare two Unicode strings and return one of the following:"
msgstr ""
-#: ../../c-api/unicode.rst:1479
+#: ../../c-api/unicode.rst:1579
msgid "``NULL`` in case an exception was raised"
msgstr ""
-#: ../../c-api/unicode.rst:1480
+#: ../../c-api/unicode.rst:1580
msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons"
msgstr ""
-#: ../../c-api/unicode.rst:1481
+#: ../../c-api/unicode.rst:1581
msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown"
msgstr ""
-#: ../../c-api/unicode.rst:1483
+#: ../../c-api/unicode.rst:1583
msgid ""
"Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:"
"`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`."
msgstr ""
-#: ../../c-api/unicode.rst:1489
+#: ../../c-api/unicode.rst:1589
msgid ""
"Return a new string object from *format* and *args*; this is analogous to "
"``format % args``."
msgstr ""
-#: ../../c-api/unicode.rst:1495
+#: ../../c-api/unicode.rst:1595
msgid ""
"Check whether *substr* is contained in *unicode* and return true or false "
"accordingly."
msgstr ""
-#: ../../c-api/unicode.rst:1498
+#: ../../c-api/unicode.rst:1598
msgid ""
"*substr* has to coerce to a one element Unicode string. ``-1`` is returned "
"if there was an error."
msgstr ""
-#: ../../c-api/unicode.rst:1504
+#: ../../c-api/unicode.rst:1604
msgid ""
"Intern the argument :c:expr:`*p_unicode` in place. The argument must be the "
"address of a pointer variable pointing to a Python Unicode string object. "
@@ -1811,7 +1940,7 @@ msgid ""
"interns it."
msgstr ""
-#: ../../c-api/unicode.rst:1511
+#: ../../c-api/unicode.rst:1611
msgid ""
"(Clarification: even though there is a lot of talk about references, think "
"of this function as reference-neutral. You must own the object you pass in; "
@@ -1819,39 +1948,39 @@ msgid ""
"the result.)"
msgstr ""
-#: ../../c-api/unicode.rst:1516
+#: ../../c-api/unicode.rst:1616
msgid ""
"This function never raises an exception. On error, it leaves its argument "
"unchanged without interning it."
msgstr ""
-#: ../../c-api/unicode.rst:1519
+#: ../../c-api/unicode.rst:1619
msgid ""
"Instances of subclasses of :py:class:`str` may not be interned, that is, :c:"
"expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- "
"as with any other error -- the argument is left unchanged."
msgstr ""
-#: ../../c-api/unicode.rst:1523
+#: ../../c-api/unicode.rst:1623
msgid ""
"Note that interned strings are not “immortal”. You must keep a reference to "
"the result to benefit from interning."
msgstr ""
-#: ../../c-api/unicode.rst:1529
+#: ../../c-api/unicode.rst:1629
msgid ""
"A combination of :c:func:`PyUnicode_FromString` and :c:func:"
"`PyUnicode_InternInPlace`, meant for statically allocated strings."
msgstr ""
-#: ../../c-api/unicode.rst:1532
+#: ../../c-api/unicode.rst:1632
msgid ""
"Return a new (\"owned\") reference to either a new Unicode string object "
"that has been interned, or an earlier interned string object with the same "
"value."
msgstr ""
-#: ../../c-api/unicode.rst:1536
+#: ../../c-api/unicode.rst:1636
msgid ""
"Python may keep a reference to the result, or make it :term:`immortal`, "
"preventing it from being garbage-collected promptly. For interning an "
@@ -1859,7 +1988,3 @@ msgid ""
"prefer calling :c:func:`PyUnicode_FromString` and :c:func:"
"`PyUnicode_InternInPlace` directly."
msgstr ""
-
-#: ../../c-api/unicode.rst:1544
-msgid "Strings interned this way are made :term:`immortal`."
-msgstr ""
diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po
index 468bb4f7bf..80cabb8b50 100644
--- a/c-api/veryhigh.po
+++ b/c-api/veryhigh.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-09 00:13+0000\n"
+"POT-Creation-Date: 2025-01-22 00:13+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -390,7 +390,17 @@ msgstr ""
msgid "Added *cf_feature_version* field."
msgstr "新增 *cf_feature_version* 欄位。"
-#: ../../c-api/veryhigh.rst:354
+#: ../../c-api/veryhigh.rst:351
+msgid "The available compiler flags are accessible as macros:"
+msgstr ""
+
+#: ../../c-api/veryhigh.rst:360
+msgid ""
+"See :ref:`compiler flags ` in documentation of the :py:"
+"mod:`!ast` Python module, which exports these constants under the same names."
+msgstr ""
+
+#: ../../c-api/veryhigh.rst:366
msgid ""
"This bit can be set in *flags* to cause division operator ``/`` to be "
"interpreted as \"true division\" according to :pep:`238`."
diff --git a/copyright.po b/copyright.po
index 63bcc2fbfa..50a39fdee2 100644
--- a/copyright.po
+++ b/copyright.po
@@ -32,9 +32,8 @@ msgid "Python and this documentation is:"
msgstr "Python 和這份說明文件的版權:"
#: ../../copyright.rst:7
-#, fuzzy
msgid "Copyright © 2001-2024 Python Software Foundation. All rights reserved."
-msgstr "Copyright © 2001-2023 Python Software Foundation 保留一切權利。"
+msgstr "Copyright © 2001-2024 Python Software Foundation. All rights reserved."
#: ../../copyright.rst:9
msgid "Copyright © 2000 BeOpen.com. All rights reserved."
diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po
index aaa4c2db16..8541753787 100644
--- a/deprecations/c-api-pending-removal-in-3.14.po
+++ b/deprecations/c-api-pending-removal-in-3.14.po
@@ -1,6 +1,5 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
@@ -9,7 +8,8 @@ msgstr ""
"POT-Creation-Date: 2024-09-24 07:20+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -24,16 +24,16 @@ msgid ""
"The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules "
"(:pep:`699`; :gh:`101193`)."
msgstr ""
-":c:type:`PyDictObject` 中的 ``ma_version_tag`` 欄位,用於擴充模組 (:pep:"
-"`699`;:gh:`101193`)。"
+":c:type:`PyDictObject` 中的 ``ma_version_tag`` 欄位,用於擴充模組 "
+"(:pep:`699`;:gh:`101193`)。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:7
msgid ""
"Creating :c:data:`immutable types ` with mutable "
"bases (:gh:`95388`)."
msgstr ""
-"使用可變基底建立\\ :c:data:`不可變型別 ` (:gh:"
-"`95388`)。"
+"使用可變基底建立\\ :c:data:`不可變型別 ` "
+"(:gh:`95388`)。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:10
msgid ""
@@ -63,8 +63,8 @@ msgstr ":c:func:`!Py_SetPythonHome()`:請改以 :c:member:`PyConfig.home` 設
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:21
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:71
msgid ""
-"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:"
-"`PyConfig` instead."
+"The :c:func:`Py_InitializeFromConfig` API should be used "
+"with :c:type:`PyConfig` instead."
msgstr ""
":c:func:`Py_InitializeFromConfig` API 應該與 :c:type:`PyConfig` 一起使用。"
@@ -121,24 +121,24 @@ msgid ""
":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` "
"instead."
msgstr ""
-":c:var:`Py_IgnoreEnvironmentFlag`:請改用 :c:member:`PyConfig."
-"use_environment`。"
+":c:var:`Py_IgnoreEnvironmentFlag`:請改"
+"用 :c:member:`PyConfig.use_environment`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:46
msgid ""
":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` "
"instead."
msgstr ""
-":c:var:`Py_DontWriteBytecodeFlag`:請改用 :c:member:`PyConfig."
-"write_bytecode`。"
+":c:var:`Py_DontWriteBytecodeFlag`:請改"
+"用 :c:member:`PyConfig.write_bytecode`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:48
msgid ""
-":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig."
-"user_site_directory` instead."
+":c:var:`Py_NoUserSiteDirectory`: "
+"Use :c:member:`PyConfig.user_site_directory` instead."
msgstr ""
-":c:var:`Py_NoUserSiteDirectory`:請改用 :c:member:`PyConfig."
-"user_site_directory`。"
+":c:var:`Py_NoUserSiteDirectory`:請改"
+"用 :c:member:`PyConfig.user_site_directory`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:50
msgid ""
@@ -161,48 +161,48 @@ msgstr ":c:var:`Py_IsolatedFlag`:請改用 :c:member:`PyConfig.isolated`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:57
msgid ""
-":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig."
-"legacy_windows_fs_encoding` instead."
+":c:var:`Py_LegacyWindowsFSEncodingFlag`: "
+"Use :c:member:`PyPreConfig.legacy_windows_fs_encoding` instead."
msgstr ""
-":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改用 :c:member:`PyPreConfig."
-"legacy_windows_fs_encoding`。"
+":c:var:`Py_LegacyWindowsFSEncodingFlag`:請改"
+"用 :c:member:`PyPreConfig.legacy_windows_fs_encoding`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:59
msgid ""
-":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig."
-"legacy_windows_stdio` instead."
+":c:var:`Py_LegacyWindowsStdioFlag`: "
+"Use :c:member:`PyConfig.legacy_windows_stdio` instead."
msgstr ""
-":c:var:`Py_LegacyWindowsStdioFlag`:請改用 :c:member:`PyConfig."
-"legacy_windows_stdio`。"
+":c:var:`Py_LegacyWindowsStdioFlag`:請改"
+"用 :c:member:`PyConfig.legacy_windows_stdio`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:61
msgid ""
-":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig."
-"filesystem_encoding` instead."
+":c:var:`!Py_FileSystemDefaultEncoding`: "
+"Use :c:member:`PyConfig.filesystem_encoding` instead."
msgstr ""
-":c:var:`!Py_FileSystemDefaultEncoding`:請改用 :c:member:`PyConfig."
-"filesystem_encoding`。"
+":c:var:`!Py_FileSystemDefaultEncoding`:請改"
+"用 :c:member:`PyConfig.filesystem_encoding`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:63
msgid ""
-":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig."
-"filesystem_encoding` instead."
+":c:var:`!Py_HasFileSystemDefaultEncoding`: "
+"Use :c:member:`PyConfig.filesystem_encoding` instead."
msgstr ""
-":c:var:`!Py_HasFileSystemDefaultEncoding`:請改用 :c:member:`PyConfig."
-"filesystem_encoding`。"
+":c:var:`!Py_HasFileSystemDefaultEncoding`:請改"
+"用 :c:member:`PyConfig.filesystem_encoding`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:65
msgid ""
-":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig."
-"filesystem_errors` instead."
+":c:var:`!Py_FileSystemDefaultEncodeErrors`: "
+"Use :c:member:`PyConfig.filesystem_errors` instead."
msgstr ""
-":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改用 :c:member:`PyConfig."
-"filesystem_errors`。"
+":c:var:`!Py_FileSystemDefaultEncodeErrors`:請改"
+"用 :c:member:`PyConfig.filesystem_errors`。"
#: ../../deprecations/c-api-pending-removal-in-3.14.rst:67
msgid ""
-":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :"
-"c:func:`Py_PreInitialize`)"
+":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. "
+"(see :c:func:`Py_PreInitialize`)"
msgstr ""
-":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請見 :c:"
-"func:`Py_PreInitialize`)"
+":c:var:`!Py_UTF8Mode`:請改用 :c:member:`PyPreConfig.utf8_mode`。(請"
+"見 :c:func:`Py_PreInitialize`)"
diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po
index 1c765579a9..362a44992b 100644
--- a/deprecations/c-api-pending-removal-in-3.15.po
+++ b/deprecations/c-api-pending-removal-in-3.15.po
@@ -1,16 +1,15 @@
-# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-24 07:20+0000\n"
+"POT-Creation-Date: 2025-07-03 00:17+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,10 +20,6 @@ msgid "Pending Removal in Python 3.15"
msgstr "Python 3.15 中待移除的項目"
#: ../../deprecations/c-api-pending-removal-in-3.15.rst:4
-msgid "The bundled copy of ``libmpdecimal``."
-msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。"
-
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5
msgid ""
"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:"
"`PyImport_ImportModule` instead."
@@ -32,7 +27,7 @@ msgstr ""
":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:"
"`PyImport_ImportModule`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6
msgid ""
":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:"
"func:`PyWeakref_GetRef` instead."
@@ -40,7 +35,7 @@ msgstr ""
":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:"
"func:`PyWeakref_GetRef`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:9
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8
msgid ""
":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:"
"type:`wchar_t` instead."
@@ -48,11 +43,11 @@ msgstr ""
":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:"
"`wchar_t`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10
msgid "Python initialization functions:"
msgstr "Python 初始化函式:"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12
msgid ""
":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!"
"warnings.filters` instead."
@@ -60,27 +55,35 @@ msgstr ""
":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :"
"data:`!warnings.filters`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15
-msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead."
-msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。"
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14
+msgid ""
+":c:func:`Py_GetExecPrefix`: Get :data:`sys.base_exec_prefix` and :data:`sys."
+"exec_prefix` instead."
+msgstr ""
+":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.base_exec_prefix` 與 :data:"
+"`sys.exec_prefix`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16
msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead."
msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19
-msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead."
-msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。"
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18
+msgid ""
+":c:func:`Py_GetPrefix`: Get :data:`sys.base_prefix` and :data:`sys.prefix` "
+"instead."
+msgstr ""
+":c:func:`Py_GetPrefix`:請改用 :data:`sys.base_prefix` 與 :data:`sys."
+"prefix`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:20
msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead."
msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:22
msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead."
msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:24
msgid ""
":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:"
"`PYTHONHOME` environment variable instead."
diff --git a/deprecations/c-api-pending-removal-in-3.16.po b/deprecations/c-api-pending-removal-in-3.16.po
new file mode 100644
index 0000000000..adc146223c
--- /dev/null
+++ b/deprecations/c-api-pending-removal-in-3.16.po
@@ -0,0 +1,24 @@
+# Copyright (C) 2001-2025, Python Software Foundation
+# This file is distributed under the same license as the Python package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Python 3.13\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2025-07-03 00:17+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../deprecations/c-api-pending-removal-in-3.16.rst:2
+msgid "Pending removal in Python 3.16"
+msgstr "Python 3.16 中待移除的項目"
+
+#: ../../deprecations/c-api-pending-removal-in-3.16.rst:4
+msgid "The bundled copy of ``libmpdec``."
+msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。"
diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po
index a042b964bc..a9930288d2 100644
--- a/deprecations/c-api-pending-removal-in-future.po
+++ b/deprecations/c-api-pending-removal-in-future.po
@@ -1,7 +1,5 @@
-# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
@@ -10,7 +8,8 @@ msgstr ""
"POT-Creation-Date: 2024-09-24 07:20+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -39,8 +38,8 @@ msgid ""
":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` "
"instead."
msgstr ""
-":c:func:`PyErr_NormalizeException`:請改用 :c:func:"
-"`PyErr_GetRaisedException`。"
+":c:func:`PyErr_NormalizeException`:請改"
+"用 :c:func:`PyErr_GetRaisedException`。"
#: ../../deprecations/c-api-pending-removal-in-future.rst:13
msgid ""
@@ -60,11 +59,11 @@ msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`。"
#: ../../deprecations/c-api-pending-removal-in-future.rst:19
msgid ""
-":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:"
-"`PySlice_AdjustIndices` instead."
+":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` "
+"and :c:func:`PySlice_AdjustIndices` instead."
msgstr ""
-":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:"
-"`PySlice_AdjustIndices`。"
+":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` "
+"和 :c:func:`PySlice_AdjustIndices`。"
#: ../../deprecations/c-api-pending-removal-in-future.rst:21
msgid ""
@@ -110,8 +109,8 @@ msgid ""
":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` "
"instead."
msgstr ""
-":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼叫 :c:func:"
-"`PyObject_Hash`。"
+":c:member:`!PyBytesObject.ob_shash` 成員:請改為呼"
+"叫 :c:func:`PyObject_Hash`。"
#: ../../deprecations/c-api-pending-removal-in-future.rst:37
msgid ":c:member:`!PyDictObject.ma_version_tag` member."
diff --git a/deprecations/index.po b/deprecations/index.po
index 24c3129544..0b75d47190 100644
--- a/deprecations/index.po
+++ b/deprecations/index.po
@@ -1,15 +1,15 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-10 00:13+0000\n"
+"POT-Creation-Date: 2025-07-03 00:17+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -25,22 +25,6 @@ msgid "Pending Removal in Python 3.14"
msgstr "Python 3.14 中待移除的項目"
#: ../../deprecations/pending-removal-in-3.14.rst:4
-#: ../../deprecations/pending-removal-in-3.15.rst:4
-msgid "The import system:"
-msgstr "引入系統 (import system):"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:6
-msgid ""
-"Setting :attr:`~module.__loader__` on a module while failing to set :attr:"
-"`__spec__.loader ` is deprecated. In "
-"Python 3.14, :attr:`!__loader__` will cease to be set or taken into "
-"consideration by the import system or the standard library."
-msgstr ""
-"在模組上設定 :attr:`~module.__loader__` 而沒有設定 :attr:`__spec__.loader "
-"` 的做法已被棄用。在 Python 3.14 中,"
-"引入系統或標準函式庫將不再設定或考慮 :attr:`!__loader__` 。"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:11
msgid ""
":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!"
"argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. "
@@ -50,7 +34,7 @@ msgstr ""
"*choices* 和 *metavar* 參數已被棄用,將在 3.14 中移除。 (由 Nikita Sobolev "
"於 :gh:`92248` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:16
+#: ../../deprecations/pending-removal-in-3.14.rst:9
msgid ""
":mod:`ast`: The following features have been deprecated in documentation "
"since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at "
@@ -59,38 +43,39 @@ msgstr ""
":mod:`ast`:自 Python 3.8 起,下列功能已在文件中被棄用,現在在存取或使用時會"
"於 runtime 發出 :exc:`DeprecationWarning`,並將在 Python 3.14 中移除:"
-#: ../../deprecations/pending-removal-in-3.14.rst:20
+#: ../../deprecations/pending-removal-in-3.14.rst:13
msgid ":class:`!ast.Num`"
msgstr ":class:`!ast.Num`"
-#: ../../deprecations/pending-removal-in-3.14.rst:21
+#: ../../deprecations/pending-removal-in-3.14.rst:14
msgid ":class:`!ast.Str`"
msgstr ":class:`!ast.Str`"
-#: ../../deprecations/pending-removal-in-3.14.rst:22
+#: ../../deprecations/pending-removal-in-3.14.rst:15
msgid ":class:`!ast.Bytes`"
msgstr ":class:`!ast.Bytes`"
-#: ../../deprecations/pending-removal-in-3.14.rst:23
+#: ../../deprecations/pending-removal-in-3.14.rst:16
msgid ":class:`!ast.NameConstant`"
msgstr ":class:`!ast.NameConstant`"
-#: ../../deprecations/pending-removal-in-3.14.rst:24
+#: ../../deprecations/pending-removal-in-3.14.rst:17
msgid ":class:`!ast.Ellipsis`"
msgstr ":class:`!ast.Ellipsis`"
-#: ../../deprecations/pending-removal-in-3.14.rst:26
+#: ../../deprecations/pending-removal-in-3.14.rst:19
msgid ""
"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:"
"`90953`.)"
msgstr ""
"請改用 :class:`ast.Constant`。(由 Serhiy Storchaka 於 :gh:`90953` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:29
+#: ../../deprecations/pending-removal-in-3.14.rst:22
+#: ../../deprecations/pending-removal-in-3.16.rst:19
msgid ":mod:`asyncio`:"
msgstr ":mod:`asyncio`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:31
+#: ../../deprecations/pending-removal-in-3.14.rst:24
msgid ""
"The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, :class:"
"`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` and :"
@@ -102,7 +87,7 @@ msgstr ""
"AbstractChildWatcher` 和 :class:`~asyncio.SafeChildWatcher`。 (由 Kumar "
"Aditya 於 :gh:`94597` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:37
+#: ../../deprecations/pending-removal-in-3.14.rst:30
msgid ""
":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:"
"`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio."
@@ -114,7 +99,7 @@ msgstr ""
"AbstractEventLoopPolicy.get_child_watcher` 已被棄用並將在 Python 3.14 中移"
"除。(由 Kumar Aditya 於 :gh:`94597` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:43
+#: ../../deprecations/pending-removal-in-3.14.rst:36
msgid ""
"The :meth:`~asyncio.get_event_loop` method of the default event loop policy "
"now emits a :exc:`DeprecationWarning` if there is no current event loop set "
@@ -125,7 +110,7 @@ msgstr ""
"件迴圈且決定建立一個時發出 :exc:`DeprecationWarning`。 (由 Serhiy Storchaka "
"和 Guido van Rossum 於 :gh:`100160` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:48
+#: ../../deprecations/pending-removal-in-3.14.rst:41
msgid ""
":mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`. "
"Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`. For use in "
@@ -137,7 +122,7 @@ msgstr ""
"改用聯集,如 ``bytes | bytearray``,或 :class:`collections.abc.Buffer`。(由 "
"Shantanu Jain 於 :gh:`91896` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:54
+#: ../../deprecations/pending-removal-in-3.14.rst:47
msgid ""
":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils."
"localtime`. (Contributed by Alan Williams in :gh:`72346`.)"
@@ -145,39 +130,39 @@ msgstr ""
":mod:`email`:已棄用 :func:`email.utils.localtime` 中的 *isdst* 參數。(由 "
"Alan Williams 於 :gh:`72346` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:57
+#: ../../deprecations/pending-removal-in-3.14.rst:50
msgid ":mod:`importlib.abc` deprecated classes:"
msgstr ":mod:`importlib.abc` 的已棄用類別:"
-#: ../../deprecations/pending-removal-in-3.14.rst:59
+#: ../../deprecations/pending-removal-in-3.14.rst:52
msgid ":class:`!importlib.abc.ResourceReader`"
msgstr ":class:`!importlib.abc.ResourceReader`"
-#: ../../deprecations/pending-removal-in-3.14.rst:60
+#: ../../deprecations/pending-removal-in-3.14.rst:53
msgid ":class:`!importlib.abc.Traversable`"
msgstr ":class:`!importlib.abc.Traversable`"
-#: ../../deprecations/pending-removal-in-3.14.rst:61
+#: ../../deprecations/pending-removal-in-3.14.rst:54
msgid ":class:`!importlib.abc.TraversableResources`"
msgstr ":class:`!importlib.abc.TraversableResources`"
-#: ../../deprecations/pending-removal-in-3.14.rst:63
+#: ../../deprecations/pending-removal-in-3.14.rst:56
msgid "Use :mod:`importlib.resources.abc` classes instead:"
msgstr "請改用 :mod:`importlib.resources.abc` 類別:"
-#: ../../deprecations/pending-removal-in-3.14.rst:65
+#: ../../deprecations/pending-removal-in-3.14.rst:58
msgid ":class:`importlib.resources.abc.Traversable`"
msgstr ":class:`importlib.resources.abc.Traversable`"
-#: ../../deprecations/pending-removal-in-3.14.rst:66
+#: ../../deprecations/pending-removal-in-3.14.rst:59
msgid ":class:`importlib.resources.abc.TraversableResources`"
msgstr ":class:`importlib.resources.abc.TraversableResources`"
-#: ../../deprecations/pending-removal-in-3.14.rst:68
+#: ../../deprecations/pending-removal-in-3.14.rst:61
msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)"
msgstr "(由 Jason R. Coombs 和 Hugo van Kemenade 貢獻於 :gh:`93963`。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:70
+#: ../../deprecations/pending-removal-in-3.14.rst:63
msgid ""
":mod:`itertools` had undocumented, inefficient, historically buggy, and "
"inconsistent support for copy, deepcopy, and pickle operations. This will be "
@@ -188,7 +173,7 @@ msgstr ""
"deepcopy 和 pickle 操作支援。將在 3.14 中移除以大幅減少程式碼量和維護負擔。 "
"(由 Raymond Hettinger 於 :gh:`101588` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:76
+#: ../../deprecations/pending-removal-in-3.14.rst:69
msgid ""
":mod:`multiprocessing`: The default start method will change to a safer one "
"on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is "
@@ -205,7 +190,7 @@ msgstr ""
"API 來明確指定你的程式碼何時\\ *需要* ``'fork'``。請參閱 :ref:"
"`multiprocessing-start-methods`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:84
+#: ../../deprecations/pending-removal-in-3.14.rst:77
msgid ""
":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and :meth:`~pathlib."
"PurePath.relative_to`: passing additional arguments is deprecated."
@@ -213,7 +198,7 @@ msgstr ""
":mod:`pathlib`:已棄用 :meth:`~pathlib.PurePath.is_relative_to` 和 :meth:"
"`~pathlib.PurePath.relative_to`:額外引數的傳遞已被棄用。"
-#: ../../deprecations/pending-removal-in-3.14.rst:88
+#: ../../deprecations/pending-removal-in-3.14.rst:81
msgid ""
":mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader` "
"now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` "
@@ -223,27 +208,27 @@ msgstr ""
"現在會引發 :exc:`DeprecationWarning`;請改用 :func:`importlib.util."
"find_spec`。 (由 Nikita Sobolev 於 :gh:`97850` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:93
+#: ../../deprecations/pending-removal-in-3.14.rst:86
msgid ":mod:`pty`:"
msgstr ":mod:`pty`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:95
+#: ../../deprecations/pending-removal-in-3.14.rst:88
msgid "``master_open()``: use :func:`pty.openpty`."
msgstr "``master_open()``:請用 :func:`pty.openpty`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:96
+#: ../../deprecations/pending-removal-in-3.14.rst:89
msgid "``slave_open()``: use :func:`pty.openpty`."
msgstr "``slave_open()``:請用 :func:`pty.openpty`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:98
+#: ../../deprecations/pending-removal-in-3.14.rst:91
msgid ":mod:`sqlite3`:"
msgstr ":mod:`sqlite3`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:100
+#: ../../deprecations/pending-removal-in-3.14.rst:93
msgid ":data:`~sqlite3.version` and :data:`~sqlite3.version_info`."
msgstr ":data:`~sqlite3.version` 和 :data:`~sqlite3.version_info`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:102
+#: ../../deprecations/pending-removal-in-3.14.rst:95
msgid ""
":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` if :"
"ref:`named placeholders ` are used and *parameters* is "
@@ -253,27 +238,7 @@ msgstr ""
"使用 :ref:`named placeholders ` 且 *parameters* 是序列"
"而不是 :class:`dict`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:106
-msgid ""
-"date and datetime adapter, date and timestamp converter: see the :mod:"
-"`sqlite3` documentation for suggested replacement recipes."
-msgstr ""
-"date 和 datetime 的適配器 (adapter)、date 和 timestamp 轉換器 (converter):請"
-"參閱 :mod:`sqlite3` 文件以獲得建議的替代方案。"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:109
-msgid ""
-":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was "
-"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, "
-"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed "
-"in 3.14. (Contributed by Nikita Sobolev in :gh:`101866`.)"
-msgstr ""
-":class:`types.CodeType`:自 3.10 起,存取 :attr:`~codeobject.co_lnotab` 已"
-"在 :pep:`626` 中被棄用,並計劃在 3.12 中移除,但只在 3.12 中於適當時發出 :"
-"exc:`DeprecationWarning`。可能在 3.14 中移除。(由 Nikita Sobolev 於 :gh:"
-"`101866` 貢獻。)"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:116
+#: ../../deprecations/pending-removal-in-3.14.rst:99
msgid ""
":mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, now "
"causes a :exc:`DeprecationWarning` to be emitted when it is used."
@@ -281,7 +246,7 @@ msgstr ""
":mod:`typing`:自 Python 3.9 起已被棄用的 :class:`~typing.ByteString` 現在在"
"使用時會發出 :exc:`DeprecationWarning`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:119
+#: ../../deprecations/pending-removal-in-3.14.rst:102
msgid ""
":mod:`urllib`: :class:`!urllib.parse.Quoter` is deprecated: it was not "
"intended to be a public API. (Contributed by Gregory P. Smith in :gh:"
@@ -295,6 +260,11 @@ msgstr ""
msgid "Pending Removal in Python 3.15"
msgstr "Python 3.15 中待移除的項目"
+#: ../../deprecations/pending-removal-in-3.15.rst:4
+#: ../../deprecations/pending-removal-in-3.16.rst:4
+msgid "The import system:"
+msgstr "引入系統 (import system):"
+
#: ../../deprecations/pending-removal-in-3.15.rst:6
msgid ""
"Setting :attr:`~module.__cached__` on a module while failing to set :attr:"
@@ -351,10 +321,19 @@ msgstr ""
"cgi` 旗標已被棄用。"
#: ../../deprecations/pending-removal-in-3.15.rst:32
+#: ../../deprecations/pending-removal-in-future.rst:56
+msgid ":mod:`importlib`:"
+msgstr ":mod:`importlib`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:34
+msgid "``load_module()`` method: use ``exec_module()`` instead."
+msgstr "``load_module()`` method:請改用 ``exec_module()``。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:36
msgid ":class:`locale`:"
msgstr ":class:`locale`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:34
+#: ../../deprecations/pending-removal-in-3.15.rst:38
msgid ""
"The :func:`~locale.getdefaultlocale` function has been deprecated since "
"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:"
@@ -367,11 +346,11 @@ msgstr ""
"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale."
"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.15.rst:42
+#: ../../deprecations/pending-removal-in-3.15.rst:46
msgid ":mod:`pathlib`:"
msgstr ":mod:`pathlib`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:44
+#: ../../deprecations/pending-removal-in-3.15.rst:48
msgid ""
":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :"
"func:`os.path.isreserved` to detect reserved paths on Windows."
@@ -379,11 +358,11 @@ msgstr ""
":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path."
"isreserved` 來偵測 Windows 上的保留路徑。"
-#: ../../deprecations/pending-removal-in-3.15.rst:48
+#: ../../deprecations/pending-removal-in-3.15.rst:52
msgid ":mod:`platform`:"
msgstr ":mod:`platform`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:50
+#: ../../deprecations/pending-removal-in-3.15.rst:54
msgid ""
":func:`~platform.java_ver` has been deprecated since Python 3.13. This "
"function is only useful for Jython support, has a confusing API, and is "
@@ -392,11 +371,23 @@ msgstr ""
"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支"
"援有用,具有令人困惑的 API,基本上未經測試。"
-#: ../../deprecations/pending-removal-in-3.15.rst:54
+#: ../../deprecations/pending-removal-in-3.15.rst:58
+msgid ":mod:`sysconfig`:"
+msgstr ":mod:`sysconfig`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:60
+msgid ""
+"The *check_home* argument of :func:`sysconfig.is_python_build` has been "
+"deprecated since Python 3.12."
+msgstr ""
+":func:`sysconfig.is_python_build` 的 *check_home* 引數自 Python 3.12 起已被棄"
+"用。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:63
msgid ":mod:`threading`:"
msgstr ":mod:`threading`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:56
+#: ../../deprecations/pending-removal-in-3.15.rst:65
msgid ""
":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any "
"arguments has been deprecated since Python 3.14, as the Python version does "
@@ -407,11 +398,27 @@ msgstr ""
"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許"
"任意數量的位置或關鍵字引數,並忽略每個引數。"
-#: ../../deprecations/pending-removal-in-3.15.rst:62
+#: ../../deprecations/pending-removal-in-3.15.rst:71
+msgid ":mod:`types`:"
+msgstr ":mod:`types`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:73
+msgid ""
+":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was "
+"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, "
+"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed "
+"in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)"
+msgstr ""
+":class:`types.CodeType`:自 3.10 起,存取 :attr:`~codeobject.co_lnotab` 已"
+"在 :pep:`626` 中被棄用,並計劃在 3.12 中移除,但只在 3.12 中於適當時發出 :"
+"exc:`DeprecationWarning`。可能在 3.15 中移除。(由 Nikita Sobolev 於 :gh:"
+"`101866` 貢獻。)"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:80
msgid ":mod:`typing`:"
msgstr ":mod:`typing`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:64
+#: ../../deprecations/pending-removal-in-3.15.rst:82
msgid ""
"The undocumented keyword argument syntax for creating :class:`~typing."
"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) "
@@ -422,7 +429,20 @@ msgstr ""
"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改"
"用基於類別的語法或函式語法 (functional syntax)。"
-#: ../../deprecations/pending-removal-in-3.15.rst:70
+#: ../../deprecations/pending-removal-in-3.15.rst:88
+msgid ""
+"When using the functional syntax of :class:`~typing.TypedDict`\\s, failing "
+"to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or "
+"passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated "
+"since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = "
+"TypedDict(\"TD\", {})`` to create a TypedDict with zero field."
+msgstr ""
+"當使用 :class:`~typing.TypedDict` 的函式語法時,未傳遞值給 *fields* 參數 "
+"(``TD = TypedDict(\"TD\")``) 或傳遞 ``None`` (``TD = TypedDict(\"TD\", "
+"None)``) 的做法自 Python 3.13 起已被棄用。請使用 ``class TD(TypedDict): "
+"pass`` 或 ``TD = TypedDict(\"TD\", {})`` 來建立具有零個欄位的 TypedDict。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:95
msgid ""
"The :func:`typing.no_type_check_decorator` decorator function has been "
"deprecated since Python 3.13. After eight years in the :mod:`typing` module, "
@@ -432,11 +452,11 @@ msgstr ""
"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支"
"援。"
-#: ../../deprecations/pending-removal-in-3.15.rst:75
+#: ../../deprecations/pending-removal-in-3.15.rst:100
msgid ":mod:`wave`:"
msgstr ":mod:`wave`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:77
+#: ../../deprecations/pending-removal-in-3.15.rst:102
msgid ""
"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave."
"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:"
@@ -447,32 +467,25 @@ msgstr ""
"getmarkers` 方法自 Python 3.13 被棄用。"
#: ../../deprecations/pending-removal-in-3.16.rst:2
-msgid "Pending Removal in Python 3.16"
+msgid "Pending removal in Python 3.16"
msgstr "Python 3.16 中待移除的項目"
-#: ../../deprecations/pending-removal-in-3.16.rst:4
-#: ../../deprecations/pending-removal-in-future.rst:12
-msgid ":mod:`builtins`:"
-msgstr ":mod:`builtins`:"
-
#: ../../deprecations/pending-removal-in-3.16.rst:6
msgid ""
-"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been "
-"deprecated since Python 3.12, as it produces surprising and unintuitive "
-"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation "
-"of a Boolean. In the rare case that you need the bitwise inversion of the "
-"underlying integer, convert to ``int`` explicitly (``~int(x)``)."
+"Setting :attr:`~module.__loader__` on a module while failing to set :attr:"
+"`__spec__.loader ` is deprecated. In "
+"Python 3.16, :attr:`!__loader__` will cease to be set or taken into "
+"consideration by the import system or the standard library."
msgstr ""
-"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為"
-"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的"
-"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 "
-"``~int(x)`` (``~int(x)``)。"
+"在模組上設定 :attr:`~module.__loader__` 而沒有設定 :attr:`__spec__.loader "
+"` 的做法將於 Python 3.16 被棄用。在 "
+"Python 3.16 中,引入系統或標準函式庫將不再設定或考慮 :attr:`!__loader__`。"
-#: ../../deprecations/pending-removal-in-3.16.rst:13
+#: ../../deprecations/pending-removal-in-3.16.rst:11
msgid ":mod:`array`:"
msgstr ":mod:`array`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:15
+#: ../../deprecations/pending-removal-in-3.16.rst:13
msgid ""
"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in "
"documentation since Python 3.3 and at runtime since Python 3.13. Use the "
@@ -483,10 +496,38 @@ msgstr ""
"來取代 Unicode 字元。"
#: ../../deprecations/pending-removal-in-3.16.rst:21
+msgid ""
+":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in "
+"Python 3.16, use :func:`inspect.iscoroutinefunction` instead. (Contributed "
+"by Jiahao Li and Kumar Aditya in :gh:`122875`.)"
+msgstr ""
+":func:`!asyncio.iscoroutinefunction` 已被棄用並將在 Python 3.16 中移除,請改"
+"用 :func:`inspect.iscoroutinefunction`。(由 Jiahao Li 和 Kumar Aditya 於 :"
+"gh:`122875` 貢獻。)"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:26
+#: ../../deprecations/pending-removal-in-future.rst:10
+msgid ":mod:`builtins`:"
+msgstr ":mod:`builtins`:"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:28
+msgid ""
+"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been "
+"deprecated since Python 3.12, as it produces surprising and unintuitive "
+"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation "
+"of a Boolean. In the rare case that you need the bitwise inversion of the "
+"underlying integer, convert to ``int`` explicitly (``~int(x)``)."
+msgstr ""
+"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為"
+"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的"
+"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 "
+"``~int(x)`` (``~int(x)``)。"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:35
msgid ":mod:`shutil`:"
msgstr ":mod:`shutil`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:23
+#: ../../deprecations/pending-removal-in-3.16.rst:37
msgid ""
"The :class:`!ExecError` exception has been deprecated since Python 3.14. It "
"has not been used by any function in :mod:`!shutil` since Python 3.4, and is "
@@ -495,11 +536,11 @@ msgstr ""
"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚"
"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。"
-#: ../../deprecations/pending-removal-in-3.16.rst:28
+#: ../../deprecations/pending-removal-in-3.16.rst:42
msgid ":mod:`symtable`:"
msgstr ":mod:`symtable`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:30
+#: ../../deprecations/pending-removal-in-3.16.rst:44
msgid ""
"The :meth:`Class.get_methods ` method has been "
"deprecated since Python 3.14."
@@ -507,11 +548,11 @@ msgstr ""
"自 Python 3.14 起,:meth:`Class.get_methods ` 方"
"法已被棄用。"
-#: ../../deprecations/pending-removal-in-3.16.rst:33
+#: ../../deprecations/pending-removal-in-3.16.rst:47
msgid ":mod:`sys`:"
msgstr ":mod:`sys`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:35
+#: ../../deprecations/pending-removal-in-3.16.rst:49
msgid ""
"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated "
"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` "
@@ -520,11 +561,11 @@ msgstr ""
"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。"
"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。"
-#: ../../deprecations/pending-removal-in-3.16.rst:39
+#: ../../deprecations/pending-removal-in-3.16.rst:53
msgid ":mod:`tarfile`:"
msgstr ":mod:`tarfile`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:41
+#: ../../deprecations/pending-removal-in-3.16.rst:55
msgid ""
"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been "
"deprecated since Python 3.13."
@@ -549,15 +590,11 @@ msgid ""
"groups are deprecated."
msgstr ":mod:`argparse`:已棄用巢狀引數群組和巢狀互斥群組。"
-#: ../../deprecations/pending-removal-in-future.rst:10
-msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)"
-msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)"
-
-#: ../../deprecations/pending-removal-in-future.rst:14
+#: ../../deprecations/pending-removal-in-future.rst:12
msgid "``bool(NotImplemented)``."
msgstr "``bool(NotImplemented)``。"
-#: ../../deprecations/pending-removal-in-future.rst:15
+#: ../../deprecations/pending-removal-in-future.rst:13
msgid ""
"Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature "
"is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single "
@@ -566,7 +603,7 @@ msgstr ""
"產生器:``throw(type, exc, tb)`` 和 ``athrow(type, exc, tb)`` 簽名已被棄用:"
"請改用 ``throw(exc)`` 和 ``athrow(exc)``,為單引數簽名。"
-#: ../../deprecations/pending-removal-in-future.rst:18
+#: ../../deprecations/pending-removal-in-future.rst:16
msgid ""
"Currently Python accepts numeric literals immediately followed by keywords, "
"for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and "
@@ -584,7 +621,7 @@ msgstr ""
"`in`、:keyword:`is` 和 :keyword:`or` 之一的關鍵字,則會引發語法警告。在未來版"
"本中,它將被更改為語法錯誤。(:gh:`87999`)"
-#: ../../deprecations/pending-removal-in-future.rst:26
+#: ../../deprecations/pending-removal-in-future.rst:24
msgid ""
"Support for ``__index__()`` and ``__int__()`` method returning non-int type: "
"these methods will be required to return an instance of a strict subclass "
@@ -593,7 +630,7 @@ msgstr ""
"``__index__()`` 和 ``__int__()`` 方法回傳非 int 型別的支援:這些方法將需要回"
"傳 :class:`int` 的嚴格子類別實例。"
-#: ../../deprecations/pending-removal-in-future.rst:29
+#: ../../deprecations/pending-removal-in-future.rst:27
msgid ""
"Support for ``__float__()`` method returning a strict subclass of :class:"
"`float`: these methods will be required to return an instance of :class:"
@@ -602,7 +639,7 @@ msgstr ""
"回傳 :class:`float` 嚴格子類別 ``__float__()`` 方法的支援:這些方法將需要回"
"傳 :class:`float` 的實例。"
-#: ../../deprecations/pending-removal-in-future.rst:32
+#: ../../deprecations/pending-removal-in-future.rst:30
msgid ""
"Support for ``__complex__()`` method returning a strict subclass of :class:"
"`complex`: these methods will be required to return an instance of :class:"
@@ -611,11 +648,11 @@ msgstr ""
"回傳 :class:`complex` 嚴格子類別 ``__complex__()`` 方法的支援:這些方法將需要"
"回傳 :class:`complex` 的實例。"
-#: ../../deprecations/pending-removal-in-future.rst:35
+#: ../../deprecations/pending-removal-in-future.rst:33
msgid "Delegation of ``int()`` to ``__trunc__()`` method."
msgstr "將 ``int()`` 委派給 ``__trunc__()`` 方法。"
-#: ../../deprecations/pending-removal-in-future.rst:36
+#: ../../deprecations/pending-removal-in-future.rst:34
msgid ""
"Passing a complex number as the *real* or *imag* argument in the :func:"
"`complex` constructor is now deprecated; it should only be passed as a "
@@ -625,7 +662,7 @@ msgstr ""
"在 :func:`complex` 建構子中將複數作為 *real* 或 *imag* 引數傳遞現在已被棄用;"
"它應該只作為單個位置引數傳遞。 (由 Serhiy Storchaka 於 :gh:`109218` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:41
+#: ../../deprecations/pending-removal-in-future.rst:39
msgid ""
":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants "
"are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar."
@@ -635,18 +672,18 @@ msgstr ""
"被 :data:`calendar.JANUARY` 和 :data:`calendar.FEBRUARY` 取代。 (由 Prince "
"Roshan 於 :gh:`103636` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:46
+#: ../../deprecations/pending-removal-in-future.rst:44
msgid ""
":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method "
"instead."
msgstr ""
":attr:`codeobject.co_lnotab`:請改用 :meth:`codeobject.co_lines` 方法。"
-#: ../../deprecations/pending-removal-in-future.rst:49
+#: ../../deprecations/pending-removal-in-future.rst:47
msgid ":mod:`datetime`:"
msgstr ":mod:`datetime`:"
-#: ../../deprecations/pending-removal-in-future.rst:51
+#: ../../deprecations/pending-removal-in-future.rst:49
msgid ""
":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime."
"UTC)``."
@@ -654,7 +691,7 @@ msgstr ""
":meth:`~datetime.datetime.utcnow`:請改用 ``datetime.datetime."
"now(tz=datetime.UTC)``。"
-#: ../../deprecations/pending-removal-in-future.rst:53
+#: ../../deprecations/pending-removal-in-future.rst:51
msgid ""
":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime."
"fromtimestamp(timestamp, tz=datetime.UTC)``."
@@ -662,19 +699,11 @@ msgstr ""
":meth:`~datetime.datetime.utcfromtimestamp`:請改用 ``datetime.datetime."
"fromtimestamp(timestamp, tz=datetime.UTC)``。"
-#: ../../deprecations/pending-removal-in-future.rst:56
+#: ../../deprecations/pending-removal-in-future.rst:54
msgid ":mod:`gettext`: Plural value must be an integer."
msgstr ":mod:`gettext`:複數值必須是整數。"
#: ../../deprecations/pending-removal-in-future.rst:58
-msgid ":mod:`importlib`:"
-msgstr ":mod:`importlib`:"
-
-#: ../../deprecations/pending-removal-in-future.rst:60
-msgid "``load_module()`` method: use ``exec_module()`` instead."
-msgstr "``load_module()`` method:請改用 ``exec_module()``。"
-
-#: ../../deprecations/pending-removal-in-future.rst:61
msgid ""
":func:`~importlib.util.cache_from_source` *debug_override* parameter is "
"deprecated: use the *optimization* parameter instead."
@@ -682,19 +711,19 @@ msgstr ""
":func:`~importlib.util.cache_from_source` *debug_override* 參數已被棄用:請改"
"用 *optimization* 參數。"
-#: ../../deprecations/pending-removal-in-future.rst:64
+#: ../../deprecations/pending-removal-in-future.rst:61
msgid ":mod:`importlib.metadata`:"
msgstr ":mod:`importlib.metadata`:"
-#: ../../deprecations/pending-removal-in-future.rst:66
+#: ../../deprecations/pending-removal-in-future.rst:63
msgid "``EntryPoints`` tuple interface."
msgstr "``EntryPoints`` 元組介面。"
-#: ../../deprecations/pending-removal-in-future.rst:67
+#: ../../deprecations/pending-removal-in-future.rst:64
msgid "Implicit ``None`` on return values."
msgstr "回傳值上的隱式 ``None``。"
-#: ../../deprecations/pending-removal-in-future.rst:69
+#: ../../deprecations/pending-removal-in-future.rst:66
msgid ""
":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, "
"use :meth:`~logging.warning` instead."
@@ -702,19 +731,19 @@ msgstr ""
":mod:`logging`:自 Python 3.3 起,``warn()`` 方法已被棄用,請改用 :meth:"
"`~logging.warning`。"
-#: ../../deprecations/pending-removal-in-future.rst:72
+#: ../../deprecations/pending-removal-in-future.rst:69
msgid ""
":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use "
"BytesIO and binary mode instead."
msgstr ""
":mod:`mailbox`:已棄用 StringIO 輸入和文本模式,請改用 BytesIO 和二進位模式。"
-#: ../../deprecations/pending-removal-in-future.rst:75
+#: ../../deprecations/pending-removal-in-future.rst:72
msgid ""
":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process."
msgstr ":mod:`os`:在多執行緒行程中呼叫 :func:`os.register_at_fork`。"
-#: ../../deprecations/pending-removal-in-future.rst:77
+#: ../../deprecations/pending-removal-in-future.rst:74
msgid ""
":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is "
"deprecated, use an exception instance."
@@ -722,7 +751,7 @@ msgstr ""
":class:`!pydoc.ErrorDuringImport`:*exc_info* 參數的元組值已被棄用,請用例外"
"實例。"
-#: ../../deprecations/pending-removal-in-future.rst:80
+#: ../../deprecations/pending-removal-in-future.rst:77
msgid ""
":mod:`re`: More strict rules are now applied for numerical group references "
"and group names in regular expressions. Only sequence of ASCII digits is "
@@ -734,12 +763,12 @@ msgstr ""
"有 ASCII 數碼序列被接受作為數值參照。位元組模式和替換字串中的群組名稱現在只能"
"包含 ASCII 字母、數碼和底線。(由 Serhiy Storchaka 於 :gh:`91760` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:87
+#: ../../deprecations/pending-removal-in-future.rst:84
msgid ""
":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules."
msgstr ":mod:`!sre_compile`、:mod:`!sre_constants` 和 :mod:`!sre_parse` 模組。"
-#: ../../deprecations/pending-removal-in-future.rst:89
+#: ../../deprecations/pending-removal-in-future.rst:86
msgid ""
":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in "
"Python 3.12; use the *onexc* parameter instead."
@@ -747,15 +776,15 @@ msgstr ""
":mod:`shutil`::func:`~shutil.rmtree` 的 *onerror* 參數在 Python 3.12 中已被"
"棄用;請改用 *onexc* 參數。"
-#: ../../deprecations/pending-removal-in-future.rst:92
+#: ../../deprecations/pending-removal-in-future.rst:89
msgid ":mod:`ssl` options and protocols:"
msgstr ":mod:`ssl` 選項和協定:"
-#: ../../deprecations/pending-removal-in-future.rst:94
+#: ../../deprecations/pending-removal-in-future.rst:91
msgid ":class:`ssl.SSLContext` without protocol argument is deprecated."
msgstr "不帶協定引數的 :class:`ssl.SSLContext` 已被棄用。"
-#: ../../deprecations/pending-removal-in-future.rst:95
+#: ../../deprecations/pending-removal-in-future.rst:92
msgid ""
":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:"
"`!selected_npn_protocol` are deprecated: use ALPN instead."
@@ -763,58 +792,51 @@ msgstr ""
":class:`ssl.SSLContext`::meth:`~ssl.SSLContext.set_npn_protocols` 和 :meth:"
"`!selected_npn_protocol` 已被棄用:請改用 ALPN。"
-#: ../../deprecations/pending-removal-in-future.rst:98
+#: ../../deprecations/pending-removal-in-future.rst:95
msgid "``ssl.OP_NO_SSL*`` options"
msgstr "``ssl.OP_NO_SSL*`` 選項"
-#: ../../deprecations/pending-removal-in-future.rst:99
+#: ../../deprecations/pending-removal-in-future.rst:96
msgid "``ssl.OP_NO_TLS*`` options"
msgstr "``ssl.OP_NO_TLS*`` 選項"
-#: ../../deprecations/pending-removal-in-future.rst:100
+#: ../../deprecations/pending-removal-in-future.rst:97
msgid "``ssl.PROTOCOL_SSLv3``"
msgstr "``ssl.PROTOCOL_SSLv3``"
-#: ../../deprecations/pending-removal-in-future.rst:101
+#: ../../deprecations/pending-removal-in-future.rst:98
msgid "``ssl.PROTOCOL_TLS``"
msgstr "``ssl.PROTOCOL_TLS``"
-#: ../../deprecations/pending-removal-in-future.rst:102
+#: ../../deprecations/pending-removal-in-future.rst:99
msgid "``ssl.PROTOCOL_TLSv1``"
msgstr "``ssl.PROTOCOL_TLSv1``"
-#: ../../deprecations/pending-removal-in-future.rst:103
+#: ../../deprecations/pending-removal-in-future.rst:100
msgid "``ssl.PROTOCOL_TLSv1_1``"
msgstr "``ssl.PROTOCOL_TLSv1_1``"
-#: ../../deprecations/pending-removal-in-future.rst:104
+#: ../../deprecations/pending-removal-in-future.rst:101
msgid "``ssl.PROTOCOL_TLSv1_2``"
msgstr "``ssl.PROTOCOL_TLSv1_2``"
-#: ../../deprecations/pending-removal-in-future.rst:105
+#: ../../deprecations/pending-removal-in-future.rst:102
msgid "``ssl.TLSVersion.SSLv3``"
msgstr "``ssl.TLSVersion.SSLv3``"
-#: ../../deprecations/pending-removal-in-future.rst:106
+#: ../../deprecations/pending-removal-in-future.rst:103
msgid "``ssl.TLSVersion.TLSv1``"
msgstr "``ssl.TLSVersion.TLSv1``"
-#: ../../deprecations/pending-removal-in-future.rst:107
+#: ../../deprecations/pending-removal-in-future.rst:104
msgid "``ssl.TLSVersion.TLSv1_1``"
msgstr "``ssl.TLSVersion.TLSv1_1``"
-#: ../../deprecations/pending-removal-in-future.rst:109
-msgid ""
-":func:`sysconfig.is_python_build` *check_home* parameter is deprecated and "
-"ignored."
-msgstr ""
-":func:`sysconfig.is_python_build` 的 *check_home* 參數已被棄用並被忽略。"
-
-#: ../../deprecations/pending-removal-in-future.rst:112
+#: ../../deprecations/pending-removal-in-future.rst:106
msgid ":mod:`threading` methods:"
msgstr ":mod:`threading` 方法:"
-#: ../../deprecations/pending-removal-in-future.rst:114
+#: ../../deprecations/pending-removal-in-future.rst:108
msgid ""
":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition."
"notify_all`."
@@ -822,11 +844,11 @@ msgstr ""
":meth:`!threading.Condition.notifyAll`:請用 :meth:`~threading.Condition."
"notify_all`。"
-#: ../../deprecations/pending-removal-in-future.rst:115
+#: ../../deprecations/pending-removal-in-future.rst:109
msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`."
msgstr ":meth:`!threading.Event.isSet`:請用 :meth:`~threading.Event.is_set`。"
-#: ../../deprecations/pending-removal-in-future.rst:116
+#: ../../deprecations/pending-removal-in-future.rst:110
msgid ""
":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :"
"attr:`threading.Thread.daemon` attribute."
@@ -834,7 +856,7 @@ msgstr ""
":meth:`!threading.Thread.isDaemon`、:meth:`threading.Thread.setDaemon`:請"
"用 :attr:`threading.Thread.daemon` 屬性。"
-#: ../../deprecations/pending-removal-in-future.rst:118
+#: ../../deprecations/pending-removal-in-future.rst:112
msgid ""
":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :"
"attr:`threading.Thread.name` attribute."
@@ -842,20 +864,20 @@ msgstr ""
":meth:`!threading.Thread.getName`、:meth:`threading.Thread.setName`:請用 :"
"attr:`threading.Thread.name` 屬性。"
-#: ../../deprecations/pending-removal-in-future.rst:120
+#: ../../deprecations/pending-removal-in-future.rst:114
msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`."
msgstr ""
":meth:`!threading.currentThread`:請用 :meth:`threading.current_thread`。"
-#: ../../deprecations/pending-removal-in-future.rst:121
+#: ../../deprecations/pending-removal-in-future.rst:115
msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`."
msgstr ":meth:`!threading.activeCount`:請用 :meth:`threading.active_count`。"
-#: ../../deprecations/pending-removal-in-future.rst:123
+#: ../../deprecations/pending-removal-in-future.rst:117
msgid ":class:`typing.Text` (:gh:`92332`)."
msgstr ":class:`typing.Text` (:gh:`92332`)。"
-#: ../../deprecations/pending-removal-in-future.rst:125
+#: ../../deprecations/pending-removal-in-future.rst:119
msgid ""
":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a "
"value that is not ``None`` from a test case."
@@ -863,58 +885,58 @@ msgstr ""
":class:`unittest.IsolatedAsyncioTestCase`:從測試案例中回傳非 ``None`` 的值已"
"被棄用。"
-#: ../../deprecations/pending-removal-in-future.rst:128
+#: ../../deprecations/pending-removal-in-future.rst:122
msgid ""
":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` "
"instead"
msgstr ""
":mod:`urllib.parse` 已棄用函式:請改用 :func:`~urllib.parse.urlparse`。"
-#: ../../deprecations/pending-removal-in-future.rst:130
+#: ../../deprecations/pending-removal-in-future.rst:124
msgid "``splitattr()``"
msgstr "``splitattr()``"
-#: ../../deprecations/pending-removal-in-future.rst:131
+#: ../../deprecations/pending-removal-in-future.rst:125
msgid "``splithost()``"
msgstr "``splithost()``"
-#: ../../deprecations/pending-removal-in-future.rst:132
+#: ../../deprecations/pending-removal-in-future.rst:126
msgid "``splitnport()``"
msgstr "``splitnport()``"
-#: ../../deprecations/pending-removal-in-future.rst:133
+#: ../../deprecations/pending-removal-in-future.rst:127
msgid "``splitpasswd()``"
msgstr "``splitpasswd()``"
-#: ../../deprecations/pending-removal-in-future.rst:134
+#: ../../deprecations/pending-removal-in-future.rst:128
msgid "``splitport()``"
msgstr "``splitport()``"
-#: ../../deprecations/pending-removal-in-future.rst:135
+#: ../../deprecations/pending-removal-in-future.rst:129
msgid "``splitquery()``"
msgstr "``splitquery()``"
-#: ../../deprecations/pending-removal-in-future.rst:136
+#: ../../deprecations/pending-removal-in-future.rst:130
msgid "``splittag()``"
msgstr "``splittag()``"
-#: ../../deprecations/pending-removal-in-future.rst:137
+#: ../../deprecations/pending-removal-in-future.rst:131
msgid "``splittype()``"
msgstr "``splittype()``"
-#: ../../deprecations/pending-removal-in-future.rst:138
+#: ../../deprecations/pending-removal-in-future.rst:132
msgid "``splituser()``"
msgstr "``splituser()``"
-#: ../../deprecations/pending-removal-in-future.rst:139
+#: ../../deprecations/pending-removal-in-future.rst:133
msgid "``splitvalue()``"
msgstr "``splitvalue()``"
-#: ../../deprecations/pending-removal-in-future.rst:140
+#: ../../deprecations/pending-removal-in-future.rst:134
msgid "``to_bytes()``"
msgstr "``to_bytes()``"
-#: ../../deprecations/pending-removal-in-future.rst:142
+#: ../../deprecations/pending-removal-in-future.rst:136
msgid ""
":mod:`urllib.request`: :class:`~urllib.request.URLopener` and :class:"
"`~urllib.request.FancyURLopener` style of invoking requests is deprecated. "
@@ -924,13 +946,13 @@ msgstr ""
"class:`~urllib.request.FancyURLopener` 風格已被棄用。請改用更新的 :func:"
"`~urllib.request.urlopen` 函式和方法。"
-#: ../../deprecations/pending-removal-in-future.rst:146
+#: ../../deprecations/pending-removal-in-future.rst:140
msgid ""
":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial "
"writes."
msgstr ":mod:`wsgiref`:``SimpleHandler.stdout.write()`` 不應該進行部分寫入。"
-#: ../../deprecations/pending-removal-in-future.rst:149
+#: ../../deprecations/pending-removal-in-future.rst:143
msgid ""
":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml."
"etree.ElementTree.Element` is deprecated. In a future release it will always "
@@ -941,7 +963,7 @@ msgstr ""
"Element` 的真值測試。在未來版本中,它將始終回傳 ``True``。請改用明確的 "
"``len(elem)`` 或 ``elem is not None`` 測試。"
-#: ../../deprecations/pending-removal-in-future.rst:154
+#: ../../deprecations/pending-removal-in-future.rst:148
msgid ""
":meth:`zipimport.zipimporter.load_module` is deprecated: use :meth:"
"`~zipimport.zipimporter.exec_module` instead."
@@ -1142,10 +1164,6 @@ msgstr ""
"func:`Py_PreInitialize`)"
#: ../../deprecations/c-api-pending-removal-in-3.15.rst:4
-msgid "The bundled copy of ``libmpdecimal``."
-msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。"
-
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5
msgid ""
"The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:"
"`PyImport_ImportModule` instead."
@@ -1153,7 +1171,7 @@ msgstr ""
":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:"
"`PyImport_ImportModule`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6
msgid ""
":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:"
"func:`PyWeakref_GetRef` instead."
@@ -1161,7 +1179,7 @@ msgstr ""
":c:func:`PyWeakref_GetObject` 和 :c:func:`PyWeakref_GET_OBJECT`:請改用 :c:"
"func:`PyWeakref_GetRef`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:9
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:8
msgid ""
":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:"
"type:`wchar_t` instead."
@@ -1169,11 +1187,11 @@ msgstr ""
":c:type:`Py_UNICODE` 型別與 :c:macro:`!Py_UNICODE_WIDE` 巨集:請改用 :c:type:"
"`wchar_t`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:11
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10
msgid "Python initialization functions:"
msgstr "Python 初始化函式:"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:13
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12
msgid ""
":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!"
"warnings.filters` instead."
@@ -1181,27 +1199,35 @@ msgstr ""
":c:func:`PySys_ResetWarnOptions`:請改為清除 :data:`sys.warnoptions` 和 :"
"data:`!warnings.filters`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15
-msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead."
-msgstr ":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.exec_prefix`。"
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:14
+msgid ""
+":c:func:`Py_GetExecPrefix`: Get :data:`sys.base_exec_prefix` and :data:`sys."
+"exec_prefix` instead."
+msgstr ""
+":c:func:`Py_GetExecPrefix`:請改用 :data:`sys.base_exec_prefix` 與 :data:"
+"`sys.exec_prefix`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:16
msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead."
msgstr ":c:func:`Py_GetPath`:請改用 :data:`sys.path`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:19
-msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead."
-msgstr ":c:func:`Py_GetPrefix`:請改用 :data:`sys.prefix`。"
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:18
+msgid ""
+":c:func:`Py_GetPrefix`: Get :data:`sys.base_prefix` and :data:`sys.prefix` "
+"instead."
+msgstr ""
+":c:func:`Py_GetPrefix`:請改用 :data:`sys.base_prefix` 與 :data:`sys."
+"prefix`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:21
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:20
msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead."
msgstr ":c:func:`Py_GetProgramFullPath`:請改用 :data:`sys.executable`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:23
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:22
msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead."
msgstr ":c:func:`Py_GetProgramName`:請改用 :data:`sys.executable`。"
-#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25
+#: ../../deprecations/c-api-pending-removal-in-3.15.rst:24
msgid ""
":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:"
"`PYTHONHOME` environment variable instead."
@@ -1339,3 +1365,9 @@ msgstr ""
#: ../../deprecations/c-api-pending-removal-in-future.rst:50
msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7."
msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要。"
+
+#~ msgid "The bundled copy of ``libmpdecimal``."
+#~ msgstr "``libmpdecimal`` 的打包副本 (bundled copy)。"
+
+#~ msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)"
+#~ msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)"
diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po
index d39a172a1a..6e382beeb8 100644
--- a/deprecations/pending-removal-in-3.13.po
+++ b/deprecations/pending-removal-in-3.13.po
@@ -1,6 +1,5 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
@@ -9,7 +8,8 @@ msgstr ""
"POT-Creation-Date: 2024-09-23 07:52+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/deprecations/pending-removal-in-3.14.po b/deprecations/pending-removal-in-3.14.po
index a552eb8e16..bd8e164bd3 100644
--- a/deprecations/pending-removal-in-3.14.po
+++ b/deprecations/pending-removal-in-3.14.po
@@ -1,15 +1,15 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-15 00:14+0000\n"
+"POT-Creation-Date: 2024-11-10 17:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,21 +20,6 @@ msgid "Pending Removal in Python 3.14"
msgstr "Python 3.14 中待移除的項目"
#: ../../deprecations/pending-removal-in-3.14.rst:4
-msgid "The import system:"
-msgstr "引入系統 (import system):"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:6
-msgid ""
-"Setting :attr:`~module.__loader__` on a module while failing to set :attr:"
-"`__spec__.loader ` is deprecated. In "
-"Python 3.14, :attr:`!__loader__` will cease to be set or taken into "
-"consideration by the import system or the standard library."
-msgstr ""
-"在模組上設定 :attr:`~module.__loader__` 而沒有設定 :attr:`__spec__.loader "
-"` 的做法已被棄用。在 Python 3.14 中,"
-"引入系統或標準函式庫將不再設定或考慮 :attr:`!__loader__` 。"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:11
msgid ""
":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!"
"argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. "
@@ -44,7 +29,7 @@ msgstr ""
"*choices* 和 *metavar* 參數已被棄用,將在 3.14 中移除。 (由 Nikita Sobolev "
"於 :gh:`92248` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:16
+#: ../../deprecations/pending-removal-in-3.14.rst:9
msgid ""
":mod:`ast`: The following features have been deprecated in documentation "
"since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at "
@@ -53,62 +38,61 @@ msgstr ""
":mod:`ast`:自 Python 3.8 起,下列功能已在文件中被棄用,現在在存取或使用時會"
"於 runtime 發出 :exc:`DeprecationWarning`,並將在 Python 3.14 中移除:"
-#: ../../deprecations/pending-removal-in-3.14.rst:20
+#: ../../deprecations/pending-removal-in-3.14.rst:13
msgid ":class:`!ast.Num`"
msgstr ":class:`!ast.Num`"
-#: ../../deprecations/pending-removal-in-3.14.rst:21
+#: ../../deprecations/pending-removal-in-3.14.rst:14
msgid ":class:`!ast.Str`"
msgstr ":class:`!ast.Str`"
-#: ../../deprecations/pending-removal-in-3.14.rst:22
+#: ../../deprecations/pending-removal-in-3.14.rst:15
msgid ":class:`!ast.Bytes`"
msgstr ":class:`!ast.Bytes`"
-#: ../../deprecations/pending-removal-in-3.14.rst:23
+#: ../../deprecations/pending-removal-in-3.14.rst:16
msgid ":class:`!ast.NameConstant`"
msgstr ":class:`!ast.NameConstant`"
-#: ../../deprecations/pending-removal-in-3.14.rst:24
+#: ../../deprecations/pending-removal-in-3.14.rst:17
msgid ":class:`!ast.Ellipsis`"
msgstr ":class:`!ast.Ellipsis`"
-#: ../../deprecations/pending-removal-in-3.14.rst:26
+#: ../../deprecations/pending-removal-in-3.14.rst:19
msgid ""
-"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:"
-"`90953`.)"
+"Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka "
+"in :gh:`90953`.)"
msgstr ""
"請改用 :class:`ast.Constant`。(由 Serhiy Storchaka 於 :gh:`90953` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:29
+#: ../../deprecations/pending-removal-in-3.14.rst:22
msgid ":mod:`asyncio`:"
msgstr ":mod:`asyncio`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:31
+#: ../../deprecations/pending-removal-in-3.14.rst:24
msgid ""
-"The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, :class:"
-"`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` and :"
-"class:`~asyncio.SafeChildWatcher` are deprecated and will be removed in "
+"The child watcher "
+"classes :class:`~asyncio.MultiLoopChildWatcher`, :class:`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher` "
+"and :class:`~asyncio.SafeChildWatcher` are deprecated and will be removed in "
"Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)"
msgstr ""
-"已棄用並將在 Python 3.14 中移除的 child watcher 類別::class:`~asyncio."
-"MultiLoopChildWatcher`、:class:`~asyncio.FastChildWatcher`、:class:`~asyncio."
-"AbstractChildWatcher` 和 :class:`~asyncio.SafeChildWatcher`。 (由 Kumar "
-"Aditya 於 :gh:`94597` 貢獻。)"
+"已棄用並將在 Python 3.14 中移除的 child watcher 類"
+"別::class:`~asyncio.MultiLoopChildWatcher`、:class:`~asyncio.FastChildWatcher`、:class:`~asyncio.AbstractChildWatcher` "
+"和 :class:`~asyncio.SafeChildWatcher`。 (由 Kumar Aditya 於 :gh:`94597` 貢"
+"獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:37
+#: ../../deprecations/pending-removal-in-3.14.rst:30
msgid ""
-":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:"
-"`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio."
-"AbstractEventLoopPolicy.get_child_watcher` are deprecated and will be "
-"removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)"
+":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` "
+"and :meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated "
+"and will be removed in Python 3.14. (Contributed by Kumar Aditya "
+"in :gh:`94597`.)"
msgstr ""
-":func:`asyncio.set_child_watcher`、:func:`asyncio.get_child_watcher`、:meth:"
-"`asyncio.AbstractEventLoopPolicy.set_child_watcher` 和 :meth:`asyncio."
-"AbstractEventLoopPolicy.get_child_watcher` 已被棄用並將在 Python 3.14 中移"
-"除。(由 Kumar Aditya 於 :gh:`94597` 貢獻。)"
+":func:`asyncio.set_child_watcher`、:func:`asyncio.get_child_watcher`、:meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` "
+"和 :meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` 已被棄用並將在 "
+"Python 3.14 中移除。(由 Kumar Aditya 於 :gh:`94597` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:43
+#: ../../deprecations/pending-removal-in-3.14.rst:36
msgid ""
"The :meth:`~asyncio.get_event_loop` method of the default event loop policy "
"now emits a :exc:`DeprecationWarning` if there is no current event loop set "
@@ -119,59 +103,62 @@ msgstr ""
"件迴圈且決定建立一個時發出 :exc:`DeprecationWarning`。 (由 Serhiy Storchaka "
"和 Guido van Rossum 於 :gh:`100160` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:48
+#: ../../deprecations/pending-removal-in-3.14.rst:41
msgid ""
":mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`. "
"Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`. For use in "
-"typing, prefer a union, like ``bytes | bytearray``, or :class:`collections."
-"abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)"
+"typing, prefer a union, like ``bytes | bytearray``, "
+"or :class:`collections.abc.Buffer`. (Contributed by Shantanu Jain "
+"in :gh:`91896`.)"
msgstr ""
-":mod:`collections.abc`:已棄用 :class:`~collections.abc.ByteString`。請改用 :"
-"class:`!Sequence` 或 :class:`~collections.abc.Buffer`。在 typing 中使用時,請"
-"改用聯集,如 ``bytes | bytearray``,或 :class:`collections.abc.Buffer`。(由 "
-"Shantanu Jain 於 :gh:`91896` 貢獻。)"
+":mod:`collections.abc`:已棄用 :class:`~collections.abc.ByteString`。請改"
+"用 :class:`!Sequence` 或 :class:`~collections.abc.Buffer`。在 typing 中使用"
+"時,請改用聯集,如 ``bytes | bytearray``,"
+"或 :class:`collections.abc.Buffer`。(由 Shantanu Jain 於 :gh:`91896` 貢"
+"獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:54
+#: ../../deprecations/pending-removal-in-3.14.rst:47
msgid ""
-":mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils."
-"localtime`. (Contributed by Alan Williams in :gh:`72346`.)"
+":mod:`email`: Deprecated the *isdst* parameter "
+"in :func:`email.utils.localtime`. (Contributed by Alan Williams "
+"in :gh:`72346`.)"
msgstr ""
":mod:`email`:已棄用 :func:`email.utils.localtime` 中的 *isdst* 參數。(由 "
"Alan Williams 於 :gh:`72346` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:57
+#: ../../deprecations/pending-removal-in-3.14.rst:50
msgid ":mod:`importlib.abc` deprecated classes:"
msgstr ":mod:`importlib.abc` 的已棄用類別:"
-#: ../../deprecations/pending-removal-in-3.14.rst:59
+#: ../../deprecations/pending-removal-in-3.14.rst:52
msgid ":class:`!importlib.abc.ResourceReader`"
msgstr ":class:`!importlib.abc.ResourceReader`"
-#: ../../deprecations/pending-removal-in-3.14.rst:60
+#: ../../deprecations/pending-removal-in-3.14.rst:53
msgid ":class:`!importlib.abc.Traversable`"
msgstr ":class:`!importlib.abc.Traversable`"
-#: ../../deprecations/pending-removal-in-3.14.rst:61
+#: ../../deprecations/pending-removal-in-3.14.rst:54
msgid ":class:`!importlib.abc.TraversableResources`"
msgstr ":class:`!importlib.abc.TraversableResources`"
-#: ../../deprecations/pending-removal-in-3.14.rst:63
+#: ../../deprecations/pending-removal-in-3.14.rst:56
msgid "Use :mod:`importlib.resources.abc` classes instead:"
msgstr "請改用 :mod:`importlib.resources.abc` 類別:"
-#: ../../deprecations/pending-removal-in-3.14.rst:65
+#: ../../deprecations/pending-removal-in-3.14.rst:58
msgid ":class:`importlib.resources.abc.Traversable`"
msgstr ":class:`importlib.resources.abc.Traversable`"
-#: ../../deprecations/pending-removal-in-3.14.rst:66
+#: ../../deprecations/pending-removal-in-3.14.rst:59
msgid ":class:`importlib.resources.abc.TraversableResources`"
msgstr ":class:`importlib.resources.abc.TraversableResources`"
-#: ../../deprecations/pending-removal-in-3.14.rst:68
+#: ../../deprecations/pending-removal-in-3.14.rst:61
msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)"
msgstr "(由 Jason R. Coombs 和 Hugo van Kemenade 貢獻於 :gh:`93963`。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:70
+#: ../../deprecations/pending-removal-in-3.14.rst:63
msgid ""
":mod:`itertools` had undocumented, inefficient, historically buggy, and "
"inconsistent support for copy, deepcopy, and pickle operations. This will be "
@@ -182,92 +169,74 @@ msgstr ""
"deepcopy 和 pickle 操作支援。將在 3.14 中移除以大幅減少程式碼量和維護負擔。 "
"(由 Raymond Hettinger 於 :gh:`101588` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:76
+#: ../../deprecations/pending-removal-in-3.14.rst:69
msgid ""
":mod:`multiprocessing`: The default start method will change to a safer one "
"on Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is "
"currently the default (:gh:`84559`). Adding a runtime warning about this was "
"deemed too disruptive as the majority of code is not expected to care. Use "
-"the :func:`~multiprocessing.get_context` or :func:`~multiprocessing."
-"set_start_method` APIs to explicitly specify when your code *requires* "
-"``'fork'``. See :ref:`multiprocessing-start-methods`."
+"the :func:`~multiprocessing.get_context` "
+"or :func:`~multiprocessing.set_start_method` APIs to explicitly specify when "
+"your code *requires* ``'fork'``. See :ref:`multiprocessing-start-methods`."
msgstr ""
":mod:`multiprocessing`:預設的啟動方法將在 Linux、BSD 和其他非 macOS POSIX 平"
"台上更改為更安全的 方法,目前 ``'fork'`` 是預設值 (:gh:`84559`)。對此增加一"
-"個 runtime 警告被認為太過擾人,因為 大多數程式碼不會在意。請使用 :func:"
-"`~multiprocessing.get_context` 或 :func:`~multiprocessing.set_start_method` "
-"API 來明確指定你的程式碼何時\\ *需要* ``'fork'``。請參閱 :ref:"
-"`multiprocessing-start-methods`。"
+"個 runtime 警告被認為太過擾人,因為 大多數程式碼不會在意。請使"
+"用 :func:`~multiprocessing.get_context` "
+"或 :func:`~multiprocessing.set_start_method` API 來明確指定你的程式碼何時\\ *"
+"需要* ``'fork'``。請參閱 :ref:`multiprocessing-start-methods`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:84
+#: ../../deprecations/pending-removal-in-3.14.rst:77
msgid ""
-":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and :meth:`~pathlib."
-"PurePath.relative_to`: passing additional arguments is deprecated."
+":mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` "
+"and :meth:`~pathlib.PurePath.relative_to`: passing additional arguments is "
+"deprecated."
msgstr ""
-":mod:`pathlib`:已棄用 :meth:`~pathlib.PurePath.is_relative_to` 和 :meth:"
-"`~pathlib.PurePath.relative_to`:額外引數的傳遞已被棄用。"
+":mod:`pathlib`:已棄用 :meth:`~pathlib.PurePath.is_relative_to` "
+"和 :meth:`~pathlib.PurePath.relative_to`:額外引數的傳遞已被棄用。"
-#: ../../deprecations/pending-removal-in-3.14.rst:88
+#: ../../deprecations/pending-removal-in-3.14.rst:81
msgid ""
":mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader` "
"now raise :exc:`DeprecationWarning`; use :func:`importlib.util.find_spec` "
"instead. (Contributed by Nikita Sobolev in :gh:`97850`.)"
msgstr ""
":mod:`pkgutil`::func:`~pkgutil.find_loader` 和 :func:`~pkgutil.get_loader` "
-"現在會引發 :exc:`DeprecationWarning`;請改用 :func:`importlib.util."
-"find_spec`。 (由 Nikita Sobolev 於 :gh:`97850` 貢獻。)"
+"現在會引發 :exc:`DeprecationWarning`;請改"
+"用 :func:`importlib.util.find_spec`。 (由 Nikita Sobolev 於 :gh:`97850` 貢"
+"獻。)"
-#: ../../deprecations/pending-removal-in-3.14.rst:93
+#: ../../deprecations/pending-removal-in-3.14.rst:86
msgid ":mod:`pty`:"
msgstr ":mod:`pty`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:95
+#: ../../deprecations/pending-removal-in-3.14.rst:88
msgid "``master_open()``: use :func:`pty.openpty`."
msgstr "``master_open()``:請用 :func:`pty.openpty`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:96
+#: ../../deprecations/pending-removal-in-3.14.rst:89
msgid "``slave_open()``: use :func:`pty.openpty`."
msgstr "``slave_open()``:請用 :func:`pty.openpty`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:98
+#: ../../deprecations/pending-removal-in-3.14.rst:91
msgid ":mod:`sqlite3`:"
msgstr ":mod:`sqlite3`:"
-#: ../../deprecations/pending-removal-in-3.14.rst:100
+#: ../../deprecations/pending-removal-in-3.14.rst:93
msgid ":data:`~sqlite3.version` and :data:`~sqlite3.version_info`."
msgstr ":data:`~sqlite3.version` 和 :data:`~sqlite3.version_info`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:102
+#: ../../deprecations/pending-removal-in-3.14.rst:95
msgid ""
-":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` if :"
-"ref:`named placeholders ` are used and *parameters* is "
-"a sequence instead of a :class:`dict`."
+":meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` "
+"if :ref:`named placeholders ` are used and "
+"*parameters* is a sequence instead of a :class:`dict`."
msgstr ""
":meth:`~sqlite3.Cursor.execute` 和 :meth:`~sqlite3.Cursor.executemany`,如果"
"使用 :ref:`named placeholders ` 且 *parameters* 是序列"
"而不是 :class:`dict`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:106
-msgid ""
-"date and datetime adapter, date and timestamp converter: see the :mod:"
-"`sqlite3` documentation for suggested replacement recipes."
-msgstr ""
-"date 和 datetime 的適配器 (adapter)、date 和 timestamp 轉換器 (converter):請"
-"參閱 :mod:`sqlite3` 文件以獲得建議的替代方案。"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:109
-msgid ""
-":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was "
-"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, "
-"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed "
-"in 3.14. (Contributed by Nikita Sobolev in :gh:`101866`.)"
-msgstr ""
-":class:`types.CodeType`:自 3.10 起,存取 :attr:`~codeobject.co_lnotab` 已"
-"在 :pep:`626` 中被棄用,並計劃在 3.12 中移除,但只在 3.12 中於適當時發出 :"
-"exc:`DeprecationWarning`。可能在 3.14 中移除。(由 Nikita Sobolev 於 :gh:"
-"`101866` 貢獻。)"
-
-#: ../../deprecations/pending-removal-in-3.14.rst:116
+#: ../../deprecations/pending-removal-in-3.14.rst:99
msgid ""
":mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9, now "
"causes a :exc:`DeprecationWarning` to be emitted when it is used."
@@ -275,11 +244,11 @@ msgstr ""
":mod:`typing`:自 Python 3.9 起已被棄用的 :class:`~typing.ByteString` 現在在"
"使用時會發出 :exc:`DeprecationWarning`。"
-#: ../../deprecations/pending-removal-in-3.14.rst:119
+#: ../../deprecations/pending-removal-in-3.14.rst:102
msgid ""
":mod:`urllib`: :class:`!urllib.parse.Quoter` is deprecated: it was not "
-"intended to be a public API. (Contributed by Gregory P. Smith in :gh:"
-"`88168`.)"
+"intended to be a public API. (Contributed by Gregory P. Smith "
+"in :gh:`88168`.)"
msgstr ""
":mod:`urllib`::class:`!urllib.parse.Quoter` 已被棄用:它並非預期的公開 API。"
"(由 Gregory P. Smith 於 :gh:`88168` 貢獻。)"
diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po
index 1fc15168f5..345db845e3 100644
--- a/deprecations/pending-removal-in-3.15.po
+++ b/deprecations/pending-removal-in-3.15.po
@@ -1,15 +1,15 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-10-15 00:14+0000\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -79,10 +79,18 @@ msgstr ""
"cgi` 旗標已被棄用。"
#: ../../deprecations/pending-removal-in-3.15.rst:32
+msgid ":mod:`importlib`:"
+msgstr ":mod:`importlib`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:34
+msgid "``load_module()`` method: use ``exec_module()`` instead."
+msgstr "``load_module()`` method:請改用 ``exec_module()``。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:36
msgid ":class:`locale`:"
msgstr ":class:`locale`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:34
+#: ../../deprecations/pending-removal-in-3.15.rst:38
msgid ""
"The :func:`~locale.getdefaultlocale` function has been deprecated since "
"Python 3.11. Its removal was originally planned for Python 3.13 (:gh:"
@@ -95,11 +103,11 @@ msgstr ""
"`~locale.getlocale`、:func:`~locale.setlocale` 和 :func:`~locale."
"getencoding`。 (由 Hugo van Kemenade 於 :gh:`111187` 貢獻。)"
-#: ../../deprecations/pending-removal-in-3.15.rst:42
+#: ../../deprecations/pending-removal-in-3.15.rst:46
msgid ":mod:`pathlib`:"
msgstr ":mod:`pathlib`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:44
+#: ../../deprecations/pending-removal-in-3.15.rst:48
msgid ""
":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :"
"func:`os.path.isreserved` to detect reserved paths on Windows."
@@ -107,11 +115,11 @@ msgstr ""
":meth:`.PurePath.is_reserved` 已自 Python 3.13 被棄用。請用 :func:`os.path."
"isreserved` 來偵測 Windows 上的保留路徑。"
-#: ../../deprecations/pending-removal-in-3.15.rst:48
+#: ../../deprecations/pending-removal-in-3.15.rst:52
msgid ":mod:`platform`:"
msgstr ":mod:`platform`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:50
+#: ../../deprecations/pending-removal-in-3.15.rst:54
msgid ""
":func:`~platform.java_ver` has been deprecated since Python 3.13. This "
"function is only useful for Jython support, has a confusing API, and is "
@@ -120,11 +128,23 @@ msgstr ""
"自 Python 3.13 起,:func:`~platform.java_ver` 已被棄用。此函式僅對 Jython 支"
"援有用,具有令人困惑的 API,基本上未經測試。"
-#: ../../deprecations/pending-removal-in-3.15.rst:54
+#: ../../deprecations/pending-removal-in-3.15.rst:58
+msgid ":mod:`sysconfig`:"
+msgstr ":mod:`sysconfig`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:60
+msgid ""
+"The *check_home* argument of :func:`sysconfig.is_python_build` has been "
+"deprecated since Python 3.12."
+msgstr ""
+":func:`sysconfig.is_python_build` 的 *check_home* 引數自 Python 3.12 起已被棄"
+"用。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:63
msgid ":mod:`threading`:"
msgstr ":mod:`threading`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:56
+#: ../../deprecations/pending-removal-in-3.15.rst:65
msgid ""
":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any "
"arguments has been deprecated since Python 3.14, as the Python version does "
@@ -135,11 +155,27 @@ msgstr ""
"起,傳遞任何引數的用法已被棄用,因為 Python 版本不允許任何引數,但 C 版本允許"
"任意數量的位置或關鍵字引數,並忽略每個引數。"
-#: ../../deprecations/pending-removal-in-3.15.rst:62
+#: ../../deprecations/pending-removal-in-3.15.rst:71
+msgid ":mod:`types`:"
+msgstr ":mod:`types`:"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:73
+msgid ""
+":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was "
+"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, "
+"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed "
+"in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)"
+msgstr ""
+":class:`types.CodeType`:自 3.10 起,存取 :attr:`~codeobject.co_lnotab` 已"
+"在 :pep:`626` 中被棄用,並計劃在 3.12 中移除,但只在 3.12 中於適當時發出 :"
+"exc:`DeprecationWarning`。可能在 3.15 中移除。(由 Nikita Sobolev 於 :gh:"
+"`101866` 貢獻。)"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:80
msgid ":mod:`typing`:"
msgstr ":mod:`typing`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:64
+#: ../../deprecations/pending-removal-in-3.15.rst:82
msgid ""
"The undocumented keyword argument syntax for creating :class:`~typing."
"NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, y=int)``) "
@@ -150,7 +186,21 @@ msgstr ""
"(``Point = NamedTuple(\"Point\", x=int, y=int)``) 已自 Python 3.13 棄用。請改"
"用基於類別的語法或函式語法 (functional syntax)。"
-#: ../../deprecations/pending-removal-in-3.15.rst:70
+#: ../../deprecations/pending-removal-in-3.15.rst:88
+msgid ""
+"When using the functional syntax of :class:`~typing.TypedDict`\\s, failing "
+"to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or "
+"passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated "
+"since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = "
+"TypedDict(\"TD\", {})`` to create a TypedDict with zero field."
+msgstr ""
+"當使用 :class:`~typing.TypedDict` 的函式語法時,未傳遞值給 *fields* "
+"參數 (``TD = TypedDict(\"TD\")``) 或傳遞 ``None`` (``TD = "
+"TypedDict(\"TD\", None)``) 的做法自 Python 3.13 起已被棄用。請"
+"使用 ``class TD(TypedDict): pass`` 或 ``TD = "
+"TypedDict(\"TD\", {})`` 來建立具有零個欄位的 TypedDict。"
+
+#: ../../deprecations/pending-removal-in-3.15.rst:95
msgid ""
"The :func:`typing.no_type_check_decorator` decorator function has been "
"deprecated since Python 3.13. After eight years in the :mod:`typing` module, "
@@ -160,11 +210,11 @@ msgstr ""
"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支"
"援。"
-#: ../../deprecations/pending-removal-in-3.15.rst:75
+#: ../../deprecations/pending-removal-in-3.15.rst:100
msgid ":mod:`wave`:"
msgstr ":mod:`wave`:"
-#: ../../deprecations/pending-removal-in-3.15.rst:77
+#: ../../deprecations/pending-removal-in-3.15.rst:102
msgid ""
"The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave."
"Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:"
diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po
index 80e023abb0..168f04617f 100644
--- a/deprecations/pending-removal-in-3.16.po
+++ b/deprecations/pending-removal-in-3.16.po
@@ -1,46 +1,44 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-24 07:20+0000\n"
+"POT-Creation-Date: 2024-11-10 17:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../deprecations/pending-removal-in-3.16.rst:2
-msgid "Pending Removal in Python 3.16"
+msgid "Pending removal in Python 3.16"
msgstr "Python 3.16 中待移除的項目"
#: ../../deprecations/pending-removal-in-3.16.rst:4
-msgid ":mod:`builtins`:"
-msgstr ":mod:`builtins`:"
+msgid "The import system:"
+msgstr "引入系統 (import system):"
#: ../../deprecations/pending-removal-in-3.16.rst:6
msgid ""
-"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been "
-"deprecated since Python 3.12, as it produces surprising and unintuitive "
-"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation "
-"of a Boolean. In the rare case that you need the bitwise inversion of the "
-"underlying integer, convert to ``int`` explicitly (``~int(x)``)."
+"Setting :attr:`~module.__loader__` on a module while failing to "
+"set :attr:`__spec__.loader ` is "
+"deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or "
+"taken into consideration by the import system or the standard library."
msgstr ""
-"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為"
-"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的"
-"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 "
-"``~int(x)`` (``~int(x)``)。"
+"在模組上設定 :attr:`~module.__loader__` 而沒有設定 :attr:`__spec__.loader "
+"` 的做法將於 Python 3.16 被棄用。在 "
+"Python 3.16 中,引入系統或標準函式庫將不再設定或考慮 :attr:`!__loader__`。"
-#: ../../deprecations/pending-removal-in-3.16.rst:13
+#: ../../deprecations/pending-removal-in-3.16.rst:11
msgid ":mod:`array`:"
msgstr ":mod:`array`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:15
+#: ../../deprecations/pending-removal-in-3.16.rst:13
msgid ""
"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in "
"documentation since Python 3.3 and at runtime since Python 3.13. Use the "
@@ -50,11 +48,42 @@ msgstr ""
"Python 3.13 起在 runtime 已被棄用。請使用 ``'w'`` 格式碼 (:c:type:`Py_UCS4`) "
"來取代 Unicode 字元。"
+#: ../../deprecations/pending-removal-in-3.16.rst:19
+msgid ":mod:`asyncio`:"
+msgstr ":mod:`asyncio`:"
+
#: ../../deprecations/pending-removal-in-3.16.rst:21
+msgid ""
+":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in "
+"Python 3.16, use :func:`inspect.iscoroutinefunction` instead. (Contributed "
+"by Jiahao Li and Kumar Aditya in :gh:`122875`.)"
+msgstr ""
+":func:`!asyncio.iscoroutinefunction` 已被棄用並將在 Python 3.16 中移除,請改"
+"用 :func:`inspect.iscoroutinefunction`。(由 Jiahao Li 和 Kumar Aditya "
+"於 :gh:`122875` 貢獻。)"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:26
+msgid ":mod:`builtins`:"
+msgstr ":mod:`builtins`:"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:28
+msgid ""
+"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been "
+"deprecated since Python 3.12, as it produces surprising and unintuitive "
+"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation "
+"of a Boolean. In the rare case that you need the bitwise inversion of the "
+"underlying integer, convert to ``int`` explicitly (``~int(x)``)."
+msgstr ""
+"自 Python 3.12 起,布林型別的位元反轉 ``~True`` 或 ``~False`` 已被棄用,因為"
+"它會產生不預期且不直觀的結果(``-2`` 和 ``-1``)。使用 ``not x`` 代替布林值的"
+"邏輯否定。在極少數情況下,你需要對底層的整數進行位元反轉,請明確轉換為 "
+"``~int(x)`` (``~int(x)``)。"
+
+#: ../../deprecations/pending-removal-in-3.16.rst:35
msgid ":mod:`shutil`:"
msgstr ":mod:`shutil`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:23
+#: ../../deprecations/pending-removal-in-3.16.rst:37
msgid ""
"The :class:`!ExecError` exception has been deprecated since Python 3.14. It "
"has not been used by any function in :mod:`!shutil` since Python 3.4, and is "
@@ -63,11 +92,11 @@ msgstr ""
"自 Python 3.14 起,:class:`!ExecError` 例外已被棄用。自 Python 3.4 以來,它尚"
"未被 :mod:`!shutil` 中的任何函式使用,現在是 :exc:`RuntimeError` 的別名。"
-#: ../../deprecations/pending-removal-in-3.16.rst:28
+#: ../../deprecations/pending-removal-in-3.16.rst:42
msgid ":mod:`symtable`:"
msgstr ":mod:`symtable`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:30
+#: ../../deprecations/pending-removal-in-3.16.rst:44
msgid ""
"The :meth:`Class.get_methods ` method has been "
"deprecated since Python 3.14."
@@ -75,11 +104,11 @@ msgstr ""
"自 Python 3.14 起,:meth:`Class.get_methods ` 方"
"法已被棄用。"
-#: ../../deprecations/pending-removal-in-3.16.rst:33
+#: ../../deprecations/pending-removal-in-3.16.rst:47
msgid ":mod:`sys`:"
msgstr ":mod:`sys`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:35
+#: ../../deprecations/pending-removal-in-3.16.rst:49
msgid ""
"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated "
"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` "
@@ -88,11 +117,11 @@ msgstr ""
"自 Python 3.13 起,:func:`~sys._enablelegacywindowsfsencoding` 函式已被棄用。"
"請改用 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` 環境變數。"
-#: ../../deprecations/pending-removal-in-3.16.rst:39
+#: ../../deprecations/pending-removal-in-3.16.rst:53
msgid ":mod:`tarfile`:"
msgstr ":mod:`tarfile`:"
-#: ../../deprecations/pending-removal-in-3.16.rst:41
+#: ../../deprecations/pending-removal-in-3.16.rst:55
msgid ""
"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been "
"deprecated since Python 3.13."
diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po
index 80f5e1023a..230bd84669 100644
--- a/deprecations/pending-removal-in-future.po
+++ b/deprecations/pending-removal-in-future.po
@@ -1,15 +1,16 @@
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
-# FIRST AUTHOR , YEAR.
+# FIRST AUTHOR , YEAR
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-04-30 00:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
+"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
+"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -32,18 +33,14 @@ msgid ""
msgstr ":mod:`argparse`:已棄用巢狀引數群組和巢狀互斥群組。"
#: ../../deprecations/pending-removal-in-future.rst:10
-msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)"
-msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)"
-
-#: ../../deprecations/pending-removal-in-future.rst:12
msgid ":mod:`builtins`:"
msgstr ":mod:`builtins`:"
-#: ../../deprecations/pending-removal-in-future.rst:14
+#: ../../deprecations/pending-removal-in-future.rst:12
msgid "``bool(NotImplemented)``."
msgstr "``bool(NotImplemented)``。"
-#: ../../deprecations/pending-removal-in-future.rst:15
+#: ../../deprecations/pending-removal-in-future.rst:13
msgid ""
"Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature "
"is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single "
@@ -52,7 +49,7 @@ msgstr ""
"產生器:``throw(type, exc, tb)`` 和 ``athrow(type, exc, tb)`` 簽名已被棄用:"
"請改用 ``throw(exc)`` 和 ``athrow(exc)``,為單引數簽名。"
-#: ../../deprecations/pending-removal-in-future.rst:18
+#: ../../deprecations/pending-removal-in-future.rst:16
msgid ""
"Currently Python accepts numeric literals immediately followed by keywords, "
"for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and "
@@ -70,7 +67,7 @@ msgstr ""
"`in`、:keyword:`is` 和 :keyword:`or` 之一的關鍵字,則會引發語法警告。在未來版"
"本中,它將被更改為語法錯誤。(:gh:`87999`)"
-#: ../../deprecations/pending-removal-in-future.rst:26
+#: ../../deprecations/pending-removal-in-future.rst:24
msgid ""
"Support for ``__index__()`` and ``__int__()`` method returning non-int type: "
"these methods will be required to return an instance of a strict subclass "
@@ -79,7 +76,7 @@ msgstr ""
"``__index__()`` 和 ``__int__()`` 方法回傳非 int 型別的支援:這些方法將需要回"
"傳 :class:`int` 的嚴格子類別實例。"
-#: ../../deprecations/pending-removal-in-future.rst:29
+#: ../../deprecations/pending-removal-in-future.rst:27
msgid ""
"Support for ``__float__()`` method returning a strict subclass of :class:"
"`float`: these methods will be required to return an instance of :class:"
@@ -88,7 +85,7 @@ msgstr ""
"回傳 :class:`float` 嚴格子類別 ``__float__()`` 方法的支援:這些方法將需要回"
"傳 :class:`float` 的實例。"
-#: ../../deprecations/pending-removal-in-future.rst:32
+#: ../../deprecations/pending-removal-in-future.rst:30
msgid ""
"Support for ``__complex__()`` method returning a strict subclass of :class:"
"`complex`: these methods will be required to return an instance of :class:"
@@ -97,11 +94,11 @@ msgstr ""
"回傳 :class:`complex` 嚴格子類別 ``__complex__()`` 方法的支援:這些方法將需要"
"回傳 :class:`complex` 的實例。"
-#: ../../deprecations/pending-removal-in-future.rst:35
+#: ../../deprecations/pending-removal-in-future.rst:33
msgid "Delegation of ``int()`` to ``__trunc__()`` method."
msgstr "將 ``int()`` 委派給 ``__trunc__()`` 方法。"
-#: ../../deprecations/pending-removal-in-future.rst:36
+#: ../../deprecations/pending-removal-in-future.rst:34
msgid ""
"Passing a complex number as the *real* or *imag* argument in the :func:"
"`complex` constructor is now deprecated; it should only be passed as a "
@@ -111,7 +108,7 @@ msgstr ""
"在 :func:`complex` 建構子中將複數作為 *real* 或 *imag* 引數傳遞現在已被棄用;"
"它應該只作為單個位置引數傳遞。 (由 Serhiy Storchaka 於 :gh:`109218` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:41
+#: ../../deprecations/pending-removal-in-future.rst:39
msgid ""
":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants "
"are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar."
@@ -121,18 +118,18 @@ msgstr ""
"被 :data:`calendar.JANUARY` 和 :data:`calendar.FEBRUARY` 取代。 (由 Prince "
"Roshan 於 :gh:`103636` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:46
+#: ../../deprecations/pending-removal-in-future.rst:44
msgid ""
":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method "
"instead."
msgstr ""
":attr:`codeobject.co_lnotab`:請改用 :meth:`codeobject.co_lines` 方法。"
-#: ../../deprecations/pending-removal-in-future.rst:49
+#: ../../deprecations/pending-removal-in-future.rst:47
msgid ":mod:`datetime`:"
msgstr ":mod:`datetime`:"
-#: ../../deprecations/pending-removal-in-future.rst:51
+#: ../../deprecations/pending-removal-in-future.rst:49
msgid ""
":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime."
"UTC)``."
@@ -140,7 +137,7 @@ msgstr ""
":meth:`~datetime.datetime.utcnow`:請改用 ``datetime.datetime."
"now(tz=datetime.UTC)``。"
-#: ../../deprecations/pending-removal-in-future.rst:53
+#: ../../deprecations/pending-removal-in-future.rst:51
msgid ""
":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime."
"fromtimestamp(timestamp, tz=datetime.UTC)``."
@@ -148,19 +145,15 @@ msgstr ""
":meth:`~datetime.datetime.utcfromtimestamp`:請改用 ``datetime.datetime."
"fromtimestamp(timestamp, tz=datetime.UTC)``。"
-#: ../../deprecations/pending-removal-in-future.rst:56
+#: ../../deprecations/pending-removal-in-future.rst:54
msgid ":mod:`gettext`: Plural value must be an integer."
msgstr ":mod:`gettext`:複數值必須是整數。"
-#: ../../deprecations/pending-removal-in-future.rst:58
+#: ../../deprecations/pending-removal-in-future.rst:56
msgid ":mod:`importlib`:"
msgstr ":mod:`importlib`:"
-#: ../../deprecations/pending-removal-in-future.rst:60
-msgid "``load_module()`` method: use ``exec_module()`` instead."
-msgstr "``load_module()`` method:請改用 ``exec_module()``。"
-
-#: ../../deprecations/pending-removal-in-future.rst:61
+#: ../../deprecations/pending-removal-in-future.rst:58
msgid ""
":func:`~importlib.util.cache_from_source` *debug_override* parameter is "
"deprecated: use the *optimization* parameter instead."
@@ -168,19 +161,19 @@ msgstr ""
":func:`~importlib.util.cache_from_source` *debug_override* 參數已被棄用:請改"
"用 *optimization* 參數。"
-#: ../../deprecations/pending-removal-in-future.rst:64
+#: ../../deprecations/pending-removal-in-future.rst:61
msgid ":mod:`importlib.metadata`:"
msgstr ":mod:`importlib.metadata`:"
-#: ../../deprecations/pending-removal-in-future.rst:66
+#: ../../deprecations/pending-removal-in-future.rst:63
msgid "``EntryPoints`` tuple interface."
msgstr "``EntryPoints`` 元組介面。"
-#: ../../deprecations/pending-removal-in-future.rst:67
+#: ../../deprecations/pending-removal-in-future.rst:64
msgid "Implicit ``None`` on return values."
msgstr "回傳值上的隱式 ``None``。"
-#: ../../deprecations/pending-removal-in-future.rst:69
+#: ../../deprecations/pending-removal-in-future.rst:66
msgid ""
":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, "
"use :meth:`~logging.warning` instead."
@@ -188,19 +181,19 @@ msgstr ""
":mod:`logging`:自 Python 3.3 起,``warn()`` 方法已被棄用,請改用 :meth:"
"`~logging.warning`。"
-#: ../../deprecations/pending-removal-in-future.rst:72
+#: ../../deprecations/pending-removal-in-future.rst:69
msgid ""
":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use "
"BytesIO and binary mode instead."
msgstr ""
":mod:`mailbox`:已棄用 StringIO 輸入和文本模式,請改用 BytesIO 和二進位模式。"
-#: ../../deprecations/pending-removal-in-future.rst:75
+#: ../../deprecations/pending-removal-in-future.rst:72
msgid ""
":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process."
msgstr ":mod:`os`:在多執行緒行程中呼叫 :func:`os.register_at_fork`。"
-#: ../../deprecations/pending-removal-in-future.rst:77
+#: ../../deprecations/pending-removal-in-future.rst:74
msgid ""
":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is "
"deprecated, use an exception instance."
@@ -208,7 +201,7 @@ msgstr ""
":class:`!pydoc.ErrorDuringImport`:*exc_info* 參數的元組值已被棄用,請用例外"
"實例。"
-#: ../../deprecations/pending-removal-in-future.rst:80
+#: ../../deprecations/pending-removal-in-future.rst:77
msgid ""
":mod:`re`: More strict rules are now applied for numerical group references "
"and group names in regular expressions. Only sequence of ASCII digits is "
@@ -220,12 +213,12 @@ msgstr ""
"有 ASCII 數碼序列被接受作為數值參照。位元組模式和替換字串中的群組名稱現在只能"
"包含 ASCII 字母、數碼和底線。(由 Serhiy Storchaka 於 :gh:`91760` 貢獻。)"
-#: ../../deprecations/pending-removal-in-future.rst:87
+#: ../../deprecations/pending-removal-in-future.rst:84
msgid ""
":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules."
msgstr ":mod:`!sre_compile`、:mod:`!sre_constants` 和 :mod:`!sre_parse` 模組。"
-#: ../../deprecations/pending-removal-in-future.rst:89
+#: ../../deprecations/pending-removal-in-future.rst:86
msgid ""
":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in "
"Python 3.12; use the *onexc* parameter instead."
@@ -233,15 +226,15 @@ msgstr ""
":mod:`shutil`::func:`~shutil.rmtree` 的 *onerror* 參數在 Python 3.12 中已被"
"棄用;請改用 *onexc* 參數。"
-#: ../../deprecations/pending-removal-in-future.rst:92
+#: ../../deprecations/pending-removal-in-future.rst:89
msgid ":mod:`ssl` options and protocols:"
msgstr ":mod:`ssl` 選項和協定:"
-#: ../../deprecations/pending-removal-in-future.rst:94
+#: ../../deprecations/pending-removal-in-future.rst:91
msgid ":class:`ssl.SSLContext` without protocol argument is deprecated."
msgstr "不帶協定引數的 :class:`ssl.SSLContext` 已被棄用。"
-#: ../../deprecations/pending-removal-in-future.rst:95
+#: ../../deprecations/pending-removal-in-future.rst:92
msgid ""
":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:"
"`!selected_npn_protocol` are deprecated: use ALPN instead."
@@ -249,58 +242,51 @@ msgstr ""
":class:`ssl.SSLContext`::meth:`~ssl.SSLContext.set_npn_protocols` 和 :meth:"
"`!selected_npn_protocol` 已被棄用:請改用 ALPN。"
-#: ../../deprecations/pending-removal-in-future.rst:98
+#: ../../deprecations/pending-removal-in-future.rst:95
msgid "``ssl.OP_NO_SSL*`` options"
msgstr "``ssl.OP_NO_SSL*`` 選項"
-#: ../../deprecations/pending-removal-in-future.rst:99
+#: ../../deprecations/pending-removal-in-future.rst:96
msgid "``ssl.OP_NO_TLS*`` options"
msgstr "``ssl.OP_NO_TLS*`` 選項"
-#: ../../deprecations/pending-removal-in-future.rst:100
+#: ../../deprecations/pending-removal-in-future.rst:97
msgid "``ssl.PROTOCOL_SSLv3``"
msgstr "``ssl.PROTOCOL_SSLv3``"
-#: ../../deprecations/pending-removal-in-future.rst:101
+#: ../../deprecations/pending-removal-in-future.rst:98
msgid "``ssl.PROTOCOL_TLS``"
msgstr "``ssl.PROTOCOL_TLS``"
-#: ../../deprecations/pending-removal-in-future.rst:102
+#: ../../deprecations/pending-removal-in-future.rst:99
msgid "``ssl.PROTOCOL_TLSv1``"
msgstr "``ssl.PROTOCOL_TLSv1``"
-#: ../../deprecations/pending-removal-in-future.rst:103
+#: ../../deprecations/pending-removal-in-future.rst:100
msgid "``ssl.PROTOCOL_TLSv1_1``"
msgstr "``ssl.PROTOCOL_TLSv1_1``"
-#: ../../deprecations/pending-removal-in-future.rst:104
+#: ../../deprecations/pending-removal-in-future.rst:101
msgid "``ssl.PROTOCOL_TLSv1_2``"
msgstr "``ssl.PROTOCOL_TLSv1_2``"
-#: ../../deprecations/pending-removal-in-future.rst:105
+#: ../../deprecations/pending-removal-in-future.rst:102
msgid "``ssl.TLSVersion.SSLv3``"
msgstr "``ssl.TLSVersion.SSLv3``"
-#: ../../deprecations/pending-removal-in-future.rst:106
+#: ../../deprecations/pending-removal-in-future.rst:103
msgid "``ssl.TLSVersion.TLSv1``"
msgstr "``ssl.TLSVersion.TLSv1``"
-#: ../../deprecations/pending-removal-in-future.rst:107
+#: ../../deprecations/pending-removal-in-future.rst:104
msgid "``ssl.TLSVersion.TLSv1_1``"
msgstr "``ssl.TLSVersion.TLSv1_1``"
-#: ../../deprecations/pending-removal-in-future.rst:109
-msgid ""
-":func:`sysconfig.is_python_build` *check_home* parameter is deprecated and "
-"ignored."
-msgstr ""
-":func:`sysconfig.is_python_build` 的 *check_home* 參數已被棄用並被忽略。"
-
-#: ../../deprecations/pending-removal-in-future.rst:112
+#: ../../deprecations/pending-removal-in-future.rst:106
msgid ":mod:`threading` methods:"
msgstr ":mod:`threading` 方法:"
-#: ../../deprecations/pending-removal-in-future.rst:114
+#: ../../deprecations/pending-removal-in-future.rst:108
msgid ""
":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition."
"notify_all`."
@@ -308,11 +294,11 @@ msgstr ""
":meth:`!threading.Condition.notifyAll`:請用 :meth:`~threading.Condition."
"notify_all`。"
-#: ../../deprecations/pending-removal-in-future.rst:115
+#: ../../deprecations/pending-removal-in-future.rst:109
msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`."
msgstr ":meth:`!threading.Event.isSet`:請用 :meth:`~threading.Event.is_set`。"
-#: ../../deprecations/pending-removal-in-future.rst:116
+#: ../../deprecations/pending-removal-in-future.rst:110
msgid ""
":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :"
"attr:`threading.Thread.daemon` attribute."
@@ -320,7 +306,7 @@ msgstr ""
":meth:`!threading.Thread.isDaemon`、:meth:`threading.Thread.setDaemon`:請"
"用 :attr:`threading.Thread.daemon` 屬性。"
-#: ../../deprecations/pending-removal-in-future.rst:118
+#: ../../deprecations/pending-removal-in-future.rst:112
msgid ""
":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :"
"attr:`threading.Thread.name` attribute."
@@ -328,20 +314,20 @@ msgstr ""
":meth:`!threading.Thread.getName`、:meth:`threading.Thread.setName`:請用 :"
"attr:`threading.Thread.name` 屬性。"
-#: ../../deprecations/pending-removal-in-future.rst:120
+#: ../../deprecations/pending-removal-in-future.rst:114
msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`."
msgstr ""
":meth:`!threading.currentThread`:請用 :meth:`threading.current_thread`。"
-#: ../../deprecations/pending-removal-in-future.rst:121
+#: ../../deprecations/pending-removal-in-future.rst:115
msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`."
msgstr ":meth:`!threading.activeCount`:請用 :meth:`threading.active_count`。"
-#: ../../deprecations/pending-removal-in-future.rst:123
+#: ../../deprecations/pending-removal-in-future.rst:117
msgid ":class:`typing.Text` (:gh:`92332`)."
msgstr ":class:`typing.Text` (:gh:`92332`)。"
-#: ../../deprecations/pending-removal-in-future.rst:125
+#: ../../deprecations/pending-removal-in-future.rst:119
msgid ""
":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a "
"value that is not ``None`` from a test case."
@@ -349,58 +335,58 @@ msgstr ""
":class:`unittest.IsolatedAsyncioTestCase`:從測試案例中回傳非 ``None`` 的值已"
"被棄用。"
-#: ../../deprecations/pending-removal-in-future.rst:128
+#: ../../deprecations/pending-removal-in-future.rst:122
msgid ""
":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` "
"instead"
msgstr ""
":mod:`urllib.parse` 已棄用函式:請改用 :func:`~urllib.parse.urlparse`。"
-#: ../../deprecations/pending-removal-in-future.rst:130
+#: ../../deprecations/pending-removal-in-future.rst:124
msgid "``splitattr()``"
msgstr "``splitattr()``"
-#: ../../deprecations/pending-removal-in-future.rst:131
+#: ../../deprecations/pending-removal-in-future.rst:125
msgid "``splithost()``"
msgstr "``splithost()``"
-#: ../../deprecations/pending-removal-in-future.rst:132
+#: ../../deprecations/pending-removal-in-future.rst:126
msgid "``splitnport()``"
msgstr "``splitnport()``"
-#: ../../deprecations/pending-removal-in-future.rst:133
+#: ../../deprecations/pending-removal-in-future.rst:127
msgid "``splitpasswd()``"
msgstr "``splitpasswd()``"
-#: ../../deprecations/pending-removal-in-future.rst:134
+#: ../../deprecations/pending-removal-in-future.rst:128
msgid "``splitport()``"
msgstr "``splitport()``"
-#: ../../deprecations/pending-removal-in-future.rst:135
+#: ../../deprecations/pending-removal-in-future.rst:129
msgid "``splitquery()``"
msgstr "``splitquery()``"
-#: ../../deprecations/pending-removal-in-future.rst:136
+#: ../../deprecations/pending-removal-in-future.rst:130
msgid "``splittag()``"
msgstr "``splittag()``"
-#: ../../deprecations/pending-removal-in-future.rst:137
+#: ../../deprecations/pending-removal-in-future.rst:131
msgid "``splittype()``"
msgstr "``splittype()``"
-#: ../../deprecations/pending-removal-in-future.rst:138
+#: ../../deprecations/pending-removal-in-future.rst:132
msgid "``splituser()``"
msgstr "``splituser()``"
-#: ../../deprecations/pending-removal-in-future.rst:139
+#: ../../deprecations/pending-removal-in-future.rst:133
msgid "``splitvalue()``"
msgstr "``splitvalue()``"
-#: ../../deprecations/pending-removal-in-future.rst:140
+#: ../../deprecations/pending-removal-in-future.rst:134
msgid "``to_bytes()``"
msgstr "``to_bytes()``"
-#: ../../deprecations/pending-removal-in-future.rst:142
+#: ../../deprecations/pending-removal-in-future.rst:136
msgid ""
":mod:`urllib.request`: :class:`~urllib.request.URLopener` and :class:"
"`~urllib.request.FancyURLopener` style of invoking requests is deprecated. "
@@ -410,13 +396,13 @@ msgstr ""
"class:`~urllib.request.FancyURLopener` 風格已被棄用。請改用更新的 :func:"
"`~urllib.request.urlopen` 函式和方法。"
-#: ../../deprecations/pending-removal-in-future.rst:146
+#: ../../deprecations/pending-removal-in-future.rst:140
msgid ""
":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial "
"writes."
msgstr ":mod:`wsgiref`:``SimpleHandler.stdout.write()`` 不應該進行部分寫入。"
-#: ../../deprecations/pending-removal-in-future.rst:149
+#: ../../deprecations/pending-removal-in-future.rst:143
msgid ""
":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml."
"etree.ElementTree.Element` is deprecated. In a future release it will always "
@@ -427,10 +413,13 @@ msgstr ""
"Element` 的真值測試。在未來版本中,它將始終回傳 ``True``。請改用明確的 "
"``len(elem)`` 或 ``elem is not None`` 測試。"
-#: ../../deprecations/pending-removal-in-future.rst:154
+#: ../../deprecations/pending-removal-in-future.rst:148
msgid ""
":meth:`zipimport.zipimporter.load_module` is deprecated: use :meth:"
"`~zipimport.zipimporter.exec_module` instead."
msgstr ""
":meth:`zipimport.zipimporter.load_module` 已被棄用:請改用 :meth:`~zipimport."
"zipimporter.exec_module`。"
+
+#~ msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)"
+#~ msgstr ":mod:`array` 的 ``'u'`` 格式碼 (:gh:`57281`)"
diff --git a/extending/building.po b/extending/building.po
index 1e0c34fe84..9285c3baea 100644
--- a/extending/building.po
+++ b/extending/building.po
@@ -1,15 +1,16 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-2022, Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
+# Adrian Liaw , 2018
+# Matt Wang , 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-01 22:24+0800\n"
-"PO-Revision-Date: 2018-05-23 14:09+0000\n"
-"Last-Translator: Adrian Liaw \n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
+"PO-Revision-Date: 2025-02-07 14:09+0000\n"
+"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
@@ -37,26 +38,35 @@ msgid ""
"extension. When using setuptools, the correct filename is generated "
"automatically."
msgstr ""
+"要能夠被引入,共用函式庫必須在 :envvar:`PYTHONPATH` 上可用,並且必須以模組名"
+"稱命名,並且必須有適當的副檔名。使用 setuptools 時,正確的檔名會自動產生。"
#: ../../extending/building.rst:16
msgid "The initialization function has the signature:"
-msgstr ""
+msgstr "初始化函式具有簽名:"
#: ../../extending/building.rst:20
msgid ""
"It returns either a fully initialized module, or a :c:type:`PyModuleDef` "
"instance. See :ref:`initializing-modules` for details."
msgstr ""
+"它回傳一個完全初始化的模組,或一個 :c:type:`PyModuleDef` 實例。詳細資訊請參"
+"見 :ref:`initializing-modules`。"
#: ../../extending/building.rst:25
msgid ""
-"For modules with ASCII-only names, the function must be named "
-"``PyInit_``, with ```` replaced by the name of the "
-"module. When using :ref:`multi-phase-initialization`, non-ASCII module names "
-"are allowed. In this case, the initialization function name is "
-"``PyInitU_``, with ```` encoded using Python's "
-"*punycode* encoding with hyphens replaced by underscores. In Python::"
+"For modules with ASCII-only names, the function must be named :samp:"
+"`PyInit_{}`, with ```` replaced by the name of the module. When "
+"using :ref:`multi-phase-initialization`, non-ASCII module names are allowed. "
+"In this case, the initialization function name is :samp:`PyInitU_{}`, "
+"with ```` encoded using Python's *punycode* encoding with hyphens "
+"replaced by underscores. In Python::"
msgstr ""
+"對於僅包含 ASCII 名稱的模組,函式必須以 :samp:`PyInit_{}` 命名,其中 "
+"```` 要替換為模組的名稱。當使用 :ref:`multi-phase-"
+"initialization` 時,允許非 ASCII 模組名稱。在這種情況下,初始化函式名稱是 "
+":samp:`PyInitU_{}`,其中 ```` 使用 Python 的 *punycode* 編"
+"碼,並將連字符號替換為底線。在 Python 中: ::"
#: ../../extending/building.rst:32
msgid ""
@@ -82,10 +92,13 @@ msgid ""
"function corresponding to the filename is found. See the *\"Multiple modules "
"in one library\"* section in :pep:`489` for details."
msgstr ""
+"可以透過定義多個初始化函式,來從單一共用函式庫中匯出多個模組。然而要引入它們"
+"需要使用符號連結或自訂引入器,因為預設只會找到對應於檔名的函式。詳細資訊請參"
+"見 :pep:`489` 中的 *\"Multiple modules in one library\"* 部分。"
#: ../../extending/building.rst:52
msgid "Building C and C++ Extensions with setuptools"
-msgstr ""
+msgstr "用 setuptools 建置 C 與 C++ 擴充套件"
#: ../../extending/building.rst:54
msgid ""
@@ -94,3 +107,6 @@ msgid ""
"setuptools.html to learn more about how build and distribute C/C++ "
"extensions with setuptools."
msgstr ""
+"Python 3.12 與之後的版本不再帶有 distutils。請在 https://setuptools."
+"readthedocs.io/en/latest/setuptools.html 上參閱 ``setuptools`` 文件,以了解如"
+"何使用 setuptools 建置和發佈 C/C++ 擴充套件。"
diff --git a/extending/embedding.po b/extending/embedding.po
index ac486c5aef..f08b001e48 100644
--- a/extending/embedding.po
+++ b/extending/embedding.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
+"POT-Creation-Date: 2025-06-27 07:36+0000\n"
"PO-Revision-Date: 2018-05-23 14:09+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -124,6 +124,40 @@ msgid ""
" Py_ExitStatusException(status);\n"
"}"
msgstr ""
+"#define PY_SSIZE_T_CLEAN\n"
+"#include \n"
+"\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" PyStatus status;\n"
+" PyConfig config;\n"
+" PyConfig_InitPythonConfig(&config);\n"
+"\n"
+" /* 建議但非必要 */\n"
+" status = PyConfig_SetBytesString(&config, &config.program_name, "
+"argv[0]);\n"
+" if (PyStatus_Exception(status)) {\n"
+" goto exception;\n"
+" }\n"
+"\n"
+" status = Py_InitializeFromConfig(&config);\n"
+" if (PyStatus_Exception(status)) {\n"
+" goto exception;\n"
+" }\n"
+" PyConfig_Clear(&config);\n"
+"\n"
+" PyRun_SimpleString(\"from time import time,ctime\\n\"\n"
+" \"print('Today is', ctime(time()))\\n\");\n"
+" if (Py_FinalizeEx() < 0) {\n"
+" exit(120);\n"
+" }\n"
+" return 0;\n"
+"\n"
+" exception:\n"
+" PyConfig_Clear(&config);\n"
+" Py_ExitStatusException(status);\n"
+"}"
#: ../../extending/embedding.rst:92
msgid ""
@@ -356,7 +390,7 @@ msgstr ""
msgid ""
"After initializing the interpreter, the script is loaded using :c:func:"
"`PyImport_Import`. This routine needs a Python string as its argument, "
-"which is constructed using the :c:func:`PyUnicode_FromString` data "
+"which is constructed using the :c:func:`PyUnicode_DecodeFSDefault` data "
"conversion routine. ::"
msgstr ""
@@ -420,31 +454,33 @@ msgid ""
" return PyLong_FromLong(numargs);\n"
"}\n"
"\n"
-"static PyMethodDef EmbMethods[] = {\n"
+"static PyMethodDef emb_module_methods[] = {\n"
" {\"numargs\", emb_numargs, METH_VARARGS,\n"
" \"Return the number of arguments received by the process.\"},\n"
" {NULL, NULL, 0, NULL}\n"
"};\n"
"\n"
-"static PyModuleDef EmbModule = {\n"
-" PyModuleDef_HEAD_INIT, \"emb\", NULL, -1, EmbMethods,\n"
-" NULL, NULL, NULL, NULL\n"
+"static struct PyModuleDef emb_module = {\n"
+" .m_base = PyModuleDef_HEAD_INIT,\n"
+" .m_name = \"emb\",\n"
+" .m_size = 0,\n"
+" .m_methods = emb_module_methods,\n"
"};\n"
"\n"
"static PyObject*\n"
"PyInit_emb(void)\n"
"{\n"
-" return PyModule_Create(&EmbModule);\n"
+" return PyModuleDef_Init(&emb_module);\n"
"}"
msgstr ""
-#: ../../extending/embedding.rst:265
+#: ../../extending/embedding.rst:267
msgid ""
"Insert the above code just above the :c:func:`main` function. Also, insert "
"the following two statements before the call to :c:func:`Py_Initialize`::"
msgstr ""
-#: ../../extending/embedding.rst:268
+#: ../../extending/embedding.rst:270
msgid ""
"numargs = argc;\n"
"PyImport_AppendInittab(\"emb\", &PyInit_emb);"
@@ -452,30 +488,30 @@ msgstr ""
"numargs = argc;\n"
"PyImport_AppendInittab(\"emb\", &PyInit_emb);"
-#: ../../extending/embedding.rst:271
+#: ../../extending/embedding.rst:273
msgid ""
"These two lines initialize the ``numargs`` variable, and make the :func:`!"
"emb.numargs` function accessible to the embedded Python interpreter. With "
"these extensions, the Python script can do things like"
msgstr ""
-#: ../../extending/embedding.rst:275
+#: ../../extending/embedding.rst:277
msgid ""
"import emb\n"
"print(\"Number of arguments\", emb.numargs())"
msgstr ""
-#: ../../extending/embedding.rst:280
+#: ../../extending/embedding.rst:282
msgid ""
"In a real application, the methods will expose an API of the application to "
"Python."
msgstr ""
-#: ../../extending/embedding.rst:290
+#: ../../extending/embedding.rst:292
msgid "Embedding Python in C++"
msgstr ""
-#: ../../extending/embedding.rst:292
+#: ../../extending/embedding.rst:294
msgid ""
"It is also possible to embed Python in a C++ program; precisely how this is "
"done will depend on the details of the C++ system used; in general you will "
@@ -484,11 +520,11 @@ msgid ""
"+."
msgstr ""
-#: ../../extending/embedding.rst:301
+#: ../../extending/embedding.rst:303
msgid "Compiling and Linking under Unix-like systems"
msgstr ""
-#: ../../extending/embedding.rst:303
+#: ../../extending/embedding.rst:305
msgid ""
"It is not necessarily trivial to find the right flags to pass to your "
"compiler (and linker) in order to embed the Python interpreter into your "
@@ -496,7 +532,7 @@ msgid ""
"implemented as C dynamic extensions (:file:`.so` files) linked against it."
msgstr ""
-#: ../../extending/embedding.rst:309
+#: ../../extending/embedding.rst:311
msgid ""
"To find out the required compiler and linker flags, you can execute the :"
"file:`python{X.Y}-config` script which is generated as part of the "
@@ -505,13 +541,13 @@ msgid ""
"directly useful to you:"
msgstr ""
-#: ../../extending/embedding.rst:315
+#: ../../extending/embedding.rst:317
msgid ""
"``pythonX.Y-config --cflags`` will give you the recommended flags when "
"compiling:"
msgstr ""
-#: ../../extending/embedding.rst:318
+#: ../../extending/embedding.rst:320
msgid ""
"$ /opt/bin/python3.11-config --cflags\n"
"-I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG "
@@ -521,13 +557,13 @@ msgstr ""
"-I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG "
"-g -fwrapv -O3 -Wall"
-#: ../../extending/embedding.rst:323
+#: ../../extending/embedding.rst:325
msgid ""
"``pythonX.Y-config --ldflags --embed`` will give you the recommended flags "
"when linking:"
msgstr ""
-#: ../../extending/embedding.rst:326
+#: ../../extending/embedding.rst:328
msgid ""
"$ /opt/bin/python3.11-config --ldflags --embed\n"
"-L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -"
@@ -537,7 +573,7 @@ msgstr ""
"-L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -"
"lpthread -ldl -lutil -lm"
-#: ../../extending/embedding.rst:332
+#: ../../extending/embedding.rst:334
msgid ""
"To avoid confusion between several Python installations (and especially "
"between the system Python and your own compiled Python), it is recommended "
@@ -545,7 +581,7 @@ msgid ""
"above example."
msgstr ""
-#: ../../extending/embedding.rst:337
+#: ../../extending/embedding.rst:339
msgid ""
"If this procedure doesn't work for you (it is not guaranteed to work for all "
"Unix-like platforms; however, we welcome :ref:`bug reports >> import sysconfig\n"
">>> sysconfig.get_config_var('LIBS')\n"
diff --git a/extending/extending.po b/extending/extending.po
index 6ff3917736..df2ba80946 100644
--- a/extending/extending.po
+++ b/extending/extending.po
@@ -1,16 +1,17 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001-202DESCRIPTIVE TITLE., Python Software Foundation
+# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Leon H., 2017
+# Adrian Liaw , 2018
+# Matt Wang , 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-23 07:52+0800\n"
-"PO-Revision-Date: 2018-05-23 14:34+0000\n"
-"Last-Translator: Adrian Liaw