diff --git a/library/curses.po b/library/curses.po index f1ea35ad15..f479cb8b63 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 00:17+0000\n" +"POT-Creation-Date: 2022-12-31 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1453,7 +1453,7 @@ msgstr "" #: ../../library/curses.rst:1306 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " -"the character *ch*." +"the character *ch* with attributes *attr*." msgstr "" #: ../../library/curses.rst:1311 diff --git a/library/enum.po b/library/enum.po index c3474f7c1f..b5b1a9be30 100644 --- a/library/enum.po +++ b/library/enum.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-07 00:17+0000\n" +"POT-Creation-Date: 2023-01-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -854,7 +854,7 @@ msgid "" "call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. " "For *Enum* and *IntEnum* that appropriate value will be the last value plus " "one; for *Flag* and *IntFlag* it will be the first power-of-two greater than " -"the last value; for *StrEnum* it will be the lower-cased version of the " +"the highest value; for *StrEnum* it will be the lower-cased version of the " "member's name. Care must be taken if mixing *auto()* with manually " "specified values." msgstr "" diff --git a/library/functions.po b/library/functions.po index 9ad0322d69..4244b761ca 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-29 00:16+0000\n" -"PO-Revision-Date: 2022-12-26 23:06+0800\n" +"POT-Creation-Date: 2023-01-03 00:16+0000\n" +"PO-Revision-Date: 2023-01-04 14:53+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -483,7 +483,7 @@ msgid "" msgstr "如果不一定需要 \"0b\" 前綴,還可以使用如下的方法。" #: ../../library/functions.rst:140 ../../library/functions.rst:834 -#: ../../library/functions.rst:1147 +#: ../../library/functions.rst:1151 msgid "See also :func:`format` for more information." msgstr "可參考 :func:`format` 獲取更多資訊。" @@ -503,7 +503,7 @@ msgstr "" "``True`` 兩個實例(參見 :ref:`bltin-boolean-values`)。" #: ../../library/functions.rst:154 ../../library/functions.rst:699 -#: ../../library/functions.rst:919 +#: ../../library/functions.rst:923 msgid "*x* is now a positional-only parameter." msgstr "" @@ -891,7 +891,7 @@ msgid "The complex type is described in :ref:`typesnumeric`." msgstr "複數型別在 :ref:`typesnumeric` 中有相關描述。" #: ../../library/functions.rst:392 ../../library/functions.rst:696 -#: ../../library/functions.rst:916 +#: ../../library/functions.rst:920 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "可以使用底線將程式碼文字中的數字進行分組。" @@ -1592,33 +1592,43 @@ msgstr "" #: ../../library/functions.rst:894 msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" -"class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer " -"literal ` in radix *base*. Optionally, the literal can be " -"preceded by ``+`` or ``-`` (with no space in between) and surrounded by " -"whitespace. A base-n literal consists of the digits 0 to n-1, with ``a`` to " -"``z`` (or ``A`` to ``Z``) having values 10 to 35. The default *base* is 10. " -"The allowed values are 0 and 2--36. Base-2, -8, and -16 literals can be " -"optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or ``0x``/``0X``, as " -"with integer literals in code. Base 0 means to interpret exactly as a code " -"literal, so that the actual base is 2, 8, 10, or 16, and so that " -"``int('010', 0)`` is not legal, while ``int('010')`` is, as well as " -"``int('010', 8)``." -msgstr "" -"如果 *x* 不是數字,或者有 *base* 引數,*x* 必須是字串、:class:`bytes`、或進位" -"制為 *base* 的\\ :ref:`整數文字 `\\ 的 :class:`bytearray` 實例。該" -"文字前可以有 ``+`` 或 ``-``\\ (中間不能有空格),前後可以有空格。一個進製為 " -"n 的文字包含 0 到 n-1,其中 ``a`` 到 ``z``\\ (或 ``A`` 到 ``Z`` )表示 10 " -"到 35。預設的 *base* 為 10 。允許的進位制有 0、2–36。2、8、16 進位制的文字可" -"以在程式碼中用 ``0b``/``0B``、``0o``/``0O``、``0x``/``0X`` 前綴來表示,如同程" -"式碼中的整數文字。進位制為 0 將按照程式碼的字面進位制來直譯,最後的結果會是 " -"2、8、10、16 進制中的一個,所以 ``int('010', 0)`` 是非法的,但 " -"``int('010')`` 和 ``int('010', 8)`` 是有效的。" - -#: ../../library/functions.rst:907 +"class:`bytes`, or :class:`bytearray` instance representing an integer in " +"radix *base*. Optionally, the string can be preceded by ``+`` or ``-`` " +"(with no space in between), have leading zeros, be surrounded by whitespace, " +"and have single underscores interspersed between digits." +msgstr "" +"如果 *x* 不是數字或如果有給定 *base*,則 *x* 必須是個字串、:class:`bytes` " +"或 :class:`bytearray` 實例,表示基數 (radix) *base* 中的整數。可選地,字串之" +"前可以有 ``+`` 或 ``-``\\ (中間沒有空格)、可有個前導的零、也可被空格包圍、" +"或在數字間有單一底線。" + +#: ../../library/functions.rst:900 +msgid "" +"A base-n integer string contains digits, each representing a value from 0 to " +"n-1. The values 0--9 can be represented by any Unicode decimal digit. The " +"values 10--35 can be represented by ``a`` to ``z`` (or ``A`` to ``Z``). The " +"default *base* is 10. The allowed bases are 0 and 2--36. Base-2, -8, and -16 " +"strings can be optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or " +"``0x``/``0X``, as with integer literals in code. For base 0, the string is " +"interpreted in a similar way to an :ref:`integer literal in code " +"`, in that the actual base is 2, 8, 10, or 16 as determined by the " +"prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, " +"while ``int('010')`` and ``int('010', 8)`` are." +msgstr "" +"一個 n 進制的整數字串,包含各個代表 0 到 n-1 的數字,0–9 可以用任何 Unicode " +"十進制數字表示,10–35 可以用 ``a`` 到 ``z``\\ (或 ``A`` 到 ``Z``\\ )表示。" +"預設的 *base* 是 10。允許的進位制有 0、2–36。2、8、16 進位制的字串可以在程式" +"碼中用 ``0b``/``0B``、``0o``/``0O``、``0x``/``0X`` 前綴來表示,如同程式碼中的" +"整數文字。進位制為 0 的字串將以和\\ :ref:`程式碼整數字面值 (integer literal " +"in code) ` 類似的方式來直譯,最後由前綴決定的結果會是 2、8、10、16 " +"進制中的一個,所以 ``int('010', 0)`` 是非法的,但 ``int('010')`` 和 " +"``int('010', 8)`` 是有效的。" + +#: ../../library/functions.rst:911 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "整數型別定義請參閱 :ref:`typesnumeric`。" -#: ../../library/functions.rst:909 +#: ../../library/functions.rst:913 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1630,15 +1640,15 @@ msgstr "" "使用 :meth:`base.__int__ ` 而不是 :meth:`base.__index__ " "`。" -#: ../../library/functions.rst:922 +#: ../../library/functions.rst:926 msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." msgstr "" -#: ../../library/functions.rst:925 +#: ../../library/functions.rst:929 msgid "The delegation to :meth:`__trunc__` is deprecated." msgstr "" -#: ../../library/functions.rst:928 +#: ../../library/functions.rst:932 msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " @@ -1648,7 +1658,7 @@ msgid "" "documentation." msgstr "" -#: ../../library/functions.rst:938 +#: ../../library/functions.rst:942 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a " @@ -1688,7 +1698,7 @@ msgstr "" "*class* 是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會" "觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:970 +#: ../../library/functions.rst:974 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1711,18 +1721,18 @@ msgstr "" "帶引數地呼叫 *object*\\ ;如果回傳的結果是 *sentinel* 則觸發 :exc:" "`StopIteration`,否則回傳呼叫結果。" -#: ../../library/functions.rst:983 +#: ../../library/functions.rst:987 msgid "See also :ref:`typeiter`." msgstr "另請參閱 :ref:`typeiter`。" -#: ../../library/functions.rst:985 +#: ../../library/functions.rst:989 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../library/functions.rst:997 +#: ../../library/functions.rst:1001 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1731,13 +1741,13 @@ msgstr "" "回傳物件的長度(元素個數)。引數可以是序列(如 string、bytes、tuple、list 或 " "range)或集合(如 dictionary、set 或 frozen set)。" -#: ../../library/functions.rst:1003 +#: ../../library/functions.rst:1007 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../library/functions.rst:1012 +#: ../../library/functions.rst:1016 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1745,7 +1755,7 @@ msgstr "" "除了是函式,:class:`list` 也是可變序列型別,詳情請參閱 :ref:`typesseq-list` " "和 :ref:`typesseq`。" -#: ../../library/functions.rst:1018 +#: ../../library/functions.rst:1022 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1756,7 +1766,7 @@ msgstr "" "叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,\\ :func:" "`locals` 和 :func:`globals` 是相同的 dictionary。" -#: ../../library/functions.rst:1024 +#: ../../library/functions.rst:1028 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1764,7 +1774,7 @@ msgstr "" "此 dictionary 的內容不應該被更動;更改可能不會影響直譯器使用的本地變數或自由" "變數的值。" -#: ../../library/functions.rst:1029 +#: ../../library/functions.rst:1033 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1779,13 +1789,13 @@ msgstr "" "iteratable 耗盡時 iterator 也會結束。如果函式的輸入已經是 tuple 的引數,請參" "閱 :func:`itertools.starmap`\\。" -#: ../../library/functions.rst:1041 +#: ../../library/functions.rst:1045 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "回傳 iterable 中最大的元素,或者回傳兩個及以上引數中最大的。" -#: ../../library/functions.rst:1044 +#: ../../library/functions.rst:1048 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1794,7 +1804,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是個 :term:`iterable`,iterable 中最大的元素" "會被回傳。如果提供了兩個或以上的位置引數,則回傳最大的位置引數。" -#: ../../library/functions.rst:1049 ../../library/functions.rst:1087 +#: ../../library/functions.rst:1053 ../../library/functions.rst:1091 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1806,7 +1816,7 @@ msgstr "" "式,如同 :meth:`list.sort` 使用方式。*default* 引數是當 iterable 為空時回傳的" "值。如果 iterable 為空,並且沒有提供 *default*,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:1055 +#: ../../library/functions.rst:1059 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1817,15 +1827,15 @@ msgstr "" "``sorted(iterable, key=keyfunc, reverse=True)[0]`` 和 ``heapq.nlargest(1, " "iterable, key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1060 ../../library/functions.rst:1098 +#: ../../library/functions.rst:1064 ../../library/functions.rst:1102 msgid "The *default* keyword-only argument." msgstr "*default* 僅限關鍵字引數。" -#: ../../library/functions.rst:1063 ../../library/functions.rst:1101 +#: ../../library/functions.rst:1067 ../../library/functions.rst:1105 msgid "The *key* can be ``None``." msgstr "" -#: ../../library/functions.rst:1071 +#: ../../library/functions.rst:1075 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1833,13 +1843,13 @@ msgstr "" "回傳由給定的引數建立之 \"memory view\" 物件。有關詳細資訊,請參閱 :ref:" "`typememoryview`。" -#: ../../library/functions.rst:1079 +#: ../../library/functions.rst:1083 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "回傳 iterable 中最小的元素,或者回傳兩個及以上引數中最小的。" -#: ../../library/functions.rst:1082 +#: ../../library/functions.rst:1086 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1848,7 +1858,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是 :term:`iterable`,iterable 中最小的元素會" "被回傳。如果提供了兩個或以上的位置引數,則回傳最小的位置引數。" -#: ../../library/functions.rst:1093 +#: ../../library/functions.rst:1097 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1859,7 +1869,7 @@ msgstr "" "``sorted(iterable, key=keyfunc)[0]`` 和 ``heapq.nsmallest(1, iterable, " "key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1108 +#: ../../library/functions.rst:1112 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " @@ -1869,7 +1879,7 @@ msgstr "" "素。如果 iterator 耗盡,則回傳給定的預設值 *default*,如果沒有預設值則觸發 :" "exc:`StopIteration`。" -#: ../../library/functions.rst:1115 +#: ../../library/functions.rst:1119 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has methods that are common to all instances of Python classes. This " @@ -1878,7 +1888,7 @@ msgstr "" "回傳一個沒有特徵的新物件。:class:`object` 是所有 class 的基礎,它具有所有 " "Python class 實例的通用 method。這個函式不接受任何引數。" -#: ../../library/functions.rst:1121 +#: ../../library/functions.rst:1125 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1886,7 +1896,7 @@ msgstr "" "由於 :class:`object` *沒有* :attr:`~object.__dict__`,因此無法將任意屬性賦" "給 :class:`object` class 的實例。" -#: ../../library/functions.rst:1127 +#: ../../library/functions.rst:1131 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1897,7 +1907,7 @@ msgstr "" "Python 運算式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`__index__` method 回傳一個整數。舉例來說:" -#: ../../library/functions.rst:1137 +#: ../../library/functions.rst:1141 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." @@ -1905,7 +1915,7 @@ msgstr "" "如果要將整數轉換為八進位制字串,不論是否具備 \"0o\" 前綴,都可以使用下面的方" "法。" -#: ../../library/functions.rst:1154 +#: ../../library/functions.rst:1158 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -1914,7 +1924,7 @@ msgstr "" "開啟 *file* 並回傳對應的 :term:`file object`。如果該檔案不能開啟,則觸發 :" "exc:`OSError`。關於使用此函式的更多方法請參閱\\ :ref:`tut-files`。" -#: ../../library/functions.rst:1158 +#: ../../library/functions.rst:1162 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -1927,7 +1937,7 @@ msgstr "" "果有提供檔案描述器,它會隨著回傳的 I/O 物件關閉而關閉,除非 *closefd* 被設為 " "``False``。)" -#: ../../library/functions.rst:1164 +#: ../../library/functions.rst:1168 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -1948,71 +1958,71 @@ msgstr "" "getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 bytes,請使用二進位制" "模式且不要指定 *encoding*。)可用的模式有:" -#: ../../library/functions.rst:1181 +#: ../../library/functions.rst:1185 msgid "Character" msgstr "字元" -#: ../../library/functions.rst:1181 +#: ../../library/functions.rst:1185 msgid "Meaning" msgstr "意義" -#: ../../library/functions.rst:1183 +#: ../../library/functions.rst:1187 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/functions.rst:1183 +#: ../../library/functions.rst:1187 msgid "open for reading (default)" msgstr "讀取(預設)" -#: ../../library/functions.rst:1184 +#: ../../library/functions.rst:1188 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/functions.rst:1184 +#: ../../library/functions.rst:1188 msgid "open for writing, truncating the file first" msgstr "" -#: ../../library/functions.rst:1185 +#: ../../library/functions.rst:1189 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/functions.rst:1185 +#: ../../library/functions.rst:1189 msgid "open for exclusive creation, failing if the file already exists" msgstr "唯一性創建,如果文件已存在則會失敗" -#: ../../library/functions.rst:1186 +#: ../../library/functions.rst:1190 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/functions.rst:1186 +#: ../../library/functions.rst:1190 msgid "open for writing, appending to the end of file if it exists" msgstr "寫入,如果文件存在則在末尾追加寫入內容" -#: ../../library/functions.rst:1187 +#: ../../library/functions.rst:1191 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/functions.rst:1187 +#: ../../library/functions.rst:1191 msgid "binary mode" msgstr "二進制模式" -#: ../../library/functions.rst:1188 +#: ../../library/functions.rst:1192 msgid "``'t'``" msgstr "``'t'``" -#: ../../library/functions.rst:1188 +#: ../../library/functions.rst:1192 msgid "text mode (default)" msgstr "文字模式(預設)" -#: ../../library/functions.rst:1189 +#: ../../library/functions.rst:1193 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/functions.rst:1189 +#: ../../library/functions.rst:1193 msgid "open for updating (reading and writing)" msgstr "更新(讀取並寫入)" -#: ../../library/functions.rst:1192 +#: ../../library/functions.rst:1196 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2021,7 +2031,7 @@ msgstr "" "預設的模式是 ``'r'``\\ (開啟並讀取文字,同 ``'rt'``)。對於二進位制寫入," "``'w+b'`` 模式開啟並把檔案內容變成 0 bytes,``'r+b'`` 則不會捨棄原始內容。" -#: ../../library/functions.rst:1196 +#: ../../library/functions.rst:1200 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2032,14 +2042,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../library/functions.rst:1206 +#: ../../library/functions.rst:1210 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../library/functions.rst:1210 +#: ../../library/functions.rst:1214 msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " @@ -2052,7 +2062,7 @@ msgid "" "given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1220 +#: ../../library/functions.rst:1224 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2060,14 +2070,14 @@ msgid "" "the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1225 +#: ../../library/functions.rst:1229 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../library/functions.rst:1229 +#: ../../library/functions.rst:1233 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2076,7 +2086,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1235 +#: ../../library/functions.rst:1239 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2085,25 +2095,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1243 +#: ../../library/functions.rst:1247 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." msgstr "" -#: ../../library/functions.rst:1247 +#: ../../library/functions.rst:1251 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1250 +#: ../../library/functions.rst:1254 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1253 +#: ../../library/functions.rst:1257 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2112,33 +2122,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1260 +#: ../../library/functions.rst:1264 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " "character reference ``&#nnn;``." msgstr "" -#: ../../library/functions.rst:1264 +#: ../../library/functions.rst:1268 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1267 +#: ../../library/functions.rst:1271 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1275 +#: ../../library/functions.rst:1279 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " "follows:" msgstr "" -#: ../../library/functions.rst:1279 +#: ../../library/functions.rst:1283 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2149,7 +2159,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1287 +#: ../../library/functions.rst:1291 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2158,7 +2168,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1293 +#: ../../library/functions.rst:1297 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2166,7 +2176,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1298 +#: ../../library/functions.rst:1302 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2175,11 +2185,11 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1304 +#: ../../library/functions.rst:1308 msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是\\ :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1306 +#: ../../library/functions.rst:1310 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2189,7 +2199,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:1319 +#: ../../library/functions.rst:1323 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2204,7 +2214,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1340 +#: ../../library/functions.rst:1344 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2220,25 +2230,25 @@ msgid "" "``mode``, ``flags``." msgstr "" -#: ../../library/functions.rst:1346 +#: ../../library/functions.rst:1350 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1351 +#: ../../library/functions.rst:1355 msgid "The *opener* parameter was added." msgstr "增加了 *opener* 參數。" -#: ../../library/functions.rst:1352 +#: ../../library/functions.rst:1356 msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1353 +#: ../../library/functions.rst:1357 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1354 +#: ../../library/functions.rst:1358 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2246,11 +2256,11 @@ msgstr "" "如果檔案已存在但使用了唯一性建立模式 (\\ ``'x'``\\ ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1359 +#: ../../library/functions.rst:1363 msgid "The file is now non-inheritable." msgstr "檔案在當前版本開始禁止繼承。" -#: ../../library/functions.rst:1363 +#: ../../library/functions.rst:1367 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2259,15 +2269,15 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程序沒有觸發例外,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError`\\ (原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1366 +#: ../../library/functions.rst:1370 msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理程式。" -#: ../../library/functions.rst:1370 +#: ../../library/functions.rst:1374 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1371 +#: ../../library/functions.rst:1375 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2275,11 +2285,11 @@ msgstr "" "在 Windows 上,開啟一個控制臺緩衝區可能會回傳 :class:`io.RawIOBase` 的 " "subclass,而不是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1374 +#: ../../library/functions.rst:1378 msgid "The ``'U'`` mode has been removed." msgstr "``'U'`` 模式被移除。" -#: ../../library/functions.rst:1379 +#: ../../library/functions.rst:1383 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2290,7 +2300,7 @@ msgstr "" "``ord('a')`` 回傳整數 ``97``、\\ ``ord('€')``\\ (歐元符號)回傳 ``8364``。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1387 +#: ../../library/functions.rst:1391 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2301,7 +2311,7 @@ msgstr "" "*mod* 取餘數(比直接呼叫 ``pow(base, exp) % mod`` 計算更高效)。兩個引數形式" "的 ``pow(exp, exp)`` 等價於次方運算子:``base**exp``。" -#: ../../library/functions.rst:1392 +#: ../../library/functions.rst:1396 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2314,7 +2324,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1402 +#: ../../library/functions.rst:1406 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2323,29 +2333,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1408 +#: ../../library/functions.rst:1412 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1415 +#: ../../library/functions.rst:1419 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../library/functions.rst:1420 +#: ../../library/functions.rst:1424 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1427 +#: ../../library/functions.rst:1431 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../library/functions.rst:1431 +#: ../../library/functions.rst:1435 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2354,7 +2364,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1437 +#: ../../library/functions.rst:1441 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2362,38 +2372,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1442 +#: ../../library/functions.rst:1446 msgid "" "Whether the output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1445 +#: ../../library/functions.rst:1449 msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* 關鍵字引數。" -#: ../../library/functions.rst:1451 +#: ../../library/functions.rst:1455 msgid "Return a property attribute." msgstr "回傳 property 屬性。" -#: ../../library/functions.rst:1453 +#: ../../library/functions.rst:1457 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../library/functions.rst:1457 +#: ../../library/functions.rst:1461 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1474 +#: ../../library/functions.rst:1478 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../library/functions.rst:1477 +#: ../../library/functions.rst:1481 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2401,14 +2411,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1490 +#: ../../library/functions.rst:1494 msgid "" "The ``@property`` decorator turns the :meth:`voltage` method into a " "\"getter\" for a read-only attribute with the same name, and it sets the " "docstring for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../library/functions.rst:1494 +#: ../../library/functions.rst:1498 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2416,30 +2426,30 @@ msgid "" "decorated function. This is best explained with an example::" msgstr "" -#: ../../library/functions.rst:1516 +#: ../../library/functions.rst:1520 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../library/functions.rst:1520 +#: ../../library/functions.rst:1524 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1523 +#: ../../library/functions.rst:1527 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1532 +#: ../../library/functions.rst:1536 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1538 +#: ../../library/functions.rst:1542 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2452,7 +2462,7 @@ msgid "" "`RuntimeError`." msgstr "" -#: ../../library/functions.rst:1551 +#: ../../library/functions.rst:1555 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2460,14 +2470,14 @@ msgid "" "starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1559 +#: ../../library/functions.rst:1563 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../library/functions.rst:1563 +#: ../../library/functions.rst:1567 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2478,13 +2488,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1572 +#: ../../library/functions.rst:1576 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1577 +#: ../../library/functions.rst:1581 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2493,21 +2503,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1589 +#: ../../library/functions.rst:1593 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../library/functions.rst:1593 +#: ../../library/functions.rst:1597 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../library/functions.rst:1600 +#: ../../library/functions.rst:1604 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2516,7 +2526,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../library/functions.rst:1606 +#: ../../library/functions.rst:1610 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2525,14 +2535,14 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../library/functions.rst:1614 +#: ../../library/functions.rst:1618 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: ../../library/functions.rst:1623 +#: ../../library/functions.rst:1627 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -2545,35 +2555,35 @@ msgid "" "func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" -#: ../../library/functions.rst:1636 +#: ../../library/functions.rst:1640 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1638 +#: ../../library/functions.rst:1642 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性引數,只能使用關鍵字引數來指定。" -#: ../../library/functions.rst:1640 +#: ../../library/functions.rst:1644 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../library/functions.rst:1644 +#: ../../library/functions.rst:1648 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/functions.rst:1647 +#: ../../library/functions.rst:1651 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1650 +#: ../../library/functions.rst:1654 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2581,7 +2591,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1655 +#: ../../library/functions.rst:1659 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2593,22 +2603,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1664 +#: ../../library/functions.rst:1668 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1668 +#: ../../library/functions.rst:1672 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1670 +#: ../../library/functions.rst:1674 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1677 +#: ../../library/functions.rst:1681 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2616,21 +2626,21 @@ msgstr "" "``@staticmethod`` 語法是一個函式 :term:`decorator` - 參見 :ref:`function` 中" "的詳細介紹。" -#: ../../library/functions.rst:1680 +#: ../../library/functions.rst:1684 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, they can be called as regular " "functions (such as ``f()``)." msgstr "" -#: ../../library/functions.rst:1684 +#: ../../library/functions.rst:1688 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../library/functions.rst:1688 +#: ../../library/functions.rst:1692 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2639,36 +2649,36 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1700 +#: ../../library/functions.rst:1704 msgid "For more information on static methods, see :ref:`types`." msgstr "關於 static method 的更多資訊,請參考 :ref:`types`。" -#: ../../library/functions.rst:1702 +#: ../../library/functions.rst:1706 msgid "" "Static methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " "new ``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../library/functions.rst:1717 +#: ../../library/functions.rst:1721 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1719 +#: ../../library/functions.rst:1723 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1725 +#: ../../library/functions.rst:1729 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../library/functions.rst:1729 +#: ../../library/functions.rst:1733 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2677,31 +2687,31 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1735 +#: ../../library/functions.rst:1739 msgid "The *start* parameter can be specified as a keyword argument." msgstr "*start* 參數可被指定為關鍵字引數。" -#: ../../library/functions.rst:1741 +#: ../../library/functions.rst:1745 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../library/functions.rst:1745 +#: ../../library/functions.rst:1749 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../library/functions.rst:1749 +#: ../../library/functions.rst:1753 msgid "" "For example, if :attr:`~class.__mro__` of *object_or_type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../library/functions.rst:1753 +#: ../../library/functions.rst:1757 msgid "" "The :attr:`~class.__mro__` attribute of the *object_or_type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2709,7 +2719,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1758 +#: ../../library/functions.rst:1762 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2717,7 +2727,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1763 +#: ../../library/functions.rst:1767 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2725,7 +2735,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1768 +#: ../../library/functions.rst:1772 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2738,18 +2748,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1778 +#: ../../library/functions.rst:1782 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1785 +#: ../../library/functions.rst:1789 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../library/functions.rst:1789 +#: ../../library/functions.rst:1793 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2759,7 +2769,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1796 +#: ../../library/functions.rst:1800 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -2769,33 +2779,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1803 +#: ../../library/functions.rst:1807 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1813 +#: ../../library/functions.rst:1817 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1822 +#: ../../library/functions.rst:1826 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__ `." msgstr "" -#: ../../library/functions.rst:1826 +#: ../../library/functions.rst:1830 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../library/functions.rst:1830 +#: ../../library/functions.rst:1834 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2808,11 +2818,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1845 +#: ../../library/functions.rst:1849 msgid "See also :ref:`bltin-type-objects`." msgstr "另請參閱 :ref:`bltin-type-objects`。" -#: ../../library/functions.rst:1847 +#: ../../library/functions.rst:1851 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2820,23 +2830,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1852 +#: ../../library/functions.rst:1856 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1854 +#: ../../library/functions.rst:1858 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../library/functions.rst:1861 +#: ../../library/functions.rst:1865 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." msgstr "" -#: ../../library/functions.rst:1864 +#: ../../library/functions.rst:1868 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2844,54 +2854,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1869 +#: ../../library/functions.rst:1873 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " "dictionary are ignored." msgstr "" -#: ../../library/functions.rst:1873 +#: ../../library/functions.rst:1877 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: ../../library/functions.rst:1879 +#: ../../library/functions.rst:1883 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1882 +#: ../../library/functions.rst:1886 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1891 +#: ../../library/functions.rst:1895 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../library/functions.rst:1894 +#: ../../library/functions.rst:1898 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " "columns into rows. This is similar to `transposing a matrix `_." msgstr "" -#: ../../library/functions.rst:1898 +#: ../../library/functions.rst:1902 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " "iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" "`list`." msgstr "" -#: ../../library/functions.rst:1902 +#: ../../library/functions.rst:1906 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -2899,51 +2909,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1907 +#: ../../library/functions.rst:1911 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " "result to the length of the shortest iterable::" msgstr "" -#: ../../library/functions.rst:1914 +#: ../../library/functions.rst:1918 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " "option. Its output is the same as regular :func:`zip`::" msgstr "" -#: ../../library/functions.rst:1921 +#: ../../library/functions.rst:1925 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../library/functions.rst:1939 +#: ../../library/functions.rst:1943 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " "bug in another part of the program." msgstr "" -#: ../../library/functions.rst:1943 +#: ../../library/functions.rst:1947 msgid "" "Shorter iterables can be padded with a constant value to make all the " "iterables have the same length. This is done by :func:`itertools." "zip_longest`." msgstr "" -#: ../../library/functions.rst:1947 +#: ../../library/functions.rst:1951 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." msgstr "" -#: ../../library/functions.rst:1950 +#: ../../library/functions.rst:1954 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:1952 +#: ../../library/functions.rst:1956 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -2952,23 +2962,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:1958 +#: ../../library/functions.rst:1962 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:1969 +#: ../../library/functions.rst:1973 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 引數。" -#: ../../library/functions.rst:1981 +#: ../../library/functions.rst:1985 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1984 +#: ../../library/functions.rst:1988 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -2980,7 +2990,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1993 +#: ../../library/functions.rst:1997 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -2990,7 +3000,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2000 +#: ../../library/functions.rst:2004 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -2999,7 +3009,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:2006 +#: ../../library/functions.rst:2010 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3007,58 +3017,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:2011 +#: ../../library/functions.rst:2015 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:2016 +#: ../../library/functions.rst:2020 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:2020 +#: ../../library/functions.rst:2024 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2023 +#: ../../library/functions.rst:2027 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:2030 +#: ../../library/functions.rst:2034 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../library/functions.rst:2034 +#: ../../library/functions.rst:2038 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2037 +#: ../../library/functions.rst:2041 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:2041 +#: ../../library/functions.rst:2045 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../library/functions.rst:2046 +#: ../../library/functions.rst:2050 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:2047 +#: ../../library/functions.rst:2051 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " diff --git a/library/socket.po b/library/socket.po index c9f51081a8..ec0fa39d7d 100644 --- a/library/socket.po +++ b/library/socket.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-01-02 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -888,7 +888,7 @@ msgstr "" #: ../../library/socket.rst:719 msgid "" "*family* should be either :data:`AF_INET` or :data:`AF_INET6`. *backlog* is " -"the queue size passed to :meth:`socket.listen`; when ``0`` a default " +"the queue size passed to :meth:`socket.listen`; if not specified , a default " "reasonable value is chosen. *reuse_port* dictates whether to set the :data:" "`SO_REUSEPORT` socket option." msgstr "" @@ -1743,8 +1743,8 @@ msgstr "" #: ../../library/socket.rst:1530 msgid "" -"For multicast IPv6 address, first item of *address* does not contain ``" -"%scope_id`` part anymore. In order to get full IPv6 address use :func:" +"For multicast IPv6 address, first item of *address* does not contain " +"``%scope_id`` part anymore. In order to get full IPv6 address use :func:" "`getnameinfo`." msgstr "" diff --git a/library/sqlite3.po b/library/sqlite3.po index 00e2b0c83d..0dbc82d770 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-09 00:17+0000\n" +"POT-Creation-Date: 2023-01-02 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -236,7 +236,7 @@ msgstr ":ref:`sqlite3-adapters`" msgid ":ref:`sqlite3-converters`" msgstr ":ref:`sqlite3-converters`" -#: ../../library/sqlite3.rst:241 ../../library/sqlite3.rst:558 +#: ../../library/sqlite3.rst:241 ../../library/sqlite3.rst:554 msgid ":ref:`sqlite3-connection-context-manager`" msgstr ":ref:`sqlite3-connection-context-manager`" @@ -483,25 +483,21 @@ msgid "" msgstr "" #: ../../library/sqlite3.rst:479 -msgid "" -"The :mod:`!sqlite3` module supports ``qmark``, ``numeric``, and ``named`` DB-" -"API parameter styles, because that is what the underlying SQLite library " -"supports. However, the DB-API does not allow multiple values for the " -"``paramstyle`` attribute." +msgid "The ``named`` DB-API parameter style is also supported." msgstr "" -#: ../../library/sqlite3.rst:487 +#: ../../library/sqlite3.rst:483 msgid "" "Version number of the runtime SQLite library as a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:491 +#: ../../library/sqlite3.rst:487 msgid "" "Version number of the runtime SQLite library as a :class:`tuple` of :class:" "`integers `." msgstr "" -#: ../../library/sqlite3.rst:496 +#: ../../library/sqlite3.rst:492 msgid "" "Integer constant required by the DB-API 2.0, stating the level of thread " "safety the :mod:`!sqlite3` module supports. This attribute is set based on " @@ -509,154 +505,154 @@ msgid "" "underlying SQLite library is compiled with. The SQLite threading modes are:" msgstr "" -#: ../../library/sqlite3.rst:501 +#: ../../library/sqlite3.rst:497 msgid "" "**Single-thread**: In this mode, all mutexes are disabled and SQLite is " "unsafe to use in more than a single thread at once." msgstr "" -#: ../../library/sqlite3.rst:503 +#: ../../library/sqlite3.rst:499 msgid "" "**Multi-thread**: In this mode, SQLite can be safely used by multiple " "threads provided that no single database connection is used simultaneously " "in two or more threads." msgstr "" -#: ../../library/sqlite3.rst:506 +#: ../../library/sqlite3.rst:502 msgid "" "**Serialized**: In serialized mode, SQLite can be safely used by multiple " "threads with no restriction." msgstr "" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:505 msgid "" "The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels " "are as follows:" msgstr "" -#: ../../library/sqlite3.rst:513 +#: ../../library/sqlite3.rst:509 msgid "SQLite threading mode" msgstr "" -#: ../../library/sqlite3.rst:513 +#: ../../library/sqlite3.rst:509 msgid "`threadsafety`_" msgstr "`threadsafety`_" -#: ../../library/sqlite3.rst:513 +#: ../../library/sqlite3.rst:509 msgid "`SQLITE_THREADSAFE`_" msgstr "`SQLITE_THREADSAFE`_" -#: ../../library/sqlite3.rst:513 +#: ../../library/sqlite3.rst:509 msgid "DB-API 2.0 meaning" msgstr "" -#: ../../library/sqlite3.rst:516 +#: ../../library/sqlite3.rst:512 msgid "single-thread" msgstr "" -#: ../../library/sqlite3.rst:516 +#: ../../library/sqlite3.rst:512 msgid "0" msgstr "0" -#: ../../library/sqlite3.rst:516 +#: ../../library/sqlite3.rst:512 msgid "Threads may not share the module" msgstr "" -#: ../../library/sqlite3.rst:519 +#: ../../library/sqlite3.rst:515 msgid "multi-thread" msgstr "" -#: ../../library/sqlite3.rst:519 ../../library/sqlite3.rst:522 +#: ../../library/sqlite3.rst:515 ../../library/sqlite3.rst:518 msgid "1" msgstr "1" -#: ../../library/sqlite3.rst:519 +#: ../../library/sqlite3.rst:515 msgid "2" msgstr "2" -#: ../../library/sqlite3.rst:519 +#: ../../library/sqlite3.rst:515 msgid "Threads may share the module, but not connections" msgstr "" -#: ../../library/sqlite3.rst:522 +#: ../../library/sqlite3.rst:518 msgid "serialized" msgstr "" -#: ../../library/sqlite3.rst:522 +#: ../../library/sqlite3.rst:518 msgid "3" msgstr "3" -#: ../../library/sqlite3.rst:522 +#: ../../library/sqlite3.rst:518 msgid "Threads may share the module, connections and cursors" msgstr "" -#: ../../library/sqlite3.rst:529 +#: ../../library/sqlite3.rst:525 msgid "Set *threadsafety* dynamically instead of hard-coding it to ``1``." msgstr "" -#: ../../library/sqlite3.rst:534 +#: ../../library/sqlite3.rst:530 msgid "" "Version number of this module as a :class:`string `. This is not the " "version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:539 +#: ../../library/sqlite3.rst:535 msgid "" "Version number of this module as a :class:`tuple` of :class:`integers " "`. This is not the version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:546 +#: ../../library/sqlite3.rst:542 msgid "Connection objects" msgstr "" -#: ../../library/sqlite3.rst:550 +#: ../../library/sqlite3.rst:546 msgid "" "Each open SQLite database is represented by a ``Connection`` object, which " "is created using :func:`sqlite3.connect`. Their main purpose is creating :" "class:`Cursor` objects, and :ref:`sqlite3-controlling-transactions`." msgstr "" -#: ../../library/sqlite3.rst:557 +#: ../../library/sqlite3.rst:553 msgid ":ref:`sqlite3-connection-shortcuts`" msgstr ":ref:`sqlite3-connection-shortcuts`" -#: ../../library/sqlite3.rst:560 +#: ../../library/sqlite3.rst:556 msgid "An SQLite database connection has the following attributes and methods:" msgstr "" -#: ../../library/sqlite3.rst:564 +#: ../../library/sqlite3.rst:560 msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a callable " "returning an instance of :class:`Cursor` or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:571 +#: ../../library/sqlite3.rst:567 msgid "" "Open a :class:`Blob` handle to an existing :abbr:`BLOB (Binary Large " "OBject)`." msgstr "" -#: ../../library/sqlite3.rst:574 +#: ../../library/sqlite3.rst:570 msgid "The name of the table where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:577 +#: ../../library/sqlite3.rst:573 msgid "The name of the column where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:580 +#: ../../library/sqlite3.rst:576 msgid "The name of the row where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:583 +#: ../../library/sqlite3.rst:579 msgid "" "Set to ``True`` if the blob should be opened without write permissions. " "Defaults to ``False``." msgstr "" -#: ../../library/sqlite3.rst:588 +#: ../../library/sqlite3.rst:584 msgid "" "The name of the database where the blob is located. Defaults to ``\"main\"``." msgstr "" @@ -665,111 +661,111 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/sqlite3.rst:592 +#: ../../library/sqlite3.rst:588 msgid "When trying to open a blob in a ``WITHOUT ROWID`` table." msgstr "" -#: ../../library/sqlite3.rst:599 +#: ../../library/sqlite3.rst:595 msgid "" "The blob size cannot be changed using the :class:`Blob` class. Use the SQL " "function ``zeroblob`` to create a blob with a fixed size." msgstr "" -#: ../../library/sqlite3.rst:606 +#: ../../library/sqlite3.rst:602 msgid "" "Commit any pending transaction to the database. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:611 +#: ../../library/sqlite3.rst:607 msgid "" "Roll back to the start of any pending transaction. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:616 +#: ../../library/sqlite3.rst:612 msgid "" "Close the database connection. Any pending transaction is not committed " "implicitly; make sure to :meth:`commit` before closing to avoid losing " "pending changes." msgstr "" -#: ../../library/sqlite3.rst:623 +#: ../../library/sqlite3.rst:619 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:629 +#: ../../library/sqlite3.rst:625 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:635 +#: ../../library/sqlite3.rst:631 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:641 +#: ../../library/sqlite3.rst:637 msgid "Create or remove a user-defined SQL function." msgstr "" -#: ../../library/sqlite3.rst:643 +#: ../../library/sqlite3.rst:639 msgid "The name of the SQL function." msgstr "" -#: ../../library/sqlite3.rst:646 +#: ../../library/sqlite3.rst:642 msgid "" "The number of arguments the SQL function can accept. If ``-1``, it may take " "any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:650 +#: ../../library/sqlite3.rst:646 msgid "" "A callable that is called when the SQL function is invoked. The callable " "must return :ref:`a type natively supported by SQLite `. Set " "to ``None`` to remove an existing SQL function." msgstr "" -#: ../../library/sqlite3.rst:657 +#: ../../library/sqlite3.rst:653 msgid "" "If ``True``, the created SQL function is marked as `deterministic `_, which allows SQLite to perform additional " "optimizations." msgstr "" -#: ../../library/sqlite3.rst:662 +#: ../../library/sqlite3.rst:658 msgid "If *deterministic* is used with SQLite versions older than 3.8.3." msgstr "" -#: ../../library/sqlite3.rst:665 +#: ../../library/sqlite3.rst:661 msgid "The *deterministic* parameter." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:668 ../../library/sqlite3.rst:706 -#: ../../library/sqlite3.rst:769 ../../library/sqlite3.rst:1020 -#: ../../library/sqlite3.rst:1257 ../../library/sqlite3.rst:1363 -#: ../../library/sqlite3.rst:1384 +#: ../../library/sqlite3.rst:664 ../../library/sqlite3.rst:702 +#: ../../library/sqlite3.rst:765 ../../library/sqlite3.rst:1016 +#: ../../library/sqlite3.rst:1253 ../../library/sqlite3.rst:1359 +#: ../../library/sqlite3.rst:1380 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:684 +#: ../../library/sqlite3.rst:680 msgid "Create or remove a user-defined SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:686 +#: ../../library/sqlite3.rst:682 msgid "The name of the SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:689 +#: ../../library/sqlite3.rst:685 msgid "" "The number of arguments the SQL aggregate function can accept. If ``-1``, it " "may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:693 +#: ../../library/sqlite3.rst:689 msgid "" "A class must implement the following methods: * ``step()``: Add a row to " "the aggregate. * ``finalize()``: Return the final result of the aggregate " @@ -778,45 +774,45 @@ msgid "" "*n_arg*. Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:694 +#: ../../library/sqlite3.rst:690 msgid "A class must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:696 +#: ../../library/sqlite3.rst:692 msgid "``step()``: Add a row to the aggregate." msgstr "" -#: ../../library/sqlite3.rst:697 ../../library/sqlite3.rst:753 +#: ../../library/sqlite3.rst:693 ../../library/sqlite3.rst:749 msgid "" "``finalize()``: Return the final result of the aggregate as :ref:`a type " "natively supported by SQLite `." msgstr "" -#: ../../library/sqlite3.rst:700 +#: ../../library/sqlite3.rst:696 msgid "" "The number of arguments that the ``step()`` method must accept is controlled " "by *n_arg*." msgstr "" -#: ../../library/sqlite3.rst:703 +#: ../../library/sqlite3.rst:699 msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:738 +#: ../../library/sqlite3.rst:734 msgid "Create or remove a user-defined aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:740 +#: ../../library/sqlite3.rst:736 msgid "The name of the SQL aggregate window function to create or remove." msgstr "" -#: ../../library/sqlite3.rst:743 +#: ../../library/sqlite3.rst:739 msgid "" "The number of arguments the SQL aggregate window function can accept. If " "``-1``, it may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:747 +#: ../../library/sqlite3.rst:743 msgid "" "A class that must implement the following methods: * ``step()``: Add a row " "to the current window. * ``value()``: Return the current value of the " @@ -828,78 +824,78 @@ msgid "" "function." msgstr "" -#: ../../library/sqlite3.rst:748 +#: ../../library/sqlite3.rst:744 msgid "A class that must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:750 +#: ../../library/sqlite3.rst:746 msgid "``step()``: Add a row to the current window." msgstr "" -#: ../../library/sqlite3.rst:751 +#: ../../library/sqlite3.rst:747 msgid "``value()``: Return the current value of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:752 +#: ../../library/sqlite3.rst:748 msgid "``inverse()``: Remove a row from the current window." msgstr "" -#: ../../library/sqlite3.rst:756 +#: ../../library/sqlite3.rst:752 msgid "" "The number of arguments that the ``step()`` and ``value()`` methods must " "accept is controlled by *num_params*." msgstr "" -#: ../../library/sqlite3.rst:759 +#: ../../library/sqlite3.rst:755 msgid "Set to ``None`` to remove an existing SQL aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:761 +#: ../../library/sqlite3.rst:757 msgid "" "If used with a version of SQLite older than 3.25.0, which does not support " "aggregate window functions." msgstr "" -#: ../../library/sqlite3.rst:824 +#: ../../library/sqlite3.rst:820 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:824 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:829 +#: ../../library/sqlite3.rst:825 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:830 +#: ../../library/sqlite3.rst:826 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:832 +#: ../../library/sqlite3.rst:828 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:860 +#: ../../library/sqlite3.rst:856 msgid "Remove a collation function by setting *callable* to ``None``." msgstr "" -#: ../../library/sqlite3.rst:862 +#: ../../library/sqlite3.rst:858 msgid "" "The collation name can contain any Unicode character. Earlier, only ASCII " "characters were allowed." msgstr "" -#: ../../library/sqlite3.rst:869 +#: ../../library/sqlite3.rst:865 msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an exception." msgstr "" -#: ../../library/sqlite3.rst:876 +#: ../../library/sqlite3.rst:872 msgid "" "Register callable *authorizer_callback* to be invoked for each attempt to " "access a column of a table in the database. The callback should return one " @@ -908,7 +904,7 @@ msgid "" "library." msgstr "" -#: ../../library/sqlite3.rst:882 +#: ../../library/sqlite3.rst:878 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or ``None`` " @@ -918,7 +914,7 @@ msgid "" "attempt or ``None`` if this access attempt is directly from input SQL code." msgstr "" -#: ../../library/sqlite3.rst:889 +#: ../../library/sqlite3.rst:885 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -926,15 +922,15 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:893 +#: ../../library/sqlite3.rst:889 msgid "Passing ``None`` as *authorizer_callback* will disable the authorizer." msgstr "" -#: ../../library/sqlite3.rst:895 +#: ../../library/sqlite3.rst:891 msgid "Added support for disabling the authorizer using ``None``." msgstr "" -#: ../../library/sqlite3.rst:901 +#: ../../library/sqlite3.rst:897 msgid "" "Register callable *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -942,26 +938,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:906 +#: ../../library/sqlite3.rst:902 msgid "" "If you want to clear any previously installed progress handler, call the " "method with ``None`` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:909 +#: ../../library/sqlite3.rst:905 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:916 +#: ../../library/sqlite3.rst:912 msgid "" "Register callable *trace_callback* to be invoked for each SQL statement that " "is actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:919 +#: ../../library/sqlite3.rst:915 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -971,18 +967,18 @@ msgid "" "execution of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:927 +#: ../../library/sqlite3.rst:923 msgid "Passing ``None`` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:930 +#: ../../library/sqlite3.rst:926 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:940 +#: ../../library/sqlite3.rst:936 msgid "" "Enable the SQLite engine to load SQLite extensions from shared libraries if " "*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite " @@ -991,7 +987,7 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:949 +#: ../../library/sqlite3.rst:945 msgid "" "The :mod:`!sqlite3` module is not built with loadable extension support by " "default, because some platforms (notably macOS) have SQLite libraries which " @@ -1006,11 +1002,11 @@ msgid "" "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:960 +#: ../../library/sqlite3.rst:956 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:1003 +#: ../../library/sqlite3.rst:999 msgid "" "Load an SQLite extension from a shared library located at *path*. Enable " "extension loading with :meth:`enable_load_extension` before calling this " @@ -1023,38 +1019,38 @@ msgid "" "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:1011 +#: ../../library/sqlite3.rst:1007 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:1016 +#: ../../library/sqlite3.rst:1012 msgid "" "Return an :term:`iterator` to dump the database as SQL source code. Useful " "when saving an in-memory database for later restoration. Similar to the ``." "dump`` command in the :program:`sqlite3` shell." msgstr "" -#: ../../library/sqlite3.rst:1034 +#: ../../library/sqlite3.rst:1030 msgid "Create a backup of an SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1036 +#: ../../library/sqlite3.rst:1032 msgid "" "Works even if the database is being accessed by other clients or " "concurrently by the same connection." msgstr "" -#: ../../library/sqlite3.rst:1039 +#: ../../library/sqlite3.rst:1035 msgid "The database connection to save the backup to." msgstr "" -#: ../../library/sqlite3.rst:1042 +#: ../../library/sqlite3.rst:1038 msgid "" "The number of pages to copy at a time. If equal to or less than ``0``, the " "entire database is copied in a single step. Defaults to ``-1``." msgstr "" -#: ../../library/sqlite3.rst:1048 +#: ../../library/sqlite3.rst:1044 msgid "" "If set to a callable, it is invoked with three integer arguments for every " "backup iteration: the *status* of the last iteration, the *remaining* number " @@ -1062,46 +1058,46 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1057 +#: ../../library/sqlite3.rst:1053 msgid "" "The name of the database to back up. Either ``\"main\"`` (the default) for " "the main database, ``\"temp\"`` for the temporary database, or the name of a " "custom database as attached using the ``ATTACH DATABASE`` SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1064 +#: ../../library/sqlite3.rst:1060 msgid "" "The number of seconds to sleep between successive attempts to back up " "remaining pages." msgstr "" -#: ../../library/sqlite3.rst:1068 +#: ../../library/sqlite3.rst:1064 msgid "Example 1, copy an existing database into another:" msgstr "" -#: ../../library/sqlite3.rst:1087 +#: ../../library/sqlite3.rst:1083 msgid "Example 2, copy an existing database into a transient copy:" msgstr "" -#: ../../library/sqlite3.rst:1099 +#: ../../library/sqlite3.rst:1095 msgid "Get a connection runtime limit." msgstr "" -#: ../../library/sqlite3.rst:1101 +#: ../../library/sqlite3.rst:1097 msgid "The `SQLite limit category`_ to be queried." msgstr "" -#: ../../library/sqlite3.rst:1106 ../../library/sqlite3.rst:1143 +#: ../../library/sqlite3.rst:1102 ../../library/sqlite3.rst:1139 msgid "If *category* is not recognised by the underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:1109 +#: ../../library/sqlite3.rst:1105 msgid "" "Example, query the maximum length of an SQL statement for :class:" "`Connection` ``con`` (the default is 1000000000):" msgstr "" -#: ../../library/sqlite3.rst:1129 +#: ../../library/sqlite3.rst:1125 msgid "" "Set a connection runtime limit. Attempts to increase a limit above its hard " "upper bound are silently truncated to the hard upper bound. Regardless of " @@ -1109,22 +1105,22 @@ msgid "" "returned." msgstr "" -#: ../../library/sqlite3.rst:1134 +#: ../../library/sqlite3.rst:1130 msgid "The `SQLite limit category`_ to be set." msgstr "" -#: ../../library/sqlite3.rst:1137 +#: ../../library/sqlite3.rst:1133 msgid "" "The value of the new limit. If negative, the current limit is unchanged." msgstr "" -#: ../../library/sqlite3.rst:1146 +#: ../../library/sqlite3.rst:1142 msgid "" "Example, limit the number of attached databases to 1 for :class:`Connection` " "``con`` (the default limit is 10):" msgstr "" -#: ../../library/sqlite3.rst:1163 +#: ../../library/sqlite3.rst:1159 msgid "" "Serialize a database into a :class:`bytes` object. For an ordinary on-disk " "database file, the serialization is just a copy of the disk file. For an in-" @@ -1133,17 +1129,17 @@ msgid "" "backed up to disk." msgstr "" -#: ../../library/sqlite3.rst:1169 +#: ../../library/sqlite3.rst:1165 msgid "The database name to be serialized. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1177 +#: ../../library/sqlite3.rst:1173 msgid "" "This method is only available if the underlying SQLite library has the " "serialize API." msgstr "" -#: ../../library/sqlite3.rst:1185 +#: ../../library/sqlite3.rst:1181 msgid "" "Deserialize a :meth:`serialized ` database into a :class:" "`Connection`. This method causes the database connection to disconnect from " @@ -1151,47 +1147,47 @@ msgid "" "serialization contained in *data*." msgstr "" -#: ../../library/sqlite3.rst:1191 +#: ../../library/sqlite3.rst:1187 msgid "A serialized database." msgstr "" -#: ../../library/sqlite3.rst:1194 +#: ../../library/sqlite3.rst:1190 msgid "The database name to deserialize into. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1198 +#: ../../library/sqlite3.rst:1194 msgid "" "If the database connection is currently involved in a read transaction or a " "backup operation." msgstr "" -#: ../../library/sqlite3.rst:1202 +#: ../../library/sqlite3.rst:1198 msgid "If *data* does not contain a valid SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1205 +#: ../../library/sqlite3.rst:1201 msgid "If :func:`len(data) ` is larger than ``2**63 - 1``." msgstr "" -#: ../../library/sqlite3.rst:1210 +#: ../../library/sqlite3.rst:1206 msgid "" "This method is only available if the underlying SQLite library has the " "deserialize API." msgstr "" -#: ../../library/sqlite3.rst:1217 +#: ../../library/sqlite3.rst:1213 msgid "" "This read-only attribute corresponds to the low-level SQLite `autocommit " "mode`_." msgstr "" -#: ../../library/sqlite3.rst:1220 +#: ../../library/sqlite3.rst:1216 msgid "" "``True`` if a transaction is active (there are uncommitted changes), " "``False`` otherwise." msgstr "" -#: ../../library/sqlite3.rst:1227 +#: ../../library/sqlite3.rst:1223 msgid "" "This attribute controls the :ref:`transaction handling ` performed by :mod:`!sqlite3`. If set to ``None``, " @@ -1201,13 +1197,13 @@ msgid "" "` is performed." msgstr "" -#: ../../library/sqlite3.rst:1235 +#: ../../library/sqlite3.rst:1231 msgid "" "If not overridden by the *isolation_level* parameter of :func:`connect`, the " "default is ``\"\"``, which is an alias for ``\"DEFERRED\"``." msgstr "" -#: ../../library/sqlite3.rst:1240 +#: ../../library/sqlite3.rst:1236 msgid "" "The initial :attr:`~Cursor.row_factory` for :class:`Cursor` objects created " "from this connection. Assigning to this attribute does not affect the :attr:" @@ -1216,12 +1212,12 @@ msgid "" "`tuple`." msgstr "" -#: ../../library/sqlite3.rst:1247 ../../library/sqlite3.rst:1508 -#: ../../library/sqlite3.rst:1531 +#: ../../library/sqlite3.rst:1243 ../../library/sqlite3.rst:1504 +#: ../../library/sqlite3.rst:1527 msgid "See :ref:`sqlite3-howto-row-factory` for more details." msgstr "" -#: ../../library/sqlite3.rst:1251 +#: ../../library/sqlite3.rst:1247 msgid "" "A callable that accepts a :class:`bytes` parameter and returns a text " "representation of it. The callable is invoked for SQLite values with the " @@ -1229,17 +1225,17 @@ msgid "" "you want to return ``bytes`` instead, set *text_factory* to ``bytes``." msgstr "" -#: ../../library/sqlite3.rst:1291 +#: ../../library/sqlite3.rst:1287 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:1298 +#: ../../library/sqlite3.rst:1294 msgid "Cursor objects" msgstr "" -#: ../../library/sqlite3.rst:1300 +#: ../../library/sqlite3.rst:1296 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -1247,25 +1243,25 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: ../../library/sqlite3.rst:1307 +#: ../../library/sqlite3.rst:1303 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:1332 +#: ../../library/sqlite3.rst:1328 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:1339 +#: ../../library/sqlite3.rst:1335 msgid "" "Execute SQL statement *sql*. Bind values to the statement using :ref:" "`placeholders ` that map to the :term:`sequence` or :" "class:`dict` *parameters*." msgstr "" -#: ../../library/sqlite3.rst:1344 +#: ../../library/sqlite3.rst:1340 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:" @@ -1273,7 +1269,7 @@ msgid "" "multiple SQL statements with one call." msgstr "" -#: ../../library/sqlite3.rst:1349 +#: ../../library/sqlite3.rst:1345 msgid "" "If :attr:`~Connection.isolation_level` is not ``None``, *sql* is an " "``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statement, and there is " @@ -1281,7 +1277,7 @@ msgid "" "*sql*." msgstr "" -#: ../../library/sqlite3.rst:1357 +#: ../../library/sqlite3.rst:1353 msgid "" "Execute :ref:`parameterized ` SQL statement *sql* " "against all parameter sequences or mappings found in the sequence " @@ -1290,7 +1286,7 @@ msgid "" "handling as :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:1376 +#: ../../library/sqlite3.rst:1372 msgid "" "Execute the SQL statements in *sql_script*. If there is a pending " "transaction, an implicit ``COMMIT`` statement is executed first. No other " @@ -1298,24 +1294,24 @@ msgid "" "added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:1382 +#: ../../library/sqlite3.rst:1378 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:1400 +#: ../../library/sqlite3.rst:1396 msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -#: ../../library/sqlite3.rst:1408 +#: ../../library/sqlite3.rst:1404 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:1411 +#: ../../library/sqlite3.rst:1407 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -1323,7 +1319,7 @@ msgid "" "available are returned." msgstr "" -#: ../../library/sqlite3.rst:1417 +#: ../../library/sqlite3.rst:1413 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -1331,36 +1327,36 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:1424 +#: ../../library/sqlite3.rst:1420 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: ../../library/sqlite3.rst:1431 +#: ../../library/sqlite3.rst:1427 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:1433 +#: ../../library/sqlite3.rst:1429 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:1438 ../../library/sqlite3.rst:1442 +#: ../../library/sqlite3.rst:1434 ../../library/sqlite3.rst:1438 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:1446 +#: ../../library/sqlite3.rst:1442 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:1451 +#: ../../library/sqlite3.rst:1447 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -1368,18 +1364,18 @@ msgid "" "that refers to *con*:" msgstr "" -#: ../../library/sqlite3.rst:1465 +#: ../../library/sqlite3.rst:1461 msgid "" "Read-only attribute that provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are ``None``." msgstr "" -#: ../../library/sqlite3.rst:1469 +#: ../../library/sqlite3.rst:1465 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:1473 +#: ../../library/sqlite3.rst:1469 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1389,15 +1385,15 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1481 +#: ../../library/sqlite3.rst:1477 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1483 +#: ../../library/sqlite3.rst:1479 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1488 +#: ../../library/sqlite3.rst:1484 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -1406,7 +1402,7 @@ msgid "" "methods." msgstr "" -#: ../../library/sqlite3.rst:1496 +#: ../../library/sqlite3.rst:1492 msgid "" "Control how a row fetched from this :class:`!Cursor` is represented. If " "``None``, a row is represented as a :class:`tuple`. Can be set to the " @@ -1415,18 +1411,18 @@ msgid "" "and returns a custom object representing an SQLite row." msgstr "" -#: ../../library/sqlite3.rst:1503 +#: ../../library/sqlite3.rst:1499 msgid "" "Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" -#: ../../library/sqlite3.rst:1519 +#: ../../library/sqlite3.rst:1515 msgid "Row objects" msgstr "" -#: ../../library/sqlite3.rst:1523 +#: ../../library/sqlite3.rst:1519 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -1434,28 +1430,28 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1528 +#: ../../library/sqlite3.rst:1524 msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -#: ../../library/sqlite3.rst:1535 +#: ../../library/sqlite3.rst:1531 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1539 +#: ../../library/sqlite3.rst:1535 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:1546 +#: ../../library/sqlite3.rst:1542 msgid "Blob objects" msgstr "" -#: ../../library/sqlite3.rst:1552 +#: ../../library/sqlite3.rst:1548 msgid "" "A :class:`Blob` instance is a :term:`file-like object` that can read and " "write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call :func:" @@ -1463,24 +1459,24 @@ msgid "" "and :term:`slices ` for direct access to the blob data." msgstr "" -#: ../../library/sqlite3.rst:1557 +#: ../../library/sqlite3.rst:1553 msgid "" "Use the :class:`Blob` as a :term:`context manager` to ensure that the blob " "handle is closed after use." msgstr "" -#: ../../library/sqlite3.rst:1587 +#: ../../library/sqlite3.rst:1583 msgid "Close the blob." msgstr "" -#: ../../library/sqlite3.rst:1589 +#: ../../library/sqlite3.rst:1585 msgid "" "The blob will be unusable from this point onward. An :class:`~sqlite3." "Error` (or subclass) exception will be raised if any further operation is " "attempted with the blob." msgstr "" -#: ../../library/sqlite3.rst:1595 +#: ../../library/sqlite3.rst:1591 msgid "" "Read *length* bytes of data from the blob at the current offset position. If " "the end of the blob is reached, the data up to :abbr:`EOF (End of File)` " @@ -1488,18 +1484,18 @@ msgid "" "`~Blob.read` will read until the end of the blob." msgstr "" -#: ../../library/sqlite3.rst:1603 +#: ../../library/sqlite3.rst:1599 msgid "" "Write *data* to the blob at the current offset. This function cannot change " "the blob length. Writing beyond the end of the blob will raise :exc:" "`ValueError`." msgstr "" -#: ../../library/sqlite3.rst:1609 +#: ../../library/sqlite3.rst:1605 msgid "Return the current access position of the blob." msgstr "" -#: ../../library/sqlite3.rst:1613 +#: ../../library/sqlite3.rst:1609 msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :data:`os.SEEK_SET` (absolute blob positioning). Other " @@ -1507,26 +1503,26 @@ msgid "" "position) and :data:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -#: ../../library/sqlite3.rst:1621 +#: ../../library/sqlite3.rst:1617 msgid "PrepareProtocol objects" msgstr "" -#: ../../library/sqlite3.rst:1625 +#: ../../library/sqlite3.rst:1621 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: ../../library/sqlite3.rst:1633 +#: ../../library/sqlite3.rst:1629 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1635 +#: ../../library/sqlite3.rst:1631 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1639 +#: ../../library/sqlite3.rst:1635 msgid "" "This exception is not currently raised by the :mod:`!sqlite3` module, but " "may be raised by applications using :mod:`!sqlite3`, for example if a user-" @@ -1534,39 +1530,39 @@ msgid "" "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1646 +#: ../../library/sqlite3.rst:1642 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1650 +#: ../../library/sqlite3.rst:1646 msgid "" "If the exception originated from within the SQLite library, the following " "two attributes are added to the exception:" msgstr "" -#: ../../library/sqlite3.rst:1655 +#: ../../library/sqlite3.rst:1651 msgid "" "The numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1662 +#: ../../library/sqlite3.rst:1658 msgid "" "The symbolic name of the numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1669 +#: ../../library/sqlite3.rst:1665 msgid "" "Exception raised for misuse of the low-level SQLite C API. In other words, " "if this exception is raised, it probably indicates a bug in the :mod:`!" "sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1676 +#: ../../library/sqlite3.rst:1672 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -1574,14 +1570,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1683 +#: ../../library/sqlite3.rst:1679 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1689 +#: ../../library/sqlite3.rst:1685 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1589,20 +1585,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1697 +#: ../../library/sqlite3.rst:1693 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1702 +#: ../../library/sqlite3.rst:1698 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1709 +#: ../../library/sqlite3.rst:1705 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "supplying the wrong number of bindings to a query, or trying to operate on a " @@ -1610,7 +1606,7 @@ msgid "" "`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1716 +#: ../../library/sqlite3.rst:1712 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -1619,78 +1615,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1726 +#: ../../library/sqlite3.rst:1722 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1728 +#: ../../library/sqlite3.rst:1724 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1731 +#: ../../library/sqlite3.rst:1727 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 +#: ../../library/sqlite3.rst:1730 ../../library/sqlite3.rst:1747 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 +#: ../../library/sqlite3.rst:1730 ../../library/sqlite3.rst:1747 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 +#: ../../library/sqlite3.rst:1732 ../../library/sqlite3.rst:1749 msgid "``None``" msgstr "``None``" -#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 +#: ../../library/sqlite3.rst:1732 ../../library/sqlite3.rst:1749 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1738 ../../library/sqlite3.rst:1755 +#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1738 ../../library/sqlite3.rst:1755 +#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1757 +#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1757 +#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1742 +#: ../../library/sqlite3.rst:1738 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1742 ../../library/sqlite3.rst:1759 +#: ../../library/sqlite3.rst:1738 ../../library/sqlite3.rst:1755 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1744 ../../library/sqlite3.rst:1762 +#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1758 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1744 ../../library/sqlite3.rst:1762 +#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1758 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1748 +#: ../../library/sqlite3.rst:1744 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1759 +#: ../../library/sqlite3.rst:1755 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1765 +#: ../../library/sqlite3.rst:1761 msgid "" "The type system of the :mod:`!sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via :ref:`object " @@ -1699,42 +1695,42 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1775 +#: ../../library/sqlite3.rst:1771 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1777 +#: ../../library/sqlite3.rst:1773 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1780 +#: ../../library/sqlite3.rst:1776 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1784 +#: ../../library/sqlite3.rst:1780 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1788 +#: ../../library/sqlite3.rst:1784 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1792 +#: ../../library/sqlite3.rst:1788 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1798 +#: ../../library/sqlite3.rst:1794 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1742,15 +1738,15 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1807 +#: ../../library/sqlite3.rst:1803 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:1812 +#: ../../library/sqlite3.rst:1808 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:1814 +#: ../../library/sqlite3.rst:1810 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -1758,7 +1754,7 @@ msgid "" "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -#: ../../library/sqlite3.rst:1827 +#: ../../library/sqlite3.rst:1823 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -1774,18 +1770,18 @@ msgid "" "ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:1869 +#: ../../library/sqlite3.rst:1865 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:1871 +#: ../../library/sqlite3.rst:1867 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands `." msgstr "" -#: ../../library/sqlite3.rst:1875 +#: ../../library/sqlite3.rst:1871 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -1795,11 +1791,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1887 +#: ../../library/sqlite3.rst:1883 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:1889 +#: ../../library/sqlite3.rst:1885 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -1809,84 +1805,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1920 +#: ../../library/sqlite3.rst:1916 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:1922 +#: ../../library/sqlite3.rst:1918 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1952 +#: ../../library/sqlite3.rst:1948 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1954 +#: ../../library/sqlite3.rst:1950 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:1959 +#: ../../library/sqlite3.rst:1955 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1962 +#: ../../library/sqlite3.rst:1958 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1967 +#: ../../library/sqlite3.rst:1963 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1976 +#: ../../library/sqlite3.rst:1972 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:1980 +#: ../../library/sqlite3.rst:1976 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1981 +#: ../../library/sqlite3.rst:1977 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1982 +#: ../../library/sqlite3.rst:1978 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1986 +#: ../../library/sqlite3.rst:1982 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:2037 +#: ../../library/sqlite3.rst:2033 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:2039 +#: ../../library/sqlite3.rst:2035 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:2101 +#: ../../library/sqlite3.rst:2097 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:2103 +#: ../../library/sqlite3.rst:2099 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -1898,11 +1894,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:2144 +#: ../../library/sqlite3.rst:2140 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:2146 +#: ../../library/sqlite3.rst:2142 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1912,58 +1908,58 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:2155 +#: ../../library/sqlite3.rst:2151 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, the context manager is a no-op." msgstr "" -#: ../../library/sqlite3.rst:2160 +#: ../../library/sqlite3.rst:2156 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:2193 +#: ../../library/sqlite3.rst:2189 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:2195 +#: ../../library/sqlite3.rst:2191 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:2197 +#: ../../library/sqlite3.rst:2193 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:2206 +#: ../../library/sqlite3.rst:2202 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: ../../library/sqlite3.rst:2216 +#: ../../library/sqlite3.rst:2212 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:2230 +#: ../../library/sqlite3.rst:2226 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:2239 +#: ../../library/sqlite3.rst:2235 msgid "How to create and use row factories" msgstr "" -#: ../../library/sqlite3.rst:2241 +#: ../../library/sqlite3.rst:2237 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: ../../library/sqlite3.rst:2246 +#: ../../library/sqlite3.rst:2242 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -1971,7 +1967,7 @@ msgid "" "use the same row factory." msgstr "" -#: ../../library/sqlite3.rst:2251 +#: ../../library/sqlite3.rst:2247 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -1979,51 +1975,51 @@ msgid "" "attribute:" msgstr "" -#: ../../library/sqlite3.rst:2261 +#: ../../library/sqlite3.rst:2257 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: ../../library/sqlite3.rst:2276 +#: ../../library/sqlite3.rst:2272 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: ../../library/sqlite3.rst:2285 +#: ../../library/sqlite3.rst:2281 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2295 +#: ../../library/sqlite3.rst:2291 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2306 +#: ../../library/sqlite3.rst:2302 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: ../../library/sqlite3.rst:2321 +#: ../../library/sqlite3.rst:2317 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: ../../library/sqlite3.rst:2329 +#: ../../library/sqlite3.rst:2325 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:2334 +#: ../../library/sqlite3.rst:2330 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:2336 +#: ../../library/sqlite3.rst:2332 msgid "" "The :mod:`!sqlite3` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:2339 +#: ../../library/sqlite3.rst:2335 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -2037,7 +2033,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:2352 +#: ../../library/sqlite3.rst:2348 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -2047,14 +2043,14 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:2360 +#: ../../library/sqlite3.rst:2356 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:2364 +#: ../../library/sqlite3.rst:2360 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." diff --git a/reference/datamodel.po b/reference/datamodel.po index 6934a79b3c..9c16bb34b6 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 00:17+0000\n" +"POT-Creation-Date: 2023-01-01 00:18+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-" @@ -3344,14 +3344,22 @@ msgid "" msgstr "" #: ../../reference/datamodel.rst:2955 +msgid "" +"The language doesn't place any restriction on the type or value of the " +"objects yielded by the iterator returned by ``__await__``, as this is " +"specific to the implementation of the asynchronous execution framework (e." +"g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." +msgstr "" + +#: ../../reference/datamodel.rst:2963 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:2961 +#: ../../reference/datamodel.rst:2969 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:2963 +#: ../../reference/datamodel.rst:2971 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -3362,18 +3370,18 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:2971 +#: ../../reference/datamodel.rst:2979 msgid "" "Coroutines also have the methods listed below, which are analogous to those " "of generators (see :ref:`generator-methods`). However, unlike generators, " "coroutines do not directly support iteration." msgstr "" -#: ../../reference/datamodel.rst:2975 +#: ../../reference/datamodel.rst:2983 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:2981 +#: ../../reference/datamodel.rst:2989 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -3384,7 +3392,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:2992 +#: ../../reference/datamodel.rst:3000 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -3395,7 +3403,7 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:3003 +#: ../../reference/datamodel.rst:3011 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -3405,99 +3413,99 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:3011 +#: ../../reference/datamodel.rst:3019 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:3017 +#: ../../reference/datamodel.rst:3025 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:3019 +#: ../../reference/datamodel.rst:3027 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:3022 +#: ../../reference/datamodel.rst:3030 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:3026 +#: ../../reference/datamodel.rst:3034 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:3030 +#: ../../reference/datamodel.rst:3038 msgid "" "Must return an *awaitable* resulting in a next value of the iterator. " "Should raise a :exc:`StopAsyncIteration` error when the iteration is over." msgstr "" -#: ../../reference/datamodel.rst:3033 +#: ../../reference/datamodel.rst:3041 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:3050 +#: ../../reference/datamodel.rst:3058 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:3055 +#: ../../reference/datamodel.rst:3063 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " "asynchronous iterator object. Returning anything else will result in a :exc:" "`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:3063 +#: ../../reference/datamodel.rst:3071 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3065 +#: ../../reference/datamodel.rst:3073 msgid "" "An *asynchronous context manager* is a *context manager* that is able to " "suspend execution in its ``__aenter__`` and ``__aexit__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3068 +#: ../../reference/datamodel.rst:3076 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3072 +#: ../../reference/datamodel.rst:3080 msgid "" "Semantically similar to :meth:`__enter__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3077 +#: ../../reference/datamodel.rst:3085 msgid "" "Semantically similar to :meth:`__exit__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3080 +#: ../../reference/datamodel.rst:3088 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3093 +#: ../../reference/datamodel.rst:3101 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:3094 +#: ../../reference/datamodel.rst:3102 msgid "" "It *is* possible in some cases to change an object's type, under certain " "controlled conditions. It generally isn't a good idea though, since it can " "lead to some very strange behaviour if it is handled incorrectly." msgstr "" -#: ../../reference/datamodel.rst:3098 +#: ../../reference/datamodel.rst:3106 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, and :meth:`~object.__contains__` methods have special " @@ -3505,7 +3513,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3104 +#: ../../reference/datamodel.rst:3112 msgid "" "\"Does not support\" here means that the class has no such method, or the " "method returns ``NotImplemented``. Do not set the method to ``None`` if you " @@ -3513,7 +3521,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3110 +#: ../../reference/datamodel.rst:3118 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`~object.__add__` -- fails then the overall " diff --git a/reference/expressions.po b/reference/expressions.po index 706afbbcec..550c9f813f 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-01-03 00:16+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-" @@ -471,9 +471,10 @@ msgid "" "function. The execution starts when one of the generator's methods is " "called. At that time, the execution proceeds to the first yield expression, " "where it is suspended again, returning the value of :token:`~python-grammar:" -"expression_list` to the generator's caller. By suspended, we mean that all " -"local state is retained, including the current bindings of local variables, " -"the instruction pointer, the internal evaluation stack, and the state of any " +"expression_list` to the generator's caller, or ``None`` if :token:`~python-" +"grammar:expression_list` is omitted. By suspended, we mean that all local " +"state is retained, including the current bindings of local variables, the " +"instruction pointer, the internal evaluation stack, and the state of any " "exception handling. When the execution is resumed by calling one of the " "generator's methods, the function can proceed exactly as if the yield " "expression were just another external call. The value of the yield " @@ -484,7 +485,7 @@ msgid "" "be the value passed in to that method." msgstr "" -#: ../../reference/expressions.rst:470 +#: ../../reference/expressions.rst:472 msgid "" "All of this makes generator functions quite similar to coroutines; they " "yield multiple times, they have more than one entry point and their " @@ -493,7 +494,7 @@ msgid "" "the control is always transferred to the generator's caller." msgstr "" -#: ../../reference/expressions.rst:476 +#: ../../reference/expressions.rst:478 msgid "" "Yield expressions are allowed anywhere in a :keyword:`try` construct. If " "the generator is not resumed before it is finalized (by reaching a zero " @@ -502,7 +503,7 @@ msgid "" "`finally` clauses to execute." msgstr "" -#: ../../reference/expressions.rst:485 +#: ../../reference/expressions.rst:487 msgid "" "When ``yield from `` is used, the supplied expression must be an " "iterable. The values produced by iterating that iterable are passed directly " @@ -514,7 +515,7 @@ msgid "" "will just raise the passed in exception immediately." msgstr "" -#: ../../reference/expressions.rst:494 +#: ../../reference/expressions.rst:496 msgid "" "When the underlying iterator is complete, the :attr:`~StopIteration.value` " "attribute of the raised :exc:`StopIteration` instance becomes the value of " @@ -523,73 +524,73 @@ msgid "" "returning a value from the subgenerator)." msgstr "" -#: ../../reference/expressions.rst:500 +#: ../../reference/expressions.rst:502 msgid "Added ``yield from `` to delegate control flow to a subiterator." msgstr "" -#: ../../reference/expressions.rst:503 +#: ../../reference/expressions.rst:505 msgid "" "The parentheses may be omitted when the yield expression is the sole " "expression on the right hand side of an assignment statement." msgstr "" -#: ../../reference/expressions.rst:509 +#: ../../reference/expressions.rst:511 msgid ":pep:`255` - Simple Generators" msgstr "" -#: ../../reference/expressions.rst:509 +#: ../../reference/expressions.rst:511 msgid "" "The proposal for adding generators and the :keyword:`yield` statement to " "Python." msgstr "" -#: ../../reference/expressions.rst:513 +#: ../../reference/expressions.rst:515 msgid ":pep:`342` - Coroutines via Enhanced Generators" msgstr "" -#: ../../reference/expressions.rst:512 +#: ../../reference/expressions.rst:514 msgid "" "The proposal to enhance the API and syntax of generators, making them usable " "as simple coroutines." msgstr "" -#: ../../reference/expressions.rst:517 +#: ../../reference/expressions.rst:519 msgid ":pep:`380` - Syntax for Delegating to a Subgenerator" msgstr "" -#: ../../reference/expressions.rst:516 +#: ../../reference/expressions.rst:518 msgid "" "The proposal to introduce the :token:`~python-grammar:yield_from` syntax, " "making delegation to subgenerators easy." msgstr "" -#: ../../reference/expressions.rst:520 +#: ../../reference/expressions.rst:522 msgid ":pep:`525` - Asynchronous Generators" msgstr "" -#: ../../reference/expressions.rst:520 +#: ../../reference/expressions.rst:522 msgid "" "The proposal that expanded on :pep:`492` by adding generator capabilities to " "coroutine functions." msgstr "" -#: ../../reference/expressions.rst:527 +#: ../../reference/expressions.rst:529 msgid "Generator-iterator methods" msgstr "" -#: ../../reference/expressions.rst:529 +#: ../../reference/expressions.rst:531 msgid "" "This subsection describes the methods of a generator iterator. They can be " "used to control the execution of a generator function." msgstr "" -#: ../../reference/expressions.rst:532 +#: ../../reference/expressions.rst:534 msgid "" "Note that calling any of the generator methods below when the generator is " "already executing raises a :exc:`ValueError` exception." msgstr "" -#: ../../reference/expressions.rst:540 +#: ../../reference/expressions.rst:542 msgid "" "Starts the execution of a generator function or resumes it at the last " "executed yield expression. When a generator function is resumed with a :" @@ -601,13 +602,13 @@ msgid "" "`StopIteration` exception is raised." msgstr "" -#: ../../reference/expressions.rst:549 +#: ../../reference/expressions.rst:551 msgid "" "This method is normally called implicitly, e.g. by a :keyword:`for` loop, or " "by the built-in :func:`next` function." msgstr "" -#: ../../reference/expressions.rst:555 +#: ../../reference/expressions.rst:557 msgid "" "Resumes the execution and \"sends\" a value into the generator function. " "The *value* argument becomes the result of the current yield expression. " @@ -618,7 +619,7 @@ msgid "" "expression that could receive the value." msgstr "" -#: ../../reference/expressions.rst:567 +#: ../../reference/expressions.rst:569 msgid "" "Raises an exception at the point where the generator was paused, and returns " "the next value yielded by the generator function. If the generator exits " @@ -627,13 +628,13 @@ msgid "" "a different exception, then that exception propagates to the caller." msgstr "" -#: ../../reference/expressions.rst:573 +#: ../../reference/expressions.rst:575 msgid "" "In typical use, this is called with a single exception instance similar to " "the way the :keyword:`raise` keyword is used." msgstr "" -#: ../../reference/expressions.rst:576 +#: ../../reference/expressions.rst:578 msgid "" "For backwards compatibility, however, the second signature is supported, " "following a convention from older versions of Python. The *type* argument " @@ -644,7 +645,7 @@ msgid "" "*value* may be cleared." msgstr "" -#: ../../reference/expressions.rst:590 +#: ../../reference/expressions.rst:592 msgid "" "Raises a :exc:`GeneratorExit` at the point where the generator function was " "paused. If the generator function then exits gracefully, is already closed, " @@ -655,34 +656,34 @@ msgid "" "has already exited due to an exception or normal exit." msgstr "" -#: ../../reference/expressions.rst:601 +#: ../../reference/expressions.rst:603 msgid "Examples" msgstr "模組" -#: ../../reference/expressions.rst:603 +#: ../../reference/expressions.rst:605 msgid "" "Here is a simple example that demonstrates the behavior of generators and " "generator functions::" msgstr "" -#: ../../reference/expressions.rst:630 +#: ../../reference/expressions.rst:632 msgid "" "For examples using ``yield from``, see :ref:`pep-380` in \"What's New in " "Python.\"" msgstr "" -#: ../../reference/expressions.rst:636 +#: ../../reference/expressions.rst:638 msgid "Asynchronous generator functions" msgstr "" -#: ../../reference/expressions.rst:638 +#: ../../reference/expressions.rst:640 msgid "" "The presence of a yield expression in a function or method defined using :" "keyword:`async def` further defines the function as an :term:`asynchronous " "generator` function." msgstr "" -#: ../../reference/expressions.rst:642 +#: ../../reference/expressions.rst:644 msgid "" "When an asynchronous generator function is called, it returns an " "asynchronous iterator known as an asynchronous generator object. That object " @@ -692,7 +693,7 @@ msgid "" "keyword:`for` statement." msgstr "" -#: ../../reference/expressions.rst:649 +#: ../../reference/expressions.rst:651 msgid "" "Calling one of the asynchronous generator's methods returns an :term:" "`awaitable` object, and the execution starts when this object is awaited on. " @@ -711,7 +712,7 @@ msgid "" "method." msgstr "" -#: ../../reference/expressions.rst:664 +#: ../../reference/expressions.rst:666 msgid "" "If an asynchronous generator happens to exit early by :keyword:`break`, the " "caller task being cancelled, or other exceptions, the generator's async " @@ -723,7 +724,7 @@ msgid "" "generator and ultimately detach it from the event loop." msgstr "" -#: ../../reference/expressions.rst:674 +#: ../../reference/expressions.rst:676 msgid "" "In an asynchronous generator function, yield expressions are allowed " "anywhere in a :keyword:`try` construct. However, if an asynchronous " @@ -737,7 +738,7 @@ msgid "" "finally` clauses to execute." msgstr "" -#: ../../reference/expressions.rst:685 +#: ../../reference/expressions.rst:687 msgid "" "To take care of finalization upon event loop termination, an event loop " "should define a *finalizer* function which takes an asynchronous generator-" @@ -750,23 +751,23 @@ msgid "" "asyncio/base_events.py`." msgstr "" -#: ../../reference/expressions.rst:694 +#: ../../reference/expressions.rst:696 msgid "" "The expression ``yield from `` is a syntax error when used in an " "asynchronous generator function." msgstr "" -#: ../../reference/expressions.rst:701 +#: ../../reference/expressions.rst:703 msgid "Asynchronous generator-iterator methods" msgstr "" -#: ../../reference/expressions.rst:703 +#: ../../reference/expressions.rst:705 msgid "" "This subsection describes the methods of an asynchronous generator iterator, " "which are used to control the execution of a generator function." msgstr "" -#: ../../reference/expressions.rst:711 +#: ../../reference/expressions.rst:713 msgid "" "Returns an awaitable which when run starts to execute the asynchronous " "generator or resumes it at the last executed yield expression. When an " @@ -781,12 +782,12 @@ msgid "" "has completed." msgstr "" -#: ../../reference/expressions.rst:723 +#: ../../reference/expressions.rst:725 msgid "" "This method is normally called implicitly by a :keyword:`async for` loop." msgstr "" -#: ../../reference/expressions.rst:728 +#: ../../reference/expressions.rst:730 msgid "" "Returns an awaitable which when run resumes the execution of the " "asynchronous generator. As with the :meth:`~generator.send()` method for a " @@ -801,7 +802,7 @@ msgid "" "receive the value." msgstr "" -#: ../../reference/expressions.rst:743 +#: ../../reference/expressions.rst:745 msgid "" "Returns an awaitable that raises an exception of type ``type`` at the point " "where the asynchronous generator was paused, and returns the next value " @@ -813,7 +814,7 @@ msgid "" "that exception propagates to the caller of the awaitable." msgstr "" -#: ../../reference/expressions.rst:758 +#: ../../reference/expressions.rst:760 msgid "" "Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " "the asynchronous generator function at the point where it was paused. If the " @@ -829,25 +830,25 @@ msgid "" "will return an awaitable that does nothing." msgstr "" -#: ../../reference/expressions.rst:774 +#: ../../reference/expressions.rst:776 msgid "Primaries" msgstr "" -#: ../../reference/expressions.rst:778 +#: ../../reference/expressions.rst:780 msgid "" "Primaries represent the most tightly bound operations of the language. Their " "syntax is:" msgstr "" -#: ../../reference/expressions.rst:788 +#: ../../reference/expressions.rst:790 msgid "Attribute references" msgstr "" -#: ../../reference/expressions.rst:794 +#: ../../reference/expressions.rst:796 msgid "An attribute reference is a primary followed by a period and a name:" msgstr "" -#: ../../reference/expressions.rst:804 +#: ../../reference/expressions.rst:806 msgid "" "The primary must evaluate to an object of a type that supports attribute " "references, which most objects do. This object is then asked to produce the " @@ -858,11 +859,11 @@ msgid "" "evaluations of the same attribute reference may yield different objects." msgstr "" -#: ../../reference/expressions.rst:816 +#: ../../reference/expressions.rst:818 msgid "Subscriptions" msgstr "" -#: ../../reference/expressions.rst:831 +#: ../../reference/expressions.rst:833 msgid "" "The subscription of an instance of a :ref:`container class ` " "will generally select an element from the container. The subscription of a :" @@ -870,13 +871,13 @@ msgid "" "`GenericAlias ` object." msgstr "" -#: ../../reference/expressions.rst:839 +#: ../../reference/expressions.rst:841 msgid "" "When an object is subscripted, the interpreter will evaluate the primary and " "the expression list." msgstr "" -#: ../../reference/expressions.rst:842 +#: ../../reference/expressions.rst:844 msgid "" "The primary must evaluate to an object that supports subscription. An object " "may support subscription through defining one or both of :meth:`~object." @@ -886,20 +887,20 @@ msgid "" "called instead of ``__getitem__``, see :ref:`classgetitem-versus-getitem`." msgstr "" -#: ../../reference/expressions.rst:849 +#: ../../reference/expressions.rst:851 msgid "" "If the expression list contains at least one comma, it will evaluate to a :" "class:`tuple` containing the items of the expression list. Otherwise, the " "expression list will evaluate to the value of the list's sole member." msgstr "" -#: ../../reference/expressions.rst:853 +#: ../../reference/expressions.rst:855 msgid "" "For built-in objects, there are two types of objects that support " "subscription via :meth:`~object.__getitem__`:" msgstr "" -#: ../../reference/expressions.rst:856 +#: ../../reference/expressions.rst:858 msgid "" "Mappings. If the primary is a :term:`mapping`, the expression list must " "evaluate to an object whose value is one of the keys of the mapping, and the " @@ -907,7 +908,7 @@ msgid "" "An example of a builtin mapping class is the :class:`dict` class." msgstr "" -#: ../../reference/expressions.rst:860 +#: ../../reference/expressions.rst:862 msgid "" "Sequences. If the primary is a :term:`sequence`, the expression list must " "evaluate to an :class:`int` or a :class:`slice` (as discussed in the " @@ -915,7 +916,7 @@ msgid "" "`str`, :class:`list` and :class:`tuple` classes." msgstr "" -#: ../../reference/expressions.rst:865 +#: ../../reference/expressions.rst:867 msgid "" "The formal syntax makes no special provision for negative indices in :term:" "`sequences `. However, built-in sequences all provide a :meth:" @@ -929,25 +930,25 @@ msgid "" "support." msgstr "" -#: ../../reference/expressions.rst:879 +#: ../../reference/expressions.rst:881 msgid "" "A :class:`string ` is a special kind of sequence whose items are " "*characters*. A character is not a separate data type but a string of " "exactly one character." msgstr "" -#: ../../reference/expressions.rst:887 +#: ../../reference/expressions.rst:889 msgid "Slicings" msgstr "" -#: ../../reference/expressions.rst:901 +#: ../../reference/expressions.rst:903 msgid "" "A slicing selects a range of items in a sequence object (e.g., a string, " "tuple or list). Slicings may be used as expressions or as targets in " "assignment or :keyword:`del` statements. The syntax for a slicing:" msgstr "" -#: ../../reference/expressions.rst:914 +#: ../../reference/expressions.rst:916 msgid "" "There is ambiguity in the formal syntax here: anything that looks like an " "expression list also looks like a slice list, so any subscription can be " @@ -957,7 +958,7 @@ msgid "" "the case if the slice list contains no proper slice)." msgstr "" -#: ../../reference/expressions.rst:926 +#: ../../reference/expressions.rst:928 msgid "" "The semantics for a slicing are as follows. The primary is indexed (using " "the same :meth:`__getitem__` method as normal subscription) with a key that " @@ -972,23 +973,23 @@ msgid "" "expressions." msgstr "" -#: ../../reference/expressions.rst:950 +#: ../../reference/expressions.rst:952 msgid "Calls" msgstr "" -#: ../../reference/expressions.rst:952 +#: ../../reference/expressions.rst:954 msgid "" "A call calls a callable object (e.g., a :term:`function`) with a possibly " "empty series of :term:`arguments `:" msgstr "" -#: ../../reference/expressions.rst:969 +#: ../../reference/expressions.rst:971 msgid "" "An optional trailing comma may be present after the positional and keyword " "arguments but does not affect the semantics." msgstr "" -#: ../../reference/expressions.rst:975 +#: ../../reference/expressions.rst:977 msgid "" "The primary must evaluate to a callable object (user-defined functions, " "built-in functions, methods of built-in objects, class objects, methods of " @@ -998,7 +999,7 @@ msgid "" "formal :term:`parameter` lists." msgstr "" -#: ../../reference/expressions.rst:983 +#: ../../reference/expressions.rst:985 msgid "" "If keyword arguments are present, they are first converted to positional " "arguments, as follows. First, a list of unfilled slots is created for the " @@ -1019,7 +1020,7 @@ msgid "" "filled slots is used as the argument list for the call." msgstr "" -#: ../../reference/expressions.rst:1003 +#: ../../reference/expressions.rst:1005 msgid "" "An implementation may provide built-in functions whose positional parameters " "do not have names, even if they are 'named' for the purpose of " @@ -1028,7 +1029,7 @@ msgid "" "`PyArg_ParseTuple` to parse their arguments." msgstr "" -#: ../../reference/expressions.rst:1009 +#: ../../reference/expressions.rst:1011 msgid "" "If there are more positional arguments than there are formal parameter " "slots, a :exc:`TypeError` exception is raised, unless a formal parameter " @@ -1037,7 +1038,7 @@ msgid "" "empty tuple if there were no excess positional arguments)." msgstr "" -#: ../../reference/expressions.rst:1015 +#: ../../reference/expressions.rst:1017 msgid "" "If any keyword argument does not correspond to a formal parameter name, a :" "exc:`TypeError` exception is raised, unless a formal parameter using the " @@ -1047,7 +1048,7 @@ msgid "" "(new) empty dictionary if there were no excess keyword arguments." msgstr "" -#: ../../reference/expressions.rst:1026 +#: ../../reference/expressions.rst:1028 msgid "" "If the syntax ``*expression`` appears in the function call, ``expression`` " "must evaluate to an :term:`iterable`. Elements from these iterables are " @@ -1057,20 +1058,20 @@ msgid "" "*y1*, ..., *yM*, *x3*, *x4*." msgstr "" -#: ../../reference/expressions.rst:1033 +#: ../../reference/expressions.rst:1035 msgid "" "A consequence of this is that although the ``*expression`` syntax may appear " "*after* explicit keyword arguments, it is processed *before* the keyword " "arguments (and any ``**expression`` arguments -- see below). So::" msgstr "" -#: ../../reference/expressions.rst:1049 +#: ../../reference/expressions.rst:1051 msgid "" "It is unusual for both keyword arguments and the ``*expression`` syntax to " "be used in the same call, so in practice this confusion does not often arise." msgstr "" -#: ../../reference/expressions.rst:1055 +#: ../../reference/expressions.rst:1057 msgid "" "If the syntax ``**expression`` appears in the function call, ``expression`` " "must evaluate to a :term:`mapping`, the contents of which are treated as " @@ -1079,7 +1080,7 @@ msgid "" "a :exc:`TypeError` exception is raised." msgstr "" -#: ../../reference/expressions.rst:1061 +#: ../../reference/expressions.rst:1063 msgid "" "When ``**expression`` is used, each key in this mapping must be a string. " "Each value from the mapping is assigned to the first formal parameter " @@ -1091,35 +1092,35 @@ msgid "" "is raised." msgstr "" -#: ../../reference/expressions.rst:1071 +#: ../../reference/expressions.rst:1073 msgid "" "Formal parameters using the syntax ``*identifier`` or ``**identifier`` " "cannot be used as positional argument slots or as keyword argument names." msgstr "" -#: ../../reference/expressions.rst:1074 +#: ../../reference/expressions.rst:1076 msgid "" "Function calls accept any number of ``*`` and ``**`` unpackings, positional " "arguments may follow iterable unpackings (``*``), and keyword arguments may " "follow dictionary unpackings (``**``). Originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1080 +#: ../../reference/expressions.rst:1082 msgid "" "A call always returns some value, possibly ``None``, unless it raises an " "exception. How this value is computed depends on the type of the callable " "object." msgstr "" -#: ../../reference/expressions.rst:1084 +#: ../../reference/expressions.rst:1086 msgid "If it is---" msgstr "" -#: ../../reference/expressions.rst:1097 +#: ../../reference/expressions.rst:1099 msgid "a user-defined function:" msgstr "" -#: ../../reference/expressions.rst:1093 +#: ../../reference/expressions.rst:1095 msgid "" "The code block for the function is executed, passing it the argument list. " "The first thing the code block will do is bind the formal parameters to the " @@ -1128,73 +1129,73 @@ msgid "" "value of the function call." msgstr "" -#: ../../reference/expressions.rst:1111 +#: ../../reference/expressions.rst:1113 msgid "a built-in function or method:" msgstr "" -#: ../../reference/expressions.rst:1110 +#: ../../reference/expressions.rst:1112 msgid "" "The result is up to the interpreter; see :ref:`built-in-funcs` for the " "descriptions of built-in functions and methods." msgstr "" -#: ../../reference/expressions.rst:1118 +#: ../../reference/expressions.rst:1120 msgid "a class object:" msgstr "" -#: ../../reference/expressions.rst:1118 +#: ../../reference/expressions.rst:1120 msgid "A new instance of that class is returned." msgstr "" -#: ../../reference/expressions.rst:1128 +#: ../../reference/expressions.rst:1130 msgid "a class instance method:" msgstr "" -#: ../../reference/expressions.rst:1126 +#: ../../reference/expressions.rst:1128 msgid "" "The corresponding user-defined function is called, with an argument list " "that is one longer than the argument list of the call: the instance becomes " "the first argument." msgstr "" -#: ../../reference/expressions.rst:1137 +#: ../../reference/expressions.rst:1139 msgid "a class instance:" msgstr "" -#: ../../reference/expressions.rst:1135 +#: ../../reference/expressions.rst:1137 msgid "" "The class must define a :meth:`__call__` method; the effect is then the same " "as if that method was called." msgstr "" -#: ../../reference/expressions.rst:1143 ../../reference/expressions.rst:1924 +#: ../../reference/expressions.rst:1145 ../../reference/expressions.rst:1926 msgid "Await expression" msgstr "" -#: ../../reference/expressions.rst:1145 +#: ../../reference/expressions.rst:1147 msgid "" "Suspend the execution of :term:`coroutine` on an :term:`awaitable` object. " "Can only be used inside a :term:`coroutine function`." msgstr "" -#: ../../reference/expressions.rst:1157 +#: ../../reference/expressions.rst:1159 msgid "The power operator" msgstr "" -#: ../../reference/expressions.rst:1163 +#: ../../reference/expressions.rst:1165 msgid "" "The power operator binds more tightly than unary operators on its left; it " "binds less tightly than unary operators on its right. The syntax is:" msgstr "" -#: ../../reference/expressions.rst:1169 +#: ../../reference/expressions.rst:1171 msgid "" "Thus, in an unparenthesized sequence of power and unary operators, the " "operators are evaluated from right to left (this does not constrain the " "evaluation order for the operands): ``-1**2`` results in ``-1``." msgstr "" -#: ../../reference/expressions.rst:1173 +#: ../../reference/expressions.rst:1175 msgid "" "The power operator has the same semantics as the built-in :func:`pow` " "function, when called with two arguments: it yields its left argument raised " @@ -1202,7 +1203,7 @@ msgid "" "converted to a common type, and the result is of that type." msgstr "" -#: ../../reference/expressions.rst:1178 +#: ../../reference/expressions.rst:1180 msgid "" "For int operands, the result has the same type as the operands unless the " "second argument is negative; in that case, all arguments are converted to " @@ -1210,40 +1211,40 @@ msgid "" "``100``, but ``10**-2`` returns ``0.01``." msgstr "" -#: ../../reference/expressions.rst:1183 +#: ../../reference/expressions.rst:1185 msgid "" "Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`. " "Raising a negative number to a fractional power results in a :class:" "`complex` number. (In earlier versions it raised a :exc:`ValueError`.)" msgstr "" -#: ../../reference/expressions.rst:1187 +#: ../../reference/expressions.rst:1189 msgid "" "This operation can be customized using the special :meth:`__pow__` method." msgstr "" -#: ../../reference/expressions.rst:1192 +#: ../../reference/expressions.rst:1194 msgid "Unary arithmetic and bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1198 +#: ../../reference/expressions.rst:1200 msgid "All unary arithmetic and bitwise operations have the same priority:" msgstr "" -#: ../../reference/expressions.rst:1209 +#: ../../reference/expressions.rst:1211 msgid "" "The unary ``-`` (minus) operator yields the negation of its numeric " "argument; the operation can be overridden with the :meth:`__neg__` special " "method." msgstr "" -#: ../../reference/expressions.rst:1217 +#: ../../reference/expressions.rst:1219 msgid "" "The unary ``+`` (plus) operator yields its numeric argument unchanged; the " "operation can be overridden with the :meth:`__pos__` special method." msgstr "" -#: ../../reference/expressions.rst:1224 +#: ../../reference/expressions.rst:1226 msgid "" "The unary ``~`` (invert) operator yields the bitwise inversion of its " "integer argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. " @@ -1251,17 +1252,17 @@ msgid "" "meth:`__invert__` special method." msgstr "" -#: ../../reference/expressions.rst:1233 +#: ../../reference/expressions.rst:1235 msgid "" "In all three cases, if the argument does not have the proper type, a :exc:" "`TypeError` exception is raised." msgstr "" -#: ../../reference/expressions.rst:1240 +#: ../../reference/expressions.rst:1242 msgid "Binary arithmetic operations" msgstr "" -#: ../../reference/expressions.rst:1244 +#: ../../reference/expressions.rst:1246 msgid "" "The binary arithmetic operations have the conventional priority levels. " "Note that some of these operations also apply to certain non-numeric types. " @@ -1269,7 +1270,7 @@ msgid "" "multiplicative operators and one for additive operators:" msgstr "" -#: ../../reference/expressions.rst:1259 +#: ../../reference/expressions.rst:1261 msgid "" "The ``*`` (multiplication) operator yields the product of its arguments. " "The arguments must either both be numbers, or one argument must be an " @@ -1279,19 +1280,19 @@ msgid "" "an empty sequence." msgstr "" -#: ../../reference/expressions.rst:1265 +#: ../../reference/expressions.rst:1267 msgid "" "This operation can be customized using the special :meth:`__mul__` and :meth:" "`__rmul__` methods." msgstr "" -#: ../../reference/expressions.rst:1272 +#: ../../reference/expressions.rst:1274 msgid "" "The ``@`` (at) operator is intended to be used for matrix multiplication. " "No builtin Python types implement this operator." msgstr "" -#: ../../reference/expressions.rst:1283 +#: ../../reference/expressions.rst:1285 msgid "" "The ``/`` (division) and ``//`` (floor division) operators yield the " "quotient of their arguments. The numeric arguments are first converted to a " @@ -1301,13 +1302,13 @@ msgid "" "the :exc:`ZeroDivisionError` exception." msgstr "" -#: ../../reference/expressions.rst:1290 +#: ../../reference/expressions.rst:1292 msgid "" "This operation can be customized using the special :meth:`__truediv__` and :" "meth:`__floordiv__` methods." msgstr "" -#: ../../reference/expressions.rst:1297 +#: ../../reference/expressions.rst:1299 msgid "" "The ``%`` (modulo) operator yields the remainder from the division of the " "first argument by the second. The numeric arguments are first converted to " @@ -1319,7 +1320,7 @@ msgid "" "absolute value of the second operand [#]_." msgstr "" -#: ../../reference/expressions.rst:1306 +#: ../../reference/expressions.rst:1308 msgid "" "The floor division and modulo operators are connected by the following " "identity: ``x == (x//y)*y + (x%y)``. Floor division and modulo are also " @@ -1327,7 +1328,7 @@ msgid "" "y, x%y)``. [#]_." msgstr "" -#: ../../reference/expressions.rst:1311 +#: ../../reference/expressions.rst:1313 msgid "" "In addition to performing the modulo operation on numbers, the ``%`` " "operator is also overloaded by string objects to perform old-style string " @@ -1336,20 +1337,20 @@ msgid "" "formatting`." msgstr "" -#: ../../reference/expressions.rst:1316 +#: ../../reference/expressions.rst:1318 msgid "" "The *modulo* operation can be customized using the special :meth:`__mod__` " "method." msgstr "" -#: ../../reference/expressions.rst:1318 +#: ../../reference/expressions.rst:1320 msgid "" "The floor division operator, the modulo operator, and the :func:`divmod` " "function are not defined for complex numbers. Instead, convert to a " "floating point number using the :func:`abs` function if appropriate." msgstr "" -#: ../../reference/expressions.rst:1327 +#: ../../reference/expressions.rst:1329 msgid "" "The ``+`` (addition) operator yields the sum of its arguments. The " "arguments must either both be numbers or both be sequences of the same " @@ -1357,84 +1358,84 @@ msgid "" "then added together. In the latter case, the sequences are concatenated." msgstr "" -#: ../../reference/expressions.rst:1332 +#: ../../reference/expressions.rst:1334 msgid "" "This operation can be customized using the special :meth:`__add__` and :meth:" "`__radd__` methods." msgstr "" -#: ../../reference/expressions.rst:1340 +#: ../../reference/expressions.rst:1342 msgid "" "The ``-`` (subtraction) operator yields the difference of its arguments. " "The numeric arguments are first converted to a common type." msgstr "" -#: ../../reference/expressions.rst:1343 +#: ../../reference/expressions.rst:1345 msgid "" "This operation can be customized using the special :meth:`__sub__` method." msgstr "" -#: ../../reference/expressions.rst:1349 +#: ../../reference/expressions.rst:1351 msgid "Shifting operations" msgstr "" -#: ../../reference/expressions.rst:1356 +#: ../../reference/expressions.rst:1358 msgid "" "The shifting operations have lower priority than the arithmetic operations:" msgstr "" -#: ../../reference/expressions.rst:1361 +#: ../../reference/expressions.rst:1363 msgid "" "These operators accept integers as arguments. They shift the first argument " "to the left or right by the number of bits given by the second argument." msgstr "" -#: ../../reference/expressions.rst:1364 +#: ../../reference/expressions.rst:1366 msgid "" "This operation can be customized using the special :meth:`__lshift__` and :" "meth:`__rshift__` methods." msgstr "" -#: ../../reference/expressions.rst:1369 +#: ../../reference/expressions.rst:1371 msgid "" "A right shift by *n* bits is defined as floor division by ``pow(2,n)``. A " "left shift by *n* bits is defined as multiplication with ``pow(2,n)``." msgstr "" -#: ../../reference/expressions.rst:1376 +#: ../../reference/expressions.rst:1378 msgid "Binary bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1380 +#: ../../reference/expressions.rst:1382 msgid "Each of the three bitwise operations has a different priority level:" msgstr "" -#: ../../reference/expressions.rst:1391 +#: ../../reference/expressions.rst:1393 msgid "" "The ``&`` operator yields the bitwise AND of its arguments, which must be " "integers or one of them must be a custom object overriding :meth:`__and__` " "or :meth:`__rand__` special methods." msgstr "" -#: ../../reference/expressions.rst:1400 +#: ../../reference/expressions.rst:1402 msgid "" "The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, " "which must be integers or one of them must be a custom object overriding :" "meth:`__xor__` or :meth:`__rxor__` special methods." msgstr "" -#: ../../reference/expressions.rst:1409 +#: ../../reference/expressions.rst:1411 msgid "" "The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which " "must be integers or one of them must be a custom object overriding :meth:" "`__or__` or :meth:`__ror__` special methods." msgstr "" -#: ../../reference/expressions.rst:1417 +#: ../../reference/expressions.rst:1419 msgid "Comparisons" msgstr "" -#: ../../reference/expressions.rst:1429 +#: ../../reference/expressions.rst:1431 msgid "" "Unlike C, all comparison operations in Python have the same priority, which " "is lower than that of any arithmetic, shifting or bitwise operation. Also " @@ -1442,14 +1443,14 @@ msgid "" "conventional in mathematics:" msgstr "" -#: ../../reference/expressions.rst:1439 +#: ../../reference/expressions.rst:1441 msgid "" "Comparisons yield boolean values: ``True`` or ``False``. Custom :dfn:`rich " "comparison methods` may return non-boolean values. In this case Python will " "call :func:`bool` on such value in boolean contexts." msgstr "" -#: ../../reference/expressions.rst:1445 +#: ../../reference/expressions.rst:1447 msgid "" "Comparisons can be chained arbitrarily, e.g., ``x < y <= z`` is equivalent " "to ``x < y and y <= z``, except that ``y`` is evaluated only once (but in " @@ -1457,7 +1458,7 @@ msgid "" "false)." msgstr "" -#: ../../reference/expressions.rst:1449 +#: ../../reference/expressions.rst:1451 msgid "" "Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*, " "*op2*, ..., *opN* are comparison operators, then ``a op1 b op2 c ... y opN " @@ -1465,24 +1466,24 @@ msgid "" "each expression is evaluated at most once." msgstr "" -#: ../../reference/expressions.rst:1454 +#: ../../reference/expressions.rst:1456 msgid "" "Note that ``a op1 b op2 c`` doesn't imply any kind of comparison between *a* " "and *c*, so that, e.g., ``x < y > z`` is perfectly legal (though perhaps not " "pretty)." msgstr "" -#: ../../reference/expressions.rst:1461 +#: ../../reference/expressions.rst:1463 msgid "Value comparisons" msgstr "" -#: ../../reference/expressions.rst:1463 +#: ../../reference/expressions.rst:1465 msgid "" "The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the " "values of two objects. The objects do not need to have the same type." msgstr "" -#: ../../reference/expressions.rst:1466 +#: ../../reference/expressions.rst:1468 msgid "" "Chapter :ref:`objects` states that objects have a value (in addition to type " "and identity). The value of an object is a rather abstract notion in " @@ -1494,7 +1495,7 @@ msgid "" "indirectly, by means of their comparison implementation." msgstr "" -#: ../../reference/expressions.rst:1475 +#: ../../reference/expressions.rst:1477 msgid "" "Because all types are (direct or indirect) subtypes of :class:`object`, they " "inherit the default comparison behavior from :class:`object`. Types can " @@ -1502,7 +1503,7 @@ msgid "" "methods` like :meth:`__lt__`, described in :ref:`customization`." msgstr "" -#: ../../reference/expressions.rst:1481 +#: ../../reference/expressions.rst:1483 msgid "" "The default behavior for equality comparison (``==`` and ``!=``) is based on " "the identity of the objects. Hence, equality comparison of instances with " @@ -1512,14 +1513,14 @@ msgid "" "``x is y`` implies ``x == y``)." msgstr "" -#: ../../reference/expressions.rst:1488 +#: ../../reference/expressions.rst:1490 msgid "" "A default order comparison (``<``, ``>``, ``<=``, and ``>=``) is not " "provided; an attempt raises :exc:`TypeError`. A motivation for this default " "behavior is the lack of a similar invariant as for equality." msgstr "" -#: ../../reference/expressions.rst:1492 +#: ../../reference/expressions.rst:1494 msgid "" "The behavior of the default equality comparison, that instances with " "different identities are always unequal, may be in contrast to what types " @@ -1528,13 +1529,13 @@ msgid "" "in fact, a number of built-in types have done that." msgstr "" -#: ../../reference/expressions.rst:1498 +#: ../../reference/expressions.rst:1500 msgid "" "The following list describes the comparison behavior of the most important " "built-in types." msgstr "" -#: ../../reference/expressions.rst:1501 +#: ../../reference/expressions.rst:1503 msgid "" "Numbers of built-in numeric types (:ref:`typesnumeric`) and of the standard " "library types :class:`fractions.Fraction` and :class:`decimal.Decimal` can " @@ -1544,7 +1545,7 @@ msgid "" "of precision." msgstr "" -#: ../../reference/expressions.rst:1508 +#: ../../reference/expressions.rst:1510 msgid "" "The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are " "special. Any ordered comparison of a number to a not-a-number value is " @@ -1554,32 +1555,32 @@ msgid "" "is compliant with IEEE 754." msgstr "" -#: ../../reference/expressions.rst:1515 +#: ../../reference/expressions.rst:1517 msgid "" "``None`` and ``NotImplemented`` are singletons. :PEP:`8` advises that " "comparisons for singletons should always be done with ``is`` or ``is not``, " "never the equality operators." msgstr "" -#: ../../reference/expressions.rst:1519 +#: ../../reference/expressions.rst:1521 msgid "" "Binary sequences (instances of :class:`bytes` or :class:`bytearray`) can be " "compared within and across their types. They compare lexicographically " "using the numeric values of their elements." msgstr "" -#: ../../reference/expressions.rst:1523 +#: ../../reference/expressions.rst:1525 msgid "" "Strings (instances of :class:`str`) compare lexicographically using the " "numerical Unicode code points (the result of the built-in function :func:" "`ord`) of their characters. [#]_" msgstr "" -#: ../../reference/expressions.rst:1527 +#: ../../reference/expressions.rst:1529 msgid "Strings and binary sequences cannot be directly compared." msgstr "" -#: ../../reference/expressions.rst:1529 +#: ../../reference/expressions.rst:1531 msgid "" "Sequences (instances of :class:`tuple`, :class:`list`, or :class:`range`) " "can be compared only within each of their types, with the restriction that " @@ -1588,7 +1589,7 @@ msgid "" "raises :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1535 +#: ../../reference/expressions.rst:1537 msgid "" "Sequences compare lexicographically using comparison of corresponding " "elements. The built-in containers typically assume identical objects are " @@ -1596,19 +1597,19 @@ msgid "" "objects to improve performance and to maintain their internal invariants." msgstr "" -#: ../../reference/expressions.rst:1540 +#: ../../reference/expressions.rst:1542 msgid "" "Lexicographical comparison between built-in collections works as follows:" msgstr "" -#: ../../reference/expressions.rst:1542 +#: ../../reference/expressions.rst:1544 msgid "" "For two collections to compare equal, they must be of the same type, have " "the same length, and each pair of corresponding elements must compare equal " "(for example, ``[1,2] == (1,2)`` is false because the type is not the same)." msgstr "" -#: ../../reference/expressions.rst:1547 +#: ../../reference/expressions.rst:1549 msgid "" "Collections that support order comparison are ordered the same as their " "first unequal elements (for example, ``[1,2,x] <= [1,2,y]`` has the same " @@ -1617,25 +1618,25 @@ msgid "" "true)." msgstr "" -#: ../../reference/expressions.rst:1553 +#: ../../reference/expressions.rst:1555 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " "equal ``(key, value)`` pairs. Equality comparison of the keys and values " "enforces reflexivity." msgstr "" -#: ../../reference/expressions.rst:1557 +#: ../../reference/expressions.rst:1559 msgid "" "Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1559 +#: ../../reference/expressions.rst:1561 msgid "" "Sets (instances of :class:`set` or :class:`frozenset`) can be compared " "within and across their types." msgstr "" -#: ../../reference/expressions.rst:1562 +#: ../../reference/expressions.rst:1564 msgid "" "They define order comparison operators to mean subset and superset tests. " "Those relations do not define total orderings (for example, the two sets " @@ -1646,110 +1647,110 @@ msgid "" "sets as inputs)." msgstr "" -#: ../../reference/expressions.rst:1570 +#: ../../reference/expressions.rst:1572 msgid "Comparison of sets enforces reflexivity of its elements." msgstr "" -#: ../../reference/expressions.rst:1572 +#: ../../reference/expressions.rst:1574 msgid "" "Most other built-in types have no comparison methods implemented, so they " "inherit the default comparison behavior." msgstr "" -#: ../../reference/expressions.rst:1575 +#: ../../reference/expressions.rst:1577 msgid "" "User-defined classes that customize their comparison behavior should follow " "some consistency rules, if possible:" msgstr "" -#: ../../reference/expressions.rst:1578 +#: ../../reference/expressions.rst:1580 msgid "" "Equality comparison should be reflexive. In other words, identical objects " "should compare equal:" msgstr "" -#: ../../reference/expressions.rst:1581 +#: ../../reference/expressions.rst:1583 msgid "``x is y`` implies ``x == y``" msgstr "" -#: ../../reference/expressions.rst:1583 +#: ../../reference/expressions.rst:1585 msgid "" "Comparison should be symmetric. In other words, the following expressions " "should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1586 +#: ../../reference/expressions.rst:1588 msgid "``x == y`` and ``y == x``" msgstr "``x == y`` 和 ``y == x``" -#: ../../reference/expressions.rst:1588 +#: ../../reference/expressions.rst:1590 msgid "``x != y`` and ``y != x``" msgstr "``x != y`` 和 ``y != x``" -#: ../../reference/expressions.rst:1590 +#: ../../reference/expressions.rst:1592 msgid "``x < y`` and ``y > x``" msgstr "``x < y`` 和 ``y > x``" -#: ../../reference/expressions.rst:1592 +#: ../../reference/expressions.rst:1594 msgid "``x <= y`` and ``y >= x``" msgstr "``x <= y`` 和 ``y >= x``" -#: ../../reference/expressions.rst:1594 +#: ../../reference/expressions.rst:1596 msgid "" "Comparison should be transitive. The following (non-exhaustive) examples " "illustrate that:" msgstr "" -#: ../../reference/expressions.rst:1597 +#: ../../reference/expressions.rst:1599 msgid "``x > y and y > z`` implies ``x > z``" msgstr "``x > y and y > z`` 暗示了 ``x > z``" -#: ../../reference/expressions.rst:1599 +#: ../../reference/expressions.rst:1601 msgid "``x < y and y <= z`` implies ``x < z``" msgstr "``x < y and y <= z`` 暗示了 ``x < z``" -#: ../../reference/expressions.rst:1601 +#: ../../reference/expressions.rst:1603 msgid "" "Inverse comparison should result in the boolean negation. In other words, " "the following expressions should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1604 +#: ../../reference/expressions.rst:1606 msgid "``x == y`` and ``not x != y``" msgstr "``x == y`` 和 ``not x != y``" -#: ../../reference/expressions.rst:1606 +#: ../../reference/expressions.rst:1608 msgid "``x < y`` and ``not x >= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1608 +#: ../../reference/expressions.rst:1610 msgid "``x > y`` and ``not x <= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1610 +#: ../../reference/expressions.rst:1612 msgid "" "The last two expressions apply to totally ordered collections (e.g. to " "sequences, but not to sets or mappings). See also the :func:`~functools." "total_ordering` decorator." msgstr "" -#: ../../reference/expressions.rst:1614 +#: ../../reference/expressions.rst:1616 msgid "" "The :func:`hash` result should be consistent with equality. Objects that are " "equal should either have the same hash value, or be marked as unhashable." msgstr "" -#: ../../reference/expressions.rst:1618 +#: ../../reference/expressions.rst:1620 msgid "" "Python does not enforce these consistency rules. In fact, the not-a-number " "values are an example for not following these rules." msgstr "" -#: ../../reference/expressions.rst:1627 +#: ../../reference/expressions.rst:1629 msgid "Membership test operations" msgstr "" -#: ../../reference/expressions.rst:1629 +#: ../../reference/expressions.rst:1631 msgid "" "The operators :keyword:`in` and :keyword:`not in` test for membership. ``x " "in s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` " @@ -1760,22 +1761,22 @@ msgid "" "expression ``x in y`` is equivalent to ``any(x is e or x == e for e in y)``." msgstr "" -#: ../../reference/expressions.rst:1637 +#: ../../reference/expressions.rst:1639 msgid "" "For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is " "a substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty " -"strings are always considered to be a substring of any other string, so ``" -"\"\" in \"abc\"`` will return ``True``." +"strings are always considered to be a substring of any other string, so " +"``\"\" in \"abc\"`` will return ``True``." msgstr "" -#: ../../reference/expressions.rst:1642 +#: ../../reference/expressions.rst:1644 msgid "" "For user-defined classes which define the :meth:`__contains__` method, ``x " "in y`` returns ``True`` if ``y.__contains__(x)`` returns a true value, and " "``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1646 +#: ../../reference/expressions.rst:1648 msgid "" "For user-defined classes which do not define :meth:`__contains__` but do " "define :meth:`__iter__`, ``x in y`` is ``True`` if some value ``z``, for " @@ -1784,7 +1785,7 @@ msgid "" "as if :keyword:`in` raised that exception." msgstr "" -#: ../../reference/expressions.rst:1652 +#: ../../reference/expressions.rst:1654 msgid "" "Lastly, the old-style iteration protocol is tried: if a class defines :meth:" "`__getitem__`, ``x in y`` is ``True`` if and only if there is a non-negative " @@ -1793,17 +1794,17 @@ msgid "" "raised, it is as if :keyword:`in` raised that exception)." msgstr "" -#: ../../reference/expressions.rst:1664 +#: ../../reference/expressions.rst:1666 msgid "" "The operator :keyword:`not in` is defined to have the inverse truth value " "of :keyword:`in`." msgstr "" -#: ../../reference/expressions.rst:1677 +#: ../../reference/expressions.rst:1679 msgid "Identity comparisons" msgstr "" -#: ../../reference/expressions.rst:1679 +#: ../../reference/expressions.rst:1681 msgid "" "The operators :keyword:`is` and :keyword:`is not` test for an object's " "identity: ``x is y`` is true if and only if *x* and *y* are the same " @@ -1811,11 +1812,11 @@ msgid "" "``x is not y`` yields the inverse truth value. [#]_" msgstr "" -#: ../../reference/expressions.rst:1691 +#: ../../reference/expressions.rst:1693 msgid "Boolean operations" msgstr "" -#: ../../reference/expressions.rst:1702 +#: ../../reference/expressions.rst:1704 msgid "" "In the context of Boolean operations, and also when expressions are used by " "control flow statements, the following values are interpreted as false: " @@ -1826,25 +1827,25 @@ msgid "" "method." msgstr "" -#: ../../reference/expressions.rst:1711 +#: ../../reference/expressions.rst:1713 msgid "" "The operator :keyword:`not` yields ``True`` if its argument is false, " "``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1716 +#: ../../reference/expressions.rst:1718 msgid "" "The expression ``x and y`` first evaluates *x*; if *x* is false, its value " "is returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1721 +#: ../../reference/expressions.rst:1723 msgid "" "The expression ``x or y`` first evaluates *x*; if *x* is true, its value is " "returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1724 +#: ../../reference/expressions.rst:1726 msgid "" "Note that neither :keyword:`and` nor :keyword:`or` restrict the value and " "type they return to ``False`` and ``True``, but rather return the last " @@ -1855,11 +1856,11 @@ msgid "" "argument (for example, ``not 'foo'`` produces ``False`` rather than ``''``.)" msgstr "" -#: ../../reference/expressions.rst:1740 +#: ../../reference/expressions.rst:1742 msgid "Assignment expressions" msgstr "" -#: ../../reference/expressions.rst:1745 +#: ../../reference/expressions.rst:1747 msgid "" "An assignment expression (sometimes also called a \"named expression\" or " "\"walrus\") assigns an :token:`~python-grammar:expression` to an :token:" @@ -1867,15 +1868,15 @@ msgid "" "`~python-grammar:expression`." msgstr "" -#: ../../reference/expressions.rst:1750 +#: ../../reference/expressions.rst:1752 msgid "One common use case is when handling matched regular expressions:" msgstr "" -#: ../../reference/expressions.rst:1757 +#: ../../reference/expressions.rst:1759 msgid "Or, when processing a file stream in chunks:" msgstr "" -#: ../../reference/expressions.rst:1764 +#: ../../reference/expressions.rst:1766 msgid "" "Assignment expressions must be surrounded by parentheses when used as sub-" "expressions in slicing, conditional, lambda, keyword-argument, and " @@ -1884,36 +1885,36 @@ msgid "" "including in ``if`` and ``while`` statements." msgstr "" -#: ../../reference/expressions.rst:1771 +#: ../../reference/expressions.rst:1773 msgid "See :pep:`572` for more details about assignment expressions." msgstr "" -#: ../../reference/expressions.rst:1778 +#: ../../reference/expressions.rst:1780 msgid "Conditional expressions" msgstr "" -#: ../../reference/expressions.rst:1790 +#: ../../reference/expressions.rst:1792 msgid "" "Conditional expressions (sometimes called a \"ternary operator\") have the " "lowest priority of all Python operations." msgstr "" -#: ../../reference/expressions.rst:1793 +#: ../../reference/expressions.rst:1795 msgid "" "The expression ``x if C else y`` first evaluates the condition, *C* rather " "than *x*. If *C* is true, *x* is evaluated and its value is returned; " "otherwise, *y* is evaluated and its value is returned." msgstr "" -#: ../../reference/expressions.rst:1797 +#: ../../reference/expressions.rst:1799 msgid "See :pep:`308` for more details about conditional expressions." msgstr "" -#: ../../reference/expressions.rst:1804 +#: ../../reference/expressions.rst:1806 msgid "Lambdas" msgstr "" -#: ../../reference/expressions.rst:1815 +#: ../../reference/expressions.rst:1817 msgid "" "Lambda expressions (sometimes called lambda forms) are used to create " "anonymous functions. The expression ``lambda parameters: expression`` yields " @@ -1921,25 +1922,25 @@ msgid "" "defined with:" msgstr "" -#: ../../reference/expressions.rst:1824 +#: ../../reference/expressions.rst:1826 msgid "" "See section :ref:`function` for the syntax of parameter lists. Note that " "functions created with lambda expressions cannot contain statements or " "annotations." msgstr "" -#: ../../reference/expressions.rst:1832 +#: ../../reference/expressions.rst:1834 msgid "Expression lists" msgstr "" -#: ../../reference/expressions.rst:1846 +#: ../../reference/expressions.rst:1848 msgid "" "Except when part of a list or set display, an expression list containing at " "least one comma yields a tuple. The length of the tuple is the number of " "expressions in the list. The expressions are evaluated from left to right." msgstr "" -#: ../../reference/expressions.rst:1855 +#: ../../reference/expressions.rst:1857 msgid "" "An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be " "an :term:`iterable`. The iterable is expanded into a sequence of items, " @@ -1947,12 +1948,12 @@ msgid "" "unpacking." msgstr "" -#: ../../reference/expressions.rst:1860 +#: ../../reference/expressions.rst:1862 msgid "" "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1865 +#: ../../reference/expressions.rst:1867 msgid "" "The trailing comma is required only to create a single tuple (a.k.a. a " "*singleton*); it is optional in all other cases. A single expression " @@ -1961,28 +1962,28 @@ msgid "" "parentheses: ``()``.)" msgstr "" -#: ../../reference/expressions.rst:1875 +#: ../../reference/expressions.rst:1877 msgid "Evaluation order" msgstr "" -#: ../../reference/expressions.rst:1879 +#: ../../reference/expressions.rst:1881 msgid "" "Python evaluates expressions from left to right. Notice that while " "evaluating an assignment, the right-hand side is evaluated before the left-" "hand side." msgstr "" -#: ../../reference/expressions.rst:1882 +#: ../../reference/expressions.rst:1884 msgid "" "In the following lines, expressions will be evaluated in the arithmetic " "order of their suffixes::" msgstr "" -#: ../../reference/expressions.rst:1896 +#: ../../reference/expressions.rst:1898 msgid "Operator precedence" msgstr "" -#: ../../reference/expressions.rst:1901 +#: ../../reference/expressions.rst:1903 msgid "" "The following table summarizes the operator precedence in Python, from " "highest precedence (most binding) to lowest precedence (least binding). " @@ -1992,176 +1993,176 @@ msgid "" "group from right to left)." msgstr "" -#: ../../reference/expressions.rst:1907 +#: ../../reference/expressions.rst:1909 msgid "" "Note that comparisons, membership tests, and identity tests, all have the " "same precedence and have a left-to-right chaining feature as described in " "the :ref:`comparisons` section." msgstr "" -#: ../../reference/expressions.rst:1913 +#: ../../reference/expressions.rst:1915 msgid "Operator" msgstr "" -#: ../../reference/expressions.rst:1913 +#: ../../reference/expressions.rst:1915 msgid "Description" msgstr "描述" -#: ../../reference/expressions.rst:1915 +#: ../../reference/expressions.rst:1917 msgid "``(expressions...)``," msgstr "``(expressions...)``," -#: ../../reference/expressions.rst:1917 +#: ../../reference/expressions.rst:1919 msgid "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" msgstr "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" -#: ../../reference/expressions.rst:1915 +#: ../../reference/expressions.rst:1917 msgid "" "Binding or parenthesized expression, list display, dictionary display, set " "display" msgstr "" -#: ../../reference/expressions.rst:1921 +#: ../../reference/expressions.rst:1923 msgid "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" msgstr "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" -#: ../../reference/expressions.rst:1921 +#: ../../reference/expressions.rst:1923 msgid "Subscription, slicing, call, attribute reference" msgstr "" -#: ../../reference/expressions.rst:1924 +#: ../../reference/expressions.rst:1926 msgid ":keyword:`await x `" msgstr ":keyword:`await x `" -#: ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:1928 msgid "``**``" msgstr "``**``" -#: ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:1928 msgid "Exponentiation [#]_" msgstr "" -#: ../../reference/expressions.rst:1928 +#: ../../reference/expressions.rst:1930 msgid "``+x``, ``-x``, ``~x``" msgstr "``+x``, ``-x``, ``~x``" -#: ../../reference/expressions.rst:1928 +#: ../../reference/expressions.rst:1930 msgid "Positive, negative, bitwise NOT" msgstr "" -#: ../../reference/expressions.rst:1930 +#: ../../reference/expressions.rst:1932 msgid "``*``, ``@``, ``/``, ``//``, ``%``" msgstr "``*``, ``@``, ``/``, ``//``, ``%``" -#: ../../reference/expressions.rst:1930 +#: ../../reference/expressions.rst:1932 msgid "" "Multiplication, matrix multiplication, division, floor division, remainder " "[#]_" msgstr "" -#: ../../reference/expressions.rst:1934 +#: ../../reference/expressions.rst:1936 msgid "``+``, ``-``" msgstr "``+``, ``-``" -#: ../../reference/expressions.rst:1934 +#: ../../reference/expressions.rst:1936 msgid "Addition and subtraction" msgstr "" -#: ../../reference/expressions.rst:1936 +#: ../../reference/expressions.rst:1938 msgid "``<<``, ``>>``" msgstr "``<<``, ``>>``" -#: ../../reference/expressions.rst:1936 +#: ../../reference/expressions.rst:1938 msgid "Shifts" msgstr "" -#: ../../reference/expressions.rst:1938 +#: ../../reference/expressions.rst:1940 msgid "``&``" msgstr "``&``" -#: ../../reference/expressions.rst:1938 +#: ../../reference/expressions.rst:1940 msgid "Bitwise AND" msgstr "" -#: ../../reference/expressions.rst:1940 +#: ../../reference/expressions.rst:1942 msgid "``^``" msgstr "``^``" -#: ../../reference/expressions.rst:1940 +#: ../../reference/expressions.rst:1942 msgid "Bitwise XOR" msgstr "" -#: ../../reference/expressions.rst:1942 +#: ../../reference/expressions.rst:1944 msgid "``|``" msgstr "``|``" -#: ../../reference/expressions.rst:1942 +#: ../../reference/expressions.rst:1944 msgid "Bitwise OR" msgstr "" -#: ../../reference/expressions.rst:1944 +#: ../../reference/expressions.rst:1946 msgid "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" msgstr "" -#: ../../reference/expressions.rst:1944 +#: ../../reference/expressions.rst:1946 msgid "Comparisons, including membership tests and identity tests" msgstr "" -#: ../../reference/expressions.rst:1948 +#: ../../reference/expressions.rst:1950 msgid ":keyword:`not x `" msgstr ":keyword:`not x `" -#: ../../reference/expressions.rst:1948 +#: ../../reference/expressions.rst:1950 msgid "Boolean NOT" msgstr "" -#: ../../reference/expressions.rst:1950 +#: ../../reference/expressions.rst:1952 msgid ":keyword:`and`" msgstr ":keyword:`and`" -#: ../../reference/expressions.rst:1950 +#: ../../reference/expressions.rst:1952 msgid "Boolean AND" msgstr "" -#: ../../reference/expressions.rst:1952 +#: ../../reference/expressions.rst:1954 msgid ":keyword:`or`" msgstr ":keyword:`or`" -#: ../../reference/expressions.rst:1952 +#: ../../reference/expressions.rst:1954 msgid "Boolean OR" msgstr "" -#: ../../reference/expressions.rst:1954 +#: ../../reference/expressions.rst:1956 msgid ":keyword:`if ` -- :keyword:`!else`" msgstr ":keyword:`if ` -- :keyword:`!else`" -#: ../../reference/expressions.rst:1954 +#: ../../reference/expressions.rst:1956 msgid "Conditional expression" msgstr "" -#: ../../reference/expressions.rst:1956 +#: ../../reference/expressions.rst:1958 msgid ":keyword:`lambda`" msgstr ":keyword:`lambda`" -#: ../../reference/expressions.rst:1956 +#: ../../reference/expressions.rst:1958 msgid "Lambda expression" msgstr "" -#: ../../reference/expressions.rst:1958 +#: ../../reference/expressions.rst:1960 msgid "``:=``" msgstr "``:=``" -#: ../../reference/expressions.rst:1958 +#: ../../reference/expressions.rst:1960 msgid "Assignment expression" msgstr "" -#: ../../reference/expressions.rst:1963 +#: ../../reference/expressions.rst:1965 msgid "Footnotes" msgstr "註解" -#: ../../reference/expressions.rst:1964 +#: ../../reference/expressions.rst:1966 msgid "" "While ``abs(x%y) < abs(y)`` is true mathematically, for floats it may not be " "true numerically due to roundoff. For example, and assuming a platform on " @@ -2173,7 +2174,7 @@ msgid "" "approach is more appropriate depends on the application." msgstr "" -#: ../../reference/expressions.rst:1973 +#: ../../reference/expressions.rst:1975 msgid "" "If x is very close to an exact integer multiple of y, it's possible for ``x//" "y`` to be one larger than ``(x-x%y)//y`` due to rounding. In such cases, " @@ -2181,7 +2182,7 @@ msgid "" "* y + x % y`` be very close to ``x``." msgstr "" -#: ../../reference/expressions.rst:1978 +#: ../../reference/expressions.rst:1980 msgid "" "The Unicode standard distinguishes between :dfn:`code points` (e.g. U+0041) " "and :dfn:`abstract characters` (e.g. \"LATIN CAPITAL LETTER A\"). While most " @@ -2195,7 +2196,7 @@ msgid "" "(COMBINING CEDILLA)." msgstr "" -#: ../../reference/expressions.rst:1989 +#: ../../reference/expressions.rst:1991 msgid "" "The comparison operators on strings compare at the level of Unicode code " "points. This may be counter-intuitive to humans. For example, ``\"\\u00C7\" " @@ -2203,13 +2204,13 @@ msgid "" "same abstract character \"LATIN CAPITAL LETTER C WITH CEDILLA\"." msgstr "" -#: ../../reference/expressions.rst:1994 +#: ../../reference/expressions.rst:1996 msgid "" "To compare strings at the level of abstract characters (that is, in a way " "intuitive to humans), use :func:`unicodedata.normalize`." msgstr "" -#: ../../reference/expressions.rst:1997 +#: ../../reference/expressions.rst:1999 msgid "" "Due to automatic garbage-collection, free lists, and the dynamic nature of " "descriptors, you may notice seemingly unusual behaviour in certain uses of " @@ -2217,13 +2218,13 @@ msgid "" "instance methods, or constants. Check their documentation for more info." msgstr "" -#: ../../reference/expressions.rst:2002 +#: ../../reference/expressions.rst:2004 msgid "" "The power operator ``**`` binds less tightly than an arithmetic or bitwise " "unary operator on its right, that is, ``2**-1`` is ``0.5``." msgstr "" -#: ../../reference/expressions.rst:2005 +#: ../../reference/expressions.rst:2007 msgid "" "The ``%`` operator is also used for string formatting; the same precedence " "applies." diff --git a/tutorial/appendix.po b/tutorial/appendix.po index d63a4f5ff6..e05151dce8 100644 --- a/tutorial/appendix.po +++ b/tutorial/appendix.po @@ -151,7 +151,7 @@ msgid "" "script::" msgstr "" "如果你想從當前目錄中讀取一個額外的啟動檔案,你可以在全域啟動檔案中使用類似 " -"``if os.path.isfile(‘.pythonrc.py’): exec(open(‘.pythonrc.py ‘).read()`` 的程" +"``if os.path.isfile('.pythonrc.py'): exec(open('.pythonrc.py').read()`` 的程" "式碼設定這個行為。如果你想在一個腳本中使用啟動檔案,你必須在腳本中明確地這樣" "做:\n" "\n" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 29f8d42048..61012f123b 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-30 00:19+0000\n" +"POT-Creation-Date: 2023-01-04 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,133 +22,117 @@ msgstr "" msgid "What's New In Python 3.10" msgstr "Python 3.10 有什麼新功能" -#: ../../whatsnew/3.10.rst:0 -msgid "Release" -msgstr "發行版本" - -#: ../../whatsnew/3.10.rst:5 -msgid "|release|" -msgstr "|release|" - -#: ../../whatsnew/3.10.rst:0 -msgid "Date" -msgstr "日期" - -#: ../../whatsnew/3.10.rst:6 -msgid "|today|" -msgstr "|today|" - #: ../../whatsnew/3.10.rst:0 msgid "Editor" msgstr "編輯者" -#: ../../whatsnew/3.10.rst:7 +#: ../../whatsnew/3.10.rst:5 msgid "Pablo Galindo Salgado" msgstr "Pablo Galindo Salgado" -#: ../../whatsnew/3.10.rst:49 +#: ../../whatsnew/3.10.rst:47 msgid "" "This article explains the new features in Python 3.10, compared to 3.9. " "Python 3.10 was released on October 4, 2021. For full details, see the :ref:" "`changelog `." msgstr "" -#: ../../whatsnew/3.10.rst:54 +#: ../../whatsnew/3.10.rst:52 msgid "Summary -- Release highlights" msgstr "" -#: ../../whatsnew/3.10.rst:62 +#: ../../whatsnew/3.10.rst:60 msgid "New syntax features:" msgstr "" -#: ../../whatsnew/3.10.rst:64 +#: ../../whatsnew/3.10.rst:62 msgid ":pep:`634`, Structural Pattern Matching: Specification" msgstr "" -#: ../../whatsnew/3.10.rst:65 +#: ../../whatsnew/3.10.rst:63 msgid ":pep:`635`, Structural Pattern Matching: Motivation and Rationale" msgstr "" -#: ../../whatsnew/3.10.rst:66 +#: ../../whatsnew/3.10.rst:64 msgid ":pep:`636`, Structural Pattern Matching: Tutorial" msgstr "" -#: ../../whatsnew/3.10.rst:67 +#: ../../whatsnew/3.10.rst:65 msgid "" ":issue:`12782`, Parenthesized context managers are now officially allowed." msgstr "" -#: ../../whatsnew/3.10.rst:69 +#: ../../whatsnew/3.10.rst:67 msgid "New features in the standard library:" msgstr "" -#: ../../whatsnew/3.10.rst:71 +#: ../../whatsnew/3.10.rst:69 msgid ":pep:`618`, Add Optional Length-Checking To zip." msgstr "" -#: ../../whatsnew/3.10.rst:73 +#: ../../whatsnew/3.10.rst:71 msgid "Interpreter improvements:" msgstr "" -#: ../../whatsnew/3.10.rst:75 +#: ../../whatsnew/3.10.rst:73 msgid ":pep:`626`, Precise line numbers for debugging and other tools." msgstr "" -#: ../../whatsnew/3.10.rst:77 +#: ../../whatsnew/3.10.rst:75 msgid "New typing features:" msgstr "" -#: ../../whatsnew/3.10.rst:79 +#: ../../whatsnew/3.10.rst:77 msgid ":pep:`604`, Allow writing union types as X | Y" msgstr "" -#: ../../whatsnew/3.10.rst:80 +#: ../../whatsnew/3.10.rst:78 msgid ":pep:`612`, Parameter Specification Variables" msgstr "" -#: ../../whatsnew/3.10.rst:81 +#: ../../whatsnew/3.10.rst:79 msgid ":pep:`613`, Explicit Type Aliases" msgstr "" -#: ../../whatsnew/3.10.rst:82 +#: ../../whatsnew/3.10.rst:80 msgid ":pep:`647`, User-Defined Type Guards" msgstr "" -#: ../../whatsnew/3.10.rst:84 +#: ../../whatsnew/3.10.rst:82 msgid "Important deprecations, removals or restrictions:" msgstr "" -#: ../../whatsnew/3.10.rst:86 +#: ../../whatsnew/3.10.rst:84 msgid ":pep:`644`, Require OpenSSL 1.1.1 or newer" msgstr "" -#: ../../whatsnew/3.10.rst:87 +#: ../../whatsnew/3.10.rst:85 msgid ":pep:`632`, Deprecate distutils module." msgstr "" -#: ../../whatsnew/3.10.rst:88 +#: ../../whatsnew/3.10.rst:86 msgid "" ":pep:`623`, Deprecate and prepare for the removal of the wstr member in " "PyUnicodeObject." msgstr "" -#: ../../whatsnew/3.10.rst:89 +#: ../../whatsnew/3.10.rst:87 msgid ":pep:`624`, Remove Py_UNICODE encoder APIs" msgstr "" -#: ../../whatsnew/3.10.rst:90 +#: ../../whatsnew/3.10.rst:88 msgid ":pep:`597`, Add optional EncodingWarning" msgstr "" -#: ../../whatsnew/3.10.rst:94 ../../whatsnew/3.10.rst:2056 +#: ../../whatsnew/3.10.rst:92 ../../whatsnew/3.10.rst:2054 msgid "New Features" msgstr "" -#: ../../whatsnew/3.10.rst:99 +#: ../../whatsnew/3.10.rst:97 msgid "Parenthesized context managers" msgstr "" -#: ../../whatsnew/3.10.rst:101 +#: ../../whatsnew/3.10.rst:99 msgid "" "Using enclosing parentheses for continuation across multiple lines in " "context managers is now supported. This allows formatting a long collection " @@ -157,32 +141,32 @@ msgid "" "valid:" msgstr "" -#: ../../whatsnew/3.10.rst:132 +#: ../../whatsnew/3.10.rst:130 msgid "" "it is also possible to use a trailing comma at the end of the enclosed group:" msgstr "" -#: ../../whatsnew/3.10.rst:144 +#: ../../whatsnew/3.10.rst:142 msgid "" "This new syntax uses the non LL(1) capacities of the new parser. Check :pep:" "`617` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:147 +#: ../../whatsnew/3.10.rst:145 msgid "" "(Contributed by Guido van Rossum, Pablo Galindo and Lysandros Nikolaou in :" "issue:`12782` and :issue:`40334`.)" msgstr "" -#: ../../whatsnew/3.10.rst:152 +#: ../../whatsnew/3.10.rst:150 msgid "Better error messages" msgstr "" -#: ../../whatsnew/3.10.rst:155 +#: ../../whatsnew/3.10.rst:153 msgid "SyntaxErrors" msgstr "SyntaxErrors" -#: ../../whatsnew/3.10.rst:157 +#: ../../whatsnew/3.10.rst:155 msgid "" "When parsing code that contains unclosed parentheses or brackets the " "interpreter now includes the location of the unclosed bracket of parentheses " @@ -191,35 +175,35 @@ msgid "" "code (notice the unclosed '{'):" msgstr "" -#: ../../whatsnew/3.10.rst:168 +#: ../../whatsnew/3.10.rst:166 msgid "" "Previous versions of the interpreter reported confusing places as the " "location of the syntax error:" msgstr "" -#: ../../whatsnew/3.10.rst:178 +#: ../../whatsnew/3.10.rst:176 msgid "but in Python 3.10 a more informative error is emitted:" msgstr "" -#: ../../whatsnew/3.10.rst:188 +#: ../../whatsnew/3.10.rst:186 msgid "" "In a similar way, errors involving unclosed string literals (single and " "triple quoted) now point to the start of the string instead of reporting EOF/" "EOL." msgstr "" -#: ../../whatsnew/3.10.rst:191 +#: ../../whatsnew/3.10.rst:189 msgid "" "These improvements are inspired by previous work in the PyPy interpreter." msgstr "" -#: ../../whatsnew/3.10.rst:193 +#: ../../whatsnew/3.10.rst:191 msgid "" "(Contributed by Pablo Galindo in :issue:`42864` and Batuhan Taskaya in :" "issue:`40176`.)" msgstr "" -#: ../../whatsnew/3.10.rst:196 +#: ../../whatsnew/3.10.rst:194 msgid "" ":exc:`SyntaxError` exceptions raised by the interpreter will now highlight " "the full error range of the expression that constitutes the syntax error " @@ -227,141 +211,141 @@ msgid "" "of displaying (before Python 3.10):" msgstr "" -#: ../../whatsnew/3.10.rst:209 +#: ../../whatsnew/3.10.rst:207 msgid "now Python 3.10 will display the exception as:" msgstr "" -#: ../../whatsnew/3.10.rst:219 +#: ../../whatsnew/3.10.rst:217 msgid "This improvement was contributed by Pablo Galindo in :issue:`43914`." msgstr "" -#: ../../whatsnew/3.10.rst:221 +#: ../../whatsnew/3.10.rst:219 msgid "" "A considerable amount of new specialized messages for :exc:`SyntaxError` " "exceptions have been incorporated. Some of the most notable ones are as " "follows:" msgstr "" -#: ../../whatsnew/3.10.rst:224 +#: ../../whatsnew/3.10.rst:222 msgid "Missing ``:`` before blocks:" msgstr "" -#: ../../whatsnew/3.10.rst:234 +#: ../../whatsnew/3.10.rst:232 msgid "(Contributed by Pablo Galindo in :issue:`42997`.)" msgstr "" -#: ../../whatsnew/3.10.rst:236 +#: ../../whatsnew/3.10.rst:234 msgid "Unparenthesised tuples in comprehensions targets:" msgstr "" -#: ../../whatsnew/3.10.rst:246 +#: ../../whatsnew/3.10.rst:244 msgid "(Contributed by Pablo Galindo in :issue:`43017`.)" msgstr "" -#: ../../whatsnew/3.10.rst:248 +#: ../../whatsnew/3.10.rst:246 msgid "Missing commas in collection literals and between expressions:" msgstr "" -#: ../../whatsnew/3.10.rst:261 +#: ../../whatsnew/3.10.rst:259 msgid "(Contributed by Pablo Galindo in :issue:`43822`.)" msgstr "" -#: ../../whatsnew/3.10.rst:263 +#: ../../whatsnew/3.10.rst:261 msgid "Multiple Exception types without parentheses:" msgstr "" -#: ../../whatsnew/3.10.rst:275 +#: ../../whatsnew/3.10.rst:273 msgid "(Contributed by Pablo Galindo in :issue:`43149`.)" msgstr "" -#: ../../whatsnew/3.10.rst:277 +#: ../../whatsnew/3.10.rst:275 msgid "Missing ``:`` and values in dictionary literals:" msgstr "" -#: ../../whatsnew/3.10.rst:297 +#: ../../whatsnew/3.10.rst:295 msgid "(Contributed by Pablo Galindo in :issue:`43823`.)" msgstr "" -#: ../../whatsnew/3.10.rst:299 +#: ../../whatsnew/3.10.rst:297 msgid "``try`` blocks without ``except`` or ``finally`` blocks:" msgstr "" -#: ../../whatsnew/3.10.rst:311 +#: ../../whatsnew/3.10.rst:309 msgid "(Contributed by Pablo Galindo in :issue:`44305`.)" msgstr "" -#: ../../whatsnew/3.10.rst:313 +#: ../../whatsnew/3.10.rst:311 msgid "Usage of ``=`` instead of ``==`` in comparisons:" msgstr "" -#: ../../whatsnew/3.10.rst:323 +#: ../../whatsnew/3.10.rst:321 msgid "(Contributed by Pablo Galindo in :issue:`43797`.)" msgstr "" -#: ../../whatsnew/3.10.rst:325 +#: ../../whatsnew/3.10.rst:323 msgid "Usage of ``*`` in f-strings:" msgstr "" -#: ../../whatsnew/3.10.rst:335 +#: ../../whatsnew/3.10.rst:333 msgid "(Contributed by Pablo Galindo in :issue:`41064`.)" msgstr "" -#: ../../whatsnew/3.10.rst:338 +#: ../../whatsnew/3.10.rst:336 msgid "IndentationErrors" msgstr "IndentationErrors" -#: ../../whatsnew/3.10.rst:340 +#: ../../whatsnew/3.10.rst:338 msgid "" "Many :exc:`IndentationError` exceptions now have more context regarding what " "kind of block was expecting an indentation, including the location of the " "statement:" msgstr "" -#: ../../whatsnew/3.10.rst:355 +#: ../../whatsnew/3.10.rst:353 msgid "AttributeErrors" msgstr "AttributeErrors" -#: ../../whatsnew/3.10.rst:357 +#: ../../whatsnew/3.10.rst:355 msgid "" "When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer " "suggestions of similar attribute names in the object that the exception was " "raised from:" msgstr "" -#: ../../whatsnew/3.10.rst:368 ../../whatsnew/3.10.rst:390 +#: ../../whatsnew/3.10.rst:366 ../../whatsnew/3.10.rst:388 msgid "(Contributed by Pablo Galindo in :issue:`38530`.)" msgstr "" -#: ../../whatsnew/3.10.rst:371 +#: ../../whatsnew/3.10.rst:369 msgid "" "Notice this won't work if :c:func:`PyErr_Display` is not called to display " "the error which can happen if some other custom error display function is " "used. This is a common scenario in some REPLs like IPython." msgstr "" -#: ../../whatsnew/3.10.rst:376 +#: ../../whatsnew/3.10.rst:374 msgid "NameErrors" msgstr "NameErrors" -#: ../../whatsnew/3.10.rst:378 +#: ../../whatsnew/3.10.rst:376 msgid "" "When printing :exc:`NameError` raised by the interpreter, :c:func:" "`PyErr_Display` will offer suggestions of similar variable names in the " "function that the exception was raised from:" msgstr "" -#: ../../whatsnew/3.10.rst:393 +#: ../../whatsnew/3.10.rst:391 msgid "" "Notice this won't work if :c:func:`PyErr_Display` is not called to display " "the error, which can happen if some other custom error display function is " "used. This is a common scenario in some REPLs like IPython." msgstr "" -#: ../../whatsnew/3.10.rst:399 +#: ../../whatsnew/3.10.rst:397 msgid "PEP 626: Precise line numbers for debugging and other tools" msgstr "" -#: ../../whatsnew/3.10.rst:401 +#: ../../whatsnew/3.10.rst:399 msgid "" "PEP 626 brings more precise and reliable line numbers for debugging, " "profiling and coverage tools. Tracing events, with the correct line number, " @@ -369,24 +353,24 @@ msgid "" "are executed." msgstr "" -#: ../../whatsnew/3.10.rst:404 +#: ../../whatsnew/3.10.rst:402 msgid "" "The ``f_lineno`` attribute of frame objects will always contain the expected " "line number." msgstr "" -#: ../../whatsnew/3.10.rst:406 +#: ../../whatsnew/3.10.rst:404 msgid "" "The ``co_lnotab`` attribute of code objects is deprecated and will be " "removed in 3.12. Code that needs to convert from offset to line number " "should use the new ``co_lines()`` method instead." msgstr "" -#: ../../whatsnew/3.10.rst:410 +#: ../../whatsnew/3.10.rst:408 msgid "PEP 634: Structural Pattern Matching" msgstr "" -#: ../../whatsnew/3.10.rst:412 +#: ../../whatsnew/3.10.rst:410 msgid "" "Structural pattern matching has been added in the form of a *match " "statement* and *case statements* of patterns with associated actions. " @@ -396,40 +380,40 @@ msgid "" "actions based on different forms of data." msgstr "" -#: ../../whatsnew/3.10.rst:420 +#: ../../whatsnew/3.10.rst:418 msgid "Syntax and operations" msgstr "" -#: ../../whatsnew/3.10.rst:422 +#: ../../whatsnew/3.10.rst:420 msgid "The generic syntax of pattern matching is::" msgstr "" -#: ../../whatsnew/3.10.rst:434 +#: ../../whatsnew/3.10.rst:432 msgid "" "A match statement takes an expression and compares its value to successive " "patterns given as one or more case blocks. Specifically, pattern matching " "operates by:" msgstr "" -#: ../../whatsnew/3.10.rst:438 +#: ../../whatsnew/3.10.rst:436 msgid "using data with type and shape (the ``subject``)" msgstr "" -#: ../../whatsnew/3.10.rst:439 +#: ../../whatsnew/3.10.rst:437 msgid "evaluating the ``subject`` in the ``match`` statement" msgstr "" -#: ../../whatsnew/3.10.rst:440 +#: ../../whatsnew/3.10.rst:438 msgid "" "comparing the subject with each pattern in a ``case`` statement from top to " "bottom until a match is confirmed." msgstr "" -#: ../../whatsnew/3.10.rst:442 +#: ../../whatsnew/3.10.rst:440 msgid "executing the action associated with the pattern of the confirmed match" msgstr "" -#: ../../whatsnew/3.10.rst:444 +#: ../../whatsnew/3.10.rst:442 msgid "" "If an exact match is not confirmed, the last case, a wildcard ``_``, if " "provided, will be used as the matching case. If an exact match is not " @@ -437,11 +421,11 @@ msgid "" "op." msgstr "" -#: ../../whatsnew/3.10.rst:450 +#: ../../whatsnew/3.10.rst:448 msgid "Declarative approach" msgstr "" -#: ../../whatsnew/3.10.rst:452 +#: ../../whatsnew/3.10.rst:450 msgid "" "Readers may be aware of pattern matching through the simple example of " "matching a subject (data object) to a literal (pattern) with the switch " @@ -450,7 +434,7 @@ msgid "" "case statements containing literals." msgstr "" -#: ../../whatsnew/3.10.rst:458 +#: ../../whatsnew/3.10.rst:456 msgid "" "More powerful examples of pattern matching can be found in languages such as " "Scala and Elixir. With structural pattern matching, the approach is " @@ -458,7 +442,7 @@ msgid "" "to match." msgstr "" -#: ../../whatsnew/3.10.rst:462 +#: ../../whatsnew/3.10.rst:460 msgid "" "While an \"imperative\" series of instructions using nested \"if\" " "statements could be used to accomplish something similar to structural " @@ -470,11 +454,11 @@ msgid "" "of the subject's type and shape." msgstr "" -#: ../../whatsnew/3.10.rst:471 +#: ../../whatsnew/3.10.rst:469 msgid "Simple pattern: match to a literal" msgstr "" -#: ../../whatsnew/3.10.rst:473 +#: ../../whatsnew/3.10.rst:471 msgid "" "Let's look at this example as pattern matching in its simplest form: a " "value, the subject, being matched to several literals, the patterns. In the " @@ -483,7 +467,7 @@ msgid "" "status codes. The associated action to the case is executed after a match::" msgstr "" -#: ../../whatsnew/3.10.rst:490 +#: ../../whatsnew/3.10.rst:488 msgid "" "If the above function is passed a ``status`` of 418, \"I'm a teapot\" is " "returned. If the above function is passed a ``status`` of 500, the case " @@ -493,40 +477,40 @@ msgid "" "``_`` is optional." msgstr "" -#: ../../whatsnew/3.10.rst:497 +#: ../../whatsnew/3.10.rst:495 msgid "" "You can combine several literals in a single pattern using ``|`` (\"or\")::" msgstr "" -#: ../../whatsnew/3.10.rst:503 +#: ../../whatsnew/3.10.rst:501 msgid "Behavior without the wildcard" msgstr "" -#: ../../whatsnew/3.10.rst:505 +#: ../../whatsnew/3.10.rst:503 msgid "" "If we modify the above example by removing the last case block, the example " "becomes::" msgstr "" -#: ../../whatsnew/3.10.rst:517 +#: ../../whatsnew/3.10.rst:515 msgid "" "Without the use of ``_`` in a case statement, a match may not exist. If no " "match exists, the behavior is a no-op. For example, if ``status`` of 500 is " "passed, a no-op occurs." msgstr "" -#: ../../whatsnew/3.10.rst:522 +#: ../../whatsnew/3.10.rst:520 msgid "Patterns with a literal and variable" msgstr "" -#: ../../whatsnew/3.10.rst:524 +#: ../../whatsnew/3.10.rst:522 msgid "" "Patterns can look like unpacking assignments, and a pattern may be used to " "bind variables. In this example, a data point can be unpacked to its x-" "coordinate and y-coordinate::" msgstr "" -#: ../../whatsnew/3.10.rst:541 +#: ../../whatsnew/3.10.rst:539 msgid "" "The first pattern has two literals, ``(0, 0)``, and may be thought of as an " "extension of the literal pattern shown above. The next two patterns combine " @@ -535,22 +519,22 @@ msgid "" "conceptually similar to the unpacking assignment ``(x, y) = point``." msgstr "" -#: ../../whatsnew/3.10.rst:548 +#: ../../whatsnew/3.10.rst:546 msgid "Patterns and classes" msgstr "" -#: ../../whatsnew/3.10.rst:550 +#: ../../whatsnew/3.10.rst:548 msgid "" "If you are using classes to structure your data, you can use as a pattern " "the class name followed by an argument list resembling a constructor. This " "pattern has the ability to capture class attributes into variables::" msgstr "" -#: ../../whatsnew/3.10.rst:572 +#: ../../whatsnew/3.10.rst:570 msgid "Patterns with positional parameters" msgstr "" -#: ../../whatsnew/3.10.rst:574 +#: ../../whatsnew/3.10.rst:572 msgid "" "You can use positional parameters with some builtin classes that provide an " "ordering for their attributes (e.g. dataclasses). You can also define a " @@ -560,53 +544,53 @@ msgid "" "attribute to the ``var`` variable)::" msgstr "" -#: ../../whatsnew/3.10.rst:586 +#: ../../whatsnew/3.10.rst:584 msgid "Nested patterns" msgstr "" -#: ../../whatsnew/3.10.rst:588 +#: ../../whatsnew/3.10.rst:586 msgid "" "Patterns can be arbitrarily nested. For example, if our data is a short " "list of points, it could be matched like this::" msgstr "" -#: ../../whatsnew/3.10.rst:604 +#: ../../whatsnew/3.10.rst:602 msgid "Complex patterns and the wildcard" msgstr "" -#: ../../whatsnew/3.10.rst:606 +#: ../../whatsnew/3.10.rst:604 msgid "" "To this point, the examples have used ``_`` alone in the last case " "statement. A wildcard can be used in more complex patterns, such as " "``('error', code, _)``. For example::" msgstr "" -#: ../../whatsnew/3.10.rst:616 +#: ../../whatsnew/3.10.rst:614 msgid "" "In the above case, ``test_variable`` will match for ('error', code, 100) and " "('error', code, 800)." msgstr "" -#: ../../whatsnew/3.10.rst:620 +#: ../../whatsnew/3.10.rst:618 msgid "Guard" msgstr "" -#: ../../whatsnew/3.10.rst:622 +#: ../../whatsnew/3.10.rst:620 msgid "" "We can add an ``if`` clause to a pattern, known as a \"guard\". If the " "guard is false, ``match`` goes on to try the next case block. Note that " "value capture happens before the guard is evaluated::" msgstr "" -#: ../../whatsnew/3.10.rst:633 +#: ../../whatsnew/3.10.rst:631 msgid "Other Key Features" msgstr "" -#: ../../whatsnew/3.10.rst:635 +#: ../../whatsnew/3.10.rst:633 msgid "Several other key features:" msgstr "" -#: ../../whatsnew/3.10.rst:637 +#: ../../whatsnew/3.10.rst:635 msgid "" "Like unpacking assignments, tuple and list patterns have exactly the same " "meaning and actually match arbitrary sequences. Technically, the subject " @@ -615,7 +599,7 @@ msgid "" "match strings." msgstr "" -#: ../../whatsnew/3.10.rst:643 +#: ../../whatsnew/3.10.rst:641 msgid "" "Sequence patterns support wildcards: ``[x, y, *rest]`` and ``(x, y, *rest)`` " "work similar to wildcards in unpacking assignments. The name after ``*`` " @@ -623,7 +607,7 @@ msgid "" "items without binding the remaining items." msgstr "" -#: ../../whatsnew/3.10.rst:648 +#: ../../whatsnew/3.10.rst:646 msgid "" "Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the " "``\"bandwidth\"`` and ``\"latency\"`` values from a dict. Unlike sequence " @@ -631,40 +615,40 @@ msgid "" "(But ``**_`` would be redundant, so is not allowed.)" msgstr "" -#: ../../whatsnew/3.10.rst:653 +#: ../../whatsnew/3.10.rst:651 msgid "Subpatterns may be captured using the ``as`` keyword::" msgstr "" -#: ../../whatsnew/3.10.rst:657 +#: ../../whatsnew/3.10.rst:655 msgid "" "This binds x1, y1, x2, y2 like you would expect without the ``as`` clause, " "and p2 to the entire second item of the subject." msgstr "" -#: ../../whatsnew/3.10.rst:660 +#: ../../whatsnew/3.10.rst:658 msgid "" "Most literals are compared by equality. However, the singletons ``True``, " "``False`` and ``None`` are compared by identity." msgstr "" -#: ../../whatsnew/3.10.rst:663 +#: ../../whatsnew/3.10.rst:661 msgid "" "Named constants may be used in patterns. These named constants must be " "dotted names to prevent the constant from being interpreted as a capture " "variable::" msgstr "" -#: ../../whatsnew/3.10.rst:681 +#: ../../whatsnew/3.10.rst:679 msgid "" "For the full specification see :pep:`634`. Motivation and rationale are in :" "pep:`635`, and a longer tutorial is in :pep:`636`." msgstr "" -#: ../../whatsnew/3.10.rst:688 +#: ../../whatsnew/3.10.rst:686 msgid "Optional ``EncodingWarning`` and ``encoding=\"locale\"`` option" msgstr "" -#: ../../whatsnew/3.10.rst:690 +#: ../../whatsnew/3.10.rst:688 msgid "" "The default encoding of :class:`TextIOWrapper` and :func:`open` is platform " "and locale dependent. Since UTF-8 is used on most Unix platforms, omitting " @@ -672,81 +656,81 @@ msgid "" "Markdown) is a very common bug. For example::" msgstr "" -#: ../../whatsnew/3.10.rst:699 +#: ../../whatsnew/3.10.rst:697 msgid "" "To find this type of bug, an optional ``EncodingWarning`` is added. It is " "emitted when :data:`sys.flags.warn_default_encoding ` is true and " "locale-specific default encoding is used." msgstr "" -#: ../../whatsnew/3.10.rst:703 +#: ../../whatsnew/3.10.rst:701 msgid "" "``-X warn_default_encoding`` option and :envvar:`PYTHONWARNDEFAULTENCODING` " "are added to enable the warning." msgstr "" -#: ../../whatsnew/3.10.rst:706 +#: ../../whatsnew/3.10.rst:704 msgid "See :ref:`io-text-encoding` for more information." msgstr "更多資訊請見 :ref:`io-text-encoding`\\ 。" -#: ../../whatsnew/3.10.rst:711 +#: ../../whatsnew/3.10.rst:709 msgid "New Features Related to Type Hints" msgstr "" -#: ../../whatsnew/3.10.rst:713 +#: ../../whatsnew/3.10.rst:711 msgid "" "This section covers major changes affecting :pep:`484` type hints and the :" "mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:718 +#: ../../whatsnew/3.10.rst:716 msgid "PEP 604: New Type Union Operator" msgstr "" -#: ../../whatsnew/3.10.rst:720 +#: ../../whatsnew/3.10.rst:718 msgid "" "A new type union operator was introduced which enables the syntax ``X | Y``. " "This provides a cleaner way of expressing 'either type X or type Y' instead " "of using :data:`typing.Union`, especially in type hints." msgstr "" -#: ../../whatsnew/3.10.rst:724 +#: ../../whatsnew/3.10.rst:722 msgid "" "In previous versions of Python, to apply a type hint for functions accepting " "arguments of multiple types, :data:`typing.Union` was used::" msgstr "" -#: ../../whatsnew/3.10.rst:731 +#: ../../whatsnew/3.10.rst:729 msgid "Type hints can now be written in a more succinct manner::" msgstr "" -#: ../../whatsnew/3.10.rst:737 +#: ../../whatsnew/3.10.rst:735 msgid "" "This new syntax is also accepted as the second argument to :func:" "`isinstance` and :func:`issubclass`::" msgstr "" -#: ../../whatsnew/3.10.rst:743 +#: ../../whatsnew/3.10.rst:741 msgid "See :ref:`types-union` and :pep:`604` for more details." msgstr "更多資訊請見 :ref:`types-union` 與 :pep:`604`\\ 。" -#: ../../whatsnew/3.10.rst:745 +#: ../../whatsnew/3.10.rst:743 msgid "" "(Contributed by Maggie Moss and Philippe Prados in :issue:`41428`, with " "additions by Yurii Karabas and Serhiy Storchaka in :issue:`44490`.)" msgstr "" -#: ../../whatsnew/3.10.rst:750 +#: ../../whatsnew/3.10.rst:748 msgid "PEP 612: Parameter Specification Variables" msgstr "" -#: ../../whatsnew/3.10.rst:752 +#: ../../whatsnew/3.10.rst:750 msgid "" "Two new options to improve the information provided to static type checkers " "for :pep:`484`\\ 's ``Callable`` have been added to the :mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:755 +#: ../../whatsnew/3.10.rst:753 msgid "" "The first is the parameter specification variable. They are used to forward " "the parameter types of one callable to another callable -- a pattern " @@ -755,7 +739,7 @@ msgid "" "to type annotate dependency of parameter types in such a precise manner." msgstr "" -#: ../../whatsnew/3.10.rst:761 +#: ../../whatsnew/3.10.rst:759 msgid "" "The second option is the new ``Concatenate`` operator. It's used in " "conjunction with parameter specification variables to type annotate a higher " @@ -763,24 +747,24 @@ msgid "" "Examples of usage can be found in :class:`typing.Concatenate`." msgstr "" -#: ../../whatsnew/3.10.rst:766 +#: ../../whatsnew/3.10.rst:764 msgid "" "See :class:`typing.Callable`, :class:`typing.ParamSpec`, :class:`typing." "Concatenate`, :class:`typing.ParamSpecArgs`, :class:`typing." "ParamSpecKwargs`, and :pep:`612` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:770 +#: ../../whatsnew/3.10.rst:768 msgid "" "(Contributed by Ken Jin in :issue:`41559`, with minor enhancements by Jelle " "Zijlstra in :issue:`43783`. PEP written by Mark Mendoza.)" msgstr "" -#: ../../whatsnew/3.10.rst:775 +#: ../../whatsnew/3.10.rst:773 msgid "PEP 613: TypeAlias" msgstr "" -#: ../../whatsnew/3.10.rst:777 +#: ../../whatsnew/3.10.rst:775 msgid "" ":pep:`484` introduced the concept of type aliases, only requiring them to be " "top-level unannotated assignments. This simplicity sometimes made it " @@ -789,25 +773,25 @@ msgid "" "involved. Compare::" msgstr "" -#: ../../whatsnew/3.10.rst:785 +#: ../../whatsnew/3.10.rst:783 msgid "" "Now the :mod:`typing` module has a special value :data:`TypeAlias` which " "lets you declare type aliases more explicitly::" msgstr "" -#: ../../whatsnew/3.10.rst:791 +#: ../../whatsnew/3.10.rst:789 msgid "See :pep:`613` for more details." msgstr "更多資訊請見 :pep:`613`\\ 。" -#: ../../whatsnew/3.10.rst:793 +#: ../../whatsnew/3.10.rst:791 msgid "(Contributed by Mikhail Golubev in :issue:`41923`.)" msgstr "" -#: ../../whatsnew/3.10.rst:796 +#: ../../whatsnew/3.10.rst:794 msgid "PEP 647: User-Defined Type Guards" msgstr "" -#: ../../whatsnew/3.10.rst:798 +#: ../../whatsnew/3.10.rst:796 msgid "" ":data:`TypeGuard` has been added to the :mod:`typing` module to annotate " "type guard functions and improve information provided to static type " @@ -815,24 +799,24 @@ msgid "" "`TypeGuard`\\ 's documentation, and :pep:`647`." msgstr "" -#: ../../whatsnew/3.10.rst:803 +#: ../../whatsnew/3.10.rst:801 msgid "" "(Contributed by Ken Jin and Guido van Rossum in :issue:`43766`. PEP written " "by Eric Traut.)" msgstr "" -#: ../../whatsnew/3.10.rst:807 +#: ../../whatsnew/3.10.rst:805 msgid "Other Language Changes" msgstr "" -#: ../../whatsnew/3.10.rst:809 +#: ../../whatsnew/3.10.rst:807 msgid "" "The :class:`int` type has a new method :meth:`int.bit_count`, returning the " "number of ones in the binary expansion of a given integer, also known as the " "population count. (Contributed by Niklas Fiekas in :issue:`29882`.)" msgstr "" -#: ../../whatsnew/3.10.rst:813 +#: ../../whatsnew/3.10.rst:811 msgid "" "The views returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:`dict." "items` now all have a ``mapping`` attribute that gives a :class:`types." @@ -840,13 +824,13 @@ msgid "" "Dennis Sweeney in :issue:`40890`.)" msgstr "" -#: ../../whatsnew/3.10.rst:818 +#: ../../whatsnew/3.10.rst:816 msgid "" ":pep:`618`: The :func:`zip` function now has an optional ``strict`` flag, " "used to require that all the iterables have an equal length." msgstr "" -#: ../../whatsnew/3.10.rst:821 +#: ../../whatsnew/3.10.rst:819 msgid "" "Builtin and extension functions that take integer arguments no longer " "accept :class:`~decimal.Decimal`\\ s, :class:`~fractions.Fraction`\\ s and " @@ -855,20 +839,20 @@ msgid "" "__index__` method). (Contributed by Serhiy Storchaka in :issue:`37999`.)" msgstr "" -#: ../../whatsnew/3.10.rst:828 +#: ../../whatsnew/3.10.rst:826 msgid "" "If :func:`object.__ipow__` returns :const:`NotImplemented`, the operator " "will correctly fall back to :func:`object.__pow__` and :func:`object." "__rpow__` as expected. (Contributed by Alex Shkop in :issue:`38302`.)" msgstr "" -#: ../../whatsnew/3.10.rst:832 +#: ../../whatsnew/3.10.rst:830 msgid "" "Assignment expressions can now be used unparenthesized within set literals " "and set comprehensions, as well as in sequence indexes (but not slices)." msgstr "" -#: ../../whatsnew/3.10.rst:835 +#: ../../whatsnew/3.10.rst:833 msgid "" "Functions have a new ``__builtins__`` attribute which is used to look for " "builtin symbols when a function is executed, instead of looking into " @@ -877,7 +861,7 @@ msgid "" "builtins. (Contributed by Mark Shannon in :issue:`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:841 +#: ../../whatsnew/3.10.rst:839 msgid "" "Two new builtin functions -- :func:`aiter` and :func:`anext` have been added " "to provide asynchronous counterparts to :func:`iter` and :func:`next`, " @@ -885,7 +869,7 @@ msgid "" "in :issue:`31861`.)" msgstr "" -#: ../../whatsnew/3.10.rst:846 +#: ../../whatsnew/3.10.rst:844 msgid "" "Static methods (:func:`@staticmethod `) and class methods (:" "func:`@classmethod `) now inherit the method attributes " @@ -895,7 +879,7 @@ msgid "" "Stinner in :issue:`43682`.)" msgstr "" -#: ../../whatsnew/3.10.rst:853 +#: ../../whatsnew/3.10.rst:851 msgid "" "Annotations for complex targets (everything beside ``simple name`` targets " "defined by :pep:`526`) no longer cause any runtime effects with ``from " @@ -903,7 +887,7 @@ msgid "" "`42737`.)" msgstr "" -#: ../../whatsnew/3.10.rst:857 +#: ../../whatsnew/3.10.rst:855 msgid "" "Class and module objects now lazy-create empty annotations dicts on demand. " "The annotations dicts are stored in the object’s ``__dict__`` for backwards " @@ -912,7 +896,7 @@ msgid "" "howto`. (Contributed by Larry Hastings in :issue:`43901`.)" msgstr "" -#: ../../whatsnew/3.10.rst:864 +#: ../../whatsnew/3.10.rst:862 msgid "" "Annotations consist of ``yield``, ``yield from``, ``await`` or named " "expressions are now forbidden under ``from __future__ import annotations`` " @@ -920,7 +904,7 @@ msgid "" "`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:869 +#: ../../whatsnew/3.10.rst:867 msgid "" "Usage of unbound variables, ``super()`` and other expressions that might " "alter the processing of symbol table as annotations are now rendered " @@ -928,7 +912,7 @@ msgid "" "Batuhan Taskaya in :issue:`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:874 +#: ../../whatsnew/3.10.rst:872 msgid "" "Hashes of NaN values of both :class:`float` type and :class:`decimal." "Decimal` type now depend on object identity. Formerly, they always hashed to " @@ -938,121 +922,121 @@ msgid "" "Raymond Hettinger in :issue:`43475`.)" msgstr "" -#: ../../whatsnew/3.10.rst:881 +#: ../../whatsnew/3.10.rst:879 msgid "" "A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when " "deleting the :const:`__debug__` constant. (Contributed by Dong-hee Na in :" "issue:`45000`.)" msgstr "" -#: ../../whatsnew/3.10.rst:884 +#: ../../whatsnew/3.10.rst:882 msgid "" ":exc:`SyntaxError` exceptions now have ``end_lineno`` and ``end_offset`` " "attributes. They will be ``None`` if not determined. (Contributed by Pablo " "Galindo in :issue:`43914`.)" msgstr "" -#: ../../whatsnew/3.10.rst:889 +#: ../../whatsnew/3.10.rst:887 msgid "New Modules" msgstr "" -#: ../../whatsnew/3.10.rst:891 +#: ../../whatsnew/3.10.rst:889 msgid "None yet." msgstr "" -#: ../../whatsnew/3.10.rst:895 +#: ../../whatsnew/3.10.rst:893 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.10.rst:898 +#: ../../whatsnew/3.10.rst:896 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.10.rst:900 +#: ../../whatsnew/3.10.rst:898 msgid "" "Add missing :meth:`~asyncio.events.AbstractEventLoop." "connect_accepted_socket` method. (Contributed by Alex Grönholm in :issue:" "`41332`.)" msgstr "" -#: ../../whatsnew/3.10.rst:905 +#: ../../whatsnew/3.10.rst:903 msgid "argparse" msgstr "argparse" -#: ../../whatsnew/3.10.rst:907 +#: ../../whatsnew/3.10.rst:905 msgid "" "Misleading phrase \"optional arguments\" was replaced with \"options\" in " "argparse help. Some tests might require adaptation if they rely on exact " "output match. (Contributed by Raymond Hettinger in :issue:`9694`.)" msgstr "" -#: ../../whatsnew/3.10.rst:911 +#: ../../whatsnew/3.10.rst:909 msgid "array" msgstr "array" -#: ../../whatsnew/3.10.rst:913 +#: ../../whatsnew/3.10.rst:911 msgid "" "The :meth:`~array.array.index` method of :class:`array.array` now has " "optional *start* and *stop* parameters. (Contributed by Anders Lorentsen and " "Zackery Spytz in :issue:`31956`.)" msgstr "" -#: ../../whatsnew/3.10.rst:918 +#: ../../whatsnew/3.10.rst:916 msgid "asynchat, asyncore, smtpd" msgstr "asynchat, asyncore, smtpd" -#: ../../whatsnew/3.10.rst:919 +#: ../../whatsnew/3.10.rst:917 msgid "" "These modules have been marked as deprecated in their module documentation " "since Python 3.6. An import-time :class:`DeprecationWarning` has now been " "added to all three of these modules." msgstr "" -#: ../../whatsnew/3.10.rst:924 +#: ../../whatsnew/3.10.rst:922 msgid "base64" msgstr "base64" -#: ../../whatsnew/3.10.rst:926 +#: ../../whatsnew/3.10.rst:924 msgid "" "Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support " "the Base32 Encoding with Extended Hex Alphabet." msgstr "" -#: ../../whatsnew/3.10.rst:930 +#: ../../whatsnew/3.10.rst:928 msgid "bdb" msgstr "bdb" -#: ../../whatsnew/3.10.rst:932 +#: ../../whatsnew/3.10.rst:930 msgid "" "Add :meth:`~bdb.Breakpoint.clearBreakpoints` to reset all set breakpoints. " "(Contributed by Irit Katriel in :issue:`24160`.)" msgstr "" -#: ../../whatsnew/3.10.rst:936 +#: ../../whatsnew/3.10.rst:934 msgid "bisect" msgstr "bisect" -#: ../../whatsnew/3.10.rst:938 +#: ../../whatsnew/3.10.rst:936 msgid "" "Added the possibility of providing a *key* function to the APIs in the :mod:" "`bisect` module. (Contributed by Raymond Hettinger in :issue:`4356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:942 +#: ../../whatsnew/3.10.rst:940 msgid "codecs" msgstr "codecs" -#: ../../whatsnew/3.10.rst:944 +#: ../../whatsnew/3.10.rst:942 msgid "" "Add a :func:`codecs.unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:948 +#: ../../whatsnew/3.10.rst:946 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.10.rst:950 +#: ../../whatsnew/3.10.rst:948 msgid "" "The ``__args__`` of the :ref:`parameterized generic ` " "for :class:`collections.abc.Callable` are now consistent with :data:`typing." @@ -1068,34 +1052,34 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:963 +#: ../../whatsnew/3.10.rst:961 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.10.rst:965 +#: ../../whatsnew/3.10.rst:963 msgid "" "Add a :func:`contextlib.aclosing` context manager to safely close async " "generators and objects representing asynchronously released resources. " "(Contributed by Joongi Kim and John Belmonte in :issue:`41229`.)" msgstr "" -#: ../../whatsnew/3.10.rst:969 +#: ../../whatsnew/3.10.rst:967 msgid "" "Add asynchronous context manager support to :func:`contextlib.nullcontext`. " "(Contributed by Tom Gringauz in :issue:`41543`.)" msgstr "" -#: ../../whatsnew/3.10.rst:972 +#: ../../whatsnew/3.10.rst:970 msgid "" "Add :class:`AsyncContextDecorator`, for supporting usage of async context " "managers as decorators." msgstr "" -#: ../../whatsnew/3.10.rst:976 +#: ../../whatsnew/3.10.rst:974 msgid "curses" msgstr "curses" -#: ../../whatsnew/3.10.rst:978 +#: ../../whatsnew/3.10.rst:976 msgid "" "The extended color functions added in ncurses 6.1 will be used transparently " "by :func:`curses.color_content`, :func:`curses.init_color`, :func:`curses." @@ -1105,53 +1089,53 @@ msgid "" "Kintscher and Hans Petter Jansson in :issue:`36982`.)" msgstr "" -#: ../../whatsnew/3.10.rst:985 +#: ../../whatsnew/3.10.rst:983 msgid "" "The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if " "they are provided by the underlying curses library. (Contributed by Zackery " "Spytz in :issue:`39273`.)" msgstr "" -#: ../../whatsnew/3.10.rst:990 +#: ../../whatsnew/3.10.rst:988 msgid "dataclasses" msgstr "dataclasses" -#: ../../whatsnew/3.10.rst:993 +#: ../../whatsnew/3.10.rst:991 msgid "__slots__" msgstr "__slots__" -#: ../../whatsnew/3.10.rst:995 +#: ../../whatsnew/3.10.rst:993 msgid "" "Added ``slots`` parameter in :func:`dataclasses.dataclass` decorator. " "(Contributed by Yurii Karabas in :issue:`42269`)" msgstr "" -#: ../../whatsnew/3.10.rst:999 +#: ../../whatsnew/3.10.rst:997 msgid "Keyword-only fields" msgstr "" -#: ../../whatsnew/3.10.rst:1001 +#: ../../whatsnew/3.10.rst:999 msgid "" "dataclasses now supports fields that are keyword-only in the generated " "__init__ method. There are a number of ways of specifying keyword-only " "fields." msgstr "" -#: ../../whatsnew/3.10.rst:1005 +#: ../../whatsnew/3.10.rst:1003 msgid "You can say that every field is keyword-only:" msgstr "" -#: ../../whatsnew/3.10.rst:1016 +#: ../../whatsnew/3.10.rst:1014 msgid "" "Both ``name`` and ``birthday`` are keyword-only parameters to the generated " "__init__ method." msgstr "" -#: ../../whatsnew/3.10.rst:1019 +#: ../../whatsnew/3.10.rst:1017 msgid "You can specify keyword-only on a per-field basis:" msgstr "" -#: ../../whatsnew/3.10.rst:1030 +#: ../../whatsnew/3.10.rst:1028 msgid "" "Here only ``birthday`` is keyword-only. If you set ``kw_only`` on " "individual fields, be aware that there are rules about re-ordering fields " @@ -1159,23 +1143,23 @@ msgid "" "the full dataclasses documentation for details." msgstr "" -#: ../../whatsnew/3.10.rst:1035 +#: ../../whatsnew/3.10.rst:1033 msgid "" "You can also specify that all fields following a KW_ONLY marker are keyword-" "only. This will probably be the most common usage:" msgstr "" -#: ../../whatsnew/3.10.rst:1050 +#: ../../whatsnew/3.10.rst:1048 msgid "" "Here, ``z`` and ``t`` are keyword-only parameters, while ``x`` and ``y`` are " "not. (Contributed by Eric V. Smith in :issue:`43532`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1057 +#: ../../whatsnew/3.10.rst:1055 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.10.rst:1059 +#: ../../whatsnew/3.10.rst:1057 msgid "" "The entire ``distutils`` package is deprecated, to be removed in Python " "3.12. Its functionality for specifying package builds has already been " @@ -1188,39 +1172,39 @@ msgid "" "`632` for discussion." msgstr "" -#: ../../whatsnew/3.10.rst:1069 +#: ../../whatsnew/3.10.rst:1067 msgid "" "The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. The " "``bdist_wheel`` command is now recommended to distribute binary packages on " "Windows. (Contributed by Victor Stinner in :issue:`42802`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1075 +#: ../../whatsnew/3.10.rst:1073 msgid "doctest" msgstr "doctest" -#: ../../whatsnew/3.10.rst:1077 ../../whatsnew/3.10.rst:1212 -#: ../../whatsnew/3.10.rst:1239 ../../whatsnew/3.10.rst:1338 +#: ../../whatsnew/3.10.rst:1075 ../../whatsnew/3.10.rst:1210 +#: ../../whatsnew/3.10.rst:1237 ../../whatsnew/3.10.rst:1336 msgid "" "When a module does not define ``__loader__``, fall back to ``__spec__." "loader``. (Contributed by Brett Cannon in :issue:`42133`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1081 +#: ../../whatsnew/3.10.rst:1079 msgid "encodings" msgstr "encodings" -#: ../../whatsnew/3.10.rst:1083 +#: ../../whatsnew/3.10.rst:1081 msgid "" ":func:`encodings.normalize_encoding` now ignores non-ASCII characters. " "(Contributed by Hai Shi in :issue:`39337`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1087 +#: ../../whatsnew/3.10.rst:1085 msgid "enum" msgstr "" -#: ../../whatsnew/3.10.rst:1089 +#: ../../whatsnew/3.10.rst:1087 msgid "" ":class:`Enum` :func:`__repr__` now returns ``enum_name.member_name`` and :" "func:`__str__` now returns ``member_name``. Stdlib enums available as " @@ -1228,106 +1212,106 @@ msgid "" "(Contributed by Ethan Furman in :issue:`40066`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1094 +#: ../../whatsnew/3.10.rst:1092 msgid "" "Add :class:`enum.StrEnum` for enums where all members are strings. " "(Contributed by Ethan Furman in :issue:`41816`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1098 +#: ../../whatsnew/3.10.rst:1096 msgid "fileinput" msgstr "fileinput" -#: ../../whatsnew/3.10.rst:1100 +#: ../../whatsnew/3.10.rst:1098 msgid "" "Add *encoding* and *errors* parameters in :func:`fileinput.input` and :class:" "`fileinput.FileInput`. (Contributed by Inada Naoki in :issue:`43712`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1104 +#: ../../whatsnew/3.10.rst:1102 msgid "" ":func:`fileinput.hook_compressed` now returns :class:`TextIOWrapper` object " "when *mode* is \"r\" and file is compressed, like uncompressed files. " "(Contributed by Inada Naoki in :issue:`5758`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1109 +#: ../../whatsnew/3.10.rst:1107 msgid "faulthandler" msgstr "faulthandler" -#: ../../whatsnew/3.10.rst:1111 +#: ../../whatsnew/3.10.rst:1109 msgid "" "The :mod:`faulthandler` module now detects if a fatal error occurs during a " "garbage collector collection. (Contributed by Victor Stinner in :issue:" "`44466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1116 +#: ../../whatsnew/3.10.rst:1114 msgid "gc" msgstr "gc" -#: ../../whatsnew/3.10.rst:1118 +#: ../../whatsnew/3.10.rst:1116 msgid "" "Add audit hooks for :func:`gc.get_objects`, :func:`gc.get_referrers` and :" "func:`gc.get_referents`. (Contributed by Pablo Galindo in :issue:`43439`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1122 +#: ../../whatsnew/3.10.rst:1120 msgid "glob" msgstr "glob" -#: ../../whatsnew/3.10.rst:1124 +#: ../../whatsnew/3.10.rst:1122 msgid "" "Add the *root_dir* and *dir_fd* parameters in :func:`~glob.glob` and :func:" "`~glob.iglob` which allow to specify the root directory for searching. " "(Contributed by Serhiy Storchaka in :issue:`38144`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1129 +#: ../../whatsnew/3.10.rst:1127 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.10.rst:1131 +#: ../../whatsnew/3.10.rst:1129 msgid "" "The hashlib module requires OpenSSL 1.1.1 or newer. (Contributed by " "Christian Heimes in :pep:`644` and :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1134 +#: ../../whatsnew/3.10.rst:1132 msgid "" "The hashlib module has preliminary support for OpenSSL 3.0.0. (Contributed " "by Christian Heimes in :issue:`38820` and other issues.)" msgstr "" -#: ../../whatsnew/3.10.rst:1137 +#: ../../whatsnew/3.10.rst:1135 msgid "" "The pure-Python fallback of :func:`~hashlib.pbkdf2_hmac` is deprecated. In " "the future PBKDF2-HMAC will only be available when Python has been built " "with OpenSSL support. (Contributed by Christian Heimes in :issue:`43880`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1143 +#: ../../whatsnew/3.10.rst:1141 msgid "hmac" msgstr "hmac" -#: ../../whatsnew/3.10.rst:1145 +#: ../../whatsnew/3.10.rst:1143 msgid "" "The hmac module now uses OpenSSL's HMAC implementation internally. " "(Contributed by Christian Heimes in :issue:`40645`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1149 +#: ../../whatsnew/3.10.rst:1147 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.10.rst:1151 +#: ../../whatsnew/3.10.rst:1149 msgid "" "Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User " "hooks were previously ignored. (Contributed by Ken Hilton in :issue:" "`43008`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1155 +#: ../../whatsnew/3.10.rst:1153 msgid "" "Rearrange the settings dialog. Split the General tab into Windows and Shell/" "Ed tabs. Move help sources, which extend the Help menu, to the Extensions " @@ -1338,11 +1322,11 @@ msgid "" "`33962`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1163 +#: ../../whatsnew/3.10.rst:1161 msgid "The changes above were backported to a 3.9 maintenance release." msgstr "" -#: ../../whatsnew/3.10.rst:1165 +#: ../../whatsnew/3.10.rst:1163 msgid "" "Add a Shell sidebar. Move the primary prompt ('>>>') to the sidebar. Add " "secondary prompts ('...') to the sidebar. Left click and optional drag " @@ -1353,7 +1337,7 @@ msgid "" "text. (Contributed by Tal Einat in :issue:`37903`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1174 +#: ../../whatsnew/3.10.rst:1172 msgid "" "Use spaces instead of tabs to indent interactive code. This makes " "interactive code entries 'look right'. Making this feasible was a major " @@ -1361,7 +1345,7 @@ msgid "" "in :issue:`37892`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1179 +#: ../../whatsnew/3.10.rst:1177 msgid "" "Highlight the new :ref:`soft keywords ` :keyword:`match`, :" "keyword:`case `, and :keyword:`_ ` in pattern-" @@ -1370,33 +1354,33 @@ msgid "" "(Contributed by Tal Einat in :issue:`44010`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1185 +#: ../../whatsnew/3.10.rst:1183 msgid "New in 3.10 maintenance releases." msgstr "" -#: ../../whatsnew/3.10.rst:1187 +#: ../../whatsnew/3.10.rst:1185 msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1190 +#: ../../whatsnew/3.10.rst:1188 msgid "" "Include prompts when saving Shell with inputs and outputs. (Contributed by " "Terry Jan Reedy in :gh:`95191`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1194 +#: ../../whatsnew/3.10.rst:1192 msgid "importlib.metadata" msgstr "importlib.metadata" -#: ../../whatsnew/3.10.rst:1196 +#: ../../whatsnew/3.10.rst:1194 msgid "" "Feature parity with ``importlib_metadata`` 4.6 (`history `_)." msgstr "" -#: ../../whatsnew/3.10.rst:1199 +#: ../../whatsnew/3.10.rst:1197 msgid "" ":ref:`importlib.metadata entry points ` now provide a nicer " "experience for selecting entry points by group and name through a new :class:" @@ -1404,18 +1388,18 @@ msgid "" "docs for more info on the deprecation and usage." msgstr "" -#: ../../whatsnew/3.10.rst:1205 +#: ../../whatsnew/3.10.rst:1203 msgid "" "Added :func:`importlib.metadata.packages_distributions` for resolving top-" "level Python modules and packages to their :class:`importlib.metadata." "Distribution`." msgstr "" -#: ../../whatsnew/3.10.rst:1210 +#: ../../whatsnew/3.10.rst:1208 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.10.rst:1215 +#: ../../whatsnew/3.10.rst:1213 msgid "" "Add :func:`inspect.get_annotations`, which safely computes the annotations " "defined on an object. It works around the quirks of accessing the " @@ -1433,38 +1417,38 @@ msgid "" "`43817`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1231 +#: ../../whatsnew/3.10.rst:1229 msgid "itertools" msgstr "" -#: ../../whatsnew/3.10.rst:1233 +#: ../../whatsnew/3.10.rst:1231 msgid "" "Add :func:`itertools.pairwise()`. (Contributed by Raymond Hettinger in :" "issue:`38200`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1237 +#: ../../whatsnew/3.10.rst:1235 msgid "linecache" msgstr "linecache" -#: ../../whatsnew/3.10.rst:1243 +#: ../../whatsnew/3.10.rst:1241 msgid "os" msgstr "os" -#: ../../whatsnew/3.10.rst:1245 +#: ../../whatsnew/3.10.rst:1243 msgid "" "Add :func:`os.cpu_count()` support for VxWorks RTOS. (Contributed by Peixing " "Xin in :issue:`41440`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1248 +#: ../../whatsnew/3.10.rst:1246 msgid "" "Add a new function :func:`os.eventfd` and related helpers to wrap the " "``eventfd2`` syscall on Linux. (Contributed by Christian Heimes in :issue:" "`41001`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1252 +#: ../../whatsnew/3.10.rst:1250 msgid "" "Add :func:`os.splice()` that allows to move data between two file " "descriptors without copying between kernel address space and user address " @@ -1472,41 +1456,41 @@ msgid "" "by Pablo Galindo in :issue:`41625`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1257 +#: ../../whatsnew/3.10.rst:1255 msgid "" "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and :" "data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :issue:" "`43106`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1262 +#: ../../whatsnew/3.10.rst:1260 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.10.rst:1264 +#: ../../whatsnew/3.10.rst:1262 msgid "" ":func:`os.path.realpath` now accepts a *strict* keyword-only argument. When " "set to ``True``, :exc:`OSError` is raised if a path doesn't exist or a " "symlink loop is encountered. (Contributed by Barney Gale in :issue:`43757`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1270 +#: ../../whatsnew/3.10.rst:1268 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.10.rst:1272 +#: ../../whatsnew/3.10.rst:1270 msgid "" "Add slice support to :attr:`PurePath.parents `. " "(Contributed by Joshua Cannon in :issue:`35498`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1275 +#: ../../whatsnew/3.10.rst:1273 msgid "" "Add negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1279 +#: ../../whatsnew/3.10.rst:1277 msgid "" "Add :meth:`Path.hardlink_to ` method that " "supersedes :meth:`~pathlib.Path.link_to`. The new method has the same " @@ -1514,7 +1498,7 @@ msgid "" "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1284 +#: ../../whatsnew/3.10.rst:1282 msgid "" ":meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now accept a " "*follow_symlinks* keyword-only argument for consistency with corresponding " @@ -1522,11 +1506,11 @@ msgid "" "`39906`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1290 +#: ../../whatsnew/3.10.rst:1288 msgid "platform" msgstr "platform" -#: ../../whatsnew/3.10.rst:1292 +#: ../../whatsnew/3.10.rst:1290 msgid "" "Add :func:`platform.freedesktop_os_release()` to retrieve operation system " "identification from `freedesktop.org os-release ` section for " "more information." msgstr "" -#: ../../whatsnew/3.10.rst:1630 +#: ../../whatsnew/3.10.rst:1628 msgid "" "Non-integer arguments to :func:`random.randrange` are deprecated. The :exc:" "`ValueError` is deprecated in favor of a :exc:`TypeError`. (Contributed by " "Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1634 +#: ../../whatsnew/3.10.rst:1632 msgid "" "The various ``load_module()`` methods of :mod:`importlib` have been " "documented as deprecated since Python 3.6, but will now also trigger a :exc:" @@ -2042,21 +2026,21 @@ msgid "" "(Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1640 +#: ../../whatsnew/3.10.rst:1638 msgid "" ":meth:`zimport.zipimporter.load_module` has been deprecated in preference " "for :meth:`~zipimport.zipimporter.exec_module`. (Contributed by Brett Cannon " "in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1644 +#: ../../whatsnew/3.10.rst:1642 msgid "" "The use of :meth:`~importlib.abc.Loader.load_module` by the import system " "now triggers an :exc:`ImportWarning` as :meth:`~importlib.abc.Loader." "exec_module` is preferred. (Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1649 +#: ../../whatsnew/3.10.rst:1647 msgid "" "The use of :meth:`importlib.abc.MetaPathFinder.find_module` and :meth:" "`importlib.abc.PathEntryFinder.find_module` by the import system now trigger " @@ -2066,7 +2050,7 @@ msgid "" "porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1658 +#: ../../whatsnew/3.10.rst:1656 msgid "" "The use of :meth:`importlib.abc.PathEntryFinder.find_loader` by the import " "system now triggers an :exc:`ImportWarning` as :meth:`importlib.abc." @@ -2075,7 +2059,7 @@ msgid "" "`43672`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1664 +#: ../../whatsnew/3.10.rst:1662 msgid "" "The various implementations of :meth:`importlib.abc.MetaPathFinder." "find_module` ( :meth:`importlib.machinery.BuiltinImporter.find_module`, :" @@ -2090,7 +2074,7 @@ msgid "" "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1679 +#: ../../whatsnew/3.10.rst:1677 msgid "" ":class:`importlib.abc.Finder` is deprecated (including its sole method, :" "meth:`~importlib.abc.Finder.find_module`). Both :class:`importlib.abc." @@ -2099,7 +2083,7 @@ msgid "" "appropriate instead. (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1686 +#: ../../whatsnew/3.10.rst:1684 msgid "" "The deprecations of :mod:`imp`, :func:`importlib.find_loader`, :func:" "`importlib.util.set_package_wrapper`, :func:`importlib.util." @@ -2110,7 +2094,7 @@ msgid "" "Brett Cannon in :issue:`43720`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1696 +#: ../../whatsnew/3.10.rst:1694 msgid "" "The import system now uses the ``__spec__`` attribute on modules before " "falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's " @@ -2118,7 +2102,7 @@ msgid "" "for Python 3.12. (Contributed by Brett Cannon in :issue:`42137`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1702 +#: ../../whatsnew/3.10.rst:1700 msgid "" ":meth:`importlib.abc.Loader.module_repr`, :meth:`importlib.machinery." "FrozenLoader.module_repr`, and :meth:`importlib.machinery.BuiltinLoader." @@ -2126,7 +2110,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42136`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1708 +#: ../../whatsnew/3.10.rst:1706 msgid "" "``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python " "3.3, when it was made an alias to :class:`str`. It is now deprecated, " @@ -2134,7 +2118,7 @@ msgid "" "issue:`42264`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1713 +#: ../../whatsnew/3.10.rst:1711 msgid "" ":func:`asyncio.get_event_loop` now emits a deprecation warning if there is " "no running event loop. In the future it will be an alias of :func:`~asyncio." @@ -2148,7 +2132,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`39529`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1726 +#: ../../whatsnew/3.10.rst:1724 msgid "" "The undocumented built-in function ``sqlite3.enable_shared_cache`` is now " "deprecated, scheduled for removal in Python 3.12. Its use is strongly " @@ -2158,68 +2142,68 @@ msgid "" "query parameter. (Contributed by Erlend E. Aasland in :issue:`24464`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1734 +#: ../../whatsnew/3.10.rst:1732 msgid "The following ``threading`` methods are now deprecated:" msgstr "" -#: ../../whatsnew/3.10.rst:1736 +#: ../../whatsnew/3.10.rst:1734 msgid "``threading.currentThread`` => :func:`threading.current_thread`" msgstr "``threading.currentThread`` => :func:`threading.current_thread`" -#: ../../whatsnew/3.10.rst:1738 +#: ../../whatsnew/3.10.rst:1736 msgid "``threading.activeCount`` => :func:`threading.active_count`" msgstr "``threading.activeCount`` => :func:`threading.active_count`" -#: ../../whatsnew/3.10.rst:1740 +#: ../../whatsnew/3.10.rst:1738 msgid "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" msgstr "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" -#: ../../whatsnew/3.10.rst:1743 +#: ../../whatsnew/3.10.rst:1741 msgid "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" msgstr "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" -#: ../../whatsnew/3.10.rst:1745 +#: ../../whatsnew/3.10.rst:1743 msgid "``threading.Thread.setName`` => :attr:`threading.Thread.name`" msgstr "``threading.Thread.setName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1747 +#: ../../whatsnew/3.10.rst:1745 msgid "``threading.thread.getName`` => :attr:`threading.Thread.name`" msgstr "``threading.thread.getName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1749 +#: ../../whatsnew/3.10.rst:1747 msgid "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1751 +#: ../../whatsnew/3.10.rst:1749 msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1753 +#: ../../whatsnew/3.10.rst:1751 msgid "(Contributed by Jelle Zijlstra in :gh:`87889`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1755 +#: ../../whatsnew/3.10.rst:1753 msgid "" ":meth:`pathlib.Path.link_to` is deprecated and slated for removal in Python " "3.12. Use :meth:`pathlib.Path.hardlink_to` instead. (Contributed by Barney " "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1759 +#: ../../whatsnew/3.10.rst:1757 msgid "" "``cgi.log()`` is deprecated and slated for removal in Python 3.12. " "(Contributed by Inada Naoki in :issue:`41139`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1762 +#: ../../whatsnew/3.10.rst:1760 msgid "" "The following :mod:`ssl` features have been deprecated since Python 3.6, " "Python 3.7, or OpenSSL 1.1.0 and will be removed in 3.11:" msgstr "" -#: ../../whatsnew/3.10.rst:1765 +#: ../../whatsnew/3.10.rst:1763 msgid "" ":data:`~ssl.OP_NO_SSLv2`, :data:`~ssl.OP_NO_SSLv3`, :data:`~ssl." "OP_NO_TLSv1`, :data:`~ssl.OP_NO_TLSv1_1`, :data:`~ssl.OP_NO_TLSv1_2`, and :" @@ -2227,7 +2211,7 @@ msgid "" "minimum_version` and :attr:`sslSSLContext.maximum_version`." msgstr "" -#: ../../whatsnew/3.10.rst:1771 +#: ../../whatsnew/3.10.rst:1769 msgid "" ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." @@ -2236,26 +2220,26 @@ msgid "" "and :data:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -#: ../../whatsnew/3.10.rst:1777 +#: ../../whatsnew/3.10.rst:1775 msgid "" ":func:`~ssl.wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`" msgstr "" -#: ../../whatsnew/3.10.rst:1779 +#: ../../whatsnew/3.10.rst:1777 msgid ":func:`~ssl.match_hostname`" msgstr ":func:`~ssl.match_hostname`" -#: ../../whatsnew/3.10.rst:1781 +#: ../../whatsnew/3.10.rst:1779 msgid ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" msgstr ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" -#: ../../whatsnew/3.10.rst:1783 +#: ../../whatsnew/3.10.rst:1781 msgid "" "NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and :meth:`ssl." "SSLContext.set_npn_protocols` are replaced by ALPN." msgstr "" -#: ../../whatsnew/3.10.rst:1786 +#: ../../whatsnew/3.10.rst:1784 msgid "" "The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is " "deprecated in Python 3.10 and will be removed in Python 3.12. This feature " @@ -2263,7 +2247,7 @@ msgid "" "Victor Stinner in :issue:`44584`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1791 +#: ../../whatsnew/3.10.rst:1789 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules will be removed in a future " @@ -2272,11 +2256,11 @@ msgid "" "Rittau in :issue:`38291`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1800 ../../whatsnew/3.10.rst:2223 +#: ../../whatsnew/3.10.rst:1798 ../../whatsnew/3.10.rst:2221 msgid "Removed" msgstr "" -#: ../../whatsnew/3.10.rst:1802 +#: ../../whatsnew/3.10.rst:1800 msgid "" "Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, " "``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and " @@ -2284,7 +2268,7 @@ msgid "" "`TypeError`. (Contributed by Serhiy Storchaka in :issue:`41974`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1808 +#: ../../whatsnew/3.10.rst:1806 msgid "" "The ``ParserBase.error()`` method from the private and undocumented " "``_markupbase`` module has been removed. :class:`html.parser.HTMLParser` is " @@ -2293,7 +2277,7 @@ msgid "" "`31844`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1814 +#: ../../whatsnew/3.10.rst:1812 msgid "" "Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal " "PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was " @@ -2301,7 +2285,7 @@ msgid "" "`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1819 +#: ../../whatsnew/3.10.rst:1817 msgid "" "Removed the ``parser`` module, which was deprecated in 3.9 due to the switch " "to the new PEG parser, as well as all the C source and header files that " @@ -2309,7 +2293,7 @@ msgid "" "``graminit.h`` and ``grammar.h``." msgstr "" -#: ../../whatsnew/3.10.rst:1824 +#: ../../whatsnew/3.10.rst:1822 msgid "" "Removed the Public C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2317,7 +2301,7 @@ msgid "" "deprecated in 3.9 due to the switch to the new PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1829 +#: ../../whatsnew/3.10.rst:1827 msgid "" "Removed the ``formatter`` module, which was deprecated in Python 3.4. It is " "somewhat obsolete, little used, and not tested. It was originally scheduled " @@ -2327,71 +2311,71 @@ msgid "" "`42299`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1836 +#: ../../whatsnew/3.10.rst:1834 msgid "" "Removed the :c:func:`PyModule_GetWarningsModule` function that was useless " "now due to the _warnings module was converted to a builtin module in 2.6. " "(Contributed by Hai Shi in :issue:`42599`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1840 +#: ../../whatsnew/3.10.rst:1838 msgid "" "Remove deprecated aliases to :ref:`collections-abstract-base-classes` from " "the :mod:`collections` module. (Contributed by Victor Stinner in :issue:" "`37324`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1844 +#: ../../whatsnew/3.10.rst:1842 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8. The motivation behind this change is multifold:" msgstr "" -#: ../../whatsnew/3.10.rst:1848 +#: ../../whatsnew/3.10.rst:1846 msgid "This simplifies the high-level API." msgstr "" -#: ../../whatsnew/3.10.rst:1849 +#: ../../whatsnew/3.10.rst:1847 msgid "" "The functions in the high-level API have been implicitly getting the current " "thread's running event loop since Python 3.7. There isn't a need to pass " "the event loop to the API in most normal use cases." msgstr "" -#: ../../whatsnew/3.10.rst:1852 +#: ../../whatsnew/3.10.rst:1850 msgid "" "Event loop passing is error-prone especially when dealing with loops running " "in different threads." msgstr "" -#: ../../whatsnew/3.10.rst:1855 +#: ../../whatsnew/3.10.rst:1853 msgid "" "Note that the low-level API will still accept ``loop``. See :ref:`changes-" "python-api` for examples of how to replace existing code." msgstr "" -#: ../../whatsnew/3.10.rst:1858 ../../whatsnew/3.10.rst:1930 +#: ../../whatsnew/3.10.rst:1856 ../../whatsnew/3.10.rst:1928 msgid "" "(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle " "Stanley in :issue:`42392`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1863 ../../whatsnew/3.10.rst:2150 +#: ../../whatsnew/3.10.rst:1861 ../../whatsnew/3.10.rst:2148 msgid "Porting to Python 3.10" msgstr "" -#: ../../whatsnew/3.10.rst:1865 +#: ../../whatsnew/3.10.rst:1863 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.10.rst:1870 +#: ../../whatsnew/3.10.rst:1868 msgid "Changes in the Python syntax" msgstr "" -#: ../../whatsnew/3.10.rst:1872 +#: ../../whatsnew/3.10.rst:1870 msgid "" "Deprecation warning is now emitted when compiling previously valid syntax if " "the numeric literal is immediately followed by a keyword (like in ``0in " @@ -2401,11 +2385,11 @@ msgid "" "following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1883 +#: ../../whatsnew/3.10.rst:1881 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.10.rst:1885 +#: ../../whatsnew/3.10.rst:1883 msgid "" "The *etype* parameters of the :func:`~traceback.format_exception`, :func:" "`~traceback.format_exception_only`, and :func:`~traceback.print_exception` " @@ -2413,7 +2397,7 @@ msgid "" "(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1891 +#: ../../whatsnew/3.10.rst:1889 msgid "" ":mod:`atexit`: At Python exit, if a callback registered with :func:`atexit." "register` fails, its exception is now logged. Previously, only some " @@ -2421,7 +2405,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1897 +#: ../../whatsnew/3.10.rst:1895 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2434,7 +2418,7 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1907 +#: ../../whatsnew/3.10.rst:1905 msgid "" ":meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` " "instead of :exc:`DeprecationWarning` if the given parameter will not fit in " @@ -2442,29 +2426,29 @@ msgid "" "`42393`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1912 +#: ../../whatsnew/3.10.rst:1910 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8." msgstr "" -#: ../../whatsnew/3.10.rst:1916 +#: ../../whatsnew/3.10.rst:1914 msgid "A coroutine that currently looks like this::" msgstr "" -#: ../../whatsnew/3.10.rst:1921 +#: ../../whatsnew/3.10.rst:1919 msgid "Should be replaced with this::" msgstr "" -#: ../../whatsnew/3.10.rst:1926 +#: ../../whatsnew/3.10.rst:1924 msgid "" "If ``foo()`` was specifically designed *not* to run in the current thread's " "running event loop (e.g. running in another thread's event loop), consider " "using :func:`asyncio.run_coroutine_threadsafe` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1933 +#: ../../whatsnew/3.10.rst:1931 msgid "" "The :data:`types.FunctionType` constructor now inherits the current builtins " "if the *globals* dictionary has no ``\"__builtins__\"`` key, rather than " @@ -2475,11 +2459,11 @@ msgid "" "`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1942 +#: ../../whatsnew/3.10.rst:1940 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.10.rst:1944 +#: ../../whatsnew/3.10.rst:1942 msgid "" "The C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2488,31 +2472,31 @@ msgid "" "PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1950 +#: ../../whatsnew/3.10.rst:1948 msgid "" "Source should be now be compiled directly to a code object using, for " "example, :c:func:`Py_CompileString`. The resulting code object can then be " "evaluated using, for example, :c:func:`PyEval_EvalCode`." msgstr "" -#: ../../whatsnew/3.10.rst:1954 +#: ../../whatsnew/3.10.rst:1952 msgid "Specifically:" msgstr "" -#: ../../whatsnew/3.10.rst:1956 +#: ../../whatsnew/3.10.rst:1954 msgid "" "A call to ``PyParser_SimpleParseStringFlags`` followed by ``PyNode_Compile`` " "can be replaced by calling :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1959 +#: ../../whatsnew/3.10.rst:1957 msgid "" "There is no direct replacement for ``PyParser_SimpleParseFileFlags``. To " "compile code from a ``FILE *`` argument, you will need to read the file in C " "and pass the resulting buffer to :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1963 +#: ../../whatsnew/3.10.rst:1961 msgid "" "To compile a file given a ``char *`` filename, explicitly open the file, " "read it and compile the result. One way to do this is using the :py:mod:`io` " @@ -2521,7 +2505,7 @@ msgid "" "(Declarations and error handling are omitted.) ::" msgstr "" -#: ../../whatsnew/3.10.rst:1976 +#: ../../whatsnew/3.10.rst:1974 msgid "" "For ``FrameObject`` objects, the ``f_lasti`` member now represents a " "wordcode offset instead of a simple offset into the bytecode string. This " @@ -2531,53 +2515,53 @@ msgid "" "considered stable: please use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1984 +#: ../../whatsnew/3.10.rst:1982 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.10.rst:1986 +#: ../../whatsnew/3.10.rst:1984 msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " "Inada Naoki in :issue:`42202`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1991 +#: ../../whatsnew/3.10.rst:1989 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.10.rst:1993 +#: ../../whatsnew/3.10.rst:1991 msgid "" ":pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no " "longer supported. (Contributed by Christian Heimes in :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1997 +#: ../../whatsnew/3.10.rst:1995 msgid "" "The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now " "required to build Python. (Contributed by Victor Stinner in :issue:`36020`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2001 +#: ../../whatsnew/3.10.rst:1999 msgid "" ":mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey " "Fedoseev and Erlend E. Aasland in :issue:`40744` and :issue:`40810`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2004 +#: ../../whatsnew/3.10.rst:2002 msgid "" "The :mod:`atexit` module must now always be built as a built-in module. " "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2007 +#: ../../whatsnew/3.10.rst:2005 msgid "" "Add :option:`--disable-test-modules` option to the ``configure`` script: " "don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas " "Petazzoni and Peixing Xin in :issue:`27640`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2011 +#: ../../whatsnew/3.10.rst:2009 msgid "" "Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` to the " "``./configure`` script. If specified, the :mod:`ensurepip` module looks for " @@ -2586,7 +2570,7 @@ msgid "" "packages." msgstr "" -#: ../../whatsnew/3.10.rst:2017 +#: ../../whatsnew/3.10.rst:2015 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -2594,22 +2578,22 @@ msgid "" "_bundled`` package." msgstr "" -#: ../../whatsnew/3.10.rst:2022 +#: ../../whatsnew/3.10.rst:2020 msgid "(Contributed by Victor Stinner in :issue:`42856`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2024 +#: ../../whatsnew/3.10.rst:2022 msgid "" "Add a new :option:`configure --without-static-libpython option <--without-" "static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` static " "library and not install the ``python.o`` object file." msgstr "" -#: ../../whatsnew/3.10.rst:2028 +#: ../../whatsnew/3.10.rst:2026 msgid "(Contributed by Victor Stinner in :issue:`43103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2030 +#: ../../whatsnew/3.10.rst:2028 msgid "" "The ``configure`` script now uses the ``pkg-config`` utility, if available, " "to detect the location of Tcl/Tk headers and libraries. As before, those " @@ -2618,7 +2602,7 @@ msgid "" "Stamatogiannakis in :issue:`42603`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2036 +#: ../../whatsnew/3.10.rst:2034 msgid "" "Add :option:`--with-openssl-rpath` option to ``configure`` script. The " "option simplifies building Python with a custom OpenSSL installation, e.g. " @@ -2626,15 +2610,15 @@ msgid "" "(Contributed by Christian Heimes in :issue:`43466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2043 +#: ../../whatsnew/3.10.rst:2041 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.10.rst:2046 +#: ../../whatsnew/3.10.rst:2044 msgid "PEP 652: Maintaining the Stable ABI" msgstr "" -#: ../../whatsnew/3.10.rst:2048 +#: ../../whatsnew/3.10.rst:2046 msgid "" "The Stable ABI (Application Binary Interface) for extension modules or " "embedding Python is now explicitly defined. :ref:`stable` describes C API " @@ -2642,25 +2626,25 @@ msgid "" "ABI." msgstr "" -#: ../../whatsnew/3.10.rst:2053 +#: ../../whatsnew/3.10.rst:2051 msgid "(Contributed by Petr Viktorin in :pep:`652` and :issue:`43795`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2058 +#: ../../whatsnew/3.10.rst:2056 msgid "" "The result of :c:func:`PyNumber_Index` now always has exact type :class:" "`int`. Previously, the result could have been an instance of a subclass of " "``int``. (Contributed by Serhiy Storchaka in :issue:`40792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2062 +#: ../../whatsnew/3.10.rst:2060 msgid "" "Add a new :c:member:`~PyConfig.orig_argv` member to the :c:type:`PyConfig` " "structure: the list of the original command line arguments passed to the " "Python executable. (Contributed by Victor Stinner in :issue:`23427`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2067 +#: ../../whatsnew/3.10.rst:2065 msgid "" "The :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:" "`PyDateTime_TIME_GET_TZINFO` macros have been added for accessing the " @@ -2668,72 +2652,72 @@ msgid "" "time` objects. (Contributed by Zackery Spytz in :issue:`30155`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2073 +#: ../../whatsnew/3.10.rst:2071 msgid "" "Add a :c:func:`PyCodec_Unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2077 +#: ../../whatsnew/3.10.rst:2075 msgid "" "The :c:func:`PyIter_Send` function was added to allow sending value into " "iterator without raising ``StopIteration`` exception. (Contributed by " "Vladimir Matveev in :issue:`41756`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2081 +#: ../../whatsnew/3.10.rst:2079 msgid "" "Add :c:func:`PyUnicode_AsUTF8AndSize` to the limited C API. (Contributed by " "Alex Gaynor in :issue:`41784`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2084 +#: ../../whatsnew/3.10.rst:2082 msgid "" "Add :c:func:`PyModule_AddObjectRef` function: similar to :c:func:" "`PyModule_AddObject` but don't steal a reference to the value on success. " "(Contributed by Victor Stinner in :issue:`1635741`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2089 +#: ../../whatsnew/3.10.rst:2087 msgid "" "Add :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the " "reference count of an object and return the object. (Contributed by Victor " "Stinner in :issue:`42262`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2093 +#: ../../whatsnew/3.10.rst:2091 msgid "" "The :c:func:`PyType_FromSpecWithBases` and :c:func:" "`PyType_FromModuleAndSpec` functions now accept a single class as the " "*bases* argument. (Contributed by Serhiy Storchaka in :issue:`42423`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2097 +#: ../../whatsnew/3.10.rst:2095 msgid "" "The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` " "slot. (Contributed by Hai Shi in :issue:`41832`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2101 +#: ../../whatsnew/3.10.rst:2099 msgid "" "The :c:func:`PyType_GetSlot` function can accept :ref:`static types `. (Contributed by Hai Shi and Petr Viktorin in :issue:`41073`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2105 +#: ../../whatsnew/3.10.rst:2103 msgid "" "Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an " "object is an instance of :class:`set` but not an instance of a subtype. " "(Contributed by Pablo Galindo in :issue:`43277`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2109 +#: ../../whatsnew/3.10.rst:2107 msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2113 +#: ../../whatsnew/3.10.rst:2111 msgid "" "The limited C API is now supported if :ref:`Python is built in debug mode " "` (if the ``Py_DEBUG`` macro is defined). In the limited C API, " @@ -2746,14 +2730,14 @@ msgid "" "`36465`)." msgstr "" -#: ../../whatsnew/3.10.rst:2123 +#: ../../whatsnew/3.10.rst:2121 msgid "" "The limited C API is still not supported in the :option:`--with-trace-refs` " "special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :" "issue:`43688`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2127 +#: ../../whatsnew/3.10.rst:2125 msgid "" "Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is " "the *y* object, the same as ``x is y`` in Python. Add also the :c:func:" @@ -2763,7 +2747,7 @@ msgid "" "`43753`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2134 +#: ../../whatsnew/3.10.rst:2132 msgid "" "Add new functions to control the garbage collector from C code: :c:func:" "`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`. These " @@ -2771,20 +2755,20 @@ msgid "" "collector from C code without having to import the :mod:`gc` module." msgstr "" -#: ../../whatsnew/3.10.rst:2141 +#: ../../whatsnew/3.10.rst:2139 msgid "" "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2145 +#: ../../whatsnew/3.10.rst:2143 msgid "" "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2152 +#: ../../whatsnew/3.10.rst:2150 msgid "" "The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use :c:func:" "`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use ``#``: " @@ -2793,7 +2777,7 @@ msgid "" "`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2158 +#: ../../whatsnew/3.10.rst:2156 msgid "" "Since :c:func:`Py_REFCNT()` is changed to the inline static function, " "``Py_REFCNT(obj) = new_refcnt`` must be replaced with ``Py_SET_REFCNT(obj, " @@ -2801,18 +2785,18 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2167 +#: ../../whatsnew/3.10.rst:2165 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2169 +#: ../../whatsnew/3.10.rst:2167 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2173 +#: ../../whatsnew/3.10.rst:2171 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -2820,14 +2804,14 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2178 +#: ../../whatsnew/3.10.rst:2176 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2182 +#: ../../whatsnew/3.10.rst:2180 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" @@ -2837,7 +2821,7 @@ msgid "" "Stinner in :issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2189 +#: ../../whatsnew/3.10.rst:2187 msgid "" ":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:" "`PyCell_SET` macros can no longer be used as l-value or r-value. For " @@ -2847,7 +2831,7 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2196 +#: ../../whatsnew/3.10.rst:2194 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." @@ -2858,7 +2842,7 @@ msgid "" "issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2204 +#: ../../whatsnew/3.10.rst:2202 msgid "" "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " @@ -2867,85 +2851,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2210 +#: ../../whatsnew/3.10.rst:2208 msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " "(Contributed by Petr Viktorin in :issue:`26241`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2217 +#: ../../whatsnew/3.10.rst:2215 msgid "" "The ``PyUnicode_InternImmortal()`` function is now deprecated and will be " "removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. " "(Contributed by Victor Stinner in :issue:`41692`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2225 +#: ../../whatsnew/3.10.rst:2223 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2228 +#: ../../whatsnew/3.10.rst:2226 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2230 +#: ../../whatsnew/3.10.rst:2228 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2232 +#: ../../whatsnew/3.10.rst:2230 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2234 +#: ../../whatsnew/3.10.rst:2232 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2235 +#: ../../whatsnew/3.10.rst:2233 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2236 +#: ../../whatsnew/3.10.rst:2234 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2239 +#: ../../whatsnew/3.10.rst:2237 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2242 +#: ../../whatsnew/3.10.rst:2240 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2245 +#: ../../whatsnew/3.10.rst:2243 msgid "" "Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:" "`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` (Contributed " "by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2249 +#: ../../whatsnew/3.10.rst:2247 msgid "" "Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by " "``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. " "(Contributed by Victor Stinner in :issue:`41834`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2253 +#: ../../whatsnew/3.10.rst:2251 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -2953,14 +2937,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2258 +#: ../../whatsnew/3.10.rst:2256 msgid "" "Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing " "Python already implicitly installs signal handlers: see :c:member:`PyConfig." "install_signal_handlers`. (Contributed by Victor Stinner in :issue:`41713`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2263 +#: ../../whatsnew/3.10.rst:2261 msgid "" "Remove the ``PyAST_Validate()`` function. It is no longer possible to build " "a AST object (``mod_ty`` type) with the public C API. The function was " @@ -2968,48 +2952,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2268 +#: ../../whatsnew/3.10.rst:2266 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2270 +#: ../../whatsnew/3.10.rst:2268 msgid "``PyST_GetScope()``" msgstr "``PyST_GetScope()``" -#: ../../whatsnew/3.10.rst:2271 +#: ../../whatsnew/3.10.rst:2269 msgid "``PySymtable_Build()``" msgstr "``PySymtable_Build()``" -#: ../../whatsnew/3.10.rst:2272 +#: ../../whatsnew/3.10.rst:2270 msgid "``PySymtable_BuildObject()``" msgstr "``PySymtable_BuildObject()``" -#: ../../whatsnew/3.10.rst:2273 +#: ../../whatsnew/3.10.rst:2271 msgid "``PySymtable_Free()``" msgstr "``PySymtable_Free()``" -#: ../../whatsnew/3.10.rst:2274 +#: ../../whatsnew/3.10.rst:2272 msgid "``Py_SymtableString()``" msgstr "``Py_SymtableString()``" -#: ../../whatsnew/3.10.rst:2275 +#: ../../whatsnew/3.10.rst:2273 msgid "``Py_SymtableStringObject()``" msgstr "``Py_SymtableStringObject()``" -#: ../../whatsnew/3.10.rst:2277 +#: ../../whatsnew/3.10.rst:2275 msgid "" "The ``Py_SymtableString()`` function was part the stable ABI by mistake but " "it could not be used, because the ``symtable.h`` header file was excluded " "from the limited C API." msgstr "" -#: ../../whatsnew/3.10.rst:2281 +#: ../../whatsnew/3.10.rst:2279 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2284 +#: ../../whatsnew/3.10.rst:2282 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -3017,7 +3001,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2290 +#: ../../whatsnew/3.10.rst:2288 msgid "" "Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These " "functions were undocumented and excluded from the limited C API. Most names " @@ -3028,87 +3012,99 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2298 +#: ../../whatsnew/3.10.rst:2296 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2301 +#: ../../whatsnew/3.10.rst:2299 msgid "``PyAST_Compile()``" msgstr "``PyAST_Compile()``" -#: ../../whatsnew/3.10.rst:2302 +#: ../../whatsnew/3.10.rst:2300 msgid "``PyAST_CompileEx()``" msgstr "``PyAST_CompileEx()``" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2301 msgid "``PyAST_CompileObject()``" msgstr "``PyAST_CompileObject()``" -#: ../../whatsnew/3.10.rst:2304 +#: ../../whatsnew/3.10.rst:2302 msgid "``PyFuture_FromAST()``" msgstr "``PyFuture_FromAST()``" -#: ../../whatsnew/3.10.rst:2305 +#: ../../whatsnew/3.10.rst:2303 msgid "``PyFuture_FromASTObject()``" msgstr "``PyFuture_FromASTObject()``" -#: ../../whatsnew/3.10.rst:2306 +#: ../../whatsnew/3.10.rst:2304 msgid "``PyParser_ASTFromFile()``" msgstr "``PyParser_ASTFromFile()``" -#: ../../whatsnew/3.10.rst:2307 +#: ../../whatsnew/3.10.rst:2305 msgid "``PyParser_ASTFromFileObject()``" msgstr "``PyParser_ASTFromFileObject()``" -#: ../../whatsnew/3.10.rst:2308 +#: ../../whatsnew/3.10.rst:2306 msgid "``PyParser_ASTFromFilename()``" msgstr "``PyParser_ASTFromFilename()``" -#: ../../whatsnew/3.10.rst:2309 +#: ../../whatsnew/3.10.rst:2307 msgid "``PyParser_ASTFromString()``" msgstr "``PyParser_ASTFromString()``" -#: ../../whatsnew/3.10.rst:2310 +#: ../../whatsnew/3.10.rst:2308 msgid "``PyParser_ASTFromStringObject()``" msgstr "``PyParser_ASTFromStringObject()``" -#: ../../whatsnew/3.10.rst:2312 +#: ../../whatsnew/3.10.rst:2310 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2315 +#: ../../whatsnew/3.10.rst:2313 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2317 +#: ../../whatsnew/3.10.rst:2315 msgid "``PyArena_New()``" msgstr "``PyArena_New()``" -#: ../../whatsnew/3.10.rst:2318 +#: ../../whatsnew/3.10.rst:2316 msgid "``PyArena_Free()``" msgstr "``PyArena_Free()``" -#: ../../whatsnew/3.10.rst:2319 +#: ../../whatsnew/3.10.rst:2317 msgid "``PyArena_Malloc()``" msgstr "``PyArena_Malloc()``" -#: ../../whatsnew/3.10.rst:2320 +#: ../../whatsnew/3.10.rst:2318 msgid "``PyArena_AddPyObject()``" msgstr "``PyArena_AddPyObject()``" -#: ../../whatsnew/3.10.rst:2322 +#: ../../whatsnew/3.10.rst:2320 msgid "" "These functions were undocumented, excluded from the limited C API, and were " "only used internally by the compiler. (Contributed by Victor Stinner in :" "issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2326 +#: ../../whatsnew/3.10.rst:2324 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" msgstr "" + +#~ msgid "Release" +#~ msgstr "發行版本" + +#~ msgid "|release|" +#~ msgstr "|release|" + +#~ msgid "Date" +#~ msgstr "日期" + +#~ msgid "|today|" +#~ msgstr "|today|" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index c436caf514..5d76e62444 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-01-04 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,110 +22,94 @@ msgstr "" msgid "What's New In Python 3.9" msgstr "Python 3.9 有什麼新功能" -#: ../../whatsnew/3.9.rst:0 -msgid "Release" -msgstr "發行版本" - -#: ../../whatsnew/3.9.rst:5 -msgid "|release|" -msgstr "|release|" - -#: ../../whatsnew/3.9.rst:0 -msgid "Date" -msgstr "日期" - -#: ../../whatsnew/3.9.rst:6 -msgid "|today|" -msgstr "|today|" - #: ../../whatsnew/3.9.rst:0 msgid "Editor" msgstr "編輯者" -#: ../../whatsnew/3.9.rst:7 +#: ../../whatsnew/3.9.rst:5 msgid "Łukasz Langa" msgstr "Łukasz Langa" -#: ../../whatsnew/3.9.rst:47 +#: ../../whatsnew/3.9.rst:45 msgid "" "This article explains the new features in Python 3.9, compared to 3.8. " "Python 3.9 was released on October 5, 2020." msgstr "" -#: ../../whatsnew/3.9.rst:50 +#: ../../whatsnew/3.9.rst:48 msgid "For full details, see the :ref:`changelog `." msgstr "" -#: ../../whatsnew/3.9.rst:54 +#: ../../whatsnew/3.9.rst:52 msgid ":pep:`596` - Python 3.9 Release Schedule" msgstr "" -#: ../../whatsnew/3.9.rst:58 +#: ../../whatsnew/3.9.rst:56 msgid "Summary -- Release highlights" msgstr "" -#: ../../whatsnew/3.9.rst:63 +#: ../../whatsnew/3.9.rst:61 msgid "New syntax features:" msgstr "" -#: ../../whatsnew/3.9.rst:65 +#: ../../whatsnew/3.9.rst:63 msgid ":pep:`584`, union operators added to ``dict``;" msgstr "" -#: ../../whatsnew/3.9.rst:66 +#: ../../whatsnew/3.9.rst:64 msgid ":pep:`585`, type hinting generics in standard collections;" msgstr "" -#: ../../whatsnew/3.9.rst:67 +#: ../../whatsnew/3.9.rst:65 msgid ":pep:`614`, relaxed grammar restrictions on decorators." msgstr "" -#: ../../whatsnew/3.9.rst:69 +#: ../../whatsnew/3.9.rst:67 msgid "New built-in features:" msgstr "" -#: ../../whatsnew/3.9.rst:71 +#: ../../whatsnew/3.9.rst:69 msgid ":pep:`616`, string methods to remove prefixes and suffixes." msgstr "" -#: ../../whatsnew/3.9.rst:73 +#: ../../whatsnew/3.9.rst:71 msgid "New features in the standard library:" msgstr "" -#: ../../whatsnew/3.9.rst:75 +#: ../../whatsnew/3.9.rst:73 msgid ":pep:`593`, flexible function and variable annotations;" msgstr "" -#: ../../whatsnew/3.9.rst:76 +#: ../../whatsnew/3.9.rst:74 msgid "" ":func:`os.pidfd_open` added that allows process management without races and " "signals." msgstr "" -#: ../../whatsnew/3.9.rst:79 +#: ../../whatsnew/3.9.rst:77 msgid "Interpreter improvements:" msgstr "" -#: ../../whatsnew/3.9.rst:81 +#: ../../whatsnew/3.9.rst:79 msgid "" ":pep:`573`, fast access to module state from methods of C extension types;" msgstr "" -#: ../../whatsnew/3.9.rst:83 +#: ../../whatsnew/3.9.rst:81 msgid ":pep:`617`, CPython now uses a new parser based on PEG;" msgstr "" -#: ../../whatsnew/3.9.rst:84 +#: ../../whatsnew/3.9.rst:82 msgid "" "a number of Python builtins (range, tuple, set, frozenset, list, dict) are " "now sped up using :pep:`590` vectorcall;" msgstr "" -#: ../../whatsnew/3.9.rst:86 +#: ../../whatsnew/3.9.rst:84 msgid "garbage collection does not block on resurrected objects;" msgstr "" -#: ../../whatsnew/3.9.rst:87 +#: ../../whatsnew/3.9.rst:85 msgid "" "a number of Python modules (:mod:`_abc`, :mod:`audioop`, :mod:`_bz2`, :mod:" "`_codecs`, :mod:`_contextvars`, :mod:`_crypt`, :mod:`_functools`, :mod:" @@ -134,7 +118,7 @@ msgid "" "489;" msgstr "" -#: ../../whatsnew/3.9.rst:92 +#: ../../whatsnew/3.9.rst:90 msgid "" "a number of standard library modules (:mod:`audioop`, :mod:`ast`, :mod:" "`grp`, :mod:`_hashlib`, :mod:`pwd`, :mod:`_posixsubprocess`, :mod:`random`, :" @@ -142,35 +126,35 @@ msgid "" "stable ABI defined by PEP 384." msgstr "" -#: ../../whatsnew/3.9.rst:97 +#: ../../whatsnew/3.9.rst:95 msgid "New library modules:" msgstr "" -#: ../../whatsnew/3.9.rst:99 +#: ../../whatsnew/3.9.rst:97 msgid "" ":pep:`615`, the IANA Time Zone Database is now present in the standard " "library in the :mod:`zoneinfo` module;" msgstr "" -#: ../../whatsnew/3.9.rst:101 +#: ../../whatsnew/3.9.rst:99 msgid "" "an implementation of a topological sort of a graph is now provided in the " "new :mod:`graphlib` module." msgstr "" -#: ../../whatsnew/3.9.rst:104 +#: ../../whatsnew/3.9.rst:102 msgid "Release process changes:" msgstr "" -#: ../../whatsnew/3.9.rst:106 +#: ../../whatsnew/3.9.rst:104 msgid ":pep:`602`, CPython adopts an annual release cycle." msgstr "" -#: ../../whatsnew/3.9.rst:110 +#: ../../whatsnew/3.9.rst:108 msgid "You should check for DeprecationWarning in your code" msgstr "" -#: ../../whatsnew/3.9.rst:112 +#: ../../whatsnew/3.9.rst:110 msgid "" "When Python 2.7 was still supported, a lot of functionality in Python 3 was " "kept for backward compatibility with Python 2.7. With the end of Python 2 " @@ -181,7 +165,7 @@ msgid "" "3.3, released in 2012." msgstr "" -#: ../../whatsnew/3.9.rst:120 +#: ../../whatsnew/3.9.rst:118 msgid "" "Test your application with the :option:`-W` ``default`` command-line option " "to see :exc:`DeprecationWarning` and :exc:`PendingDeprecationWarning`, or " @@ -190,14 +174,14 @@ msgid "" "code." msgstr "" -#: ../../whatsnew/3.9.rst:125 +#: ../../whatsnew/3.9.rst:123 msgid "" "Python 3.9 is the last version providing those Python 2 backward " "compatibility layers, to give more time to Python projects maintainers to " "organize the removal of the Python 2 support and add support for Python 3.9." msgstr "" -#: ../../whatsnew/3.9.rst:129 +#: ../../whatsnew/3.9.rst:127 msgid "" "Aliases to :ref:`Abstract Base Classes ` " "in the :mod:`collections` module, like ``collections.Mapping`` alias to :" @@ -205,52 +189,52 @@ msgid "" "compatibility. They will be removed from Python 3.10." msgstr "" -#: ../../whatsnew/3.9.rst:134 +#: ../../whatsnew/3.9.rst:132 msgid "" "More generally, try to run your tests in the :ref:`Python Development Mode " "` which helps to prepare your code to make it compatible with the " "next Python version." msgstr "" -#: ../../whatsnew/3.9.rst:138 +#: ../../whatsnew/3.9.rst:136 msgid "" "Note: a number of pre-existing deprecations were removed in this version of " "Python as well. Consult the :ref:`removed-in-python-39` section." msgstr "" -#: ../../whatsnew/3.9.rst:143 ../../whatsnew/3.9.rst:1276 +#: ../../whatsnew/3.9.rst:141 ../../whatsnew/3.9.rst:1274 msgid "New Features" msgstr "" -#: ../../whatsnew/3.9.rst:146 +#: ../../whatsnew/3.9.rst:144 msgid "Dictionary Merge & Update Operators" msgstr "" -#: ../../whatsnew/3.9.rst:148 +#: ../../whatsnew/3.9.rst:146 msgid "" "Merge (``|``) and update (``|=``) operators have been added to the built-in :" "class:`dict` class. Those complement the existing ``dict.update`` and " "``{**d1, **d2}`` methods of merging dictionaries." msgstr "" -#: ../../whatsnew/3.9.rst:152 ../../whatsnew/3.9.rst:285 +#: ../../whatsnew/3.9.rst:150 ../../whatsnew/3.9.rst:283 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../whatsnew/3.9.rst:161 +#: ../../whatsnew/3.9.rst:159 msgid "" "See :pep:`584` for a full description. (Contributed by Brandt Bucher in :" "issue:`36144`.)" msgstr "" -#: ../../whatsnew/3.9.rst:165 +#: ../../whatsnew/3.9.rst:163 msgid "New String Methods to Remove Prefixes and Suffixes" msgstr "" -#: ../../whatsnew/3.9.rst:167 +#: ../../whatsnew/3.9.rst:165 msgid "" ":meth:`str.removeprefix(prefix)` and :meth:`str." "removesuffix(suffix)` have been added to easily remove an " @@ -260,11 +244,11 @@ msgid "" "issue:`39939`.)" msgstr "" -#: ../../whatsnew/3.9.rst:175 +#: ../../whatsnew/3.9.rst:173 msgid "Type Hinting Generics in Standard Collections" msgstr "" -#: ../../whatsnew/3.9.rst:177 +#: ../../whatsnew/3.9.rst:175 msgid "" "In type annotations you can now use built-in collection types such as " "``list`` and ``dict`` as generic types instead of importing the " @@ -273,21 +257,21 @@ msgid "" "for example ``queue.Queue``." msgstr "" -#: ../../whatsnew/3.9.rst:183 ../../whatsnew/3.9.rst:1164 +#: ../../whatsnew/3.9.rst:181 ../../whatsnew/3.9.rst:1162 msgid "Example:" msgstr "範例:" -#: ../../whatsnew/3.9.rst:191 +#: ../../whatsnew/3.9.rst:189 msgid "" "See :pep:`585` for more details. (Contributed by Guido van Rossum, Ethan " "Smith, and Batuhan Taşkaya in :issue:`39481`.)" msgstr "" -#: ../../whatsnew/3.9.rst:195 +#: ../../whatsnew/3.9.rst:193 msgid "New Parser" msgstr "" -#: ../../whatsnew/3.9.rst:197 +#: ../../whatsnew/3.9.rst:195 msgid "" "Python 3.9 uses a new parser, based on `PEG `_ instead of `LL(1) ` and in :ref:`debug build " "`, the *encoding* and *errors* arguments are now checked for " @@ -348,14 +332,14 @@ msgid "" "encode` and :meth:`bytes.decode`." msgstr "" -#: ../../whatsnew/3.9.rst:239 +#: ../../whatsnew/3.9.rst:237 msgid "" "By default, for best performance, the *errors* argument is only checked at " "the first encoding/decoding error and the *encoding* argument is sometimes " "ignored for empty strings. (Contributed by Victor Stinner in :issue:`37388`.)" msgstr "" -#: ../../whatsnew/3.9.rst:244 +#: ../../whatsnew/3.9.rst:242 msgid "" "``\"\".replace(\"\", s, n)`` now returns ``s`` instead of an empty string " "for all non-zero ``n``. It is now consistent with ``\"\".replace(\"\", " @@ -363,14 +347,14 @@ msgid "" "objects. (Contributed by Serhiy Storchaka in :issue:`28029`.)" msgstr "" -#: ../../whatsnew/3.9.rst:249 +#: ../../whatsnew/3.9.rst:247 msgid "" "Any valid expression can now be used as a :term:`decorator`. Previously, " "the grammar was much more restrictive. See :pep:`614` for details. " "(Contributed by Brandt Bucher in :issue:`39702`.)" msgstr "" -#: ../../whatsnew/3.9.rst:253 +#: ../../whatsnew/3.9.rst:251 msgid "" "Improved help for the :mod:`typing` module. Docstrings are now shown for all " "special forms and special generic aliases (like ``Union`` and ``List``). " @@ -379,7 +363,7 @@ msgid "" "Serhiy Storchaka in :issue:`40257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:259 +#: ../../whatsnew/3.9.rst:257 msgid "" "Parallel running of :meth:`~agen.aclose` / :meth:`~agen.asend` / :meth:" "`~agen.athrow` is now prohibited, and ``ag_running`` now reflects the actual " @@ -387,7 +371,7 @@ msgid "" "issue:`30773`.)" msgstr "" -#: ../../whatsnew/3.9.rst:264 +#: ../../whatsnew/3.9.rst:262 msgid "" "Unexpected errors in calling the ``__iter__`` method are no longer masked by " "``TypeError`` in the :keyword:`in` operator and functions :func:`~operator." @@ -395,49 +379,49 @@ msgid "" "mod:`operator` module. (Contributed by Serhiy Storchaka in :issue:`40824`.)" msgstr "" -#: ../../whatsnew/3.9.rst:270 +#: ../../whatsnew/3.9.rst:268 msgid "" "Unparenthesized lambda expressions can no longer be the expression part in " "an ``if`` clause in comprehensions and generator expressions. See :issue:" "`41848` and :issue:`43755` for details." msgstr "" -#: ../../whatsnew/3.9.rst:276 +#: ../../whatsnew/3.9.rst:274 msgid "New Modules" msgstr "新模組" -#: ../../whatsnew/3.9.rst:279 +#: ../../whatsnew/3.9.rst:277 msgid "zoneinfo" msgstr "zoneinfo" -#: ../../whatsnew/3.9.rst:281 +#: ../../whatsnew/3.9.rst:279 msgid "" "The :mod:`zoneinfo` module brings support for the IANA time zone database to " "the standard library. It adds :class:`zoneinfo.ZoneInfo`, a concrete :class:" "`datetime.tzinfo` implementation backed by the system's time zone data." msgstr "" -#: ../../whatsnew/3.9.rst:305 +#: ../../whatsnew/3.9.rst:303 msgid "" "As a fall-back source of data for platforms that don't ship the IANA " "database, the |tzdata|_ module was released as a first-party package -- " "distributed via PyPI and maintained by the CPython core team." msgstr "" -#: ../../whatsnew/3.9.rst:314 +#: ../../whatsnew/3.9.rst:312 msgid "" ":pep:`615` -- Support for the IANA Time Zone Database in the Standard Library" msgstr "" -#: ../../whatsnew/3.9.rst:315 +#: ../../whatsnew/3.9.rst:313 msgid "PEP written and implemented by Paul Ganssle" msgstr "由 Paul Ganssle 撰寫 PEP 與實作" -#: ../../whatsnew/3.9.rst:319 +#: ../../whatsnew/3.9.rst:317 msgid "graphlib" msgstr "graphlib" -#: ../../whatsnew/3.9.rst:321 +#: ../../whatsnew/3.9.rst:319 msgid "" "A new module, :mod:`graphlib`, was added that contains the :class:`graphlib." "TopologicalSorter` class to offer functionality to perform topological " @@ -445,22 +429,22 @@ msgid "" "Hastings in :issue:`17005`.)" msgstr "" -#: ../../whatsnew/3.9.rst:328 +#: ../../whatsnew/3.9.rst:326 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.9.rst:331 +#: ../../whatsnew/3.9.rst:329 msgid "ast" msgstr "ast" -#: ../../whatsnew/3.9.rst:333 +#: ../../whatsnew/3.9.rst:331 msgid "" "Added the *indent* option to :func:`~ast.dump` which allows it to produce a " "multiline indented output. (Contributed by Serhiy Storchaka in :issue:" "`37995`.)" msgstr "" -#: ../../whatsnew/3.9.rst:337 +#: ../../whatsnew/3.9.rst:335 msgid "" "Added :func:`ast.unparse` as a function in the :mod:`ast` module that can be " "used to unparse an :class:`ast.AST` object and produce a string with code " @@ -468,17 +452,17 @@ msgid "" "(Contributed by Pablo Galindo and Batuhan Taskaya in :issue:`38870`.)" msgstr "" -#: ../../whatsnew/3.9.rst:342 +#: ../../whatsnew/3.9.rst:340 msgid "" "Added docstrings to AST nodes that contains the ASDL signature used to " "construct that node. (Contributed by Batuhan Taskaya in :issue:`39638`.)" msgstr "" -#: ../../whatsnew/3.9.rst:346 +#: ../../whatsnew/3.9.rst:344 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.9.rst:348 +#: ../../whatsnew/3.9.rst:346 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " @@ -488,7 +472,7 @@ msgid "" "`37228`.)" msgstr "" -#: ../../whatsnew/3.9.rst:355 +#: ../../whatsnew/3.9.rst:353 msgid "" "Added a new :term:`coroutine` :meth:`~asyncio.loop." "shutdown_default_executor` that schedules a shutdown for the default " @@ -497,13 +481,13 @@ msgid "" "new :term:`coroutine`. (Contributed by Kyle Stanley in :issue:`34037`.)" msgstr "" -#: ../../whatsnew/3.9.rst:361 +#: ../../whatsnew/3.9.rst:359 msgid "" "Added :class:`asyncio.PidfdChildWatcher`, a Linux-specific child watcher " "implementation that polls process file descriptors. (:issue:`38692`)" msgstr "" -#: ../../whatsnew/3.9.rst:364 +#: ../../whatsnew/3.9.rst:362 msgid "" "Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used " "for running IO-bound functions in a separate thread to avoid blocking the " @@ -512,7 +496,7 @@ msgid "" "by Kyle Stanley and Yury Selivanov in :issue:`32309`.)" msgstr "" -#: ../../whatsnew/3.9.rst:370 +#: ../../whatsnew/3.9.rst:368 msgid "" "When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now " "wait until the cancellation is complete also in the case when *timeout* is " @@ -520,25 +504,25 @@ msgid "" "Pranskevichus in :issue:`32751`.)" msgstr "" -#: ../../whatsnew/3.9.rst:375 +#: ../../whatsnew/3.9.rst:373 msgid "" ":mod:`asyncio` now raises :exc:`TyperError` when calling incompatible " "methods with an :class:`ssl.SSLSocket` socket. (Contributed by Ido Michael " "in :issue:`37404`.)" msgstr "" -#: ../../whatsnew/3.9.rst:380 +#: ../../whatsnew/3.9.rst:378 msgid "compileall" msgstr "compileall" -#: ../../whatsnew/3.9.rst:382 +#: ../../whatsnew/3.9.rst:380 msgid "" "Added new possibility to use hardlinks for duplicated ``.pyc`` files: " "*hardlink_dupes* parameter and --hardlink-dupes command line option. " "(Contributed by Lumír 'Frenzy' Balhar in :issue:`40495`.)" msgstr "" -#: ../../whatsnew/3.9.rst:385 +#: ../../whatsnew/3.9.rst:383 msgid "" "Added new options for path manipulation in resulting ``.pyc`` files: " "*stripdir*, *prependdir*, *limit_sl_dest* parameters and -s, -p, -e command " @@ -547,11 +531,11 @@ msgid "" "issue:`38112`.)" msgstr "" -#: ../../whatsnew/3.9.rst:390 +#: ../../whatsnew/3.9.rst:388 msgid "concurrent.futures" msgstr "concurrent.futures" -#: ../../whatsnew/3.9.rst:392 +#: ../../whatsnew/3.9.rst:390 msgid "" "Added a new *cancel_futures* parameter to :meth:`concurrent.futures.Executor." "shutdown` that cancels all pending futures which have not started running, " @@ -559,7 +543,7 @@ msgid "" "(Contributed by Kyle Stanley in :issue:`39349`.)" msgstr "" -#: ../../whatsnew/3.9.rst:398 +#: ../../whatsnew/3.9.rst:396 msgid "" "Removed daemon threads from :class:`~concurrent.futures.ThreadPoolExecutor` " "and :class:`~concurrent.futures.ProcessPoolExecutor`. This improves " @@ -567,7 +551,7 @@ msgid "" "processes. (Contributed by Kyle Stanley in :issue:`39812`.)" msgstr "" -#: ../../whatsnew/3.9.rst:403 +#: ../../whatsnew/3.9.rst:401 msgid "" "Workers in :class:`~concurrent.futures.ProcessPoolExecutor` are now spawned " "on demand, only when there are no available idle workers to reuse. This " @@ -575,22 +559,22 @@ msgid "" "workers. (Contributed by Kyle Stanley in :issue:`39207`.)" msgstr "" -#: ../../whatsnew/3.9.rst:409 +#: ../../whatsnew/3.9.rst:407 msgid "curses" msgstr "curses" -#: ../../whatsnew/3.9.rst:411 +#: ../../whatsnew/3.9.rst:409 msgid "" "Added :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, :func:" "`curses.get_tabsize`, and :func:`curses.set_tabsize` functions. (Contributed " "by Anthony Sottile in :issue:`38312`.)" msgstr "" -#: ../../whatsnew/3.9.rst:416 +#: ../../whatsnew/3.9.rst:414 msgid "datetime" msgstr "datetime" -#: ../../whatsnew/3.9.rst:417 +#: ../../whatsnew/3.9.rst:415 msgid "" "The :meth:`~datetime.date.isocalendar()` of :class:`datetime.date` and :meth:" "`~datetime.datetime.isocalendar()` of :class:`datetime.datetime` methods now " @@ -598,32 +582,32 @@ msgid "" "(Contributed by Dong-hee Na in :issue:`24416`.)" msgstr "" -#: ../../whatsnew/3.9.rst:423 +#: ../../whatsnew/3.9.rst:421 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.9.rst:425 +#: ../../whatsnew/3.9.rst:423 msgid "" "The :command:`upload` command now creates SHA2-256 and Blake2b-256 hash " "digests. It skips MD5 on platforms that block MD5 digest. (Contributed by " "Christian Heimes in :issue:`40698`.)" msgstr "" -#: ../../whatsnew/3.9.rst:430 +#: ../../whatsnew/3.9.rst:428 msgid "fcntl" msgstr "fcntl" -#: ../../whatsnew/3.9.rst:432 +#: ../../whatsnew/3.9.rst:430 msgid "" "Added constants :data:`~fcntl.F_OFD_GETLK`, :data:`~fcntl.F_OFD_SETLK` and :" "data:`~fcntl.F_OFD_SETLKW`. (Contributed by Dong-hee Na in :issue:`38602`.)" msgstr "" -#: ../../whatsnew/3.9.rst:437 +#: ../../whatsnew/3.9.rst:435 msgid "ftplib" msgstr "ftplib" -#: ../../whatsnew/3.9.rst:439 +#: ../../whatsnew/3.9.rst:437 msgid "" ":class:`~ftplib.FTP` and :class:`~ftplib.FTP_TLS` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -631,11 +615,11 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:444 +#: ../../whatsnew/3.9.rst:442 msgid "gc" msgstr "gc" -#: ../../whatsnew/3.9.rst:446 +#: ../../whatsnew/3.9.rst:444 msgid "" "When the garbage collector makes a collection in which some objects " "resurrect (they are reachable from outside the isolated cycles after the " @@ -644,24 +628,24 @@ msgid "" "issue:`38379`.)" msgstr "" -#: ../../whatsnew/3.9.rst:451 +#: ../../whatsnew/3.9.rst:449 msgid "" "Added a new function :func:`gc.is_finalized` to check if an object has been " "finalized by the garbage collector. (Contributed by Pablo Galindo in :issue:" "`39322`.)" msgstr "" -#: ../../whatsnew/3.9.rst:456 +#: ../../whatsnew/3.9.rst:454 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.9.rst:458 +#: ../../whatsnew/3.9.rst:456 msgid "" "The :mod:`hashlib` module can now use SHA3 hashes and SHAKE XOF from OpenSSL " "when available. (Contributed by Christian Heimes in :issue:`37630`.)" msgstr "" -#: ../../whatsnew/3.9.rst:462 +#: ../../whatsnew/3.9.rst:460 msgid "" "Builtin hash modules can now be disabled with ``./configure --without-" "builtin-hashlib-hashes`` or selectively enabled with e.g. ``./configure --" @@ -669,55 +653,55 @@ msgid "" "implementation. (Contributed by Christian Heimes in :issue:`40479`)" msgstr "" -#: ../../whatsnew/3.9.rst:470 +#: ../../whatsnew/3.9.rst:468 msgid "http" msgstr "http" -#: ../../whatsnew/3.9.rst:472 +#: ../../whatsnew/3.9.rst:470 msgid "" "HTTP status codes ``103 EARLY_HINTS``, ``418 IM_A_TEAPOT`` and ``425 " "TOO_EARLY`` are added to :class:`http.HTTPStatus`. (Contributed by Dong-hee " "Na in :issue:`39509` and Ross Rhodes in :issue:`39507`.)" msgstr "" -#: ../../whatsnew/3.9.rst:476 +#: ../../whatsnew/3.9.rst:474 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.9.rst:478 +#: ../../whatsnew/3.9.rst:476 msgid "" "Added option to toggle cursor blink off. (Contributed by Zackery Spytz in :" "issue:`4603`.)" msgstr "" -#: ../../whatsnew/3.9.rst:481 +#: ../../whatsnew/3.9.rst:479 msgid "" "Escape key now closes IDLE completion windows. (Contributed by Johnny " "Najera in :issue:`38944`.)" msgstr "" -#: ../../whatsnew/3.9.rst:484 +#: ../../whatsnew/3.9.rst:482 msgid "" "Added keywords to module name completion list. (Contributed by Terry J. " "Reedy in :issue:`37765`.)" msgstr "" -#: ../../whatsnew/3.9.rst:487 +#: ../../whatsnew/3.9.rst:485 msgid "New in 3.9 maintenance releases" msgstr "" -#: ../../whatsnew/3.9.rst:489 +#: ../../whatsnew/3.9.rst:487 msgid "" "Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User " "hooks were previously ignored. (Contributed by Ken Hilton in :issue:" "`43008`.)" msgstr "" -#: ../../whatsnew/3.9.rst:493 +#: ../../whatsnew/3.9.rst:491 msgid "The changes above have been backported to 3.8 maintenance releases." msgstr "" -#: ../../whatsnew/3.9.rst:495 +#: ../../whatsnew/3.9.rst:493 msgid "" "Rearrange the settings dialog. Split the General tab into Windows and Shell/" "Ed tabs. Move help sources, which extend the Help menu, to the Extensions " @@ -728,17 +712,17 @@ msgid "" "`33962`.)" msgstr "" -#: ../../whatsnew/3.9.rst:503 +#: ../../whatsnew/3.9.rst:501 msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" -#: ../../whatsnew/3.9.rst:507 +#: ../../whatsnew/3.9.rst:505 msgid "imaplib" msgstr "imaplib" -#: ../../whatsnew/3.9.rst:509 +#: ../../whatsnew/3.9.rst:507 msgid "" ":class:`~imaplib.IMAP4` and :class:`~imaplib.IMAP4_SSL` now have an optional " "*timeout* parameter for their constructors. Also, the :meth:`~imaplib.IMAP4." @@ -748,7 +732,7 @@ msgid "" "issue:`38615`.)" msgstr "" -#: ../../whatsnew/3.9.rst:516 +#: ../../whatsnew/3.9.rst:514 msgid "" ":meth:`imaplib.IMAP4.unselect` is added. :meth:`imaplib.IMAP4.unselect` " "frees server's resources associated with the selected mailbox and returns " @@ -758,11 +742,11 @@ msgid "" "Dong-hee Na in :issue:`40375`.)" msgstr "" -#: ../../whatsnew/3.9.rst:524 +#: ../../whatsnew/3.9.rst:522 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.9.rst:526 +#: ../../whatsnew/3.9.rst:524 msgid "" "To improve consistency with import statements, :func:`importlib.util." "resolve_name` now raises :exc:`ImportError` instead of :exc:`ValueError` for " @@ -770,47 +754,47 @@ msgid "" "`37444`.)" msgstr "" -#: ../../whatsnew/3.9.rst:531 +#: ../../whatsnew/3.9.rst:529 msgid "" "Import loaders which publish immutable module objects can now publish " "immutable packages in addition to individual modules. (Contributed by Dino " "Viehland in :issue:`39336`.)" msgstr "" -#: ../../whatsnew/3.9.rst:535 +#: ../../whatsnew/3.9.rst:533 msgid "" "Added :func:`importlib.resources.files` function with support for " "subdirectories in package data, matching backport in ``importlib_resources`` " "version 1.5. (Contributed by Jason R. Coombs in :issue:`39791`.)" msgstr "" -#: ../../whatsnew/3.9.rst:540 +#: ../../whatsnew/3.9.rst:538 msgid "" "Refreshed ``importlib.metadata`` from ``importlib_metadata`` version 1.6.1." msgstr "" -#: ../../whatsnew/3.9.rst:543 +#: ../../whatsnew/3.9.rst:541 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.9.rst:545 +#: ../../whatsnew/3.9.rst:543 msgid "" ":attr:`inspect.BoundArguments.arguments` is changed from ``OrderedDict`` to " "regular dict. (Contributed by Inada Naoki in :issue:`36350` and :issue:" "`39775`.)" msgstr "" -#: ../../whatsnew/3.9.rst:549 +#: ../../whatsnew/3.9.rst:547 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.9.rst:551 +#: ../../whatsnew/3.9.rst:549 msgid "" ":mod:`ipaddress` now supports IPv6 Scoped Addresses (IPv6 address with " "suffix ``%``)." msgstr "" -#: ../../whatsnew/3.9.rst:553 +#: ../../whatsnew/3.9.rst:551 msgid "" "Scoped IPv6 addresses can be parsed using :class:`ipaddress.IPv6Address`. If " "present, scope zone ID is available through the :attr:`~ipaddress." @@ -818,59 +802,59 @@ msgid "" "`34788`.)" msgstr "" -#: ../../whatsnew/3.9.rst:557 +#: ../../whatsnew/3.9.rst:555 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. (Contributed by Christian Heimes in :" "issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:562 +#: ../../whatsnew/3.9.rst:560 msgid "math" msgstr "math" -#: ../../whatsnew/3.9.rst:564 +#: ../../whatsnew/3.9.rst:562 msgid "" "Expanded the :func:`math.gcd` function to handle multiple arguments. " "Formerly, it only supported two arguments. (Contributed by Serhiy Storchaka " "in :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:568 +#: ../../whatsnew/3.9.rst:566 msgid "" "Added :func:`math.lcm`: return the least common multiple of specified " "arguments. (Contributed by Mark Dickinson, Ananthakrishnan and Serhiy " "Storchaka in :issue:`39479` and :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:572 +#: ../../whatsnew/3.9.rst:570 msgid "" "Added :func:`math.nextafter`: return the next floating-point value after *x* " "towards *y*. (Contributed by Victor Stinner in :issue:`39288`.)" msgstr "" -#: ../../whatsnew/3.9.rst:576 +#: ../../whatsnew/3.9.rst:574 msgid "" "Added :func:`math.ulp`: return the value of the least significant bit of a " "float. (Contributed by Victor Stinner in :issue:`39310`.)" msgstr "" -#: ../../whatsnew/3.9.rst:581 +#: ../../whatsnew/3.9.rst:579 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.9.rst:583 +#: ../../whatsnew/3.9.rst:581 msgid "" "The :class:`multiprocessing.SimpleQueue` class has a new :meth:" "`~multiprocessing.SimpleQueue.close` method to explicitly close the queue. " "(Contributed by Victor Stinner in :issue:`30966`.)" msgstr "" -#: ../../whatsnew/3.9.rst:589 +#: ../../whatsnew/3.9.rst:587 msgid "nntplib" msgstr "nntplib" -#: ../../whatsnew/3.9.rst:591 +#: ../../whatsnew/3.9.rst:589 msgid "" ":class:`~nntplib.NNTP` and :class:`~nntplib.NNTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -878,65 +862,65 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:596 +#: ../../whatsnew/3.9.rst:594 msgid "os" msgstr "os" -#: ../../whatsnew/3.9.rst:598 +#: ../../whatsnew/3.9.rst:596 msgid "" "Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for :attr:" "`si_code`. (Contributed by Dong-hee Na in :issue:`38493`.)" msgstr "" -#: ../../whatsnew/3.9.rst:601 +#: ../../whatsnew/3.9.rst:599 msgid "" "Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :data:" "`os.P_PIDFD` (:issue:`38713`) for process management with file descriptors." msgstr "" -#: ../../whatsnew/3.9.rst:605 +#: ../../whatsnew/3.9.rst:603 msgid "" "The :func:`os.unsetenv` function is now also available on Windows. " "(Contributed by Victor Stinner in :issue:`39413`.)" msgstr "" -#: ../../whatsnew/3.9.rst:608 +#: ../../whatsnew/3.9.rst:606 msgid "" "The :func:`os.putenv` and :func:`os.unsetenv` functions are now always " "available. (Contributed by Victor Stinner in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:612 +#: ../../whatsnew/3.9.rst:610 msgid "" "Added :func:`os.waitstatus_to_exitcode` function: convert a wait status to " "an exit code. (Contributed by Victor Stinner in :issue:`40094`.)" msgstr "" -#: ../../whatsnew/3.9.rst:617 +#: ../../whatsnew/3.9.rst:615 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.9.rst:619 +#: ../../whatsnew/3.9.rst:617 msgid "" "Added :meth:`pathlib.Path.readlink()` which acts similarly to :func:`os." "readlink`. (Contributed by Girts Folkmanis in :issue:`30618`)" msgstr "" -#: ../../whatsnew/3.9.rst:624 +#: ../../whatsnew/3.9.rst:622 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.9.rst:626 +#: ../../whatsnew/3.9.rst:624 msgid "" "On Windows now :class:`~pdb.Pdb` supports ``~/.pdbrc``. (Contributed by Tim " "Hopper and Dan Lidral-Porter in :issue:`20523`.)" msgstr "" -#: ../../whatsnew/3.9.rst:630 +#: ../../whatsnew/3.9.rst:628 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.9.rst:632 +#: ../../whatsnew/3.9.rst:630 msgid "" ":class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -944,53 +928,53 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:637 +#: ../../whatsnew/3.9.rst:635 msgid "pprint" msgstr "pprint" -#: ../../whatsnew/3.9.rst:639 +#: ../../whatsnew/3.9.rst:637 msgid "" ":mod:`pprint` can now pretty-print :class:`types.SimpleNamespace`. " "(Contributed by Carl Bordum Hansen in :issue:`37376`.)" msgstr "" -#: ../../whatsnew/3.9.rst:643 +#: ../../whatsnew/3.9.rst:641 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.9.rst:645 +#: ../../whatsnew/3.9.rst:643 msgid "" "The documentation string is now shown not only for class, function, method " "etc, but for any object that has its own ``__doc__`` attribute. (Contributed " "by Serhiy Storchaka in :issue:`40257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:650 +#: ../../whatsnew/3.9.rst:648 msgid "random" msgstr "random" -#: ../../whatsnew/3.9.rst:652 +#: ../../whatsnew/3.9.rst:650 msgid "" "Added a new :attr:`random.Random.randbytes` method: generate random bytes. " "(Contributed by Victor Stinner in :issue:`40286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:656 +#: ../../whatsnew/3.9.rst:654 msgid "signal" msgstr "signal" -#: ../../whatsnew/3.9.rst:658 +#: ../../whatsnew/3.9.rst:656 msgid "" "Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to " "signals to a process using a file descriptor instead of a pid. (:issue:" "`38712`)" msgstr "" -#: ../../whatsnew/3.9.rst:662 +#: ../../whatsnew/3.9.rst:660 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.9.rst:664 +#: ../../whatsnew/3.9.rst:662 msgid "" ":class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -998,41 +982,41 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:668 +#: ../../whatsnew/3.9.rst:666 msgid "" ":class:`~smtplib.LMTP` constructor now has an optional *timeout* parameter. " "(Contributed by Dong-hee Na in :issue:`39329`.)" msgstr "" -#: ../../whatsnew/3.9.rst:672 +#: ../../whatsnew/3.9.rst:670 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.9.rst:674 +#: ../../whatsnew/3.9.rst:672 msgid "" "The :mod:`socket` module now exports the :data:`~socket." "CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. (Contributed by " "Stefan Tatschner and Zackery Spytz in :issue:`25780`.)" msgstr "" -#: ../../whatsnew/3.9.rst:678 +#: ../../whatsnew/3.9.rst:676 msgid "" "The socket module now supports the :data:`~socket.CAN_J1939` protocol on " "platforms that support it. (Contributed by Karl Ding in :issue:`40291`.)" msgstr "" -#: ../../whatsnew/3.9.rst:681 +#: ../../whatsnew/3.9.rst:679 msgid "" "The socket module now has the :func:`socket.send_fds` and :func:`socket." "recv_fds` functions. (Contributed by Joannah Nanjekye, Shinya Okano and " "Victor Stinner in :issue:`28724`.)" msgstr "" -#: ../../whatsnew/3.9.rst:687 +#: ../../whatsnew/3.9.rst:685 msgid "time" msgstr "time" -#: ../../whatsnew/3.9.rst:689 +#: ../../whatsnew/3.9.rst:687 msgid "" "On AIX, :func:`~time.thread_time` is now implemented with " "``thread_cputime()`` which has nanosecond resolution, rather than " @@ -1040,11 +1024,11 @@ msgid "" "milliseconds. (Contributed by Batuhan Taskaya in :issue:`40192`)" msgstr "" -#: ../../whatsnew/3.9.rst:695 +#: ../../whatsnew/3.9.rst:693 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.9.rst:697 +#: ../../whatsnew/3.9.rst:695 msgid "" "Added a new :attr:`sys.platlibdir` attribute: name of the platform-specific " "library directory. It is used to build the path of standard library and the " @@ -1054,29 +1038,29 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:703 +#: ../../whatsnew/3.9.rst:701 msgid "" "Previously, :attr:`sys.stderr` was block-buffered when non-interactive. Now " "``stderr`` defaults to always being line-buffered. (Contributed by Jendrik " "Seipp in :issue:`13601`.)" msgstr "" -#: ../../whatsnew/3.9.rst:708 +#: ../../whatsnew/3.9.rst:706 msgid "tracemalloc" msgstr "tracemalloc" -#: ../../whatsnew/3.9.rst:710 +#: ../../whatsnew/3.9.rst:708 msgid "" "Added :func:`tracemalloc.reset_peak` to set the peak size of traced memory " "blocks to the current size, to measure the peak of specific pieces of code. " "(Contributed by Huon Wilson in :issue:`40630`.)" msgstr "" -#: ../../whatsnew/3.9.rst:715 ../../whatsnew/3.9.rst:1498 +#: ../../whatsnew/3.9.rst:713 ../../whatsnew/3.9.rst:1496 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.9.rst:717 +#: ../../whatsnew/3.9.rst:715 msgid "" ":pep:`593` introduced an :data:`typing.Annotated` type to decorate existing " "types with context-specific metadata and new ``include_extras`` parameter " @@ -1084,20 +1068,20 @@ msgid "" "(Contributed by Till Varoquaux and Konstantin Kashin.)" msgstr "" -#: ../../whatsnew/3.9.rst:723 +#: ../../whatsnew/3.9.rst:721 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.9.rst:725 +#: ../../whatsnew/3.9.rst:723 msgid "" "The Unicode database has been updated to version 13.0.0. (:issue:`39926`)." msgstr "" -#: ../../whatsnew/3.9.rst:728 +#: ../../whatsnew/3.9.rst:726 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.9.rst:730 +#: ../../whatsnew/3.9.rst:728 msgid "" "The activation scripts provided by :mod:`venv` now all specify their prompt " "customization consistently by always using the value specified by " @@ -1107,11 +1091,11 @@ msgid "" "Cannon in :issue:`37663`.)" msgstr "" -#: ../../whatsnew/3.9.rst:738 +#: ../../whatsnew/3.9.rst:736 msgid "xml" msgstr "xml" -#: ../../whatsnew/3.9.rst:740 +#: ../../whatsnew/3.9.rst:738 msgid "" "White space characters within attributes are now preserved when serializing :" "mod:`xml.etree.ElementTree` to XML file. EOLNs are no longer normalized to " @@ -1119,32 +1103,32 @@ msgid "" "2.11 of XML spec. (Contributed by Mefistotelis in :issue:`39011`.)" msgstr "" -#: ../../whatsnew/3.9.rst:748 +#: ../../whatsnew/3.9.rst:746 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.9.rst:750 +#: ../../whatsnew/3.9.rst:748 msgid "" "Optimized the idiom for assignment a temporary variable in comprehensions. " "Now ``for y in [expr]`` in comprehensions is as fast as a simple assignment " "``y = expr``. For example:" msgstr "" -#: ../../whatsnew/3.9.rst:754 +#: ../../whatsnew/3.9.rst:752 msgid "sums = [s for s in [0] for x in data for s in [s + x]]" msgstr "" -#: ../../whatsnew/3.9.rst:756 +#: ../../whatsnew/3.9.rst:754 msgid "" "Unlike the ``:=`` operator this idiom does not leak a variable to the outer " "scope." msgstr "" -#: ../../whatsnew/3.9.rst:759 +#: ../../whatsnew/3.9.rst:757 msgid "(Contributed by Serhiy Storchaka in :issue:`32856`.)" msgstr "" -#: ../../whatsnew/3.9.rst:761 +#: ../../whatsnew/3.9.rst:759 msgid "" "Optimized signal handling in multithreaded applications. If a thread " "different than the main thread gets a signal, the bytecode evaluation loop " @@ -1153,27 +1137,27 @@ msgid "" "interpreter can handle signals." msgstr "" -#: ../../whatsnew/3.9.rst:767 +#: ../../whatsnew/3.9.rst:765 msgid "" "Previously, the bytecode evaluation loop was interrupted at each instruction " "until the main thread handles signals. (Contributed by Victor Stinner in :" "issue:`40010`.)" msgstr "" -#: ../../whatsnew/3.9.rst:771 +#: ../../whatsnew/3.9.rst:769 msgid "" "Optimized the :mod:`subprocess` module on FreeBSD using ``closefrom()``. " "(Contributed by Ed Maste, Conrad Meyer, Kyle Evans, Kubilay Kocak and Victor " "Stinner in :issue:`38061`.)" msgstr "" -#: ../../whatsnew/3.9.rst:775 +#: ../../whatsnew/3.9.rst:773 msgid "" ":c:func:`PyLong_FromDouble` is now up to 1.87x faster for values that fit " "into :c:expr:`long`. (Contributed by Sergey Fedoseev in :issue:`37986`.)" msgstr "" -#: ../../whatsnew/3.9.rst:779 +#: ../../whatsnew/3.9.rst:777 msgid "" "A number of Python builtins (:class:`range`, :class:`tuple`, :class:`set`, :" "class:`frozenset`, :class:`list`, :class:`dict`) are now sped up by using :" @@ -1181,14 +1165,14 @@ msgid "" "Jeroen Demeyer and Petr Viktorin in :issue:`37207`.)" msgstr "" -#: ../../whatsnew/3.9.rst:784 +#: ../../whatsnew/3.9.rst:782 msgid "" "Optimized :func:`~set.difference_update` for the case when the other set is " "much larger than the base set. (Suggested by Evgeny Kapun with code " "contributed by Michele Orrù in :issue:`8425`.)" msgstr "" -#: ../../whatsnew/3.9.rst:788 +#: ../../whatsnew/3.9.rst:786 msgid "" "Python's small object allocator (``obmalloc.c``) now allows (no more than) " "one empty arena to remain available for immediate reuse, without returning " @@ -1197,26 +1181,26 @@ msgid "" "in :issue:`37257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:794 +#: ../../whatsnew/3.9.rst:792 msgid "" ":term:`floor division` of float operation now has a better performance. Also " "the message of :exc:`ZeroDivisionError` for this operation is updated. " "(Contributed by Dong-hee Na in :issue:`39434`.)" msgstr "" -#: ../../whatsnew/3.9.rst:798 +#: ../../whatsnew/3.9.rst:796 msgid "" "Decoding short ASCII strings with UTF-8 and ascii codecs is now about 15% " "faster. (Contributed by Inada Naoki in :issue:`37348`.)" msgstr "" -#: ../../whatsnew/3.9.rst:801 +#: ../../whatsnew/3.9.rst:799 msgid "" "Here's a summary of performance improvements from Python 3.4 through Python " "3.9:" msgstr "" -#: ../../whatsnew/3.9.rst:848 +#: ../../whatsnew/3.9.rst:846 msgid "" "These results were generated from the variable access benchmark script at: " "``Tools/scripts/var_access_benchmark.py``. The benchmark script displays " @@ -1227,18 +1211,18 @@ msgid "" "python.org/downloads/mac-osx/>`_." msgstr "" -#: ../../whatsnew/3.9.rst:858 +#: ../../whatsnew/3.9.rst:856 msgid "Deprecated" msgstr "" -#: ../../whatsnew/3.9.rst:860 +#: ../../whatsnew/3.9.rst:858 msgid "" "The distutils ``bdist_msi`` command is now deprecated, use ``bdist_wheel`` " "(wheel packages) instead. (Contributed by Hugo van Kemenade in :issue:" "`39586`.)" msgstr "" -#: ../../whatsnew/3.9.rst:864 +#: ../../whatsnew/3.9.rst:862 msgid "" "Currently :func:`math.factorial` accepts :class:`float` instances with non-" "negative integer values (like ``5.0``). It raises a :exc:`ValueError` for " @@ -1247,7 +1231,7 @@ msgid "" "Serhiy Storchaka in :issue:`37315`.)" msgstr "" -#: ../../whatsnew/3.9.rst:870 +#: ../../whatsnew/3.9.rst:868 msgid "" "The :mod:`parser` and :mod:`symbol` modules are deprecated and will be " "removed in future versions of Python. For the majority of use cases, users " @@ -1255,7 +1239,7 @@ msgid "" "stage, using the :mod:`ast` module." msgstr "" -#: ../../whatsnew/3.9.rst:875 +#: ../../whatsnew/3.9.rst:873 msgid "" "The Public C API functions :c:func:`PyParser_SimpleParseStringFlags`, :c:" "func:`PyParser_SimpleParseStringFlagsFilename`, :c:func:" @@ -1263,7 +1247,7 @@ msgid "" "and will be removed in Python 3.10 together with the old parser." msgstr "" -#: ../../whatsnew/3.9.rst:880 +#: ../../whatsnew/3.9.rst:878 msgid "" "Using :data:`NotImplemented` in a boolean context has been deprecated, as it " "is almost exclusively the result of incorrect rich comparator " @@ -1271,7 +1255,7 @@ msgid "" "Python. (Contributed by Josh Rosenberg in :issue:`35712`.)" msgstr "" -#: ../../whatsnew/3.9.rst:886 +#: ../../whatsnew/3.9.rst:884 msgid "" "The :mod:`random` module currently accepts any hashable type as a possible " "seed value. Unfortunately, some of those types are not guaranteed to have a " @@ -1280,7 +1264,7 @@ msgid "" "`bytes`, and :class:`bytearray`." msgstr "" -#: ../../whatsnew/3.9.rst:892 +#: ../../whatsnew/3.9.rst:890 msgid "" "Opening the :class:`~gzip.GzipFile` file for writing without specifying the " "*mode* argument is deprecated. In future Python versions it will always be " @@ -1289,39 +1273,39 @@ msgid "" "issue:`28286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:898 +#: ../../whatsnew/3.9.rst:896 msgid "" "Deprecated the ``split()`` method of :class:`_tkinter.TkappType` in favour " "of the ``splitlist()`` method which has more consistent and predicable " "behavior. (Contributed by Serhiy Storchaka in :issue:`38371`.)" msgstr "" -#: ../../whatsnew/3.9.rst:903 +#: ../../whatsnew/3.9.rst:901 msgid "" "The explicit passing of coroutine objects to :func:`asyncio.wait` has been " "deprecated and will be removed in version 3.11. (Contributed by Yury " "Selivanov and Kyle Stanley in :issue:`34790`.)" msgstr "" -#: ../../whatsnew/3.9.rst:907 +#: ../../whatsnew/3.9.rst:905 msgid "" "binhex4 and hexbin4 standards are now deprecated. The :mod:`binhex` module " "and the following :mod:`binascii` functions are now deprecated:" msgstr "" -#: ../../whatsnew/3.9.rst:910 +#: ../../whatsnew/3.9.rst:908 msgid ":func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx`" msgstr ":func:`~binascii.b2a_hqx`\\ 、\\ :func:`~binascii.a2b_hqx`" -#: ../../whatsnew/3.9.rst:911 +#: ../../whatsnew/3.9.rst:909 msgid ":func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx`" msgstr ":func:`~binascii.rlecode_hqx`\\ 、\\ :func:`~binascii.rledecode_hqx`" -#: ../../whatsnew/3.9.rst:913 +#: ../../whatsnew/3.9.rst:911 msgid "(Contributed by Victor Stinner in :issue:`39353`.)" msgstr "" -#: ../../whatsnew/3.9.rst:915 +#: ../../whatsnew/3.9.rst:913 msgid "" ":mod:`ast` classes ``slice``, ``Index`` and ``ExtSlice`` are considered " "deprecated and will be removed in future Python versions. ``value`` itself " @@ -1330,7 +1314,7 @@ msgid "" "Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:921 +#: ../../whatsnew/3.9.rst:919 msgid "" ":mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` are " "considered deprecated and will be removed in future Python versions. They " @@ -1339,7 +1323,7 @@ msgid "" "`39969` and Serhiy Storchaka in :issue:`39988`.)" msgstr "" -#: ../../whatsnew/3.9.rst:928 +#: ../../whatsnew/3.9.rst:926 msgid "" "The :c:func:`PyEval_InitThreads` and :c:func:`PyEval_ThreadsInitialized` " "functions are now deprecated and will be removed in Python 3.11. Calling :c:" @@ -1348,20 +1332,20 @@ msgid "" "Stinner in :issue:`39877`.)" msgstr "" -#: ../../whatsnew/3.9.rst:934 +#: ../../whatsnew/3.9.rst:932 msgid "" "Passing ``None`` as the first argument to the :func:`shlex.split` function " "has been deprecated. (Contributed by Zackery Spytz in :issue:`33262`.)" msgstr "" -#: ../../whatsnew/3.9.rst:937 +#: ../../whatsnew/3.9.rst:935 msgid "" ":func:`smtpd.MailmanProxy` is now deprecated as it is unusable without an " "external module, ``mailman``. (Contributed by Samuel Colvin in :issue:" "`35800`.)" msgstr "" -#: ../../whatsnew/3.9.rst:940 +#: ../../whatsnew/3.9.rst:938 msgid "" "The :mod:`lib2to3` module now emits a :exc:`PendingDeprecationWarning`. " "Python 3.9 switched to a PEG parser (see :pep:`617`), and Python 3.10 may " @@ -1371,22 +1355,22 @@ msgid "" "`parso`_. (Contributed by Carl Meyer in :issue:`40360`.)" msgstr "" -#: ../../whatsnew/3.9.rst:948 +#: ../../whatsnew/3.9.rst:946 msgid "" "The *random* parameter of :func:`random.shuffle` has been deprecated. " "(Contributed by Raymond Hettinger in :issue:`40465`)" msgstr "" -#: ../../whatsnew/3.9.rst:957 ../../whatsnew/3.9.rst:1412 +#: ../../whatsnew/3.9.rst:955 ../../whatsnew/3.9.rst:1410 msgid "Removed" msgstr "" -#: ../../whatsnew/3.9.rst:959 +#: ../../whatsnew/3.9.rst:957 msgid "" "The erroneous version at :data:`unittest.mock.__version__` has been removed." msgstr "" -#: ../../whatsnew/3.9.rst:961 +#: ../../whatsnew/3.9.rst:959 msgid "" ":class:`nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been " "removed. These methods are deprecated since Python 3.3. Generally, these " @@ -1396,14 +1380,14 @@ msgid "" "`39366`.)" msgstr "" -#: ../../whatsnew/3.9.rst:968 +#: ../../whatsnew/3.9.rst:966 msgid "" ":class:`array.array`: ``tostring()`` and ``fromstring()`` methods have been " "removed. They were aliases to ``tobytes()`` and ``frombytes()``, deprecated " "since Python 3.2. (Contributed by Victor Stinner in :issue:`38916`.)" msgstr "" -#: ../../whatsnew/3.9.rst:973 +#: ../../whatsnew/3.9.rst:971 msgid "" "The undocumented ``sys.callstats()`` function has been removed. Since Python " "3.7, it was deprecated and always returned :const:`None`. It required a " @@ -1411,7 +1395,7 @@ msgid "" "3.7. (Contributed by Victor Stinner in :issue:`37414`.)" msgstr "" -#: ../../whatsnew/3.9.rst:978 +#: ../../whatsnew/3.9.rst:976 msgid "" "The ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions have " "been removed. They were deprecated since Python 3.2. Use :func:`sys." @@ -1419,21 +1403,21 @@ msgid "" "by Victor Stinner in :issue:`37392`.)" msgstr "" -#: ../../whatsnew/3.9.rst:983 +#: ../../whatsnew/3.9.rst:981 msgid "" "The C function ``PyImport_Cleanup()`` has been removed. It was documented " "as: \"Empty the module table. For internal use only.\" (Contributed by " "Victor Stinner in :issue:`36710`.)" msgstr "" -#: ../../whatsnew/3.9.rst:987 +#: ../../whatsnew/3.9.rst:985 msgid "" "``_dummy_thread`` and ``dummy_threading`` modules have been removed. These " "modules were deprecated since Python 3.7 which requires threading support. " "(Contributed by Victor Stinner in :issue:`37312`.)" msgstr "" -#: ../../whatsnew/3.9.rst:991 +#: ../../whatsnew/3.9.rst:989 msgid "" "``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to " "``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open()` have " @@ -1441,14 +1425,14 @@ msgid "" "Stinner in :issue:`37320`.)" msgstr "" -#: ../../whatsnew/3.9.rst:996 +#: ../../whatsnew/3.9.rst:994 msgid "" "The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread` " "has been removed. It was deprecated since Python 3.8. Use :meth:`~threading." "Thread.is_alive()` instead. (Contributed by Dong-hee Na in :issue:`37804`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1001 +#: ../../whatsnew/3.9.rst:999 msgid "" "Methods ``getchildren()`` and ``getiterator()`` of classes :class:`~xml." "etree.ElementTree.ElementTree` and :class:`~xml.etree.ElementTree.Element` " @@ -1458,7 +1442,7 @@ msgid "" "getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1009 +#: ../../whatsnew/3.9.rst:1007 msgid "" "The old :mod:`plistlib` API has been removed, it was deprecated since Python " "3.4. Use the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:" @@ -1467,7 +1451,7 @@ msgid "" "are always used instead. (Contributed by Jon Janzen in :issue:`36409`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1015 +#: ../../whatsnew/3.9.rst:1013 msgid "" "The C function ``PyGen_NeedsFinalizing`` has been removed. It was not " "documented, tested, or used anywhere within CPython after the implementation " @@ -1475,7 +1459,7 @@ msgid "" "in :issue:`15088`)" msgstr "" -#: ../../whatsnew/3.9.rst:1020 +#: ../../whatsnew/3.9.rst:1018 msgid "" "``base64.encodestring()`` and ``base64.decodestring()``, aliases deprecated " "since Python 3.1, have been removed: use :func:`base64.encodebytes` and :" @@ -1483,14 +1467,14 @@ msgid "" "`39351`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1025 +#: ../../whatsnew/3.9.rst:1023 msgid "" "``fractions.gcd()`` function has been removed, it was deprecated since " "Python 3.5 (:issue:`22486`): use :func:`math.gcd` instead. (Contributed by " "Victor Stinner in :issue:`39350`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1029 +#: ../../whatsnew/3.9.rst:1027 msgid "" "The *buffering* parameter of :class:`bz2.BZ2File` has been removed. Since " "Python 3.0, it was ignored and using it emitted a :exc:`DeprecationWarning`. " @@ -1498,7 +1482,7 @@ msgid "" "Victor Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1034 +#: ../../whatsnew/3.9.rst:1032 msgid "" "The *encoding* parameter of :func:`json.loads` has been removed. As of " "Python 3.1, it was deprecated and ignored; using it has emitted a :exc:" @@ -1506,7 +1490,7 @@ msgid "" "`39377`)" msgstr "" -#: ../../whatsnew/3.9.rst:1039 +#: ../../whatsnew/3.9.rst:1037 msgid "" "``with (await asyncio.lock):`` and ``with (yield from asyncio.lock):`` " "statements are not longer supported, use ``async with lock`` instead. The " @@ -1514,7 +1498,7 @@ msgid "" "(Contributed by Andrew Svetlov in :issue:`34793`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1044 +#: ../../whatsnew/3.9.rst:1042 msgid "" "The :func:`sys.getcounts` function, the ``-X showalloccount`` command line " "option and the ``show_alloc_count`` field of the C structure :c:type:" @@ -1523,7 +1507,7 @@ msgid "" "`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1050 +#: ../../whatsnew/3.9.rst:1048 msgid "" "The ``_field_types`` attribute of the :class:`typing.NamedTuple` class has " "been removed. It was deprecated since Python 3.8. Use the " @@ -1531,14 +1515,14 @@ msgid "" "issue:`40182`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1055 +#: ../../whatsnew/3.9.rst:1053 msgid "" "The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was " "deprecated since 2006, and only returning ``False`` when it's called. " "(Contributed by Batuhan Taskaya in :issue:`40208`)" msgstr "" -#: ../../whatsnew/3.9.rst:1059 +#: ../../whatsnew/3.9.rst:1057 msgid "" "The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks` " "have been removed. They were deprecated since Python 3.7 and you can use :" @@ -1546,7 +1530,7 @@ msgid "" "(Contributed by Rémi Lapeyre in :issue:`40967`)" msgstr "" -#: ../../whatsnew/3.9.rst:1064 +#: ../../whatsnew/3.9.rst:1062 msgid "" "The ``unescape()`` method in the :class:`html.parser.HTMLParser` class has " "been removed (it was deprecated since Python 3.4). :func:`html.unescape` " @@ -1554,21 +1538,21 @@ msgid "" "unicode characters." msgstr "" -#: ../../whatsnew/3.9.rst:1071 ../../whatsnew/3.9.rst:1338 +#: ../../whatsnew/3.9.rst:1069 ../../whatsnew/3.9.rst:1336 msgid "Porting to Python 3.9" msgstr "" -#: ../../whatsnew/3.9.rst:1073 +#: ../../whatsnew/3.9.rst:1071 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.9.rst:1078 +#: ../../whatsnew/3.9.rst:1076 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.9.rst:1080 +#: ../../whatsnew/3.9.rst:1078 msgid "" ":func:`__import__` and :func:`importlib.util.resolve_name` now raise :exc:" "`ImportError` where it previously raised :exc:`ValueError`. Callers catching " @@ -1576,26 +1560,26 @@ msgid "" "versions will need to catch both using ``except (ImportError, ValueError):``." msgstr "" -#: ../../whatsnew/3.9.rst:1085 +#: ../../whatsnew/3.9.rst:1083 msgid "" "The :mod:`venv` activation scripts no longer special-case when " "``__VENV_PROMPT__`` is set to ``\"\"``." msgstr "" -#: ../../whatsnew/3.9.rst:1088 +#: ../../whatsnew/3.9.rst:1086 msgid "" "The :meth:`select.epoll.unregister` method no longer ignores the :data:" "`~errno.EBADF` error. (Contributed by Victor Stinner in :issue:`39239`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1092 +#: ../../whatsnew/3.9.rst:1090 msgid "" "The *compresslevel* parameter of :class:`bz2.BZ2File` became keyword-only, " "since the *buffering* parameter has been removed. (Contributed by Victor " "Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1096 +#: ../../whatsnew/3.9.rst:1094 msgid "" "Simplified AST for subscription. Simple indices will be represented by their " "value, extended slices will be represented as tuples. ``Index(value)`` will " @@ -1603,21 +1587,21 @@ msgid "" "Load())``. (Contributed by Serhiy Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1102 +#: ../../whatsnew/3.9.rst:1100 msgid "" "The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` " "environment variable when the :option:`-E` or :option:`-I` command line " "options are being used." msgstr "" -#: ../../whatsnew/3.9.rst:1106 +#: ../../whatsnew/3.9.rst:1104 msgid "" "The *encoding* parameter has been added to the classes :class:`ftplib.FTP` " "and :class:`ftplib.FTP_TLS` as a keyword-only parameter, and the default " "encoding is changed from Latin-1 to UTF-8 to follow :rfc:`2640`." msgstr "" -#: ../../whatsnew/3.9.rst:1110 +#: ../../whatsnew/3.9.rst:1108 msgid "" ":meth:`asyncio.loop.shutdown_default_executor` has been added to :class:" "`~asyncio.AbstractEventLoop`, meaning alternative event loops that inherit " @@ -1625,7 +1609,7 @@ msgid "" "issue:`34037`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1115 +#: ../../whatsnew/3.9.rst:1113 msgid "" "The constant values of future flags in the :mod:`__future__` module is " "updated in order to prevent collision with compiler flags. Previously " @@ -1633,7 +1617,7 @@ msgid "" "(Contributed by Batuhan Taskaya in :issue:`39562`)" msgstr "" -#: ../../whatsnew/3.9.rst:1120 +#: ../../whatsnew/3.9.rst:1118 msgid "" "``array('u')`` now uses ``wchar_t`` as C type instead of ``Py_UNICODE``. " "This change doesn't affect to its behavior because ``Py_UNICODE`` is alias " @@ -1641,7 +1625,7 @@ msgid "" "`34538`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1125 +#: ../../whatsnew/3.9.rst:1123 msgid "" "The :func:`logging.getLogger` API now returns the root logger when passed " "the name ``'root'``, whereas previously it returned a non-root logger named " @@ -1651,7 +1635,7 @@ msgid "" "(Contributed by Vinay Sajip in :issue:`37742`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1132 +#: ../../whatsnew/3.9.rst:1130 msgid "" "Division handling of :class:`~pathlib.PurePath` now returns " "``NotImplemented`` instead of raising a :exc:`TypeError` when passed " @@ -1660,7 +1644,7 @@ msgid "" "mentioned types. (Contributed by Roger Aiudi in :issue:`34775`)." msgstr "" -#: ../../whatsnew/3.9.rst:1138 +#: ../../whatsnew/3.9.rst:1136 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. Leading zeros are ambiguous and " @@ -1670,7 +1654,7 @@ msgid "" "leading zeros. (Contributed by Christian Heimes in :issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:1146 +#: ../../whatsnew/3.9.rst:1144 msgid "" ":func:`codecs.lookup` now normalizes the encoding name the same way as :func:" "`encodings.normalize_encoding`, except that :func:`codecs.lookup` also " @@ -1679,11 +1663,11 @@ msgid "" "in :issue:`37751`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1154 +#: ../../whatsnew/3.9.rst:1152 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.9.rst:1156 +#: ../../whatsnew/3.9.rst:1154 msgid "" "Instances of :ref:`heap-allocated types ` (such as those created " "with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their " @@ -1694,7 +1678,7 @@ msgid "" "heap-allocated types visit the object's type." msgstr "" -#: ../../whatsnew/3.9.rst:1177 +#: ../../whatsnew/3.9.rst:1175 msgid "" "If your traverse function delegates to ``tp_traverse`` of its base class (or " "another type), ensure that ``Py_TYPE(self)`` is visited only once. Note that " @@ -1702,19 +1686,19 @@ msgid "" "``tp_traverse``." msgstr "" -#: ../../whatsnew/3.9.rst:1182 +#: ../../whatsnew/3.9.rst:1180 msgid "For example, if your ``tp_traverse`` function includes:" msgstr "" -#: ../../whatsnew/3.9.rst:1188 +#: ../../whatsnew/3.9.rst:1186 msgid "then add:" msgstr "" -#: ../../whatsnew/3.9.rst:1201 +#: ../../whatsnew/3.9.rst:1199 msgid "(See :issue:`35810` and :issue:`40217` for more information.)" msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`\\ 。)" -#: ../../whatsnew/3.9.rst:1203 +#: ../../whatsnew/3.9.rst:1201 msgid "" "The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, " "``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. " @@ -1722,11 +1706,11 @@ msgid "" "issue:`29548`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1209 +#: ../../whatsnew/3.9.rst:1207 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.9.rst:1211 +#: ../../whatsnew/3.9.rst:1209 msgid "" "The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the :" "keyword:`assert` statement. Previously, the assert statement would not work " @@ -1734,37 +1718,37 @@ msgid "" "(Contributed by Zackery Spytz in :issue:`34880`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1216 +#: ../../whatsnew/3.9.rst:1214 msgid "" "The :opcode:`COMPARE_OP` opcode was split into four distinct instructions:" msgstr "" -#: ../../whatsnew/3.9.rst:1218 +#: ../../whatsnew/3.9.rst:1216 msgid "``COMPARE_OP`` for rich comparisons" msgstr "" -#: ../../whatsnew/3.9.rst:1219 +#: ../../whatsnew/3.9.rst:1217 msgid "``IS_OP`` for 'is' and 'is not' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1220 +#: ../../whatsnew/3.9.rst:1218 msgid "``CONTAINS_OP`` for 'in' and 'not in' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1221 +#: ../../whatsnew/3.9.rst:1219 msgid "" "``JUMP_IF_NOT_EXC_MATCH`` for checking exceptions in 'try-except' statements." msgstr "" -#: ../../whatsnew/3.9.rst:1224 +#: ../../whatsnew/3.9.rst:1222 msgid "(Contributed by Mark Shannon in :issue:`39156`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1228 +#: ../../whatsnew/3.9.rst:1226 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.9.rst:1230 +#: ../../whatsnew/3.9.rst:1228 msgid "" "Added ``--with-platlibdir`` option to the ``configure`` script: name of the " "platform-specific library directory, stored in the new :attr:`sys." @@ -1773,26 +1757,26 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1236 +#: ../../whatsnew/3.9.rst:1234 msgid "" "The ``COUNT_ALLOCS`` special build macro has been removed. (Contributed by " "Victor Stinner in :issue:`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1239 +#: ../../whatsnew/3.9.rst:1237 msgid "" "On non-Windows platforms, the :c:func:`setenv` and :c:func:`unsetenv` " "functions are now required to build Python. (Contributed by Victor Stinner " "in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1243 +#: ../../whatsnew/3.9.rst:1241 msgid "" "On non-Windows platforms, creating ``bdist_wininst`` installers is now " "officially unsupported. (See :issue:`10945` for more details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1246 +#: ../../whatsnew/3.9.rst:1244 msgid "" "When building Python on macOS from source, ``_tkinter`` now links with non-" "system Tcl and Tk frameworks if they are installed in ``/Library/" @@ -1803,13 +1787,13 @@ msgid "" "(Contributed by Ned Deily in :issue:`34956`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1255 +#: ../../whatsnew/3.9.rst:1253 msgid "" "Python can now be built for Windows 10 ARM64. (Contributed by Steve Dower " "in :issue:`33125`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1258 +#: ../../whatsnew/3.9.rst:1256 msgid "" "Some individual tests are now skipped when ``--pgo`` is used. The tests in " "question increased the PGO task time significantly and likely didn't help " @@ -1825,11 +1809,11 @@ msgid "" "details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1273 +#: ../../whatsnew/3.9.rst:1271 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.9.rst:1278 +#: ../../whatsnew/3.9.rst:1276 msgid "" ":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module " "with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` " @@ -1838,20 +1822,20 @@ msgid "" "(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1285 +#: ../../whatsnew/3.9.rst:1283 msgid "" "Added :c:func:`PyFrame_GetCode` function: get a frame code. Added :c:func:" "`PyFrame_GetBack` function: get the frame next outer frame. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1289 +#: ../../whatsnew/3.9.rst:1287 msgid "" "Added :c:func:`PyFrame_GetLineNumber` to the limited C API. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1292 +#: ../../whatsnew/3.9.rst:1290 msgid "" "Added :c:func:`PyThreadState_GetInterpreter` and :c:func:" "`PyInterpreterState_Get` functions to get the interpreter. Added :c:func:" @@ -1861,7 +1845,7 @@ msgid "" "issue:`39947`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1300 +#: ../../whatsnew/3.9.rst:1298 msgid "" "Added a new public :c:func:`PyObject_CallNoArgs` function to the C API, " "which calls a callable Python object without any arguments. It is the most " @@ -1869,11 +1853,11 @@ msgid "" "(Contributed by Victor Stinner in :issue:`37194`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1305 ../../whatsnew/3.9.rst:1423 +#: ../../whatsnew/3.9.rst:1303 ../../whatsnew/3.9.rst:1421 msgid "Changes in the limited C API (if ``Py_LIMITED_API`` macro is defined):" msgstr "" -#: ../../whatsnew/3.9.rst:1307 +#: ../../whatsnew/3.9.rst:1305 msgid "" "Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall` " "as regular functions for the limited API. Previously, there were defined as " @@ -1882,23 +1866,23 @@ msgid "" "the limited C API)." msgstr "" -#: ../../whatsnew/3.9.rst:1313 +#: ../../whatsnew/3.9.rst:1311 msgid "" "``PyObject_INIT()`` and ``PyObject_INIT_VAR()`` become regular \"opaque\" " "function to hide implementation details." msgstr "" -#: ../../whatsnew/3.9.rst:1316 ../../whatsnew/3.9.rst:1450 +#: ../../whatsnew/3.9.rst:1314 ../../whatsnew/3.9.rst:1448 msgid "(Contributed by Victor Stinner in :issue:`38644` and :issue:`39542`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1318 +#: ../../whatsnew/3.9.rst:1316 msgid "" "The :c:func:`PyModule_AddType` function is added to help adding a type to a " "module. (Contributed by Dong-hee Na in :issue:`40024`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1322 +#: ../../whatsnew/3.9.rst:1320 msgid "" "Added the functions :c:func:`PyObject_GC_IsTracked` and :c:func:" "`PyObject_GC_IsFinalized` to the public API to allow to query if Python " @@ -1907,27 +1891,27 @@ msgid "" "issue:`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1328 +#: ../../whatsnew/3.9.rst:1326 msgid "" "Added :c:func:`_PyObject_FunctionStr` to get a user-friendly string " "representation of a function-like object. (Patch by Jeroen Demeyer in :issue:" "`37645`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1332 +#: ../../whatsnew/3.9.rst:1330 msgid "" "Added :c:func:`PyObject_CallOneArg` for calling an object with one " "positional argument (Patch by Jeroen Demeyer in :issue:`37483`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1340 +#: ../../whatsnew/3.9.rst:1338 msgid "" "``PyInterpreterState.eval_frame`` (:pep:`523`) now requires a new mandatory " "*tstate* parameter (``PyThreadState*``). (Contributed by Victor Stinner in :" "issue:`38500`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1344 +#: ../../whatsnew/3.9.rst:1342 msgid "" "Extension modules: :c:member:`~PyModuleDef.m_traverse`, :c:member:" "`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` functions of :c:" @@ -1939,12 +1923,12 @@ msgid "" "`PyModule_GetState`) is ``NULL``." msgstr "" -#: ../../whatsnew/3.9.rst:1353 +#: ../../whatsnew/3.9.rst:1351 msgid "" "Extension modules without module state (``m_size <= 0``) are not affected." msgstr "" -#: ../../whatsnew/3.9.rst:1355 +#: ../../whatsnew/3.9.rst:1353 msgid "" "If :c:func:`Py_AddPendingCall` is called in a subinterpreter, the function " "is now scheduled to be called from the subinterpreter, rather than being " @@ -1952,7 +1936,7 @@ msgid "" "of scheduled calls. (Contributed by Victor Stinner in :issue:`39984`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1361 +#: ../../whatsnew/3.9.rst:1359 msgid "" "The Windows registry is no longer used to initialize :data:`sys.path` when " "the ``-E`` option is used (if :c:member:`PyConfig.use_environment` is set to " @@ -1960,21 +1944,21 @@ msgid "" "by Zackery Spytz in :issue:`8901`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1366 +#: ../../whatsnew/3.9.rst:1364 msgid "" "The global variable :c:data:`PyStructSequence_UnnamedField` is now a " "constant and refers to a constant string. (Contributed by Serhiy Storchaka " "in :issue:`38650`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1370 +#: ../../whatsnew/3.9.rst:1368 msgid "" "The :c:type:`PyGC_Head` structure is now opaque. It is only defined in the " "internal C API (``pycore_gc.h``). (Contributed by Victor Stinner in :issue:" "`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1374 +#: ../../whatsnew/3.9.rst:1372 msgid "" "The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, :c:" "func:`PyUnicode_FromUnicode`, :c:func:`PyUnicode_AsUnicode`, " @@ -1983,7 +1967,7 @@ msgid "" "Python 3.3. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1381 +#: ../../whatsnew/3.9.rst:1379 msgid "" "The :c:func:`Py_FatalError` function is replaced with a macro which logs " "automatically the name of the current function, unless the " @@ -1991,22 +1975,22 @@ msgid "" "issue:`39882`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1386 +#: ../../whatsnew/3.9.rst:1384 msgid "" "The vectorcall protocol now requires that the caller passes only strings as " "keyword names. (See :issue:`37540` for more information.)" msgstr "" -#: ../../whatsnew/3.9.rst:1389 +#: ../../whatsnew/3.9.rst:1387 msgid "" "Implementation details of a number of macros and functions are now hidden:" msgstr "" -#: ../../whatsnew/3.9.rst:1391 +#: ../../whatsnew/3.9.rst:1389 msgid ":c:func:`PyObject_IS_GC` macro was converted to a function." msgstr "" -#: ../../whatsnew/3.9.rst:1393 +#: ../../whatsnew/3.9.rst:1391 msgid "" "The :c:func:`PyObject_NEW` macro becomes an alias to the :c:func:" "`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro becomes an " @@ -2014,38 +1998,38 @@ msgid "" "the :c:member:`PyTypeObject.tp_basicsize` member." msgstr "" -#: ../../whatsnew/3.9.rst:1398 +#: ../../whatsnew/3.9.rst:1396 msgid "" ":c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function: " "the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset` " "member." msgstr "" -#: ../../whatsnew/3.9.rst:1402 +#: ../../whatsnew/3.9.rst:1400 msgid "" ":c:func:`PyObject_CheckBuffer` macro was converted to a function: the macro " "accessed directly the :c:member:`PyTypeObject.tp_as_buffer` member." msgstr "" -#: ../../whatsnew/3.9.rst:1405 +#: ../../whatsnew/3.9.rst:1403 msgid "" ":c:func:`PyIndex_Check` is now always declared as an opaque function to hide " "implementation details: removed the ``PyIndex_Check()`` macro. The macro " "accessed directly the :c:member:`PyTypeObject.tp_as_number` member." msgstr "" -#: ../../whatsnew/3.9.rst:1409 +#: ../../whatsnew/3.9.rst:1407 msgid "(See :issue:`40170` for more details.)" msgstr "(更多資訊請見 :issue:`40170`\\ 。)" -#: ../../whatsnew/3.9.rst:1414 +#: ../../whatsnew/3.9.rst:1412 msgid "" "Excluded ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of " "``pyfpe.h`` from the limited C API. (Contributed by Victor Stinner in :issue:" "`38835`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1418 +#: ../../whatsnew/3.9.rst:1416 msgid "" "The ``tp_print`` slot of :ref:`PyTypeObject ` has been " "removed. It was used for printing objects to files in Python 2.7 and before. " @@ -2053,89 +2037,89 @@ msgid "" "Demeyer in :issue:`36974`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1425 +#: ../../whatsnew/3.9.rst:1423 msgid "Excluded the following functions from the limited C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1427 +#: ../../whatsnew/3.9.rst:1425 msgid "" "``PyThreadState_DeleteCurrent()`` (Contributed by Joannah Nanjekye in :issue:" "`37878`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1429 +#: ../../whatsnew/3.9.rst:1427 msgid "``_Py_CheckRecursionLimit``" msgstr "``_Py_CheckRecursionLimit``" -#: ../../whatsnew/3.9.rst:1430 +#: ../../whatsnew/3.9.rst:1428 msgid "``_Py_NewReference()``" msgstr "``_Py_NewReference()``" -#: ../../whatsnew/3.9.rst:1431 +#: ../../whatsnew/3.9.rst:1429 msgid "``_Py_ForgetReference()``" msgstr "``_Py_ForgetReference()``" -#: ../../whatsnew/3.9.rst:1432 +#: ../../whatsnew/3.9.rst:1430 msgid "``_PyTraceMalloc_NewReference()``" msgstr "``_PyTraceMalloc_NewReference()``" -#: ../../whatsnew/3.9.rst:1433 +#: ../../whatsnew/3.9.rst:1431 msgid "``_Py_GetRefTotal()``" msgstr "``_Py_GetRefTotal()``" -#: ../../whatsnew/3.9.rst:1434 +#: ../../whatsnew/3.9.rst:1432 msgid "The trashcan mechanism which never worked in the limited C API." msgstr "" -#: ../../whatsnew/3.9.rst:1435 +#: ../../whatsnew/3.9.rst:1433 msgid "``PyTrash_UNWIND_LEVEL``" msgstr "``PyTrash_UNWIND_LEVEL``" -#: ../../whatsnew/3.9.rst:1436 +#: ../../whatsnew/3.9.rst:1434 msgid "``Py_TRASHCAN_BEGIN_CONDITION``" msgstr "``Py_TRASHCAN_BEGIN_CONDITION``" -#: ../../whatsnew/3.9.rst:1437 +#: ../../whatsnew/3.9.rst:1435 msgid "``Py_TRASHCAN_BEGIN``" msgstr "``Py_TRASHCAN_BEGIN``" -#: ../../whatsnew/3.9.rst:1438 +#: ../../whatsnew/3.9.rst:1436 msgid "``Py_TRASHCAN_END``" msgstr "``Py_TRASHCAN_END``" -#: ../../whatsnew/3.9.rst:1439 +#: ../../whatsnew/3.9.rst:1437 msgid "``Py_TRASHCAN_SAFE_BEGIN``" msgstr "``Py_TRASHCAN_SAFE_BEGIN``" -#: ../../whatsnew/3.9.rst:1440 +#: ../../whatsnew/3.9.rst:1438 msgid "``Py_TRASHCAN_SAFE_END``" msgstr "``Py_TRASHCAN_SAFE_END``" -#: ../../whatsnew/3.9.rst:1442 +#: ../../whatsnew/3.9.rst:1440 msgid "Moved following functions and definitions to the internal C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1444 +#: ../../whatsnew/3.9.rst:1442 msgid "``_PyDebug_PrintTotalRefs()``" msgstr "``_PyDebug_PrintTotalRefs()``" -#: ../../whatsnew/3.9.rst:1445 +#: ../../whatsnew/3.9.rst:1443 msgid "``_Py_PrintReferences()``" msgstr "``_Py_PrintReferences()``" -#: ../../whatsnew/3.9.rst:1446 +#: ../../whatsnew/3.9.rst:1444 msgid "``_Py_PrintReferenceAddresses()``" msgstr "``_Py_PrintReferenceAddresses()``" -#: ../../whatsnew/3.9.rst:1447 +#: ../../whatsnew/3.9.rst:1445 msgid "``_Py_tracemalloc_config``" msgstr "``_Py_tracemalloc_config``" -#: ../../whatsnew/3.9.rst:1448 +#: ../../whatsnew/3.9.rst:1446 msgid "``_Py_AddToAllObjects()`` (specific to ``Py_TRACE_REFS`` build)" msgstr "" -#: ../../whatsnew/3.9.rst:1452 +#: ../../whatsnew/3.9.rst:1450 msgid "" "Removed ``_PyRuntime.getframe`` hook and removed ``_PyThreadState_GetFrame`` " "macro which was an alias to ``_PyRuntime.getframe``. They were only exposed " @@ -2143,72 +2127,72 @@ msgid "" "(Contributed by Victor Stinner in :issue:`39946`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1457 +#: ../../whatsnew/3.9.rst:1455 msgid "" "Removed the following functions from the C API. Call :c:func:`PyGC_Collect` " "explicitly to clear all free lists. (Contributed by Inada Naoki and Victor " "Stinner in :issue:`37340`, :issue:`38896` and :issue:`40428`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1462 +#: ../../whatsnew/3.9.rst:1460 msgid "``PyAsyncGen_ClearFreeLists()``" msgstr "``PyAsyncGen_ClearFreeLists()``" -#: ../../whatsnew/3.9.rst:1463 +#: ../../whatsnew/3.9.rst:1461 msgid "``PyContext_ClearFreeList()``" msgstr "``PyContext_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1464 +#: ../../whatsnew/3.9.rst:1462 msgid "``PyDict_ClearFreeList()``" msgstr "``PyDict_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1465 +#: ../../whatsnew/3.9.rst:1463 msgid "``PyFloat_ClearFreeList()``" msgstr "``PyFloat_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1466 +#: ../../whatsnew/3.9.rst:1464 msgid "``PyFrame_ClearFreeList()``" msgstr "``PyFrame_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1467 +#: ../../whatsnew/3.9.rst:1465 msgid "``PyList_ClearFreeList()``" msgstr "``PyList_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1468 +#: ../../whatsnew/3.9.rst:1466 msgid "" "``PyMethod_ClearFreeList()`` and ``PyCFunction_ClearFreeList()``: the free " "lists of bound method objects have been removed." msgstr "" -#: ../../whatsnew/3.9.rst:1470 +#: ../../whatsnew/3.9.rst:1468 msgid "" "``PySet_ClearFreeList()``: the set free list has been removed in Python 3.4." msgstr "" -#: ../../whatsnew/3.9.rst:1472 +#: ../../whatsnew/3.9.rst:1470 msgid "``PyTuple_ClearFreeList()``" msgstr "``PyTuple_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1473 +#: ../../whatsnew/3.9.rst:1471 msgid "" "``PyUnicode_ClearFreeList()``: the Unicode free list has been removed in " "Python 3.3." msgstr "" -#: ../../whatsnew/3.9.rst:1476 +#: ../../whatsnew/3.9.rst:1474 msgid "" "Removed ``_PyUnicode_ClearStaticStrings()`` function. (Contributed by Victor " "Stinner in :issue:`39465`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1479 +#: ../../whatsnew/3.9.rst:1477 msgid "" "Removed ``Py_UNICODE_MATCH``. It has been deprecated by :pep:`393`, and " "broken since Python 3.3. The :c:func:`PyUnicode_Tailmatch` function can be " "used instead. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1484 +#: ../../whatsnew/3.9.rst:1482 msgid "" "Cleaned header files of interfaces defined but with no implementation. The " "public API symbols being removed are: " @@ -2221,26 +2205,26 @@ msgid "" "`39372`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1495 +#: ../../whatsnew/3.9.rst:1493 msgid "Notable changes in Python 3.9.1" msgstr "" -#: ../../whatsnew/3.9.rst:1500 +#: ../../whatsnew/3.9.rst:1498 msgid "" "The behavior of :class:`typing.Literal` was changed to conform with :pep:" "`586` and to match the behavior of static type checkers specified in the PEP." msgstr "" -#: ../../whatsnew/3.9.rst:1503 +#: ../../whatsnew/3.9.rst:1501 msgid "``Literal`` now de-duplicates parameters." msgstr "" -#: ../../whatsnew/3.9.rst:1504 +#: ../../whatsnew/3.9.rst:1502 msgid "" "Equality comparisons between ``Literal`` objects are now order independent." msgstr "" -#: ../../whatsnew/3.9.rst:1505 +#: ../../whatsnew/3.9.rst:1503 msgid "" "``Literal`` comparisons now respect types. For example, ``Literal[0] == " "Literal[False]`` previously evaluated to ``True``. It is now ``False``. To " @@ -2248,7 +2232,7 @@ msgid "" "differentiating types." msgstr "" -#: ../../whatsnew/3.9.rst:1509 +#: ../../whatsnew/3.9.rst:1507 msgid "" "``Literal`` objects will now raise a :exc:`TypeError` exception during " "equality comparisons if any of their parameters are not :term:`hashable`. " @@ -2256,15 +2240,15 @@ msgid "" "error::" msgstr "" -#: ../../whatsnew/3.9.rst:1521 +#: ../../whatsnew/3.9.rst:1519 msgid "(Contributed by Yurii Karabas in :issue:`42345`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1524 +#: ../../whatsnew/3.9.rst:1522 msgid "macOS 11.0 (Big Sur) and Apple Silicon Mac support" msgstr "" -#: ../../whatsnew/3.9.rst:1526 +#: ../../whatsnew/3.9.rst:1524 msgid "" "As of 3.9.1, Python now fully supports building and running on macOS 11.0 " "(Big Sur) and on Apple Silicon Macs (based on the ``ARM64`` architecture). A " @@ -2276,19 +2260,19 @@ msgid "" "version in use at runtime (\"weaklinking\")." msgstr "" -#: ../../whatsnew/3.9.rst:1535 +#: ../../whatsnew/3.9.rst:1533 msgid "(Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1538 +#: ../../whatsnew/3.9.rst:1536 msgid "Notable changes in Python 3.9.2" msgstr "" -#: ../../whatsnew/3.9.rst:1541 +#: ../../whatsnew/3.9.rst:1539 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.9.rst:1543 +#: ../../whatsnew/3.9.rst:1541 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2304,11 +2288,11 @@ msgid "" "Python 3.10. (Contributed by Ken Jin in :issue:`42195`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1557 +#: ../../whatsnew/3.9.rst:1555 msgid "urllib.parse" msgstr "urllib.parse" -#: ../../whatsnew/3.9.rst:1559 +#: ../../whatsnew/3.9.rst:1557 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." @@ -2319,3 +2303,15 @@ msgid "" "For more details, please see their respective documentation. (Contributed by " "Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)" msgstr "" + +#~ msgid "Release" +#~ msgstr "發行版本" + +#~ msgid "|release|" +#~ msgstr "|release|" + +#~ msgid "Date" +#~ msgstr "日期" + +#~ msgid "|today|" +#~ msgstr "|today|" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy