diff --git a/.github/workflows/summarize_progress.yml b/.github/workflows/summarize_progress.yml
index d0f454f759..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'
@@ -40,4 +41,4 @@ jobs:
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/.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/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/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/exceptions.po b/c-api/exceptions.po
index 177603071c..925d646e9a 100644
--- a/c-api/exceptions.po
+++ b/c-api/exceptions.po
@@ -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 ""
diff --git a/c-api/frame.po b/c-api/frame.po
index da34208fb5..1bbe0b32c7 100644
--- a/c-api/frame.po
+++ b/c-api/frame.po
@@ -42,7 +42,7 @@ msgstr ""
#: ../../c-api/frame.rst:20
msgid "See also :ref:`Reflection `."
-msgstr ""
+msgstr "另請參閱 :ref:`Reflection `。"
#: ../../c-api/frame.rst:24
msgid ""
diff --git a/c-api/init.po b/c-api/init.po
index eaedaa945b..e003fd46a4 100644
--- a/c-api/init.po
+++ b/c-api/init.po
@@ -419,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 ""
@@ -981,7 +981,7 @@ msgstr ""
#: ../../c-api/init.rst:736
msgid "See also the :c:var:`Py_Version` constant."
-msgstr ""
+msgstr "另請參閱 :c:var:`Py_Version` 常數。"
#: ../../c-api/init.rst:743
msgid ""
@@ -2453,7 +2453,7 @@ msgstr ""
#: ../../c-api/init.rst:2016
msgid "See also the :func:`sys.setprofile` function."
-msgstr ""
+msgstr "另請參閱 :func:`sys.setprofile` 函式。"
#: ../../c-api/init.rst:2018 ../../c-api/init.rst:2025
#: ../../c-api/init.rst:2044 ../../c-api/init.rst:2051
diff --git a/c-api/init_config.po b/c-api/init_config.po
index 3397a5853b..434dd0394e 100644
--- a/c-api/init_config.po
+++ b/c-api/init_config.po
@@ -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
diff --git a/c-api/intro.po b/c-api/intro.po
index 12be45bb91..4c39517d62 100644
--- a/c-api/intro.po
+++ b/c-api/intro.po
@@ -986,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` 是最常見的(儘管不是最通用的)設定例外狀態的函式,而 :"
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/sys.po b/c-api/sys.po
index 9037d85432..79a6fb3f3f 100644
--- a/c-api/sys.po
+++ b/c-api/sys.po
@@ -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 ""
diff --git a/faq/extending.po b/faq/extending.po
index 897980a1cd..1b0e3995d4 100644
--- a/faq/extending.po
+++ b/faq/extending.po
@@ -327,7 +327,6 @@ msgid "module = PyImport_ImportModule(\"\");"
msgstr "module = PyImport_ImportModule(\"\");"
#: ../../faq/extending.rst:173
-#, fuzzy
msgid ""
"If the module hasn't been imported yet (i.e. it is not yet present in :data:"
"`sys.modules`), this initializes the module; otherwise it simply returns the "
@@ -337,14 +336,13 @@ msgid ""
msgstr ""
"如果模組還沒有被引入(即它還沒有出現在 :data:`sys.modules` 中),這會初始化模"
"組;否則它只回傳 ``sys.modules[\"\"]`` 的值。請注意,它不會將模組"
-"輸入任何命名空間——它只會確保它已被初始化並存儲在 :data:`sys.modules` 中。"
+"輸入任何命名空間——它只會確保它已被初始化並儲存在 :data:`sys.modules` 中。"
#: ../../faq/extending.rst:179
-#, fuzzy
msgid ""
"You can then access the module's attributes (i.e. any name defined in the "
"module) as follows::"
-msgstr "然後,你可以存取模組的屬性(即模組中定義的任何名稱),如下所示: ::"
+msgstr "然後你可以存取模組的屬性(即模組中定義的任何名稱),如下所示: ::"
#: ../../faq/extending.rst:182
msgid "attr = PyObject_GetAttrString(module, \"\");"
diff --git a/faq/library.po b/faq/library.po
index 21409fd6a7..19395ef83a 100644
--- a/faq/library.po
+++ b/faq/library.po
@@ -744,7 +744,7 @@ msgid ""
"multi-threaded Python program effectively only uses one CPU, due to the "
"insistence that (almost) all Python code can only run while the GIL is held."
msgstr ""
-":term:`global interpreter lock` (GIL) 通常被視為 Python 在高端多處理器服務器"
+":term:`global interpreter lock` (GIL) 通常被視為 Python 在高端多處理器伺服器"
"機器上部署的障礙,因為多執行緒 Python 程式實際上只使用一個 CPU,因為堅持(幾"
"乎)所有 Python 程式碼只能在持有 GIL 的情況下運行。"
@@ -1362,70 +1362,3 @@ msgid ""
"multiple random number generators."
msgstr ""
"還有一個 ``Random`` 類別,你可以將它實例化以建立多個獨立的隨機數生成器。"
-
-#, fuzzy
-#~ msgid ""
-#~ "It has been suggested that the GIL should be a per-interpreter-state lock "
-#~ "rather than truly global; interpreters then wouldn't be able to share "
-#~ "objects. Unfortunately, this isn't likely to happen either. It would be "
-#~ "a tremendous amount of work, because many object implementations "
-#~ "currently have global state. For example, small integers and short "
-#~ "strings are cached; these caches would have to be moved to the "
-#~ "interpreter state. Other object types have their own free list; these "
-#~ "free lists would have to be moved to the interpreter state. And so on."
-#~ msgstr ""
-#~ "有人建議 GIL 應該是每個直譯器狀態鎖,而不是真正的全域鎖;口譯員將無法共享"
-#~ "物件。不幸的是,這也不太可能發生。這將是一項巨大的工作量,因為目前許多物件"
-#~ "實作都具有全域狀態。例如,快取小整數和短字串;這些快取必須移至直譯器狀態。"
-#~ "其他物件型別有自己的空閒列表;這些空閒列表必須移至直譯器狀態。等等。"
-
-#, fuzzy
-#~ msgid ""
-#~ "And I doubt that it can even be done in finite time, because the same "
-#~ "problem exists for 3rd party extensions. It is likely that 3rd party "
-#~ "extensions are being written at a faster rate than you can convert them "
-#~ "to store all their global state in the interpreter state."
-#~ msgstr ""
-#~ "而且我懷疑它甚至可以在有限的時間內完成,因為第 3 方擴充存在同樣的問題。 "
-#~ "3rd 方擴充的編寫速度可能比你轉換它們以將其所有全域狀態存儲在直譯器狀態中的"
-#~ "速度更快。"
-
-#, fuzzy
-#~ msgid ""
-#~ "Cameron Laird maintains a useful set of pages about Python web "
-#~ "technologies at https://web.archive.org/web/20210224183619/http://"
-#~ "phaseit.net/claird/comp.lang.python/web_python."
-#~ msgstr ""
-#~ "Cameron Laird 在 https://web.archive.org/web/20210224183619/http://"
-#~ "phaseit.net/claird/comp.lang.python/web_python 維護著一組有用的關於 "
-#~ "Python 網路技術的頁面。"
-
-#, fuzzy
-#~ msgid ""
-#~ "I would like to retrieve web pages that are the result of POSTing a form. "
-#~ "Is there existing code that would let me do this easily?"
-#~ msgstr ""
-#~ "我想檢索作為發布表單結果的網頁。是否有現成的程式碼可以讓我輕鬆地做到這一"
-#~ "點?"
-
-#~ msgid "Yes. Here's a simple example that uses :mod:`urllib.request`::"
-#~ msgstr "是的,這是一個 :mod:`urllib.request` 的簡單範例: ::"
-
-#, fuzzy
-#~ msgid ""
-#~ "Note that in general for percent-encoded POST operations, query strings "
-#~ "must be quoted using :func:`urllib.parse.urlencode`. For example, to "
-#~ "send ``name=Guy Steele, Jr.``::"
-#~ msgstr ""
-#~ "請注意,通常對於百分比編碼的 POST 操作,查詢字串必須使"
-#~ "用 :func:`urllib.parse.urlencode` 引用。例如,發送 ``name=Guy Steele, "
-#~ "Jr.``: ::"
-
-#~ msgid ""
-#~ ">>> import urllib.parse\n"
-#~ ">>> urllib.parse.urlencode({'name': 'Guy Steele, Jr.'})\n"
-#~ "'name=Guy+Steele%2C+Jr.'"
-#~ msgstr ""
-#~ ">>> import urllib.parse\n"
-#~ ">>> urllib.parse.urlencode({'name': 'Guy Steele, Jr.'})\n"
-#~ "'name=Guy+Steele%2C+Jr.'"
diff --git a/faq/programming.po b/faq/programming.po
index 3f46c08fa7..038134d0e9 100644
--- a/faq/programming.po
+++ b/faq/programming.po
@@ -760,7 +760,7 @@ msgstr ""
"\n"
" # Calculate the value\n"
" result = ... expensive computation ...\n"
-" _cache[(arg1, arg2)] = result # 將結果存儲在快取中\n"
+" _cache[(arg1, arg2)] = result # 將結果儲存在快取中\n"
" return result"
#: ../../faq/programming.rst:389
@@ -2057,7 +2057,6 @@ msgid ""
msgstr "以奇數個反斜線結尾的原始字串將轉義字串的引號: ::"
#: ../../faq/programming.rst:1036
-#, fuzzy
msgid ""
">>> r'C:\\this\\will\\not\\work\\'\n"
" File \"\", line 1\n"
@@ -2068,7 +2067,7 @@ msgstr ""
">>> r'C:\\this\\will\\not\\work\\'\n"
" File \"\", line 1\n"
" r'C:\\this\\will\\not\\work\\'\n"
-" ^\n"
+" ^\n"
"SyntaxError: unterminated string literal (detected at line 1)"
#: ../../faq/programming.rst:1042
@@ -3777,7 +3776,7 @@ msgid ""
"change object identity. After the list assignment ``s[0] = x``, it is "
"guaranteed that ``s[0] is x``."
msgstr ""
-"2) 將物件放入存儲物件參照的容器中不會改變物件識別性。在 list 賦值 ``s[0] = "
+"2) 將物件放入儲存物件參照的容器中不會改變物件識別性。在 list 賦值 ``s[0] = "
"x`` 之後,保證 ``s[0] 是 x``。"
#: ../../faq/programming.rst:1877
@@ -3926,7 +3925,7 @@ msgstr ""
#: ../../faq/programming.rst:1945
msgid ""
"How can a subclass control what data is stored in an immutable instance?"
-msgstr "子類別如何控制不可變實例中存儲的資料?"
+msgstr "子類別如何控制不可變實例中儲存的資料?"
#: ../../faq/programming.rst:1947
#, fuzzy
@@ -4026,7 +4025,7 @@ msgid ""
"at the instance level and the latter at the class level."
msgstr ""
"快取方法的兩個主要工具是 func:`functools.cached_property` 和 :func:"
-"`functools.lru_cache`。前者在實例級別存儲結果,後者在類別級別存儲結果。"
+"`functools.lru_cache`。前者在實例級別儲存結果,後者在類別級別儲存結果。"
#: ../../faq/programming.rst:2002
#, fuzzy
@@ -4177,7 +4176,7 @@ msgid ""
msgstr ""
"無法建立 .pyc 檔案的原因之一是包含源檔案的目錄存在權限問題,這意味著無法建立 "
"__pycache__ 子目錄。例如,如果你以一個使用者的身份開發但以另一個使用者的身份"
-"運行,例如你正在使用 Web 服務器進行測試,就會發生這種情況。"
+"運行,例如你正在使用 Web 伺服器進行測試,就會發生這種情況。"
#: ../../faq/programming.rst:2093
#, fuzzy
diff --git a/howto/enum.po b/howto/enum.po
index 924ee16d8a..92490f02e6 100644
--- a/howto/enum.po
+++ b/howto/enum.po
@@ -1515,7 +1515,7 @@ msgstr ""
#: ../../howto/enum.rst:806
msgid ":class:`IntFlag` members can also be iterated over::"
-msgstr ""
+msgstr ":class:`IntFlag` 成員也可以被疊代:"
#: ../../howto/enum.rst:808
msgid ""
@@ -1627,7 +1627,7 @@ msgstr ""
#: ../../howto/enum.rst:866
msgid ":class:`Flag` members can also be iterated over::"
-msgstr ""
+msgstr ":class:`Flag` 成員也可以被疊代:"
#: ../../howto/enum.rst:868
msgid ""
diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po
index 725f48933a..bb686c54de 100644
--- a/howto/logging-cookbook.po
+++ b/howto/logging-cookbook.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-02-21 00:13+0000\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 14:36+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -68,8 +68,8 @@ msgid ""
"ch = logging.StreamHandler()\n"
"ch.setLevel(logging.ERROR)\n"
"# create formatter and add it to the handlers\n"
-"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %"
-"(message)s')\n"
+"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - "
+"%(message)s')\n"
"fh.setFormatter(formatter)\n"
"ch.setFormatter(formatter)\n"
"# add the handlers to the logger\n"
@@ -100,8 +100,8 @@ msgid ""
"\n"
"class Auxiliary:\n"
" def __init__(self):\n"
-" self.logger = "
-"logging.getLogger('spam_application.auxiliary.Auxiliary')\n"
+" self.logger = logging.getLogger('spam_application.auxiliary."
+"Auxiliary')\n"
" self.logger.info('creating an instance of Auxiliary')\n"
"\n"
" def do_something(self):\n"
@@ -163,8 +163,8 @@ msgid ""
" time.sleep(0.5)\n"
"\n"
"def main():\n"
-" logging.basicConfig(level=logging.DEBUG, format='%(relativeCreated)6d %"
-"(threadName)s %(message)s')\n"
+" logging.basicConfig(level=logging.DEBUG, format='%(relativeCreated)6d "
+"%(threadName)s %(message)s')\n"
" info = {'stop': False}\n"
" thread = threading.Thread(target=worker, args=(info,))\n"
" thread.start()\n"
@@ -241,8 +241,8 @@ msgid ""
"ch = logging.StreamHandler()\n"
"ch.setLevel(logging.ERROR)\n"
"# create formatter and add it to the handlers\n"
-"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %"
-"(message)s')\n"
+"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - "
+"%(message)s')\n"
"ch.setFormatter(formatter)\n"
"fh.setFormatter(formatter)\n"
"# add the handlers to logger\n"
@@ -295,8 +295,8 @@ msgid ""
"\n"
"# set up logging to file - see previous section for more details\n"
"logging.basicConfig(level=logging.DEBUG,\n"
-" format='%(asctime)s %(name)-12s %(levelname)-8s %"
-"(message)s',\n"
+" format='%(asctime)s %(name)-12s %(levelname)-8s "
+"%(message)s',\n"
" datefmt='%m-%d %H:%M',\n"
" filename='/tmp/myapp.log',\n"
" filemode='w')\n"
@@ -504,9 +504,9 @@ msgid ""
"a function which only returns ``True`` if the level of the passed in record "
"is at or below the specified level. Note that in this example I have defined "
"the ``filter_maker`` in a test script ``main.py`` that I run from the "
-"command line, so its module will be ``__main__`` - hence the "
-"``__main__.filter_maker`` in the filter configuration. You will need to "
-"change that if you define it in a different module."
+"command line, so its module will be ``__main__`` - hence the ``__main__."
+"filter_maker`` in the filter configuration. You will need to change that if "
+"you define it in a different module."
msgstr ""
#: ../../howto/logging-cookbook.rst:387
@@ -713,13 +713,13 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:555
msgid ""
-"A common culprit which demonstrates sluggish behaviour is "
-"the :class:`SMTPHandler`: sending emails can take a long time, for a number "
-"of reasons outside the developer's control (for example, a poorly performing "
-"mail or network infrastructure). But almost any network-based handler can "
-"block: Even a :class:`SocketHandler` operation may do a DNS query under the "
-"hood which is too slow (and this query can be deep in the socket library "
-"code, below the Python layer, and outside your control)."
+"A common culprit which demonstrates sluggish behaviour is the :class:"
+"`SMTPHandler`: sending emails can take a long time, for a number of reasons "
+"outside the developer's control (for example, a poorly performing mail or "
+"network infrastructure). But almost any network-based handler can block: "
+"Even a :class:`SocketHandler` operation may do a DNS query under the hood "
+"which is too slow (and this query can be deep in the socket library code, "
+"below the Python layer, and outside your control)."
msgstr ""
#: ../../howto/logging-cookbook.rst:563
@@ -739,12 +739,12 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:574
msgid ""
"The second part of the solution is :class:`QueueListener`, which has been "
-"designed as the counterpart to :class:`QueueHandler`. "
-"A :class:`QueueListener` is very simple: it's passed a queue and some "
-"handlers, and it fires up an internal thread which listens to its queue for "
-"LogRecords sent from ``QueueHandlers`` (or any other source of "
-"``LogRecords``, for that matter). The ``LogRecords`` are removed from the "
-"queue and passed to the handlers for processing."
+"designed as the counterpart to :class:`QueueHandler`. A :class:"
+"`QueueListener` is very simple: it's passed a queue and some handlers, and "
+"it fires up an internal thread which listens to its queue for LogRecords "
+"sent from ``QueueHandlers`` (or any other source of ``LogRecords``, for that "
+"matter). The ``LogRecords`` are removed from the queue and passed to the "
+"handlers for processing."
msgstr ""
#: ../../howto/logging-cookbook.rst:582
@@ -792,10 +792,10 @@ msgid ""
"Although the earlier discussion wasn't specifically talking about async "
"code, but rather about slow logging handlers, it should be noted that when "
"logging from async code, network and even file handlers could lead to "
-"problems (blocking the event loop) because some logging is done "
-"from :mod:`asyncio` internals. It might be best, if any async code is used "
-"in an application, to use the above approach for logging, so that any "
-"blocking code runs only in the ``QueueListener`` thread."
+"problems (blocking the event loop) because some logging is done from :mod:"
+"`asyncio` internals. It might be best, if any async code is used in an "
+"application, to use the above approach for logging, so that any blocking "
+"code runs only in the ``QueueListener`` thread."
msgstr ""
#: ../../howto/logging-cookbook.rst:619
@@ -817,8 +817,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:634
msgid ""
"Let's say you want to send logging events across a network, and handle them "
-"at the receiving end. A simple way of doing this is attaching "
-"a :class:`SocketHandler` instance to the root logger at the sending end::"
+"at the receiving end. A simple way of doing this is attaching a :class:"
+"`SocketHandler` instance to the root logger at the sending end::"
msgstr ""
#: ../../howto/logging-cookbook.rst:638
@@ -851,8 +851,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:662
msgid ""
-"At the receiving end, you can set up a receiver using "
-"the :mod:`socketserver` module. Here is a basic working example::"
+"At the receiving end, you can set up a receiver using the :mod:"
+"`socketserver` module. Here is a basic working example::"
msgstr ""
#: ../../howto/logging-cookbook.rst:665
@@ -936,8 +936,8 @@ msgid ""
"\n"
"def main():\n"
" logging.basicConfig(\n"
-" format='%(relativeCreated)5d %(name)-15s %(levelname)-8s %"
-"(message)s')\n"
+" format='%(relativeCreated)5d %(name)-15s %(levelname)-8s "
+"%(message)s')\n"
" tcpserver = LogRecordSocketReceiver()\n"
" print('About to start TCP server...')\n"
" tcpserver.serve_until_stopped()\n"
@@ -1070,8 +1070,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:811
msgid ""
-"Download `the Gist `__ as a ZIP archive using "
-"the :guilabel:`Download ZIP` button."
+"Download `the Gist `__ as a ZIP archive using the :"
+"guilabel:`Download ZIP` button."
msgstr ""
#: ../../howto/logging-cookbook.rst:814
@@ -1155,8 +1155,8 @@ msgid ""
"is not a good idea because these instances are not garbage collected. While "
"this is not a problem in practice, when the number of :class:`Logger` "
"instances is dependent on the level of granularity you want to use in "
-"logging an application, it could be hard to manage if the number "
-"of :class:`Logger` instances becomes effectively unbounded."
+"logging an application, it could be hard to manage if the number of :class:"
+"`Logger` instances becomes effectively unbounded."
msgstr ""
#: ../../howto/logging-cookbook.rst:873
@@ -1167,22 +1167,22 @@ msgstr ""
msgid ""
"An easy way in which you can pass contextual information to be output along "
"with logging event information is to use the :class:`LoggerAdapter` class. "
-"This class is designed to look like a :class:`Logger`, so that you can "
-"call :meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` "
-"and :meth:`log`. These methods have the same signatures as their "
-"counterparts in :class:`Logger`, so you can use the two types of instances "
-"interchangeably."
+"This class is designed to look like a :class:`Logger`, so that you can call :"
+"meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:"
+"`exception`, :meth:`critical` and :meth:`log`. These methods have the same "
+"signatures as their counterparts in :class:`Logger`, so you can use the two "
+"types of instances interchangeably."
msgstr ""
#: ../../howto/logging-cookbook.rst:883
msgid ""
-"When you create an instance of :class:`LoggerAdapter`, you pass it "
-"a :class:`Logger` instance and a dict-like object which contains your "
-"contextual information. When you call one of the logging methods on an "
-"instance of :class:`LoggerAdapter`, it delegates the call to the underlying "
-"instance of :class:`Logger` passed to its constructor, and arranges to pass "
-"the contextual information in the delegated call. Here's a snippet from the "
-"code of :class:`LoggerAdapter`::"
+"When you create an instance of :class:`LoggerAdapter`, you pass it a :class:"
+"`Logger` instance and a dict-like object which contains your contextual "
+"information. When you call one of the logging methods on an instance of :"
+"class:`LoggerAdapter`, it delegates the call to the underlying instance of :"
+"class:`Logger` passed to its constructor, and arranges to pass the "
+"contextual information in the delegated call. Here's a snippet from the code "
+"of :class:`LoggerAdapter`::"
msgstr ""
#: ../../howto/logging-cookbook.rst:891
@@ -1216,9 +1216,8 @@ msgid ""
"use customized strings with your :class:`Formatter` instances which know "
"about the keys of the dict-like object. If you need a different method, e.g. "
"if you want to prepend or append the contextual information to the message "
-"string, you just need to subclass :class:`LoggerAdapter` and "
-"override :meth:`~LoggerAdapter.process` to do what you need. Here is a "
-"simple example::"
+"string, you just need to subclass :class:`LoggerAdapter` and override :meth:"
+"`~LoggerAdapter.process` to do what you need. Here is a simple example::"
msgstr ""
#: ../../howto/logging-cookbook.rst:916
@@ -1267,23 +1266,23 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:946
msgid ""
-"You can also add contextual information to log output using a user-"
-"defined :class:`Filter`. ``Filter`` instances are allowed to modify the "
+"You can also add contextual information to log output using a user-defined :"
+"class:`Filter`. ``Filter`` instances are allowed to modify the "
"``LogRecords`` passed to them, including adding additional attributes which "
-"can then be output using a suitable format string, or if needed a "
-"custom :class:`Formatter`."
+"can then be output using a suitable format string, or if needed a custom :"
+"class:`Formatter`."
msgstr ""
#: ../../howto/logging-cookbook.rst:951
msgid ""
"For example in a web application, the request being processed (or at least, "
-"the interesting parts of it) can be stored in a threadlocal "
-"(:class:`threading.local`) variable, and then accessed from a ``Filter`` to "
-"add, say, information from the request - say, the remote IP address and "
-"remote user's username - to the ``LogRecord``, using the attribute names "
-"'ip' and 'user' as in the ``LoggerAdapter`` example above. In that case, the "
-"same format string can be used to get similar output to that shown above. "
-"Here's an example script::"
+"the interesting parts of it) can be stored in a threadlocal (:class:"
+"`threading.local`) variable, and then accessed from a ``Filter`` to add, "
+"say, information from the request - say, the remote IP address and remote "
+"user's username - to the ``LogRecord``, using the attribute names 'ip' and "
+"'user' as in the ``LoggerAdapter`` example above. In that case, the same "
+"format string can be used to get similar output to that shown above. Here's "
+"an example script::"
msgstr ""
#: ../../howto/logging-cookbook.rst:960
@@ -1440,8 +1439,8 @@ msgid ""
"\n"
"# A dummy set of requests which will be used in the simulation - we'll just "
"pick\n"
-"# from this list randomly. Note that all GET requests are from "
-"192.168.2.XXX\n"
+"# from this list randomly. Note that all GET requests are from 192.168.2."
+"XXX\n"
"# addresses, whereas POST requests are from 192.16.3.XXX addresses. Three "
"users\n"
"# are represented in the sample requests.\n"
@@ -1459,8 +1458,8 @@ msgid ""
"information\n"
"# such as HTTP method, client IP and username\n"
"\n"
-"formatter = logging.Formatter('%(threadName)-11s %(appName)s %(name)-9s %"
-"(user)-6s %(ip)s %(method)-4s %(message)s')\n"
+"formatter = logging.Formatter('%(threadName)-11s %(appName)s %(name)-9s "
+"%(user)-6s %(ip)s %(method)-4s %(message)s')\n"
"\n"
"# Create our context variables. These will be filled at the start of "
"request\n"
@@ -1699,19 +1698,18 @@ msgid ""
"this is to have all the processes log to a :class:`~handlers.SocketHandler`, "
"and have a separate process which implements a socket server which reads "
"from the socket and logs to file. (If you prefer, you can dedicate one "
-"thread in one of the existing processes to perform this "
-"function.) :ref:`This section ` documents this approach in "
-"more detail and includes a working socket receiver which can be used as a "
-"starting point for you to adapt in your own applications."
+"thread in one of the existing processes to perform this function.) :ref:"
+"`This section ` documents this approach in more detail and "
+"includes a working socket receiver which can be used as a starting point for "
+"you to adapt in your own applications."
msgstr ""
#: ../../howto/logging-cookbook.rst:1281
msgid ""
-"You could also write your own handler which uses "
-"the :class:`~multiprocessing.Lock` class from the :mod:`multiprocessing` "
-"module to serialize access to the file from your processes. The "
-"stdlib :class:`FileHandler` and subclasses do not make use "
-"of :mod:`multiprocessing`."
+"You could also write your own handler which uses the :class:"
+"`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to "
+"serialize access to the file from your processes. The stdlib :class:"
+"`FileHandler` and subclasses do not make use of :mod:`multiprocessing`."
msgstr ""
#: ../../howto/logging-cookbook.rst:1288
@@ -1762,8 +1760,8 @@ msgid ""
"def listener_configurer():\n"
" root = logging.getLogger()\n"
" h = logging.handlers.RotatingFileHandler('mptest.log', 'a', 300, 10)\n"
-" f = logging.Formatter('%(asctime)s %(processName)-10s %(name)s %"
-"(levelname)-8s %(message)s')\n"
+" f = logging.Formatter('%(asctime)s %(processName)-10s %(name)s "
+"%(levelname)-8s %(message)s')\n"
" h.setFormatter(f)\n"
" root.addHandler(h)\n"
"\n"
@@ -1895,8 +1893,8 @@ msgid ""
" 'formatters': {\n"
" 'detailed': {\n"
" 'class': 'logging.Formatter',\n"
-" 'format': '%(asctime)s %(name)-15s %(levelname)-8s %"
-"(processName)-10s %(message)s'\n"
+" 'format': '%(asctime)s %(name)-15s %(levelname)-8s "
+"%(processName)-10s %(message)s'\n"
" }\n"
" },\n"
" 'handlers': {\n"
@@ -2110,9 +2108,9 @@ msgstr ""
msgid ""
"When logging was added to the Python standard library, the only way of "
"formatting messages with variable content was to use the %-formatting "
-"method. Since then, Python has gained two new formatting "
-"approaches: :class:`string.Template` (added in Python 2.4) "
-"and :meth:`str.format` (added in Python 2.6)."
+"method. Since then, Python has gained two new formatting approaches: :class:"
+"`string.Template` (added in Python 2.4) and :meth:`str.format` (added in "
+"Python 2.6)."
msgstr ""
#: ../../howto/logging-cookbook.rst:1622
@@ -2123,9 +2121,9 @@ msgid ""
"``'%'``, but other possible values are ``'{'`` and ``'$'``, which correspond "
"to the other two formatting styles. Backwards compatibility is maintained by "
"default (as you would expect), but by explicitly specifying a style "
-"parameter, you get the ability to specify format strings which work "
-"with :meth:`str.format` or :class:`string.Template`. Here's an example "
-"console session to show the possibilities:"
+"parameter, you get the ability to specify format strings which work with :"
+"meth:`str.format` or :class:`string.Template`. Here's an example console "
+"session to show the possibilities:"
msgstr ""
#: ../../howto/logging-cookbook.rst:1632
@@ -2175,12 +2173,12 @@ msgid ""
"logging call (e.g. the ``exc_info`` keyword parameter to indicate that "
"traceback information should be logged, or the ``extra`` keyword parameter "
"to indicate additional contextual information to be added to the log). So "
-"you cannot directly make logging calls using :meth:`str.format` "
-"or :class:`string.Template` syntax, because internally the logging package "
-"uses %-formatting to merge the format string and the variable arguments. "
-"There would be no changing this while preserving backward compatibility, "
-"since all logging calls which are out there in existing code will be using %-"
-"format strings."
+"you cannot directly make logging calls using :meth:`str.format` or :class:"
+"`string.Template` syntax, because internally the logging package uses %-"
+"formatting to merge the format string and the variable arguments. There "
+"would be no changing this while preserving backward compatibility, since all "
+"logging calls which are out there in existing code will be using %-format "
+"strings."
msgstr ""
#: ../../howto/logging-cookbook.rst:1677
@@ -2333,10 +2331,10 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:1783
msgid ""
"Every logging event is represented by a :class:`LogRecord` instance. When an "
-"event is logged and not filtered out by a logger's level, "
-"a :class:`LogRecord` is created, populated with information about the event "
-"and then passed to the handlers for that logger (and its ancestors, up to "
-"and including the logger where further propagation up the hierarchy is "
+"event is logged and not filtered out by a logger's level, a :class:"
+"`LogRecord` is created, populated with information about the event and then "
+"passed to the handlers for that logger (and its ancestors, up to and "
+"including the logger where further propagation up the hierarchy is "
"disabled). Before Python 3.2, there were only two places where this creation "
"was done:"
msgstr ""
@@ -2352,22 +2350,21 @@ msgid ""
":func:`makeLogRecord`, which is called with a dictionary containing "
"attributes to be added to the LogRecord. This is typically invoked when a "
"suitable dictionary has been received over the network (e.g. in pickle form "
-"via a :class:`~handlers.SocketHandler`, or in JSON form via "
-"an :class:`~handlers.HTTPHandler`)."
+"via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:"
+"`~handlers.HTTPHandler`)."
msgstr ""
#: ../../howto/logging-cookbook.rst:1799
msgid ""
-"This has usually meant that if you need to do anything special with "
-"a :class:`LogRecord`, you've had to do one of the following."
+"This has usually meant that if you need to do anything special with a :class:"
+"`LogRecord`, you've had to do one of the following."
msgstr ""
#: ../../howto/logging-cookbook.rst:1802
msgid ""
-"Create your own :class:`Logger` subclass, which "
-"overrides :meth:`Logger.makeRecord`, and set it "
-"using :func:`~logging.setLoggerClass` before any loggers that you care about "
-"are instantiated."
+"Create your own :class:`Logger` subclass, which overrides :meth:`Logger."
+"makeRecord`, and set it using :func:`~logging.setLoggerClass` before any "
+"loggers that you care about are instantiated."
msgstr ""
#: ../../howto/logging-cookbook.rst:1805
@@ -2412,10 +2409,10 @@ msgstr ""
msgid ""
"In Python 3.2 and later, :class:`~logging.LogRecord` creation is done "
"through a factory, which you can specify. The factory is just a callable you "
-"can set with :func:`~logging.setLogRecordFactory`, and interrogate "
-"with :func:`~logging.getLogRecordFactory`. The factory is invoked with the "
-"same signature as the :class:`~logging.LogRecord` constructor, "
-"as :class:`LogRecord` is the default setting for the factory."
+"can set with :func:`~logging.setLogRecordFactory`, and interrogate with :"
+"func:`~logging.getLogRecordFactory`. The factory is invoked with the same "
+"signature as the :class:`~logging.LogRecord` constructor, as :class:"
+"`LogRecord` is the default setting for the factory."
msgstr ""
#: ../../howto/logging-cookbook.rst:1835
@@ -2535,10 +2532,10 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:1924
msgid ""
"In a similar way to the above section, we can implement a listener and "
-"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The "
-"following snippets illustrate -- you can test them in an environment which "
-"has ``pynng`` installed. Just for variety, we present the listener first."
+"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The following "
+"snippets illustrate -- you can test them in an environment which has "
+"``pynng`` installed. Just for variety, we present the listener first."
msgstr ""
#: ../../howto/logging-cookbook.rst:1934
@@ -2636,8 +2633,8 @@ msgid ""
"# Make sure the process ID is in the output\n"
"logging.basicConfig(level=logging.DEBUG,\n"
" handlers=[logging.StreamHandler(), handler],\n"
-" format='%(levelname)-8s %(name)10s %(process)6s %"
-"(message)s')\n"
+" format='%(levelname)-8s %(name)10s %(process)6s "
+"%(message)s')\n"
"levels = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR,\n"
" logging.CRITICAL)\n"
"logger_names = ('myapp', 'myapp.lib1', 'myapp.lib2')\n"
@@ -2732,8 +2729,8 @@ msgstr ""
msgid ""
"Below is an example of a logging configuration dictionary - it's taken from "
"the `documentation on the Django project `_. This dictionary is passed "
-"to :func:`~config.dictConfig` to put the configuration into effect::"
+"stable/topics/logging/#configuring-logging>`_. This dictionary is passed to :"
+"func:`~config.dictConfig` to put the configuration into effect::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2114
@@ -3114,13 +3111,13 @@ msgid ""
" 'formatters': {\n"
" 'detailed': {\n"
" 'class': 'logging.Formatter',\n"
-" 'format': '%(asctime)s %(name)-15s %(levelname)-8s %"
-"(processName)-10s %(message)s'\n"
+" 'format': '%(asctime)s %(name)-15s %(levelname)-8s "
+"%(processName)-10s %(message)s'\n"
" },\n"
" 'simple': {\n"
" 'class': 'logging.Formatter',\n"
-" 'format': '%(name)-15s %(levelname)-8s %(processName)-10s %"
-"(message)s'\n"
+" 'format': '%(name)-15s %(levelname)-8s %(processName)-10s "
+"%(message)s'\n"
" }\n"
" },\n"
" 'handlers': {\n"
@@ -3224,9 +3221,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2465
msgid ""
-"Attach a :class:`~logging.Formatter` instance to "
-"your :class:`~logging.handlers.SysLogHandler` instance, with a format string "
-"such as::"
+"Attach a :class:`~logging.Formatter` instance to your :class:`~logging."
+"handlers.SysLogHandler` instance, with a format string such as::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2469
@@ -3394,9 +3390,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2588
msgid ""
-"You can then specify, in a logging configuration passed "
-"to :func:`dictConfig`, that a logging handler be created by calling this "
-"function::"
+"You can then specify, in a logging configuration passed to :func:"
+"`dictConfig`, that a logging handler be created by calling this function::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2591
@@ -3500,11 +3495,11 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2678
msgid ""
-"Note that this example uses Python 3.3 because that's "
-"where :func:`shutil.chown` makes an appearance. This approach should work "
-"with any Python version that supports :func:`dictConfig` - namely, Python "
-"2.7, 3.2 or later. With pre-3.3 versions, you would need to implement the "
-"actual ownership change using e.g. :func:`os.chown`."
+"Note that this example uses Python 3.3 because that's where :func:`shutil."
+"chown` makes an appearance. This approach should work with any Python "
+"version that supports :func:`dictConfig` - namely, Python 2.7, 3.2 or later. "
+"With pre-3.3 versions, you would need to implement the actual ownership "
+"change using e.g. :func:`os.chown`."
msgstr ""
#: ../../howto/logging-cookbook.rst:2684
@@ -3570,12 +3565,11 @@ msgid ""
"call (e.g. the ``exc_info`` keyword parameter to indicate that traceback "
"information should be logged, or the ``extra`` keyword parameter to indicate "
"additional contextual information to be added to the log). So you cannot "
-"directly make logging calls using :meth:`str.format` "
-"or :class:`string.Template` syntax, because internally the logging package "
-"uses %-formatting to merge the format string and the variable arguments. "
-"There would be no changing this while preserving backward compatibility, "
-"since all logging calls which are out there in existing code will be using %-"
-"format strings."
+"directly make logging calls using :meth:`str.format` or :class:`string."
+"Template` syntax, because internally the logging package uses %-formatting "
+"to merge the format string and the variable arguments. There would be no "
+"changing this while preserving backward compatibility, since all logging "
+"calls which are out there in existing code will be using %-format strings."
msgstr ""
#: ../../howto/logging-cookbook.rst:2733
@@ -3615,8 +3609,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2757
msgid ""
-"Refer to the reference documentation on :func:`setLogRecordFactory` "
-"and :class:`LogRecord` for more information."
+"Refer to the reference documentation on :func:`setLogRecordFactory` and :"
+"class:`LogRecord` for more information."
msgstr ""
#: ../../howto/logging-cookbook.rst:2762
@@ -3626,11 +3620,11 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2764
msgid ""
"There is another, perhaps simpler way that you can use {}- and $- formatting "
-"to construct your individual log messages. You may recall "
-"(from :ref:`arbitrary-object-messages`) that when logging you can use an "
-"arbitrary object as a message format string, and that the logging package "
-"will call :func:`str` on that object to get the actual format string. "
-"Consider the following two classes::"
+"to construct your individual log messages. You may recall (from :ref:"
+"`arbitrary-object-messages`) that when logging you can use an arbitrary "
+"object as a message format string, and that the logging package will call :"
+"func:`str` on that object to get the actual format string. Consider the "
+"following two classes::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2789
@@ -3646,8 +3640,8 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:2797
msgid ""
-"Examples of this approach are given below. Firstly, formatting "
-"with :meth:`str.format`::"
+"Examples of this approach are given below. Firstly, formatting with :meth:"
+"`str.format`::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2800
@@ -3699,13 +3693,13 @@ msgid ""
"it might not be obvious at first glance how to do it (hence this recipe). "
"Since :class:`~logging.Filter` is the only filter class included in the "
"standard library, and it is unlikely to cater to many requirements (it's "
-"only there as a base class), you will typically need to define your "
-"own :class:`~logging.Filter` subclass with an "
-"overridden :meth:`~logging.Filter.filter` method. To do this, specify the "
-"``()`` key in the configuration dictionary for the filter, specifying a "
-"callable which will be used to create the filter (a class is the most "
-"obvious, but you can provide any callable which returns "
-"a :class:`~logging.Filter` instance). Here is a complete example::"
+"only there as a base class), you will typically need to define your own :"
+"class:`~logging.Filter` subclass with an overridden :meth:`~logging.Filter."
+"filter` method. To do this, specify the ``()`` key in the configuration "
+"dictionary for the filter, specifying a callable which will be used to "
+"create the filter (a class is the most obvious, but you can provide any "
+"callable which returns a :class:`~logging.Filter` instance). Here is a "
+"complete example::"
msgstr ""
#: ../../howto/logging-cookbook.rst:2845
@@ -3918,14 +3912,14 @@ msgid ""
"rendered in an audible rather than a visible format. This is easy to do if "
"you have text-to-speech (TTS) functionality available in your system, even "
"if it doesn't have a Python binding. Most TTS systems have a command line "
-"program you can run, and this can be invoked from a handler "
-"using :mod:`subprocess`. It's assumed here that TTS command line programs "
-"won't expect to interact with users or take a long time to complete, and "
-"that the frequency of logged messages will be not so high as to swamp the "
-"user with messages, and that it's acceptable to have the messages spoken one "
-"at a time rather than concurrently, The example implementation below waits "
-"for one message to be spoken before the next is processed, and this might "
-"cause other handlers to be kept waiting. Here is a short example showing the "
+"program you can run, and this can be invoked from a handler using :mod:"
+"`subprocess`. It's assumed here that TTS command line programs won't expect "
+"to interact with users or take a long time to complete, and that the "
+"frequency of logged messages will be not so high as to swamp the user with "
+"messages, and that it's acceptable to have the messages spoken one at a time "
+"rather than concurrently, The example implementation below waits for one "
+"message to be spoken before the next is processed, and this might cause "
+"other handlers to be kept waiting. Here is a short example showing the "
"approach, which assumes that the ``espeak`` TTS package is available::"
msgstr ""
@@ -4017,9 +4011,9 @@ msgid ""
"parameter and attaches a memory handler for the duration of the call to the "
"decorated function. The decorator can be additionally parameterised using a "
"target handler, a level at which flushing should occur, and a capacity for "
-"the buffer (number of records buffered). These default to "
-"a :class:`~logging.StreamHandler` which writes to ``sys.stderr``, "
-"``logging.ERROR`` and ``100`` respectively."
+"the buffer (number of records buffered). These default to a :class:`~logging."
+"StreamHandler` which writes to ``sys.stderr``, ``logging.ERROR`` and ``100`` "
+"respectively."
msgstr ""
#: ../../howto/logging-cookbook.rst:3059
@@ -4150,13 +4144,12 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:3168
msgid ""
"To illustrate how you can send log messages via email, so that a set number "
-"of messages are sent per email, you can "
-"subclass :class:`~logging.handlers.BufferingHandler`. In the following "
-"example, which you can adapt to suit your specific needs, a simple test "
-"harness is provided which allows you to run the script with command line "
-"arguments specifying what you typically need to send things via SMTP. (Run "
-"the downloaded script with the ``-h`` argument to see the required and "
-"optional arguments.)"
+"of messages are sent per email, you can subclass :class:`~logging.handlers."
+"BufferingHandler`. In the following example, which you can adapt to suit "
+"your specific needs, a simple test harness is provided which allows you to "
+"run the script with command line arguments specifying what you typically "
+"need to send things via SMTP. (Run the downloaded script with the ``-h`` "
+"argument to see the required and optional arguments.)"
msgstr ""
#: ../../howto/logging-cookbook.rst:3176
@@ -4179,8 +4172,8 @@ msgid ""
" toaddrs = [toaddrs]\n"
" self.toaddrs = toaddrs\n"
" self.subject = subject\n"
-" self.setFormatter(logging.Formatter(\"%(asctime)s %(levelname)-5s %"
-"(message)s\"))\n"
+" self.setFormatter(logging.Formatter(\"%(asctime)s %(levelname)-5s "
+"%(message)s\"))\n"
"\n"
" def flush(self):\n"
" if len(self.buffer) > 0:\n"
@@ -4256,10 +4249,10 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:3259
msgid ""
-"and you can then use the ``UTCFormatter`` in your code instead "
-"of :class:`~logging.Formatter`. If you want to do that via configuration, "
-"you can use the :func:`~logging.config.dictConfig` API with an approach "
-"illustrated by the following complete example::"
+"and you can then use the ``UTCFormatter`` in your code instead of :class:"
+"`~logging.Formatter`. If you want to do that via configuration, you can use "
+"the :func:`~logging.config.dictConfig` API with an approach illustrated by "
+"the following complete example::"
msgstr ""
#: ../../howto/logging-cookbook.rst:3264
@@ -4491,8 +4484,8 @@ msgid ""
"Suppose we have a command-line application whose job is to stop, start or "
"restart some services. This could be organised for the purposes of "
"illustration as a file ``app.py`` that is the main script for the "
-"application, with individual commands implemented in ``start.py``, "
-"``stop.py`` and ``restart.py``. Suppose further that we want to control the "
+"application, with individual commands implemented in ``start.py``, ``stop."
+"py`` and ``restart.py``. Suppose further that we want to control the "
"verbosity of the application via a command-line argument, defaulting to "
"``logging.INFO``. Here's one way that ``app.py`` could be written::"
msgstr ""
@@ -4532,8 +4525,8 @@ msgid ""
" mod = importlib.import_module(options.command)\n"
" cmd = getattr(mod, 'command')\n"
" except (ImportError, AttributeError):\n"
-" print('Unable to find the code for command \\'%s\\'' % "
-"options.command)\n"
+" print('Unable to find the code for command \\'%s\\'' % options."
+"command)\n"
" return 1\n"
" # Could get fancy here and load configuration from file or dictionary\n"
" logging.basicConfig(level=options.log_level,\n"
@@ -4685,8 +4678,8 @@ msgstr ""
msgid ""
"A question that comes up from time to time is about how to log to a GUI "
"application. The `Qt `_ framework is a popular cross-"
-"platform UI framework with Python bindings using :pypi:`PySide2` "
-"or :pypi:`PyQt5` libraries."
+"platform UI framework with Python bindings using :pypi:`PySide2` or :pypi:"
+"`PyQt5` libraries."
msgstr ""
#: ../../howto/logging-cookbook.rst:3591
@@ -4897,8 +4890,8 @@ msgid ""
" self.start_thread()\n"
" self.work_button.clicked.connect(self.worker.start)\n"
" # Once started, the button should be disabled\n"
-" self.work_button.clicked.connect(lambda : "
-"self.work_button.setEnabled(False))\n"
+" self.work_button.clicked.connect(lambda : self.work_button."
+"setEnabled(False))\n"
"\n"
" def start_thread(self):\n"
" self.worker = Worker()\n"
@@ -4975,9 +4968,8 @@ msgid ""
"default to use the older :rfc:`3164`, which hails from 2001. When "
"``logging`` was added to Python in 2003, it supported the earlier (and only "
"existing) protocol at the time. Since RFC5424 came out, as there has not "
-"been widespread deployment of it in syslog servers, "
-"the :class:`~logging.handlers.SysLogHandler` functionality has not been "
-"updated."
+"been widespread deployment of it in syslog servers, the :class:`~logging."
+"handlers.SysLogHandler` functionality has not been updated."
msgstr ""
#: ../../howto/logging-cookbook.rst:3848
@@ -5007,8 +4999,8 @@ msgid ""
"\n"
" def format(self, record):\n"
" version = 1\n"
-" asctime = "
-"datetime.datetime.fromtimestamp(record.created).isoformat()\n"
+" asctime = datetime.datetime.fromtimestamp(record.created)."
+"isoformat()\n"
" m = self.tz_offset.match(time.strftime('%z'))\n"
" has_offset = False\n"
" if m and time.timezone:\n"
@@ -5143,11 +5135,13 @@ msgid ""
"INFO:demo:An INFO message\n"
"DEBUG:demo:A DEBUG message"
msgstr ""
+"INFO:demo:An INFO message\n"
+"DEBUG:demo:A DEBUG message"
#: ../../howto/logging-cookbook.rst:3977
msgid ""
-"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and "
-"``sys.stderr`` by doing something like this:"
+"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys."
+"stderr`` by doing something like this:"
msgstr ""
#: ../../howto/logging-cookbook.rst:3980
@@ -5165,9 +5159,9 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:3987
msgid ""
"You should do this *after* configuring logging for your needs. In the above "
-"example, the :func:`~logging.basicConfig` call does this (using the "
-"``sys.stderr`` value *before* it is overwritten by a ``LoggerWriter`` "
-"instance). Then, you'd get this kind of result:"
+"example, the :func:`~logging.basicConfig` call does this (using the ``sys."
+"stderr`` value *before* it is overwritten by a ``LoggerWriter`` instance). "
+"Then, you'd get this kind of result:"
msgstr ""
#: ../../howto/logging-cookbook.rst:3992
@@ -5186,9 +5180,9 @@ msgstr ""
#: ../../howto/logging-cookbook.rst:4000
msgid ""
-"Of course, the examples above show output according to the format used "
-"by :func:`~logging.basicConfig`, but you can use a different formatter when "
-"you configure logging."
+"Of course, the examples above show output according to the format used by :"
+"func:`~logging.basicConfig`, but you can use a different formatter when you "
+"configure logging."
msgstr ""
#: ../../howto/logging-cookbook.rst:4004
@@ -5299,11 +5293,86 @@ msgstr ""
"WARNING:demo: 1/0\n"
"WARNING:demo:ZeroDivisionError: division by zero"
-#: ../../howto/logging-cookbook.rst:4072
+#: ../../howto/logging-cookbook.rst:4069
+msgid "How to uniformly handle newlines in logging output"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4071
+msgid ""
+"Usually, messages that are logged (say to console or file) consist of a "
+"single line of text. However, sometimes there is a need to handle messages "
+"with multiple lines - whether because a logging format string contains "
+"newlines, or logged data contains newlines. If you want to handle such "
+"messages uniformly, so that each line in the logged message appears "
+"uniformly formatted as if it was logged separately, you can do this using a "
+"handler mixin, as in the following snippet:"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4079
+msgid ""
+"# Assume this is in a module mymixins.py\n"
+"import copy\n"
+"\n"
+"class MultilineMixin:\n"
+" def emit(self, record):\n"
+" s = record.getMessage()\n"
+" if '\\n' not in s:\n"
+" super().emit(record)\n"
+" else:\n"
+" lines = s.splitlines()\n"
+" rec = copy.copy(record)\n"
+" rec.args = None\n"
+" for line in lines:\n"
+" rec.msg = line\n"
+" super().emit(rec)"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4097
+msgid "You can use the mixin as in the following script:"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4099
+msgid ""
+"import logging\n"
+"\n"
+"from mymixins import MultilineMixin\n"
+"\n"
+"logger = logging.getLogger(__name__)\n"
+"\n"
+"class StreamHandler(MultilineMixin, logging.StreamHandler):\n"
+" pass\n"
+"\n"
+"if __name__ == '__main__':\n"
+" logging.basicConfig(level=logging.DEBUG, format='%(asctime)s "
+"%(levelname)-9s %(message)s',\n"
+" handlers = [StreamHandler()])\n"
+" logger.debug('Single line')\n"
+" logger.debug('Multiple lines:\\nfool me once ...')\n"
+" logger.debug('Another single line')\n"
+" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled "
+"again')"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4118
+msgid "The script, when run, prints something like:"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4120
+msgid ""
+"2025-07-02 13:54:47,234 DEBUG Single line\n"
+"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n"
+"2025-07-02 13:54:47,234 DEBUG fool me once ...\n"
+"2025-07-02 13:54:47,234 DEBUG Another single line\n"
+"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n"
+"2025-07-02 13:54:47,234 DEBUG fool me ...\n"
+"2025-07-02 13:54:47,234 DEBUG can't get fooled again"
+msgstr ""
+
+#: ../../howto/logging-cookbook.rst:4134
msgid "Patterns to avoid"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4074
+#: ../../howto/logging-cookbook.rst:4136
msgid ""
"Although the preceding sections have described ways of doing things you "
"might need to do or deal with, it is worth mentioning some usage patterns "
@@ -5311,11 +5380,11 @@ msgid ""
"The following sections are in no particular order."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4080
+#: ../../howto/logging-cookbook.rst:4142
msgid "Opening the same log file multiple times"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4082
+#: ../../howto/logging-cookbook.rst:4144
msgid ""
"On Windows, you will generally not be able to open the same file multiple "
"times as this will lead to a \"file is in use by another process\" error. "
@@ -5323,32 +5392,32 @@ msgid ""
"file multiple times. This could be done accidentally, for example by:"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4087
+#: ../../howto/logging-cookbook.rst:4149
msgid ""
"Adding a file handler more than once which references the same file (e.g. by "
"a copy/paste/forget-to-change error)."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4090
+#: ../../howto/logging-cookbook.rst:4152
msgid ""
"Opening two files that look different, as they have different names, but are "
"the same because one is a symbolic link to the other."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4093
+#: ../../howto/logging-cookbook.rst:4155
msgid ""
"Forking a process, following which both parent and child have a reference to "
"the same file. This might be through use of the :mod:`multiprocessing` "
"module, for example."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4097
+#: ../../howto/logging-cookbook.rst:4159
msgid ""
"Opening a file multiple times might *appear* to work most of the time, but "
"can lead to a number of problems in practice:"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4100
+#: ../../howto/logging-cookbook.rst:4162
msgid ""
"Logging output can be garbled because multiple threads or processes try to "
"write to the same file. Although logging guards against concurrent use of "
@@ -5357,7 +5426,7 @@ msgid ""
"different handler instances which happen to point to the same file."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4106
+#: ../../howto/logging-cookbook.rst:4168
msgid ""
"An attempt to delete a file (e.g. during file rotation) silently fails, "
"because there is another reference pointing to it. This can lead to "
@@ -5367,17 +5436,17 @@ msgid ""
"being supposedly in place."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4113
+#: ../../howto/logging-cookbook.rst:4175
msgid ""
"Use the techniques outlined in :ref:`multiple-processes` to circumvent such "
"issues."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4117
+#: ../../howto/logging-cookbook.rst:4179
msgid "Using loggers as attributes in a class or passing them as parameters"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4119
+#: ../../howto/logging-cookbook.rst:4181
msgid ""
"While there might be unusual cases where you'll need to do this, in general "
"there is no point because loggers are singletons. Code can always access a "
@@ -5388,13 +5457,13 @@ msgid ""
"module (and not the class) is the unit of software decomposition."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4128
+#: ../../howto/logging-cookbook.rst:4190
msgid ""
"Adding handlers other than :class:`~logging.NullHandler` to a logger in a "
"library"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4130
+#: ../../howto/logging-cookbook.rst:4192
msgid ""
"Configuring logging by adding handlers, formatters and filters is the "
"responsibility of the application developer, not the library developer. If "
@@ -5402,11 +5471,11 @@ msgid ""
"your loggers other than a :class:`~logging.NullHandler` instance."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4136
+#: ../../howto/logging-cookbook.rst:4198
msgid "Creating a lot of loggers"
msgstr ""
-#: ../../howto/logging-cookbook.rst:4138
+#: ../../howto/logging-cookbook.rst:4200
msgid ""
"Loggers are singletons that are never freed during a script execution, and "
"so creating lots of loggers will use up memory which can't then be freed. "
@@ -5417,38 +5486,38 @@ msgid ""
"occasionally slightly more fine-grained than that)."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4149
+#: ../../howto/logging-cookbook.rst:4211
msgid "Other resources"
msgstr "其他資源"
-#: ../../howto/logging-cookbook.rst:4153
+#: ../../howto/logging-cookbook.rst:4215
msgid "Module :mod:`logging`"
msgstr ":mod:`logging` 模組"
-#: ../../howto/logging-cookbook.rst:4154
+#: ../../howto/logging-cookbook.rst:4216
msgid "API reference for the logging module."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4156
+#: ../../howto/logging-cookbook.rst:4218
msgid "Module :mod:`logging.config`"
msgstr ":mod:`logging.config` 模組"
-#: ../../howto/logging-cookbook.rst:4157
+#: ../../howto/logging-cookbook.rst:4219
msgid "Configuration API for the logging module."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4159
+#: ../../howto/logging-cookbook.rst:4221
msgid "Module :mod:`logging.handlers`"
msgstr ":mod:`logging.handlers` 模組"
-#: ../../howto/logging-cookbook.rst:4160
+#: ../../howto/logging-cookbook.rst:4222
msgid "Useful handlers included with the logging module."
msgstr ""
-#: ../../howto/logging-cookbook.rst:4162
+#: ../../howto/logging-cookbook.rst:4224
msgid ":ref:`Basic Tutorial `"
msgstr ":ref:`基礎教學 `"
-#: ../../howto/logging-cookbook.rst:4164
+#: ../../howto/logging-cookbook.rst:4226
msgid ":ref:`Advanced Tutorial `"
msgstr ":ref:`進階教學 `"
diff --git a/howto/sockets.po b/howto/sockets.po
index 168504a99e..0d6717fa74 100644
--- a/howto/sockets.po
+++ b/howto/sockets.po
@@ -335,7 +335,7 @@ msgid ""
"request, then reads a reply. That's it. The socket is discarded. This means "
"that a client can detect the end of the reply by receiving 0 bytes."
msgstr ""
-"像 HTTP 這樣的協議只使用一個 socket 進行一次傳輸,用戶端發送一個請求,然後讀"
+"像 HTTP 這樣的協定只使用一個 socket 進行一次傳輸,用戶端發送一個請求,然後讀"
"取一個回覆。就這樣,然後這個 socket 就會被銷毀。這表示者用戶端可以通過接收"
"「零位元組」來檢測回覆的結束。"
@@ -441,7 +441,7 @@ msgid ""
"of a following message. You'll need to put that aside and hold onto it, "
"until it's needed."
msgstr ""
-"需要注意的一個複雜情況是,如果你的通訊協議允許連續發送多個訊息(沒有任何回"
+"需要注意的一個複雜情況是,如果你的通訊協定允許連續發送多個訊息(沒有任何回"
"應),並且你傳遞給 ``recv`` 函式一個任意的區塊大小,最後有可能讀取到下一條訊"
"息的開頭。你需要將其放在一旁並保留下來,直到需要使用的時候。"
@@ -594,7 +594,7 @@ msgid ""
"the thread, your whole process is likely to be screwed up."
msgstr ""
"使用阻塞式 socket 最糟糕的地方可能是在另一端突然強制關閉(未執行 ``close``)"
-"的情況下會發生什麼?你的 socket 很可能會處於阻塞狀態。TCP 是一種可靠的協議,"
+"的情況下會發生什麼?你的 socket 很可能會處於阻塞狀態。TCP 是一種可靠的協定,"
"它在放棄連線之前會等待很長很長的時間。如果你正在使用執行緒,整個執行緒基本上"
"已經無法使用。在這方面,你無法做太多事情。只要你不做一些愚蠢的事情,比如在執"
"行阻塞式讀取時持有一個鎖,那麼執行緒並不會消耗太多資源。*不要*\\ 試圖終止執行"
diff --git a/howto/urllib2.po b/howto/urllib2.po
index 5763984962..c712f8230a 100644
--- a/howto/urllib2.po
+++ b/howto/urllib2.po
@@ -63,7 +63,7 @@ msgid ""
"These are provided by objects called handlers and openers."
msgstr ""
"**urllib.request** 是一個用來從 URLs (Uniform Resource Locators) 取得資料的"
-"Python模組。它提供一個了非常簡單的介面能接受多種不同的協議,*urlopen* 函式。"
+"Python模組。它提供一個了非常簡單的介面能接受多種不同的協定,*urlopen* 函式。"
"也提供了較複雜的介面用於處理一些常見的狀況,例如:基本的 authentication、"
"cookies、proxies 等等,這些都可以由 handler 或 opener 物件操作。"
@@ -88,7 +88,7 @@ msgid ""
"is supplementary to them."
msgstr ""
"一般情形下 *urlopen* 是非常容易使用的,但當你遇到錯誤或者較複雜的情況下,你可"
-"能需要對超文本協議 HyperText Transfer Protocol 有一定的了解。最完整且具參考價"
+"能需要對超文本協定 (HyperText Transfer Protocol) 有一定的了解。最完整且具參考價"
"值的是 :rfc:`2616`,不過它是一份技術文件並不容易閱讀,以下的教學會提供足夠的 "
"HTTP 知識來幫助你使用 *urllib*。這份教學並非要取代 :mod:`urllib.request` 這份"
"文件,你還是會需要它。"
diff --git a/library/__future__.po b/library/__future__.po
index 6c9b5f80bd..a1267b3397 100644
--- a/library/__future__.po
+++ b/library/__future__.po
@@ -306,7 +306,7 @@ msgid ""
"compiler_flag` attribute on :class:`_Feature` instances."
msgstr ""
"*CompilerFlag* 是(位元欄位 (bitfield))旗標,應在第四個引數中傳遞給內建函"
-"式 :func:`compile` 以在動態編譯的程式碼中啟用該功能。此旗標存儲在 :class:"
+"式 :func:`compile` 以在動態編譯的程式碼中啟用該功能。此旗標儲存在 :class:"
"`_Feature` 實例上的 :attr:`_Feature.compiler_flag` 屬性中。"
#: ../../library/__future__.rst:117
diff --git a/library/_thread.po b/library/_thread.po
index 17e592407e..1f52f9ef12 100644
--- a/library/_thread.po
+++ b/library/_thread.po
@@ -173,7 +173,7 @@ msgstr ""
#: ../../library/_thread.rst:123 ../../library/_thread.rst:148
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/_thread.rst:127
msgid "Added support for GNU/kFreeBSD."
diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po
index dba5a76c2a..dee0c33f50 100644
--- a/library/asyncio-api-index.po
+++ b/library/asyncio-api-index.po
@@ -341,7 +341,7 @@ msgstr "傳送網路資料的高階 async/await 物件。"
#: ../../library/asyncio-api-index.rst:170
msgid ":ref:`Example TCP client `."
-msgstr ":ref:`TCP 客戶端範例 `。"
+msgstr ":ref:`TCP 用戶端範例 `。"
#: ../../library/asyncio-api-index.rst:172
msgid "See also the :ref:`streams APIs ` documentation."
diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po
index e946d14bce..26091449c9 100644
--- a/library/asyncio-eventloop.po
+++ b/library/asyncio-eventloop.po
@@ -726,7 +726,7 @@ msgid ""
"The protocol instance is coupled with the transport by calling its :meth:"
"`~BaseProtocol.connection_made` method."
msgstr ""
-"通過呼叫其 :meth:`~BaseProtocol.connection_made` 方法,將協議實例與傳輸連線在"
+"通過呼叫其 :meth:`~BaseProtocol.connection_made` 方法,將協定實例與傳輸連線在"
"一起。"
#: ../../library/asyncio-eventloop.rst:454
@@ -781,7 +781,7 @@ msgid ""
"these should all be integers from the corresponding :mod:`socket` module "
"constants."
msgstr ""
-"*family*、*proto*、*flags* 是可選的位址家族、協議和旗標,用於傳遞至 "
+"*family*、*proto*、*flags* 是可選的位址家族、協定和旗標,用於傳遞至 "
"getaddrinfo() 進行 *host* 解析。若有給定這些應該都是相應 :mod:`socket` 模組常"
"數的整數。"
@@ -917,7 +917,7 @@ msgid ""
"visible delay and provides an algorithm."
msgstr ""
"Happy Eyeballs 演算法:雙協定堆疊主機 (Dual-Stack Hosts) 的成功。當伺服器的 "
-"IPv4 路徑和協議運作正常,但伺服器的 IPv6 路徑和協議不運作時,雙棧用戶端應用程"
+"IPv4 路徑和協定運作正常,但伺服器的 IPv6 路徑和協定不運作時,雙棧用戶端應用程"
"式會比僅具 IPv4 的用戶端體驗到顯著的連線延遲。這是不希望的,因為這會導致雙棧"
"用戶端的使用者體驗變差。本文件具體說明了減少此用戶可見延遲的演算法要求並提供"
"了一種演算法。"
@@ -1045,8 +1045,8 @@ msgid ""
"See :ref:`UDP echo client protocol ` and :"
"ref:`UDP echo server protocol ` examples."
msgstr ""
-"請參閱 :ref:`UDP 回應用戶端協議 ` 和 :ref:"
-"`UDP 回應伺服器協議 ` 範例。"
+"請參閱 :ref:`UDP 回應用戶端協定 ` 和 :ref:"
+"`UDP 回應伺服器協定 ` 範例。"
#: ../../library/asyncio-eventloop.rst:630
msgid ""
@@ -1130,7 +1130,7 @@ msgstr ""
#: ../../library/asyncio-eventloop.rst:1840
#: ../../library/asyncio-eventloop.rst:1847
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/asyncio-eventloop.rst:681
msgid ""
@@ -1360,7 +1360,7 @@ msgstr "加入 *cleanup_socket* 參數。"
#: ../../library/asyncio-eventloop.rst:856
msgid "Wrap an already accepted connection into a transport/protocol pair."
-msgstr "將已接受的連線包裝成傳輸層/協議對。"
+msgstr "將已接受的連線包裝成傳輸層/協定對。"
#: ../../library/asyncio-eventloop.rst:858
msgid ""
@@ -1462,7 +1462,7 @@ msgid ""
"protocol and *protocol*-facing transport."
msgstr ""
"建立 TLS 編解碼器實例並在 *transport* 和 *protocol* 之間插入它。編解碼器既實"
-"作了對於 *transport* 的協議,也實作了對於 *protocol* 的傳輸。"
+"作了對於 *transport* 的協定,也實作了對於 *protocol* 的傳輸。"
#: ../../library/asyncio-eventloop.rst:945
msgid ""
@@ -1580,7 +1580,7 @@ msgid ""
"socket` objects directly is more convenient."
msgstr ""
"一般情況下,使用基於傳輸的 API(如 :meth:`loop.create_connection` 和 :meth:"
-"`loop.create_server`\\ )的協議實作比直接使用 socket 的實作更快。然而在某些情"
+"`loop.create_server`)的協定實作比直接使用 socket 的實作更快。然而在某些情"
"況下性能不是關鍵,直接使用 :class:`~socket.socket` 物件更方便。"
#: ../../library/asyncio-eventloop.rst:1034
@@ -2568,7 +2568,7 @@ msgstr ""
#: ../../library/asyncio-eventloop.rst:1712
msgid "Close all existing incoming client connections."
-msgstr "關閉所有現有的傳入客戶端連線。"
+msgstr "關閉所有現有的傳入用戶端連線。"
#: ../../library/asyncio-eventloop.rst:1714
msgid ""
@@ -2585,7 +2585,7 @@ msgstr ""
msgid ""
"Close all existing incoming client connections immediately, without waiting "
"for pending operations to complete."
-msgstr "立即關閉所有現有的傳入客戶端連線,而不等待待定操作完成。"
+msgstr "立即關閉所有現有的傳入用戶端連線,而不等待待定操作完成。"
#: ../../library/asyncio-eventloop.rst:1727
msgid ""
@@ -2656,7 +2656,7 @@ msgid ""
msgstr ""
"async def client_connected(reader, writer):\n"
" # 透過讀取器/寫入器串流\n"
-" # 與客戶端溝通。例如:\n"
+" # 與用戶端溝通。例如:\n"
" await reader.readline()\n"
"\n"
"async def main(host, port):\n"
diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po
index 53e8482029..22a41d34ec 100644
--- a/library/asyncio-llapi-index.po
+++ b/library/asyncio-llapi-index.po
@@ -571,7 +571,7 @@ msgid ""
"Using ``loop.create_connection()`` to implement :ref:`an echo-client "
"`."
msgstr ""
-"使用 ``loop.create_connection()`` 以實作\\ :ref:`一個 echo 客戶端 "
+"使用 ``loop.create_connection()`` 以實作\\ :ref:`一個 echo 用戶端 "
"`。"
#: ../../library/asyncio-llapi-index.rst:278
diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po
index 15228773f8..41fd70c5a6 100644
--- a/library/asyncio-policy.po
+++ b/library/asyncio-policy.po
@@ -161,7 +161,7 @@ msgstr ""
#: ../../library/asyncio-policy.rst:131 ../../library/asyncio-policy.rst:139
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/asyncio-policy.rst:136
msgid ""
diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po
index fea78a7148..e3597d945a 100644
--- a/library/asyncio-stream.po
+++ b/library/asyncio-stream.po
@@ -40,7 +40,7 @@ msgstr ""
#: ../../library/asyncio-stream.rst:19
msgid "Here is an example of a TCP echo client written using asyncio streams::"
-msgstr "這是一個使用 asyncio 串流編寫的 TCP echo 客戶端範例: ::"
+msgstr "這是一個使用 asyncio 串流編寫的 TCP echo 用戶端範例: ::"
#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:437
msgid ""
@@ -161,7 +161,7 @@ msgid ""
"arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` "
"classes."
msgstr ""
-"當一個新的客戶端連線被建立時,回呼函式 *client_connected_cb* 就會被呼叫。該函"
+"當一個新的用戶端連線被建立時,回呼函式 *client_connected_cb* 就會被呼叫。該函"
"式會接收到一對引數 ``(reader, writer)``,分別為 :class:`StreamReader` 和 :"
"class:`StreamWriter` 的實例。"
@@ -213,7 +213,7 @@ msgstr "另請參閱 :meth:`loop.create_unix_connection` 文件。"
#: ../../library/asyncio-stream.rst:158 ../../library/asyncio-stream.rst:193
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/asyncio-stream.rst:160
msgid ""
@@ -559,11 +559,11 @@ msgstr "範例"
#: ../../library/asyncio-stream.rst:433
msgid "TCP echo client using streams"
-msgstr "使用串流的 TCP echo 客戶端"
+msgstr "使用串流的 TCP echo 用戶端"
#: ../../library/asyncio-stream.rst:435
msgid "TCP echo client using the :func:`asyncio.open_connection` function::"
-msgstr "使用 :func:`asyncio.open_connection` 函式的 TCP echo 客戶端: ::"
+msgstr "使用 :func:`asyncio.open_connection` 函式的 TCP echo 用戶端: ::"
#: ../../library/asyncio-stream.rst:459
msgid ""
@@ -571,7 +571,7 @@ msgid ""
"` example uses the low-level :meth:"
"`loop.create_connection` method."
msgstr ""
-"使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 客戶端協定 "
+"使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 用戶端協定 "
"`\\ 範例。"
#: ../../library/asyncio-stream.rst:466
diff --git a/library/asyncio-task.po b/library/asyncio-task.po
index 65aa9231e1..9d69ab5503 100644
--- a/library/asyncio-task.po
+++ b/library/asyncio-task.po
@@ -1603,7 +1603,7 @@ msgstr ""
#: ../../library/asyncio-task.rst:1189
msgid "Added support for the :mod:`contextvars` module."
-msgstr ""
+msgstr "新增對 :mod:`contextvars` 模組的支援。"
#: ../../library/asyncio-task.rst:1195
msgid ""
diff --git a/library/asyncio.po b/library/asyncio.po
index dab5421359..996c4a1340 100644
--- a/library/asyncio.po
+++ b/library/asyncio.po
@@ -5,13 +5,14 @@
# Adrian Liaw , 2018
# Matt Wang , 2021
# Leo Wang , 2023
+# Weilin Du, 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-11 00:13+0000\n"
-"PO-Revision-Date: 2021-11-23 12:40+0800\n"
-"Last-Translator: Matt Wang \n"
+"PO-Revision-Date: 2025-07-06 17:13+0800\n"
+"Last-Translator: Weilin Du\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
@@ -19,7 +20,6 @@ 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.0\n"
#: ../../library/asyncio.rst:91
msgid "High-level APIs"
@@ -149,7 +149,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -194,17 +194,19 @@ msgstr ""
msgid ""
"Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no "
"arguments."
-msgstr ""
+msgstr "產生一個 :ref:`稽核事件 ` `cpython.run_stdin`` 且沒有引數。"
#: ../../library/asyncio.rst:79
msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events."
-msgstr ""
+msgstr "(也包括 3.11.10、3.10.15、3.9.20 及 3.8.20)發出稽核事件。"
#: ../../library/asyncio.rst:82
msgid ""
"Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also "
"executed. Emits audit events."
msgstr ""
+"可能的話使用 PyREPL,在這種情況下 :envvar:`PYTHONSTARTUP` 也會被執行。發出稽核"
+"事件。"
#: ../../library/asyncio.rst:90
msgid "Reference"
diff --git a/library/bdb.po b/library/bdb.po
index 5f1e59843e..c188b1f102 100644
--- a/library/bdb.po
+++ b/library/bdb.po
@@ -124,11 +124,11 @@ msgstr ""
#: ../../library/bdb.rst:77
msgid ":class:`Breakpoint` instances have the following attributes:"
-msgstr ""
+msgstr ":class:`Breakpoint` 實例有以下屬性:"
#: ../../library/bdb.rst:81
msgid "File name of the :class:`Breakpoint`."
-msgstr ""
+msgstr ":class:`Breakpoint` 的檔案名稱。"
#: ../../library/bdb.rst:85
msgid "Line number of the :class:`Breakpoint` within :attr:`file`."
@@ -567,7 +567,7 @@ msgstr ""
#: ../../library/bdb.rst:411
msgid "Finally, the module defines the following functions:"
-msgstr ""
+msgstr "最後,這個模組定義了以下函式:"
#: ../../library/bdb.rst:415
msgid ""
diff --git a/library/binascii.po b/library/binascii.po
index 2aa9b51367..48302802ab 100644
--- a/library/binascii.po
+++ b/library/binascii.po
@@ -45,7 +45,7 @@ msgstr ""
#: ../../library/binascii.rst:31
msgid "The :mod:`binascii` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`binascii` 模組定義了以下函式:"
#: ../../library/binascii.rst:36
msgid ""
diff --git a/library/bz2.po b/library/bz2.po
index 9424d42055..f0ec58fb6a 100644
--- a/library/bz2.po
+++ b/library/bz2.po
@@ -154,7 +154,7 @@ msgstr ""
#: ../../library/bz2.rst:94
msgid ":class:`BZ2File` also provides the following methods and attributes:"
-msgstr ""
+msgstr ":class:`BZ2File` 也提供了以下方法和屬性:"
#: ../../library/bz2.rst:98
msgid ""
diff --git a/library/codecs.po b/library/codecs.po
index 0079868039..1c6c9fcef5 100644
--- a/library/codecs.po
+++ b/library/codecs.po
@@ -43,7 +43,7 @@ msgstr ""
msgid ""
"The module defines the following functions for encoding and decoding with "
"any codec:"
-msgstr ""
+msgstr "這個模組定義了以下函式,用於以任何編解碼器來編碼與解碼:"
#: ../../library/codecs.rst:38
msgid "Encodes *obj* using the codec registered for *encoding*."
@@ -2298,7 +2298,7 @@ msgstr ""
#: ../../library/codecs.rst:1315
msgid "``cp65001`` is now an alias to ``utf_8``."
-msgstr ""
+msgstr "``cp65001`` 現在是 ``utf_8`` 的別名。"
#: ../../library/codecs.rst:1320
msgid "Python Specific Encodings"
@@ -2661,7 +2661,7 @@ msgstr ""
#: ../../library/codecs.rst:1550
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/codecs.rst:1552
msgid ""
diff --git a/library/compileall.po b/library/compileall.po
index 6830bf371b..645f85c5df 100644
--- a/library/compileall.po
+++ b/library/compileall.po
@@ -37,7 +37,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po
index 63fc65b3ab..6fefd66842 100644
--- a/library/concurrent.futures.po
+++ b/library/concurrent.futures.po
@@ -52,7 +52,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/ctypes.po b/library/ctypes.po
index 176c2ec266..7125493c1f 100644
--- a/library/ctypes.po
+++ b/library/ctypes.po
@@ -2643,7 +2643,7 @@ msgstr ""
#: ../../library/ctypes.rst:2069 ../../library/ctypes.rst:2126
#: ../../library/ctypes.rst:2154 ../../library/ctypes.rst:2498
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/ctypes.rst:1407
msgid ""
diff --git a/library/curses.panel.po b/library/curses.panel.po
index 728c5cee24..4419591d4d 100644
--- a/library/curses.panel.po
+++ b/library/curses.panel.po
@@ -35,7 +35,7 @@ msgstr "函式"
#: ../../library/curses.panel.rst:21
msgid "The module :mod:`curses.panel` defines the following functions:"
-msgstr ""
+msgstr ":mod:`curses.panel` 模組定義了以下函式:"
#: ../../library/curses.panel.rst:26
msgid "Returns the bottom panel in the panel stack."
diff --git a/library/curses.po b/library/curses.po
index 669c6cc5dc..9bb373d7b3 100644
--- a/library/curses.po
+++ b/library/curses.po
@@ -42,7 +42,7 @@ msgstr ""
#: ../../includes/wasm-mobile-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-mobile-notavail.rst:5
msgid ""
@@ -108,7 +108,7 @@ msgstr "函式"
#: ../../library/curses.rst:55
msgid "The module :mod:`curses` defines the following exception:"
-msgstr ""
+msgstr ":mod:`curses` 模組定義了以下例外:"
#: ../../library/curses.rst:60
msgid "Exception raised when a curses library function returns an error."
@@ -123,7 +123,7 @@ msgstr ""
#: ../../library/curses.rst:68
msgid "The module :mod:`curses` defines the following functions:"
-msgstr ""
+msgstr ":mod:`curses` 模組定義了以下函式:"
#: ../../library/curses.rst:73
msgid ""
@@ -1468,7 +1468,7 @@ msgstr ""
#: ../../library/curses.rst:1313
msgid "The :mod:`curses` module defines the following data members:"
-msgstr ""
+msgstr ":mod:`curses` 模組定義了以下資料成員:"
#: ../../library/curses.rst:1318
msgid ""
@@ -2373,7 +2373,7 @@ msgstr ""
#: ../../library/curses.rst:1818
msgid "The module :mod:`curses.textpad` defines the following function:"
-msgstr ""
+msgstr ":mod:`curses.textpad` 模組定義了以下函式:"
#: ../../library/curses.rst:1823
msgid ""
diff --git a/library/dataclasses.po b/library/dataclasses.po
index 2b181acb28..b1863227bc 100644
--- a/library/dataclasses.po
+++ b/library/dataclasses.po
@@ -1458,7 +1458,7 @@ msgid ""
"Python stores default member variable values in class attributes. Consider "
"this example, not using dataclasses::"
msgstr ""
-"Python 將預設成員變數值存儲在類別屬性中。考慮這個例子,不使用資料類別: ::"
+"Python 將預設成員變數值儲存在類別屬性中。考慮這個例子,不使用資料類別: ::"
#: ../../library/dataclasses.rst:742
msgid ""
diff --git a/library/datetime.po b/library/datetime.po
index 7497e0bffb..5078659845 100644
--- a/library/datetime.po
+++ b/library/datetime.po
@@ -1394,7 +1394,7 @@ msgstr ""
#: ../../library/datetime.rst:882
msgid "Constructor:"
-msgstr ""
+msgstr "建構函式:"
#: ../../library/datetime.rst:886
msgid ""
@@ -1433,7 +1433,7 @@ msgstr "``0 <= microsecond < 1000000``,"
#: ../../library/datetime.rst:897 ../../library/datetime.rst:1775
msgid "``fold in [0, 1]``."
-msgstr ""
+msgstr "``fold in [0, 1]``。"
#: ../../library/datetime.rst:901 ../../library/datetime.rst:1342
#: ../../library/datetime.rst:1920
diff --git a/library/dbm.po b/library/dbm.po
index 473658aa90..70cf899c11 100644
--- a/library/dbm.po
+++ b/library/dbm.po
@@ -237,7 +237,7 @@ msgstr ""
#: ../../library/dbm.rst:148
msgid ":mod:`dbm.sqlite3` --- SQLite backend for dbm"
-msgstr ""
+msgstr ":mod:`dbm.sqlite3` --- dbm 的 SQLite 後端"
#: ../../library/dbm.rst:156
msgid "**Source code:** :source:`Lib/dbm/sqlite3.py`"
@@ -253,7 +253,7 @@ msgstr ""
#: ../../includes/wasm-mobile-notavail.rst:3 ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/difflib.po b/library/difflib.po
index f637faac83..c0d1130505 100644
--- a/library/difflib.po
+++ b/library/difflib.po
@@ -1,4 +1,4 @@
-# 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.
#
# Translators:
@@ -471,7 +471,7 @@ msgstr ""
#: ../../library/difflib.rst:399
msgid ":class:`SequenceMatcher` objects have the following methods:"
-msgstr ""
+msgstr ":class:`SequenceMatcher` 物件有以下方法:"
#: ../../library/difflib.rst:403
msgid "Set the two sequences to be compared."
@@ -590,7 +590,7 @@ msgstr "``'replace'``"
#: ../../library/difflib.rst:498
msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``."
-msgstr ""
+msgstr "``a[i1:i2]`` 應該被替換為 ``b[j1:j2]``。"
#: ../../library/difflib.rst:501
msgid "``'delete'``"
@@ -598,7 +598,7 @@ msgstr "``'delete'``"
#: ../../library/difflib.rst:501
msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case."
-msgstr ""
+msgstr "``a[i1:i2]`` 應該被刪除。請注意,在這種情況下 ``j1 == j2``。"
#: ../../library/difflib.rst:504
msgid "``'insert'``"
@@ -781,7 +781,7 @@ msgstr ""
#: ../../library/difflib.rst:649
msgid "The :class:`Differ` class has this constructor:"
-msgstr ""
+msgstr ":class:`Differ` 類別有這個建構函式:"
#: ../../library/difflib.rst:655
msgid ""
@@ -867,7 +867,7 @@ msgstr ""
#: ../../library/difflib.rst:757
msgid "A command-line interface to difflib"
-msgstr ""
+msgstr "difflib 的命令列介面"
#: ../../library/difflib.rst:759
msgid ""
@@ -940,6 +940,69 @@ msgid ""
"if __name__ == '__main__':\n"
" main()\n"
msgstr ""
+"\"\"\" Command line interface to difflib.py providing diffs in four "
+"formats:\n"
+"\n"
+"* ndiff: lists every line and highlights interline changes.\n"
+"* context: highlights clusters of changes in a before/after format.\n"
+"* unified: highlights clusters of changes in an inline format.\n"
+"* html: generates side by side comparison with change highlights.\n"
+"\n"
+"\"\"\"\n"
+"\n"
+"import sys, os, difflib, argparse\n"
+"from datetime import datetime, timezone\n"
+"\n"
+"def file_mtime(path):\n"
+" t = datetime.fromtimestamp(os.stat(path).st_mtime,\n"
+" timezone.utc)\n"
+" return t.astimezone().isoformat()\n"
+"\n"
+"def main():\n"
+"\n"
+" parser = argparse.ArgumentParser()\n"
+" parser.add_argument('-c', action='store_true', default=False,\n"
+" help='Produce a context format diff (default)')\n"
+" parser.add_argument('-u', action='store_true', default=False,\n"
+" help='Produce a unified format diff')\n"
+" parser.add_argument('-m', action='store_true', default=False,\n"
+" help='Produce HTML side by side diff '\n"
+" '(can use -c and -l in conjunction)')\n"
+" parser.add_argument('-n', action='store_true', default=False,\n"
+" help='Produce a ndiff format diff')\n"
+" parser.add_argument('-l', '--lines', type=int, default=3,\n"
+" help='Set number of context lines (default 3)')\n"
+" parser.add_argument('fromfile')\n"
+" parser.add_argument('tofile')\n"
+" options = parser.parse_args()\n"
+"\n"
+" n = options.lines\n"
+" fromfile = options.fromfile\n"
+" tofile = options.tofile\n"
+"\n"
+" fromdate = file_mtime(fromfile)\n"
+" todate = file_mtime(tofile)\n"
+" with open(fromfile) as ff:\n"
+" fromlines = ff.readlines()\n"
+" with open(tofile) as tf:\n"
+" tolines = tf.readlines()\n"
+"\n"
+" if options.u:\n"
+" diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, "
+"fromdate, todate, n=n)\n"
+" elif options.n:\n"
+" diff = difflib.ndiff(fromlines, tolines)\n"
+" elif options.m:\n"
+" diff = difflib.HtmlDiff().make_file(fromlines,tolines,fromfile,"
+"tofile,context=options.c,numlines=n)\n"
+" else:\n"
+" diff = difflib.context_diff(fromlines, tolines, fromfile, tofile, "
+"fromdate, todate, n=n)\n"
+"\n"
+" sys.stdout.writelines(diff)\n"
+"\n"
+"if __name__ == '__main__':\n"
+" main()\n"
#: ../../library/difflib.rst:764
msgid "ndiff example"
diff --git a/library/dis.po b/library/dis.po
index e1585fde13..d6ce62924e 100644
--- a/library/dis.po
+++ b/library/dis.po
@@ -286,7 +286,7 @@ msgstr ""
#: ../../library/dis.rst:196
msgid "Analysis functions"
-msgstr ""
+msgstr "分析函式"
#: ../../library/dis.rst:198
msgid ""
@@ -504,7 +504,7 @@ msgstr ""
#: ../../library/dis.rst:397
msgid "Python Bytecode Instructions"
-msgstr ""
+msgstr "Python 位元組碼指令"
#: ../../library/dis.rst:399
msgid ""
@@ -514,7 +514,7 @@ msgstr ""
#: ../../library/dis.rst:404
msgid "Details for a bytecode operation"
-msgstr ""
+msgstr "位元組碼操作的詳細資訊"
#: ../../library/dis.rst:408
msgid ""
@@ -524,7 +524,7 @@ msgstr ""
#: ../../library/dis.rst:414
msgid "human readable name for operation"
-msgstr ""
+msgstr "操作的可讀名稱"
#: ../../library/dis.rst:419
msgid ""
@@ -544,7 +544,7 @@ msgstr ""
#: ../../library/dis.rst:435
msgid "alias for :data:`arg`"
-msgstr ""
+msgstr ":data:`arg` 的別名。"
#: ../../library/dis.rst:439
msgid "resolved arg value (if any), otherwise ``None``"
@@ -634,7 +634,7 @@ msgstr ""
#: ../../library/dis.rst:533
msgid "**General instructions**"
-msgstr ""
+msgstr "**一般指令**"
#: ../../library/dis.rst:535
msgid ""
@@ -723,11 +723,11 @@ msgstr ""
#: ../../library/dis.rst:615
msgid "Implements ``STACK[-1] = -STACK[-1]``."
-msgstr ""
+msgstr "實作 ``STACK[-1] = -STACK[-1]``。"
#: ../../library/dis.rst:620
msgid "Implements ``STACK[-1] = not STACK[-1]``."
-msgstr ""
+msgstr "實作 ``STACK[-1] = not STACK[-1]``。"
#: ../../library/dis.rst:622 ../../library/dis.rst:1318
#: ../../library/dis.rst:1334
@@ -736,11 +736,11 @@ msgstr ""
#: ../../library/dis.rst:628
msgid "Implements ``STACK[-1] = ~STACK[-1]``."
-msgstr ""
+msgstr "實作 ``STACK[-1] = ~STACK[-1]``。"
#: ../../library/dis.rst:633
msgid "Implements ``STACK[-1] = iter(STACK[-1])``."
-msgstr ""
+msgstr "實作 ``STACK[-1] = iter(STACK[-1])``。"
#: ../../library/dis.rst:638
msgid ""
@@ -1658,11 +1658,11 @@ msgstr ""
#: ../../library/dis.rst:1507 ../../library/dis.rst:1531
msgid "``self`` or ``NULL``"
-msgstr ""
+msgstr "``self`` 或 ``NULL``"
#: ../../library/dis.rst:1508 ../../library/dis.rst:1532
msgid "The remaining positional arguments"
-msgstr ""
+msgstr "剩餘的位置引數"
#: ../../library/dis.rst:1510
msgid "``argc`` is the total of the positional arguments, excluding ``self``."
@@ -2316,9 +2316,3 @@ msgstr "built-in function(內建函式)"
#: ../../library/dis.rst:1602
msgid "slice"
msgstr "slice(切片)"
-
-#~ msgid "or:"
-#~ msgstr "或:"
-
-#~ msgid "``self``"
-#~ msgstr "``self``"
diff --git a/library/doctest.po b/library/doctest.po
index e23645d07a..1e8a7c2bce 100644
--- a/library/doctest.po
+++ b/library/doctest.po
@@ -2034,7 +2034,7 @@ msgstr ""
#: ../../library/doctest.rst:1383
msgid ":class:`DocTestFinder` defines the following method:"
-msgstr ""
+msgstr ":class:`DocTestFinder` 定義了以下方法:"
#: ../../library/doctest.rst:1388
msgid ""
@@ -2107,7 +2107,7 @@ msgstr ""
#: ../../library/doctest.rst:1435
msgid ":class:`DocTestParser` defines the following methods:"
-msgstr ""
+msgstr ":class:`DocTestParser` 定義了以下方法:"
#: ../../library/doctest.rst:1440
msgid ""
@@ -2218,7 +2218,7 @@ msgstr ""
#: ../../library/doctest.rst:1528
msgid ":class:`DocTestRunner` defines the following methods:"
-msgstr ""
+msgstr ":class:`DocTestRunner` 定義了以下方法:"
#: ../../library/doctest.rst:1533
msgid ""
@@ -2343,7 +2343,7 @@ msgstr ""
#: ../../library/doctest.rst:1637
msgid ":class:`OutputChecker` defines the following methods:"
-msgstr ""
+msgstr ":class:`OutputChecker` 定義了以下方法:"
#: ../../library/doctest.rst:1641
msgid ""
@@ -2682,7 +2682,7 @@ msgstr ""
#: ../../library/doctest.rst:1863
msgid ":exc:`UnexpectedException` defines the following attributes:"
-msgstr ""
+msgstr ":exc:`UnexpectedException` 定義了以下屬性:"
#: ../../library/doctest.rst:1878
msgid ""
diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po
index 7d6b290f43..79898d5d74 100644
--- a/library/email.headerregistry.po
+++ b/library/email.headerregistry.po
@@ -73,7 +73,7 @@ msgstr ""
#: ../../library/email.headerregistry.rst:48
msgid "This base class defines the following read-only properties:"
-msgstr ""
+msgstr "這個基底類別定義了以下唯讀屬性:"
#: ../../library/email.headerregistry.rst:53
msgid ""
@@ -535,7 +535,7 @@ msgstr "MessageIDHeader"
#: ../../library/email.headerregistry.rst:345
msgid "``HeaderRegistry`` has the following methods:"
-msgstr ""
+msgstr "``HeaderRegistry`` 有以下方法:"
#: ../../library/email.headerregistry.rst:350
msgid ""
diff --git a/library/ensurepip.po b/library/ensurepip.po
index a3793b5fd2..9055ad0aac 100644
--- a/library/ensurepip.po
+++ b/library/ensurepip.po
@@ -77,7 +77,7 @@ msgstr "此模組的最初設計理念與規範。"
#: ../../includes/wasm-mobile-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-mobile-notavail.rst:5
msgid ""
diff --git a/library/errno.po b/library/errno.po
index 8da2253e03..53fcac01e5 100644
--- a/library/errno.po
+++ b/library/errno.po
@@ -693,7 +693,7 @@ msgstr ""
#: ../../library/errno.rst:838
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/errno.rst:845
msgid "Operation canceled"
diff --git a/library/fcntl.po b/library/fcntl.po
index 69d45662a5..bf6a8ef814 100644
--- a/library/fcntl.po
+++ b/library/fcntl.po
@@ -32,7 +32,7 @@ msgstr ""
#: ../../library/fcntl.rst:21
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/fcntl.rst:23
msgid ""
@@ -110,7 +110,7 @@ msgstr ""
#: ../../library/fcntl.rst:82
msgid "The module defines the following functions:"
-msgstr ""
+msgstr "這個模組定義了以下函式:"
#: ../../library/fcntl.rst:87
msgid ""
diff --git a/library/filecmp.po b/library/filecmp.po
index 350f3717b1..03990f1fdc 100644
--- a/library/filecmp.po
+++ b/library/filecmp.po
@@ -35,7 +35,7 @@ msgstr ""
#: ../../library/filecmp.rst:17
msgid "The :mod:`filecmp` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`filecmp` 模組定義了以下函式:"
#: ../../library/filecmp.rst:22
msgid ""
diff --git a/library/fileinput.po b/library/fileinput.po
index 92b59172fd..6c58733102 100644
--- a/library/fileinput.po
+++ b/library/fileinput.po
@@ -67,7 +67,7 @@ msgstr ""
#: ../../library/fileinput.rst:35
msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`."
-msgstr ""
+msgstr ":exc:`IOError` 曾經被引發;現在它是一個 :exc:`OSError` 的別名。"
#: ../../library/fileinput.rst:38
msgid ""
diff --git a/library/fractions.po b/library/fractions.po
index 19f4409273..92a898b867 100644
--- a/library/fractions.po
+++ b/library/fractions.po
@@ -135,7 +135,7 @@ msgstr ""
msgid ""
"The :class:`Fraction` constructor now accepts :class:`float` "
"and :class:`decimal.Decimal` instances."
-msgstr ""
+msgstr ":class:`Fraction` 建構函式現在可接受 :class:`float` 和 :class:`decimal.Decimal` 實例。"
#: ../../library/fractions.rst:88
msgid ""
diff --git a/library/ftplib.po b/library/ftplib.po
index ee1c0a319e..8c47a8eb7e 100644
--- a/library/ftplib.po
+++ b/library/ftplib.po
@@ -47,7 +47,7 @@ msgstr "預設編碼是 UTF-8,遵循 :rfc:`2640`。"
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/gettext.po b/library/gettext.po
index c7634d5d75..3c6b357a30 100644
--- a/library/gettext.po
+++ b/library/gettext.po
@@ -44,7 +44,7 @@ msgstr ""
#: ../../library/gettext.rst:26
msgid "GNU :program:`gettext` API"
-msgstr ""
+msgstr "GNU :program:`gettext` API"
#: ../../library/gettext.rst:28
msgid ""
@@ -227,7 +227,7 @@ msgstr ""
#: ../../library/gettext.rst:169
msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`."
-msgstr ""
+msgstr ":exc:`IOError` 曾經被引發,現在它是一個 :exc:`OSError` 的別名。"
#: ../../library/gettext.rst:172
msgid "*codeset* parameter is removed."
diff --git a/library/glob.po b/library/glob.po
index 610ddefb58..0bdd842e89 100644
--- a/library/glob.po
+++ b/library/glob.po
@@ -62,7 +62,7 @@ msgstr ""
#: ../../library/glob.rst:37
msgid "The :mod:`glob` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`glob` 模組定義了以下函式:"
#: ../../library/glob.rst:43
msgid ""
@@ -162,7 +162,7 @@ msgid ""
"Return an :term:`iterator` which yields the same values as :func:`glob` "
"without actually storing them all simultaneously."
msgstr ""
-"回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時存儲全"
+"回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時儲存全"
"部的值。"
#: ../../library/glob.rst:117
diff --git a/library/hashlib.po b/library/hashlib.po
index f2b02c5096..358886b433 100644
--- a/library/hashlib.po
+++ b/library/hashlib.po
@@ -1034,9 +1034,9 @@ msgid ""
"force the application to make the hash inputs the same. Personalizing each "
"hash function used in the protocol summarily stops this type of attack."
msgstr ""
-"我們建議所有應用程式設計者認真考慮這樣做;我們已經看到許多協議,其中在協議的"
+"我們建議所有應用程式設計者認真考慮這樣做;我們已經看到許多協定,其中在協定的"
"一個部分中計算的雜湊可以在完全不同的部分中使用,因為兩次雜湊計算是在相似或相"
-"關的資料上完成的,並且攻擊者可以強制應用程式將雜湊輸入設為相同的。對協議中使"
+"關的資料上完成的,並且攻擊者可以強制應用程式將雜湊輸入設為相同的。對協定中使"
"用的每個雜湊函式進行個人化可以立即阻止此類攻擊。"
#: ../../library/hashlib.rst:706
diff --git a/library/http.client.po b/library/http.client.po
index e8becdcaee..c3e3da13b6 100644
--- a/library/http.client.po
+++ b/library/http.client.po
@@ -46,7 +46,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/http.po b/library/http.po
index f1803bc12b..72639c5787 100644
--- a/library/http.po
+++ b/library/http.po
@@ -40,7 +40,7 @@ msgid ""
":mod:`http.client` is a low-level HTTP protocol client; for high-level URL "
"opening use :mod:`urllib.request`"
msgstr ""
-":mod:`http.client` 是一個低階的 HTTP 協定客戶端;對於高階的 URL 存取請使"
+":mod:`http.client` 是一個低階的 HTTP 協定用戶端;對於高階的 URL 存取請使"
"用 :mod:`urllib.request`"
#: ../../library/http.rst:20
diff --git a/library/http.server.po b/library/http.server.po
index eee3322781..63505924a4 100644
--- a/library/http.server.po
+++ b/library/http.server.po
@@ -37,7 +37,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -110,7 +110,7 @@ msgstr ""
#: ../../library/http.server.rst:73
msgid ":class:`BaseHTTPRequestHandler` has the following instance variables:"
-msgstr ""
+msgstr ":class:`BaseHTTPRequestHandler` 有以下實例變數:"
#: ../../library/http.server.rst:77
msgid ""
@@ -240,7 +240,7 @@ msgstr ""
#: ../../library/http.server.rst:184
msgid "A :class:`BaseHTTPRequestHandler` instance has the following methods:"
-msgstr ""
+msgstr ":class:`BaseHTTPRequestHandler` 實例擁有以下方法:"
#: ../../library/http.server.rst:188
msgid ""
@@ -443,7 +443,7 @@ msgstr ""
#: ../../library/http.server.rst:359
msgid ""
"The :class:`SimpleHTTPRequestHandler` class defines the following methods:"
-msgstr ""
+msgstr ":class:`SimpleHTTPRequestHandler` 類別定義了以下方法:"
#: ../../library/http.server.rst:363
msgid ""
@@ -571,7 +571,7 @@ msgstr ""
#: ../../library/http.server.rst:443
msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:"
-msgstr ""
+msgstr ":class:`CGIHTTPRequestHandler` 類別定義了以下資料成員:"
#: ../../library/http.server.rst:447
msgid ""
@@ -581,7 +581,7 @@ msgstr ""
#: ../../library/http.server.rst:450
msgid "The :class:`CGIHTTPRequestHandler` defines the following method:"
-msgstr ""
+msgstr ":class:`CGIHTTPRequestHandler` 類別定義了以下方法:"
#: ../../library/http.server.rst:454
msgid ""
diff --git a/library/imaplib.po b/library/imaplib.po
index 353026d0e6..2cdc167ac7 100644
--- a/library/imaplib.po
+++ b/library/imaplib.po
@@ -19,7 +19,7 @@ msgstr ""
#: ../../library/imaplib.rst:2
msgid ":mod:`!imaplib` --- IMAP4 protocol client"
-msgstr ":mod:`!imaplib` --- IMAP4 協定客戶端"
+msgstr ":mod:`!imaplib` --- IMAP4 協定用戶端"
#: ../../library/imaplib.rst:14
msgid "**Source code:** :source:`Lib/imaplib.py`"
@@ -36,7 +36,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -261,7 +261,7 @@ msgstr ""
#: ../../library/imaplib.rst:202
msgid "An :class:`IMAP4` instance has the following methods:"
-msgstr ""
+msgstr ":class:`IMAP4` 實例擁有以下方法:"
#: ../../library/imaplib.rst:207
msgid "Append *message* to named mailbox."
diff --git a/library/importlib.po b/library/importlib.po
index 4c36d9ea83..5b13da4ec6 100644
--- a/library/importlib.po
+++ b/library/importlib.po
@@ -1540,7 +1540,7 @@ msgstr ""
#: ../../library/importlib.rst:1288
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/importlib.rst:1296
msgid "Path to the ``.fwork`` file for the extension module."
diff --git a/library/language.po b/library/language.po
index faf9fb5c18..bed2481ca4 100644
--- a/library/language.po
+++ b/library/language.po
@@ -28,7 +28,7 @@ msgid ""
"bytecode disassembly, and various other facilities."
msgstr ""
"Python 提供了許多模組來協助處理 Python 語言。這些模組支援標記化、剖析、語法分"
-"析、位元碼反組譯,以及其他各種設施。"
+"析、位元組碼反組譯,以及其他各種設施。"
#: ../../library/language.rst:11
msgid "These modules include:"
diff --git a/library/linecache.po b/library/linecache.po
index 167947f253..cdb7ae4122 100644
--- a/library/linecache.po
+++ b/library/linecache.po
@@ -3,13 +3,14 @@
# This file is distributed under the same license as the Python package.
#
# Translators:
+# Weilin Du, 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 16:05+0000\n"
-"Last-Translator: Adrian Liaw \n"
+"PO-Revision-Date: 2025-07-07 23:50+0800\n"
+"Last-Translator: Weilin Du <1372449351@qq.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
@@ -17,6 +18,7 @@ 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"
#: ../../library/linecache.rst:2
msgid ":mod:`!linecache` --- Random access to text lines"
@@ -30,10 +32,14 @@ msgstr "**原始碼:**\\ :source:`Lib/linecache.py`"
msgid ""
"The :mod:`linecache` module allows one to get any line from a Python source "
"file, while attempting to optimize internally, using a cache, the common "
-"case where many lines are read from a single file. This is used by the :mod:"
-"`traceback` module to retrieve source lines for inclusion in the formatted "
-"traceback."
+"case where many lines are read from a single file. This is used by "
+"the :mod:`traceback` module to retrieve source lines for inclusion in the "
+"formatted traceback."
msgstr ""
+":mod:`linecache` 模組允許從 Python 原始碼檔案中取得任何一行。當嘗試在程式內部"
+"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這"
+"被 :mod:`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 "
+"traceback 中。"
#: ../../library/linecache.rst:18
msgid ""
@@ -41,10 +47,13 @@ msgid ""
"uses :func:`tokenize.detect_encoding` to get the encoding of the file; in "
"the absence of an encoding token, the file encoding defaults to UTF-8."
msgstr ""
+":func:`tokenize.open` 函式用來開啟檔案。這個函式使"
+"用 :func:`tokenize.detect_encoding` 來取得檔案的編碼;在沒有編碼標記的情況"
+"下,檔案編碼預設為 UTF-8。"
#: ../../library/linecache.rst:22
msgid "The :mod:`linecache` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`linecache` 模組定義了下列函式:"
#: ../../library/linecache.rst:27
msgid ""
@@ -52,22 +61,31 @@ msgid ""
"an exception --- it will return ``''`` on errors (the terminating newline "
"character will be included for lines that are found)."
msgstr ""
+"從名為 *filename* 的檔案中取得 *lineno* 行。這個函式不會產生例外 --- 它會在出"
+"錯時回傳 ``''`` (找到的行會包含終止換行字元)。"
#: ../../library/linecache.rst:33
msgid ""
-"If a file named *filename* is not found, the function first checks for a :"
-"pep:`302` ``__loader__`` in *module_globals*. If there is such a loader and "
-"it defines a ``get_source`` method, then that determines the source lines "
-"(if ``get_source()`` returns ``None``, then ``''`` is returned). Finally, if "
-"*filename* is a relative filename, it is looked up relative to the entries "
-"in the module search path, ``sys.path``."
+"If a file named *filename* is not found, the function first checks for "
+"a :pep:`302` ``__loader__`` in *module_globals*. If there is such a loader "
+"and it defines a ``get_source`` method, then that determines the source "
+"lines (if ``get_source()`` returns ``None``, then ``''`` is returned). "
+"Finally, if *filename* is a relative filename, it is looked up relative to "
+"the entries in the module search path, ``sys.path``."
msgstr ""
+"如果找不到名為 *filename* 的檔案,函式會先檢查 *module_globals* 中是否"
+"有 :pep:`302` `__loader__` 載入器。如果有這樣一個載入器,而且它定義了一個 "
+"``get_source`` 方法,這之後它就會決定原始碼行(如果 ``get_source()`` 回傳 "
+"``None``,那麼就會回傳 ``''``)。最後,如果 *filename* 是相對的檔案名稱,則會"
+"相對於模組搜尋路徑 ``sys.path`` 中的項目進行搜尋。"
#: ../../library/linecache.rst:44
msgid ""
"Clear the cache. Use this function if you no longer need lines from files "
"previously read using :func:`getline`."
msgstr ""
+"清除快取。如果你不再需要先前使用 :func:`getline` 讀取的檔案行數,請使用此函"
+"式。"
#: ../../library/linecache.rst:50
msgid ""
@@ -75,6 +93,8 @@ msgid ""
"have changed on disk, and you require the updated version. If *filename* is "
"omitted, it will check all the entries in the cache."
msgstr ""
+"檢查快取是否有效。如果快取中的檔案可能已在磁碟上變更,而你需要更新的版本,請"
+"使用此功能。 如果省略 *filename*,則會檢查快取中的所有項目。"
#: ../../library/linecache.rst:56
msgid ""
@@ -83,6 +103,9 @@ msgid ""
"later call. This avoids doing I/O until a line is actually needed, without "
"having to carry the module globals around indefinitely."
msgstr ""
+"即使 *module_globals* 在稍後的呼叫中是 ``None`` ,也可以擷取非檔案型模組的足"
+"夠細節,以允許稍後透過 :func:`getline` 取得其行。這可以避免在真正需要某一行之"
+"前進行 I/O 操作,而不必無限期地帶著模組的全域變數。"
#: ../../library/linecache.rst:63
msgid "Example::"
diff --git a/library/mimetypes.po b/library/mimetypes.po
index fe246b5824..ecad681467 100644
--- a/library/mimetypes.po
+++ b/library/mimetypes.po
@@ -83,7 +83,7 @@ msgstr ""
#: ../../library/mimetypes.rst:54
msgid "Added support for *url* being a :term:`path-like object`."
-msgstr ""
+msgstr "新增 *url* 做為 :term:`path-like object` 的支援。"
#: ../../library/mimetypes.rst:57
msgid ""
@@ -354,7 +354,7 @@ msgstr ""
#: ../../library/mimetypes.rst:292
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/mimetypes.rst:11 ../../library/mimetypes.rst:31
#: ../../library/mimetypes.rst:64
diff --git a/library/mmap.po b/library/mmap.po
index eed8ccc429..59781f63a9 100644
--- a/library/mmap.po
+++ b/library/mmap.po
@@ -23,7 +23,7 @@ msgstr ":mod:`!mmap` --- 記憶體對映檔案的支援"
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/multiprocessing.po b/library/multiprocessing.po
index 77bc4341ef..65fc4b1be7 100644
--- a/library/multiprocessing.po
+++ b/library/multiprocessing.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-06-27 07:36+0000\n"
+"POT-Creation-Date: 2025-07-07 00:17+0000\n"
"PO-Revision-Date: 2018-05-23 16:06+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -27,7 +27,7 @@ msgstr "**原始碼:**\\ :source:`Lib/multiprocessing/`"
#: ../../includes/wasm-mobile-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-mobile-notavail.rst:5
msgid ""
@@ -1665,60 +1665,62 @@ msgstr ""
#: ../../library/multiprocessing.rst:1082
msgid ""
-"If *method* is ``None`` then the default context is returned. Otherwise "
-"*method* should be ``'fork'``, ``'spawn'``, ``'forkserver'``. :exc:"
-"`ValueError` is raised if the specified start method is not available. See :"
-"ref:`multiprocessing-start-methods`."
+"If *method* is ``None`` then the default context is returned. Note that if "
+"the global start method has not been set, this will set it to the default "
+"method. Otherwise *method* should be ``'fork'``, ``'spawn'``, "
+"``'forkserver'``. :exc:`ValueError` is raised if the specified start method "
+"is not available. See :ref:`multiprocessing-start-methods`."
msgstr ""
-#: ../../library/multiprocessing.rst:1091
+#: ../../library/multiprocessing.rst:1093
msgid "Return the name of start method used for starting processes."
msgstr ""
-#: ../../library/multiprocessing.rst:1093
+#: ../../library/multiprocessing.rst:1095
msgid ""
-"If the start method has not been fixed and *allow_none* is false, then the "
-"start method is fixed to the default and the name is returned. If the start "
-"method has not been fixed and *allow_none* is true then ``None`` is returned."
+"If the global start method has not been set and *allow_none* is ``False``, "
+"then the start method is set to the default and the name is returned. If the "
+"start method has not been set and *allow_none* is ``True`` then ``None`` is "
+"returned."
msgstr ""
-#: ../../library/multiprocessing.rst:1098
+#: ../../library/multiprocessing.rst:1100
msgid ""
"The return value can be ``'fork'``, ``'spawn'``, ``'forkserver'`` or "
"``None``. See :ref:`multiprocessing-start-methods`."
msgstr ""
-#: ../../library/multiprocessing.rst:1105
+#: ../../library/multiprocessing.rst:1107
msgid ""
"On macOS, the *spawn* start method is now the default. The *fork* start "
"method should be considered unsafe as it can lead to crashes of the "
"subprocess. See :issue:`33725`."
msgstr ""
-#: ../../library/multiprocessing.rst:1111
+#: ../../library/multiprocessing.rst:1113
msgid ""
"Set the path of the Python interpreter to use when starting a child process. "
"(By default :data:`sys.executable` is used). Embedders will probably need "
"to do some thing like ::"
msgstr ""
-#: ../../library/multiprocessing.rst:1115
+#: ../../library/multiprocessing.rst:1117
msgid "set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))"
msgstr "set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))"
-#: ../../library/multiprocessing.rst:1117
+#: ../../library/multiprocessing.rst:1119
msgid "before they can create child processes."
msgstr ""
-#: ../../library/multiprocessing.rst:1119
+#: ../../library/multiprocessing.rst:1121
msgid "Now supported on POSIX when the ``'spawn'`` start method is used."
msgstr ""
-#: ../../library/multiprocessing.rst:1122
+#: ../../library/multiprocessing.rst:1124
msgid "Accepts a :term:`path-like object`."
msgstr "接受一個\\ :term:`類路徑物件 `。"
-#: ../../library/multiprocessing.rst:1127
+#: ../../library/multiprocessing.rst:1129
msgid ""
"Set a list of module names for the forkserver main process to attempt to "
"import so that their already imported state is inherited by forked "
@@ -1727,19 +1729,19 @@ msgid ""
"process."
msgstr ""
-#: ../../library/multiprocessing.rst:1133
+#: ../../library/multiprocessing.rst:1135
msgid ""
"For this to work, it must be called before the forkserver process has been "
"launched (before creating a :class:`Pool` or starting a :class:`Process`)."
msgstr ""
-#: ../../library/multiprocessing.rst:1136
+#: ../../library/multiprocessing.rst:1138
msgid ""
"Only meaningful when using the ``'forkserver'`` start method. See :ref:"
"`multiprocessing-start-methods`."
msgstr ""
-#: ../../library/multiprocessing.rst:1143
+#: ../../library/multiprocessing.rst:1145
msgid ""
"Set the method which should be used to start child processes. The *method* "
"argument can be ``'fork'``, ``'spawn'`` or ``'forkserver'``. Raises :exc:"
@@ -1749,17 +1751,17 @@ msgid ""
"then the context is set to the default context."
msgstr ""
-#: ../../library/multiprocessing.rst:1150
+#: ../../library/multiprocessing.rst:1152
msgid ""
"Note that this should be called at most once, and it should be protected "
"inside the ``if __name__ == '__main__'`` clause of the main module."
msgstr ""
-#: ../../library/multiprocessing.rst:1154
+#: ../../library/multiprocessing.rst:1156
msgid "See :ref:`multiprocessing-start-methods`."
msgstr "參閱 :ref:`multiprocessing-start-methods`。"
-#: ../../library/multiprocessing.rst:1160
+#: ../../library/multiprocessing.rst:1162
msgid ""
":mod:`multiprocessing` contains no analogues of :func:`threading."
"active_count`, :func:`threading.enumerate`, :func:`threading.settrace`, :"
@@ -1767,75 +1769,75 @@ msgid ""
"local`."
msgstr ""
-#: ../../library/multiprocessing.rst:1167
+#: ../../library/multiprocessing.rst:1169
msgid "Connection Objects"
msgstr ""
-#: ../../library/multiprocessing.rst:1171
+#: ../../library/multiprocessing.rst:1173
msgid ""
"Connection objects allow the sending and receiving of picklable objects or "
"strings. They can be thought of as message oriented connected sockets."
msgstr ""
-#: ../../library/multiprocessing.rst:1174
+#: ../../library/multiprocessing.rst:1176
msgid ""
"Connection objects are usually created using :func:`Pipe ` -- see also :ref:`multiprocessing-listeners-clients`."
msgstr ""
-#: ../../library/multiprocessing.rst:1182
+#: ../../library/multiprocessing.rst:1184
msgid ""
"Send an object to the other end of the connection which should be read "
"using :meth:`recv`."
msgstr ""
-#: ../../library/multiprocessing.rst:1185
+#: ../../library/multiprocessing.rst:1187
msgid ""
"The object must be picklable. Very large pickles (approximately 32 MiB+, "
"though it depends on the OS) may raise a :exc:`ValueError` exception."
msgstr ""
-#: ../../library/multiprocessing.rst:1190
+#: ../../library/multiprocessing.rst:1192
msgid ""
"Return an object sent from the other end of the connection using :meth:"
"`send`. Blocks until there is something to receive. Raises :exc:`EOFError` "
"if there is nothing left to receive and the other end was closed."
msgstr ""
-#: ../../library/multiprocessing.rst:1197
+#: ../../library/multiprocessing.rst:1199
msgid "Return the file descriptor or handle used by the connection."
msgstr ""
-#: ../../library/multiprocessing.rst:1201
+#: ../../library/multiprocessing.rst:1203
msgid "Close the connection."
msgstr ""
-#: ../../library/multiprocessing.rst:1203
+#: ../../library/multiprocessing.rst:1205
msgid "This is called automatically when the connection is garbage collected."
msgstr ""
-#: ../../library/multiprocessing.rst:1207
+#: ../../library/multiprocessing.rst:1209
msgid "Return whether there is any data available to be read."
msgstr ""
-#: ../../library/multiprocessing.rst:1209
+#: ../../library/multiprocessing.rst:1211
msgid ""
"If *timeout* is not specified then it will return immediately. If *timeout* "
"is a number then this specifies the maximum time in seconds to block. If "
"*timeout* is ``None`` then an infinite timeout is used."
msgstr ""
-#: ../../library/multiprocessing.rst:1213
+#: ../../library/multiprocessing.rst:1215
msgid ""
"Note that multiple connection objects may be polled at once by using :func:"
"`multiprocessing.connection.wait`."
msgstr ""
-#: ../../library/multiprocessing.rst:1218
+#: ../../library/multiprocessing.rst:1220
msgid "Send byte data from a :term:`bytes-like object` as a complete message."
msgstr ""
-#: ../../library/multiprocessing.rst:1220
+#: ../../library/multiprocessing.rst:1222
msgid ""
"If *offset* is given then data is read from that position in *buffer*. If "
"*size* is given then that many bytes will be read from buffer. Very large "
@@ -1843,7 +1845,7 @@ msgid ""
"exc:`ValueError` exception"
msgstr ""
-#: ../../library/multiprocessing.rst:1227
+#: ../../library/multiprocessing.rst:1229
msgid ""
"Return a complete message of byte data sent from the other end of the "
"connection as a string. Blocks until there is something to receive. Raises :"
@@ -1851,19 +1853,19 @@ msgid ""
"closed."
msgstr ""
-#: ../../library/multiprocessing.rst:1232
+#: ../../library/multiprocessing.rst:1234
msgid ""
"If *maxlength* is specified and the message is longer than *maxlength* then :"
"exc:`OSError` is raised and the connection will no longer be readable."
msgstr ""
-#: ../../library/multiprocessing.rst:1236
+#: ../../library/multiprocessing.rst:1238
msgid ""
"This function used to raise :exc:`IOError`, which is now an alias of :exc:"
"`OSError`."
msgstr ""
-#: ../../library/multiprocessing.rst:1243
+#: ../../library/multiprocessing.rst:1245
msgid ""
"Read into *buffer* a complete message of byte data sent from the other end "
"of the connection and return the number of bytes in the message. Blocks "
@@ -1871,38 +1873,38 @@ msgid ""
"nothing left to receive and the other end was closed."
msgstr ""
-#: ../../library/multiprocessing.rst:1249
+#: ../../library/multiprocessing.rst:1251
msgid ""
"*buffer* must be a writable :term:`bytes-like object`. If *offset* is given "
"then the message will be written into the buffer from that position. Offset "
"must be a non-negative integer less than the length of *buffer* (in bytes)."
msgstr ""
-#: ../../library/multiprocessing.rst:1254
+#: ../../library/multiprocessing.rst:1256
msgid ""
"If the buffer is too short then a :exc:`BufferTooShort` exception is raised "
"and the complete message is available as ``e.args[0]`` where ``e`` is the "
"exception instance."
msgstr ""
-#: ../../library/multiprocessing.rst:1258
+#: ../../library/multiprocessing.rst:1260
msgid ""
"Connection objects themselves can now be transferred between processes "
"using :meth:`Connection.send` and :meth:`Connection.recv`."
msgstr ""
-#: ../../library/multiprocessing.rst:1262
+#: ../../library/multiprocessing.rst:1264
msgid ""
"Connection objects also now support the context management protocol -- see :"
"ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the "
"connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`."
msgstr ""
-#: ../../library/multiprocessing.rst:1266
+#: ../../library/multiprocessing.rst:1268
msgid "For example:"
msgstr "舉例來說:"
-#: ../../library/multiprocessing.rst:1268
+#: ../../library/multiprocessing.rst:1270
msgid ""
">>> from multiprocessing import Pipe\n"
">>> a, b = Pipe()\n"
@@ -1938,14 +1940,14 @@ msgstr ""
">>> arr2\n"
"array('i', [0, 1, 2, 3, 4, 0, 0, 0, 0, 0])"
-#: ../../library/multiprocessing.rst:1291
+#: ../../library/multiprocessing.rst:1293
msgid ""
"The :meth:`Connection.recv` method automatically unpickles the data it "
"receives, which can be a security risk unless you can trust the process "
"which sent the message."
msgstr ""
-#: ../../library/multiprocessing.rst:1295
+#: ../../library/multiprocessing.rst:1297
msgid ""
"Therefore, unless the connection object was produced using :func:`Pipe` you "
"should only use the :meth:`~Connection.recv` and :meth:`~Connection.send` "
@@ -1953,73 +1955,73 @@ msgid ""
"`multiprocessing-auth-keys`."
msgstr ""
-#: ../../library/multiprocessing.rst:1302
+#: ../../library/multiprocessing.rst:1304
msgid ""
"If a process is killed while it is trying to read or write to a pipe then "
"the data in the pipe is likely to become corrupted, because it may become "
"impossible to be sure where the message boundaries lie."
msgstr ""
-#: ../../library/multiprocessing.rst:1308
+#: ../../library/multiprocessing.rst:1310
msgid "Synchronization primitives"
msgstr ""
-#: ../../library/multiprocessing.rst:1312
+#: ../../library/multiprocessing.rst:1314
msgid ""
"Generally synchronization primitives are not as necessary in a multiprocess "
"program as they are in a multithreaded program. See the documentation for :"
"mod:`threading` module."
msgstr ""
-#: ../../library/multiprocessing.rst:1316
+#: ../../library/multiprocessing.rst:1318
msgid ""
"Note that one can also create synchronization primitives by using a manager "
"object -- see :ref:`multiprocessing-managers`."
msgstr ""
-#: ../../library/multiprocessing.rst:1321
+#: ../../library/multiprocessing.rst:1323
msgid "A barrier object: a clone of :class:`threading.Barrier`."
msgstr ""
-#: ../../library/multiprocessing.rst:1327
+#: ../../library/multiprocessing.rst:1329
msgid ""
"A bounded semaphore object: a close analog of :class:`threading."
"BoundedSemaphore`."
msgstr ""
-#: ../../library/multiprocessing.rst:1330
-#: ../../library/multiprocessing.rst:1468
+#: ../../library/multiprocessing.rst:1332
+#: ../../library/multiprocessing.rst:1470
msgid ""
"A solitary difference from its close analog exists: its ``acquire`` method's "
"first argument is named *block*, as is consistent with :meth:`Lock.acquire`."
msgstr ""
-#: ../../library/multiprocessing.rst:1334
+#: ../../library/multiprocessing.rst:1336
msgid ""
"On macOS, this is indistinguishable from :class:`Semaphore` because "
"``sem_getvalue()`` is not implemented on that platform."
msgstr ""
-#: ../../library/multiprocessing.rst:1339
+#: ../../library/multiprocessing.rst:1341
msgid "A condition variable: an alias for :class:`threading.Condition`."
msgstr ""
-#: ../../library/multiprocessing.rst:1341
+#: ../../library/multiprocessing.rst:1343
msgid ""
"If *lock* is specified then it should be a :class:`Lock` or :class:`RLock` "
"object from :mod:`multiprocessing`."
msgstr ""
-#: ../../library/multiprocessing.rst:1344
-#: ../../library/multiprocessing.rst:1882
+#: ../../library/multiprocessing.rst:1346
+#: ../../library/multiprocessing.rst:1884
msgid "The :meth:`~threading.Condition.wait_for` method was added."
msgstr ""
-#: ../../library/multiprocessing.rst:1349
+#: ../../library/multiprocessing.rst:1351
msgid "A clone of :class:`threading.Event`."
msgstr ""
-#: ../../library/multiprocessing.rst:1354
+#: ../../library/multiprocessing.rst:1356
msgid ""
"A non-recursive lock object: a close analog of :class:`threading.Lock`. Once "
"a process or thread has acquired a lock, subsequent attempts to acquire it "
@@ -2030,25 +2032,25 @@ msgid ""
"as noted."
msgstr ""
-#: ../../library/multiprocessing.rst:1362
+#: ../../library/multiprocessing.rst:1364
msgid ""
"Note that :class:`Lock` is actually a factory function which returns an "
"instance of ``multiprocessing.synchronize.Lock`` initialized with a default "
"context."
msgstr ""
-#: ../../library/multiprocessing.rst:1366
+#: ../../library/multiprocessing.rst:1368
msgid ""
":class:`Lock` supports the :term:`context manager` protocol and thus may be "
"used in :keyword:`with` statements."
msgstr ""
-#: ../../library/multiprocessing.rst:1371
-#: ../../library/multiprocessing.rst:1422
+#: ../../library/multiprocessing.rst:1373
+#: ../../library/multiprocessing.rst:1424
msgid "Acquire a lock, blocking or non-blocking."
msgstr ""
-#: ../../library/multiprocessing.rst:1373
+#: ../../library/multiprocessing.rst:1375
msgid ""
"With the *block* argument set to ``True`` (the default), the method call "
"will block until the lock is in an unlocked state, then set it to locked and "
@@ -2056,14 +2058,14 @@ msgid ""
"that in :meth:`threading.Lock.acquire`."
msgstr ""
-#: ../../library/multiprocessing.rst:1378
+#: ../../library/multiprocessing.rst:1380
msgid ""
"With the *block* argument set to ``False``, the method call does not block. "
"If the lock is currently in a locked state, return ``False``; otherwise set "
"the lock to a locked state and return ``True``."
msgstr ""
-#: ../../library/multiprocessing.rst:1382
+#: ../../library/multiprocessing.rst:1384
msgid ""
"When invoked with a positive, floating-point value for *timeout*, block for "
"at most the number of seconds specified by *timeout* as long as the lock can "
@@ -2077,19 +2079,19 @@ msgid ""
"acquired or ``False`` if the timeout period has elapsed."
msgstr ""
-#: ../../library/multiprocessing.rst:1397
+#: ../../library/multiprocessing.rst:1399
msgid ""
"Release a lock. This can be called from any process or thread, not only the "
"process or thread which originally acquired the lock."
msgstr ""
-#: ../../library/multiprocessing.rst:1400
+#: ../../library/multiprocessing.rst:1402
msgid ""
"Behavior is the same as in :meth:`threading.Lock.release` except that when "
"invoked on an unlocked lock, a :exc:`ValueError` is raised."
msgstr ""
-#: ../../library/multiprocessing.rst:1406
+#: ../../library/multiprocessing.rst:1408
msgid ""
"A recursive lock object: a close analog of :class:`threading.RLock`. A "
"recursive lock must be released by the process or thread that acquired it. "
@@ -2098,20 +2100,20 @@ msgid ""
"release it once for each time it has been acquired."
msgstr ""
-#: ../../library/multiprocessing.rst:1412
+#: ../../library/multiprocessing.rst:1414
msgid ""
"Note that :class:`RLock` is actually a factory function which returns an "
"instance of ``multiprocessing.synchronize.RLock`` initialized with a default "
"context."
msgstr ""
-#: ../../library/multiprocessing.rst:1416
+#: ../../library/multiprocessing.rst:1418
msgid ""
":class:`RLock` supports the :term:`context manager` protocol and thus may be "
"used in :keyword:`with` statements."
msgstr ""
-#: ../../library/multiprocessing.rst:1424
+#: ../../library/multiprocessing.rst:1426
msgid ""
"When invoked with the *block* argument set to ``True``, block until the lock "
"is in an unlocked state (not owned by any process or thread) unless the lock "
@@ -2124,7 +2126,7 @@ msgid ""
"itself."
msgstr ""
-#: ../../library/multiprocessing.rst:1434
+#: ../../library/multiprocessing.rst:1436
msgid ""
"When invoked with the *block* argument set to ``False``, do not block. If "
"the lock has already been acquired (and thus is owned) by another process or "
@@ -2135,14 +2137,14 @@ msgid ""
"a return value of ``True``."
msgstr ""
-#: ../../library/multiprocessing.rst:1442
+#: ../../library/multiprocessing.rst:1444
msgid ""
"Use and behaviors of the *timeout* argument are the same as in :meth:`Lock."
"acquire`. Note that some of these behaviors of *timeout* differ from the "
"implemented behaviors in :meth:`threading.RLock.acquire`."
msgstr ""
-#: ../../library/multiprocessing.rst:1449
+#: ../../library/multiprocessing.rst:1451
msgid ""
"Release a lock, decrementing the recursion level. If after the decrement "
"the recursion level is zero, reset the lock to unlocked (not owned by any "
@@ -2152,7 +2154,7 @@ msgid ""
"locked and owned by the calling process or thread."
msgstr ""
-#: ../../library/multiprocessing.rst:1457
+#: ../../library/multiprocessing.rst:1459
msgid ""
"Only call this method when the calling process or thread owns the lock. An :"
"exc:`AssertionError` is raised if this method is called by a process or "
@@ -2161,17 +2163,17 @@ msgid ""
"from the implemented behavior in :meth:`threading.RLock.release`."
msgstr ""
-#: ../../library/multiprocessing.rst:1466
+#: ../../library/multiprocessing.rst:1468
msgid "A semaphore object: a close analog of :class:`threading.Semaphore`."
msgstr ""
-#: ../../library/multiprocessing.rst:1473
+#: ../../library/multiprocessing.rst:1475
msgid ""
"On macOS, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with a "
"timeout will emulate that function's behavior using a sleeping loop."
msgstr ""
-#: ../../library/multiprocessing.rst:1478
+#: ../../library/multiprocessing.rst:1480
msgid ""
"Some of this package's functionality requires a functioning shared semaphore "
"implementation on the host operating system. Without one, the :mod:"
@@ -2180,32 +2182,32 @@ msgid ""
"additional information."
msgstr ""
-#: ../../library/multiprocessing.rst:1486
+#: ../../library/multiprocessing.rst:1488
msgid "Shared :mod:`ctypes` Objects"
msgstr "共享的 :mod:`ctypes` 物件"
-#: ../../library/multiprocessing.rst:1488
+#: ../../library/multiprocessing.rst:1490
msgid ""
"It is possible to create shared objects using shared memory which can be "
"inherited by child processes."
msgstr ""
-#: ../../library/multiprocessing.rst:1493
+#: ../../library/multiprocessing.rst:1495
msgid ""
"Return a :mod:`ctypes` object allocated from shared memory. By default the "
"return value is actually a synchronized wrapper for the object. The object "
"itself can be accessed via the *value* attribute of a :class:`Value`."
msgstr ""
-#: ../../library/multiprocessing.rst:1497
-#: ../../library/multiprocessing.rst:1584
+#: ../../library/multiprocessing.rst:1499
+#: ../../library/multiprocessing.rst:1586
msgid ""
"*typecode_or_type* determines the type of the returned object: it is either "
"a ctypes type or a one character typecode of the kind used by the :mod:"
"`array` module. *\\*args* is passed on to the constructor for the type."
msgstr ""
-#: ../../library/multiprocessing.rst:1501
+#: ../../library/multiprocessing.rst:1503
msgid ""
"If *lock* is ``True`` (the default) then a new recursive lock object is "
"created to synchronize access to the value. If *lock* is a :class:`Lock` "
@@ -2215,24 +2217,24 @@ msgid ""
"\"process-safe\"."
msgstr ""
-#: ../../library/multiprocessing.rst:1508
+#: ../../library/multiprocessing.rst:1510
msgid ""
"Operations like ``+=`` which involve a read and write are not atomic. So "
"if, for instance, you want to atomically increment a shared value it is "
"insufficient to just do ::"
msgstr ""
-#: ../../library/multiprocessing.rst:1512
+#: ../../library/multiprocessing.rst:1514
msgid "counter.value += 1"
msgstr "counter.value += 1"
-#: ../../library/multiprocessing.rst:1514
+#: ../../library/multiprocessing.rst:1516
msgid ""
"Assuming the associated lock is recursive (which it is by default) you can "
"instead do ::"
msgstr ""
-#: ../../library/multiprocessing.rst:1517
+#: ../../library/multiprocessing.rst:1519
msgid ""
"with counter.get_lock():\n"
" counter.value += 1"
@@ -2240,19 +2242,19 @@ msgstr ""
"with counter.get_lock():\n"
" counter.value += 1"
-#: ../../library/multiprocessing.rst:1520
-#: ../../library/multiprocessing.rst:1610
-#: ../../library/multiprocessing.rst:1625
+#: ../../library/multiprocessing.rst:1522
+#: ../../library/multiprocessing.rst:1612
+#: ../../library/multiprocessing.rst:1627
msgid "Note that *lock* is a keyword-only argument."
msgstr ""
-#: ../../library/multiprocessing.rst:1524
+#: ../../library/multiprocessing.rst:1526
msgid ""
"Return a ctypes array allocated from shared memory. By default the return "
"value is actually a synchronized wrapper for the array."
msgstr ""
-#: ../../library/multiprocessing.rst:1527
+#: ../../library/multiprocessing.rst:1529
msgid ""
"*typecode_or_type* determines the type of the elements of the returned "
"array: it is either a ctypes type or a one character typecode of the kind "
@@ -2262,7 +2264,7 @@ msgid ""
"initialize the array and whose length determines the length of the array."
msgstr ""
-#: ../../library/multiprocessing.rst:1534
+#: ../../library/multiprocessing.rst:1536
msgid ""
"If *lock* is ``True`` (the default) then a new lock object is created to "
"synchronize access to the value. If *lock* is a :class:`Lock` or :class:"
@@ -2272,28 +2274,28 @@ msgid ""
"safe\"."
msgstr ""
-#: ../../library/multiprocessing.rst:1541
+#: ../../library/multiprocessing.rst:1543
msgid "Note that *lock* is a keyword only argument."
msgstr ""
-#: ../../library/multiprocessing.rst:1543
+#: ../../library/multiprocessing.rst:1545
msgid ""
"Note that an array of :data:`ctypes.c_char` has *value* and *raw* attributes "
"which allow one to use it to store and retrieve strings."
msgstr ""
-#: ../../library/multiprocessing.rst:1548
+#: ../../library/multiprocessing.rst:1550
msgid "The :mod:`multiprocessing.sharedctypes` module"
msgstr ":mod:`multiprocessing.sharedctypes` 模組"
-#: ../../library/multiprocessing.rst:1553
+#: ../../library/multiprocessing.rst:1555
msgid ""
"The :mod:`multiprocessing.sharedctypes` module provides functions for "
"allocating :mod:`ctypes` objects from shared memory which can be inherited "
"by child processes."
msgstr ""
-#: ../../library/multiprocessing.rst:1559
+#: ../../library/multiprocessing.rst:1561
msgid ""
"Although it is possible to store a pointer in shared memory remember that "
"this will refer to a location in the address space of a specific process. "
@@ -2302,11 +2304,11 @@ msgid ""
"may cause a crash."
msgstr ""
-#: ../../library/multiprocessing.rst:1567
+#: ../../library/multiprocessing.rst:1569
msgid "Return a ctypes array allocated from shared memory."
msgstr ""
-#: ../../library/multiprocessing.rst:1569
+#: ../../library/multiprocessing.rst:1571
msgid ""
"*typecode_or_type* determines the type of the elements of the returned "
"array: it is either a ctypes type or a one character typecode of the kind "
@@ -2316,40 +2318,40 @@ msgid ""
"initialize the array and whose length determines the length of the array."
msgstr ""
-#: ../../library/multiprocessing.rst:1576
+#: ../../library/multiprocessing.rst:1578
msgid ""
"Note that setting and getting an element is potentially non-atomic -- use :"
"func:`Array` instead to make sure that access is automatically synchronized "
"using a lock."
msgstr ""
-#: ../../library/multiprocessing.rst:1582
+#: ../../library/multiprocessing.rst:1584
msgid "Return a ctypes object allocated from shared memory."
msgstr ""
-#: ../../library/multiprocessing.rst:1588
+#: ../../library/multiprocessing.rst:1590
msgid ""
"Note that setting and getting the value is potentially non-atomic -- use :"
"func:`Value` instead to make sure that access is automatically synchronized "
"using a lock."
msgstr ""
-#: ../../library/multiprocessing.rst:1592
+#: ../../library/multiprocessing.rst:1594
msgid ""
"Note that an array of :data:`ctypes.c_char` has ``value`` and ``raw`` "
"attributes which allow one to use it to store and retrieve strings -- see "
"documentation for :mod:`ctypes`."
msgstr ""
-#: ../../library/multiprocessing.rst:1598
+#: ../../library/multiprocessing.rst:1600
msgid ""
"The same as :func:`RawArray` except that depending on the value of *lock* a "
"process-safe synchronization wrapper may be returned instead of a raw ctypes "
"array."
msgstr ""
-#: ../../library/multiprocessing.rst:1602
-#: ../../library/multiprocessing.rst:1618
+#: ../../library/multiprocessing.rst:1604
+#: ../../library/multiprocessing.rst:1620
msgid ""
"If *lock* is ``True`` (the default) then a new lock object is created to "
"synchronize access to the value. If *lock* is a :class:`~multiprocessing."
@@ -2359,113 +2361,113 @@ msgid ""
"not necessarily be \"process-safe\"."
msgstr ""
-#: ../../library/multiprocessing.rst:1614
+#: ../../library/multiprocessing.rst:1616
msgid ""
"The same as :func:`RawValue` except that depending on the value of *lock* a "
"process-safe synchronization wrapper may be returned instead of a raw ctypes "
"object."
msgstr ""
-#: ../../library/multiprocessing.rst:1629
+#: ../../library/multiprocessing.rst:1631
msgid ""
"Return a ctypes object allocated from shared memory which is a copy of the "
"ctypes object *obj*."
msgstr ""
-#: ../../library/multiprocessing.rst:1634
+#: ../../library/multiprocessing.rst:1636
msgid ""
"Return a process-safe wrapper object for a ctypes object which uses *lock* "
"to synchronize access. If *lock* is ``None`` (the default) then a :class:"
"`multiprocessing.RLock` object is created automatically."
msgstr ""
-#: ../../library/multiprocessing.rst:1638
+#: ../../library/multiprocessing.rst:1640
msgid ""
"A synchronized wrapper will have two methods in addition to those of the "
"object it wraps: :meth:`get_obj` returns the wrapped object and :meth:"
"`get_lock` returns the lock object used for synchronization."
msgstr ""
-#: ../../library/multiprocessing.rst:1642
+#: ../../library/multiprocessing.rst:1644
msgid ""
"Note that accessing the ctypes object through the wrapper can be a lot "
"slower than accessing the raw ctypes object."
msgstr ""
-#: ../../library/multiprocessing.rst:1645
+#: ../../library/multiprocessing.rst:1647
msgid "Synchronized objects support the :term:`context manager` protocol."
msgstr ""
-#: ../../library/multiprocessing.rst:1649
+#: ../../library/multiprocessing.rst:1651
msgid ""
"The table below compares the syntax for creating shared ctypes objects from "
"shared memory with the normal ctypes syntax. (In the table ``MyStruct`` is "
"some subclass of :class:`ctypes.Structure`.)"
msgstr ""
-#: ../../library/multiprocessing.rst:1654
+#: ../../library/multiprocessing.rst:1656
msgid "ctypes"
msgstr "ctypes"
-#: ../../library/multiprocessing.rst:1654
+#: ../../library/multiprocessing.rst:1656
msgid "sharedctypes using type"
msgstr ""
-#: ../../library/multiprocessing.rst:1654
+#: ../../library/multiprocessing.rst:1656
msgid "sharedctypes using typecode"
msgstr ""
-#: ../../library/multiprocessing.rst:1656
+#: ../../library/multiprocessing.rst:1658
msgid "c_double(2.4)"
msgstr "c_double(2.4)"
-#: ../../library/multiprocessing.rst:1656
+#: ../../library/multiprocessing.rst:1658
msgid "RawValue(c_double, 2.4)"
msgstr "RawValue(c_double, 2.4)"
-#: ../../library/multiprocessing.rst:1656
+#: ../../library/multiprocessing.rst:1658
msgid "RawValue('d', 2.4)"
msgstr "RawValue('d', 2.4)"
-#: ../../library/multiprocessing.rst:1657
+#: ../../library/multiprocessing.rst:1659
msgid "MyStruct(4, 6)"
msgstr "MyStruct(4, 6)"
-#: ../../library/multiprocessing.rst:1657
+#: ../../library/multiprocessing.rst:1659
msgid "RawValue(MyStruct, 4, 6)"
msgstr "RawValue(MyStruct, 4, 6)"
-#: ../../library/multiprocessing.rst:1658
+#: ../../library/multiprocessing.rst:1660
msgid "(c_short * 7)()"
msgstr "(c_short * 7)()"
-#: ../../library/multiprocessing.rst:1658
+#: ../../library/multiprocessing.rst:1660
msgid "RawArray(c_short, 7)"
msgstr "RawArray(c_short, 7)"
-#: ../../library/multiprocessing.rst:1658
+#: ../../library/multiprocessing.rst:1660
msgid "RawArray('h', 7)"
msgstr "RawArray('h', 7)"
-#: ../../library/multiprocessing.rst:1659
+#: ../../library/multiprocessing.rst:1661
msgid "(c_int * 3)(9, 2, 8)"
msgstr "(c_int * 3)(9, 2, 8)"
-#: ../../library/multiprocessing.rst:1659
+#: ../../library/multiprocessing.rst:1661
msgid "RawArray(c_int, (9, 2, 8))"
msgstr "RawArray(c_int, (9, 2, 8))"
-#: ../../library/multiprocessing.rst:1659
+#: ../../library/multiprocessing.rst:1661
msgid "RawArray('i', (9, 2, 8))"
msgstr "RawArray('i', (9, 2, 8))"
-#: ../../library/multiprocessing.rst:1663
+#: ../../library/multiprocessing.rst:1665
msgid ""
"Below is an example where a number of ctypes objects are modified by a child "
"process::"
msgstr ""
-#: ../../library/multiprocessing.rst:1666
+#: ../../library/multiprocessing.rst:1668
msgid ""
"from multiprocessing import Process, Lock\n"
"from multiprocessing.sharedctypes import Value, Array\n"
@@ -2531,11 +2533,11 @@ msgstr ""
" print(s.value)\n"
" print([(a.x, a.y) for a in A])"
-#: ../../library/multiprocessing.rst:1701
+#: ../../library/multiprocessing.rst:1703
msgid "The results printed are ::"
msgstr ""
-#: ../../library/multiprocessing.rst:1703
+#: ../../library/multiprocessing.rst:1705
msgid ""
"49\n"
"0.1111111111111111\n"
@@ -2547,11 +2549,11 @@ msgstr ""
"HELLO WORLD\n"
"[(3.515625, 39.0625), (33.0625, 4.0), (5.640625, 90.25)]"
-#: ../../library/multiprocessing.rst:1714
+#: ../../library/multiprocessing.rst:1716
msgid "Managers"
msgstr ""
-#: ../../library/multiprocessing.rst:1716
+#: ../../library/multiprocessing.rst:1718
msgid ""
"Managers provide a way to create data which can be shared between different "
"processes, including sharing over a network between processes running on "
@@ -2560,7 +2562,7 @@ msgid ""
"proxies."
msgstr ""
-#: ../../library/multiprocessing.rst:1725
+#: ../../library/multiprocessing.rst:1727
msgid ""
"Returns a started :class:`~multiprocessing.managers.SyncManager` object "
"which can be used for sharing objects between processes. The returned "
@@ -2568,31 +2570,31 @@ msgid ""
"will create shared objects and return corresponding proxies."
msgstr ""
-#: ../../library/multiprocessing.rst:1733
+#: ../../library/multiprocessing.rst:1735
msgid ""
"Manager processes will be shutdown as soon as they are garbage collected or "
"their parent process exits. The manager classes are defined in the :mod:"
"`multiprocessing.managers` module:"
msgstr ""
-#: ../../library/multiprocessing.rst:1739
+#: ../../library/multiprocessing.rst:1741
msgid "Create a BaseManager object."
msgstr "建立一個 BaseManager 物件。"
-#: ../../library/multiprocessing.rst:1741
+#: ../../library/multiprocessing.rst:1743
msgid ""
"Once created one should call :meth:`start` or ``get_server()."
"serve_forever()`` to ensure that the manager object refers to a started "
"manager process."
msgstr ""
-#: ../../library/multiprocessing.rst:1744
+#: ../../library/multiprocessing.rst:1746
msgid ""
"*address* is the address on which the manager process listens for new "
"connections. If *address* is ``None`` then an arbitrary one is chosen."
msgstr ""
-#: ../../library/multiprocessing.rst:1747
+#: ../../library/multiprocessing.rst:1749
msgid ""
"*authkey* is the authentication key which will be used to check the validity "
"of incoming connections to the server process. If *authkey* is ``None`` "
@@ -2600,19 +2602,19 @@ msgid ""
"it must be a byte string."
msgstr ""
-#: ../../library/multiprocessing.rst:1752
+#: ../../library/multiprocessing.rst:1754
msgid ""
"*serializer* must be ``'pickle'`` (use :mod:`pickle` serialization) or "
"``'xmlrpclib'`` (use :mod:`xmlrpc.client` serialization)."
msgstr ""
-#: ../../library/multiprocessing.rst:1755
+#: ../../library/multiprocessing.rst:1757
msgid ""
"*ctx* is a context object, or ``None`` (use the current context). See the :"
"func:`get_context` function."
msgstr ""
-#: ../../library/multiprocessing.rst:1758
+#: ../../library/multiprocessing.rst:1760
msgid ""
"*shutdown_timeout* is a timeout in seconds used to wait until the process "
"used by the manager completes in the :meth:`shutdown` method. If the "
@@ -2620,24 +2622,24 @@ msgid ""
"also times out, the process is killed."
msgstr ""
-#: ../../library/multiprocessing.rst:1763
+#: ../../library/multiprocessing.rst:1765
msgid "Added the *shutdown_timeout* parameter."
msgstr "新增 *shutdown_timeout* 參數。"
-#: ../../library/multiprocessing.rst:1768
+#: ../../library/multiprocessing.rst:1770
msgid ""
"Start a subprocess to start the manager. If *initializer* is not ``None`` "
"then the subprocess will call ``initializer(*initargs)`` when it starts."
msgstr ""
-#: ../../library/multiprocessing.rst:1773
+#: ../../library/multiprocessing.rst:1775
msgid ""
"Returns a :class:`Server` object which represents the actual server under "
"the control of the Manager. The :class:`Server` object supports the :meth:"
"`serve_forever` method::"
msgstr ""
-#: ../../library/multiprocessing.rst:1777
+#: ../../library/multiprocessing.rst:1779
msgid ""
">>> from multiprocessing.managers import BaseManager\n"
">>> manager = BaseManager(address=('', 50000), authkey=b'abc')\n"
@@ -2649,15 +2651,15 @@ msgstr ""
">>> server = manager.get_server()\n"
">>> server.serve_forever()"
-#: ../../library/multiprocessing.rst:1782
+#: ../../library/multiprocessing.rst:1784
msgid ":class:`Server` additionally has an :attr:`address` attribute."
msgstr ""
-#: ../../library/multiprocessing.rst:1786
+#: ../../library/multiprocessing.rst:1788
msgid "Connect a local manager object to a remote manager process::"
msgstr ""
-#: ../../library/multiprocessing.rst:1788
+#: ../../library/multiprocessing.rst:1790
msgid ""
">>> from multiprocessing.managers import BaseManager\n"
">>> m = BaseManager(address=('127.0.0.1', 50000), authkey=b'abc')\n"
@@ -2667,29 +2669,29 @@ msgstr ""
">>> m = BaseManager(address=('127.0.0.1', 50000), authkey=b'abc')\n"
">>> m.connect()"
-#: ../../library/multiprocessing.rst:1794
+#: ../../library/multiprocessing.rst:1796
msgid ""
"Stop the process used by the manager. This is only available if :meth:"
"`start` has been used to start the server process."
msgstr ""
-#: ../../library/multiprocessing.rst:1797
+#: ../../library/multiprocessing.rst:1799
msgid "This can be called multiple times."
msgstr ""
-#: ../../library/multiprocessing.rst:1801
+#: ../../library/multiprocessing.rst:1803
msgid ""
"A classmethod which can be used for registering a type or callable with the "
"manager class."
msgstr ""
-#: ../../library/multiprocessing.rst:1804
+#: ../../library/multiprocessing.rst:1806
msgid ""
"*typeid* is a \"type identifier\" which is used to identify a particular "
"type of shared object. This must be a string."
msgstr ""
-#: ../../library/multiprocessing.rst:1807
+#: ../../library/multiprocessing.rst:1809
msgid ""
"*callable* is a callable used for creating objects for this type "
"identifier. If a manager instance will be connected to the server using "
@@ -2697,14 +2699,14 @@ msgid ""
"then this can be left as ``None``."
msgstr ""
-#: ../../library/multiprocessing.rst:1813
+#: ../../library/multiprocessing.rst:1815
msgid ""
"*proxytype* is a subclass of :class:`BaseProxy` which is used to create "
"proxies for shared objects with this *typeid*. If ``None`` then a proxy "
"class is created automatically."
msgstr ""
-#: ../../library/multiprocessing.rst:1817
+#: ../../library/multiprocessing.rst:1819
msgid ""
"*exposed* is used to specify a sequence of method names which proxies for "
"this typeid should be allowed to access using :meth:`BaseProxy."
@@ -2715,7 +2717,7 @@ msgid ""
"method and whose name does not begin with ``'_'``.)"
msgstr ""
-#: ../../library/multiprocessing.rst:1826
+#: ../../library/multiprocessing.rst:1828
msgid ""
"*method_to_typeid* is a mapping used to specify the return type of those "
"exposed methods which should return a proxy. It maps method names to typeid "
@@ -2725,22 +2727,22 @@ msgid ""
"returned by the method will be copied by value."
msgstr ""
-#: ../../library/multiprocessing.rst:1833
+#: ../../library/multiprocessing.rst:1835
msgid ""
"*create_method* determines whether a method should be created with name "
"*typeid* which can be used to tell the server process to create a new shared "
"object and return a proxy for it. By default it is ``True``."
msgstr ""
-#: ../../library/multiprocessing.rst:1837
+#: ../../library/multiprocessing.rst:1839
msgid ":class:`BaseManager` instances also have one read-only property:"
msgstr ""
-#: ../../library/multiprocessing.rst:1841
+#: ../../library/multiprocessing.rst:1843
msgid "The address used by the manager."
msgstr ""
-#: ../../library/multiprocessing.rst:1843
+#: ../../library/multiprocessing.rst:1845
msgid ""
"Manager objects support the context management protocol -- see :ref:"
"`typecontextmanager`. :meth:`~contextmanager.__enter__` starts the server "
@@ -2748,121 +2750,121 @@ msgid ""
"object. :meth:`~contextmanager.__exit__` calls :meth:`shutdown`."
msgstr ""
-#: ../../library/multiprocessing.rst:1849
+#: ../../library/multiprocessing.rst:1851
msgid ""
"In previous versions :meth:`~contextmanager.__enter__` did not start the "
"manager's server process if it was not already started."
msgstr ""
-#: ../../library/multiprocessing.rst:1854
+#: ../../library/multiprocessing.rst:1856
msgid ""
"A subclass of :class:`BaseManager` which can be used for the synchronization "
"of processes. Objects of this type are returned by :func:`multiprocessing."
"Manager`."
msgstr ""
-#: ../../library/multiprocessing.rst:1858
+#: ../../library/multiprocessing.rst:1860
msgid ""
"Its methods create and return :ref:`multiprocessing-proxy_objects` for a "
"number of commonly used data types to be synchronized across processes. This "
"notably includes shared lists and dictionaries."
msgstr ""
-#: ../../library/multiprocessing.rst:1864
+#: ../../library/multiprocessing.rst:1866
msgid ""
"Create a shared :class:`threading.Barrier` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1871
+#: ../../library/multiprocessing.rst:1873
msgid ""
"Create a shared :class:`threading.BoundedSemaphore` object and return a "
"proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1876
+#: ../../library/multiprocessing.rst:1878
msgid ""
"Create a shared :class:`threading.Condition` object and return a proxy for "
"it."
msgstr ""
-#: ../../library/multiprocessing.rst:1879
+#: ../../library/multiprocessing.rst:1881
msgid ""
"If *lock* is supplied then it should be a proxy for a :class:`threading."
"Lock` or :class:`threading.RLock` object."
msgstr ""
-#: ../../library/multiprocessing.rst:1887
+#: ../../library/multiprocessing.rst:1889
msgid ""
"Create a shared :class:`threading.Event` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1891
+#: ../../library/multiprocessing.rst:1893
msgid ""
"Create a shared :class:`threading.Lock` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1895
+#: ../../library/multiprocessing.rst:1897
msgid "Create a shared :class:`Namespace` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1899
+#: ../../library/multiprocessing.rst:1901
msgid "Create a shared :class:`queue.Queue` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1903
+#: ../../library/multiprocessing.rst:1905
msgid ""
"Create a shared :class:`threading.RLock` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1907
+#: ../../library/multiprocessing.rst:1909
msgid ""
"Create a shared :class:`threading.Semaphore` object and return a proxy for "
"it."
msgstr ""
-#: ../../library/multiprocessing.rst:1912
+#: ../../library/multiprocessing.rst:1914
msgid "Create an array and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1916
+#: ../../library/multiprocessing.rst:1918
msgid ""
"Create an object with a writable ``value`` attribute and return a proxy for "
"it."
msgstr ""
-#: ../../library/multiprocessing.rst:1923
+#: ../../library/multiprocessing.rst:1925
msgid "Create a shared :class:`dict` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1928
+#: ../../library/multiprocessing.rst:1930
msgid "Create a shared :class:`list` object and return a proxy for it."
msgstr ""
-#: ../../library/multiprocessing.rst:1930
+#: ../../library/multiprocessing.rst:1932
msgid ""
"Shared objects are capable of being nested. For example, a shared container "
"object such as a shared list can contain other shared objects which will all "
"be managed and synchronized by the :class:`SyncManager`."
msgstr ""
-#: ../../library/multiprocessing.rst:1937
+#: ../../library/multiprocessing.rst:1939
msgid "A type that can register with :class:`SyncManager`."
msgstr ""
-#: ../../library/multiprocessing.rst:1939
+#: ../../library/multiprocessing.rst:1941
msgid ""
"A namespace object has no public methods, but does have writable attributes. "
"Its representation shows the values of its attributes."
msgstr ""
-#: ../../library/multiprocessing.rst:1942
+#: ../../library/multiprocessing.rst:1944
msgid ""
"However, when using a proxy for a namespace object, an attribute beginning "
"with ``'_'`` will be an attribute of the proxy and not an attribute of the "
"referent:"
msgstr ""
-#: ../../library/multiprocessing.rst:1946
+#: ../../library/multiprocessing.rst:1948
msgid ""
">>> mp_context = multiprocessing.get_context('spawn')\n"
">>> manager = mp_context.Manager()\n"
@@ -2874,18 +2876,18 @@ msgid ""
"Namespace(x=10, y='hello')"
msgstr ""
-#: ../../library/multiprocessing.rst:1959
+#: ../../library/multiprocessing.rst:1961
msgid "Customized managers"
msgstr ""
-#: ../../library/multiprocessing.rst:1961
+#: ../../library/multiprocessing.rst:1963
msgid ""
"To create one's own manager, one creates a subclass of :class:`BaseManager` "
"and uses the :meth:`~BaseManager.register` classmethod to register new types "
"or callables with the manager class. For example::"
msgstr ""
-#: ../../library/multiprocessing.rst:1965
+#: ../../library/multiprocessing.rst:1967
msgid ""
"from multiprocessing.managers import BaseManager\n"
"\n"
@@ -2925,23 +2927,23 @@ msgstr ""
" print(maths.add(4, 3)) # 印出 7\n"
" print(maths.mul(7, 8)) # 印出 56"
-#: ../../library/multiprocessing.rst:1986
+#: ../../library/multiprocessing.rst:1988
msgid "Using a remote manager"
msgstr ""
-#: ../../library/multiprocessing.rst:1988
+#: ../../library/multiprocessing.rst:1990
msgid ""
"It is possible to run a manager server on one machine and have clients use "
"it from other machines (assuming that the firewalls involved allow it)."
msgstr ""
-#: ../../library/multiprocessing.rst:1991
+#: ../../library/multiprocessing.rst:1993
msgid ""
"Running the following commands creates a server for a single shared queue "
"which remote clients can access::"
msgstr ""
-#: ../../library/multiprocessing.rst:1994
+#: ../../library/multiprocessing.rst:1996
msgid ""
">>> from multiprocessing.managers import BaseManager\n"
">>> from queue import Queue\n"
@@ -2961,11 +2963,11 @@ msgstr ""
">>> s = m.get_server()\n"
">>> s.serve_forever()"
-#: ../../library/multiprocessing.rst:2003
+#: ../../library/multiprocessing.rst:2005
msgid "One client can access the server as follows::"
msgstr ""
-#: ../../library/multiprocessing.rst:2005
+#: ../../library/multiprocessing.rst:2007
msgid ""
">>> from multiprocessing.managers import BaseManager\n"
">>> class QueueManager(BaseManager): pass\n"
@@ -2985,11 +2987,11 @@ msgstr ""
">>> queue = m.get_queue()\n"
">>> queue.put('hello')"
-#: ../../library/multiprocessing.rst:2013
+#: ../../library/multiprocessing.rst:2015
msgid "Another client can also use it::"
msgstr ""
-#: ../../library/multiprocessing.rst:2015
+#: ../../library/multiprocessing.rst:2017
msgid ""
">>> from multiprocessing.managers import BaseManager\n"
">>> class QueueManager(BaseManager): pass\n"
@@ -3011,13 +3013,13 @@ msgstr ""
">>> queue.get()\n"
"'hello'"
-#: ../../library/multiprocessing.rst:2024
+#: ../../library/multiprocessing.rst:2026
msgid ""
"Local processes can also access that queue, using the code from above on the "
"client to access it remotely::"
msgstr ""
-#: ../../library/multiprocessing.rst:2027
+#: ../../library/multiprocessing.rst:2029
msgid ""
">>> from multiprocessing import Process, Queue\n"
">>> from multiprocessing.managers import BaseManager\n"
@@ -3057,18 +3059,18 @@ msgstr ""
">>> s = m.get_server()\n"
">>> s.serve_forever()"
-#: ../../library/multiprocessing.rst:2049
+#: ../../library/multiprocessing.rst:2051
msgid "Proxy Objects"
msgstr ""
-#: ../../library/multiprocessing.rst:2051
+#: ../../library/multiprocessing.rst:2053
msgid ""
"A proxy is an object which *refers* to a shared object which lives "
"(presumably) in a different process. The shared object is said to be the "
"*referent* of the proxy. Multiple proxy objects may have the same referent."
msgstr ""
-#: ../../library/multiprocessing.rst:2055
+#: ../../library/multiprocessing.rst:2057
msgid ""
"A proxy object has methods which invoke corresponding methods of its "
"referent (although not every method of the referent will necessarily be "
@@ -3076,7 +3078,7 @@ msgid ""
"its referent can:"
msgstr ""
-#: ../../library/multiprocessing.rst:2059
+#: ../../library/multiprocessing.rst:2061
msgid ""
">>> mp_context = multiprocessing.get_context('spawn')\n"
">>> manager = mp_context.Manager()\n"
@@ -3102,14 +3104,14 @@ msgstr ""
">>> l[2:5]\n"
"[4, 9, 16]"
-#: ../../library/multiprocessing.rst:2073
+#: ../../library/multiprocessing.rst:2075
msgid ""
"Notice that applying :func:`str` to a proxy will return the representation "
"of the referent, whereas applying :func:`repr` will return the "
"representation of the proxy."
msgstr ""
-#: ../../library/multiprocessing.rst:2077
+#: ../../library/multiprocessing.rst:2079
msgid ""
"An important feature of proxy objects is that they are picklable so they can "
"be passed between processes. As such, a referent can contain :ref:"
@@ -3117,7 +3119,7 @@ msgid ""
"lists, dicts, and other :ref:`multiprocessing-proxy_objects`:"
msgstr ""
-#: ../../library/multiprocessing.rst:2082
+#: ../../library/multiprocessing.rst:2084
msgid ""
">>> a = manager.list()\n"
">>> b = manager.list()\n"
@@ -3129,11 +3131,11 @@ msgid ""
"['hello'] ['hello']"
msgstr ""
-#: ../../library/multiprocessing.rst:2093
+#: ../../library/multiprocessing.rst:2095
msgid "Similarly, dict and list proxies may be nested inside one another::"
msgstr ""
-#: ../../library/multiprocessing.rst:2095
+#: ../../library/multiprocessing.rst:2097
msgid ""
">>> l_outer = manager.list([ manager.dict() for i in range(2) ])\n"
">>> d_first_inner = l_outer[0]\n"
@@ -3157,7 +3159,7 @@ msgstr ""
">>> print(l_outer[1])\n"
"{'c': 3, 'z': 26}"
-#: ../../library/multiprocessing.rst:2106
+#: ../../library/multiprocessing.rst:2108
msgid ""
"If standard (non-proxy) :class:`list` or :class:`dict` objects are contained "
"in a referent, modifications to those mutable values will not be propagated "
@@ -3168,7 +3170,7 @@ msgid ""
"assign the modified value to the container proxy::"
msgstr ""
-#: ../../library/multiprocessing.rst:2114
+#: ../../library/multiprocessing.rst:2116
msgid ""
"# create a list proxy and append a mutable object (a dictionary)\n"
"lproxy = manager.list()\n"
@@ -3182,20 +3184,20 @@ msgid ""
"lproxy[0] = d"
msgstr ""
-#: ../../library/multiprocessing.rst:2125
+#: ../../library/multiprocessing.rst:2127
msgid ""
"This approach is perhaps less convenient than employing nested :ref:"
"`multiprocessing-proxy_objects` for most use cases but also demonstrates a "
"level of control over the synchronization."
msgstr ""
-#: ../../library/multiprocessing.rst:2131
+#: ../../library/multiprocessing.rst:2133
msgid ""
"The proxy types in :mod:`multiprocessing` do nothing to support comparisons "
"by value. So, for instance, we have:"
msgstr ""
-#: ../../library/multiprocessing.rst:2134
+#: ../../library/multiprocessing.rst:2136
msgid ""
">>> manager.list([1,2,3]) == [1,2,3]\n"
"False"
@@ -3203,48 +3205,48 @@ msgstr ""
">>> manager.list([1,2,3]) == [1,2,3]\n"
"False"
-#: ../../library/multiprocessing.rst:2139
+#: ../../library/multiprocessing.rst:2141
msgid ""
"One should just use a copy of the referent instead when making comparisons."
msgstr ""
-#: ../../library/multiprocessing.rst:2143
+#: ../../library/multiprocessing.rst:2145
msgid "Proxy objects are instances of subclasses of :class:`BaseProxy`."
msgstr ""
-#: ../../library/multiprocessing.rst:2147
+#: ../../library/multiprocessing.rst:2149
msgid "Call and return the result of a method of the proxy's referent."
msgstr ""
-#: ../../library/multiprocessing.rst:2149
+#: ../../library/multiprocessing.rst:2151
msgid ""
"If ``proxy`` is a proxy whose referent is ``obj`` then the expression ::"
msgstr ""
-#: ../../library/multiprocessing.rst:2151
+#: ../../library/multiprocessing.rst:2153
msgid "proxy._callmethod(methodname, args, kwds)"
msgstr "proxy._callmethod(methodname, args, kwds)"
-#: ../../library/multiprocessing.rst:2153
+#: ../../library/multiprocessing.rst:2155
msgid "will evaluate the expression ::"
msgstr ""
-#: ../../library/multiprocessing.rst:2155
+#: ../../library/multiprocessing.rst:2157
msgid "getattr(obj, methodname)(*args, **kwds)"
msgstr "getattr(obj, methodname)(*args, **kwds)"
-#: ../../library/multiprocessing.rst:2157
+#: ../../library/multiprocessing.rst:2159
msgid "in the manager's process."
msgstr ""
-#: ../../library/multiprocessing.rst:2159
+#: ../../library/multiprocessing.rst:2161
msgid ""
"The returned value will be a copy of the result of the call or a proxy to a "
"new shared object -- see documentation for the *method_to_typeid* argument "
"of :meth:`BaseManager.register`."
msgstr ""
-#: ../../library/multiprocessing.rst:2163
+#: ../../library/multiprocessing.rst:2165
msgid ""
"If an exception is raised by the call, then is re-raised by :meth:"
"`_callmethod`. If some other exception is raised in the manager's process "
@@ -3252,17 +3254,17 @@ msgid ""
"meth:`_callmethod`."
msgstr ""
-#: ../../library/multiprocessing.rst:2168
+#: ../../library/multiprocessing.rst:2170
msgid ""
"Note in particular that an exception will be raised if *methodname* has not "
"been *exposed*."
msgstr ""
-#: ../../library/multiprocessing.rst:2171
+#: ../../library/multiprocessing.rst:2173
msgid "An example of the usage of :meth:`_callmethod`:"
msgstr ""
-#: ../../library/multiprocessing.rst:2173
+#: ../../library/multiprocessing.rst:2175
msgid ""
">>> l = manager.list(range(10))\n"
">>> l._callmethod('__len__')\n"
@@ -3284,69 +3286,69 @@ msgstr ""
"...\n"
"IndexError: list index out of range"
-#: ../../library/multiprocessing.rst:2187
+#: ../../library/multiprocessing.rst:2189
msgid "Return a copy of the referent."
msgstr ""
-#: ../../library/multiprocessing.rst:2189
+#: ../../library/multiprocessing.rst:2191
msgid "If the referent is unpicklable then this will raise an exception."
msgstr ""
-#: ../../library/multiprocessing.rst:2193
+#: ../../library/multiprocessing.rst:2195
msgid "Return a representation of the proxy object."
msgstr ""
-#: ../../library/multiprocessing.rst:2197
+#: ../../library/multiprocessing.rst:2199
msgid "Return the representation of the referent."
msgstr ""
-#: ../../library/multiprocessing.rst:2201
+#: ../../library/multiprocessing.rst:2203
msgid "Cleanup"
msgstr ""
-#: ../../library/multiprocessing.rst:2203
+#: ../../library/multiprocessing.rst:2205
msgid ""
"A proxy object uses a weakref callback so that when it gets garbage "
"collected it deregisters itself from the manager which owns its referent."
msgstr ""
-#: ../../library/multiprocessing.rst:2206
+#: ../../library/multiprocessing.rst:2208
msgid ""
"A shared object gets deleted from the manager process when there are no "
"longer any proxies referring to it."
msgstr ""
-#: ../../library/multiprocessing.rst:2211
+#: ../../library/multiprocessing.rst:2213
msgid "Process Pools"
msgstr ""
-#: ../../library/multiprocessing.rst:2216
+#: ../../library/multiprocessing.rst:2218
msgid ""
"One can create a pool of processes which will carry out tasks submitted to "
"it with the :class:`Pool` class."
msgstr ""
-#: ../../library/multiprocessing.rst:2221
+#: ../../library/multiprocessing.rst:2223
msgid ""
"A process pool object which controls a pool of worker processes to which "
"jobs can be submitted. It supports asynchronous results with timeouts and "
"callbacks and has a parallel map implementation."
msgstr ""
-#: ../../library/multiprocessing.rst:2225
+#: ../../library/multiprocessing.rst:2227
msgid ""
"*processes* is the number of worker processes to use. If *processes* is "
"``None`` then the number returned by :func:`os.process_cpu_count` is used."
msgstr ""
-#: ../../library/multiprocessing.rst:2228
-#: ../../library/multiprocessing.rst:2792
+#: ../../library/multiprocessing.rst:2230
+#: ../../library/multiprocessing.rst:2794
msgid ""
"If *initializer* is not ``None`` then each worker process will call "
"``initializer(*initargs)`` when it starts."
msgstr ""
-#: ../../library/multiprocessing.rst:2231
+#: ../../library/multiprocessing.rst:2233
msgid ""
"*maxtasksperchild* is the number of tasks a worker process can complete "
"before it will exit and be replaced with a fresh worker process, to enable "
@@ -3354,7 +3356,7 @@ msgid ""
"which means worker processes will live as long as the pool."
msgstr ""
-#: ../../library/multiprocessing.rst:2236
+#: ../../library/multiprocessing.rst:2238
msgid ""
"*context* can be used to specify the context used for starting the worker "
"processes. Usually a pool is created using the function :func:"
@@ -3362,13 +3364,13 @@ msgid ""
"both cases *context* is set appropriately."
msgstr ""
-#: ../../library/multiprocessing.rst:2242
+#: ../../library/multiprocessing.rst:2244
msgid ""
"Note that the methods of the pool object should only be called by the "
"process which created the pool."
msgstr ""
-#: ../../library/multiprocessing.rst:2246
+#: ../../library/multiprocessing.rst:2248
msgid ""
":class:`multiprocessing.pool` objects have internal resources that need to "
"be properly managed (like any other resource) by using the pool as a context "
@@ -3376,28 +3378,28 @@ msgid ""
"to do this can lead to the process hanging on finalization."
msgstr ""
-#: ../../library/multiprocessing.rst:2251
+#: ../../library/multiprocessing.rst:2253
msgid ""
"Note that it is **not correct** to rely on the garbage collector to destroy "
"the pool as CPython does not assure that the finalizer of the pool will be "
"called (see :meth:`object.__del__` for more information)."
msgstr ""
-#: ../../library/multiprocessing.rst:2255
+#: ../../library/multiprocessing.rst:2257
msgid "Added the *maxtasksperchild* parameter."
msgstr "新增 *maxtasksperchild* 參數。"
-#: ../../library/multiprocessing.rst:2258
+#: ../../library/multiprocessing.rst:2260
msgid "Added the *context* parameter."
msgstr "新增 *context* 參數。"
-#: ../../library/multiprocessing.rst:2261
+#: ../../library/multiprocessing.rst:2263
msgid ""
"*processes* uses :func:`os.process_cpu_count` by default, instead of :func:"
"`os.cpu_count`."
msgstr ""
-#: ../../library/multiprocessing.rst:2267
+#: ../../library/multiprocessing.rst:2269
msgid ""
"Worker processes within a :class:`Pool` typically live for the complete "
"duration of the Pool's work queue. A frequent pattern found in other systems "
@@ -3408,7 +3410,7 @@ msgid ""
"ability to the end user."
msgstr ""
-#: ../../library/multiprocessing.rst:2277
+#: ../../library/multiprocessing.rst:2279
msgid ""
"Call *func* with arguments *args* and keyword arguments *kwds*. It blocks "
"until the result is ready. Given this blocks, :meth:`apply_async` is better "
@@ -3416,14 +3418,14 @@ msgid ""
"executed in one of the workers of the pool."
msgstr ""
-#: ../../library/multiprocessing.rst:2284
+#: ../../library/multiprocessing.rst:2286
msgid ""
"A variant of the :meth:`apply` method which returns a :class:"
"`~multiprocessing.pool.AsyncResult` object."
msgstr ""
-#: ../../library/multiprocessing.rst:2287
-#: ../../library/multiprocessing.rst:2318
+#: ../../library/multiprocessing.rst:2289
+#: ../../library/multiprocessing.rst:2320
msgid ""
"If *callback* is specified then it should be a callable which accepts a "
"single argument. When the result becomes ready *callback* is applied to it, "
@@ -3431,60 +3433,60 @@ msgid ""
"applied instead."
msgstr ""
-#: ../../library/multiprocessing.rst:2292
-#: ../../library/multiprocessing.rst:2323
+#: ../../library/multiprocessing.rst:2294
+#: ../../library/multiprocessing.rst:2325
msgid ""
"If *error_callback* is specified then it should be a callable which accepts "
"a single argument. If the target function fails, then the *error_callback* "
"is called with the exception instance."
msgstr ""
-#: ../../library/multiprocessing.rst:2296
-#: ../../library/multiprocessing.rst:2327
+#: ../../library/multiprocessing.rst:2298
+#: ../../library/multiprocessing.rst:2329
msgid ""
"Callbacks should complete immediately since otherwise the thread which "
"handles the results will get blocked."
msgstr ""
-#: ../../library/multiprocessing.rst:2301
+#: ../../library/multiprocessing.rst:2303
msgid ""
"A parallel equivalent of the :func:`map` built-in function (it supports only "
"one *iterable* argument though, for multiple iterables see :meth:`starmap`). "
"It blocks until the result is ready."
msgstr ""
-#: ../../library/multiprocessing.rst:2305
+#: ../../library/multiprocessing.rst:2307
msgid ""
"This method chops the iterable into a number of chunks which it submits to "
"the process pool as separate tasks. The (approximate) size of these chunks "
"can be specified by setting *chunksize* to a positive integer."
msgstr ""
-#: ../../library/multiprocessing.rst:2309
+#: ../../library/multiprocessing.rst:2311
msgid ""
"Note that it may cause high memory usage for very long iterables. Consider "
"using :meth:`imap` or :meth:`imap_unordered` with explicit *chunksize* "
"option for better efficiency."
msgstr ""
-#: ../../library/multiprocessing.rst:2315
+#: ../../library/multiprocessing.rst:2317
msgid ""
"A variant of the :meth:`.map` method which returns a :class:"
"`~multiprocessing.pool.AsyncResult` object."
msgstr ""
-#: ../../library/multiprocessing.rst:2332
+#: ../../library/multiprocessing.rst:2334
msgid "A lazier version of :meth:`.map`."
msgstr ""
-#: ../../library/multiprocessing.rst:2334
+#: ../../library/multiprocessing.rst:2336
msgid ""
"The *chunksize* argument is the same as the one used by the :meth:`.map` "
"method. For very long iterables using a large value for *chunksize* can "
"make the job complete **much** faster than using the default value of ``1``."
msgstr ""
-#: ../../library/multiprocessing.rst:2339
+#: ../../library/multiprocessing.rst:2341
msgid ""
"Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator "
"returned by the :meth:`imap` method has an optional *timeout* parameter: "
@@ -3492,65 +3494,65 @@ msgid ""
"result cannot be returned within *timeout* seconds."
msgstr ""
-#: ../../library/multiprocessing.rst:2346
+#: ../../library/multiprocessing.rst:2348
msgid ""
"The same as :meth:`imap` except that the ordering of the results from the "
"returned iterator should be considered arbitrary. (Only when there is only "
"one worker process is the order guaranteed to be \"correct\".)"
msgstr ""
-#: ../../library/multiprocessing.rst:2352
+#: ../../library/multiprocessing.rst:2354
msgid ""
"Like :meth:`~multiprocessing.pool.Pool.map` except that the elements of the "
"*iterable* are expected to be iterables that are unpacked as arguments."
msgstr ""
-#: ../../library/multiprocessing.rst:2356
+#: ../../library/multiprocessing.rst:2358
msgid ""
"Hence an *iterable* of ``[(1,2), (3, 4)]`` results in ``[func(1,2), "
"func(3,4)]``."
msgstr ""
-#: ../../library/multiprocessing.rst:2363
+#: ../../library/multiprocessing.rst:2365
msgid ""
"A combination of :meth:`starmap` and :meth:`map_async` that iterates over "
"*iterable* of iterables and calls *func* with the iterables unpacked. "
"Returns a result object."
msgstr ""
-#: ../../library/multiprocessing.rst:2371
+#: ../../library/multiprocessing.rst:2373
msgid ""
"Prevents any more tasks from being submitted to the pool. Once all the "
"tasks have been completed the worker processes will exit."
msgstr ""
-#: ../../library/multiprocessing.rst:2376
+#: ../../library/multiprocessing.rst:2378
msgid ""
"Stops the worker processes immediately without completing outstanding work. "
"When the pool object is garbage collected :meth:`terminate` will be called "
"immediately."
msgstr ""
-#: ../../library/multiprocessing.rst:2382
+#: ../../library/multiprocessing.rst:2384
msgid ""
"Wait for the worker processes to exit. One must call :meth:`close` or :meth:"
"`terminate` before using :meth:`join`."
msgstr ""
-#: ../../library/multiprocessing.rst:2385
+#: ../../library/multiprocessing.rst:2387
msgid ""
"Pool objects now support the context management protocol -- see :ref:"
"`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the pool "
"object, and :meth:`~contextmanager.__exit__` calls :meth:`terminate`."
msgstr ""
-#: ../../library/multiprocessing.rst:2393
+#: ../../library/multiprocessing.rst:2395
msgid ""
"The class of the result returned by :meth:`Pool.apply_async` and :meth:`Pool."
"map_async`."
msgstr ""
-#: ../../library/multiprocessing.rst:2398
+#: ../../library/multiprocessing.rst:2400
msgid ""
"Return the result when it arrives. If *timeout* is not ``None`` and the "
"result does not arrive within *timeout* seconds then :exc:`multiprocessing."
@@ -3558,31 +3560,31 @@ msgid ""
"exception will be reraised by :meth:`get`."
msgstr ""
-#: ../../library/multiprocessing.rst:2405
+#: ../../library/multiprocessing.rst:2407
msgid "Wait until the result is available or until *timeout* seconds pass."
msgstr ""
-#: ../../library/multiprocessing.rst:2409
+#: ../../library/multiprocessing.rst:2411
msgid "Return whether the call has completed."
msgstr ""
-#: ../../library/multiprocessing.rst:2413
+#: ../../library/multiprocessing.rst:2415
msgid ""
"Return whether the call completed without raising an exception. Will raise :"
"exc:`ValueError` if the result is not ready."
msgstr ""
-#: ../../library/multiprocessing.rst:2416
+#: ../../library/multiprocessing.rst:2418
msgid ""
"If the result is not ready, :exc:`ValueError` is raised instead of :exc:"
"`AssertionError`."
msgstr ""
-#: ../../library/multiprocessing.rst:2420
+#: ../../library/multiprocessing.rst:2422
msgid "The following example demonstrates the use of a pool::"
msgstr ""
-#: ../../library/multiprocessing.rst:2422
+#: ../../library/multiprocessing.rst:2424
msgid ""
"from multiprocessing import Pool\n"
"import time\n"
@@ -3610,17 +3612,17 @@ msgid ""
"TimeoutError"
msgstr ""
-#: ../../library/multiprocessing.rst:2447
+#: ../../library/multiprocessing.rst:2449
msgid "Listeners and Clients"
msgstr ""
-#: ../../library/multiprocessing.rst:2452
+#: ../../library/multiprocessing.rst:2454
msgid ""
"Usually message passing between processes is done using queues or by using :"
"class:`~Connection` objects returned by :func:`~multiprocessing.Pipe`."
msgstr ""
-#: ../../library/multiprocessing.rst:2456
+#: ../../library/multiprocessing.rst:2458
msgid ""
"However, the :mod:`multiprocessing.connection` module allows some extra "
"flexibility. It basically gives a high level message oriented API for "
@@ -3629,46 +3631,46 @@ msgid ""
"multiple connections at the same time."
msgstr ""
-#: ../../library/multiprocessing.rst:2465
+#: ../../library/multiprocessing.rst:2467
msgid ""
"Send a randomly generated message to the other end of the connection and "
"wait for a reply."
msgstr ""
-#: ../../library/multiprocessing.rst:2468
+#: ../../library/multiprocessing.rst:2470
msgid ""
"If the reply matches the digest of the message using *authkey* as the key "
"then a welcome message is sent to the other end of the connection. "
"Otherwise :exc:`~multiprocessing.AuthenticationError` is raised."
msgstr ""
-#: ../../library/multiprocessing.rst:2474
+#: ../../library/multiprocessing.rst:2476
msgid ""
"Receive a message, calculate the digest of the message using *authkey* as "
"the key, and then send the digest back."
msgstr ""
-#: ../../library/multiprocessing.rst:2477
+#: ../../library/multiprocessing.rst:2479
msgid ""
"If a welcome message is not received, then :exc:`~multiprocessing."
"AuthenticationError` is raised."
msgstr ""
-#: ../../library/multiprocessing.rst:2482
+#: ../../library/multiprocessing.rst:2484
msgid ""
"Attempt to set up a connection to the listener which is using address "
"*address*, returning a :class:`~Connection`."
msgstr ""
-#: ../../library/multiprocessing.rst:2485
+#: ../../library/multiprocessing.rst:2487
msgid ""
"The type of the connection is determined by *family* argument, but this can "
"generally be omitted since it can usually be inferred from the format of "
"*address*. (See :ref:`multiprocessing-address-formats`)"
msgstr ""
-#: ../../library/multiprocessing.rst:2489
-#: ../../library/multiprocessing.rst:2524
+#: ../../library/multiprocessing.rst:2491
+#: ../../library/multiprocessing.rst:2526
msgid ""
"If *authkey* is given and not ``None``, it should be a byte string and will "
"be used as the secret key for an HMAC-based authentication challenge. No "
@@ -3677,26 +3679,26 @@ msgid ""
"`multiprocessing-auth-keys`."
msgstr ""
-#: ../../library/multiprocessing.rst:2497
+#: ../../library/multiprocessing.rst:2499
msgid ""
"A wrapper for a bound socket or Windows named pipe which is 'listening' for "
"connections."
msgstr ""
-#: ../../library/multiprocessing.rst:2500
+#: ../../library/multiprocessing.rst:2502
msgid ""
"*address* is the address to be used by the bound socket or named pipe of the "
"listener object."
msgstr ""
-#: ../../library/multiprocessing.rst:2505
+#: ../../library/multiprocessing.rst:2507
msgid ""
"If an address of '0.0.0.0' is used, the address will not be a connectable "
"end point on Windows. If you require a connectable end-point, you should use "
"'127.0.0.1'."
msgstr ""
-#: ../../library/multiprocessing.rst:2509
+#: ../../library/multiprocessing.rst:2511
msgid ""
"*family* is the type of socket (or named pipe) to use. This can be one of "
"the strings ``'AF_INET'`` (for a TCP socket), ``'AF_UNIX'`` (for a Unix "
@@ -3710,49 +3712,49 @@ msgid ""
"using :func:`tempfile.mkstemp`."
msgstr ""
-#: ../../library/multiprocessing.rst:2520
+#: ../../library/multiprocessing.rst:2522
msgid ""
"If the listener object uses a socket then *backlog* (1 by default) is passed "
"to the :meth:`~socket.socket.listen` method of the socket once it has been "
"bound."
msgstr ""
-#: ../../library/multiprocessing.rst:2532
+#: ../../library/multiprocessing.rst:2534
msgid ""
"Accept a connection on the bound socket or named pipe of the listener object "
"and return a :class:`~Connection` object. If authentication is attempted and "
"fails, then :exc:`~multiprocessing.AuthenticationError` is raised."
msgstr ""
-#: ../../library/multiprocessing.rst:2539
+#: ../../library/multiprocessing.rst:2541
msgid ""
"Close the bound socket or named pipe of the listener object. This is called "
"automatically when the listener is garbage collected. However it is "
"advisable to call it explicitly."
msgstr ""
-#: ../../library/multiprocessing.rst:2543
+#: ../../library/multiprocessing.rst:2545
msgid "Listener objects have the following read-only properties:"
msgstr ""
-#: ../../library/multiprocessing.rst:2547
+#: ../../library/multiprocessing.rst:2549
msgid "The address which is being used by the Listener object."
msgstr ""
-#: ../../library/multiprocessing.rst:2551
+#: ../../library/multiprocessing.rst:2553
msgid ""
"The address from which the last accepted connection came. If this is "
"unavailable then it is ``None``."
msgstr ""
-#: ../../library/multiprocessing.rst:2554
+#: ../../library/multiprocessing.rst:2556
msgid ""
"Listener objects now support the context management protocol -- see :ref:"
"`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the "
"listener object, and :meth:`~contextmanager.__exit__` calls :meth:`close`."
msgstr ""
-#: ../../library/multiprocessing.rst:2561
+#: ../../library/multiprocessing.rst:2563
msgid ""
"Wait till an object in *object_list* is ready. Returns the list of those "
"objects in *object_list* which are ready. If *timeout* is a float then the "
@@ -3761,32 +3763,32 @@ msgid ""
"zero timeout."
msgstr ""
-#: ../../library/multiprocessing.rst:2567
+#: ../../library/multiprocessing.rst:2569
msgid ""
"For both POSIX and Windows, an object can appear in *object_list* if it is"
msgstr ""
-#: ../../library/multiprocessing.rst:2570
+#: ../../library/multiprocessing.rst:2572
msgid "a readable :class:`~multiprocessing.connection.Connection` object;"
msgstr ""
-#: ../../library/multiprocessing.rst:2571
+#: ../../library/multiprocessing.rst:2573
msgid "a connected and readable :class:`socket.socket` object; or"
msgstr ""
-#: ../../library/multiprocessing.rst:2572
+#: ../../library/multiprocessing.rst:2574
msgid ""
"the :attr:`~multiprocessing.Process.sentinel` attribute of a :class:"
"`~multiprocessing.Process` object."
msgstr ""
-#: ../../library/multiprocessing.rst:2575
+#: ../../library/multiprocessing.rst:2577
msgid ""
"A connection or socket object is ready when there is data available to be "
"read from it, or the other end has been closed."
msgstr ""
-#: ../../library/multiprocessing.rst:2578
+#: ../../library/multiprocessing.rst:2580
msgid ""
"**POSIX**: ``wait(object_list, timeout)`` almost equivalent ``select."
"select(object_list, [], [], timeout)``. The difference is that, if :func:"
@@ -3794,7 +3796,7 @@ msgid ""
"an error number of ``EINTR``, whereas :func:`wait` will not."
msgstr ""
-#: ../../library/multiprocessing.rst:2584
+#: ../../library/multiprocessing.rst:2586
msgid ""
"**Windows**: An item in *object_list* must either be an integer handle which "
"is waitable (according to the definition used by the documentation of the "
@@ -3804,18 +3806,18 @@ msgid ""
"handles.)"
msgstr ""
-#: ../../library/multiprocessing.rst:2594
+#: ../../library/multiprocessing.rst:2596
msgid "**Examples**"
msgstr ""
-#: ../../library/multiprocessing.rst:2596
+#: ../../library/multiprocessing.rst:2598
msgid ""
"The following server code creates a listener which uses ``'secret "
"password'`` as an authentication key. It then waits for a connection and "
"sends some data to the client::"
msgstr ""
-#: ../../library/multiprocessing.rst:2600
+#: ../../library/multiprocessing.rst:2602
msgid ""
"from multiprocessing.connection import Listener\n"
"from array import array\n"
@@ -3833,13 +3835,13 @@ msgid ""
" conn.send_bytes(array('i', [42, 1729]))"
msgstr ""
-#: ../../library/multiprocessing.rst:2615
+#: ../../library/multiprocessing.rst:2617
msgid ""
"The following code connects to the server and receives some data from the "
"server::"
msgstr ""
-#: ../../library/multiprocessing.rst:2618
+#: ../../library/multiprocessing.rst:2620
msgid ""
"from multiprocessing.connection import Client\n"
"from array import array\n"
@@ -3869,13 +3871,13 @@ msgstr ""
" print(conn.recv_bytes_into(arr)) # => 8\n"
" print(arr) # => array('i', [42, 1729, 0, 0, 0])"
-#: ../../library/multiprocessing.rst:2632
+#: ../../library/multiprocessing.rst:2634
msgid ""
"The following code uses :func:`~multiprocessing.connection.wait` to wait for "
"messages from multiple processes at once::"
msgstr ""
-#: ../../library/multiprocessing.rst:2635
+#: ../../library/multiprocessing.rst:2637
msgid ""
"from multiprocessing import Process, Pipe, current_process\n"
"from multiprocessing.connection import wait\n"
@@ -3909,23 +3911,23 @@ msgid ""
" print(msg)"
msgstr ""
-#: ../../library/multiprocessing.rst:2670
+#: ../../library/multiprocessing.rst:2672
msgid "Address Formats"
msgstr ""
-#: ../../library/multiprocessing.rst:2672
+#: ../../library/multiprocessing.rst:2674
msgid ""
"An ``'AF_INET'`` address is a tuple of the form ``(hostname, port)`` where "
"*hostname* is a string and *port* is an integer."
msgstr ""
-#: ../../library/multiprocessing.rst:2675
+#: ../../library/multiprocessing.rst:2677
msgid ""
"An ``'AF_UNIX'`` address is a string representing a filename on the "
"filesystem."
msgstr ""
-#: ../../library/multiprocessing.rst:2678
+#: ../../library/multiprocessing.rst:2680
msgid ""
"An ``'AF_PIPE'`` address is a string of the form :samp:`r'\\\\\\\\\\\\.\\"
"\\pipe\\\\\\\\{PipeName}'`. To use :func:`Client` to connect to a named "
@@ -3934,17 +3936,17 @@ msgid ""
"instead."
msgstr ""
-#: ../../library/multiprocessing.rst:2683
+#: ../../library/multiprocessing.rst:2685
msgid ""
"Note that any string beginning with two backslashes is assumed by default to "
"be an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address."
msgstr ""
-#: ../../library/multiprocessing.rst:2690
+#: ../../library/multiprocessing.rst:2692
msgid "Authentication keys"
msgstr ""
-#: ../../library/multiprocessing.rst:2692
+#: ../../library/multiprocessing.rst:2694
msgid ""
"When one uses :meth:`Connection.recv `, the data received "
"is automatically unpickled. Unfortunately unpickling data from an untrusted "
@@ -3952,7 +3954,7 @@ msgid ""
"use the :mod:`hmac` module to provide digest authentication."
msgstr ""
-#: ../../library/multiprocessing.rst:2698
+#: ../../library/multiprocessing.rst:2700
msgid ""
"An authentication key is a byte string which can be thought of as a "
"password: once a connection is established both ends will demand proof that "
@@ -3960,7 +3962,7 @@ msgid ""
"using the same key does **not** involve sending the key over the connection.)"
msgstr ""
-#: ../../library/multiprocessing.rst:2704
+#: ../../library/multiprocessing.rst:2706
msgid ""
"If authentication is requested but no authentication key is specified then "
"the return value of ``current_process().authkey`` is used (see :class:"
@@ -3971,17 +3973,17 @@ msgid ""
"setting up connections between themselves."
msgstr ""
-#: ../../library/multiprocessing.rst:2712
+#: ../../library/multiprocessing.rst:2714
msgid ""
"Suitable authentication keys can also be generated by using :func:`os."
"urandom`."
msgstr ""
-#: ../../library/multiprocessing.rst:2716
+#: ../../library/multiprocessing.rst:2718
msgid "Logging"
msgstr ""
-#: ../../library/multiprocessing.rst:2718
+#: ../../library/multiprocessing.rst:2720
msgid ""
"Some support for logging is available. Note, however, that the :mod:"
"`logging` package does not use process shared locks so it is possible "
@@ -3989,27 +3991,27 @@ msgid ""
"mixed up."
msgstr ""
-#: ../../library/multiprocessing.rst:2725
+#: ../../library/multiprocessing.rst:2727
msgid ""
"Returns the logger used by :mod:`multiprocessing`. If necessary, a new one "
"will be created."
msgstr ""
-#: ../../library/multiprocessing.rst:2728
+#: ../../library/multiprocessing.rst:2730
msgid ""
"When first created the logger has level :const:`logging.NOTSET` and no "
"default handler. Messages sent to this logger will not by default propagate "
"to the root logger."
msgstr ""
-#: ../../library/multiprocessing.rst:2732
+#: ../../library/multiprocessing.rst:2734
msgid ""
"Note that on Windows child processes will only inherit the level of the "
"parent process's logger -- any other customization of the logger will not be "
"inherited."
msgstr ""
-#: ../../library/multiprocessing.rst:2739
+#: ../../library/multiprocessing.rst:2741
msgid ""
"This function performs a call to :func:`get_logger` but in addition to "
"returning the logger created by get_logger, it adds a handler which sends "
@@ -4018,11 +4020,11 @@ msgid ""
"``level`` argument."
msgstr ""
-#: ../../library/multiprocessing.rst:2745
+#: ../../library/multiprocessing.rst:2747
msgid "Below is an example session with logging turned on::"
msgstr ""
-#: ../../library/multiprocessing.rst:2747
+#: ../../library/multiprocessing.rst:2749
msgid ""
">>> import multiprocessing, logging\n"
">>> logger = multiprocessing.log_to_stderr()\n"
@@ -4050,21 +4052,21 @@ msgstr ""
"[INFO/MainProcess] sending shutdown message to manager\n"
"[INFO/SyncManager-...] manager exiting with exitcode 0"
-#: ../../library/multiprocessing.rst:2760
+#: ../../library/multiprocessing.rst:2762
msgid "For a full table of logging levels, see the :mod:`logging` module."
msgstr ""
-#: ../../library/multiprocessing.rst:2764
+#: ../../library/multiprocessing.rst:2766
msgid "The :mod:`multiprocessing.dummy` module"
msgstr ":mod:`multiprocessing.dummy` 模組"
-#: ../../library/multiprocessing.rst:2769
+#: ../../library/multiprocessing.rst:2771
msgid ""
":mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` "
"but is no more than a wrapper around the :mod:`threading` module."
msgstr ""
-#: ../../library/multiprocessing.rst:2774
+#: ../../library/multiprocessing.rst:2776
msgid ""
"In particular, the ``Pool`` function provided by :mod:`multiprocessing."
"dummy` returns an instance of :class:`ThreadPool`, which is a subclass of :"
@@ -4072,7 +4074,7 @@ msgid ""
"worker threads rather than worker processes."
msgstr ""
-#: ../../library/multiprocessing.rst:2782
+#: ../../library/multiprocessing.rst:2784
msgid ""
"A thread pool object which controls a pool of worker threads to which jobs "
"can be submitted. :class:`ThreadPool` instances are fully interface "
@@ -4082,18 +4084,18 @@ msgid ""
"pool.Pool.terminate` manually."
msgstr ""
-#: ../../library/multiprocessing.rst:2789
+#: ../../library/multiprocessing.rst:2791
msgid ""
"*processes* is the number of worker threads to use. If *processes* is "
"``None`` then the number returned by :func:`os.process_cpu_count` is used."
msgstr ""
-#: ../../library/multiprocessing.rst:2795
+#: ../../library/multiprocessing.rst:2797
msgid ""
"Unlike :class:`Pool`, *maxtasksperchild* and *context* cannot be provided."
msgstr ""
-#: ../../library/multiprocessing.rst:2799
+#: ../../library/multiprocessing.rst:2801
msgid ""
"A :class:`ThreadPool` shares the same interface as :class:`Pool`, which is "
"designed around a pool of processes and predates the introduction of the :"
@@ -4103,7 +4105,7 @@ msgid ""
"is not understood by any other libraries."
msgstr ""
-#: ../../library/multiprocessing.rst:2806
+#: ../../library/multiprocessing.rst:2808
msgid ""
"Users should generally prefer to use :class:`concurrent.futures."
"ThreadPoolExecutor`, which has a simpler interface that was designed around "
@@ -4112,69 +4114,69 @@ msgid ""
"`asyncio`."
msgstr ""
-#: ../../library/multiprocessing.rst:2816
+#: ../../library/multiprocessing.rst:2818
msgid "Programming guidelines"
msgstr ""
-#: ../../library/multiprocessing.rst:2818
+#: ../../library/multiprocessing.rst:2820
msgid ""
"There are certain guidelines and idioms which should be adhered to when "
"using :mod:`multiprocessing`."
msgstr ""
-#: ../../library/multiprocessing.rst:2823
+#: ../../library/multiprocessing.rst:2825
msgid "All start methods"
msgstr ""
-#: ../../library/multiprocessing.rst:2825
+#: ../../library/multiprocessing.rst:2827
msgid "The following applies to all start methods."
msgstr ""
-#: ../../library/multiprocessing.rst:2827
+#: ../../library/multiprocessing.rst:2829
msgid "Avoid shared state"
msgstr ""
-#: ../../library/multiprocessing.rst:2829
+#: ../../library/multiprocessing.rst:2831
msgid ""
"As far as possible one should try to avoid shifting large amounts of data "
"between processes."
msgstr ""
-#: ../../library/multiprocessing.rst:2832
+#: ../../library/multiprocessing.rst:2834
msgid ""
"It is probably best to stick to using queues or pipes for communication "
"between processes rather than using the lower level synchronization "
"primitives."
msgstr ""
-#: ../../library/multiprocessing.rst:2836
+#: ../../library/multiprocessing.rst:2838
msgid "Picklability"
msgstr ""
-#: ../../library/multiprocessing.rst:2838
+#: ../../library/multiprocessing.rst:2840
msgid "Ensure that the arguments to the methods of proxies are picklable."
msgstr ""
-#: ../../library/multiprocessing.rst:2840
+#: ../../library/multiprocessing.rst:2842
msgid "Thread safety of proxies"
msgstr ""
-#: ../../library/multiprocessing.rst:2842
+#: ../../library/multiprocessing.rst:2844
msgid ""
"Do not use a proxy object from more than one thread unless you protect it "
"with a lock."
msgstr ""
-#: ../../library/multiprocessing.rst:2845
+#: ../../library/multiprocessing.rst:2847
msgid ""
"(There is never a problem with different processes using the *same* proxy.)"
msgstr ""
-#: ../../library/multiprocessing.rst:2847
+#: ../../library/multiprocessing.rst:2849
msgid "Joining zombie processes"
msgstr ""
-#: ../../library/multiprocessing.rst:2849
+#: ../../library/multiprocessing.rst:2851
msgid ""
"On POSIX when a process finishes but has not been joined it becomes a "
"zombie. There should never be very many because each time a new process "
@@ -4185,11 +4187,11 @@ msgid ""
"explicitly join all the processes that you start."
msgstr ""
-#: ../../library/multiprocessing.rst:2857
+#: ../../library/multiprocessing.rst:2859
msgid "Better to inherit than pickle/unpickle"
msgstr ""
-#: ../../library/multiprocessing.rst:2859
+#: ../../library/multiprocessing.rst:2861
msgid ""
"When using the *spawn* or *forkserver* start methods many types from :mod:"
"`multiprocessing` need to be picklable so that child processes can use "
@@ -4199,11 +4201,11 @@ msgid ""
"inherit it from an ancestor process."
msgstr ""
-#: ../../library/multiprocessing.rst:2867
+#: ../../library/multiprocessing.rst:2869
msgid "Avoid terminating processes"
msgstr ""
-#: ../../library/multiprocessing.rst:2869
+#: ../../library/multiprocessing.rst:2871
msgid ""
"Using the :meth:`Process.terminate ` "
"method to stop a process is liable to cause any shared resources (such as "
@@ -4211,18 +4213,18 @@ msgid ""
"become broken or unavailable to other processes."
msgstr ""
-#: ../../library/multiprocessing.rst:2875
+#: ../../library/multiprocessing.rst:2877
msgid ""
"Therefore it is probably best to only consider using :meth:`Process."
"terminate ` on processes which never use "
"any shared resources."
msgstr ""
-#: ../../library/multiprocessing.rst:2879
+#: ../../library/multiprocessing.rst:2881
msgid "Joining processes that use queues"
msgstr ""
-#: ../../library/multiprocessing.rst:2881
+#: ../../library/multiprocessing.rst:2883
msgid ""
"Bear in mind that a process that has put items in a queue will wait before "
"terminating until all the buffered items are fed by the \"feeder\" thread to "
@@ -4231,7 +4233,7 @@ msgid ""
"queue to avoid this behaviour.)"
msgstr ""
-#: ../../library/multiprocessing.rst:2887
+#: ../../library/multiprocessing.rst:2889
msgid ""
"This means that whenever you use a queue you need to make sure that all "
"items which have been put on the queue will eventually be removed before the "
@@ -4240,11 +4242,11 @@ msgid ""
"processes will be joined automatically."
msgstr ""
-#: ../../library/multiprocessing.rst:2893
+#: ../../library/multiprocessing.rst:2895
msgid "An example which will deadlock is the following::"
msgstr ""
-#: ../../library/multiprocessing.rst:2895
+#: ../../library/multiprocessing.rst:2897
msgid ""
"from multiprocessing import Process, Queue\n"
"\n"
@@ -4259,17 +4261,17 @@ msgid ""
" obj = queue.get()"
msgstr ""
-#: ../../library/multiprocessing.rst:2907
+#: ../../library/multiprocessing.rst:2909
msgid ""
"A fix here would be to swap the last two lines (or simply remove the ``p."
"join()`` line)."
msgstr ""
-#: ../../library/multiprocessing.rst:2910
+#: ../../library/multiprocessing.rst:2912
msgid "Explicitly pass resources to child processes"
msgstr ""
-#: ../../library/multiprocessing.rst:2912
+#: ../../library/multiprocessing.rst:2914
msgid ""
"On POSIX using the *fork* start method, a child process can make use of a "
"shared resource created in a parent process using a global resource. "
@@ -4277,7 +4279,7 @@ msgid ""
"for the child process."
msgstr ""
-#: ../../library/multiprocessing.rst:2917
+#: ../../library/multiprocessing.rst:2919
msgid ""
"Apart from making the code (potentially) compatible with Windows and the "
"other start methods this also ensures that as long as the child process is "
@@ -4286,11 +4288,11 @@ msgid ""
"collected in the parent process."
msgstr ""
-#: ../../library/multiprocessing.rst:2924
+#: ../../library/multiprocessing.rst:2926
msgid "So for instance ::"
msgstr ""
-#: ../../library/multiprocessing.rst:2926
+#: ../../library/multiprocessing.rst:2928
msgid ""
"from multiprocessing import Process, Lock\n"
"\n"
@@ -4312,11 +4314,11 @@ msgstr ""
" for i in range(10):\n"
" Process(target=f).start()"
-#: ../../library/multiprocessing.rst:2936
+#: ../../library/multiprocessing.rst:2938
msgid "should be rewritten as ::"
msgstr ""
-#: ../../library/multiprocessing.rst:2938
+#: ../../library/multiprocessing.rst:2940
msgid ""
"from multiprocessing import Process, Lock\n"
"\n"
@@ -4338,25 +4340,25 @@ msgstr ""
" for i in range(10):\n"
" Process(target=f, args=(lock,)).start()"
-#: ../../library/multiprocessing.rst:2948
+#: ../../library/multiprocessing.rst:2950
msgid "Beware of replacing :data:`sys.stdin` with a \"file like object\""
msgstr ""
-#: ../../library/multiprocessing.rst:2950
+#: ../../library/multiprocessing.rst:2952
msgid ":mod:`multiprocessing` originally unconditionally called::"
msgstr ""
-#: ../../library/multiprocessing.rst:2952
+#: ../../library/multiprocessing.rst:2954
msgid "os.close(sys.stdin.fileno())"
msgstr "os.close(sys.stdin.fileno())"
-#: ../../library/multiprocessing.rst:2954
+#: ../../library/multiprocessing.rst:2956
msgid ""
"in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted "
"in issues with processes-in-processes. This has been changed to::"
msgstr ""
-#: ../../library/multiprocessing.rst:2957
+#: ../../library/multiprocessing.rst:2959
msgid ""
"sys.stdin.close()\n"
"sys.stdin = open(os.open(os.devnull, os.O_RDONLY), closefd=False)"
@@ -4364,7 +4366,7 @@ msgstr ""
"sys.stdin.close()\n"
"sys.stdin = open(os.open(os.devnull, os.O_RDONLY), closefd=False)"
-#: ../../library/multiprocessing.rst:2960
+#: ../../library/multiprocessing.rst:2962
msgid ""
"Which solves the fundamental issue of processes colliding with each other "
"resulting in a bad file descriptor error, but introduces a potential danger "
@@ -4374,14 +4376,14 @@ msgid ""
"data being flushed to the object multiple times, resulting in corruption."
msgstr ""
-#: ../../library/multiprocessing.rst:2967
+#: ../../library/multiprocessing.rst:2969
msgid ""
"If you write a file-like object and implement your own caching, you can make "
"it fork-safe by storing the pid whenever you append to the cache, and "
"discarding the cache when the pid changes. For example::"
msgstr ""
-#: ../../library/multiprocessing.rst:2971
+#: ../../library/multiprocessing.rst:2973
msgid ""
"@property\n"
"def cache(self):\n"
@@ -4399,26 +4401,26 @@ msgstr ""
" self._cache = []\n"
" return self._cache"
-#: ../../library/multiprocessing.rst:2979
+#: ../../library/multiprocessing.rst:2981
msgid ""
"For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331`"
msgstr ""
-#: ../../library/multiprocessing.rst:2982
+#: ../../library/multiprocessing.rst:2984
msgid "The *spawn* and *forkserver* start methods"
msgstr ""
-#: ../../library/multiprocessing.rst:2984
+#: ../../library/multiprocessing.rst:2986
msgid ""
"There are a few extra restrictions which don't apply to the *fork* start "
"method."
msgstr ""
-#: ../../library/multiprocessing.rst:2987
+#: ../../library/multiprocessing.rst:2989
msgid "More picklability"
msgstr ""
-#: ../../library/multiprocessing.rst:2989
+#: ../../library/multiprocessing.rst:2991
msgid ""
"Ensure that all arguments to :meth:`Process.__init__` are picklable. Also, "
"if you subclass :class:`~multiprocessing.Process` then make sure that "
@@ -4426,11 +4428,11 @@ msgid ""
"Process.start>` method is called."
msgstr ""
-#: ../../library/multiprocessing.rst:2994
+#: ../../library/multiprocessing.rst:2996
msgid "Global variables"
msgstr ""
-#: ../../library/multiprocessing.rst:2996
+#: ../../library/multiprocessing.rst:2998
msgid ""
"Bear in mind that if code run in a child process tries to access a global "
"variable, then the value it sees (if any) may not be the same as the value "
@@ -4438,30 +4440,30 @@ msgid ""
"Process.start>` was called."
msgstr ""
-#: ../../library/multiprocessing.rst:3001
+#: ../../library/multiprocessing.rst:3003
msgid ""
"However, global variables which are just module level constants cause no "
"problems."
msgstr ""
-#: ../../library/multiprocessing.rst:3006
+#: ../../library/multiprocessing.rst:3008
msgid "Safe importing of main module"
msgstr ""
-#: ../../library/multiprocessing.rst:3008
+#: ../../library/multiprocessing.rst:3010
msgid ""
"Make sure that the main module can be safely imported by a new Python "
"interpreter without causing unintended side effects (such as starting a new "
"process)."
msgstr ""
-#: ../../library/multiprocessing.rst:3012
+#: ../../library/multiprocessing.rst:3014
msgid ""
"For example, using the *spawn* or *forkserver* start method running the "
"following module would fail with a :exc:`RuntimeError`::"
msgstr ""
-#: ../../library/multiprocessing.rst:3016
+#: ../../library/multiprocessing.rst:3018
msgid ""
"from multiprocessing import Process\n"
"\n"
@@ -4479,13 +4481,13 @@ msgstr ""
"p = Process(target=foo)\n"
"p.start()"
-#: ../../library/multiprocessing.rst:3024
+#: ../../library/multiprocessing.rst:3026
msgid ""
"Instead one should protect the \"entry point\" of the program by using ``if "
"__name__ == '__main__':`` as follows::"
msgstr ""
-#: ../../library/multiprocessing.rst:3027
+#: ../../library/multiprocessing.rst:3029
msgid ""
"from multiprocessing import Process, freeze_support, set_start_method\n"
"\n"
@@ -4509,33 +4511,33 @@ msgstr ""
" p = Process(target=foo)\n"
" p.start()"
-#: ../../library/multiprocessing.rst:3038
+#: ../../library/multiprocessing.rst:3040
msgid ""
"(The ``freeze_support()`` line can be omitted if the program will be run "
"normally instead of frozen.)"
msgstr ""
-#: ../../library/multiprocessing.rst:3041
+#: ../../library/multiprocessing.rst:3043
msgid ""
"This allows the newly spawned Python interpreter to safely import the module "
"and then run the module's ``foo()`` function."
msgstr ""
-#: ../../library/multiprocessing.rst:3044
+#: ../../library/multiprocessing.rst:3046
msgid ""
"Similar restrictions apply if a pool or manager is created in the main "
"module."
msgstr ""
-#: ../../library/multiprocessing.rst:3051
+#: ../../library/multiprocessing.rst:3053
msgid "Examples"
msgstr "範例"
-#: ../../library/multiprocessing.rst:3053
+#: ../../library/multiprocessing.rst:3055
msgid "Demonstration of how to create and use customized managers and proxies:"
msgstr ""
-#: ../../library/multiprocessing.rst:3055
+#: ../../library/multiprocessing.rst:3057
msgid ""
"from multiprocessing import freeze_support\n"
"from multiprocessing.managers import BaseManager, BaseProxy\n"
@@ -4629,11 +4631,11 @@ msgid ""
" test()\n"
msgstr ""
-#: ../../library/multiprocessing.rst:3059
+#: ../../library/multiprocessing.rst:3061
msgid "Using :class:`~multiprocessing.pool.Pool`:"
msgstr "使用 :class:`~multiprocessing.pool.Pool`:"
-#: ../../library/multiprocessing.rst:3061
+#: ../../library/multiprocessing.rst:3063
msgid ""
"import multiprocessing\n"
"import time\n"
@@ -4793,13 +4795,13 @@ msgid ""
" test()\n"
msgstr ""
-#: ../../library/multiprocessing.rst:3065
+#: ../../library/multiprocessing.rst:3067
msgid ""
"An example showing how to use queues to feed tasks to a collection of worker "
"processes and collect the results:"
msgstr ""
-#: ../../library/multiprocessing.rst:3068
+#: ../../library/multiprocessing.rst:3070
msgid ""
"import time\n"
"import random\n"
diff --git a/library/nntplib.po b/library/nntplib.po
index e90544691c..908464fbce 100644
--- a/library/nntplib.po
+++ b/library/nntplib.po
@@ -18,7 +18,7 @@ msgstr ""
#: ../../library/nntplib.rst:2
msgid ":mod:`!nntplib` --- NNTP protocol client"
-msgstr ":mod:`!nntplib` --- NNTP 協定客戶端"
+msgstr ":mod:`!nntplib` --- NNTP 協定用戶端"
#: ../../library/nntplib.rst:10
msgid ""
diff --git a/library/optparse.po b/library/optparse.po
index b23b142f75..f759497dfe 100644
--- a/library/optparse.po
+++ b/library/optparse.po
@@ -1598,7 +1598,7 @@ msgstr ""
#: ../../library/optparse.rst:922
msgid "``usage`` (default: ``\"%prog [options]\"``)"
-msgstr ""
+msgstr "``usage``\\ (預設值:``\"%prog [options]\"``)"
#: ../../library/optparse.rst:923
msgid ""
@@ -1611,7 +1611,7 @@ msgstr ""
#: ../../library/optparse.rst:929
msgid "``option_list`` (default: ``[]``)"
-msgstr ""
+msgstr "``option_list``\\ (預設值:``[]``)"
#: ../../library/optparse.rst:930
msgid ""
@@ -1632,7 +1632,7 @@ msgstr ""
#: ../../library/optparse.rst:939
msgid "``version`` (default: ``None``)"
-msgstr ""
+msgstr "``version``\\ (預設值:``None``)"
#: ../../library/optparse.rst:940
msgid ""
@@ -1644,7 +1644,7 @@ msgstr ""
#: ../../library/optparse.rst:945
msgid "``conflict_handler`` (default: ``\"error\"``)"
-msgstr ""
+msgstr "``conflict_handler``\\ (預設值:``\"error\"``)"
#: ../../library/optparse.rst:946
msgid ""
@@ -1654,7 +1654,7 @@ msgstr ""
#: ../../library/optparse.rst:950
msgid "``description`` (default: ``None``)"
-msgstr ""
+msgstr "``description``\\ (預設值:``None``)"
#: ../../library/optparse.rst:951
msgid ""
@@ -1677,7 +1677,7 @@ msgstr ""
#: ../../library/optparse.rst:961
msgid "``add_help_option`` (default: ``True``)"
-msgstr ""
+msgstr "``add_help_option``\\ (預設值:``True``)"
#: ../../library/optparse.rst:962
msgid ""
@@ -1697,7 +1697,7 @@ msgstr ""
#: ../../library/optparse.rst:969
msgid "``epilog`` (default: ``None``)"
-msgstr ""
+msgstr "``epilog``\\ (預設值:``None``)"
#: ../../library/optparse.rst:970
msgid "A paragraph of help text to print after the option help."
diff --git a/library/os.path.po b/library/os.path.po
index 12a8476e27..dd776816d6 100644
--- a/library/os.path.po
+++ b/library/os.path.po
@@ -39,7 +39,7 @@ msgid ""
msgstr ""
"該模組實現了一些有用的路徑名操作函式。若要讀取或寫入檔案,請參閱 :func:"
"`open` 函式,要存取檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位元"
-"組或任何依照 :class:`os.PathLike` 協議實作的物件傳遞。"
+"組或任何依照 :class:`os.PathLike` 協定實作的物件傳遞。"
#: ../../library/os.path.rst:19
msgid ""
@@ -456,7 +456,7 @@ msgstr ""
#: ../../library/os.path.rst:348
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/os.path.rst:355
msgid ""
diff --git a/library/os.po b/library/os.po
index b2f2e44c90..09e8c4943f 100644
--- a/library/os.po
+++ b/library/os.po
@@ -397,7 +397,7 @@ msgstr ""
#: ../../library/os.rst:5532 ../../library/os.rst:5559
#: ../../library/os.rst:5568 ../../library/os.rst:5691
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/os.rst:186
msgid ""
@@ -3092,7 +3092,7 @@ msgstr ""
msgid ""
"The :func:`scandir` iterator supports the :term:`context manager` protocol "
"and has the following method:"
-msgstr ""
+msgstr ":func:`scandir` 疊代器支援 :term:`context manager` 協定,並具有以下方法:"
#: ../../library/os.rst:2799
msgid "Close the iterator and free acquired resources."
@@ -3150,7 +3150,7 @@ msgstr ""
#: ../../library/os.rst:2840
msgid "Added support for :ref:`file descriptors ` on Unix."
-msgstr ""
+msgstr "新增對 Unix 上的\\ :ref:`檔案描述器 `\\ 的支援。"
#: ../../library/os.rst:2846
msgid ""
@@ -5946,7 +5946,7 @@ msgstr ""
#: ../../library/os.rst:5234
msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values."
-msgstr ""
+msgstr "新增 :data:`CLD_KILLED` 和 :data:`CLD_STOPPED` 值。"
#: ../../library/os.rst:5240
msgid "Convert a wait status to an exit code."
@@ -5954,7 +5954,7 @@ msgstr ""
#: ../../library/os.rst:5242
msgid "On Unix:"
-msgstr ""
+msgstr "在 Unix 上:"
#: ../../library/os.rst:5244
msgid ""
@@ -5973,7 +5973,7 @@ msgstr ""
#: ../../library/os.rst:5251
msgid "Otherwise, raise a :exc:`ValueError`."
-msgstr ""
+msgstr "否則,引發 :exc:`ValueError`。"
#: ../../library/os.rst:5253
msgid "On Windows, return *status* shifted right by 8 bits."
@@ -6069,7 +6069,7 @@ msgstr ""
#: ../../library/os.rst:5351
msgid "Interface to the scheduler"
-msgstr ""
+msgstr "排程器介面"
#: ../../library/os.rst:5353
msgid ""
@@ -6104,11 +6104,11 @@ msgstr ""
#: ../../library/os.rst:5383
msgid "A First In First Out scheduling policy."
-msgstr ""
+msgstr "先進先出排程策略。"
#: ../../library/os.rst:5387
msgid "A round-robin scheduling policy."
-msgstr ""
+msgstr "輪轉排程策略。"
#: ../../library/os.rst:5391
msgid ""
diff --git a/library/platform.po b/library/platform.po
index d7f235e812..8abe17dd5e 100644
--- a/library/platform.po
+++ b/library/platform.po
@@ -402,7 +402,7 @@ msgstr ""
#: ../../library/platform.rst:263
msgid "``system`` is the OS name; either ``'iOS'`` or ``'iPadOS'``."
-msgstr ""
+msgstr "``system`` 是 OS 名稱;可能是 ``'iOS'`` 或 ``'iPadOS'``。"
#: ../../library/platform.rst:264
msgid "``release`` is the iOS version number as a string (e.g., ``'17.2'``)."
diff --git a/library/plistlib.po b/library/plistlib.po
index be0ef2cf37..3884d2ca08 100644
--- a/library/plistlib.po
+++ b/library/plistlib.po
@@ -137,7 +137,7 @@ msgstr ""
#: ../../library/plistlib.rst:85 ../../library/plistlib.rst:130
msgid "The keyword-only parameter *aware_datetime* has been added."
-msgstr ""
+msgstr "新增僅限關鍵字參數 *aware_datetime*。"
#: ../../library/plistlib.rst:91
msgid ""
@@ -147,7 +147,7 @@ msgstr ""
#: ../../library/plistlib.rst:96
msgid "*data* can be a string when *fmt* equals :data:`FMT_XML`."
-msgstr ""
+msgstr "*data* 在 *fmt* 等於 :data:`FMT_XML` 時可以是一個字串。"
#: ../../library/plistlib.rst:101
msgid ""
@@ -223,7 +223,7 @@ msgstr ""
#: ../../library/plistlib.rst:157
msgid "The following constants are available:"
-msgstr ""
+msgstr "以下常數可供使用:"
#: ../../library/plistlib.rst:161
msgid "The XML format for plist files."
@@ -235,11 +235,11 @@ msgstr ""
#: ../../library/plistlib.rst:173
msgid "The module defines the following exceptions:"
-msgstr ""
+msgstr "這個模組定義了以下例外:"
#: ../../library/plistlib.rst:177
msgid "Raised when a file cannot be parsed."
-msgstr ""
+msgstr "當檔案無法被剖析時引發。"
#: ../../library/plistlib.rst:183
msgid "Examples"
diff --git a/library/poplib.po b/library/poplib.po
index 8777e9766c..d4e44ecb17 100644
--- a/library/poplib.po
+++ b/library/poplib.po
@@ -53,7 +53,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -171,7 +171,7 @@ msgstr ""
#: ../../library/poplib.rst:118
msgid "A :class:`POP3` instance has the following methods:"
-msgstr ""
+msgstr ":class:`POP3` 實例擁有以下方法:"
#: ../../library/poplib.rst:123
msgid ""
diff --git a/library/posix.po b/library/posix.po
index b80eda94d9..b9f4d10965 100644
--- a/library/posix.po
+++ b/library/posix.po
@@ -34,7 +34,7 @@ msgstr ""
#: ../../library/posix.rst:14
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/posix.rst:18
msgid ""
diff --git a/library/pty.po b/library/pty.po
index e6e9a6bb7f..95d91da398 100644
--- a/library/pty.po
+++ b/library/pty.po
@@ -34,7 +34,7 @@ msgstr ""
#: ../../library/pty.rst:19
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/pty.rst:21
msgid ""
@@ -45,7 +45,7 @@ msgstr ""
#: ../../library/pty.rst:25
msgid "The :mod:`pty` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`pty` 模組定義了以下函式:"
#: ../../library/pty.rst:30
msgid ""
diff --git a/library/pwd.po b/library/pwd.po
index 4f4a5acc84..598dfe3ff8 100644
--- a/library/pwd.po
+++ b/library/pwd.po
@@ -32,7 +32,7 @@ msgstr ""
#: ../../library/pwd.rst:13
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/pwd.rst:15
msgid ""
@@ -159,7 +159,7 @@ msgid ""
msgstr ""
"在傳統的 Unix 中,``pw_passwd`` 欄位通常包含一個使用 DES 衍生演算法加密的密"
"碼。然而,大多數現代 Unix 是使用所謂的 *shadow password* 系統。在那些 Unix "
-"上,*pw_passwd* 欄位僅包含一個星號 (``'*'``) 或字母 ``'x'``,其中加密密碼存儲"
+"上,*pw_passwd* 欄位僅包含一個星號 (``'*'``) 或字母 ``'x'``,其中加密密碼儲存"
"在非全域可讀的 (not world readable) :file:`/etc/shadow` 檔案中。*pw_passwd* "
"欄位是否包含任何有用的內容取決於系統。"
diff --git a/library/py_compile.po b/library/py_compile.po
index 19828595ae..c7c02a8446 100644
--- a/library/py_compile.po
+++ b/library/py_compile.po
@@ -169,7 +169,7 @@ msgstr ""
#: ../../library/py_compile.rst:131
msgid "Command-Line Interface"
-msgstr ""
+msgstr "命令列介面"
#: ../../library/py_compile.rst:133
msgid ""
diff --git a/library/pydoc.po b/library/pydoc.po
index 8e39b85b7c..6e5f41efd4 100644
--- a/library/pydoc.po
+++ b/library/pydoc.po
@@ -150,7 +150,7 @@ msgstr "新增 ``-b`` 選項。"
#: ../../library/pydoc.rst:101
msgid "The ``-g`` command line option was removed."
-msgstr ""
+msgstr "移除 ``-g`` 命令列選項。"
#: ../../library/pydoc.rst:104
msgid ""
diff --git a/library/pyexpat.po b/library/pyexpat.po
index b5d6eca3f3..9fea398e75 100644
--- a/library/pyexpat.po
+++ b/library/pyexpat.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-09-03 11:11+0800\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:08+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -23,12 +23,11 @@ msgstr ":mod:`!xml.parsers.expat` --- 使用 Expat 進行快速 XML 剖析"
#: ../../library/pyexpat.rst:21
msgid ""
-"The :mod:`pyexpat` module is not secure against maliciously constructed "
-"data. If you need to parse untrusted or unauthenticated data see :ref:`xml-"
-"vulnerabilities`."
-msgstr ""
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/pyexpat.rst:28
+#: ../../library/pyexpat.rst:27
msgid ""
"The :mod:`xml.parsers.expat` module is a Python interface to the Expat non-"
"validating XML parser. The module provides a single extension type, :class:"
@@ -39,39 +38,39 @@ msgid ""
"in the XML document."
msgstr ""
-#: ../../library/pyexpat.rst:38
+#: ../../library/pyexpat.rst:37
msgid ""
"This module uses the :mod:`pyexpat` module to provide access to the Expat "
"parser. Direct use of the :mod:`pyexpat` module is deprecated."
msgstr ""
-#: ../../library/pyexpat.rst:41
+#: ../../library/pyexpat.rst:40
msgid "This module provides one exception and one type object:"
-msgstr ""
+msgstr "這個模組提供一個例外和一個型別物件:"
-#: ../../library/pyexpat.rst:46
+#: ../../library/pyexpat.rst:45
msgid ""
"The exception raised when Expat reports an error. See section :ref:"
"`expaterror-objects` for more information on interpreting Expat errors."
msgstr ""
-#: ../../library/pyexpat.rst:52
+#: ../../library/pyexpat.rst:51
msgid "Alias for :exc:`ExpatError`."
msgstr ":exc:`ExpatError` 的別名。"
-#: ../../library/pyexpat.rst:57
+#: ../../library/pyexpat.rst:56
msgid "The type of the return values from the :func:`ParserCreate` function."
msgstr ""
-#: ../../library/pyexpat.rst:59
+#: ../../library/pyexpat.rst:58
msgid "The :mod:`xml.parsers.expat` module contains two functions:"
-msgstr ""
+msgstr ":mod:`xml.parsers.expat` 模組包含兩個函式:"
-#: ../../library/pyexpat.rst:64
+#: ../../library/pyexpat.rst:63
msgid "Returns an explanatory string for a given error number *errno*."
-msgstr ""
+msgstr "回傳一個給定錯誤編號 *errno* 的解釋字串。"
-#: ../../library/pyexpat.rst:69
+#: ../../library/pyexpat.rst:68
msgid ""
"Creates and returns a new :class:`xmlparser` object. *encoding*, if "
"specified, must be a string naming the encoding used by the XML data. "
@@ -81,7 +80,7 @@ msgid ""
"implicit or explicit encoding of the document."
msgstr ""
-#: ../../library/pyexpat.rst:76
+#: ../../library/pyexpat.rst:75
msgid ""
"Expat can optionally do XML namespace processing for you, enabled by "
"providing a value for *namespace_separator*. The value must be a one-"
@@ -96,13 +95,13 @@ msgid ""
"concatenated without any separator."
msgstr ""
-#: ../../library/pyexpat.rst:88
+#: ../../library/pyexpat.rst:87
msgid ""
"For example, if *namespace_separator* is set to a space character (``' '``) "
"and the following document is parsed:"
msgstr ""
-#: ../../library/pyexpat.rst:91
+#: ../../library/pyexpat.rst:90
msgid ""
"\n"
"\n"
""
-#: ../../library/pyexpat.rst:100
+#: ../../library/pyexpat.rst:99
msgid ""
":attr:`StartElementHandler` will receive the following strings for each "
"element::"
msgstr ""
+":attr:`StartElementHandler` 將會收到每個元素的以下字串: ::"
-#: ../../library/pyexpat.rst:103
+#: ../../library/pyexpat.rst:102
msgid ""
"http://default-namespace.org/ root\n"
"http://www.python.org/ns/ elem1\n"
@@ -134,7 +134,7 @@ msgstr ""
"http://www.python.org/ns/ elem1\n"
"elem2"
-#: ../../library/pyexpat.rst:107
+#: ../../library/pyexpat.rst:106
msgid ""
"Due to limitations in the ``Expat`` library used by :mod:`pyexpat`, the :"
"class:`xmlparser` instance returned can only be used to parse a single XML "
@@ -142,23 +142,23 @@ msgid ""
"instances."
msgstr ""
-#: ../../library/pyexpat.rst:115
+#: ../../library/pyexpat.rst:114
msgid "`The Expat XML Parser `_"
-msgstr ""
+msgstr "`Expat XML 剖析器 `_"
-#: ../../library/pyexpat.rst:116
+#: ../../library/pyexpat.rst:115
msgid "Home page of the Expat project."
-msgstr ""
+msgstr "Expat 專案的首頁。"
-#: ../../library/pyexpat.rst:122
+#: ../../library/pyexpat.rst:121
msgid "XMLParser Objects"
msgstr "XMLParser 物件"
-#: ../../library/pyexpat.rst:124
+#: ../../library/pyexpat.rst:123
msgid ":class:`xmlparser` objects have the following methods:"
-msgstr ""
+msgstr ":class:`xmlparser` 物件擁有以下方法:"
-#: ../../library/pyexpat.rst:129
+#: ../../library/pyexpat.rst:128
msgid ""
"Parses the contents of the string *data*, calling the appropriate handler "
"functions to process the parsed data. *isfinal* must be true on the final "
@@ -167,14 +167,14 @@ msgid ""
"time."
msgstr ""
-#: ../../library/pyexpat.rst:138
+#: ../../library/pyexpat.rst:137
msgid ""
"Parse XML data reading from the object *file*. *file* only needs to provide "
"the ``read(nbytes)`` method, returning the empty string when there's no more "
"data."
msgstr ""
-#: ../../library/pyexpat.rst:145
+#: ../../library/pyexpat.rst:144
msgid ""
"Sets the base to be used for resolving relative URIs in system identifiers "
"in declarations. Resolving relative identifiers is left to the application: "
@@ -183,20 +183,20 @@ msgid ""
"`UnparsedEntityDeclHandler` functions."
msgstr ""
-#: ../../library/pyexpat.rst:154
+#: ../../library/pyexpat.rst:153
msgid ""
"Returns a string containing the base set by a previous call to :meth:"
"`SetBase`, or ``None`` if :meth:`SetBase` hasn't been called."
msgstr ""
-#: ../../library/pyexpat.rst:160
+#: ../../library/pyexpat.rst:159
msgid ""
"Returns the input data that generated the current event as a string. The "
"data is in the encoding of the entity which contains the text. When called "
"while an event handler is not active, the return value is ``None``."
msgstr ""
-#: ../../library/pyexpat.rst:167
+#: ../../library/pyexpat.rst:166
msgid ""
"Create a \"child\" parser which can be used to parse an external parsed "
"entity referred to by content parsed by the parent parser. The *context* "
@@ -206,7 +206,7 @@ msgid ""
"`specified_attributes` set to the values of this parser."
msgstr ""
-#: ../../library/pyexpat.rst:176
+#: ../../library/pyexpat.rst:175
msgid ""
"Control parsing of parameter entities (including the external DTD subset). "
"Possible *flag* values are :const:`XML_PARAM_ENTITY_PARSING_NEVER`, :const:"
@@ -215,7 +215,7 @@ msgid ""
"successful."
msgstr ""
-#: ../../library/pyexpat.rst:184
+#: ../../library/pyexpat.rst:183
msgid ""
"Calling this with a true value for *flag* (the default) will cause Expat to "
"call the :attr:`ExternalEntityRefHandler` with :const:`None` for all "
@@ -225,13 +225,13 @@ msgid ""
"`EndDoctypeDeclHandler` will not be called."
msgstr ""
-#: ../../library/pyexpat.rst:191
+#: ../../library/pyexpat.rst:190
msgid ""
"Passing a false value for *flag* will cancel a previous call that passed a "
"true value, but otherwise has no effect."
msgstr ""
-#: ../../library/pyexpat.rst:194
+#: ../../library/pyexpat.rst:193
msgid ""
"This method can only be called before the :meth:`Parse` or :meth:`ParseFile` "
"methods are called; calling it after either of those have been called "
@@ -239,14 +239,14 @@ msgid ""
"``errors.codes[errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING]``."
msgstr ""
-#: ../../library/pyexpat.rst:203
+#: ../../library/pyexpat.rst:202
msgid ""
"Calling ``SetReparseDeferralEnabled(False)`` has security implications, as "
"detailed below; please make sure to understand these consequences prior to "
"using the ``SetReparseDeferralEnabled`` method."
msgstr ""
-#: ../../library/pyexpat.rst:207
+#: ../../library/pyexpat.rst:206
msgid ""
"Expat 2.6.0 introduced a security mechanism called \"reparse deferral\" "
"where instead of causing denial of service through quadratic runtime from "
@@ -261,7 +261,7 @@ msgid ""
"``SetReparseDeferralEnabled(True)`` allows re-enabling reparse deferral."
msgstr ""
-#: ../../library/pyexpat.rst:220
+#: ../../library/pyexpat.rst:219
msgid ""
"Note that :meth:`SetReparseDeferralEnabled` has been backported to some "
"prior releases of CPython as a security fix. Check for availability of :"
@@ -269,24 +269,24 @@ msgid ""
"running across a variety of Python versions."
msgstr ""
-#: ../../library/pyexpat.rst:229
+#: ../../library/pyexpat.rst:228
msgid ""
"Returns whether reparse deferral is currently enabled for the given Expat "
"parser instance."
msgstr ""
-#: ../../library/pyexpat.rst:235
+#: ../../library/pyexpat.rst:234
msgid ":class:`xmlparser` objects have the following attributes:"
msgstr ":class:`xmlparser` 物件擁有以下屬性:"
-#: ../../library/pyexpat.rst:240
+#: ../../library/pyexpat.rst:239
msgid ""
"The size of the buffer used when :attr:`buffer_text` is true. A new buffer "
"size can be set by assigning a new integer value to this attribute. When the "
"size is changed, the buffer will be flushed."
msgstr ""
-#: ../../library/pyexpat.rst:248
+#: ../../library/pyexpat.rst:247
msgid ""
"Setting this to true causes the :class:`xmlparser` object to buffer textual "
"content returned by Expat to avoid multiple calls to the :meth:"
@@ -297,14 +297,14 @@ msgid ""
"newlines may be chunked too."
msgstr ""
-#: ../../library/pyexpat.rst:259
+#: ../../library/pyexpat.rst:258
msgid ""
"If :attr:`buffer_text` is enabled, the number of bytes stored in the buffer. "
"These bytes represent UTF-8 encoded text. This attribute has no meaningful "
"interpretation when :attr:`buffer_text` is false."
msgstr ""
-#: ../../library/pyexpat.rst:266
+#: ../../library/pyexpat.rst:265
msgid ""
"Setting this attribute to a non-zero integer causes the attributes to be "
"reported as a list rather than a dictionary. The attributes are presented "
@@ -314,7 +314,7 @@ msgid ""
"is false; it may be changed at any time."
msgstr ""
-#: ../../library/pyexpat.rst:276
+#: ../../library/pyexpat.rst:275
msgid ""
"If set to a non-zero integer, the parser will report only those attributes "
"which were specified in the document instance and not those which were "
@@ -325,7 +325,7 @@ msgid ""
"time."
msgstr ""
-#: ../../library/pyexpat.rst:284
+#: ../../library/pyexpat.rst:283
msgid ""
"The following attributes contain values relating to the most recent error "
"encountered by an :class:`xmlparser` object, and will only have correct "
@@ -333,26 +333,26 @@ msgid ""
"`xml.parsers.expat.ExpatError` exception."
msgstr ""
-#: ../../library/pyexpat.rst:292
+#: ../../library/pyexpat.rst:291
msgid "Byte index at which an error occurred."
msgstr ""
-#: ../../library/pyexpat.rst:297
+#: ../../library/pyexpat.rst:296
msgid ""
"Numeric code specifying the problem. This value can be passed to the :func:"
"`ErrorString` function, or compared to one of the constants defined in the "
"``errors`` object."
msgstr ""
-#: ../../library/pyexpat.rst:304
+#: ../../library/pyexpat.rst:303
msgid "Column number at which an error occurred."
msgstr ""
-#: ../../library/pyexpat.rst:309
+#: ../../library/pyexpat.rst:308
msgid "Line number at which an error occurred."
msgstr ""
-#: ../../library/pyexpat.rst:311
+#: ../../library/pyexpat.rst:310
msgid ""
"The following attributes contain values relating to the current parse "
"location in an :class:`xmlparser` object. During a callback reporting a "
@@ -362,19 +362,19 @@ msgid ""
"whether there was an associated callback)."
msgstr ""
-#: ../../library/pyexpat.rst:321
+#: ../../library/pyexpat.rst:320
msgid "Current byte index in the parser input."
msgstr ""
-#: ../../library/pyexpat.rst:326
+#: ../../library/pyexpat.rst:325
msgid "Current column number in the parser input."
msgstr ""
-#: ../../library/pyexpat.rst:331
+#: ../../library/pyexpat.rst:330
msgid "Current line number in the parser input."
msgstr ""
-#: ../../library/pyexpat.rst:333
+#: ../../library/pyexpat.rst:332
msgid ""
"Here is the list of handlers that can be set. To set a handler on an :class:"
"`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must be "
@@ -383,7 +383,7 @@ msgid ""
"unless otherwise stated."
msgstr ""
-#: ../../library/pyexpat.rst:342
+#: ../../library/pyexpat.rst:341
msgid ""
"Called when the XML declaration is parsed. The XML declaration is the "
"(optional) declaration of the applicable version of the XML recommendation, "
@@ -394,7 +394,7 @@ msgid ""
"only available with Expat version 1.95.0 or newer."
msgstr ""
-#: ../../library/pyexpat.rst:353
+#: ../../library/pyexpat.rst:352
msgid ""
"Called when Expat begins parsing the document type declaration (``'``."
msgstr ""
-#: ../../library/pyexpat.rst:470
+#: ../../library/pyexpat.rst:469
msgid ""
"Called at the start of a CDATA section. This and :attr:"
"`EndCdataSectionHandler` are needed to be able to identify the syntactical "
"start and end for CDATA sections."
msgstr ""
-#: ../../library/pyexpat.rst:477
+#: ../../library/pyexpat.rst:476
msgid "Called at the end of a CDATA section."
-msgstr ""
+msgstr "在 CDATA 區塊結束時呼叫。"
-#: ../../library/pyexpat.rst:482
+#: ../../library/pyexpat.rst:481
msgid ""
"Called for any characters in the XML document for which no applicable "
"handler has been specified. This means characters that are part of a "
@@ -528,14 +528,14 @@ msgid ""
"supplied."
msgstr ""
-#: ../../library/pyexpat.rst:489
+#: ../../library/pyexpat.rst:488
msgid ""
"This is the same as the :func:`DefaultHandler`, but doesn't inhibit "
"expansion of internal entities. The entity reference will not be passed to "
"the default handler."
msgstr ""
-#: ../../library/pyexpat.rst:496
+#: ../../library/pyexpat.rst:495
msgid ""
"Called if the XML document hasn't been declared as being a standalone "
"document. This happens when there is an external subset or a reference to a "
@@ -545,7 +545,7 @@ msgid ""
"set, no exception is raised by the parser for this condition."
msgstr ""
-#: ../../library/pyexpat.rst:506
+#: ../../library/pyexpat.rst:505
msgid ""
"Called for references to external entities. *base* is the current base, as "
"set by a previous call to :meth:`SetBase`. The public and system "
@@ -554,7 +554,7 @@ msgid ""
"is opaque and should only be used as described below."
msgstr ""
-#: ../../library/pyexpat.rst:512
+#: ../../library/pyexpat.rst:511
msgid ""
"For external entities to be parsed, this handler must be implemented. It is "
"responsible for creating the sub-parser using "
@@ -564,28 +564,28 @@ msgid ""
"`XML_ERROR_EXTERNAL_ENTITY_HANDLING` error, otherwise parsing will continue."
msgstr ""
-#: ../../library/pyexpat.rst:520
+#: ../../library/pyexpat.rst:519
msgid ""
"If this handler is not provided, external entities are reported by the :attr:"
"`DefaultHandler` callback, if provided."
msgstr ""
-#: ../../library/pyexpat.rst:527
+#: ../../library/pyexpat.rst:526
msgid "ExpatError Exceptions"
msgstr "ExpatError 例外"
-#: ../../library/pyexpat.rst:532
+#: ../../library/pyexpat.rst:531
msgid ":exc:`ExpatError` exceptions have a number of interesting attributes:"
msgstr ""
-#: ../../library/pyexpat.rst:537
+#: ../../library/pyexpat.rst:536
msgid ""
"Expat's internal error number for the specific error. The :data:`errors."
"messages ` dictionary maps these error "
"numbers to Expat's error messages. For example::"
msgstr ""
-#: ../../library/pyexpat.rst:541
+#: ../../library/pyexpat.rst:540
msgid ""
"from xml.parsers.expat import ParserCreate, ExpatError, errors\n"
"\n"
@@ -603,36 +603,36 @@ msgstr ""
"except ExpatError as err:\n"
" print(\"Error:\", errors.messages[err.code])"
-#: ../../library/pyexpat.rst:549
+#: ../../library/pyexpat.rst:548
msgid ""
"The :mod:`~xml.parsers.expat.errors` module also provides error message "
"constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping "
"these messages back to the error codes, see below."
msgstr ""
-#: ../../library/pyexpat.rst:556
+#: ../../library/pyexpat.rst:555
msgid ""
"Line number on which the error was detected. The first line is numbered "
"``1``."
msgstr ""
-#: ../../library/pyexpat.rst:561
+#: ../../library/pyexpat.rst:560
msgid ""
"Character offset into the line where the error occurred. The first column "
"is numbered ``0``."
msgstr ""
-#: ../../library/pyexpat.rst:568
+#: ../../library/pyexpat.rst:567
msgid "Example"
msgstr "範例"
-#: ../../library/pyexpat.rst:570
+#: ../../library/pyexpat.rst:569
msgid ""
"The following program defines three handlers that just print out their "
"arguments. ::"
msgstr ""
-#: ../../library/pyexpat.rst:573
+#: ../../library/pyexpat.rst:572
msgid ""
"import xml.parsers.expat\n"
"\n"
@@ -676,11 +676,11 @@ msgstr ""
"More text\n"
"\"\"\", 1)"
-#: ../../library/pyexpat.rst:594
+#: ../../library/pyexpat.rst:593
msgid "The output from this program is::"
-msgstr ""
+msgstr "這個程式的輸出是: ::"
-#: ../../library/pyexpat.rst:596
+#: ../../library/pyexpat.rst:595
msgid ""
"Start element: parent {'id': 'top'}\n"
"Start element: child1 {'name': 'paul'}\n"
@@ -704,76 +704,76 @@ msgstr ""
"Character data: '\\n'\n"
"End element: parent"
-#: ../../library/pyexpat.rst:611
+#: ../../library/pyexpat.rst:610
msgid "Content Model Descriptions"
msgstr ""
-#: ../../library/pyexpat.rst:617
+#: ../../library/pyexpat.rst:616
msgid ""
"Content models are described using nested tuples. Each tuple contains four "
"values: the type, the quantifier, the name, and a tuple of children. "
"Children are simply additional content model descriptions."
msgstr ""
-#: ../../library/pyexpat.rst:621
+#: ../../library/pyexpat.rst:620
msgid ""
"The values of the first two fields are constants defined in the :mod:`xml."
"parsers.expat.model` module. These constants can be collected in two "
"groups: the model type group and the quantifier group."
msgstr ""
-#: ../../library/pyexpat.rst:625
+#: ../../library/pyexpat.rst:624
msgid "The constants in the model type group are:"
msgstr ""
-#: ../../library/pyexpat.rst:631
+#: ../../library/pyexpat.rst:630
msgid ""
"The element named by the model name was declared to have a content model of "
"``ANY``."
msgstr ""
-#: ../../library/pyexpat.rst:638
+#: ../../library/pyexpat.rst:637
msgid ""
"The named element allows a choice from a number of options; this is used for "
"content models such as ``(A | B | C)``."
msgstr ""
-#: ../../library/pyexpat.rst:645
+#: ../../library/pyexpat.rst:644
msgid "Elements which are declared to be ``EMPTY`` have this model type."
msgstr ""
-#: ../../library/pyexpat.rst:659
+#: ../../library/pyexpat.rst:658
msgid ""
"Models which represent a series of models which follow one after the other "
"are indicated with this model type. This is used for models such as ``(A, "
"B, C)``."
msgstr ""
-#: ../../library/pyexpat.rst:662
+#: ../../library/pyexpat.rst:661
msgid "The constants in the quantifier group are:"
msgstr ""
-#: ../../library/pyexpat.rst:668
+#: ../../library/pyexpat.rst:667
msgid "No modifier is given, so it can appear exactly once, as for ``A``."
msgstr ""
-#: ../../library/pyexpat.rst:674
+#: ../../library/pyexpat.rst:673
msgid "The model is optional: it can appear once or not at all, as for ``A?``."
msgstr ""
-#: ../../library/pyexpat.rst:680
+#: ../../library/pyexpat.rst:679
msgid "The model must occur one or more times (like ``A+``)."
msgstr ""
-#: ../../library/pyexpat.rst:686
+#: ../../library/pyexpat.rst:685
msgid "The model must occur zero or more times, as for ``A*``."
msgstr ""
-#: ../../library/pyexpat.rst:692
+#: ../../library/pyexpat.rst:691
msgid "Expat error constants"
-msgstr ""
+msgstr "Expat 錯誤常數"
-#: ../../library/pyexpat.rst:696
+#: ../../library/pyexpat.rst:695
msgid ""
"The following constants are provided in the :mod:`xml.parsers.expat.errors` "
"module. These constants are useful in interpreting some of the attributes "
@@ -784,206 +784,206 @@ msgid ""
"XML_ERROR_{CONSTANT_NAME}]`."
msgstr ""
-#: ../../library/pyexpat.rst:704
+#: ../../library/pyexpat.rst:703
msgid "The ``errors`` module has the following attributes:"
-msgstr ""
+msgstr "``errors`` 模組有以下屬性:"
-#: ../../library/pyexpat.rst:708
+#: ../../library/pyexpat.rst:707
msgid "A dictionary mapping string descriptions to their error codes."
msgstr ""
-#: ../../library/pyexpat.rst:715
+#: ../../library/pyexpat.rst:714
msgid "A dictionary mapping numeric error codes to their string descriptions."
msgstr ""
-#: ../../library/pyexpat.rst:725
+#: ../../library/pyexpat.rst:724
msgid ""
"An entity reference in an attribute value referred to an external entity "
"instead of an internal entity."
msgstr ""
-#: ../../library/pyexpat.rst:731
+#: ../../library/pyexpat.rst:730
msgid ""
"A character reference referred to a character which is illegal in XML (for "
"example, character ``0``, or '````')."
msgstr ""
-#: ../../library/pyexpat.rst:737
+#: ../../library/pyexpat.rst:736
msgid ""
"An entity reference referred to an entity which was declared with a "
"notation, so cannot be parsed."
msgstr ""
-#: ../../library/pyexpat.rst:743
+#: ../../library/pyexpat.rst:742
msgid "An attribute was used more than once in a start tag."
msgstr ""
-#: ../../library/pyexpat.rst:751
+#: ../../library/pyexpat.rst:750
msgid ""
"Raised when an input byte could not properly be assigned to a character; for "
"example, a NUL byte (value ``0``) in a UTF-8 input stream."
msgstr ""
-#: ../../library/pyexpat.rst:757
+#: ../../library/pyexpat.rst:756
msgid "Something other than whitespace occurred after the document element."
msgstr ""
-#: ../../library/pyexpat.rst:762
+#: ../../library/pyexpat.rst:761
msgid ""
"An XML declaration was found somewhere other than the start of the input "
"data."
msgstr ""
-#: ../../library/pyexpat.rst:767
+#: ../../library/pyexpat.rst:766
msgid ""
"The document contains no elements (XML requires all documents to contain "
"exactly one top-level element).."
msgstr ""
-#: ../../library/pyexpat.rst:773
+#: ../../library/pyexpat.rst:772
msgid "Expat was not able to allocate memory internally."
msgstr ""
-#: ../../library/pyexpat.rst:778
+#: ../../library/pyexpat.rst:777
msgid "A parameter entity reference was found where it was not allowed."
msgstr ""
-#: ../../library/pyexpat.rst:783
+#: ../../library/pyexpat.rst:782
msgid "An incomplete character was found in the input."
msgstr ""
-#: ../../library/pyexpat.rst:788
+#: ../../library/pyexpat.rst:787
msgid ""
"An entity reference contained another reference to the same entity; possibly "
"via a different name, and possibly indirectly."
msgstr ""
-#: ../../library/pyexpat.rst:794
+#: ../../library/pyexpat.rst:793
msgid "Some unspecified syntax error was encountered."
msgstr ""
-#: ../../library/pyexpat.rst:799
+#: ../../library/pyexpat.rst:798
msgid "An end tag did not match the innermost open start tag."
msgstr ""
-#: ../../library/pyexpat.rst:804
+#: ../../library/pyexpat.rst:803
msgid ""
"Some token (such as a start tag) was not closed before the end of the stream "
"or the next token was encountered."
msgstr ""
-#: ../../library/pyexpat.rst:810
+#: ../../library/pyexpat.rst:809
msgid "A reference was made to an entity which was not defined."
msgstr ""
-#: ../../library/pyexpat.rst:815
+#: ../../library/pyexpat.rst:814
msgid "The document encoding is not supported by Expat."
msgstr ""
-#: ../../library/pyexpat.rst:820
+#: ../../library/pyexpat.rst:819
msgid "A CDATA marked section was not closed."
msgstr ""
-#: ../../library/pyexpat.rst:828
+#: ../../library/pyexpat.rst:827
msgid ""
"The parser determined that the document was not \"standalone\" though it "
"declared itself to be in the XML declaration, and the :attr:"
"`NotStandaloneHandler` was set and returned ``0``."
msgstr ""
-#: ../../library/pyexpat.rst:841
+#: ../../library/pyexpat.rst:840
msgid ""
"An operation was requested that requires DTD support to be compiled in, but "
"Expat was configured without DTD support. This should never be reported by "
"a standard build of the :mod:`xml.parsers.expat` module."
msgstr ""
-#: ../../library/pyexpat.rst:848
+#: ../../library/pyexpat.rst:847
msgid ""
"A behavioral change was requested after parsing started that can only be "
"changed before parsing has started. This is (currently) only raised by :"
"meth:`UseForeignDTD`."
msgstr ""
-#: ../../library/pyexpat.rst:855
+#: ../../library/pyexpat.rst:854
msgid "An undeclared prefix was found when namespace processing was enabled."
msgstr ""
-#: ../../library/pyexpat.rst:860
+#: ../../library/pyexpat.rst:859
msgid ""
"The document attempted to remove the namespace declaration associated with a "
"prefix."
msgstr ""
-#: ../../library/pyexpat.rst:866
+#: ../../library/pyexpat.rst:865
msgid "A parameter entity contained incomplete markup."
msgstr ""
-#: ../../library/pyexpat.rst:871
+#: ../../library/pyexpat.rst:870
msgid "The document contained no document element at all."
msgstr ""
-#: ../../library/pyexpat.rst:876
+#: ../../library/pyexpat.rst:875
msgid "There was an error parsing a text declaration in an external entity."
msgstr ""
-#: ../../library/pyexpat.rst:881
+#: ../../library/pyexpat.rst:880
msgid "Characters were found in the public id that are not allowed."
msgstr ""
-#: ../../library/pyexpat.rst:886
+#: ../../library/pyexpat.rst:885
msgid ""
"The requested operation was made on a suspended parser, but isn't allowed. "
"This includes attempts to provide additional input or to stop the parser."
msgstr ""
-#: ../../library/pyexpat.rst:892
+#: ../../library/pyexpat.rst:891
msgid ""
"An attempt to resume the parser was made when the parser had not been "
"suspended."
msgstr ""
-#: ../../library/pyexpat.rst:897 ../../library/pyexpat.rst:930
-#: ../../library/pyexpat.rst:935
+#: ../../library/pyexpat.rst:896 ../../library/pyexpat.rst:929
+#: ../../library/pyexpat.rst:934
msgid "This should not be reported to Python applications."
msgstr ""
-#: ../../library/pyexpat.rst:902
+#: ../../library/pyexpat.rst:901
msgid ""
"The requested operation was made on a parser which was finished parsing "
"input, but isn't allowed. This includes attempts to provide additional "
"input or to stop the parser."
msgstr ""
-#: ../../library/pyexpat.rst:912
+#: ../../library/pyexpat.rst:911
msgid ""
"An attempt was made to undeclare reserved namespace prefix ``xml`` or to "
"bind it to another namespace URI."
msgstr ""
-#: ../../library/pyexpat.rst:919
+#: ../../library/pyexpat.rst:918
msgid ""
"An attempt was made to declare or undeclare reserved namespace prefix "
"``xmlns``."
msgstr ""
-#: ../../library/pyexpat.rst:924
+#: ../../library/pyexpat.rst:923
msgid ""
"An attempt was made to bind the URI of one the reserved namespace prefixes "
"``xml`` and ``xmlns`` to another namespace prefix."
msgstr ""
-#: ../../library/pyexpat.rst:940
+#: ../../library/pyexpat.rst:939
msgid ""
"The limit on input amplification factor (from DTD and entities) has been "
"breached."
msgstr ""
-#: ../../library/pyexpat.rst:945
+#: ../../library/pyexpat.rst:944
msgid "Footnotes"
msgstr "註解"
-#: ../../library/pyexpat.rst:946
+#: ../../library/pyexpat.rst:945
msgid ""
"The encoding string included in XML output should conform to the appropriate "
"standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See https://"
@@ -991,14 +991,14 @@ msgid ""
"org/assignments/character-sets/character-sets.xhtml."
msgstr ""
-#: ../../library/pyexpat.rst:26
+#: ../../library/pyexpat.rst:25
msgid "Expat"
msgstr "Expat"
-#: ../../library/pyexpat.rst:36
+#: ../../library/pyexpat.rst:35
msgid "module"
msgstr "module(模組)"
-#: ../../library/pyexpat.rst:36
+#: ../../library/pyexpat.rst:35
msgid "pyexpat"
msgstr "pyexpat"
diff --git a/library/random.po b/library/random.po
index b4196649ec..beb245217d 100644
--- a/library/random.po
+++ b/library/random.po
@@ -8,7 +8,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-07-07 10:49+0000\n"
"PO-Revision-Date: 2025-03-07 19:17+0800\n"
"Last-Translator: Dr.XYZ \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -731,7 +731,15 @@ msgstr ""
"在子類別中覆寫此方法以自訂 :class:`!Random` 實例的 :meth:`~random."
"getrandbits` 行為。"
-#: ../../library/random.rst:453
+#: ../../library/random.rst:452
+msgid ""
+"Override this method in subclasses to customise the :meth:`~random."
+"randbytes` behaviour of :class:`!Random` instances."
+msgstr ""
+"在子類別中覆寫此方法以自訂 :class:`!Random` 實例的 :meth:`~random."
+"randbytes` 行為。"
+
+#: ../../library/random.rst:458
msgid ""
"Class that uses the :func:`os.urandom` function for generating random "
"numbers from sources provided by the operating system. Not available on all "
@@ -745,11 +753,11 @@ msgstr ""
"有效果且被忽略。如果呼叫 :meth:`getstate` 和 :meth:`setstate` 方法會引發 :"
"exc:`NotImplementedError`。"
-#: ../../library/random.rst:462
+#: ../../library/random.rst:467
msgid "Notes on Reproducibility"
msgstr "關於 Reproducibility(復現性)的注意事項"
-#: ../../library/random.rst:464
+#: ../../library/random.rst:469
msgid ""
"Sometimes it is useful to be able to reproduce the sequences given by a "
"pseudo-random number generator. By reusing a seed value, the same sequence "
@@ -759,7 +767,7 @@ msgstr ""
"有時,能夠重現偽隨機數產生器給出的序列很有用。只要多執行緒未運行,透過重複使"
"用種子值,同一序列就應該可以被復現。"
-#: ../../library/random.rst:468
+#: ../../library/random.rst:473
msgid ""
"Most of the random module's algorithms and seeding functions are subject to "
"change across Python versions, but two aspects are guaranteed not to change:"
@@ -767,13 +775,13 @@ msgstr ""
"大多數隨機 module 的演算法和 seed 設定函式在 Python 版本中可能會發生變化,但"
"可以保證兩個方面不會改變:"
-#: ../../library/random.rst:471
+#: ../../library/random.rst:476
msgid ""
"If a new seeding method is added, then a backward compatible seeder will be "
"offered."
msgstr "如果增加了新的 seed 設定函式,則將提供向後相容的播種器 (seeder)。"
-#: ../../library/random.rst:474
+#: ../../library/random.rst:479
msgid ""
"The generator's :meth:`~Random.random` method will continue to produce the "
"same sequence when the compatible seeder is given the same seed."
@@ -781,15 +789,15 @@ msgstr ""
"當相容的播種器被賦予相同的種子時,產生器的 :meth:`~Random.random` 方法將持續"
"產生相同的序列。"
-#: ../../library/random.rst:480
+#: ../../library/random.rst:485
msgid "Examples"
msgstr "範例"
-#: ../../library/random.rst:482
+#: ../../library/random.rst:487
msgid "Basic examples::"
msgstr "基礎範例: ::"
-#: ../../library/random.rst:484
+#: ../../library/random.rst:489
msgid ""
">>> random() # Random float: 0.0 <= x < 1.0\n"
"0.37444887175646646\n"
@@ -846,11 +854,11 @@ msgstr ""
">>> sample([10, 20, 30, 40, 50], k=4) # 四個無重置的樣本\n"
"[40, 10, 50, 30]"
-#: ../../library/random.rst:510
+#: ../../library/random.rst:515
msgid "Simulations::"
msgstr "模擬: ::"
-#: ../../library/random.rst:512
+#: ../../library/random.rst:517
msgid ""
">>> # Six roulette wheel spins (weighted sampling with replacement)\n"
">>> choices(['red', 'black', 'green'], [18, 18, 2], k=6)\n"
@@ -897,7 +905,7 @@ msgstr ""
">>> sum(trial() for i in range(10_000)) / 10_000\n"
"0.7958"
-#: ../../library/random.rst:535
+#: ../../library/random.rst:540
msgid ""
"Example of `statistical bootstrapping `_ using resampling with replacement to estimate "
@@ -907,7 +915,7 @@ msgstr ""
"Bootstrapping_(statistics)>`_\\ 的範例,使用有重置的重新取樣來估計樣本平均數"
"的信賴區間: ::"
-#: ../../library/random.rst:539
+#: ../../library/random.rst:544
msgid ""
"# https://www.thoughtco.com/example-of-bootstrapping-3126155\n"
"from statistics import fmean as mean\n"
@@ -927,7 +935,7 @@ msgstr ""
"print(f'The sample mean of {mean(data):.1f} has a 90% confidence '\n"
" f'interval from {means[5]:.1f} to {means[94]:.1f}')"
-#: ../../library/random.rst:548
+#: ../../library/random.rst:553
msgid ""
"Example of a `resampling permutation test `_ to determine the statistical "
@@ -939,7 +947,7 @@ msgstr ""
"慰劑之間差異的統計學意義或 `p 值 `_\\ "
": ::"
-#: ../../library/random.rst:554
+#: ../../library/random.rst:559
msgid ""
"# Example from \"Statistics is Easy\" by Dennis Shasha and Manda Wilson\n"
"from statistics import fmean as mean\n"
@@ -987,12 +995,12 @@ msgstr ""
"print(f'單邊 p 值 {count / n:.4f} 使我們拒絕無效假設')\n"
"print(f'即藥物與安慰劑之間沒有差異。')"
-#: ../../library/random.rst:575
+#: ../../library/random.rst:580
msgid ""
"Simulation of arrival times and service deliveries for a multiserver queue::"
msgstr "模擬多伺服器佇列 (queue) 的到達時間與服務交付: ::"
-#: ../../library/random.rst:577
+#: ../../library/random.rst:582
msgid ""
"from heapq import heapify, heapreplace\n"
"from random import expovariate, gauss\n"
@@ -1046,7 +1054,7 @@ msgstr ""
"print(f'平均等待時間:{mean(waits):.1f} 最大等待時間:{max(waits):.1f}')\n"
"print('四分位數:', [round(q, 1) for q in quantiles(waits)])"
-#: ../../library/random.rst:604
+#: ../../library/random.rst:609
msgid ""
"`Statistics for Hackers `_ a "
"video tutorial by `Jake Vanderplas `_ 製作的教"
"學影片,僅使用幾個基本概念(包括模擬、取樣、洗牌、交叉驗證)進行統計分析。"
-#: ../../library/random.rst:610
+#: ../../library/random.rst:615
msgid ""
"`Economics Simulation `_ a simulation of a marketplace by `Peter Norvig `_ a tutorial by `Peter Norvig "
@@ -1081,11 +1089,11 @@ msgstr ""
"Probability.ipynb>`_\\ 為 `Peter Norvig `_ 的教"
"學課程,涵蓋了機率理論的基礎知識與如何模擬以及使用 Python 執行數據分析。"
-#: ../../library/random.rst:625
+#: ../../library/random.rst:630
msgid "Recipes"
msgstr "使用方案"
-#: ../../library/random.rst:627
+#: ../../library/random.rst:632
msgid ""
"These recipes show how to efficiently make random selections from the "
"combinatoric iterators in the :mod:`itertools` module:"
@@ -1093,7 +1101,7 @@ msgstr ""
"這些使用方案展示了如何有效地從 :mod:`itertools` 模組的組合疊代器 "
"(combinatoric iterators) 中進行隨機選擇:"
-#: ../../library/random.rst:630
+#: ../../library/random.rst:635
msgid ""
"def random_product(*args, repeat=1):\n"
" \"Random selection from itertools.product(*args, **kwds)\"\n"
@@ -1149,7 +1157,7 @@ msgstr ""
" indices = sorted(random.choices(range(n), k=r))\n"
" return tuple(pool[i] for i in indices)"
-#: ../../library/random.rst:659
+#: ../../library/random.rst:664
msgid ""
"The default :func:`.random` returns multiples of 2⁻⁵³ in the range *0.0 ≤ x "
"< 1.0*. All such numbers are evenly spaced and are exactly representable as "
@@ -1161,7 +1169,7 @@ msgstr ""
"均勻分佈的,並且可以完全表示為 Python float。但是,該間隔中的許多其他可表示"
"的 float 不是可能的選擇。 例如 ``0.05954861408025609`` 不是 2⁻⁵³ 的整數倍。"
-#: ../../library/random.rst:665
+#: ../../library/random.rst:670
msgid ""
"The following recipe takes a different approach. All floats in the interval "
"are possible selections. The mantissa comes from a uniform distribution of "
@@ -1173,7 +1181,7 @@ msgstr ""
"數 < 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現"
"頻率是下一個較大指數的一半。"
-#: ../../library/random.rst:673
+#: ../../library/random.rst:678
msgid ""
"from random import Random\n"
"from math import ldexp\n"
@@ -1203,7 +1211,7 @@ msgstr ""
" exponent += x.bit_length() - 32\n"
" return ldexp(mantissa, exponent)"
-#: ../../library/random.rst:687
+#: ../../library/random.rst:692
msgid ""
"All :ref:`real valued distributions ` in the "
"class will use the new method::"
@@ -1211,7 +1219,7 @@ msgstr ""
"Class 中的所有\\ :ref:`實數分佈 `\\ 都將使用新方"
"法: ::"
-#: ../../library/random.rst:690
+#: ../../library/random.rst:695
msgid ""
">>> fr = FullRandom()\n"
">>> fr.random()\n"
@@ -1225,7 +1233,7 @@ msgstr ""
">>> fr.expovariate(0.25)\n"
"8.87925541791544"
-#: ../../library/random.rst:696
+#: ../../library/random.rst:701
msgid ""
"The recipe is conceptually equivalent to an algorithm that chooses from all "
"the multiples of 2⁻¹⁰⁷⁴ in the range *0.0 ≤ x < 1.0*. All such numbers are "
@@ -1238,7 +1246,7 @@ msgstr ""
"示的 Python float。(2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math."
"ulp(0.0)``)"
-#: ../../library/random.rst:705
+#: ../../library/random.rst:710
msgid ""
"`Generating Pseudo-random Floating-Point Values `_ a paper by Allen B. Downey describing "
@@ -1249,68 +1257,68 @@ msgstr ""
"pdf>`_ Allen B. Downey 的一篇論文描述了產生比通常由 :func:`.random` 產生的 "
"float 更 fine-grained(細粒的)的方法。"
-#: ../../library/random.rst:713
+#: ../../library/random.rst:718
msgid "Command-line usage"
msgstr "命令列用法"
-#: ../../library/random.rst:717
+#: ../../library/random.rst:722
msgid "The :mod:`!random` module can be executed from the command line."
msgstr ":mod:`!random` 模組可以從命令列執行。"
-#: ../../library/random.rst:719
+#: ../../library/random.rst:724
msgid ""
"python -m random [-h] [-c CHOICE [CHOICE ...] | -i N | -f N] [input ...]"
msgstr ""
"python -m random [-h] [-c CHOICE [CHOICE ...] | -i N | -f N] [input ...]"
-#: ../../library/random.rst:723
+#: ../../library/random.rst:728
msgid "The following options are accepted:"
msgstr "接受以下選項:"
-#: ../../library/random.rst:729
+#: ../../library/random.rst:734
msgid "Show the help message and exit."
msgstr "顯示幫助訊息並退出。"
-#: ../../library/random.rst:734
+#: ../../library/random.rst:739
msgid "Print a random choice, using :meth:`choice`."
msgstr "列印一個隨機選擇,使用 :meth:`choice`。"
-#: ../../library/random.rst:739
+#: ../../library/random.rst:744
msgid ""
"Print a random integer between 1 and N inclusive, using :meth:`randint`."
msgstr "列印 1 到 N(含)之間的隨機整數,使用 :meth:`randint`。"
-#: ../../library/random.rst:744
+#: ../../library/random.rst:749
msgid ""
"Print a random floating-point number between 0 and N inclusive, using :meth:"
"`uniform`."
msgstr "列印 0 到 N(含)之間的隨機浮點數,使用 :meth:`uniform`。"
-#: ../../library/random.rst:747
+#: ../../library/random.rst:752
msgid "If no options are given, the output depends on the input:"
msgstr "如果未給定選項,則輸出取決於輸入:"
-#: ../../library/random.rst:749
+#: ../../library/random.rst:754
msgid "String or multiple: same as :option:`--choice`."
msgstr "字串或多個:與 :option:`--choice` 相同。"
-#: ../../library/random.rst:750
+#: ../../library/random.rst:755
msgid "Integer: same as :option:`--integer`."
msgstr "整數:與 :option:`--integer` 相同。"
-#: ../../library/random.rst:751
+#: ../../library/random.rst:756
msgid "Float: same as :option:`--float`."
msgstr "浮點數:與 :option:`--float` 相同。"
-#: ../../library/random.rst:756
+#: ../../library/random.rst:761
msgid "Command-line example"
msgstr "命令列範例"
-#: ../../library/random.rst:758
+#: ../../library/random.rst:763
msgid "Here are some examples of the :mod:`!random` command-line interface:"
msgstr "以下是 :mod:`!random` 命令列介面的一些範例:"
-#: ../../library/random.rst:760
+#: ../../library/random.rst:765
msgid ""
"$ # Choose one at random\n"
"$ python -m random egg bacon sausage spam \"Lobster Thermidor aux crevettes "
@@ -1343,8 +1351,8 @@ msgid ""
"3.1942323316565915"
msgstr ""
"$ # 隨機選擇一個\n"
-"$ python -m random egg bacon sausage spam \"Lobster Thermidor aux "
-"crevettes with a Mornay sauce\"\n"
+"$ python -m random egg bacon sausage spam \"Lobster Thermidor aux crevettes "
+"with a Mornay sauce\"\n"
"Lobster Thermidor aux crevettes with a Mornay sauce\n"
"\n"
"$ # 隨機整數\n"
@@ -1356,8 +1364,8 @@ msgstr ""
"1.7080016272295635\n"
"\n"
"$ # 使用明確的引數\n"
-"$ python -m random --choice egg bacon sausage spam \"Lobster Thermidor "
-"aux crevettes with a Mornay sauce\"\n"
+"$ python -m random --choice egg bacon sausage spam \"Lobster Thermidor aux "
+"crevettes with a Mornay sauce\"\n"
"egg\n"
"\n"
"$ python -m random --integer 6\n"
diff --git a/library/readline.po b/library/readline.po
index 48dea32849..d27a830994 100644
--- a/library/readline.po
+++ b/library/readline.po
@@ -45,7 +45,7 @@ msgstr ""
#: ../../includes/wasm-mobile-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-mobile-notavail.rst:5
msgid ""
diff --git a/library/resource.po b/library/resource.po
index 52adbd9db0..4bbf3d4a18 100644
--- a/library/resource.po
+++ b/library/resource.po
@@ -34,7 +34,7 @@ msgstr ""
#: ../../library/resource.rst:239 ../../library/resource.rst:252
#: ../../library/resource.rst:260 ../../library/resource.rst:268
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/resource.rst:18
msgid ""
diff --git a/library/runpy.po b/library/runpy.po
index 3b338bcfc3..3ff8f9771d 100644
--- a/library/runpy.po
+++ b/library/runpy.po
@@ -137,7 +137,7 @@ msgstr ""
#: ../../library/runpy.rst:87
msgid "Added ``__cached__`` global variable (see :pep:`3147`)."
-msgstr ""
+msgstr "新增 ``__cached__`` 全域變數(請參閱 :pep:`3147`)。"
#: ../../library/runpy.rst:90
msgid ""
diff --git a/library/secrets.po b/library/secrets.po
index 4fd800964c..3677d7f231 100644
--- a/library/secrets.po
+++ b/library/secrets.po
@@ -242,7 +242,7 @@ msgid ""
"<257>`, whether plain text or encrypted. They should be salted and hashed "
"using a cryptographically strong one-way (irreversible) hash function."
msgstr ""
-"應用程式不能\\ :cwe:`以可復原的格式存儲密碼 <257>`,無論是用純文本還是經過加"
+"應用程式不能\\ :cwe:`以可復原的格式儲存密碼 <257>`,無論是用純文本還是經過加"
"密。 它們應當先加鹽(salt),再使用高加密強度的單向(不可逆)雜湊函式來產生雜"
"湊值。"
diff --git a/library/security_warnings.po b/library/security_warnings.po
index 243d024c02..498084b77a 100644
--- a/library/security_warnings.po
+++ b/library/security_warnings.po
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2023, 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 +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-07-07 10:49+0000\n"
"PO-Revision-Date: 2023-08-21 02:41+0000\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -102,8 +102,8 @@ msgstr ""
"`"
#: ../../library/security_warnings.rst:31
-msgid ":mod:`xml`: :ref:`XML vulnerabilities `"
-msgstr ":mod:`xml`::ref:`XML 漏洞 `"
+msgid ":mod:`xml`: :ref:`XML security `"
+msgstr ":mod:`xml`::ref:`XML 安全性 `"
#: ../../library/security_warnings.rst:32
msgid ""
@@ -129,5 +129,8 @@ msgstr ""
msgid "security considerations"
msgstr "security considerations(安全性注意事項)"
+#~ msgid ":mod:`xml`: :ref:`XML vulnerabilities `"
+#~ msgstr ":mod:`xml`::ref:`XML 漏洞 `"
+
#~ msgid ":mod:`cgi`: :ref:`CGI security considerations `"
#~ msgstr ":mod:`cgi`::ref:`CGI 安全性注意事項 `"
diff --git a/library/select.po b/library/select.po
index e5c6383d40..4936cc5b8e 100644
--- a/library/select.po
+++ b/library/select.po
@@ -43,7 +43,7 @@ msgstr ""
#: ../../library/select.rst:177 ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/selectors.po b/library/selectors.po
index e231d00893..bb86594fdb 100644
--- a/library/selectors.po
+++ b/library/selectors.po
@@ -71,7 +71,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/shlex.po b/library/shlex.po
index d1c7a7333d..2ba7f9fb43 100644
--- a/library/shlex.po
+++ b/library/shlex.po
@@ -36,7 +36,7 @@ msgstr ""
#: ../../library/shlex.rst:21
msgid "The :mod:`shlex` module defines the following functions:"
-msgstr ""
+msgstr ":mod:`shlex` 模組定義了以下函式:"
#: ../../library/shlex.rst:26
msgid ""
@@ -105,7 +105,7 @@ msgstr ""
#: ../../library/shlex.rst:101
msgid "The :mod:`shlex` module defines the following class:"
-msgstr ""
+msgstr ":mod:`shlex` 模組定義了以下類別:"
#: ../../library/shlex.rst:106
msgid ""
@@ -153,7 +153,7 @@ msgstr "shlex 物件"
#: ../../library/shlex.rst:145
msgid "A :class:`~shlex.shlex` instance has the following methods:"
-msgstr ""
+msgstr ":class:`~shlex.shlex` 實例有以下方法:"
#: ../../library/shlex.rst:150
msgid ""
diff --git a/library/shutil.po b/library/shutil.po
index 145efa74ff..75d187b484 100644
--- a/library/shutil.po
+++ b/library/shutil.po
@@ -549,7 +549,7 @@ msgstr ""
#: ../../library/shutil.rst:426 ../../library/shutil.rst:440
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/shutil.rst:431
msgid "Change owner *user* and/or *group* of the given *path*."
diff --git a/library/signal.po b/library/signal.po
index 4eb34bd770..5ac672a65d 100644
--- a/library/signal.po
+++ b/library/signal.po
@@ -202,7 +202,7 @@ msgstr ""
#: ../../library/signal.rst:605 ../../library/signal.rst:620
#: ../../library/signal.rst:646 ../../library/signal.rst:666
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/signal.rst:105 ../../library/signal.rst:473
msgid ""
diff --git a/library/smtplib.po b/library/smtplib.po
index 921c053924..6dba7d27ec 100644
--- a/library/smtplib.po
+++ b/library/smtplib.po
@@ -36,7 +36,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -273,7 +273,7 @@ msgstr "SMTP 物件"
#: ../../library/smtplib.rst:214
msgid "An :class:`SMTP` instance has the following methods:"
-msgstr ""
+msgstr ":class:`SMTP` 實例擁有以下方法:"
#: ../../library/smtplib.rst:219
msgid ""
diff --git a/library/socket.po b/library/socket.po
index 8578ad1a93..c99925f319 100644
--- a/library/socket.po
+++ b/library/socket.po
@@ -71,7 +71,7 @@ msgstr "由於是呼叫作業系統的 socket API,某些行為可能會因平
#: ../../library/socket.rst:2000 ../../library/socket.rst:2010
#: ../../library/socket.rst:2022 ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/socketserver.po b/library/socketserver.po
index e3c9cf6c81..a2fdff816e 100644
--- a/library/socketserver.po
+++ b/library/socketserver.po
@@ -33,7 +33,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/sqlite3.po b/library/sqlite3.po
index 2b9942a219..3e0270c411 100644
--- a/library/sqlite3.po
+++ b/library/sqlite3.po
@@ -848,7 +848,7 @@ msgstr ""
#: ../../library/sqlite3.rst:626
msgid "An SQLite database connection has the following attributes and methods:"
-msgstr ""
+msgstr "一個 SQLite 資料庫連線具有以下屬性和方法:"
#: ../../library/sqlite3.rst:630
msgid ""
@@ -1880,7 +1880,7 @@ msgstr ""
#: ../../library/sqlite3.rst:1491
msgid "A :class:`Cursor` instance has the following attributes and methods."
-msgstr ""
+msgstr ":class:`Cursor` 實例具有以下屬性和方法。"
#: ../../library/sqlite3.rst:1498
msgid ""
diff --git a/library/ssl.po b/library/ssl.po
index 8a3cf24926..50fa4bb537 100644
--- a/library/ssl.po
+++ b/library/ssl.po
@@ -35,7 +35,7 @@ msgid ""
"and probably additional platforms, as long as OpenSSL is installed on that "
"platform."
msgstr ""
-"這個模組向客戶端及伺服器端提供了對於網路 socket 的傳輸層安全性協定(或稱為"
+"這個模組向用戶端及伺服器端提供了對於網路 socket 的傳輸層安全性協定(或稱為"
"「安全通訊協定 (Secure Sockets Layer)」)加密及身分驗證功能。這個模組使用 "
"OpenSSL 套件,它可以在所有的 Unix 系統、Windows、macOS、以及其他任何可能的平"
"台上使用,只要事先在該平台上安裝 OpenSSL。"
@@ -62,7 +62,7 @@ msgstr ""
#: ../../library/ssl.rst:454 ../../library/ssl.rst:469
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -154,7 +154,7 @@ msgstr ""
#: ../../library/ssl.rst:84
msgid "Client socket example with default context and IPv4/IPv6 dual stack::"
-msgstr "使用預設語境及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例: ::"
+msgstr "使用預設語境及 IPv4/IPv6 雙協定堆疊的用戶端 socket 範例: ::"
#: ../../library/ssl.rst:86
msgid ""
@@ -180,7 +180,7 @@ msgstr ""
#: ../../library/ssl.rst:97
msgid "Client socket example with custom context and IPv4::"
-msgstr "使用自訂語境及 IPv4 的客戶端 socket範例: ::"
+msgstr "使用自訂語境及 IPv4 的用戶端 socket範例: ::"
#: ../../library/ssl.rst:99
msgid ""
@@ -319,7 +319,7 @@ msgid ""
"en.wikipedia.org/wiki/POODLE>`_. If you still wish to continue to use this "
"function but still allow SSL 3.0 connections you can re-enable them using::"
msgstr ""
-"如果你發現某些舊的客戶端或伺服器常適用此函式建立的 :class:`SSLContext` 連線"
+"如果你發現某些舊的用戶端或伺服器常適用此函式建立的 :class:`SSLContext` 連線"
"時,收到 \"Protocol or cipher suite mismatch\" 錯誤,這可能是因為他們的系統僅"
"支援 SSL3.0,然而 SSL3.0 已被此函式用 :data:`OP_NO_SSLv3` 排除。目前廣泛認為 "
"SSL3.0 已經\\ `被完全破解 `_。如果你仍"
@@ -609,7 +609,7 @@ msgid ""
msgstr ""
"輸入使用 SSL 保護的伺服器的地址 ``addr``,輸入形式為一個 pair (*hostname*, "
"*port-number*),取得該伺服器的憑證,並以 PEM 編碼字串的形式回傳。如果指定了 "
-"``ssl_version``,則使用指定的 SSL 協議來嘗試與伺服器連線。如果指定 "
+"``ssl_version``,則使用指定的 SSL 協定來嘗試與伺服器連線。如果指定 "
"*ca_certs*,則它應該是一個包含根憑證列表的檔案,並"
"與 :meth:`SSLContext.load_verify_locations` 中的參數 *cafile* 所使用的格式相"
"同。此呼叫將嘗試使用該組根憑證對伺服器憑證進行驗證,如果驗證失敗,呼叫將失"
@@ -766,7 +766,7 @@ msgid ""
"handshake."
msgstr ""
":attr:`SSLContext.verify_mode` 可能的值。除了 :attr:`SSLContext.verify_mode` "
-"外,這是預設的模式。對於客戶端的 sockets,幾乎任何憑證都能被允許。驗證錯誤,"
+"外,這是預設的模式。對於用戶端的 sockets,幾乎任何憑證都能被允許。驗證錯誤,"
"像是不被信任或是過期的憑證,會被忽略並不會中止 TLS/SSL 握手。"
#: ../../library/ssl.rst:489
@@ -774,7 +774,7 @@ msgid ""
"In server mode, no certificate is requested from the client, so the client "
"does not send any for client cert authentication."
msgstr ""
-"在伺服器模式下,不會從客戶端請求任何憑證,所以客戶端不用發送任何用於客戶端憑"
+"在伺服器模式下,不會從用戶端請求任何憑證,所以用戶端不用發送任何用於用戶端憑"
"證身分驗證的憑證。"
#: ../../library/ssl.rst:492 ../../library/ssl.rst:2400
@@ -788,7 +788,7 @@ msgid ""
"It is recommended to use :const:`CERT_REQUIRED` for client-side sockets "
"instead."
msgstr ""
-":attr:`SSLContext.verify_mode` 可能的值。在客戶端模式"
+":attr:`SSLContext.verify_mode` 可能的值。在用戶端模式"
"下,:const:`CERT_OPTIONAL` 具有與 :const:`CERT_REQUIRED` 相同的含意。對於客戶"
"端 sockets 推薦改用 :const:`CERT_REQUIRED`。"
@@ -800,8 +800,8 @@ msgid ""
"certificate, it is verified. Any verification error immediately aborts the "
"TLS handshake."
msgstr ""
-"在伺服器模式下,客戶憑證請求會被發送給客戶端。客戶端可以選擇忽略請求或是選擇"
-"發送憑證來執行 TLS 客戶端憑證身分驗證。如果客戶端選擇發送憑證,則會對其進行驗"
+"在伺服器模式下,客戶憑證請求會被發送給用戶端。用戶端可以選擇忽略請求或是選擇"
+"發送憑證來執行 TLS 用戶端憑證身分驗證。如果用戶端選擇發送憑證,則會對其進行驗"
"證。任何驗證錯誤都會立刻終止 TLS 握手。"
#: ../../library/ssl.rst:507 ../../library/ssl.rst:526
@@ -826,7 +826,7 @@ msgid ""
msgstr ""
":attr:`SSLContext.verify_mode` 可能的值。在這個模式下,需要從 socket 連線的另"
"一端取得憑證;如果未提供憑證或是驗證失敗,則將會導致 :class:`SSLError`。此模"
-"式\\ **不能**\\ 在客戶端模式下對憑證進行驗證,因為它無法去配對主機名"
+"式\\ **不能**\\ 在用戶端模式下對憑證進行驗證,因為它無法去配對主機名"
"稱。:attr:`~SSLContext.check_hostname` 也必須被開起來來驗證憑證的真實"
"性。:const:`PROTOCOL_TLS_CLIENT` 會使用 :const:`CERT_REQUIRED` 並預設開"
"啟 :attr:`~SSLContext.check_hostname`。"
@@ -837,8 +837,8 @@ msgid ""
"authentication. A client certificate request is sent to the client and the "
"client must provide a valid and trusted certificate."
msgstr ""
-"對於 socket 伺服器,此模式會提供強制的 TLS 客戶端憑證驗證。客戶端憑證請求會被"
-"發送給客戶端並且客戶端必須提供有效且被信任的憑證。"
+"對於 socket 伺服器,此模式會提供強制的 TLS 用戶端憑證驗證。用戶端憑證請求會被"
+"發送給用戶端並且用戶端必須提供有效且被信任的憑證。"
#: ../../library/ssl.rst:531
msgid ":class:`enum.IntEnum` collection of CERT_* constants."
@@ -905,7 +905,7 @@ msgid ""
"possible to trust certificates issued by an intermediate CA without having "
"to trust its ancestor root CA."
msgstr ""
-":attr:`SSLContext.verify_flags` 可能的值。它指示 OpenSSL 接受信任存儲中的中"
+":attr:`SSLContext.verify_flags` 可能的值。它指示 OpenSSL 接受信任儲存中的中"
"間 CAs 作為信任錨,就像自簽名的根 CA 憑證。這樣就能去信任中間 CA 所頒發的憑"
"證,而不一定非要去信任其祖先的根 CA。"
@@ -919,7 +919,7 @@ msgid ""
"support. Despite the name, this option can select both \"SSL\" and \"TLS\" "
"protocols."
msgstr ""
-"選擇客戶端及伺服器均可以支援最高協定版本。儘管名稱只有 「TLS」,但實際上"
+"選擇用戶端及伺服器均可以支援最高協定版本。儘管名稱只有 「TLS」,但實際上"
"「SSL」和「TLS」均可以選擇。"
#: ../../library/ssl.rst:608
@@ -928,7 +928,7 @@ msgid ""
"communication. The generic TLS protocol constant is deprecated in favor "
"of :data:`PROTOCOL_TLS_CLIENT` and :data:`PROTOCOL_TLS_SERVER`."
msgstr ""
-"TLS 的客戶端及伺服器端需要不同的預設值來實現安全通訊。通用的 TLS 協定常數已被"
+"TLS 的用戶端及伺服器端需要不同的預設值來實現安全通訊。通用的 TLS 協定常數已被"
"廢除,並改用 :data:`PROTOCOL_TLS_CLIENT` 和 :data:`PROTOCOL_TLS_SERVER`。"
#: ../../library/ssl.rst:614
@@ -938,14 +938,14 @@ msgid ""
"enables :data:`CERT_REQUIRED` and :attr:`~SSLContext.check_hostname` by "
"default."
msgstr ""
-"自動協商客戶端和服務器都支援的最高協議版本,並配置客戶端語境連線。該協定預設"
+"自動協商用戶端和伺服器服務器都支援的最高協定版本,並配置用戶端語境連線。該協定預設"
"啟用 :data:`CERT_REQUIRED` 和 :attr:`~SSLContext.check_hostname`。"
#: ../../library/ssl.rst:623
msgid ""
"Auto-negotiate the highest protocol version that both the client and server "
"support, and configure the context server-side connections."
-msgstr "自動協商客戶端和服務器都支援的最高協議版本,並配置客戶端語境連線。"
+msgstr "自動協商用戶端和伺服器都支援的最高協定版本,並配置用戶端語境連線。"
#: ../../library/ssl.rst:630
msgid "Alias for :data:`PROTOCOL_TLS`."
@@ -963,7 +963,7 @@ msgstr "選擇第三版的 SSL 做為通道加密協定。"
msgid ""
"This protocol is not available if OpenSSL is compiled with the ``no-ssl3`` "
"option."
-msgstr "如果 OpenSSL 是用 ``no-ssl3`` 編譯的,則此項協議無法使用。"
+msgstr "如果 OpenSSL 是用 ``no-ssl3`` 編譯的,則此項協定無法使用。"
#: ../../library/ssl.rst:645
msgid "SSL version 3 is insecure. Its use is highly discouraged."
@@ -1118,8 +1118,8 @@ msgid ""
"Use the server's cipher ordering preference, rather than the client's. This "
"option has no effect on client sockets and SSLv2 server sockets."
msgstr ""
-"使用伺服器的加密方法名稱字串排序優先順序,而不是客戶端的。此選項並不會影響到"
-"客戶端及 SSLv2 伺服器的 sockets。"
+"使用伺服器的加密方法名稱字串排序優先順序,而不是用戶端的。此選項並不會影響到"
+"用戶端及 SSLv2 伺服器的 sockets。"
#: ../../library/ssl.rst:784
msgid ""
@@ -1164,7 +1164,7 @@ msgstr ":class:`enum.IntFlag` 為 OP_* 常數中的一個集合。"
#: ../../library/ssl.rst:820
msgid "Prevent client side from requesting a session ticket."
-msgstr "防止客戶端請求會談票據。"
+msgstr "防止用戶端請求會談票據。"
#: ../../library/ssl.rst:826
msgid "Ignore unexpected shutdown of TLS connections."
@@ -1775,7 +1775,7 @@ msgstr ""
msgid ""
"for a client SSL socket, the server will always provide a certificate, "
"regardless of whether validation was required;"
-msgstr "對於客戶端 SSL socket,伺服器將永遠提供證書,無論是否需要進行驗證;"
+msgstr "對於用戶端 SSL socket,伺服器將永遠提供證書,無論是否需要進行驗證;"
#: ../../library/ssl.rst:1222
msgid ""
@@ -1784,7 +1784,7 @@ msgid ""
"return :const:`None` if you used :const:`CERT_NONE` (rather "
"than :const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`)."
msgstr ""
-"對於伺服器 SSL socket,客戶端僅在伺服器要求時才會提供證書;因此,如果你使用的"
+"對於伺服器 SSL socket,用戶端僅在伺服器要求時才會提供證書;因此,如果你使用的"
"是 :const:`CERT_NONE` (而非 :const:`CERT_OPTIONAL` "
"或 :const:`CERT_REQUIRED`),則 :meth:`getpeercert` 會回傳 :const:`None`。"
diff --git a/library/stat.po b/library/stat.po
index d919c8307e..dfd5016787 100644
--- a/library/stat.po
+++ b/library/stat.po
@@ -42,7 +42,7 @@ msgstr ""
msgid ""
"The :mod:`stat` module defines the following functions to test for specific "
"file types:"
-msgstr ""
+msgstr ":mod:`stat` 模組定義了以下函式,用於測試特定檔案類型:"
#: ../../library/stat.rst:28
msgid "Return non-zero if the mode is from a directory."
@@ -430,7 +430,7 @@ msgstr ""
#: ../../library/stat.rst:409 ../../library/stat.rst:417
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/stat.rst:415
msgid "All super-user read-only synthetic flags"
diff --git a/library/stdtypes.po b/library/stdtypes.po
index 47a6ffbbe8..0c11bd015b 100644
--- a/library/stdtypes.po
+++ b/library/stdtypes.po
@@ -2626,6 +2626,12 @@ msgid ""
">>> 'Python'.center(4)\n"
"'Python'"
msgstr ""
+">>> 'Python'.center(10)\n"
+"' Python '\n"
+">>> 'Python'.center(10, '-')\n"
+"'--Python--'\n"
+">>> 'Python'.center(4)\n"
+"'Python'"
#: ../../library/stdtypes.rst:1672
msgid ""
@@ -2653,6 +2659,16 @@ msgid ""
">>> 'spam, spam, spam'.count('')\n"
"17"
msgstr ""
+">>> 'spam, spam, spam'.count('spam')\n"
+"3\n"
+">>> 'spam, spam, spam'.count('spam', 5)\n"
+"2\n"
+">>> 'spam, spam, spam'.count('spam', 5, 10)\n"
+"1\n"
+">>> 'spam, spam, spam'.count('eggs')\n"
+"0\n"
+">>> 'spam, spam, spam'.count('')\n"
+"17"
#: ../../library/stdtypes.rst:1692
msgid "Return the string encoded to :class:`bytes`."
@@ -2688,6 +2704,11 @@ msgid ""
">>> encoded_str_to_bytes\n"
"b'Python'"
msgstr ""
+">>> encoded_str_to_bytes = 'Python'.encode()\n"
+">>> type(encoded_str_to_bytes)\n"
+"\n"
+">>> encoded_str_to_bytes\n"
+"b'Python'"
#: ../../library/stdtypes.rst:1717 ../../library/stdtypes.rst:3045
msgid "Added support for keyword arguments."
@@ -2719,10 +2740,18 @@ msgid ""
">>> 'Python is amazing'.endswith('is', 0, 9)\n"
"True"
msgstr ""
+">>> 'Python'.endswith('on')\n"
+"True\n"
+">>> 'a tuple of suffixes'.endswith(('at', 'in'))\n"
+"False\n"
+">>> 'a tuple of suffixes'.endswith(('at', 'es'))\n"
+"True\n"
+">>> 'Python is amazing'.endswith('is', 0, 9)\n"
+"True"
#: ../../library/stdtypes.rst:1742
msgid "See also :meth:`startswith` and :meth:`removesuffix`."
-msgstr ""
+msgstr "另請參閱 :meth:`startswith` 和 :meth:`removesuffix`。"
#: ../../library/stdtypes.rst:1747
msgid ""
@@ -2741,7 +2770,6 @@ msgid ""
msgstr ""
#: ../../library/stdtypes.rst:1760
-#, fuzzy
msgid ""
">>> '01\\t012\\t0123\\t01234'.expandtabs()\n"
"'01 012 0123 01234'\n"
@@ -2751,10 +2779,13 @@ msgid ""
"01 012\n"
"0123 01234"
msgstr ""
-">>> b'01\\t012\\t0123\\t01234'.expandtabs()\n"
-"b'01 012 0123 01234'\n"
-">>> b'01\\t012\\t0123\\t01234'.expandtabs(4)\n"
-"b'01 012 0123 01234'"
+">>> '01\\t012\\t0123\\t01234'.expandtabs()\n"
+"'01 012 0123 01234'\n"
+">>> '01\\t012\\t0123\\t01234'.expandtabs(4)\n"
+"'01 012 0123 01234'\n"
+">>> print('01\\t012\\n0123\\t01234'.expandtabs(4))\n"
+"01 012\n"
+"0123 01234"
#: ../../library/stdtypes.rst:1771
msgid ""
@@ -3283,6 +3314,12 @@ msgid ""
">>> \" foo \".split(maxsplit=0)\n"
"['foo ']"
msgstr ""
+">>> \"\".split(None, 0)\n"
+"[]\n"
+">>> \" \".split(None, 0)\n"
+"[]\n"
+">>> \" foo \".split(maxsplit=0)\n"
+"['foo ']"
#: ../../library/stdtypes.rst:2198
msgid ""
diff --git a/library/string.po b/library/string.po
index 5c7082916c..c488a87a64 100644
--- a/library/string.po
+++ b/library/string.po
@@ -422,7 +422,7 @@ msgid ""
"define how the format specification is to be interpreted."
msgstr ""
"「格式規格」在格式字串 (format string) 中包含的替換欄位中使用,以定義各個值如"
-"何被呈現(請參考 :ref:`formatstrings` 和 :ref:`f-strings`\\ )。它們也能夠直"
+"何被呈現(請參考 :ref:`formatstrings` 和 :ref:`f-strings`)。它們也能夠直"
"接傳遞給內建的 :func:`format` 函式。每個可格式化型別 (formattable type) 可以"
"定義格式規格如何被直譯。"
@@ -573,7 +573,7 @@ msgstr ""
#: ../../library/string.rst:402
msgid "Added the ``'z'`` option (see also :pep:`682`)."
-msgstr "新增 ``'z'`` 選項(請見 :pep:`682`\\ )。"
+msgstr "新增 ``'z'`` 選項(請見 :pep:`682`)。"
#: ../../library/string.rst:407
msgid ""
@@ -655,11 +655,11 @@ msgstr ""
#: ../../library/string.rst:462
msgid "Added the ``','`` option (see also :pep:`378`)."
-msgstr "新增 ``','`` 選項(請見 :pep:`378`\\ )。"
+msgstr "新增 ``','`` 選項(請見 :pep:`378`)。"
#: ../../library/string.rst:465
msgid "Added the ``'_'`` option (see also :pep:`515`)."
-msgstr "新增 ``'_'`` 選項(請見 :pep:`515`\\ )。"
+msgstr "新增 ``'_'`` 選項(請見 :pep:`515`)。"
#: ../../library/string.rst:468
msgid ""
diff --git a/library/struct.po b/library/struct.po
index 690def85aa..5cc4070b77 100644
--- a/library/struct.po
+++ b/library/struct.po
@@ -66,7 +66,7 @@ msgstr "函式與例外"
#: ../../library/struct.rst:50
msgid "The module defines the following exception and functions:"
-msgstr ""
+msgstr "此模組定義了以下例外和函式:"
#: ../../library/struct.rst:55
msgid ""
@@ -618,7 +618,7 @@ msgstr ""
#: ../../library/struct.rst:291
msgid "Added use of the :meth:`~object.__index__` method for non-integers."
-msgstr ""
+msgstr "新增對非整數使用 :meth:`~object.__index__` 方法的支援。"
#: ../../library/struct.rst:295
msgid ""
@@ -1032,11 +1032,11 @@ msgstr ""
#: ../../library/struct.rst:555
msgid "Classes"
-msgstr ""
+msgstr "類別"
#: ../../library/struct.rst:557
msgid "The :mod:`struct` module also defines the following type:"
-msgstr ""
+msgstr ":mod:`struct` 模組也定義了以下型別:"
#: ../../library/struct.rst:562
msgid ""
diff --git a/library/subprocess.po b/library/subprocess.po
index 8ee5e86cc5..4b58287591 100644
--- a/library/subprocess.po
+++ b/library/subprocess.po
@@ -56,7 +56,7 @@ msgstr ":pep:`324` -- 提議 subprocess 模組的 PEP"
#: ../../library/subprocess.rst:1560 ../../library/subprocess.rst:1582
#: ../../includes/wasm-mobile-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-mobile-notavail.rst:5
msgid ""
diff --git a/library/sys.po b/library/sys.po
index b4321d66db..4a3bf4a219 100644
--- a/library/sys.po
+++ b/library/sys.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-03-27 00:14+0000\n"
+"POT-Creation-Date: 2025-07-07 12:52+0000\n"
"PO-Revision-Date: 2023-04-26 02:54+0800\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -45,12 +45,12 @@ msgstr ""
#: ../../library/sys.rst:25 ../../library/sys.rst:299 ../../library/sys.rst:369
#: ../../library/sys.rst:760 ../../library/sys.rst:778
-#: ../../library/sys.rst:1020 ../../library/sys.rst:1522
-#: ../../library/sys.rst:1763 ../../library/sys.rst:1778
-#: ../../library/sys.rst:1786 ../../library/sys.rst:1802
-#: ../../library/sys.rst:2046
+#: ../../library/sys.rst:1022 ../../library/sys.rst:1524
+#: ../../library/sys.rst:1765 ../../library/sys.rst:1780
+#: ../../library/sys.rst:1788 ../../library/sys.rst:1804
+#: ../../library/sys.rst:2048
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/sys.rst:30
msgid ""
@@ -1178,20 +1178,20 @@ msgstr ""
"引發一個附帶引數 ``depth`` 的\\ :ref:`稽核事件 ` ``sys."
"_getframemodulename``。"
-#: ../../library/sys.rst:925
+#: ../../library/sys.rst:927
msgid ""
"This function only exists if CPython was built using the specialized "
"configure option :option:`--with-trace-refs`. It is intended only for "
"debugging garbage-collection issues."
msgstr ""
-#: ../../library/sys.rst:929
+#: ../../library/sys.rst:931
msgid ""
"Return a list of up to *limit* dynamically allocated Python objects. If "
"*type* is given, only objects of that exact type (not subtypes) are included."
msgstr ""
-#: ../../library/sys.rst:933
+#: ../../library/sys.rst:935
msgid ""
"Objects from the list are not safe to use. Specifically, the result will "
"include objects from all interpreters that share their object allocator "
@@ -1201,25 +1201,25 @@ msgid ""
"different interpreters may lead to crashes or other unexpected behavior."
msgstr ""
-#: ../../library/sys.rst:944
+#: ../../library/sys.rst:946
msgid ""
"This function should be used for specialized purposes only. It is not "
"guaranteed to exist in all implementations of Python."
msgstr ""
-#: ../../library/sys.rst:949
+#: ../../library/sys.rst:951
msgid "The result may include objects from other interpreters."
msgstr ""
-#: ../../library/sys.rst:958
+#: ../../library/sys.rst:960
msgid "Get the profiler function as set by :func:`setprofile`."
msgstr ""
-#: ../../library/sys.rst:967
+#: ../../library/sys.rst:969
msgid "Get the trace function as set by :func:`settrace`."
msgstr ""
-#: ../../library/sys.rst:971
+#: ../../library/sys.rst:973
msgid ""
"The :func:`gettrace` function is intended only for implementing debuggers, "
"profilers, coverage tools and the like. Its behavior is part of the "
@@ -1227,7 +1227,7 @@ msgid ""
"thus may not be available in all Python implementations."
msgstr ""
-#: ../../library/sys.rst:979
+#: ../../library/sys.rst:981
msgid ""
"Return a named tuple describing the Windows version currently running. The "
"named elements are *major*, *minor*, *build*, *platform*, *service_pack*, "
@@ -1239,54 +1239,54 @@ msgid ""
"first 5 elements are retrievable by indexing."
msgstr ""
-#: ../../library/sys.rst:990
+#: ../../library/sys.rst:992
msgid "*platform* will be ``2`` (VER_PLATFORM_WIN32_NT)."
msgstr ""
-#: ../../library/sys.rst:992
+#: ../../library/sys.rst:994
msgid "*product_type* may be one of the following values:"
msgstr ""
-#: ../../library/sys.rst:995
+#: ../../library/sys.rst:997
msgid "Constant"
msgstr ""
-#: ../../library/sys.rst:995
+#: ../../library/sys.rst:997
msgid "Meaning"
msgstr "含義"
-#: ../../library/sys.rst:997
+#: ../../library/sys.rst:999
msgid "``1`` (VER_NT_WORKSTATION)"
msgstr "``1`` (VER_NT_WORKSTATION)"
-#: ../../library/sys.rst:997
+#: ../../library/sys.rst:999
msgid "The system is a workstation."
msgstr ""
-#: ../../library/sys.rst:999
+#: ../../library/sys.rst:1001
msgid "``2`` (VER_NT_DOMAIN_CONTROLLER)"
msgstr "``2`` (VER_NT_DOMAIN_CONTROLLER)"
-#: ../../library/sys.rst:999
+#: ../../library/sys.rst:1001
msgid "The system is a domain controller."
msgstr ""
-#: ../../library/sys.rst:1002
+#: ../../library/sys.rst:1004
msgid "``3`` (VER_NT_SERVER)"
msgstr "``3`` (VER_NT_SERVER)"
-#: ../../library/sys.rst:1002
+#: ../../library/sys.rst:1004
msgid "The system is a server, but not a domain controller."
msgstr ""
-#: ../../library/sys.rst:1006
+#: ../../library/sys.rst:1008
msgid ""
"This function wraps the Win32 :c:func:`!GetVersionEx` function; see the "
"Microsoft documentation on :c:func:`!OSVERSIONINFOEX` for more information "
"about these fields."
msgstr ""
-#: ../../library/sys.rst:1010
+#: ../../library/sys.rst:1012
msgid ""
"*platform_version* returns the major version, minor version and build number "
"of the current operating system, rather than the version that is being "
@@ -1294,24 +1294,24 @@ msgid ""
"feature detection."
msgstr ""
-#: ../../library/sys.rst:1016
+#: ../../library/sys.rst:1018
msgid ""
"*platform_version* derives the version from kernel32.dll which can be of a "
"different version than the OS version. Please use :mod:`platform` module for "
"achieving accurate OS version."
msgstr ""
-#: ../../library/sys.rst:1022
+#: ../../library/sys.rst:1024
msgid ""
"Changed to a named tuple and added *service_pack_minor*, "
"*service_pack_major*, *suite_mask*, and *product_type*."
msgstr ""
-#: ../../library/sys.rst:1026
+#: ../../library/sys.rst:1028
msgid "Added *platform_version*"
msgstr "新增 *platform_version*"
-#: ../../library/sys.rst:1032
+#: ../../library/sys.rst:1034
msgid ""
"Returns an *asyncgen_hooks* object, which is similar to a :class:"
"`~collections.namedtuple` of the form ``(firstiter, finalizer)``, where "
@@ -1321,71 +1321,71 @@ msgid ""
"loop."
msgstr ""
-#: ../../library/sys.rst:1039
+#: ../../library/sys.rst:1041
msgid "See :pep:`525` for more details."
msgstr "更多細節請見 :pep:`525`。"
-#: ../../library/sys.rst:1043 ../../library/sys.rst:1734
+#: ../../library/sys.rst:1045 ../../library/sys.rst:1736
msgid ""
"This function has been added on a provisional basis (see :pep:`411` for "
"details.)"
msgstr ""
-#: ../../library/sys.rst:1049
+#: ../../library/sys.rst:1051
msgid ""
"Get the current coroutine origin tracking depth, as set by :func:"
"`set_coroutine_origin_tracking_depth`."
msgstr ""
-#: ../../library/sys.rst:1055 ../../library/sys.rst:1755
+#: ../../library/sys.rst:1057 ../../library/sys.rst:1757
msgid ""
"This function has been added on a provisional basis (see :pep:`411` for "
"details.) Use it only for debugging purposes."
msgstr ""
-#: ../../library/sys.rst:1061
+#: ../../library/sys.rst:1063
msgid ""
"A :term:`named tuple` giving parameters of the numeric hash implementation. "
"For more details about hashing of numeric types, see :ref:`numeric-hash`."
msgstr ""
-#: ../../library/sys.rst:1067
+#: ../../library/sys.rst:1069
msgid "The width in bits used for hash values"
msgstr ""
-#: ../../library/sys.rst:1071
+#: ../../library/sys.rst:1073
msgid "The prime modulus P used for numeric hash scheme"
msgstr ""
-#: ../../library/sys.rst:1075
+#: ../../library/sys.rst:1077
msgid "The hash value returned for a positive infinity"
msgstr ""
-#: ../../library/sys.rst:1079
+#: ../../library/sys.rst:1081
msgid "(This attribute is no longer used)"
msgstr ""
-#: ../../library/sys.rst:1083
+#: ../../library/sys.rst:1085
msgid "The multiplier used for the imaginary part of a complex number"
msgstr ""
-#: ../../library/sys.rst:1087
+#: ../../library/sys.rst:1089
msgid "The name of the algorithm for hashing of str, bytes, and memoryview"
msgstr ""
-#: ../../library/sys.rst:1091
+#: ../../library/sys.rst:1093
msgid "The internal output size of the hash algorithm"
msgstr ""
-#: ../../library/sys.rst:1095
+#: ../../library/sys.rst:1097
msgid "The size of the seed key of the hash algorithm"
msgstr ""
-#: ../../library/sys.rst:1099
+#: ../../library/sys.rst:1101
msgid "Added *algorithm*, *hash_bits* and *seed_bits*"
msgstr "新增 *algorithm*、*hash_bits* 與 *seed_bits*"
-#: ../../library/sys.rst:1105
+#: ../../library/sys.rst:1107
msgid ""
"The version number encoded as a single integer. This is guaranteed to "
"increase with each version, including proper support for non-production "
@@ -1393,7 +1393,7 @@ msgid ""
"version 1.5.2, use::"
msgstr ""
-#: ../../library/sys.rst:1109
+#: ../../library/sys.rst:1111
msgid ""
"if sys.hexversion >= 0x010502F0:\n"
" # use some advanced feature\n"
@@ -1403,7 +1403,7 @@ msgid ""
" ..."
msgstr ""
-#: ../../library/sys.rst:1116
+#: ../../library/sys.rst:1118
msgid ""
"This is called ``hexversion`` since it only really looks meaningful when "
"viewed as the result of passing it to the built-in :func:`hex` function. "
@@ -1411,25 +1411,25 @@ msgid ""
"human-friendly encoding of the same information."
msgstr ""
-#: ../../library/sys.rst:1121
+#: ../../library/sys.rst:1123
msgid "More details of ``hexversion`` can be found at :ref:`apiabiversion`."
msgstr ""
-#: ../../library/sys.rst:1126
+#: ../../library/sys.rst:1128
msgid ""
"An object containing information about the implementation of the currently "
"running Python interpreter. The following attributes are required to exist "
"in all Python implementations."
msgstr ""
-#: ../../library/sys.rst:1130
+#: ../../library/sys.rst:1132
msgid ""
"*name* is the implementation's identifier, e.g. ``'cpython'``. The actual "
"string is defined by the Python implementation, but it is guaranteed to be "
"lower case."
msgstr ""
-#: ../../library/sys.rst:1134
+#: ../../library/sys.rst:1136
msgid ""
"*version* is a named tuple, in the same format as :data:`sys.version_info`. "
"It represents the version of the Python *implementation*. This has a "
@@ -1441,13 +1441,13 @@ msgid ""
"the same value, since it is the reference implementation."
msgstr ""
-#: ../../library/sys.rst:1144
+#: ../../library/sys.rst:1146
msgid ""
"*hexversion* is the implementation version in hexadecimal format, like :data:"
"`sys.hexversion`."
msgstr ""
-#: ../../library/sys.rst:1147
+#: ../../library/sys.rst:1149
msgid ""
"*cache_tag* is the tag used by the import machinery in the filenames of "
"cached modules. By convention, it would be a composite of the "
@@ -1456,7 +1456,7 @@ msgid ""
"set to ``None``, it indicates that module caching should be disabled."
msgstr ""
-#: ../../library/sys.rst:1154
+#: ../../library/sys.rst:1156
msgid ""
":data:`sys.implementation` may contain additional attributes specific to the "
"Python implementation. These non-standard attributes must start with an "
@@ -1466,41 +1466,41 @@ msgid ""
"versions, however.) See :pep:`421` for more information."
msgstr ""
-#: ../../library/sys.rst:1165
+#: ../../library/sys.rst:1167
msgid ""
"The addition of new required attributes must go through the normal PEP "
"process. See :pep:`421` for more information."
msgstr ""
-#: ../../library/sys.rst:1170
+#: ../../library/sys.rst:1172
msgid ""
"A :term:`named tuple` that holds information about Python's internal "
"representation of integers. The attributes are read only."
msgstr ""
-#: ../../library/sys.rst:1175
+#: ../../library/sys.rst:1177
msgid ""
"The number of bits held in each digit. Python integers are stored internally "
"in base ``2**int_info.bits_per_digit``."
msgstr ""
-#: ../../library/sys.rst:1180
+#: ../../library/sys.rst:1182
msgid "The size in bytes of the C type used to represent a digit."
msgstr ""
-#: ../../library/sys.rst:1184
+#: ../../library/sys.rst:1186
msgid ""
"The default value for :func:`sys.get_int_max_str_digits` when it is not "
"otherwise explicitly configured."
msgstr ""
-#: ../../library/sys.rst:1189
+#: ../../library/sys.rst:1191
msgid ""
"The minimum non-zero value for :func:`sys.set_int_max_str_digits`, :envvar:"
"`PYTHONINTMAXSTRDIGITS`, or :option:`-X int_max_str_digits <-X>`."
msgstr ""
-#: ../../library/sys.rst:1196
+#: ../../library/sys.rst:1198
msgid ""
"Added :attr:`~int_info.default_max_str_digits` and :attr:`~int_info."
"str_digits_check_threshold`."
@@ -1508,7 +1508,7 @@ msgstr ""
"新增 :attr:`~int_info.default_max_str_digits` 和 :attr:`~int_info."
"str_digits_check_threshold`。"
-#: ../../library/sys.rst:1202
+#: ../../library/sys.rst:1204
msgid ""
"When this attribute exists, its value is automatically called (with no "
"arguments) when the interpreter is launched in :ref:`interactive mode `."
msgstr ""
-#: ../../library/sys.rst:1208 ../../library/sys.rst:1210
+#: ../../library/sys.rst:1210 ../../library/sys.rst:1212
msgid ""
"Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` "
"with the hook object as the argument when the hook is called on startup."
msgstr ""
-#: ../../library/sys.rst:1219
+#: ../../library/sys.rst:1221
msgid ""
"Enter *string* in the table of \"interned\" strings and return the interned "
"string -- which is *string* itself or a copy. Interning strings is useful to "
@@ -1535,33 +1535,33 @@ msgid ""
"attributes have interned keys."
msgstr ""
-#: ../../library/sys.rst:1227
+#: ../../library/sys.rst:1229
msgid ""
"Interned strings are not :term:`immortal`; you must keep a reference to the "
"return value of :func:`intern` around to benefit from it."
msgstr ""
-#: ../../library/sys.rst:1233
+#: ../../library/sys.rst:1235
msgid ""
"Return :const:`True` if the :term:`GIL` is enabled and :const:`False` if it "
"is disabled."
msgstr ""
-#: ../../library/sys.rst:1240 ../../library/sys.rst:1272
+#: ../../library/sys.rst:1242 ../../library/sys.rst:1274
msgid "It is not guaranteed to exist in all implementations of Python."
msgstr ""
-#: ../../library/sys.rst:1244
+#: ../../library/sys.rst:1246
msgid ""
"Return :const:`True` if the main Python interpreter is :term:`shutting down "
"`. Return :const:`False` otherwise."
msgstr ""
-#: ../../library/sys.rst:1247
+#: ../../library/sys.rst:1249
msgid "See also the :exc:`PythonFinalizationError` exception."
-msgstr ""
+msgstr "另請參閱 :exc:`PythonFinalizationError` 例外。"
-#: ../../library/sys.rst:1253
+#: ../../library/sys.rst:1255
msgid ""
"This variable is not always defined; it is set to the exception instance "
"when an exception is not handled and the interpreter prints an error message "
@@ -1572,40 +1572,40 @@ msgid ""
"more information.)"
msgstr ""
-#: ../../library/sys.rst:1265
+#: ../../library/sys.rst:1267
msgid ""
"Return :const:`True` if the given string is \"interned\", :const:`False` "
"otherwise."
msgstr ""
-#: ../../library/sys.rst:1279
+#: ../../library/sys.rst:1281
msgid ""
"These three variables are deprecated; use :data:`sys.last_exc` instead. They "
"hold the legacy representation of ``sys.last_exc``, as returned from :func:"
"`exc_info` above."
msgstr ""
-#: ../../library/sys.rst:1285
+#: ../../library/sys.rst:1287
msgid ""
"An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` "
"can take. It's usually ``2**31 - 1`` on a 32-bit platform and ``2**63 - 1`` "
"on a 64-bit platform."
msgstr ""
-#: ../../library/sys.rst:1292
+#: ../../library/sys.rst:1294
msgid ""
"An integer giving the value of the largest Unicode code point, i.e. "
"``1114111`` (``0x10FFFF`` in hexadecimal)."
msgstr ""
-#: ../../library/sys.rst:1295
+#: ../../library/sys.rst:1297
msgid ""
"Before :pep:`393`, ``sys.maxunicode`` used to be either ``0xFFFF`` or "
"``0x10FFFF``, depending on the configuration option that specified whether "
"Unicode characters were stored as UCS-2 or UCS-4."
msgstr ""
-#: ../../library/sys.rst:1303
+#: ../../library/sys.rst:1305
msgid ""
"A list of :term:`meta path finder` objects that have their :meth:`~importlib."
"abc.MetaPathFinder.find_spec` methods called to see if one of the objects "
@@ -1618,40 +1618,40 @@ msgid ""
"``None`` if the module cannot be found."
msgstr ""
-#: ../../library/sys.rst:1316
+#: ../../library/sys.rst:1318
msgid ":class:`importlib.abc.MetaPathFinder`"
msgstr ":class:`importlib.abc.MetaPathFinder`"
-#: ../../library/sys.rst:1317
+#: ../../library/sys.rst:1319
msgid ""
"The abstract base class defining the interface of finder objects on :data:"
"`meta_path`."
msgstr ""
-#: ../../library/sys.rst:1319
+#: ../../library/sys.rst:1321
msgid ":class:`importlib.machinery.ModuleSpec`"
msgstr ":class:`importlib.machinery.ModuleSpec`"
-#: ../../library/sys.rst:1320
+#: ../../library/sys.rst:1322
msgid ""
"The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` "
"should return instances of."
msgstr ""
-#: ../../library/sys.rst:1326
+#: ../../library/sys.rst:1328
msgid ""
":term:`Module specs ` were introduced in Python 3.4, by :pep:"
"`451`."
msgstr ""
-#: ../../library/sys.rst:1331
+#: ../../library/sys.rst:1333
msgid ""
"Removed the fallback that looked for a :meth:`!find_module` method if a :"
"data:`meta_path` entry didn't have a :meth:`~importlib.abc.MetaPathFinder."
"find_spec` method."
msgstr ""
-#: ../../library/sys.rst:1337
+#: ../../library/sys.rst:1339
msgid ""
"This is a dictionary that maps module names to modules which have already "
"been loaded. This can be manipulated to force reloading of modules and "
@@ -1663,13 +1663,13 @@ msgid ""
"other threads."
msgstr ""
-#: ../../library/sys.rst:1349
+#: ../../library/sys.rst:1351
msgid ""
"The list of the original command line arguments passed to the Python "
"executable."
msgstr ""
-#: ../../library/sys.rst:1352
+#: ../../library/sys.rst:1354
msgid ""
"The elements of :data:`sys.orig_argv` are the arguments to the Python "
"interpreter, while the elements of :data:`sys.argv` are the arguments to the "
@@ -1677,68 +1677,68 @@ msgid ""
"in :data:`sys.orig_argv` and missing from :data:`sys.argv`."
msgstr ""
-#: ../../library/sys.rst:1364
+#: ../../library/sys.rst:1366
msgid ""
"A list of strings that specifies the search path for modules. Initialized "
"from the environment variable :envvar:`PYTHONPATH`, plus an installation-"
"dependent default."
msgstr ""
-#: ../../library/sys.rst:1368
+#: ../../library/sys.rst:1370
msgid ""
"By default, as initialized upon program startup, a potentially unsafe path "
"is prepended to :data:`sys.path` (*before* the entries inserted as a result "
"of :envvar:`PYTHONPATH`):"
msgstr ""
-#: ../../library/sys.rst:1372
+#: ../../library/sys.rst:1374
msgid ""
"``python -m module`` command line: prepend the current working directory."
msgstr ""
-#: ../../library/sys.rst:1374
+#: ../../library/sys.rst:1376
msgid ""
"``python script.py`` command line: prepend the script's directory. If it's a "
"symbolic link, resolve symbolic links."
msgstr ""
-#: ../../library/sys.rst:1376
+#: ../../library/sys.rst:1378
msgid ""
"``python -c code`` and ``python`` (REPL) command lines: prepend an empty "
"string, which means the current working directory."
msgstr ""
-#: ../../library/sys.rst:1379
+#: ../../library/sys.rst:1381
msgid ""
"To not prepend this potentially unsafe path, use the :option:`-P` command "
"line option or the :envvar:`PYTHONSAFEPATH` environment variable."
msgstr ""
-#: ../../library/sys.rst:1382
+#: ../../library/sys.rst:1384
msgid ""
"A program is free to modify this list for its own purposes. Only strings "
"should be added to :data:`sys.path`; all other data types are ignored during "
"import."
msgstr ""
-#: ../../library/sys.rst:1388
+#: ../../library/sys.rst:1390
msgid ""
"Module :mod:`site` This describes how to use .pth files to extend :data:`sys."
"path`."
msgstr ""
-#: ../../library/sys.rst:1393
+#: ../../library/sys.rst:1395
msgid ""
"A list of callables that take a path argument to try to create a :term:"
"`finder` for the path. If a finder can be created, it is to be returned by "
"the callable, else raise :exc:`ImportError`."
msgstr ""
-#: ../../library/sys.rst:1397 ../../library/sys.rst:1408
+#: ../../library/sys.rst:1399 ../../library/sys.rst:1410
msgid "Originally specified in :pep:`302`."
msgstr ""
-#: ../../library/sys.rst:1402
+#: ../../library/sys.rst:1404
msgid ""
"A dictionary acting as a cache for :term:`finder` objects. The keys are "
"paths that have been passed to :data:`sys.path_hooks` and the values are the "
@@ -1746,91 +1746,91 @@ msgid ""
"is found on :data:`sys.path_hooks` then ``None`` is stored."
msgstr ""
-#: ../../library/sys.rst:1413
+#: ../../library/sys.rst:1415
msgid "A string containing a platform identifier. Known values are:"
msgstr ""
-#: ../../library/sys.rst:1416
+#: ../../library/sys.rst:1418
msgid "System"
msgstr ""
-#: ../../library/sys.rst:1416
+#: ../../library/sys.rst:1418
msgid "``platform`` value"
msgstr ""
-#: ../../library/sys.rst:1418
+#: ../../library/sys.rst:1420
msgid "AIX"
msgstr "AIX"
-#: ../../library/sys.rst:1418
+#: ../../library/sys.rst:1420
msgid "``'aix'``"
msgstr "``'aix'``"
-#: ../../library/sys.rst:1419
+#: ../../library/sys.rst:1421
msgid "Android"
msgstr "Android"
-#: ../../library/sys.rst:1419
+#: ../../library/sys.rst:1421
msgid "``'android'``"
msgstr "``'android'``"
-#: ../../library/sys.rst:1420
+#: ../../library/sys.rst:1422
msgid "Emscripten"
msgstr "Emscripten"
-#: ../../library/sys.rst:1420
+#: ../../library/sys.rst:1422
msgid "``'emscripten'``"
msgstr "``'emscripten'``"
-#: ../../library/sys.rst:1421
+#: ../../library/sys.rst:1423
msgid "iOS"
msgstr "iOS"
-#: ../../library/sys.rst:1421
+#: ../../library/sys.rst:1423
msgid "``'ios'``"
msgstr "``'ios'``"
-#: ../../library/sys.rst:1422
+#: ../../library/sys.rst:1424
msgid "Linux"
msgstr "Linux"
-#: ../../library/sys.rst:1422
+#: ../../library/sys.rst:1424
msgid "``'linux'``"
msgstr "``'linux'``"
-#: ../../library/sys.rst:1423
+#: ../../library/sys.rst:1425
msgid "macOS"
msgstr "macOS"
-#: ../../library/sys.rst:1423
+#: ../../library/sys.rst:1425
msgid "``'darwin'``"
msgstr "``'darwin'``"
-#: ../../library/sys.rst:1424
+#: ../../library/sys.rst:1426
msgid "Windows"
msgstr "Windows"
-#: ../../library/sys.rst:1424
+#: ../../library/sys.rst:1426
msgid "``'win32'``"
msgstr "``'win32'``"
-#: ../../library/sys.rst:1425
+#: ../../library/sys.rst:1427
msgid "Windows/Cygwin"
msgstr "Windows/Cygwin"
-#: ../../library/sys.rst:1425
+#: ../../library/sys.rst:1427
msgid "``'cygwin'``"
msgstr "``'cygwin'``"
-#: ../../library/sys.rst:1426
+#: ../../library/sys.rst:1428
msgid "WASI"
msgstr "WASI"
-#: ../../library/sys.rst:1426
+#: ../../library/sys.rst:1428
msgid "``'wasi'``"
msgstr "``'wasi'``"
-#: ../../library/sys.rst:1429
+#: ../../library/sys.rst:1431
msgid ""
"On Unix systems not listed in the table, the value is the lowercased OS name "
"as returned by ``uname -s``, with the first part of the version as returned "
@@ -1839,81 +1839,81 @@ msgid ""
"version, it is therefore recommended to use the following idiom::"
msgstr ""
-#: ../../library/sys.rst:1435
+#: ../../library/sys.rst:1437
msgid ""
"if sys.platform.startswith('freebsd'):\n"
" # FreeBSD-specific code here..."
msgstr ""
-#: ../../library/sys.rst:1438
+#: ../../library/sys.rst:1440
msgid ""
"On Linux, :data:`sys.platform` doesn't contain the major version anymore. It "
"is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``."
msgstr ""
-#: ../../library/sys.rst:1442
+#: ../../library/sys.rst:1444
msgid ""
"On AIX, :data:`sys.platform` doesn't contain the major version anymore. It "
"is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``."
msgstr ""
-#: ../../library/sys.rst:1446
+#: ../../library/sys.rst:1448
msgid ""
"On Android, :data:`sys.platform` now returns ``'android'`` rather than "
"``'linux'``."
msgstr ""
-#: ../../library/sys.rst:1452
+#: ../../library/sys.rst:1454
msgid ""
":data:`os.name` has a coarser granularity. :func:`os.uname` gives system-"
"dependent version information."
msgstr ""
-#: ../../library/sys.rst:1455
+#: ../../library/sys.rst:1457
msgid ""
"The :mod:`platform` module provides detailed checks for the system's "
"identity."
msgstr ""
-#: ../../library/sys.rst:1461
+#: ../../library/sys.rst:1463
msgid ""
"Name of the platform-specific library directory. It is used to build the "
"path of standard library and the paths of installed extension modules."
msgstr ""
-#: ../../library/sys.rst:1464
+#: ../../library/sys.rst:1466
msgid ""
"It is equal to ``\"lib\"`` on most platforms. On Fedora and SuSE, it is "
"equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys."
"path`` paths (where ``X.Y`` is the Python ``major.minor`` version):"
msgstr ""
-#: ../../library/sys.rst:1468
+#: ../../library/sys.rst:1470
msgid ""
"``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` "
"module)"
msgstr ""
-#: ../../library/sys.rst:1470
+#: ../../library/sys.rst:1472
msgid ""
"``/usr/lib64/pythonX.Y/lib-dynload/``: C extension modules of the standard "
"library (like the :mod:`errno` module, the exact filename is platform "
"specific)"
msgstr ""
-#: ../../library/sys.rst:1473
+#: ../../library/sys.rst:1475
msgid ""
"``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys."
"platlibdir`): Third-party modules"
msgstr ""
-#: ../../library/sys.rst:1475
+#: ../../library/sys.rst:1477
msgid ""
"``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party "
"packages"
msgstr ""
-#: ../../library/sys.rst:1483
+#: ../../library/sys.rst:1485
msgid ""
"A string giving the site-specific directory prefix where the platform "
"independent Python files are installed; on Unix, the default is :file:`/usr/"
@@ -1922,14 +1922,14 @@ msgid ""
"derived paths."
msgstr ""
-#: ../../library/sys.rst:1489
+#: ../../library/sys.rst:1491
msgid ""
"If a :ref:`virtual environment ` is in effect, this value will be "
"changed in ``site.py`` to point to the virtual environment. The value for "
"the Python installation will still be available, via :data:`base_prefix`."
msgstr ""
-#: ../../library/sys.rst:1504
+#: ../../library/sys.rst:1506
msgid ""
"Strings specifying the primary and secondary prompt of the interpreter. "
"These are only defined if the interpreter is in interactive mode. Their "
@@ -1939,7 +1939,7 @@ msgid ""
"used to implement a dynamic prompt."
msgstr ""
-#: ../../library/sys.rst:1514
+#: ../../library/sys.rst:1516
msgid ""
"Set the flags used by the interpreter for :c:func:`dlopen` calls, such as "
"when the interpreter loads extension modules. Among other things, this will "
@@ -1950,14 +1950,14 @@ msgid ""
"g. :const:`os.RTLD_LAZY`)."
msgstr ""
-#: ../../library/sys.rst:1526
+#: ../../library/sys.rst:1528
msgid ""
"Set the :ref:`integer string conversion length limitation "
"` used by this interpreter. See also :func:"
"`get_int_max_str_digits`."
msgstr ""
-#: ../../library/sys.rst:1538
+#: ../../library/sys.rst:1540
msgid ""
"Set the system's profile function, which allows you to implement a Python "
"source code profiler in Python. See chapter :ref:`profile` for more "
@@ -1972,14 +1972,14 @@ msgid ""
"in the profile function will cause itself unset."
msgstr ""
-#: ../../library/sys.rst:1550
+#: ../../library/sys.rst:1552
msgid ""
"The same tracing mechanism is used for :func:`!setprofile` as :func:"
"`settrace`. To trace calls with :func:`!setprofile` inside a tracing "
"function (e.g. in a debugger breakpoint), see :func:`call_tracing`."
msgstr ""
-#: ../../library/sys.rst:1554
+#: ../../library/sys.rst:1556
msgid ""
"Profile functions should have three arguments: *frame*, *event*, and *arg*. "
"*frame* is the current stack frame. *event* is a string: ``'call'``, "
@@ -1987,71 +1987,71 @@ msgid ""
"depends on the event type."
msgstr ""
-#: ../../library/sys.rst:1559 ../../library/sys.rst:1646
+#: ../../library/sys.rst:1561 ../../library/sys.rst:1648
msgid "The events have the following meaning:"
msgstr ""
-#: ../../library/sys.rst:1561 ../../library/sys.rst:1648
+#: ../../library/sys.rst:1563 ../../library/sys.rst:1650
msgid "``'call'``"
msgstr "``'call'``"
-#: ../../library/sys.rst:1562
+#: ../../library/sys.rst:1564
msgid ""
"A function is called (or some other code block entered). The profile "
"function is called; *arg* is ``None``."
msgstr ""
-#: ../../library/sys.rst:1565 ../../library/sys.rst:1663
+#: ../../library/sys.rst:1567 ../../library/sys.rst:1665
msgid "``'return'``"
msgstr "``'return'``"
-#: ../../library/sys.rst:1566
+#: ../../library/sys.rst:1568
msgid ""
"A function (or other code block) is about to return. The profile function "
"is called; *arg* is the value that will be returned, or ``None`` if the "
"event is caused by an exception being raised."
msgstr ""
-#: ../../library/sys.rst:1570
+#: ../../library/sys.rst:1572
msgid "``'c_call'``"
msgstr "``'c_call'``"
-#: ../../library/sys.rst:1571
+#: ../../library/sys.rst:1573
msgid ""
"A C function is about to be called. This may be an extension function or a "
"built-in. *arg* is the C function object."
msgstr ""
-#: ../../library/sys.rst:1574
+#: ../../library/sys.rst:1576
msgid "``'c_return'``"
msgstr "``'c_return'``"
-#: ../../library/sys.rst:1575
+#: ../../library/sys.rst:1577
msgid "A C function has returned. *arg* is the C function object."
msgstr ""
-#: ../../library/sys.rst:1577
+#: ../../library/sys.rst:1579
msgid "``'c_exception'``"
msgstr "``'c_exception'``"
-#: ../../library/sys.rst:1578
+#: ../../library/sys.rst:1580
msgid "A C function has raised an exception. *arg* is the C function object."
msgstr ""
-#: ../../library/sys.rst:1580
+#: ../../library/sys.rst:1582
msgid ""
"Raises an :ref:`auditing event ` ``sys.setprofile`` with no "
"arguments."
msgstr "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys.setprofile``。"
-#: ../../library/sys.rst:1585
+#: ../../library/sys.rst:1587
msgid ""
"Set the maximum depth of the Python interpreter stack to *limit*. This "
"limit prevents infinite recursion from causing an overflow of the C stack "
"and crashing Python."
msgstr ""
-#: ../../library/sys.rst:1589
+#: ../../library/sys.rst:1591
msgid ""
"The highest possible limit is platform-dependent. A user may need to set "
"the limit higher when they have a program that requires deep recursion and a "
@@ -2059,19 +2059,19 @@ msgid ""
"because a too-high limit can lead to a crash."
msgstr ""
-#: ../../library/sys.rst:1594
+#: ../../library/sys.rst:1596
msgid ""
"If the new limit is too low at the current recursion depth, a :exc:"
"`RecursionError` exception is raised."
msgstr ""
-#: ../../library/sys.rst:1597
+#: ../../library/sys.rst:1599
msgid ""
"A :exc:`RecursionError` exception is now raised if the new limit is too low "
"at the current recursion depth."
msgstr ""
-#: ../../library/sys.rst:1604
+#: ../../library/sys.rst:1606
msgid ""
"Set the interpreter's thread switch interval (in seconds). This floating-"
"point value determines the ideal duration of the \"timeslices\" allocated to "
@@ -2082,7 +2082,7 @@ msgid ""
"scheduler."
msgstr ""
-#: ../../library/sys.rst:1621
+#: ../../library/sys.rst:1623
msgid ""
"Set the system's trace function, which allows you to implement a Python "
"source code debugger in Python. The function is thread-specific; for a "
@@ -2091,7 +2091,7 @@ msgid ""
"`threading.settrace`."
msgstr ""
-#: ../../library/sys.rst:1626
+#: ../../library/sys.rst:1628
msgid ""
"Trace functions should have three arguments: *frame*, *event*, and *arg*. "
"*frame* is the current stack frame. *event* is a string: ``'call'``, "
@@ -2099,7 +2099,7 @@ msgid ""
"the event type."
msgstr ""
-#: ../../library/sys.rst:1631
+#: ../../library/sys.rst:1633
msgid ""
"The trace function is invoked (with *event* set to ``'call'``) whenever a "
"new local scope is entered; it should return a reference to a local trace "
@@ -2107,36 +2107,36 @@ msgid ""
"traced."
msgstr ""
-#: ../../library/sys.rst:1636
+#: ../../library/sys.rst:1638
msgid ""
"The local trace function should return a reference to itself, or to another "
"function which would then be used as the local trace function for the scope."
msgstr ""
-#: ../../library/sys.rst:1639
+#: ../../library/sys.rst:1641
msgid ""
"If there is any error occurred in the trace function, it will be unset, just "
"like ``settrace(None)`` is called."
msgstr ""
-#: ../../library/sys.rst:1643
+#: ../../library/sys.rst:1645
msgid ""
"Tracing is disabled while calling the trace function (e.g. a function set "
"by :func:`!settrace`). For recursive tracing see :func:`call_tracing`."
msgstr ""
-#: ../../library/sys.rst:1649
+#: ../../library/sys.rst:1651
msgid ""
"A function is called (or some other code block entered). The global trace "
"function is called; *arg* is ``None``; the return value specifies the local "
"trace function."
msgstr ""
-#: ../../library/sys.rst:1653
+#: ../../library/sys.rst:1655
msgid "``'line'``"
msgstr "``'line'``"
-#: ../../library/sys.rst:1654
+#: ../../library/sys.rst:1656
msgid ""
"The interpreter is about to execute a new line of code or re-execute the "
"condition of a loop. The local trace function is called; *arg* is ``None``; "
@@ -2146,7 +2146,7 @@ msgid ""
"to :const:`False` on that :ref:`frame `."
msgstr ""
-#: ../../library/sys.rst:1664
+#: ../../library/sys.rst:1666
msgid ""
"A function (or other code block) is about to return. The local trace "
"function is called; *arg* is the value that will be returned, or ``None`` if "
@@ -2154,22 +2154,22 @@ msgid ""
"return value is ignored."
msgstr ""
-#: ../../library/sys.rst:1669
+#: ../../library/sys.rst:1671
msgid "``'exception'``"
msgstr "``'exception'``"
-#: ../../library/sys.rst:1670
+#: ../../library/sys.rst:1672
msgid ""
"An exception has occurred. The local trace function is called; *arg* is a "
"tuple ``(exception, value, traceback)``; the return value specifies the new "
"local trace function."
msgstr ""
-#: ../../library/sys.rst:1674
+#: ../../library/sys.rst:1676
msgid "``'opcode'``"
msgstr "``'opcode'``"
-#: ../../library/sys.rst:1675
+#: ../../library/sys.rst:1677
msgid ""
"The interpreter is about to execute a new opcode (see :mod:`dis` for opcode "
"details). The local trace function is called; *arg* is ``None``; the return "
@@ -2179,13 +2179,13 @@ msgid ""
"objects>`."
msgstr ""
-#: ../../library/sys.rst:1682
+#: ../../library/sys.rst:1684
msgid ""
"Note that as an exception is propagated down the chain of callers, an "
"``'exception'`` event is generated at each level."
msgstr ""
-#: ../../library/sys.rst:1685
+#: ../../library/sys.rst:1687
msgid ""
"For more fine-grained usage, it's possible to set a trace function by "
"assigning ``frame.f_trace = tracefunc`` explicitly, rather than relying on "
@@ -2199,17 +2199,17 @@ msgid ""
"on each frame)."
msgstr ""
-#: ../../library/sys.rst:1696
+#: ../../library/sys.rst:1698
msgid "For more information on code and frame objects, refer to :ref:`types`."
msgstr ""
-#: ../../library/sys.rst:1698
+#: ../../library/sys.rst:1700
msgid ""
"Raises an :ref:`auditing event ` ``sys.settrace`` with no "
"arguments."
msgstr "引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys.settrace``。"
-#: ../../library/sys.rst:1702
+#: ../../library/sys.rst:1704
msgid ""
"The :func:`settrace` function is intended only for implementing debuggers, "
"profilers, coverage tools and the like. Its behavior is part of the "
@@ -2217,13 +2217,13 @@ msgid ""
"thus may not be available in all Python implementations."
msgstr ""
-#: ../../library/sys.rst:1709
+#: ../../library/sys.rst:1711
msgid ""
"``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and :attr:"
"`~frame.f_trace_opcodes` attributes added to frames"
msgstr ""
-#: ../../library/sys.rst:1714
+#: ../../library/sys.rst:1716
msgid ""
"Accepts two optional keyword arguments which are callables that accept an :"
"term:`asynchronous generator iterator` as an argument. The *firstiter* "
@@ -2232,7 +2232,7 @@ msgid ""
"about to be garbage collected."
msgstr ""
-#: ../../library/sys.rst:1720
+#: ../../library/sys.rst:1722
msgid ""
"Raises an :ref:`auditing event ` ``sys."
"set_asyncgen_hooks_firstiter`` with no arguments."
@@ -2240,7 +2240,7 @@ msgstr ""
"引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys."
"set_asyncgen_hooks_firstiter``。"
-#: ../../library/sys.rst:1722
+#: ../../library/sys.rst:1724
msgid ""
"Raises an :ref:`auditing event ` ``sys."
"set_asyncgen_hooks_finalizer`` with no arguments."
@@ -2248,20 +2248,20 @@ msgstr ""
"引發一個不附帶引數的\\ :ref:`稽核事件 ` ``sys."
"set_asyncgen_hooks_finalizer``。"
-#: ../../library/sys.rst:1724
+#: ../../library/sys.rst:1726
msgid ""
"Two auditing events are raised because the underlying API consists of two "
"calls, each of which must raise its own event."
msgstr ""
-#: ../../library/sys.rst:1727
+#: ../../library/sys.rst:1729
msgid ""
"See :pep:`525` for more details, and for a reference example of a "
"*finalizer* method see the implementation of ``asyncio.Loop."
"shutdown_asyncgens`` in :source:`Lib/asyncio/base_events.py`"
msgstr ""
-#: ../../library/sys.rst:1739
+#: ../../library/sys.rst:1741
msgid ""
"Allows enabling or disabling coroutine origin tracking. When enabled, the "
"``cr_origin`` attribute on coroutine objects will contain a tuple of "
@@ -2270,111 +2270,111 @@ msgid ""
"disabled, ``cr_origin`` will be ``None``."
msgstr ""
-#: ../../library/sys.rst:1746
+#: ../../library/sys.rst:1748
msgid ""
"To enable, pass a *depth* value greater than zero; this sets the number of "
"frames whose information will be captured. To disable, pass set *depth* to "
"zero."
msgstr ""
-#: ../../library/sys.rst:1750
+#: ../../library/sys.rst:1752
msgid "This setting is thread-specific."
msgstr ""
-#: ../../library/sys.rst:1760
+#: ../../library/sys.rst:1762
msgid ""
"Activate the stack profiler trampoline *backend*. The only supported backend "
"is ``\"perf\"``."
msgstr ""
-#: ../../library/sys.rst:1769
+#: ../../library/sys.rst:1771
msgid ":ref:`perf_profiling`"
msgstr ":ref:`perf_profiling`"
-#: ../../library/sys.rst:1770
+#: ../../library/sys.rst:1772
msgid "https://perf.wiki.kernel.org"
msgstr "https://perf.wiki.kernel.org"
-#: ../../library/sys.rst:1774
+#: ../../library/sys.rst:1776
msgid "Deactivate the current stack profiler trampoline backend."
msgstr ""
-#: ../../library/sys.rst:1776
+#: ../../library/sys.rst:1778
msgid "If no stack profiler is activated, this function has no effect."
msgstr ""
-#: ../../library/sys.rst:1784
+#: ../../library/sys.rst:1786
msgid "Return ``True`` if a stack profiler trampoline is active."
msgstr ""
-#: ../../library/sys.rst:1792
+#: ../../library/sys.rst:1794
msgid ""
"Changes the :term:`filesystem encoding and error handler` to 'mbcs' and "
"'replace' respectively, for consistency with versions of Python prior to 3.6."
msgstr ""
-#: ../../library/sys.rst:1796
+#: ../../library/sys.rst:1798
msgid ""
"This is equivalent to defining the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` "
"environment variable before launching Python."
msgstr ""
-#: ../../library/sys.rst:1799
+#: ../../library/sys.rst:1801
msgid ""
"See also :func:`sys.getfilesystemencoding` and :func:`sys."
"getfilesystemencodeerrors`."
msgstr ""
-#: ../../library/sys.rst:1805
+#: ../../library/sys.rst:1807
msgid ""
"Changing the filesystem encoding after Python startup is risky because the "
"old fsencoding or paths encoded by the old fsencoding may be cached "
"somewhere. Use :envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead."
msgstr ""
-#: ../../library/sys.rst:1809
+#: ../../library/sys.rst:1811
msgid "See :pep:`529` for more details."
msgstr "更多細節請見 :pep:`529`。"
-#: ../../library/sys.rst:1812
+#: ../../library/sys.rst:1814
msgid "Use :envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead."
msgstr ""
-#: ../../library/sys.rst:1819
+#: ../../library/sys.rst:1821
msgid ""
":term:`File objects ` used by the interpreter for standard "
"input, output and errors:"
msgstr ""
-#: ../../library/sys.rst:1822
+#: ../../library/sys.rst:1824
msgid ""
"``stdin`` is used for all interactive input (including calls to :func:"
"`input`);"
msgstr ""
-#: ../../library/sys.rst:1824
+#: ../../library/sys.rst:1826
msgid ""
"``stdout`` is used for the output of :func:`print` and :term:`expression` "
"statements and for the prompts of :func:`input`;"
msgstr ""
-#: ../../library/sys.rst:1826
+#: ../../library/sys.rst:1828
msgid "The interpreter's own prompts and its error messages go to ``stderr``."
msgstr ""
-#: ../../library/sys.rst:1828
+#: ../../library/sys.rst:1830
msgid ""
"These streams are regular :term:`text files ` like those returned "
"by the :func:`open` function. Their parameters are chosen as follows:"
msgstr ""
-#: ../../library/sys.rst:1832
+#: ../../library/sys.rst:1834
msgid ""
"The encoding and error handling are is initialized from :c:member:`PyConfig."
"stdio_encoding` and :c:member:`PyConfig.stdio_errors`."
msgstr ""
-#: ../../library/sys.rst:1835
+#: ../../library/sys.rst:1837
msgid ""
"On Windows, UTF-8 is used for the console device. Non-character devices "
"such as disk files and pipes use the system locale encoding (i.e. the ANSI "
@@ -2385,14 +2385,14 @@ msgid ""
"initially attached to a console."
msgstr ""
-#: ../../library/sys.rst:1844
+#: ../../library/sys.rst:1846
msgid ""
"The special behaviour of the console can be overridden by setting the "
"environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In "
"that case, the console codepages are used as for any other character device."
msgstr ""
-#: ../../library/sys.rst:1849
+#: ../../library/sys.rst:1851
msgid ""
"Under all platforms, you can override the character encoding by setting the :"
"envvar:`PYTHONIOENCODING` environment variable before starting Python or by "
@@ -2401,7 +2401,7 @@ msgid ""
"only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set."
msgstr ""
-#: ../../library/sys.rst:1856
+#: ../../library/sys.rst:1858
msgid ""
"When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is "
"block-buffered like regular text files. The ``stderr`` stream is line-"
@@ -2410,19 +2410,19 @@ msgid ""
"`PYTHONUNBUFFERED` environment variable."
msgstr ""
-#: ../../library/sys.rst:1862
+#: ../../library/sys.rst:1864
msgid ""
"Non-interactive ``stderr`` is now line-buffered instead of fully buffered."
msgstr ""
-#: ../../library/sys.rst:1868
+#: ../../library/sys.rst:1870
msgid ""
"To write or read binary data from/to the standard streams, use the "
"underlying binary :data:`~io.TextIOBase.buffer` object. For example, to "
"write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``."
msgstr ""
-#: ../../library/sys.rst:1872
+#: ../../library/sys.rst:1874
msgid ""
"However, if you are writing a library (and do not control in which context "
"its code will be executed), be aware that the standard streams may be "
@@ -2430,7 +2430,7 @@ msgid ""
"support the :attr:`!buffer` attribute."
msgstr ""
-#: ../../library/sys.rst:1882
+#: ../../library/sys.rst:1884
msgid ""
"These objects contain the original values of ``stdin``, ``stderr`` and "
"``stdout`` at the start of the program. They are used during finalization, "
@@ -2438,7 +2438,7 @@ msgid ""
"``sys.std*`` object has been redirected."
msgstr ""
-#: ../../library/sys.rst:1887
+#: ../../library/sys.rst:1889
msgid ""
"It can also be used to restore the actual files to known working file "
"objects in case they have been overwritten with a broken object. However, "
@@ -2446,7 +2446,7 @@ msgid ""
"before replacing it, and restore the saved object."
msgstr ""
-#: ../../library/sys.rst:1893
+#: ../../library/sys.rst:1895
msgid ""
"Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the "
"original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be "
@@ -2454,12 +2454,12 @@ msgid ""
"to a console and Python apps started with :program:`pythonw`."
msgstr ""
-#: ../../library/sys.rst:1901
+#: ../../library/sys.rst:1903
msgid ""
"A frozenset of strings containing the names of standard library modules."
msgstr ""
-#: ../../library/sys.rst:1903
+#: ../../library/sys.rst:1905
msgid ""
"It is the same on all platforms. Modules which are not available on some "
"platforms and modules disabled at Python build are also listed. All module "
@@ -2467,7 +2467,7 @@ msgid ""
"modules are excluded."
msgstr ""
-#: ../../library/sys.rst:1908
+#: ../../library/sys.rst:1910
msgid ""
"For packages, only the main package is listed: sub-packages and sub-modules "
"are not listed. For example, the ``email`` package is listed, but the "
@@ -2475,60 +2475,60 @@ msgid ""
"listed."
msgstr ""
-#: ../../library/sys.rst:1913
+#: ../../library/sys.rst:1915
msgid "See also the :data:`sys.builtin_module_names` list."
msgstr "另請參閱 :attr:`sys.builtin_module_names` 清單。"
-#: ../../library/sys.rst:1920
+#: ../../library/sys.rst:1922
msgid ""
"A :term:`named tuple` holding information about the thread implementation."
msgstr ""
-#: ../../library/sys.rst:1925
+#: ../../library/sys.rst:1927
msgid "The name of the thread implementation:"
msgstr ""
-#: ../../library/sys.rst:1927
+#: ../../library/sys.rst:1929
msgid "``\"nt\"``: Windows threads"
msgstr "``\"nt\"``: Windows 執行緒"
-#: ../../library/sys.rst:1928
+#: ../../library/sys.rst:1930
msgid "``\"pthread\"``: POSIX threads"
msgstr "``\"pthread\"``: POSIX 執行緒"
-#: ../../library/sys.rst:1929
+#: ../../library/sys.rst:1931
msgid ""
"``\"pthread-stubs\"``: stub POSIX threads (on WebAssembly platforms without "
"threading support)"
msgstr ""
-#: ../../library/sys.rst:1931
+#: ../../library/sys.rst:1933
msgid "``\"solaris\"``: Solaris threads"
msgstr ""
-#: ../../library/sys.rst:1935
+#: ../../library/sys.rst:1937
msgid "The name of the lock implementation:"
msgstr ""
-#: ../../library/sys.rst:1937
+#: ../../library/sys.rst:1939
msgid "``\"semaphore\"``: a lock uses a semaphore"
msgstr ""
-#: ../../library/sys.rst:1938
+#: ../../library/sys.rst:1940
msgid "``\"mutex+cond\"``: a lock uses a mutex and a condition variable"
msgstr ""
-#: ../../library/sys.rst:1939
+#: ../../library/sys.rst:1941
msgid "``None`` if this information is unknown"
msgstr "為 ``None`` 表示此資訊未知"
-#: ../../library/sys.rst:1943
+#: ../../library/sys.rst:1945
msgid ""
"The name and version of the thread library. It is a string, or ``None`` if "
"this information is unknown."
msgstr ""
-#: ../../library/sys.rst:1951
+#: ../../library/sys.rst:1953
msgid ""
"When this variable is set to an integer value, it determines the maximum "
"number of levels of traceback information printed when an unhandled "
@@ -2537,73 +2537,73 @@ msgid ""
"are printed."
msgstr ""
-#: ../../library/sys.rst:1959
+#: ../../library/sys.rst:1961
msgid "Handle an unraisable exception."
msgstr "處理一個不可被引發的例外。"
-#: ../../library/sys.rst:1961
+#: ../../library/sys.rst:1963
msgid ""
"Called when an exception has occurred but there is no way for Python to "
"handle it. For example, when a destructor raises an exception or during "
"garbage collection (:func:`gc.collect`)."
msgstr ""
-#: ../../library/sys.rst:1965
+#: ../../library/sys.rst:1967
msgid "The *unraisable* argument has the following attributes:"
-msgstr ""
+msgstr "*unraisable* 引數具有以下屬性:"
-#: ../../library/sys.rst:1967
+#: ../../library/sys.rst:1969
msgid ":attr:`!exc_type`: Exception type."
msgstr ":attr:`!exc_type`: 例外型別。"
-#: ../../library/sys.rst:1968
+#: ../../library/sys.rst:1970
msgid ":attr:`!exc_value`: Exception value, can be ``None``."
msgstr ":attr:`!exc_value`: 例外值,可以為 ``None``。"
-#: ../../library/sys.rst:1969
+#: ../../library/sys.rst:1971
msgid ":attr:`!exc_traceback`: Exception traceback, can be ``None``."
msgstr ":attr:`!exc_traceback`: 例外追蹤,可以為 ``None``。"
-#: ../../library/sys.rst:1970
+#: ../../library/sys.rst:1972
msgid ":attr:`!err_msg`: Error message, can be ``None``."
msgstr ":attr:`!err_msg`: 錯誤訊息,可以為 ``None``。"
-#: ../../library/sys.rst:1971
+#: ../../library/sys.rst:1973
msgid ":attr:`!object`: Object causing the exception, can be ``None``."
msgstr ":attr:`!object`: 導致例外的物件,可以為 ``None``。"
-#: ../../library/sys.rst:1973
+#: ../../library/sys.rst:1975
msgid ""
"The default hook formats :attr:`!err_msg` and :attr:`!object` as: "
"``f'{err_msg}: {object!r}'``; use \"Exception ignored in\" error message if :"
"attr:`!err_msg` is ``None``."
msgstr ""
-#: ../../library/sys.rst:1977
+#: ../../library/sys.rst:1979
msgid ""
":func:`sys.unraisablehook` can be overridden to control how unraisable "
"exceptions are handled."
msgstr ""
-#: ../../library/sys.rst:1982
+#: ../../library/sys.rst:1984
msgid ":func:`excepthook` which handles uncaught exceptions."
msgstr "處理未被捕捉到例外的 :func:`excepthook`。"
-#: ../../library/sys.rst:1986
+#: ../../library/sys.rst:1988
msgid ""
"Storing :attr:`!exc_value` using a custom hook can create a reference cycle. "
"It should be cleared explicitly to break the reference cycle when the "
"exception is no longer needed."
msgstr ""
-#: ../../library/sys.rst:1990
+#: ../../library/sys.rst:1992
msgid ""
"Storing :attr:`!object` using a custom hook can resurrect it if it is set to "
"an object which is being finalized. Avoid storing :attr:`!object` after the "
"custom hook completes to avoid resurrecting objects."
msgstr ""
-#: ../../library/sys.rst:1994 ../../library/sys.rst:1996
+#: ../../library/sys.rst:1996 ../../library/sys.rst:1998
msgid ""
"Raise an auditing event ``sys.unraisablehook`` with arguments *hook*, "
"*unraisable* when an exception that cannot be handled occurs. The "
@@ -2611,7 +2611,7 @@ msgid ""
"hook has been set, *hook* may be ``None``."
msgstr ""
-#: ../../library/sys.rst:2005
+#: ../../library/sys.rst:2007
msgid ""
"A string containing the version number of the Python interpreter plus "
"additional information on the build number and compiler used. This string "
@@ -2620,13 +2620,13 @@ msgid ""
"functions provided by the :mod:`platform` module."
msgstr ""
-#: ../../library/sys.rst:2014
+#: ../../library/sys.rst:2016
msgid ""
"The C API version for this interpreter. Programmers may find this useful "
"when debugging version conflicts between Python and extension modules."
msgstr ""
-#: ../../library/sys.rst:2020
+#: ../../library/sys.rst:2022
msgid ""
"A tuple containing the five components of the version number: *major*, "
"*minor*, *micro*, *releaselevel*, and *serial*. All values except "
@@ -2637,18 +2637,18 @@ msgid ""
"version_info.major`` and so on."
msgstr ""
-#: ../../library/sys.rst:2028
+#: ../../library/sys.rst:2030
msgid "Added named component attributes."
msgstr "新增了附名的元件屬性。"
-#: ../../library/sys.rst:2033
+#: ../../library/sys.rst:2035
msgid ""
"This is an implementation detail of the warnings framework; do not modify "
"this value. Refer to the :mod:`warnings` module for more information on the "
"warnings framework."
msgstr ""
-#: ../../library/sys.rst:2040
+#: ../../library/sys.rst:2042
msgid ""
"The version number used to form registry keys on Windows platforms. This is "
"stored as string resource 1000 in the Python DLL. The value is normally the "
@@ -2657,20 +2657,20 @@ msgid ""
"has no effect on the registry keys used by Python."
msgstr ""
-#: ../../library/sys.rst:2052
+#: ../../library/sys.rst:2054
msgid ""
"Namespace containing functions and constants for register callbacks and "
"controlling monitoring events. See :mod:`sys.monitoring` for details."
msgstr ""
-#: ../../library/sys.rst:2058
+#: ../../library/sys.rst:2060
msgid ""
"A dictionary of the various implementation-specific flags passed through "
"the :option:`-X` command-line option. Option names are either mapped to "
"their values, if given explicitly, or to :const:`True`. Example:"
msgstr ""
-#: ../../library/sys.rst:2062
+#: ../../library/sys.rst:2064
msgid ""
"$ ./python -Xa=b -Xc\n"
"Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50)\n"
@@ -2690,18 +2690,18 @@ msgstr ""
">>> sys._xoptions\n"
"{'a': 'b', 'c': True}"
-#: ../../library/sys.rst:2074
+#: ../../library/sys.rst:2076
msgid ""
"This is a CPython-specific way of accessing options passed through :option:`-"
"X`. Other implementations may export them through other means, or not at "
"all."
msgstr ""
-#: ../../library/sys.rst:2082
+#: ../../library/sys.rst:2084
msgid "Citations"
msgstr "引用"
-#: ../../library/sys.rst:2083
+#: ../../library/sys.rst:2085
msgid ""
"ISO/IEC 9899:1999. \"Programming languages -- C.\" A public draft of this "
"standard is available at https://www.open-std.org/jtc1/sc22/wg14/www/docs/"
@@ -2722,50 +2722,50 @@ msgstr "object(物件)"
msgid "traceback"
msgstr "traceback"
-#: ../../library/sys.rst:954 ../../library/sys.rst:1534
+#: ../../library/sys.rst:956 ../../library/sys.rst:1536
msgid "profile function"
msgstr ""
-#: ../../library/sys.rst:954 ../../library/sys.rst:1534
+#: ../../library/sys.rst:956 ../../library/sys.rst:1536
msgid "profiler"
msgstr ""
-#: ../../library/sys.rst:963 ../../library/sys.rst:1617
+#: ../../library/sys.rst:965 ../../library/sys.rst:1619
msgid "trace function"
msgstr ""
-#: ../../library/sys.rst:963 ../../library/sys.rst:1617
+#: ../../library/sys.rst:965 ../../library/sys.rst:1619
msgid "debugger"
msgstr "debugger(除錯器)"
-#: ../../library/sys.rst:1362
+#: ../../library/sys.rst:1364
msgid "module"
msgstr "module(模組)"
-#: ../../library/sys.rst:1362
+#: ../../library/sys.rst:1364
msgid "search"
msgstr "search(搜尋)"
-#: ../../library/sys.rst:1362
+#: ../../library/sys.rst:1364
msgid "path"
msgstr "path(路徑)"
-#: ../../library/sys.rst:1498
+#: ../../library/sys.rst:1500
msgid "interpreter prompts"
msgstr "interpreter prompts(直譯器提示)"
-#: ../../library/sys.rst:1498
+#: ../../library/sys.rst:1500
msgid "prompts, interpreter"
msgstr "prompts, interpreter(提示、直譯器)"
-#: ../../library/sys.rst:1498
+#: ../../library/sys.rst:1500
msgid ">>>"
msgstr ">>>"
-#: ../../library/sys.rst:1498
+#: ../../library/sys.rst:1500
msgid "interpreter prompt"
msgstr "interpreter prompt(直譯器提示)"
-#: ../../library/sys.rst:1498
+#: ../../library/sys.rst:1500
msgid "..."
msgstr "..."
diff --git a/library/syslog.po b/library/syslog.po
index 80f33bd74f..903b926241 100644
--- a/library/syslog.po
+++ b/library/syslog.po
@@ -31,7 +31,7 @@ msgstr ""
#: ../../library/syslog.rst:14
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/syslog.rst:16
msgid ""
@@ -163,7 +163,7 @@ msgstr ""
#: ../../library/syslog.rst:108
msgid "The module defines the following constants:"
-msgstr ""
+msgstr "這個模組定義了以下常數:"
#: ../../library/syslog.rst:120
msgid "Priority levels (high to low)."
diff --git a/library/tarfile.po b/library/tarfile.po
index e996b848ab..5ea736c950 100644
--- a/library/tarfile.po
+++ b/library/tarfile.po
@@ -1,13 +1,13 @@
-# 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
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-06-27 07:36+0000\n"
+"POT-Creation-Date: 2025-07-07 01:58+0000\n"
"PO-Revision-Date: 2018-05-23 16:12+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -68,7 +68,7 @@ msgstr ""
#: ../../library/tarfile.rst:36
msgid "Added support for :mod:`lzma` compression."
-msgstr ""
+msgstr "新增對 :mod:`lzma` 壓縮的支援。"
#: ../../library/tarfile.rst:39
msgid ""
@@ -91,18 +91,20 @@ msgid ""
"*mode* has to be a string of the form ``'filemode[:compression]'``, it "
"defaults to ``'r'``. Here is a full list of mode combinations:"
msgstr ""
+"*mode* 必須是 ``'filemode[:compression]'`` 形式的字串,預設為 ``'r'``。以下是所有可"
+"能的模式組合:"
#: ../../library/tarfile.rst:57
msgid "mode"
-msgstr ""
+msgstr "模式"
#: ../../library/tarfile.rst:57
msgid "action"
-msgstr ""
+msgstr "操作"
#: ../../library/tarfile.rst:59
-msgid "``'r' or 'r:*'``"
-msgstr "``'r' 或 'r:*'``"
+msgid "``'r'`` or ``'r:*'``"
+msgstr "``'r'`` 或 ``'r:*'``"
#: ../../library/tarfile.rst:59
msgid "Open for reading with transparent compression (recommended)."
@@ -122,7 +124,7 @@ msgstr "``'r:gz'``"
#: ../../library/tarfile.rst:65
msgid "Open for reading with gzip compression."
-msgstr ""
+msgstr "開啟以讀取 gzip 壓縮。"
#: ../../library/tarfile.rst:67
msgid "``'r:bz2'``"
@@ -130,7 +132,7 @@ msgstr "``'r:bz2'``"
#: ../../library/tarfile.rst:67
msgid "Open for reading with bzip2 compression."
-msgstr ""
+msgstr "開啟以讀取 bzip2 壓縮。"
#: ../../library/tarfile.rst:69
msgid "``'r:xz'``"
@@ -138,7 +140,7 @@ msgstr "``'r:xz'``"
#: ../../library/tarfile.rst:69
msgid "Open for reading with lzma compression."
-msgstr ""
+msgstr "開啟以讀取 lzma 壓縮。"
#: ../../library/tarfile.rst:71
msgid "``'x'`` or ``'x:'``"
@@ -181,8 +183,8 @@ msgid ""
msgstr ""
#: ../../library/tarfile.rst:88
-msgid "``'a' or 'a:'``"
-msgstr "``'a' 或 'a:'``"
+msgid "``'a'`` or ``'a:'``"
+msgstr "``'a'`` 或 ``'a:'``"
#: ../../library/tarfile.rst:88
msgid ""
@@ -191,38 +193,38 @@ msgid ""
msgstr ""
#: ../../library/tarfile.rst:91
-msgid "``'w' or 'w:'``"
-msgstr "``'w' 或 'w:'``"
+msgid "``'w'`` or ``'w:'``"
+msgstr "``'w'`` 或 ``'w:'``"
#: ../../library/tarfile.rst:91
msgid "Open for uncompressed writing."
msgstr ""
-#: ../../library/tarfile.rst:93
+#: ../../library/tarfile.rst:94
msgid "``'w:gz'``"
msgstr "``'w:gz'``"
-#: ../../library/tarfile.rst:93
+#: ../../library/tarfile.rst:94
msgid "Open for gzip compressed writing."
-msgstr ""
+msgstr "開啟以用於 gzip 壓縮寫入。"
-#: ../../library/tarfile.rst:95
+#: ../../library/tarfile.rst:96
msgid "``'w:bz2'``"
msgstr "``'w:bz2'``"
-#: ../../library/tarfile.rst:95
+#: ../../library/tarfile.rst:96
msgid "Open for bzip2 compressed writing."
-msgstr ""
+msgstr "開啟以用於 bzip2 壓縮寫入。"
-#: ../../library/tarfile.rst:97
+#: ../../library/tarfile.rst:98
msgid "``'w:xz'``"
msgstr "``'w:xz'``"
-#: ../../library/tarfile.rst:97
+#: ../../library/tarfile.rst:98
msgid "Open for lzma compressed writing."
-msgstr ""
+msgstr "開啟以用於 lzma 壓縮寫入。"
-#: ../../library/tarfile.rst:100
+#: ../../library/tarfile.rst:101
msgid ""
"Note that ``'a:gz'``, ``'a:bz2'`` or ``'a:xz'`` is not possible. If *mode* "
"is not suitable to open a certain (compressed) file for reading, :exc:"
@@ -230,26 +232,26 @@ msgid ""
"method is not supported, :exc:`CompressionError` is raised."
msgstr ""
-#: ../../library/tarfile.rst:105
+#: ../../library/tarfile.rst:106
msgid ""
"If *fileobj* is specified, it is used as an alternative to a :term:`file "
"object` opened in binary mode for *name*. It is supposed to be at position 0."
msgstr ""
-#: ../../library/tarfile.rst:108
+#: ../../library/tarfile.rst:109
msgid ""
"For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|"
"bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* "
"(default ``9``) to specify the compression level of the file."
msgstr ""
-#: ../../library/tarfile.rst:112
+#: ../../library/tarfile.rst:113
msgid ""
"For modes ``'w:xz'`` and ``'x:xz'``, :func:`tarfile.open` accepts the "
"keyword argument *preset* to specify the compression level of the file."
msgstr ""
-#: ../../library/tarfile.rst:115
+#: ../../library/tarfile.rst:116
msgid ""
"For special purposes, there is a second format for *mode*: ``'filemode|"
"[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` "
@@ -263,186 +265,186 @@ msgid ""
"random access, see :ref:`tar-examples`. The currently possible modes:"
msgstr ""
-#: ../../library/tarfile.rst:129
+#: ../../library/tarfile.rst:130
msgid "Mode"
-msgstr ""
+msgstr "模式"
-#: ../../library/tarfile.rst:129
+#: ../../library/tarfile.rst:130
msgid "Action"
-msgstr ""
+msgstr "操作"
-#: ../../library/tarfile.rst:131
+#: ../../library/tarfile.rst:132
msgid "``'r|*'``"
msgstr "``'r|*'``"
-#: ../../library/tarfile.rst:131
+#: ../../library/tarfile.rst:132
msgid "Open a *stream* of tar blocks for reading with transparent compression."
msgstr ""
-#: ../../library/tarfile.rst:134
+#: ../../library/tarfile.rst:135
msgid "``'r|'``"
msgstr "``'r|'``"
-#: ../../library/tarfile.rst:134
+#: ../../library/tarfile.rst:135
msgid "Open a *stream* of uncompressed tar blocks for reading."
msgstr ""
-#: ../../library/tarfile.rst:137
+#: ../../library/tarfile.rst:138
msgid "``'r|gz'``"
msgstr "``'r|gz'``"
-#: ../../library/tarfile.rst:137
+#: ../../library/tarfile.rst:138
msgid "Open a gzip compressed *stream* for reading."
msgstr ""
-#: ../../library/tarfile.rst:140
+#: ../../library/tarfile.rst:141
msgid "``'r|bz2'``"
msgstr "``'r|bz2'``"
-#: ../../library/tarfile.rst:140
+#: ../../library/tarfile.rst:141
msgid "Open a bzip2 compressed *stream* for reading."
msgstr ""
-#: ../../library/tarfile.rst:143
+#: ../../library/tarfile.rst:144
msgid "``'r|xz'``"
msgstr "``'r|xz'``"
-#: ../../library/tarfile.rst:143
+#: ../../library/tarfile.rst:144
msgid "Open an lzma compressed *stream* for reading."
msgstr ""
-#: ../../library/tarfile.rst:146
+#: ../../library/tarfile.rst:147
msgid "``'w|'``"
msgstr "``'w|'``"
-#: ../../library/tarfile.rst:146
+#: ../../library/tarfile.rst:147
msgid "Open an uncompressed *stream* for writing."
msgstr ""
-#: ../../library/tarfile.rst:148
+#: ../../library/tarfile.rst:149
msgid "``'w|gz'``"
msgstr "``'w|gz'``"
-#: ../../library/tarfile.rst:148
+#: ../../library/tarfile.rst:149
msgid "Open a gzip compressed *stream* for writing."
msgstr ""
-#: ../../library/tarfile.rst:151
+#: ../../library/tarfile.rst:152
msgid "``'w|bz2'``"
msgstr "``'w|bz2'``"
-#: ../../library/tarfile.rst:151
+#: ../../library/tarfile.rst:152
msgid "Open a bzip2 compressed *stream* for writing."
msgstr ""
-#: ../../library/tarfile.rst:154
+#: ../../library/tarfile.rst:155
msgid "``'w|xz'``"
msgstr "``'w|xz'``"
-#: ../../library/tarfile.rst:154
+#: ../../library/tarfile.rst:155
msgid "Open an lzma compressed *stream* for writing."
msgstr ""
-#: ../../library/tarfile.rst:158 ../../library/tarfile.rst:434
+#: ../../library/tarfile.rst:159 ../../library/tarfile.rst:435
msgid "The ``'x'`` (exclusive creation) mode was added."
msgstr ""
-#: ../../library/tarfile.rst:161 ../../library/tarfile.rst:437
-#: ../../library/tarfile.rst:682
+#: ../../library/tarfile.rst:162 ../../library/tarfile.rst:438
+#: ../../library/tarfile.rst:683
msgid "The *name* parameter accepts a :term:`path-like object`."
msgstr ""
-#: ../../library/tarfile.rst:164
+#: ../../library/tarfile.rst:165
msgid "The *compresslevel* keyword argument also works for streams."
msgstr ""
-#: ../../library/tarfile.rst:171
+#: ../../library/tarfile.rst:172
msgid ""
"Class for reading and writing tar archives. Do not use this class directly: "
"use :func:`tarfile.open` instead. See :ref:`tarfile-objects`."
msgstr ""
-#: ../../library/tarfile.rst:177
+#: ../../library/tarfile.rst:178
msgid ""
"Return :const:`True` if *name* is a tar archive file, that the :mod:"
"`tarfile` module can read. *name* may be a :class:`str`, file, or file-like "
"object."
msgstr ""
-#: ../../library/tarfile.rst:180
+#: ../../library/tarfile.rst:181
msgid "Support for file and file-like objects."
-msgstr ""
+msgstr "對檔案和類檔案物件的支援。"
-#: ../../library/tarfile.rst:184
+#: ../../library/tarfile.rst:185
msgid "The :mod:`tarfile` module defines the following exceptions:"
-msgstr ""
+msgstr ":mod:`tarfile` 模組定義了以下例外:"
-#: ../../library/tarfile.rst:189
+#: ../../library/tarfile.rst:190
msgid "Base class for all :mod:`tarfile` exceptions."
-msgstr ""
+msgstr "所有 :mod:`tarfile` 例外的基底類別。"
-#: ../../library/tarfile.rst:194
+#: ../../library/tarfile.rst:195
msgid ""
"Is raised when a tar archive is opened, that either cannot be handled by "
"the :mod:`tarfile` module or is somehow invalid."
msgstr ""
-#: ../../library/tarfile.rst:200
+#: ../../library/tarfile.rst:201
msgid ""
"Is raised when a compression method is not supported or when the data cannot "
"be decoded properly."
msgstr ""
-#: ../../library/tarfile.rst:206
+#: ../../library/tarfile.rst:207
msgid ""
"Is raised for the limitations that are typical for stream-like :class:"
"`TarFile` objects."
msgstr ""
-#: ../../library/tarfile.rst:212
+#: ../../library/tarfile.rst:213
msgid ""
"Is raised for *non-fatal* errors when using :meth:`TarFile.extract`, but "
"only if :attr:`TarFile.errorlevel`\\ ``== 2``."
msgstr ""
-#: ../../library/tarfile.rst:218
+#: ../../library/tarfile.rst:219
msgid "Is raised by :meth:`TarInfo.frombuf` if the buffer it gets is invalid."
msgstr ""
-#: ../../library/tarfile.rst:223
+#: ../../library/tarfile.rst:224
msgid ""
"Base class for members :ref:`refused ` by filters."
msgstr ""
-#: ../../library/tarfile.rst:228
+#: ../../library/tarfile.rst:229
msgid ""
"Information about the member that the filter refused to extract, as :ref:"
"`TarInfo `."
msgstr ""
-#: ../../library/tarfile.rst:233
+#: ../../library/tarfile.rst:234
msgid "Raised to refuse extracting a member with an absolute path."
msgstr ""
-#: ../../library/tarfile.rst:237
+#: ../../library/tarfile.rst:238
msgid "Raised to refuse extracting a member outside the destination directory."
msgstr ""
-#: ../../library/tarfile.rst:241
+#: ../../library/tarfile.rst:242
msgid "Raised to refuse extracting a special file (e.g. a device or pipe)."
msgstr ""
-#: ../../library/tarfile.rst:245
+#: ../../library/tarfile.rst:246
msgid "Raised to refuse extracting a symbolic link with an absolute path."
msgstr ""
-#: ../../library/tarfile.rst:249
+#: ../../library/tarfile.rst:250
msgid ""
"Raised to refuse extracting a symbolic link pointing outside the destination "
"directory."
msgstr ""
-#: ../../library/tarfile.rst:254
+#: ../../library/tarfile.rst:255
msgid ""
"Raised to refuse emulating a link (hard or symbolic) by extracting another "
"archive member, when that member would be rejected by the filter location. "
@@ -450,124 +452,124 @@ msgid ""
"as :attr:`!BaseException.__context__`."
msgstr ""
-#: ../../library/tarfile.rst:262
+#: ../../library/tarfile.rst:263
msgid "The following constants are available at the module level:"
msgstr ""
-#: ../../library/tarfile.rst:266
+#: ../../library/tarfile.rst:267
msgid ""
"The default character encoding: ``'utf-8'`` on Windows, the value returned "
"by :func:`sys.getfilesystemencoding` otherwise."
msgstr ""
-#: ../../library/tarfile.rst:272
+#: ../../library/tarfile.rst:273
msgid "A regular file :attr:`~TarInfo.type`."
-msgstr ""
+msgstr "一個普通檔案 :attr:`~TarInfo.type`。"
-#: ../../library/tarfile.rst:276
+#: ../../library/tarfile.rst:277
msgid "A link (inside tarfile) :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:280
+#: ../../library/tarfile.rst:281
msgid "A symbolic link :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:284
+#: ../../library/tarfile.rst:285
msgid "A character special device :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:288
+#: ../../library/tarfile.rst:289
msgid "A block special device :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:292
+#: ../../library/tarfile.rst:293
msgid "A directory :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:296
+#: ../../library/tarfile.rst:297
msgid "A FIFO special device :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:300
+#: ../../library/tarfile.rst:301
msgid "A contiguous file :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:304
+#: ../../library/tarfile.rst:305
msgid "A GNU tar longname :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:308
+#: ../../library/tarfile.rst:309
msgid "A GNU tar longlink :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:312
+#: ../../library/tarfile.rst:313
msgid "A GNU tar sparse file :attr:`~TarInfo.type`."
msgstr ""
-#: ../../library/tarfile.rst:315
+#: ../../library/tarfile.rst:316
msgid ""
"Each of the following constants defines a tar archive format that the :mod:"
"`tarfile` module is able to create. See section :ref:`tar-formats` for "
"details."
msgstr ""
-#: ../../library/tarfile.rst:322
+#: ../../library/tarfile.rst:323
msgid "POSIX.1-1988 (ustar) format."
-msgstr ""
+msgstr "POSIX.1-1988 (ustar) 格式。"
-#: ../../library/tarfile.rst:327
+#: ../../library/tarfile.rst:328
msgid "GNU tar format."
-msgstr ""
+msgstr "GNU tar 格式。"
-#: ../../library/tarfile.rst:332
+#: ../../library/tarfile.rst:333
msgid "POSIX.1-2001 (pax) format."
-msgstr ""
+msgstr "POSIX.1-2001 (pax) 格式。"
-#: ../../library/tarfile.rst:337
+#: ../../library/tarfile.rst:338
msgid ""
"The default format for creating archives. This is currently :const:"
"`PAX_FORMAT`."
msgstr ""
-#: ../../library/tarfile.rst:339
+#: ../../library/tarfile.rst:340
msgid ""
"The default format for new archives was changed to :const:`PAX_FORMAT` from :"
"const:`GNU_FORMAT`."
msgstr ""
-#: ../../library/tarfile.rst:346
+#: ../../library/tarfile.rst:347
msgid "Module :mod:`zipfile`"
msgstr ":mod:`zipfile` 模組"
-#: ../../library/tarfile.rst:347
+#: ../../library/tarfile.rst:348
msgid "Documentation of the :mod:`zipfile` standard module."
-msgstr ""
+msgstr ":mod:`zipfile` 標準模組的文件。"
-#: ../../library/tarfile.rst:349
+#: ../../library/tarfile.rst:350
msgid ":ref:`archiving-operations`"
msgstr ":ref:`archiving-operations`"
-#: ../../library/tarfile.rst:350
+#: ../../library/tarfile.rst:351
msgid ""
"Documentation of the higher-level archiving facilities provided by the "
"standard :mod:`shutil` module."
msgstr ""
-#: ../../library/tarfile.rst:353
+#: ../../library/tarfile.rst:354
msgid ""
"`GNU tar manual, Basic Tar Format `_"
msgstr ""
-#: ../../library/tarfile.rst:354
+#: ../../library/tarfile.rst:355
msgid "Documentation for tar archive files, including GNU tar extensions."
msgstr ""
-#: ../../library/tarfile.rst:360
+#: ../../library/tarfile.rst:361
msgid "TarFile Objects"
msgstr "TarFile 物件"
-#: ../../library/tarfile.rst:362
+#: ../../library/tarfile.rst:363
msgid ""
"The :class:`TarFile` object provides an interface to a tar archive. A tar "
"archive is a sequence of blocks. An archive member (a stored file) is made "
@@ -576,7 +578,7 @@ msgid ""
"class:`TarInfo` object, see :ref:`tarinfo-objects` for details."
msgstr ""
-#: ../../library/tarfile.rst:368
+#: ../../library/tarfile.rst:369
msgid ""
"A :class:`TarFile` object can be used as a context manager in a :keyword:"
"`with` statement. It will automatically be closed when the block is "
@@ -585,24 +587,24 @@ msgid ""
"be closed. See the :ref:`tar-examples` section for a use case."
msgstr ""
-#: ../../library/tarfile.rst:374
+#: ../../library/tarfile.rst:375
msgid "Added support for the context management protocol."
-msgstr ""
+msgstr "新增對情境管理協定的支援。"
-#: ../../library/tarfile.rst:379
+#: ../../library/tarfile.rst:380
msgid ""
"All following arguments are optional and can be accessed as instance "
"attributes as well."
msgstr ""
-#: ../../library/tarfile.rst:382
+#: ../../library/tarfile.rst:383
msgid ""
"*name* is the pathname of the archive. *name* may be a :term:`path-like "
"object`. It can be omitted if *fileobj* is given. In this case, the file "
"object's :attr:`!name` attribute is used if it exists."
msgstr ""
-#: ../../library/tarfile.rst:386
+#: ../../library/tarfile.rst:387
msgid ""
"*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append "
"data to an existing file, ``'w'`` to create a new file overwriting an "
@@ -610,18 +612,18 @@ msgid ""
"exist."
msgstr ""
-#: ../../library/tarfile.rst:390
+#: ../../library/tarfile.rst:391
msgid ""
"If *fileobj* is given, it is used for reading or writing data. If it can be "
"determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used "
"from position 0."
msgstr ""
-#: ../../library/tarfile.rst:396
+#: ../../library/tarfile.rst:397
msgid "*fileobj* is not closed, when :class:`TarFile` is closed."
msgstr ""
-#: ../../library/tarfile.rst:398
+#: ../../library/tarfile.rst:399
msgid ""
"*format* controls the archive format for writing. It must be one of the "
"constants :const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` "
@@ -629,20 +631,20 @@ msgid ""
"detected, even if different formats are present in a single archive."
msgstr ""
-#: ../../library/tarfile.rst:403
+#: ../../library/tarfile.rst:404
msgid ""
"The *tarinfo* argument can be used to replace the default :class:`TarInfo` "
"class with a different one."
msgstr ""
-#: ../../library/tarfile.rst:406
+#: ../../library/tarfile.rst:407
msgid ""
"If *dereference* is :const:`False`, add symbolic and hard links to the "
"archive. If it is :const:`True`, add the content of the target files to the "
"archive. This has no effect on systems that do not support symbolic links."
msgstr ""
-#: ../../library/tarfile.rst:410
+#: ../../library/tarfile.rst:411
msgid ""
"If *ignore_zeros* is :const:`False`, treat an empty block as the end of the "
"archive. If it is :const:`True`, skip empty (and invalid) blocks and try to "
@@ -650,19 +652,19 @@ msgid ""
"concatenated or damaged archives."
msgstr ""
-#: ../../library/tarfile.rst:414
+#: ../../library/tarfile.rst:415
msgid ""
"*debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug "
"messages). The messages are written to ``sys.stderr``."
msgstr ""
-#: ../../library/tarfile.rst:417
+#: ../../library/tarfile.rst:418
msgid ""
"*errorlevel* controls how extraction errors are handled, see :attr:`the "
"corresponding attribute `."
msgstr ""
-#: ../../library/tarfile.rst:420
+#: ../../library/tarfile.rst:421
msgid ""
"The *encoding* and *errors* arguments define the character encoding to be "
"used for reading or writing the archive and how conversion errors are going "
@@ -670,57 +672,57 @@ msgid ""
"ref:`tar-unicode` for in-depth information."
msgstr ""
-#: ../../library/tarfile.rst:425
+#: ../../library/tarfile.rst:426
msgid ""
"The *pax_headers* argument is an optional dictionary of strings which will "
"be added as a pax global header if *format* is :const:`PAX_FORMAT`."
msgstr ""
-#: ../../library/tarfile.rst:428
+#: ../../library/tarfile.rst:429
msgid ""
"If *stream* is set to :const:`True` then while reading the archive info "
"about files in the archive are not cached, saving memory."
msgstr ""
-#: ../../library/tarfile.rst:431 ../../library/tarfile.rst:751
+#: ../../library/tarfile.rst:432 ../../library/tarfile.rst:752
msgid "Use ``'surrogateescape'`` as the default for the *errors* argument."
-msgstr ""
+msgstr "使用 ``'surrogateescape'`` 作為 *errors* 引數的預設值。"
-#: ../../library/tarfile.rst:440
+#: ../../library/tarfile.rst:441
msgid "Add the *stream* parameter."
msgstr "新增 *stream* 參數。"
-#: ../../library/tarfile.rst:445
+#: ../../library/tarfile.rst:446
msgid ""
"Alternative constructor. The :func:`tarfile.open` function is actually a "
"shortcut to this classmethod."
msgstr ""
-#: ../../library/tarfile.rst:451
+#: ../../library/tarfile.rst:452
msgid ""
"Return a :class:`TarInfo` object for member *name*. If *name* can not be "
"found in the archive, :exc:`KeyError` is raised."
msgstr ""
-#: ../../library/tarfile.rst:456
+#: ../../library/tarfile.rst:457
msgid ""
"If a member occurs more than once in the archive, its last occurrence is "
"assumed to be the most up-to-date version."
msgstr ""
-#: ../../library/tarfile.rst:462
+#: ../../library/tarfile.rst:463
msgid ""
"Return the members of the archive as a list of :class:`TarInfo` objects. The "
"list has the same order as the members in the archive."
msgstr ""
-#: ../../library/tarfile.rst:468
+#: ../../library/tarfile.rst:469
msgid ""
"Return the members as a list of their names. It has the same order as the "
"list returned by :meth:`getmembers`."
msgstr ""
-#: ../../library/tarfile.rst:474
+#: ../../library/tarfile.rst:475
msgid ""
"Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, "
"only the names of the members are printed. If it is :const:`True`, output "
@@ -728,18 +730,18 @@ msgid ""
"given, it must be a subset of the list returned by :meth:`getmembers`."
msgstr ""
-#: ../../library/tarfile.rst:479
+#: ../../library/tarfile.rst:480
msgid "Added the *members* parameter."
msgstr "新增 *members* 參數。"
-#: ../../library/tarfile.rst:485
+#: ../../library/tarfile.rst:486
msgid ""
"Return the next member of the archive as a :class:`TarInfo` object, when :"
"class:`TarFile` is opened for reading. Return :const:`None` if there is no "
"more available."
msgstr ""
-#: ../../library/tarfile.rst:492
+#: ../../library/tarfile.rst:493
msgid ""
"Extract all members from the archive to the current working directory or "
"directory *path*. If optional *members* is given, it must be a subset of the "
@@ -751,14 +753,14 @@ msgid ""
"fail."
msgstr ""
-#: ../../library/tarfile.rst:500
+#: ../../library/tarfile.rst:501
msgid ""
"If *numeric_owner* is :const:`True`, the uid and gid numbers from the "
"tarfile are used to set the owner/group for the extracted files. Otherwise, "
"the named values from the tarfile are used."
msgstr ""
-#: ../../library/tarfile.rst:504
+#: ../../library/tarfile.rst:505
msgid ""
"The *filter* argument specifies how ``members`` are modified or rejected "
"before extraction. See :ref:`tarfile-extraction-filter` for details. It is "
@@ -766,7 +768,7 @@ msgid ""
"need to support."
msgstr ""
-#: ../../library/tarfile.rst:512
+#: ../../library/tarfile.rst:513
msgid ""
"Never extract archives from untrusted sources without prior inspection. It "
"is possible that files are created outside of *path*, e.g. members that have "
@@ -774,26 +776,26 @@ msgid ""
"\"``."
msgstr ""
-#: ../../library/tarfile.rst:517 ../../library/tarfile.rst:550
+#: ../../library/tarfile.rst:518 ../../library/tarfile.rst:551
msgid ""
"Set ``filter='data'`` to prevent the most dangerous security issues, and "
"read the :ref:`tarfile-extraction-filter` section for details."
msgstr ""
-#: ../../library/tarfile.rst:520 ../../library/tarfile.rst:556
+#: ../../library/tarfile.rst:521 ../../library/tarfile.rst:557
msgid "Added the *numeric_owner* parameter."
msgstr "新增 *numeric_owner* 參數。"
-#: ../../library/tarfile.rst:523 ../../library/tarfile.rst:559
+#: ../../library/tarfile.rst:524 ../../library/tarfile.rst:560
msgid "The *path* parameter accepts a :term:`path-like object`."
msgstr ""
-#: ../../library/tarfile.rst:526 ../../library/tarfile.rst:562
-#: ../../library/tarfile.rst:644
+#: ../../library/tarfile.rst:527 ../../library/tarfile.rst:563
+#: ../../library/tarfile.rst:645
msgid "Added the *filter* parameter."
msgstr "新增 *filter* 參數。"
-#: ../../library/tarfile.rst:532
+#: ../../library/tarfile.rst:533
msgid ""
"Extract a member from the archive to the current working directory, using "
"its full name. Its file information is extracted as accurately as possible. "
@@ -802,27 +804,27 @@ msgid ""
"File attributes (owner, mtime, mode) are set unless *set_attrs* is false."
msgstr ""
-#: ../../library/tarfile.rst:538
+#: ../../library/tarfile.rst:539
msgid ""
"The *numeric_owner* and *filter* arguments are the same as for :meth:"
"`extractall`."
msgstr ""
-#: ../../library/tarfile.rst:543
+#: ../../library/tarfile.rst:544
msgid ""
"The :meth:`extract` method does not take care of several extraction issues. "
"In most cases you should consider using the :meth:`extractall` method."
msgstr ""
-#: ../../library/tarfile.rst:548
+#: ../../library/tarfile.rst:549
msgid "See the warning for :meth:`extractall`."
msgstr "參閱 :meth:`extractall` 的警告。"
-#: ../../library/tarfile.rst:553
+#: ../../library/tarfile.rst:554
msgid "Added the *set_attrs* parameter."
msgstr "增加 *set_attrs* 參數。"
-#: ../../library/tarfile.rst:568
+#: ../../library/tarfile.rst:569
msgid ""
"Extract a member from the archive as a file object. *member* may be a "
"filename or a :class:`TarInfo` object. If *member* is a regular file or a "
@@ -831,17 +833,17 @@ msgid ""
"the archive, :exc:`KeyError` is raised."
msgstr ""
-#: ../../library/tarfile.rst:574
+#: ../../library/tarfile.rst:575
msgid "Return an :class:`io.BufferedReader` object."
msgstr ""
-#: ../../library/tarfile.rst:577
+#: ../../library/tarfile.rst:578
msgid ""
"The returned :class:`io.BufferedReader` object has the :attr:`!mode` "
"attribute which is always equal to ``'rb'``."
msgstr ""
-#: ../../library/tarfile.rst:584
+#: ../../library/tarfile.rst:585
msgid ""
"If *errorlevel* is ``0``, errors are ignored when using :meth:`TarFile."
"extract` and :meth:`TarFile.extractall`. Nevertheless, they appear as error "
@@ -851,39 +853,39 @@ msgid ""
"exc:`TarError` exceptions as well."
msgstr ""
-#: ../../library/tarfile.rst:592
+#: ../../library/tarfile.rst:593
msgid ""
"Some exceptions, e.g. ones caused by wrong argument types or data "
"corruption, are always raised."
msgstr ""
-#: ../../library/tarfile.rst:595
+#: ../../library/tarfile.rst:596
msgid ""
"Custom :ref:`extraction filters ` should raise :"
"exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* "
"ones."
msgstr ""
-#: ../../library/tarfile.rst:599
+#: ../../library/tarfile.rst:600
msgid ""
"Note that when an exception is raised, the archive may be partially "
"extracted. It is the user’s responsibility to clean up."
msgstr ""
-#: ../../library/tarfile.rst:606
+#: ../../library/tarfile.rst:607
msgid ""
"The :ref:`extraction filter ` used as a default "
"for the *filter* argument of :meth:`~TarFile.extract` and :meth:`~TarFile."
"extractall`."
msgstr ""
-#: ../../library/tarfile.rst:610
+#: ../../library/tarfile.rst:611
msgid ""
"The attribute may be ``None`` or a callable. String names are not allowed "
"for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`."
msgstr ""
-#: ../../library/tarfile.rst:614
+#: ../../library/tarfile.rst:615
msgid ""
"If ``extraction_filter`` is ``None`` (the default), calling an extraction "
"method without a *filter* argument will raise a ``DeprecationWarning``, and "
@@ -891,13 +893,13 @@ msgid ""
"dangerous behavior matches previous versions of Python."
msgstr ""
-#: ../../library/tarfile.rst:620
+#: ../../library/tarfile.rst:621
msgid ""
"In Python 3.14+, leaving ``extraction_filter=None`` will cause extraction "
"methods to use the :func:`data ` filter by default."
msgstr ""
-#: ../../library/tarfile.rst:623
+#: ../../library/tarfile.rst:624
msgid ""
"The attribute may be set on instances or overridden in subclasses. It also "
"is possible to set it on the ``TarFile`` class itself to set a global "
@@ -907,7 +909,7 @@ msgid ""
"wrapped in :func:`staticmethod` to prevent injection of a ``self`` argument."
msgstr ""
-#: ../../library/tarfile.rst:633
+#: ../../library/tarfile.rst:634
msgid ""
"Add the file *name* to the archive. *name* may be any type of file "
"(directory, fifo, symbolic link, etc.). If given, *arcname* specifies an "
@@ -920,11 +922,11 @@ msgid ""
"ref:`tar-examples` for an example."
msgstr ""
-#: ../../library/tarfile.rst:647
+#: ../../library/tarfile.rst:648
msgid "Recursion adds entries in sorted order."
msgstr ""
-#: ../../library/tarfile.rst:653
+#: ../../library/tarfile.rst:654
msgid ""
"Add the :class:`TarInfo` object *tarinfo* to the archive. If *tarinfo* "
"represents a non zero-size regular file, the *fileobj* argument should be a :"
@@ -933,11 +935,11 @@ msgid ""
"meth:`gettarinfo`."
msgstr ""
-#: ../../library/tarfile.rst:660
+#: ../../library/tarfile.rst:661
msgid "*fileobj* must be given for non-zero-sized regular files."
msgstr ""
-#: ../../library/tarfile.rst:665
+#: ../../library/tarfile.rst:666
msgid ""
"Create a :class:`TarInfo` object from the result of :func:`os.stat` or "
"equivalent on an existing file. The file is either named by *name*, or "
@@ -948,7 +950,7 @@ msgid ""
"The name should be a text string."
msgstr ""
-#: ../../library/tarfile.rst:674
+#: ../../library/tarfile.rst:675
msgid ""
"You can modify some of the :class:`TarInfo`’s attributes before you add it "
"using :meth:`addfile`. If the file object is not an ordinary file object "
@@ -958,21 +960,21 @@ msgid ""
"case *arcname* could be a dummy string."
msgstr ""
-#: ../../library/tarfile.rst:688
+#: ../../library/tarfile.rst:689
msgid ""
"Close the :class:`TarFile`. In write mode, two finishing zero blocks are "
"appended to the archive."
msgstr ""
-#: ../../library/tarfile.rst:695
+#: ../../library/tarfile.rst:696
msgid "A dictionary containing key-value pairs of pax global headers."
msgstr ""
-#: ../../library/tarfile.rst:702
+#: ../../library/tarfile.rst:703
msgid "TarInfo Objects"
msgstr "TarInfo 物件"
-#: ../../library/tarfile.rst:704
+#: ../../library/tarfile.rst:705
msgid ""
"A :class:`TarInfo` object represents one member in a :class:`TarFile`. Aside "
"from storing all required attributes of a file (like file type, size, time, "
@@ -980,14 +982,14 @@ msgid ""
"type. It does *not* contain the file's data itself."
msgstr ""
-#: ../../library/tarfile.rst:709
+#: ../../library/tarfile.rst:710
msgid ""
":class:`TarInfo` objects are returned by :class:`TarFile`'s methods :meth:"
"`~TarFile.getmember`, :meth:`~TarFile.getmembers` and :meth:`~TarFile."
"gettarinfo`."
msgstr ""
-#: ../../library/tarfile.rst:713
+#: ../../library/tarfile.rst:714
msgid ""
"Modifying the objects returned by :meth:`~TarFile.getmember` or :meth:"
"`~TarFile.getmembers` will affect all subsequent operations on the archive. "
@@ -996,82 +998,82 @@ msgid ""
"step."
msgstr ""
-#: ../../library/tarfile.rst:719
+#: ../../library/tarfile.rst:720
msgid ""
"Several attributes can be set to ``None`` to indicate that a piece of "
"metadata is unused or unknown. Different :class:`TarInfo` methods handle "
"``None`` differently:"
msgstr ""
-#: ../../library/tarfile.rst:723
+#: ../../library/tarfile.rst:724
msgid ""
"The :meth:`~TarFile.extract` or :meth:`~TarFile.extractall` methods will "
"ignore the corresponding metadata, leaving it set to a default."
msgstr ""
-#: ../../library/tarfile.rst:725
+#: ../../library/tarfile.rst:726
msgid ":meth:`~TarFile.addfile` will fail."
msgstr ""
-#: ../../library/tarfile.rst:726
+#: ../../library/tarfile.rst:727
msgid ":meth:`~TarFile.list` will print a placeholder string."
msgstr ""
-#: ../../library/tarfile.rst:730
+#: ../../library/tarfile.rst:731
msgid "Create a :class:`TarInfo` object."
msgstr ""
-#: ../../library/tarfile.rst:735
+#: ../../library/tarfile.rst:736
msgid "Create and return a :class:`TarInfo` object from string buffer *buf*."
msgstr ""
-#: ../../library/tarfile.rst:737
+#: ../../library/tarfile.rst:738
msgid "Raises :exc:`HeaderError` if the buffer is invalid."
msgstr ""
-#: ../../library/tarfile.rst:742
+#: ../../library/tarfile.rst:743
msgid ""
"Read the next member from the :class:`TarFile` object *tarfile* and return "
"it as a :class:`TarInfo` object."
msgstr ""
-#: ../../library/tarfile.rst:748
+#: ../../library/tarfile.rst:749
msgid ""
"Create a string buffer from a :class:`TarInfo` object. For information on "
"the arguments see the constructor of the :class:`TarFile` class."
msgstr ""
-#: ../../library/tarfile.rst:755
+#: ../../library/tarfile.rst:756
msgid "A ``TarInfo`` object has the following public data attributes:"
-msgstr ""
+msgstr "一個 ``TarInfo`` 物件具有以下公開資料屬性:"
-#: ../../library/tarfile.rst:761
+#: ../../library/tarfile.rst:762
msgid "Name of the archive member."
msgstr ""
-#: ../../library/tarfile.rst:767
+#: ../../library/tarfile.rst:768
msgid "Size in bytes."
msgstr ""
-#: ../../library/tarfile.rst:773
+#: ../../library/tarfile.rst:774
msgid ""
"Time of last modification in seconds since the :ref:`epoch `, as in :"
"attr:`os.stat_result.st_mtime`."
msgstr ""
-#: ../../library/tarfile.rst:778 ../../library/tarfile.rst:789
-#: ../../library/tarfile.rst:821 ../../library/tarfile.rst:832
-#: ../../library/tarfile.rst:843 ../../library/tarfile.rst:854
+#: ../../library/tarfile.rst:779 ../../library/tarfile.rst:790
+#: ../../library/tarfile.rst:822 ../../library/tarfile.rst:833
+#: ../../library/tarfile.rst:844 ../../library/tarfile.rst:855
msgid ""
"Can be set to ``None`` for :meth:`~TarFile.extract` and :meth:`~TarFile."
"extractall`, causing extraction to skip applying this attribute."
msgstr ""
-#: ../../library/tarfile.rst:785
+#: ../../library/tarfile.rst:786
msgid "Permission bits, as for :func:`os.chmod`."
msgstr ""
-#: ../../library/tarfile.rst:795
+#: ../../library/tarfile.rst:796
msgid ""
"File type. *type* is usually one of these constants: :const:`REGTYPE`, :"
"const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`, :"
@@ -1080,128 +1082,128 @@ msgid ""
"more conveniently, use the ``is*()`` methods below."
msgstr ""
-#: ../../library/tarfile.rst:805
+#: ../../library/tarfile.rst:806
msgid ""
"Name of the target file name, which is only present in :class:`TarInfo` "
"objects of type :const:`LNKTYPE` and :const:`SYMTYPE`."
msgstr ""
-#: ../../library/tarfile.rst:808
+#: ../../library/tarfile.rst:809
msgid ""
"For symbolic links (``SYMTYPE``), the *linkname* is relative to the "
"directory that contains the link. For hard links (``LNKTYPE``), the "
"*linkname* is relative to the root of the archive."
msgstr ""
-#: ../../library/tarfile.rst:817
+#: ../../library/tarfile.rst:818
msgid "User ID of the user who originally stored this member."
msgstr ""
-#: ../../library/tarfile.rst:828
+#: ../../library/tarfile.rst:829
msgid "Group ID of the user who originally stored this member."
msgstr ""
-#: ../../library/tarfile.rst:839
+#: ../../library/tarfile.rst:840
msgid "User name."
msgstr ""
-#: ../../library/tarfile.rst:850
+#: ../../library/tarfile.rst:851
msgid "Group name."
msgstr ""
-#: ../../library/tarfile.rst:861
+#: ../../library/tarfile.rst:862
msgid "Header checksum."
msgstr ""
-#: ../../library/tarfile.rst:867
+#: ../../library/tarfile.rst:868
msgid "Device major number."
msgstr ""
-#: ../../library/tarfile.rst:873
+#: ../../library/tarfile.rst:874
msgid "Device minor number."
msgstr ""
-#: ../../library/tarfile.rst:879
+#: ../../library/tarfile.rst:880
msgid "The tar header starts here."
msgstr ""
-#: ../../library/tarfile.rst:885
+#: ../../library/tarfile.rst:886
msgid "The file's data starts here."
msgstr ""
-#: ../../library/tarfile.rst:890
+#: ../../library/tarfile.rst:891
msgid "Sparse member information."
msgstr ""
-#: ../../library/tarfile.rst:896
+#: ../../library/tarfile.rst:897
msgid ""
"A dictionary containing key-value pairs of an associated pax extended header."
msgstr ""
-#: ../../library/tarfile.rst:904
+#: ../../library/tarfile.rst:905
msgid ""
"Return a *new* copy of the :class:`!TarInfo` object with the given "
"attributes changed. For example, to return a ``TarInfo`` with the group name "
"set to ``'staff'``, use::"
msgstr ""
-#: ../../library/tarfile.rst:908
+#: ../../library/tarfile.rst:909
msgid "new_tarinfo = old_tarinfo.replace(gname='staff')"
msgstr "new_tarinfo = old_tarinfo.replace(gname='staff')"
-#: ../../library/tarfile.rst:910
+#: ../../library/tarfile.rst:911
msgid ""
"By default, a deep copy is made. If *deep* is false, the copy is shallow, i."
"e. ``pax_headers`` and any custom attributes are shared with the original "
"``TarInfo`` object."
msgstr ""
-#: ../../library/tarfile.rst:914
+#: ../../library/tarfile.rst:915
msgid "A :class:`TarInfo` object also provides some convenient query methods:"
msgstr ""
-#: ../../library/tarfile.rst:919
+#: ../../library/tarfile.rst:920
msgid "Return :const:`True` if the :class:`TarInfo` object is a regular file."
msgstr ""
-#: ../../library/tarfile.rst:924
+#: ../../library/tarfile.rst:925
msgid "Same as :meth:`isfile`."
msgstr ""
-#: ../../library/tarfile.rst:929
+#: ../../library/tarfile.rst:930
msgid "Return :const:`True` if it is a directory."
-msgstr ""
+msgstr "如果它是一個目錄,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:934
+#: ../../library/tarfile.rst:935
msgid "Return :const:`True` if it is a symbolic link."
-msgstr ""
+msgstr "如果它是一個符號連結,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:939
+#: ../../library/tarfile.rst:940
msgid "Return :const:`True` if it is a hard link."
msgstr ""
-#: ../../library/tarfile.rst:944
+#: ../../library/tarfile.rst:945
msgid "Return :const:`True` if it is a character device."
-msgstr ""
+msgstr "如果它是一個字元裝置,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:949
+#: ../../library/tarfile.rst:950
msgid "Return :const:`True` if it is a block device."
-msgstr ""
+msgstr "如果它是一個區塊裝置,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:954
+#: ../../library/tarfile.rst:955
msgid "Return :const:`True` if it is a FIFO."
-msgstr ""
+msgstr "如果它是一個 FIFO,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:959
+#: ../../library/tarfile.rst:960
msgid ""
"Return :const:`True` if it is one of character device, block device or FIFO."
-msgstr ""
+msgstr "如果它是一個字元裝置、區塊裝置或 FIFO,則回傳 :const:`True`。"
-#: ../../library/tarfile.rst:965
+#: ../../library/tarfile.rst:966
msgid "Extraction filters"
msgstr ""
-#: ../../library/tarfile.rst:969
+#: ../../library/tarfile.rst:970
msgid ""
"The *tar* format is designed to capture all details of a UNIX-like "
"filesystem, which makes it very powerful. Unfortunately, the features make "
@@ -1211,66 +1213,66 @@ msgid ""
"components, or symlinks that affect later members)."
msgstr ""
-#: ../../library/tarfile.rst:977
+#: ../../library/tarfile.rst:978
msgid ""
"In most cases, the full functionality is not needed. Therefore, *tarfile* "
"supports extraction filters: a mechanism to limit functionality, and thus "
"mitigate some of the security issues."
msgstr ""
-#: ../../library/tarfile.rst:983
+#: ../../library/tarfile.rst:984
msgid ":pep:`706`"
msgstr ":pep:`706`"
-#: ../../library/tarfile.rst:984
+#: ../../library/tarfile.rst:985
msgid "Contains further motivation and rationale behind the design."
msgstr ""
-#: ../../library/tarfile.rst:986
+#: ../../library/tarfile.rst:987
msgid ""
"The *filter* argument to :meth:`TarFile.extract` or :meth:`~TarFile."
"extractall` can be:"
msgstr ""
-#: ../../library/tarfile.rst:989
+#: ../../library/tarfile.rst:990
msgid ""
"the string ``'fully_trusted'``: Honor all metadata as specified in the "
"archive. Should be used if the user trusts the archive completely, or "
"implements their own complex verification."
msgstr ""
-#: ../../library/tarfile.rst:994
+#: ../../library/tarfile.rst:995
msgid ""
"the string ``'tar'``: Honor most *tar*-specific features (i.e. features of "
"UNIX-like filesystems), but block features that are very likely to be "
"surprising or malicious. See :func:`tar_filter` for details."
msgstr ""
-#: ../../library/tarfile.rst:998
+#: ../../library/tarfile.rst:999
msgid ""
"the string ``'data'``: Ignore or block most features specific to UNIX-like "
"filesystems. Intended for extracting cross-platform data archives. See :func:"
"`data_filter` for details."
msgstr ""
-#: ../../library/tarfile.rst:1002
+#: ../../library/tarfile.rst:1003
msgid "``None`` (default): Use :attr:`TarFile.extraction_filter`."
msgstr ""
-#: ../../library/tarfile.rst:1004
+#: ../../library/tarfile.rst:1005
msgid ""
"If that is also ``None`` (the default), raise a ``DeprecationWarning``, and "
"fall back to the ``'fully_trusted'`` filter, whose dangerous behavior "
"matches previous versions of Python."
msgstr ""
-#: ../../library/tarfile.rst:1008
+#: ../../library/tarfile.rst:1009
msgid ""
"In Python 3.14, the ``'data'`` filter will become the default instead. It's "
"possible to switch earlier; see :attr:`TarFile.extraction_filter`."
msgstr ""
-#: ../../library/tarfile.rst:1011
+#: ../../library/tarfile.rst:1012
msgid ""
"A callable which will be called for each extracted member with a :ref:"
"`TarInfo ` describing the member and the destination path "
@@ -1278,27 +1280,27 @@ msgid ""
"members)::"
msgstr ""
-#: ../../library/tarfile.rst:1016
+#: ../../library/tarfile.rst:1017
msgid "filter(member: TarInfo, path: str, /) -> TarInfo | None"
msgstr "filter(member: TarInfo, path: str, /) -> TarInfo | None"
-#: ../../library/tarfile.rst:1018
+#: ../../library/tarfile.rst:1019
msgid ""
"The callable is called just before each member is extracted, so it can take "
"the current state of the disk into account. It can:"
msgstr ""
-#: ../../library/tarfile.rst:1022
+#: ../../library/tarfile.rst:1023
msgid ""
"return a :class:`TarInfo` object which will be used instead of the metadata "
"in the archive, or"
msgstr ""
-#: ../../library/tarfile.rst:1024
+#: ../../library/tarfile.rst:1025
msgid "return ``None``, in which case the member will be skipped, or"
msgstr ""
-#: ../../library/tarfile.rst:1025
+#: ../../library/tarfile.rst:1026
msgid ""
"raise an exception to abort the operation or skip the member, depending on :"
"attr:`~TarFile.errorlevel`. Note that when extraction is aborted, :meth:"
@@ -1306,62 +1308,62 @@ msgid ""
"attempt to clean up."
msgstr ""
-#: ../../library/tarfile.rst:1031
+#: ../../library/tarfile.rst:1032
msgid "Default named filters"
msgstr ""
-#: ../../library/tarfile.rst:1033
+#: ../../library/tarfile.rst:1034
msgid ""
"The pre-defined, named filters are available as functions, so they can be "
"reused in custom filters:"
msgstr ""
-#: ../../library/tarfile.rst:1038
+#: ../../library/tarfile.rst:1039
msgid "Return *member* unchanged."
msgstr ""
-#: ../../library/tarfile.rst:1040
+#: ../../library/tarfile.rst:1041
msgid "This implements the ``'fully_trusted'`` filter."
msgstr ""
-#: ../../library/tarfile.rst:1044
+#: ../../library/tarfile.rst:1045
msgid "Implements the ``'tar'`` filter."
msgstr ""
-#: ../../library/tarfile.rst:1046
+#: ../../library/tarfile.rst:1047
msgid "Strip leading slashes (``/`` and :data:`os.sep`) from filenames."
msgstr ""
-#: ../../library/tarfile.rst:1047
+#: ../../library/tarfile.rst:1048
msgid ""
":ref:`Refuse ` to extract files with absolute "
"paths (in case the name is absolute even after stripping slashes, e.g. ``C:/"
"foo`` on Windows). This raises :class:`~tarfile.AbsolutePathError`."
msgstr ""
-#: ../../library/tarfile.rst:1051
+#: ../../library/tarfile.rst:1052
msgid ""
":ref:`Refuse ` to extract files whose absolute "
"path (after following symlinks) would end up outside the destination. This "
"raises :class:`~tarfile.OutsideDestinationError`."
msgstr ""
-#: ../../library/tarfile.rst:1054
+#: ../../library/tarfile.rst:1055
msgid ""
"Clear high mode bits (setuid, setgid, sticky) and group/other write bits (:"
"const:`~stat.S_IWGRP` | :const:`~stat.S_IWOTH`)."
msgstr ""
-#: ../../library/tarfile.rst:1057 ../../library/tarfile.rst:1096
+#: ../../library/tarfile.rst:1058 ../../library/tarfile.rst:1097
msgid "Return the modified ``TarInfo`` member."
msgstr ""
-#: ../../library/tarfile.rst:1061
+#: ../../library/tarfile.rst:1062
msgid ""
"Implements the ``'data'`` filter. In addition to what ``tar_filter`` does:"
msgstr ""
-#: ../../library/tarfile.rst:1064
+#: ../../library/tarfile.rst:1065
msgid ""
"Normalize link targets (:attr:`TarInfo.linkname`) using :func:`os.path."
"normpath`. Note that this removes internal ``..`` components, which may "
@@ -1369,67 +1371,67 @@ msgid ""
"traverses symbolic links."
msgstr ""
-#: ../../library/tarfile.rst:1070
+#: ../../library/tarfile.rst:1071
msgid ""
":ref:`Refuse ` to extract links (hard or soft) "
"that link to absolute paths, or ones that link outside the destination."
msgstr ""
-#: ../../library/tarfile.rst:1073
+#: ../../library/tarfile.rst:1074
msgid ""
"This raises :class:`~tarfile.AbsoluteLinkError` or :class:`~tarfile."
"LinkOutsideDestinationError`."
msgstr ""
-#: ../../library/tarfile.rst:1076
+#: ../../library/tarfile.rst:1077
msgid ""
"Note that such files are refused even on platforms that do not support "
"symbolic links."
msgstr ""
-#: ../../library/tarfile.rst:1079
+#: ../../library/tarfile.rst:1080
msgid ""
":ref:`Refuse ` to extract device files (including "
"pipes). This raises :class:`~tarfile.SpecialFileError`."
msgstr ""
-#: ../../library/tarfile.rst:1083
+#: ../../library/tarfile.rst:1084
msgid "For regular files, including hard links:"
msgstr ""
-#: ../../library/tarfile.rst:1085
+#: ../../library/tarfile.rst:1086
msgid ""
"Set the owner read and write permissions (:const:`~stat.S_IRUSR` | :const:"
"`~stat.S_IWUSR`)."
msgstr ""
-#: ../../library/tarfile.rst:1087
+#: ../../library/tarfile.rst:1088
msgid ""
"Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :"
"const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`)."
msgstr ""
-#: ../../library/tarfile.rst:1091
+#: ../../library/tarfile.rst:1092
msgid ""
"For other files (directories), set ``mode`` to ``None``, so that extraction "
"methods skip applying permission bits."
msgstr ""
-#: ../../library/tarfile.rst:1093
+#: ../../library/tarfile.rst:1094
msgid ""
"Set user and group info (``uid``, ``gid``, ``uname``, ``gname``) to "
"``None``, so that extraction methods skip setting it."
msgstr ""
-#: ../../library/tarfile.rst:1100
+#: ../../library/tarfile.rst:1101
msgid "Link targets are now normalized."
msgstr ""
-#: ../../library/tarfile.rst:1106
+#: ../../library/tarfile.rst:1107
msgid "Filter errors"
msgstr ""
-#: ../../library/tarfile.rst:1108
+#: ../../library/tarfile.rst:1109
msgid ""
"When a filter refuses to extract a file, it will raise an appropriate "
"exception, a subclass of :class:`~tarfile.FilterError`. This will abort the "
@@ -1438,11 +1440,11 @@ msgid ""
"continue."
msgstr ""
-#: ../../library/tarfile.rst:1116
+#: ../../library/tarfile.rst:1117
msgid "Hints for further verification"
msgstr ""
-#: ../../library/tarfile.rst:1118
+#: ../../library/tarfile.rst:1119
msgid ""
"Even with ``filter='data'``, *tarfile* is not suited for extracting "
"untrusted files without prior inspection. Among other issues, the pre-"
@@ -1450,73 +1452,73 @@ msgid ""
"additional checks."
msgstr ""
-#: ../../library/tarfile.rst:1123
+#: ../../library/tarfile.rst:1124
msgid "Here is an incomplete list of things to consider:"
msgstr ""
-#: ../../library/tarfile.rst:1125
+#: ../../library/tarfile.rst:1126
msgid ""
"Extract to a :func:`new temporary directory ` to prevent e."
"g. exploiting pre-existing links, and to make it easier to clean up after a "
"failed extraction."
msgstr ""
-#: ../../library/tarfile.rst:1128
+#: ../../library/tarfile.rst:1129
msgid "Disallow symbolic links if you do not need the functionality."
msgstr ""
-#: ../../library/tarfile.rst:1129
+#: ../../library/tarfile.rst:1130
msgid ""
"When working with untrusted data, use external (e.g. OS-level) limits on "
"disk, memory and CPU usage."
msgstr ""
-#: ../../library/tarfile.rst:1131
+#: ../../library/tarfile.rst:1132
msgid ""
"Check filenames against an allow-list of characters (to filter out control "
"characters, confusables, foreign path separators, etc.)."
msgstr ""
-#: ../../library/tarfile.rst:1134
+#: ../../library/tarfile.rst:1135
msgid ""
"Check that filenames have expected extensions (discouraging files that "
"execute when you “click on them”, or extension-less files like Windows "
"special device names)."
msgstr ""
-#: ../../library/tarfile.rst:1136
+#: ../../library/tarfile.rst:1137
msgid ""
"Limit the number of extracted files, total size of extracted data, filename "
"length (including symlink length), and size of individual files."
msgstr ""
-#: ../../library/tarfile.rst:1138
+#: ../../library/tarfile.rst:1139
msgid "Check for files that would be shadowed on case-insensitive filesystems."
msgstr ""
-#: ../../library/tarfile.rst:1140
+#: ../../library/tarfile.rst:1141
msgid "Also note that:"
msgstr ""
-#: ../../library/tarfile.rst:1142
+#: ../../library/tarfile.rst:1143
msgid ""
"Tar files may contain multiple versions of the same file. Later ones are "
"expected to overwrite any earlier ones. This feature is crucial to allow "
"updating tape archives, but can be abused maliciously."
msgstr ""
-#: ../../library/tarfile.rst:1146
+#: ../../library/tarfile.rst:1147
msgid ""
"*tarfile* does not protect against issues with “live” data, e.g. an attacker "
"tinkering with the destination (or source) directory while extraction (or "
"archiving) is in progress."
msgstr ""
-#: ../../library/tarfile.rst:1152
+#: ../../library/tarfile.rst:1153
msgid "Supporting older Python versions"
msgstr ""
-#: ../../library/tarfile.rst:1154
+#: ../../library/tarfile.rst:1155
msgid ""
"Extraction filters were added to Python 3.12, but may be backported to older "
"versions as security updates. To check whether the feature is available, use "
@@ -1524,18 +1526,18 @@ msgid ""
"version."
msgstr ""
-#: ../../library/tarfile.rst:1159
+#: ../../library/tarfile.rst:1160
msgid ""
"The following examples show how to support Python versions with and without "
"the feature. Note that setting ``extraction_filter`` will affect any "
"subsequent operations."
msgstr ""
-#: ../../library/tarfile.rst:1163
+#: ../../library/tarfile.rst:1164
msgid "Fully trusted archive::"
msgstr ""
-#: ../../library/tarfile.rst:1165
+#: ../../library/tarfile.rst:1166
msgid ""
"my_tarfile.extraction_filter = (lambda member, path: member)\n"
"my_tarfile.extractall()"
@@ -1543,13 +1545,13 @@ msgstr ""
"my_tarfile.extraction_filter = (lambda member, path: member)\n"
"my_tarfile.extractall()"
-#: ../../library/tarfile.rst:1168
+#: ../../library/tarfile.rst:1169
msgid ""
"Use the ``'data'`` filter if available, but revert to Python 3.11 behavior "
"(``'fully_trusted'``) if this feature is not available::"
msgstr ""
-#: ../../library/tarfile.rst:1171
+#: ../../library/tarfile.rst:1172
msgid ""
"my_tarfile.extraction_filter = getattr(tarfile, 'data_filter',\n"
" (lambda member, path: member))\n"
@@ -1559,19 +1561,19 @@ msgstr ""
" (lambda member, path: member))\n"
"my_tarfile.extractall()"
-#: ../../library/tarfile.rst:1175
+#: ../../library/tarfile.rst:1176
msgid "Use the ``'data'`` filter; *fail* if it is not available::"
msgstr ""
-#: ../../library/tarfile.rst:1177
+#: ../../library/tarfile.rst:1178
msgid "my_tarfile.extractall(filter=tarfile.data_filter)"
msgstr "my_tarfile.extractall(filter=tarfile.data_filter)"
-#: ../../library/tarfile.rst:1179
+#: ../../library/tarfile.rst:1180
msgid "or::"
msgstr "或: ::"
-#: ../../library/tarfile.rst:1181
+#: ../../library/tarfile.rst:1182
msgid ""
"my_tarfile.extraction_filter = tarfile.data_filter\n"
"my_tarfile.extractall()"
@@ -1579,11 +1581,11 @@ msgstr ""
"my_tarfile.extraction_filter = tarfile.data_filter\n"
"my_tarfile.extractall()"
-#: ../../library/tarfile.rst:1184
+#: ../../library/tarfile.rst:1185
msgid "Use the ``'data'`` filter; *warn* if it is not available::"
msgstr ""
-#: ../../library/tarfile.rst:1186
+#: ../../library/tarfile.rst:1187
msgid ""
"if hasattr(tarfile, 'data_filter'):\n"
" my_tarfile.extractall(filter='data')\n"
@@ -1592,19 +1594,25 @@ msgid ""
" warn_the_user('Extracting may be unsafe; consider updating Python')\n"
" my_tarfile.extractall()"
msgstr ""
+"if hasattr(tarfile, 'data_filter'):\n"
+" my_tarfile.extractall(filter='data')\n"
+"else:\n"
+" # 當不再需要時移除它\n"
+" warn_the_user('Extracting may be unsafe; consider updating Python')\n"
+" my_tarfile.extractall()"
-#: ../../library/tarfile.rst:1195
+#: ../../library/tarfile.rst:1196
msgid "Stateful extraction filter example"
msgstr ""
-#: ../../library/tarfile.rst:1197
+#: ../../library/tarfile.rst:1198
msgid ""
"While *tarfile*'s extraction methods take a simple *filter* callable, custom "
"filters may be more complex objects with an internal state. It may be useful "
"to write these as context managers, to be used like this::"
msgstr ""
-#: ../../library/tarfile.rst:1201
+#: ../../library/tarfile.rst:1202
msgid ""
"with StatefulFilter() as filter_func:\n"
" tar.extractall(path, filter=filter_func)"
@@ -1612,11 +1620,11 @@ msgstr ""
"with StatefulFilter() as filter_func:\n"
" tar.extractall(path, filter=filter_func)"
-#: ../../library/tarfile.rst:1204
+#: ../../library/tarfile.rst:1205
msgid "Such a filter can be written as, for example::"
msgstr ""
-#: ../../library/tarfile.rst:1206
+#: ../../library/tarfile.rst:1207
msgid ""
"class StatefulFilter:\n"
" def __init__(self):\n"
@@ -1632,104 +1640,117 @@ msgid ""
" def __exit__(self, *exc_info):\n"
" print(f'{self.file_count} files extracted')"
msgstr ""
+"class StatefulFilter:\n"
+" def __init__(self):\n"
+" self.file_count = 0\n"
+"\n"
+" def __enter__(self):\n"
+" return self\n"
+"\n"
+" def __call__(self, member, path):\n"
+" self.file_count += 1\n"
+" return member\n"
+"\n"
+" def __exit__(self, *exc_info):\n"
+" print(f'{self.file_count} files extracted')"
-#: ../../library/tarfile.rst:1226
+#: ../../library/tarfile.rst:1227
msgid "Command-Line Interface"
-msgstr ""
+msgstr "命令列介面"
-#: ../../library/tarfile.rst:1230
+#: ../../library/tarfile.rst:1231
msgid ""
"The :mod:`tarfile` module provides a simple command-line interface to "
"interact with tar archives."
msgstr ""
-#: ../../library/tarfile.rst:1233
+#: ../../library/tarfile.rst:1234
msgid ""
"If you want to create a new tar archive, specify its name after the :option:"
"`-c` option and then list the filename(s) that should be included:"
msgstr ""
-#: ../../library/tarfile.rst:1236
+#: ../../library/tarfile.rst:1237
msgid "$ python -m tarfile -c monty.tar spam.txt eggs.txt"
msgstr "$ python -m tarfile -c monty.tar spam.txt eggs.txt"
-#: ../../library/tarfile.rst:1240
+#: ../../library/tarfile.rst:1241
msgid "Passing a directory is also acceptable:"
msgstr ""
-#: ../../library/tarfile.rst:1242
+#: ../../library/tarfile.rst:1243
msgid "$ python -m tarfile -c monty.tar life-of-brian_1979/"
msgstr "$ python -m tarfile -c monty.tar life-of-brian_1979/"
-#: ../../library/tarfile.rst:1246
+#: ../../library/tarfile.rst:1247
msgid ""
"If you want to extract a tar archive into the current directory, use the :"
"option:`-e` option:"
msgstr ""
-#: ../../library/tarfile.rst:1249
+#: ../../library/tarfile.rst:1250
msgid "$ python -m tarfile -e monty.tar"
msgstr "$ python -m tarfile -e monty.tar"
-#: ../../library/tarfile.rst:1253
+#: ../../library/tarfile.rst:1254
msgid ""
"You can also extract a tar archive into a different directory by passing the "
"directory's name:"
msgstr ""
-#: ../../library/tarfile.rst:1256
+#: ../../library/tarfile.rst:1257
msgid "$ python -m tarfile -e monty.tar other-dir/"
msgstr "$ python -m tarfile -e monty.tar other-dir/"
-#: ../../library/tarfile.rst:1260
+#: ../../library/tarfile.rst:1261
msgid "For a list of the files in a tar archive, use the :option:`-l` option:"
msgstr ""
-#: ../../library/tarfile.rst:1262
+#: ../../library/tarfile.rst:1263
msgid "$ python -m tarfile -l monty.tar"
msgstr "$ python -m tarfile -l monty.tar"
-#: ../../library/tarfile.rst:1268
+#: ../../library/tarfile.rst:1269
msgid "Command-line options"
msgstr "命令列選項"
-#: ../../library/tarfile.rst:1273
+#: ../../library/tarfile.rst:1274
msgid "List files in a tarfile."
msgstr ""
-#: ../../library/tarfile.rst:1278
+#: ../../library/tarfile.rst:1279
msgid "Create tarfile from source files."
msgstr ""
-#: ../../library/tarfile.rst:1283
+#: ../../library/tarfile.rst:1284
msgid ""
"Extract tarfile into the current directory if *output_dir* is not specified."
msgstr ""
-#: ../../library/tarfile.rst:1288
+#: ../../library/tarfile.rst:1289
msgid "Test whether the tarfile is valid or not."
msgstr ""
-#: ../../library/tarfile.rst:1292
+#: ../../library/tarfile.rst:1293
msgid "Verbose output."
msgstr ""
-#: ../../library/tarfile.rst:1296
+#: ../../library/tarfile.rst:1297
msgid ""
"Specifies the *filter* for ``--extract``. See :ref:`tarfile-extraction-"
"filter` for details. Only string names are accepted (that is, "
"``fully_trusted``, ``tar``, and ``data``)."
msgstr ""
-#: ../../library/tarfile.rst:1304
+#: ../../library/tarfile.rst:1305
msgid "Examples"
msgstr "範例"
-#: ../../library/tarfile.rst:1306
+#: ../../library/tarfile.rst:1307
msgid "How to extract an entire tar archive to the current working directory::"
msgstr ""
-#: ../../library/tarfile.rst:1308
+#: ../../library/tarfile.rst:1309
msgid ""
"import tarfile\n"
"tar = tarfile.open(\"sample.tar.gz\")\n"
@@ -1741,13 +1762,13 @@ msgstr ""
"tar.extractall(filter='data')\n"
"tar.close()"
-#: ../../library/tarfile.rst:1313
+#: ../../library/tarfile.rst:1314
msgid ""
"How to extract a subset of a tar archive with :meth:`TarFile.extractall` "
"using a generator function instead of a list::"
msgstr ""
-#: ../../library/tarfile.rst:1316
+#: ../../library/tarfile.rst:1317
msgid ""
"import os\n"
"import tarfile\n"
@@ -1773,11 +1794,11 @@ msgstr ""
"tar.extractall(members=py_files(tar))\n"
"tar.close()"
-#: ../../library/tarfile.rst:1328
+#: ../../library/tarfile.rst:1329
msgid "How to create an uncompressed tar archive from a list of filenames::"
msgstr ""
-#: ../../library/tarfile.rst:1330
+#: ../../library/tarfile.rst:1331
msgid ""
"import tarfile\n"
"tar = tarfile.open(\"sample.tar\", \"w\")\n"
@@ -1791,11 +1812,11 @@ msgstr ""
" tar.add(name)\n"
"tar.close()"
-#: ../../library/tarfile.rst:1336
+#: ../../library/tarfile.rst:1337
msgid "The same example using the :keyword:`with` statement::"
msgstr ""
-#: ../../library/tarfile.rst:1338
+#: ../../library/tarfile.rst:1339
msgid ""
"import tarfile\n"
"with tarfile.open(\"sample.tar\", \"w\") as tar:\n"
@@ -1807,13 +1828,13 @@ msgstr ""
" for name in [\"foo\", \"bar\", \"quux\"]:\n"
" tar.add(name)"
-#: ../../library/tarfile.rst:1343
+#: ../../library/tarfile.rst:1344
msgid ""
"How to read a gzip compressed tar archive and display some member "
"information::"
msgstr ""
-#: ../../library/tarfile.rst:1345
+#: ../../library/tarfile.rst:1346
msgid ""
"import tarfile\n"
"tar = tarfile.open(\"sample.tar.gz\", \"r:gz\")\n"
@@ -1829,13 +1850,13 @@ msgid ""
"tar.close()"
msgstr ""
-#: ../../library/tarfile.rst:1357
+#: ../../library/tarfile.rst:1358
msgid ""
"How to create an archive and reset the user information using the *filter* "
"parameter in :meth:`TarFile.add`::"
msgstr ""
-#: ../../library/tarfile.rst:1360
+#: ../../library/tarfile.rst:1361
msgid ""
"import tarfile\n"
"def reset(tarinfo):\n"
@@ -1855,17 +1876,17 @@ msgstr ""
"tar.add(\"foo\", filter=reset)\n"
"tar.close()"
-#: ../../library/tarfile.rst:1373
+#: ../../library/tarfile.rst:1374
msgid "Supported tar formats"
msgstr ""
-#: ../../library/tarfile.rst:1375
+#: ../../library/tarfile.rst:1376
msgid ""
"There are three tar formats that can be created with the :mod:`tarfile` "
"module:"
msgstr ""
-#: ../../library/tarfile.rst:1377
+#: ../../library/tarfile.rst:1378
msgid ""
"The POSIX.1-1988 ustar format (:const:`USTAR_FORMAT`). It supports filenames "
"up to a length of at best 256 characters and linknames up to 100 characters. "
@@ -1873,7 +1894,7 @@ msgid ""
"supported format."
msgstr ""
-#: ../../library/tarfile.rst:1382
+#: ../../library/tarfile.rst:1383
msgid ""
"The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and "
"linknames, files bigger than 8 GiB and sparse files. It is the de facto "
@@ -1881,7 +1902,7 @@ msgid ""
"extensions for long names, sparse file support is read-only."
msgstr ""
-#: ../../library/tarfile.rst:1387
+#: ../../library/tarfile.rst:1388
msgid ""
"The POSIX.1-2001 pax format (:const:`PAX_FORMAT`). It is the most flexible "
"format with virtually no limits. It supports long filenames and linknames, "
@@ -1892,7 +1913,7 @@ msgid ""
"*ustar* format. It is the current default format for new archives."
msgstr ""
-#: ../../library/tarfile.rst:1395
+#: ../../library/tarfile.rst:1396
msgid ""
"It extends the existing *ustar* format with extra headers for information "
"that cannot be stored otherwise. There are two flavours of pax headers: "
@@ -1901,13 +1922,13 @@ msgid ""
"in a pax header is encoded in *UTF-8* for portability reasons."
msgstr ""
-#: ../../library/tarfile.rst:1401
+#: ../../library/tarfile.rst:1402
msgid ""
"There are some more variants of the tar format which can be read, but not "
"created:"
msgstr ""
-#: ../../library/tarfile.rst:1404
+#: ../../library/tarfile.rst:1405
msgid ""
"The ancient V7 format. This is the first tar format from Unix Seventh "
"Edition, storing only regular files and directories. Names must not be "
@@ -1916,17 +1937,17 @@ msgid ""
"ASCII characters."
msgstr ""
-#: ../../library/tarfile.rst:1409
+#: ../../library/tarfile.rst:1410
msgid ""
"The SunOS tar extended format. This format is a variant of the POSIX.1-2001 "
"pax format, but is not compatible."
msgstr ""
-#: ../../library/tarfile.rst:1415
+#: ../../library/tarfile.rst:1416
msgid "Unicode issues"
msgstr ""
-#: ../../library/tarfile.rst:1417
+#: ../../library/tarfile.rst:1418
msgid ""
"The tar format was originally conceived to make backups on tape drives with "
"the main focus on preserving file system information. Nowadays tar archives "
@@ -1941,13 +1962,13 @@ msgid ""
"It stores non-ASCII metadata using the universal character encoding *UTF-8*."
msgstr ""
-#: ../../library/tarfile.rst:1429
+#: ../../library/tarfile.rst:1430
msgid ""
"The details of character conversion in :mod:`tarfile` are controlled by the "
"*encoding* and *errors* keyword arguments of the :class:`TarFile` class."
msgstr ""
-#: ../../library/tarfile.rst:1432
+#: ../../library/tarfile.rst:1433
msgid ""
"*encoding* defines the character encoding to use for the metadata in the "
"archive. The default value is :func:`sys.getfilesystemencoding` or "
@@ -1956,7 +1977,7 @@ msgid ""
"not set appropriately, this conversion may fail."
msgstr ""
-#: ../../library/tarfile.rst:1438
+#: ../../library/tarfile.rst:1439
msgid ""
"The *errors* argument defines how characters are treated that cannot be "
"converted. Possible values are listed in section :ref:`error-handlers`. The "
@@ -1964,10 +1985,16 @@ msgid ""
"system calls, see :ref:`os-filenames`."
msgstr ""
-#: ../../library/tarfile.rst:1443
+#: ../../library/tarfile.rst:1444
msgid ""
"For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not "
"needed because all the metadata is stored using *UTF-8*. *encoding* is only "
"used in the rare cases when binary pax headers are decoded or when strings "
"with surrogate characters are stored."
msgstr ""
+
+#~ msgid "``'a' or 'a:'``"
+#~ msgstr "``'a' 或 'a:'``"
+
+#~ msgid "``'w' or 'w:'``"
+#~ msgstr "``'w' 或 'w:'``"
diff --git a/library/telnetlib.po b/library/telnetlib.po
index cd0b4c26d3..0888e99945 100644
--- a/library/telnetlib.po
+++ b/library/telnetlib.po
@@ -18,7 +18,7 @@ msgstr ""
#: ../../library/telnetlib.rst:2
msgid ":mod:`!telnetlib` --- Telnet client"
-msgstr ":mod:`!telnetlib` --- Telnet 客戶端"
+msgstr ":mod:`!telnetlib` --- Telnet 用戶端"
#: ../../library/telnetlib.rst:10
msgid ""
diff --git a/library/termios.po b/library/termios.po
index 20ce680561..8d743a5164 100644
--- a/library/termios.po
+++ b/library/termios.po
@@ -32,7 +32,7 @@ msgstr ""
#: ../../library/termios.rst:19
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/termios.rst:21
msgid ""
@@ -51,7 +51,7 @@ msgstr ""
#: ../../library/termios.rst:30
msgid "The module defines the following functions:"
-msgstr ""
+msgstr "此模組定義了以下函式:"
#: ../../library/termios.rst:35
msgid ""
diff --git a/library/test.po b/library/test.po
index e0fe8b9e31..77d4a423c3 100644
--- a/library/test.po
+++ b/library/test.po
@@ -501,7 +501,7 @@ msgstr ""
#: ../../library/test.rst:378
msgid "See also the :data:`HAVE_DOCSTRINGS` variable."
-msgstr ""
+msgstr "另請參閱 :data:`HAVE_DOCSTRINGS` 變數。"
#: ../../library/test.rst:383
msgid ""
diff --git a/library/threading.po b/library/threading.po
index 56ffbbf335..24de59c26d 100644
--- a/library/threading.po
+++ b/library/threading.po
@@ -34,7 +34,7 @@ msgstr ""
#: ../../library/threading.rst:194 ../../library/threading.rst:293
#: ../../library/threading.rst:641 ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
@@ -367,7 +367,7 @@ msgstr ""
#: ../../library/threading.rst:298
msgid "This module also defines the following constant:"
-msgstr ""
+msgstr "此模組也定義了以下常數:"
#: ../../library/threading.rst:302
msgid ""
diff --git a/library/time.po b/library/time.po
index d777bdc307..dfd10d6f86 100644
--- a/library/time.po
+++ b/library/time.po
@@ -273,7 +273,7 @@ msgstr ""
#: ../../library/time.rst:971 ../../library/time.rst:980
#: ../../library/time.rst:993
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/time.rst:155
msgid ""
diff --git a/library/token.po b/library/token.po
index 372ad403c3..120e3cfe6e 100644
--- a/library/token.po
+++ b/library/token.po
@@ -1,8 +1,8 @@
-# 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
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
@@ -241,195 +241,195 @@ msgstr ""
#: ../../library/token-list.inc:10
msgid "``\"(\"``"
-msgstr ""
+msgstr "``\"(\"``"
#: ../../library/token-list.inc:12
msgid "``\")\"``"
-msgstr ""
+msgstr "``\")\"``"
#: ../../library/token-list.inc:14
msgid "``\"[\"``"
-msgstr ""
+msgstr "``\"[\"``"
#: ../../library/token-list.inc:16
msgid "``\"]\"``"
-msgstr ""
+msgstr "``\"]\"``"
#: ../../library/token-list.inc:18
msgid "``\":\"``"
-msgstr ""
+msgstr "``\":\"``"
#: ../../library/token-list.inc:20
msgid "``\",\"``"
-msgstr ""
+msgstr "``\",\"``"
#: ../../library/token-list.inc:22
msgid "``\";\"``"
-msgstr ""
+msgstr "``\";\"``"
#: ../../library/token-list.inc:24
msgid "``\"+\"``"
-msgstr ""
+msgstr "``\"+\"``"
#: ../../library/token-list.inc:26
msgid "``\"-\"``"
-msgstr ""
+msgstr "``\"-\"``"
#: ../../library/token-list.inc:28
msgid "``\"*\"``"
-msgstr ""
+msgstr "``\"*\"``"
#: ../../library/token-list.inc:30
msgid "``\"/\"``"
-msgstr ""
+msgstr "``\"/\"``"
#: ../../library/token-list.inc:32
msgid "``\"|\"``"
-msgstr ""
+msgstr "``\"|\"``"
#: ../../library/token-list.inc:34
msgid "``\"&\"``"
-msgstr ""
+msgstr "``\"&\"``"
#: ../../library/token-list.inc:36
msgid "``\"<\"``"
-msgstr ""
+msgstr "``\"<\"``"
#: ../../library/token-list.inc:38
msgid "``\">\"``"
-msgstr ""
+msgstr "``\">\"``"
#: ../../library/token-list.inc:40
msgid "``\"=\"``"
-msgstr ""
+msgstr "``\"=\"``"
#: ../../library/token-list.inc:42
msgid "``\".\"``"
-msgstr ""
+msgstr "``\".\"``"
#: ../../library/token-list.inc:44
msgid "``\"%\"``"
-msgstr ""
+msgstr "``\"%\"``"
#: ../../library/token-list.inc:46
msgid "``\"{\"``"
-msgstr ""
+msgstr "``\"{\"``"
#: ../../library/token-list.inc:48
msgid "``\"}\"``"
-msgstr ""
+msgstr "``\"}\"``"
#: ../../library/token-list.inc:50
msgid "``\"==\"``"
-msgstr ""
+msgstr "``\"==\"``"
#: ../../library/token-list.inc:52
msgid "``\"!=\"``"
-msgstr ""
+msgstr "``\"!=\"``"
#: ../../library/token-list.inc:54
msgid "``\"<=\"``"
-msgstr ""
+msgstr "``\"<=\"``"
#: ../../library/token-list.inc:56
msgid "``\">=\"``"
-msgstr ""
+msgstr "``\">=\"``"
#: ../../library/token-list.inc:58
msgid "``\"~\"``"
-msgstr ""
+msgstr "``\"~\"``"
#: ../../library/token-list.inc:60
msgid "``\"^\"``"
-msgstr ""
+msgstr "``\"^\"``"
#: ../../library/token-list.inc:62
msgid "``\"<<\"``"
-msgstr ""
+msgstr "``\"<<\"``"
#: ../../library/token-list.inc:64
msgid "``\">>\"``"
-msgstr ""
+msgstr "``\">>\"``"
#: ../../library/token-list.inc:66
msgid "``\"**\"``"
-msgstr ""
+msgstr "``\"**\"``"
#: ../../library/token-list.inc:68
msgid "``\"+=\"``"
-msgstr ""
+msgstr "``\"+=\"``"
#: ../../library/token-list.inc:70
msgid "``\"-=\"``"
-msgstr ""
+msgstr "``\"-=\"``"
#: ../../library/token-list.inc:72
msgid "``\"*=\"``"
-msgstr ""
+msgstr "``\"*=\"``"
#: ../../library/token-list.inc:74
msgid "``\"/=\"``"
-msgstr ""
+msgstr "``\"/=\"``"
#: ../../library/token-list.inc:76
msgid "``\"%=\"``"
-msgstr ""
+msgstr "``\"%=\"``"
#: ../../library/token-list.inc:78
msgid "``\"&=\"``"
-msgstr ""
+msgstr "``\"&=\"``"
#: ../../library/token-list.inc:80
msgid "``\"|=\"``"
-msgstr ""
+msgstr "``\"|=\"``"
#: ../../library/token-list.inc:82
msgid "``\"^=\"``"
-msgstr ""
+msgstr "``\"^=\"``"
#: ../../library/token-list.inc:84
msgid "``\"<<=\"``"
-msgstr ""
+msgstr "``\"<<=\"``"
#: ../../library/token-list.inc:86
msgid "``\">>=\"``"
-msgstr ""
+msgstr "``\">>=\"``"
#: ../../library/token-list.inc:88
msgid "``\"**=\"``"
-msgstr ""
+msgstr "``\"**=\"``"
#: ../../library/token-list.inc:90
msgid "``\"//\"``"
-msgstr ""
+msgstr "``\"//\"``"
#: ../../library/token-list.inc:92
msgid "``\"//=\"``"
-msgstr ""
+msgstr "``\"//=\"``"
#: ../../library/token-list.inc:94
msgid "``\"@\"``"
-msgstr ""
+msgstr "``\"@\"``"
#: ../../library/token-list.inc:96
msgid "``\"@=\"``"
-msgstr ""
+msgstr "``\"@=\"``"
#: ../../library/token-list.inc:98
msgid "``\"->\"``"
-msgstr ""
+msgstr "``\"->\"``"
#: ../../library/token-list.inc:100
msgid "``\"...\"``"
-msgstr ""
+msgstr "``\"...\"``"
#: ../../library/token-list.inc:102
msgid "``\":=\"``"
-msgstr ""
+msgstr "``\":=\"``"
#: ../../library/token-list.inc:104
msgid "``\"!\"``"
-msgstr ""
+msgstr "``\"!\"``"
#: ../../library/token.rst:193
msgid "The following non-token constants are provided:"
@@ -469,7 +469,7 @@ msgstr ""
#: ../../library/token.rst:225
msgid "Added :data:`EXCLAMATION`."
-msgstr ""
+msgstr "新增 :data:`EXCLAMATION`。"
#: ../../library/token.rst:228
msgid "Removed :data:`!AWAIT` and :data:`!ASYNC` tokens again."
diff --git a/library/traceback.po b/library/traceback.po
index 6337736158..39b3558948 100644
--- a/library/traceback.po
+++ b/library/traceback.po
@@ -926,6 +926,3 @@ msgstr "^ (插入符號)"
#: ../../library/traceback.rst:87
msgid "marker"
msgstr "marker(標記)"
-
-#~ msgid "The module defines the following functions:"
-#~ msgstr "此模組定義了以下函式:"
diff --git a/library/tracemalloc.po b/library/tracemalloc.po
index 8ce369cc18..aa9a9baf2b 100644
--- a/library/tracemalloc.po
+++ b/library/tracemalloc.po
@@ -956,7 +956,7 @@ msgstr ""
#: ../../library/tracemalloc.rst:623
msgid "See also the :class:`StatisticDiff` class."
-msgstr ""
+msgstr "另請參閱 :class:`StatisticDiff` 類別。"
#: ../../library/tracemalloc.rst:627
msgid "Number of memory blocks (``int``)."
diff --git a/library/turtle.po b/library/turtle.po
index ef88f69b8e..037a2eacaa 100644
--- a/library/turtle.po
+++ b/library/turtle.po
@@ -2902,7 +2902,7 @@ msgstr ""
#: ../../library/turtle.rst:1969
msgid "See also the RawTurtle/Turtle method :func:`speed`."
-msgstr ""
+msgstr "另請參閱 RawTurtle/Turtle 的 :func:`speed` 方法。"
#: ../../library/turtle.rst:1977
msgid ""
diff --git a/library/unittest.po b/library/unittest.po
index 6940a80894..110f6e1d74 100644
--- a/library/unittest.po
+++ b/library/unittest.po
@@ -266,8 +266,8 @@ msgid ""
"provides a command-line interface to the test script. When run from the "
"command line, the above script produces an output that looks like this::"
msgstr ""
-"最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令執行列介"
-"面測試腳本。當透過命令執行列執行,輸出結果將會像是: ::"
+"最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令列介"
+"面測試腳本。當透過命令列執行,輸出結果將會像是: ::"
#: ../../library/unittest.rst:133
msgid ""
@@ -329,14 +329,14 @@ msgstr ""
#: ../../library/unittest.rst:163
msgid "Command-Line Interface"
-msgstr "命令執行列介面 (Command-Line Interface)"
+msgstr "命令列介面"
#: ../../library/unittest.rst:165
msgid ""
"The unittest module can be used from the command line to run tests from "
"modules, classes or even individual test methods::"
msgstr ""
-"單元測試模組可以透過命令執行列執行測試模組,物件甚至個別的測試方法: ::"
+"單元測試模組可以透過命令列執行測試模組,物件甚至個別的測試方法: ::"
#: ../../library/unittest.rst:168
msgid ""
diff --git a/library/urllib.request.po b/library/urllib.request.po
index 45e42e0699..4bae8ca900 100644
--- a/library/urllib.request.po
+++ b/library/urllib.request.po
@@ -55,7 +55,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/webbrowser.po b/library/webbrowser.po
index 8e2062bdf8..cd494e9334 100644
--- a/library/webbrowser.po
+++ b/library/webbrowser.po
@@ -115,7 +115,7 @@ msgstr "python -m webbrowser -t \"https://www.python.org\""
#: ../../library/webbrowser.rst:63
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../library/webbrowser.rst:65
msgid "The following exception is defined:"
diff --git a/library/wsgiref.po b/library/wsgiref.po
index 02456816c1..a35424b61e 100644
--- a/library/wsgiref.po
+++ b/library/wsgiref.po
@@ -107,8 +107,8 @@ msgid ""
"a request is received via SSL. So, this function returns \"https\" if such "
"a value is found, and \"http\" otherwise."
msgstr ""
-"當建立一個包裝 CGI 或類似 FastCGI 的 CGI-like 協議閘道時,此函式非常有用。例"
-"如 FastCGI,通常提供這類協議的伺服器在通過 SSL 接收到請求時會包含 \"1\","
+"當建立一個包裝 CGI 或類似 FastCGI 的 CGI-like 協定閘道時,此函式非常有用。例"
+"如 FastCGI,通常提供這類協定的伺服器在通過 SSL 接收到請求時會包含 \"1\","
"\"yes\",或 \"on\" 的 ``HTTPS`` 變數,因此,如果找到這樣的值,此函式回傳 "
"\"https\",否則回傳 \"http\"。"
@@ -263,7 +263,7 @@ msgid ""
"When :meth:`read` returns an empty bytestring, iteration is ended and is not "
"resumable."
msgstr ""
-":class:`wsgiref.types.FileWrapper` 協議的具體實作,用於將類檔案物件轉換"
+":class:`wsgiref.types.FileWrapper` 協定的具體實作,用於將類檔案物件轉換"
"為 :term:`iterator`。產生的物件是 :term:`iterable`。當物件進行疊代時,將可選"
"的 *blksize* 引數重複傳遞給 *filelike* 物件的 :meth:`read` 方法來獲得將產生"
"(yield)的位元組字串。當 :meth:`read` 回傳一個空位元組字串,代表疊代已結束且"
@@ -625,7 +625,7 @@ msgstr ""
"當建立新的 WSGI 應用程式物件、框架、伺服器、或是中介軟體(middleware)時,使"
"用 :mod:`wsgiref.validate` 來驗證新程式碼的符合性可能會很有用。這個模組提供一"
"個函式用於建立 WSGI 應用程式物件,並用於驗證 WSGI 伺服器或是閘道與 WSGI 應用"
-"程式物件之間的通訊,以檢查雙方協議的符合性。"
+"程式物件之間的通訊,以檢查雙方協定的符合性。"
#: ../../library/wsgiref.rst:399
msgid ""
@@ -820,7 +820,7 @@ msgid ""
msgstr ""
"這個類別是專門為除了 HTTP \"origin servers\" 以外的軟體一起使用"
"的 :class:`SimpleHandler` 的子類別。如果你正在撰寫一個使用 ``Status:`` 標頭來"
-"發送 HTTP 狀態的閘道協議實作(例如 CGI、FastCGI、SCGI 等),你可能會想要子類"
+"發送 HTTP 狀態的閘道協定實作(例如 CGI、FastCGI、SCGI 等),你可能會想要子類"
"化這個類別來替代 :class:`SimpleHandler`。"
#: ../../library/wsgiref.rst:522
@@ -1172,7 +1172,7 @@ msgid ""
"special ``Status:`` header."
msgstr ""
"這個屬性應該被設置為 true 值,如果處理程式(handler)的 :meth:`_write` "
-"和 :meth:`_flush` 被用於直接與用戶端通訊,而不是透過 CGI-like 的閘道協議希望 "
+"和 :meth:`_flush` 被用於直接與用戶端通訊,而不是透過 CGI-like 的閘道協定希望 "
"HTTP 狀態在特殊的 ``Status:`` 標頭中。"
#: ../../library/wsgiref.rst:748
@@ -1268,7 +1268,7 @@ msgid ""
msgstr ""
"一個描述\\ :pep:`檔案包裝器 <3333#optional-platform-specific-file-"
"handling>`\\ 的 :class:`typing.Protocol`。請參"
-"閱 :class:`wsgiref.util.FileWrapper` 來瞭解此協議的具體實作。"
+"閱 :class:`wsgiref.util.FileWrapper` 來瞭解此協定的具體實作。"
#: ../../library/wsgiref.rst:822
msgid "Examples"
diff --git a/library/xml.dom.minidom.po b/library/xml.dom.minidom.po
index edf87d6176..ee2ea5fccb 100644
--- a/library/xml.dom.minidom.po
+++ b/library/xml.dom.minidom.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-01 22:24+0800\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:15+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,18 +36,17 @@ msgstr ""
#: ../../library/xml.dom.minidom.rst:24
msgid ""
-"The :mod:`xml.dom.minidom` module is not secure against maliciously "
-"constructed data. If you need to parse untrusted or unauthenticated data "
-"see :ref:`xml-vulnerabilities`."
-msgstr ""
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/xml.dom.minidom.rst:29
+#: ../../library/xml.dom.minidom.rst:28
msgid ""
"DOM applications typically start by parsing some XML into a DOM. With :mod:"
"`xml.dom.minidom`, this is done through the parse functions::"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:32
+#: ../../library/xml.dom.minidom.rst:31
msgid ""
"from xml.dom.minidom import parse, parseString\n"
"\n"
@@ -59,13 +57,21 @@ msgid ""
"\n"
"dom3 = parseString('Some data some more data')"
msgstr ""
+"from xml.dom.minidom import parse, parseString\n"
+"\n"
+"dom1 = parse('c:\\\\temp\\\\mydata.xml') # 以檔名來剖析 XML 檔案\n"
+"\n"
+"datasource = open('c:\\\\temp\\\\mydata.xml')\n"
+"dom2 = parse(datasource) # 剖析開啟的檔案\n"
+"\n"
+"dom3 = parseString('Some data some more data')"
-#: ../../library/xml.dom.minidom.rst:41
+#: ../../library/xml.dom.minidom.rst:40
msgid ""
"The :func:`parse` function can take either a filename or an open file object."
-msgstr ""
+msgstr ":func:`parse` 函式可以接受一個檔案名稱或開啟的檔案物件。"
-#: ../../library/xml.dom.minidom.rst:46
+#: ../../library/xml.dom.minidom.rst:45
msgid ""
"Return a :class:`Document` from the given input. *filename_or_file* may be "
"either a file name, or a file-like object. *parser*, if given, must be a "
@@ -74,26 +80,27 @@ msgid ""
"setting an entity resolver) must have been done in advance."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:52
+#: ../../library/xml.dom.minidom.rst:51
msgid ""
"If you have XML in a string, you can use the :func:`parseString` function "
"instead:"
msgstr ""
+"如果你有一個字串中的 XML,你可以使用 :func:`parseString` 函式來代替:"
-#: ../../library/xml.dom.minidom.rst:58
+#: ../../library/xml.dom.minidom.rst:57
msgid ""
"Return a :class:`Document` that represents the *string*. This method creates "
"an :class:`io.StringIO` object for the string and passes that on to :func:"
"`parse`."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:61
+#: ../../library/xml.dom.minidom.rst:60
msgid ""
"Both functions return a :class:`Document` object representing the content of "
"the document."
-msgstr ""
+msgstr "這兩個函式都會回傳一個 :class:`Document` 物件,表示文件的內容。"
-#: ../../library/xml.dom.minidom.rst:64
+#: ../../library/xml.dom.minidom.rst:63
msgid ""
"What the :func:`parse` and :func:`parseString` functions do is connect an "
"XML parser with a \"DOM builder\" that can accept parse events from any SAX "
@@ -104,7 +111,7 @@ msgid ""
"themselves."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:71
+#: ../../library/xml.dom.minidom.rst:70
msgid ""
"You can also create a :class:`Document` by calling a method on a \"DOM "
"Implementation\" object. You can get this object either by calling the :"
@@ -113,7 +120,7 @@ msgid ""
"add child nodes to it to populate the DOM::"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:77
+#: ../../library/xml.dom.minidom.rst:76
msgid ""
"from xml.dom.minidom import getDOMImplementation\n"
"\n"
@@ -124,8 +131,16 @@ msgid ""
"text = newdoc.createTextNode('Some textual content.')\n"
"top_element.appendChild(text)"
msgstr ""
+"from xml.dom.minidom import getDOMImplementation\n"
+"\n"
+"impl = getDOMImplementation()\n"
+"\n"
+"newdoc = impl.createDocument(None, \"some_tag\", None)\n"
+"top_element = newdoc.documentElement\n"
+"text = newdoc.createTextNode('Some textual content.')\n"
+"top_element.appendChild(text)"
-#: ../../library/xml.dom.minidom.rst:86
+#: ../../library/xml.dom.minidom.rst:85
msgid ""
"Once you have a DOM document object, you can access the parts of your XML "
"document through its properties and methods. These properties are defined "
@@ -134,13 +149,15 @@ msgid ""
"document: the one that holds all others. Here is an example program::"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:92
+#: ../../library/xml.dom.minidom.rst:91
msgid ""
"dom3 = parseString(\"Some data\")\n"
"assert dom3.documentElement.tagName == \"myxml\""
msgstr ""
+"dom3 = parseString(\"Some data\")\n"
+"assert dom3.documentElement.tagName == \"myxml\""
-#: ../../library/xml.dom.minidom.rst:95
+#: ../../library/xml.dom.minidom.rst:94
msgid ""
"When you are finished with a DOM tree, you may optionally call the :meth:"
"`unlink` method to encourage early cleanup of the now-unneeded objects. :"
@@ -150,28 +167,30 @@ msgid ""
"objects in the tree."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:104
+#: ../../library/xml.dom.minidom.rst:103
msgid ""
"`Document Object Model (DOM) Level 1 Specification `_"
msgstr ""
+"`Document Object Model (DOM) Level 1 Specification `_"
-#: ../../library/xml.dom.minidom.rst:105
+#: ../../library/xml.dom.minidom.rst:104
msgid "The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`."
-msgstr ""
+msgstr "W3C 對 :mod:`xml.dom.minidom` DOM 支援 的建議。"
-#: ../../library/xml.dom.minidom.rst:111
+#: ../../library/xml.dom.minidom.rst:110
msgid "DOM Objects"
msgstr "DOM 物件"
-#: ../../library/xml.dom.minidom.rst:113
+#: ../../library/xml.dom.minidom.rst:112
msgid ""
"The definition of the DOM API for Python is given as part of the :mod:`xml."
"dom` module documentation. This section lists the differences between the "
"API and :mod:`xml.dom.minidom`."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:120
+#: ../../library/xml.dom.minidom.rst:119
msgid ""
"Break internal references within the DOM so that it will be garbage "
"collected on versions of Python without cyclic GC. Even when cyclic GC is "
@@ -181,20 +200,22 @@ msgid ""
"may be called on child nodes to discard children of that node."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:127
+#: ../../library/xml.dom.minidom.rst:126
msgid ""
"You can avoid calling this method explicitly by using the :keyword:`with` "
"statement. The following code will automatically unlink *dom* when the :"
"keyword:`!with` block is exited::"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:131
+#: ../../library/xml.dom.minidom.rst:130
msgid ""
"with xml.dom.minidom.parse(datasource) as dom:\n"
" ... # Work with dom."
msgstr ""
+"with xml.dom.minidom.parse(datasource) as dom:\n"
+" ... # 使用 dom。"
-#: ../../library/xml.dom.minidom.rst:138
+#: ../../library/xml.dom.minidom.rst:137
msgid ""
"Write XML to the writer object. The writer receives texts but not bytes as "
"input, it should have a :meth:`write` method which matches that of the file "
@@ -204,13 +225,13 @@ msgid ""
"use to terminate newlines."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:145
+#: ../../library/xml.dom.minidom.rst:144
msgid ""
"For the :class:`Document` node, an additional keyword argument *encoding* "
"can be used to specify the encoding field of the XML header."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:148
+#: ../../library/xml.dom.minidom.rst:147
msgid ""
"Similarly, explicitly stating the *standalone* argument causes the "
"standalone document declarations to be added to the prologue of the XML "
@@ -219,24 +240,24 @@ msgid ""
"declaration from the document."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:155
+#: ../../library/xml.dom.minidom.rst:154
msgid ""
"The :meth:`writexml` method now preserves the attribute order specified by "
"the user."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:159 ../../library/xml.dom.minidom.rst:180
-#: ../../library/xml.dom.minidom.rst:199
+#: ../../library/xml.dom.minidom.rst:158 ../../library/xml.dom.minidom.rst:179
+#: ../../library/xml.dom.minidom.rst:198
msgid "The *standalone* parameter was added."
msgstr "新增 *standalone* 參數。"
-#: ../../library/xml.dom.minidom.rst:164
+#: ../../library/xml.dom.minidom.rst:163
msgid ""
"Return a string or byte string containing the XML represented by the DOM "
"node."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:167
+#: ../../library/xml.dom.minidom.rst:166
msgid ""
"With an explicit *encoding* [1]_ argument, the result is a byte string in "
"the specified encoding. With no *encoding* argument, the result is a Unicode "
@@ -245,47 +266,47 @@ msgid ""
"incorrect, since UTF-8 is the default encoding of XML."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:174 ../../library/xml.dom.minidom.rst:193
+#: ../../library/xml.dom.minidom.rst:173 ../../library/xml.dom.minidom.rst:192
msgid "The *standalone* argument behaves exactly as in :meth:`writexml`."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:176
+#: ../../library/xml.dom.minidom.rst:175
msgid ""
"The :meth:`toxml` method now preserves the attribute order specified by the "
"user."
-msgstr ""
+msgstr "現在 :meth:`toxml` 方法會保留使用者指定的屬性順序。"
-#: ../../library/xml.dom.minidom.rst:186
+#: ../../library/xml.dom.minidom.rst:185
msgid ""
"Return a pretty-printed version of the document. *indent* specifies the "
"indentation string and defaults to a tabulator; *newl* specifies the string "
"emitted at the end of each line and defaults to ``\\n``."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:190
+#: ../../library/xml.dom.minidom.rst:189
msgid ""
"The *encoding* argument behaves like the corresponding argument of :meth:"
"`toxml`."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:195
+#: ../../library/xml.dom.minidom.rst:194
msgid ""
"The :meth:`toprettyxml` method now preserves the attribute order specified "
"by the user."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:205
+#: ../../library/xml.dom.minidom.rst:204
msgid "DOM Example"
msgstr "DOM 範例"
-#: ../../library/xml.dom.minidom.rst:207
+#: ../../library/xml.dom.minidom.rst:206
msgid ""
"This example program is a fairly realistic example of a simple program. In "
"this particular case, we do not take much advantage of the flexibility of "
"the DOM."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:210
+#: ../../library/xml.dom.minidom.rst:209
msgid ""
"import xml.dom.minidom\n"
"\n"
@@ -417,23 +438,23 @@ msgstr ""
"\n"
"handleSlideshow(dom)\n"
-#: ../../library/xml.dom.minidom.rst:216
+#: ../../library/xml.dom.minidom.rst:215
msgid "minidom and the DOM standard"
-msgstr ""
+msgstr "minidom 和 DOM 標準"
-#: ../../library/xml.dom.minidom.rst:218
+#: ../../library/xml.dom.minidom.rst:217
msgid ""
"The :mod:`xml.dom.minidom` module is essentially a DOM 1.0-compatible DOM "
"with some DOM 2 features (primarily namespace features)."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:221
+#: ../../library/xml.dom.minidom.rst:220
msgid ""
"Usage of the DOM interface in Python is straight-forward. The following "
"mapping rules apply:"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:224
+#: ../../library/xml.dom.minidom.rst:223
msgid ""
"Interfaces are accessed through instance objects. Applications should not "
"instantiate the classes themselves; they should use the creator functions "
@@ -442,14 +463,14 @@ msgid ""
"operations."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:229
+#: ../../library/xml.dom.minidom.rst:228
msgid ""
"Operations are used as methods. Since the DOM uses only :keyword:`in` "
"parameters, the arguments are passed in normal order (from left to right). "
"There are no optional arguments. ``void`` operations return ``None``."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:233
+#: ../../library/xml.dom.minidom.rst:232
msgid ""
"IDL attributes map to instance attributes. For compatibility with the OMG "
"IDL language mapping for Python, an attribute ``foo`` can also be accessed "
@@ -457,13 +478,13 @@ msgid ""
"``readonly`` attributes must not be changed; this is not enforced at runtime."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:238
+#: ../../library/xml.dom.minidom.rst:237
msgid ""
"The types ``short int``, ``unsigned int``, ``unsigned long long``, and "
"``boolean`` all map to Python integer objects."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:241
+#: ../../library/xml.dom.minidom.rst:240
msgid ""
"The type ``DOMString`` maps to Python strings. :mod:`xml.dom.minidom` "
"supports either bytes or strings, but will normally produce strings. Values "
@@ -471,21 +492,21 @@ msgid ""
"``null`` value by the DOM specification from the W3C."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:246
+#: ../../library/xml.dom.minidom.rst:245
msgid ""
"``const`` declarations map to variables in their respective scope (e.g. "
"``xml.dom.minidom.Node.PROCESSING_INSTRUCTION_NODE``); they must not be "
"changed."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:249
+#: ../../library/xml.dom.minidom.rst:248
msgid ""
"``DOMException`` is currently not supported in :mod:`xml.dom.minidom`. "
"Instead, :mod:`xml.dom.minidom` uses standard Python exceptions such as :exc:"
"`TypeError` and :exc:`AttributeError`."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:253
+#: ../../library/xml.dom.minidom.rst:252
msgid ""
":class:`NodeList` objects are implemented using Python's built-in list type. "
"These objects provide the interface defined in the DOM specification, but "
@@ -494,30 +515,30 @@ msgid ""
"recommendations."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:259
+#: ../../library/xml.dom.minidom.rst:258
msgid ""
"The following interfaces have no implementation in :mod:`xml.dom.minidom`:"
msgstr ""
-#: ../../library/xml.dom.minidom.rst:261
+#: ../../library/xml.dom.minidom.rst:260
msgid ":class:`DOMTimeStamp`"
msgstr ":class:`DOMTimeStamp`"
-#: ../../library/xml.dom.minidom.rst:263
+#: ../../library/xml.dom.minidom.rst:262
msgid ":class:`EntityReference`"
msgstr ":class:`EntityReference`"
-#: ../../library/xml.dom.minidom.rst:265
+#: ../../library/xml.dom.minidom.rst:264
msgid ""
"Most of these reflect information in the XML document that is not of general "
"utility to most DOM users."
msgstr ""
-#: ../../library/xml.dom.minidom.rst:269
+#: ../../library/xml.dom.minidom.rst:268
msgid "Footnotes"
-msgstr "註解"
+msgstr "註腳"
-#: ../../library/xml.dom.minidom.rst:270
+#: ../../library/xml.dom.minidom.rst:269
msgid ""
"The encoding name included in the XML output should conform to the "
"appropriate standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not "
diff --git a/library/xml.dom.pulldom.po b/library/xml.dom.pulldom.po
index 736f1f62c2..bc91d5c066 100644
--- a/library/xml.dom.pulldom.po
+++ b/library/xml.dom.pulldom.po
@@ -1,13 +1,13 @@
-# 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
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-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:16+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -40,19 +40,18 @@ msgstr ""
#: ../../library/xml.dom.pulldom.rst:24
msgid ""
-"The :mod:`xml.dom.pulldom` module is not secure against maliciously "
-"constructed data. If you need to parse untrusted or unauthenticated data "
-"see :ref:`xml-vulnerabilities`."
-msgstr ""
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/xml.dom.pulldom.rst:30
+#: ../../library/xml.dom.pulldom.rst:29
msgid ""
"The SAX parser no longer processes general external entities by default to "
"increase security by default. To enable processing of external entities, "
"pass a custom parser instance in::"
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:34
+#: ../../library/xml.dom.pulldom.rst:33
msgid ""
"from xml.dom.pulldom import parse\n"
"from xml.sax import make_parser\n"
@@ -70,11 +69,11 @@ msgstr ""
"parser.setFeature(feature_external_ges, True)\n"
"parse(filename, parser=parser)"
-#: ../../library/xml.dom.pulldom.rst:43
+#: ../../library/xml.dom.pulldom.rst:42
msgid "Example::"
msgstr "範例: ::"
-#: ../../library/xml.dom.pulldom.rst:45
+#: ../../library/xml.dom.pulldom.rst:44
msgid ""
"from xml.dom import pulldom\n"
"\n"
@@ -94,49 +93,49 @@ msgstr ""
" doc.expandNode(node)\n"
" print(node.toxml())"
-#: ../../library/xml.dom.pulldom.rst:54
+#: ../../library/xml.dom.pulldom.rst:53
msgid "``event`` is a constant and can be one of:"
-msgstr ""
+msgstr "``event`` 是一個常數,可以是以下其中一個:"
-#: ../../library/xml.dom.pulldom.rst:56
+#: ../../library/xml.dom.pulldom.rst:55
msgid ":data:`START_ELEMENT`"
msgstr ":data:`START_ELEMENT`"
-#: ../../library/xml.dom.pulldom.rst:57
+#: ../../library/xml.dom.pulldom.rst:56
msgid ":data:`END_ELEMENT`"
msgstr ":data:`END_ELEMENT`"
-#: ../../library/xml.dom.pulldom.rst:58
+#: ../../library/xml.dom.pulldom.rst:57
msgid ":data:`COMMENT`"
msgstr ":data:`COMMENT`"
-#: ../../library/xml.dom.pulldom.rst:59
+#: ../../library/xml.dom.pulldom.rst:58
msgid ":data:`START_DOCUMENT`"
msgstr ":data:`START_DOCUMENT`"
-#: ../../library/xml.dom.pulldom.rst:60
+#: ../../library/xml.dom.pulldom.rst:59
msgid ":data:`END_DOCUMENT`"
msgstr ":data:`END_DOCUMENT`"
-#: ../../library/xml.dom.pulldom.rst:61
+#: ../../library/xml.dom.pulldom.rst:60
msgid ":data:`CHARACTERS`"
msgstr ":data:`CHARACTERS`"
-#: ../../library/xml.dom.pulldom.rst:62
+#: ../../library/xml.dom.pulldom.rst:61
msgid ":data:`PROCESSING_INSTRUCTION`"
msgstr ":data:`PROCESSING_INSTRUCTION`"
-#: ../../library/xml.dom.pulldom.rst:63
+#: ../../library/xml.dom.pulldom.rst:62
msgid ":data:`IGNORABLE_WHITESPACE`"
msgstr ":data:`IGNORABLE_WHITESPACE`"
-#: ../../library/xml.dom.pulldom.rst:65
+#: ../../library/xml.dom.pulldom.rst:64
msgid ""
"``node`` is an object of type :class:`xml.dom.minidom.Document`, :class:`xml."
"dom.minidom.Element` or :class:`xml.dom.minidom.Text`."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:68
+#: ../../library/xml.dom.pulldom.rst:67
msgid ""
"Since the document is treated as a \"flat\" stream of events, the document "
"\"tree\" is implicitly traversed and the desired elements are found "
@@ -148,11 +147,11 @@ msgid ""
"`DOMEventStream.expandNode` method and switch to DOM-related processing."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:80 ../../library/xml.dom.pulldom.rst:85
+#: ../../library/xml.dom.pulldom.rst:79 ../../library/xml.dom.pulldom.rst:84
msgid "Subclass of :class:`xml.sax.handler.ContentHandler`."
-msgstr ""
+msgstr ":class:`xml.sax.handler.ContentHandler` 的子類別。"
-#: ../../library/xml.dom.pulldom.rst:90
+#: ../../library/xml.dom.pulldom.rst:89
msgid ""
"Return a :class:`DOMEventStream` from the given input. *stream_or_string* "
"may be either a file name, or a file-like object. *parser*, if given, must "
@@ -162,36 +161,36 @@ msgid ""
"done in advance."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:97
+#: ../../library/xml.dom.pulldom.rst:96
msgid ""
"If you have XML in a string, you can use the :func:`parseString` function "
"instead:"
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:101
+#: ../../library/xml.dom.pulldom.rst:100
msgid ""
"Return a :class:`DOMEventStream` that represents the (Unicode) *string*."
-msgstr ""
+msgstr "回傳一個表示 (Unicode) *string* 的 :class:`DOMEventStream`。"
-#: ../../library/xml.dom.pulldom.rst:105
+#: ../../library/xml.dom.pulldom.rst:104
msgid "Default value for the *bufsize* parameter to :func:`parse`."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:107
+#: ../../library/xml.dom.pulldom.rst:106
msgid ""
"The value of this variable can be changed before calling :func:`parse` and "
"the new value will take effect."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:113
+#: ../../library/xml.dom.pulldom.rst:112
msgid "DOMEventStream Objects"
msgstr "DOMEventStream 物件"
-#: ../../library/xml.dom.pulldom.rst:117
+#: ../../library/xml.dom.pulldom.rst:116
msgid "Support for :meth:`~object.__getitem__` method has been removed."
-msgstr ""
+msgstr "已移除對 :meth:`~object.__getitem__` 方法的支援。"
-#: ../../library/xml.dom.pulldom.rst:122
+#: ../../library/xml.dom.pulldom.rst:121
msgid ""
"Return a tuple containing *event* and the current *node* as :class:`xml.dom."
"minidom.Document` if event equals :data:`START_DOCUMENT`, :class:`xml.dom."
@@ -201,11 +200,11 @@ msgid ""
"children, unless :func:`expandNode` is called."
msgstr ""
-#: ../../library/xml.dom.pulldom.rst:132
+#: ../../library/xml.dom.pulldom.rst:131
msgid "Expands all children of *node* into *node*. Example::"
-msgstr ""
+msgstr "展開 *node* 的所有子節點到 *node*。範例: ::"
-#: ../../library/xml.dom.pulldom.rst:134
+#: ../../library/xml.dom.pulldom.rst:133
msgid ""
"from xml.dom import pulldom\n"
"\n"
@@ -221,3 +220,16 @@ msgid ""
"text and more
'\n"
" print(node.toxml())"
msgstr ""
+"from xml.dom import pulldom\n"
+"\n"
+"xml = 'Foo Some text
and more
"
+"html>'\n"
+"doc = pulldom.parseString(xml)\n"
+"for event, node in doc:\n"
+" if event == pulldom.START_ELEMENT and node.tagName == 'p':\n"
+" # 以下陳述式只會印出 ''\n"
+" print(node.toxml())\n"
+" doc.expandNode(node)\n"
+" # 以下陳述式會印出包含所有子節點的節點 'Some "
+"text
and more
'\n"
+" print(node.toxml())"
diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po
index b5a9518fc2..bfd50c500c 100644
--- a/library/xml.etree.elementtree.po
+++ b/library/xml.etree.elementtree.po
@@ -1,4 +1,4 @@
-# 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.
#
# Translators:
@@ -6,7 +6,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-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:16+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -41,27 +41,26 @@ msgstr ":mod:`!xml.etree.cElementTree` 模組已被棄用。"
#: ../../library/xml.etree.elementtree.rst:25
msgid ""
-"The :mod:`xml.etree.ElementTree` module is not secure against maliciously "
-"constructed data. If you need to parse untrusted or unauthenticated data "
-"see :ref:`xml-vulnerabilities`."
-msgstr ""
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/xml.etree.elementtree.rst:30
+#: ../../library/xml.etree.elementtree.rst:29
msgid "Tutorial"
msgstr "教學"
-#: ../../library/xml.etree.elementtree.rst:32
+#: ../../library/xml.etree.elementtree.rst:31
msgid ""
"This is a short tutorial for using :mod:`xml.etree.ElementTree` (``ET`` in "
"short). The goal is to demonstrate some of the building blocks and basic "
"concepts of the module."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:37
+#: ../../library/xml.etree.elementtree.rst:36
msgid "XML tree and elements"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:39
+#: ../../library/xml.etree.elementtree.rst:38
msgid ""
"XML is an inherently hierarchical data format, and the most natural way to "
"represent it is with a tree. ``ET`` has two classes for this purpose - :"
@@ -72,17 +71,17 @@ msgid ""
"sub-elements are done on the :class:`Element` level."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:50
+#: ../../library/xml.etree.elementtree.rst:49
msgid "Parsing XML"
msgstr "剖析 XML"
-#: ../../library/xml.etree.elementtree.rst:52
+#: ../../library/xml.etree.elementtree.rst:51
msgid ""
"We'll be using the fictive :file:`country_data.xml` XML document as the "
"sample data for this section:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:54
+#: ../../library/xml.etree.elementtree.rst:53
msgid ""
"\n"
"\n"
@@ -132,11 +131,11 @@ msgstr ""
" \n"
""
-#: ../../library/xml.etree.elementtree.rst:80
+#: ../../library/xml.etree.elementtree.rst:79
msgid "We can import this data by reading from a file::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:82
+#: ../../library/xml.etree.elementtree.rst:81
msgid ""
"import xml.etree.ElementTree as ET\n"
"tree = ET.parse('country_data.xml')\n"
@@ -146,15 +145,15 @@ msgstr ""
"tree = ET.parse('country_data.xml')\n"
"root = tree.getroot()"
-#: ../../library/xml.etree.elementtree.rst:86
+#: ../../library/xml.etree.elementtree.rst:85
msgid "Or directly from a string::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:88
+#: ../../library/xml.etree.elementtree.rst:87
msgid "root = ET.fromstring(country_data_as_string)"
msgstr "root = ET.fromstring(country_data_as_string)"
-#: ../../library/xml.etree.elementtree.rst:90
+#: ../../library/xml.etree.elementtree.rst:89
msgid ""
":func:`fromstring` parses XML from a string directly into an :class:"
"`Element`, which is the root element of the parsed tree. Other parsing "
@@ -162,12 +161,12 @@ msgid ""
"sure."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:94
+#: ../../library/xml.etree.elementtree.rst:93
msgid ""
"As an :class:`Element`, ``root`` has a tag and a dictionary of attributes::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:96
+#: ../../library/xml.etree.elementtree.rst:95
msgid ""
">>> root.tag\n"
"'data'\n"
@@ -179,11 +178,11 @@ msgstr ""
">>> root.attrib\n"
"{}"
-#: ../../library/xml.etree.elementtree.rst:101
+#: ../../library/xml.etree.elementtree.rst:100
msgid "It also has children nodes over which we can iterate::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:103
+#: ../../library/xml.etree.elementtree.rst:102
msgid ""
">>> for child in root:\n"
"... print(child.tag, child.attrib)\n"
@@ -199,11 +198,11 @@ msgstr ""
"country {'name': 'Singapore'}\n"
"country {'name': 'Panama'}"
-#: ../../library/xml.etree.elementtree.rst:110
+#: ../../library/xml.etree.elementtree.rst:109
msgid "Children are nested, and we can access specific child nodes by index::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:112
+#: ../../library/xml.etree.elementtree.rst:111
msgid ""
">>> root[0][1].text\n"
"'2008'"
@@ -211,7 +210,7 @@ msgstr ""
">>> root[0][1].text\n"
"'2008'"
-#: ../../library/xml.etree.elementtree.rst:118
+#: ../../library/xml.etree.elementtree.rst:117
msgid ""
"Not all elements of the XML input will end up as elements of the parsed "
"tree. Currently, this module skips over any XML comments, processing "
@@ -223,11 +222,11 @@ msgid ""
"constructor."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:132
+#: ../../library/xml.etree.elementtree.rst:131
msgid "Pull API for non-blocking parsing"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:134
+#: ../../library/xml.etree.elementtree.rst:133
msgid ""
"Most parsing functions provided by this module require the whole document to "
"be read at once before returning any result. It is possible to use an :"
@@ -238,7 +237,7 @@ msgid ""
"the convenience of fully constructed :class:`Element` objects."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:142
+#: ../../library/xml.etree.elementtree.rst:141
msgid ""
"The most powerful tool for doing this is :class:`XMLPullParser`. It does "
"not require a blocking read to obtain the XML data, and is instead fed with "
@@ -246,7 +245,7 @@ msgid ""
"XML elements, call :meth:`XMLPullParser.read_events`. Here is an example::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:147
+#: ../../library/xml.etree.elementtree.rst:146
msgid ""
">>> parser = ET.XMLPullParser(['start', 'end'])\n"
">>> parser.feed('sometext')\n"
@@ -260,15 +259,26 @@ msgid ""
"end\n"
"mytag text= sometext more text"
msgstr ""
+">>> parser = ET.XMLPullParser(['start', 'end'])\n"
+">>> parser.feed('sometext')\n"
+">>> list(parser.read_events())\n"
+"[('start', )]\n"
+">>> parser.feed(' more text')\n"
+">>> for event, elem in parser.read_events():\n"
+"... print(event)\n"
+"... print(elem.tag, 'text=', elem.text)\n"
+"...\n"
+"end\n"
+"mytag text= sometext more text"
-#: ../../library/xml.etree.elementtree.rst:159
+#: ../../library/xml.etree.elementtree.rst:158
msgid ""
"The obvious use case is applications that operate in a non-blocking fashion "
"where the XML data is being received from a socket or read incrementally "
"from some storage device. In such cases, blocking reads are unacceptable."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:163
+#: ../../library/xml.etree.elementtree.rst:162
msgid ""
"Because it's so flexible, :class:`XMLPullParser` can be inconvenient to use "
"for simpler use-cases. If you don't mind your application blocking on "
@@ -278,25 +288,25 @@ msgid ""
"memory."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:169
+#: ../../library/xml.etree.elementtree.rst:168
msgid ""
"Where *immediate* feedback through events is wanted, calling method :meth:"
"`XMLPullParser.flush` can help reduce delay; please make sure to study the "
"related security notes."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:175
+#: ../../library/xml.etree.elementtree.rst:174
msgid "Finding interesting elements"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:177
+#: ../../library/xml.etree.elementtree.rst:176
msgid ""
":class:`Element` has some useful methods that help iterate recursively over "
"all the sub-tree below it (its children, their children, and so on). For "
"example, :meth:`Element.iter`::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:181
+#: ../../library/xml.etree.elementtree.rst:180
msgid ""
">>> for neighbor in root.iter('neighbor'):\n"
"... print(neighbor.attrib)\n"
@@ -316,7 +326,7 @@ msgstr ""
"{'name': 'Costa Rica', 'direction': 'W'}\n"
"{'name': 'Colombia', 'direction': 'E'}"
-#: ../../library/xml.etree.elementtree.rst:190
+#: ../../library/xml.etree.elementtree.rst:189
msgid ""
":meth:`Element.findall` finds only elements with a tag which are direct "
"children of the current element. :meth:`Element.find` finds the *first* "
@@ -324,7 +334,7 @@ msgid ""
"text content. :meth:`Element.get` accesses the element's attributes::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:195
+#: ../../library/xml.etree.elementtree.rst:194
msgid ""
">>> for country in root.findall('country'):\n"
"... rank = country.find('rank').text\n"
@@ -344,23 +354,23 @@ msgstr ""
"Singapore 4\n"
"Panama 68"
-#: ../../library/xml.etree.elementtree.rst:204
+#: ../../library/xml.etree.elementtree.rst:203
msgid ""
"More sophisticated specification of which elements to look for is possible "
"by using :ref:`XPath `."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:208
+#: ../../library/xml.etree.elementtree.rst:207
msgid "Modifying an XML File"
msgstr "改動 XML 檔案"
-#: ../../library/xml.etree.elementtree.rst:210
+#: ../../library/xml.etree.elementtree.rst:209
msgid ""
":class:`ElementTree` provides a simple way to build XML documents and write "
"them to files. The :meth:`ElementTree.write` method serves this purpose."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:213
+#: ../../library/xml.etree.elementtree.rst:212
msgid ""
"Once created, an :class:`Element` object may be manipulated by directly "
"changing its fields (such as :attr:`Element.text`), adding and modifying "
@@ -368,13 +378,13 @@ msgid ""
"example with :meth:`Element.append`)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:218
+#: ../../library/xml.etree.elementtree.rst:217
msgid ""
"Let's say we want to add one to each country's rank, and add an ``updated`` "
"attribute to the rank element::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:221
+#: ../../library/xml.etree.elementtree.rst:220
msgid ""
">>> for rank in root.iter('rank'):\n"
"... new_rank = int(rank.text) + 1\n"
@@ -390,12 +400,12 @@ msgstr ""
"...\n"
">>> tree.write('output.xml')"
-#: ../../library/xml.etree.elementtree.rst:228
-#: ../../library/xml.etree.elementtree.rst:272
+#: ../../library/xml.etree.elementtree.rst:227
+#: ../../library/xml.etree.elementtree.rst:271
msgid "Our XML now looks like this:"
msgstr "XML 現在看起來像這樣:"
-#: ../../library/xml.etree.elementtree.rst:230
+#: ../../library/xml.etree.elementtree.rst:229
msgid ""
"\n"
"\n"
@@ -445,13 +455,13 @@ msgstr ""
" \n"
""
-#: ../../library/xml.etree.elementtree.rst:256
+#: ../../library/xml.etree.elementtree.rst:255
msgid ""
"We can remove elements using :meth:`Element.remove`. Let's say we want to "
"remove all countries with a rank higher than 50::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:259
+#: ../../library/xml.etree.elementtree.rst:258
msgid ""
">>> for country in root.findall('country'):\n"
"... # using root.findall() to avoid removal during traversal\n"
@@ -461,8 +471,15 @@ msgid ""
"...\n"
">>> tree.write('output.xml')"
msgstr ""
+">>> for country in root.findall('country'):\n"
+"... # 使用 root.findall() 來避免在遍歷時移除\n"
+"... rank = int(country.find('rank').text)\n"
+"... if rank > 50:\n"
+"... root.remove(country)\n"
+"...\n"
+">>> tree.write('output.xml')"
-#: ../../library/xml.etree.elementtree.rst:267
+#: ../../library/xml.etree.elementtree.rst:266
msgid ""
"Note that concurrent modification while iterating can lead to problems, just "
"like when iterating and modifying Python lists or dicts. Therefore, the "
@@ -470,7 +487,7 @@ msgid ""
"only then iterates over the list of matches."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:274
+#: ../../library/xml.etree.elementtree.rst:273
msgid ""
"\n"
"\n"
@@ -506,17 +523,17 @@ msgstr ""
" \n"
""
-#: ../../library/xml.etree.elementtree.rst:294
+#: ../../library/xml.etree.elementtree.rst:293
msgid "Building XML documents"
-msgstr ""
+msgstr "建立 XML 文件"
-#: ../../library/xml.etree.elementtree.rst:296
+#: ../../library/xml.etree.elementtree.rst:295
msgid ""
"The :func:`SubElement` function also provides a convenient way to create new "
"sub-elements for a given element::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:299
+#: ../../library/xml.etree.elementtree.rst:298
msgid ""
">>> a = ET.Element('a')\n"
">>> b = ET.SubElement(a, 'b')\n"
@@ -532,11 +549,11 @@ msgstr ""
">>> ET.dump(a)\n"
""
-#: ../../library/xml.etree.elementtree.rst:307
+#: ../../library/xml.etree.elementtree.rst:306
msgid "Parsing XML with Namespaces"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:309
+#: ../../library/xml.etree.elementtree.rst:308
msgid ""
"If the XML input has `namespaces `__, tags and attributes with prefixes in the form ``prefix:"
@@ -546,13 +563,13 @@ msgid ""
"prefixed tags."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:317
+#: ../../library/xml.etree.elementtree.rst:316
msgid ""
"Here is an XML example that incorporates two namespaces, one with the prefix "
"\"fictional\" and the other serving as the default namespace:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:320
+#: ../../library/xml.etree.elementtree.rst:319
msgid ""
"\n"
"\n"
""
-#: ../../library/xml.etree.elementtree.rst:338
+#: ../../library/xml.etree.elementtree.rst:337
msgid ""
"One way to search and explore this XML example is to manually add the URI to "
"every tag or attribute in the xpath of a :meth:`~Element.find` or :meth:"
"`~Element.findall`::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:342
+#: ../../library/xml.etree.elementtree.rst:341
msgid ""
"root = fromstring(xml_text)\n"
"for actor in root.findall('{http://people.example.com}actor'):\n"
@@ -609,13 +626,13 @@ msgstr ""
" for char in actor.findall('{http://characters.example.com}character'):\n"
" print(' |-->', char.text)"
-#: ../../library/xml.etree.elementtree.rst:349
+#: ../../library/xml.etree.elementtree.rst:348
msgid ""
"A better way to search the namespaced XML example is to create a dictionary "
"with your own prefixes and use those in the search functions::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:352
+#: ../../library/xml.etree.elementtree.rst:351
msgid ""
"ns = {'real_person': 'http://people.example.com',\n"
" 'role': 'http://characters.example.com'}\n"
@@ -635,11 +652,11 @@ msgstr ""
" for char in actor.findall('role:character', ns):\n"
" print(' |-->', char.text)"
-#: ../../library/xml.etree.elementtree.rst:361
+#: ../../library/xml.etree.elementtree.rst:360
msgid "These two approaches both output::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:363
+#: ../../library/xml.etree.elementtree.rst:362
msgid ""
"John Cleese\n"
" |--> Lancelot\n"
@@ -657,11 +674,11 @@ msgstr ""
" |--> Gunther\n"
" |--> Commander Clement"
-#: ../../library/xml.etree.elementtree.rst:375
+#: ../../library/xml.etree.elementtree.rst:374
msgid "XPath support"
msgstr "XPath 支援"
-#: ../../library/xml.etree.elementtree.rst:377
+#: ../../library/xml.etree.elementtree.rst:376
msgid ""
"This module provides limited support for `XPath expressions `_ for locating elements in a tree. The goal is to support a "
@@ -669,19 +686,19 @@ msgid ""
"scope of the module."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:383
-#: ../../library/xml.etree.elementtree.rst:782
+#: ../../library/xml.etree.elementtree.rst:382
+#: ../../library/xml.etree.elementtree.rst:781
msgid "Example"
msgstr "範例"
-#: ../../library/xml.etree.elementtree.rst:385
+#: ../../library/xml.etree.elementtree.rst:384
msgid ""
"Here's an example that demonstrates some of the XPath capabilities of the "
"module. We'll be using the ``countrydata`` XML document from the :ref:"
"`Parsing XML ` section::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:389
+#: ../../library/xml.etree.elementtree.rst:388
msgid ""
"import xml.etree.ElementTree as ET\n"
"\n"
@@ -704,35 +721,35 @@ msgid ""
"root.findall(\".//neighbor[2]\")"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:409
+#: ../../library/xml.etree.elementtree.rst:408
msgid ""
"For XML with namespaces, use the usual qualified ``{namespace}tag`` "
"notation::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:411
+#: ../../library/xml.etree.elementtree.rst:410
msgid ""
"# All dublin-core \"title\" tags in the document\n"
"root.findall(\".//{http://purl.org/dc/elements/1.1/}title\")"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:416
+#: ../../library/xml.etree.elementtree.rst:415
msgid "Supported XPath syntax"
-msgstr ""
+msgstr "支援的 XPath 語法"
-#: ../../library/xml.etree.elementtree.rst:421
+#: ../../library/xml.etree.elementtree.rst:420
msgid "Syntax"
msgstr "語法"
-#: ../../library/xml.etree.elementtree.rst:421
+#: ../../library/xml.etree.elementtree.rst:420
msgid "Meaning"
msgstr "意義"
-#: ../../library/xml.etree.elementtree.rst:423
+#: ../../library/xml.etree.elementtree.rst:422
msgid "``tag``"
msgstr "``tag``"
-#: ../../library/xml.etree.elementtree.rst:423
+#: ../../library/xml.etree.elementtree.rst:422
msgid ""
"Selects all child elements with the given tag. For example, ``spam`` selects "
"all child elements named ``spam``, and ``spam/egg`` selects all "
@@ -742,133 +759,133 @@ msgid ""
"not in a namespace."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:432
+#: ../../library/xml.etree.elementtree.rst:431
msgid "Support for star-wildcards was added."
msgstr "新增對星號萬用字元的支援。"
-#: ../../library/xml.etree.elementtree.rst:435
+#: ../../library/xml.etree.elementtree.rst:434
msgid "``*``"
msgstr "``*``"
-#: ../../library/xml.etree.elementtree.rst:435
+#: ../../library/xml.etree.elementtree.rst:434
msgid ""
"Selects all child elements, including comments and processing instructions. "
"For example, ``*/egg`` selects all grandchildren named ``egg``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:439
+#: ../../library/xml.etree.elementtree.rst:438
msgid "``.``"
msgstr "``.``"
-#: ../../library/xml.etree.elementtree.rst:439
+#: ../../library/xml.etree.elementtree.rst:438
msgid ""
"Selects the current node. This is mostly useful at the beginning of the "
"path, to indicate that it's a relative path."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:443
+#: ../../library/xml.etree.elementtree.rst:442
msgid "``//``"
msgstr "``//``"
-#: ../../library/xml.etree.elementtree.rst:443
+#: ../../library/xml.etree.elementtree.rst:442
msgid ""
"Selects all subelements, on all levels beneath the current element. For "
"example, ``.//egg`` selects all ``egg`` elements in the entire tree."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:447
+#: ../../library/xml.etree.elementtree.rst:446
msgid "``..``"
msgstr "``..``"
-#: ../../library/xml.etree.elementtree.rst:447
+#: ../../library/xml.etree.elementtree.rst:446
msgid ""
"Selects the parent element. Returns ``None`` if the path attempts to reach "
"the ancestors of the start element (the element ``find`` was called on)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:451
+#: ../../library/xml.etree.elementtree.rst:450
msgid "``[@attrib]``"
msgstr "``[@attrib]``"
-#: ../../library/xml.etree.elementtree.rst:451
+#: ../../library/xml.etree.elementtree.rst:450
msgid "Selects all elements that have the given attribute."
msgstr "選擇所有具有給定屬性的元素。"
-#: ../../library/xml.etree.elementtree.rst:453
+#: ../../library/xml.etree.elementtree.rst:452
msgid "``[@attrib='value']``"
msgstr "``[@attrib='value']``"
-#: ../../library/xml.etree.elementtree.rst:453
+#: ../../library/xml.etree.elementtree.rst:452
msgid ""
"Selects all elements for which the given attribute has the given value. The "
"value cannot contain quotes."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:457
+#: ../../library/xml.etree.elementtree.rst:456
msgid "``[@attrib!='value']``"
msgstr "``[@attrib!='value']``"
-#: ../../library/xml.etree.elementtree.rst:457
+#: ../../library/xml.etree.elementtree.rst:456
msgid ""
"Selects all elements for which the given attribute does not have the given "
"value. The value cannot contain quotes."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:463
+#: ../../library/xml.etree.elementtree.rst:462
msgid "``[tag]``"
msgstr "``[tag]``"
-#: ../../library/xml.etree.elementtree.rst:463
+#: ../../library/xml.etree.elementtree.rst:462
msgid ""
"Selects all elements that have a child named ``tag``. Only immediate "
"children are supported."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:466
+#: ../../library/xml.etree.elementtree.rst:465
msgid "``[.='text']``"
msgstr "``[.='text']``"
-#: ../../library/xml.etree.elementtree.rst:466
+#: ../../library/xml.etree.elementtree.rst:465
msgid ""
"Selects all elements whose complete text content, including descendants, "
"equals the given ``text``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:471
+#: ../../library/xml.etree.elementtree.rst:470
msgid "``[.!='text']``"
msgstr "``[.!='text']``"
-#: ../../library/xml.etree.elementtree.rst:471
+#: ../../library/xml.etree.elementtree.rst:470
msgid ""
"Selects all elements whose complete text content, including descendants, "
"does not equal the given ``text``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:477
+#: ../../library/xml.etree.elementtree.rst:476
msgid "``[tag='text']``"
msgstr "``[tag='text']``"
-#: ../../library/xml.etree.elementtree.rst:477
+#: ../../library/xml.etree.elementtree.rst:476
msgid ""
"Selects all elements that have a child named ``tag`` whose complete text "
"content, including descendants, equals the given ``text``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:481
+#: ../../library/xml.etree.elementtree.rst:480
msgid "``[tag!='text']``"
msgstr "``[tag!='text']``"
-#: ../../library/xml.etree.elementtree.rst:481
+#: ../../library/xml.etree.elementtree.rst:480
msgid ""
"Selects all elements that have a child named ``tag`` whose complete text "
"content, including descendants, does not equal the given ``text``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:487
+#: ../../library/xml.etree.elementtree.rst:486
msgid "``[position]``"
msgstr "``[position]``"
-#: ../../library/xml.etree.elementtree.rst:487
+#: ../../library/xml.etree.elementtree.rst:486
msgid ""
"Selects all elements that are located at the given position. The position "
"can be either an integer (1 is the first position), the expression "
@@ -876,28 +893,28 @@ msgid ""
"position (e.g. ``last()-1``)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:494
+#: ../../library/xml.etree.elementtree.rst:493
msgid ""
"Predicates (expressions within square brackets) must be preceded by a tag "
"name, an asterisk, or another predicate. ``position`` predicates must be "
"preceded by a tag name."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:499
-#: ../../library/xml.etree.elementtree.rst:834
+#: ../../library/xml.etree.elementtree.rst:498
+#: ../../library/xml.etree.elementtree.rst:833
msgid "Reference"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:504
-#: ../../library/xml.etree.elementtree.rst:839
+#: ../../library/xml.etree.elementtree.rst:503
+#: ../../library/xml.etree.elementtree.rst:838
msgid "Functions"
msgstr "函式"
-#: ../../library/xml.etree.elementtree.rst:508
+#: ../../library/xml.etree.elementtree.rst:507
msgid "`C14N 2.0 `_ transformation function."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:510
+#: ../../library/xml.etree.elementtree.rst:509
msgid ""
"Canonicalization is a way to normalise XML output in a way that allows byte-"
"by-byte comparisons and digital signatures. It reduces the freedom that XML "
@@ -906,7 +923,7 @@ msgid ""
"declarations, the ordering of attributes, and ignorable whitespace."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:516
+#: ../../library/xml.etree.elementtree.rst:515
msgid ""
"This function takes an XML data string (*xml_data*) or a file path or file-"
"like object (*from_file*) as input, converts it to the canonical form, and "
@@ -915,11 +932,11 @@ msgid ""
"should therefore be opened in text mode with ``utf-8`` encoding."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:523
+#: ../../library/xml.etree.elementtree.rst:522
msgid "Typical uses::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:525
+#: ../../library/xml.etree.elementtree.rst:524
msgid ""
"xml_data = \"...\"\n"
"print(canonicalize(xml_data))\n"
@@ -939,59 +956,59 @@ msgstr ""
"with open(\"c14n_output.xml\", mode='w', encoding='utf-8') as out_file:\n"
" canonicalize(from_file=\"inputfile.xml\", out=out_file)"
-#: ../../library/xml.etree.elementtree.rst:534
+#: ../../library/xml.etree.elementtree.rst:533
msgid "The configuration *options* are as follows:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:536
+#: ../../library/xml.etree.elementtree.rst:535
msgid "*with_comments*: set to true to include comments (default: false)"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:537
+#: ../../library/xml.etree.elementtree.rst:536
msgid ""
"*strip_text*: set to true to strip whitespace before and after text content"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:538
-#: ../../library/xml.etree.elementtree.rst:540
+#: ../../library/xml.etree.elementtree.rst:537
+#: ../../library/xml.etree.elementtree.rst:539
msgid "(default: false)"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:539
+#: ../../library/xml.etree.elementtree.rst:538
msgid ""
"*rewrite_prefixes*: set to true to replace namespace prefixes by "
"\"n{number}\""
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:541
+#: ../../library/xml.etree.elementtree.rst:540
msgid "*qname_aware_tags*: a set of qname aware tag names in which prefixes"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:542
-#: ../../library/xml.etree.elementtree.rst:544
+#: ../../library/xml.etree.elementtree.rst:541
+#: ../../library/xml.etree.elementtree.rst:543
msgid "should be replaced in text content (default: empty)"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:543
+#: ../../library/xml.etree.elementtree.rst:542
msgid ""
"*qname_aware_attrs*: a set of qname aware attribute names in which prefixes"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:545
+#: ../../library/xml.etree.elementtree.rst:544
msgid "*exclude_attrs*: a set of attribute names that should not be serialised"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:546
+#: ../../library/xml.etree.elementtree.rst:545
msgid "*exclude_tags*: a set of tag names that should not be serialised"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:548
+#: ../../library/xml.etree.elementtree.rst:547
msgid ""
"In the option list above, \"a set\" refers to any collection or iterable of "
"strings, no ordering is expected."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:556
+#: ../../library/xml.etree.elementtree.rst:555
msgid ""
"Comment element factory. This factory function creates a special element "
"that will be serialized as an XML comment by the standard serializer. The "
@@ -1000,7 +1017,7 @@ msgid ""
"representing a comment."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:562
+#: ../../library/xml.etree.elementtree.rst:561
msgid ""
"Note that :class:`XMLParser` skips over comments in the input instead of "
"creating comment objects for them. An :class:`ElementTree` will only contain "
@@ -1008,29 +1025,29 @@ msgid ""
"class:`Element` methods."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:569
+#: ../../library/xml.etree.elementtree.rst:568
msgid ""
"Writes an element tree or element structure to sys.stdout. This function "
"should be used for debugging only."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:572
+#: ../../library/xml.etree.elementtree.rst:571
msgid ""
"The exact output format is implementation dependent. In this version, it's "
"written as an ordinary XML file."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:575
+#: ../../library/xml.etree.elementtree.rst:574
msgid "*elem* is an element tree or an individual element."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:577
+#: ../../library/xml.etree.elementtree.rst:576
msgid ""
"The :func:`dump` function now preserves the attribute order specified by the "
"user."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:584
+#: ../../library/xml.etree.elementtree.rst:583
msgid ""
"Parses an XML section from a string constant. Same as :func:`XML`. *text* "
"is a string containing XML data. *parser* is an optional parser instance. "
@@ -1038,7 +1055,7 @@ msgid ""
"class:`Element` instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:592
+#: ../../library/xml.etree.elementtree.rst:591
msgid ""
"Parses an XML document from a sequence of string fragments. *sequence* is a "
"list or other sequence containing XML data fragments. *parser* is an "
@@ -1046,7 +1063,7 @@ msgid ""
"parser is used. Returns an :class:`Element` instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:602
+#: ../../library/xml.etree.elementtree.rst:601
msgid ""
"Appends whitespace to the subtree to indent the tree visually. This can be "
"used to generate pretty-printed XML output. *tree* can be an Element or "
@@ -1056,13 +1073,13 @@ msgid ""
"indentation level as *level*."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:614
+#: ../../library/xml.etree.elementtree.rst:613
msgid ""
"Check if an object appears to be a valid element object. *element* is an "
"element instance. Return ``True`` if this is an element object."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:620
+#: ../../library/xml.etree.elementtree.rst:619
msgid ""
"Parses an XML section into an element tree incrementally, and reports what's "
"going on to the user. *source* is a filename or :term:`file object` "
@@ -1080,7 +1097,7 @@ msgid ""
"file object if *source* is a filename."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:636
+#: ../../library/xml.etree.elementtree.rst:635
msgid ""
"Note that while :func:`iterparse` builds the tree incrementally, it issues "
"blocking reads on *source* (or the file it names). As such, it's unsuitable "
@@ -1088,7 +1105,7 @@ msgid ""
"parsing, see :class:`XMLPullParser`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:643
+#: ../../library/xml.etree.elementtree.rst:642
msgid ""
":func:`iterparse` only guarantees that it has seen the \">\" character of a "
"starting tag when it emits a \"start\" event, so the attributes are defined, "
@@ -1097,25 +1114,25 @@ msgid ""
"present."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:649
-#: ../../library/xml.etree.elementtree.rst:1522
+#: ../../library/xml.etree.elementtree.rst:648
+#: ../../library/xml.etree.elementtree.rst:1521
msgid "If you need a fully populated element, look for \"end\" events instead."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:651
+#: ../../library/xml.etree.elementtree.rst:650
msgid "The *parser* argument."
msgstr "*parser* 引數。"
-#: ../../library/xml.etree.elementtree.rst:654
-#: ../../library/xml.etree.elementtree.rst:1526
+#: ../../library/xml.etree.elementtree.rst:653
+#: ../../library/xml.etree.elementtree.rst:1525
msgid "The ``comment`` and ``pi`` events were added."
msgstr "新增 *context* 與 *check_hostname* 事件。"
-#: ../../library/xml.etree.elementtree.rst:657
+#: ../../library/xml.etree.elementtree.rst:656
msgid "Added the :meth:`!close` method."
-msgstr ""
+msgstr "新增 :meth:`!close` 方法。"
-#: ../../library/xml.etree.elementtree.rst:663
+#: ../../library/xml.etree.elementtree.rst:662
msgid ""
"Parses an XML section into an element tree. *source* is a filename or file "
"object containing XML data. *parser* is an optional parser instance. If "
@@ -1123,7 +1140,7 @@ msgid ""
"class:`ElementTree` instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:671
+#: ../../library/xml.etree.elementtree.rst:670
msgid ""
"PI element factory. This factory function creates a special element that "
"will be serialized as an XML processing instruction. *target* is a string "
@@ -1131,7 +1148,7 @@ msgid ""
"given. Returns an element instance, representing a processing instruction."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:676
+#: ../../library/xml.etree.elementtree.rst:675
msgid ""
"Note that :class:`XMLParser` skips over processing instructions in the input "
"instead of creating PI objects for them. An :class:`ElementTree` will only "
@@ -1139,7 +1156,7 @@ msgid ""
"tree using one of the :class:`Element` methods."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:684
+#: ../../library/xml.etree.elementtree.rst:683
msgid ""
"Registers a namespace prefix. The registry is global, and any existing "
"mapping for either the given prefix or the namespace URI will be removed. "
@@ -1148,13 +1165,13 @@ msgid ""
"all possible."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:695
+#: ../../library/xml.etree.elementtree.rst:694
msgid ""
"Subelement factory. This function creates an element instance, and appends "
"it to an existing element."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:698
+#: ../../library/xml.etree.elementtree.rst:697
msgid ""
"The element name, attribute names, and attribute values can be either "
"bytestrings or Unicode strings. *parent* is the parent element. *tag* is "
@@ -1163,7 +1180,7 @@ msgid ""
"arguments. Returns an element instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:709
+#: ../../library/xml.etree.elementtree.rst:708
msgid ""
"Generates a string representation of an XML element, including all "
"subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is "
@@ -1175,24 +1192,24 @@ msgid ""
"Returns an (optionally) encoded string containing the XML data."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:718
-#: ../../library/xml.etree.elementtree.rst:745
-#: ../../library/xml.etree.elementtree.rst:1199
+#: ../../library/xml.etree.elementtree.rst:717
+#: ../../library/xml.etree.elementtree.rst:744
+#: ../../library/xml.etree.elementtree.rst:1198
msgid "Added the *short_empty_elements* parameter."
msgstr "新增 *short_empty_elements* 參數。"
-#: ../../library/xml.etree.elementtree.rst:721
-#: ../../library/xml.etree.elementtree.rst:748
+#: ../../library/xml.etree.elementtree.rst:720
+#: ../../library/xml.etree.elementtree.rst:747
msgid "Added the *xml_declaration* and *default_namespace* parameters."
msgstr "新增 *xml_declaration* 與 *default_namespace* 參數。"
-#: ../../library/xml.etree.elementtree.rst:724
+#: ../../library/xml.etree.elementtree.rst:723
msgid ""
"The :func:`tostring` function now preserves the attribute order specified by "
"the user."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:733
+#: ../../library/xml.etree.elementtree.rst:732
msgid ""
"Generates a string representation of an XML element, including all "
"subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is "
@@ -1206,13 +1223,13 @@ msgid ""
"join(tostringlist(element)) == tostring(element)``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:751
+#: ../../library/xml.etree.elementtree.rst:750
msgid ""
"The :func:`tostringlist` function now preserves the attribute order "
"specified by the user."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:758
+#: ../../library/xml.etree.elementtree.rst:757
msgid ""
"Parses an XML section from a string constant. This function can be used to "
"embed \"XML literals\" in Python code. *text* is a string containing XML "
@@ -1220,7 +1237,7 @@ msgid ""
"class:`XMLParser` parser is used. Returns an :class:`Element` instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:766
+#: ../../library/xml.etree.elementtree.rst:765
msgid ""
"Parses an XML section from a string constant, and also returns a dictionary "
"which maps from element id:s to elements. *text* is a string containing XML "
@@ -1229,11 +1246,11 @@ msgid ""
"`Element` instance and a dictionary."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:776
+#: ../../library/xml.etree.elementtree.rst:775
msgid "XInclude support"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:778
+#: ../../library/xml.etree.elementtree.rst:777
msgid ""
"This module provides limited support for `XInclude directives `_, via the :mod:`xml.etree.ElementInclude` helper "
@@ -1241,7 +1258,7 @@ msgid ""
"element trees, based on information in the tree."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:784
+#: ../../library/xml.etree.elementtree.rst:783
msgid ""
"Here's an example that demonstrates use of the XInclude module. To include "
"an XML document in the current document, use the ``{http://www.w3.org/2001/"
@@ -1249,7 +1266,7 @@ msgid ""
"and use the **href** attribute to specify the document to include."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:786
+#: ../../library/xml.etree.elementtree.rst:785
msgid ""
"\n"
"\n"
@@ -1261,20 +1278,20 @@ msgstr ""
" \n"
""
-#: ../../library/xml.etree.elementtree.rst:793
+#: ../../library/xml.etree.elementtree.rst:792
msgid ""
"By default, the **href** attribute is treated as a file name. You can use "
"custom loaders to override this behaviour. Also note that the standard "
"helper does not support XPointer syntax."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:795
+#: ../../library/xml.etree.elementtree.rst:794
msgid ""
"To process this file, load it as usual, and pass the root element to the :"
"mod:`xml.etree.ElementTree` module:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:797
+#: ../../library/xml.etree.elementtree.rst:796
msgid ""
"from xml.etree import ElementTree, ElementInclude\n"
"\n"
@@ -1290,14 +1307,14 @@ msgstr ""
"\n"
"ElementInclude.include(root)"
-#: ../../library/xml.etree.elementtree.rst:806
+#: ../../library/xml.etree.elementtree.rst:805
msgid ""
"The ElementInclude module replaces the ``{http://www.w3.org/2001/XInclude}"
"include`` element with the root element from the **source.xml** document. "
"The result might look something like this:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:808
+#: ../../library/xml.etree.elementtree.rst:807
msgid ""
"\n"
" This is a paragraph.\n"
@@ -1307,19 +1324,19 @@ msgstr ""
" This is a paragraph.\n"
""
-#: ../../library/xml.etree.elementtree.rst:814
+#: ../../library/xml.etree.elementtree.rst:813
msgid ""
"If the **parse** attribute is omitted, it defaults to \"xml\". The href "
"attribute is required."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:816
+#: ../../library/xml.etree.elementtree.rst:815
msgid ""
"To include a text document, use the ``{http://www.w3.org/2001/XInclude}"
"include`` element, and set the **parse** attribute to \"text\":"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:818
+#: ../../library/xml.etree.elementtree.rst:817
msgid ""
"\n"
"\n"
@@ -1331,11 +1348,11 @@ msgstr ""
" Copyright (c) .\n"
""
-#: ../../library/xml.etree.elementtree.rst:825
+#: ../../library/xml.etree.elementtree.rst:824
msgid "The result might look something like:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:827
+#: ../../library/xml.etree.elementtree.rst:826
msgid ""
"\n"
" Copyright (c) 2003.\n"
@@ -1345,7 +1362,7 @@ msgstr ""
" Copyright (c) 2003.\n"
""
-#: ../../library/xml.etree.elementtree.rst:845
+#: ../../library/xml.etree.elementtree.rst:844
msgid ""
"Default loader. This default loader reads an included resource from disk. "
"*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". "
@@ -1356,7 +1373,7 @@ msgid ""
"``None`` or raise an exception."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:856
+#: ../../library/xml.etree.elementtree.rst:855
msgid ""
"This function expands XInclude directives in-place in tree pointed by "
"*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or "
@@ -1369,21 +1386,21 @@ msgid ""
"malicious content explosion. Pass ``None`` to disable the limitation."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:866
+#: ../../library/xml.etree.elementtree.rst:865
msgid "Added the *base_url* and *max_depth* parameters."
msgstr "新增 *base_url* 與 *max_depth* 參數。"
-#: ../../library/xml.etree.elementtree.rst:873
+#: ../../library/xml.etree.elementtree.rst:872
msgid "Element Objects"
msgstr "Element 物件"
-#: ../../library/xml.etree.elementtree.rst:881
+#: ../../library/xml.etree.elementtree.rst:880
msgid ""
"Element class. This class defines the Element interface, and provides a "
"reference implementation of this interface."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:884
+#: ../../library/xml.etree.elementtree.rst:883
msgid ""
"The element name, attribute names, and attribute values can be either "
"bytestrings or Unicode strings. *tag* is the element name. *attrib* is an "
@@ -1391,13 +1408,13 @@ msgid ""
"additional attributes, given as keyword arguments."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:892
+#: ../../library/xml.etree.elementtree.rst:891
msgid ""
"A string identifying what kind of data this element represents (the element "
"type, in other words)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:899
+#: ../../library/xml.etree.elementtree.rst:898
msgid ""
"These attributes can be used to hold additional data associated with the "
"element. Their values are usually strings but may be any application-"
@@ -1408,11 +1425,11 @@ msgid ""
"the XML data"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:907
+#: ../../library/xml.etree.elementtree.rst:906
msgid "1234"
msgstr "1234"
-#: ../../library/xml.etree.elementtree.rst:911
+#: ../../library/xml.etree.elementtree.rst:910
msgid ""
"the *a* element has ``None`` for both *text* and *tail* attributes, the *b* "
"element has *text* ``\"1\"`` and *tail* ``\"4\"``, the *c* element has "
@@ -1420,17 +1437,17 @@ msgid ""
"``None`` and *tail* ``\"3\"``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:916
+#: ../../library/xml.etree.elementtree.rst:915
msgid ""
"To collect the inner text of an element, see :meth:`itertext`, for example "
"``\"\".join(element.itertext())``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:919
+#: ../../library/xml.etree.elementtree.rst:918
msgid "Applications may store arbitrary objects in these attributes."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:924
+#: ../../library/xml.etree.elementtree.rst:923
msgid ""
"A dictionary containing the element's attributes. Note that while the "
"*attrib* value is always a real mutable Python dictionary, an ElementTree "
@@ -1439,59 +1456,59 @@ msgid ""
"implementations, use the dictionary methods below whenever possible."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:930
+#: ../../library/xml.etree.elementtree.rst:929
msgid "The following dictionary-like methods work on the element attributes."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:935
+#: ../../library/xml.etree.elementtree.rst:934
msgid ""
"Resets an element. This function removes all subelements, clears all "
"attributes, and sets the text and tail attributes to ``None``."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:941
+#: ../../library/xml.etree.elementtree.rst:940
msgid "Gets the element attribute named *key*."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:943
+#: ../../library/xml.etree.elementtree.rst:942
msgid ""
"Returns the attribute value, or *default* if the attribute was not found."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:948
+#: ../../library/xml.etree.elementtree.rst:947
msgid ""
"Returns the element attributes as a sequence of (name, value) pairs. The "
"attributes are returned in an arbitrary order."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:954
+#: ../../library/xml.etree.elementtree.rst:953
msgid ""
"Returns the elements attribute names as a list. The names are returned in "
"an arbitrary order."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:960
+#: ../../library/xml.etree.elementtree.rst:959
msgid "Set the attribute *key* on the element to *value*."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:962
+#: ../../library/xml.etree.elementtree.rst:961
msgid "The following methods work on the element's children (subelements)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:967
+#: ../../library/xml.etree.elementtree.rst:966
msgid ""
"Adds the element *subelement* to the end of this element's internal list of "
"subelements. Raises :exc:`TypeError` if *subelement* is not an :class:"
"`Element`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:974
+#: ../../library/xml.etree.elementtree.rst:973
msgid ""
"Appends *subelements* from an iterable of elements. Raises :exc:`TypeError` "
"if a subelement is not an :class:`Element`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:982
+#: ../../library/xml.etree.elementtree.rst:981
msgid ""
"Finds the first subelement matching *match*. *match* may be a tag name or "
"a :ref:`path `. Returns an element instance or "
@@ -1500,7 +1517,7 @@ msgid ""
"expression into the given namespace."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:991
+#: ../../library/xml.etree.elementtree.rst:990
msgid ""
"Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document "
@@ -1509,7 +1526,7 @@ msgid ""
"expression into the given namespace."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1000
+#: ../../library/xml.etree.elementtree.rst:999
msgid ""
"Finds text for the first subelement matching *match*. *match* may be a tag "
"name or a :ref:`path `. Returns the text content of the "
@@ -1520,13 +1537,13 @@ msgid ""
"into the given namespace."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1011
+#: ../../library/xml.etree.elementtree.rst:1010
msgid ""
"Inserts *subelement* at the given position in this element. Raises :exc:"
"`TypeError` if *subelement* is not an :class:`Element`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1017
+#: ../../library/xml.etree.elementtree.rst:1016
msgid ""
"Creates a tree :term:`iterator` with the current element as the root. The "
"iterator iterates over this element and all elements below it, in document "
@@ -1535,7 +1552,7 @@ msgid ""
"structure is modified during iteration, the result is undefined."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1028
+#: ../../library/xml.etree.elementtree.rst:1027
msgid ""
"Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document "
@@ -1543,33 +1560,33 @@ msgid ""
"name."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1039
+#: ../../library/xml.etree.elementtree.rst:1038
msgid ""
"Creates a text iterator. The iterator loops over this element and all "
"subelements, in document order, and returns all inner text."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1047
+#: ../../library/xml.etree.elementtree.rst:1046
msgid ""
"Creates a new element object of the same type as this element. Do not call "
"this method, use the :func:`SubElement` factory function instead."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1053
+#: ../../library/xml.etree.elementtree.rst:1052
msgid ""
"Removes *subelement* from the element. Unlike the find\\* methods this "
"method compares elements based on the instance identity, not on tag value or "
"contents."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1057
+#: ../../library/xml.etree.elementtree.rst:1056
msgid ""
":class:`Element` objects also support the following sequence type methods "
"for working with subelements: :meth:`~object.__delitem__`, :meth:`~object."
"__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__len__`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1062
+#: ../../library/xml.etree.elementtree.rst:1061
msgid ""
"Caution: Elements with no subelements will test as ``False``. In a future "
"release of Python, all elements will test as ``True`` regardless of whether "
@@ -1577,7 +1594,7 @@ msgid ""
"None`` tests.::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1067
+#: ../../library/xml.etree.elementtree.rst:1066
msgid ""
"element = root.find('foo')\n"
"\n"
@@ -1588,11 +1605,11 @@ msgid ""
" print(\"element not found\")"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1075
+#: ../../library/xml.etree.elementtree.rst:1074
msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1078
+#: ../../library/xml.etree.elementtree.rst:1077
msgid ""
"Prior to Python 3.8, the serialisation order of the XML attributes of "
"elements was artificially made predictable by sorting the attributes by "
@@ -1601,7 +1618,7 @@ msgid ""
"attributes were originally parsed or created by user code."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1084
+#: ../../library/xml.etree.elementtree.rst:1083
msgid ""
"In general, user code should try not to depend on a specific ordering of "
"attributes, given that the `XML Information Set \n"
" \n"
@@ -1750,13 +1767,13 @@ msgstr ""
" \n"
""
-#: ../../library/xml.etree.elementtree.rst:1219
+#: ../../library/xml.etree.elementtree.rst:1218
msgid ""
"Example of changing the attribute \"target\" of every link in first "
"paragraph::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1221
+#: ../../library/xml.etree.elementtree.rst:1220
msgid ""
">>> from xml.etree.ElementTree import ElementTree\n"
">>> tree = ElementTree()\n"
@@ -1774,11 +1791,11 @@ msgid ""
">>> tree.write(\"output.xhtml\")"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1239
+#: ../../library/xml.etree.elementtree.rst:1238
msgid "QName Objects"
msgstr "QName 物件"
-#: ../../library/xml.etree.elementtree.rst:1244
+#: ../../library/xml.etree.elementtree.rst:1243
msgid ""
"QName wrapper. This can be used to wrap a QName attribute value, in order "
"to get proper namespace handling on output. *text_or_uri* is a string "
@@ -1788,11 +1805,11 @@ msgid ""
"class:`QName` instances are opaque."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1256
+#: ../../library/xml.etree.elementtree.rst:1255
msgid "TreeBuilder Objects"
msgstr "TreeBuilder 物件"
-#: ../../library/xml.etree.elementtree.rst:1262
+#: ../../library/xml.etree.elementtree.rst:1261
msgid ""
"Generic element structure builder. This builder converts a sequence of "
"start, data, end, comment and pi method calls to a well-formed element "
@@ -1800,14 +1817,14 @@ msgid ""
"custom XML parser, or a parser for some other XML-like format."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1267
+#: ../../library/xml.etree.elementtree.rst:1266
msgid ""
"*element_factory*, when given, must be a callable accepting two positional "
"arguments: a tag and a dict of attributes. It is expected to return a new "
"element instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1271
+#: ../../library/xml.etree.elementtree.rst:1270
msgid ""
"The *comment_factory* and *pi_factory* functions, when given, should behave "
"like the :func:`Comment` and :func:`ProcessingInstruction` functions to "
@@ -1817,56 +1834,56 @@ msgid ""
"element (but not outside of it)."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1280
+#: ../../library/xml.etree.elementtree.rst:1279
msgid ""
"Flushes the builder buffers, and returns the toplevel document element. "
"Returns an :class:`Element` instance."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1286
+#: ../../library/xml.etree.elementtree.rst:1285
msgid ""
"Adds text to the current element. *data* is a string. This should be "
"either a bytestring, or a Unicode string."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1292
+#: ../../library/xml.etree.elementtree.rst:1291
msgid ""
"Closes the current element. *tag* is the element name. Returns the closed "
"element."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1298
+#: ../../library/xml.etree.elementtree.rst:1297
msgid ""
"Opens a new element. *tag* is the element name. *attrs* is a dictionary "
"containing element attributes. Returns the opened element."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1304
+#: ../../library/xml.etree.elementtree.rst:1303
msgid ""
"Creates a comment with the given *text*. If ``insert_comments`` is true, "
"this will also add it to the tree."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1312
+#: ../../library/xml.etree.elementtree.rst:1311
msgid ""
"Creates a process instruction with the given *target* name and *text*. If "
"``insert_pis`` is true, this will also add it to the tree."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1318
+#: ../../library/xml.etree.elementtree.rst:1317
msgid ""
"In addition, a custom :class:`TreeBuilder` object can provide the following "
"methods:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1323
+#: ../../library/xml.etree.elementtree.rst:1322
msgid ""
"Handles a doctype declaration. *name* is the doctype name. *pubid* is the "
"public identifier. *system* is the system identifier. This method does not "
"exist on the default :class:`TreeBuilder` class."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1331
+#: ../../library/xml.etree.elementtree.rst:1330
msgid ""
"Is called whenever the parser encounters a new namespace declaration, before "
"the ``start()`` callback for the opening element that defines it. *prefix* "
@@ -1874,14 +1891,14 @@ msgid ""
"otherwise. *uri* is the namespace URI."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1340
+#: ../../library/xml.etree.elementtree.rst:1339
msgid ""
"Is called after the ``end()`` callback of an element that declared a "
"namespace prefix mapping, with the name of the *prefix* that went out of "
"scope."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1352
+#: ../../library/xml.etree.elementtree.rst:1351
msgid ""
"A `C14N 2.0 `_ writer. Arguments are the "
"same as for the :func:`canonicalize` function. This class does not build a "
@@ -1889,11 +1906,11 @@ msgid ""
"using the *write* function."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1363
+#: ../../library/xml.etree.elementtree.rst:1362
msgid "XMLParser Objects"
msgstr "XMLParser 物件"
-#: ../../library/xml.etree.elementtree.rst:1368
+#: ../../library/xml.etree.elementtree.rst:1367
msgid ""
"This class is the low-level building block of the module. It uses :mod:`xml."
"parsers.expat` for efficient, event-based parsing of XML. It can be fed XML "
@@ -1904,25 +1921,25 @@ msgid ""
"XML file."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1376
+#: ../../library/xml.etree.elementtree.rst:1375
msgid ""
"Parameters are now :ref:`keyword-only `. The *html* "
"argument is no longer supported."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1383
+#: ../../library/xml.etree.elementtree.rst:1382
msgid ""
"Finishes feeding data to the parser. Returns the result of calling the "
"``close()`` method of the *target* passed during construction; by default, "
"this is the toplevel document element."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1390
+#: ../../library/xml.etree.elementtree.rst:1389
msgid "Feeds data to the parser. *data* is encoded data."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1395
-#: ../../library/xml.etree.elementtree.rst:1473
+#: ../../library/xml.etree.elementtree.rst:1394
+#: ../../library/xml.etree.elementtree.rst:1472
msgid ""
"Triggers parsing of any previously fed unparsed data, which can be used to "
"ensure more immediate feedback, in particular with Expat >=2.6.0. The "
@@ -1932,15 +1949,15 @@ msgid ""
"xmlparser.SetReparseDeferralEnabled` for details."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1402
-#: ../../library/xml.etree.elementtree.rst:1480
+#: ../../library/xml.etree.elementtree.rst:1401
+#: ../../library/xml.etree.elementtree.rst:1479
msgid ""
"Note that :meth:`flush` has been backported to some prior releases of "
"CPython as a security fix. Check for availability of :meth:`flush` using :"
"func:`hasattr` if used in code running across a variety of Python versions."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1410
+#: ../../library/xml.etree.elementtree.rst:1409
msgid ""
":meth:`XMLParser.feed` calls *target*\\'s ``start(tag, attrs_dict)`` method "
"for each opening tag, its ``end(tag)`` method for each closing tag, and data "
@@ -1951,7 +1968,7 @@ msgid ""
"of an XML file::"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1418
+#: ../../library/xml.etree.elementtree.rst:1417
msgid ""
">>> from xml.etree.ElementTree import XMLParser\n"
">>> class MaxDepth: # The target object of the parser\n"
@@ -1986,11 +2003,11 @@ msgid ""
"4"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1454
+#: ../../library/xml.etree.elementtree.rst:1453
msgid "XMLPullParser Objects"
msgstr "XMLPullParser 物件"
-#: ../../library/xml.etree.elementtree.rst:1458
+#: ../../library/xml.etree.elementtree.rst:1457
msgid ""
"A pull parser suitable for non-blocking applications. Its input-side API is "
"similar to that of :class:`XMLParser`, but instead of pushing calls to a "
@@ -2002,11 +2019,11 @@ msgid ""
"If *events* is omitted, only ``\"end\"`` events are reported."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1469
+#: ../../library/xml.etree.elementtree.rst:1468
msgid "Feed the given bytes data to the parser."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1489
+#: ../../library/xml.etree.elementtree.rst:1488
msgid ""
"Signal the parser that the data stream is terminated. Unlike :meth:"
"`XMLParser.close`, this method always returns :const:`None`. Any events not "
@@ -2014,7 +2031,7 @@ msgid ""
"`read_events`."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1496
+#: ../../library/xml.etree.elementtree.rst:1495
msgid ""
"Return an iterator over the events which have been encountered in the data "
"fed to the parser. The iterator yields ``(event, elem)`` pairs, where "
@@ -2023,25 +2040,25 @@ msgid ""
"follows."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1502
+#: ../../library/xml.etree.elementtree.rst:1501
msgid "``start``, ``end``: the current Element."
msgstr "``start``、``end``:目前的 Element。"
-#: ../../library/xml.etree.elementtree.rst:1503
+#: ../../library/xml.etree.elementtree.rst:1502
msgid "``comment``, ``pi``: the current comment / processing instruction"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1504
+#: ../../library/xml.etree.elementtree.rst:1503
msgid ""
"``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace "
"mapping."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1506
+#: ../../library/xml.etree.elementtree.rst:1505
msgid "``end-ns``: :const:`None` (this may change in a future version)"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1508
+#: ../../library/xml.etree.elementtree.rst:1507
msgid ""
"Events provided in a previous call to :meth:`read_events` will not be "
"yielded again. Events are consumed from the internal queue only when they "
@@ -2050,7 +2067,7 @@ msgid ""
"results."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1516
+#: ../../library/xml.etree.elementtree.rst:1515
msgid ""
":class:`XMLPullParser` only guarantees that it has seen the \">\" character "
"of a starting tag when it emits a \"start\" event, so the attributes are "
@@ -2059,11 +2076,11 @@ msgid ""
"be present."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1531
+#: ../../library/xml.etree.elementtree.rst:1530
msgid "Exceptions"
msgstr "例外"
-#: ../../library/xml.etree.elementtree.rst:1535
+#: ../../library/xml.etree.elementtree.rst:1534
msgid ""
"XML parse error, raised by the various parsing methods in this module when "
"parsing fails. The string representation of an instance of this exception "
@@ -2071,22 +2088,22 @@ msgid ""
"following attributes available:"
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1542
+#: ../../library/xml.etree.elementtree.rst:1541
msgid ""
"A numeric error code from the expat parser. See the documentation of :mod:"
"`xml.parsers.expat` for the list of error codes and their meanings."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1547
+#: ../../library/xml.etree.elementtree.rst:1546
msgid ""
"A tuple of *line*, *column* numbers, specifying where the error occurred."
msgstr ""
-#: ../../library/xml.etree.elementtree.rst:1550
+#: ../../library/xml.etree.elementtree.rst:1549
msgid "Footnotes"
msgstr "註解"
-#: ../../library/xml.etree.elementtree.rst:1551
+#: ../../library/xml.etree.elementtree.rst:1550
msgid ""
"The encoding string included in XML output should conform to the appropriate "
"standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See "
diff --git a/library/xml.po b/library/xml.po
index d23f35acd4..9793de3e4f 100644
--- a/library/xml.po
+++ b/library/xml.po
@@ -1,4 +1,4 @@
-# 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.
#
# Translators:
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-04-18 00:04+0000\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2023-08-21 02:16+0000\n"
"Last-Translator: Matt Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -34,14 +34,11 @@ msgstr "Python 處理 XML 的介面被歸類於 ``xml`` 套件中。"
#: ../../library/xml.rst:20
msgid ""
-"The XML modules are not secure against erroneous or maliciously constructed "
-"data. If you need to parse untrusted or unauthenticated data see the :ref:"
-"`xml-vulnerabilities` and :ref:`defusedxml-package` sections."
-msgstr ""
-"XML 模組無法抵禦錯誤或惡意建構的資料。如果你需要剖析不受信任或未經身份驗證的"
-"資料,請參閱 :ref:`xml-vulnerabilities` 和 :ref:`defusedxml-package` 段落。"
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/xml.rst:25
+#: ../../library/xml.rst:23
msgid ""
"It is important to note that modules in the :mod:`xml` package require that "
"there be at least one SAX-compliant XML parser available. The Expat parser "
@@ -52,7 +49,7 @@ msgstr ""
"Expat 剖析器包含在 Python 中,所以總是可以使用 :mod:`xml.parsers.expat` 模"
"組。"
-#: ../../library/xml.rst:30
+#: ../../library/xml.rst:28
msgid ""
"The documentation for the :mod:`xml.dom` and :mod:`xml.sax` packages are the "
"definition of the Python bindings for the DOM and SAX interfaces."
@@ -60,189 +57,70 @@ msgstr ""
":mod:`xml.dom` 和 :mod:`xml.sax` 套件的文件為 DOM 和 SAX 介面的 Python 繫結的"
"定義。"
-#: ../../library/xml.rst:33
+#: ../../library/xml.rst:31
msgid "The XML handling submodules are:"
msgstr "以下是 XML 處理子模組:"
-#: ../../library/xml.rst:35
+#: ../../library/xml.rst:33
msgid ""
":mod:`xml.etree.ElementTree`: the ElementTree API, a simple and lightweight "
"XML processor"
msgstr ""
":mod:`xml.etree.ElementTree`:ElementTree API,一個簡單且輕量級的 XML 處理器"
-#: ../../library/xml.rst:40
+#: ../../library/xml.rst:38
msgid ":mod:`xml.dom`: the DOM API definition"
msgstr ":mod:`xml.dom`:DOM API 定義"
-#: ../../library/xml.rst:41
+#: ../../library/xml.rst:39
msgid ":mod:`xml.dom.minidom`: a minimal DOM implementation"
msgstr ":mod:`xml.dom.minidom`:最小的 DOM 實作"
-#: ../../library/xml.rst:42
+#: ../../library/xml.rst:40
msgid ":mod:`xml.dom.pulldom`: support for building partial DOM trees"
msgstr ":mod:`xml.dom.pulldom`:支援建置部分 DOM 樹"
-#: ../../library/xml.rst:46
+#: ../../library/xml.rst:44
msgid ":mod:`xml.sax`: SAX2 base classes and convenience functions"
msgstr ":mod:`xml.sax`:SAX2 基底類別和便利函式"
-#: ../../library/xml.rst:47
+#: ../../library/xml.rst:45
msgid ":mod:`xml.parsers.expat`: the Expat parser binding"
msgstr ":mod:`xml.parsers.expat`:Expat 剖析器繫結"
-#: ../../library/xml.rst:53
-msgid "XML vulnerabilities"
-msgstr "XML 漏洞"
-
-#: ../../library/xml.rst:55
-msgid ""
-"The XML processing modules are not secure against maliciously constructed "
-"data. An attacker can abuse XML features to carry out denial of service "
-"attacks, access local files, generate network connections to other machines, "
-"or circumvent firewalls."
-msgstr ""
-"XML 處理模組無法抵禦惡意建構的資料。攻擊者可以濫用 XML 功能來執行阻斷服務攻"
-"擊 (denial of service attack)、存取本地檔案、生成與其他機器的網路連接或繞過防"
-"火牆。"
-
-#: ../../library/xml.rst:60
-msgid ""
-"The following table gives an overview of the known attacks and whether the "
-"various modules are vulnerable to them."
-msgstr "下表概述了已知的攻擊以及各個模組是否易有漏洞。"
-
-#: ../../library/xml.rst:64
-msgid "kind"
-msgstr "種類"
-
-#: ../../library/xml.rst:64
-msgid "sax"
-msgstr "sax"
-
-#: ../../library/xml.rst:64
-msgid "etree"
-msgstr "etree"
-
-#: ../../library/xml.rst:64
-msgid "minidom"
-msgstr "minidom"
-
-#: ../../library/xml.rst:64
-msgid "pulldom"
-msgstr "pulldom"
-
-#: ../../library/xml.rst:64
-msgid "xmlrpc"
-msgstr "xmlrpc"
-
-#: ../../library/xml.rst:66
-msgid "billion laughs"
-msgstr "十億笑聲 (billion laughs)"
-
-#: ../../library/xml.rst:66 ../../library/xml.rst:67
-msgid "**Vulnerable** (1)"
-msgstr "**脆弱** (1)"
-
-#: ../../library/xml.rst:67
-msgid "quadratic blowup"
-msgstr "二次爆炸 (quadratic blowup)"
-
-#: ../../library/xml.rst:68 ../../library/xml.rst:106
-msgid "external entity expansion"
-msgstr "外部實體擴展 (external entity expansion)"
-
-#: ../../library/xml.rst:68 ../../library/xml.rst:69
-msgid "Safe (5)"
-msgstr "安全 (5)"
-
-#: ../../library/xml.rst:68
-msgid "Safe (2)"
-msgstr "安全 (2)"
-
-#: ../../library/xml.rst:68
-msgid "Safe (3)"
-msgstr "安全 (3)"
-
-#: ../../library/xml.rst:68
-msgid "Safe (4)"
-msgstr "安全 (4)"
-
-#: ../../library/xml.rst:69 ../../library/xml.rst:111
-msgid "`DTD`_ retrieval"
-msgstr "`DTD`_ 檢索"
-
-#: ../../library/xml.rst:69 ../../library/xml.rst:70
-msgid "Safe"
-msgstr "安全"
-
-#: ../../library/xml.rst:70 ../../library/xml.rst:116
-msgid "decompression bomb"
-msgstr "解壓縮炸彈 (decompression bomb)"
-
-#: ../../library/xml.rst:70
-msgid "**Vulnerable**"
-msgstr "**脆弱**"
-
-#: ../../library/xml.rst:71 ../../library/xml.rst:123
-msgid "large tokens"
-msgstr "大型 token"
-
-#: ../../library/xml.rst:71
-msgid "**Vulnerable** (6)"
-msgstr "**脆弱** (6)"
+#: ../../library/xml.rst:52
+msgid "XML security"
+msgstr "XML 安全性"
-#: ../../library/xml.rst:74
+#: ../../library/xml.rst:54
msgid ""
-"Expat 2.4.1 and newer is not vulnerable to the \"billion laughs\" and "
-"\"quadratic blowup\" vulnerabilities. Items still listed as vulnerable due "
-"to potential reliance on system-provided libraries. Check :const:`!pyexpat."
-"EXPAT_VERSION`."
+"An attacker can abuse XML features to carry out denial of service attacks, "
+"access local files, generate network connections to other machines, or "
+"circumvent firewalls."
msgstr ""
-"Expat 2.4.1 及更新的版本不易受到「十億笑聲」和「二次爆炸」漏洞的影響。但仍可"
-"能由於依賴系統提供的函式庫而被列為易受攻擊的項目。請檢查 :const:`!pyexpat."
-"EXPAT_VERSION`。"
+"攻擊者可以濫用 XML 功能來執行阻斷服務攻擊 (denial of service attack)、存取本地檔案"
+"、生成與其他機器的網路連接或繞過防火牆。"
-#: ../../library/xml.rst:78
+#: ../../library/xml.rst:58
msgid ""
-":mod:`xml.etree.ElementTree` doesn't expand external entities and raises a :"
-"exc:`~xml.etree.ElementTree.ParseError` when an entity occurs."
+"Expat versions lower that 2.6.0 may be vulnerable to \"billion laughs\", "
+"\"quadratic blowup\" and \"large tokens\". Python may be vulnerable if it "
+"uses such older versions of Expat as a system-provided library. Check :const:"
+"`!pyexpat.EXPAT_VERSION`."
msgstr ""
-":mod:`xml.etree.ElementTree` 不會擴展外部實體,並在實體出現時引發 :exc:`~xml."
-"etree.ElementTree.ParseError`。"
+"Expat 低於 2.6.0 的版本容易受到「十億笑聲」、「二次爆炸」與「大型 token」的影響。"
+"Python 也可能因為使用這些系統提供的舊版 Expat 而易受攻擊。請檢查 :const:"
+"`!pyexpat.EXPAT_VERSION`。"
-#: ../../library/xml.rst:80
-msgid ""
-":mod:`xml.dom.minidom` doesn't expand external entities and simply returns "
-"the unexpanded entity verbatim."
-msgstr ":mod:`xml.dom.minidom` 不會擴展外部實體,只會逐字回傳未擴展的實體。"
-
-#: ../../library/xml.rst:82
-msgid ":mod:`xmlrpc.client` doesn't expand external entities and omits them."
-msgstr ":mod:`xmlrpc.client` 不會擴展外部實體且會忽略它們。"
-
-#: ../../library/xml.rst:83
-msgid ""
-"Since Python 3.7.1, external general entities are no longer processed by "
-"default."
-msgstr "從 Python 3.7.1 開始,預設情況下不再處理外部通用實體。"
+#: ../../library/xml.rst:63
+msgid ":mod:`xmlrpc` is **vulnerable** to the \"decompression bomb\" attack."
+msgstr ":mod:`xmlrpc` 容易受到「解壓縮炸彈」攻擊。"
-#: ../../library/xml.rst:85
-msgid ""
-"Expat 2.6.0 and newer is not vulnerable to denial of service through "
-"quadratic runtime caused by parsing large tokens. Items still listed as "
-"vulnerable due to potential reliance on system-provided libraries. Check :"
-"const:`!pyexpat.EXPAT_VERSION`."
-msgstr ""
-"Expat 2.6.0 及更新版本不易受到剖析大型 token 所導致的二次 runtime 阻斷服務的"
-"影響。由於可能依賴系統提供的函式庫,因此仍被列為易受攻擊的項目。請參考 :"
-"const:`!pyexpat.EXPAT_VERSION`。"
-
-#: ../../library/xml.rst:92
+#: ../../library/xml.rst:66
msgid "billion laughs / exponential entity expansion"
msgstr "十億笑聲 / 指數實體擴展"
-#: ../../library/xml.rst:93
+#: ../../library/xml.rst:67
msgid ""
"The `Billion Laughs`_ attack -- also known as exponential entity expansion "
"-- uses multiple levels of nested entities. Each entity refers to another "
@@ -254,11 +132,11 @@ msgstr ""
"expansion))使用多層巢狀實體。每個實體多次引用另一個實體,最終的實體定義包含"
"一個小字串。指數擴展會產生數 GB 的文本,並消耗大量記憶體和 CPU 時間。"
-#: ../../library/xml.rst:99
+#: ../../library/xml.rst:73
msgid "quadratic blowup entity expansion"
msgstr "二次爆炸實體擴展"
-#: ../../library/xml.rst:100
+#: ../../library/xml.rst:74
msgid ""
"A quadratic blowup attack is similar to a `Billion Laughs`_ attack; it "
"abuses entity expansion, too. Instead of nested entities it repeats one "
@@ -270,25 +148,11 @@ msgstr ""
"它不是巢狀實體,而是一遍又一遍地重複一個具有幾千個字元的大型實體。該攻擊不如"
"指數擴展那麼有效率,但它不會觸發那些用來防止深度巢狀實體的剖析器對策。"
-#: ../../library/xml.rst:107
-msgid ""
-"Entity declarations can contain more than just text for replacement. They "
-"can also point to external resources or local files. The XML parser accesses "
-"the resource and embeds the content into the XML document."
-msgstr ""
-"實體聲明不僅僅可以包含用於替換的文本,它們還可以指向外部資源或本地檔案。XML "
-"剖析器會存取資源並將內容嵌入到 XML 文件中。"
-
-#: ../../library/xml.rst:112
-msgid ""
-"Some XML libraries like Python's :mod:`xml.dom.pulldom` retrieve document "
-"type definitions from remote or local locations. The feature has similar "
-"implications as the external entity expansion issue."
-msgstr ""
-"一些 XML 函式庫(例如 Python 的 :mod:`xml.dom.pulldom`)從遠端或本地位置檢索"
-"文件類型定義。該功能與外部實體擴展問題具有類似的含義。"
+#: ../../library/xml.rst:80
+msgid "decompression bomb"
+msgstr "解壓縮炸彈 (decompression bomb)"
-#: ../../library/xml.rst:117
+#: ../../library/xml.rst:81
msgid ""
"Decompression bombs (aka `ZIP bomb`_) apply to all XML libraries that can "
"parse compressed XML streams such as gzipped HTTP streams or LZMA-compressed "
@@ -299,7 +163,11 @@ msgstr ""
"壓縮的 HTTP 串流或 LZMA 壓縮檔案)的 XML 函式庫。對於攻擊者來說,它可以將傳輸"
"的資料量減少三個或更多數量級。"
-#: ../../library/xml.rst:124
+#: ../../library/xml.rst:87
+msgid "large tokens"
+msgstr "大型 token"
+
+#: ../../library/xml.rst:88
msgid ""
"Expat needs to re-parse unfinished tokens; without the protection introduced "
"in Expat 2.6.0, this can lead to quadratic runtime that can be used to cause "
@@ -309,28 +177,3 @@ msgstr ""
"Expat 需要重新剖析未完成的 token;如果沒有 Expat 2.6.0 中引入的保護,這可能會"
"導致二次 runtime 而導致剖析 XML 的應用程式出現阻斷服務。此問題記錄於 :cve:"
"`2023-52425`。"
-
-#: ../../library/xml.rst:129
-msgid ""
-"The documentation for :pypi:`defusedxml` on PyPI has further information "
-"about all known attack vectors with examples and references."
-msgstr ""
-"PyPI 上的 :pypi:`defusedxml` 文件包含有關所有已知攻擊媒介 (attack vector) 的"
-"更多資訊以及範例和參考資料。"
-
-#: ../../library/xml.rst:135
-msgid "The :mod:`!defusedxml` Package"
-msgstr ":mod:`!defusedxml` 套件"
-
-#: ../../library/xml.rst:137
-msgid ""
-":pypi:`defusedxml` is a pure Python package with modified subclasses of all "
-"stdlib XML parsers that prevent any potentially malicious operation. Use of "
-"this package is recommended for any server code that parses untrusted XML "
-"data. The package also ships with example exploits and extended "
-"documentation on more XML exploits such as XPath injection."
-msgstr ""
-":pypi:`defusedxml` 是一個純 Python 套件,其中包含所有標準函式庫中 XML 剖析器"
-"的修正版本子類別,可防止任何潛在的惡意操作。當伺服器程式會剖析任何不受信任的 "
-"XML 資料時建議使用此套件。該套件還附帶了更多有關 XML 漏洞(例如 XPath 注入)"
-"的範例和延伸文件。"
diff --git a/library/xml.sax.po b/library/xml.sax.po
index 2e824867ca..84e8592adb 100644
--- a/library/xml.sax.po
+++ b/library/xml.sax.po
@@ -1,13 +1,13 @@
-# 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:
+# Liang-Bo Wang , 2016
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-05-09 00:03+0000\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2016-11-19 00:36+0000\n"
"Last-Translator: Liang-Bo Wang \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -36,12 +36,11 @@ msgstr ""
#: ../../library/xml.sax.rst:23
msgid ""
-"The :mod:`xml.sax` module is not secure against maliciously constructed "
-"data. If you need to parse untrusted or unauthenticated data see :ref:`xml-"
-"vulnerabilities`."
-msgstr ""
+"If you need to parse untrusted or unauthenticated data, see :ref:`xml-"
+"security`."
+msgstr "如果你需要剖析不受信任或未經驗證的資料,請參閱 :ref:`xml-security`。"
-#: ../../library/xml.sax.rst:29
+#: ../../library/xml.sax.rst:28
msgid ""
"The SAX parser no longer processes general external entities by default to "
"increase security. Before, the parser created network connections to fetch "
@@ -51,11 +50,11 @@ msgid ""
"`~xml.sax.handler.feature_external_ges`."
msgstr ""
-#: ../../library/xml.sax.rst:36
+#: ../../library/xml.sax.rst:35
msgid "The convenience functions are:"
msgstr ""
-#: ../../library/xml.sax.rst:41
+#: ../../library/xml.sax.rst:40
msgid ""
"Create and return a SAX :class:`~xml.sax.xmlreader.XMLReader` object. The "
"first parser found will be used. If *parser_list* is provided, it must be "
@@ -64,11 +63,11 @@ msgid ""
"modules in the default list of parsers."
msgstr ""
-#: ../../library/xml.sax.rst:47
+#: ../../library/xml.sax.rst:46
msgid "The *parser_list* argument can be any iterable, not just a list."
msgstr ""
-#: ../../library/xml.sax.rst:53
+#: ../../library/xml.sax.rst:52
msgid ""
"Create a SAX parser and use it to parse a document. The document, passed in "
"as *filename_or_stream*, can be a filename or a file object. The *handler* "
@@ -79,18 +78,18 @@ msgid ""
"passed in."
msgstr ""
-#: ../../library/xml.sax.rst:64
+#: ../../library/xml.sax.rst:63
msgid ""
"Similar to :func:`parse`, but parses from a buffer *string* received as a "
"parameter. *string* must be a :class:`str` instance or a :term:`bytes-like "
"object`."
msgstr ""
-#: ../../library/xml.sax.rst:68
+#: ../../library/xml.sax.rst:67
msgid "Added support of :class:`str` instances."
msgstr "新增 :class:`str` 實例的支援。"
-#: ../../library/xml.sax.rst:71
+#: ../../library/xml.sax.rst:70
msgid ""
"A typical SAX application uses three kinds of objects: readers, handlers and "
"input sources. \"Reader\" in this context is another term for parser, i.e. "
@@ -104,7 +103,7 @@ msgid ""
"structural and syntactic events from the input data."
msgstr ""
-#: ../../library/xml.sax.rst:82
+#: ../../library/xml.sax.rst:81
msgid ""
"For these objects, only the interfaces are relevant; they are normally not "
"instantiated by the application itself. Since Python does not have an "
@@ -120,13 +119,13 @@ msgid ""
"interfaces are described below."
msgstr ""
-#: ../../library/xml.sax.rst:95
+#: ../../library/xml.sax.rst:94
msgid ""
"In addition to these classes, :mod:`xml.sax` provides the following "
"exception classes."
msgstr ""
-#: ../../library/xml.sax.rst:101
+#: ../../library/xml.sax.rst:100
msgid ""
"Encapsulate an XML error or warning. This class can contain basic error or "
"warning information from either the XML parser or the application: it can be "
@@ -137,7 +136,7 @@ msgid ""
"container for information."
msgstr ""
-#: ../../library/xml.sax.rst:109
+#: ../../library/xml.sax.rst:108
msgid ""
"When instantiated, *msg* should be a human-readable description of the "
"error. The optional *exception* parameter, if given, should be ``None`` or "
@@ -145,11 +144,11 @@ msgid ""
"as information."
msgstr ""
-#: ../../library/xml.sax.rst:113
+#: ../../library/xml.sax.rst:112
msgid "This is the base class for the other SAX exception classes."
msgstr ""
-#: ../../library/xml.sax.rst:118
+#: ../../library/xml.sax.rst:117
msgid ""
"Subclass of :exc:`SAXException` raised on parse errors. Instances of this "
"class are passed to the methods of the SAX :class:`~xml.sax.handler."
@@ -158,14 +157,14 @@ msgid ""
"as the :class:`SAXException` interface."
msgstr ""
-#: ../../library/xml.sax.rst:128
+#: ../../library/xml.sax.rst:127
msgid ""
"Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader."
"XMLReader` is confronted with an unrecognized feature or property. SAX "
"applications and extensions may use this class for similar purposes."
msgstr ""
-#: ../../library/xml.sax.rst:136
+#: ../../library/xml.sax.rst:135
msgid ""
"Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader."
"XMLReader` is asked to enable a feature that is not supported, or to set a "
@@ -173,54 +172,54 @@ msgid ""
"applications and extensions may use this class for similar purposes."
msgstr ""
-#: ../../library/xml.sax.rst:145
+#: ../../library/xml.sax.rst:144
msgid "`SAX: The Simple API for XML `_"
msgstr ""
-#: ../../library/xml.sax.rst:146
+#: ../../library/xml.sax.rst:145
msgid ""
"This site is the focal point for the definition of the SAX API. It provides "
"a Java implementation and online documentation. Links to implementations "
"and historical information are also available."
msgstr ""
-#: ../../library/xml.sax.rst:150
+#: ../../library/xml.sax.rst:149
msgid "Module :mod:`xml.sax.handler`"
msgstr ":mod:`xml.sax.handler` 模組"
-#: ../../library/xml.sax.rst:151
+#: ../../library/xml.sax.rst:150
msgid "Definitions of the interfaces for application-provided objects."
msgstr ""
-#: ../../library/xml.sax.rst:153
+#: ../../library/xml.sax.rst:152
msgid "Module :mod:`xml.sax.saxutils`"
msgstr ":mod:`xml.sax.saxutils` 模組"
-#: ../../library/xml.sax.rst:154
+#: ../../library/xml.sax.rst:153
msgid "Convenience functions for use in SAX applications."
msgstr ""
-#: ../../library/xml.sax.rst:156
+#: ../../library/xml.sax.rst:155
msgid "Module :mod:`xml.sax.xmlreader`"
msgstr ":mod:`xml.sax.xmlreader` 模組"
-#: ../../library/xml.sax.rst:157
+#: ../../library/xml.sax.rst:156
msgid "Definitions of the interfaces for parser-provided objects."
msgstr ""
-#: ../../library/xml.sax.rst:163
+#: ../../library/xml.sax.rst:162
msgid "SAXException Objects"
msgstr "SAXException 物件"
-#: ../../library/xml.sax.rst:165
+#: ../../library/xml.sax.rst:164
msgid ""
"The :class:`SAXException` exception class supports the following methods:"
msgstr ""
-#: ../../library/xml.sax.rst:170
+#: ../../library/xml.sax.rst:169
msgid "Return a human-readable message describing the error condition."
msgstr ""
-#: ../../library/xml.sax.rst:175
+#: ../../library/xml.sax.rst:174
msgid "Return an encapsulated exception object, or ``None``."
msgstr ""
diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po
index 9835d74f1c..11a0724cc9 100644
--- a/library/xmlrpc.client.po
+++ b/library/xmlrpc.client.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-03-04 00:14+0000\n"
+"POT-Creation-Date: 2025-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:16+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -19,7 +19,7 @@ msgstr ""
#: ../../library/xmlrpc.client.rst:2
msgid ":mod:`!xmlrpc.client` --- XML-RPC client access"
-msgstr ":mod:`!xmlrpc.client` --- XML-RPC 客戶端存取"
+msgstr ":mod:`!xmlrpc.client` --- XML-RPC 用戶端存取"
#: ../../library/xmlrpc.client.rst:10
msgid "**Source code:** :source:`Lib/xmlrpc/client.py`"
@@ -37,8 +37,8 @@ msgstr ""
#: ../../library/xmlrpc.client.rst:26
msgid ""
"The :mod:`xmlrpc.client` module is not secure against maliciously "
-"constructed data. If you need to parse untrusted or unauthenticated data "
-"see :ref:`xml-vulnerabilities`."
+"constructed data. If you need to parse untrusted or unauthenticated data, "
+"see :ref:`xml-security`."
msgstr ""
#: ../../library/xmlrpc.client.rst:32
@@ -49,7 +49,7 @@ msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/xmlrpc.server.po b/library/xmlrpc.server.po
index 7a0eb729b9..2f9746ce24 100644
--- a/library/xmlrpc.server.po
+++ b/library/xmlrpc.server.po
@@ -7,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-07-07 10:49+0000\n"
"PO-Revision-Date: 2018-05-23 16:16+0000\n"
"Last-Translator: Adrian Liaw \n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,13 +37,13 @@ msgstr ""
#: ../../library/xmlrpc.server.rst:22
msgid ""
"The :mod:`xmlrpc.server` module is not secure against maliciously "
-"constructed data. If you need to parse untrusted or unauthenticated data "
-"see :ref:`xml-vulnerabilities`."
+"constructed data. If you need to parse untrusted or unauthenticated data, "
+"see :ref:`xml-security`."
msgstr ""
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
diff --git a/library/zipapp.po b/library/zipapp.po
index 02fc69d0ea..d8c15093bb 100644
--- a/library/zipapp.po
+++ b/library/zipapp.po
@@ -1,7 +1,8 @@
-# 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.
#
# Translators:
+# Adrian Liaw , 2018
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
@@ -57,7 +58,7 @@ msgstr ""
#: ../../library/zipapp.rst:40
msgid "Command-Line Interface"
-msgstr "命令執行列介面"
+msgstr "命令列介面"
#: ../../library/zipapp.rst:42
msgid ""
diff --git a/library/zipimport.po b/library/zipimport.po
index f338c8d147..45836ce278 100644
--- a/library/zipimport.po
+++ b/library/zipimport.po
@@ -164,7 +164,7 @@ msgstr ""
#: ../../library/zipimport.rst:118
msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`."
-msgstr ""
+msgstr ":exc:`IOError` 曾經被引發,現在它是一個 :exc:`OSError` 的別名。"
#: ../../library/zipimport.rst:124
msgid ""
diff --git a/library/zlib.po b/library/zlib.po
index ab476e6640..6f1742c7e5 100644
--- a/library/zlib.po
+++ b/library/zlib.po
@@ -476,7 +476,7 @@ msgid ""
"`unconsumed_tail` is empty."
msgstr ""
"如果可選參數 *max_length* 不是零,則回傳值長度將不超過 *max_length*。這代表著"
-"並不是所有的已壓縮輸入都可以被處理;未使用的資料將被存儲在屬性 :attr:"
+"並不是所有的已壓縮輸入都可以被處理;未使用的資料將被儲存在屬性 :attr:"
"`unconsumed_tail` 中。如果要繼續解壓縮,則必須將此位元組字串傳遞給後續對 :"
"meth:`decompress` 的呼叫。如果 *max_length* 為零,則整個輸入會被解壓縮,並"
"且 :attr:`unconsumed_tail` 為空。"
diff --git a/sphinx.po b/sphinx.po
index d7a2b6f202..df4d716271 100644
--- a/sphinx.po
+++ b/sphinx.po
@@ -211,7 +211,7 @@ msgstr ""
#: ../../tools/templates/dummy.html:6
msgid "Availability"
-msgstr "適用"
+msgstr "可用性"
#: ../../tools/templates/dummy.html:10
msgid "Part of the"
diff --git a/tutorial/classes.po b/tutorial/classes.po
index 388fa0b934..1a71fad46f 100644
--- a/tutorial/classes.po
+++ b/tutorial/classes.po
@@ -935,7 +935,7 @@ msgid ""
"implementation details and control access to an object if necessary; this "
"can be used by extensions to Python written in C.)"
msgstr ""
-"資料屬性可能被 method 或是被物件的一般使用者(「客戶端」)所參照。也就是說,"
+"資料屬性可能被 method 或是被物件的一般使用者(「用戶端」)所參照。也就是說,"
"class 不可用於實作純粹抽象的資料型別。事實上,在 Python 中沒有任何可能的方"
"法,可強制隱藏資料——這都是基於慣例。(另一方面,以 C 編寫的 Python 實作可以完"
"全隱藏實作細節並且在必要時控制物件的存取;這可以被以 C 編寫的 Python 擴充所使"
@@ -949,8 +949,8 @@ msgid ""
"without affecting the validity of the methods, as long as name conflicts are "
"avoided --- again, a naming convention can save a lot of headaches here."
msgstr ""
-"客戶端應該小心使用資料屬性——客戶端可能會因為覆寫他們的資料屬性,而破壞了被 "
-"method 維護的不變性。注意,客戶端可以增加他們自己的資料屬性到實例物件,但不影"
+"用戶端應該小心使用資料屬性——用戶端可能會因為覆寫他們的資料屬性,而破壞了被 "
+"method 維護的不變性。注意,用戶端可以增加他們自己的資料屬性到實例物件,但不影"
"響 method 的有效性,只要避免名稱衝突即可——再一次提醒,命名慣例可以在這裡節省"
"很多麻煩。"
@@ -1180,7 +1180,7 @@ msgid ""
msgstr ""
"一個在 derived class 覆寫的 method 可能事實上是想要擴充而非單純取代 base "
"class 中相同名稱的 method。要直接呼叫 base class 的 method 有一個簡單的方法:"
-"只要呼叫 ``BaseClassName.methodname(self, arguments)``。這有時對客戶端也很有"
+"只要呼叫 ``BaseClassName.methodname(self, arguments)``。這有時對用戶端也很有"
"用。(請注意,只有在 base class 在全域作用域可以用 ``BaseClassName`` 被存取"
"時,這方法才有效。)"
diff --git a/using/cmdline.po b/using/cmdline.po
index e2e5b79b5f..e7c7599538 100644
--- a/using/cmdline.po
+++ b/using/cmdline.po
@@ -1315,7 +1315,7 @@ msgstr ""
#: ../../using/cmdline.rst:1036 ../../using/cmdline.rst:1050
#: ../../using/cmdline.rst:1101
msgid "Availability"
-msgstr ""
+msgstr "可用性"
#: ../../using/cmdline.rst:1038
msgid "See :pep:`529` for more details."
diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po
index a8999ecb85..f79b665bae 100644
--- a/whatsnew/3.10.po
+++ b/whatsnew/3.10.po
@@ -1597,7 +1597,7 @@ msgid ""
"howto`. (Contributed by Larry Hastings in :issue:`43901`.)"
msgstr ""
"類別和模組物件現在會根據需求來延遲建立 (lazy-create) 空的註釋字典 "
-"(annotations dicts)。註釋字典存儲在物件的 ``__dict__`` 中以達成向後相容性。這"
+"(annotations dicts)。註釋字典儲存在物件的 ``__dict__`` 中以達成向後相容性。這"
"改進了 ``__annotations__`` 使用方式的最佳實踐方法;有關更多資訊,請參閱 :ref:"
"`annotations-howto`。(由 Larry Hastings 在 :issue:`43901` 中貢獻。)"
@@ -2515,7 +2515,7 @@ msgid ""
"(Contributed by Zackery Spytz in :issue:`34204`.)"
msgstr ""
"現在,:mod:`shelve` 模組在建立 shelve 時預設使用 :const:`pickle."
-"DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協議 ``3``。(由 Zackery Spytz 在 :"
+"DEFAULT_PROTOCOL`,而不是 :mod:`pickle` 的協定 ``3``。(由 Zackery Spytz 在 :"
"issue:`34204` 中貢獻。)"
#: ../../whatsnew/3.10.rst:1332
@@ -2614,7 +2614,7 @@ msgid ""
msgstr ""
"ssl 模組現在具有更安全的預設設定。預設情況下禁用沒有前向保密或 SHA-1 MAC 的密"
"碼。安全級別 2 禁止安全性低於 112 位元的弱 RSA、DH 和 ECC 密鑰。 :class:"
-"`~ssl.SSLContext` 預設為最低協議版本 TLS 1.2。設定基於 Hynek Schlawack 的研"
+"`~ssl.SSLContext` 預設為最低協定版本 TLS 1.2。設定基於 Hynek Schlawack 的研"
"究。(由 Christian Heimes 在 :issue:`43998` 中貢獻。)"
#: ../../whatsnew/3.10.rst:1384
@@ -2624,7 +2624,7 @@ msgid ""
"build options, distro configurations, vendor patches, and cipher suites may "
"prevent a successful handshake."
msgstr ""
-"不再正式支援已棄用的協議 SSL 3.0、TLS 1.0 和 TLS 1.1。 Python 不會主動阻止它"
+"不再正式支援已棄用的協定 SSL 3.0、TLS 1.0 和 TLS 1.1。 Python 不會主動阻止它"
"們。然而,OpenSSL 建置選項、發行版配置、發行商補丁和密碼套件可能會阻止交握的"
"成功。"
@@ -2843,7 +2843,7 @@ msgid ""
msgstr ""
"僅宣告了資料變數的 ``typing.Protocol`` 子類別現在在使用 ``isinstance`` 檢查時"
"會引發 ``TypeError`` ,除非它們用 :func:`~typing.runtime_checkable` 裝飾。此"
-"前,這些檢查都是悄無聲息地通過的。如果使用者需要執行環境協議 (runtime "
+"前,這些檢查都是悄無聲息地通過的。如果使用者需要執行環境協定 (runtime "
"protocol),則應該使用 :func:`!runtime_checkable` 裝飾器來裝飾其子類別。(由 "
"Yurii Karabas 在 :issue:`38908` 中貢獻。)"
@@ -3024,7 +3024,7 @@ msgid ""
"define an annotated function by half. (Contributed by Yurii Karabas and "
"Inada Naoki in :issue:`42202`.)"
msgstr ""
-"使用字串化註釋時,建立函式時不再建立函式的註釋字典。取而代之的是它們被存儲為"
+"使用字串化註釋時,建立函式時不再建立函式的註釋字典。取而代之的是它們被儲存為"
"字串元組,且函式物件會根據需求才將其延遲轉換 (lazily convert) 為註釋字典。此"
"最佳化將定義帶有註釋的函式所需的 CPU 時間減少了一半。(由 Yurii Karabas 和 "
"Inada Naoki 在 :issue:`42202` 中貢獻。)"
diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po
index 468df5d85e..270fd31027 100644
--- a/whatsnew/3.11.po
+++ b/whatsnew/3.11.po
@@ -740,9 +740,9 @@ msgid ""
"supporting the :term:`asynchronous context manager` protocol. (Contributed "
"by Serhiy Storchaka in :issue:`12022` and :issue:`44471`.)"
msgstr ""
-"現在在不支援 :term:`context manager` 協議的物件上使用 :keyword:`with` 陳述式"
+"現在在不支援 :term:`context manager` 協定的物件上使用 :keyword:`with` 陳述式"
"和 :meth:`contextlib.ExitStack.enter_context` 或在不支援 :term:`asynchronous "
-"context manager` 協議的物件上使用 :keyword:`async with` 陳述式"
+"context manager` 協定的物件上使用 :keyword:`async with` 陳述式"
"和 :meth:`contextlib.AsyncExitStack.enter_async_context`,會引"
"發 :exc:`TypeError` 而不是 :exc:`AttributeError`。(由 Serhiy Storchaka "
"在 :issue:`12022` 和 :issue:`44471` 中貢獻。)"
@@ -1385,7 +1385,7 @@ msgid ""
"triggering dynamic lookup via the descriptor protocol. (Contributed by "
"Weipeng Hong in :issue:`30533`.)"
msgstr ""
-"添加 :func:`~inspect.getmembers_static` 以回傳所有成員,而不會通過描述器協議 "
+"添加 :func:`~inspect.getmembers_static` 以回傳所有成員,而不會通過描述器協定 "
"(descriptor protocol) 觸發動態查找。(由 Weipeng Hong 在 :issue:`30533` 中貢"
"獻。)"
@@ -2227,7 +2227,7 @@ msgid ""
"272 bytes (23% smaller) on 64-bit platforms. (Contributed by Inada Naoki "
"in :issue:`46845`.)"
msgstr ""
-"當所有鍵都是 Unicode 物件時,字典不存儲雜湊值,減少了 :class:`dict` 的大小。"
+"當所有鍵都是 Unicode 物件時,字典不儲存雜湊值,減少了 :class:`dict` 的大小。"
"例如,``sys.getsizeof(dict.fromkeys(\"abcdefg\"))`` 在 64-bit 平台上從 352 位"
"元組減少到 272 位元組(減少 23%)。(由 Inada Naoki 在 :issue:`46845` 中貢"
"獻。)"
diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po
index 88a9f991f4..10b8535db4 100644
--- a/whatsnew/3.3.po
+++ b/whatsnew/3.3.po
@@ -3118,7 +3118,7 @@ msgid ""
"allowing an ``SMTP`` instance to be used in a ``with`` statement. "
"(Contributed by Giampaolo Rodolà in :issue:`11289`.)"
msgstr ""
-":class:`~smtplib.SMTP` 現在支援情境管理協議,允許在 ``with`` 陳述式中使用 "
+":class:`~smtplib.SMTP` 現在支援情境管理協定,允許在 ``with`` 陳述式中使用 "
"``SMTP`` 實例。(由 Giampaolo Rodolà 在 :issue:`11289` 中貢獻。)"
#: ../../whatsnew/3.3.rst:1872
@@ -3170,7 +3170,7 @@ msgid ""
"Articles/253425)."
msgstr ""
":class:`~socket.socket` 類別現在支援 Linux (https://lwn.net/Articles/253425) "
-"上的 PF_CAN 協議系列 (https://en.wikipedia.org/wiki/Socketcan)。"
+"上的 PF_CAN 協定系列 (https://en.wikipedia.org/wiki/Socketcan)。"
#: ../../whatsnew/3.3.rst:1894
msgid ""
@@ -3186,7 +3186,7 @@ msgid ""
"oss.oracle.com/projects/rds `__)."
msgstr ""
-":class:`~socket.socket` 類別現在支援 PF_RDS 協議系列(https://"
+":class:`~socket.socket` 類別現在支援 PF_RDS 協定系列(https://"
"en.wikipedia.org/wiki/Reliable_Datagram_Sockets 和 `https://oss.oracle.com/"
"projects/rds `__\\ )。"
@@ -3196,7 +3196,7 @@ msgid ""
"The :class:`~socket.socket` class now supports the ``PF_SYSTEM`` protocol "
"family on OS X. (Contributed by Michael Goderbauer in :issue:`13777`.)"
msgstr ""
-":class:`~socket.socket` 類別現在支援 OS X 上的 ``PF_SYSTEM`` 協議系列。(由 "
+":class:`~socket.socket` 類別現在支援 OS X 上的 ``PF_SYSTEM`` 協定系列。(由 "
"Michael Goderbauer 在 :issue:`13777` 中貢獻。)"
#: ../../whatsnew/3.3.rst:1903
diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po
index 539167e103..fe25245c63 100644
--- a/whatsnew/3.5.po
+++ b/whatsnew/3.5.po
@@ -3117,7 +3117,7 @@ msgstr "unittest.mock"
#: ../../whatsnew/3.5.rst:2006
msgid "The :class:`~unittest.mock.Mock` class has the following improvements:"
-msgstr ""
+msgstr ":class:`~unittest.mock.Mock` 類別有以下改進:"
#: ../../whatsnew/3.5.rst:2008
msgid ""
diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po
index 1597fc5373..caa8a48d91 100644
--- a/whatsnew/3.6.po
+++ b/whatsnew/3.6.po
@@ -2439,7 +2439,7 @@ msgstr "unittest.mock"
#: ../../whatsnew/3.6.rst:1658
msgid "The :class:`~unittest.mock.Mock` class has the following improvements:"
-msgstr ""
+msgstr ":class:`~unittest.mock.Mock` 類別有以下改進:"
#: ../../whatsnew/3.6.rst:1660
msgid ""
@@ -2886,7 +2886,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:1939
msgid "Deprecated Python behavior"
-msgstr ""
+msgstr "已棄用的 Python 行為"
#: ../../whatsnew/3.6.rst:1941
msgid ""
@@ -2922,7 +2922,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:1963
msgid "Deprecated Python modules, functions and methods"
-msgstr ""
+msgstr "已棄用的 Python 模組、函式和方法"
#: ../../whatsnew/3.6.rst:1966
msgid "asynchat"
@@ -3058,7 +3058,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:2080
msgid "Deprecated functions and types of the C API"
-msgstr ""
+msgstr "C API 的已棄用函式和型別"
#: ../../whatsnew/3.6.rst:2082
msgid ""
@@ -3070,7 +3070,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:2089
msgid "Deprecated Build Options"
-msgstr ""
+msgstr "已棄用的建置選項"
#: ../../whatsnew/3.6.rst:2091
msgid ""
@@ -3113,6 +3113,10 @@ msgid ""
"the :mod:`traceback` module. They were undocumented methods deprecated since "
"Python 3.2 and equivalent functionality is available from private methods."
msgstr ""
+":mod:`traceback` 模組中的 ``traceback.Ignore`` 類別和 ``traceback.usage``、"
+"``traceback.modname``、``traceback.fullmodname``、``traceback.find_lines_from_code``、"
+"``traceback.find_lines``、``traceback.find_strings`` 和 ``traceback.find_executable_lines`` "
+"方法已被移除。它們是自 Python 3.2 以來已棄用的未記錄方法,等效的功能現在可從私有方法獲得。"
#: ../../whatsnew/3.6.rst:2121
msgid ""
@@ -3142,7 +3146,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:2138
msgid "The deprecated ``asynchat.fifo`` class has been removed."
-msgstr ""
+msgstr "已棄用的 ``asynchat.fifo`` 類別已移除。"
#: ../../whatsnew/3.6.rst:2142
msgid "Porting to Python 3.6"
@@ -3156,7 +3160,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:2148
msgid "Changes in 'python' Command Behavior"
-msgstr ""
+msgstr "'python' 命令的行為變更"
#: ../../whatsnew/3.6.rst:2150
msgid ""
@@ -3306,6 +3310,10 @@ msgid ""
"are now :ref:`keyword-only `. (Contributed by Serhiy "
"Storchaka in :issue:`18726`.)"
msgstr ""
+"在 :mod:`json` 模組中,:func:`~json.dump`、:func:`~json.dumps`、:func:`~json.load` "
+"和 :func:`~json.loads` 函式以及 :class:`~json.JSONEncoder` 和 :class:`~json.JSONDecoder` "
+"類別建構函式的所有可選引數現在都是\\ :ref:`僅限關鍵字 `\\ 引數。"
+"(由 Serhiy Storchaka 在 :issue:`18726` 中貢獻。)"
#: ../../whatsnew/3.6.rst:2250
msgid ""
@@ -3520,7 +3528,7 @@ msgstr "Python 3.6.2 中顯著的變更"
#: ../../whatsnew/3.6.rst:2398
msgid "New ``make regen-all`` build target"
-msgstr ""
+msgstr "新增 ``make regen-all`` 建置目標"
#: ../../whatsnew/3.6.rst:2400
msgid ""
@@ -3549,7 +3557,7 @@ msgstr "(由 Victor Stinner 於 :issue:`23404` 中貢獻。)"
#: ../../whatsnew/3.6.rst:2418
msgid "Removal of ``make touch`` build target"
-msgstr ""
+msgstr "移除 ``make touch`` 建置目標"
#: ../../whatsnew/3.6.rst:2420
msgid ""
@@ -3560,7 +3568,7 @@ msgstr ""
#: ../../whatsnew/3.6.rst:2423
msgid "It has been replaced by the new ``make regen-all`` target."
-msgstr ""
+msgstr "它已被新的 ``make regen-all`` 目標取代。"
#: ../../whatsnew/3.6.rst:2431
msgid "Notable changes in Python 3.6.4"
diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po
index 0d12d8d64e..2be2bb9af4 100644
--- a/whatsnew/3.9.po
+++ b/whatsnew/3.9.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-07-07 10:49+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-"
@@ -32,8 +32,8 @@ msgstr "Łukasz Langa"
#: ../../whatsnew/3.9.rst:45
msgid ""
"This article explains the new features in Python 3.9, compared to 3.8. "
-"Python 3.9 was released on October 5, 2020. For full details, see "
-"the :ref:`changelog `."
+"Python 3.9 was released on October 5, 2020. For full details, see the :ref:"
+"`changelog `."
msgstr ""
"本文介紹了 Python 3.9 與 3.8 相比多了哪些新功能。Python 3.9 已於 2020 年 10 "
"月 5 日發布。有關完整詳細資訊,請參閱 :ref:`changelog `。"
@@ -109,19 +109,19 @@ msgstr ""
#: ../../whatsnew/3.9.rst:84
msgid ""
-"a number of Python modules (:mod:`!_abc`, :mod:`!audioop`, :mod:`!"
-"_bz2`, :mod:`!_codecs`, :mod:`!_contextvars`, :mod:`!_crypt`, :mod:`!"
-"_functools`, :mod:`!_json`, :mod:`!"
-"_locale`, :mod:`math`, :mod:`operator`, :mod:`resource`, :mod:`time`, :mod:`!"
-"_weakref`) now use multiphase initialization as defined by PEP 489;"
+"a number of Python modules (:mod:`!_abc`, :mod:`!audioop`, :mod:`!_bz2`, :"
+"mod:`!_codecs`, :mod:`!_contextvars`, :mod:`!_crypt`, :mod:`!_functools`, :"
+"mod:`!_json`, :mod:`!_locale`, :mod:`math`, :mod:`operator`, :mod:"
+"`resource`, :mod:`time`, :mod:`!_weakref`) now use multiphase initialization "
+"as defined by PEP 489;"
msgstr ""
#: ../../whatsnew/3.9.rst:89
msgid ""
-"a number of standard library modules (:mod:`!"
-"audioop`, :mod:`ast`, :mod:`grp`, :mod:`!_hashlib`, :mod:`pwd`, :mod:`!"
-"_posixsubprocess`, :mod:`random`, :mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) "
-"are now using the stable ABI defined by PEP 384."
+"a number of standard library modules (:mod:`!audioop`, :mod:`ast`, :mod:"
+"`grp`, :mod:`!_hashlib`, :mod:`pwd`, :mod:`!_posixsubprocess`, :mod:"
+"`random`, :mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) are now "
+"using the stable ABI defined by PEP 384."
msgstr ""
#: ../../whatsnew/3.9.rst:94
@@ -182,9 +182,9 @@ msgstr ""
#: ../../whatsnew/3.9.rst:126
msgid ""
"Aliases to :ref:`Abstract Base Classes ` "
-"in the :mod:`collections` module, like ``collections.Mapping`` alias "
-"to :class:`collections.abc.Mapping`, are kept for one last release for "
-"backward compatibility. They will be removed from Python 3.10."
+"in the :mod:`collections` module, like ``collections.Mapping`` alias to :"
+"class:`collections.abc.Mapping`, are kept for one last release for backward "
+"compatibility. They will be removed from Python 3.10."
msgstr ""
#: ../../whatsnew/3.9.rst:131
@@ -210,8 +210,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:145
msgid ""
-"Merge (``|``) and update (``|=``) operators have been added to the built-"
-"in :class:`dict` class. Those complement the existing ``dict.update`` and "
+"Merge (``|``) and update (``|=``) operators have been added to the built-in :"
+"class:`dict` class. Those complement the existing ``dict.update`` and "
"``{**d1, **d2}`` methods of merging dictionaries."
msgstr ""
@@ -237,8 +237,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:158
msgid ""
-"See :pep:`584` for a full description. (Contributed by Brandt Bucher "
-"in :issue:`36144`.)"
+"See :pep:`584` for a full description. (Contributed by Brandt Bucher in :"
+"issue:`36144`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:162
@@ -247,12 +247,12 @@ msgstr ""
#: ../../whatsnew/3.9.rst:164
msgid ""
-":meth:`str.removeprefix(prefix)` "
-"and :meth:`str.removesuffix(suffix)` have been added to "
-"easily remove an unneeded prefix or a suffix from a string. Corresponding "
-"``bytes``, ``bytearray``, and ``collections.UserString`` methods have also "
-"been added. See :pep:`616` for a full description. (Contributed by Dennis "
-"Sweeney in :issue:`39939`.)"
+":meth:`str.removeprefix(prefix)` and :meth:`str."
+"removesuffix(suffix)` have been added to easily remove an "
+"unneeded prefix or a suffix from a string. Corresponding ``bytes``, "
+"``bytearray``, and ``collections.UserString`` methods have also been added. "
+"See :pep:`616` for a full description. (Contributed by Dennis Sweeney in :"
+"issue:`39939`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:172
@@ -329,28 +329,28 @@ msgstr "其他語言更動"
#: ../../whatsnew/3.9.rst:218
msgid ""
-":func:`__import__` now raises :exc:`ImportError` instead "
-"of :exc:`ValueError`, which used to occur when a relative import went past "
-"its top-level package. (Contributed by Ngalim Siregar in :issue:`37444`.)"
+":func:`__import__` now raises :exc:`ImportError` instead of :exc:"
+"`ValueError`, which used to occur when a relative import went past its top-"
+"level package. (Contributed by Ngalim Siregar in :issue:`37444`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:223
msgid ""
"Python now gets the absolute path of the script filename specified on the "
-"command line (ex: ``python3 script.py``): the ``__file__`` attribute of "
-"the :mod:`__main__` module became an absolute path, rather than a relative "
-"path. These paths now remain valid after the current directory is changed "
-"by :func:`os.chdir`. As a side effect, the traceback also displays the "
-"absolute path for :mod:`__main__` module frames in this case. (Contributed "
-"by Victor Stinner in :issue:`20443`.)"
+"command line (ex: ``python3 script.py``): the ``__file__`` attribute of the :"
+"mod:`__main__` module became an absolute path, rather than a relative path. "
+"These paths now remain valid after the current directory is changed by :func:"
+"`os.chdir`. As a side effect, the traceback also displays the absolute path "
+"for :mod:`__main__` module frames in this case. (Contributed by Victor "
+"Stinner in :issue:`20443`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:231
msgid ""
"In the :ref:`Python Development Mode ` and in :ref:`debug build "
"`, the *encoding* and *errors* arguments are now checked for "
-"string encoding and decoding operations. "
-"Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`."
+"string encoding and decoding operations. Examples: :func:`open`, :meth:`str."
+"encode` and :meth:`bytes.decode`."
msgstr ""
#: ../../whatsnew/3.9.rst:236
@@ -386,26 +386,25 @@ msgstr ""
#: ../../whatsnew/3.9.rst:256
msgid ""
-"Parallel running "
-"of :meth:`~agen.aclose` / :meth:`~agen.asend` / :meth:`~agen.athrow` is now "
-"prohibited, and ``ag_running`` now reflects the actual running status of the "
-"async generator. (Contributed by Yury Selivanov in :issue:`30773`.)"
+"Parallel running of :meth:`~agen.aclose` / :meth:`~agen.asend` / :meth:"
+"`~agen.athrow` is now prohibited, and ``ag_running`` now reflects the actual "
+"running status of the async generator. (Contributed by Yury Selivanov in :"
+"issue:`30773`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:261
msgid ""
"Unexpected errors in calling the ``__iter__`` method are no longer masked by "
-"``TypeError`` in the :keyword:`in` operator and "
-"functions :func:`~operator.contains`, :func:`~operator.indexOf` "
-"and :func:`~operator.countOf` of the :mod:`operator` module. (Contributed by "
-"Serhiy Storchaka in :issue:`40824`.)"
+"``TypeError`` in the :keyword:`in` operator and functions :func:`~operator."
+"contains`, :func:`~operator.indexOf` and :func:`~operator.countOf` of the :"
+"mod:`operator` module. (Contributed by Serhiy Storchaka in :issue:`40824`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:267
msgid ""
"Unparenthesized lambda expressions can no longer be the expression part in "
-"an ``if`` clause in comprehensions and generator expressions. "
-"See :issue:`41848` and :issue:`43755` for details."
+"an ``if`` clause in comprehensions and generator expressions. See :issue:"
+"`41848` and :issue:`43755` for details."
msgstr ""
#: ../../whatsnew/3.9.rst:273
@@ -419,9 +418,8 @@ msgstr "zoneinfo"
#: ../../whatsnew/3.9.rst:278
msgid ""
"The :mod:`zoneinfo` module brings support for the IANA time zone database to "
-"the standard library. It adds :class:`zoneinfo.ZoneInfo`, a "
-"concrete :class:`datetime.tzinfo` implementation backed by the system's time "
-"zone data."
+"the standard library. It adds :class:`zoneinfo.ZoneInfo`, a concrete :class:"
+"`datetime.tzinfo` implementation backed by the system's time zone data."
msgstr ""
#: ../../whatsnew/3.9.rst:284
@@ -467,10 +465,10 @@ msgstr "graphlib"
#: ../../whatsnew/3.9.rst:315
msgid ""
-"A new module, :mod:`graphlib`, was added that contains "
-"the :class:`graphlib.TopologicalSorter` class to offer functionality to "
-"perform topological sorting of graphs. (Contributed by Pablo Galindo, Tim "
-"Peters and Larry Hastings in :issue:`17005`.)"
+"A new module, :mod:`graphlib`, was added that contains the :class:`graphlib."
+"TopologicalSorter` class to offer functionality to perform topological "
+"sorting of graphs. (Contributed by Pablo Galindo, Tim Peters and Larry "
+"Hastings in :issue:`17005`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:322
@@ -484,8 +482,8 @@ msgstr "ast"
#: ../../whatsnew/3.9.rst:327
msgid ""
"Added the *indent* option to :func:`~ast.dump` which allows it to produce a "
-"multiline indented output. (Contributed by Serhiy Storchaka "
-"in :issue:`37995`.)"
+"multiline indented output. (Contributed by Serhiy Storchaka in :issue:"
+"`37995`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:331
@@ -508,22 +506,21 @@ msgstr "asyncio"
#: ../../whatsnew/3.9.rst:342
msgid ""
-"Due to significant security concerns, the *reuse_address* parameter "
-"of :meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. "
-"This is because of the behavior of the socket option ``SO_REUSEADDR`` in "
-"UDP. For more details, see the documentation for "
-"``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine "
-"Pitrou, and Yury Selivanov in :issue:`37228`.)"
+"Due to significant security concerns, the *reuse_address* parameter of :meth:"
+"`asyncio.loop.create_datagram_endpoint` is no longer supported. This is "
+"because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For "
+"more details, see the documentation for ``loop.create_datagram_endpoint()``. "
+"(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in :issue:"
+"`37228`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:349
msgid ""
-"Added a "
-"new :term:`coroutine` :meth:`~asyncio.loop.shutdown_default_executor` that "
-"schedules a shutdown for the default executor that waits on "
-"the :class:`~concurrent.futures.ThreadPoolExecutor` to finish closing. "
-"Also, :func:`asyncio.run` has been updated to use the new :term:`coroutine`. "
-"(Contributed by Kyle Stanley in :issue:`34037`.)"
+"Added a new :term:`coroutine` :meth:`~asyncio.loop."
+"shutdown_default_executor` that schedules a shutdown for the default "
+"executor that waits on the :class:`~concurrent.futures.ThreadPoolExecutor` "
+"to finish closing. Also, :func:`asyncio.run` has been updated to use the "
+"new :term:`coroutine`. (Contributed by Kyle Stanley in :issue:`34037`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:355
@@ -536,10 +533,9 @@ msgstr ""
msgid ""
"Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used "
"for running IO-bound functions in a separate thread to avoid blocking the "
-"event loop, and essentially works as a high-level version "
-"of :meth:`~asyncio.loop.run_in_executor` that can directly take keyword "
-"arguments. (Contributed by Kyle Stanley and Yury Selivanov "
-"in :issue:`32309`.)"
+"event loop, and essentially works as a high-level version of :meth:`~asyncio."
+"loop.run_in_executor` that can directly take keyword arguments. (Contributed "
+"by Kyle Stanley and Yury Selivanov in :issue:`32309`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:364
@@ -553,8 +549,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:369
msgid ""
":mod:`asyncio` now raises :exc:`TypeError` when calling incompatible methods "
-"with an :class:`ssl.SSLSocket` socket. (Contributed by Ido Michael "
-"in :issue:`37404`.)"
+"with an :class:`ssl.SSLSocket` socket. (Contributed by Ido Michael in :issue:"
+"`37404`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:374
@@ -573,8 +569,8 @@ msgid ""
"Added new options for path manipulation in resulting ``.pyc`` files: "
"*stripdir*, *prependdir*, *limit_sl_dest* parameters and -s, -p, -e command "
"line options. Added the possibility to specify the option for an "
-"optimization level multiple times. (Contributed by Lumír 'Frenzy' Balhar "
-"in :issue:`38112`.)"
+"optimization level multiple times. (Contributed by Lumír 'Frenzy' Balhar in :"
+"issue:`38112`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:384
@@ -583,11 +579,10 @@ msgstr "concurrent.futures"
#: ../../whatsnew/3.9.rst:386
msgid ""
-"Added a new *cancel_futures* parameter "
-"to :meth:`concurrent.futures.Executor.shutdown` that cancels all pending "
-"futures which have not started running, instead of waiting for them to "
-"complete before shutting down the executor. (Contributed by Kyle Stanley "
-"in :issue:`39349`.)"
+"Added a new *cancel_futures* parameter to :meth:`concurrent.futures.Executor."
+"shutdown` that cancels all pending futures which have not started running, "
+"instead of waiting for them to complete before shutting down the executor. "
+"(Contributed by Kyle Stanley in :issue:`39349`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:392
@@ -612,9 +607,9 @@ msgstr "curses"
#: ../../whatsnew/3.9.rst:405
msgid ""
-"Added :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, :func:`curses.get_tabsize`, "
-"and :func:`curses.set_tabsize` functions. (Contributed by Anthony Sottile "
-"in :issue:`38312`.)"
+"Added :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, :func:"
+"`curses.get_tabsize`, and :func:`curses.set_tabsize` functions. (Contributed "
+"by Anthony Sottile in :issue:`38312`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:410
@@ -623,10 +618,10 @@ msgstr "datetime"
#: ../../whatsnew/3.9.rst:411
msgid ""
-"The :meth:`~datetime.date.isocalendar` of :class:`datetime.date` "
-"and :meth:`~datetime.datetime.isocalendar` of :class:`datetime.datetime` "
-"methods now returns a :func:`~collections.namedtuple` instead of "
-"a :class:`tuple`. (Contributed by Donghee Na in :issue:`24416`.)"
+"The :meth:`~datetime.date.isocalendar` of :class:`datetime.date` and :meth:"
+"`~datetime.datetime.isocalendar` of :class:`datetime.datetime` methods now "
+"returns a :func:`~collections.namedtuple` instead of a :class:`tuple`. "
+"(Contributed by Donghee Na in :issue:`24416`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:417
@@ -646,9 +641,9 @@ msgstr "fcntl"
#: ../../whatsnew/3.9.rst:426
msgid ""
-"Added constants :const:`~fcntl.F_OFD_GETLK`, :const:`~fcntl.F_OFD_SETLK` "
-"and :const:`~fcntl.F_OFD_SETLKW`. (Contributed by Donghee Na "
-"in :issue:`38602`.)"
+"Added constants :const:`!fcntl.F_OFD_GETLK`, :const:`!fcntl.F_OFD_SETLK` "
+"and :const:`!fcntl.F_OFD_SETLKW`. (Contributed by Donghee Na in :issue:"
+"`38602`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:431
@@ -657,10 +652,10 @@ msgstr "ftplib"
#: ../../whatsnew/3.9.rst:433
msgid ""
-":class:`~ftplib.FTP` and :class:`~ftplib.FTP_TLS` now raise "
-"a :class:`ValueError` if the given timeout for their constructor is zero to "
-"prevent the creation of a non-blocking socket. (Contributed by Donghee Na "
-"in :issue:`39259`.)"
+":class:`~ftplib.FTP` and :class:`~ftplib.FTP_TLS` now raise a :class:"
+"`ValueError` if the given timeout for their constructor is zero to prevent "
+"the creation of a non-blocking socket. (Contributed by Donghee Na in :issue:"
+"`39259`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:438
@@ -672,15 +667,15 @@ msgid ""
"When the garbage collector makes a collection in which some objects "
"resurrect (they are reachable from outside the isolated cycles after the "
"finalizers have been executed), do not block the collection of all objects "
-"that are still unreachable. (Contributed by Pablo Galindo and Tim Peters "
-"in :issue:`38379`.)"
+"that are still unreachable. (Contributed by Pablo Galindo and Tim Peters in :"
+"issue:`38379`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:445
msgid ""
"Added a new function :func:`gc.is_finalized` to check if an object has been "
-"finalized by the garbage collector. (Contributed by Pablo Galindo "
-"in :issue:`39322`.)"
+"finalized by the garbage collector. (Contributed by Pablo Galindo in :issue:"
+"`39322`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:450
@@ -718,8 +713,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:472
msgid ""
-"Added option to toggle cursor blink off. (Contributed by Zackery Spytz "
-"in :issue:`4603`.)"
+"Added option to toggle cursor blink off. (Contributed by Zackery Spytz in :"
+"issue:`4603`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:475
@@ -741,8 +736,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:483
msgid ""
"Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User "
-"hooks were previously ignored. (Contributed by Ken Hilton "
-"in :issue:`43008`.)"
+"hooks were previously ignored. (Contributed by Ken Hilton in :issue:"
+"`43008`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:487
@@ -754,10 +749,10 @@ msgid ""
"Rearrange the settings dialog. Split the General tab into Windows and Shell/"
"Ed tabs. Move help sources, which extend the Help menu, to the Extensions "
"tab. Make space for new options and shorten the dialog. The latter makes "
-"the dialog better fit small screens. (Contributed by Terry Jan Reedy "
-"in :issue:`40468`.) Move the indent space setting from the Font tab to the "
-"new Windows tab. (Contributed by Mark Roseman and Terry Jan Reedy "
-"in :issue:`33962`.)"
+"the dialog better fit small screens. (Contributed by Terry Jan Reedy in :"
+"issue:`40468`.) Move the indent space setting from the Font tab to the new "
+"Windows tab. (Contributed by Mark Roseman and Terry Jan Reedy in :issue:"
+"`33962`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:497
@@ -773,11 +768,11 @@ msgstr "imaplib"
#: ../../whatsnew/3.9.rst:503
msgid ""
":class:`~imaplib.IMAP4` and :class:`~imaplib.IMAP4_SSL` now have an optional "
-"*timeout* parameter for their constructors. Also, "
-"the :meth:`~imaplib.IMAP4.open` method now has an optional *timeout* "
-"parameter with this change. The overridden methods "
-"of :class:`~imaplib.IMAP4_SSL` and :class:`~imaplib.IMAP4_stream` were "
-"applied to this change. (Contributed by Donghee Na in :issue:`38615`.)"
+"*timeout* parameter for their constructors. Also, the :meth:`~imaplib.IMAP4."
+"open` method now has an optional *timeout* parameter with this change. The "
+"overridden methods of :class:`~imaplib.IMAP4_SSL` and :class:`~imaplib."
+"IMAP4_stream` were applied to this change. (Contributed by Donghee Na in :"
+"issue:`38615`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:510
@@ -796,10 +791,10 @@ msgstr "importlib"
#: ../../whatsnew/3.9.rst:520
msgid ""
-"To improve consistency with import "
-"statements, :func:`importlib.util.resolve_name` now "
-"raises :exc:`ImportError` instead of :exc:`ValueError` for invalid relative "
-"import attempts. (Contributed by Ngalim Siregar in :issue:`37444`.)"
+"To improve consistency with import statements, :func:`importlib.util."
+"resolve_name` now raises :exc:`ImportError` instead of :exc:`ValueError` for "
+"invalid relative import attempts. (Contributed by Ngalim Siregar in :issue:"
+"`37444`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:525
@@ -828,8 +823,8 @@ msgstr "inspect"
#: ../../whatsnew/3.9.rst:539
msgid ""
":attr:`inspect.BoundArguments.arguments` is changed from ``OrderedDict`` to "
-"regular dict. (Contributed by Inada Naoki in :issue:`36350` "
-"and :issue:`39775`.)"
+"regular dict. (Contributed by Inada Naoki in :issue:`36350` and :issue:"
+"`39775`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:543
@@ -845,16 +840,16 @@ msgstr ""
#: ../../whatsnew/3.9.rst:547
msgid ""
"Scoped IPv6 addresses can be parsed using :class:`ipaddress.IPv6Address`. If "
-"present, scope zone ID is available through "
-"the :attr:`~ipaddress.IPv6Address.scope_id` attribute. (Contributed by "
-"Oleksandr Pavliuk in :issue:`34788`.)"
+"present, scope zone ID is available through the :attr:`~ipaddress."
+"IPv6Address.scope_id` attribute. (Contributed by Oleksandr Pavliuk in :issue:"
+"`34788`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:551
msgid ""
"Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any "
-"leading zeros in IPv4 address strings. (Contributed by Christian Heimes "
-"in :issue:`36384`)."
+"leading zeros in IPv4 address strings. (Contributed by Christian Heimes in :"
+"issue:`36384`)."
msgstr ""
#: ../../whatsnew/3.9.rst:556
@@ -893,9 +888,9 @@ msgstr "multiprocessing"
#: ../../whatsnew/3.9.rst:577
msgid ""
-"The :class:`multiprocessing.SimpleQueue` class has a "
-"new :meth:`~multiprocessing.SimpleQueue.close` method to explicitly close "
-"the queue. (Contributed by Victor Stinner in :issue:`30966`.)"
+"The :class:`multiprocessing.SimpleQueue` class has a new :meth:"
+"`~multiprocessing.SimpleQueue.close` method to explicitly close the queue. "
+"(Contributed by Victor Stinner in :issue:`30966`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:583
@@ -921,9 +916,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:595
msgid ""
-"Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) "
-"and :const:`os.P_PIDFD` (:issue:`38713`) for process management with file "
-"descriptors."
+"Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :const:"
+"`os.P_PIDFD` (:issue:`38713`) for process management with file descriptors."
msgstr ""
#: ../../whatsnew/3.9.rst:599
@@ -950,8 +944,8 @@ msgstr "pathlib"
#: ../../whatsnew/3.9.rst:613
msgid ""
-"Added :meth:`pathlib.Path.readlink` which acts similarly "
-"to :func:`os.readlink`. (Contributed by Girts Folkmanis in :issue:`30618`)"
+"Added :meth:`pathlib.Path.readlink` which acts similarly to :func:`os."
+"readlink`. (Contributed by Girts Folkmanis in :issue:`30618`)"
msgstr ""
#: ../../whatsnew/3.9.rst:618
@@ -970,10 +964,10 @@ msgstr "poplib"
#: ../../whatsnew/3.9.rst:626
msgid ""
-":class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise "
-"a :class:`ValueError` if the given timeout for their constructor is zero to "
-"prevent the creation of a non-blocking socket. (Contributed by Donghee Na "
-"in :issue:`39259`.)"
+":class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:"
+"`ValueError` if the given timeout for their constructor is zero to prevent "
+"the creation of a non-blocking socket. (Contributed by Donghee Na in :issue:"
+"`39259`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:631
@@ -1003,7 +997,7 @@ msgstr "random"
#: ../../whatsnew/3.9.rst:647
msgid ""
-"Added a new :attr:`random.Random.randbytes` method: generate random bytes. "
+"Added a new :meth:`random.Random.randbytes` method: generate random bytes. "
"(Contributed by Victor Stinner in :issue:`40286`.)"
msgstr ""
@@ -1014,8 +1008,8 @@ msgstr "signal"
#: ../../whatsnew/3.9.rst:653
msgid ""
"Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to "
-"signals to a process using a file descriptor instead of a pid. "
-"(:issue:`38712`)"
+"signals to a process using a file descriptor instead of a pid. (:issue:"
+"`38712`)"
msgstr ""
#: ../../whatsnew/3.9.rst:657
@@ -1024,10 +1018,10 @@ msgstr "smtplib"
#: ../../whatsnew/3.9.rst:659
msgid ""
-":class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise "
-"a :class:`ValueError` if the given timeout for their constructor is zero to "
-"prevent the creation of a non-blocking socket. (Contributed by Donghee Na "
-"in :issue:`39259`.)"
+":class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise a :class:"
+"`ValueError` if the given timeout for their constructor is zero to prevent "
+"the creation of a non-blocking socket. (Contributed by Donghee Na in :issue:"
+"`39259`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:663
@@ -1042,9 +1036,9 @@ msgstr "socket"
#: ../../whatsnew/3.9.rst:669
msgid ""
-"The :mod:`socket` module now exports "
-"the :const:`~socket.CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. "
-"(Contributed by Stefan Tatschner and Zackery Spytz in :issue:`25780`.)"
+"The :mod:`socket` module now exports the :const:`~socket."
+"CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. (Contributed by "
+"Stefan Tatschner and Zackery Spytz in :issue:`25780`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:673
@@ -1055,9 +1049,9 @@ msgstr ""
#: ../../whatsnew/3.9.rst:676
msgid ""
-"The socket module now has the :func:`socket.send_fds` "
-"and :func:`socket.recv_fds` functions. (Contributed by Joannah Nanjekye, "
-"Shinya Okano and Victor Stinner in :issue:`28724`.)"
+"The socket module now has the :func:`socket.send_fds` and :func:`socket."
+"recv_fds` functions. (Contributed by Joannah Nanjekye, Shinya Okano and "
+"Victor Stinner in :issue:`28724`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:682
@@ -1145,11 +1139,10 @@ msgstr "xml"
#: ../../whatsnew/3.9.rst:735
msgid ""
-"White space characters within attributes are now preserved when "
-"serializing :mod:`xml.etree.ElementTree` to XML file. EOLNs are no longer "
-"normalized to \"\\n\". This is the result of discussion about how to "
-"interpret section 2.11 of XML spec. (Contributed by Mefistotelis "
-"in :issue:`39011`.)"
+"White space characters within attributes are now preserved when serializing :"
+"mod:`xml.etree.ElementTree` to XML file. EOLNs are no longer normalized to "
+"\"\\n\". This is the result of discussion about how to interpret section "
+"2.11 of XML spec. (Contributed by Mefistotelis in :issue:`39011`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:743
@@ -1189,8 +1182,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:762
msgid ""
"Previously, the bytecode evaluation loop was interrupted at each instruction "
-"until the main thread handles signals. (Contributed by Victor Stinner "
-"in :issue:`40010`.)"
+"until the main thread handles signals. (Contributed by Victor Stinner in :"
+"issue:`40010`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:766
@@ -1208,16 +1201,15 @@ msgstr ""
#: ../../whatsnew/3.9.rst:774
msgid ""
-"A number of Python builtins "
-"(:class:`range`, :class:`tuple`, :class:`set`, :class:`frozenset`, :class:`list`, :class:`dict`) "
-"are now sped up by using :pep:`590` vectorcall protocol. (Contributed by "
-"Donghee Na, Mark Shannon, Jeroen Demeyer and Petr Viktorin "
-"in :issue:`37207`.)"
+"A number of Python builtins (:class:`range`, :class:`tuple`, :class:`set`, :"
+"class:`frozenset`, :class:`list`, :class:`dict`) are now sped up by using :"
+"pep:`590` vectorcall protocol. (Contributed by Donghee Na, Mark Shannon, "
+"Jeroen Demeyer and Petr Viktorin in :issue:`37207`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:779
msgid ""
-"Optimized :func:`~set.difference_update` for the case when the other set is "
+"Optimized :meth:`!set.difference_update` for the case when the other set is "
"much larger than the base set. (Suggested by Evgeny Kapun with code "
"contributed by Michele Orrù in :issue:`8425`.)"
msgstr ""
@@ -1403,10 +1395,10 @@ msgid ""
"These results were generated from the variable access benchmark script at: "
"``Tools/scripts/var_access_benchmark.py``. The benchmark script displays "
"timings in nanoseconds. The benchmarks were measured on an `Intel® Core™ "
-"i7-4960HQ processor `_ running "
-"the macOS 64-bit builds found at `python.org `_."
+"i7-4960HQ processor `_ running the macOS 64-bit builds found at `python.org `_."
msgstr ""
#: ../../whatsnew/3.9.rst:853
@@ -1416,8 +1408,8 @@ msgstr "已棄用"
#: ../../whatsnew/3.9.rst:855
msgid ""
"The distutils ``bdist_msi`` command is now deprecated, use ``bdist_wheel`` "
-"(wheel packages) instead. (Contributed by Hugo van Kemenade "
-"in :issue:`39586`.)"
+"(wheel packages) instead. (Contributed by Hugo van Kemenade in :issue:"
+"`39586`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:859
@@ -1439,9 +1431,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:870
msgid ""
-"The Public C API functions :c:func:`!"
-"PyParser_SimpleParseStringFlags`, :c:func:`!"
-"PyParser_SimpleParseStringFlagsFilename`, :c:func:`!"
+"The Public C API functions :c:func:`!PyParser_SimpleParseStringFlags`, :c:"
+"func:`!PyParser_SimpleParseStringFlagsFilename`, :c:func:`!"
"PyParser_SimpleParseFileFlags` and :c:func:`!PyNode_Compile` are deprecated "
"and will be removed in Python 3.10 together with the old parser."
msgstr ""
@@ -1459,9 +1450,8 @@ msgid ""
"The :mod:`random` module currently accepts any hashable type as a possible "
"seed value. Unfortunately, some of those types are not guaranteed to have a "
"deterministic hash value. After Python 3.9, the module will restrict its "
-"seeds "
-"to :const:`None`, :class:`int`, :class:`float`, :class:`str`, :class:`bytes`, "
-"and :class:`bytearray`."
+"seeds to :const:`None`, :class:`int`, :class:`float`, :class:`str`, :class:"
+"`bytes`, and :class:`bytearray`."
msgstr ""
#: ../../whatsnew/3.9.rst:887
@@ -1469,8 +1459,8 @@ msgid ""
"Opening the :class:`~gzip.GzipFile` file for writing without specifying the "
"*mode* argument is deprecated. In future Python versions it will always be "
"opened for reading by default. Specify the *mode* argument for opening it "
-"for writing and silencing a warning. (Contributed by Serhiy Storchaka "
-"in :issue:`28286`.)"
+"for writing and silencing a warning. (Contributed by Serhiy Storchaka in :"
+"issue:`28286`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:893
@@ -1519,17 +1509,17 @@ msgid ""
":mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` are "
"considered deprecated and will be removed in future Python versions. They "
"were not generated by the parser and not accepted by the code generator in "
-"Python 3. (Contributed by Batuhan Taskaya in :issue:`39639` "
-"and :issue:`39969` and Serhiy Storchaka in :issue:`39988`.)"
+"Python 3. (Contributed by Batuhan Taskaya in :issue:`39639` and :issue:"
+"`39969` and Serhiy Storchaka in :issue:`39988`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:923
msgid ""
"The :c:func:`!PyEval_InitThreads` and :c:func:`!PyEval_ThreadsInitialized` "
-"functions are now deprecated and will be removed in Python 3.11. "
-"Calling :c:func:`!PyEval_InitThreads` now does nothing. The :term:`GIL` is "
-"initialized by :c:func:`Py_Initialize` since Python 3.7. (Contributed by "
-"Victor Stinner in :issue:`39877`.)"
+"functions are now deprecated and will be removed in Python 3.11. Calling :c:"
+"func:`!PyEval_InitThreads` now does nothing. The :term:`GIL` is initialized "
+"by :c:func:`Py_Initialize` since Python 3.7. (Contributed by Victor Stinner "
+"in :issue:`39877`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:929
@@ -1541,8 +1531,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:932
msgid ""
":func:`!smtpd.MailmanProxy` is now deprecated as it is unusable without an "
-"external module, ``mailman``. (Contributed by Samuel Colvin "
-"in :issue:`35800`.)"
+"external module, ``mailman``. (Contributed by Samuel Colvin in :issue:"
+"`35800`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:935
@@ -1576,8 +1566,8 @@ msgid ""
"removed. These methods are deprecated since Python 3.3. Generally, these "
"extensions are not supported or not enabled by NNTP server administrators. "
"For ``xgtitle()``, please use :meth:`!nntplib.NNTP.descriptions` or :meth:`!"
-"nntplib.NNTP.description` instead. (Contributed by Donghee Na "
-"in :issue:`39366`.)"
+"nntplib.NNTP.description` instead. (Contributed by Donghee Na in :issue:"
+"`39366`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:963
@@ -1598,9 +1588,9 @@ msgstr ""
#: ../../whatsnew/3.9.rst:973
msgid ""
"The ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions have "
-"been removed. They were deprecated since Python 3.2. "
-"Use :func:`sys.getswitchinterval` and :func:`sys.setswitchinterval` instead. "
-"(Contributed by Victor Stinner in :issue:`37392`.)"
+"been removed. They were deprecated since Python 3.2. Use :func:`sys."
+"getswitchinterval` and :func:`sys.setswitchinterval` instead. (Contributed "
+"by Victor Stinner in :issue:`37392`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:978
@@ -1634,23 +1624,21 @@ msgstr ""
#: ../../whatsnew/3.9.rst:996
msgid ""
-"Methods ``getchildren()`` and ``getiterator()`` of "
-"classes :class:`~xml.etree.ElementTree.ElementTree` "
-"and :class:`~xml.etree.ElementTree.Element` in "
-"the :mod:`~xml.etree.ElementTree` module have been removed. They were "
-"deprecated in Python 3.2. Use ``iter(x)`` or ``list(x)`` instead of "
-"``x.getchildren()`` and ``x.iter()`` or ``list(x.iter())`` instead of "
-"``x.getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)"
+"Methods ``getchildren()`` and ``getiterator()`` of classes :class:`~xml."
+"etree.ElementTree.ElementTree` and :class:`~xml.etree.ElementTree.Element` "
+"in the :mod:`~xml.etree.ElementTree` module have been removed. They were "
+"deprecated in Python 3.2. Use ``iter(x)`` or ``list(x)`` instead of ``x."
+"getchildren()`` and ``x.iter()`` or ``list(x.iter())`` instead of ``x."
+"getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1004
msgid ""
"The old :mod:`plistlib` API has been removed, it was deprecated since Python "
-"3.4. Use "
-"the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:`~plistlib.dump`, "
-"and :func:`~plistlib.dumps` functions. Additionally, the *use_builtin_types* "
-"parameter was removed, standard :class:`bytes` objects are always used "
-"instead. (Contributed by Jon Janzen in :issue:`36409`.)"
+"3.4. Use the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:"
+"`~plistlib.dump`, and :func:`~plistlib.dumps` functions. Additionally, the "
+"*use_builtin_types* parameter was removed, standard :class:`bytes` objects "
+"are always used instead. (Contributed by Jon Janzen in :issue:`36409`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1010
@@ -1664,9 +1652,9 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1015
msgid ""
"``base64.encodestring()`` and ``base64.decodestring()``, aliases deprecated "
-"since Python 3.1, have been removed: use :func:`base64.encodebytes` "
-"and :func:`base64.decodebytes` instead. (Contributed by Victor Stinner "
-"in :issue:`39351`.)"
+"since Python 3.1, have been removed: use :func:`base64.encodebytes` and :"
+"func:`base64.decodebytes` instead. (Contributed by Victor Stinner in :issue:"
+"`39351`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1020
@@ -1687,9 +1675,9 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1029
msgid ""
"The *encoding* parameter of :func:`json.loads` has been removed. As of "
-"Python 3.1, it was deprecated and ignored; using it has emitted "
-"a :exc:`DeprecationWarning` since Python 3.8. (Contributed by Inada Naoki "
-"in :issue:`39377`)"
+"Python 3.1, it was deprecated and ignored; using it has emitted a :exc:"
+"`DeprecationWarning` since Python 3.8. (Contributed by Inada Naoki in :issue:"
+"`39377`)"
msgstr ""
#: ../../whatsnew/3.9.rst:1034
@@ -1703,18 +1691,18 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1039
msgid ""
"The :func:`!sys.getcounts` function, the ``-X showalloccount`` command line "
-"option and the ``show_alloc_count`` field of the C "
-"structure :c:type:`PyConfig` have been removed. They required a special "
-"Python build by defining ``COUNT_ALLOCS`` macro. (Contributed by Victor "
-"Stinner in :issue:`39489`.)"
+"option and the ``show_alloc_count`` field of the C structure :c:type:"
+"`PyConfig` have been removed. They required a special Python build by "
+"defining ``COUNT_ALLOCS`` macro. (Contributed by Victor Stinner in :issue:"
+"`39489`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1045
msgid ""
"The ``_field_types`` attribute of the :class:`typing.NamedTuple` class has "
"been removed. It was deprecated since Python 3.8. Use the "
-"``__annotations__`` attribute instead. (Contributed by Serhiy Storchaka "
-"in :issue:`40182`.)"
+"``__annotations__`` attribute instead. (Contributed by Serhiy Storchaka in :"
+"issue:`40182`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1050
@@ -1727,8 +1715,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1054
msgid ""
"The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks` "
-"have been removed. They were deprecated since Python 3.7 and you can "
-"use :func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead. "
+"have been removed. They were deprecated since Python 3.7 and you can use :"
+"func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead. "
"(Contributed by Rémi Lapeyre in :issue:`40967`)"
msgstr ""
@@ -1756,11 +1744,10 @@ msgstr "Python API 的變更"
#: ../../whatsnew/3.9.rst:1075
msgid ""
-":func:`__import__` and :func:`importlib.util.resolve_name` now "
-"raise :exc:`ImportError` where it previously raised :exc:`ValueError`. "
-"Callers catching the specific exception type and supporting both Python 3.9 "
-"and earlier versions will need to catch both using ``except (ImportError, "
-"ValueError):``."
+":func:`__import__` and :func:`importlib.util.resolve_name` now raise :exc:"
+"`ImportError` where it previously raised :exc:`ValueError`. Callers catching "
+"the specific exception type and supporting both Python 3.9 and earlier "
+"versions will need to catch both using ``except (ImportError, ValueError):``."
msgstr ""
#: ../../whatsnew/3.9.rst:1080
@@ -1771,9 +1758,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1083
msgid ""
-"The :meth:`select.epoll.unregister` method no longer ignores "
-"the :const:`~errno.EBADF` error. (Contributed by Victor Stinner "
-"in :issue:`39239`.)"
+"The :meth:`select.epoll.unregister` method no longer ignores the :const:"
+"`~errno.EBADF` error. (Contributed by Victor Stinner in :issue:`39239`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1087
@@ -1807,10 +1793,10 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1105
msgid ""
-":meth:`asyncio.loop.shutdown_default_executor` has been added "
-"to :class:`~asyncio.AbstractEventLoop`, meaning alternative event loops that "
-"inherit from it should have this method defined. (Contributed by Kyle "
-"Stanley in :issue:`34037`.)"
+":meth:`asyncio.loop.shutdown_default_executor` has been added to :class:"
+"`~asyncio.AbstractEventLoop`, meaning alternative event loops that inherit "
+"from it should have this method defined. (Contributed by Kyle Stanley in :"
+"issue:`34037`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1110
@@ -1834,19 +1820,18 @@ msgid ""
"The :func:`logging.getLogger` API now returns the root logger when passed "
"the name ``'root'``, whereas previously it returned a non-root logger named "
"``'root'``. This could affect cases where user code explicitly wants a non-"
-"root logger named ``'root'``, or instantiates a logger using "
-"``logging.getLogger(__name__)`` in some top-level module called "
-"``'root.py'``. (Contributed by Vinay Sajip in :issue:`37742`.)"
+"root logger named ``'root'``, or instantiates a logger using ``logging."
+"getLogger(__name__)`` in some top-level module called ``'root.py'``. "
+"(Contributed by Vinay Sajip in :issue:`37742`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1127
msgid ""
-"Division handling of :class:`~pathlib.PurePath` now "
-"returns :data:`NotImplemented` instead of raising a :exc:`TypeError` when "
-"passed something other than an instance of ``str`` "
-"or :class:`~pathlib.PurePath`. This allows creating compatible classes that "
-"don't inherit from those mentioned types. (Contributed by Roger Aiudi "
-"in :issue:`34775`)."
+"Division handling of :class:`~pathlib.PurePath` now returns :data:"
+"`NotImplemented` instead of raising a :exc:`TypeError` when passed something "
+"other than an instance of ``str`` or :class:`~pathlib.PurePath`. This "
+"allows creating compatible classes that don't inherit from those mentioned "
+"types. (Contributed by Roger Aiudi in :issue:`34775`)."
msgstr ""
#: ../../whatsnew/3.9.rst:1133
@@ -1861,11 +1846,11 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1141
msgid ""
-":func:`codecs.lookup` now normalizes the encoding name the same way "
-"as :func:`encodings.normalize_encoding`, except that :func:`codecs.lookup` "
-"also converts the name to lower case. For example, ``\"latex+latin1\"`` "
-"encoding name is now normalized to ``\"latex_latin1\"``. (Contributed by "
-"Jordon Xu in :issue:`37751`.)"
+":func:`codecs.lookup` now normalizes the encoding name the same way as :func:"
+"`!encodings.normalize_encoding`, except that :func:`codecs.lookup` also "
+"converts the name to lower case. For example, ``\"latex+latin1\"`` encoding "
+"name is now normalized to ``\"latex_latin1\"``. (Contributed by Jordon Xu "
+"in :issue:`37751`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1149
@@ -1878,10 +1863,9 @@ msgid ""
"with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their "
"type object since Python 3.8. As indicated in the \"Changes in the C API\" "
"of Python 3.8, for the vast majority of cases, there should be no side "
-"effect but for types that have a "
-"custom :c:member:`~PyTypeObject.tp_traverse` function, ensure that all "
-"custom ``tp_traverse`` functions of heap-allocated types visit the object's "
-"type."
+"effect but for types that have a custom :c:member:`~PyTypeObject."
+"tp_traverse` function, ensure that all custom ``tp_traverse`` functions of "
+"heap-allocated types visit the object's type."
msgstr ""
#: ../../whatsnew/3.9.rst:1161
@@ -1936,8 +1920,8 @@ msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`。)"
msgid ""
"The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, "
"``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. "
-"Use :c:func:`PyObject_Call` and its variants instead. (See more details "
-"in :issue:`29548`.)"
+"Use :c:func:`PyObject_Call` and its variants instead. (See more details in :"
+"issue:`29548`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1204
@@ -1946,9 +1930,9 @@ msgstr "CPython 位元組碼變更"
#: ../../whatsnew/3.9.rst:1206
msgid ""
-"The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling "
-"the :keyword:`assert` statement. Previously, the assert statement would not "
-"work correctly if the :exc:`AssertionError` exception was being shadowed. "
+"The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the :"
+"keyword:`assert` statement. Previously, the assert statement would not work "
+"correctly if the :exc:`AssertionError` exception was being shadowed. "
"(Contributed by Zackery Spytz in :issue:`34880`.)"
msgstr ""
@@ -1985,10 +1969,10 @@ msgstr "建置變更"
#: ../../whatsnew/3.9.rst:1225
msgid ""
"Added ``--with-platlibdir`` option to the ``configure`` script: name of the "
-"platform-specific library directory, stored in the "
-"new :data:`sys.platlibdir` attribute. See :data:`sys.platlibdir` attribute "
-"for more information. (Contributed by Jan Matějek, Matěj Cepl, Charalampos "
-"Stratakis and Victor Stinner in :issue:`1294959`.)"
+"platform-specific library directory, stored in the new :data:`sys."
+"platlibdir` attribute. See :data:`sys.platlibdir` attribute for more "
+"information. (Contributed by Jan Matějek, Matěj Cepl, Charalampos Stratakis "
+"and Victor Stinner in :issue:`1294959`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1231
@@ -2051,16 +2035,16 @@ msgstr "C API 變更"
msgid ""
":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module "
"with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` "
-"to retrieve the module and its state; and :c:type:`PyCMethod` "
-"and :c:macro:`METH_METHOD` to allow a method to access the class it was "
-"defined in. (Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)"
+"to retrieve the module and its state; and :c:type:`PyCMethod` and :c:macro:"
+"`METH_METHOD` to allow a method to access the class it was defined in. "
+"(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1280
msgid ""
-"Added :c:func:`PyFrame_GetCode` function: get a frame code. "
-"Added :c:func:`PyFrame_GetBack` function: get the frame next outer frame. "
-"(Contributed by Victor Stinner in :issue:`40421`.)"
+"Added :c:func:`PyFrame_GetCode` function: get a frame code. Added :c:func:"
+"`PyFrame_GetBack` function: get the frame next outer frame. (Contributed by "
+"Victor Stinner in :issue:`40421`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1284
@@ -2071,12 +2055,12 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1287
msgid ""
-"Added :c:func:`PyThreadState_GetInterpreter` "
-"and :c:func:`PyInterpreterState_Get` functions to get the interpreter. "
-"Added :c:func:`PyThreadState_GetFrame` function to get the current frame of "
-"a Python thread state. Added :c:func:`PyThreadState_GetID` function: get the "
-"unique identifier of a Python thread state. (Contributed by Victor Stinner "
-"in :issue:`39947`.)"
+"Added :c:func:`PyThreadState_GetInterpreter` and :c:func:"
+"`PyInterpreterState_Get` functions to get the interpreter. Added :c:func:"
+"`PyThreadState_GetFrame` function to get the current frame of a Python "
+"thread state. Added :c:func:`PyThreadState_GetID` function: get the unique "
+"identifier of a Python thread state. (Contributed by Victor Stinner in :"
+"issue:`39947`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1295
@@ -2118,18 +2102,18 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1317
msgid ""
-"Added the functions :c:func:`PyObject_GC_IsTracked` "
-"and :c:func:`PyObject_GC_IsFinalized` to the public API to allow to query if "
-"Python objects are being currently tracked or have been already finalized by "
-"the garbage collector respectively. (Contributed by Pablo Galindo Salgado "
-"in :issue:`40241`.)"
+"Added the functions :c:func:`PyObject_GC_IsTracked` and :c:func:"
+"`PyObject_GC_IsFinalized` to the public API to allow to query if Python "
+"objects are being currently tracked or have been already finalized by the "
+"garbage collector respectively. (Contributed by Pablo Galindo Salgado in :"
+"issue:`40241`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1323
msgid ""
"Added :c:func:`!_PyObject_FunctionStr` to get a user-friendly string "
-"representation of a function-like object. (Patch by Jeroen Demeyer "
-"in :issue:`37645`.)"
+"representation of a function-like object. (Patch by Jeroen Demeyer in :issue:"
+"`37645`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1327
@@ -2141,21 +2125,20 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1335
msgid ""
"``PyInterpreterState.eval_frame`` (:pep:`523`) now requires a new mandatory "
-"*tstate* parameter (``PyThreadState*``). (Contributed by Victor Stinner "
-"in :issue:`38500`.)"
+"*tstate* parameter (``PyThreadState*``). (Contributed by Victor Stinner in :"
+"issue:`38500`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1339
msgid ""
-"Extension "
-"modules: :c:member:`~PyModuleDef.m_traverse`, :c:member:`~PyModuleDef.m_clear` "
-"and :c:member:`~PyModuleDef.m_free` functions of :c:type:`PyModuleDef` are "
-"no longer called if the module state was requested but is not allocated yet. "
-"This is the case immediately after the module is created and before the "
-"module is executed (:c:data:`Py_mod_exec` function). More precisely, these "
-"functions are not called if :c:member:`~PyModuleDef.m_size` is greater than "
-"0 and the module state (as returned by :c:func:`PyModule_GetState`) is "
-"``NULL``."
+"Extension modules: :c:member:`~PyModuleDef.m_traverse`, :c:member:"
+"`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` functions of :c:"
+"type:`PyModuleDef` are no longer called if the module state was requested "
+"but is not allocated yet. This is the case immediately after the module is "
+"created and before the module is executed (:c:data:`Py_mod_exec` function). "
+"More precisely, these functions are not called if :c:member:`~PyModuleDef."
+"m_size` is greater than 0 and the module state (as returned by :c:func:"
+"`PyModule_GetState`) is ``NULL``."
msgstr ""
#: ../../whatsnew/3.9.rst:1348
@@ -2189,26 +2172,25 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1365
msgid ""
"The :c:type:`!PyGC_Head` structure is now opaque. It is only defined in the "
-"internal C API (``pycore_gc.h``). (Contributed by Victor Stinner "
-"in :issue:`40241`.)"
+"internal C API (``pycore_gc.h``). (Contributed by Victor Stinner in :issue:"
+"`40241`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1369
msgid ""
-"The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, "
-"``PyUnicode_WSTR_LENGTH``, :c:func:`!PyUnicode_FromUnicode`, :c:func:`!"
-"PyUnicode_AsUnicode`, ``_PyUnicode_AsUnicode``, and :c:func:`!"
-"PyUnicode_AsUnicodeAndSize` are marked as deprecated in C. They have been "
-"deprecated by :pep:`393` since Python 3.3. (Contributed by Inada Naoki "
-"in :issue:`36346`.)"
+"The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, :c:"
+"func:`!PyUnicode_FromUnicode`, :c:func:`!PyUnicode_AsUnicode`, "
+"``_PyUnicode_AsUnicode``, and :c:func:`!PyUnicode_AsUnicodeAndSize` are "
+"marked as deprecated in C. They have been deprecated by :pep:`393` since "
+"Python 3.3. (Contributed by Inada Naoki in :issue:`36346`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1376
msgid ""
"The :c:func:`Py_FatalError` function is replaced with a macro which logs "
"automatically the name of the current function, unless the "
-"``Py_LIMITED_API`` macro is defined. (Contributed by Victor Stinner "
-"in :issue:`39882`.)"
+"``Py_LIMITED_API`` macro is defined. (Contributed by Victor Stinner in :"
+"issue:`39882`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1381
@@ -2228,10 +2210,10 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1388
msgid ""
-"The :c:func:`!PyObject_NEW` macro becomes an alias to "
-"the :c:macro:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro "
-"becomes an alias to the :c:macro:`PyObject_NewVar` macro. They no longer "
-"access directly the :c:member:`PyTypeObject.tp_basicsize` member."
+"The :c:func:`!PyObject_NEW` macro becomes an alias to the :c:macro:"
+"`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro becomes an "
+"alias to the :c:macro:`PyObject_NewVar` macro. They no longer access "
+"directly the :c:member:`PyTypeObject.tp_basicsize` member."
msgstr ""
#: ../../whatsnew/3.9.rst:1393
@@ -2261,8 +2243,8 @@ msgstr "(更多資訊請見 :issue:`40170`。)"
#: ../../whatsnew/3.9.rst:1409
msgid ""
"Excluded ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of "
-"``pyfpe.h`` from the limited C API. (Contributed by Victor Stinner "
-"in :issue:`38835`.)"
+"``pyfpe.h`` from the limited C API. (Contributed by Victor Stinner in :issue:"
+"`38835`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1413
@@ -2279,8 +2261,8 @@ msgstr ""
#: ../../whatsnew/3.9.rst:1422
msgid ""
-"``PyThreadState_DeleteCurrent()`` (Contributed by Joannah Nanjekye "
-"in :issue:`37878`.)"
+"``PyThreadState_DeleteCurrent()`` (Contributed by Joannah Nanjekye in :issue:"
+"`37878`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1424
@@ -2437,8 +2419,8 @@ msgid ""
"``_Py_InitializeFromWideArgs``, ``_PyFloat_Repr``, ``_PyFloat_Digits``, "
"``_PyFloat_DigitsInit``, ``PyFrame_ExtendStack``, ``_PyAIterWrapper_Type``, "
"``PyNullImporter_Type``, ``PyCmpWrapper_Type``, ``PySortWrapper_Type``, "
-"``PyNoArgsFunction``. (Contributed by Pablo Galindo Salgado "
-"in :issue:`39372`.)"
+"``PyNoArgsFunction``. (Contributed by Pablo Galindo Salgado in :issue:"
+"`39372`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1490
@@ -2447,9 +2429,8 @@ msgstr "Python 3.9.1 中顯著的變更"
#: ../../whatsnew/3.9.rst:1495
msgid ""
-"The behavior of :class:`typing.Literal` was changed to conform "
-"with :pep:`586` and to match the behavior of static type checkers specified "
-"in the PEP."
+"The behavior of :class:`typing.Literal` was changed to conform with :pep:"
+"`586` and to match the behavior of static type checkers specified in the PEP."
msgstr ""
#: ../../whatsnew/3.9.rst:1498
@@ -2532,14 +2513,13 @@ msgid ""
"``collections.abc.Callable[[int, str], str]`` will have ``__args__`` of "
"``(int, str, str)``; previously this was ``([int, str], str)``. To allow "
"this change, :class:`types.GenericAlias` can now be subclassed, and a "
-"subclass will be returned when subscripting "
-"the :class:`collections.abc.Callable` type. Code which accesses the "
-"arguments via :func:`typing.get_args` or ``__args__`` need to account for "
-"this change. A :exc:`DeprecationWarning` may be emitted for invalid forms "
-"of parameterizing :class:`collections.abc.Callable` which may have passed "
-"silently in Python 3.9.1. This :exc:`DeprecationWarning` will become "
-"a :exc:`TypeError` in Python 3.10. (Contributed by Ken Jin "
-"in :issue:`42195`.)"
+"subclass will be returned when subscripting the :class:`collections.abc."
+"Callable` type. Code which accesses the arguments via :func:`typing."
+"get_args` or ``__args__`` need to account for this change. A :exc:"
+"`DeprecationWarning` may be emitted for invalid forms of parameterizing :"
+"class:`collections.abc.Callable` which may have passed silently in Python "
+"3.9.1. This :exc:`DeprecationWarning` will become a :exc:`TypeError` in "
+"Python 3.10. (Contributed by Ken Jin in :issue:`42195`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1552 ../../whatsnew/3.9.rst:1577
@@ -2549,14 +2529,13 @@ msgstr "urllib.parse"
#: ../../whatsnew/3.9.rst:1554
msgid ""
"Earlier Python versions allowed using both ``;`` and ``&`` as query "
-"parameter separators in :func:`urllib.parse.parse_qs` "
-"and :func:`urllib.parse.parse_qsl`. Due to security concerns, and to "
-"conform with newer W3C recommendations, this has been changed to allow only "
-"a single separator key, with ``&`` as the default. This change also "
-"affects :func:`!cgi.parse` and :func:`!cgi.parse_multipart` as they use the "
-"affected functions internally. For more details, please see their respective "
-"documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin "
-"in :issue:`42967`.)"
+"parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib."
+"parse.parse_qsl`. Due to security concerns, and to conform with newer W3C "
+"recommendations, this has been changed to allow only a single separator key, "
+"with ``&`` as the default. This change also affects :func:`!cgi.parse` and :"
+"func:`!cgi.parse_multipart` as they use the affected functions internally. "
+"For more details, please see their respective documentation. (Contributed by "
+"Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)"
msgstr ""
#: ../../whatsnew/3.9.rst:1565
@@ -2579,12 +2558,11 @@ msgstr "Python 3.9.5 中顯著的變更"
#: ../../whatsnew/3.9.rst:1579
msgid ""
"The presence of newline or tab characters in parts of a URL allows for some "
-"forms of attacks. Following the WHATWG specification that "
-"updates :rfc:`3986`, ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` "
-"characters are stripped from the URL by the parser in :mod:`urllib.parse` "
-"preventing such attacks. The removal characters are controlled by a new "
-"module level variable ``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. "
-"(See :gh:`88048`)"
+"forms of attacks. Following the WHATWG specification that updates :rfc:"
+"`3986`, ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` characters are "
+"stripped from the URL by the parser in :mod:`urllib.parse` preventing such "
+"attacks. The removal characters are controlled by a new module level "
+"variable ``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)"
msgstr ""
#: ../../whatsnew/3.9.rst:1587