From ff2e2be8cee6485cd287b06fd5cff2c607e1c2b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Apr 2024 19:47:12 +0000 Subject: [PATCH 1/9] sync with cpython be1fe114 --- bugs.po | 55 ++++++++++++++++++++++++++-------------------- library/logging.po | 9 +++++--- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/bugs.po b/bugs.po index 91f6670bc0..fdac9fd89b 100644 --- a/bugs.po +++ b/bugs.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-18 19:45+0000\n" "PO-Revision-Date: 2022-08-31 12:34+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -73,6 +73,13 @@ msgstr "" #: ../../bugs.rst:25 msgid "" +"If you find a bug in the theme (HTML / CSS / JavaScript) of the " +"documentation, please submit a bug report on the `python-doc-theme bug " +"tracker `_." +msgstr "" + +#: ../../bugs.rst:29 +msgid "" "If you're short on time, you can also email documentation bug reports to " "docs@python.org (behavioral bugs can be sent to python-list@python.org). " "'docs@' is a mailing list run by volunteers; your request will be noticed, " @@ -82,26 +89,26 @@ msgstr "" "(程式碼執行的錯誤可以寄到 python-list@python.org)。「docs@」是一個由志工們" "所運行的郵寄清單;您的請求會被注意到,但可能需要一些時間才會被處理。" -#: ../../bugs.rst:32 +#: ../../bugs.rst:36 msgid "`Documentation bugs`_" msgstr "`說明文件錯誤`_" -#: ../../bugs.rst:33 +#: ../../bugs.rst:37 msgid "" "A list of documentation bugs that have been submitted to the Python issue " "tracker." msgstr "一系列已被提交至 Python 問題追蹤系統的有關說明文件的錯誤。" -#: ../../bugs.rst:35 +#: ../../bugs.rst:39 msgid "`Issue Tracking `_" msgstr "`問題追蹤系統 `_" -#: ../../bugs.rst:36 +#: ../../bugs.rst:40 msgid "" "Overview of the process involved in reporting an improvement on the tracker." msgstr "在追蹤系統上回報改進建議的過程簡介。" -#: ../../bugs.rst:38 +#: ../../bugs.rst:42 msgid "" "`Helping with Documentation `_" @@ -109,20 +116,20 @@ msgstr "" "`貢獻說明文件 `_" -#: ../../bugs.rst:39 +#: ../../bugs.rst:43 msgid "" "Comprehensive guide for individuals that are interested in contributing to " "Python documentation." msgstr "給有意成為 Python 說明文件貢獻者的綜合指南。" -#: ../../bugs.rst:41 +#: ../../bugs.rst:45 msgid "" "`Documentation Translations `_" msgstr "" "`說明文件翻譯 `_" -#: ../../bugs.rst:42 +#: ../../bugs.rst:46 msgid "" "A list of GitHub pages for documentation translation and their primary " "contacts." @@ -130,11 +137,11 @@ msgstr "" "一份 GitHub 網頁的清單,裡面有各個說明文件翻譯團隊的連結,以及他們的主要聯絡" "人。" -#: ../../bugs.rst:48 +#: ../../bugs.rst:52 msgid "Using the Python issue tracker" msgstr "使用 Python 問題追蹤系統" -#: ../../bugs.rst:50 +#: ../../bugs.rst:54 msgid "" "Issue reports for Python itself should be submitted via the GitHub issues " "tracker (https://github.com/python/cpython/issues). The GitHub issues " @@ -145,7 +152,7 @@ msgstr "" "python/cpython/issues) 提交。這個 GitHub 問題追蹤系統提供了一個網頁表單,可以" "輸入並提交相關資訊給開發者。" -#: ../../bugs.rst:55 +#: ../../bugs.rst:59 msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " @@ -160,7 +167,7 @@ msgstr "" "本中修正了這個問題,也有可能需要更詳細的資訊(在這種情況下,如果可以,非常歡" "迎您提供資訊!)。要確認是否重複回報,請使用頁面頂端的搜尋框來搜尋追蹤系統。" -#: ../../bugs.rst:62 +#: ../../bugs.rst:66 msgid "" "If the problem you're reporting is not already in the list, log in to " "GitHub. If you don't already have a GitHub account, create a new account " @@ -170,7 +177,7 @@ msgstr "" "如果您想回報的問題還沒有在問題列表出現過,請登入 GitHub。如果您還沒有 GitHub " "帳戶,請點選「Sign up」連結來建立一個新的帳戶。您無法以匿名方式提交錯誤報告。" -#: ../../bugs.rst:67 +#: ../../bugs.rst:71 msgid "" "Being now logged in, you can submit an issue. Click on the \"New issue\" " "button in the top bar to report a new issue." @@ -178,18 +185,18 @@ msgstr "" "如果已經登入,那您就可以提交問題了。請點選列表頂端區域的「New issue」按鈕,來" "回報一個新的問題。" -#: ../../bugs.rst:70 +#: ../../bugs.rst:74 msgid "The submission form has two fields, \"Title\" and \"Comment\"." msgstr "提交的表單中有兩個欄位,「Title」及「Comment」。" -#: ../../bugs.rst:72 +#: ../../bugs.rst:76 msgid "" "For the \"Title\" field, enter a *very* short description of the problem; " "fewer than ten words is good." msgstr "" "在「Title」欄位,輸入對該問題\\ *非常*\\ 簡短的描述;最好少於十個單字。" -#: ../../bugs.rst:75 +#: ../../bugs.rst:79 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -200,7 +207,7 @@ msgstr "" "確定說明中包含了涉及到的任何擴充模組,以及您當時所使用的硬體和軟體平台(視情" "況而定,可以附上版本資訊)。" -#: ../../bugs.rst:80 +#: ../../bugs.rst:84 msgid "" "Each issue report will be reviewed by a developer who will determine what " "needs to be done to correct the problem. You will receive an update each " @@ -209,7 +216,7 @@ msgstr "" "每一份問題報告都會被一位開發人員查核,並由他決定要做出什麼變更來修正這個問" "題。每當該問題有修正動作時,您會收到更新回報。" -#: ../../bugs.rst:87 +#: ../../bugs.rst:91 msgid "" "`How to Report Bugs Effectively `_" @@ -217,7 +224,7 @@ msgstr "" "`如何有效地回報錯誤 `_" -#: ../../bugs.rst:88 +#: ../../bugs.rst:92 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -225,14 +232,14 @@ msgstr "" "這篇文章詳細說明如何建立一份有用的錯誤報告。它描述了什麼樣的資訊是有用的,以" "及這些資訊為什麼有用。" -#: ../../bugs.rst:91 +#: ../../bugs.rst:95 msgid "" "`Bug Writing Guidelines `_" msgstr "" "`錯誤撰寫指南 `_" -#: ../../bugs.rst:92 +#: ../../bugs.rst:96 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -240,11 +247,11 @@ msgstr "" "撰寫一份優良錯誤報告的相關資訊。部分的文章內容是針對 Mozilla 專案,但它也描述" "了通用的好習慣。" -#: ../../bugs.rst:98 +#: ../../bugs.rst:102 msgid "Getting started contributing to Python yourself" msgstr "開始讓自己貢獻 Python" -#: ../../bugs.rst:100 +#: ../../bugs.rst:104 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " diff --git a/library/logging.po b/library/logging.po index c331fc7e3c..24e2eaf95c 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-18 19:45+0000\n" "PO-Revision-Date: 2024-03-28 22:40+0800\n" "Last-Translator: RockLeon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,8 +65,8 @@ msgstr "" "合在一起。" #: ../../library/logging.rst:33 -msgid "The simplest example:" -msgstr "最簡單的示範:" +msgid "Here's a simple example of idiomatic usage: ::" +msgstr "" #: ../../library/logging.rst:58 msgid "If you run *myapp.py*, you should see this in *myapp.log*:" @@ -2206,3 +2206,6 @@ msgstr "Errors(錯誤)" #: ../../library/logging.rst:12 msgid "logging" msgstr "logging(日誌)" + +#~ msgid "The simplest example:" +#~ msgstr "最簡單的示範:" From a59adde20c5f05ea1ad81bf6ccf51d838b0a1852 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Apr 2024 00:04:38 +0000 Subject: [PATCH 2/9] sync with cpython 23192aba --- c-api/tuple.po | 66 +++-- c-api/typeobj.po | 624 +++++++++++++++++++++--------------------- library/ast.po | 16 +- library/ctypes.po | 20 +- library/statistics.po | 21 +- library/typing.po | 330 +++++++++++----------- whatsnew/3.12.po | 8 +- 7 files changed, 550 insertions(+), 535 deletions(-) diff --git a/c-api/tuple.po b/c-api/tuple.po index 9e7803170e..e6f3d46808 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-28 00:03+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -74,44 +74,52 @@ msgid "" "`IndexError` exception." msgstr "" -#: ../../c-api/tuple.rst:65 +#: ../../c-api/tuple.rst:62 +msgid "" +"The returned reference is borrowed from the tuple *p* (that is: it is only " +"valid as long as you hold a reference to *p*). To get a :term:`strong " +"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` or :c:" +"func:`PySequence_GetItem`." +msgstr "" + +#: ../../c-api/tuple.rst:71 msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." msgstr "" -#: ../../c-api/tuple.rst:70 +#: ../../c-api/tuple.rst:76 msgid "" "Return the slice of the tuple pointed to by *p* between *low* and *high*, or " "``NULL`` on failure. This is the equivalent of the Python expression " "``p[low:high]``. Indexing from the end of the tuple is not supported." msgstr "" -#: ../../c-api/tuple.rst:77 +#: ../../c-api/tuple.rst:83 msgid "" "Insert a reference to object *o* at position *pos* of the tuple pointed to " "by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` " "and set an :exc:`IndexError` exception." msgstr "" -#: ../../c-api/tuple.rst:83 +#: ../../c-api/tuple.rst:89 msgid "" "This function \"steals\" a reference to *o* and discards a reference to an " "item already in the tuple at the affected position." msgstr "" -#: ../../c-api/tuple.rst:89 +#: ../../c-api/tuple.rst:95 msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " "*only* be used to fill in brand new tuples." msgstr "" -#: ../../c-api/tuple.rst:94 +#: ../../c-api/tuple.rst:100 msgid "" "This function \"steals\" a reference to *o*, and, unlike :c:func:" "`PyTuple_SetItem`, does *not* discard a reference to any item that is being " "replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" -#: ../../c-api/tuple.rst:102 +#: ../../c-api/tuple.rst:108 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -126,11 +134,11 @@ msgid "" "`SystemError`." msgstr "" -#: ../../c-api/tuple.rst:117 +#: ../../c-api/tuple.rst:123 msgid "Struct Sequence Objects" msgstr "" -#: ../../c-api/tuple.rst:119 +#: ../../c-api/tuple.rst:125 msgid "" "Struct sequence objects are the C equivalent of :func:`~collections." "namedtuple` objects, i.e. a sequence whose items can also be accessed " @@ -138,44 +146,44 @@ msgid "" "specific struct sequence type." msgstr "" -#: ../../c-api/tuple.rst:126 +#: ../../c-api/tuple.rst:132 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" "`PyStructSequence_New`." msgstr "" -#: ../../c-api/tuple.rst:132 +#: ../../c-api/tuple.rst:138 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" -#: ../../c-api/tuple.rst:137 +#: ../../c-api/tuple.rst:143 msgid "" "The same as ``PyStructSequence_InitType``, but returns ``0`` on success and " "``-1`` on failure." msgstr "" -#: ../../c-api/tuple.rst:145 +#: ../../c-api/tuple.rst:151 msgid "Contains the meta information of a struct sequence type to create." msgstr "" -#: ../../c-api/tuple.rst:149 +#: ../../c-api/tuple.rst:155 msgid "Name of the struct sequence type." msgstr "" -#: ../../c-api/tuple.rst:153 +#: ../../c-api/tuple.rst:159 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:157 +#: ../../c-api/tuple.rst:163 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: ../../c-api/tuple.rst:161 +#: ../../c-api/tuple.rst:167 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: ../../c-api/tuple.rst:166 +#: ../../c-api/tuple.rst:172 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" @@ -184,52 +192,52 @@ msgid "" "described." msgstr "" -#: ../../c-api/tuple.rst:174 +#: ../../c-api/tuple.rst:180 msgid "" "Name for the field or ``NULL`` to end the list of named fields, set to :c:" "data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: ../../c-api/tuple.rst:179 +#: ../../c-api/tuple.rst:185 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:184 +#: ../../c-api/tuple.rst:190 msgid "Special value for a field name to leave it unnamed." msgstr "" -#: ../../c-api/tuple.rst:186 +#: ../../c-api/tuple.rst:192 msgid "The type was changed from ``char *``." msgstr "" -#: ../../c-api/tuple.rst:192 +#: ../../c-api/tuple.rst:198 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." msgstr "" -#: ../../c-api/tuple.rst:198 +#: ../../c-api/tuple.rst:204 msgid "" "Return the object at position *pos* in the struct sequence pointed to by " "*p*. No bounds checking is performed." msgstr "" -#: ../../c-api/tuple.rst:204 +#: ../../c-api/tuple.rst:210 msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../c-api/tuple.rst:209 +#: ../../c-api/tuple.rst:215 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" -#: ../../c-api/tuple.rst:215 ../../c-api/tuple.rst:225 +#: ../../c-api/tuple.rst:221 ../../c-api/tuple.rst:231 msgid "This function \"steals\" a reference to *o*." msgstr "" -#: ../../c-api/tuple.rst:220 +#: ../../c-api/tuple.rst:226 msgid "" "Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static " "inlined function." diff --git a/c-api/typeobj.po b/c-api/typeobj.po index d56edab094..4511425d90 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-07 00:03+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1193,28 +1193,28 @@ msgstr "" #: ../../c-api/typeobj.rst:917 ../../c-api/typeobj.rst:937 #: ../../c-api/typeobj.rst:958 ../../c-api/typeobj.rst:984 #: ../../c-api/typeobj.rst:1003 ../../c-api/typeobj.rst:1019 -#: ../../c-api/typeobj.rst:1057 ../../c-api/typeobj.rst:1068 -#: ../../c-api/typeobj.rst:1078 ../../c-api/typeobj.rst:1088 -#: ../../c-api/typeobj.rst:1102 ../../c-api/typeobj.rst:1120 -#: ../../c-api/typeobj.rst:1143 ../../c-api/typeobj.rst:1158 -#: ../../c-api/typeobj.rst:1171 ../../c-api/typeobj.rst:1193 -#: ../../c-api/typeobj.rst:1237 ../../c-api/typeobj.rst:1258 -#: ../../c-api/typeobj.rst:1277 ../../c-api/typeobj.rst:1307 -#: ../../c-api/typeobj.rst:1329 ../../c-api/typeobj.rst:1355 -#: ../../c-api/typeobj.rst:1423 ../../c-api/typeobj.rst:1491 -#: ../../c-api/typeobj.rst:1552 ../../c-api/typeobj.rst:1588 -#: ../../c-api/typeobj.rst:1613 ../../c-api/typeobj.rst:1636 -#: ../../c-api/typeobj.rst:1649 ../../c-api/typeobj.rst:1664 -#: ../../c-api/typeobj.rst:1678 ../../c-api/typeobj.rst:1708 -#: ../../c-api/typeobj.rst:1740 ../../c-api/typeobj.rst:1766 -#: ../../c-api/typeobj.rst:1784 ../../c-api/typeobj.rst:1813 -#: ../../c-api/typeobj.rst:1857 ../../c-api/typeobj.rst:1874 -#: ../../c-api/typeobj.rst:1915 ../../c-api/typeobj.rst:1937 -#: ../../c-api/typeobj.rst:1969 ../../c-api/typeobj.rst:1997 -#: ../../c-api/typeobj.rst:2010 ../../c-api/typeobj.rst:2020 -#: ../../c-api/typeobj.rst:2037 ../../c-api/typeobj.rst:2054 -#: ../../c-api/typeobj.rst:2068 ../../c-api/typeobj.rst:2114 -#: ../../c-api/typeobj.rst:2137 +#: ../../c-api/typeobj.rst:1058 ../../c-api/typeobj.rst:1069 +#: ../../c-api/typeobj.rst:1079 ../../c-api/typeobj.rst:1089 +#: ../../c-api/typeobj.rst:1103 ../../c-api/typeobj.rst:1121 +#: ../../c-api/typeobj.rst:1144 ../../c-api/typeobj.rst:1159 +#: ../../c-api/typeobj.rst:1172 ../../c-api/typeobj.rst:1194 +#: ../../c-api/typeobj.rst:1238 ../../c-api/typeobj.rst:1259 +#: ../../c-api/typeobj.rst:1278 ../../c-api/typeobj.rst:1308 +#: ../../c-api/typeobj.rst:1330 ../../c-api/typeobj.rst:1356 +#: ../../c-api/typeobj.rst:1424 ../../c-api/typeobj.rst:1492 +#: ../../c-api/typeobj.rst:1553 ../../c-api/typeobj.rst:1589 +#: ../../c-api/typeobj.rst:1614 ../../c-api/typeobj.rst:1637 +#: ../../c-api/typeobj.rst:1650 ../../c-api/typeobj.rst:1665 +#: ../../c-api/typeobj.rst:1679 ../../c-api/typeobj.rst:1709 +#: ../../c-api/typeobj.rst:1741 ../../c-api/typeobj.rst:1767 +#: ../../c-api/typeobj.rst:1785 ../../c-api/typeobj.rst:1814 +#: ../../c-api/typeobj.rst:1858 ../../c-api/typeobj.rst:1875 +#: ../../c-api/typeobj.rst:1916 ../../c-api/typeobj.rst:1938 +#: ../../c-api/typeobj.rst:1970 ../../c-api/typeobj.rst:1998 +#: ../../c-api/typeobj.rst:2011 ../../c-api/typeobj.rst:2021 +#: ../../c-api/typeobj.rst:2038 ../../c-api/typeobj.rst:2055 +#: ../../c-api/typeobj.rst:2069 ../../c-api/typeobj.rst:2115 +#: ../../c-api/typeobj.rst:2138 msgid "**Inheritance:**" msgstr "" @@ -1245,10 +1245,10 @@ msgstr "" #: ../../c-api/typeobj.rst:528 ../../c-api/typeobj.rst:710 #: ../../c-api/typeobj.rst:827 ../../c-api/typeobj.rst:919 -#: ../../c-api/typeobj.rst:939 ../../c-api/typeobj.rst:1615 -#: ../../c-api/typeobj.rst:1638 ../../c-api/typeobj.rst:1768 -#: ../../c-api/typeobj.rst:1786 ../../c-api/typeobj.rst:1859 -#: ../../c-api/typeobj.rst:1971 ../../c-api/typeobj.rst:2116 +#: ../../c-api/typeobj.rst:939 ../../c-api/typeobj.rst:1616 +#: ../../c-api/typeobj.rst:1639 ../../c-api/typeobj.rst:1769 +#: ../../c-api/typeobj.rst:1787 ../../c-api/typeobj.rst:1860 +#: ../../c-api/typeobj.rst:1972 ../../c-api/typeobj.rst:2117 msgid "This field is inherited by subtypes." msgstr "" @@ -1603,12 +1603,12 @@ msgstr "" #: ../../c-api/typeobj.rst:829 ../../c-api/typeobj.rst:941 #: ../../c-api/typeobj.rst:966 ../../c-api/typeobj.rst:992 -#: ../../c-api/typeobj.rst:1033 ../../c-api/typeobj.rst:1561 -#: ../../c-api/typeobj.rst:1595 ../../c-api/typeobj.rst:1712 -#: ../../c-api/typeobj.rst:1745 ../../c-api/typeobj.rst:1820 -#: ../../c-api/typeobj.rst:1861 ../../c-api/typeobj.rst:1879 -#: ../../c-api/typeobj.rst:1921 ../../c-api/typeobj.rst:1942 -#: ../../c-api/typeobj.rst:1973 +#: ../../c-api/typeobj.rst:1033 ../../c-api/typeobj.rst:1562 +#: ../../c-api/typeobj.rst:1596 ../../c-api/typeobj.rst:1713 +#: ../../c-api/typeobj.rst:1746 ../../c-api/typeobj.rst:1821 +#: ../../c-api/typeobj.rst:1862 ../../c-api/typeobj.rst:1880 +#: ../../c-api/typeobj.rst:1922 ../../c-api/typeobj.rst:1943 +#: ../../c-api/typeobj.rst:1974 msgid "**Default:**" msgstr "**預設:**" @@ -1694,7 +1694,7 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: ../../c-api/typeobj.rst:901 ../../c-api/typeobj.rst:1554 +#: ../../c-api/typeobj.rst:901 ../../c-api/typeobj.rst:1555 msgid "" "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." "tp_richcompare`" @@ -1866,35 +1866,37 @@ msgid "" "a reference to the type, and the type object is INCREF'ed when a new " "instance is created, and DECREF'ed when an instance is destroyed (this does " "not apply to instances of subtypes; only the type referenced by the " -"instance's ob_type gets INCREF'ed or DECREF'ed)." +"instance's ob_type gets INCREF'ed or DECREF'ed). Heap types should also :ref:" +"`support garbage collection ` as they can form a " +"reference cycle with their own module object." msgstr "" -#: ../../c-api/typeobj.rst:1059 ../../c-api/typeobj.rst:1070 -#: ../../c-api/typeobj.rst:1080 ../../c-api/typeobj.rst:1090 -#: ../../c-api/typeobj.rst:1122 +#: ../../c-api/typeobj.rst:1060 ../../c-api/typeobj.rst:1071 +#: ../../c-api/typeobj.rst:1081 ../../c-api/typeobj.rst:1091 +#: ../../c-api/typeobj.rst:1123 msgid "???" msgstr "" -#: ../../c-api/typeobj.rst:1064 +#: ../../c-api/typeobj.rst:1065 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: ../../c-api/typeobj.rst:1075 +#: ../../c-api/typeobj.rst:1076 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1085 +#: ../../c-api/typeobj.rst:1086 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: ../../c-api/typeobj.rst:1095 +#: ../../c-api/typeobj.rst:1096 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, instances must be created using :c:macro:`PyObject_GC_New` and " @@ -1904,14 +1906,14 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: ../../c-api/typeobj.rst:1104 ../../c-api/typeobj.rst:1425 -#: ../../c-api/typeobj.rst:1493 +#: ../../c-api/typeobj.rst:1105 ../../c-api/typeobj.rst:1426 +#: ../../c-api/typeobj.rst:1494 msgid "" "Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." "tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: ../../c-api/typeobj.rst:1106 +#: ../../c-api/typeobj.rst:1107 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" "member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " @@ -1921,99 +1923,99 @@ msgid "" "values." msgstr "" -#: ../../c-api/typeobj.rst:1116 +#: ../../c-api/typeobj.rst:1117 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " "includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: ../../c-api/typeobj.rst:1127 +#: ../../c-api/typeobj.rst:1128 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: ../../c-api/typeobj.rst:1129 +#: ../../c-api/typeobj.rst:1130 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: ../../c-api/typeobj.rst:1131 +#: ../../c-api/typeobj.rst:1132 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1134 +#: ../../c-api/typeobj.rst:1135 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1137 +#: ../../c-api/typeobj.rst:1138 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: ../../c-api/typeobj.rst:1145 +#: ../../c-api/typeobj.rst:1146 msgid "" "This flag is never inherited by types without the :c:macro:" "`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " "whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1151 +#: ../../c-api/typeobj.rst:1152 msgid "" "This bit indicates that instances of the class have a ``__dict__`` " "attribute, and that the space for the dictionary is managed by the VM." msgstr "" -#: ../../c-api/typeobj.rst:1154 +#: ../../c-api/typeobj.rst:1155 msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." msgstr "" -#: ../../c-api/typeobj.rst:1160 +#: ../../c-api/typeobj.rst:1161 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1166 +#: ../../c-api/typeobj.rst:1167 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: ../../c-api/typeobj.rst:1173 +#: ../../c-api/typeobj.rst:1174 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject." "tp_weaklistoffset` field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1179 +#: ../../c-api/typeobj.rst:1180 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" "`~PyTypeObject.tp_itemsize`." msgstr "" -#: ../../c-api/typeobj.rst:1182 +#: ../../c-api/typeobj.rst:1183 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" ">tp_basicsize`` (which may be different in each subclass)." msgstr "" -#: ../../c-api/typeobj.rst:1187 +#: ../../c-api/typeobj.rst:1188 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" -#: ../../c-api/typeobj.rst:1195 +#: ../../c-api/typeobj.rst:1196 msgid "This flag is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1209 +#: ../../c-api/typeobj.rst:1210 msgid "" "These flags are used by functions such as :c:func:`PyLong_Check` to quickly " "determine if a type is a subclass of a built-in type; such specific checks " @@ -2023,90 +2025,90 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: ../../c-api/typeobj.rst:1220 +#: ../../c-api/typeobj.rst:1221 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1225 +#: ../../c-api/typeobj.rst:1226 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1233 +#: ../../c-api/typeobj.rst:1234 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: ../../c-api/typeobj.rst:1239 +#: ../../c-api/typeobj.rst:1240 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: ../../c-api/typeobj.rst:1246 +#: ../../c-api/typeobj.rst:1247 msgid "" "This flag is now removed from a class when the class's :py:meth:`~object." "__call__` method is reassigned." msgstr "" -#: ../../c-api/typeobj.rst:1249 +#: ../../c-api/typeobj.rst:1250 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: ../../c-api/typeobj.rst:1253 +#: ../../c-api/typeobj.rst:1254 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" -#: ../../c-api/typeobj.rst:1255 +#: ../../c-api/typeobj.rst:1256 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: ../../c-api/typeobj.rst:1260 +#: ../../c-api/typeobj.rst:1261 msgid "This flag is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:1266 +#: ../../c-api/typeobj.rst:1267 msgid "" "Disallow creating instances of the type: set :c:member:`~PyTypeObject." "tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." msgstr "" -#: ../../c-api/typeobj.rst:1270 +#: ../../c-api/typeobj.rst:1271 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" -#: ../../c-api/typeobj.rst:1273 +#: ../../c-api/typeobj.rst:1274 msgid "" "The flag is set automatically on :ref:`static types ` if :c:" "member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" "member:`~PyTypeObject.tp_new` is NULL." msgstr "" -#: ../../c-api/typeobj.rst:1279 +#: ../../c-api/typeobj.rst:1280 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" -#: ../../c-api/typeobj.rst:1286 +#: ../../c-api/typeobj.rst:1287 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1297 +#: ../../c-api/typeobj.rst:1298 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2114,23 +2116,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: ../../c-api/typeobj.rst:1304 ../../c-api/typeobj.rst:1326 +#: ../../c-api/typeobj.rst:1305 ../../c-api/typeobj.rst:1327 msgid "" ":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " "mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: ../../c-api/typeobj.rst:1309 +#: ../../c-api/typeobj.rst:1310 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: ../../c-api/typeobj.rst:1312 ../../c-api/typeobj.rst:1334 +#: ../../c-api/typeobj.rst:1313 ../../c-api/typeobj.rst:1335 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../c-api/typeobj.rst:1319 +#: ../../c-api/typeobj.rst:1320 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2138,49 +2140,49 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: ../../c-api/typeobj.rst:1331 +#: ../../c-api/typeobj.rst:1332 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_MAPPING`." msgstr "" -#: ../../c-api/typeobj.rst:1341 +#: ../../c-api/typeobj.rst:1342 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" -#: ../../c-api/typeobj.rst:1345 +#: ../../c-api/typeobj.rst:1346 msgid "" "This flag is present in header files, but is an internal feature and should " "not be used. It will be removed in a future version of CPython" msgstr "" -#: ../../c-api/typeobj.rst:1351 +#: ../../c-api/typeobj.rst:1352 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`__doc__` attribute on the " "type and instances of the type." msgstr "" -#: ../../c-api/typeobj.rst:1357 +#: ../../c-api/typeobj.rst:1358 msgid "This field is *not* inherited by subtypes." msgstr "" -#: ../../c-api/typeobj.rst:1362 +#: ../../c-api/typeobj.rst:1363 msgid "" "An optional pointer to a traversal function for the garbage collector. This " "is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1367 ../../c-api/typeobj.rst:1488 +#: ../../c-api/typeobj.rst:1368 ../../c-api/typeobj.rst:1489 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: ../../c-api/typeobj.rst:1370 +#: ../../c-api/typeobj.rst:1371 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -2190,7 +2192,7 @@ msgid "" "`!_thread` extension module::" msgstr "" -#: ../../c-api/typeobj.rst:1385 +#: ../../c-api/typeobj.rst:1386 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -2198,14 +2200,14 @@ msgid "" "part of a reference cycle." msgstr "" -#: ../../c-api/typeobj.rst:1389 +#: ../../c-api/typeobj.rst:1390 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: ../../c-api/typeobj.rst:1394 +#: ../../c-api/typeobj.rst:1395 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " "that the instance *owns* (by having :term:`strong references ` hold a reference to " "their type. Their traversal function must therefore either visit :c:func:" @@ -2234,14 +2236,14 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: ../../c-api/typeobj.rst:1418 +#: ../../c-api/typeobj.rst:1419 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1427 +#: ../../c-api/typeobj.rst:1428 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -2249,14 +2251,14 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1435 +#: ../../c-api/typeobj.rst:1436 msgid "" "An optional pointer to a clear function for the garbage collector. This is " "only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1440 +#: ../../c-api/typeobj.rst:1441 msgid "" "The :c:member:`~PyTypeObject.tp_clear` member function is used to break " "reference cycles in cyclic garbage detected by the garbage collector. Taken " @@ -2271,7 +2273,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../c-api/typeobj.rst:1450 +#: ../../c-api/typeobj.rst:1451 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2279,7 +2281,7 @@ msgid "" "example::" msgstr "" -#: ../../c-api/typeobj.rst:1464 +#: ../../c-api/typeobj.rst:1465 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be released (via :" @@ -2294,7 +2296,7 @@ msgid "" "performs the operations in a safe order." msgstr "" -#: ../../c-api/typeobj.rst:1476 +#: ../../c-api/typeobj.rst:1477 msgid "" "Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " "an instance is deallocated. For example, when reference counting is enough " @@ -2302,7 +2304,7 @@ msgid "" "is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." msgstr "" -#: ../../c-api/typeobj.rst:1482 +#: ../../c-api/typeobj.rst:1483 msgid "" "Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " "reference cycles, it's not necessary to clear contained objects like Python " @@ -2312,7 +2314,7 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../c-api/typeobj.rst:1495 +#: ../../c-api/typeobj.rst:1496 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" @@ -2320,18 +2322,18 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1503 +#: ../../c-api/typeobj.rst:1504 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1507 +#: ../../c-api/typeobj.rst:1508 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: ../../c-api/typeobj.rst:1510 +#: ../../c-api/typeobj.rst:1511 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2339,50 +2341,50 @@ msgid "" "set an exception condition." msgstr "" -#: ../../c-api/typeobj.rst:1515 +#: ../../c-api/typeobj.rst:1516 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: ../../c-api/typeobj.rst:1521 +#: ../../c-api/typeobj.rst:1522 msgid "Constant" msgstr "常數" -#: ../../c-api/typeobj.rst:1521 +#: ../../c-api/typeobj.rst:1522 msgid "Comparison" msgstr "" -#: ../../c-api/typeobj.rst:1523 +#: ../../c-api/typeobj.rst:1524 msgid "``<``" msgstr "``<``" -#: ../../c-api/typeobj.rst:1525 +#: ../../c-api/typeobj.rst:1526 msgid "``<=``" msgstr "``<=``" -#: ../../c-api/typeobj.rst:1527 +#: ../../c-api/typeobj.rst:1528 msgid "``==``" msgstr "``==``" -#: ../../c-api/typeobj.rst:1529 +#: ../../c-api/typeobj.rst:1530 msgid "``!=``" msgstr "``!=``" -#: ../../c-api/typeobj.rst:1531 +#: ../../c-api/typeobj.rst:1532 msgid "``>``" msgstr "``>``" -#: ../../c-api/typeobj.rst:1533 +#: ../../c-api/typeobj.rst:1534 msgid "``>=``" msgstr "``>=``" -#: ../../c-api/typeobj.rst:1536 +#: ../../c-api/typeobj.rst:1537 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: ../../c-api/typeobj.rst:1540 +#: ../../c-api/typeobj.rst:1541 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2390,15 +2392,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: ../../c-api/typeobj.rst:1546 +#: ../../c-api/typeobj.rst:1547 msgid "The returned value is a new :term:`strong reference`." msgstr "" -#: ../../c-api/typeobj.rst:1548 +#: ../../c-api/typeobj.rst:1549 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: ../../c-api/typeobj.rst:1556 +#: ../../c-api/typeobj.rst:1557 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2406,7 +2408,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1563 +#: ../../c-api/typeobj.rst:1564 msgid "" ":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." "tp_richcompare` implementation, which may be inherited. However, if only :c:" @@ -2415,13 +2417,13 @@ msgid "" "comparisons." msgstr "" -#: ../../c-api/typeobj.rst:1572 +#: ../../c-api/typeobj.rst:1573 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1575 +#: ../../c-api/typeobj.rst:1576 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2431,19 +2433,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1582 +#: ../../c-api/typeobj.rst:1583 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1585 +#: ../../c-api/typeobj.rst:1586 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" -#: ../../c-api/typeobj.rst:1590 +#: ../../c-api/typeobj.rst:1591 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2452,7 +2454,7 @@ msgid "" "not be a problem." msgstr "" -#: ../../c-api/typeobj.rst:1597 +#: ../../c-api/typeobj.rst:1598 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject." @@ -2460,24 +2462,24 @@ msgid "" "unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1605 +#: ../../c-api/typeobj.rst:1606 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: ../../c-api/typeobj.rst:1609 +#: ../../c-api/typeobj.rst:1610 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: ../../c-api/typeobj.rst:1620 +#: ../../c-api/typeobj.rst:1621 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1625 +#: ../../c-api/typeobj.rst:1626 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2485,74 +2487,74 @@ msgid "" "this type are iterators." msgstr "" -#: ../../c-api/typeobj.rst:1630 +#: ../../c-api/typeobj.rst:1631 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: ../../c-api/typeobj.rst:1634 +#: ../../c-api/typeobj.rst:1635 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: ../../c-api/typeobj.rst:1643 +#: ../../c-api/typeobj.rst:1644 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: ../../c-api/typeobj.rst:1646 +#: ../../c-api/typeobj.rst:1647 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1651 +#: ../../c-api/typeobj.rst:1652 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1657 +#: ../../c-api/typeobj.rst:1658 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: ../../c-api/typeobj.rst:1661 +#: ../../c-api/typeobj.rst:1662 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1666 +#: ../../c-api/typeobj.rst:1667 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1672 +#: ../../c-api/typeobj.rst:1673 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: ../../c-api/typeobj.rst:1675 +#: ../../c-api/typeobj.rst:1676 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1680 +#: ../../c-api/typeobj.rst:1681 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1686 +#: ../../c-api/typeobj.rst:1687 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2560,7 +2562,7 @@ msgid "" "metatype." msgstr "" -#: ../../c-api/typeobj.rst:1694 +#: ../../c-api/typeobj.rst:1695 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2568,7 +2570,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: ../../c-api/typeobj.rst:1699 +#: ../../c-api/typeobj.rst:1700 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "data:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2576,27 +2578,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: ../../c-api/typeobj.rst:1705 +#: ../../c-api/typeobj.rst:1706 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: ../../c-api/typeobj.rst:1710 +#: ../../c-api/typeobj.rst:1711 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: ../../c-api/typeobj.rst:1714 +#: ../../c-api/typeobj.rst:1715 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: ../../c-api/typeobj.rst:1720 +#: ../../c-api/typeobj.rst:1721 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1722 +#: ../../c-api/typeobj.rst:1723 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2607,64 +2609,64 @@ msgid "" "be treated as read-only." msgstr "" -#: ../../c-api/typeobj.rst:1730 +#: ../../c-api/typeobj.rst:1731 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retrieve the dictionary for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1736 +#: ../../c-api/typeobj.rst:1737 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1742 +#: ../../c-api/typeobj.rst:1743 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1747 +#: ../../c-api/typeobj.rst:1748 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: ../../c-api/typeobj.rst:1752 +#: ../../c-api/typeobj.rst:1753 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: ../../c-api/typeobj.rst:1758 +#: ../../c-api/typeobj.rst:1759 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: ../../c-api/typeobj.rst:1760 ../../c-api/typeobj.rst:1776 -#: ../../c-api/typeobj.rst:1840 ../../c-api/typeobj.rst:1870 -#: ../../c-api/typeobj.rst:1894 +#: ../../c-api/typeobj.rst:1761 ../../c-api/typeobj.rst:1777 +#: ../../c-api/typeobj.rst:1841 ../../c-api/typeobj.rst:1871 +#: ../../c-api/typeobj.rst:1895 msgid "The function signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1773 +#: ../../c-api/typeobj.rst:1774 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: ../../c-api/typeobj.rst:1780 +#: ../../c-api/typeobj.rst:1781 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: ../../c-api/typeobj.rst:1791 +#: ../../c-api/typeobj.rst:1792 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1794 +#: ../../c-api/typeobj.rst:1795 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2672,19 +2674,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1799 +#: ../../c-api/typeobj.rst:1800 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1802 +#: ../../c-api/typeobj.rst:1803 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: ../../c-api/typeobj.rst:1804 +#: ../../c-api/typeobj.rst:1805 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -2693,13 +2695,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: ../../c-api/typeobj.rst:1810 +#: ../../c-api/typeobj.rst:1811 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: ../../c-api/typeobj.rst:1815 +#: ../../c-api/typeobj.rst:1816 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -2707,25 +2709,25 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: ../../c-api/typeobj.rst:1822 +#: ../../c-api/typeobj.rst:1823 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" -#: ../../c-api/typeobj.rst:1825 +#: ../../c-api/typeobj.rst:1826 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_dict` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1833 +#: ../../c-api/typeobj.rst:1834 msgid "An optional pointer to an instance initialization function." msgstr "" -#: ../../c-api/typeobj.rst:1835 +#: ../../c-api/typeobj.rst:1836 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -2733,14 +2735,14 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: ../../c-api/typeobj.rst:1844 +#: ../../c-api/typeobj.rst:1845 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`~object.__init__`." msgstr "" -#: ../../c-api/typeobj.rst:1848 +#: ../../c-api/typeobj.rst:1849 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2752,43 +2754,43 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: ../../c-api/typeobj.rst:1855 +#: ../../c-api/typeobj.rst:1856 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: ../../c-api/typeobj.rst:1863 +#: ../../c-api/typeobj.rst:1864 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: ../../c-api/typeobj.rst:1868 +#: ../../c-api/typeobj.rst:1869 msgid "An optional pointer to an instance allocation function." msgstr "" -#: ../../c-api/typeobj.rst:1876 +#: ../../c-api/typeobj.rst:1877 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: ../../c-api/typeobj.rst:1881 +#: ../../c-api/typeobj.rst:1882 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: ../../c-api/typeobj.rst:1885 +#: ../../c-api/typeobj.rst:1886 msgid "" "For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: ../../c-api/typeobj.rst:1892 +#: ../../c-api/typeobj.rst:1893 msgid "An optional pointer to an instance creation function." msgstr "" -#: ../../c-api/typeobj.rst:1898 +#: ../../c-api/typeobj.rst:1899 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2797,7 +2799,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: ../../c-api/typeobj.rst:1904 +#: ../../c-api/typeobj.rst:1905 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2809,20 +2811,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: ../../c-api/typeobj.rst:1912 +#: ../../c-api/typeobj.rst:1913 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: ../../c-api/typeobj.rst:1917 +#: ../../c-api/typeobj.rst:1918 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" -#: ../../c-api/typeobj.rst:1923 +#: ../../c-api/typeobj.rst:1924 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -2830,40 +2832,40 @@ msgid "" "factory function." msgstr "" -#: ../../c-api/typeobj.rst:1931 +#: ../../c-api/typeobj.rst:1932 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1935 +#: ../../c-api/typeobj.rst:1936 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: ../../c-api/typeobj.rst:1939 +#: ../../c-api/typeobj.rst:1940 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: ../../c-api/typeobj.rst:1944 +#: ../../c-api/typeobj.rst:1945 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" "func:`PyType_GenericAlloc` and the value of the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag bit." msgstr "" -#: ../../c-api/typeobj.rst:1948 +#: ../../c-api/typeobj.rst:1949 msgid "" "For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`." msgstr "" -#: ../../c-api/typeobj.rst:1953 +#: ../../c-api/typeobj.rst:1954 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: ../../c-api/typeobj.rst:1955 +#: ../../c-api/typeobj.rst:1956 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -2875,89 +2877,89 @@ msgid "" "instance. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1965 +#: ../../c-api/typeobj.rst:1966 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" -#: ../../c-api/typeobj.rst:1975 +#: ../../c-api/typeobj.rst:1976 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: ../../c-api/typeobj.rst:1981 +#: ../../c-api/typeobj.rst:1982 msgid "Tuple of base types." msgstr "" -#: ../../c-api/typeobj.rst:1983 ../../c-api/typeobj.rst:2007 +#: ../../c-api/typeobj.rst:1984 ../../c-api/typeobj.rst:2008 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: ../../c-api/typeobj.rst:1986 +#: ../../c-api/typeobj.rst:1987 msgid "" "For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " "` can be used instead of the *bases* argument of :c:func:" "`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: ../../c-api/typeobj.rst:1993 +#: ../../c-api/typeobj.rst:1994 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: ../../c-api/typeobj.rst:1999 ../../c-api/typeobj.rst:2022 -#: ../../c-api/typeobj.rst:2039 ../../c-api/typeobj.rst:2056 -#: ../../c-api/typeobj.rst:2070 +#: ../../c-api/typeobj.rst:2000 ../../c-api/typeobj.rst:2023 +#: ../../c-api/typeobj.rst:2040 ../../c-api/typeobj.rst:2057 +#: ../../c-api/typeobj.rst:2071 msgid "This field is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:2004 +#: ../../c-api/typeobj.rst:2005 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: ../../c-api/typeobj.rst:2012 +#: ../../c-api/typeobj.rst:2013 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2018 +#: ../../c-api/typeobj.rst:2019 msgid "Unused. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2027 +#: ../../c-api/typeobj.rst:2028 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: ../../c-api/typeobj.rst:2029 +#: ../../c-api/typeobj.rst:2030 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__`." msgstr "" -#: ../../c-api/typeobj.rst:2034 +#: ../../c-api/typeobj.rst:2035 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: ../../c-api/typeobj.rst:2044 +#: ../../c-api/typeobj.rst:2045 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2049 +#: ../../c-api/typeobj.rst:2050 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -2965,21 +2967,21 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: ../../c-api/typeobj.rst:2061 +#: ../../c-api/typeobj.rst:2062 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: ../../c-api/typeobj.rst:2066 +#: ../../c-api/typeobj.rst:2067 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2075 +#: ../../c-api/typeobj.rst:2076 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2079 +#: ../../c-api/typeobj.rst:2080 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -2989,14 +2991,14 @@ msgid "" "object in a sane state." msgstr "" -#: ../../c-api/typeobj.rst:2086 +#: ../../c-api/typeobj.rst:2087 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: ../../c-api/typeobj.rst:2103 +#: ../../c-api/typeobj.rst:2104 msgid "" "Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." "tp_dealloc` may be called from any Python thread, not just the thread which " @@ -3009,18 +3011,18 @@ msgid "" "which called tp_dealloc will not violate any assumptions of the library." msgstr "" -#: ../../c-api/typeobj.rst:2122 +#: ../../c-api/typeobj.rst:2123 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: ../../c-api/typeobj.rst:2126 +#: ../../c-api/typeobj.rst:2127 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: ../../c-api/typeobj.rst:2131 +#: ../../c-api/typeobj.rst:2132 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " @@ -3028,65 +3030,65 @@ msgid "" "meth:`~object.__new__` and :meth:`~object.__init__` is used." msgstr "" -#: ../../c-api/typeobj.rst:2139 +#: ../../c-api/typeobj.rst:2140 msgid "This field is never inherited." msgstr "" -#: ../../c-api/typeobj.rst:2141 +#: ../../c-api/typeobj.rst:2142 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: ../../c-api/typeobj.rst:2146 +#: ../../c-api/typeobj.rst:2147 msgid "Internal. Do not use." msgstr "" -#: ../../c-api/typeobj.rst:2154 +#: ../../c-api/typeobj.rst:2155 msgid "Static Types" msgstr "" -#: ../../c-api/typeobj.rst:2156 +#: ../../c-api/typeobj.rst:2157 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2160 +#: ../../c-api/typeobj.rst:2161 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: ../../c-api/typeobj.rst:2162 +#: ../../c-api/typeobj.rst:2163 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: ../../c-api/typeobj.rst:2164 +#: ../../c-api/typeobj.rst:2165 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: ../../c-api/typeobj.rst:2166 +#: ../../c-api/typeobj.rst:2167 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: ../../c-api/typeobj.rst:2170 +#: ../../c-api/typeobj.rst:2171 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: ../../c-api/typeobj.rst:2178 +#: ../../c-api/typeobj.rst:2179 msgid "Heap Types" msgstr "" -#: ../../c-api/typeobj.rst:2180 +#: ../../c-api/typeobj.rst:2181 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -3094,29 +3096,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: ../../c-api/typeobj.rst:2185 +#: ../../c-api/typeobj.rst:2186 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: ../../c-api/typeobj.rst:2193 +#: ../../c-api/typeobj.rst:2194 msgid "Number Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2200 +#: ../../c-api/typeobj.rst:2201 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: ../../c-api/typeobj.rst:2206 ../../c-api/typeobj.rst:2530 +#: ../../c-api/typeobj.rst:2207 ../../c-api/typeobj.rst:2531 msgid "Here is the structure definition::" msgstr "" -#: ../../c-api/typeobj.rst:2253 +#: ../../c-api/typeobj.rst:2254 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3126,31 +3128,31 @@ msgid "" "and set an exception." msgstr "" -#: ../../c-api/typeobj.rst:2262 +#: ../../c-api/typeobj.rst:2263 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: ../../c-api/typeobj.rst:2307 +#: ../../c-api/typeobj.rst:2308 msgid "Mapping Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2314 +#: ../../c-api/typeobj.rst:2315 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: ../../c-api/typeobj.rst:2319 +#: ../../c-api/typeobj.rst:2320 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: ../../c-api/typeobj.rst:2325 +#: ../../c-api/typeobj.rst:2326 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3158,7 +3160,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2333 +#: ../../c-api/typeobj.rst:2334 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" @@ -3168,17 +3170,17 @@ msgid "" "deletion." msgstr "" -#: ../../c-api/typeobj.rst:2344 +#: ../../c-api/typeobj.rst:2345 msgid "Sequence Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2351 +#: ../../c-api/typeobj.rst:2352 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: ../../c-api/typeobj.rst:2356 +#: ../../c-api/typeobj.rst:2357 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3186,21 +3188,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: ../../c-api/typeobj.rst:2363 +#: ../../c-api/typeobj.rst:2364 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2369 +#: ../../c-api/typeobj.rst:2370 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2375 +#: ../../c-api/typeobj.rst:2376 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3209,7 +3211,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2381 +#: ../../c-api/typeobj.rst:2382 msgid "" "Negative indexes are handled as follows: if the :c:member:" "`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " @@ -3218,7 +3220,7 @@ msgid "" "index is passed as is to the function." msgstr "" -#: ../../c-api/typeobj.rst:2388 +#: ../../c-api/typeobj.rst:2389 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3227,14 +3229,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: ../../c-api/typeobj.rst:2397 +#: ../../c-api/typeobj.rst:2398 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: ../../c-api/typeobj.rst:2404 +#: ../../c-api/typeobj.rst:2405 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3244,7 +3246,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2413 +#: ../../c-api/typeobj.rst:2414 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3254,72 +3256,72 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2424 +#: ../../c-api/typeobj.rst:2425 msgid "Buffer Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2432 +#: ../../c-api/typeobj.rst:2433 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: ../../c-api/typeobj.rst:2438 ../../c-api/typeobj.rst:2487 -#: ../../c-api/typeobj.rst:2541 ../../c-api/typeobj.rst:2552 -#: ../../c-api/typeobj.rst:2564 ../../c-api/typeobj.rst:2574 +#: ../../c-api/typeobj.rst:2439 ../../c-api/typeobj.rst:2488 +#: ../../c-api/typeobj.rst:2542 ../../c-api/typeobj.rst:2553 +#: ../../c-api/typeobj.rst:2565 ../../c-api/typeobj.rst:2575 msgid "The signature of this function is::" msgstr "" -#: ../../c-api/typeobj.rst:2442 +#: ../../c-api/typeobj.rst:2443 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: ../../c-api/typeobj.rst:2446 +#: ../../c-api/typeobj.rst:2447 msgid "" "Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" "expr:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:2449 +#: ../../c-api/typeobj.rst:2450 msgid "Fill in the requested fields." msgstr "" -#: ../../c-api/typeobj.rst:2451 +#: ../../c-api/typeobj.rst:2452 msgid "Increment an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2453 +#: ../../c-api/typeobj.rst:2454 msgid "" "Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." msgstr "" -#: ../../c-api/typeobj.rst:2455 +#: ../../c-api/typeobj.rst:2456 msgid "Return ``0``." msgstr "回傳 ``0``。" -#: ../../c-api/typeobj.rst:2457 +#: ../../c-api/typeobj.rst:2458 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: ../../c-api/typeobj.rst:2460 +#: ../../c-api/typeobj.rst:2461 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "expr:`view->obj` to a new reference to itself." msgstr "" -#: ../../c-api/typeobj.rst:2463 +#: ../../c-api/typeobj.rst:2464 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:expr:`view->obj` will be a new reference to the root object." msgstr "" -#: ../../c-api/typeobj.rst:2467 +#: ../../c-api/typeobj.rst:2468 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3327,7 +3329,7 @@ msgid "" "types>`." msgstr "" -#: ../../c-api/typeobj.rst:2472 +#: ../../c-api/typeobj.rst:2473 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3336,19 +3338,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: ../../c-api/typeobj.rst:2479 +#: ../../c-api/typeobj.rst:2480 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: ../../c-api/typeobj.rst:2482 +#: ../../c-api/typeobj.rst:2483 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: ../../c-api/typeobj.rst:2491 +#: ../../c-api/typeobj.rst:2492 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3356,15 +3358,15 @@ msgid "" "these optional steps:" msgstr "" -#: ../../c-api/typeobj.rst:2496 +#: ../../c-api/typeobj.rst:2497 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2498 +#: ../../c-api/typeobj.rst:2499 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: ../../c-api/typeobj.rst:2500 +#: ../../c-api/typeobj.rst:2501 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3372,68 +3374,68 @@ msgid "" "*view* argument." msgstr "" -#: ../../c-api/typeobj.rst:2506 +#: ../../c-api/typeobj.rst:2507 msgid "" "This function MUST NOT decrement :c:expr:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: ../../c-api/typeobj.rst:2511 +#: ../../c-api/typeobj.rst:2512 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: ../../c-api/typeobj.rst:2519 +#: ../../c-api/typeobj.rst:2520 msgid "Async Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2527 +#: ../../c-api/typeobj.rst:2528 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: ../../c-api/typeobj.rst:2545 +#: ../../c-api/typeobj.rst:2546 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: ../../c-api/typeobj.rst:2548 +#: ../../c-api/typeobj.rst:2549 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: ../../c-api/typeobj.rst:2556 +#: ../../c-api/typeobj.rst:2557 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`~object." "__anext__` for details." msgstr "" -#: ../../c-api/typeobj.rst:2559 +#: ../../c-api/typeobj.rst:2560 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: ../../c-api/typeobj.rst:2568 +#: ../../c-api/typeobj.rst:2569 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2578 +#: ../../c-api/typeobj.rst:2579 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2587 +#: ../../c-api/typeobj.rst:2588 msgid "Slot Type typedefs" msgstr "" -#: ../../c-api/typeobj.rst:2591 +#: ../../c-api/typeobj.rst:2592 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3447,80 +3449,80 @@ msgid "" "length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/typeobj.rst:2601 +#: ../../c-api/typeobj.rst:2602 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: ../../c-api/typeobj.rst:2608 +#: ../../c-api/typeobj.rst:2609 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "請見 :c:member:`~PyTypeObject.tp_free`。" -#: ../../c-api/typeobj.rst:2612 +#: ../../c-api/typeobj.rst:2613 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "請見 :c:member:`~PyTypeObject.tp_new`。" -#: ../../c-api/typeobj.rst:2616 +#: ../../c-api/typeobj.rst:2617 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "請見 :c:member:`~PyTypeObject.tp_init`。" -#: ../../c-api/typeobj.rst:2620 +#: ../../c-api/typeobj.rst:2621 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "請見 :c:member:`~PyTypeObject.tp_repr`。" -#: ../../c-api/typeobj.rst:2624 ../../c-api/typeobj.rst:2633 +#: ../../c-api/typeobj.rst:2625 ../../c-api/typeobj.rst:2634 msgid "Return the value of the named attribute for the object." msgstr "" -#: ../../c-api/typeobj.rst:2628 ../../c-api/typeobj.rst:2639 +#: ../../c-api/typeobj.rst:2629 ../../c-api/typeobj.rst:2640 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: ../../c-api/typeobj.rst:2635 +#: ../../c-api/typeobj.rst:2636 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`。" -#: ../../c-api/typeobj.rst:2642 +#: ../../c-api/typeobj.rst:2643 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`。" -#: ../../c-api/typeobj.rst:2646 +#: ../../c-api/typeobj.rst:2647 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_get`。" -#: ../../c-api/typeobj.rst:2650 +#: ../../c-api/typeobj.rst:2651 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "請見 :c:member:`~PyTypeObject.tp_descr_set`。" -#: ../../c-api/typeobj.rst:2654 +#: ../../c-api/typeobj.rst:2655 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "請見 :c:member:`~PyTypeObject.tp_hash`。" -#: ../../c-api/typeobj.rst:2658 +#: ../../c-api/typeobj.rst:2659 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`。" -#: ../../c-api/typeobj.rst:2662 +#: ../../c-api/typeobj.rst:2663 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "請見 :c:member:`~PyTypeObject.tp_iter`。" -#: ../../c-api/typeobj.rst:2666 +#: ../../c-api/typeobj.rst:2667 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`。" -#: ../../c-api/typeobj.rst:2680 +#: ../../c-api/typeobj.rst:2681 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "請見 :c:member:`~PyAsyncMethods.am_send`。" -#: ../../c-api/typeobj.rst:2696 +#: ../../c-api/typeobj.rst:2697 msgid "Examples" msgstr "範例" -#: ../../c-api/typeobj.rst:2698 +#: ../../c-api/typeobj.rst:2699 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3528,33 +3530,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: ../../c-api/typeobj.rst:2703 +#: ../../c-api/typeobj.rst:2704 msgid "A basic :ref:`static type `::" msgstr "" -#: ../../c-api/typeobj.rst:2720 +#: ../../c-api/typeobj.rst:2721 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: ../../c-api/typeobj.rst:2764 +#: ../../c-api/typeobj.rst:2765 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: ../../c-api/typeobj.rst:2789 +#: ../../c-api/typeobj.rst:2790 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: ../../c-api/typeobj.rst:2808 +#: ../../c-api/typeobj.rst:2809 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: ../../c-api/typeobj.rst:2819 +#: ../../c-api/typeobj.rst:2820 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" diff --git a/library/ast.po b/library/ast.po index 7384b4376d..b392ab6aa8 100644 --- a/library/ast.po +++ b/library/ast.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-02 00:03+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1772,16 +1772,17 @@ msgstr "" "的工具很有幫助。" #: ../../library/ast.rst:2523 +#, fuzzy msgid "" -"`leoAst.py `_ unifies the " -"token-based and parse-tree-based views of python programs by inserting two-" -"way links between tokens and ast nodes." +"`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " +"by inserting two-way links between tokens and ast nodes." msgstr "" "`leoAst.py `_ 透過在 token " "和 ast 節點之間插入雙向鏈結,統一了 python 程式的基於 token 和基於剖析樹的視" "圖。" -#: ../../library/ast.rst:2527 +#: ../../library/ast.rst:2528 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " @@ -1791,12 +1792,13 @@ msgstr "" "(Concrete Syntax Tree),看起來像 ast 樹並保留所有格式詳細資訊。它對於建置自動" "重構 (codemod) 應用程式和 linter 非常有用。" -#: ../../library/ast.rst:2532 +#: ../../library/ast.rst:2533 +#, fuzzy msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " "multiple Python versions). Parso is also able to list multiple syntax errors " -"in your python file." +"in your Python file." msgstr "" "`Parso `_ 是一個 Python 剖析器,支援不同 " "Python 版本的錯誤復原和往返剖析。Parso 還能夠列出 python 檔案中的多個語法錯" diff --git a/library/ctypes.po b/library/ctypes.po index 993b8ddb37..5752d1c2a7 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2023-04-26 02:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2162,15 +2162,15 @@ msgstr "" #: ../../library/ctypes.rst:2077 msgid "" -"This function returns the C string starting at memory address *address* as a " -"bytes object. If size is specified, it is used as size, otherwise the string " -"is assumed to be zero-terminated." +"Return the byte string at *void \\*ptr*. If *size* is specified, it is used " +"as size, otherwise the string is assumed to be zero-terminated." msgstr "" #: ../../library/ctypes.rst:2081 +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " -"arguments ``address``, ``size``." +"arguments ``ptr``, ``size``." msgstr "" "引發一個附帶引數 ``error``、``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.string_at``。" @@ -2192,16 +2192,16 @@ msgstr "" #: ../../library/ctypes.rst:2099 msgid "" -"This function returns the wide character string starting at memory address " -"*address* as a string. If *size* is specified, it is used as the number of " -"characters of the string, otherwise the string is assumed to be zero-" -"terminated." +"Return the wide-character string at *void \\*ptr*. If *size* is specified, " +"it is used as the number of characters of the string, otherwise the string " +"is assumed to be zero-terminated." msgstr "" #: ../../library/ctypes.rst:2104 +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " -"arguments ``address``, ``size``." +"arguments ``ptr``, ``size``." msgstr "" "引發一個附帶引數 ``address``、``size`` 的\\ :ref:`稽核事件 ` " "``ctypes.wstring_at``。" diff --git a/library/statistics.po b/library/statistics.po index ace3fec006..d27a191fe0 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2023-07-22 21:15+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -654,11 +654,12 @@ msgstr "" "異數大表示資料分散,變異數小表示資料集中在平均數附近。" #: ../../library/statistics.rst:452 +#, fuzzy msgid "" -"If the optional second argument *mu* is given, it is typically the mean of " -"the *data*. It can also be used to compute the second moment around a point " -"that is not the mean. If it is missing or ``None`` (the default), the " -"arithmetic mean is automatically calculated." +"If the optional second argument *mu* is given, it should be the *population* " +"mean of the *data*. It can also be used to compute the second moment around " +"a point that is not the mean. If it is missing or ``None`` (the default), " +"the arithmetic mean is automatically calculated." msgstr "" "若有傳入選擇性的第二個引數 *mu*,該引數通常是 *data* 的平均值。它也可以用於計" "算非以平均值為中心的第二動差。如果沒有傳入此引數或者引數為 ``None`` (預設" @@ -736,9 +737,10 @@ msgstr "" "資料分散,變異數小表示資料集中在平均數附近。" #: ../../library/statistics.rst:524 +#, fuzzy msgid "" -"If the optional second argument *xbar* is given, it should be the mean of " -"*data*. If it is missing or ``None`` (the default), the mean is " +"If the optional second argument *xbar* is given, it should be the *sample* " +"mean of *data*. If it is missing or ``None`` (the default), the mean is " "automatically calculated." msgstr "" "若有傳入選擇性的第二個引數 *xbar*,它應該是 *data* 的平均值。如果沒有傳入或者" @@ -757,9 +759,10 @@ msgid "Raises :exc:`StatisticsError` if *data* has fewer than two values." msgstr "若 *data* 內少於兩個值,則引發 :exc:`StatisticsError`。" #: ../../library/statistics.rst:541 +#, fuzzy msgid "" -"If you have already calculated the mean of your data, you can pass it as the " -"optional second argument *xbar* to avoid recalculation:" +"If you have already calculated the sample mean of your data, you can pass it " +"as the optional second argument *xbar* to avoid recalculation:" msgstr "" "如果已經計算出資料的平均值,你可以將其作為選擇性的第二個引數 *mu* 傳遞以避免" "重新計算:" diff --git a/library/typing.po b/library/typing.po index b2e4dd4921..030b35e889 100644 --- a/library/typing.po +++ b/library/typing.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: 2024-03-26 11:30+0800\n" "Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -284,7 +284,7 @@ msgstr "" "為一個函式,可以接受一個型別為 :class:`int` 的引數,並回傳一個 :class:`str`。" #: ../../library/typing.rst:213 ../../library/typing.rst:2831 -#: ../../library/typing.rst:2973 +#: ../../library/typing.rst:2975 msgid "For example:" msgstr "舉例來說:" @@ -337,7 +337,7 @@ msgstr "" "``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " "ReturnType]`` 的形式。" -#: ../../library/typing.rst:283 ../../library/typing.rst:3499 +#: ../../library/typing.rst:283 ../../library/typing.rst:3501 msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." @@ -1833,7 +1833,7 @@ msgid "Typed version of :func:`collections.namedtuple`." msgstr "" #: ../../library/typing.rst:1971 ../../library/typing.rst:2048 -#: ../../library/typing.rst:3013 +#: ../../library/typing.rst:3015 msgid "Usage::" msgstr "" @@ -2717,26 +2717,26 @@ msgstr "" msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " -"``globals`` and ``locals`` namespaces. For a class ``C``, return a " -"dictionary constructed by merging all the ``__annotations__`` along ``C." -"__mro__`` in reverse order." +"``globals``, ``locals`` and (where applicable) :ref:`type parameter ` namespaces. For a class ``C``, return a dictionary constructed by " +"merging all the ``__annotations__`` along ``C.__mro__`` in reverse order." msgstr "" -#: ../../library/typing.rst:2894 +#: ../../library/typing.rst:2896 msgid "" "The function recursively replaces all ``Annotated[T, ...]`` with ``T``, " "unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " "more information). For example:" msgstr "" -#: ../../library/typing.rst:2911 +#: ../../library/typing.rst:2913 msgid "" ":func:`get_type_hints` does not work with imported :ref:`type aliases ` that include forward references. Enabling postponed evaluation of " "annotations (:pep:`563`) may remove the need for most forward references." msgstr "" -#: ../../library/typing.rst:2916 +#: ../../library/typing.rst:2918 msgid "" "Added ``include_extras`` parameter as part of :pep:`593`. See the " "documentation on :data:`Annotated` for more information." @@ -2744,20 +2744,20 @@ msgstr "" "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。更多資訊請見 :data:" "`Annotated` 的文件。" -#: ../../library/typing.rst:2920 +#: ../../library/typing.rst:2922 msgid "" "Previously, ``Optional[t]`` was added for function and method annotations if " "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" -#: ../../library/typing.rst:2927 +#: ../../library/typing.rst:2929 msgid "" "Get the unsubscripted version of a type: for a typing object of the form " "``X[Y, Z, ...]`` return ``X``." msgstr "" -#: ../../library/typing.rst:2930 +#: ../../library/typing.rst:2932 msgid "" "If ``X`` is a typing-module alias for a builtin or :mod:`collections` class, " "it will be normalized to the original class. If ``X`` is an instance of :" @@ -2765,17 +2765,17 @@ msgid "" "class:`ParamSpec`. Return ``None`` for unsupported objects." msgstr "" -#: ../../library/typing.rst:2936 ../../library/typing.rst:2959 +#: ../../library/typing.rst:2938 ../../library/typing.rst:2961 msgid "Examples:" msgstr "舉例:" -#: ../../library/typing.rst:2951 +#: ../../library/typing.rst:2953 msgid "" "Get type arguments with all substitutions performed: for a typing object of " "the form ``X[Y, Z, ...]`` return ``(Y, Z, ...)``." msgstr "" -#: ../../library/typing.rst:2954 +#: ../../library/typing.rst:2956 msgid "" "If ``X`` is a union or :class:`Literal` contained in another generic type, " "the order of ``(Y, Z, ...)`` may be different from the order of the original " @@ -2783,40 +2783,40 @@ msgid "" "objects." msgstr "" -#: ../../library/typing.rst:2971 +#: ../../library/typing.rst:2973 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2992 +#: ../../library/typing.rst:2994 msgid "" "Class used for internal typing representation of string forward references." msgstr "" -#: ../../library/typing.rst:2994 +#: ../../library/typing.rst:2996 msgid "" "For example, ``List[\"SomeClass\"]`` is implicitly transformed into " "``List[ForwardRef(\"SomeClass\")]``. ``ForwardRef`` should not be " "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2999 +#: ../../library/typing.rst:3001 msgid "" ":pep:`585` generic types such as ``list[\"SomeClass\"]`` will not be " "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" -#: ../../library/typing.rst:3006 +#: ../../library/typing.rst:3008 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:3010 +#: ../../library/typing.rst:3012 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime." msgstr "" -#: ../../library/typing.rst:3021 +#: ../../library/typing.rst:3023 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2824,7 +2824,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:3028 +#: ../../library/typing.rst:3030 msgid "" "If ``from __future__ import annotations`` is used, annotations are not " "evaluated at function definition time. Instead, they are stored as strings " @@ -2832,11 +2832,11 @@ msgid "" "annotation (see :pep:`563`)." msgstr "" -#: ../../library/typing.rst:3040 +#: ../../library/typing.rst:3042 msgid "Deprecated aliases" msgstr "棄用的別名" -#: ../../library/typing.rst:3042 +#: ../../library/typing.rst:3044 msgid "" "This module defines several deprecated aliases to pre-existing standard " "library classes. These were originally included in the typing module in " @@ -2845,7 +2845,7 @@ msgid "" "existing classes were enhanced to support ``[]`` (see :pep:`585`)." msgstr "" -#: ../../library/typing.rst:3049 +#: ../../library/typing.rst:3051 msgid "" "The redundant types are deprecated as of Python 3.9. However, while the " "aliases may be removed at some point, removal of these aliases is not " @@ -2853,7 +2853,7 @@ msgid "" "the interpreter for these aliases." msgstr "" -#: ../../library/typing.rst:3054 +#: ../../library/typing.rst:3056 msgid "" "If at some point it is decided to remove these deprecated aliases, a " "deprecation warning will be issued by the interpreter for at least two " @@ -2861,188 +2861,188 @@ msgid "" "typing module without deprecation warnings until at least Python 3.14." msgstr "" -#: ../../library/typing.rst:3059 +#: ../../library/typing.rst:3061 msgid "" "Type checkers are encouraged to flag uses of the deprecated types if the " "program they are checking targets a minimum Python version of 3.9 or newer." msgstr "" -#: ../../library/typing.rst:3065 +#: ../../library/typing.rst:3067 msgid "Aliases to built-in types" msgstr "內建型別的別名" -#: ../../library/typing.rst:3069 +#: ../../library/typing.rst:3071 msgid "Deprecated alias to :class:`dict`." msgstr "棄用 :class:`dict` 的別名。" -#: ../../library/typing.rst:3071 +#: ../../library/typing.rst:3073 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Mapping` rather than to use :class:`dict` " "or :class:`!typing.Dict`." msgstr "" -#: ../../library/typing.rst:3075 ../../library/typing.rst:3314 +#: ../../library/typing.rst:3077 ../../library/typing.rst:3316 msgid "This type can be used as follows::" msgstr "" -#: ../../library/typing.rst:3080 +#: ../../library/typing.rst:3082 msgid "" ":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3086 +#: ../../library/typing.rst:3088 msgid "Deprecated alias to :class:`list`." msgstr "棄用 :class:`list` 的別名。" -#: ../../library/typing.rst:3088 +#: ../../library/typing.rst:3090 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Sequence` or :class:`Iterable` rather than " "to use :class:`list` or :class:`!typing.List`." msgstr "" -#: ../../library/typing.rst:3092 +#: ../../library/typing.rst:3094 msgid "This type may be used as follows::" msgstr "" -#: ../../library/typing.rst:3100 +#: ../../library/typing.rst:3102 msgid "" ":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3106 +#: ../../library/typing.rst:3108 msgid "Deprecated alias to :class:`builtins.set `." msgstr "棄用 :class:`builtins.set ` 的別名。" -#: ../../library/typing.rst:3108 +#: ../../library/typing.rst:3110 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`AbstractSet` rather than to use :class:`set` " "or :class:`!typing.Set`." msgstr "" -#: ../../library/typing.rst:3112 +#: ../../library/typing.rst:3114 msgid "" ":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3118 +#: ../../library/typing.rst:3120 msgid "Deprecated alias to :class:`builtins.frozenset `." msgstr "棄用 :class:`builtins.frozenset ` 的別名。" -#: ../../library/typing.rst:3120 +#: ../../library/typing.rst:3122 msgid "" ":class:`builtins.frozenset ` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3127 +#: ../../library/typing.rst:3129 msgid "Deprecated alias for :class:`tuple`." msgstr "棄用 :class:`tuple` 的別名。" -#: ../../library/typing.rst:3129 +#: ../../library/typing.rst:3131 msgid "" ":class:`tuple` and ``Tuple`` are special-cased in the type system; see :ref:" "`annotating-tuples` for more details." msgstr "" -#: ../../library/typing.rst:3132 +#: ../../library/typing.rst:3134 msgid "" ":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3138 +#: ../../library/typing.rst:3140 msgid "Deprecated alias to :class:`type`." msgstr "棄用 :class:`type` 的別名。" -#: ../../library/typing.rst:3140 +#: ../../library/typing.rst:3142 msgid "" "See :ref:`type-of-class-objects` for details on using :class:`type` or " "``typing.Type`` in type annotations." msgstr "" -#: ../../library/typing.rst:3145 +#: ../../library/typing.rst:3147 msgid "" ":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3152 +#: ../../library/typing.rst:3154 msgid "Aliases to types in :mod:`collections`" msgstr ":mod:`collections` 中型別的別名" -#: ../../library/typing.rst:3156 +#: ../../library/typing.rst:3158 msgid "Deprecated alias to :class:`collections.defaultdict`." msgstr "棄用 :class:`collections.defaultdict` 的別名。" -#: ../../library/typing.rst:3160 +#: ../../library/typing.rst:3162 msgid "" ":class:`collections.defaultdict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3166 +#: ../../library/typing.rst:3168 msgid "Deprecated alias to :class:`collections.OrderedDict`." msgstr "棄用 :class:`collections.OrderedDict` 的別名。" -#: ../../library/typing.rst:3170 +#: ../../library/typing.rst:3172 msgid "" ":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3176 +#: ../../library/typing.rst:3178 msgid "Deprecated alias to :class:`collections.ChainMap`." msgstr "棄用 :class:`collections.ChainMap` 的別名。" -#: ../../library/typing.rst:3180 +#: ../../library/typing.rst:3182 msgid "" ":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3186 +#: ../../library/typing.rst:3188 msgid "Deprecated alias to :class:`collections.Counter`." msgstr "棄用 :class:`collections.Counter` 的別名。" -#: ../../library/typing.rst:3190 +#: ../../library/typing.rst:3192 msgid "" ":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3196 +#: ../../library/typing.rst:3198 msgid "Deprecated alias to :class:`collections.deque`." msgstr "棄用 :class:`collections.deque` 的別名。" -#: ../../library/typing.rst:3200 +#: ../../library/typing.rst:3202 msgid "" ":class:`collections.deque` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3207 +#: ../../library/typing.rst:3209 msgid "Aliases to other concrete types" msgstr "" -#: ../../library/typing.rst:3212 +#: ../../library/typing.rst:3214 msgid "" "The ``typing.io`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3216 +#: ../../library/typing.rst:3218 msgid "" "Deprecated aliases corresponding to the return types from :func:`re.compile` " "and :func:`re.match`." msgstr "" -#: ../../library/typing.rst:3219 +#: ../../library/typing.rst:3221 msgid "" "These types (and the corresponding functions) are generic over :data:" "`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " @@ -3050,391 +3050,391 @@ msgid "" "``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:3227 +#: ../../library/typing.rst:3229 msgid "" "The ``typing.re`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3228 +#: ../../library/typing.rst:3230 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3234 +#: ../../library/typing.rst:3236 msgid "Deprecated alias for :class:`str`." msgstr "棄用 :class:`str` 的別名。" -#: ../../library/typing.rst:3236 +#: ../../library/typing.rst:3238 msgid "" "``Text`` is provided to supply a forward compatible path for Python 2 code: " "in Python 2, ``Text`` is an alias for ``unicode``." msgstr "" -#: ../../library/typing.rst:3240 +#: ../../library/typing.rst:3242 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:3248 +#: ../../library/typing.rst:3250 msgid "" "Python 2 is no longer supported, and most type checkers also no longer " "support type checking Python 2 code. Removal of the alias is not currently " "planned, but users are encouraged to use :class:`str` instead of ``Text``." msgstr "" -#: ../../library/typing.rst:3258 +#: ../../library/typing.rst:3260 msgid "Aliases to container ABCs in :mod:`collections.abc`" msgstr ":mod:`collections.abc` 中容器 ABC 的別名" -#: ../../library/typing.rst:3262 +#: ../../library/typing.rst:3264 msgid "Deprecated alias to :class:`collections.abc.Set`." msgstr "棄用 :class:`collections.abc.Set` 的別名。" -#: ../../library/typing.rst:3264 +#: ../../library/typing.rst:3266 msgid "" ":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3270 +#: ../../library/typing.rst:3272 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview` of byte sequences." msgstr "" -#: ../../library/typing.rst:3274 +#: ../../library/typing.rst:3276 msgid "" "Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray " "| memoryview``." msgstr "" -#: ../../library/typing.rst:3278 +#: ../../library/typing.rst:3280 msgid "Deprecated alias to :class:`collections.abc.Collection`." msgstr "棄用 :class:`collections.abc.Collection` 的別名。" -#: ../../library/typing.rst:3282 +#: ../../library/typing.rst:3284 msgid "" ":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3288 +#: ../../library/typing.rst:3290 msgid "Deprecated alias to :class:`collections.abc.Container`." msgstr "棄用 :class:`collections.abc.Container` 的別名。" -#: ../../library/typing.rst:3290 +#: ../../library/typing.rst:3292 msgid "" ":class:`collections.abc.Container` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3296 +#: ../../library/typing.rst:3298 msgid "Deprecated alias to :class:`collections.abc.ItemsView`." msgstr "棄用 :class:`collections.abc.ItemsView` 的別名。" -#: ../../library/typing.rst:3298 +#: ../../library/typing.rst:3300 msgid "" ":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3304 +#: ../../library/typing.rst:3306 msgid "Deprecated alias to :class:`collections.abc.KeysView`." msgstr "棄用 :class:`collections.abc.KeysView` 的別名。" -#: ../../library/typing.rst:3306 +#: ../../library/typing.rst:3308 msgid "" ":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3312 +#: ../../library/typing.rst:3314 msgid "Deprecated alias to :class:`collections.abc.Mapping`." msgstr "棄用 :class:`collections.abc.Mapping` 的別名。" -#: ../../library/typing.rst:3319 +#: ../../library/typing.rst:3321 msgid "" ":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3325 +#: ../../library/typing.rst:3327 msgid "Deprecated alias to :class:`collections.abc.MappingView`." msgstr "棄用 :class:`collections.abc.MappingView` 的別名。" -#: ../../library/typing.rst:3327 +#: ../../library/typing.rst:3329 msgid "" ":class:`collections.abc.MappingView` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3333 +#: ../../library/typing.rst:3335 msgid "Deprecated alias to :class:`collections.abc.MutableMapping`." msgstr "棄用 :class:`collections.abc.MutableMapping` 的別名。" -#: ../../library/typing.rst:3335 +#: ../../library/typing.rst:3337 msgid "" ":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3342 +#: ../../library/typing.rst:3344 msgid "Deprecated alias to :class:`collections.abc.MutableSequence`." msgstr "棄用 :class:`collections.abc.MutableSequence` 的別名。" -#: ../../library/typing.rst:3344 +#: ../../library/typing.rst:3346 msgid "" ":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3351 +#: ../../library/typing.rst:3353 msgid "Deprecated alias to :class:`collections.abc.MutableSet`." msgstr "棄用 :class:`collections.abc.MutableSet` 的別名。" -#: ../../library/typing.rst:3353 +#: ../../library/typing.rst:3355 msgid "" ":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3359 +#: ../../library/typing.rst:3361 msgid "Deprecated alias to :class:`collections.abc.Sequence`." msgstr "棄用 :class:`collections.abc.Sequence` 的別名。" -#: ../../library/typing.rst:3361 +#: ../../library/typing.rst:3363 msgid "" ":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3367 +#: ../../library/typing.rst:3369 msgid "Deprecated alias to :class:`collections.abc.ValuesView`." msgstr "棄用 :class:`collections.abc.ValuesView` 的別名。" -#: ../../library/typing.rst:3369 +#: ../../library/typing.rst:3371 msgid "" ":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3376 +#: ../../library/typing.rst:3378 msgid "Aliases to asynchronous ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3380 +#: ../../library/typing.rst:3382 msgid "Deprecated alias to :class:`collections.abc.Coroutine`." msgstr "棄用 :class:`collections.abc.Coroutine` 的別名。" -#: ../../library/typing.rst:3382 +#: ../../library/typing.rst:3384 msgid "" "The variance and order of type variables correspond to those of :class:" "`Generator`, for example::" msgstr "" -#: ../../library/typing.rst:3393 +#: ../../library/typing.rst:3395 msgid "" ":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3399 +#: ../../library/typing.rst:3401 msgid "Deprecated alias to :class:`collections.abc.AsyncGenerator`." msgstr "棄用 :class:`collections.abc.AsyncGenerator` 的別名。" -#: ../../library/typing.rst:3401 +#: ../../library/typing.rst:3403 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:3410 +#: ../../library/typing.rst:3412 msgid "" "Unlike normal generators, async generators cannot return a value, so there " "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" -#: ../../library/typing.rst:3414 +#: ../../library/typing.rst:3416 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3422 +#: ../../library/typing.rst:3424 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3432 +#: ../../library/typing.rst:3434 msgid "" ":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3439 +#: ../../library/typing.rst:3441 msgid "Deprecated alias to :class:`collections.abc.AsyncIterable`." msgstr "棄用 :class:`collections.abc.AsyncIterable` 的別名。" -#: ../../library/typing.rst:3443 +#: ../../library/typing.rst:3445 msgid "" ":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3449 +#: ../../library/typing.rst:3451 msgid "Deprecated alias to :class:`collections.abc.AsyncIterator`." msgstr "棄用 :class:`collections.abc.AsyncIterator` 的別名。" -#: ../../library/typing.rst:3453 +#: ../../library/typing.rst:3455 msgid "" ":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3459 +#: ../../library/typing.rst:3461 msgid "Deprecated alias to :class:`collections.abc.Awaitable`." msgstr "棄用 :class:`collections.abc.Awaitable` 的別名。" -#: ../../library/typing.rst:3463 +#: ../../library/typing.rst:3465 msgid "" ":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3470 +#: ../../library/typing.rst:3472 msgid "Aliases to other ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3474 +#: ../../library/typing.rst:3476 msgid "Deprecated alias to :class:`collections.abc.Iterable`." msgstr "棄用 :class:`collections.abc.Iterable` 的別名。" -#: ../../library/typing.rst:3476 +#: ../../library/typing.rst:3478 msgid "" ":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3482 +#: ../../library/typing.rst:3484 msgid "Deprecated alias to :class:`collections.abc.Iterator`." msgstr "棄用 :class:`collections.abc.Iterator` 的別名。" -#: ../../library/typing.rst:3484 +#: ../../library/typing.rst:3486 msgid "" ":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3490 +#: ../../library/typing.rst:3492 msgid "Deprecated alias to :class:`collections.abc.Callable`." msgstr "棄用 :class:`collections.abc.Callable` 的別名。" -#: ../../library/typing.rst:3492 +#: ../../library/typing.rst:3494 msgid "" "See :ref:`annotating-callables` for details on how to use :class:" "`collections.abc.Callable` and ``typing.Callable`` in type annotations." msgstr "" -#: ../../library/typing.rst:3495 +#: ../../library/typing.rst:3497 msgid "" ":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3505 +#: ../../library/typing.rst:3507 msgid "Deprecated alias to :class:`collections.abc.Generator`." msgstr "棄用 :class:`collections.abc.Generator` 的別名。" -#: ../../library/typing.rst:3507 +#: ../../library/typing.rst:3509 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" -#: ../../library/typing.rst:3516 +#: ../../library/typing.rst:3518 msgid "" "Note that unlike many other generics in the typing module, the ``SendType`` " "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" -#: ../../library/typing.rst:3520 +#: ../../library/typing.rst:3522 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3528 +#: ../../library/typing.rst:3530 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3536 +#: ../../library/typing.rst:3538 msgid "" ":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3542 +#: ../../library/typing.rst:3544 msgid "Deprecated alias to :class:`collections.abc.Hashable`." msgstr "棄用 :class:`collections.abc.Hashable` 的別名。" -#: ../../library/typing.rst:3544 +#: ../../library/typing.rst:3546 msgid "Use :class:`collections.abc.Hashable` directly instead." msgstr "改為直接使用 :class:`collections.abc.Hashable`。" -#: ../../library/typing.rst:3549 +#: ../../library/typing.rst:3551 msgid "Deprecated alias to :class:`collections.abc.Reversible`." msgstr "棄用 :class:`collections.abc.Reversible` 的別名。" -#: ../../library/typing.rst:3551 +#: ../../library/typing.rst:3553 msgid "" ":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3557 +#: ../../library/typing.rst:3559 msgid "Deprecated alias to :class:`collections.abc.Sized`." msgstr "棄用 :class:`collections.abc.Sized` 的別名。" -#: ../../library/typing.rst:3559 +#: ../../library/typing.rst:3561 msgid "Use :class:`collections.abc.Sized` directly instead." msgstr "改為直接使用 :class:`collections.abc.Sized`。" -#: ../../library/typing.rst:3565 +#: ../../library/typing.rst:3567 msgid "Aliases to :mod:`contextlib` ABCs" msgstr ":mod:`contextlib` ABC 的別名" -#: ../../library/typing.rst:3569 +#: ../../library/typing.rst:3571 msgid "Deprecated alias to :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:3573 +#: ../../library/typing.rst:3575 msgid "" ":class:`contextlib.AbstractContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3580 +#: ../../library/typing.rst:3582 msgid "Deprecated alias to :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:3584 +#: ../../library/typing.rst:3586 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3590 +#: ../../library/typing.rst:3592 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:3592 +#: ../../library/typing.rst:3594 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -3442,100 +3442,100 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:3599 +#: ../../library/typing.rst:3601 msgid "Feature" msgstr "" -#: ../../library/typing.rst:3600 +#: ../../library/typing.rst:3602 msgid "Deprecated in" msgstr "棄用於" -#: ../../library/typing.rst:3601 +#: ../../library/typing.rst:3603 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:3602 +#: ../../library/typing.rst:3604 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:3603 +#: ../../library/typing.rst:3605 msgid "``typing.io`` and ``typing.re`` submodules" msgstr "``typing.io`` 和 ``typing.re`` 子模組" -#: ../../library/typing.rst:3604 +#: ../../library/typing.rst:3606 msgid "3.8" msgstr "3.8" -#: ../../library/typing.rst:3605 +#: ../../library/typing.rst:3607 msgid "3.13" msgstr "3.13" -#: ../../library/typing.rst:3606 +#: ../../library/typing.rst:3608 msgid ":issue:`38291`" msgstr ":issue:`38291`" -#: ../../library/typing.rst:3607 +#: ../../library/typing.rst:3609 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:3608 ../../library/typing.rst:3612 +#: ../../library/typing.rst:3610 ../../library/typing.rst:3614 msgid "3.9" msgstr "3.9" -#: ../../library/typing.rst:3609 +#: ../../library/typing.rst:3611 msgid "Undecided (see :ref:`deprecated-aliases` for more information)" msgstr "" -#: ../../library/typing.rst:3610 +#: ../../library/typing.rst:3612 msgid ":pep:`585`" msgstr ":pep:`585`" -#: ../../library/typing.rst:3611 +#: ../../library/typing.rst:3613 msgid ":class:`typing.ByteString`" msgstr ":class:`typing.ByteString`" -#: ../../library/typing.rst:3613 +#: ../../library/typing.rst:3615 msgid "3.14" msgstr "3.14" -#: ../../library/typing.rst:3614 +#: ../../library/typing.rst:3616 msgid ":gh:`91896`" msgstr ":gh:`91896`" -#: ../../library/typing.rst:3615 +#: ../../library/typing.rst:3617 msgid ":data:`typing.Text`" msgstr ":data:`typing.Text`" -#: ../../library/typing.rst:3616 +#: ../../library/typing.rst:3618 msgid "3.11" msgstr "3.11" -#: ../../library/typing.rst:3617 ../../library/typing.rst:3621 -#: ../../library/typing.rst:3625 +#: ../../library/typing.rst:3619 ../../library/typing.rst:3623 +#: ../../library/typing.rst:3627 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:3618 +#: ../../library/typing.rst:3620 msgid ":gh:`92332`" msgstr ":gh:`92332`" -#: ../../library/typing.rst:3619 +#: ../../library/typing.rst:3621 msgid ":class:`typing.Hashable` and :class:`typing.Sized`" msgstr ":class:`typing.Hashable` 和 :class:`typing.Sized`" -#: ../../library/typing.rst:3620 ../../library/typing.rst:3624 +#: ../../library/typing.rst:3622 ../../library/typing.rst:3626 msgid "3.12" msgstr "" -#: ../../library/typing.rst:3622 +#: ../../library/typing.rst:3624 msgid ":gh:`94309`" msgstr ":gh:`94309`" -#: ../../library/typing.rst:3623 +#: ../../library/typing.rst:3625 msgid ":data:`typing.TypeAlias`" msgstr ":data:`typing.TypeAlias`" -#: ../../library/typing.rst:3626 +#: ../../library/typing.rst:3628 msgid ":pep:`695`" msgstr ":pep:`695`" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 9cbd5eb77b..d664592327 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-20 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -910,7 +910,7 @@ msgstr "inspect" msgid "" "Add :func:`inspect.markcoroutinefunction` to mark sync functions that return " "a :term:`coroutine` for use with :func:`inspect.iscoroutinefunction`. " -"(Contributed Carlton Gibson in :gh:`99247`.)" +"(Contributed by Carlton Gibson in :gh:`99247`.)" msgstr "" #: ../../whatsnew/3.12.rst:731 @@ -954,8 +954,8 @@ msgstr "" #: ../../whatsnew/3.12.rst:753 msgid "" "Extend :func:`math.nextafter` to include a *steps* argument for moving up or " -"down multiple steps at a time. (By Matthias Goergens, Mark Dickinson, and " -"Raymond Hettinger in :gh:`94906`.)" +"down multiple steps at a time. (Contributed by Matthias Goergens, Mark " +"Dickinson, and Raymond Hettinger in :gh:`94906`.)" msgstr "" #: ../../whatsnew/3.12.rst:758 From e9e4ce38c61d5eeacaa047c1395cc79adc36245b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Apr 2024 00:05:44 +0000 Subject: [PATCH 3/9] sync with cpython 6d87cb49 --- reference/executionmodel.po | 113 ++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/reference/executionmodel.po b/reference/executionmodel.po index 00cb05841b..baecf93b51 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-17 17:39+0800\n" +"POT-Creation-Date: 2024-04-22 00:04+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -197,11 +197,12 @@ msgid "" "searching the global namespace, i.e. the namespace of the module containing " "the code block, and the builtins namespace, the namespace of the module :mod:" "`builtins`. The global namespace is searched first. If the names are not " -"found there, the builtins namespace is searched. The :keyword:`!global` " -"statement must precede all uses of the listed names." +"found there, the builtins namespace is searched next. If the names are also " +"not found in the builtins namespace, new variables are created in the global " +"namespace. The global statement must precede all uses of the listed names." msgstr "" -#: ../../reference/executionmodel.rst:145 +#: ../../reference/executionmodel.rst:146 msgid "" "The :keyword:`global` statement has the same scope as a name binding " "operation in the same block. If the nearest enclosing scope for a free " @@ -209,7 +210,7 @@ msgid "" "global." msgstr "" -#: ../../reference/executionmodel.rst:151 +#: ../../reference/executionmodel.rst:152 msgid "" "The :keyword:`nonlocal` statement causes corresponding names to refer to " "previously bound variables in the nearest enclosing function scope. :exc:" @@ -218,13 +219,13 @@ msgid "" "rebound with the :keyword:`!nonlocal` statement." msgstr "" -#: ../../reference/executionmodel.rst:159 +#: ../../reference/executionmodel.rst:160 msgid "" "The namespace for a module is automatically created the first time a module " "is imported. The main module for a script is always called :mod:`__main__`." msgstr "" -#: ../../reference/executionmodel.rst:162 +#: ../../reference/executionmodel.rst:163 msgid "" "Class definition blocks and arguments to :func:`exec` and :func:`eval` are " "special in the context of name resolution. A class definition is an " @@ -239,15 +240,15 @@ msgid "" "the following will fail::" msgstr "" -#: ../../reference/executionmodel.rst:179 +#: ../../reference/executionmodel.rst:180 msgid "However, the following will succeed::" msgstr "" -#: ../../reference/executionmodel.rst:190 +#: ../../reference/executionmodel.rst:191 msgid "Annotation scopes" msgstr "" -#: ../../reference/executionmodel.rst:192 +#: ../../reference/executionmodel.rst:193 msgid "" ":ref:`Type parameter lists ` and :keyword:`type` statements " "introduce *annotation scopes*, which behave mostly like function scopes, but " @@ -256,44 +257,44 @@ msgid "" "annotation scopes in Python 3.13 when :pep:`649` is implemented." msgstr "" -#: ../../reference/executionmodel.rst:198 +#: ../../reference/executionmodel.rst:199 msgid "Annotation scopes are used in the following contexts:" msgstr "" -#: ../../reference/executionmodel.rst:200 +#: ../../reference/executionmodel.rst:201 msgid "" "Type parameter lists for :ref:`generic type aliases `." msgstr "" -#: ../../reference/executionmodel.rst:201 +#: ../../reference/executionmodel.rst:202 msgid "" "Type parameter lists for :ref:`generic functions `. A " "generic function's annotations are executed within the annotation scope, but " "its defaults and decorators are not." msgstr "" -#: ../../reference/executionmodel.rst:204 +#: ../../reference/executionmodel.rst:205 msgid "" "Type parameter lists for :ref:`generic classes `. A generic " "class's base classes and keyword arguments are executed within the " "annotation scope, but its decorators are not." msgstr "" -#: ../../reference/executionmodel.rst:207 +#: ../../reference/executionmodel.rst:208 msgid "" "The bounds and constraints for type variables (:ref:`lazily evaluated `)." msgstr "" -#: ../../reference/executionmodel.rst:209 +#: ../../reference/executionmodel.rst:210 msgid "The value of type aliases (:ref:`lazily evaluated `)." msgstr "" -#: ../../reference/executionmodel.rst:211 +#: ../../reference/executionmodel.rst:212 msgid "Annotation scopes differ from function scopes in the following ways:" msgstr "" -#: ../../reference/executionmodel.rst:213 +#: ../../reference/executionmodel.rst:214 msgid "" "Annotation scopes have access to their enclosing class namespace. If an " "annotation scope is immediately within a class scope, or within another " @@ -304,7 +305,7 @@ msgid "" "class scope." msgstr "" -#: ../../reference/executionmodel.rst:219 +#: ../../reference/executionmodel.rst:220 msgid "" "Expressions in annotation scopes cannot contain :keyword:`yield`, ``yield " "from``, :keyword:`await`, or :token:`:= ` of objects defined within the " @@ -328,15 +329,15 @@ msgid "" "object were defined in the enclosing scope." msgstr "" -#: ../../reference/executionmodel.rst:231 +#: ../../reference/executionmodel.rst:232 msgid "Annotation scopes were introduced in Python 3.12 as part of :pep:`695`." msgstr "" -#: ../../reference/executionmodel.rst:237 +#: ../../reference/executionmodel.rst:238 msgid "Lazy evaluation" msgstr "" -#: ../../reference/executionmodel.rst:239 +#: ../../reference/executionmodel.rst:240 msgid "" "The values of type aliases created through the :keyword:`type` statement are " "*lazily evaluated*. The same applies to the bounds and constraints of type " @@ -346,35 +347,35 @@ msgid "" "resolve an attribute access." msgstr "" -#: ../../reference/executionmodel.rst:246 +#: ../../reference/executionmodel.rst:247 msgid "Example:" msgstr "" -#: ../../reference/executionmodel.rst:262 +#: ../../reference/executionmodel.rst:263 msgid "" "Here the exception is raised only when the ``__value__`` attribute of the " "type alias or the ``__bound__`` attribute of the type variable is accessed." msgstr "" -#: ../../reference/executionmodel.rst:266 +#: ../../reference/executionmodel.rst:267 msgid "" "This behavior is primarily useful for references to types that have not yet " "been defined when the type alias or type variable is created. For example, " "lazy evaluation enables creation of mutually recursive type aliases::" msgstr "" -#: ../../reference/executionmodel.rst:276 +#: ../../reference/executionmodel.rst:277 msgid "" "Lazily evaluated values are evaluated in :ref:`annotation scope `, which means that names that appear inside the lazily evaluated " "value are looked up as if they were used in the immediately enclosing scope." msgstr "" -#: ../../reference/executionmodel.rst:285 +#: ../../reference/executionmodel.rst:286 msgid "Builtins and restricted execution" msgstr "" -#: ../../reference/executionmodel.rst:291 +#: ../../reference/executionmodel.rst:292 msgid "" "Users should not touch ``__builtins__``; it is strictly an implementation " "detail. Users wanting to override values in the builtins namespace should :" @@ -382,7 +383,7 @@ msgid "" "appropriately." msgstr "" -#: ../../reference/executionmodel.rst:296 +#: ../../reference/executionmodel.rst:297 msgid "" "The builtins namespace associated with the execution of a code block is " "actually found by looking up the name ``__builtins__`` in its global " @@ -393,17 +394,17 @@ msgid "" "`builtins` module itself." msgstr "" -#: ../../reference/executionmodel.rst:308 +#: ../../reference/executionmodel.rst:309 msgid "Interaction with dynamic features" msgstr "" -#: ../../reference/executionmodel.rst:310 +#: ../../reference/executionmodel.rst:311 msgid "" "Name resolution of free variables occurs at runtime, not at compile time. " "This means that the following code will print 42::" msgstr "" -#: ../../reference/executionmodel.rst:321 +#: ../../reference/executionmodel.rst:322 msgid "" "The :func:`eval` and :func:`exec` functions do not have access to the full " "environment for resolving names. Names may be resolved in the local and " @@ -414,11 +415,11 @@ msgid "" "for both." msgstr "" -#: ../../reference/executionmodel.rst:332 +#: ../../reference/executionmodel.rst:333 msgid "Exceptions" msgstr "例外" -#: ../../reference/executionmodel.rst:343 +#: ../../reference/executionmodel.rst:344 msgid "" "Exceptions are a means of breaking out of the normal flow of control of a " "code block in order to handle errors or other exceptional conditions. An " @@ -427,7 +428,7 @@ msgid "" "or indirectly invoked the code block where the error occurred." msgstr "" -#: ../../reference/executionmodel.rst:349 +#: ../../reference/executionmodel.rst:350 msgid "" "The Python interpreter raises an exception when it detects a run-time error " "(such as division by zero). A Python program can also explicitly raise an " @@ -438,7 +439,7 @@ msgid "" "exception occurred or not in the preceding code." msgstr "" -#: ../../reference/executionmodel.rst:359 +#: ../../reference/executionmodel.rst:360 msgid "" "Python uses the \"termination\" model of error handling: an exception " "handler can find out what happened and continue execution at an outer level, " @@ -446,7 +447,7 @@ msgid "" "(except by re-entering the offending piece of code from the top)." msgstr "" -#: ../../reference/executionmodel.rst:366 +#: ../../reference/executionmodel.rst:367 msgid "" "When an exception is not handled at all, the interpreter terminates " "execution of the program, or returns to its interactive main loop. In " @@ -454,7 +455,7 @@ msgid "" "`SystemExit`." msgstr "" -#: ../../reference/executionmodel.rst:370 +#: ../../reference/executionmodel.rst:371 msgid "" "Exceptions are identified by class instances. The :keyword:`except` clause " "is selected depending on the class of the instance: it must reference the " @@ -463,7 +464,7 @@ msgid "" "additional information about the exceptional condition." msgstr "" -#: ../../reference/executionmodel.rst:378 +#: ../../reference/executionmodel.rst:379 msgid "" "Exception messages are not part of the Python API. Their contents may " "change from one version of Python to the next without warning and should not " @@ -471,17 +472,17 @@ msgid "" "interpreter." msgstr "" -#: ../../reference/executionmodel.rst:382 +#: ../../reference/executionmodel.rst:383 msgid "" "See also the description of the :keyword:`try` statement in section :ref:" "`try` and :keyword:`raise` statement in section :ref:`raise`." msgstr "" -#: ../../reference/executionmodel.rst:387 +#: ../../reference/executionmodel.rst:388 msgid "Footnotes" msgstr "註解" -#: ../../reference/executionmodel.rst:388 +#: ../../reference/executionmodel.rst:389 msgid "" "This limitation occurs because the code that is executed by these operations " "is not available at the time the module is compiled." @@ -499,7 +500,7 @@ msgstr "code(程式碼)" msgid "block" msgstr "block" -#: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:287 +#: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:288 msgid "execution" msgstr "execution(執行)" @@ -551,46 +552,46 @@ msgstr "NameError(內建例外)" msgid "UnboundLocalError" msgstr "UnboundLocalError" -#: ../../reference/executionmodel.rst:157 +#: ../../reference/executionmodel.rst:158 msgid "module" msgstr "module(模組)" -#: ../../reference/executionmodel.rst:157 +#: ../../reference/executionmodel.rst:158 msgid "__main__" msgstr "__main__" -#: ../../reference/executionmodel.rst:287 +#: ../../reference/executionmodel.rst:288 msgid "restricted" msgstr "restricted(受限)" -#: ../../reference/executionmodel.rst:334 +#: ../../reference/executionmodel.rst:335 msgid "exception" msgstr "exception(例外)" -#: ../../reference/executionmodel.rst:336 +#: ../../reference/executionmodel.rst:337 msgid "raise an exception" msgstr "raise an exception(引發例外)" -#: ../../reference/executionmodel.rst:336 +#: ../../reference/executionmodel.rst:337 msgid "handle an exception" msgstr "handle an exception(處理例外)" -#: ../../reference/executionmodel.rst:336 +#: ../../reference/executionmodel.rst:337 msgid "exception handler" msgstr "exception handler(例外處理器)" -#: ../../reference/executionmodel.rst:336 +#: ../../reference/executionmodel.rst:337 msgid "errors" msgstr "errors(錯誤)" -#: ../../reference/executionmodel.rst:336 +#: ../../reference/executionmodel.rst:337 msgid "error handling" msgstr "error handling(錯誤處理)" -#: ../../reference/executionmodel.rst:357 +#: ../../reference/executionmodel.rst:358 msgid "termination model" msgstr "termination model(終止模型)" -#: ../../reference/executionmodel.rst:364 +#: ../../reference/executionmodel.rst:365 msgid "SystemExit (built-in exception)" msgstr "SystemExit(內建例外)" From f9ce7facc0a487050cec9d999b398127ad8bc450 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Tue, 23 Apr 2024 02:53:39 +0800 Subject: [PATCH 4/9] fix: resolve fuzzy entries --- library/ast.po | 10 ++++------ library/ctypes.po | 10 ++++------ library/statistics.po | 18 ++++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/library/ast.po b/library/ast.po index b392ab6aa8..9e9f8ea374 100644 --- a/library/ast.po +++ b/library/ast.po @@ -1772,15 +1772,14 @@ msgstr "" "的工具很有幫助。" #: ../../library/ast.rst:2523 -#, fuzzy msgid "" "`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " "by inserting two-way links between tokens and ast nodes." msgstr "" -"`leoAst.py `_ 透過在 token " -"和 ast 節點之間插入雙向鏈結,統一了 python 程式的基於 token 和基於剖析樹的視" -"圖。" +"`leoAst.py `_ 透過在 token 和 ast 節點之間插入雙向鏈結,統一了 python 程式的基於 " +"token 和基於剖析樹的視圖。" #: ../../library/ast.rst:2528 msgid "" @@ -1793,7 +1792,6 @@ msgstr "" "重構 (codemod) 應用程式和 linter 非常有用。" #: ../../library/ast.rst:2533 -#, fuzzy msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " @@ -1801,7 +1799,7 @@ msgid "" "in your Python file." msgstr "" "`Parso `_ 是一個 Python 剖析器,支援不同 " -"Python 版本的錯誤復原和往返剖析。Parso 還能夠列出 python 檔案中的多個語法錯" +"Python 版本的錯誤復原和往返剖析。Parso 還能夠列出 Python 檔案中的多個語法錯" "誤。" #: ../../library/ast.rst:59 diff --git a/library/ctypes.po b/library/ctypes.po index 5752d1c2a7..5d3d02c798 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2167,13 +2167,12 @@ msgid "" msgstr "" #: ../../library/ctypes.rst:2081 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -"引發一個附帶引數 ``error``、``size`` 的\\ :ref:`稽核事件 ` " -"``ctypes.string_at``。" +"引發一個附帶引數 ``ptr``、``size`` 的\\ :ref:`稽核事件 ` ``ctypes." +"string_at``。" #: ../../library/ctypes.rst:2086 msgid "" @@ -2198,13 +2197,12 @@ msgid "" msgstr "" #: ../../library/ctypes.rst:2104 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -"引發一個附帶引數 ``address``、``size`` 的\\ :ref:`稽核事件 ` " -"``ctypes.wstring_at``。" +"引發一個附帶引數 ``ptr``、``size`` 的\\ :ref:`稽核事件 ` ``ctypes." +"wstring_at``。" #: ../../library/ctypes.rst:2110 msgid "Data types" diff --git a/library/statistics.po b/library/statistics.po index d27a191fe0..4867f4df3e 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -654,16 +654,15 @@ msgstr "" "異數大表示資料分散,變異數小表示資料集中在平均數附近。" #: ../../library/statistics.rst:452 -#, fuzzy msgid "" "If the optional second argument *mu* is given, it should be the *population* " "mean of the *data*. It can also be used to compute the second moment around " "a point that is not the mean. If it is missing or ``None`` (the default), " "the arithmetic mean is automatically calculated." msgstr "" -"若有傳入選擇性的第二個引數 *mu*,該引數通常是 *data* 的平均值。它也可以用於計" -"算非以平均值為中心的第二動差。如果沒有傳入此引數或者引數為 ``None`` (預設" -"值),則自動計算資料的算數平均數。" +"若有傳入選擇性的第二個引數 *mu*,該引數應該要是 *data* 的\\ *母體*\\ 平均值 " +"(population mean)。它也可以用於計算非以平均值為中心的第二動差。如果沒有傳入此" +"引數或者引數為 ``None`` (預設值),則自動計算資料的算數平均數。" #: ../../library/statistics.rst:457 msgid "" @@ -737,14 +736,14 @@ msgstr "" "資料分散,變異數小表示資料集中在平均數附近。" #: ../../library/statistics.rst:524 -#, fuzzy msgid "" "If the optional second argument *xbar* is given, it should be the *sample* " "mean of *data*. If it is missing or ``None`` (the default), the mean is " "automatically calculated." msgstr "" -"若有傳入選擇性的第二個引數 *xbar*,它應該是 *data* 的平均值。如果沒有傳入或者" -"為 ``None`` (預設值),則自動計算資料的平均值。" +"若有傳入選擇性的第二個引數 *xbar*,它應該是 *data* 的\\ *樣本*\\ 平均值 " +"(sample mean)。如果沒有傳入或者為 ``None`` (預設值),則自動計算資料的平均" +"值。" #: ../../library/statistics.rst:528 msgid "" @@ -759,13 +758,12 @@ msgid "Raises :exc:`StatisticsError` if *data* has fewer than two values." msgstr "若 *data* 內少於兩個值,則引發 :exc:`StatisticsError`。" #: ../../library/statistics.rst:541 -#, fuzzy msgid "" "If you have already calculated the sample mean of your data, you can pass it " "as the optional second argument *xbar* to avoid recalculation:" msgstr "" -"如果已經計算出資料的平均值,你可以將其作為選擇性的第二個引數 *mu* 傳遞以避免" -"重新計算:" +"如果已經計算出資料的樣本平均值,你可以將其作為選擇性的第二個引數 *mu* 傳遞以" +"避免重新計算:" #: ../../library/statistics.rst:550 msgid "" From 7879a7d3e3f57f0fe80b06304312c21a2fd7dd4b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Apr 2024 00:04:59 +0000 Subject: [PATCH 5/9] sync with cpython 8ae70c87 --- library/pprint.po | 95 +++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/library/pprint.po b/library/pprint.po index c77adc2e42..dadef17d8c 100644 --- a/library/pprint.po +++ b/library/pprint.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-25 00:03+0000\n" +"POT-Creation-Date: 2024-04-23 00:03+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-" @@ -39,28 +39,27 @@ msgstr "" #: ../../library/pprint.rst:21 msgid "" "The formatted representation keeps objects on a single line if it can, and " -"breaks them onto multiple lines if they don't fit within the allowed width. " -"Construct :class:`PrettyPrinter` objects explicitly if you need to adjust " -"the width constraint." +"breaks them onto multiple lines if they don't fit within the allowed width, " +"adjustable by the *width* parameter defaulting to 80 characters." msgstr "" -#: ../../library/pprint.rst:26 +#: ../../library/pprint.rst:25 msgid "Dictionaries are sorted by key before the display is computed." msgstr "" -#: ../../library/pprint.rst:28 +#: ../../library/pprint.rst:27 msgid "Added support for pretty-printing :class:`types.SimpleNamespace`." msgstr "" -#: ../../library/pprint.rst:31 +#: ../../library/pprint.rst:30 msgid "Added support for pretty-printing :class:`dataclasses.dataclass`." msgstr "" -#: ../../library/pprint.rst:37 +#: ../../library/pprint.rst:36 msgid "Functions" msgstr "" -#: ../../library/pprint.rst:41 +#: ../../library/pprint.rst:40 msgid "" "Prints the formatted representation of *object* followed by a newline. If " "*sort_dicts* is false (the default), dictionaries will be displayed with " @@ -69,7 +68,7 @@ msgid "" "parameters." msgstr "" -#: ../../library/pprint.rst:64 +#: ../../library/pprint.rst:63 msgid "" "Prints the formatted representation of *object* on *stream*, followed by a " "newline. If *stream* is ``None``, :data:`sys.stdout` is used. This may be " @@ -78,7 +77,7 @@ msgid "" "use within a scope)." msgstr "" -#: ../../library/pprint.rst:70 +#: ../../library/pprint.rst:69 msgid "" "The configuration parameters *stream*, *indent*, *width*, *depth*, " "*compact*, *sort_dicts* and *underscore_numbers* are passed to the :class:" @@ -86,13 +85,13 @@ msgid "" "documentation below." msgstr "" -#: ../../library/pprint.rst:75 +#: ../../library/pprint.rst:74 msgid "" "Note that *sort_dicts* is ``True`` by default and you might want to use :" "func:`~pprint.pp` instead where it is ``False`` by default." msgstr "" -#: ../../library/pprint.rst:81 +#: ../../library/pprint.rst:80 msgid "" "Return the formatted representation of *object* as a string. *indent*, " "*width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are " @@ -100,21 +99,21 @@ msgid "" "and their meanings are as described in its documentation below." msgstr "" -#: ../../library/pprint.rst:91 +#: ../../library/pprint.rst:90 msgid "" "Determine if the formatted representation of *object* is \"readable\", or " "can be used to reconstruct the value using :func:`eval`. This always " "returns ``False`` for recursive objects." msgstr "" -#: ../../library/pprint.rst:101 +#: ../../library/pprint.rst:100 msgid "" "Determine if *object* requires a recursive representation. This function is " "subject to the same limitations as noted in :func:`saferepr` below and may " "raise an :exc:`RecursionError` if it fails to detect a recursive object." msgstr "" -#: ../../library/pprint.rst:108 +#: ../../library/pprint.rst:107 msgid "" "Return a string representation of *object*, protected against recursion in " "some common data structures, namely instances of :class:`dict`, :class:" @@ -124,21 +123,21 @@ msgid "" "id=number>``. The representation is not otherwise formatted." msgstr "" -#: ../../library/pprint.rst:121 +#: ../../library/pprint.rst:120 msgid "PrettyPrinter Objects" msgstr "PrettyPrinter 物件" -#: ../../library/pprint.rst:123 +#: ../../library/pprint.rst:122 msgid "This module defines one class:" msgstr "" -#: ../../library/pprint.rst:133 +#: ../../library/pprint.rst:132 msgid "" "Construct a :class:`PrettyPrinter` instance. This constructor understands " "several keyword parameters." msgstr "" -#: ../../library/pprint.rst:136 +#: ../../library/pprint.rst:135 msgid "" "*stream* (default :data:`!sys.stdout`) is a :term:`file-like object` to " "which the output will be written by calling its :meth:`!write` method. If " @@ -146,19 +145,19 @@ msgid "" "`~PrettyPrinter.pprint` silently returns." msgstr "" -#: ../../library/pprint.rst:141 +#: ../../library/pprint.rst:140 msgid "" "Other values configure the manner in which nesting of complex data " "structures is displayed." msgstr "" -#: ../../library/pprint.rst:144 +#: ../../library/pprint.rst:143 msgid "" "*indent* (default 1) specifies the amount of indentation added for each " "nesting level." msgstr "" -#: ../../library/pprint.rst:147 +#: ../../library/pprint.rst:146 msgid "" "*depth* controls the number of nesting levels which may be printed; if the " "data structure being printed is too deep, the next contained level is " @@ -166,14 +165,14 @@ msgid "" "objects being formatted." msgstr "" -#: ../../library/pprint.rst:152 +#: ../../library/pprint.rst:151 msgid "" "*width* (default 80) specifies the desired maximum number of characters per " "line in the output. If a structure cannot be formatted within the width " "constraint, a best effort will be made." msgstr "" -#: ../../library/pprint.rst:156 +#: ../../library/pprint.rst:155 msgid "" "*compact* impacts the way that long sequences (lists, tuples, sets, etc) are " "formatted. If *compact* is false (the default) then each item of a sequence " @@ -181,52 +180,52 @@ msgid "" "as will fit within the *width* will be formatted on each output line." msgstr "" -#: ../../library/pprint.rst:162 +#: ../../library/pprint.rst:161 msgid "" "If *sort_dicts* is true (the default), dictionaries will be formatted with " "their keys sorted, otherwise they will display in insertion order." msgstr "" -#: ../../library/pprint.rst:165 +#: ../../library/pprint.rst:164 msgid "" "If *underscore_numbers* is true, integers will be formatted with the ``_`` " "character for a thousands separator, otherwise underscores are not displayed " "(the default)." msgstr "" -#: ../../library/pprint.rst:169 +#: ../../library/pprint.rst:168 msgid "Added the *compact* parameter." msgstr "新增 *compact* 參數。" -#: ../../library/pprint.rst:172 +#: ../../library/pprint.rst:171 msgid "Added the *sort_dicts* parameter." msgstr "新增 *sort_dicts* 參數。" -#: ../../library/pprint.rst:175 +#: ../../library/pprint.rst:174 msgid "Added the *underscore_numbers* parameter." msgstr "新增 *underscore_numbers* 參數。" -#: ../../library/pprint.rst:178 +#: ../../library/pprint.rst:177 msgid "No longer attempts to write to :data:`!sys.stdout` if it is ``None``." msgstr "" -#: ../../library/pprint.rst:205 +#: ../../library/pprint.rst:204 msgid ":class:`PrettyPrinter` instances have the following methods:" msgstr "" -#: ../../library/pprint.rst:210 +#: ../../library/pprint.rst:209 msgid "" "Return the formatted representation of *object*. This takes into account " "the options passed to the :class:`PrettyPrinter` constructor." msgstr "" -#: ../../library/pprint.rst:216 +#: ../../library/pprint.rst:215 msgid "" "Print the formatted representation of *object* on the configured stream, " "followed by a newline." msgstr "" -#: ../../library/pprint.rst:219 +#: ../../library/pprint.rst:218 msgid "" "The following methods provide the implementations for the corresponding " "functions of the same names. Using these methods on an instance is slightly " @@ -234,7 +233,7 @@ msgid "" "created." msgstr "" -#: ../../library/pprint.rst:229 +#: ../../library/pprint.rst:228 msgid "" "Determine if the formatted representation of the object is \"readable,\" or " "can be used to reconstruct the value using :func:`eval`. Note that this " @@ -243,18 +242,18 @@ msgid "" "returns ``False``." msgstr "" -#: ../../library/pprint.rst:238 +#: ../../library/pprint.rst:237 msgid "Determine if the object requires a recursive representation." msgstr "" -#: ../../library/pprint.rst:240 +#: ../../library/pprint.rst:239 msgid "" "This method is provided as a hook to allow subclasses to modify the way " "objects are converted to strings. The default implementation uses the " "internals of the :func:`saferepr` implementation." msgstr "" -#: ../../library/pprint.rst:247 +#: ../../library/pprint.rst:246 msgid "" "Returns three values: the formatted version of *object* as a string, a flag " "indicating whether the result is readable, and a flag indicating whether " @@ -272,45 +271,45 @@ msgid "" "of the current call." msgstr "" -#: ../../library/pprint.rst:265 +#: ../../library/pprint.rst:264 msgid "Example" msgstr "範例" -#: ../../library/pprint.rst:267 +#: ../../library/pprint.rst:266 msgid "" "To demonstrate several uses of the :func:`~pprint.pp` function and its " "parameters, let's fetch information about a project from `PyPI `_::" msgstr "" -#: ../../library/pprint.rst:276 +#: ../../library/pprint.rst:275 msgid "In its basic form, :func:`~pprint.pp` shows the whole object::" msgstr "" -#: ../../library/pprint.rst:332 +#: ../../library/pprint.rst:331 msgid "" "The result can be limited to a certain *depth* (ellipsis is used for deeper " "contents)::" msgstr "" -#: ../../library/pprint.rst:378 +#: ../../library/pprint.rst:377 msgid "" "Additionally, maximum character *width* can be suggested. If a long object " "cannot be split, the specified width will be exceeded::" msgstr "" -#: ../../library/pprint.rst:89 ../../library/pprint.rst:227 +#: ../../library/pprint.rst:88 ../../library/pprint.rst:226 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../library/pprint.rst:89 ../../library/pprint.rst:227 +#: ../../library/pprint.rst:88 ../../library/pprint.rst:226 msgid "eval" msgstr "eval" -#: ../../library/pprint.rst:128 +#: ../../library/pprint.rst:127 msgid "..." msgstr "..." -#: ../../library/pprint.rst:128 +#: ../../library/pprint.rst:127 msgid "placeholder" msgstr "placeholder(佔位符號)" From 2b38d6b64f7d3a49165c9089ddc6d027174546b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Apr 2024 00:04:39 +0000 Subject: [PATCH 6/9] sync with cpython 2eaf9ba9 --- library/py_compile.po | 4 +- library/unittest.po | 263 ++++++++++++++++++++++-------------------- 2 files changed, 138 insertions(+), 129 deletions(-) diff --git a/library/py_compile.po b/library/py_compile.po index f13e31e720..28dcc65e75 100644 --- a/library/py_compile.po +++ b/library/py_compile.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 00:03+0000\n" +"POT-Creation-Date: 2024-04-24 00:03+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-" @@ -133,7 +133,7 @@ msgstr "新增 *quiet* 參數。" #: ../../library/py_compile.rst:99 msgid "" -"A enumeration of possible methods the interpreter can use to determine " +"An enumeration of possible methods the interpreter can use to determine " "whether a bytecode file is up to date with a source file. The ``.pyc`` file " "indicates the desired invalidation mode in its header. See :ref:`pyc-" "invalidation` for more information on how Python invalidates ``.pyc`` files " diff --git a/library/unittest.po b/library/unittest.po index f8bf4f18f0..c5d649698f 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-24 00:03+0000\n" "PO-Revision-Date: 2022-10-16 06:03+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2244,8 +2244,8 @@ msgstr "" #: ../../library/unittest.rst:1874 msgid "" "All test modules must be importable from the top level of the project. If " -"the start directory is not the top level directory then the top level " -"directory must be specified separately." +"the start directory is not the top level directory then *top_level_dir* must " +"be specified separately." msgstr "" #: ../../library/unittest.rst:1878 @@ -2275,85 +2275,94 @@ msgstr "" #: ../../library/unittest.rst:1895 msgid "" "The pattern is deliberately not stored as a loader attribute so that " -"packages can continue discovery themselves. *top_level_dir* is stored so " -"``load_tests`` does not need to pass this argument in to ``loader." -"discover()``." +"packages can continue discovery themselves." msgstr "" -#: ../../library/unittest.rst:1900 +#: ../../library/unittest.rst:1898 +msgid "" +"*top_level_dir* is stored internally, and used as a default to any nested " +"calls to ``discover()``. That is, if a package's ``load_tests`` calls " +"``loader.discover()``, it does not need to pass this argument." +msgstr "" + +#: ../../library/unittest.rst:1902 msgid "*start_dir* can be a dotted module name as well as a directory." msgstr "" -#: ../../library/unittest.rst:1904 +#: ../../library/unittest.rst:1906 msgid "" "Modules that raise :exc:`SkipTest` on import are recorded as skips, not " "errors." msgstr "" -#: ../../library/unittest.rst:1908 +#: ../../library/unittest.rst:1910 msgid "*start_dir* can be a :term:`namespace packages `." msgstr "" -#: ../../library/unittest.rst:1911 +#: ../../library/unittest.rst:1913 msgid "" "Paths are sorted before being imported so that execution order is the same " "even if the underlying file system's ordering is not dependent on file name." msgstr "" -#: ../../library/unittest.rst:1916 +#: ../../library/unittest.rst:1918 msgid "" "Found packages are now checked for ``load_tests`` regardless of whether " "their path matches *pattern*, because it is impossible for a package name to " "match the default pattern." msgstr "" -#: ../../library/unittest.rst:1921 +#: ../../library/unittest.rst:1923 msgid "" "*start_dir* can not be a :term:`namespace packages `. It " "has been broken since Python 3.7 and Python 3.11 officially remove it." msgstr "" -#: ../../library/unittest.rst:1926 +#: ../../library/unittest.rst:1927 +msgid "*top_level_dir* is only stored for the duration of *discover* call." +msgstr "" + +#: ../../library/unittest.rst:1931 msgid "" "The following attributes of a :class:`TestLoader` can be configured either " "by subclassing or assignment on an instance:" msgstr "" -#: ../../library/unittest.rst:1932 +#: ../../library/unittest.rst:1937 msgid "" "String giving the prefix of method names which will be interpreted as test " "methods. The default value is ``'test'``." msgstr "" -#: ../../library/unittest.rst:1935 +#: ../../library/unittest.rst:1940 msgid "" "This affects :meth:`getTestCaseNames` and all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../library/unittest.rst:1941 +#: ../../library/unittest.rst:1946 msgid "" "Function to be used to compare method names when sorting them in :meth:" "`getTestCaseNames` and all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../library/unittest.rst:1947 +#: ../../library/unittest.rst:1952 msgid "" "Callable object that constructs a test suite from a list of tests. No " "methods on the resulting object are needed. The default value is the :class:" "`TestSuite` class." msgstr "" -#: ../../library/unittest.rst:1951 ../../library/unittest.rst:1964 +#: ../../library/unittest.rst:1956 ../../library/unittest.rst:1969 msgid "This affects all the ``loadTestsFrom*`` methods." msgstr "" -#: ../../library/unittest.rst:1955 +#: ../../library/unittest.rst:1960 msgid "" "List of Unix shell-style wildcard test name patterns that test methods have " "to match to be included in test suites (see ``-k`` option)." msgstr "" -#: ../../library/unittest.rst:1958 +#: ../../library/unittest.rst:1963 msgid "" "If this attribute is not ``None`` (the default), all test methods to be " "included in test suites must match one of the patterns in this list. Note " @@ -2362,13 +2371,13 @@ msgid "" "have to be converted using ``*`` wildcards." msgstr "" -#: ../../library/unittest.rst:1971 +#: ../../library/unittest.rst:1976 msgid "" "This class is used to compile information about which tests have succeeded " "and which have failed." msgstr "" -#: ../../library/unittest.rst:1974 +#: ../../library/unittest.rst:1979 msgid "" "A :class:`TestResult` object stores the results of a set of tests. The :" "class:`TestCase` and :class:`TestSuite` classes ensure that results are " @@ -2376,7 +2385,7 @@ msgid "" "outcome of tests." msgstr "" -#: ../../library/unittest.rst:1979 +#: ../../library/unittest.rst:1984 msgid "" "Testing frameworks built on top of :mod:`unittest` may want access to the :" "class:`TestResult` object generated by running a set of tests for reporting " @@ -2384,61 +2393,61 @@ msgid "" "`TestRunner.run` method for this purpose." msgstr "" -#: ../../library/unittest.rst:1984 +#: ../../library/unittest.rst:1989 msgid "" ":class:`TestResult` instances have the following attributes that will be of " "interest when inspecting the results of running a set of tests:" msgstr "" -#: ../../library/unittest.rst:1990 +#: ../../library/unittest.rst:1995 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents a test which raised an " "unexpected exception." msgstr "" -#: ../../library/unittest.rst:1996 +#: ../../library/unittest.rst:2001 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents a test where a failure " "was explicitly signalled using the :ref:`assert\\* methods `." msgstr "" -#: ../../library/unittest.rst:2002 +#: ../../library/unittest.rst:2007 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding the reason for skipping the test." msgstr "" -#: ../../library/unittest.rst:2009 +#: ../../library/unittest.rst:2014 msgid "" "A list containing 2-tuples of :class:`TestCase` instances and strings " "holding formatted tracebacks. Each tuple represents an expected failure or " "error of the test case." msgstr "" -#: ../../library/unittest.rst:2015 +#: ../../library/unittest.rst:2020 msgid "" "A list containing :class:`TestCase` instances that were marked as expected " "failures, but succeeded." msgstr "" -#: ../../library/unittest.rst:2020 +#: ../../library/unittest.rst:2025 msgid "" "A list containing 2-tuples of test case names and floats representing the " "elapsed time of each test which was run." msgstr "" -#: ../../library/unittest.rst:2027 +#: ../../library/unittest.rst:2032 msgid "" "Set to ``True`` when the execution of tests should stop by :meth:`stop`." msgstr "" -#: ../../library/unittest.rst:2031 +#: ../../library/unittest.rst:2036 msgid "The total number of tests run so far." msgstr "" -#: ../../library/unittest.rst:2035 +#: ../../library/unittest.rst:2040 msgid "" "If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in " "between :meth:`startTest` and :meth:`stopTest` being called. Collected " @@ -2447,29 +2456,29 @@ msgid "" "error message." msgstr "" -#: ../../library/unittest.rst:2044 +#: ../../library/unittest.rst:2049 msgid "" "If set to true :meth:`stop` will be called on the first failure or error, " "halting the test run." msgstr "" -#: ../../library/unittest.rst:2051 +#: ../../library/unittest.rst:2056 msgid "If set to true then local variables will be shown in tracebacks." msgstr "" -#: ../../library/unittest.rst:2057 +#: ../../library/unittest.rst:2062 msgid "" "Return ``True`` if all tests run so far have passed, otherwise returns " "``False``." msgstr "" -#: ../../library/unittest.rst:2060 +#: ../../library/unittest.rst:2065 msgid "" "Returns ``False`` if there were any :attr:`unexpectedSuccesses` from tests " "marked with the :func:`expectedFailure` decorator." msgstr "" -#: ../../library/unittest.rst:2066 +#: ../../library/unittest.rst:2071 msgid "" "This method can be called to signal that the set of tests being run should " "be aborted by setting the :attr:`shouldStop` attribute to ``True``. :class:" @@ -2477,7 +2486,7 @@ msgid "" "additional tests." msgstr "" -#: ../../library/unittest.rst:2071 +#: ../../library/unittest.rst:2076 msgid "" "For example, this feature is used by the :class:`TextTestRunner` class to " "stop the test framework when the user signals an interrupt from the " @@ -2485,7 +2494,7 @@ msgid "" "implementations can use this in a similar manner." msgstr "" -#: ../../library/unittest.rst:2076 +#: ../../library/unittest.rst:2081 msgid "" "The following methods of the :class:`TestResult` class are used to maintain " "the internal data structures, and may be extended in subclasses to support " @@ -2493,141 +2502,141 @@ msgid "" "tools which support interactive reporting while tests are being run." msgstr "" -#: ../../library/unittest.rst:2084 +#: ../../library/unittest.rst:2089 msgid "Called when the test case *test* is about to be run." msgstr "" -#: ../../library/unittest.rst:2088 +#: ../../library/unittest.rst:2093 msgid "" "Called after the test case *test* has been executed, regardless of the " "outcome." msgstr "" -#: ../../library/unittest.rst:2093 +#: ../../library/unittest.rst:2098 msgid "Called once before any tests are executed." msgstr "" -#: ../../library/unittest.rst:2100 +#: ../../library/unittest.rst:2105 msgid "Called once after all tests are executed." msgstr "" -#: ../../library/unittest.rst:2107 +#: ../../library/unittest.rst:2112 msgid "" "Called when the test case *test* raises an unexpected exception. *err* is a " "tuple of the form returned by :func:`sys.exc_info`: ``(type, value, " "traceback)``." msgstr "" -#: ../../library/unittest.rst:2111 +#: ../../library/unittest.rst:2116 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`errors` attribute, where *formatted_err* is a formatted " "traceback derived from *err*." msgstr "" -#: ../../library/unittest.rst:2118 +#: ../../library/unittest.rst:2123 msgid "" "Called when the test case *test* signals a failure. *err* is a tuple of the " "form returned by :func:`sys.exc_info`: ``(type, value, traceback)``." msgstr "" -#: ../../library/unittest.rst:2121 +#: ../../library/unittest.rst:2126 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`failures` attribute, where *formatted_err* is a formatted " "traceback derived from *err*." msgstr "" -#: ../../library/unittest.rst:2128 +#: ../../library/unittest.rst:2133 msgid "Called when the test case *test* succeeds." msgstr "" -#: ../../library/unittest.rst:2130 +#: ../../library/unittest.rst:2135 msgid "The default implementation does nothing." msgstr "" -#: ../../library/unittest.rst:2135 +#: ../../library/unittest.rst:2140 msgid "" "Called when the test case *test* is skipped. *reason* is the reason the " "test gave for skipping." msgstr "" -#: ../../library/unittest.rst:2138 +#: ../../library/unittest.rst:2143 msgid "" "The default implementation appends a tuple ``(test, reason)`` to the " "instance's :attr:`skipped` attribute." msgstr "" -#: ../../library/unittest.rst:2144 +#: ../../library/unittest.rst:2149 msgid "" "Called when the test case *test* fails or errors, but was marked with the :" "func:`expectedFailure` decorator." msgstr "" -#: ../../library/unittest.rst:2147 +#: ../../library/unittest.rst:2152 msgid "" "The default implementation appends a tuple ``(test, formatted_err)`` to the " "instance's :attr:`expectedFailures` attribute, where *formatted_err* is a " "formatted traceback derived from *err*." msgstr "" -#: ../../library/unittest.rst:2154 +#: ../../library/unittest.rst:2159 msgid "" "Called when the test case *test* was marked with the :func:`expectedFailure` " "decorator, but succeeded." msgstr "" -#: ../../library/unittest.rst:2157 +#: ../../library/unittest.rst:2162 msgid "" "The default implementation appends the test to the instance's :attr:" "`unexpectedSuccesses` attribute." msgstr "" -#: ../../library/unittest.rst:2163 +#: ../../library/unittest.rst:2168 msgid "" "Called when a subtest finishes. *test* is the test case corresponding to " "the test method. *subtest* is a custom :class:`TestCase` instance " "describing the subtest." msgstr "" -#: ../../library/unittest.rst:2167 +#: ../../library/unittest.rst:2172 msgid "" "If *outcome* is :const:`None`, the subtest succeeded. Otherwise, it failed " "with an exception where *outcome* is a tuple of the form returned by :func:" "`sys.exc_info`: ``(type, value, traceback)``." msgstr "" -#: ../../library/unittest.rst:2171 +#: ../../library/unittest.rst:2176 msgid "" "The default implementation does nothing when the outcome is a success, and " "records subtest failures as normal failures." msgstr "" -#: ../../library/unittest.rst:2178 +#: ../../library/unittest.rst:2183 msgid "" "Called when the test case finishes. *elapsed* is the time represented in " "seconds, and it includes the execution of cleanup functions." msgstr "" -#: ../../library/unittest.rst:2185 +#: ../../library/unittest.rst:2190 msgid "" "A concrete implementation of :class:`TestResult` used by the :class:" "`TextTestRunner`. Subclasses should accept ``**kwargs`` to ensure " "compatibility as the interface changes." msgstr "" -#: ../../library/unittest.rst:2191 +#: ../../library/unittest.rst:2196 msgid "Added the *durations* keyword parameter." msgstr "新增 *durations* 關鍵字參數。" -#: ../../library/unittest.rst:2196 +#: ../../library/unittest.rst:2201 msgid "" "Instance of the :class:`TestLoader` class intended to be shared. If no " "customization of the :class:`TestLoader` is needed, this instance can be " "used instead of repeatedly creating new instances." msgstr "" -#: ../../library/unittest.rst:2205 +#: ../../library/unittest.rst:2210 msgid "" "A basic test runner implementation that outputs results to a stream. If " "*stream* is ``None``, the default, :data:`sys.stderr` is used as the output " @@ -2638,7 +2647,7 @@ msgid "" "unittest." msgstr "" -#: ../../library/unittest.rst:2212 +#: ../../library/unittest.rst:2217 msgid "" "By default this runner shows :exc:`DeprecationWarning`, :exc:" "`PendingDeprecationWarning`, :exc:`ResourceWarning` and :exc:`ImportWarning` " @@ -2648,32 +2657,32 @@ msgid "" "``None``." msgstr "" -#: ../../library/unittest.rst:2220 +#: ../../library/unittest.rst:2225 msgid "Added the *warnings* parameter." msgstr "新增 *warnings* 參數。" -#: ../../library/unittest.rst:2223 +#: ../../library/unittest.rst:2228 msgid "" "The default stream is set to :data:`sys.stderr` at instantiation time rather " "than import time." msgstr "" -#: ../../library/unittest.rst:2227 +#: ../../library/unittest.rst:2232 msgid "Added the *tb_locals* parameter." msgstr "新增 *tb_locals* 參數。" -#: ../../library/unittest.rst:2230 +#: ../../library/unittest.rst:2235 msgid "Added the *durations* parameter." msgstr "新增 *durations* 參數。" -#: ../../library/unittest.rst:2235 +#: ../../library/unittest.rst:2240 msgid "" "This method returns the instance of ``TestResult`` used by :meth:`run`. It " "is not intended to be called directly, but can be overridden in subclasses " "to provide a custom ``TestResult``." msgstr "" -#: ../../library/unittest.rst:2239 +#: ../../library/unittest.rst:2244 msgid "" "``_makeResult()`` instantiates the class or callable passed in the " "``TextTestRunner`` constructor as the ``resultclass`` argument. It defaults " @@ -2681,7 +2690,7 @@ msgid "" "class is instantiated with the following arguments::" msgstr "" -#: ../../library/unittest.rst:2248 +#: ../../library/unittest.rst:2253 msgid "" "This method is the main public interface to the ``TextTestRunner``. This " "method takes a :class:`TestSuite` or :class:`TestCase` instance. A :class:" @@ -2689,7 +2698,7 @@ msgid "" "run and the results printed to stdout." msgstr "" -#: ../../library/unittest.rst:2259 +#: ../../library/unittest.rst:2264 msgid "" "A command-line program that loads a set of tests from *module* and runs " "them; this is primarily for making test modules conveniently executable. The " @@ -2697,13 +2706,13 @@ msgid "" "of a test script::" msgstr "" -#: ../../library/unittest.rst:2267 +#: ../../library/unittest.rst:2272 msgid "" "You can run tests with more detailed information by passing in the verbosity " "argument::" msgstr "" -#: ../../library/unittest.rst:2273 +#: ../../library/unittest.rst:2278 msgid "" "The *defaultTest* argument is either the name of a single test or an " "iterable of test names to run if no test names are specified via *argv*. If " @@ -2711,14 +2720,14 @@ msgid "" "tests found in *module* are run." msgstr "" -#: ../../library/unittest.rst:2278 +#: ../../library/unittest.rst:2283 msgid "" "The *argv* argument can be a list of options passed to the program, with the " "first element being the program name. If not specified or ``None``, the " "values of :data:`sys.argv` are used." msgstr "" -#: ../../library/unittest.rst:2282 +#: ../../library/unittest.rst:2287 msgid "" "The *testRunner* argument can either be a test runner class or an already " "created instance of it. By default ``main`` calls :func:`sys.exit` with an " @@ -2726,26 +2735,26 @@ msgid "" "code of 5 indicates that no tests were run or skipped." msgstr "" -#: ../../library/unittest.rst:2287 +#: ../../library/unittest.rst:2292 msgid "" "The *testLoader* argument has to be a :class:`TestLoader` instance, and " "defaults to :data:`defaultTestLoader`." msgstr "" -#: ../../library/unittest.rst:2290 +#: ../../library/unittest.rst:2295 msgid "" "``main`` supports being used from the interactive interpreter by passing in " "the argument ``exit=False``. This displays the result on standard output " "without calling :func:`sys.exit`::" msgstr "" -#: ../../library/unittest.rst:2297 +#: ../../library/unittest.rst:2302 msgid "" "The *failfast*, *catchbreak* and *buffer* parameters have the same effect as " "the same-name `command-line options`_." msgstr "" -#: ../../library/unittest.rst:2300 +#: ../../library/unittest.rst:2305 msgid "" "The *warnings* argument specifies the :ref:`warning filter ` " "that should be used while running the tests. If it's not specified, it will " @@ -2754,56 +2763,56 @@ msgid "" "to ``'default'``." msgstr "" -#: ../../library/unittest.rst:2306 +#: ../../library/unittest.rst:2311 msgid "" "Calling ``main`` actually returns an instance of the ``TestProgram`` class. " "This stores the result of the tests run as the ``result`` attribute." msgstr "" -#: ../../library/unittest.rst:2309 +#: ../../library/unittest.rst:2314 msgid "The *exit* parameter was added." msgstr "新增 *exit* 參數。" -#: ../../library/unittest.rst:2312 +#: ../../library/unittest.rst:2317 msgid "" "The *verbosity*, *failfast*, *catchbreak*, *buffer* and *warnings* " "parameters were added." msgstr "" -#: ../../library/unittest.rst:2316 +#: ../../library/unittest.rst:2321 msgid "" "The *defaultTest* parameter was changed to also accept an iterable of test " "names." msgstr "" -#: ../../library/unittest.rst:2324 +#: ../../library/unittest.rst:2329 msgid "load_tests Protocol" msgstr "" -#: ../../library/unittest.rst:2328 +#: ../../library/unittest.rst:2333 msgid "" "Modules or packages can customize how tests are loaded from them during " "normal test runs or test discovery by implementing a function called " "``load_tests``." msgstr "" -#: ../../library/unittest.rst:2331 +#: ../../library/unittest.rst:2336 msgid "" "If a test module defines ``load_tests`` it will be called by :meth:" "`TestLoader.loadTestsFromModule` with the following arguments::" msgstr "" -#: ../../library/unittest.rst:2336 +#: ../../library/unittest.rst:2341 msgid "" "where *pattern* is passed straight through from ``loadTestsFromModule``. It " "defaults to ``None``." msgstr "" -#: ../../library/unittest.rst:2339 +#: ../../library/unittest.rst:2344 msgid "It should return a :class:`TestSuite`." msgstr "" -#: ../../library/unittest.rst:2341 +#: ../../library/unittest.rst:2346 msgid "" "*loader* is the instance of :class:`TestLoader` doing the loading. " "*standard_tests* are the tests that would be loaded by default from the " @@ -2812,13 +2821,13 @@ msgid "" "packages as part of test discovery." msgstr "" -#: ../../library/unittest.rst:2347 +#: ../../library/unittest.rst:2352 msgid "" "A typical ``load_tests`` function that loads tests from a specific set of :" "class:`TestCase` classes may look like::" msgstr "" -#: ../../library/unittest.rst:2359 +#: ../../library/unittest.rst:2364 msgid "" "If discovery is started in a directory containing a package, either from the " "command line or by calling :meth:`TestLoader.discover`, then the package :" @@ -2828,31 +2837,31 @@ msgid "" "left up to ``load_tests`` which is called with the following arguments::" msgstr "" -#: ../../library/unittest.rst:2368 +#: ../../library/unittest.rst:2373 msgid "" "This should return a :class:`TestSuite` representing all the tests from the " "package. (``standard_tests`` will only contain tests collected from :file:" "`__init__.py`.)" msgstr "" -#: ../../library/unittest.rst:2372 +#: ../../library/unittest.rst:2377 msgid "" "Because the pattern is passed into ``load_tests`` the package is free to " "continue (and potentially modify) test discovery. A 'do nothing' " "``load_tests`` function for a test package would look like::" msgstr "" -#: ../../library/unittest.rst:2383 +#: ../../library/unittest.rst:2388 msgid "" "Discovery no longer checks package names for matching *pattern* due to the " "impossibility of package names matching the default pattern." msgstr "" -#: ../../library/unittest.rst:2390 +#: ../../library/unittest.rst:2395 msgid "Class and Module Fixtures" msgstr "" -#: ../../library/unittest.rst:2392 +#: ../../library/unittest.rst:2397 msgid "" "Class and module level fixtures are implemented in :class:`TestSuite`. When " "the test suite encounters a test from a new class then :meth:`tearDownClass` " @@ -2860,27 +2869,27 @@ msgid "" "`setUpClass` from the new class." msgstr "" -#: ../../library/unittest.rst:2397 +#: ../../library/unittest.rst:2402 msgid "" "Similarly if a test is from a different module from the previous test then " "``tearDownModule`` from the previous module is run, followed by " "``setUpModule`` from the new module." msgstr "" -#: ../../library/unittest.rst:2401 +#: ../../library/unittest.rst:2406 msgid "" "After all the tests have run the final ``tearDownClass`` and " "``tearDownModule`` are run." msgstr "" -#: ../../library/unittest.rst:2404 +#: ../../library/unittest.rst:2409 msgid "" "Note that shared fixtures do not play well with [potential] features like " "test parallelization and they break test isolation. They should be used with " "care." msgstr "" -#: ../../library/unittest.rst:2407 +#: ../../library/unittest.rst:2412 msgid "" "The default ordering of tests created by the unittest test loaders is to " "group all tests from the same modules and classes together. This will lead " @@ -2890,14 +2899,14 @@ msgid "" "functions may be called multiple times in a single test run." msgstr "" -#: ../../library/unittest.rst:2414 +#: ../../library/unittest.rst:2419 msgid "" "Shared fixtures are not intended to work with suites with non-standard " "ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to " "support shared fixtures." msgstr "" -#: ../../library/unittest.rst:2418 +#: ../../library/unittest.rst:2423 msgid "" "If there are any exceptions raised during one of the shared fixture " "functions the test is reported as an error. Because there is no " @@ -2907,22 +2916,22 @@ msgid "" "matter, but if you are a framework author it may be relevant." msgstr "" -#: ../../library/unittest.rst:2427 +#: ../../library/unittest.rst:2432 msgid "setUpClass and tearDownClass" msgstr "" -#: ../../library/unittest.rst:2429 +#: ../../library/unittest.rst:2434 msgid "These must be implemented as class methods::" msgstr "" -#: ../../library/unittest.rst:2442 +#: ../../library/unittest.rst:2447 msgid "" "If you want the ``setUpClass`` and ``tearDownClass`` on base classes called " "then you must call up to them yourself. The implementations in :class:" "`TestCase` are empty." msgstr "" -#: ../../library/unittest.rst:2446 +#: ../../library/unittest.rst:2451 msgid "" "If an exception is raised during a ``setUpClass`` then the tests in the " "class are not run and the ``tearDownClass`` is not run. Skipped classes will " @@ -2931,15 +2940,15 @@ msgid "" "instead of as an error." msgstr "" -#: ../../library/unittest.rst:2454 +#: ../../library/unittest.rst:2459 msgid "setUpModule and tearDownModule" msgstr "" -#: ../../library/unittest.rst:2456 +#: ../../library/unittest.rst:2461 msgid "These should be implemented as functions::" msgstr "" -#: ../../library/unittest.rst:2464 +#: ../../library/unittest.rst:2469 msgid "" "If an exception is raised in a ``setUpModule`` then none of the tests in the " "module will be run and the ``tearDownModule`` will not be run. If the " @@ -2947,13 +2956,13 @@ msgid "" "having been skipped instead of as an error." msgstr "" -#: ../../library/unittest.rst:2469 +#: ../../library/unittest.rst:2474 msgid "" "To add cleanup code that must be run even in the case of an exception, use " "``addModuleCleanup``:" msgstr "" -#: ../../library/unittest.rst:2475 +#: ../../library/unittest.rst:2480 msgid "" "Add a function to be called after :func:`tearDownModule` to cleanup " "resources used during the test class. Functions will be called in reverse " @@ -2962,13 +2971,13 @@ msgid "" "`addModuleCleanup` when they are added." msgstr "" -#: ../../library/unittest.rst:2481 +#: ../../library/unittest.rst:2486 msgid "" "If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not " "called, then any cleanup functions added will still be called." msgstr "" -#: ../../library/unittest.rst:2489 +#: ../../library/unittest.rst:2494 msgid "" "Enter the supplied :term:`context manager`. If successful, also add its :" "meth:`~object.__exit__` method as a cleanup function by :func:" @@ -2976,30 +2985,30 @@ msgid "" "method." msgstr "" -#: ../../library/unittest.rst:2499 +#: ../../library/unittest.rst:2504 msgid "" "This function is called unconditionally after :func:`tearDownModule`, or " "after :func:`setUpModule` if :func:`setUpModule` raises an exception." msgstr "" -#: ../../library/unittest.rst:2502 +#: ../../library/unittest.rst:2507 msgid "" "It is responsible for calling all the cleanup functions added by :func:" "`addModuleCleanup`. If you need cleanup functions to be called *prior* to :" "func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself." msgstr "" -#: ../../library/unittest.rst:2507 +#: ../../library/unittest.rst:2512 msgid "" ":func:`doModuleCleanups` pops methods off the stack of cleanup functions one " "at a time, so it can be called at any time." msgstr "" -#: ../../library/unittest.rst:2514 +#: ../../library/unittest.rst:2519 msgid "Signal Handling" msgstr "" -#: ../../library/unittest.rst:2518 +#: ../../library/unittest.rst:2523 msgid "" "The :option:`-c/--catch ` command-line option to unittest, " "along with the ``catchbreak`` parameter to :func:`unittest.main()`, provide " @@ -3009,7 +3018,7 @@ msgid "" "A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way." msgstr "" -#: ../../library/unittest.rst:2525 +#: ../../library/unittest.rst:2530 msgid "" "The control-c handling signal handler attempts to remain compatible with " "code or tests that install their own :const:`signal.SIGINT` handler. If the " @@ -3021,41 +3030,41 @@ msgid "" "disabled the :func:`removeHandler` decorator can be used." msgstr "" -#: ../../library/unittest.rst:2534 +#: ../../library/unittest.rst:2539 msgid "" "There are a few utility functions for framework authors to enable control-c " "handling functionality within test frameworks." msgstr "" -#: ../../library/unittest.rst:2539 +#: ../../library/unittest.rst:2544 msgid "" "Install the control-c handler. When a :const:`signal.SIGINT` is received " "(usually in response to the user pressing control-c) all registered results " "have :meth:`~TestResult.stop` called." msgstr "" -#: ../../library/unittest.rst:2546 +#: ../../library/unittest.rst:2551 msgid "" "Register a :class:`TestResult` object for control-c handling. Registering a " "result stores a weak reference to it, so it doesn't prevent the result from " "being garbage collected." msgstr "" -#: ../../library/unittest.rst:2550 +#: ../../library/unittest.rst:2555 msgid "" "Registering a :class:`TestResult` object has no side-effects if control-c " "handling is not enabled, so test frameworks can unconditionally register all " "results they create independently of whether or not handling is enabled." msgstr "" -#: ../../library/unittest.rst:2557 +#: ../../library/unittest.rst:2562 msgid "" "Remove a registered result. Once a result has been removed then :meth:" "`~TestResult.stop` will no longer be called on that result object in " "response to a control-c." msgstr "" -#: ../../library/unittest.rst:2564 +#: ../../library/unittest.rst:2569 msgid "" "When called without arguments this function removes the control-c handler if " "it has been installed. This function can also be used as a test decorator to " From 43214128b34e57a1f3715942874c7717b54255d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Apr 2024 00:04:35 +0000 Subject: [PATCH 7/9] sync with cpython c784b3e8 --- library/datetime.po | 161 +++--- library/ipaddress.po | 299 ++++++----- whatsnew/3.12.po | 1157 +++++++++++++++++++++--------------------- 3 files changed, 847 insertions(+), 770 deletions(-) diff --git a/library/datetime.po b/library/datetime.po index 671f9eb604..320533e1f3 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-04-25 00:03+0000\n" "PO-Revision-Date: 2023-08-07 10:20+0800\n" "Last-Translator: Griiid \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -147,13 +147,13 @@ msgstr ":mod:`!datetime` 模組匯出以下常數:" #: ../../library/datetime.rst:87 msgid "" "The smallest year number allowed in a :class:`date` or :class:`.datetime` " -"object. :const:`MINYEAR` is ``1``." +"object. :const:`MINYEAR` is 1." msgstr "" #: ../../library/datetime.rst:93 msgid "" "The largest year number allowed in a :class:`date` or :class:`.datetime` " -"object. :const:`MAXYEAR` is ``9999``." +"object. :const:`MAXYEAR` is 9999." msgstr "" #: ../../library/datetime.rst:98 @@ -303,8 +303,8 @@ msgstr "" #: ../../library/datetime.rst:210 msgid "" -"All arguments are optional and default to ``0``. Arguments may be integers " -"or floats, and may be positive or negative." +"All arguments are optional and default to 0. Arguments may be integers or " +"floats, and may be positive or negative." msgstr "" #: ../../library/datetime.rst:213 @@ -399,8 +399,9 @@ msgstr "" #: ../../library/datetime.rst:283 msgid "" -"Note that, because of normalization, ``timedelta.max`` > ``-timedelta.min``. " -"``-timedelta.max`` is not representable as a :class:`timedelta` object." +"Note that, because of normalization, ``timedelta.max`` is greater than ``-" +"timedelta.min``. ``-timedelta.max`` is not representable as a :class:" +"`timedelta` object." msgstr "" #: ../../library/datetime.rst:286 ../../library/datetime.rst:564 @@ -461,108 +462,108 @@ msgstr "``t1 = t2 + t3``" #: ../../library/datetime.rst:305 msgid "" -"Sum of *t2* and *t3*. Afterwards *t1*-*t2* == *t3* and *t1*-*t3* == *t2* are " -"true. (1)" +"Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` " +"are true. (1)" msgstr "" -#: ../../library/datetime.rst:308 +#: ../../library/datetime.rst:309 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" -#: ../../library/datetime.rst:308 +#: ../../library/datetime.rst:309 msgid "" -"Difference of *t2* and *t3*. Afterwards *t1* == *t2* - *t3* and *t2* == *t1* " -"+ *t3* are true. (1)(6)" +"Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == " +"t1 + t3`` are true. (1)(6)" msgstr "" -#: ../../library/datetime.rst:312 +#: ../../library/datetime.rst:313 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i or t1 = i * t2``" -#: ../../library/datetime.rst:312 +#: ../../library/datetime.rst:313 msgid "" -"Delta multiplied by an integer. Afterwards *t1* // i == *t2* is true, " +"Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " "provided ``i != 0``." msgstr "" -#: ../../library/datetime.rst:316 -msgid "In general, *t1* \\* i == *t1* \\* (i-1) + *t1* is true. (1)" +#: ../../library/datetime.rst:317 +msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)" msgstr "" -#: ../../library/datetime.rst:319 +#: ../../library/datetime.rst:320 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f or t1 = f * t2``" -#: ../../library/datetime.rst:319 +#: ../../library/datetime.rst:320 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." msgstr "" -#: ../../library/datetime.rst:323 +#: ../../library/datetime.rst:324 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" -#: ../../library/datetime.rst:323 +#: ../../library/datetime.rst:324 msgid "" -"Division (3) of overall duration *t2* by interval unit *t3*. Returns a :" +"Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :" "class:`float` object." msgstr "" -#: ../../library/datetime.rst:327 +#: ../../library/datetime.rst:328 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f or t1 = t2 / i``" -#: ../../library/datetime.rst:327 +#: ../../library/datetime.rst:328 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." msgstr "" -#: ../../library/datetime.rst:331 +#: ../../library/datetime.rst:332 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" -#: ../../library/datetime.rst:331 +#: ../../library/datetime.rst:332 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" msgstr "" -#: ../../library/datetime.rst:335 +#: ../../library/datetime.rst:336 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" -#: ../../library/datetime.rst:335 +#: ../../library/datetime.rst:336 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "" -#: ../../library/datetime.rst:338 +#: ../../library/datetime.rst:339 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" -#: ../../library/datetime.rst:338 +#: ../../library/datetime.rst:339 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. q is an integer and r is a :class:`timedelta` object." msgstr "" -#: ../../library/datetime.rst:343 +#: ../../library/datetime.rst:344 msgid "``+t1``" msgstr "``+t1``" -#: ../../library/datetime.rst:343 +#: ../../library/datetime.rst:344 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "" -#: ../../library/datetime.rst:346 +#: ../../library/datetime.rst:347 msgid "``-t1``" msgstr "``-t1``" -#: ../../library/datetime.rst:346 +#: ../../library/datetime.rst:347 msgid "" -"equivalent to :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." -"microseconds*), and to *t1*\\* -1. (1)(4)" +"Equivalent to ``timedelta(-t1.days, -t1.seconds*, -t1.microseconds)``, and " +"to ``t1 * -1``. (1)(4)" msgstr "" #: ../../library/datetime.rst:351 @@ -571,8 +572,8 @@ msgstr "``abs(t)``" #: ../../library/datetime.rst:351 msgid "" -"equivalent to +\\ *t* when ``t.days >= 0``, and to -*t* when ``t.days < 0``. " -"(2)" +"Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " +"0``. (2)" msgstr "" #: ../../library/datetime.rst:354 @@ -609,11 +610,11 @@ msgid "This is exact and cannot overflow." msgstr "這是精確的,且不會溢位。" #: ../../library/datetime.rst:373 -msgid "Division by 0 raises :exc:`ZeroDivisionError`." +msgid "Division by zero raises :exc:`ZeroDivisionError`." msgstr "" #: ../../library/datetime.rst:376 -msgid "-*timedelta.max* is not representable as a :class:`timedelta` object." +msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object." msgstr "" #: ../../library/datetime.rst:379 @@ -844,7 +845,7 @@ msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" #: ../../library/datetime.rst:586 -msgid "*date2* will be ``timedelta.days`` days after *date1*. (1)" +msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)" msgstr "" #: ../../library/datetime.rst:589 @@ -852,7 +853,7 @@ msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" #: ../../library/datetime.rst:589 -msgid "Computes *date2* such that ``date2 + timedelta == date1``. (2)" +msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)" msgstr "" #: ../../library/datetime.rst:592 @@ -909,10 +910,11 @@ msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` 和 ``timedelta.microseconds`` 被忽略。" #: ../../library/datetime.rst:616 +#, fuzzy msgid "" -"This is exact, and cannot overflow. timedelta.seconds and timedelta." -"microseconds are 0, and date2 + timedelta == date1 after." -msgstr "" +"This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." +"microseconds`` are 0, and ``date2 + timedelta == date1`` after." +msgstr "``timedelta.seconds`` 和 ``timedelta.microseconds`` 被忽略。" #: ../../library/datetime.rst:620 msgid ":class:`date` objects are equal if they represent the same date." @@ -964,7 +966,7 @@ msgstr "" #: ../../library/datetime.rst:654 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " -"day number within the current year starting with ``1`` for January 1st." +"day number within the current year starting with 1 for January 1st." msgstr "" #: ../../library/datetime.rst:660 @@ -1430,8 +1432,9 @@ msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " "(A repeated interval occurs when clocks are rolled back at the end of " "daylight saving time or when the UTC offset for the current zone is " -"decreased for political reasons.) The value 0 (1) represents the earlier " -"(later) of the two moments with the same wall time representation." +"decreased for political reasons.) The values 0 and 1 represent, " +"respectively, the earlier and later of the two moments with the same wall " +"time representation." msgstr "" #: ../../library/datetime.rst:1143 @@ -1483,21 +1486,21 @@ msgstr "``datetime1 >= datetime2``" #: ../../library/datetime.rst:1159 msgid "" -"datetime2 is a duration of timedelta removed from datetime1, moving forward " -"in time if ``timedelta.days`` > 0, or backward if ``timedelta.days`` < 0. " -"The result has the same :attr:`~.datetime.tzinfo` attribute as the input " -"datetime, and datetime2 - datetime1 == timedelta after. :exc:`OverflowError` " -"is raised if datetime2.year would be smaller than :const:`MINYEAR` or larger " -"than :const:`MAXYEAR`. Note that no time zone adjustments are done even if " -"the input is an aware object." +"``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " +"moving forward in time if ``timedelta.days > 0``, or backward if ``timedelta." +"days < 0``. The result has the same :attr:`~.datetime.tzinfo` attribute as " +"the input datetime, and ``datetime2 - datetime1 == timedelta`` after. :exc:" +"`OverflowError` is raised if ``datetime2.year`` would be smaller than :const:" +"`MINYEAR` or larger than :const:`MAXYEAR`. Note that no time zone " +"adjustments are done even if the input is an aware object." msgstr "" #: ../../library/datetime.rst:1168 msgid "" -"Computes the datetime2 such that datetime2 + timedelta == datetime1. As for " -"addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the " -"input datetime, and no time zone adjustments are done even if the input is " -"aware." +"Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " +"As for addition, the result has the same :attr:`~.datetime.tzinfo` attribute " +"as the input datetime, and no time zone adjustments are done even if the " +"input is aware." msgstr "" #: ../../library/datetime.rst:1173 @@ -1696,12 +1699,12 @@ msgstr "" #: ../../library/datetime.rst:1345 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " -"day number within the current year starting with ``1`` for January 1st. The :" +"day number within the current year starting with 1 for January 1st. The :" "attr:`~time.struct_time.tm_isdst` flag of the result is set according to " "the :meth:`dst` method: :attr:`.tzinfo` is ``None`` or :meth:`dst` returns " "``None``, :attr:`!tm_isdst` is set to ``-1``; else if :meth:`dst` returns a " -"non-zero value, :attr:`!tm_isdst` is set to ``1``; else :attr:`!tm_isdst` is " -"set to ``0``." +"non-zero value, :attr:`!tm_isdst` is set to 1; else :attr:`!tm_isdst` is set " +"to 0." msgstr "" #: ../../library/datetime.rst:1356 @@ -1717,8 +1720,8 @@ msgid "" "If *d* is aware, *d* is normalized to UTC time, by subtracting ``d." "utcoffset()``, and a :class:`time.struct_time` for the normalized time is " "returned. :attr:`!tm_isdst` is forced to 0. Note that an :exc:" -"`OverflowError` may be raised if *d*.year was ``MINYEAR`` or ``MAXYEAR`` and " -"UTC adjustment spills over a year boundary." +"`OverflowError` may be raised if ``d.year`` was ``MINYEAR`` or ``MAXYEAR`` " +"and UTC adjustment spills over a year boundary." msgstr "" #: ../../library/datetime.rst:1369 @@ -1962,7 +1965,7 @@ msgstr "" #: ../../library/datetime.rst:1693 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " -"All default to ``0`` except *tzinfo*, which defaults to :const:`None`." +"All default to 0 except *tzinfo*, which defaults to :const:`None`." msgstr "" #: ../../library/datetime.rst:1701 @@ -2249,7 +2252,7 @@ msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" #: ../../library/datetime.rst:2038 msgid "" "must return the same result for every :class:`.datetime` *dt* with ``dt." -"tzinfo == tz`` For sane :class:`tzinfo` subclasses, this expression yields " +"tzinfo == tz``. For sane :class:`tzinfo` subclasses, this expression yields " "the time zone's \"standard offset\", which should not depend on the date or " "the time, but only on geographic location. The implementation of :meth:" "`datetime.astimezone` relies on this, but cannot detect violations; it's the " @@ -2279,12 +2282,13 @@ msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " "*dt*, as a string. Nothing about string names is defined by the :mod:`!" "datetime` module, and there's no requirement that it mean anything in " -"particular. For example, \"GMT\", \"UTC\", \"-500\", \"-5:00\", \"EDT\", " -"\"US/Eastern\", \"America/New York\" are all valid replies. Return ``None`` " -"if a string name isn't known. Note that this is a method rather than a fixed " -"string primarily because some :class:`tzinfo` subclasses will wish to return " -"different names depending on the specific value of *dt* passed, especially " -"if the :class:`tzinfo` class is accounting for daylight time." +"particular. For example, ``\"GMT\"``, ``\"UTC\"``, ``\"-500\"``, " +"``\"-5:00\"``, ``\"EDT\"``, ``\"US/Eastern\"``, ``\"America/New York\"`` are " +"all valid replies. Return ``None`` if a string name isn't known. Note that " +"this is a method rather than a fixed string primarily because some :class:" +"`tzinfo` subclasses will wish to return different names depending on the " +"specific value of *dt* passed, especially if the :class:`tzinfo` class is " +"accounting for daylight time." msgstr "" #: ../../library/datetime.rst:2083 @@ -3098,21 +3102,22 @@ msgid "" msgstr "" #: ../../library/datetime.rst:2515 +#, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " "not be used, as :class:`!time` objects have no such values. If they're used " -"anyway, ``1900`` is substituted for the year, and ``1`` for the month and " -"day." +"anyway, 1900 is substituted for the year, and 1 for the month and day." msgstr "" "對 :class:`.time` 物件來說,不應該使用年、月、日的格式碼,因為 :class:`!" "time` 物件並沒有這些值。如果使用這些格式碼,年份會以 ``1900`` 代替、月及日會" "以 ``1`` 代替。" #: ../../library/datetime.rst:2519 +#, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " "microseconds should not be used, as :class:`date` objects have no such " -"values. If they're used anyway, ``0`` is substituted for them." +"values. If they're used anyway, 0 is substituted for them." msgstr "" "對 :class:`.date` 物件來說,不應該使用時、分、秒、微秒的格式碼,因為 :class:" "`date` 物件並沒有這些值。如果使用這些格式碼,這些值都會以 ``0`` 代替。" @@ -3294,8 +3299,8 @@ msgstr "" #: ../../library/datetime.rst:2645 msgid "" -"Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is " -"not a leap year." +"Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since 1900 is not " +"a leap year." msgstr "" #: ../../library/datetime.rst:2305 diff --git a/library/ipaddress.po b/library/ipaddress.po index 6673a12a9b..73b6447615 100644 --- a/library/ipaddress.po +++ b/library/ipaddress.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-13 00:03+0000\n" +"POT-Creation-Date: 2024-04-25 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -209,38 +209,97 @@ msgstr "" #: ../../library/ipaddress.rst:181 msgid "" -"``True`` if the address is allocated for private networks. See iana-ipv4-" -"special-registry_ (for IPv4) or iana-ipv6-special-registry_ (for IPv6)." +"``True`` if the address is defined as not globally reachable by iana-ipv4-" +"special-registry_ (for IPv4) or iana-ipv6-special-registry_ (for IPv6) with " +"the following exceptions:" msgstr "" -#: ../../library/ipaddress.rst:187 +#: ../../library/ipaddress.rst:185 msgid "" -"``True`` if the address is allocated for public networks. See iana-ipv4-" -"special-registry_ (for IPv4) or iana-ipv6-special-registry_ (for IPv6)." +"``is_private`` is ``False`` for the shared address space (``100.64.0.0/10``)" msgstr "" -#: ../../library/ipaddress.rst:195 +#: ../../library/ipaddress.rst:186 ../../library/ipaddress.rst:213 +msgid "" +"For IPv4-mapped IPv6-addresses the ``is_private`` value is determined by the " +"semantics of the underlying IPv4 addresses and the following condition holds " +"(see :attr:`IPv6Address.ipv4_mapped`)::" +msgstr "" + +#: ../../library/ipaddress.rst:192 +msgid "" +"``is_private`` has value opposite to :attr:`is_global`, except for the " +"shared address space (``100.64.0.0/10`` range) where they are both ``False``." +msgstr "" + +#: ../../library/ipaddress.rst:197 +msgid "Fixed some false positives and false negatives." +msgstr "" + +#: ../../library/ipaddress.rst:199 +msgid "" +"``192.0.0.0/24`` is considered private with the exception of " +"``192.0.0.9/32`` and ``192.0.0.10/32`` (previously: only the " +"``192.0.0.0/29`` sub-range was considered private)." +msgstr "" + +#: ../../library/ipaddress.rst:201 +msgid "``64:ff9b:1::/48`` is considered private." +msgstr "" + +#: ../../library/ipaddress.rst:202 +msgid "``2002::/16`` is considered private." +msgstr "" + +#: ../../library/ipaddress.rst:203 +msgid "" +"There are exceptions within ``2001::/23`` (otherwise considered private): " +"``2001:1::1/128``, ``2001:1::2/128``, ``2001:3::/32``, ``2001:4:112::/48``, " +"``2001:20::/28``, ``2001:30::/28``. The exceptions are not considered " +"private." +msgstr "" + +#: ../../library/ipaddress.rst:209 +msgid "" +"``True`` if the address is defined as globally reachable by iana-ipv4-" +"special-registry_ (for IPv4) or iana-ipv6-special-registry_ (for IPv6) with " +"the following exception:" +msgstr "" + +#: ../../library/ipaddress.rst:219 +msgid "" +"``is_global`` has value opposite to :attr:`is_private`, except for the " +"shared address space (``100.64.0.0/10`` range) where they are both ``False``." +msgstr "" + +#: ../../library/ipaddress.rst:226 +msgid "" +"Fixed some false positives and false negatives, see :attr:`is_private` for " +"details." +msgstr "" + +#: ../../library/ipaddress.rst:230 msgid "" "``True`` if the address is unspecified. See :RFC:`5735` (for IPv4) or :RFC:" "`2373` (for IPv6)." msgstr "" -#: ../../library/ipaddress.rst:200 +#: ../../library/ipaddress.rst:235 msgid "``True`` if the address is otherwise IETF reserved." msgstr "" -#: ../../library/ipaddress.rst:204 +#: ../../library/ipaddress.rst:239 msgid "" "``True`` if this is a loopback address. See :RFC:`3330` (for IPv4) or :RFC:" "`2373` (for IPv6)." msgstr "" -#: ../../library/ipaddress.rst:209 +#: ../../library/ipaddress.rst:244 msgid "" "``True`` if the address is reserved for link-local usage. See :RFC:`3927`." msgstr "" -#: ../../library/ipaddress.rst:217 +#: ../../library/ipaddress.rst:252 msgid "" "Returns a string representation of the IP address, controlled by an explicit " "format string. *fmt* can be one of the following: ``'s'``, the default " @@ -252,17 +311,17 @@ msgid "" "used by ``format``, ``str.format`` and f-strings." msgstr "" -#: ../../library/ipaddress.rst:244 +#: ../../library/ipaddress.rst:279 msgid "" "Construct an IPv6 address. An :exc:`AddressValueError` is raised if " "*address* is not a valid IPv6 address." msgstr "" -#: ../../library/ipaddress.rst:247 +#: ../../library/ipaddress.rst:282 msgid "The following constitutes a valid IPv6 address:" msgstr "" -#: ../../library/ipaddress.rst:249 +#: ../../library/ipaddress.rst:284 msgid "" "A string consisting of eight groups of four hexadecimal digits, each group " "representing 16 bits. The groups are separated by colons. This describes an " @@ -272,7 +331,7 @@ msgid "" "to ``\"::abc:7:def\"``." msgstr "" -#: ../../library/ipaddress.rst:257 +#: ../../library/ipaddress.rst:292 msgid "" "Optionally, the string may also have a scope zone ID, expressed with a " "suffix ``%scope_id``. If present, the scope ID must be non-empty, and may " @@ -281,39 +340,39 @@ msgid "" "the node." msgstr "" -#: ../../library/ipaddress.rst:262 +#: ../../library/ipaddress.rst:297 msgid "An integer that fits into 128 bits." msgstr "" -#: ../../library/ipaddress.rst:263 +#: ../../library/ipaddress.rst:298 msgid "" "An integer packed into a :class:`bytes` object of length 16, big-endian." msgstr "" -#: ../../library/ipaddress.rst:273 +#: ../../library/ipaddress.rst:308 msgid "" "The short form of the address representation, with leading zeroes in groups " "omitted and the longest sequence of groups consisting entirely of zeroes " "collapsed to a single empty group." msgstr "" -#: ../../library/ipaddress.rst:277 +#: ../../library/ipaddress.rst:312 msgid "This is also the value returned by ``str(addr)`` for IPv6 addresses." msgstr "" -#: ../../library/ipaddress.rst:281 +#: ../../library/ipaddress.rst:316 msgid "" "The long form of the address representation, with all leading zeroes and " "groups consisting entirely of zeroes included." msgstr "" -#: ../../library/ipaddress.rst:285 +#: ../../library/ipaddress.rst:320 msgid "" "For the following attributes and methods, see the corresponding " "documentation of the :class:`IPv4Address` class:" msgstr "" -#: ../../library/ipaddress.rst:305 +#: ../../library/ipaddress.rst:340 msgid "" "``True`` if the address is reserved for site-local usage. Note that the " "site-local address space has been deprecated by :RFC:`3879`. Use :attr:" @@ -321,21 +380,21 @@ msgid "" "local addresses as defined by :RFC:`4193`." msgstr "" -#: ../../library/ipaddress.rst:312 +#: ../../library/ipaddress.rst:347 msgid "" "For addresses that appear to be IPv4 mapped addresses (starting with ``::" "FFFF/96``), this property will report the embedded IPv4 address. For any " "other address, this property will be ``None``." msgstr "" -#: ../../library/ipaddress.rst:318 +#: ../../library/ipaddress.rst:353 msgid "" "For scoped addresses as defined by :RFC:`4007`, this property identifies the " "particular zone of the address's scope that the address belongs to, as a " "string. When no scope zone is specified, this property will be ``None``." msgstr "" -#: ../../library/ipaddress.rst:324 +#: ../../library/ipaddress.rst:359 msgid "" "For addresses that appear to be 6to4 addresses (starting with " "``2002::/16``) as defined by :RFC:`3056`, this property will report the " @@ -343,7 +402,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/ipaddress.rst:331 +#: ../../library/ipaddress.rst:366 msgid "" "For addresses that appear to be Teredo addresses (starting with " "``2001::/32``) as defined by :RFC:`4380`, this property will report the " @@ -351,65 +410,65 @@ msgid "" "property will be ``None``." msgstr "" -#: ../../library/ipaddress.rst:338 +#: ../../library/ipaddress.rst:373 msgid "" "Refer to the corresponding method documentation in :class:`IPv4Address`." msgstr "" -#: ../../library/ipaddress.rst:344 +#: ../../library/ipaddress.rst:379 msgid "Conversion to Strings and Integers" msgstr "" -#: ../../library/ipaddress.rst:346 +#: ../../library/ipaddress.rst:381 msgid "" "To interoperate with networking interfaces such as the socket module, " "addresses must be converted to strings or integers. This is handled using " "the :func:`str` and :func:`int` builtin functions::" msgstr "" -#: ../../library/ipaddress.rst:359 +#: ../../library/ipaddress.rst:394 msgid "" "Note that IPv6 scoped addresses are converted to integers without scope zone " "ID." msgstr "" -#: ../../library/ipaddress.rst:363 ../../library/ipaddress.rst:747 -#: ../../library/ipaddress.rst:883 +#: ../../library/ipaddress.rst:398 ../../library/ipaddress.rst:782 +#: ../../library/ipaddress.rst:918 msgid "Operators" msgstr "" -#: ../../library/ipaddress.rst:365 +#: ../../library/ipaddress.rst:400 msgid "" "Address objects support some operators. Unless stated otherwise, operators " "can only be applied between compatible objects (i.e. IPv4 with IPv4, IPv6 " "with IPv6)." msgstr "" -#: ../../library/ipaddress.rst:371 +#: ../../library/ipaddress.rst:406 msgid "Comparison operators" msgstr "" -#: ../../library/ipaddress.rst:373 +#: ../../library/ipaddress.rst:408 msgid "" "Address objects can be compared with the usual set of comparison operators. " "Same IPv6 addresses with different scope zone IDs are not equal. Some " "examples::" msgstr "" -#: ../../library/ipaddress.rst:390 +#: ../../library/ipaddress.rst:425 msgid "Arithmetic operators" msgstr "" -#: ../../library/ipaddress.rst:392 +#: ../../library/ipaddress.rst:427 msgid "" "Integers can be added to or subtracted from address objects. Some examples::" msgstr "" -#: ../../library/ipaddress.rst:405 +#: ../../library/ipaddress.rst:440 msgid "IP Network definitions" msgstr "" -#: ../../library/ipaddress.rst:407 +#: ../../library/ipaddress.rst:442 msgid "" "The :class:`IPv4Network` and :class:`IPv6Network` objects provide a " "mechanism for defining and inspecting IP network definitions. A network " @@ -420,11 +479,11 @@ msgid "" "addresses in the inclusive range ``192.168.1.0`` to ``192.168.1.255``." msgstr "" -#: ../../library/ipaddress.rst:417 +#: ../../library/ipaddress.rst:452 msgid "Prefix, net mask and host mask" msgstr "" -#: ../../library/ipaddress.rst:419 +#: ../../library/ipaddress.rst:454 msgid "" "There are several equivalent ways to specify IP network masks. A *prefix* " "``/`` is a notation that denotes how many high-order bits are set in " @@ -436,11 +495,11 @@ msgid "" "mask equivalent to ``/24`` in IPv4 is ``0.0.0.255``." msgstr "" -#: ../../library/ipaddress.rst:430 +#: ../../library/ipaddress.rst:465 msgid "Network objects" msgstr "" -#: ../../library/ipaddress.rst:432 +#: ../../library/ipaddress.rst:467 msgid "" "All attributes implemented by address objects are implemented by network " "objects as well. In addition, network objects implement additional " @@ -450,12 +509,12 @@ msgid "" "keys in dictionaries." msgstr "" -#: ../../library/ipaddress.rst:441 +#: ../../library/ipaddress.rst:476 msgid "" "Construct an IPv4 network definition. *address* can be one of the following:" msgstr "" -#: ../../library/ipaddress.rst:443 +#: ../../library/ipaddress.rst:478 msgid "" "A string consisting of an IP address and an optional mask, separated by a " "slash (``/``). The IP address is the network address, and the mask can be " @@ -467,26 +526,26 @@ msgid "" "it's considered to be ``/32``." msgstr "" -#: ../../library/ipaddress.rst:452 +#: ../../library/ipaddress.rst:487 msgid "" "For example, the following *address* specifications are equivalent: " "``192.168.1.0/24``, ``192.168.1.0/255.255.255.0`` and " "``192.168.1.0/0.0.0.255``." msgstr "" -#: ../../library/ipaddress.rst:456 +#: ../../library/ipaddress.rst:491 msgid "" "An integer that fits into 32 bits. This is equivalent to a single-address " "network, with the network address being *address* and the mask being ``/32``." msgstr "" -#: ../../library/ipaddress.rst:460 +#: ../../library/ipaddress.rst:495 msgid "" "An integer packed into a :class:`bytes` object of length 4, big-endian. The " "interpretation is similar to an integer *address*." msgstr "" -#: ../../library/ipaddress.rst:463 +#: ../../library/ipaddress.rst:498 msgid "" "A two-tuple of an address description and a netmask, where the address " "description is either a string, a 32-bits integer, a 4-bytes packed integer, " @@ -495,92 +554,92 @@ msgid "" "prefix mask (e.g. ``255.255.255.0``)." msgstr "" -#: ../../library/ipaddress.rst:469 +#: ../../library/ipaddress.rst:504 msgid "" "An :exc:`AddressValueError` is raised if *address* is not a valid IPv4 " "address. A :exc:`NetmaskValueError` is raised if the mask is not valid for " "an IPv4 address." msgstr "" -#: ../../library/ipaddress.rst:473 ../../library/ipaddress.rst:693 +#: ../../library/ipaddress.rst:508 ../../library/ipaddress.rst:728 msgid "" "If *strict* is ``True`` and host bits are set in the supplied address, then :" "exc:`ValueError` is raised. Otherwise, the host bits are masked out to " "determine the appropriate network address." msgstr "" -#: ../../library/ipaddress.rst:477 +#: ../../library/ipaddress.rst:512 msgid "" "Unless stated otherwise, all network methods accepting other network/address " "objects will raise :exc:`TypeError` if the argument's IP version is " "incompatible to ``self``." msgstr "" -#: ../../library/ipaddress.rst:483 ../../library/ipaddress.rst:699 +#: ../../library/ipaddress.rst:518 ../../library/ipaddress.rst:734 msgid "Added the two-tuple form for the *address* constructor parameter." msgstr "" -#: ../../library/ipaddress.rst:488 +#: ../../library/ipaddress.rst:523 msgid "" "Refer to the corresponding attribute documentation in :class:`IPv4Address`." msgstr "" -#: ../../library/ipaddress.rst:498 +#: ../../library/ipaddress.rst:533 msgid "" "These attributes are true for the network as a whole if they are true for " "both the network address and the broadcast address." msgstr "" -#: ../../library/ipaddress.rst:503 +#: ../../library/ipaddress.rst:538 msgid "" "The network address for the network. The network address and the prefix " "length together uniquely define a network." msgstr "" -#: ../../library/ipaddress.rst:508 +#: ../../library/ipaddress.rst:543 msgid "" "The broadcast address for the network. Packets sent to the broadcast address " "should be received by every host on the network." msgstr "" -#: ../../library/ipaddress.rst:513 +#: ../../library/ipaddress.rst:548 msgid "The host mask, as an :class:`IPv4Address` object." msgstr "" -#: ../../library/ipaddress.rst:517 +#: ../../library/ipaddress.rst:552 msgid "The net mask, as an :class:`IPv4Address` object." msgstr "" -#: ../../library/ipaddress.rst:523 +#: ../../library/ipaddress.rst:558 msgid "" "A string representation of the network, with the mask in prefix notation." msgstr "" -#: ../../library/ipaddress.rst:526 +#: ../../library/ipaddress.rst:561 msgid "" "``with_prefixlen`` and ``compressed`` are always the same as " "``str(network)``. ``exploded`` uses the exploded form the network address." msgstr "" -#: ../../library/ipaddress.rst:532 +#: ../../library/ipaddress.rst:567 msgid "" "A string representation of the network, with the mask in net mask notation." msgstr "" -#: ../../library/ipaddress.rst:537 +#: ../../library/ipaddress.rst:572 msgid "" "A string representation of the network, with the mask in host mask notation." msgstr "" -#: ../../library/ipaddress.rst:542 +#: ../../library/ipaddress.rst:577 msgid "The total number of addresses in the network." msgstr "" -#: ../../library/ipaddress.rst:546 +#: ../../library/ipaddress.rst:581 msgid "Length of the network prefix, in bits." msgstr "" -#: ../../library/ipaddress.rst:550 +#: ../../library/ipaddress.rst:585 msgid "" "Returns an iterator over the usable hosts in the network. The usable hosts " "are all the IP addresses that belong to the network, except the network " @@ -590,20 +649,20 @@ msgid "" "containing the single host address." msgstr "" -#: ../../library/ipaddress.rst:568 +#: ../../library/ipaddress.rst:603 msgid "" "``True`` if this network is partly or wholly contained in *other* or *other* " "is wholly contained in this network." msgstr "" -#: ../../library/ipaddress.rst:573 +#: ../../library/ipaddress.rst:608 msgid "" "Computes the network definitions resulting from removing the given *network* " "from this one. Returns an iterator of network objects. Raises :exc:" "`ValueError` if *network* is not completely contained in this network." msgstr "" -#: ../../library/ipaddress.rst:586 +#: ../../library/ipaddress.rst:621 msgid "" "The subnets that join to make the current network definition, depending on " "the argument values. *prefixlen_diff* is the amount our prefix length " @@ -613,7 +672,7 @@ msgid "" "network objects." msgstr "" -#: ../../library/ipaddress.rst:611 +#: ../../library/ipaddress.rst:646 msgid "" "The supernet containing this network definition, depending on the argument " "values. *prefixlen_diff* is the amount our prefix length should be " @@ -622,33 +681,33 @@ msgid "" "*new_prefix* must be set. Returns a single network object." msgstr "" -#: ../../library/ipaddress.rst:627 +#: ../../library/ipaddress.rst:662 msgid "Return ``True`` if this network is a subnet of *other*." msgstr "" -#: ../../library/ipaddress.rst:638 +#: ../../library/ipaddress.rst:673 msgid "Return ``True`` if this network is a supernet of *other*." msgstr "" -#: ../../library/ipaddress.rst:649 +#: ../../library/ipaddress.rst:684 msgid "" "Compare this network to *other*. In this comparison only the network " "addresses are considered; host bits aren't. Returns either ``-1``, ``0`` or " "``1``." msgstr "" -#: ../../library/ipaddress.rst:660 +#: ../../library/ipaddress.rst:695 msgid "" "It uses the same ordering and comparison algorithm as \"<\", \"==\", and " "\">\"" msgstr "" -#: ../../library/ipaddress.rst:666 +#: ../../library/ipaddress.rst:701 msgid "" "Construct an IPv6 network definition. *address* can be one of the following:" msgstr "" -#: ../../library/ipaddress.rst:668 +#: ../../library/ipaddress.rst:703 msgid "" "A string consisting of an IP address and an optional prefix length, " "separated by a slash (``/``). The IP address is the network address, and " @@ -656,26 +715,26 @@ msgid "" "length is provided, it's considered to be ``/128``." msgstr "" -#: ../../library/ipaddress.rst:673 +#: ../../library/ipaddress.rst:708 msgid "" "Note that currently expanded netmasks are not supported. That means ``2001:" "db00::0/24`` is a valid argument while ``2001:db00::0/ffff:ff00::`` is not." msgstr "" -#: ../../library/ipaddress.rst:677 +#: ../../library/ipaddress.rst:712 msgid "" "An integer that fits into 128 bits. This is equivalent to a single-address " "network, with the network address being *address* and the mask being " "``/128``." msgstr "" -#: ../../library/ipaddress.rst:681 +#: ../../library/ipaddress.rst:716 msgid "" "An integer packed into a :class:`bytes` object of length 16, big-endian. The " "interpretation is similar to an integer *address*." msgstr "" -#: ../../library/ipaddress.rst:684 +#: ../../library/ipaddress.rst:719 msgid "" "A two-tuple of an address description and a netmask, where the address " "description is either a string, a 128-bits integer, a 16-bytes packed " @@ -683,14 +742,14 @@ msgid "" "representing the prefix length." msgstr "" -#: ../../library/ipaddress.rst:689 +#: ../../library/ipaddress.rst:724 msgid "" "An :exc:`AddressValueError` is raised if *address* is not a valid IPv6 " "address. A :exc:`NetmaskValueError` is raised if the mask is not valid for " "an IPv6 address." msgstr "" -#: ../../library/ipaddress.rst:722 +#: ../../library/ipaddress.rst:757 msgid "" "Returns an iterator over the usable hosts in the network. The usable hosts " "are all the IP addresses that belong to the network, except the Subnet-" @@ -699,139 +758,139 @@ msgid "" "of 128 will return a list containing the single host address." msgstr "" -#: ../../library/ipaddress.rst:737 +#: ../../library/ipaddress.rst:772 msgid "" "Refer to the corresponding attribute documentation in :class:`IPv4Network`." msgstr "" -#: ../../library/ipaddress.rst:742 +#: ../../library/ipaddress.rst:777 msgid "" "These attribute is true for the network as a whole if it is true for both " "the network address and the broadcast address." msgstr "" -#: ../../library/ipaddress.rst:749 +#: ../../library/ipaddress.rst:784 msgid "" "Network objects support some operators. Unless stated otherwise, operators " "can only be applied between compatible objects (i.e. IPv4 with IPv4, IPv6 " "with IPv6)." msgstr "" -#: ../../library/ipaddress.rst:755 ../../library/ipaddress.rst:891 +#: ../../library/ipaddress.rst:790 ../../library/ipaddress.rst:926 msgid "Logical operators" msgstr "" -#: ../../library/ipaddress.rst:757 +#: ../../library/ipaddress.rst:792 msgid "" "Network objects can be compared with the usual set of logical operators. " "Network objects are ordered first by network address, then by net mask." msgstr "" -#: ../../library/ipaddress.rst:762 +#: ../../library/ipaddress.rst:797 msgid "Iteration" msgstr "" -#: ../../library/ipaddress.rst:764 +#: ../../library/ipaddress.rst:799 msgid "" "Network objects can be iterated to list all the addresses belonging to the " "network. For iteration, *all* hosts are returned, including unusable hosts " "(for usable hosts, use the :meth:`~IPv4Network.hosts` method). An example::" msgstr "" -#: ../../library/ipaddress.rst:791 +#: ../../library/ipaddress.rst:826 msgid "Networks as containers of addresses" msgstr "" -#: ../../library/ipaddress.rst:793 +#: ../../library/ipaddress.rst:828 msgid "Network objects can act as containers of addresses. Some examples::" msgstr "" -#: ../../library/ipaddress.rst:806 +#: ../../library/ipaddress.rst:841 msgid "Interface objects" msgstr "" -#: ../../library/ipaddress.rst:808 +#: ../../library/ipaddress.rst:843 msgid "" "Interface objects are :term:`hashable`, so they can be used as keys in " "dictionaries." msgstr "" -#: ../../library/ipaddress.rst:813 +#: ../../library/ipaddress.rst:848 msgid "" "Construct an IPv4 interface. The meaning of *address* is as in the " "constructor of :class:`IPv4Network`, except that arbitrary host addresses " "are always accepted." msgstr "" -#: ../../library/ipaddress.rst:817 +#: ../../library/ipaddress.rst:852 msgid "" ":class:`IPv4Interface` is a subclass of :class:`IPv4Address`, so it inherits " "all the attributes from that class. In addition, the following attributes " "are available:" msgstr "" -#: ../../library/ipaddress.rst:823 +#: ../../library/ipaddress.rst:858 msgid "The address (:class:`IPv4Address`) without network information." msgstr "" -#: ../../library/ipaddress.rst:831 +#: ../../library/ipaddress.rst:866 msgid "The network (:class:`IPv4Network`) this interface belongs to." msgstr "" -#: ../../library/ipaddress.rst:839 +#: ../../library/ipaddress.rst:874 msgid "" "A string representation of the interface with the mask in prefix notation." msgstr "" -#: ../../library/ipaddress.rst:847 +#: ../../library/ipaddress.rst:882 msgid "" "A string representation of the interface with the network as a net mask." msgstr "" -#: ../../library/ipaddress.rst:855 +#: ../../library/ipaddress.rst:890 msgid "" "A string representation of the interface with the network as a host mask." msgstr "" -#: ../../library/ipaddress.rst:864 +#: ../../library/ipaddress.rst:899 msgid "" "Construct an IPv6 interface. The meaning of *address* is as in the " "constructor of :class:`IPv6Network`, except that arbitrary host addresses " "are always accepted." msgstr "" -#: ../../library/ipaddress.rst:868 +#: ../../library/ipaddress.rst:903 msgid "" ":class:`IPv6Interface` is a subclass of :class:`IPv6Address`, so it inherits " "all the attributes from that class. In addition, the following attributes " "are available:" msgstr "" -#: ../../library/ipaddress.rst:878 +#: ../../library/ipaddress.rst:913 msgid "" "Refer to the corresponding attribute documentation in :class:`IPv4Interface`." msgstr "" -#: ../../library/ipaddress.rst:885 +#: ../../library/ipaddress.rst:920 msgid "" "Interface objects support some operators. Unless stated otherwise, " "operators can only be applied between compatible objects (i.e. IPv4 with " "IPv4, IPv6 with IPv6)." msgstr "" -#: ../../library/ipaddress.rst:893 +#: ../../library/ipaddress.rst:928 msgid "" "Interface objects can be compared with the usual set of logical operators." msgstr "" -#: ../../library/ipaddress.rst:895 +#: ../../library/ipaddress.rst:930 msgid "" "For equality comparison (``==`` and ``!=``), both the IP address and network " "must be the same for the objects to be equal. An interface will not compare " "equal to any address or network object." msgstr "" -#: ../../library/ipaddress.rst:899 +#: ../../library/ipaddress.rst:934 msgid "" "For ordering (``<``, ``>``, etc) the rules are different. Interface and " "address objects with the same IP version can be compared, and the address " @@ -840,15 +899,15 @@ msgid "" "then by their IP addresses." msgstr "" -#: ../../library/ipaddress.rst:907 +#: ../../library/ipaddress.rst:942 msgid "Other Module Level Functions" msgstr "" -#: ../../library/ipaddress.rst:909 +#: ../../library/ipaddress.rst:944 msgid "The module also provides the following module level functions:" msgstr "" -#: ../../library/ipaddress.rst:913 +#: ../../library/ipaddress.rst:948 msgid "" "Represent an address as 4 packed bytes in network (big-endian) order. " "*address* is an integer representation of an IPv4 IP address. A :exc:" @@ -856,7 +915,7 @@ msgid "" "IP address." msgstr "" -#: ../../library/ipaddress.rst:926 +#: ../../library/ipaddress.rst:961 msgid "" "Represent an address as 16 packed bytes in network (big-endian) order. " "*address* is an integer representation of an IPv6 IP address. A :exc:" @@ -864,7 +923,7 @@ msgid "" "IP address." msgstr "" -#: ../../library/ipaddress.rst:934 +#: ../../library/ipaddress.rst:969 msgid "" "Return an iterator of the summarized network range given the first and last " "IP addresses. *first* is the first :class:`IPv4Address` or :class:" @@ -875,7 +934,7 @@ msgid "" "address version is not 4 or 6." msgstr "" -#: ../../library/ipaddress.rst:950 +#: ../../library/ipaddress.rst:985 msgid "" "Return an iterator of the collapsed :class:`IPv4Network` or :class:" "`IPv6Network` objects. *addresses* is an iterator of :class:`IPv4Network` " @@ -883,39 +942,39 @@ msgid "" "*addresses* contains mixed version objects." msgstr "" -#: ../../library/ipaddress.rst:963 +#: ../../library/ipaddress.rst:998 msgid "" "Return a key suitable for sorting between networks and addresses. Address " "and Network objects are not sortable by default; they're fundamentally " "different, so the expression::" msgstr "" -#: ../../library/ipaddress.rst:969 +#: ../../library/ipaddress.rst:1004 msgid "" "doesn't make sense. There are some times however, where you may wish to " "have :mod:`ipaddress` sort these anyway. If you need to do this, you can " "use this function as the *key* argument to :func:`sorted()`." msgstr "" -#: ../../library/ipaddress.rst:973 +#: ../../library/ipaddress.rst:1008 msgid "*obj* is either a network or address object." msgstr "" -#: ../../library/ipaddress.rst:977 +#: ../../library/ipaddress.rst:1012 msgid "Custom Exceptions" msgstr "" -#: ../../library/ipaddress.rst:979 +#: ../../library/ipaddress.rst:1014 msgid "" "To support more specific error reporting from class constructors, the module " "defines the following exceptions:" msgstr "" -#: ../../library/ipaddress.rst:984 +#: ../../library/ipaddress.rst:1019 msgid "Any value error related to the address." msgstr "" -#: ../../library/ipaddress.rst:989 +#: ../../library/ipaddress.rst:1024 msgid "Any value error related to the net mask." msgstr "" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index d664592327..dd0af11a99 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-20 00:03+0000\n" +"POT-Creation-Date: 2024-04-25 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -257,7 +257,7 @@ msgid "" "`_." msgstr "" -#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1963 +#: ../../whatsnew/3.12.rst:176 ../../whatsnew/3.12.rst:1962 msgid "New Features" msgstr "新增特性" @@ -924,26 +924,25 @@ msgstr "" msgid "" "The performance of :func:`inspect.getattr_static` has been considerably " "improved. Most calls to the function should be at least 2x faster than they " -"were in Python 3.11, and some may be 6x faster or more. (Contributed by Alex " -"Waygood in :gh:`103193`.)" +"were in Python 3.11. (Contributed by Alex Waygood in :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:741 +#: ../../whatsnew/3.12.rst:740 msgid "itertools" msgstr "itertools" -#: ../../whatsnew/3.12.rst:743 +#: ../../whatsnew/3.12.rst:742 msgid "" "Add :class:`itertools.batched()` for collecting into even-sized tuples where " "the last batch may be shorter than the rest. (Contributed by Raymond " "Hettinger in :gh:`98363`.)" msgstr "" -#: ../../whatsnew/3.12.rst:748 +#: ../../whatsnew/3.12.rst:747 msgid "math" msgstr "math" -#: ../../whatsnew/3.12.rst:750 +#: ../../whatsnew/3.12.rst:749 msgid "" "Add :func:`math.sumprod` for computing a sum of products. (Contributed by " "Raymond Hettinger in :gh:`100485`.)" @@ -951,39 +950,39 @@ msgstr "" "新增 :func:`math.sumprod` 以計算乘積總和。(由 Raymond Hettinger 於 :gh:" "`100485` 中貢獻。)" -#: ../../whatsnew/3.12.rst:753 +#: ../../whatsnew/3.12.rst:752 msgid "" "Extend :func:`math.nextafter` to include a *steps* argument for moving up or " "down multiple steps at a time. (Contributed by Matthias Goergens, Mark " "Dickinson, and Raymond Hettinger in :gh:`94906`.)" msgstr "" -#: ../../whatsnew/3.12.rst:758 +#: ../../whatsnew/3.12.rst:757 msgid "os" msgstr "os" -#: ../../whatsnew/3.12.rst:760 +#: ../../whatsnew/3.12.rst:759 msgid "" "Add :const:`os.PIDFD_NONBLOCK` to open a file descriptor for a process with :" "func:`os.pidfd_open` in non-blocking mode. (Contributed by Kumar Aditya in :" "gh:`93312`.)" msgstr "" -#: ../../whatsnew/3.12.rst:764 +#: ../../whatsnew/3.12.rst:763 msgid "" ":class:`os.DirEntry` now includes an :meth:`os.DirEntry.is_junction` method " "to check if the entry is a junction. (Contributed by Charles Machalow in :gh:" "`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:768 +#: ../../whatsnew/3.12.rst:767 msgid "" "Add :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts` " "functions on Windows for enumerating drives, volumes and mount points. " "(Contributed by Steve Dower in :gh:`102519`.)" msgstr "" -#: ../../whatsnew/3.12.rst:772 +#: ../../whatsnew/3.12.rst:771 msgid "" ":func:`os.stat` and :func:`os.lstat` are now more accurate on Windows. The " "``st_birthtime`` field will now be filled with the creation time of the " @@ -996,27 +995,27 @@ msgid "" "`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:783 +#: ../../whatsnew/3.12.rst:782 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.12.rst:785 +#: ../../whatsnew/3.12.rst:784 msgid "" "Add :func:`os.path.isjunction` to check if a given path is a junction. " "(Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:788 +#: ../../whatsnew/3.12.rst:787 msgid "" "Add :func:`os.path.splitroot` to split a path into a triad ``(drive, root, " "tail)``. (Contributed by Barney Gale in :gh:`101000`.)" msgstr "" -#: ../../whatsnew/3.12.rst:792 +#: ../../whatsnew/3.12.rst:791 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.12.rst:794 +#: ../../whatsnew/3.12.rst:793 msgid "" "Add support for subclassing :class:`pathlib.PurePath` and :class:`pathlib." "Path`, plus their Posix- and Windows-specific variants. Subclasses may " @@ -1024,14 +1023,14 @@ msgid "" "information between path instances." msgstr "" -#: ../../whatsnew/3.12.rst:799 +#: ../../whatsnew/3.12.rst:798 msgid "" "Add :meth:`pathlib.Path.walk` for walking the directory trees and generating " "all file or directory names within them, similar to :func:`os.walk`. " "(Contributed by Stanislav Zmiev in :gh:`90385`.)" msgstr "" -#: ../../whatsnew/3.12.rst:803 +#: ../../whatsnew/3.12.rst:802 msgid "" "Add *walk_up* optional parameter to :meth:`pathlib.PurePath.relative_to` to " "allow the insertion of ``..`` entries in the result; this behavior is more " @@ -1039,13 +1038,13 @@ msgid "" "gh:`84538`.)" msgstr "" -#: ../../whatsnew/3.12.rst:808 +#: ../../whatsnew/3.12.rst:807 msgid "" "Add :meth:`pathlib.Path.is_junction` as a proxy to :func:`os.path." "isjunction`. (Contributed by Charles Machalow in :gh:`99547`.)" msgstr "" -#: ../../whatsnew/3.12.rst:811 +#: ../../whatsnew/3.12.rst:810 msgid "" "Add *case_sensitive* optional parameter to :meth:`pathlib.Path.glob`, :meth:" "`pathlib.Path.rglob` and :meth:`pathlib.PurePath.match` for matching the " @@ -1053,22 +1052,22 @@ msgid "" "process." msgstr "" -#: ../../whatsnew/3.12.rst:816 +#: ../../whatsnew/3.12.rst:815 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.12.rst:818 +#: ../../whatsnew/3.12.rst:817 msgid "" "Add convenience variables to hold values temporarily for debug session and " "provide quick access to values like the current frame or the return value. " "(Contributed by Tian Gao in :gh:`103693`.)" msgstr "" -#: ../../whatsnew/3.12.rst:824 +#: ../../whatsnew/3.12.rst:823 msgid "random" msgstr "random" -#: ../../whatsnew/3.12.rst:826 +#: ../../whatsnew/3.12.rst:825 msgid "" "Add :func:`random.binomialvariate`. (Contributed by Raymond Hettinger in :gh:" "`81620`.)" @@ -1076,17 +1075,17 @@ msgstr "" "新增 :func:`random.binomialvariate`。(由 Raymond Hettinger 於 :gh:`81620` 中" "貢獻。)" -#: ../../whatsnew/3.12.rst:829 +#: ../../whatsnew/3.12.rst:828 msgid "" "Add a default of ``lambd=1.0`` to :func:`random.expovariate`. (Contributed " "by Raymond Hettinger in :gh:`100234`.)" msgstr "" -#: ../../whatsnew/3.12.rst:833 +#: ../../whatsnew/3.12.rst:832 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.12.rst:835 +#: ../../whatsnew/3.12.rst:834 msgid "" ":func:`shutil.make_archive` now passes the *root_dir* argument to custom " "archivers which support it. In this case it no longer temporarily changes " @@ -1094,7 +1093,7 @@ msgid "" "archiving. (Contributed by Serhiy Storchaka in :gh:`74696`.)" msgstr "" -#: ../../whatsnew/3.12.rst:841 +#: ../../whatsnew/3.12.rst:840 msgid "" ":func:`shutil.rmtree` now accepts a new argument *onexc* which is an error " "handler like *onerror* but which expects an exception instance rather than a " @@ -1102,14 +1101,14 @@ msgid "" "Katriel in :gh:`102828`.)" msgstr "" -#: ../../whatsnew/3.12.rst:846 +#: ../../whatsnew/3.12.rst:845 msgid "" ":func:`shutil.which` now consults the *PATHEXT* environment variable to find " "matches within *PATH* on Windows even when the given *cmd* includes a " "directory component. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:851 +#: ../../whatsnew/3.12.rst:850 msgid "" ":func:`shutil.which` will call ``NeedCurrentDirectoryForExePathW`` when " "querying for executables on Windows to determine if the current working " @@ -1117,18 +1116,18 @@ msgid "" "Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:856 +#: ../../whatsnew/3.12.rst:855 msgid "" ":func:`shutil.which` will return a path matching the *cmd* with a component " "from ``PATHEXT`` prior to a direct match elsewhere in the search path on " "Windows. (Contributed by Charles Machalow in :gh:`103179`.)" msgstr "" -#: ../../whatsnew/3.12.rst:862 ../../whatsnew/3.12.rst:1667 +#: ../../whatsnew/3.12.rst:861 ../../whatsnew/3.12.rst:1666 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.12.rst:864 +#: ../../whatsnew/3.12.rst:863 msgid "" "Add a :ref:`command-line interface `. (Contributed by Erlend E. " "Aasland in :gh:`77617`.)" @@ -1136,7 +1135,7 @@ msgstr "" "新增\\ :ref:`命令列介面 `。(由 Erlend E. Aasland 於 :gh:" "`77617` 中貢獻。)" -#: ../../whatsnew/3.12.rst:867 +#: ../../whatsnew/3.12.rst:866 msgid "" "Add the :attr:`sqlite3.Connection.autocommit` attribute to :class:`sqlite3." "Connection` and the *autocommit* parameter to :func:`sqlite3.connect` to " @@ -1144,43 +1143,43 @@ msgid "" "control-autocommit>`. (Contributed by Erlend E. Aasland in :gh:`83638`.)" msgstr "" -#: ../../whatsnew/3.12.rst:874 +#: ../../whatsnew/3.12.rst:873 msgid "" "Add *entrypoint* keyword-only parameter to :meth:`sqlite3.Connection." "load_extension`, for overriding the SQLite extension entry point. " "(Contributed by Erlend E. Aasland in :gh:`103015`.)" msgstr "" -#: ../../whatsnew/3.12.rst:879 +#: ../../whatsnew/3.12.rst:878 msgid "" "Add :meth:`sqlite3.Connection.getconfig` and :meth:`sqlite3.Connection." "setconfig` to :class:`sqlite3.Connection` to make configuration changes to a " "database connection. (Contributed by Erlend E. Aasland in :gh:`103489`.)" msgstr "" -#: ../../whatsnew/3.12.rst:885 +#: ../../whatsnew/3.12.rst:884 msgid "statistics" msgstr "statistics" -#: ../../whatsnew/3.12.rst:887 +#: ../../whatsnew/3.12.rst:886 msgid "" "Extend :func:`statistics.correlation` to include as a ``ranked`` method for " "computing the Spearman correlation of ranked data. (Contributed by Raymond " "Hettinger in :gh:`95861`.)" msgstr "" -#: ../../whatsnew/3.12.rst:892 +#: ../../whatsnew/3.12.rst:891 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.12.rst:894 +#: ../../whatsnew/3.12.rst:893 msgid "" "Add the :mod:`sys.monitoring` namespace to expose the new :ref:`PEP 669 " "` monitoring API. (Contributed by Mark Shannon in :gh:" "`103082`.)" msgstr "" -#: ../../whatsnew/3.12.rst:898 +#: ../../whatsnew/3.12.rst:897 msgid "" "Add :func:`sys.activate_stack_trampoline` and :func:`sys." "deactivate_stack_trampoline` for activating and deactivating stack profiler " @@ -1190,7 +1189,7 @@ msgid "" "Shannon in :gh:`96123`.)" msgstr "" -#: ../../whatsnew/3.12.rst:907 +#: ../../whatsnew/3.12.rst:906 msgid "" "Add :data:`sys.last_exc` which holds the last unhandled exception that was " "raised (for post-mortem debugging use cases). Deprecate the three fields " @@ -1199,14 +1198,14 @@ msgid "" "Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:913 ../../whatsnew/3.12.rst:1862 +#: ../../whatsnew/3.12.rst:912 ../../whatsnew/3.12.rst:1861 msgid "" ":func:`sys._current_exceptions` now returns a mapping from thread-id to an " "exception instance, rather than to a ``(typ, exc, tb)`` tuple. (Contributed " "by Irit Katriel in :gh:`103176`.)" msgstr "" -#: ../../whatsnew/3.12.rst:917 +#: ../../whatsnew/3.12.rst:916 msgid "" ":func:`sys.setrecursionlimit` and :func:`sys.getrecursionlimit`. The " "recursion limit now applies only to Python code. Builtin functions do not " @@ -1214,27 +1213,27 @@ msgid "" "prevents recursion from causing a virtual machine crash." msgstr "" -#: ../../whatsnew/3.12.rst:923 +#: ../../whatsnew/3.12.rst:922 msgid "tempfile" msgstr "tempfile" -#: ../../whatsnew/3.12.rst:925 +#: ../../whatsnew/3.12.rst:924 msgid "" "The :class:`tempfile.NamedTemporaryFile` function has a new optional " "parameter *delete_on_close* (Contributed by Evgeny Zorin in :gh:`58451`.)" msgstr "" -#: ../../whatsnew/3.12.rst:927 +#: ../../whatsnew/3.12.rst:926 msgid "" ":func:`tempfile.mkdtemp` now always returns an absolute path, even if the " "argument provided to the *dir* parameter is a relative path." msgstr "" -#: ../../whatsnew/3.12.rst:931 +#: ../../whatsnew/3.12.rst:930 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.12.rst:933 +#: ../../whatsnew/3.12.rst:932 msgid "" "Add :func:`threading.settrace_all_threads` and :func:`threading." "setprofile_all_threads` that allow to set tracing and profiling functions in " @@ -1242,11 +1241,11 @@ msgid "" "Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:939 +#: ../../whatsnew/3.12.rst:938 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.12.rst:941 +#: ../../whatsnew/3.12.rst:940 msgid "" "``tkinter.Canvas.coords()`` now flattens its arguments. It now accepts not " "only coordinates as separate arguments (``x1, y1, x2, y2, ...``) and a " @@ -1256,11 +1255,11 @@ msgid "" "in :gh:`94473`.)" msgstr "" -#: ../../whatsnew/3.12.rst:950 +#: ../../whatsnew/3.12.rst:949 msgid "tokenize" msgstr "tokenize" -#: ../../whatsnew/3.12.rst:952 +#: ../../whatsnew/3.12.rst:951 msgid "" "The :mod:`tokenize` module includes the changes introduced in :pep:`701`. " "(Contributed by Marta Gómez Macías and Pablo Galindo in :gh:`102856`.) See :" @@ -1268,22 +1267,22 @@ msgid "" "to the :mod:`tokenize` module." msgstr "" -#: ../../whatsnew/3.12.rst:958 +#: ../../whatsnew/3.12.rst:957 msgid "types" msgstr "types" -#: ../../whatsnew/3.12.rst:960 +#: ../../whatsnew/3.12.rst:959 msgid "" "Add :func:`types.get_original_bases` to allow for further introspection of :" "ref:`user-defined-generics` when subclassed. (Contributed by James Hilton-" "Balfe and Alex Waygood in :gh:`101827`.)" msgstr "" -#: ../../whatsnew/3.12.rst:967 +#: ../../whatsnew/3.12.rst:966 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.12.rst:969 +#: ../../whatsnew/3.12.rst:968 msgid "" ":func:`isinstance` checks against :func:`runtime-checkable protocols ` now use :func:`inspect.getattr_static` rather than :func:" @@ -1296,7 +1295,7 @@ msgid "" "affected by this change. (Contributed by Alex Waygood in :gh:`102433`.)" msgstr "" -#: ../../whatsnew/3.12.rst:980 +#: ../../whatsnew/3.12.rst:979 msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " @@ -1304,88 +1303,88 @@ msgid "" "on :func:`isinstance` checks comparing objects to the protocol. For example::" msgstr "" -#: ../../whatsnew/3.12.rst:1002 +#: ../../whatsnew/3.12.rst:1001 msgid "" "This change was made in order to speed up ``isinstance()`` checks against " "runtime-checkable protocols." msgstr "" -#: ../../whatsnew/3.12.rst:1005 +#: ../../whatsnew/3.12.rst:1004 msgid "" "The performance profile of :func:`isinstance` checks against :func:`runtime-" "checkable protocols ` has changed significantly. " "Most ``isinstance()`` checks against protocols with only a few members " "should be at least 2x faster than in 3.11, and some may be 20x faster or " -"more. However, ``isinstance()`` checks against protocols with fourteen or " -"more members may be slower than in Python 3.11. (Contributed by Alex Waygood " -"in :gh:`74690` and :gh:`103193`.)" +"more. However, ``isinstance()`` checks against protocols with many members " +"may be slower than in Python 3.11. (Contributed by Alex Waygood in :gh:" +"`74690` and :gh:`103193`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1013 +#: ../../whatsnew/3.12.rst:1012 msgid "" "All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have " "the ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco " "in :gh:`103699`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1017 +#: ../../whatsnew/3.12.rst:1016 msgid "" "Add ``frozen_default`` parameter to :func:`typing.dataclass_transform`. " "(Contributed by Erik De Bonte in :gh:`99957`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1021 +#: ../../whatsnew/3.12.rst:1020 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.12.rst:1023 +#: ../../whatsnew/3.12.rst:1022 msgid "" "The Unicode database has been updated to version 15.0.0. (Contributed by " "Benjamin Peterson in :gh:`96734`)." msgstr "" -#: ../../whatsnew/3.12.rst:1027 ../../whatsnew/3.12.rst:1707 +#: ../../whatsnew/3.12.rst:1026 ../../whatsnew/3.12.rst:1706 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.12.rst:1029 +#: ../../whatsnew/3.12.rst:1028 msgid "" "Add a ``--durations`` command line option, showing the N slowest test cases::" msgstr "" -#: ../../whatsnew/3.12.rst:1045 +#: ../../whatsnew/3.12.rst:1044 msgid "(Contributed by Giampaolo Rodola in :gh:`48330`)" msgstr "" -#: ../../whatsnew/3.12.rst:1048 +#: ../../whatsnew/3.12.rst:1047 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.12.rst:1050 +#: ../../whatsnew/3.12.rst:1049 msgid "" "Add a :ref:`command-line interface `. (Contributed by Adam Chhina " "in :gh:`88597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1055 +#: ../../whatsnew/3.12.rst:1054 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.12.rst:1057 +#: ../../whatsnew/3.12.rst:1056 msgid "" "Remove ``wstr`` and ``wstr_length`` members from Unicode objects. It reduces " "object size by 8 or 16 bytes on 64bit platform. (:pep:`623`) (Contributed by " "Inada Naoki in :gh:`92536`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1061 +#: ../../whatsnew/3.12.rst:1060 msgid "" "Add experimental support for using the BOLT binary optimizer in the build " "process, which improves performance by 1-5%. (Contributed by Kevin " "Modzelewski in :gh:`90536` and tuned by Donghee Na in :gh:`101525`)" msgstr "" -#: ../../whatsnew/3.12.rst:1065 +#: ../../whatsnew/3.12.rst:1064 msgid "" "Speed up the regular expression substitution (functions :func:`re.sub` and :" "func:`re.subn` and corresponding :class:`!re.Pattern` methods) for " @@ -1393,13 +1392,13 @@ msgid "" "by Serhiy Storchaka in :gh:`91524`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1070 +#: ../../whatsnew/3.12.rst:1069 msgid "" "Speed up :class:`asyncio.Task` creation by deferring expensive string " "formatting. (Contributed by Itamar Oren in :gh:`103793`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1073 +#: ../../whatsnew/3.12.rst:1072 msgid "" "The :func:`tokenize.tokenize` and :func:`tokenize.generate_tokens` functions " "are up to 64% faster as a side effect of the changes required to cover :pep:" @@ -1407,18 +1406,18 @@ msgid "" "Pablo Galindo in :gh:`102856`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1078 +#: ../../whatsnew/3.12.rst:1077 msgid "" "Speed up :func:`super` method calls and attribute loads via the new :opcode:" "`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer and Vladimir " "Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1084 +#: ../../whatsnew/3.12.rst:1083 msgid "CPython bytecode changes" msgstr "CPython 位元組碼變更" -#: ../../whatsnew/3.12.rst:1086 +#: ../../whatsnew/3.12.rst:1085 msgid "" "Remove the :opcode:`!LOAD_METHOD` instruction. It has been merged into :" "opcode:`LOAD_ATTR`. :opcode:`LOAD_ATTR` will now behave like the old :opcode:" @@ -1426,62 +1425,62 @@ msgid "" "by Ken Jin in :gh:`93429`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1091 +#: ../../whatsnew/3.12.rst:1090 msgid "" "Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!" "JUMP_IF_TRUE_OR_POP` instructions. (Contributed by Irit Katriel in :gh:" "`102859`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1094 +#: ../../whatsnew/3.12.rst:1093 msgid "" "Remove the :opcode:`!PRECALL` instruction. (Contributed by Mark Shannon in :" "gh:`92925`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1097 +#: ../../whatsnew/3.12.rst:1096 msgid "" "Add the :opcode:`BINARY_SLICE` and :opcode:`STORE_SLICE` instructions. " "(Contributed by Mark Shannon in :gh:`94163`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1100 +#: ../../whatsnew/3.12.rst:1099 msgid "" "Add the :opcode:`CALL_INTRINSIC_1` instructions. (Contributed by Mark " "Shannon in :gh:`99005`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1103 +#: ../../whatsnew/3.12.rst:1102 msgid "" "Add the :opcode:`CALL_INTRINSIC_2` instruction. (Contributed by Irit Katriel " "in :gh:`101799`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1106 +#: ../../whatsnew/3.12.rst:1105 msgid "" "Add the :opcode:`CLEANUP_THROW` instruction. (Contributed by Brandt Bucher " "in :gh:`90997`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1109 +#: ../../whatsnew/3.12.rst:1108 msgid "" "Add the :opcode:`!END_SEND` instruction. (Contributed by Mark Shannon in :gh:" "`103082`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1112 +#: ../../whatsnew/3.12.rst:1111 msgid "" "Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the " "implementation of :pep:`709`. (Contributed by Carl Meyer in :gh:`101441`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1115 +#: ../../whatsnew/3.12.rst:1114 msgid "" "Add the :opcode:`LOAD_FAST_CHECK` instruction. (Contributed by Dennis " "Sweeney in :gh:`93143`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1118 +#: ../../whatsnew/3.12.rst:1117 msgid "" "Add the :opcode:`LOAD_FROM_DICT_OR_DEREF`, :opcode:" "`LOAD_FROM_DICT_OR_GLOBALS`, and :opcode:`LOAD_LOCALS` opcodes as part of " @@ -1490,48 +1489,48 @@ msgid "" "`LOAD_FROM_DICT_OR_DEREF`. (Contributed by Jelle Zijlstra in :gh:`103764`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1124 +#: ../../whatsnew/3.12.rst:1123 msgid "" "Add the :opcode:`LOAD_SUPER_ATTR` instruction. (Contributed by Carl Meyer " "and Vladimir Matveev in :gh:`103497`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1127 +#: ../../whatsnew/3.12.rst:1126 msgid "" "Add the :opcode:`RETURN_CONST` instruction. (Contributed by Wenyang Wang in :" "gh:`101632`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1130 +#: ../../whatsnew/3.12.rst:1129 msgid "Demos and Tools" msgstr "" -#: ../../whatsnew/3.12.rst:1132 +#: ../../whatsnew/3.12.rst:1131 msgid "" "Remove the ``Tools/demo/`` directory which contained old demo scripts. A " "copy can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97681`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1137 +#: ../../whatsnew/3.12.rst:1136 msgid "" "Remove outdated example scripts of the ``Tools/scripts/`` directory. A copy " "can be found in the `old-demos project `_. (Contributed by Victor Stinner in :gh:`97669`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1144 ../../whatsnew/3.12.rst:2265 +#: ../../whatsnew/3.12.rst:1143 ../../whatsnew/3.12.rst:2264 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.12.rst:1146 +#: ../../whatsnew/3.12.rst:1145 msgid "" ":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" "argparse.BooleanOptionalAction` are deprecated and will be removed in 3.14. " "(Contributed by Nikita Sobolev in :gh:`92248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1151 +#: ../../whatsnew/3.12.rst:1150 msgid "" ":mod:`ast`: The following :mod:`ast` features have been deprecated in " "documentation since Python 3.8, now cause a :exc:`DeprecationWarning` to be " @@ -1539,37 +1538,37 @@ msgid "" "Python 3.14:" msgstr "" -#: ../../whatsnew/3.12.rst:1155 ../../whatsnew/3.12.rst:1401 +#: ../../whatsnew/3.12.rst:1154 ../../whatsnew/3.12.rst:1400 msgid ":class:`!ast.Num`" msgstr ":class:`!ast.Num`" -#: ../../whatsnew/3.12.rst:1156 ../../whatsnew/3.12.rst:1402 +#: ../../whatsnew/3.12.rst:1155 ../../whatsnew/3.12.rst:1401 msgid ":class:`!ast.Str`" msgstr ":class:`!ast.Str`" -#: ../../whatsnew/3.12.rst:1157 ../../whatsnew/3.12.rst:1403 +#: ../../whatsnew/3.12.rst:1156 ../../whatsnew/3.12.rst:1402 msgid ":class:`!ast.Bytes`" msgstr ":class:`!ast.Bytes`" -#: ../../whatsnew/3.12.rst:1158 ../../whatsnew/3.12.rst:1404 +#: ../../whatsnew/3.12.rst:1157 ../../whatsnew/3.12.rst:1403 msgid ":class:`!ast.NameConstant`" msgstr ":class:`!ast.NameConstant`" -#: ../../whatsnew/3.12.rst:1159 ../../whatsnew/3.12.rst:1405 +#: ../../whatsnew/3.12.rst:1158 ../../whatsnew/3.12.rst:1404 msgid ":class:`!ast.Ellipsis`" msgstr ":class:`!ast.Ellipsis`" -#: ../../whatsnew/3.12.rst:1161 +#: ../../whatsnew/3.12.rst:1160 msgid "" "Use :class:`ast.Constant` instead. (Contributed by Serhiy Storchaka in :gh:" "`90953`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1164 ../../whatsnew/3.12.rst:1407 +#: ../../whatsnew/3.12.rst:1163 ../../whatsnew/3.12.rst:1406 msgid ":mod:`asyncio`:" msgstr ":mod:`asyncio`:" -#: ../../whatsnew/3.12.rst:1166 +#: ../../whatsnew/3.12.rst:1165 msgid "" "The child watcher classes :class:`asyncio.MultiLoopChildWatcher`, :class:" "`asyncio.FastChildWatcher`, :class:`asyncio.AbstractChildWatcher` and :class:" @@ -1577,7 +1576,7 @@ msgid "" "3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1172 +#: ../../whatsnew/3.12.rst:1171 msgid "" ":func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`, :meth:" "`asyncio.AbstractEventLoopPolicy.set_child_watcher` and :meth:`asyncio." @@ -1585,7 +1584,7 @@ msgid "" "removed in Python 3.14. (Contributed by Kumar Aditya in :gh:`94597`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1178 +#: ../../whatsnew/3.12.rst:1177 msgid "" "The :meth:`~asyncio.get_event_loop` method of the default event loop policy " "now emits a :exc:`DeprecationWarning` if there is no current event loop set " @@ -1593,14 +1592,14 @@ msgid "" "Rossum in :gh:`100160`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1183 +#: ../../whatsnew/3.12.rst:1182 msgid "" ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " "are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." "FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1187 +#: ../../whatsnew/3.12.rst:1186 msgid "" ":mod:`collections.abc`: Deprecated :class:`collections.abc.ByteString`. " "Prefer :class:`Sequence` or :class:`collections.abc.Buffer`. For use in " @@ -1608,7 +1607,7 @@ msgid "" "abc.Buffer`. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1192 +#: ../../whatsnew/3.12.rst:1191 msgid "" ":mod:`datetime`: :class:`datetime.datetime`'s :meth:`~datetime.datetime." "utcnow` and :meth:`~datetime.datetime.utcfromtimestamp` are deprecated and " @@ -1618,7 +1617,7 @@ msgid "" "set to :const:`datetime.UTC`. (Contributed by Paul Ganssle in :gh:`103857`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1200 +#: ../../whatsnew/3.12.rst:1199 msgid "" ":mod:`email`: Deprecate the *isdst* parameter in :func:`email.utils." "localtime`. (Contributed by Alan Williams in :gh:`72346`.)" @@ -1626,41 +1625,41 @@ msgstr "" ":mod:`email`:棄用 :func:`email.utils.localtime` 中的 *isdst* 參數。(由 " "Alan Williams 於 :gh:`72346` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1203 +#: ../../whatsnew/3.12.rst:1202 msgid "" ":mod:`importlib.abc`: Deprecated the following classes, scheduled for " "removal in Python 3.14:" msgstr ":mod:`importlib.abc`:棄用下列類別,預定於 Python 3.14 中移除:" -#: ../../whatsnew/3.12.rst:1206 ../../whatsnew/3.12.rst:1424 +#: ../../whatsnew/3.12.rst:1205 ../../whatsnew/3.12.rst:1423 msgid ":class:`!importlib.abc.ResourceReader`" msgstr ":class:`!importlib.abc.ResourceReader`" -#: ../../whatsnew/3.12.rst:1207 ../../whatsnew/3.12.rst:1425 +#: ../../whatsnew/3.12.rst:1206 ../../whatsnew/3.12.rst:1424 msgid ":class:`!importlib.abc.Traversable`" msgstr ":class:`!importlib.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1208 ../../whatsnew/3.12.rst:1426 +#: ../../whatsnew/3.12.rst:1207 ../../whatsnew/3.12.rst:1425 msgid ":class:`!importlib.abc.TraversableResources`" msgstr ":class:`!importlib.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1210 +#: ../../whatsnew/3.12.rst:1209 msgid "Use :mod:`importlib.resources.abc` classes instead:" msgstr "請改用 :mod:`importlib.resources.abc` 類別:" -#: ../../whatsnew/3.12.rst:1212 +#: ../../whatsnew/3.12.rst:1211 msgid ":class:`importlib.resources.abc.Traversable`" msgstr ":class:`importlib.resources.abc.Traversable`" -#: ../../whatsnew/3.12.rst:1213 +#: ../../whatsnew/3.12.rst:1212 msgid ":class:`importlib.resources.abc.TraversableResources`" msgstr ":class:`importlib.resources.abc.TraversableResources`" -#: ../../whatsnew/3.12.rst:1215 +#: ../../whatsnew/3.12.rst:1214 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "(由 Jason R. Coombs 和 Hugo van Kemenade 於 :gh:`93963` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1217 +#: ../../whatsnew/3.12.rst:1216 msgid "" ":mod:`itertools`: Deprecate the support for copy, deepcopy, and pickle " "operations, which is undocumented, inefficient, historically buggy, and " @@ -1669,7 +1668,7 @@ msgid "" "`101588`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1223 +#: ../../whatsnew/3.12.rst:1222 msgid "" ":mod:`multiprocessing`: In Python 3.14, the default :mod:`multiprocessing` " "start method will change to a safer one on Linux, BSDs, and other non-macOS " @@ -1681,14 +1680,14 @@ msgid "" "methods `." msgstr "" -#: ../../whatsnew/3.12.rst:1233 +#: ../../whatsnew/3.12.rst:1232 msgid "" ":mod:`pkgutil`: :func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` " "are deprecated and will be removed in Python 3.14; use :func:`importlib.util." "find_spec` instead. (Contributed by Nikita Sobolev in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1238 +#: ../../whatsnew/3.12.rst:1237 msgid "" ":mod:`pty`: The module has two undocumented ``master_open()`` and " "``slave_open()`` functions that have been deprecated since Python 2 but only " @@ -1696,11 +1695,11 @@ msgid "" "(Contributed by Soumendra Ganguly and Gregory P. Smith in :gh:`85984`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1243 +#: ../../whatsnew/3.12.rst:1242 msgid ":mod:`os`:" msgstr ":mod:`os`:" -#: ../../whatsnew/3.12.rst:1245 +#: ../../whatsnew/3.12.rst:1244 msgid "" "The ``st_ctime`` fields return by :func:`os.stat` and :func:`os.lstat` on " "Windows are deprecated. In a future release, they will contain the last " @@ -1709,7 +1708,7 @@ msgid "" "``st_birthtime`` field. (Contributed by Steve Dower in :gh:`99726`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1251 +#: ../../whatsnew/3.12.rst:1250 msgid "" "On POSIX platforms, :func:`os.fork` can now raise a :exc:" "`DeprecationWarning` when it can detect being called from a multithreaded " @@ -1722,14 +1721,14 @@ msgid "" "longstanding platform compatibility problem to developers." msgstr "" -#: ../../whatsnew/3.12.rst:1261 +#: ../../whatsnew/3.12.rst:1260 msgid "" "When this warning appears due to usage of :mod:`multiprocessing` or :mod:" "`concurrent.futures` the fix is to use a different :mod:`multiprocessing` " "start method such as ``\"spawn\"`` or ``\"forkserver\"``." msgstr "" -#: ../../whatsnew/3.12.rst:1265 +#: ../../whatsnew/3.12.rst:1264 msgid "" ":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree` is " "deprecated; use *onexc* instead. (Contributed by Irit Katriel in :gh:" @@ -1738,18 +1737,18 @@ msgstr "" ":mod:`shutil`::func:`shutil.rmtree` 的 *onerror* 引數已被棄用,請改用 " "*onexc*。(由 Irit Katriel 於 :gh:`102828` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1268 +#: ../../whatsnew/3.12.rst:1267 msgid ":mod:`sqlite3`:" msgstr ":mod:`sqlite3`:" -#: ../../whatsnew/3.12.rst:1270 +#: ../../whatsnew/3.12.rst:1269 msgid "" ":ref:`default adapters and converters ` are now " "deprecated. Instead, use the :ref:`sqlite3-adapter-converter-recipes` and " "tailor them to your needs. (Contributed by Erlend E. Aasland in :gh:`90016`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1276 +#: ../../whatsnew/3.12.rst:1275 msgid "" "In :meth:`~sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted " "when :ref:`named placeholders ` are used together with " @@ -1759,39 +1758,39 @@ msgid "" "Erlend E. Aasland in :gh:`101698`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1283 +#: ../../whatsnew/3.12.rst:1282 msgid "" ":mod:`sys`: The :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." "last_traceback` fields are deprecated. Use :data:`sys.last_exc` instead. " "(Contributed by Irit Katriel in :gh:`102778`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1287 +#: ../../whatsnew/3.12.rst:1286 msgid "" ":mod:`tarfile`: Extracting tar archives without specifying *filter* is " "deprecated until Python 3.14, when ``'data'`` filter will become the " "default. See :ref:`tarfile-extraction-filter` for details." msgstr "" -#: ../../whatsnew/3.12.rst:1291 +#: ../../whatsnew/3.12.rst:1290 msgid ":mod:`typing`:" msgstr ":mod:`typing`:" -#: ../../whatsnew/3.12.rst:1293 +#: ../../whatsnew/3.12.rst:1292 msgid "" ":class:`typing.Hashable` and :class:`typing.Sized`, aliases for :class:" "`collections.abc.Hashable` and :class:`collections.abc.Sized` respectively, " "are deprecated. (:gh:`94309`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1297 +#: ../../whatsnew/3.12.rst:1296 msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, now causes a :exc:" "`DeprecationWarning` to be emitted when it is used. (Contributed by Alex " "Waygood in :gh:`91896`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1301 +#: ../../whatsnew/3.12.rst:1300 msgid "" ":mod:`xml.etree.ElementTree`: The module now emits :exc:`DeprecationWarning` " "when testing the truth value of an :class:`xml.etree.ElementTree.Element`. " @@ -1799,7 +1798,7 @@ msgid "" "implementation emitted nothing. (Contributed by Jacob Walls in :gh:`83122`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1307 +#: ../../whatsnew/3.12.rst:1306 msgid "" "The 3-arg signatures (type, value, traceback) of :meth:`coroutine throw() " "`, :meth:`generator throw() ` and :meth:" @@ -1808,21 +1807,21 @@ msgid "" "instead. (Contributed by Ofey Chan in :gh:`89874`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1313 +#: ../../whatsnew/3.12.rst:1312 msgid "" ":exc:`DeprecationWarning` is now raised when ``__package__`` on a module " "differs from ``__spec__.parent`` (previously it was :exc:`ImportWarning`). " "(Contributed by Brett Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1318 +#: ../../whatsnew/3.12.rst:1317 msgid "" "Setting ``__package__`` or ``__cached__`` on a module is deprecated, and " "will cease to be set or taken into consideration by the import system in " "Python 3.14. (Contributed by Brett Cannon in :gh:`65961`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1322 +#: ../../whatsnew/3.12.rst:1321 msgid "" "The bitwise inversion operator (``~``) on bool is deprecated. It will throw " "an error in Python 3.14. Use ``not`` for logical negation of bools instead. " @@ -1831,7 +1830,7 @@ msgid "" "Tim Hoffmann in :gh:`103487`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1328 +#: ../../whatsnew/3.12.rst:1327 msgid "" "Accessing :attr:`~codeobject.co_lnotab` on code objects was deprecated in " "Python 3.10 via :pep:`626`, but it only got a proper :exc:" @@ -1839,328 +1838,328 @@ msgid "" "(Contributed by Nikita Sobolev in :gh:`101866`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1335 +#: ../../whatsnew/3.12.rst:1334 msgid "Pending Removal in Python 3.13" msgstr "Python 3.13 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1337 +#: ../../whatsnew/3.12.rst:1336 msgid "" "The following modules and APIs have been deprecated in earlier Python " "releases, and will be removed in Python 3.13." msgstr "" -#: ../../whatsnew/3.12.rst:1340 +#: ../../whatsnew/3.12.rst:1339 msgid "Modules (see :pep:`594`):" msgstr "" -#: ../../whatsnew/3.12.rst:1342 +#: ../../whatsnew/3.12.rst:1341 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.12.rst:1343 +#: ../../whatsnew/3.12.rst:1342 msgid ":mod:`audioop`" msgstr ":mod:`audioop`" -#: ../../whatsnew/3.12.rst:1344 +#: ../../whatsnew/3.12.rst:1343 msgid ":mod:`cgi`" msgstr ":mod:`cgi`" -#: ../../whatsnew/3.12.rst:1345 +#: ../../whatsnew/3.12.rst:1344 msgid ":mod:`cgitb`" msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.12.rst:1346 +#: ../../whatsnew/3.12.rst:1345 msgid ":mod:`chunk`" msgstr ":mod:`chunk`" -#: ../../whatsnew/3.12.rst:1347 +#: ../../whatsnew/3.12.rst:1346 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.12.rst:1348 +#: ../../whatsnew/3.12.rst:1347 msgid ":mod:`imghdr`" msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.12.rst:1349 +#: ../../whatsnew/3.12.rst:1348 msgid ":mod:`mailcap`" msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.12.rst:1350 +#: ../../whatsnew/3.12.rst:1349 msgid ":mod:`msilib`" msgstr ":mod:`msilib`" -#: ../../whatsnew/3.12.rst:1351 +#: ../../whatsnew/3.12.rst:1350 msgid ":mod:`nis`" msgstr ":mod:`nis`" -#: ../../whatsnew/3.12.rst:1352 +#: ../../whatsnew/3.12.rst:1351 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.12.rst:1353 +#: ../../whatsnew/3.12.rst:1352 msgid ":mod:`ossaudiodev`" msgstr ":mod:`ossaudiodev`" -#: ../../whatsnew/3.12.rst:1354 +#: ../../whatsnew/3.12.rst:1353 msgid ":mod:`pipes`" msgstr ":mod:`pipes`" -#: ../../whatsnew/3.12.rst:1355 +#: ../../whatsnew/3.12.rst:1354 msgid ":mod:`sndhdr`" msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.12.rst:1356 +#: ../../whatsnew/3.12.rst:1355 msgid ":mod:`spwd`" msgstr ":mod:`spwd`" -#: ../../whatsnew/3.12.rst:1357 +#: ../../whatsnew/3.12.rst:1356 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.12.rst:1358 +#: ../../whatsnew/3.12.rst:1357 msgid ":mod:`telnetlib`" msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.12.rst:1359 +#: ../../whatsnew/3.12.rst:1358 msgid ":mod:`uu`" msgstr ":mod:`uu`" -#: ../../whatsnew/3.12.rst:1360 +#: ../../whatsnew/3.12.rst:1359 msgid ":mod:`xdrlib`" msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.12.rst:1362 +#: ../../whatsnew/3.12.rst:1361 msgid "Other modules:" msgstr "其他模組:" -#: ../../whatsnew/3.12.rst:1364 +#: ../../whatsnew/3.12.rst:1363 msgid ":mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)" msgstr ":mod:`!lib2to3` 以及 :program:`2to3` 程式 (:gh:`84540`)" -#: ../../whatsnew/3.12.rst:1366 ../../whatsnew/3.12.rst:1456 +#: ../../whatsnew/3.12.rst:1365 ../../whatsnew/3.12.rst:1455 msgid "APIs:" msgstr "API:" -#: ../../whatsnew/3.12.rst:1368 +#: ../../whatsnew/3.12.rst:1367 msgid ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" msgstr ":class:`!configparser.LegacyInterpolation` (:gh:`90765`)" -#: ../../whatsnew/3.12.rst:1369 +#: ../../whatsnew/3.12.rst:1368 msgid "``locale.resetlocale()`` (:gh:`90817`)" msgstr "``locale.resetlocale()`` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1370 +#: ../../whatsnew/3.12.rst:1369 msgid ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" msgstr ":meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1371 +#: ../../whatsnew/3.12.rst:1370 msgid ":func:`!unittest.findTestCases` (:gh:`50096`)" msgstr ":func:`!unittest.findTestCases` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1372 +#: ../../whatsnew/3.12.rst:1371 msgid ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" msgstr ":func:`!unittest.getTestCaseNames` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1373 +#: ../../whatsnew/3.12.rst:1372 msgid ":func:`!unittest.makeSuite` (:gh:`50096`)" msgstr ":func:`!unittest.makeSuite` (:gh:`50096`)" -#: ../../whatsnew/3.12.rst:1374 +#: ../../whatsnew/3.12.rst:1373 msgid ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" msgstr ":meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)" -#: ../../whatsnew/3.12.rst:1375 +#: ../../whatsnew/3.12.rst:1374 msgid ":class:`!webbrowser.MacOSX` (:gh:`86421`)" msgstr ":class:`!webbrowser.MacOSX` (:gh:`86421`)" -#: ../../whatsnew/3.12.rst:1376 +#: ../../whatsnew/3.12.rst:1375 msgid ":class:`classmethod` descriptor chaining (:gh:`89519`)" msgstr ":class:`classmethod` 描述器鏈結 (:gh:`89519`)" -#: ../../whatsnew/3.12.rst:1377 +#: ../../whatsnew/3.12.rst:1376 msgid ":mod:`importlib.resources` deprecated methods:" msgstr ":mod:`importlib.resources` 中被棄用的方法:" -#: ../../whatsnew/3.12.rst:1379 +#: ../../whatsnew/3.12.rst:1378 msgid "``contents()``" msgstr "``contents()``" -#: ../../whatsnew/3.12.rst:1380 +#: ../../whatsnew/3.12.rst:1379 msgid "``is_resource()``" msgstr "``is_resource()``" -#: ../../whatsnew/3.12.rst:1381 +#: ../../whatsnew/3.12.rst:1380 msgid "``open_binary()``" msgstr "``open_binary()``" -#: ../../whatsnew/3.12.rst:1382 +#: ../../whatsnew/3.12.rst:1381 msgid "``open_text()``" msgstr "``open_text()``" -#: ../../whatsnew/3.12.rst:1383 +#: ../../whatsnew/3.12.rst:1382 msgid "``path()``" msgstr "``path()``" -#: ../../whatsnew/3.12.rst:1384 +#: ../../whatsnew/3.12.rst:1383 msgid "``read_binary()``" msgstr "``read_binary()``" -#: ../../whatsnew/3.12.rst:1385 +#: ../../whatsnew/3.12.rst:1384 msgid "``read_text()``" msgstr "``read_text()``" -#: ../../whatsnew/3.12.rst:1387 +#: ../../whatsnew/3.12.rst:1386 msgid "" "Use :func:`importlib.resources.files()` instead. Refer to `importlib-" "resources: Migrating from Legacy `_ (:gh:`106531`)" msgstr "" -#: ../../whatsnew/3.12.rst:1391 ../../whatsnew/3.12.rst:2352 +#: ../../whatsnew/3.12.rst:1390 ../../whatsnew/3.12.rst:2351 msgid "Pending Removal in Python 3.14" msgstr "Python 3.14 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1393 +#: ../../whatsnew/3.12.rst:1392 msgid "" "The following APIs have been deprecated and will be removed in Python 3.14." msgstr "以下 API 已被棄用並將在 Python 3.14 中移除。" -#: ../../whatsnew/3.12.rst:1396 +#: ../../whatsnew/3.12.rst:1395 msgid "" ":mod:`argparse`: The *type*, *choices*, and *metavar* parameters of :class:`!" "argparse.BooleanOptionalAction`" msgstr "" -#: ../../whatsnew/3.12.rst:1399 +#: ../../whatsnew/3.12.rst:1398 msgid ":mod:`ast`:" msgstr ":mod:`ast`:" -#: ../../whatsnew/3.12.rst:1409 +#: ../../whatsnew/3.12.rst:1408 msgid ":class:`!asyncio.MultiLoopChildWatcher`" msgstr ":class:`!asyncio.MultiLoopChildWatcher`" -#: ../../whatsnew/3.12.rst:1410 +#: ../../whatsnew/3.12.rst:1409 msgid ":class:`!asyncio.FastChildWatcher`" msgstr ":class:`!asyncio.FastChildWatcher`" -#: ../../whatsnew/3.12.rst:1411 +#: ../../whatsnew/3.12.rst:1410 msgid ":class:`!asyncio.AbstractChildWatcher`" msgstr ":class:`!asyncio.AbstractChildWatcher`" -#: ../../whatsnew/3.12.rst:1412 +#: ../../whatsnew/3.12.rst:1411 msgid ":class:`!asyncio.SafeChildWatcher`" msgstr ":class:`!asyncio.SafeChildWatcher`" -#: ../../whatsnew/3.12.rst:1413 +#: ../../whatsnew/3.12.rst:1412 msgid ":func:`!asyncio.set_child_watcher`" msgstr ":func:`!asyncio.set_child_watcher`" -#: ../../whatsnew/3.12.rst:1414 +#: ../../whatsnew/3.12.rst:1413 msgid ":func:`!asyncio.get_child_watcher`," msgstr ":func:`!asyncio.get_child_watcher`、" -#: ../../whatsnew/3.12.rst:1415 +#: ../../whatsnew/3.12.rst:1414 msgid ":meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher`" msgstr ":meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher`" -#: ../../whatsnew/3.12.rst:1416 +#: ../../whatsnew/3.12.rst:1415 msgid ":meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher`" msgstr ":meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher`" -#: ../../whatsnew/3.12.rst:1418 +#: ../../whatsnew/3.12.rst:1417 msgid ":mod:`collections.abc`: :class:`!collections.abc.ByteString`." msgstr ":mod:`collections.abc`: :class:`!collections.abc.ByteString`。" -#: ../../whatsnew/3.12.rst:1420 +#: ../../whatsnew/3.12.rst:1419 msgid ":mod:`email`: the *isdst* parameter in :func:`email.utils.localtime`." msgstr "" -#: ../../whatsnew/3.12.rst:1422 +#: ../../whatsnew/3.12.rst:1421 msgid ":mod:`importlib.abc`:" msgstr ":mod:`importlib.abc`:" -#: ../../whatsnew/3.12.rst:1428 +#: ../../whatsnew/3.12.rst:1427 msgid ":mod:`itertools`: Support for copy, deepcopy, and pickle operations." msgstr "" -#: ../../whatsnew/3.12.rst:1430 +#: ../../whatsnew/3.12.rst:1429 msgid ":mod:`pkgutil`:" msgstr ":mod:`pkgutil`:" -#: ../../whatsnew/3.12.rst:1432 +#: ../../whatsnew/3.12.rst:1431 msgid ":func:`!pkgutil.find_loader`" msgstr ":func:`!pkgutil.find_loader`" -#: ../../whatsnew/3.12.rst:1433 +#: ../../whatsnew/3.12.rst:1432 msgid ":func:`!pkgutil.get_loader`." msgstr ":func:`!pkgutil.get_loader`。" -#: ../../whatsnew/3.12.rst:1435 +#: ../../whatsnew/3.12.rst:1434 msgid ":mod:`pty`:" msgstr ":mod:`pty`:" -#: ../../whatsnew/3.12.rst:1437 +#: ../../whatsnew/3.12.rst:1436 msgid ":func:`!pty.master_open`" msgstr ":func:`!pty.master_open`" -#: ../../whatsnew/3.12.rst:1438 +#: ../../whatsnew/3.12.rst:1437 msgid ":func:`!pty.slave_open`" msgstr ":func:`!pty.slave_open`" -#: ../../whatsnew/3.12.rst:1440 +#: ../../whatsnew/3.12.rst:1439 msgid ":mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree`" msgstr ":mod:`shutil`::func:`shutil.rmtree` 的 *onerror* 引數" -#: ../../whatsnew/3.12.rst:1442 +#: ../../whatsnew/3.12.rst:1441 msgid ":mod:`typing`: :class:`!typing.ByteString`" msgstr ":mod:`typing`::class:`!typing.ByteString`" -#: ../../whatsnew/3.12.rst:1444 +#: ../../whatsnew/3.12.rst:1443 msgid "" ":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`xml." "etree.ElementTree.Element`." msgstr "" -#: ../../whatsnew/3.12.rst:1446 +#: ../../whatsnew/3.12.rst:1445 msgid "The ``__package__`` and ``__cached__`` attributes on module objects." msgstr "" -#: ../../whatsnew/3.12.rst:1448 +#: ../../whatsnew/3.12.rst:1447 msgid "The :attr:`~codeobject.co_lnotab` attribute of code objects." msgstr "" -#: ../../whatsnew/3.12.rst:1451 ../../whatsnew/3.12.rst:2389 +#: ../../whatsnew/3.12.rst:1450 ../../whatsnew/3.12.rst:2388 msgid "Pending Removal in Python 3.15" msgstr "Python 3.15 中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1453 +#: ../../whatsnew/3.12.rst:1452 msgid "" "The following APIs have been deprecated and will be removed in Python 3.15." msgstr "" -#: ../../whatsnew/3.12.rst:1458 +#: ../../whatsnew/3.12.rst:1457 msgid ":func:`locale.getdefaultlocale` (:gh:`90817`)" msgstr ":func:`locale.getdefaultlocale` (:gh:`90817`)" -#: ../../whatsnew/3.12.rst:1462 ../../whatsnew/3.12.rst:2407 +#: ../../whatsnew/3.12.rst:1461 ../../whatsnew/3.12.rst:2406 msgid "Pending Removal in Future Versions" msgstr "未來版本中待決議的移除項目" -#: ../../whatsnew/3.12.rst:1464 +#: ../../whatsnew/3.12.rst:1463 msgid "" "The following APIs were deprecated in earlier Python versions and will be " "removed, although there is currently no date scheduled for their removal." msgstr "" -#: ../../whatsnew/3.12.rst:1467 +#: ../../whatsnew/3.12.rst:1466 msgid ":mod:`array`'s ``'u'`` format code (:gh:`57281`)" msgstr "" -#: ../../whatsnew/3.12.rst:1469 +#: ../../whatsnew/3.12.rst:1468 msgid ":class:`typing.Text` (:gh:`92332`)" msgstr ":class:`typing.Text` (:gh:`92332`)" -#: ../../whatsnew/3.12.rst:1471 +#: ../../whatsnew/3.12.rst:1470 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " @@ -2172,54 +2171,54 @@ msgid "" "syntax error. (:gh:`87999`)" msgstr "" -#: ../../whatsnew/3.12.rst:1482 ../../whatsnew/3.12.rst:2439 +#: ../../whatsnew/3.12.rst:1481 ../../whatsnew/3.12.rst:2438 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.12.rst:1485 +#: ../../whatsnew/3.12.rst:1484 msgid "asynchat and asyncore" msgstr "asynchat 和 asyncore" -#: ../../whatsnew/3.12.rst:1487 +#: ../../whatsnew/3.12.rst:1486 msgid "" "These two modules have been removed according to the schedule in :pep:`594`, " "having been deprecated in Python 3.6. Use :mod:`asyncio` instead. " "(Contributed by Nikita Sobolev in :gh:`96580`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1494 +#: ../../whatsnew/3.12.rst:1493 msgid "configparser" msgstr "configparser" -#: ../../whatsnew/3.12.rst:1496 +#: ../../whatsnew/3.12.rst:1495 msgid "" "Several names deprecated in the :mod:`configparser` way back in 3.2 have " "been removed per :gh:`89336`:" msgstr "" -#: ../../whatsnew/3.12.rst:1499 +#: ../../whatsnew/3.12.rst:1498 msgid "" ":class:`configparser.ParsingError` no longer has a ``filename`` attribute or " "argument. Use the ``source`` attribute and argument instead." msgstr "" -#: ../../whatsnew/3.12.rst:1501 +#: ../../whatsnew/3.12.rst:1500 msgid "" ":mod:`configparser` no longer has a ``SafeConfigParser`` class. Use the " "shorter :class:`~configparser.ConfigParser` name instead." msgstr "" -#: ../../whatsnew/3.12.rst:1503 +#: ../../whatsnew/3.12.rst:1502 msgid "" ":class:`configparser.ConfigParser` no longer has a ``readfp`` method. Use :" "meth:`~configparser.ConfigParser.read_file` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1507 +#: ../../whatsnew/3.12.rst:1506 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.12.rst:1509 +#: ../../whatsnew/3.12.rst:1508 msgid "" "Remove the :py:mod:`!distutils` package. It was deprecated in Python 3.10 " "by :pep:`632` \"Deprecate distutils module\". For projects still using " @@ -2228,17 +2227,17 @@ msgid "" "Victor Stinner in :gh:`92584`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1516 +#: ../../whatsnew/3.12.rst:1515 msgid "ensurepip" msgstr "ensurepip" -#: ../../whatsnew/3.12.rst:1518 +#: ../../whatsnew/3.12.rst:1517 msgid "" "Remove the bundled setuptools wheel from :mod:`ensurepip`, and stop " "installing setuptools in environments created by :mod:`venv`." msgstr "" -#: ../../whatsnew/3.12.rst:1521 +#: ../../whatsnew/3.12.rst:1520 msgid "" "``pip (>= 22.1)`` does not require setuptools to be installed in the " "environment. ``setuptools``-based (and ``distutils``-based) packages can " @@ -2246,7 +2245,7 @@ msgid "" "the build environment it uses for building a package." msgstr "" -#: ../../whatsnew/3.12.rst:1527 +#: ../../whatsnew/3.12.rst:1526 msgid "" "``easy_install``, ``pkg_resources``, ``setuptools`` and ``distutils`` are no " "longer provided by default in environments created with ``venv`` or " @@ -2256,25 +2255,25 @@ msgid "" "(typically, using pip)." msgstr "" -#: ../../whatsnew/3.12.rst:1534 +#: ../../whatsnew/3.12.rst:1533 msgid "(Contributed by Pradyun Gedam in :gh:`95299`.)" msgstr "(由 Pradyun Gedam 於 :gh:`95299` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1537 +#: ../../whatsnew/3.12.rst:1536 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.12.rst:1539 +#: ../../whatsnew/3.12.rst:1538 msgid "" "Remove :mod:`enum`'s ``EnumMeta.__getattr__``, which is no longer needed for " "enum attribute access. (Contributed by Ethan Furman in :gh:`95083`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1544 +#: ../../whatsnew/3.12.rst:1543 msgid "ftplib" msgstr "ftplib" -#: ../../whatsnew/3.12.rst:1546 +#: ../../whatsnew/3.12.rst:1545 msgid "" "Remove :mod:`ftplib`'s ``FTP_TLS.ssl_version`` class attribute: use the " "*context* parameter instead. (Contributed by Victor Stinner in :gh:`94172`.)" @@ -2282,11 +2281,11 @@ msgstr "" "移除 :mod:`ftplib` 的 ``FTP_TLS.ssl_version`` 類別屬性:請改用 *context* 參" "數。(由 Victor Stinner 於 :gh:`94172` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1551 +#: ../../whatsnew/3.12.rst:1550 msgid "gzip" msgstr "gzip" -#: ../../whatsnew/3.12.rst:1553 +#: ../../whatsnew/3.12.rst:1552 msgid "" "Remove the ``filename`` attribute of :mod:`gzip`'s :class:`gzip.GzipFile`, " "deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute " @@ -2295,11 +2294,11 @@ msgid "" "`94196`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1560 +#: ../../whatsnew/3.12.rst:1559 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.12.rst:1562 +#: ../../whatsnew/3.12.rst:1561 msgid "" "Remove the pure Python implementation of :mod:`hashlib`'s :func:`hashlib." "pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and newer requires " @@ -2308,180 +2307,180 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1569 ../../whatsnew/3.12.rst:1596 +#: ../../whatsnew/3.12.rst:1568 ../../whatsnew/3.12.rst:1595 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.12.rst:1571 +#: ../../whatsnew/3.12.rst:1570 msgid "" "Many previously deprecated cleanups in :mod:`importlib` have now been " "completed:" msgstr "" -#: ../../whatsnew/3.12.rst:1574 +#: ../../whatsnew/3.12.rst:1573 msgid "" "References to, and support for :meth:`!module_repr()` has been removed. " "(Contributed by Barry Warsaw in :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1577 +#: ../../whatsnew/3.12.rst:1576 msgid "" "``importlib.util.set_package``, ``importlib.util.set_loader`` and " "``importlib.util.module_for_loader`` have all been removed. (Contributed by " "Brett Cannon and Nikita Sobolev in :gh:`65961` and :gh:`97850`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1581 +#: ../../whatsnew/3.12.rst:1580 msgid "" "Support for ``find_loader()`` and ``find_module()`` APIs have been removed. " "(Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1584 +#: ../../whatsnew/3.12.rst:1583 msgid "" "``importlib.abc.Finder``, ``pkgutil.ImpImporter``, and ``pkgutil.ImpLoader`` " "have been removed. (Contributed by Barry Warsaw in :gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1588 ../../whatsnew/3.12.rst:1596 +#: ../../whatsnew/3.12.rst:1587 ../../whatsnew/3.12.rst:1595 msgid "imp" msgstr "imp" -#: ../../whatsnew/3.12.rst:1590 +#: ../../whatsnew/3.12.rst:1589 msgid "" "The :mod:`!imp` module has been removed. (Contributed by Barry Warsaw in :" "gh:`98040`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1593 +#: ../../whatsnew/3.12.rst:1592 msgid "To migrate, consult the following correspondence table:" msgstr "" -#: ../../whatsnew/3.12.rst:1598 +#: ../../whatsnew/3.12.rst:1597 msgid "``imp.NullImporter``" msgstr "``imp.NullImporter``" -#: ../../whatsnew/3.12.rst:1598 +#: ../../whatsnew/3.12.rst:1597 msgid "Insert ``None`` into ``sys.path_importer_cache``" msgstr "將 ``None`` 插入 ``sys.path_importer_cache``" -#: ../../whatsnew/3.12.rst:1599 +#: ../../whatsnew/3.12.rst:1598 msgid "``imp.cache_from_source()``" msgstr "``imp.cache_from_source()``" -#: ../../whatsnew/3.12.rst:1599 +#: ../../whatsnew/3.12.rst:1598 msgid ":func:`importlib.util.cache_from_source`" msgstr ":func:`importlib.util.cache_from_source`" -#: ../../whatsnew/3.12.rst:1600 +#: ../../whatsnew/3.12.rst:1599 msgid "``imp.find_module()``" msgstr "``imp.find_module()``" -#: ../../whatsnew/3.12.rst:1600 +#: ../../whatsnew/3.12.rst:1599 msgid ":func:`importlib.util.find_spec`" msgstr ":func:`importlib.util.find_spec`" -#: ../../whatsnew/3.12.rst:1601 +#: ../../whatsnew/3.12.rst:1600 msgid "``imp.get_magic()``" msgstr "``imp.get_magic()``" -#: ../../whatsnew/3.12.rst:1601 +#: ../../whatsnew/3.12.rst:1600 msgid ":attr:`importlib.util.MAGIC_NUMBER`" msgstr ":attr:`importlib.util.MAGIC_NUMBER`" -#: ../../whatsnew/3.12.rst:1602 +#: ../../whatsnew/3.12.rst:1601 msgid "``imp.get_suffixes()``" msgstr "``imp.get_suffixes()``" -#: ../../whatsnew/3.12.rst:1602 +#: ../../whatsnew/3.12.rst:1601 msgid "" ":attr:`importlib.machinery.SOURCE_SUFFIXES`, :attr:`importlib.machinery." "EXTENSION_SUFFIXES`, and :attr:`importlib.machinery.BYTECODE_SUFFIXES`" msgstr "" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1602 msgid "``imp.get_tag()``" msgstr "``imp.get_tag()``" -#: ../../whatsnew/3.12.rst:1603 +#: ../../whatsnew/3.12.rst:1602 msgid ":attr:`sys.implementation.cache_tag `" msgstr ":attr:`sys.implementation.cache_tag `" -#: ../../whatsnew/3.12.rst:1604 +#: ../../whatsnew/3.12.rst:1603 msgid "``imp.load_module()``" msgstr "``imp.load_module()``" -#: ../../whatsnew/3.12.rst:1604 +#: ../../whatsnew/3.12.rst:1603 msgid ":func:`importlib.import_module`" msgstr ":func:`importlib.import_module`" -#: ../../whatsnew/3.12.rst:1605 +#: ../../whatsnew/3.12.rst:1604 msgid "``imp.new_module(name)``" msgstr "``imp.new_module(name)``" -#: ../../whatsnew/3.12.rst:1605 +#: ../../whatsnew/3.12.rst:1604 msgid "``types.ModuleType(name)``" msgstr "``types.ModuleType(name)``" -#: ../../whatsnew/3.12.rst:1606 +#: ../../whatsnew/3.12.rst:1605 msgid "``imp.reload()``" msgstr "``imp.reload()``" -#: ../../whatsnew/3.12.rst:1606 +#: ../../whatsnew/3.12.rst:1605 msgid ":func:`importlib.reload`" msgstr ":func:`importlib.reload`" -#: ../../whatsnew/3.12.rst:1607 +#: ../../whatsnew/3.12.rst:1606 msgid "``imp.source_from_cache()``" msgstr "``imp.source_from_cache()``" -#: ../../whatsnew/3.12.rst:1607 +#: ../../whatsnew/3.12.rst:1606 msgid ":func:`importlib.util.source_from_cache`" msgstr ":func:`importlib.util.source_from_cache`" -#: ../../whatsnew/3.12.rst:1608 +#: ../../whatsnew/3.12.rst:1607 msgid "``imp.load_source()``" msgstr "``imp.load_source()``" -#: ../../whatsnew/3.12.rst:1608 +#: ../../whatsnew/3.12.rst:1607 msgid "*See below*" msgstr "" -#: ../../whatsnew/3.12.rst:1611 +#: ../../whatsnew/3.12.rst:1610 msgid "Replace ``imp.load_source()`` with::" msgstr "" -#: ../../whatsnew/3.12.rst:1626 +#: ../../whatsnew/3.12.rst:1625 msgid "Remove :mod:`!imp` functions and attributes with no replacements:" msgstr "" -#: ../../whatsnew/3.12.rst:1628 +#: ../../whatsnew/3.12.rst:1627 msgid "Undocumented functions:" msgstr "未以文件記錄的函式:" -#: ../../whatsnew/3.12.rst:1630 +#: ../../whatsnew/3.12.rst:1629 msgid "``imp.init_builtin()``" msgstr "``imp.init_builtin()``" -#: ../../whatsnew/3.12.rst:1631 +#: ../../whatsnew/3.12.rst:1630 msgid "``imp.load_compiled()``" msgstr "``imp.load_compiled()``" -#: ../../whatsnew/3.12.rst:1632 +#: ../../whatsnew/3.12.rst:1631 msgid "``imp.load_dynamic()``" msgstr "``imp.load_dynamic()``" -#: ../../whatsnew/3.12.rst:1633 +#: ../../whatsnew/3.12.rst:1632 msgid "``imp.load_package()``" msgstr "``imp.load_package()``" -#: ../../whatsnew/3.12.rst:1635 +#: ../../whatsnew/3.12.rst:1634 msgid "" "``imp.lock_held()``, ``imp.acquire_lock()``, ``imp.release_lock()``: the " "locking scheme has changed in Python 3.3 to per-module locks." msgstr "" -#: ../../whatsnew/3.12.rst:1637 +#: ../../whatsnew/3.12.rst:1636 msgid "" "``imp.find_module()`` constants: ``SEARCH_ERROR``, ``PY_SOURCE``, " "``PY_COMPILED``, ``C_EXTENSION``, ``PY_RESOURCE``, ``PKG_DIRECTORY``, " @@ -2491,11 +2490,11 @@ msgstr "" "``PY_COMPILED``、``C_EXTENSION``、``PY_RESOURCE``、``PKG_DIRECTORY``、" "``C_BUILTIN``、``PY_FROZEN``、``PY_CODERESOURCE``、``IMP_HOOK``。" -#: ../../whatsnew/3.12.rst:1642 +#: ../../whatsnew/3.12.rst:1641 msgid "io" msgstr "io" -#: ../../whatsnew/3.12.rst:1644 +#: ../../whatsnew/3.12.rst:1643 msgid "" "Remove :mod:`io`'s ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated " "in Python 3.10: just use :func:`open` instead. The :func:`open` (:func:`io." @@ -2504,22 +2503,22 @@ msgid "" "`94169`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1651 +#: ../../whatsnew/3.12.rst:1650 msgid "locale" msgstr "locale" -#: ../../whatsnew/3.12.rst:1653 +#: ../../whatsnew/3.12.rst:1652 msgid "" "Remove :mod:`locale`'s :func:`!locale.format` function, deprecated in Python " "3.7: use :func:`locale.format_string` instead. (Contributed by Victor " "Stinner in :gh:`94226`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1658 +#: ../../whatsnew/3.12.rst:1657 msgid "smtpd" msgstr "smtpd" -#: ../../whatsnew/3.12.rst:1660 +#: ../../whatsnew/3.12.rst:1659 msgid "" "The ``smtpd`` module has been removed according to the schedule in :pep:" "`594`, having been deprecated in Python 3.4.7 and 3.5.4. Use the :pypi:" @@ -2527,27 +2526,27 @@ msgid "" "(Contributed by Oleg Iarygin in :gh:`93243`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1669 +#: ../../whatsnew/3.12.rst:1668 msgid "" "The following undocumented :mod:`sqlite3` features, deprecated in Python " "3.10, are now removed:" msgstr "" -#: ../../whatsnew/3.12.rst:1672 +#: ../../whatsnew/3.12.rst:1671 msgid "``sqlite3.enable_shared_cache()``" msgstr "``sqlite3.enable_shared_cache()``" -#: ../../whatsnew/3.12.rst:1673 +#: ../../whatsnew/3.12.rst:1672 msgid "``sqlite3.OptimizedUnicode``" msgstr "``sqlite3.OptimizedUnicode``" -#: ../../whatsnew/3.12.rst:1675 +#: ../../whatsnew/3.12.rst:1674 msgid "" "If a shared cache must be used, open the database in URI mode using the " "``cache=shared`` query parameter." msgstr "" -#: ../../whatsnew/3.12.rst:1678 +#: ../../whatsnew/3.12.rst:1677 msgid "" "The ``sqlite3.OptimizedUnicode`` text factory has been an alias for :class:" "`str` since Python 3.3. Code that previously set the text factory to " @@ -2555,22 +2554,22 @@ msgid "" "default value which is also ``str``." msgstr "" -#: ../../whatsnew/3.12.rst:1683 +#: ../../whatsnew/3.12.rst:1682 msgid "(Contributed by Erlend E. Aasland in :gh:`92548`.)" msgstr "(由 Erlend E. Aasland 於 :gh:`92548` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1686 +#: ../../whatsnew/3.12.rst:1685 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.12.rst:1688 +#: ../../whatsnew/3.12.rst:1687 msgid "" "Remove :mod:`ssl`'s :func:`!ssl.RAND_pseudo_bytes` function, deprecated in " "Python 3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. " "(Contributed by Victor Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1692 +#: ../../whatsnew/3.12.rst:1691 msgid "" "Remove the :func:`!ssl.match_hostname` function. It was deprecated in Python " "3.7. OpenSSL performs hostname matching since Python 3.7, Python no longer " @@ -2578,7 +2577,7 @@ msgid "" "Stinner in :gh:`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1698 +#: ../../whatsnew/3.12.rst:1697 msgid "" "Remove the :func:`!ssl.wrap_socket` function, deprecated in Python 3.7: " "instead, create a :class:`ssl.SSLContext` object and call its :class:`ssl." @@ -2589,189 +2588,189 @@ msgid "" "`94199`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1709 +#: ../../whatsnew/3.12.rst:1708 msgid "Remove many long-deprecated :mod:`unittest` features:" msgstr "移除許多 :mod:`unittest` 中被棄用已久的功能:" -#: ../../whatsnew/3.12.rst:1713 +#: ../../whatsnew/3.12.rst:1712 msgid "A number of :class:`~unittest.TestCase` method aliases:" msgstr "" -#: ../../whatsnew/3.12.rst:1716 +#: ../../whatsnew/3.12.rst:1715 msgid "Deprecated alias" msgstr "已棄用的別名" -#: ../../whatsnew/3.12.rst:1716 +#: ../../whatsnew/3.12.rst:1715 msgid "Method Name" msgstr "方法名稱" -#: ../../whatsnew/3.12.rst:1716 +#: ../../whatsnew/3.12.rst:1715 msgid "Deprecated in" msgstr "" -#: ../../whatsnew/3.12.rst:1718 +#: ../../whatsnew/3.12.rst:1717 msgid "``failUnless``" msgstr "``failUnless``" -#: ../../whatsnew/3.12.rst:1718 ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1717 ../../whatsnew/3.12.rst:1724 msgid ":meth:`.assertTrue`" msgstr ":meth:`.assertTrue`" -#: ../../whatsnew/3.12.rst:1718 ../../whatsnew/3.12.rst:1719 -#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1721 -#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1723 -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1717 ../../whatsnew/3.12.rst:1718 +#: ../../whatsnew/3.12.rst:1719 ../../whatsnew/3.12.rst:1720 +#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1722 +#: ../../whatsnew/3.12.rst:1723 msgid "3.1" msgstr "3.1" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1718 msgid "``failIf``" msgstr "``failIf``" -#: ../../whatsnew/3.12.rst:1719 +#: ../../whatsnew/3.12.rst:1718 msgid ":meth:`.assertFalse`" msgstr ":meth:`.assertFalse`" -#: ../../whatsnew/3.12.rst:1720 +#: ../../whatsnew/3.12.rst:1719 msgid "``failUnlessEqual``" msgstr "``failUnlessEqual``" -#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1719 ../../whatsnew/3.12.rst:1725 msgid ":meth:`.assertEqual`" msgstr ":meth:`.assertEqual`" -#: ../../whatsnew/3.12.rst:1721 +#: ../../whatsnew/3.12.rst:1720 msgid "``failIfEqual``" msgstr "``failIfEqual``" -#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1720 ../../whatsnew/3.12.rst:1726 msgid ":meth:`.assertNotEqual`" msgstr ":meth:`.assertNotEqual`" -#: ../../whatsnew/3.12.rst:1722 +#: ../../whatsnew/3.12.rst:1721 msgid "``failUnlessAlmostEqual``" msgstr "``failUnlessAlmostEqual``" -#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1721 ../../whatsnew/3.12.rst:1727 msgid ":meth:`.assertAlmostEqual`" msgstr ":meth:`.assertAlmostEqual`" -#: ../../whatsnew/3.12.rst:1723 +#: ../../whatsnew/3.12.rst:1722 msgid "``failIfAlmostEqual``" msgstr "``failIfAlmostEqual``" -#: ../../whatsnew/3.12.rst:1723 ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1722 ../../whatsnew/3.12.rst:1728 msgid ":meth:`.assertNotAlmostEqual`" msgstr ":meth:`.assertNotAlmostEqual`" -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1723 msgid "``failUnlessRaises``" msgstr "``failUnlessRaises``" -#: ../../whatsnew/3.12.rst:1724 +#: ../../whatsnew/3.12.rst:1723 msgid ":meth:`.assertRaises`" msgstr ":meth:`.assertRaises`" -#: ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1724 msgid "``assert_``" msgstr "``assert_``" -#: ../../whatsnew/3.12.rst:1725 ../../whatsnew/3.12.rst:1726 -#: ../../whatsnew/3.12.rst:1727 ../../whatsnew/3.12.rst:1728 -#: ../../whatsnew/3.12.rst:1729 ../../whatsnew/3.12.rst:1730 -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1724 ../../whatsnew/3.12.rst:1725 +#: ../../whatsnew/3.12.rst:1726 ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1728 ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1730 msgid "3.2" msgstr "3.2" -#: ../../whatsnew/3.12.rst:1726 +#: ../../whatsnew/3.12.rst:1725 msgid "``assertEquals``" msgstr "``assertEquals``" -#: ../../whatsnew/3.12.rst:1727 +#: ../../whatsnew/3.12.rst:1726 msgid "``assertNotEquals``" msgstr "``assertNotEquals``" -#: ../../whatsnew/3.12.rst:1728 +#: ../../whatsnew/3.12.rst:1727 msgid "``assertAlmostEquals``" msgstr "``assertAlmostEquals``" -#: ../../whatsnew/3.12.rst:1729 +#: ../../whatsnew/3.12.rst:1728 msgid "``assertNotAlmostEquals``" msgstr "``assertNotAlmostEquals``" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1729 msgid "``assertRegexpMatches``" msgstr "``assertRegexpMatches``" -#: ../../whatsnew/3.12.rst:1730 +#: ../../whatsnew/3.12.rst:1729 msgid ":meth:`.assertRegex`" msgstr ":meth:`.assertRegex`" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1730 msgid "``assertRaisesRegexp``" msgstr "``assertRaisesRegexp``" -#: ../../whatsnew/3.12.rst:1731 +#: ../../whatsnew/3.12.rst:1730 msgid ":meth:`.assertRaisesRegex`" msgstr ":meth:`.assertRaisesRegex`" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1731 msgid "``assertNotRegexpMatches``" msgstr "``assertNotRegexpMatches``" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1731 msgid ":meth:`.assertNotRegex`" msgstr ":meth:`.assertNotRegex`" -#: ../../whatsnew/3.12.rst:1732 +#: ../../whatsnew/3.12.rst:1731 msgid "3.5" msgstr "3.5" -#: ../../whatsnew/3.12.rst:1735 +#: ../../whatsnew/3.12.rst:1734 msgid "" "You can use https://github.com/isidentical/teyit to automatically modernise " "your unit tests." msgstr "" -#: ../../whatsnew/3.12.rst:1738 +#: ../../whatsnew/3.12.rst:1737 msgid "" "Undocumented and broken :class:`~unittest.TestCase` method " "``assertDictContainsSubset`` (deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1741 +#: ../../whatsnew/3.12.rst:1740 msgid "" "Undocumented :meth:`TestLoader.loadTestsFromModule ` parameter *use_load_tests* (deprecated and ignored " "since Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1745 +#: ../../whatsnew/3.12.rst:1744 msgid "" "An alias of the :class:`~unittest.TextTestResult` class: ``_TextTestResult`` " "(deprecated in Python 3.2)." msgstr "" -#: ../../whatsnew/3.12.rst:1748 +#: ../../whatsnew/3.12.rst:1747 msgid "(Contributed by Serhiy Storchaka in :gh:`89325`.)" msgstr "(由 Serhiy Storchaka 於 :gh:`89325` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1751 +#: ../../whatsnew/3.12.rst:1750 msgid "webbrowser" msgstr "webbrowser" -#: ../../whatsnew/3.12.rst:1753 +#: ../../whatsnew/3.12.rst:1752 msgid "" "Remove support for obsolete browsers from :mod:`webbrowser`. The removed " "browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, Iceape, " "Firebird, and Firefox versions 35 and below (:gh:`102871`)." msgstr "" -#: ../../whatsnew/3.12.rst:1758 +#: ../../whatsnew/3.12.rst:1757 msgid "xml.etree.ElementTree" msgstr "xml.etree.ElementTree" -#: ../../whatsnew/3.12.rst:1760 +#: ../../whatsnew/3.12.rst:1759 msgid "" "Remove the ``ElementTree.Element.copy()`` method of the pure Python " "implementation, deprecated in Python 3.10, use the :func:`copy.copy` " @@ -2780,22 +2779,22 @@ msgid "" "Stinner in :gh:`94383`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1767 +#: ../../whatsnew/3.12.rst:1766 msgid "zipimport" msgstr "zipimport" -#: ../../whatsnew/3.12.rst:1769 +#: ../../whatsnew/3.12.rst:1768 msgid "" "Remove :mod:`zipimport`'s ``find_loader()`` and ``find_module()`` methods, " "deprecated in Python 3.10: use the ``find_spec()`` method instead. See :pep:" "`451` for the rationale. (Contributed by Victor Stinner in :gh:`94379`.)" msgstr "" -#: ../../whatsnew/3.12.rst:1775 +#: ../../whatsnew/3.12.rst:1774 msgid "Others" msgstr "其他" -#: ../../whatsnew/3.12.rst:1777 +#: ../../whatsnew/3.12.rst:1776 msgid "" "Remove the ``suspicious`` rule from the documentation :file:`Makefile` and :" "file:`Doc/tools/rstlint.py`, both in favor of `sphinx-lint `, " "intended for low-level tools like debuggers and JIT compilers. This API may " @@ -3069,84 +3068,84 @@ msgid "" "contents are marked by the ``PyUnstable_`` prefix in names." msgstr "" -#: ../../whatsnew/3.12.rst:1973 +#: ../../whatsnew/3.12.rst:1972 msgid "Code object constructors:" msgstr "" -#: ../../whatsnew/3.12.rst:1975 +#: ../../whatsnew/3.12.rst:1974 msgid "``PyUnstable_Code_New()`` (renamed from ``PyCode_New``)" msgstr "" -#: ../../whatsnew/3.12.rst:1976 +#: ../../whatsnew/3.12.rst:1975 msgid "" "``PyUnstable_Code_NewWithPosOnlyArgs()`` (renamed from " "``PyCode_NewWithPosOnlyArgs``)" msgstr "" -#: ../../whatsnew/3.12.rst:1978 +#: ../../whatsnew/3.12.rst:1977 msgid "Extra storage for code objects (:pep:`523`):" msgstr "" -#: ../../whatsnew/3.12.rst:1980 +#: ../../whatsnew/3.12.rst:1979 msgid "" "``PyUnstable_Eval_RequestCodeExtraIndex()`` (renamed from " "``_PyEval_RequestCodeExtraIndex``)" msgstr "" -#: ../../whatsnew/3.12.rst:1981 +#: ../../whatsnew/3.12.rst:1980 msgid "``PyUnstable_Code_GetExtra()`` (renamed from ``_PyCode_GetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1982 +#: ../../whatsnew/3.12.rst:1981 msgid "``PyUnstable_Code_SetExtra()`` (renamed from ``_PyCode_SetExtra``)" msgstr "" -#: ../../whatsnew/3.12.rst:1984 +#: ../../whatsnew/3.12.rst:1983 msgid "" "The original names will continue to be available until the respective API " "changes." msgstr "" -#: ../../whatsnew/3.12.rst:1987 +#: ../../whatsnew/3.12.rst:1986 msgid "(Contributed by Petr Viktorin in :gh:`101101`.)" msgstr "(由 Petr Viktorin 於 :gh:`101101` 中貢獻。)" -#: ../../whatsnew/3.12.rst:1989 +#: ../../whatsnew/3.12.rst:1988 msgid "" ":pep:`697`: Add an API for extending types whose instance memory layout is " "opaque:" msgstr "" -#: ../../whatsnew/3.12.rst:1992 +#: ../../whatsnew/3.12.rst:1991 msgid "" ":c:member:`PyType_Spec.basicsize` can be zero or negative to specify " "inheriting or extending the base class size." msgstr "" -#: ../../whatsnew/3.12.rst:1994 +#: ../../whatsnew/3.12.rst:1993 msgid "" ":c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize` added to " "allow access to subclass-specific instance data." msgstr "" -#: ../../whatsnew/3.12.rst:1996 +#: ../../whatsnew/3.12.rst:1995 msgid "" ":c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData` added " "to allow safely extending certain variable-sized types, including :c:var:" "`PyType_Type`." msgstr "" -#: ../../whatsnew/3.12.rst:1999 +#: ../../whatsnew/3.12.rst:1998 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` added to allow defining :c:type:`members " "` in terms of a subclass-specific struct." msgstr "" -#: ../../whatsnew/3.12.rst:2002 +#: ../../whatsnew/3.12.rst:2001 msgid "(Contributed by Petr Viktorin in :gh:`103509`.)" msgstr "(由 Petr Viktorin 於 :gh:`103509` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2004 +#: ../../whatsnew/3.12.rst:2003 msgid "" "Add the new :ref:`limited C API ` function :c:func:" "`PyType_FromMetaclass`, which generalizes the existing :c:func:" @@ -3154,29 +3153,29 @@ msgid "" "(Contributed by Wenzel Jakob in :gh:`93012`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2009 +#: ../../whatsnew/3.12.rst:2008 msgid "" "API for creating objects that can be called using :ref:`the vectorcall " "protocol ` was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2013 +#: ../../whatsnew/3.12.rst:2012 msgid ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" msgstr ":c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`" -#: ../../whatsnew/3.12.rst:2014 +#: ../../whatsnew/3.12.rst:2013 msgid ":c:func:`PyVectorcall_NARGS`" msgstr ":c:func:`PyVectorcall_NARGS`" -#: ../../whatsnew/3.12.rst:2015 +#: ../../whatsnew/3.12.rst:2014 msgid ":c:func:`PyVectorcall_Call`" msgstr ":c:func:`PyVectorcall_Call`" -#: ../../whatsnew/3.12.rst:2016 +#: ../../whatsnew/3.12.rst:2015 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" -#: ../../whatsnew/3.12.rst:2018 +#: ../../whatsnew/3.12.rst:2017 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. This " @@ -3187,7 +3186,7 @@ msgid "" "`93274`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2026 +#: ../../whatsnew/3.12.rst:2025 msgid "" "The :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flags have been added. This allows extensions " @@ -3195,32 +3194,32 @@ msgid "" "using less memory and with faster access." msgstr "" -#: ../../whatsnew/3.12.rst:2031 +#: ../../whatsnew/3.12.rst:2030 msgid "" "API for performing calls using :ref:`the vectorcall protocol ` " "was added to the :ref:`Limited API `:" msgstr "" -#: ../../whatsnew/3.12.rst:2035 +#: ../../whatsnew/3.12.rst:2034 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" -#: ../../whatsnew/3.12.rst:2036 +#: ../../whatsnew/3.12.rst:2035 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" -#: ../../whatsnew/3.12.rst:2037 +#: ../../whatsnew/3.12.rst:2036 msgid ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" msgstr ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`" -#: ../../whatsnew/3.12.rst:2039 +#: ../../whatsnew/3.12.rst:2038 msgid "" "This means that both the incoming and outgoing ends of the vector call " "protocol are now available in the :ref:`Limited API `. (Contributed " "by Wenzel Jakob in :gh:`98586`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2043 +#: ../../whatsnew/3.12.rst:2042 msgid "" "Add two new public functions, :c:func:`PyEval_SetProfileAllThreads` and :c:" "func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling " @@ -3228,14 +3227,14 @@ msgid "" "(Contributed by Pablo Galindo in :gh:`93503`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2049 +#: ../../whatsnew/3.12.rst:2048 msgid "" "Add new function :c:func:`PyFunction_SetVectorcall` to the C API which sets " "the vectorcall field of a given :c:type:`PyFunctionObject`. (Contributed by " "Andrew Frost in :gh:`92257`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2053 +#: ../../whatsnew/3.12.rst:2052 msgid "" "The C API now permits registering callbacks via :c:func:" "`PyDict_AddWatcher`, :c:func:`PyDict_Watch` and related APIs to be called " @@ -3244,28 +3243,28 @@ msgid "" "`91052`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2059 +#: ../../whatsnew/3.12.rst:2058 msgid "" "Add :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register " "callbacks to receive notification on changes to a type. (Contributed by Carl " "Meyer in :gh:`91051`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2063 +#: ../../whatsnew/3.12.rst:2062 msgid "" "Add :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` APIs to " "register callbacks to receive notification on creation and destruction of " "code objects. (Contributed by Itamar Oren in :gh:`91054`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2068 +#: ../../whatsnew/3.12.rst:2067 msgid "" "Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` functions to " "get a frame variable by its name. (Contributed by Victor Stinner in :gh:" "`91248`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2072 +#: ../../whatsnew/3.12.rst:2071 msgid "" "Add :c:func:`PyErr_GetRaisedException` and :c:func:" "`PyErr_SetRaisedException` for saving and restoring the current exception. " @@ -3275,14 +3274,14 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2080 +#: ../../whatsnew/3.12.rst:2079 msgid "" "Add ``_PyErr_ChainExceptions1``, which takes an exception instance, to " "replace the legacy-API ``_PyErr_ChainExceptions``, which is now deprecated. " "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2084 +#: ../../whatsnew/3.12.rst:2083 msgid "" "Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as " "convenience functions for retrieving and modifying the :attr:`~BaseException." @@ -3290,71 +3289,71 @@ msgid "" "in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2089 +#: ../../whatsnew/3.12.rst:2088 msgid "" "Add :c:func:`PyErr_DisplayException`, which takes an exception instance, to " "replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by Irit " "Katriel in :gh:`102755`)." msgstr "" -#: ../../whatsnew/3.12.rst:2095 +#: ../../whatsnew/3.12.rst:2094 msgid "" ":pep:`683`: Introduce *Immortal Objects*, which allows objects to bypass " "reference counts, and related changes to the C-API:" msgstr "" -#: ../../whatsnew/3.12.rst:2098 +#: ../../whatsnew/3.12.rst:2097 msgid "``_Py_IMMORTAL_REFCNT``: The reference count that defines an object" msgstr "" -#: ../../whatsnew/3.12.rst:2099 +#: ../../whatsnew/3.12.rst:2098 msgid "as immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2100 +#: ../../whatsnew/3.12.rst:2099 msgid "" "``_Py_IsImmortal`` Checks if an object has the immortal reference count." msgstr "" -#: ../../whatsnew/3.12.rst:2101 +#: ../../whatsnew/3.12.rst:2100 msgid "``PyObject_HEAD_INIT`` This will now initialize reference count to" msgstr "" -#: ../../whatsnew/3.12.rst:2102 +#: ../../whatsnew/3.12.rst:2101 msgid "``_Py_IMMORTAL_REFCNT`` when used with ``Py_BUILD_CORE``." msgstr "" -#: ../../whatsnew/3.12.rst:2103 +#: ../../whatsnew/3.12.rst:2102 msgid "``SSTATE_INTERNED_IMMORTAL`` An identifier for interned unicode objects" msgstr "" -#: ../../whatsnew/3.12.rst:2104 +#: ../../whatsnew/3.12.rst:2103 msgid "that are immortal." msgstr "" -#: ../../whatsnew/3.12.rst:2105 +#: ../../whatsnew/3.12.rst:2104 msgid "``SSTATE_INTERNED_IMMORTAL_STATIC`` An identifier for interned unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2106 +#: ../../whatsnew/3.12.rst:2105 msgid "objects that are immortal and static" msgstr "" -#: ../../whatsnew/3.12.rst:2107 +#: ../../whatsnew/3.12.rst:2106 msgid "``sys.getunicodeinternedsize`` This returns the total number of unicode" msgstr "" -#: ../../whatsnew/3.12.rst:2108 +#: ../../whatsnew/3.12.rst:2107 msgid "" "objects that have been interned. This is now needed for :file:`refleak.py` " "to correctly track reference counts and allocated blocks" msgstr "" -#: ../../whatsnew/3.12.rst:2111 +#: ../../whatsnew/3.12.rst:2110 msgid "(Contributed by Eddie Elizondo in :gh:`84436`.)" msgstr "(由 Eddie Elizondo 於 :gh:`84436` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2113 +#: ../../whatsnew/3.12.rst:2112 msgid "" ":pep:`684`: Add the new :c:func:`Py_NewInterpreterFromConfig` function and :" "c:type:`PyInterpreterConfig`, which may be used to create sub-interpreters " @@ -3362,27 +3361,27 @@ msgid "" "(Contributed by Eric Snow in :gh:`104110`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2119 +#: ../../whatsnew/3.12.rst:2118 msgid "" "In the limited C API version 3.12, :c:func:`Py_INCREF` and :c:func:" "`Py_DECREF` functions are now implemented as opaque function calls to hide " "implementation details. (Contributed by Victor Stinner in :gh:`105387`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2127 +#: ../../whatsnew/3.12.rst:2126 msgid "" "Legacy Unicode APIs based on ``Py_UNICODE*`` representation has been " "removed. Please migrate to APIs based on UTF-8 or ``wchar_t*``." msgstr "" -#: ../../whatsnew/3.12.rst:2130 +#: ../../whatsnew/3.12.rst:2129 msgid "" "Argument parsing functions like :c:func:`PyArg_ParseTuple` doesn't support " "``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate to " "other formats for Unicode like ``s``, ``z``, ``es``, and ``U``." msgstr "" -#: ../../whatsnew/3.12.rst:2134 +#: ../../whatsnew/3.12.rst:2133 msgid "" "``tp_weaklist`` for all static builtin types is always ``NULL``. This is an " "internal-only field on ``PyTypeObject`` but we're pointing out the change in " @@ -3391,7 +3390,7 @@ msgid "" "necessary, the (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro." msgstr "" -#: ../../whatsnew/3.12.rst:2141 +#: ../../whatsnew/3.12.rst:2140 msgid "" "This internal-only :c:member:`PyTypeObject.tp_subclasses` may now not be a " "valid object pointer. Its type was changed to :c:expr:`void *` to reflect " @@ -3399,13 +3398,13 @@ msgid "" "only field directly." msgstr "" -#: ../../whatsnew/3.12.rst:2146 +#: ../../whatsnew/3.12.rst:2145 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~class." "__subclasses__` (using :c:func:`PyObject_CallMethod`, for example)." msgstr "" -#: ../../whatsnew/3.12.rst:2150 +#: ../../whatsnew/3.12.rst:2149 msgid "" "Add support of more formatting options (left aligning, octals, uppercase " "hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, :c:type:`wchar_t` C " @@ -3414,7 +3413,7 @@ msgid "" "`98836`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2156 +#: ../../whatsnew/3.12.rst:2155 msgid "" "An unrecognized format character in :c:func:`PyUnicode_FromFormat` and :c:" "func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous " @@ -3423,13 +3422,13 @@ msgid "" "Storchaka in :gh:`95781`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2162 +#: ../../whatsnew/3.12.rst:2161 msgid "" "Fix wrong sign placement in :c:func:`PyUnicode_FromFormat` and :c:func:" "`PyUnicode_FromFormatV`. (Contributed by Philip Georgi in :gh:`95504`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2166 +#: ../../whatsnew/3.12.rst:2165 msgid "" "Extension classes wanting to add a ``__dict__`` or weak reference slot " "should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" @@ -3443,7 +3442,7 @@ msgid "" "func:`PyObject_ClearWeakRefs`, as before." msgstr "" -#: ../../whatsnew/3.12.rst:2178 +#: ../../whatsnew/3.12.rst:2177 msgid "" "The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like " "paths, like :class:`bytearray` and :class:`memoryview` types: only the " @@ -3451,7 +3450,7 @@ msgid "" "Victor Stinner in :gh:`98393`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2183 +#: ../../whatsnew/3.12.rst:2182 msgid "" "The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` " "macros now only evaluate their arguments once. If an argument has side " @@ -3459,7 +3458,7 @@ msgid "" "Stinner in :gh:`98724`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2188 +#: ../../whatsnew/3.12.rst:2187 msgid "" "The interpreter's error indicator is now always normalized. This means that :" "c:func:`PyErr_SetObject`, :c:func:`PyErr_SetString` and the other functions " @@ -3467,7 +3466,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2193 +#: ../../whatsnew/3.12.rst:2192 msgid "" "``_Py_RefTotal`` is no longer authoritative and only kept around for ABI " "compatibility. Note that it is an internal global and only available on " @@ -3475,25 +3474,25 @@ msgid "" "``_Py_GetGlobalRefTotal()``." msgstr "" -#: ../../whatsnew/3.12.rst:2198 +#: ../../whatsnew/3.12.rst:2197 msgid "" "The following functions now select an appropriate metaclass for the newly " "created type:" msgstr "" -#: ../../whatsnew/3.12.rst:2201 +#: ../../whatsnew/3.12.rst:2200 msgid ":c:func:`PyType_FromSpec`" msgstr ":c:func:`PyType_FromSpec`" -#: ../../whatsnew/3.12.rst:2202 +#: ../../whatsnew/3.12.rst:2201 msgid ":c:func:`PyType_FromSpecWithBases`" msgstr ":c:func:`PyType_FromSpecWithBases`" -#: ../../whatsnew/3.12.rst:2203 +#: ../../whatsnew/3.12.rst:2202 msgid ":c:func:`PyType_FromModuleAndSpec`" msgstr ":c:func:`PyType_FromModuleAndSpec`" -#: ../../whatsnew/3.12.rst:2205 +#: ../../whatsnew/3.12.rst:2204 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is deprecated, and in Python 3.14+ it will be disallowed. Note that these " @@ -3501,14 +3500,14 @@ msgid "" "initialization." msgstr "" -#: ../../whatsnew/3.12.rst:2210 +#: ../../whatsnew/3.12.rst:2209 msgid "" "Note that :c:func:`PyType_FromMetaclass` (added in Python 3.12) already " "disallows creating classes whose metaclass overrides ``tp_new`` (:meth:" "`~object.__new__` in Python)." msgstr "" -#: ../../whatsnew/3.12.rst:2214 +#: ../../whatsnew/3.12.rst:2213 msgid "" "Since ``tp_new`` overrides almost everything ``PyType_From*`` functions do, " "the two are incompatible with each other. The existing behavior -- ignoring " @@ -3517,17 +3516,17 @@ msgid "" "general workaround. One of the following may work for you:" msgstr "" -#: ../../whatsnew/3.12.rst:2221 +#: ../../whatsnew/3.12.rst:2220 msgid "If you control the metaclass, avoid using ``tp_new`` in it:" msgstr "" -#: ../../whatsnew/3.12.rst:2223 +#: ../../whatsnew/3.12.rst:2222 msgid "" "If initialization can be skipped, it can be done in :c:member:`~PyTypeObject." "tp_init` instead." msgstr "" -#: ../../whatsnew/3.12.rst:2225 +#: ../../whatsnew/3.12.rst:2224 msgid "" "If the metaclass doesn't need to be instantiated from Python, set its " "``tp_new`` to ``NULL`` using the :c:macro:" @@ -3535,20 +3534,20 @@ msgid "" "``PyType_From*`` functions." msgstr "" -#: ../../whatsnew/3.12.rst:2230 +#: ../../whatsnew/3.12.rst:2229 msgid "" "Avoid ``PyType_From*`` functions: if you don't need C-specific features " "(slots or setting the instance size), create types by :ref:`calling ` " "the metaclass." msgstr "" -#: ../../whatsnew/3.12.rst:2234 +#: ../../whatsnew/3.12.rst:2233 msgid "" "If you *know* the ``tp_new`` can be skipped safely, filter the deprecation " "warning out using :func:`warnings.catch_warnings` from Python." msgstr "" -#: ../../whatsnew/3.12.rst:2237 +#: ../../whatsnew/3.12.rst:2236 msgid "" ":c:var:`PyOS_InputHook` and :c:var:`PyOS_ReadlineFunctionPointer` are no " "longer called in :ref:`subinterpreters `. This is " @@ -3556,14 +3555,14 @@ msgid "" "callbacks have no way of recovering extension module state)." msgstr "" -#: ../../whatsnew/3.12.rst:2242 +#: ../../whatsnew/3.12.rst:2241 msgid "" "This also avoids situations where extensions may find themselves running in " "a subinterpreter that they don't support (or haven't yet been loaded in). " "See :gh:`104668` for more info." msgstr "" -#: ../../whatsnew/3.12.rst:2246 +#: ../../whatsnew/3.12.rst:2245 msgid "" ":c:struct:`PyLongObject` has had its internals changed for better " "performance. Although the internals of :c:struct:`PyLongObject` are private, " @@ -3574,15 +3573,15 @@ msgid "" "a single machine word:" msgstr "" -#: ../../whatsnew/3.12.rst:2254 +#: ../../whatsnew/3.12.rst:2253 msgid ":c:func:`PyUnstable_Long_IsCompact`" msgstr ":c:func:`PyUnstable_Long_IsCompact`" -#: ../../whatsnew/3.12.rst:2255 +#: ../../whatsnew/3.12.rst:2254 msgid ":c:func:`PyUnstable_Long_CompactValue`" msgstr ":c:func:`PyUnstable_Long_CompactValue`" -#: ../../whatsnew/3.12.rst:2257 +#: ../../whatsnew/3.12.rst:2256 msgid "" "Custom allocators, set via :c:func:`PyMem_SetAllocator`, are now required to " "be thread-safe, regardless of memory domain. Allocators that don't have " @@ -3591,7 +3590,7 @@ msgid "" "create a new GitHub issue and CC ``@ericsnowcurrently``." msgstr "" -#: ../../whatsnew/3.12.rst:2267 +#: ../../whatsnew/3.12.rst:2266 msgid "" "In accordance with :pep:`699`, the ``ma_version_tag`` field in :c:type:" "`PyDictObject` is deprecated for extension modules. Accessing this field " @@ -3600,76 +3599,76 @@ msgid "" "PEP by Ken Jin.)" msgstr "" -#: ../../whatsnew/3.12.rst:2272 +#: ../../whatsnew/3.12.rst:2271 msgid "Deprecate global configuration variable:" msgstr "" -#: ../../whatsnew/3.12.rst:2274 ../../whatsnew/3.12.rst:2359 +#: ../../whatsnew/3.12.rst:2273 ../../whatsnew/3.12.rst:2358 msgid ":c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug`" msgstr ":c:var:`Py_DebugFlag`: 請改用 :c:member:`PyConfig.parser_debug`" -#: ../../whatsnew/3.12.rst:2275 ../../whatsnew/3.12.rst:2360 +#: ../../whatsnew/3.12.rst:2274 ../../whatsnew/3.12.rst:2359 msgid ":c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose`" msgstr ":c:var:`Py_VerboseFlag`: 請改用 :c:member:`PyConfig.verbose`" -#: ../../whatsnew/3.12.rst:2276 ../../whatsnew/3.12.rst:2361 +#: ../../whatsnew/3.12.rst:2275 ../../whatsnew/3.12.rst:2360 msgid ":c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet`" msgstr ":c:var:`Py_QuietFlag`: 請改用 :c:member:`PyConfig.quiet`" -#: ../../whatsnew/3.12.rst:2277 ../../whatsnew/3.12.rst:2362 +#: ../../whatsnew/3.12.rst:2276 ../../whatsnew/3.12.rst:2361 msgid ":c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive`" msgstr ":c:var:`Py_InteractiveFlag`: 請改用 :c:member:`PyConfig.interactive`" -#: ../../whatsnew/3.12.rst:2278 ../../whatsnew/3.12.rst:2363 +#: ../../whatsnew/3.12.rst:2277 ../../whatsnew/3.12.rst:2362 msgid ":c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect`" msgstr ":c:var:`Py_InspectFlag`: 請改用 :c:member:`PyConfig.inspect`" -#: ../../whatsnew/3.12.rst:2279 ../../whatsnew/3.12.rst:2364 +#: ../../whatsnew/3.12.rst:2278 ../../whatsnew/3.12.rst:2363 msgid ":c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level`" msgstr "" ":c:var:`Py_OptimizeFlag`: 請改用 :c:member:`PyConfig.optimization_level`" -#: ../../whatsnew/3.12.rst:2280 ../../whatsnew/3.12.rst:2365 +#: ../../whatsnew/3.12.rst:2279 ../../whatsnew/3.12.rst:2364 msgid ":c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import`" msgstr ":c:var:`Py_NoSiteFlag`: 請改用 :c:member:`PyConfig.site_import`" -#: ../../whatsnew/3.12.rst:2281 ../../whatsnew/3.12.rst:2366 +#: ../../whatsnew/3.12.rst:2280 ../../whatsnew/3.12.rst:2365 msgid ":c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning`" msgstr "" ":c:var:`Py_BytesWarningFlag`: 請改用 :c:member:`PyConfig.bytes_warning`" -#: ../../whatsnew/3.12.rst:2282 ../../whatsnew/3.12.rst:2367 +#: ../../whatsnew/3.12.rst:2281 ../../whatsnew/3.12.rst:2366 msgid ":c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings`" msgstr "" ":c:var:`Py_FrozenFlag`: 請改用 :c:member:`PyConfig.pathconfig_warnings`" -#: ../../whatsnew/3.12.rst:2283 ../../whatsnew/3.12.rst:2368 +#: ../../whatsnew/3.12.rst:2282 ../../whatsnew/3.12.rst:2367 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment`" msgstr "" ":c:var:`Py_IgnoreEnvironmentFlag`: 請改用 :c:member:`PyConfig." "use_environment`" -#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 +#: ../../whatsnew/3.12.rst:2283 ../../whatsnew/3.12.rst:2368 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode`" msgstr "" ":c:var:`Py_DontWriteBytecodeFlag`: 請改用 :c:member:`PyConfig.write_bytecode`" -#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 +#: ../../whatsnew/3.12.rst:2284 ../../whatsnew/3.12.rst:2369 msgid "" ":c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory`" msgstr "" ":c:var:`Py_NoUserSiteDirectory`: 請改用 :c:member:`PyConfig." "user_site_directory`" -#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 +#: ../../whatsnew/3.12.rst:2285 ../../whatsnew/3.12.rst:2370 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio`" msgstr "" ":c:var:`Py_UnbufferedStdioFlag`: 請改用 :c:member:`PyConfig.buffered_stdio`" -#: ../../whatsnew/3.12.rst:2287 ../../whatsnew/3.12.rst:2372 +#: ../../whatsnew/3.12.rst:2286 ../../whatsnew/3.12.rst:2371 msgid "" ":c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed`" @@ -3677,11 +3676,11 @@ msgstr "" ":c:var:`Py_HashRandomizationFlag`: 請改用 :c:member:`PyConfig.use_hash_seed` " "和 :c:member:`PyConfig.hash_seed`" -#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 +#: ../../whatsnew/3.12.rst:2288 ../../whatsnew/3.12.rst:2373 msgid ":c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated`" msgstr ":c:var:`Py_IsolatedFlag`: 請改用 :c:member:`PyConfig.isolated`" -#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 +#: ../../whatsnew/3.12.rst:2289 ../../whatsnew/3.12.rst:2374 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" @@ -3689,7 +3688,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: 請改用 :c:member:`PyPreConfig." "legacy_windows_fs_encoding`" -#: ../../whatsnew/3.12.rst:2291 ../../whatsnew/3.12.rst:2376 +#: ../../whatsnew/3.12.rst:2290 ../../whatsnew/3.12.rst:2375 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig." "legacy_windows_stdio`" @@ -3697,7 +3696,7 @@ msgstr "" ":c:var:`Py_LegacyWindowsStdioFlag`: 請改用 :c:member:`PyConfig." "legacy_windows_stdio`" -#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 +#: ../../whatsnew/3.12.rst:2291 ../../whatsnew/3.12.rst:2376 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3705,7 +3704,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 +#: ../../whatsnew/3.12.rst:2292 ../../whatsnew/3.12.rst:2377 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig." "filesystem_encoding`" @@ -3713,7 +3712,7 @@ msgstr "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: 請改用 :c:member:`PyConfig." "filesystem_encoding`" -#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 +#: ../../whatsnew/3.12.rst:2293 ../../whatsnew/3.12.rst:2378 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig." "filesystem_errors`" @@ -3721,7 +3720,7 @@ msgstr "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: 請改用 :c:member:`PyConfig." "filesystem_errors`" -#: ../../whatsnew/3.12.rst:2295 ../../whatsnew/3.12.rst:2380 +#: ../../whatsnew/3.12.rst:2294 ../../whatsnew/3.12.rst:2379 msgid "" ":c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` (see :c:func:" "`Py_PreInitialize`)" @@ -3729,7 +3728,7 @@ msgstr "" ":c:var:`!Py_UTF8Mode`: 請改用 :c:member:`PyPreConfig.utf8_mode`\\ (參見 :c:" "func:`Py_PreInitialize`)" -#: ../../whatsnew/3.12.rst:2297 +#: ../../whatsnew/3.12.rst:2296 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead. (Contributed by Victor Stinner in :gh:`77782`.)" @@ -3737,25 +3736,25 @@ msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" "(由 Victor Stinner 於 :gh:`77782` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2301 +#: ../../whatsnew/3.12.rst:2300 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases is deprecated and will be disabled in Python 3.14. (:gh:`95388`)" msgstr "" -#: ../../whatsnew/3.12.rst:2304 +#: ../../whatsnew/3.12.rst:2303 msgid "" "The :file:`structmember.h` header is deprecated, though it continues to be " "available and there are no plans to remove it." msgstr ":file:`structmember.h` 標頭已棄用,但仍可使用,且還沒有移除它的計畫。" -#: ../../whatsnew/3.12.rst:2307 +#: ../../whatsnew/3.12.rst:2306 msgid "" "Its contents are now available just by including :file:`Python.h`, with a " "``Py`` prefix added if it was missing:" msgstr "" -#: ../../whatsnew/3.12.rst:2310 +#: ../../whatsnew/3.12.rst:2309 msgid "" ":c:struct:`PyMemberDef`, :c:func:`PyMember_GetOne` and :c:func:" "`PyMember_SetOne`" @@ -3763,13 +3762,13 @@ msgstr "" ":c:struct:`PyMemberDef`、:c:func:`PyMember_GetOne` 和 :c:func:" "`PyMember_SetOne`" -#: ../../whatsnew/3.12.rst:2312 +#: ../../whatsnew/3.12.rst:2311 msgid "" "Type macros like :c:macro:`Py_T_INT`, :c:macro:`Py_T_DOUBLE`, etc. " "(previously ``T_INT``, ``T_DOUBLE``, etc.)" msgstr "" -#: ../../whatsnew/3.12.rst:2314 +#: ../../whatsnew/3.12.rst:2313 msgid "" "The flags :c:macro:`Py_READONLY` (previously ``READONLY``) and :c:macro:" "`Py_AUDIT_READ` (previously all uppercase)" @@ -3777,23 +3776,23 @@ msgstr "" ":c:macro:`Py_READONLY`\\ (先前為 ``READONLY``)和 :c:macro:" "`Py_AUDIT_READ`\\ (先前全大寫)旗標" -#: ../../whatsnew/3.12.rst:2317 +#: ../../whatsnew/3.12.rst:2316 msgid "Several items are not exposed from :file:`Python.h`:" msgstr "數個項目不再從 :file:`Python.h` 中公開:" -#: ../../whatsnew/3.12.rst:2319 +#: ../../whatsnew/3.12.rst:2318 msgid ":c:macro:`T_OBJECT` (use :c:macro:`Py_T_OBJECT_EX`)" msgstr ":c:macro:`T_OBJECT`\\ (請改用 :c:macro:`Py_T_OBJECT_EX`)" -#: ../../whatsnew/3.12.rst:2320 +#: ../../whatsnew/3.12.rst:2319 msgid ":c:macro:`T_NONE` (previously undocumented, and pretty quirky)" msgstr ":c:macro:`T_NONE`\\ (先前未記錄於文件上,且相當古怪)" -#: ../../whatsnew/3.12.rst:2321 +#: ../../whatsnew/3.12.rst:2320 msgid "The macro ``WRITE_RESTRICTED`` which does nothing." msgstr "不做任何事的巨集 ``WRITE_RESTRICTED``。" -#: ../../whatsnew/3.12.rst:2322 +#: ../../whatsnew/3.12.rst:2321 msgid "" "The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of :c:macro:" "`Py_AUDIT_READ`." @@ -3801,33 +3800,33 @@ msgstr "" "``RESTRICTED`` 和 ``READ_RESTRICTED`` 這兩個巨集,相當於 :c:macro:" "`Py_AUDIT_READ`。" -#: ../../whatsnew/3.12.rst:2324 +#: ../../whatsnew/3.12.rst:2323 msgid "" "In some configurations, ```` is not included from :file:`Python." "h`. It should be included manually when using ``offsetof()``." msgstr "" -#: ../../whatsnew/3.12.rst:2327 +#: ../../whatsnew/3.12.rst:2326 msgid "" "The deprecated header continues to provide its original contents under the " "original names. Your old code can stay unchanged, unless the extra include " "and non-namespaced macros bother you greatly." msgstr "" -#: ../../whatsnew/3.12.rst:2332 +#: ../../whatsnew/3.12.rst:2331 msgid "" "(Contributed in :gh:`47146` by Petr Viktorin, based on earlier work by " "Alexander Belopolsky and Matthias Braun.)" msgstr "" -#: ../../whatsnew/3.12.rst:2335 +#: ../../whatsnew/3.12.rst:2334 msgid "" ":c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` are deprecated. Use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` " "instead. (Contributed by Mark Shannon in :gh:`101578`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2340 +#: ../../whatsnew/3.12.rst:2339 msgid "" ":c:func:`!PyErr_Display` is deprecated. Use :c:func:`PyErr_DisplayException` " "instead. (Contributed by Irit Katriel in :gh:`102755`)." @@ -3835,7 +3834,7 @@ msgstr "" ":c:func:`!PyErr_Display` 已棄用,請改用 :c:func:`PyErr_DisplayException`。" "(由 Irit Katriel 於 :gh:`102755` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2343 +#: ../../whatsnew/3.12.rst:2342 msgid "" "``_PyErr_ChainExceptions`` is deprecated. Use ``_PyErr_ChainExceptions1`` " "instead. (Contributed by Irit Katriel in :gh:`102192`.)" @@ -3843,56 +3842,56 @@ msgstr "" "``_PyErr_ChainExceptions`` 已棄用,請改用 ``_PyErr_ChainExceptions1``。(由 " "Irit Katriel 於 :gh:`102192` 中貢獻。)" -#: ../../whatsnew/3.12.rst:2346 +#: ../../whatsnew/3.12.rst:2345 msgid "" "Using :c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases` or :c:" "func:`PyType_FromModuleAndSpec` to create a class whose metaclass overrides :" "c:member:`~PyTypeObject.tp_new` is deprecated. Call the metaclass instead." msgstr "" -#: ../../whatsnew/3.12.rst:2354 +#: ../../whatsnew/3.12.rst:2353 msgid "" "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " "(:pep:`699`; :gh:`101193`)." msgstr "" -#: ../../whatsnew/3.12.rst:2357 +#: ../../whatsnew/3.12.rst:2356 msgid "Global configuration variables:" msgstr "" -#: ../../whatsnew/3.12.rst:2382 +#: ../../whatsnew/3.12.rst:2381 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" ":c:func:`Py_InitializeFromConfig` API 應改為與 :c:type:`PyConfig` 一起使用。" -#: ../../whatsnew/3.12.rst:2385 +#: ../../whatsnew/3.12.rst:2384 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases (:gh:`95388`)." msgstr "" -#: ../../whatsnew/3.12.rst:2391 +#: ../../whatsnew/3.12.rst:2390 msgid "" ":c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule`" msgstr "" ":c:func:`PyImport_ImportModuleNoBlock`:請改用 :c:func:" "`PyImport_ImportModule`" -#: ../../whatsnew/3.12.rst:2392 +#: ../../whatsnew/3.12.rst:2391 msgid ":c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t`" msgstr ":c:type:`!Py_UNICODE_WIDE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2393 +#: ../../whatsnew/3.12.rst:2392 msgid ":c:type:`Py_UNICODE` type: use :c:type:`wchar_t`" msgstr ":c:type:`Py_UNICODE` 型別:請改用 :c:type:`wchar_t`" -#: ../../whatsnew/3.12.rst:2394 +#: ../../whatsnew/3.12.rst:2393 msgid "Python initialization functions:" msgstr "Python 初始化函式:" -#: ../../whatsnew/3.12.rst:2396 +#: ../../whatsnew/3.12.rst:2395 msgid "" ":c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and :data:`!" "warnings.filters`" @@ -3900,27 +3899,27 @@ msgstr "" ":c:func:`PySys_ResetWarnOptions`:清除 :data:`sys.warnoptions` 和 :data:`!" "warnings.filters`" -#: ../../whatsnew/3.12.rst:2398 +#: ../../whatsnew/3.12.rst:2397 msgid ":c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix`" msgstr ":c:func:`Py_GetExecPrefix`:取得 :data:`sys.exec_prefix`" -#: ../../whatsnew/3.12.rst:2399 +#: ../../whatsnew/3.12.rst:2398 msgid ":c:func:`Py_GetPath`: get :data:`sys.path`" msgstr ":c:func:`Py_GetPath`:取得 :data:`sys.path`" -#: ../../whatsnew/3.12.rst:2400 +#: ../../whatsnew/3.12.rst:2399 msgid ":c:func:`Py_GetPrefix`: get :data:`sys.prefix`" msgstr ":c:func:`Py_GetPrefix`:取得 :data:`sys.prefix`" -#: ../../whatsnew/3.12.rst:2401 +#: ../../whatsnew/3.12.rst:2400 msgid ":c:func:`Py_GetProgramFullPath`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramFullPath`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2402 +#: ../../whatsnew/3.12.rst:2401 msgid ":c:func:`Py_GetProgramName`: get :data:`sys.executable`" msgstr ":c:func:`Py_GetProgramName`:取得 :data:`sys.executable`" -#: ../../whatsnew/3.12.rst:2403 +#: ../../whatsnew/3.12.rst:2402 msgid "" ":c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable" @@ -3928,41 +3927,41 @@ msgstr "" ":c:func:`Py_GetPythonHome`:取得 :c:member:`PyConfig.home` 或 :envvar:" "`PYTHONHOME` 環境變數" -#: ../../whatsnew/3.12.rst:2409 +#: ../../whatsnew/3.12.rst:2408 msgid "" "The following APIs are deprecated and will be removed, although there is " "currently no date scheduled for their removal." msgstr "以下 API 已棄用,且將會被移除,雖目前尚未定下移除日期。" -#: ../../whatsnew/3.12.rst:2412 +#: ../../whatsnew/3.12.rst:2411 msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8" msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`:自 Python 3.8 起不再需要" -#: ../../whatsnew/3.12.rst:2413 +#: ../../whatsnew/3.12.rst:2412 msgid ":c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException`" msgstr ":c:func:`PyErr_Fetch`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2414 +#: ../../whatsnew/3.12.rst:2413 msgid "" ":c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException`" msgstr "" ":c:func:`PyErr_NormalizeException`:請改用 :c:func:`PyErr_GetRaisedException`" -#: ../../whatsnew/3.12.rst:2415 +#: ../../whatsnew/3.12.rst:2414 msgid ":c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException`" msgstr ":c:func:`PyErr_Restore`:請改用 :c:func:`PyErr_SetRaisedException`" -#: ../../whatsnew/3.12.rst:2416 +#: ../../whatsnew/3.12.rst:2415 msgid "" ":c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject`" msgstr "" ":c:func:`PyModule_GetFilename`:請改用 :c:func:`PyModule_GetFilenameObject`" -#: ../../whatsnew/3.12.rst:2417 +#: ../../whatsnew/3.12.rst:2416 msgid ":c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child`" msgstr ":c:func:`PyOS_AfterFork`:請改用 :c:func:`PyOS_AfterFork_Child`" -#: ../../whatsnew/3.12.rst:2418 +#: ../../whatsnew/3.12.rst:2417 msgid "" ":c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices`" @@ -3970,125 +3969,139 @@ msgstr "" ":c:func:`PySlice_GetIndicesEx`:請改用 :c:func:`PySlice_Unpack` 和 :c:func:" "`PySlice_AdjustIndices`" -#: ../../whatsnew/3.12.rst:2419 +#: ../../whatsnew/3.12.rst:2418 msgid ":c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedObject`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2420 +#: ../../whatsnew/3.12.rst:2419 msgid ":c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode`" msgstr ":c:func:`!PyUnicode_AsDecodedUnicode`:請改用 :c:func:`PyCodec_Decode`" -#: ../../whatsnew/3.12.rst:2421 +#: ../../whatsnew/3.12.rst:2420 msgid ":c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedObject`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2422 +#: ../../whatsnew/3.12.rst:2421 msgid ":c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode`" msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`:請改用 :c:func:`PyCodec_Encode`" -#: ../../whatsnew/3.12.rst:2423 +#: ../../whatsnew/3.12.rst:2422 msgid ":c:func:`PyUnicode_READY`: unneeded since Python 3.12" msgstr ":c:func:`PyUnicode_READY`:自 Python 3.12 起不再需要" -#: ../../whatsnew/3.12.rst:2424 +#: ../../whatsnew/3.12.rst:2423 msgid ":c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`" msgstr ":c:func:`!PyErr_Display`:請改用 :c:func:`PyErr_DisplayException`" -#: ../../whatsnew/3.12.rst:2425 +#: ../../whatsnew/3.12.rst:2424 msgid ":c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``" msgstr ":c:func:`!_PyErr_ChainExceptions`:請改用 ``_PyErr_ChainExceptions1``" -#: ../../whatsnew/3.12.rst:2426 +#: ../../whatsnew/3.12.rst:2425 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead" msgstr "" ":c:member:`!PyBytesObject.ob_shash` 成員:請改用 :c:func:`PyObject_Hash`" -#: ../../whatsnew/3.12.rst:2428 +#: ../../whatsnew/3.12.rst:2427 msgid ":c:member:`!PyDictObject.ma_version_tag` member" msgstr ":c:member:`!PyDictObject.ma_version_tag` 成員" -#: ../../whatsnew/3.12.rst:2429 +#: ../../whatsnew/3.12.rst:2428 msgid "Thread Local Storage (TLS) API:" msgstr "" -#: ../../whatsnew/3.12.rst:2431 +#: ../../whatsnew/3.12.rst:2430 msgid ":c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc`" msgstr ":c:func:`PyThread_create_key`:請改用 :c:func:`PyThread_tss_alloc`" -#: ../../whatsnew/3.12.rst:2432 +#: ../../whatsnew/3.12.rst:2431 msgid ":c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free`" msgstr ":c:func:`PyThread_delete_key`:請改用 :c:func:`PyThread_tss_free`" -#: ../../whatsnew/3.12.rst:2433 +#: ../../whatsnew/3.12.rst:2432 msgid ":c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set`" msgstr ":c:func:`PyThread_set_key_value`:請改用 :c:func:`PyThread_tss_set`" -#: ../../whatsnew/3.12.rst:2434 +#: ../../whatsnew/3.12.rst:2433 msgid ":c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get`" msgstr ":c:func:`PyThread_get_key_value`:請改用 :c:func:`PyThread_tss_get`" -#: ../../whatsnew/3.12.rst:2435 +#: ../../whatsnew/3.12.rst:2434 msgid ":c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete`" msgstr "" ":c:func:`PyThread_delete_key_value`:請改用 :c:func:`PyThread_tss_delete`" -#: ../../whatsnew/3.12.rst:2436 +#: ../../whatsnew/3.12.rst:2435 msgid ":c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7" msgstr ":c:func:`PyThread_ReInitTLS`:自 Python 3.7 起不再需要" -#: ../../whatsnew/3.12.rst:2441 +#: ../../whatsnew/3.12.rst:2440 msgid "" "Remove the :file:`token.h` header file. There was never any public tokenizer " "C API. The :file:`token.h` header file was only designed to be used by " "Python internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2446 +#: ../../whatsnew/3.12.rst:2445 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:2448 +#: ../../whatsnew/3.12.rst:2447 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" -#: ../../whatsnew/3.12.rst:2449 +#: ../../whatsnew/3.12.rst:2448 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr ":c:func:`!PyUnicode_AS_UNICODE`" -#: ../../whatsnew/3.12.rst:2450 +#: ../../whatsnew/3.12.rst:2449 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr ":c:func:`!PyUnicode_AsUnicode`" -#: ../../whatsnew/3.12.rst:2451 +#: ../../whatsnew/3.12.rst:2450 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" -#: ../../whatsnew/3.12.rst:2452 +#: ../../whatsnew/3.12.rst:2451 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr ":c:func:`!PyUnicode_AS_DATA`" -#: ../../whatsnew/3.12.rst:2453 +#: ../../whatsnew/3.12.rst:2452 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr ":c:func:`!PyUnicode_FromUnicode`" -#: ../../whatsnew/3.12.rst:2454 +#: ../../whatsnew/3.12.rst:2453 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr ":c:func:`!PyUnicode_GET_SIZE`" -#: ../../whatsnew/3.12.rst:2455 +#: ../../whatsnew/3.12.rst:2454 msgid ":c:func:`!PyUnicode_GetSize`" msgstr ":c:func:`!PyUnicode_GetSize`" -#: ../../whatsnew/3.12.rst:2456 +#: ../../whatsnew/3.12.rst:2455 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" -#: ../../whatsnew/3.12.rst:2458 +#: ../../whatsnew/3.12.rst:2457 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" msgstr "" "移除 ``PyUnicode_InternImmortal()`` 函式巨集。(由 Victor Stinner 於 :gh:" "`85858` 中貢獻。)" + +#: ../../whatsnew/3.12.rst:2461 +msgid "Notable changes in 3.12.4" +msgstr "" + +#: ../../whatsnew/3.12.rst:2464 +msgid "ipaddress" +msgstr "" + +#: ../../whatsnew/3.12.rst:2466 +msgid "" +"Fixed ``is_global`` and ``is_private`` behavior in ``IPv4Address``, " +"``IPv6Address``, ``IPv4Network`` and ``IPv6Network``." +msgstr "" From e4a08b767f2e75a9d27d08a3d6d85987cebe7295 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Apr 2024 00:06:10 +0000 Subject: [PATCH 8/9] sync with cpython 186fbe82 --- library/enum.po | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/library/enum.po b/library/enum.po index 6c4138c8f6..6a7b786698 100644 --- a/library/enum.po +++ b/library/enum.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-10 00:03+0000\n" +"POT-Creation-Date: 2024-04-27 00:04+0000\n" "PO-Revision-Date: 2023-09-11 14:08+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -474,7 +474,8 @@ msgid "The value given to the ``Enum`` member::" msgstr "``Enum`` 成員給定的值: ::" #: ../../library/enum.rst:272 ../../library/enum.rst:292 -msgid "Value of the member, can be set in :meth:`~object.__new__`." +#, fuzzy +msgid "Value of the member, can be set in :meth:`~Enum.__new__`." msgstr "成員的值,可以在 :meth:`~object.__new__` 設定。" #: ../../library/enum.rst:274 @@ -609,14 +610,12 @@ msgid "" msgstr "" #: ../../library/enum.rst:400 +#, fuzzy msgid "" -"..note:: When writing a custom ``__new__``, do not use ``super().__new__`` --" +"When writing a custom ``__new__``, do not use ``super().__new__`` -- call " +"the appropriate ``__new__`` instead." msgstr "..note:: 當寫自訂的 ``__new__`` 時,不要使用 ``super().__new__`` --" -#: ../../library/enum.rst:401 -msgid "call the appropriate ``__new__`` instead." -msgstr "而是呼叫適當的 ``__new__`` 。" - #: ../../library/enum.rst:405 msgid "" "Returns the string used for *repr()* calls. By default, returns the *Enum* " @@ -931,8 +930,9 @@ msgstr "" "目的對映。只有在類別上可用。" #: ../../library/enum.rst:820 +#, fuzzy msgid "" -":meth:`~object.__new__`, if specified, must create and return the enum " +":meth:`~Enum.__new__`, if specified, must create and return the enum " "members; it is also a very good idea to set the member's :attr:`!_value_` " "appropriately. Once all the members are created it is no longer used." msgstr "" @@ -1171,5 +1171,8 @@ msgstr "" msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" msgstr "或者你也可以在你的列舉重新給定合適的 :meth:`str`: ::" +#~ msgid "call the appropriate ``__new__`` instead." +#~ msgstr "而是呼叫適當的 ``__new__`` 。" + #~ msgid "Aliases are no longer returned during iteration." #~ msgstr "疊代時不會再回傳別名。" From a83977095fc32d94e5e3560b7535142b598710f7 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Sun, 28 Apr 2024 12:08:44 +0800 Subject: [PATCH 9/9] fix: resolve fuzzy entries --- library/datetime.po | 11 ++++------- library/enum.po | 11 +++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/library/datetime.po b/library/datetime.po index 320533e1f3..a71502d051 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -910,11 +910,10 @@ msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` 和 ``timedelta.microseconds`` 被忽略。" #: ../../library/datetime.rst:616 -#, fuzzy msgid "" "This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." "microseconds`` are 0, and ``date2 + timedelta == date1`` after." -msgstr "``timedelta.seconds`` 和 ``timedelta.microseconds`` 被忽略。" +msgstr "" #: ../../library/datetime.rst:620 msgid ":class:`date` objects are equal if they represent the same date." @@ -3102,25 +3101,23 @@ msgid "" msgstr "" #: ../../library/datetime.rst:2515 -#, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " "not be used, as :class:`!time` objects have no such values. If they're used " "anyway, 1900 is substituted for the year, and 1 for the month and day." msgstr "" "對 :class:`.time` 物件來說,不應該使用年、月、日的格式碼,因為 :class:`!" -"time` 物件並沒有這些值。如果使用這些格式碼,年份會以 ``1900`` 代替、月及日會" -"以 ``1`` 代替。" +"time` 物件並沒有這些值。如果使用這些格式碼,年份會以 1900 代替、月及日會以 1 " +"代替。" #: ../../library/datetime.rst:2519 -#, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " "microseconds should not be used, as :class:`date` objects have no such " "values. If they're used anyway, 0 is substituted for them." msgstr "" "對 :class:`.date` 物件來說,不應該使用時、分、秒、微秒的格式碼,因為 :class:" -"`date` 物件並沒有這些值。如果使用這些格式碼,這些值都會以 ``0`` 代替。" +"`date` 物件並沒有這些值。如果使用這些格式碼,這些值都會以 0 代替。" #: ../../library/datetime.rst:2523 msgid "" diff --git a/library/enum.po b/library/enum.po index 6a7b786698..7c160f01c5 100644 --- a/library/enum.po +++ b/library/enum.po @@ -474,9 +474,8 @@ msgid "The value given to the ``Enum`` member::" msgstr "``Enum`` 成員給定的值: ::" #: ../../library/enum.rst:272 ../../library/enum.rst:292 -#, fuzzy msgid "Value of the member, can be set in :meth:`~Enum.__new__`." -msgstr "成員的值,可以在 :meth:`~object.__new__` 設定。" +msgstr "成員的值,可以在 :meth:`~Enum.__new__` 設定。" #: ../../library/enum.rst:274 msgid "Enum member values" @@ -610,11 +609,12 @@ msgid "" msgstr "" #: ../../library/enum.rst:400 -#, fuzzy msgid "" "When writing a custom ``__new__``, do not use ``super().__new__`` -- call " "the appropriate ``__new__`` instead." -msgstr "..note:: 當寫自訂的 ``__new__`` 時,不要使用 ``super().__new__`` --" +msgstr "" +"當寫自訂的 ``__new__`` 時,不要使用 ``super().__new__``,而是要呼叫適當的 " +"``__new__``。" #: ../../library/enum.rst:405 msgid "" @@ -930,13 +930,12 @@ msgstr "" "目的對映。只有在類別上可用。" #: ../../library/enum.rst:820 -#, fuzzy msgid "" ":meth:`~Enum.__new__`, if specified, must create and return the enum " "members; it is also a very good idea to set the member's :attr:`!_value_` " "appropriately. Once all the members are created it is no longer used." msgstr "" -"如果指定了 :meth:`~object.__new__`,它必須建立並回傳列舉成員;適當地設定成員" +"如果指定了 :meth:`~Enum.__new__`,它必須建立並回傳列舉成員;適當地設定成員" "的 :attr:`!_value_` 也是一個很好的主意。一旦所有成員都建立之後就不會再被用" "到。"