diff --git a/c-api/iter.po b/c-api/iter.po index 34425ae206..24429a47bf 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,8 +28,8 @@ msgstr "" #: ../../c-api/iter.rst:12 msgid "" -"Return non-zero if the object *o* supports the iterator protocol, and ``0`` " -"otherwise. This function always succeeds." +"Return non-zero if the object *o* can be safely passed to :c:func:" +"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." msgstr "" #: ../../c-api/iter.rst:17 @@ -40,38 +40,39 @@ msgstr "" #: ../../c-api/iter.rst:24 msgid "" -"Return the next value from the iteration *o*. The object must be an " -"iterator (it is up to the caller to check this). If there are no remaining " -"values, returns ``NULL`` with no exception set. If an error occurs while " -"retrieving the item, returns ``NULL`` and passes along the exception." +"Return the next value from the iterator *o*. The object must be an iterator " +"according to :c:func:`PyIter_Check` (it is up to the caller to check this). " +"If there are no remaining values, returns ``NULL`` with no exception set. If " +"an error occurs while retrieving the item, returns ``NULL`` and passes along " +"the exception." msgstr "" -#: ../../c-api/iter.rst:29 +#: ../../c-api/iter.rst:30 msgid "" "To write a loop which iterates over an iterator, the C code should look " "something like this::" msgstr "" -#: ../../c-api/iter.rst:58 +#: ../../c-api/iter.rst:59 msgid "" "The enum value used to represent different results of :c:func:`PyIter_Send`." msgstr "" -#: ../../c-api/iter.rst:65 +#: ../../c-api/iter.rst:66 msgid "Sends the *arg* value into the iterator *iter*. Returns:" msgstr "" -#: ../../c-api/iter.rst:67 +#: ../../c-api/iter.rst:68 msgid "" "``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." msgstr "" -#: ../../c-api/iter.rst:68 +#: ../../c-api/iter.rst:69 msgid "" "``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." msgstr "" -#: ../../c-api/iter.rst:69 +#: ../../c-api/iter.rst:70 msgid "" "``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " "``NULL``." diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 177b883cd9..378947e7e7 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-29 00:08+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2369,9 +2369,9 @@ msgstr "" #: ../../c-api/typeobj.rst:1523 msgid "" -"An optional pointer to a function that returns an iterator for the object. " -"Its presence normally signals that the instances of this type are iterable " -"(although sequences may be iterable without this function)." +"An optional pointer to a function that returns an :term:`iterator` for the " +"object. Its presence normally signals that the instances of this type are :" +"term:`iterable` (although sequences may be iterable without this function)." msgstr "" #: ../../c-api/typeobj.rst:1527 @@ -2380,8 +2380,8 @@ msgstr "" #: ../../c-api/typeobj.rst:1538 msgid "" -"An optional pointer to a function that returns the next item in an iterator. " -"The signature is::" +"An optional pointer to a function that returns the next item in an :term:" +"`iterator`. The signature is::" msgstr "" #: ../../c-api/typeobj.rst:1543 @@ -3267,8 +3267,8 @@ msgstr "" #: ../../c-api/typeobj.rst:2431 msgid "" -"The returned object must be an iterator, i.e. :c:func:`PyIter_Check` must " -"return ``1`` for it." +"The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " +"must return ``1`` for it." msgstr "" #: ../../c-api/typeobj.rst:2434 diff --git a/glossary.po b/glossary.po index b4fe0df39e..2367ff0d77 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-07 00:09+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+0000\n" "PO-Revision-Date: 2021-11-15 11:05+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1478,11 +1478,17 @@ msgstr "" msgid "More information can be found in :ref:`typeiter`." msgstr "在\\ :ref:`typeiter`\\ 文中可以找到更多資訊。" -#: ../../glossary.rst:671 +#: ../../glossary.rst:674 +msgid "" +"CPython does not consistently apply the requirement that an iterator define :" +"meth:`__iter__`." +msgstr "" + +#: ../../glossary.rst:676 msgid "key function" msgstr "key function(鍵函式)" -#: ../../glossary.rst:673 +#: ../../glossary.rst:678 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1492,7 +1498,7 @@ msgstr "" "一個用於排序 (sorting) 或定序 (ordering) 的值。例如,\\ :func:`locale." "strxfrm` 被用來產生一個了解區域特定排序慣例的排序鍵。" -#: ../../glossary.rst:678 +#: ../../glossary.rst:683 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1504,7 +1510,7 @@ msgstr "" "\\ 、\\ :func:`heapq.merge`\\ 、\\ :func:`heapq.nsmallest`\\ 、\\ :func:" "`heapq.nlargest` 和 :func:`itertools.groupby`\\ 。" -#: ../../glossary.rst:684 +#: ../../glossary.rst:689 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.lower` method can serve as a key function for case insensitive sorts. " @@ -1522,19 +1528,19 @@ msgstr "" "`~operator.itemgetter` 和 :func:`~operator.methodcaller`\\ 。關於如何建立和使" "用鍵函式的範例,請參閱\\ :ref:`如何排序 `\\ 。" -#: ../../glossary.rst:692 +#: ../../glossary.rst:697 msgid "keyword argument" msgstr "keyword argument(關鍵字引數)" -#: ../../glossary.rst:694 ../../glossary.rst:983 +#: ../../glossary.rst:699 ../../glossary.rst:988 msgid "See :term:`argument`." msgstr "請參閱 :term:`argument`\\ (引數)。" -#: ../../glossary.rst:695 +#: ../../glossary.rst:700 msgid "lambda" msgstr "lambda" -#: ../../glossary.rst:697 +#: ../../glossary.rst:702 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1544,11 +1550,11 @@ msgstr "" "function),於該函式被呼叫時求值。建立 lambda 函式的語法是 ``lambda " "[parameters]: expression``\\ 。" -#: ../../glossary.rst:700 +#: ../../glossary.rst:705 msgid "LBYL" msgstr "LBYL" -#: ../../glossary.rst:702 +#: ../../glossary.rst:707 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1559,7 +1565,7 @@ msgstr "" "地測試先決條件。這種風格與 :term:`EAFP` 方式形成對比,且它的特色是會有許多 :" "keyword:`if` 陳述式的存在。" -#: ../../glossary.rst:707 +#: ../../glossary.rst:712 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a " "race condition between \"the looking\" and \"the leaping\". For example, " @@ -1573,37 +1579,37 @@ msgstr "" "了 *key*,則該程式碼就會失效。這個問題可以用鎖 (lock) 或使用 EAFP 編碼方式來" "解決。" -#: ../../glossary.rst:712 +#: ../../glossary.rst:717 msgid "locale encoding" msgstr "locale encoding(區域編碼)" -#: ../../glossary.rst:714 +#: ../../glossary.rst:719 msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with " "``locale.setlocale(locale.LC_CTYPE, new_locale)``." msgstr "" -#: ../../glossary.rst:717 +#: ../../glossary.rst:722 msgid "On Windows, it is the ANSI code page (ex: ``cp1252``)." msgstr "" -#: ../../glossary.rst:719 +#: ../../glossary.rst:724 msgid "" "``locale.getpreferredencoding(False)`` can be used to get the locale " "encoding." msgstr "" -#: ../../glossary.rst:722 +#: ../../glossary.rst:727 msgid "" "Python uses the :term:`filesystem encoding and error handler` to convert " "between Unicode filenames and bytes filenames." msgstr "" -#: ../../glossary.rst:724 +#: ../../glossary.rst:729 msgid "list" msgstr "list(串列)" -#: ../../glossary.rst:726 +#: ../../glossary.rst:731 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " @@ -1613,11 +1619,11 @@ msgstr "" "似其他語言中的一個陣列 (array) 而較不像一個鏈結串列 (linked list),因為存取元" "素的時間複雜度是 O(1)。" -#: ../../glossary.rst:729 +#: ../../glossary.rst:734 msgid "list comprehension" msgstr "list comprehension(串列綜合運算)" -#: ../../glossary.rst:731 +#: ../../glossary.rst:736 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1631,11 +1637,11 @@ msgstr "" "keyword:`if` 子句是選擇性的。如果省略它,則 ``range(256)`` 中的所有元素都會被" "處理。" -#: ../../glossary.rst:737 +#: ../../glossary.rst:742 msgid "loader" msgstr "loader(載入器)" -#: ../../glossary.rst:739 +#: ../../glossary.rst:744 msgid "" "An object that loads a module. It must define a method named :meth:" "`load_module`. A loader is typically returned by a :term:`finder`. See :pep:" @@ -1647,19 +1653,19 @@ msgstr "" "`302`,關於 :term:`abstract base class`\\ (抽象基底類別),請參閱 :class:" "`importlib.abc.Loader`\\ 。" -#: ../../glossary.rst:743 +#: ../../glossary.rst:748 msgid "magic method" msgstr "magic method(魔術方法)" -#: ../../glossary.rst:747 +#: ../../glossary.rst:752 msgid "An informal synonym for :term:`special method`." msgstr ":term:`special method`\\ (特殊方法)的一個非正式同義詞。" -#: ../../glossary.rst:748 +#: ../../glossary.rst:753 msgid "mapping" msgstr "mapping(對映)" -#: ../../glossary.rst:750 +#: ../../glossary.rst:755 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`~collections.abc.Mapping` or :class:" @@ -1674,11 +1680,11 @@ msgstr "" "的 method。範例包括 :class:`dict`\\ 、\\ :class:`collections.defaultdict`" "\\ 、\\ :class:`collections.OrderedDict` 和 :class:`collections.Counter`\\ 。" -#: ../../glossary.rst:756 +#: ../../glossary.rst:761 msgid "meta path finder" msgstr "meta path finder(元路徑尋檢器)" -#: ../../glossary.rst:758 +#: ../../glossary.rst:763 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders ` " "相關但是不同。" -#: ../../glossary.rst:762 +#: ../../glossary.rst:767 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1696,11 +1702,11 @@ msgstr "" "關於元路徑尋檢器實作的 method,請參閱 :class:`importlib.abc.MetaPathFinder`" "\\ 。" -#: ../../glossary.rst:764 +#: ../../glossary.rst:769 msgid "metaclass" msgstr "metaclass(元類別)" -#: ../../glossary.rst:766 +#: ../../glossary.rst:771 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -1720,15 +1726,15 @@ msgstr "" "性存取、增加執行緒安全性、追蹤物件建立、實作單例模式 (singleton),以及許多其" "他的任務。" -#: ../../glossary.rst:776 +#: ../../glossary.rst:781 msgid "More information can be found in :ref:`metaclasses`." msgstr "更多資訊可以在\\ :ref:`metaclasses`\\ 章節中找到。" -#: ../../glossary.rst:777 +#: ../../glossary.rst:782 msgid "method" msgstr "method(方法)" -#: ../../glossary.rst:779 +#: ../../glossary.rst:784 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -1740,11 +1746,11 @@ msgstr "" "通常被稱為 ``self``)。請參閱 :term:`function`\\ (函式)和 :term:`nested " "scope`\\ (巢狀作用域)。" -#: ../../glossary.rst:783 +#: ../../glossary.rst:788 msgid "method resolution order" msgstr "method resolution order(方法解析順序)" -#: ../../glossary.rst:785 +#: ../../glossary.rst:790 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See `The Python 2.3 Method Resolution Order `_\\ 。" -#: ../../glossary.rst:789 +#: ../../glossary.rst:794 msgid "module" msgstr "module(模組)" -#: ../../glossary.rst:791 +#: ../../glossary.rst:796 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -1769,15 +1775,15 @@ msgstr "" "空間,它包含任意的 Python 物件。模組是藉由 :term:`importing` 的過程,被載入" "至 Python。" -#: ../../glossary.rst:795 +#: ../../glossary.rst:800 msgid "See also :term:`package`." msgstr "另請參閱 :term:`package`\\ (套件)。" -#: ../../glossary.rst:796 +#: ../../glossary.rst:801 msgid "module spec" msgstr "module spec(模組規格)" -#: ../../glossary.rst:798 +#: ../../glossary.rst:803 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1785,19 +1791,19 @@ msgstr "" "一個命名空間,它包含用於載入模組的 import 相關資訊。它是 :class:`importlib." "machinery.ModuleSpec` 的一個實例。" -#: ../../glossary.rst:800 +#: ../../glossary.rst:805 msgid "MRO" msgstr "MRO" -#: ../../glossary.rst:802 +#: ../../glossary.rst:807 msgid "See :term:`method resolution order`." msgstr "請參閱 :term:`method resolution order`\\ (方法解析順序)。" -#: ../../glossary.rst:803 +#: ../../glossary.rst:808 msgid "mutable" msgstr "mutable(可變物件)" -#: ../../glossary.rst:805 +#: ../../glossary.rst:810 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1805,11 +1811,11 @@ msgstr "" "可變物件可以改變它們的值,但維持它們的 :func:`id`\\ 。另請參閱 :term:" "`immutable`\\ (不可變物件)。" -#: ../../glossary.rst:807 +#: ../../glossary.rst:812 msgid "named tuple" msgstr "named tuple(附名元組)" -#: ../../glossary.rst:809 +#: ../../glossary.rst:814 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -1819,7 +1825,7 @@ msgstr "" "索引 (indexable) 元素也可以用附名屬性來存取。這些型別或 class 也可以具有其他" "的特性。" -#: ../../glossary.rst:813 +#: ../../glossary.rst:818 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -1830,7 +1836,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:824 +#: ../../glossary.rst:829 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -1846,11 +1852,11 @@ msgstr "" "些額外的 method,這些 method 可能是在手寫或內建的 named tuple 中,無法找到" "的。" -#: ../../glossary.rst:831 +#: ../../glossary.rst:836 msgid "namespace" msgstr "namespace(命名空間)" -#: ../../glossary.rst:833 +#: ../../glossary.rst:838 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -1870,11 +1876,11 @@ msgstr "" "func:`itertools.islice` 明確地表示,這些函式分別是由 :mod:`random` 和 :mod:" "`itertools` 模組在實作。" -#: ../../glossary.rst:843 +#: ../../glossary.rst:848 msgid "namespace package" msgstr "namespace package(命名空間套件)" -#: ../../glossary.rst:845 +#: ../../glossary.rst:850 msgid "" "A :pep:`420` :term:`package` which serves only as a container for " "subpackages. Namespace packages may have no physical representation, and " @@ -1885,15 +1891,15 @@ msgstr "" "一個容器。命名空間套件可能沒有實體的表示法,而且具體來說它們不像是一個 :term:" "`regular package`\\ (正規套件),因為它們並沒有 ``__init__.py`` 這個檔案。" -#: ../../glossary.rst:850 +#: ../../glossary.rst:855 msgid "See also :term:`module`." msgstr "另請參閱 :term:`module`\\ (模組)。" -#: ../../glossary.rst:851 +#: ../../glossary.rst:856 msgid "nested scope" msgstr "nested scope(巢狀作用域)" -#: ../../glossary.rst:853 +#: ../../glossary.rst:858 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -1908,11 +1914,11 @@ msgstr "" "寫入。同樣地,全域變數是在全域命名空間中讀取及寫入。\\ :keyword:`nonlocal` 容" "許對外層作用域進行寫入。" -#: ../../glossary.rst:860 +#: ../../glossary.rst:865 msgid "new-style class" msgstr "new-style class(新式類別)" -#: ../../glossary.rst:862 +#: ../../glossary.rst:867 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -1924,11 +1930,11 @@ msgstr "" "__slots__`\\ 、描述器 (descriptor)、屬性 (property)、\\ :meth:" "`__getattribute__`\\ 、class method(類別方法)和 static method(靜態方法)。" -#: ../../glossary.rst:866 +#: ../../glossary.rst:871 msgid "object" msgstr "object(物件)" -#: ../../glossary.rst:868 +#: ../../glossary.rst:873 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -1936,11 +1942,11 @@ msgstr "" "具有狀態(屬性或值)及被定義的行為(method)的任何資料。它也是任何 :term:" "`new-style class`\\ (新式類別)的最終 base class(基底類別)。" -#: ../../glossary.rst:871 +#: ../../glossary.rst:876 msgid "package" msgstr "package(套件)" -#: ../../glossary.rst:873 +#: ../../glossary.rst:878 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with an ``__path__`` " @@ -1950,17 +1956,17 @@ msgstr "" "迴的子套件 (subpackage)。技術上而言,套件就是具有 ``__path__`` 屬性的一個 " "Python 模組。" -#: ../../glossary.rst:877 +#: ../../glossary.rst:882 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" "另請參閱 :term:`regular package`\\ (正規套件)和 :term:`namespace package`" "\\ (命名空間套件)。" -#: ../../glossary.rst:878 +#: ../../glossary.rst:883 msgid "parameter" msgstr "parameter(參數)" -#: ../../glossary.rst:880 +#: ../../glossary.rst:885 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -1970,7 +1976,7 @@ msgstr "" "它指明該函式能夠接受的一個 :term:`argument`\\ (引數),或在某些情況下指示多" "個引數。共有有五種不同的參數類型:" -#: ../../glossary.rst:884 +#: ../../glossary.rst:889 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -1983,7 +1989,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:893 +#: ../../glossary.rst:898 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -1996,7 +2002,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:902 +#: ../../glossary.rst:907 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2011,7 +2017,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:910 +#: ../../glossary.rst:915 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2025,7 +2031,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:918 +#: ../../glossary.rst:923 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2036,14 +2042,14 @@ msgstr "" "已被其他參數接受的任何關鍵字引數之外)。這類參數是透過在其參數名稱字首加上 " "``**`` 來定義的,例如上面範例中的 *kwargs*。" -#: ../../glossary.rst:924 +#: ../../glossary.rst:929 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." msgstr "" "參數可以指明引數是選擇性的或必需的,也可以為一些選擇性的引數指定預設值。" -#: ../../glossary.rst:927 +#: ../../glossary.rst:932 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2054,11 +2060,11 @@ msgstr "" "參數之間的差異 `\\ 、\\ :class:`inspect." "Parameter` class、\\ :ref:`function`\\ 章節,以及 :pep:`362`\\ 。" -#: ../../glossary.rst:931 +#: ../../glossary.rst:936 msgid "path entry" msgstr "path entry(路徑項目)" -#: ../../glossary.rst:933 +#: ../../glossary.rst:938 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2066,11 +2072,11 @@ msgstr "" "在 :term:`import path`\\ (匯入路徑)中的一個位置,而 :term:`path based " "finder` (基於路徑的尋檢器)會參考該位置來尋找要 import 的模組。" -#: ../../glossary.rst:935 +#: ../../glossary.rst:940 msgid "path entry finder" msgstr "path entry finder(路徑項目尋檢器)" -#: ../../glossary.rst:937 +#: ../../glossary.rst:942 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -2080,7 +2086,7 @@ msgstr "" "`path entry hook`\\ )所回傳的一種 :term:`finder`\\ ,它知道如何以一個 :term:" "`path entry`\\ 定位模組。" -#: ../../glossary.rst:941 +#: ../../glossary.rst:946 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2088,11 +2094,11 @@ msgstr "" "關於路徑項目尋檢器實作的 method,請參閱 :class:`importlib.abc." "PathEntryFinder`\\ 。" -#: ../../glossary.rst:943 +#: ../../glossary.rst:948 msgid "path entry hook" msgstr "path entry hook(路徑項目鉤)" -#: ../../glossary.rst:945 +#: ../../glossary.rst:950 msgid "" "A callable on the :data:`sys.path_hook` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -2102,11 +2108,11 @@ msgstr "" "個特定的 :term:`path entry` 中尋找模組,則會回傳一個 :term:`path entry " "finder`\\ (路徑項目尋檢器)。" -#: ../../glossary.rst:948 +#: ../../glossary.rst:953 msgid "path based finder" msgstr "path based finder(基於路徑的尋檢器)" -#: ../../glossary.rst:950 +#: ../../glossary.rst:955 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2114,11 +2120,11 @@ msgstr "" "預設的\\ :term:`元路徑尋檢器 (meta path finder) ` 之一,它" "會在一個 :term:`import path` 中搜尋模組。" -#: ../../glossary.rst:952 +#: ../../glossary.rst:957 msgid "path-like object" msgstr "path-like object(類路徑物件)" -#: ../../glossary.rst:954 +#: ../../glossary.rst:959 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2136,11 +2142,11 @@ msgstr "" "`os.fsencode` 則分別可用於確保 :class:`str` 及 :class:`bytes` 的結果。由 :" "pep:`519` 引入。" -#: ../../glossary.rst:962 +#: ../../glossary.rst:967 msgid "PEP" msgstr "PEP" -#: ../../glossary.rst:964 +#: ../../glossary.rst:969 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2151,7 +2157,7 @@ msgstr "" "為 Python 社群提供資訊,或是描述 Python 的一個新功能或該功能的程序和環境。" "PEP 應該要提供簡潔的技術規範以及被提案功能的運作原理。" -#: ../../glossary.rst:970 +#: ../../glossary.rst:975 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2163,15 +2169,15 @@ msgstr "" "已納入 Python 的設計決策的記錄,這些過程的主要機制。PEP 的作者要負責在社群內" "建立共識並記錄反對意見。" -#: ../../glossary.rst:976 +#: ../../glossary.rst:981 msgid "See :pep:`1`." msgstr "請參閱 :pep:`1`\\ 。" -#: ../../glossary.rst:977 +#: ../../glossary.rst:982 msgid "portion" msgstr "portion(部分)" -#: ../../glossary.rst:979 +#: ../../glossary.rst:984 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2179,15 +2185,15 @@ msgstr "" "在單一目錄中的一組檔案(也可能儲存在一個 zip 檔中),這些檔案能對一個命名空間" "套件 (namespace package) 有所貢獻,如同 :pep:`420` 中的定義。" -#: ../../glossary.rst:981 +#: ../../glossary.rst:986 msgid "positional argument" msgstr "positional argument(位置引數)" -#: ../../glossary.rst:984 +#: ../../glossary.rst:989 msgid "provisional API" msgstr "provisional API(暫行 API)" -#: ../../glossary.rst:986 +#: ../../glossary.rst:991 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2203,7 +2209,7 @@ msgstr "" "該介面)。這種變更並不會無端地產生——只有 API 被納入之前未察覺的嚴重基本缺陷被" "揭露時,它們才會發生。" -#: ../../glossary.rst:995 +#: ../../glossary.rst:1000 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2212,7 +2218,7 @@ msgstr "" "即使對於暫行 API,向後不相容的變更也會被視為「最後的解決方案」——對於任何被發" "現的問題,仍然會盡可能找出一個向後相容的解決方案。" -#: ../../glossary.rst:999 +#: ../../glossary.rst:1004 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2221,19 +2227,19 @@ msgstr "" "這個過程使得標準函式庫能隨著時間不斷進化,而避免耗費過長的時間去鎖定有問題的" "設計錯誤。請參閱 :pep:`411` 了解更多細節。" -#: ../../glossary.rst:1002 +#: ../../glossary.rst:1007 msgid "provisional package" msgstr "provisional package(暫行套件)" -#: ../../glossary.rst:1004 +#: ../../glossary.rst:1009 msgid "See :term:`provisional API`." msgstr "請參閱 :term:`provisional API`\\ (暫行 API)。" -#: ../../glossary.rst:1005 +#: ../../glossary.rst:1010 msgid "Python 3000" msgstr "Python 3000" -#: ../../glossary.rst:1007 +#: ../../glossary.rst:1012 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2242,11 +2248,11 @@ msgstr "" "Python 3.x 系列版本的暱稱(很久以前創造的,當時第 3 版的發布是在遙遠的未" "來。)也可以縮寫為「Py3k」。" -#: ../../glossary.rst:1010 +#: ../../glossary.rst:1015 msgid "Pythonic" msgstr "Pythonic(Python 風格的)" -#: ../../glossary.rst:1012 +#: ../../glossary.rst:1017 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2262,18 +2268,18 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1022 +#: ../../glossary.rst:1027 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" "相較之下,以下方法更簡潔、更具有 Python 風格:\n" "\n" "::" -#: ../../glossary.rst:1026 +#: ../../glossary.rst:1031 msgid "qualified name" msgstr "qualified name(限定名稱)" -#: ../../glossary.rst:1028 +#: ../../glossary.rst:1033 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2286,7 +2292,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1045 +#: ../../glossary.rst:1050 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2297,11 +2303,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1052 +#: ../../glossary.rst:1057 msgid "reference count" msgstr "reference count(參照計數)" -#: ../../glossary.rst:1054 +#: ../../glossary.rst:1059 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Reference counting is generally " @@ -2315,11 +2321,11 @@ msgstr "" "`CPython` 實作的一個關鍵元素。\\ :mod:`sys` 模組定義了一個 :func:`~sys." "getrefcount` 函式,程序設計師可以呼叫該函式來回傳一個特定物件的參照計數。" -#: ../../glossary.rst:1060 +#: ../../glossary.rst:1065 msgid "regular package" msgstr "regular package(正規套件)" -#: ../../glossary.rst:1062 +#: ../../glossary.rst:1067 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2327,15 +2333,15 @@ msgstr "" "一個傳統的 :term:`package`\\ (套件),例如一個包含 ``__init__.py`` 檔案的目" "錄。" -#: ../../glossary.rst:1065 +#: ../../glossary.rst:1070 msgid "See also :term:`namespace package`." msgstr "另請參閱 :term:`namespace package`\\ (命名空間套件)。" -#: ../../glossary.rst:1066 +#: ../../glossary.rst:1071 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1068 +#: ../../glossary.rst:1073 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2348,11 +2354,11 @@ msgstr "" "最好保留給那種在一個記憶體關鍵 (memory-critical) 的應用程式中存在大量實例的罕" "見情況。" -#: ../../glossary.rst:1073 +#: ../../glossary.rst:1078 msgid "sequence" msgstr "sequence(序列)" -#: ../../glossary.rst:1075 +#: ../../glossary.rst:1080 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`__getitem__` special method and defines a :meth:" @@ -2370,7 +2376,7 @@ msgstr "" "對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`immutable` 鍵," "而不是整數。" -#: ../../glossary.rst:1084 +#: ../../glossary.rst:1089 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`__getitem__` and :meth:" @@ -2384,11 +2390,11 @@ msgstr "" "`__reversed__`\\ 。實作此擴充介面的型別,可以使用 :func:`~abc.ABCMeta." "register` 被明確地註冊。" -#: ../../glossary.rst:1091 +#: ../../glossary.rst:1096 msgid "set comprehension" msgstr "set comprehension(集合綜合運算)" -#: ../../glossary.rst:1093 +#: ../../glossary.rst:1098 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2399,11 +2405,11 @@ msgstr "" "set 回傳。``results = {c for c in 'abracadabra' if c not in 'abc'}`` 會產生一" "個字串 set:``{'r', 'd'}``。請參閱\\ :ref:`comprehensions`\\ 。" -#: ../../glossary.rst:1097 +#: ../../glossary.rst:1102 msgid "single dispatch" msgstr "single dispatch(單一調度)" -#: ../../glossary.rst:1099 +#: ../../glossary.rst:1104 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2411,11 +2417,11 @@ msgstr "" ":term:`generic function`\\ (泛型函式)調度的一種形式,在此,實作的選擇是基於" "單一引數的型別。" -#: ../../glossary.rst:1101 +#: ../../glossary.rst:1106 msgid "slice" msgstr "slice(切片)" -#: ../../glossary.rst:1103 +#: ../../glossary.rst:1108 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2427,11 +2433,11 @@ msgstr "" "之間使用冒號,例如 ``in variable_name[1:3:5]``。在括號(下標)符號的內部,會" "使用 :class:`slice` 物件。" -#: ../../glossary.rst:1107 +#: ../../glossary.rst:1112 msgid "special method" msgstr "special method(特殊方法)" -#: ../../glossary.rst:1111 +#: ../../glossary.rst:1116 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2442,11 +2448,11 @@ msgstr "" "種 method 的名稱會在開頭和結尾有兩個下底線。Special method 在\\ :ref:" "`specialnames`\\ 中有詳細說明。" -#: ../../glossary.rst:1115 +#: ../../glossary.rst:1120 msgid "statement" msgstr "statement(陳述式)" -#: ../../glossary.rst:1117 +#: ../../glossary.rst:1122 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2456,18 +2462,18 @@ msgstr "" "term:`expression`\\ (運算式),或是含有關鍵字(例如 :keyword:`if`\\ 、\\ :" "keyword:`while` 或 :keyword:`for`\\ )的多種結構之一。" -#: ../../glossary.rst:1120 +#: ../../glossary.rst:1125 msgid "strong reference" msgstr "" -#: ../../glossary.rst:1122 +#: ../../glossary.rst:1127 msgid "" "In Python's C API, a strong reference is a reference to an object which " "increments the object's reference count when it is created and decrements " "the object's reference count when it is deleted." msgstr "" -#: ../../glossary.rst:1126 +#: ../../glossary.rst:1131 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -2475,23 +2481,23 @@ msgid "" "leaking one reference." msgstr "" -#: ../../glossary.rst:1131 +#: ../../glossary.rst:1136 msgid "See also :term:`borrowed reference`." msgstr "另請參閱 :term:`borrowed reference`\\ 。" -#: ../../glossary.rst:1132 +#: ../../glossary.rst:1137 msgid "text encoding" msgstr "text encoding(文字編碼)" -#: ../../glossary.rst:1134 +#: ../../glossary.rst:1139 msgid "A codec which encodes Unicode strings to bytes." msgstr "將 Unicode 字串編碼為位元組的一個編解碼器 (codec)。" -#: ../../glossary.rst:1135 +#: ../../glossary.rst:1140 msgid "text file" msgstr "text file(文字檔案)" -#: ../../glossary.rst:1137 +#: ../../glossary.rst:1142 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2505,7 +2511,7 @@ msgstr "" "有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、\\ :data:`sys.stdin`\\ 、\\ :" "data:`sys.stdout` 以及 :class:`io.StringIO` 的實例。" -#: ../../glossary.rst:1144 +#: ../../glossary.rst:1149 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2513,11 +2519,11 @@ msgstr "" "另請參閱 :term:`binary file`\\ (二進制檔案),它是一個能夠讀取和寫入\\ :" "term:`類位元組串物件 (bytes-like object) ` 的檔案物件。" -#: ../../glossary.rst:1146 +#: ../../glossary.rst:1151 msgid "triple-quoted string" msgstr "triple-quoted string(三引號內字串)" -#: ../../glossary.rst:1148 +#: ../../glossary.rst:1153 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2532,11 +2538,11 @@ msgstr "" "中包含未跳脫 (unescaped) 的單引號和雙引號,而且它們不需使用連續字元 " "(continuation character) 就可以跨越多行,這使得它們在編寫說明字串時特別有用。" -#: ../../glossary.rst:1155 +#: ../../glossary.rst:1160 msgid "type" msgstr "type(型別)" -#: ../../glossary.rst:1157 +#: ../../glossary.rst:1162 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~instance." @@ -2546,15 +2552,15 @@ msgstr "" "件的型別可以用它的 :attr:`~instance.__class__` 屬性來存取,或以 " "``type(obj)`` 來檢索。" -#: ../../glossary.rst:1161 +#: ../../glossary.rst:1166 msgid "type alias" msgstr "type alias(型別別名)" -#: ../../glossary.rst:1163 +#: ../../glossary.rst:1168 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "一個型別的同義詞,透過將型別指定給一個識別符 (identifier) 來建立。" -#: ../../glossary.rst:1165 +#: ../../glossary.rst:1170 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -2563,22 +2569,22 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1172 +#: ../../glossary.rst:1177 msgid "could be made more readable like this::" msgstr "" "可以寫成這樣,更具有可讀性:\n" "\n" "::" -#: ../../glossary.rst:1179 ../../glossary.rst:1193 +#: ../../glossary.rst:1184 ../../glossary.rst:1198 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "請參閱 :mod:`typing` 和 :pep:`484`\\ ,有此功能的描述。" -#: ../../glossary.rst:1180 +#: ../../glossary.rst:1185 msgid "type hint" msgstr "type hint(型別提示)" -#: ../../glossary.rst:1182 +#: ../../glossary.rst:1187 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -2586,7 +2592,7 @@ msgstr "" "一種 :term:`annotation`\\ (註釋),它指定一個變數、一個 class 屬性或一個函式" "的參數或回傳值的預期型別。" -#: ../../glossary.rst:1185 +#: ../../glossary.rst:1190 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to static type analysis tools, and aid IDEs with code completion and " @@ -2595,7 +2601,7 @@ msgstr "" "型別提示是選擇性的,而不是被 Python 強制的,但它們對靜態型別分析工具很有用," "並能協助 IDE 完成程式碼的補全 (completion) 和重構 (refactoring)。" -#: ../../glossary.rst:1189 +#: ../../glossary.rst:1194 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -2603,11 +2609,11 @@ msgstr "" "全域變數、class 屬性和函式(不含區域變數)的型別提示,都可以使用 :func:" "`typing.get_type_hints` 來存取。" -#: ../../glossary.rst:1194 +#: ../../glossary.rst:1199 msgid "universal newlines" msgstr "universal newlines(通用換行字元)" -#: ../../glossary.rst:1196 +#: ../../glossary.rst:1201 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -2620,15 +2626,15 @@ msgstr "" "``'\\r'``。請參閱 :pep:`278` 和 :pep:`3116`\\ ,以及用於 :func:`bytes." "splitlines` 的附加用途。" -#: ../../glossary.rst:1201 +#: ../../glossary.rst:1206 msgid "variable annotation" msgstr "variable annotation(變數註釋)" -#: ../../glossary.rst:1203 +#: ../../glossary.rst:1208 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "一個變數或 class 屬性的 :term:`annotation`\\ (註釋)。" -#: ../../glossary.rst:1205 +#: ../../glossary.rst:1210 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" @@ -2636,7 +2642,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1215 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -2646,11 +2652,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1216 +#: ../../glossary.rst:1221 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "變數註釋的語法在\\ :ref:`annassign`\\ 章節有詳細的解釋。" -#: ../../glossary.rst:1218 +#: ../../glossary.rst:1223 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -2660,11 +2666,11 @@ msgstr "" "`526`\\ ,皆有此功能的描述。關於註釋的最佳實踐方法,另請參閱 :ref:" "`annotations-howto`\\ 。" -#: ../../glossary.rst:1222 +#: ../../glossary.rst:1227 msgid "virtual environment" msgstr "virtual environment(虛擬環境)" -#: ../../glossary.rst:1224 +#: ../../glossary.rst:1229 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2675,15 +2681,15 @@ msgstr "" "程式得以安裝和升級 Python 發佈套件,而不會對同一個系統上運行的其他 Python 應" "用程式的行為產生干擾。" -#: ../../glossary.rst:1229 +#: ../../glossary.rst:1234 msgid "See also :mod:`venv`." msgstr "另請參閱 :mod:`venv`\\ 。" -#: ../../glossary.rst:1230 +#: ../../glossary.rst:1235 msgid "virtual machine" msgstr "virtual machine(虛擬機器)" -#: ../../glossary.rst:1232 +#: ../../glossary.rst:1237 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -2691,11 +2697,11 @@ msgstr "" "一部完全由軟體所定義的電腦 (computer)。Python 的虛擬機器會執行由 :term:" "`bytecode`\\ (位元組碼)編譯器所發出的位元組碼。" -#: ../../glossary.rst:1234 +#: ../../glossary.rst:1239 msgid "Zen of Python" msgstr "Zen of Python(Python 之禪)" -#: ../../glossary.rst:1236 +#: ../../glossary.rst:1241 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " diff --git a/library/asyncio-future.po b/library/asyncio-future.po index 3b11f72f40..ee693cb06d 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-17 00:09+0000\n" +"POT-Creation-Date: 2021-11-22 09:18+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-" @@ -24,11 +24,11 @@ msgstr "" #: ../../library/asyncio-future.rst:10 msgid "" -"**Source code:** :source:`Lib/asyncio/futures.py`, " -"" +"**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" +"base_futures.py`" msgstr "" -"**原始碼:**\\ :source:`Lib/asyncio/futures.py`\\ 、\\ " -":source:`Lib/asyncio/base_futures.py`" +"**原始碼:**\\ :source:`Lib/asyncio/futures.py`\\ 、\\ :source:`Lib/asyncio/" +"base_futures.py`" #: ../../library/asyncio-future.rst:15 msgid "" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index 6143e2d16a..38142ab342 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -48,6 +48,9 @@ msgid "" "**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" msgstr "" +"**原始碼:**\\ :source:`Lib/asyncio/proactor_events.py`\\ 、\\ " +":source:`Lib/asyncio/windows_events.py`\\ 、\\ :source:`Lib/asyncio/" +"windows_utils.py`" #: ../../library/asyncio-platforms.rst:34 msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index afa0ca68f0..7319ff5b10 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -28,6 +28,8 @@ msgid "" "**Source code:** :source:`Lib/asyncio/subprocess.py`, :source:`Lib/asyncio/" "base_subprocess.py`" msgstr "" +"**原始碼:**\\ :source:`Lib/asyncio/subprocess.py`\\ 、\\ :source:`Lib/" +"asyncio/base_subprocess.py`" #: ../../library/asyncio-subprocess.rst:14 msgid "" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index f86274485e..265d017c6e 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -27,6 +27,8 @@ msgid "" "**Source code:** :source:`Lib/concurrent/futures/thread.py` and :source:`Lib/" "concurrent/futures/process.py`" msgstr "" +"**原始碼:**\\ :source:`Lib/concurrent/futures/thread.py` 與 :source:`Lib/" +"concurrent/futures/process.py`" #: ../../library/concurrent.futures.rst:14 msgid "" diff --git a/library/functions.po b/library/functions.po index cff9e65f83..54b1488acd 100644 --- a/library/functions.po +++ b/library/functions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-03 00:08+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+0000\n" "PO-Revision-Date: 2018-11-10 18:27+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -411,16 +411,10 @@ msgid "" msgstr "" #: ../../library/functions.rst:69 -msgid "" -"``aiter(x)`` itself has an ``__aiter__()`` method that returns ``x``, so " -"``aiter(aiter(x))`` is the same as ``aiter(x)``." -msgstr "" - -#: ../../library/functions.rst:72 msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." msgstr "" -#: ../../library/functions.rst:78 +#: ../../library/functions.rst:75 #, fuzzy msgid "" "Return ``True`` if all elements of the *iterable* are true (or if the " @@ -429,18 +423,18 @@ msgstr "" "如果 *iterable* 的所有元素為 True(或 iterable 為空),返回 ``True`` 。等價" "於::" -#: ../../library/functions.rst:90 +#: ../../library/functions.rst:87 msgid "" "When awaited, return the next item from the given :term:`asynchronous " "iterator`, or *default* if given and the iterator is exhausted." msgstr "" -#: ../../library/functions.rst:93 +#: ../../library/functions.rst:90 msgid "" "This is the async variant of the :func:`next` builtin, and behaves similarly." msgstr "" -#: ../../library/functions.rst:96 +#: ../../library/functions.rst:93 msgid "" "This calls the :meth:`~object.__anext__` method of *async_iterator*, " "returning an :term:`awaitable`. Awaiting this returns the next value of the " @@ -448,7 +442,7 @@ msgid "" "exhausted, otherwise :exc:`StopAsyncIteration` is raised." msgstr "" -#: ../../library/functions.rst:105 +#: ../../library/functions.rst:102 #, fuzzy msgid "" "Return ``True`` if any element of the *iterable* is true. If the iterable " @@ -457,7 +451,7 @@ msgstr "" "如果 *iterable* 的任一元素為 True,返回 ``True`` 。如果 iterable 為空,返回 " "``False``。等價於::" -#: ../../library/functions.rst:117 +#: ../../library/functions.rst:114 #, fuzzy msgid "" "As :func:`repr`, return a string containing a printable representation of an " @@ -469,7 +463,7 @@ msgstr "" "中非 ASCII 編碼的字元,會使用 ``\\x``、``\\u`` 和 ``\\U`` 來轉義。生成的字串" "和 Python 2 的 :func:`repr` 返回的結果相似。" -#: ../../library/functions.rst:125 +#: ../../library/functions.rst:122 #, fuzzy msgid "" "Convert an integer number to a binary string prefixed with \"0b\". The " @@ -481,20 +475,20 @@ msgstr "" "式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`__index__` 方法返回一個整數。一些例子:" -#: ../../library/functions.rst:135 +#: ../../library/functions.rst:132 #, fuzzy msgid "" "If the prefix \"0b\" is desired or not, you can use either of the following " "ways." msgstr "如果不一定需要字首“0b”,還可以使用如下的方法。" -#: ../../library/functions.rst:142 ../../library/functions.rst:807 -#: ../../library/functions.rst:1102 +#: ../../library/functions.rst:139 ../../library/functions.rst:804 +#: ../../library/functions.rst:1099 #, fuzzy msgid "See also :func:`format` for more information." msgstr "另見 :func:`format` 獲取更多資訊。" -#: ../../library/functions.rst:147 +#: ../../library/functions.rst:144 #, fuzzy msgid "" "Return a Boolean value, i.e. one of ``True`` or ``False``. *x* is converted " @@ -510,12 +504,12 @@ msgstr "" "`typesnumeric`)。其他類不能繼承自它。它只有 ``False`` 和 ``True`` 兩個例項" "(參見 :ref:`bltin-boolean-values`)。" -#: ../../library/functions.rst:156 ../../library/functions.rst:675 -#: ../../library/functions.rst:891 +#: ../../library/functions.rst:153 ../../library/functions.rst:672 +#: ../../library/functions.rst:888 msgid "*x* is now a positional-only parameter." msgstr "" -#: ../../library/functions.rst:161 +#: ../../library/functions.rst:158 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -527,13 +521,13 @@ msgid "" "you to drop into the debugger of choice." msgstr "" -#: ../../library/functions.rst:171 +#: ../../library/functions.rst:168 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." msgstr "" -#: ../../library/functions.rst:179 +#: ../../library/functions.rst:176 #, fuzzy msgid "" "Return a new array of bytes. The :class:`bytearray` class is a mutable " @@ -545,14 +539,14 @@ msgstr "" "<= x < 256 的整數。它有可變序列大部分常見的方法,見 :ref:`typesseq-mutable` " "的描述;同時有 :class:`bytes` 型別的大部分方法,參見 :ref:`bytes-methods`。" -#: ../../library/functions.rst:184 +#: ../../library/functions.rst:181 #, fuzzy msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" msgstr "可選形參 *source* 可以用不同的方式來初始化陣列:" -#: ../../library/functions.rst:187 +#: ../../library/functions.rst:184 #, fuzzy msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " @@ -562,7 +556,7 @@ msgstr "" "如果是一個 *string*,您必須提供 *encoding* 引數(*errors* 引數仍是可選的);:" "func:`bytearray` 會使用 :meth:`str.encode` 方法來將 string 轉變成 bytes。" -#: ../../library/functions.rst:191 +#: ../../library/functions.rst:188 #, fuzzy msgid "" "If it is an *integer*, the array will have that size and will be initialized " @@ -570,7 +564,7 @@ msgid "" msgstr "" "如果是一個 *integer*,會初始化大小為該數字的陣列,並使用 null 位元組填充。" -#: ../../library/functions.rst:194 +#: ../../library/functions.rst:191 #, fuzzy msgid "" "If it is an object conforming to the :ref:`buffer interface " @@ -580,7 +574,7 @@ msgstr "" "如果是一個符合 *buffer* 介面的物件,該物件的只讀 buffer 會用來初始化位元組陣" "列。" -#: ../../library/functions.rst:197 +#: ../../library/functions.rst:194 #, fuzzy msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " @@ -589,17 +583,17 @@ msgstr "" "如果是一個 *iterable* 可迭代物件,它的元素的範圍必須是 ``0 <= x < 256`` 的整" "數,它會被用作陣列的初始內容。" -#: ../../library/functions.rst:200 +#: ../../library/functions.rst:197 #, fuzzy msgid "Without an argument, an array of size 0 is created." msgstr "如果沒有實參,則建立大小為 0 的陣列。" -#: ../../library/functions.rst:202 +#: ../../library/functions.rst:199 #, fuzzy msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "另見 :ref:`binaryseq` 和 :ref:`typebytearray`。" -#: ../../library/functions.rst:209 +#: ../../library/functions.rst:206 #, fuzzy msgid "" "Return a new \"bytes\" object which is an immutable sequence of integers in " @@ -611,23 +605,23 @@ msgstr "" "數。:class:`bytes` 是 :class:`bytearray` 的不可變版本 - 它有其中不改變序列的" "方法和相同的索引、切片操作。" -#: ../../library/functions.rst:214 +#: ../../library/functions.rst:211 #, fuzzy msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "因此,建構函式的實參和 :func:`bytearray` 相同。" -#: ../../library/functions.rst:216 +#: ../../library/functions.rst:213 #, fuzzy msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "位元組物件還可以用字面值建立,參見 :ref:`strings`。" -#: ../../library/functions.rst:218 +#: ../../library/functions.rst:215 #, fuzzy msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "另見 :ref:`binaryseq`,:ref:`typebytes` 和 :ref:`bytes-methods`。" -#: ../../library/functions.rst:223 +#: ../../library/functions.rst:220 #, fuzzy msgid "" "Return :const:`True` if the *object* argument appears callable, :const:" @@ -641,14 +635,14 @@ msgstr "" "是可呼叫的(呼叫類會返回一個新的例項)。如果例項的類有 :meth:`__call__` 方" "法,則它是可呼叫。" -#: ../../library/functions.rst:229 +#: ../../library/functions.rst:226 #, fuzzy msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." msgstr "這個函式一開始在 Python 3.0 被移除了,但在 Python 3.2 被重新加入。" -#: ../../library/functions.rst:236 +#: ../../library/functions.rst:233 #, fuzzy msgid "" "Return the string representing a character whose Unicode code point is the " @@ -658,7 +652,7 @@ msgstr "" "返回 Unicode 碼位為整數 *i* 的字元的字串格式。例如,``chr(97)`` 返回字串 " "``'a'``,``chr(8364)`` 返回字串 ``'€'``。這是 :func:`ord` 的逆函式。" -#: ../../library/functions.rst:240 +#: ../../library/functions.rst:237 #, fuzzy msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " @@ -667,12 +661,12 @@ msgstr "" "實參的合法範圍是 0 到 1,114,111(16 進製表示是 0x10FFFF)。如果 *i* 超過這個" "範圍,會觸發 :exc:`ValueError` 異常。" -#: ../../library/functions.rst:246 +#: ../../library/functions.rst:243 #, fuzzy msgid "Transform a method into a class method." msgstr "把一個方法封裝成類方法。" -#: ../../library/functions.rst:248 +#: ../../library/functions.rst:245 #, fuzzy msgid "" "A class method receives the class as an implicit first argument, just like " @@ -682,7 +676,7 @@ msgstr "" "一個類方法把類自己作為第一個實參,就像一個例項方法把例項自己作為第一個實參。" "請用以下習慣來宣告類方法::" -#: ../../library/functions.rst:256 +#: ../../library/functions.rst:253 #, fuzzy msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" @@ -691,7 +685,7 @@ msgstr "" "``@classmethod`` 形式是一個函式 :term:`decorator` - 參見 :ref:`function` 中關" "於函式定義的詳細介紹。" -#: ../../library/functions.rst:259 +#: ../../library/functions.rst:256 #, fuzzy msgid "" "A class method can be called either on the class (such as ``C.f()``) or on " @@ -702,7 +696,7 @@ msgstr "" "它可以同時在類(如 ``C.f()``)和例項(如 ``C().f()``)上呼叫。例項除了它的類" "資訊,其他都會被忽略。如果一個類方法在子類上呼叫,子類會作為第一個實參傳入。" -#: ../../library/functions.rst:264 +#: ../../library/functions.rst:261 #, fuzzy msgid "" "Class methods are different than C++ or Java static methods. If you want " @@ -712,20 +706,20 @@ msgstr "" "類方法和 C++ 和 Java 的靜態方法是有區別的。如果你想要靜態方法,請看本節的 :" "func:`staticmethod`。" -#: ../../library/functions.rst:268 +#: ../../library/functions.rst:265 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." msgstr "" -#: ../../library/functions.rst:272 +#: ../../library/functions.rst:269 msgid "" "Class methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and " "have a new ``__wrapped__`` attribute." msgstr "" -#: ../../library/functions.rst:279 +#: ../../library/functions.rst:276 #, fuzzy msgid "" "Compile the *source* into a code or AST object. Code objects can be " @@ -737,7 +731,7 @@ msgstr "" "`eval` 執行。*source* 可以是常規的字串、位元組字串,或者 AST 物件。參見 :mod:" "`ast` 模組的文件瞭解如何使用 AST 物件。" -#: ../../library/functions.rst:284 +#: ../../library/functions.rst:281 #, fuzzy msgid "" "The *filename* argument should give the file from which the code was read; " @@ -747,7 +741,7 @@ msgstr "" "*filename* 實參需要是程式碼讀取的檔名;如果程式碼不需要從檔案中讀取,可以傳入" "一些可辨識的值(經常會使用 ``''``)。" -#: ../../library/functions.rst:288 +#: ../../library/functions.rst:285 #, fuzzy msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " @@ -761,7 +755,7 @@ msgstr "" "是 ``'single'``。(在最後一種情況下,如果表示式執行結果不是 ``None`` 將會被打" "印出來。)" -#: ../../library/functions.rst:294 +#: ../../library/functions.rst:291 msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -775,7 +769,7 @@ msgid "" "in the surrounding code are ignored." msgstr "" -#: ../../library/functions.rst:305 +#: ../../library/functions.rst:302 #, fuzzy msgid "" "Compiler options and future statements are specified by bits which can be " @@ -789,7 +783,7 @@ msgstr "" "以通過 :mod:`__future__` 模組中的 :class:`~__future__._Feature` 類的例項的 :" "attr:`~__future__._Feature.compiler_flag` 屬性來獲得。" -#: ../../library/functions.rst:313 +#: ../../library/functions.rst:310 #, fuzzy msgid "" "The argument *optimize* specifies the optimization level of the compiler; " @@ -802,7 +796,7 @@ msgstr "" "O` 選項相同的優化級別。顯式級別為 ``0`` (沒有優化;``__debug__`` 為真)、" "``1`` (斷言被刪除, ``__debug__`` 為假)或 ``2`` (文件字串也被刪除)。" -#: ../../library/functions.rst:319 +#: ../../library/functions.rst:316 #, fuzzy msgid "" "This function raises :exc:`SyntaxError` if the compiled source is invalid, " @@ -811,27 +805,27 @@ msgstr "" "如果編譯的原始碼不合法,此函式會觸發 :exc:`SyntaxError` 異常;如果原始碼包含 " "null 位元組,則會觸發 :exc:`ValueError` 異常。" -#: ../../library/functions.rst:322 +#: ../../library/functions.rst:319 #, fuzzy msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." msgstr "如果您想分析 Python 程式碼的 AST 表示,請參閱 :func:`ast.parse`。" -#: ../../library/functions.rst:325 +#: ../../library/functions.rst:322 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source``, ``filename``." msgstr "" -#: ../../library/functions.rst:327 +#: ../../library/functions.rst:324 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " "compilation." msgstr "" -#: ../../library/functions.rst:333 +#: ../../library/functions.rst:330 #, fuzzy msgid "" "When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " @@ -842,7 +836,7 @@ msgstr "" "在 ``'single'`` 或 ``'eval'`` 模式編譯多行程式碼字串時,輸入必須以至少一個換" "行符結尾。 這使 :mod:`code` 模組更容易檢測語句的完整性。" -#: ../../library/functions.rst:340 +#: ../../library/functions.rst:337 #, fuzzy msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" @@ -852,7 +846,7 @@ msgstr "" "如果編譯足夠大或者足夠複雜的字串成 AST 物件時,Python 直譯器會因為 Python " "AST 編譯器的棧深度限制而奔潰。" -#: ../../library/functions.rst:344 +#: ../../library/functions.rst:341 #, fuzzy msgid "" "Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " @@ -861,20 +855,20 @@ msgstr "" "允許使用 Windows 和 Mac 的換行符。在 ``'exec'`` 模式不再需要以換行符結尾。增" "加了 *optimize* 形參。" -#: ../../library/functions.rst:348 +#: ../../library/functions.rst:345 #, fuzzy msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." msgstr "之前 *source* 中包含 null 位元組的話會觸發 :exc:`TypeError` 異常。" -#: ../../library/functions.rst:352 +#: ../../library/functions.rst:349 msgid "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " "support for top-level ``await``, ``async for``, and ``async with``." msgstr "" -#: ../../library/functions.rst:359 +#: ../../library/functions.rst:356 #, fuzzy msgid "" "Return a complex number with the value *real* + *imag*\\*1j or convert a " @@ -892,7 +886,7 @@ msgstr "" "預設值為零,建構函式會像 :class:`int` 和 :class:`float` 一樣進行數值轉換。如" "果兩個實參都省略,則返回 ``0j``。" -#: ../../library/functions.rst:368 +#: ../../library/functions.rst:365 msgid "" "For a general Python object ``x``, ``complex(x)`` delegates to ``x." "__complex__()``. If ``__complex__()`` is not defined then it falls back to :" @@ -900,7 +894,7 @@ msgid "" "meth:`__index__`." msgstr "" -#: ../../library/functions.rst:375 +#: ../../library/functions.rst:372 #, fuzzy msgid "" "When converting from a string, the string must not contain whitespace around " @@ -911,24 +905,24 @@ msgstr "" "``complex('1+2j')`` 是合法的,但 ``complex('1 + 2j')`` 會觸發 :exc:" "`ValueError` 異常。" -#: ../../library/functions.rst:380 +#: ../../library/functions.rst:377 #, fuzzy msgid "The complex type is described in :ref:`typesnumeric`." msgstr ":ref:`typesnumeric` 描述了複數型別。" -#: ../../library/functions.rst:382 ../../library/functions.rst:672 -#: ../../library/functions.rst:888 +#: ../../library/functions.rst:379 ../../library/functions.rst:669 +#: ../../library/functions.rst:885 #, fuzzy msgid "Grouping digits with underscores as in code literals is allowed." msgstr "您可以使用下劃線將程式碼文字中的數字進行分組。" -#: ../../library/functions.rst:385 +#: ../../library/functions.rst:382 msgid "" "Falls back to :meth:`__index__` if :meth:`__complex__` and :meth:`__float__` " "are not defined." msgstr "" -#: ../../library/functions.rst:392 +#: ../../library/functions.rst:389 #, fuzzy msgid "" "This is a relative of :func:`setattr`. The arguments are an object and a " @@ -940,7 +934,7 @@ msgstr "" "屬性。如果物件允許,該函式將刪除指定的屬性。例如 ``delattr(x, 'foobar')`` 等" "價於 ``del x.foobar`` 。" -#: ../../library/functions.rst:404 +#: ../../library/functions.rst:401 #, fuzzy msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " @@ -949,7 +943,7 @@ msgstr "" "建立一個新的字典。:class:`dict` 物件是一個字典類。參見 :class:`dict` 和 :ref:" "`typesmapping` 瞭解這個類。" -#: ../../library/functions.rst:407 +#: ../../library/functions.rst:404 #, fuzzy msgid "" "For other containers see the built-in :class:`list`, :class:`set`, and :" @@ -958,7 +952,7 @@ msgstr "" "其他容器型別,請參見內建的 :class:`list`、:class:`set` 和 :class:`tuple` 類," "以及 :mod:`collections` 模組。" -#: ../../library/functions.rst:413 +#: ../../library/functions.rst:410 #, fuzzy msgid "" "Without arguments, return the list of names in the current local scope. " @@ -968,7 +962,7 @@ msgstr "" "如果沒有實參,則返回當前本地作用域中的名稱列表。如果有實參,它會嘗試返回該物" "件的有效屬性列表。" -#: ../../library/functions.rst:416 +#: ../../library/functions.rst:413 #, fuzzy msgid "" "If the object has a method named :meth:`__dir__`, this method will be called " @@ -980,7 +974,7 @@ msgstr "" "個屬性列表。這允許實現自定義 :func:`__getattr__` 或 :func:`__getattribute__` " "函式的物件能夠自定義 :func:`dir` 來報告它們的屬性。" -#: ../../library/functions.rst:421 +#: ../../library/functions.rst:418 #, fuzzy msgid "" "If the object does not provide :meth:`__dir__`, the function tries its best " @@ -993,7 +987,7 @@ msgstr "" "__dict__` 屬性和型別物件收集資訊。結果列表並不總是完整的,如果物件有自定義 :" "func:`__getattr__`,那結果可能不準確。" -#: ../../library/functions.rst:426 +#: ../../library/functions.rst:423 #, fuzzy msgid "" "The default :func:`dir` mechanism behaves differently with different types " @@ -1003,14 +997,14 @@ msgstr "" "預設的 :func:`dir` 機制對不同型別的物件行為不同,它會試圖返回最相關而不是最全" "的資訊:" -#: ../../library/functions.rst:430 +#: ../../library/functions.rst:427 #, fuzzy msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." msgstr "如果物件是模組物件,則列表包含模組的屬性名稱。" -#: ../../library/functions.rst:433 +#: ../../library/functions.rst:430 #, fuzzy msgid "" "If the object is a type or class object, the list contains the names of its " @@ -1019,7 +1013,7 @@ msgstr "" "如果物件是型別或類物件,則列表包含它們的屬性名稱,並且遞迴查詢所有基類的屬" "性。" -#: ../../library/functions.rst:436 +#: ../../library/functions.rst:433 #, fuzzy msgid "" "Otherwise, the list contains the object's attributes' names, the names of " @@ -1029,12 +1023,12 @@ msgstr "" "否則,列表包含物件的屬性名稱,它的類屬性名稱,並且遞迴查詢它的類的所有基類的" "屬性。" -#: ../../library/functions.rst:440 +#: ../../library/functions.rst:437 #, fuzzy msgid "The resulting list is sorted alphabetically. For example:" msgstr "返回的列表按字母表排序。例如:" -#: ../../library/functions.rst:459 +#: ../../library/functions.rst:456 #, fuzzy msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " @@ -1047,7 +1041,7 @@ msgstr "" "字集合,而不是試圖保證結果的嚴格性或一致性,它具體的行為也可能在不同版本之間" "改變。例如,當實參是一個類時,metaclass 的屬性不包含在結果列表中。" -#: ../../library/functions.rst:469 +#: ../../library/functions.rst:466 #, fuzzy msgid "" "Take two (non-complex) numbers as arguments and return a pair of numbers " @@ -1065,7 +1059,7 @@ msgstr "" "能會比 1 小。在任何情況下, ``q * b + a % b`` 和 *a* 基本相等;如果 ``a % " "b`` 非零,它的符號和 *b* 一樣,並且 ``0 <= abs(a % b) < abs(b)`` 。" -#: ../../library/functions.rst:481 +#: ../../library/functions.rst:478 #, fuzzy msgid "" "Return an enumerate object. *iterable* must be a sequence, an :term:" @@ -1079,12 +1073,12 @@ msgstr "" "返回一個元組,裡面包含一個計數值(從 *start* 開始,預設為 0)和通過迭代 " "*iterable* 獲得的值。" -#: ../../library/functions.rst:493 +#: ../../library/functions.rst:490 #, fuzzy msgid "Equivalent to::" msgstr "等價於::" -#: ../../library/functions.rst:504 +#: ../../library/functions.rst:501 #, fuzzy msgid "" "The arguments are a string and optional globals and locals. If provided, " @@ -1094,7 +1088,7 @@ msgstr "" "實參是一個字串,以及可選的 globals 和 locals。*globals* 實參必須是一個字典。" "*locals* 可以是任何對映物件。" -#: ../../library/functions.rst:508 +#: ../../library/functions.rst:505 #, fuzzy msgid "" "The *expression* argument is parsed and evaluated as a Python expression " @@ -1119,13 +1113,13 @@ msgstr "" "字典。如果兩個字典變數都被省略了,則在 :func:`eval` 被呼叫的環境中執行表示" "式。函式的返回值是表示式執行的結果。語法錯誤會產生異常。如:" -#: ../../library/functions.rst:523 +#: ../../library/functions.rst:520 msgid "" "The return value is the result of the evaluated expression. Syntax errors " "are reported as exceptions. Example:" msgstr "" -#: ../../library/functions.rst:530 +#: ../../library/functions.rst:527 #, fuzzy msgid "" "This function can also be used to execute arbitrary code objects (such as " @@ -1137,7 +1131,7 @@ msgstr "" "下,引數是程式碼物件,而不是字串。如果編譯該物件時的 *mode* 實參是 " "``'exec'`` 那麼 :func:`eval` 返回值為 ``None`` 。" -#: ../../library/functions.rst:535 +#: ../../library/functions.rst:532 #, fuzzy msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " @@ -1149,13 +1143,13 @@ msgstr "" "函式各自返回當前的全域性和本地字典,因此您可以將它們傳遞給 :func:`eval` 或 :" "func:`exec` 來使用。" -#: ../../library/functions.rst:540 +#: ../../library/functions.rst:537 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." msgstr "" -#: ../../library/functions.rst:543 +#: ../../library/functions.rst:540 #, fuzzy msgid "" "See :func:`ast.literal_eval` for a function that can safely evaluate strings " @@ -1164,19 +1158,19 @@ msgstr "" "另外可以參閱 :func:`ast.literal_eval`,該函式可以安全執行僅包含文字的表示式字" "串。" -#: ../../library/functions.rst:546 ../../library/functions.rst:582 +#: ../../library/functions.rst:543 ../../library/functions.rst:579 msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." msgstr "" -#: ../../library/functions.rst:548 ../../library/functions.rst:584 +#: ../../library/functions.rst:545 ../../library/functions.rst:581 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." msgstr "" -#: ../../library/functions.rst:555 +#: ../../library/functions.rst:552 #, fuzzy msgid "" "This function supports dynamic execution of Python code. *object* must be " @@ -1196,7 +1190,7 @@ msgstr "" "`exec` 函式的程式碼的上下文中,:keyword:`return` 和 :keyword:`yield` 語句也不" "能在函式定義之外使用。該函式返回值是 ``None`` 。" -#: ../../library/functions.rst:566 +#: ../../library/functions.rst:563 #, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " @@ -1216,7 +1210,7 @@ msgstr "" "是相同的字典。如果 exec 有兩個不同的 *globals* 和 *locals* 物件,程式碼就像嵌" "入在類定義中一樣執行。" -#: ../../library/functions.rst:576 +#: ../../library/functions.rst:573 #, fuzzy msgid "" "If the *globals* dictionary does not contain a value for the key " @@ -1230,7 +1224,7 @@ msgstr "" "以通過將自己的 ``__builtins__`` 字典插入到 *globals* 中來控制可以使用哪些內建" "程式碼。" -#: ../../library/functions.rst:589 +#: ../../library/functions.rst:586 #, fuzzy msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " @@ -1240,7 +1234,7 @@ msgstr "" "內建 :func:`globals` 和 :func:`locals` 函式各自返回當前的全域性和本地字典,因" "此可以將它們傳遞給 :func:`exec` 的第二個和第三個實參。" -#: ../../library/functions.rst:595 +#: ../../library/functions.rst:592 #, fuzzy msgid "" "The default *locals* act as described for function :func:`locals` below: " @@ -1252,7 +1246,7 @@ msgstr "" "預設的 *locals* 字典。如果您想在 :func:`exec` 函式返回時知道程式碼對 " "*locals* 的變動,請明確地傳遞 *locals* 字典。" -#: ../../library/functions.rst:603 +#: ../../library/functions.rst:600 #, fuzzy msgid "" "Construct an iterator from those elements of *iterable* for which *function* " @@ -1266,7 +1260,7 @@ msgstr "" "是 ``None`` ,則會假設它是一個身份函式,即 *iterable* 中所有返回假的元素會被" "移除。" -#: ../../library/functions.rst:609 +#: ../../library/functions.rst:606 #, fuzzy msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " @@ -1278,7 +1272,7 @@ msgstr "" "不是 ``None`` 的時候為 ``(item for item in iterable if function(item))``;" "function 是 ``None`` 的時候為 ``(item for item in iterable if item)`` 。" -#: ../../library/functions.rst:614 +#: ../../library/functions.rst:611 #, fuzzy msgid "" "See :func:`itertools.filterfalse` for the complementary function that " @@ -1287,12 +1281,12 @@ msgstr "" "請參閱 :func:`itertools.filterfalse` 瞭解,只有 *function* 返回 false 時才選" "取 *iterable* 中元素的補充函式。" -#: ../../library/functions.rst:624 +#: ../../library/functions.rst:621 #, fuzzy msgid "Return a floating point number constructed from a number or string *x*." msgstr "返回從數字或字串 *x* 生成的浮點數。" -#: ../../library/functions.rst:626 +#: ../../library/functions.rst:623 #, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " @@ -1308,7 +1302,7 @@ msgstr "" "參也可以是 NaN(非數字)、正負無窮大的字串。確切地說,除去首尾的空格後,輸入" "必須遵循以下語法:" -#: ../../library/functions.rst:641 +#: ../../library/functions.rst:638 #, fuzzy msgid "" "Here ``floatnumber`` is the form of a Python floating-point literal, " @@ -1319,7 +1313,7 @@ msgstr "" "這裡, ``floatnumber`` 是 Python 浮點數的字串形式,詳見 :ref:`floating`。字母" "大小寫都可以,例如,“inf”、“Inf”、“INFINITY”、“iNfINity” 都可以表示正無窮大。" -#: ../../library/functions.rst:646 +#: ../../library/functions.rst:643 #, fuzzy msgid "" "Otherwise, if the argument is an integer or a floating point number, a " @@ -1331,7 +1325,7 @@ msgstr "" "內)的浮點數。如果實參在 Python 浮點精度範圍外,則會觸發 :exc:" "`OverflowError`。" -#: ../../library/functions.rst:651 +#: ../../library/functions.rst:648 #, fuzzy msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." @@ -1340,26 +1334,26 @@ msgid "" msgstr "" "對於一般的 Python 物件 ``x`` , ``float(x)`` 指派給 ``x.__float__()`` 。" -#: ../../library/functions.rst:655 +#: ../../library/functions.rst:652 #, fuzzy msgid "If no argument is given, ``0.0`` is returned." msgstr "如果沒有實參,則返回 ``0.0`` 。" -#: ../../library/functions.rst:657 +#: ../../library/functions.rst:654 #, fuzzy msgid "Examples::" msgstr "例如::" -#: ../../library/functions.rst:670 +#: ../../library/functions.rst:667 #, fuzzy msgid "The float type is described in :ref:`typesnumeric`." msgstr ":ref:`typesnumeric` 描述了浮點型別。" -#: ../../library/functions.rst:678 +#: ../../library/functions.rst:675 msgid "Falls back to :meth:`__index__` if :meth:`__float__` is not defined." msgstr "" -#: ../../library/functions.rst:688 +#: ../../library/functions.rst:685 #, fuzzy msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " @@ -1371,7 +1365,7 @@ msgstr "" "於 *value* 實參的型別,但是大多數內建型別使用標準格式化語法::ref:" "`formatspec`。" -#: ../../library/functions.rst:693 +#: ../../library/functions.rst:690 #, fuzzy msgid "" "The default *format_spec* is an empty string which usually gives the same " @@ -1380,7 +1374,7 @@ msgstr "" "預設的 *format_spec* 是一個空字串,它通常和呼叫 :func:`str(value)` 的結" "果相同。" -#: ../../library/functions.rst:696 +#: ../../library/functions.rst:693 #, fuzzy msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." @@ -1395,7 +1389,7 @@ msgstr "" "不會呼叫。如果搜尋到 :mod:`object` 有這個方法但 *format_spec* 不為空," "*format_spec* 或返回值不是字串,會觸發 :exc:`TypeError` 異常。" -#: ../../library/functions.rst:703 +#: ../../library/functions.rst:700 #, fuzzy msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " @@ -1404,7 +1398,7 @@ msgstr "" "當 *format_spec* 不是空字串時, ``object().__format__(format_spec)`` 會觸" "發 :exc:`TypeError`。" -#: ../../library/functions.rst:712 +#: ../../library/functions.rst:709 #, fuzzy msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " @@ -1415,7 +1409,7 @@ msgstr "" "``frozenset`` 是一個內建的類。有關此類的文件,請參閱 :class:`frozenset` 和 :" "ref:`types-set`。" -#: ../../library/functions.rst:716 +#: ../../library/functions.rst:713 #, fuzzy msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" @@ -1424,7 +1418,7 @@ msgstr "" "請參閱內建的 :class:`set`、:class:`list`、:class:`tuple` 和 :class:`dict` " "類,以及 :mod:`collections` 模組來了解其它的容器。" -#: ../../library/functions.rst:723 +#: ../../library/functions.rst:720 #, fuzzy msgid "" "Return the value of the named attribute of *object*. *name* must be a " @@ -1438,7 +1432,7 @@ msgstr "" "屬性的值。例如, ``getattr(x, 'foobar')`` 等同於 ``x.foobar``。如果指定的屬性" "不存在,且提供了 *default* 值,則返回它,否則觸發 :exc:`AttributeError`。" -#: ../../library/functions.rst:731 +#: ../../library/functions.rst:728 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1446,7 +1440,7 @@ msgid "" "`getattr`." msgstr "" -#: ../../library/functions.rst:739 +#: ../../library/functions.rst:736 #, fuzzy msgid "" "Return a dictionary representing the current global symbol table. This is " @@ -1457,7 +1451,7 @@ msgstr "" "返回表示當前全域性符號表的字典。這總是當前模組的字典(在函式或方法中,不是呼" "叫它的模組,而是定義它的模組)。" -#: ../../library/functions.rst:746 +#: ../../library/functions.rst:743 #, fuzzy msgid "" "The arguments are an object and a string. The result is ``True`` if the " @@ -1469,7 +1463,7 @@ msgstr "" "否則返回 ``False``。(此功能是通過呼叫 ``getattr(object, name)`` 看是否有 :" "exc:`AttributeError` 異常來實現的。)" -#: ../../library/functions.rst:754 +#: ../../library/functions.rst:751 #, fuzzy msgid "" "Return the hash value of the object (if it has one). Hash values are " @@ -1481,7 +1475,7 @@ msgstr "" "速比較字典的鍵。相同大小的數字變數有相同的雜湊值(即使它們型別不同,如 1 和 " "1.0)。" -#: ../../library/functions.rst:761 +#: ../../library/functions.rst:758 #, fuzzy msgid "" "For objects with custom :meth:`__hash__` methods, note that :func:`hash` " @@ -1491,7 +1485,7 @@ msgstr "" "如果物件實現了自己的 :meth:`__hash__` 方法,請注意,:func:`hash` 根據機器的字" "長來截斷返回值。另請參閱 :meth:`__hash__`。" -#: ../../library/functions.rst:767 +#: ../../library/functions.rst:764 #, fuzzy msgid "" "Invoke the built-in help system. (This function is intended for interactive " @@ -1506,7 +1500,7 @@ msgstr "" "文件主題中搜索該字串,並在控制檯上列印幫助資訊。如果實參是其他任意物件,則會" "生成該物件的幫助頁。" -#: ../../library/functions.rst:774 +#: ../../library/functions.rst:771 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1514,13 +1508,13 @@ msgid "" "parameters `." msgstr "" -#: ../../library/functions.rst:779 +#: ../../library/functions.rst:776 #, fuzzy msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "該函式通過 :mod:`site` 模組加入到內建名稱空間。" -#: ../../library/functions.rst:781 +#: ../../library/functions.rst:778 #, fuzzy msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " @@ -1528,7 +1522,7 @@ msgid "" msgstr "" ":mod:`pydoc` 和 :mod:`inspect` 的變更使得可呼叫物件的簽名信息更加全面和一致。" -#: ../../library/functions.rst:788 +#: ../../library/functions.rst:785 #, fuzzy msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " @@ -1538,7 +1532,7 @@ msgstr "" "將整數轉換為以“0x”為字首的小寫十六進位制字串。如果 *x* 不是 Python :class:" "`int` 物件,則必須定義返回整數的 :meth:`__index__` 方法。一些例子:" -#: ../../library/functions.rst:797 +#: ../../library/functions.rst:794 #, fuzzy msgid "" "If you want to convert an integer number to an uppercase or lower " @@ -1548,21 +1542,21 @@ msgstr "" "如果要將整數轉換為大寫或小寫的十六進位制字串,並可選擇有無“0x”字首,則可以使" "用如下方法:" -#: ../../library/functions.rst:809 +#: ../../library/functions.rst:806 #, fuzzy msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "另請參閱 :func:`int` 將十六進位制字串轉換為以 16 為基數的整數。" -#: ../../library/functions.rst:814 +#: ../../library/functions.rst:811 #, fuzzy msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "如果要獲取浮點數的十六進位制字串形式,請使用 :meth:`float.hex` 方法。" -#: ../../library/functions.rst:820 +#: ../../library/functions.rst:817 #, fuzzy msgid "" "Return the \"identity\" of an object. This is an integer which is " @@ -1573,13 +1567,13 @@ msgstr "" "返回物件的“標識值”。該值是一個整數,在此物件的生命週期中保證是唯一且恆定的。" "兩個生命期不重疊的物件可能具有相同的 :func:`id` 值。" -#: ../../library/functions.rst:827 +#: ../../library/functions.rst:824 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -#: ../../library/functions.rst:832 +#: ../../library/functions.rst:829 #, fuzzy msgid "" "If the *prompt* argument is present, it is written to standard output " @@ -1591,7 +1585,7 @@ msgstr "" "輸入中讀取一行,將其轉換為字串(除了末尾的換行符)並返回。當讀取到 EOF 時,則" "觸發 :exc:`EOFError`。例如::" -#: ../../library/functions.rst:842 +#: ../../library/functions.rst:839 #, fuzzy msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " @@ -1600,31 +1594,31 @@ msgstr "" "如果載入了 :mod:`readline` 模組,:func:`input` 將使用它來提供複雜的行編輯和歷" "史記錄功能。" -#: ../../library/functions.rst:845 +#: ../../library/functions.rst:842 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." msgstr "" -#: ../../library/functions.rst:847 +#: ../../library/functions.rst:844 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" msgstr "" -#: ../../library/functions.rst:850 +#: ../../library/functions.rst:847 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." msgstr "" -#: ../../library/functions.rst:852 +#: ../../library/functions.rst:849 msgid "" "Raises an auditing event ``builtins.input/result`` with the result after " "successfully reading input." msgstr "" -#: ../../library/functions.rst:859 +#: ../../library/functions.rst:856 #, fuzzy msgid "" "Return an integer object constructed from a number or string *x*, or return " @@ -1637,7 +1631,7 @@ msgstr "" "果 *x* 定義了 :meth:`__int__`,``int(x)`` 返回 ``x.__int__()`` 。如果 *x* 定" "義了 :meth:`__trunc__`,它返回 ``x.__trunc__()`` 。對於浮點數,它向零舍入。" -#: ../../library/functions.rst:866 +#: ../../library/functions.rst:863 #, fuzzy msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" @@ -1663,12 +1657,12 @@ msgstr "" "以 ``int('010', 0)`` 是非法的,但 ``int('010')`` 和 ``int('010', 8)`` 是合法" "的。" -#: ../../library/functions.rst:879 +#: ../../library/functions.rst:876 #, fuzzy msgid "The integer type is described in :ref:`typesnumeric`." msgstr "整數型別定義請參閱 :ref:`typesnumeric` 。" -#: ../../library/functions.rst:881 +#: ../../library/functions.rst:878 #, fuzzy msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" @@ -1681,11 +1675,11 @@ msgstr "" "`base.__int__ ` 而不是 :meth:`base.__index__ `。" -#: ../../library/functions.rst:894 +#: ../../library/functions.rst:891 msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." msgstr "" -#: ../../library/functions.rst:900 +#: ../../library/functions.rst:897 #, fuzzy msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " @@ -1703,11 +1697,11 @@ msgstr "" "組,如果 *object* 是其中的任何一個的例項則返回 true。 如果 *classinfo* 既不是" "型別,也不是型別元組或型別的遞迴元組,那麼會觸發 :exc:`TypeError` 異常。" -#: ../../library/functions.rst:910 ../../library/functions.rst:923 +#: ../../library/functions.rst:907 ../../library/functions.rst:920 msgid "*classinfo* can be a :ref:`types-union`." msgstr "" -#: ../../library/functions.rst:916 +#: ../../library/functions.rst:913 #, fuzzy msgid "" "Return ``True`` if *class* is a subclass (direct, indirect, or :term:" @@ -1721,14 +1715,14 @@ msgstr "" "class>` 的),則返回 true。*classinfo* 可以是類物件的元組,此時 *classinfo* " "中的每個元素都會被檢查。其他情況,會觸發 :exc:`TypeError` 異常。" -#: ../../library/functions.rst:929 +#: ../../library/functions.rst:926 #, fuzzy msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " -"second argument, *object* must be a collection object which supports the " -"iteration protocol (the :meth:`__iter__` method), or it must support the " -"sequence protocol (the :meth:`__getitem__` method with integer arguments " +"second argument, *object* must be a collection object which supports the :" +"term:`iterable` protocol (the :meth:`__iter__` method), or it must support " +"the sequence protocol (the :meth:`__getitem__` method with integer arguments " "starting at ``0``). If it does not support either of those protocols, :exc:" "`TypeError` is raised. If the second argument, *sentinel*, is given, then " "*object* must be a callable object. The iterator created in this case will " @@ -1745,19 +1739,19 @@ msgstr "" "會不帶實參地呼叫 *object*;如果返回的結果是 *sentinel* 則觸發 :exc:" "`StopIteration`,否則返回呼叫結果。" -#: ../../library/functions.rst:942 +#: ../../library/functions.rst:939 #, fuzzy msgid "See also :ref:`typeiter`." msgstr "另請參閱 :ref:`typeiter`。" -#: ../../library/functions.rst:944 +#: ../../library/functions.rst:941 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:956 +#: ../../library/functions.rst:953 #, fuzzy msgid "" "Return the length (the number of items) of an object. The argument may be a " @@ -1767,13 +1761,13 @@ msgstr "" "返回物件的長度(元素個數)。實參可以是序列(如 string、bytes、tuple、list 或 " "range 等)或集合(如 dictionary、set 或 frozen set 等)。" -#: ../../library/functions.rst:962 +#: ../../library/functions.rst:959 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../library/functions.rst:970 +#: ../../library/functions.rst:967 #, fuzzy msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " @@ -1782,7 +1776,7 @@ msgstr "" "除了是函式,:class:`list` 也是可變序列型別,詳情請參閱 :ref:`typesseq-list` " "和 :ref:`typesseq`。" -#: ../../library/functions.rst:976 +#: ../../library/functions.rst:973 #, fuzzy msgid "" "Update and return a dictionary representing the current local symbol table. " @@ -1793,7 +1787,7 @@ msgstr "" "更新並返回表示當前本地符號表的字典。在函式塊而不是類塊中呼叫 :func:`locals` " "時會返回自由變數。" -#: ../../library/functions.rst:982 +#: ../../library/functions.rst:979 #, fuzzy msgid "" "The contents of this dictionary should not be modified; changes may not " @@ -1801,7 +1795,7 @@ msgid "" msgstr "" "不要更改此字典的內容;更改不會影響直譯器使用的區域性變數或自由變數的值。" -#: ../../library/functions.rst:987 +#: ../../library/functions.rst:984 #, fuzzy msgid "" "Return an iterator that applies *function* to every item of *iterable*, " @@ -1816,14 +1810,14 @@ msgstr "" "行獲取的元素。當有多個迭代器時,最短的迭代器耗盡則整個迭代結束。如果函式的輸" "入已經是元組實參,請參閱 :func:`itertools.starmap`。" -#: ../../library/functions.rst:998 +#: ../../library/functions.rst:995 #, fuzzy msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "返回可迭代物件中最大的元素,或者返回兩個及以上實參中最大的。" -#: ../../library/functions.rst:1001 +#: ../../library/functions.rst:998 #, fuzzy msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " @@ -1834,7 +1828,7 @@ msgstr "" "件中最大的元素;如果提供了兩個及以上的 positional 實參,則返回最大的 " "positional 實參。" -#: ../../library/functions.rst:1006 ../../library/functions.rst:1043 +#: ../../library/functions.rst:1003 ../../library/functions.rst:1040 #, fuzzy msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " @@ -1847,7 +1841,7 @@ msgstr "" "`list.sort` 的。*default* 實參是當可迭代物件為空時返回的值。如果可迭代物件為" "空,並且沒有給 *default* ,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:1012 +#: ../../library/functions.rst:1009 #, fuzzy msgid "" "If multiple items are maximal, the function returns the first one " @@ -1859,16 +1853,16 @@ msgstr "" "``sorted(iterable, key=keyfunc, reverse=True)[0]`` 和 ``heapq.nlargest(1, " "iterable, key=keyfunc)`` 保持一致。" -#: ../../library/functions.rst:1017 ../../library/functions.rst:1054 +#: ../../library/functions.rst:1014 ../../library/functions.rst:1051 #, fuzzy msgid "The *default* keyword-only argument." msgstr "keyword-only 實參 *default* 。" -#: ../../library/functions.rst:1020 ../../library/functions.rst:1057 +#: ../../library/functions.rst:1017 ../../library/functions.rst:1054 msgid "The *key* can be ``None``." msgstr "" -#: ../../library/functions.rst:1028 +#: ../../library/functions.rst:1025 #, fuzzy msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" @@ -1877,14 +1871,14 @@ msgstr "" "返回由給定實參建立的“記憶體檢視”物件。有關詳細資訊,請參閱 :ref:" "`typememoryview`。" -#: ../../library/functions.rst:1035 +#: ../../library/functions.rst:1032 #, fuzzy msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "返回可迭代物件中最小的元素,或者返回兩個及以上實參中最小的。" -#: ../../library/functions.rst:1038 +#: ../../library/functions.rst:1035 #, fuzzy msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " @@ -1895,7 +1889,7 @@ msgstr "" "最小的元素;如果提供了兩個及以上的 positional 實參,則返回最小的 positional " "實參。" -#: ../../library/functions.rst:1049 +#: ../../library/functions.rst:1046 #, fuzzy msgid "" "If multiple items are minimal, the function returns the first one " @@ -1907,17 +1901,17 @@ msgstr "" "``sorted(iterable, key=keyfunc)[0]`` 和 ``heapq.nsmallest(1, iterable, " "key=keyfunc)`` 保持一致。" -#: ../../library/functions.rst:1063 +#: ../../library/functions.rst:1060 #, fuzzy msgid "" -"Retrieve the next item from the *iterator* by calling its :meth:`~iterator." -"__next__` method. If *default* is given, it is returned if the iterator is " -"exhausted, otherwise :exc:`StopIteration` is raised." +"Retrieve the next item from the :term:`iterator` by calling its :meth:" +"`~iterator.__next__` method. If *default* is given, it is returned if the " +"iterator is exhausted, otherwise :exc:`StopIteration` is raised." msgstr "" "通過呼叫 *iterator* 的 :meth:`~iterator.__next__` 方法獲取下一個元素。如果迭" "代器耗盡,則返回給定的 *default*,如果沒有預設值則觸發 :exc:`StopIteration`。" -#: ../../library/functions.rst:1070 +#: ../../library/functions.rst:1067 #, fuzzy msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " @@ -1927,7 +1921,7 @@ msgstr "" "返回一個沒有特徵的新物件。:class:`object` 是所有類的基類。它具有所有 Python " "類例項的通用方法。這個函式不接受任何實參。" -#: ../../library/functions.rst:1076 +#: ../../library/functions.rst:1073 #, fuzzy msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " @@ -1936,7 +1930,7 @@ msgstr "" "由於 :class:`object` 沒有 :attr:`~object.__dict__`,因此無法將任意屬性賦給 :" "class:`object` 的例項。" -#: ../../library/functions.rst:1082 +#: ../../library/functions.rst:1079 #, fuzzy msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " @@ -1948,7 +1942,7 @@ msgstr "" "式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`__index__` 方法返回一個整數。一些例子:" -#: ../../library/functions.rst:1092 +#: ../../library/functions.rst:1089 #, fuzzy msgid "" "If you want to convert an integer number to an octal string either with the " @@ -1956,7 +1950,7 @@ msgid "" msgstr "" "如果要將整數轉換為八進位制字串,並可選擇有無“0o”字首,則可以使用如下方法:" -#: ../../library/functions.rst:1109 +#: ../../library/functions.rst:1106 #, fuzzy msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " @@ -1966,7 +1960,7 @@ msgstr "" "開啟 *file* 並返回對應的 :term:`file object`。如果該檔案不能開啟,則觸發 :" "exc:`OSError`。" -#: ../../library/functions.rst:1113 +#: ../../library/functions.rst:1110 #, fuzzy msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " @@ -1979,7 +1973,7 @@ msgstr "" "term:`path-like object`;也可能是要被封裝的檔案描述符的數字。(如果是檔案描述" "符,它會隨著返回的 I/O 物件關閉而關閉,除非 *closefd* 是 ``False`` 。)" -#: ../../library/functions.rst:1119 +#: ../../library/functions.rst:1116 #, fuzzy msgid "" "*mode* is an optional string that specifies the mode in which the file is " @@ -2001,79 +1995,79 @@ msgstr "" "getpreferredencoding(False)`` 來獲取本地編碼。(要讀取和寫入原始位元組,請使" "用二進位制模式並不要指定 *encoding*。)可用的模式有:" -#: ../../library/functions.rst:1136 +#: ../../library/functions.rst:1133 #, fuzzy msgid "Character" msgstr "字元" -#: ../../library/functions.rst:1136 +#: ../../library/functions.rst:1133 #, fuzzy msgid "Meaning" msgstr "意義" -#: ../../library/functions.rst:1138 +#: ../../library/functions.rst:1135 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/functions.rst:1138 +#: ../../library/functions.rst:1135 #, fuzzy msgid "open for reading (default)" msgstr "讀取(預設)" -#: ../../library/functions.rst:1139 +#: ../../library/functions.rst:1136 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/functions.rst:1139 +#: ../../library/functions.rst:1136 #, fuzzy msgid "open for writing, truncating the file first" msgstr "写入,并先截断文件" -#: ../../library/functions.rst:1140 +#: ../../library/functions.rst:1137 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/functions.rst:1140 +#: ../../library/functions.rst:1137 #, fuzzy msgid "open for exclusive creation, failing if the file already exists" msgstr "排它性创建,如果文件已存在则失败" -#: ../../library/functions.rst:1141 +#: ../../library/functions.rst:1138 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/functions.rst:1141 +#: ../../library/functions.rst:1138 #, fuzzy msgid "open for writing, appending to the end of file if it exists" msgstr "写入,如果文件存在则在末尾追加" -#: ../../library/functions.rst:1142 +#: ../../library/functions.rst:1139 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/functions.rst:1142 +#: ../../library/functions.rst:1139 #, fuzzy msgid "binary mode" msgstr "二进制模式" -#: ../../library/functions.rst:1143 +#: ../../library/functions.rst:1140 msgid "``'t'``" msgstr "``'t'``" -#: ../../library/functions.rst:1143 +#: ../../library/functions.rst:1140 msgid "text mode (default)" msgstr "文字模式(預設)" -#: ../../library/functions.rst:1144 +#: ../../library/functions.rst:1141 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/functions.rst:1144 +#: ../../library/functions.rst:1141 #, fuzzy msgid "open for updating (reading and writing)" msgstr "更新磁碟檔案(讀取並寫入)" -#: ../../library/functions.rst:1147 +#: ../../library/functions.rst:1144 #, fuzzy msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " @@ -2083,7 +2077,7 @@ msgstr "" "預設的模式是 ``'r'`` (開啟並讀取文字,同 ``'rt'`` )。對於二進位制寫入, " "``'w+b'`` 模式開啟並把檔案截斷成 0 位元組; ``'r+b'`` 則不會截斷。" -#: ../../library/functions.rst:1151 +#: ../../library/functions.rst:1148 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* " @@ -2094,7 +2088,7 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../library/functions.rst:1159 +#: ../../library/functions.rst:1156 msgid "" "There is an additional mode character permitted, ``'U'``, which no longer " "has any effect, and is considered deprecated. It previously enabled :term:" @@ -2103,14 +2097,14 @@ msgid "" "parameter>` parameter for further details." msgstr "" -#: ../../library/functions.rst:1167 +#: ../../library/functions.rst:1164 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:1171 +#: ../../library/functions.rst:1168 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 " @@ -2119,7 +2113,7 @@ msgid "" "given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1177 +#: ../../library/functions.rst:1174 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 " @@ -2127,14 +2121,14 @@ msgid "" "the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1182 +#: ../../library/functions.rst:1179 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:1186 +#: ../../library/functions.rst:1183 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 " @@ -2143,7 +2137,7 @@ msgid "" "module for the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1193 +#: ../../library/functions.rst:1190 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 " @@ -2152,25 +2146,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1201 +#: ../../library/functions.rst:1198 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:1205 +#: ../../library/functions.rst:1202 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1208 +#: ../../library/functions.rst:1205 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1211 +#: ../../library/functions.rst:1208 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2179,33 +2173,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1218 +#: ../../library/functions.rst:1215 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:1222 +#: ../../library/functions.rst:1219 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1225 +#: ../../library/functions.rst:1222 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1233 +#: ../../library/functions.rst:1230 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " "and ``'\\r\\n'``. It works as follows:" msgstr "" -#: ../../library/functions.rst:1237 +#: ../../library/functions.rst:1234 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2216,7 +2210,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1245 +#: ../../library/functions.rst:1242 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2225,7 +2219,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1251 +#: ../../library/functions.rst:1248 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 " @@ -2233,7 +2227,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1256 +#: ../../library/functions.rst:1253 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 " @@ -2242,12 +2236,12 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1262 +#: ../../library/functions.rst:1259 #, fuzzy msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是 :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1264 +#: ../../library/functions.rst:1261 #, fuzzy msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" @@ -2256,7 +2250,7 @@ msgstr "" "下面的示例使用 :func:`os.open` 函式返回值傳給 :ref:`dir_fd ` 的形參," "從給定的目錄中用相對路徑開啟檔案::" -#: ../../library/functions.rst:1277 +#: ../../library/functions.rst:1274 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 " @@ -2271,7 +2265,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1298 +#: ../../library/functions.rst:1295 #, fuzzy msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " @@ -2281,34 +2275,34 @@ msgstr "" "另請參閱檔案操作模組,例如 :mod:`fileinput`、:mod:`io` (聲明瞭 :func:" "`open`)、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 和 :mod:`shutil`。" -#: ../../library/functions.rst:1302 +#: ../../library/functions.rst:1299 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." msgstr "" -#: ../../library/functions.rst:1304 +#: ../../library/functions.rst:1301 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1310 +#: ../../library/functions.rst:1307 #, fuzzy msgid "The *opener* parameter was added." msgstr "增加了 *opener* 形參。" -#: ../../library/functions.rst:1311 +#: ../../library/functions.rst:1308 #, fuzzy msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1312 +#: ../../library/functions.rst:1309 #, fuzzy msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1313 +#: ../../library/functions.rst:1310 #, fuzzy msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " @@ -2317,17 +2311,17 @@ msgstr "" "如果檔案已存在但使用了排它性建立模式( ``'x'`` ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1319 +#: ../../library/functions.rst:1316 #, fuzzy msgid "The file is now non-inheritable." msgstr "檔案現在禁止繼承。" -#: ../../library/functions.rst:1323 +#: ../../library/functions.rst:1320 #, fuzzy msgid "The ``'U'`` mode." msgstr "``'U'`` 模式。" -#: ../../library/functions.rst:1328 +#: ../../library/functions.rst:1325 #, fuzzy msgid "" "If the system call is interrupted and the signal handler does not raise an " @@ -2337,17 +2331,17 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程式沒有觸發異常,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError` 異常(原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1331 +#: ../../library/functions.rst:1328 #, fuzzy msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理介面。" -#: ../../library/functions.rst:1336 +#: ../../library/functions.rst:1333 #, fuzzy msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1337 +#: ../../library/functions.rst:1334 #, fuzzy msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." @@ -2356,7 +2350,7 @@ msgstr "" "在 Windows 上,開啟一個控制檯緩衝區將返回 :class:`io.RawIOBase` 的子類,而不" "是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1342 +#: ../../library/functions.rst:1339 #, fuzzy msgid "" "Given a string representing one Unicode character, return an integer " @@ -2368,7 +2362,7 @@ msgstr "" "``ord('a')`` 返回整數 ``97``, ``ord('€')`` (歐元符合)返回 ``8364`` 。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1350 +#: ../../library/functions.rst:1347 #, fuzzy msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " @@ -2379,7 +2373,7 @@ msgstr "" "返回 *x* 的 *y* 次冪;如果 *z* 存在,則對 *z* 取餘(比直接 ``pow(x, y) % z`` " "計算更高效)。兩個引數形式的 ``pow(x, y)`` 等價於冪運算子: ``x**y``。" -#: ../../library/functions.rst:1355 +#: ../../library/functions.rst:1352 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2392,7 +2386,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1365 +#: ../../library/functions.rst:1362 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 " @@ -2401,29 +2395,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1371 +#: ../../library/functions.rst:1368 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1378 +#: ../../library/functions.rst:1375 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:1383 +#: ../../library/functions.rst:1380 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1390 +#: ../../library/functions.rst:1387 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:1394 +#: ../../library/functions.rst:1391 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* " @@ -2432,7 +2426,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1400 +#: ../../library/functions.rst:1397 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 " @@ -2440,40 +2434,40 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1405 +#: ../../library/functions.rst:1402 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:1408 +#: ../../library/functions.rst:1405 #, fuzzy msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* keyword 實參。" -#: ../../library/functions.rst:1414 +#: ../../library/functions.rst:1411 #, fuzzy msgid "Return a property attribute." msgstr "返回 property 屬性。" -#: ../../library/functions.rst:1416 +#: ../../library/functions.rst:1413 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:1420 +#: ../../library/functions.rst:1417 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1437 +#: ../../library/functions.rst:1434 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:1440 +#: ../../library/functions.rst:1437 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 " @@ -2481,14 +2475,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1453 +#: ../../library/functions.rst:1450 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:1457 +#: ../../library/functions.rst:1454 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2496,30 +2490,30 @@ msgid "" "decorated function. This is best explained with an example::" msgstr "" -#: ../../library/functions.rst:1479 +#: ../../library/functions.rst:1476 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:1483 +#: ../../library/functions.rst:1480 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1486 +#: ../../library/functions.rst:1483 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1495 +#: ../../library/functions.rst:1492 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:1501 +#: ../../library/functions.rst:1498 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 " @@ -2530,7 +2524,7 @@ msgid "" "function returns for its instances by defining a :meth:`__repr__` method." msgstr "" -#: ../../library/functions.rst:1512 +#: ../../library/functions.rst:1509 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2538,14 +2532,14 @@ msgid "" "starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1520 +#: ../../library/functions.rst:1517 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:1524 +#: ../../library/functions.rst:1521 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 " @@ -2556,13 +2550,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1533 +#: ../../library/functions.rst:1530 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1538 +#: ../../library/functions.rst:1535 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 " @@ -2571,21 +2565,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1549 +#: ../../library/functions.rst:1546 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:1553 +#: ../../library/functions.rst:1550 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:1560 +#: ../../library/functions.rst:1557 #, fuzzy msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " @@ -2598,14 +2592,14 @@ msgstr "" "屬性。如果物件允許,該函式將刪除指定的屬性。例如 ``delattr(x, 'foobar')`` 等" "價於 ``del x.foobar`` 。" -#: ../../library/functions.rst:1568 +#: ../../library/functions.rst:1565 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:1577 +#: ../../library/functions.rst:1574 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -2618,35 +2612,35 @@ msgid "" "func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" -#: ../../library/functions.rst:1590 +#: ../../library/functions.rst:1587 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1592 +#: ../../library/functions.rst:1589 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性參數,只能使用關鍵字參數指定。" -#: ../../library/functions.rst:1594 +#: ../../library/functions.rst:1591 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:1598 +#: ../../library/functions.rst:1595 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:1601 +#: ../../library/functions.rst:1598 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1604 +#: ../../library/functions.rst:1601 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 " @@ -2654,7 +2648,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1609 +#: ../../library/functions.rst:1606 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2666,22 +2660,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1618 +#: ../../library/functions.rst:1615 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1622 +#: ../../library/functions.rst:1619 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1624 +#: ../../library/functions.rst:1621 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1631 +#: ../../library/functions.rst:1628 #, fuzzy msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" @@ -2690,7 +2684,7 @@ msgstr "" "``@classmethod`` 形式是一個函式 :term:`decorator` - 參見 :ref:`function` 中關" "於函式定義的詳細介紹。" -#: ../../library/functions.rst:1634 +#: ../../library/functions.rst:1631 #, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " @@ -2700,14 +2694,14 @@ msgstr "" "它可以同時在類(如 ``C.f()``)和例項(如 ``C().f()``)上呼叫。例項除了它的類" "資訊,其他都會被忽略。如果一個類方法在子類上呼叫,子類會作為第一個實參傳入。" -#: ../../library/functions.rst:1638 +#: ../../library/functions.rst:1635 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:1642 +#: ../../library/functions.rst:1639 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 " @@ -2716,37 +2710,37 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1654 +#: ../../library/functions.rst:1651 #, fuzzy msgid "For more information on static methods, see :ref:`types`." msgstr "關於類方法的更多資訊,請參考文件 :ref:`types` 中的標準型別的層次。" -#: ../../library/functions.rst:1656 +#: ../../library/functions.rst:1653 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:1671 +#: ../../library/functions.rst:1668 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1673 +#: ../../library/functions.rst:1670 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1679 +#: ../../library/functions.rst:1676 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:1683 +#: ../../library/functions.rst:1680 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 ``''." @@ -2755,32 +2749,32 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1689 +#: ../../library/functions.rst:1686 #, fuzzy msgid "The *start* parameter can be specified as a keyword argument." msgstr "有兩個選擇性參數,只能使用關鍵字參數指定。" -#: ../../library/functions.rst:1694 +#: ../../library/functions.rst:1691 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:1698 +#: ../../library/functions.rst:1695 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:1702 +#: ../../library/functions.rst:1699 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:1706 +#: ../../library/functions.rst:1703 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2788,7 +2782,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1711 +#: ../../library/functions.rst:1708 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. " @@ -2796,7 +2790,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1716 +#: ../../library/functions.rst:1713 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 " @@ -2804,7 +2798,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1721 +#: ../../library/functions.rst:1718 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 " @@ -2817,18 +2811,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1731 +#: ../../library/functions.rst:1728 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1738 +#: ../../library/functions.rst:1735 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:1742 +#: ../../library/functions.rst:1739 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2838,7 +2832,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1749 +#: ../../library/functions.rst:1746 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 " @@ -2848,33 +2842,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1756 +#: ../../library/functions.rst:1753 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1765 +#: ../../library/functions.rst:1762 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:1774 +#: ../../library/functions.rst:1771 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:1778 +#: ../../library/functions.rst:1775 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:1782 +#: ../../library/functions.rst:1779 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 " @@ -2887,11 +2881,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1797 +#: ../../library/functions.rst:1794 msgid "See also :ref:`bltin-type-objects`." msgstr "" -#: ../../library/functions.rst:1799 +#: ../../library/functions.rst:1796 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2899,23 +2893,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1804 +#: ../../library/functions.rst:1801 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1806 +#: ../../library/functions.rst:1803 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:1812 +#: ../../library/functions.rst:1809 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:1815 +#: ../../library/functions.rst:1812 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2923,54 +2917,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1820 +#: ../../library/functions.rst:1817 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:1824 +#: ../../library/functions.rst:1821 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:1830 +#: ../../library/functions.rst:1827 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1833 +#: ../../library/functions.rst:1830 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1842 +#: ../../library/functions.rst:1839 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:1845 +#: ../../library/functions.rst:1842 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:1849 +#: ../../library/functions.rst:1846 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:1853 +#: ../../library/functions.rst:1850 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 " @@ -2978,51 +2972,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1858 +#: ../../library/functions.rst:1855 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:1865 +#: ../../library/functions.rst:1862 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:1872 +#: ../../library/functions.rst:1869 msgid "" "Unlike the default behavior, it checks that the lengths of iterables are " "identical, raising a :exc:`ValueError` if they aren't:" msgstr "" -#: ../../library/functions.rst:1880 +#: ../../library/functions.rst:1877 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:1884 +#: ../../library/functions.rst:1881 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:1888 +#: ../../library/functions.rst:1885 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:1891 +#: ../../library/functions.rst:1888 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:1893 +#: ../../library/functions.rst:1890 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 " @@ -3031,23 +3025,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:1899 +#: ../../library/functions.rst:1896 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:1910 +#: ../../library/functions.rst:1907 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 參數。" -#: ../../library/functions.rst:1922 +#: ../../library/functions.rst:1919 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1925 +#: ../../library/functions.rst:1922 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3059,7 +3053,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1934 +#: ../../library/functions.rst:1931 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3069,7 +3063,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:1941 +#: ../../library/functions.rst:1938 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3078,7 +3072,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:1947 +#: ../../library/functions.rst:1944 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 " @@ -3086,58 +3080,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:1952 +#: ../../library/functions.rst:1949 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:1957 +#: ../../library/functions.rst:1954 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:1961 +#: ../../library/functions.rst:1958 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:1964 +#: ../../library/functions.rst:1961 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:1971 +#: ../../library/functions.rst:1968 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:1975 +#: ../../library/functions.rst:1972 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1978 +#: ../../library/functions.rst:1975 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:1982 +#: ../../library/functions.rst:1979 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:1987 +#: ../../library/functions.rst:1984 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:1988 +#: ../../library/functions.rst:1985 #, fuzzy msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " diff --git a/library/os.path.po b/library/os.path.po index 9f21a280b0..5a17c5aeb0 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -27,6 +27,8 @@ msgid "" "**Source code:** :source:`Lib/posixpath.py` (for POSIX) and :source:`Lib/" "ntpath.py` (for Windows NT)." msgstr "" +"**原始碼:**\\ :source:`Lib/posixpath.py`\\ (對於 POSIX)與 :source:`Lib/" +"ntpath.py`\\(對於 Windows NT)。" #: ../../library/os.path.rst:14 msgid "" diff --git a/library/profile.po b/library/profile.po index 7c3eea2b02..24a0699be4 100644 --- a/library/profile.po +++ b/library/profile.po @@ -24,7 +24,7 @@ msgstr "" #: ../../library/profile.rst:7 msgid "**Source code:** :source:`Lib/profile.py` and :source:`Lib/pstats.py`" -msgstr "**原始碼:**\\ :source:`Lib/profile.py` and :source:`Lib/pstats.py`" +msgstr "**原始碼:**\\ :source:`Lib/profile.py` 與 :source:`Lib/pstats.py`" #: ../../library/profile.rst:14 msgid "Introduction to the profilers" diff --git a/library/stdtypes.po b/library/stdtypes.po index 9ab3865124..45a885580f 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -103,21 +103,21 @@ msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:143 #: ../../library/stdtypes.rst:274 ../../library/stdtypes.rst:363 -#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:881 -#: ../../library/stdtypes.rst:1076 +#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:882 +#: ../../library/stdtypes.rst:1077 msgid "Operation" msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:274 #: ../../library/stdtypes.rst:363 ../../library/stdtypes.rst:413 -#: ../../library/stdtypes.rst:881 ../../library/stdtypes.rst:1076 +#: ../../library/stdtypes.rst:882 ../../library/stdtypes.rst:1077 msgid "Result" msgstr "結果" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:274 -#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:881 -#: ../../library/stdtypes.rst:1076 ../../library/stdtypes.rst:2308 -#: ../../library/stdtypes.rst:3529 +#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:882 +#: ../../library/stdtypes.rst:1077 ../../library/stdtypes.rst:2309 +#: ../../library/stdtypes.rst:3530 msgid "Notes" msgstr "註解" @@ -130,9 +130,9 @@ msgid "if *x* is false, then *y*, else *x*" msgstr "" #: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:284 -#: ../../library/stdtypes.rst:883 ../../library/stdtypes.rst:886 -#: ../../library/stdtypes.rst:1087 ../../library/stdtypes.rst:2314 -#: ../../library/stdtypes.rst:3535 +#: ../../library/stdtypes.rst:884 ../../library/stdtypes.rst:887 +#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2315 +#: ../../library/stdtypes.rst:3536 msgid "\\(1)" msgstr "\\(1)" @@ -145,9 +145,9 @@ msgid "if *x* is false, then *x*, else *y*" msgstr "" #: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:287 -#: ../../library/stdtypes.rst:307 ../../library/stdtypes.rst:1115 -#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:2320 -#: ../../library/stdtypes.rst:3539 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:307 ../../library/stdtypes.rst:1116 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:2321 +#: ../../library/stdtypes.rst:3540 ../../library/stdtypes.rst:3542 msgid "\\(2)" msgstr "\\(2)" @@ -159,19 +159,19 @@ msgstr "``not x``" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:895 -#: ../../library/stdtypes.rst:1118 ../../library/stdtypes.rst:2322 -#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:2326 -#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3543 -#: ../../library/stdtypes.rst:3545 ../../library/stdtypes.rst:3547 -#: ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:896 +#: ../../library/stdtypes.rst:1119 ../../library/stdtypes.rst:2323 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:2327 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:3546 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:3550 msgid "\\(3)" msgstr "\\(3)" #: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:318 -#: ../../library/stdtypes.rst:431 ../../library/stdtypes.rst:922 -#: ../../library/stdtypes.rst:1126 ../../library/stdtypes.rst:2354 -#: ../../library/stdtypes.rst:3579 +#: ../../library/stdtypes.rst:431 ../../library/stdtypes.rst:923 +#: ../../library/stdtypes.rst:1127 ../../library/stdtypes.rst:2355 +#: ../../library/stdtypes.rst:3580 msgid "Notes:" msgstr "註解:" @@ -210,9 +210,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2285 -#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3506 -#: ../../library/stdtypes.rst:3529 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2286 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3507 +#: ../../library/stdtypes.rst:3530 msgid "Meaning" msgstr "" @@ -493,8 +493,8 @@ msgid "" "zero." msgstr "" -#: ../../library/stdtypes.rst:300 ../../library/stdtypes.rst:1108 -#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3566 +#: ../../library/stdtypes.rst:300 ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3567 msgid "\\(6)" msgstr "\\(6)" @@ -531,10 +531,10 @@ msgid "*x* to the power *y*" msgstr "" #: ../../library/stdtypes.rst:309 ../../library/stdtypes.rst:311 -#: ../../library/stdtypes.rst:1097 ../../library/stdtypes.rst:1100 -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:2344 -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3562 -#: ../../library/stdtypes.rst:3569 +#: ../../library/stdtypes.rst:1098 ../../library/stdtypes.rst:1101 +#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:2345 +#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:3570 msgid "\\(5)" msgstr "\\(5)" @@ -669,9 +669,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../library/stdtypes.rst:415 ../../library/stdtypes.rst:418 -#: ../../library/stdtypes.rst:421 ../../library/stdtypes.rst:1121 -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:2334 -#: ../../library/stdtypes.rst:3551 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:421 ../../library/stdtypes.rst:1122 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:2335 +#: ../../library/stdtypes.rst:3552 ../../library/stdtypes.rst:3556 msgid "\\(4)" msgstr "\\(4)" @@ -1008,15 +1008,15 @@ msgstr "" #: ../../library/stdtypes.rst:775 msgid "" -"One method needs to be defined for container objects to provide iteration " -"support:" +"One method needs to be defined for container objects to provide :term:" +"`iterable` support:" msgstr "" #: ../../library/stdtypes.rst:782 msgid "" -"Return an iterator object. The object is required to support the iterator " -"protocol described below. If a container supports different types of " -"iteration, additional methods can be provided to specifically request " +"Return an :term:`iterator` object. The object is required to support the " +"iterator protocol described below. If a container supports different types " +"of iteration, additional methods can be provided to specifically request " "iterators for those iteration types. (An example of an object supporting " "multiple forms of iteration would be a tree structure which supports both " "breadth-first and depth-first traversal.) This method corresponds to the :c:" @@ -1032,21 +1032,21 @@ msgstr "" #: ../../library/stdtypes.rst:797 msgid "" -"Return the iterator object itself. This is required to allow both " +"Return the :term:`iterator` object itself. This is required to allow both " "containers and iterators to be used with the :keyword:`for` and :keyword:" -"`in` statements. This method corresponds to the :c:member:`~PyTypeObject." +"`in` statements. This method corresponds to the :c:member:`~PyTypeObject." "tp_iter` slot of the type structure for Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:805 +#: ../../library/stdtypes.rst:806 msgid "" -"Return the next item from the container. If there are no further items, " -"raise the :exc:`StopIteration` exception. This method corresponds to the :c:" -"member:`~PyTypeObject.tp_iternext` slot of the type structure for Python " -"objects in the Python/C API." +"Return the next item from the :term:`iterator`. If there are no further " +"items, raise the :exc:`StopIteration` exception. This method corresponds to " +"the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for " +"Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:810 +#: ../../library/stdtypes.rst:811 msgid "" "Python defines several iterator objects to support iteration over general " "and specific sequence types, dictionaries, and other more specialized " @@ -1054,18 +1054,18 @@ msgid "" "the iterator protocol." msgstr "" -#: ../../library/stdtypes.rst:815 +#: ../../library/stdtypes.rst:816 msgid "" "Once an iterator's :meth:`~iterator.__next__` method raises :exc:" "`StopIteration`, it must continue to do so on subsequent calls. " "Implementations that do not obey this property are deemed broken." msgstr "" -#: ../../library/stdtypes.rst:823 +#: ../../library/stdtypes.rst:824 msgid "Generator Types" msgstr "" -#: ../../library/stdtypes.rst:825 +#: ../../library/stdtypes.rst:826 msgid "" "Python's :term:`generator`\\s provide a convenient way to implement the " "iterator protocol. If a container object's :meth:`__iter__` method is " @@ -1075,11 +1075,11 @@ msgid "" "found in :ref:`the documentation for the yield expression `." msgstr "" -#: ../../library/stdtypes.rst:837 +#: ../../library/stdtypes.rst:838 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" msgstr "" -#: ../../library/stdtypes.rst:839 +#: ../../library/stdtypes.rst:840 msgid "" "There are three basic sequence types: lists, tuples, and range objects. " "Additional sequence types tailored for processing of :ref:`binary data " @@ -1087,11 +1087,11 @@ msgid "" "sections." msgstr "" -#: ../../library/stdtypes.rst:848 +#: ../../library/stdtypes.rst:849 msgid "Common Sequence Operations" msgstr "" -#: ../../library/stdtypes.rst:852 +#: ../../library/stdtypes.rst:853 msgid "" "The operations in the following table are supported by most sequence types, " "both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " @@ -1099,7 +1099,7 @@ msgid "" "sequence types." msgstr "" -#: ../../library/stdtypes.rst:857 +#: ../../library/stdtypes.rst:858 msgid "" "This table lists the sequence operations sorted in ascending priority. In " "the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* " @@ -1107,7 +1107,7 @@ msgid "" "restrictions imposed by *s*." msgstr "" -#: ../../library/stdtypes.rst:862 +#: ../../library/stdtypes.rst:863 msgid "" "The ``in`` and ``not in`` operations have the same priorities as the " "comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " @@ -1115,125 +1115,125 @@ msgid "" "[3]_" msgstr "" -#: ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:884 msgid "``x in s``" msgstr "``x in s``" -#: ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:884 msgid "``True`` if an item of *s* is equal to *x*, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:886 +#: ../../library/stdtypes.rst:887 msgid "``x not in s``" msgstr "``x not in s``" -#: ../../library/stdtypes.rst:886 +#: ../../library/stdtypes.rst:887 msgid "``False`` if an item of *s* is equal to *x*, else ``True``" msgstr "" -#: ../../library/stdtypes.rst:889 +#: ../../library/stdtypes.rst:890 msgid "``s + t``" msgstr "``s + t``" -#: ../../library/stdtypes.rst:889 +#: ../../library/stdtypes.rst:890 msgid "the concatenation of *s* and *t*" msgstr "" -#: ../../library/stdtypes.rst:889 +#: ../../library/stdtypes.rst:890 msgid "(6)(7)" msgstr "(6)(7)" -#: ../../library/stdtypes.rst:892 +#: ../../library/stdtypes.rst:893 msgid "``s * n`` or ``n * s``" msgstr "``s * n`` 或 ``n * s``" -#: ../../library/stdtypes.rst:892 +#: ../../library/stdtypes.rst:893 msgid "equivalent to adding *s* to itself *n* times" msgstr "" -#: ../../library/stdtypes.rst:892 +#: ../../library/stdtypes.rst:893 msgid "(2)(7)" msgstr "(2)(7)" -#: ../../library/stdtypes.rst:895 +#: ../../library/stdtypes.rst:896 msgid "``s[i]``" msgstr "``s[i]``" -#: ../../library/stdtypes.rst:895 +#: ../../library/stdtypes.rst:896 msgid "*i*\\ th item of *s*, origin 0" msgstr "" -#: ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:898 msgid "``s[i:j]``" msgstr "``s[i:j]``" -#: ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:898 msgid "slice of *s* from *i* to *j*" msgstr "" -#: ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:898 msgid "(3)(4)" msgstr "(3)(4)" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:900 msgid "``s[i:j:k]``" msgstr "``s[i:j:k]``" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:900 msgid "slice of *s* from *i* to *j* with step *k*" msgstr "" -#: ../../library/stdtypes.rst:899 +#: ../../library/stdtypes.rst:900 msgid "(3)(5)" msgstr "(3)(5)" -#: ../../library/stdtypes.rst:902 +#: ../../library/stdtypes.rst:903 msgid "``len(s)``" msgstr "``len(s)``" -#: ../../library/stdtypes.rst:902 +#: ../../library/stdtypes.rst:903 msgid "length of *s*" msgstr "" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:905 msgid "``min(s)``" msgstr "``min(s)``" -#: ../../library/stdtypes.rst:904 +#: ../../library/stdtypes.rst:905 msgid "smallest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:907 msgid "``max(s)``" msgstr "``max(s)``" -#: ../../library/stdtypes.rst:906 +#: ../../library/stdtypes.rst:907 msgid "largest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:909 msgid "``s.index(x[, i[, j]])``" msgstr "``s.index(x[, i[, j]])``" -#: ../../library/stdtypes.rst:908 +#: ../../library/stdtypes.rst:909 msgid "" "index of the first occurrence of *x* in *s* (at or after index *i* and " "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:908 ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:909 ../../library/stdtypes.rst:3538 msgid "\\(8)" msgstr "\\(8)" -#: ../../library/stdtypes.rst:912 +#: ../../library/stdtypes.rst:913 msgid "``s.count(x)``" msgstr "``s.count(x)``" -#: ../../library/stdtypes.rst:912 +#: ../../library/stdtypes.rst:913 msgid "total number of occurrences of *x* in *s*" msgstr "" -#: ../../library/stdtypes.rst:916 +#: ../../library/stdtypes.rst:917 msgid "" "Sequences of the same type also support comparisons. In particular, tuples " "and lists are compared lexicographically by comparing corresponding " @@ -1242,7 +1242,7 @@ msgid "" "(For full details see :ref:`comparisons` in the language reference.)" msgstr "" -#: ../../library/stdtypes.rst:925 +#: ../../library/stdtypes.rst:926 msgid "" "While the ``in`` and ``not in`` operations are used only for simple " "containment testing in the general case, some specialised sequences (such " @@ -1250,7 +1250,7 @@ msgid "" "subsequence testing::" msgstr "" -#: ../../library/stdtypes.rst:934 +#: ../../library/stdtypes.rst:935 msgid "" "Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " "sequence of the same type as *s*). Note that items in the sequence *s* are " @@ -1258,7 +1258,7 @@ msgid "" "Python programmers; consider::" msgstr "" -#: ../../library/stdtypes.rst:946 +#: ../../library/stdtypes.rst:947 msgid "" "What has happened is that ``[[]]`` is a one-element list containing an empty " "list, so all three elements of ``[[]] * 3`` are references to this single " @@ -1266,20 +1266,20 @@ msgid "" "list. You can create a list of different lists this way::" msgstr "" -#: ../../library/stdtypes.rst:958 +#: ../../library/stdtypes.rst:959 msgid "" "Further explanation is available in the FAQ entry :ref:`faq-multidimensional-" "list`." msgstr "" -#: ../../library/stdtypes.rst:962 +#: ../../library/stdtypes.rst:963 msgid "" "If *i* or *j* is negative, the index is relative to the end of sequence *s*: " "``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " "still ``0``." msgstr "" -#: ../../library/stdtypes.rst:967 +#: ../../library/stdtypes.rst:968 msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " "index *k* such that ``i <= k < j``. If *i* or *j* is greater than " @@ -1288,7 +1288,7 @@ msgid "" "to *j*, the slice is empty." msgstr "" -#: ../../library/stdtypes.rst:974 +#: ../../library/stdtypes.rst:975 msgid "" "The slice of *s* from *i* to *j* with step *k* is defined as the sequence of " "items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other " @@ -1301,7 +1301,7 @@ msgid "" "``None``, it is treated like ``1``." msgstr "" -#: ../../library/stdtypes.rst:985 +#: ../../library/stdtypes.rst:986 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -1309,14 +1309,14 @@ msgid "" "runtime cost, you must switch to one of the alternatives below:" msgstr "" -#: ../../library/stdtypes.rst:990 +#: ../../library/stdtypes.rst:991 msgid "" "if concatenating :class:`str` objects, you can build a list and use :meth:" "`str.join` at the end or else write to an :class:`io.StringIO` instance and " "retrieve its value when complete" msgstr "" -#: ../../library/stdtypes.rst:994 +#: ../../library/stdtypes.rst:995 msgid "" "if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes." "join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :" @@ -1324,22 +1324,22 @@ msgid "" "an efficient overallocation mechanism" msgstr "" -#: ../../library/stdtypes.rst:999 +#: ../../library/stdtypes.rst:1000 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" -#: ../../library/stdtypes.rst:1001 +#: ../../library/stdtypes.rst:1002 msgid "for other types, investigate the relevant class documentation" msgstr "" -#: ../../library/stdtypes.rst:1005 +#: ../../library/stdtypes.rst:1006 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " "concatenation or repetition." msgstr "" -#: ../../library/stdtypes.rst:1010 +#: ../../library/stdtypes.rst:1011 msgid "" "``index`` raises :exc:`ValueError` when *x* is not found in *s*. Not all " "implementations support passing the additional arguments *i* and *j*. These " @@ -1349,42 +1349,42 @@ msgid "" "start of the sequence rather than the start of the slice." msgstr "" -#: ../../library/stdtypes.rst:1021 +#: ../../library/stdtypes.rst:1022 msgid "Immutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1028 +#: ../../library/stdtypes.rst:1029 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../library/stdtypes.rst:1032 +#: ../../library/stdtypes.rst:1033 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../library/stdtypes.rst:1036 +#: ../../library/stdtypes.rst:1037 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:1043 +#: ../../library/stdtypes.rst:1044 msgid "Mutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1050 +#: ../../library/stdtypes.rst:1051 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../library/stdtypes.rst:1054 +#: ../../library/stdtypes.rst:1055 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1392,145 +1392,145 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../library/stdtypes.rst:1078 +#: ../../library/stdtypes.rst:1079 msgid "``s[i] = x``" msgstr "``s[i] = x``" -#: ../../library/stdtypes.rst:1078 +#: ../../library/stdtypes.rst:1079 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../library/stdtypes.rst:1081 +#: ../../library/stdtypes.rst:1082 msgid "``s[i:j] = t``" msgstr "``s[i:j] = t``" -#: ../../library/stdtypes.rst:1081 +#: ../../library/stdtypes.rst:1082 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../library/stdtypes.rst:1085 +#: ../../library/stdtypes.rst:1086 msgid "``del s[i:j]``" msgstr "``del s[i:j]``" -#: ../../library/stdtypes.rst:1085 +#: ../../library/stdtypes.rst:1086 msgid "same as ``s[i:j] = []``" msgstr "" -#: ../../library/stdtypes.rst:1087 +#: ../../library/stdtypes.rst:1088 msgid "``s[i:j:k] = t``" msgstr "``s[i:j:k] = t``" -#: ../../library/stdtypes.rst:1087 +#: ../../library/stdtypes.rst:1088 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../library/stdtypes.rst:1090 +#: ../../library/stdtypes.rst:1091 msgid "``del s[i:j:k]``" msgstr "``del s[i:j:k]``" -#: ../../library/stdtypes.rst:1090 +#: ../../library/stdtypes.rst:1091 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../library/stdtypes.rst:1093 +#: ../../library/stdtypes.rst:1094 msgid "``s.append(x)``" msgstr "``s.append(x)``" -#: ../../library/stdtypes.rst:1093 +#: ../../library/stdtypes.rst:1094 msgid "" "appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1098 msgid "``s.clear()``" msgstr "``s.clear()``" -#: ../../library/stdtypes.rst:1097 +#: ../../library/stdtypes.rst:1098 msgid "removes all items from *s* (same as ``del s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1100 +#: ../../library/stdtypes.rst:1101 msgid "``s.copy()``" msgstr "``s.copy()``" -#: ../../library/stdtypes.rst:1100 +#: ../../library/stdtypes.rst:1101 msgid "creates a shallow copy of *s* (same as ``s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1103 +#: ../../library/stdtypes.rst:1104 msgid "``s.extend(t)`` or ``s += t``" msgstr "``s.extend(t)`` 或 ``s += t``" -#: ../../library/stdtypes.rst:1103 +#: ../../library/stdtypes.rst:1104 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../library/stdtypes.rst:1108 +#: ../../library/stdtypes.rst:1109 msgid "``s *= n``" msgstr "``s *= n``" -#: ../../library/stdtypes.rst:1108 +#: ../../library/stdtypes.rst:1109 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../library/stdtypes.rst:1111 +#: ../../library/stdtypes.rst:1112 msgid "``s.insert(i, x)``" msgstr "``s.insert(i, x)``" -#: ../../library/stdtypes.rst:1111 +#: ../../library/stdtypes.rst:1112 msgid "" "inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1115 +#: ../../library/stdtypes.rst:1116 msgid "``s.pop()`` or ``s.pop(i)``" msgstr "``s.pop()`` 或 ``s.pop(i)``" -#: ../../library/stdtypes.rst:1115 +#: ../../library/stdtypes.rst:1116 msgid "retrieves the item at *i* and also removes it from *s*" msgstr "" -#: ../../library/stdtypes.rst:1118 +#: ../../library/stdtypes.rst:1119 msgid "``s.remove(x)``" msgstr "``s.remove(x)``" -#: ../../library/stdtypes.rst:1118 +#: ../../library/stdtypes.rst:1119 msgid "remove the first item from *s* where ``s[i]`` is equal to *x*" msgstr "" -#: ../../library/stdtypes.rst:1121 +#: ../../library/stdtypes.rst:1122 msgid "``s.reverse()``" msgstr "``s.reverse()``" -#: ../../library/stdtypes.rst:1121 +#: ../../library/stdtypes.rst:1122 msgid "reverses the items of *s* in place" msgstr "" -#: ../../library/stdtypes.rst:1129 +#: ../../library/stdtypes.rst:1130 msgid "*t* must have the same length as the slice it is replacing." msgstr "" -#: ../../library/stdtypes.rst:1132 +#: ../../library/stdtypes.rst:1133 msgid "" "The optional argument *i* defaults to ``-1``, so that by default the last " "item is removed and returned." msgstr "" -#: ../../library/stdtypes.rst:1136 +#: ../../library/stdtypes.rst:1137 msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*." msgstr "" -#: ../../library/stdtypes.rst:1139 +#: ../../library/stdtypes.rst:1140 msgid "" "The :meth:`reverse` method modifies the sequence in place for economy of " "space when reversing a large sequence. To remind users that it operates by " "side effect, it does not return the reversed sequence." msgstr "" -#: ../../library/stdtypes.rst:1144 +#: ../../library/stdtypes.rst:1145 msgid "" ":meth:`clear` and :meth:`!copy` are included for consistency with the " "interfaces of mutable containers that don't support slicing operations (such " @@ -1539,11 +1539,11 @@ msgid "" "classes provide it." msgstr "" -#: ../../library/stdtypes.rst:1150 +#: ../../library/stdtypes.rst:1151 msgid ":meth:`clear` and :meth:`!copy` methods." msgstr "" -#: ../../library/stdtypes.rst:1154 +#: ../../library/stdtypes.rst:1155 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1551,39 +1551,39 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../library/stdtypes.rst:1163 +#: ../../library/stdtypes.rst:1164 msgid "Lists" msgstr "List(串列)" -#: ../../library/stdtypes.rst:1167 +#: ../../library/stdtypes.rst:1168 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../library/stdtypes.rst:1173 +#: ../../library/stdtypes.rst:1174 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../library/stdtypes.rst:1175 +#: ../../library/stdtypes.rst:1176 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../library/stdtypes.rst:1176 +#: ../../library/stdtypes.rst:1177 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../library/stdtypes.rst:1177 +#: ../../library/stdtypes.rst:1178 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../library/stdtypes.rst:1178 +#: ../../library/stdtypes.rst:1179 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1180 +#: ../../library/stdtypes.rst:1181 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1594,20 +1594,20 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../library/stdtypes.rst:1189 +#: ../../library/stdtypes.rst:1190 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../library/stdtypes.rst:1192 +#: ../../library/stdtypes.rst:1193 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../library/stdtypes.rst:1198 +#: ../../library/stdtypes.rst:1199 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1615,13 +1615,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../library/stdtypes.rst:1203 +#: ../../library/stdtypes.rst:1204 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../library/stdtypes.rst:1206 +#: ../../library/stdtypes.rst:1207 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1630,19 +1630,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../library/stdtypes.rst:1213 +#: ../../library/stdtypes.rst:1214 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../library/stdtypes.rst:1216 +#: ../../library/stdtypes.rst:1217 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/stdtypes.rst:1219 +#: ../../library/stdtypes.rst:1220 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1650,7 +1650,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../library/stdtypes.rst:1224 +#: ../../library/stdtypes.rst:1225 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1658,12 +1658,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../library/stdtypes.rst:1229 +#: ../../library/stdtypes.rst:1230 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/stdtypes.rst:1233 +#: ../../library/stdtypes.rst:1234 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1671,11 +1671,11 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../library/stdtypes.rst:1242 +#: ../../library/stdtypes.rst:1243 msgid "Tuples" msgstr "" -#: ../../library/stdtypes.rst:1246 +#: ../../library/stdtypes.rst:1247 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -1684,27 +1684,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../library/stdtypes.rst:1254 +#: ../../library/stdtypes.rst:1255 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../library/stdtypes.rst:1256 +#: ../../library/stdtypes.rst:1257 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../library/stdtypes.rst:1257 +#: ../../library/stdtypes.rst:1258 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../library/stdtypes.rst:1258 +#: ../../library/stdtypes.rst:1259 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../library/stdtypes.rst:1259 +#: ../../library/stdtypes.rst:1260 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1261 +#: ../../library/stdtypes.rst:1262 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -1715,7 +1715,7 @@ msgid "" "``()``." msgstr "" -#: ../../library/stdtypes.rst:1269 +#: ../../library/stdtypes.rst:1270 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -1724,30 +1724,30 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../library/stdtypes.rst:1275 +#: ../../library/stdtypes.rst:1276 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../library/stdtypes.rst:1278 +#: ../../library/stdtypes.rst:1279 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../library/stdtypes.rst:1286 +#: ../../library/stdtypes.rst:1287 msgid "Ranges" msgstr "" -#: ../../library/stdtypes.rst:1290 +#: ../../library/stdtypes.rst:1291 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../library/stdtypes.rst:1297 +#: ../../library/stdtypes.rst:1298 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the ``__index__`` special " @@ -1756,38 +1756,38 @@ msgid "" "`ValueError` is raised." msgstr "" -#: ../../library/stdtypes.rst:1303 +#: ../../library/stdtypes.rst:1304 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../library/stdtypes.rst:1307 +#: ../../library/stdtypes.rst:1308 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../library/stdtypes.rst:1311 +#: ../../library/stdtypes.rst:1312 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../library/stdtypes.rst:1316 +#: ../../library/stdtypes.rst:1317 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../library/stdtypes.rst:1320 +#: ../../library/stdtypes.rst:1321 msgid "Range examples::" msgstr "" -#: ../../library/stdtypes.rst:1337 +#: ../../library/stdtypes.rst:1338 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -1795,23 +1795,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../library/stdtypes.rst:1344 +#: ../../library/stdtypes.rst:1345 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1349 +#: ../../library/stdtypes.rst:1350 msgid "The value of the *stop* parameter" msgstr "" -#: ../../library/stdtypes.rst:1353 +#: ../../library/stdtypes.rst:1354 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1356 +#: ../../library/stdtypes.rst:1357 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -1820,14 +1820,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../library/stdtypes.rst:1362 +#: ../../library/stdtypes.rst:1363 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../library/stdtypes.rst:1382 +#: ../../library/stdtypes.rst:1383 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -1837,111 +1837,111 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../library/stdtypes.rst:1389 +#: ../../library/stdtypes.rst:1390 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../library/stdtypes.rst:1395 +#: ../../library/stdtypes.rst:1396 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../library/stdtypes.rst:1400 +#: ../../library/stdtypes.rst:1401 msgid "" "The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../library/stdtypes.rst:1406 +#: ../../library/stdtypes.rst:1407 msgid "" "The `linspace recipe `_ shows " "how to implement a lazy version of range suitable for floating point " "applications." msgstr "" -#: ../../library/stdtypes.rst:1418 +#: ../../library/stdtypes.rst:1419 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../library/stdtypes.rst:1420 +#: ../../library/stdtypes.rst:1421 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../library/stdtypes.rst:1425 +#: ../../library/stdtypes.rst:1426 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:1426 +#: ../../library/stdtypes.rst:1427 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``." msgstr "" -#: ../../library/stdtypes.rst:1427 +#: ../../library/stdtypes.rst:1428 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes" "\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:1429 +#: ../../library/stdtypes.rst:1430 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../library/stdtypes.rst:1432 +#: ../../library/stdtypes.rst:1433 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../library/stdtypes.rst:1436 +#: ../../library/stdtypes.rst:1437 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported escape sequences, and the ``r`` (\"raw\") prefix that " "disables most escape sequence processing." msgstr "" -#: ../../library/stdtypes.rst:1440 +#: ../../library/stdtypes.rst:1441 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../library/stdtypes.rst:1443 +#: ../../library/stdtypes.rst:1444 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../library/stdtypes.rst:1449 +#: ../../library/stdtypes.rst:1450 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../library/stdtypes.rst:1453 +#: ../../library/stdtypes.rst:1454 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../library/stdtypes.rst:1465 +#: ../../library/stdtypes.rst:1466 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../library/stdtypes.rst:1469 +#: ../../library/stdtypes.rst:1470 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`object.__str__() `, which is the \"informal\" or nicely " @@ -1950,7 +1950,7 @@ msgid "" "method, then :func:`str` falls back to returning :meth:`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1480 +#: ../../library/stdtypes.rst:1481 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -1962,7 +1962,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1489 +#: ../../library/stdtypes.rst:1490 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -1970,7 +1970,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1497 +#: ../../library/stdtypes.rst:1498 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -1978,17 +1978,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1509 +#: ../../library/stdtypes.rst:1510 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1514 +#: ../../library/stdtypes.rst:1515 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1517 +#: ../../library/stdtypes.rst:1518 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -1998,33 +1998,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1524 +#: ../../library/stdtypes.rst:1525 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../library/stdtypes.rst:1530 +#: ../../library/stdtypes.rst:1531 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1533 +#: ../../library/stdtypes.rst:1534 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../library/stdtypes.rst:1540 +#: ../../library/stdtypes.rst:1541 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1543 +#: ../../library/stdtypes.rst:1544 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2033,27 +2033,27 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1549 +#: ../../library/stdtypes.rst:1550 msgid "" "The casefolding algorithm is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1557 +#: ../../library/stdtypes.rst:1558 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " "returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1565 +#: ../../library/stdtypes.rst:1566 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:1572 +#: ../../library/stdtypes.rst:1573 msgid "" "Return an encoded version of the string as a bytes object. Default encoding " "is ``'utf-8'``. *errors* may be given to set a different error handling " @@ -2065,24 +2065,24 @@ msgid "" "encodings`." msgstr "" -#: ../../library/stdtypes.rst:1581 +#: ../../library/stdtypes.rst:1582 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first encoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:1586 +#: ../../library/stdtypes.rst:1587 msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1589 ../../library/stdtypes.rst:2725 +#: ../../library/stdtypes.rst:1590 ../../library/stdtypes.rst:2726 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." msgstr "" -#: ../../library/stdtypes.rst:1596 +#: ../../library/stdtypes.rst:1597 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " @@ -2090,7 +2090,7 @@ msgid "" "*end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:1604 +#: ../../library/stdtypes.rst:1605 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2106,21 +2106,21 @@ msgid "" "printed." msgstr "" -#: ../../library/stdtypes.rst:1625 +#: ../../library/stdtypes.rst:1626 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " "interpreted as in slice notation. Return ``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:1631 +#: ../../library/stdtypes.rst:1632 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:1641 +#: ../../library/stdtypes.rst:1642 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2130,13 +2130,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1651 +#: ../../library/stdtypes.rst:1652 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1655 +#: ../../library/stdtypes.rst:1656 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2147,26 +2147,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1664 +#: ../../library/stdtypes.rst:1665 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../library/stdtypes.rst:1672 +#: ../../library/stdtypes.rst:1673 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../library/stdtypes.rst:1688 +#: ../../library/stdtypes.rst:1689 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1694 +#: ../../library/stdtypes.rst:1695 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2174,7 +2174,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1702 +#: ../../library/stdtypes.rst:1703 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2184,14 +2184,14 @@ msgid "" "property defined in the Unicode Standard." msgstr "" -#: ../../library/stdtypes.rst:1711 +#: ../../library/stdtypes.rst:1712 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range U" "+0000-U+007F." msgstr "" -#: ../../library/stdtypes.rst:1720 +#: ../../library/stdtypes.rst:1721 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2200,7 +2200,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1730 +#: ../../library/stdtypes.rst:1731 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2210,32 +2210,32 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1740 +#: ../../library/stdtypes.rst:1741 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1743 +#: ../../library/stdtypes.rst:1744 msgid "" "Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved " "identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../library/stdtypes.rst:1746 +#: ../../library/stdtypes.rst:1747 msgid "Example: ::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:1759 +#: ../../library/stdtypes.rst:1760 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1765 +#: ../../library/stdtypes.rst:1766 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2245,7 +2245,7 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:1775 +#: ../../library/stdtypes.rst:1776 msgid "" "Return ``True`` if all characters in the string are printable or the string " "is empty, ``False`` otherwise. Nonprintable characters are those characters " @@ -2256,20 +2256,20 @@ msgid "" "of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: ../../library/stdtypes.rst:1786 +#: ../../library/stdtypes.rst:1787 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1789 +#: ../../library/stdtypes.rst:1790 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, space" "\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../library/stdtypes.rst:1797 +#: ../../library/stdtypes.rst:1798 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2277,13 +2277,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:1804 +#: ../../library/stdtypes.rst:1805 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1820 +#: ../../library/stdtypes.rst:1821 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2291,26 +2291,26 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:1828 +#: ../../library/stdtypes.rst:1829 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1835 +#: ../../library/stdtypes.rst:1836 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:1838 +#: ../../library/stdtypes.rst:1839 msgid "" "The lowercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1844 +#: ../../library/stdtypes.rst:1845 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2319,19 +2319,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1854 +#: ../../library/stdtypes.rst:1855 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1865 +#: ../../library/stdtypes.rst:1866 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:1867 +#: ../../library/stdtypes.rst:1868 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2339,7 +2339,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:1872 +#: ../../library/stdtypes.rst:1873 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in x will be mapped to the character at " @@ -2347,7 +2347,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:1880 +#: ../../library/stdtypes.rst:1881 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2355,47 +2355,47 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:1888 +#: ../../library/stdtypes.rst:1889 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string::" msgstr "" -#: ../../library/stdtypes.rst:1902 +#: ../../library/stdtypes.rst:1903 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string::" msgstr "" -#: ../../library/stdtypes.rst:1916 +#: ../../library/stdtypes.rst:1917 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If the optional argument *count* is given, only the first *count* " "occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:1923 +#: ../../library/stdtypes.rst:1924 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " "and *end* are interpreted as in slice notation. Return ``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:1930 +#: ../../library/stdtypes.rst:1931 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1936 +#: ../../library/stdtypes.rst:1937 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1943 +#: ../../library/stdtypes.rst:1944 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2403,7 +2403,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:1951 +#: ../../library/stdtypes.rst:1952 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -2412,7 +2412,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:1960 +#: ../../library/stdtypes.rst:1961 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2421,13 +2421,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1970 +#: ../../library/stdtypes.rst:1971 msgid "" "See :meth:`str.removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1980 +#: ../../library/stdtypes.rst:1981 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -2436,7 +2436,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:1986 +#: ../../library/stdtypes.rst:1987 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -2445,23 +2445,23 @@ msgid "" "Splitting an empty string with a specified separator returns ``['']``." msgstr "" -#: ../../library/stdtypes.rst:1992 ../../library/stdtypes.rst:2008 -#: ../../library/stdtypes.rst:2060 ../../library/stdtypes.rst:2128 -#: ../../library/stdtypes.rst:2191 ../../library/stdtypes.rst:3041 -#: ../../library/stdtypes.rst:3057 ../../library/stdtypes.rst:3148 -#: ../../library/stdtypes.rst:3164 ../../library/stdtypes.rst:3189 -#: ../../library/stdtypes.rst:3203 ../../library/stdtypes.rst:3231 -#: ../../library/stdtypes.rst:3245 ../../library/stdtypes.rst:3263 -#: ../../library/stdtypes.rst:3290 ../../library/stdtypes.rst:3313 -#: ../../library/stdtypes.rst:3340 ../../library/stdtypes.rst:3382 -#: ../../library/stdtypes.rst:3406 +#: ../../library/stdtypes.rst:1993 ../../library/stdtypes.rst:2009 +#: ../../library/stdtypes.rst:2061 ../../library/stdtypes.rst:2129 +#: ../../library/stdtypes.rst:2192 ../../library/stdtypes.rst:3042 +#: ../../library/stdtypes.rst:3058 ../../library/stdtypes.rst:3149 +#: ../../library/stdtypes.rst:3165 ../../library/stdtypes.rst:3190 +#: ../../library/stdtypes.rst:3204 ../../library/stdtypes.rst:3232 +#: ../../library/stdtypes.rst:3246 ../../library/stdtypes.rst:3264 +#: ../../library/stdtypes.rst:3291 ../../library/stdtypes.rst:3314 +#: ../../library/stdtypes.rst:3341 ../../library/stdtypes.rst:3383 +#: ../../library/stdtypes.rst:3407 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/stdtypes.rst:2001 +#: ../../library/stdtypes.rst:2002 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -2471,131 +2471,131 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2023 +#: ../../library/stdtypes.rst:2024 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../library/stdtypes.rst:2027 +#: ../../library/stdtypes.rst:2028 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2031 +#: ../../library/stdtypes.rst:2032 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2031 +#: ../../library/stdtypes.rst:2032 msgid "Description" msgstr "描述" -#: ../../library/stdtypes.rst:2033 +#: ../../library/stdtypes.rst:2034 msgid "``\\n``" msgstr "``\\n``" -#: ../../library/stdtypes.rst:2033 +#: ../../library/stdtypes.rst:2034 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2035 +#: ../../library/stdtypes.rst:2036 msgid "``\\r``" msgstr "``\\r``" -#: ../../library/stdtypes.rst:2035 +#: ../../library/stdtypes.rst:2036 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2037 +#: ../../library/stdtypes.rst:2038 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: ../../library/stdtypes.rst:2037 +#: ../../library/stdtypes.rst:2038 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2039 +#: ../../library/stdtypes.rst:2040 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` 或 ``\\x0b``" -#: ../../library/stdtypes.rst:2039 +#: ../../library/stdtypes.rst:2040 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2041 +#: ../../library/stdtypes.rst:2042 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` 或 ``\\x0c``" -#: ../../library/stdtypes.rst:2041 +#: ../../library/stdtypes.rst:2042 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2044 msgid "``\\x1c``" msgstr "``\\x1c``" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2044 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2045 +#: ../../library/stdtypes.rst:2046 msgid "``\\x1d``" msgstr "``\\x1d``" -#: ../../library/stdtypes.rst:2045 +#: ../../library/stdtypes.rst:2046 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2047 +#: ../../library/stdtypes.rst:2048 msgid "``\\x1e``" msgstr "``\\x1e``" -#: ../../library/stdtypes.rst:2047 +#: ../../library/stdtypes.rst:2048 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2049 +#: ../../library/stdtypes.rst:2050 msgid "``\\x85``" msgstr "``\\x85``" -#: ../../library/stdtypes.rst:2049 +#: ../../library/stdtypes.rst:2050 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2052 msgid "``\\u2028``" msgstr "``\\u2028``" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2052 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2054 msgid "``\\u2029``" msgstr "``\\u2029``" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2054 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2058 +#: ../../library/stdtypes.rst:2059 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2067 +#: ../../library/stdtypes.rst:2068 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:2076 +#: ../../library/stdtypes.rst:2077 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2086 +#: ../../library/stdtypes.rst:2087 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -2603,7 +2603,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2094 +#: ../../library/stdtypes.rst:2095 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -2612,7 +2612,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2105 +#: ../../library/stdtypes.rst:2106 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -2620,20 +2620,20 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2118 +#: ../../library/stdtypes.rst:2119 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../library/stdtypes.rst:2125 +#: ../../library/stdtypes.rst:2126 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2133 ../../library/stdtypes.rst:3350 +#: ../../library/stdtypes.rst:2134 ../../library/stdtypes.rst:3351 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -2641,12 +2641,12 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2141 ../../library/stdtypes.rst:3358 +#: ../../library/stdtypes.rst:2142 ../../library/stdtypes.rst:3359 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:2155 +#: ../../library/stdtypes.rst:2156 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -2658,19 +2658,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2164 +#: ../../library/stdtypes.rst:2165 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2167 +#: ../../library/stdtypes.rst:2168 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2173 +#: ../../library/stdtypes.rst:2174 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -2679,13 +2679,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2179 +#: ../../library/stdtypes.rst:2180 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2185 +#: ../../library/stdtypes.rst:2186 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -2693,11 +2693,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2203 +#: ../../library/stdtypes.rst:2204 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2216 +#: ../../library/stdtypes.rst:2217 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -2708,7 +2708,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2224 +#: ../../library/stdtypes.rst:2225 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2718,7 +2718,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2230 +#: ../../library/stdtypes.rst:2231 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -2726,36 +2726,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2240 ../../library/stdtypes.rst:3461 +#: ../../library/stdtypes.rst:2241 ../../library/stdtypes.rst:3462 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2243 ../../library/stdtypes.rst:3464 +#: ../../library/stdtypes.rst:2244 ../../library/stdtypes.rst:3465 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2245 ../../library/stdtypes.rst:3466 +#: ../../library/stdtypes.rst:2246 ../../library/stdtypes.rst:3467 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2248 ../../library/stdtypes.rst:3469 +#: ../../library/stdtypes.rst:2249 ../../library/stdtypes.rst:3470 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2251 ../../library/stdtypes.rst:3472 +#: ../../library/stdtypes.rst:2252 ../../library/stdtypes.rst:3473 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../library/stdtypes.rst:2255 ../../library/stdtypes.rst:3476 +#: ../../library/stdtypes.rst:2256 ../../library/stdtypes.rst:3477 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2763,15 +2763,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2260 ../../library/stdtypes.rst:3481 +#: ../../library/stdtypes.rst:2261 ../../library/stdtypes.rst:3482 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2262 ../../library/stdtypes.rst:3483 +#: ../../library/stdtypes.rst:2263 ../../library/stdtypes.rst:3484 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2264 +#: ../../library/stdtypes.rst:2265 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -2779,279 +2779,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2273 ../../library/stdtypes.rst:3494 +#: ../../library/stdtypes.rst:2274 ../../library/stdtypes.rst:3495 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2276 ../../library/stdtypes.rst:3497 +#: ../../library/stdtypes.rst:2277 ../../library/stdtypes.rst:3498 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2285 ../../library/stdtypes.rst:3506 +#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3507 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2287 ../../library/stdtypes.rst:3508 +#: ../../library/stdtypes.rst:2288 ../../library/stdtypes.rst:3509 msgid "``'#'``" msgstr "``'#'``" -#: ../../library/stdtypes.rst:2287 ../../library/stdtypes.rst:3508 +#: ../../library/stdtypes.rst:2288 ../../library/stdtypes.rst:3509 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2290 ../../library/stdtypes.rst:3511 +#: ../../library/stdtypes.rst:2291 ../../library/stdtypes.rst:3512 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2290 ../../library/stdtypes.rst:3511 +#: ../../library/stdtypes.rst:2291 ../../library/stdtypes.rst:3512 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2292 ../../library/stdtypes.rst:3513 +#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3514 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2292 ../../library/stdtypes.rst:3513 +#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3514 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2295 ../../library/stdtypes.rst:3516 +#: ../../library/stdtypes.rst:2296 ../../library/stdtypes.rst:3517 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2295 ../../library/stdtypes.rst:3516 +#: ../../library/stdtypes.rst:2296 ../../library/stdtypes.rst:3517 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2298 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:2299 ../../library/stdtypes.rst:3520 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2298 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:2299 ../../library/stdtypes.rst:3520 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../library/stdtypes.rst:2305 ../../library/stdtypes.rst:3526 +#: ../../library/stdtypes.rst:2306 ../../library/stdtypes.rst:3527 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3529 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3530 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:2312 -#: ../../library/stdtypes.rst:3531 ../../library/stdtypes.rst:3533 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:2313 +#: ../../library/stdtypes.rst:3532 ../../library/stdtypes.rst:3534 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3533 +#: ../../library/stdtypes.rst:2313 ../../library/stdtypes.rst:3534 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3535 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3535 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3538 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3537 +#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3538 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3539 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3540 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3539 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3540 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:2328 -#: ../../library/stdtypes.rst:3547 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:2329 +#: ../../library/stdtypes.rst:3548 ../../library/stdtypes.rst:3550 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "" "Floating point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "" "Floating point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3559 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2338 +#: ../../library/stdtypes.rst:2339 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3572 +#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3573 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2341 +#: ../../library/stdtypes.rst:2342 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2344 ../../library/stdtypes.rst:3566 +#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3567 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2344 +#: ../../library/stdtypes.rst:2345 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3569 +#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3570 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2347 +#: ../../library/stdtypes.rst:2348 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:3575 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3576 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2350 ../../library/stdtypes.rst:3575 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3576 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2357 ../../library/stdtypes.rst:3582 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3583 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2361 ../../library/stdtypes.rst:3586 +#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3587 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../library/stdtypes.rst:2365 ../../library/stdtypes.rst:3590 +#: ../../library/stdtypes.rst:2366 ../../library/stdtypes.rst:3591 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2368 ../../library/stdtypes.rst:3593 +#: ../../library/stdtypes.rst:2369 ../../library/stdtypes.rst:3594 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2372 ../../library/stdtypes.rst:3597 +#: ../../library/stdtypes.rst:2373 ../../library/stdtypes.rst:3598 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../library/stdtypes.rst:2375 ../../library/stdtypes.rst:3600 +#: ../../library/stdtypes.rst:2376 ../../library/stdtypes.rst:3601 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2379 ../../library/stdtypes.rst:3604 +#: ../../library/stdtypes.rst:2380 ../../library/stdtypes.rst:3605 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2382 ../../library/stdtypes.rst:3613 +#: ../../library/stdtypes.rst:2383 ../../library/stdtypes.rst:3614 msgid "See :pep:`237`." msgstr "" -#: ../../library/stdtypes.rst:2384 +#: ../../library/stdtypes.rst:2385 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../library/stdtypes.rst:2389 +#: ../../library/stdtypes.rst:2390 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2400 +#: ../../library/stdtypes.rst:2401 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2408 +#: ../../library/stdtypes.rst:2409 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3059,17 +3059,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2413 +#: ../../library/stdtypes.rst:2414 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../library/stdtypes.rst:2419 +#: ../../library/stdtypes.rst:2420 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2423 +#: ../../library/stdtypes.rst:2424 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3077,40 +3077,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2430 +#: ../../library/stdtypes.rst:2431 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../library/stdtypes.rst:2433 +#: ../../library/stdtypes.rst:2434 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2434 +#: ../../library/stdtypes.rst:2435 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``." msgstr "" -#: ../../library/stdtypes.rst:2435 +#: ../../library/stdtypes.rst:2436 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2437 +#: ../../library/stdtypes.rst:2438 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../library/stdtypes.rst:2441 +#: ../../library/stdtypes.rst:2442 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../library/stdtypes.rst:2445 +#: ../../library/stdtypes.rst:2446 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3123,29 +3123,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2455 +#: ../../library/stdtypes.rst:2456 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2458 +#: ../../library/stdtypes.rst:2459 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2459 +#: ../../library/stdtypes.rst:2460 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2460 +#: ../../library/stdtypes.rst:2461 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2462 +#: ../../library/stdtypes.rst:2463 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2464 +#: ../../library/stdtypes.rst:2465 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3153,32 +3153,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2470 +#: ../../library/stdtypes.rst:2471 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2477 +#: ../../library/stdtypes.rst:2478 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2481 +#: ../../library/stdtypes.rst:2482 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2486 ../../library/stdtypes.rst:2580 +#: ../../library/stdtypes.rst:2487 ../../library/stdtypes.rst:2581 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2492 +#: ../../library/stdtypes.rst:2493 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default " @@ -3187,13 +3187,13 @@ msgid "" "negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2508 +#: ../../library/stdtypes.rst:2509 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../library/stdtypes.rst:2512 +#: ../../library/stdtypes.rst:2513 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -3201,14 +3201,14 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2517 +#: ../../library/stdtypes.rst:2518 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2522 +#: ../../library/stdtypes.rst:2523 msgid "" "For Python 2.x users: In the Python 2.x series, a variety of implicit " "conversions between 8-bit strings (the closest thing 2.x offers to a built-" @@ -3220,51 +3220,51 @@ msgid "" "objects will always compare unequal." msgstr "" -#: ../../library/stdtypes.rst:2535 +#: ../../library/stdtypes.rst:2536 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2539 +#: ../../library/stdtypes.rst:2540 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2544 +#: ../../library/stdtypes.rst:2545 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2547 +#: ../../library/stdtypes.rst:2548 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2548 +#: ../../library/stdtypes.rst:2549 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2549 +#: ../../library/stdtypes.rst:2550 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2550 +#: ../../library/stdtypes.rst:2551 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2552 +#: ../../library/stdtypes.rst:2553 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../library/stdtypes.rst:2556 +#: ../../library/stdtypes.rst:2557 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2558 +#: ../../library/stdtypes.rst:2559 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3272,33 +3272,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2564 +#: ../../library/stdtypes.rst:2565 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2571 +#: ../../library/stdtypes.rst:2572 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2575 +#: ../../library/stdtypes.rst:2576 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2588 +#: ../../library/stdtypes.rst:2589 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:2593 +#: ../../library/stdtypes.rst:2594 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -3306,7 +3306,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2598 +#: ../../library/stdtypes.rst:2599 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3314,11 +3314,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2607 +#: ../../library/stdtypes.rst:2608 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2612 +#: ../../library/stdtypes.rst:2613 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3327,97 +3327,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2620 +#: ../../library/stdtypes.rst:2621 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../library/stdtypes.rst:2627 +#: ../../library/stdtypes.rst:2628 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2632 +#: ../../library/stdtypes.rst:2633 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../library/stdtypes.rst:2637 +#: ../../library/stdtypes.rst:2638 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../library/stdtypes.rst:2640 +#: ../../library/stdtypes.rst:2641 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2646 +#: ../../library/stdtypes.rst:2647 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:2650 ../../library/stdtypes.rst:2749 -#: ../../library/stdtypes.rst:2771 ../../library/stdtypes.rst:2837 -#: ../../library/stdtypes.rst:2850 +#: ../../library/stdtypes.rst:2651 ../../library/stdtypes.rst:2750 +#: ../../library/stdtypes.rst:2772 ../../library/stdtypes.rst:2838 +#: ../../library/stdtypes.rst:2851 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../library/stdtypes.rst:2653 ../../library/stdtypes.rst:2761 -#: ../../library/stdtypes.rst:2774 ../../library/stdtypes.rst:2840 -#: ../../library/stdtypes.rst:2853 +#: ../../library/stdtypes.rst:2654 ../../library/stdtypes.rst:2762 +#: ../../library/stdtypes.rst:2775 ../../library/stdtypes.rst:2841 +#: ../../library/stdtypes.rst:2854 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2660 +#: ../../library/stdtypes.rst:2661 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../library/stdtypes.rst:2669 +#: ../../library/stdtypes.rst:2670 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2673 ../../library/stdtypes.rst:2695 -#: ../../library/stdtypes.rst:2825 ../../library/stdtypes.rst:2918 -#: ../../library/stdtypes.rst:2932 ../../library/stdtypes.rst:2963 -#: ../../library/stdtypes.rst:2977 ../../library/stdtypes.rst:3019 -#: ../../library/stdtypes.rst:3089 ../../library/stdtypes.rst:3107 -#: ../../library/stdtypes.rst:3135 ../../library/stdtypes.rst:3274 -#: ../../library/stdtypes.rst:3329 ../../library/stdtypes.rst:3372 -#: ../../library/stdtypes.rst:3393 ../../library/stdtypes.rst:3415 -#: ../../library/stdtypes.rst:3617 +#: ../../library/stdtypes.rst:2674 ../../library/stdtypes.rst:2696 +#: ../../library/stdtypes.rst:2826 ../../library/stdtypes.rst:2919 +#: ../../library/stdtypes.rst:2933 ../../library/stdtypes.rst:2964 +#: ../../library/stdtypes.rst:2978 ../../library/stdtypes.rst:3020 +#: ../../library/stdtypes.rst:3090 ../../library/stdtypes.rst:3108 +#: ../../library/stdtypes.rst:3136 ../../library/stdtypes.rst:3275 +#: ../../library/stdtypes.rst:3330 ../../library/stdtypes.rst:3373 +#: ../../library/stdtypes.rst:3394 ../../library/stdtypes.rst:3416 +#: ../../library/stdtypes.rst:3618 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../library/stdtypes.rst:2682 +#: ../../library/stdtypes.rst:2683 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../library/stdtypes.rst:2691 +#: ../../library/stdtypes.rst:2692 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2704 +#: ../../library/stdtypes.rst:2705 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3428,25 +3428,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2712 +#: ../../library/stdtypes.rst:2713 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first decoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:2718 +#: ../../library/stdtypes.rst:2719 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary bytes or " "bytearray object." msgstr "" -#: ../../library/stdtypes.rst:2722 +#: ../../library/stdtypes.rst:2723 msgid "Added support for keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:2733 +#: ../../library/stdtypes.rst:2734 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3454,11 +3454,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2738 +#: ../../library/stdtypes.rst:2739 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2744 +#: ../../library/stdtypes.rst:2745 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -3466,20 +3466,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2754 +#: ../../library/stdtypes.rst:2755 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:2768 +#: ../../library/stdtypes.rst:2769 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2781 +#: ../../library/stdtypes.rst:2782 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -3489,7 +3489,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2792 +#: ../../library/stdtypes.rst:2793 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -3497,7 +3497,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2803 +#: ../../library/stdtypes.rst:2804 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3506,24 +3506,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2810 ../../library/stdtypes.rst:2867 +#: ../../library/stdtypes.rst:2811 ../../library/stdtypes.rst:2868 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2816 +#: ../../library/stdtypes.rst:2817 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:2820 +#: ../../library/stdtypes.rst:2821 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2832 +#: ../../library/stdtypes.rst:2833 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3531,13 +3531,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2847 +#: ../../library/stdtypes.rst:2848 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2860 +#: ../../library/stdtypes.rst:2861 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3546,7 +3546,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2873 +#: ../../library/stdtypes.rst:2874 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3554,11 +3554,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2878 +#: ../../library/stdtypes.rst:2879 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2884 +#: ../../library/stdtypes.rst:2885 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -3566,22 +3566,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2889 +#: ../../library/stdtypes.rst:2890 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2892 +#: ../../library/stdtypes.rst:2893 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2898 +#: ../../library/stdtypes.rst:2899 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2902 +#: ../../library/stdtypes.rst:2903 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -3590,7 +3590,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2911 +#: ../../library/stdtypes.rst:2912 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3598,7 +3598,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2925 +#: ../../library/stdtypes.rst:2926 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3606,7 +3606,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2939 +#: ../../library/stdtypes.rst:2940 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3616,14 +3616,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2951 +#: ../../library/stdtypes.rst:2952 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2970 +#: ../../library/stdtypes.rst:2971 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3631,7 +3631,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2984 +#: ../../library/stdtypes.rst:2985 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -3641,7 +3641,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:2995 +#: ../../library/stdtypes.rst:2996 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3651,14 +3651,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3007 +#: ../../library/stdtypes.rst:3008 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3026 +#: ../../library/stdtypes.rst:3027 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -3667,7 +3667,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3032 +#: ../../library/stdtypes.rst:3033 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -3678,7 +3678,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3050 +#: ../../library/stdtypes.rst:3051 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -3688,7 +3688,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3071 +#: ../../library/stdtypes.rst:3072 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *chars* argument is a binary sequence specifying the set of " @@ -3698,13 +3698,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3084 +#: ../../library/stdtypes.rst:3085 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3093 +#: ../../library/stdtypes.rst:3094 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -3712,14 +3712,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3101 +#: ../../library/stdtypes.rst:3102 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../library/stdtypes.rst:3114 +#: ../../library/stdtypes.rst:3115 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -3735,7 +3735,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3142 +#: ../../library/stdtypes.rst:3143 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3744,7 +3744,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3159 +#: ../../library/stdtypes.rst:3160 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3752,35 +3752,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3175 +#: ../../library/stdtypes.rst:3176 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../library/stdtypes.rst:3185 +#: ../../library/stdtypes.rst:3186 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3200 +#: ../../library/stdtypes.rst:3201 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:3210 ../../library/stdtypes.rst:3252 -#: ../../library/stdtypes.rst:3268 ../../library/stdtypes.rst:3318 -#: ../../library/stdtypes.rst:3387 +#: ../../library/stdtypes.rst:3211 ../../library/stdtypes.rst:3253 +#: ../../library/stdtypes.rst:3269 ../../library/stdtypes.rst:3319 +#: ../../library/stdtypes.rst:3388 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3218 +#: ../../library/stdtypes.rst:3219 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3788,27 +3788,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3227 +#: ../../library/stdtypes.rst:3228 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../library/stdtypes.rst:3242 +#: ../../library/stdtypes.rst:3243 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../library/stdtypes.rst:3260 +#: ../../library/stdtypes.rst:3261 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3285 +#: ../../library/stdtypes.rst:3286 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -3816,20 +3816,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3297 +#: ../../library/stdtypes.rst:3298 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:3310 +#: ../../library/stdtypes.rst:3311 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../library/stdtypes.rst:3322 +#: ../../library/stdtypes.rst:3323 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3837,14 +3837,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3336 +#: ../../library/stdtypes.rst:3337 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../library/stdtypes.rst:3345 +#: ../../library/stdtypes.rst:3346 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3852,13 +3852,13 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3379 +#: ../../library/stdtypes.rst:3380 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3400 +#: ../../library/stdtypes.rst:3401 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -3867,11 +3867,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3422 +#: ../../library/stdtypes.rst:3423 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3439 +#: ../../library/stdtypes.rst:3440 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -3879,7 +3879,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3444 +#: ../../library/stdtypes.rst:3445 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3889,7 +3889,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3451 +#: ../../library/stdtypes.rst:3452 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3897,7 +3897,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3485 +#: ../../library/stdtypes.rst:3486 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -3905,73 +3905,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3559 +#: ../../library/stdtypes.rst:3560 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:3563 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:3563 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3566 +#: ../../library/stdtypes.rst:3567 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3569 +#: ../../library/stdtypes.rst:3570 msgid "" "Bytes (converts any Python object using ``repr(obj)." "encode('ascii','backslashreplace)``)." msgstr "" -#: ../../library/stdtypes.rst:3572 +#: ../../library/stdtypes.rst:3573 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3572 +#: ../../library/stdtypes.rst:3573 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3607 +#: ../../library/stdtypes.rst:3608 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3610 +#: ../../library/stdtypes.rst:3611 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3622 +#: ../../library/stdtypes.rst:3623 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3629 +#: ../../library/stdtypes.rst:3630 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3631 +#: ../../library/stdtypes.rst:3632 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../library/stdtypes.rst:3637 +#: ../../library/stdtypes.rst:3638 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/stdtypes.rst:3641 +#: ../../library/stdtypes.rst:3642 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -3979,7 +3979,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3646 +#: ../../library/stdtypes.rst:3647 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If " "``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is " @@ -3989,13 +3989,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3653 +#: ../../library/stdtypes.rst:3654 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3666 +#: ../../library/stdtypes.rst:3667 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4006,82 +4006,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3675 +#: ../../library/stdtypes.rst:3676 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3687 +#: ../../library/stdtypes.rst:3688 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3708 +#: ../../library/stdtypes.rst:3709 msgid "" "One-dimensional memoryviews of hashable (read-only) types with formats 'B', " "'b' or 'c' are also hashable. The hash is defined as ``hash(m) == hash(m." "tobytes())``::" msgstr "" -#: ../../library/stdtypes.rst:3720 +#: ../../library/stdtypes.rst:3721 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3724 +#: ../../library/stdtypes.rst:3725 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3728 +#: ../../library/stdtypes.rst:3729 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3731 +#: ../../library/stdtypes.rst:3732 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3735 +#: ../../library/stdtypes.rst:3736 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../library/stdtypes.rst:3739 +#: ../../library/stdtypes.rst:3740 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../library/stdtypes.rst:3758 +#: ../../library/stdtypes.rst:3759 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../library/stdtypes.rst:3774 +#: ../../library/stdtypes.rst:3775 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3777 +#: ../../library/stdtypes.rst:3778 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3783 +#: ../../library/stdtypes.rst:3784 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../library/stdtypes.rst:3792 +#: ../../library/stdtypes.rst:3793 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4089,7 +4089,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3797 +#: ../../library/stdtypes.rst:3798 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -4098,36 +4098,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3806 +#: ../../library/stdtypes.rst:3807 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3815 +#: ../../library/stdtypes.rst:3816 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:3822 +#: ../../library/stdtypes.rst:3823 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3832 +#: ../../library/stdtypes.rst:3833 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../library/stdtypes.rst:3839 +#: ../../library/stdtypes.rst:3840 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3858 +#: ../../library/stdtypes.rst:3859 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -4136,20 +4136,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3864 +#: ../../library/stdtypes.rst:3865 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release()` itself which can be called " "multiple times)::" msgstr "" -#: ../../library/stdtypes.rst:3875 +#: ../../library/stdtypes.rst:3876 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3891 +#: ../../library/stdtypes.rst:3892 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -4158,57 +4158,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3897 +#: ../../library/stdtypes.rst:3898 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " "'c'). The byte length of the result must be the same as the original length." msgstr "" -#: ../../library/stdtypes.rst:3902 +#: ../../library/stdtypes.rst:3903 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3925 +#: ../../library/stdtypes.rst:3926 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3938 +#: ../../library/stdtypes.rst:3939 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3964 +#: ../../library/stdtypes.rst:3965 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3978 +#: ../../library/stdtypes.rst:3979 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3981 +#: ../../library/stdtypes.rst:3982 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:3985 +#: ../../library/stdtypes.rst:3986 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:3996 +#: ../../library/stdtypes.rst:3997 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../library/stdtypes.rst:4015 +#: ../../library/stdtypes.rst:4016 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4032 +#: ../../library/stdtypes.rst:4033 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4036 +#: ../../library/stdtypes.rst:4037 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -4216,59 +4216,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4041 +#: ../../library/stdtypes.rst:4042 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../library/stdtypes.rst:4047 +#: ../../library/stdtypes.rst:4048 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4060 +#: ../../library/stdtypes.rst:4061 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4065 +#: ../../library/stdtypes.rst:4066 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../library/stdtypes.rst:4068 ../../library/stdtypes.rst:4076 +#: ../../library/stdtypes.rst:4069 ../../library/stdtypes.rst:4077 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4073 +#: ../../library/stdtypes.rst:4074 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../library/stdtypes.rst:4081 +#: ../../library/stdtypes.rst:4082 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4085 +#: ../../library/stdtypes.rst:4086 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4091 +#: ../../library/stdtypes.rst:4092 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4097 +#: ../../library/stdtypes.rst:4098 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4105 +#: ../../library/stdtypes.rst:4106 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4109 +#: ../../library/stdtypes.rst:4110 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4278,7 +4278,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4116 +#: ../../library/stdtypes.rst:4117 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -4286,7 +4286,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4121 +#: ../../library/stdtypes.rst:4122 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4298,18 +4298,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4129 +#: ../../library/stdtypes.rst:4130 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../library/stdtypes.rst:4133 +#: ../../library/stdtypes.rst:4134 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4138 +#: ../../library/stdtypes.rst:4139 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -4317,92 +4317,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4144 +#: ../../library/stdtypes.rst:4145 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4146 +#: ../../library/stdtypes.rst:4147 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4147 +#: ../../library/stdtypes.rst:4148 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4148 +#: ../../library/stdtypes.rst:4149 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4150 +#: ../../library/stdtypes.rst:4151 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4155 +#: ../../library/stdtypes.rst:4156 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4159 +#: ../../library/stdtypes.rst:4160 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4163 +#: ../../library/stdtypes.rst:4164 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4167 +#: ../../library/stdtypes.rst:4168 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../library/stdtypes.rst:4173 +#: ../../library/stdtypes.rst:4174 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4177 +#: ../../library/stdtypes.rst:4178 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4183 +#: ../../library/stdtypes.rst:4184 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4187 +#: ../../library/stdtypes.rst:4188 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4193 +#: ../../library/stdtypes.rst:4194 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4198 +#: ../../library/stdtypes.rst:4199 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4203 +#: ../../library/stdtypes.rst:4204 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4208 +#: ../../library/stdtypes.rst:4209 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4212 +#: ../../library/stdtypes.rst:4213 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4215 +#: ../../library/stdtypes.rst:4216 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4412,7 +4412,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4222 +#: ../../library/stdtypes.rst:4223 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -4422,14 +4422,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4229 +#: ../../library/stdtypes.rst:4230 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../library/stdtypes.rst:4233 +#: ../../library/stdtypes.rst:4234 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -4437,71 +4437,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4238 +#: ../../library/stdtypes.rst:4239 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../library/stdtypes.rst:4241 +#: ../../library/stdtypes.rst:4242 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4243 +#: ../../library/stdtypes.rst:4244 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../library/stdtypes.rst:4247 +#: ../../library/stdtypes.rst:4248 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4253 +#: ../../library/stdtypes.rst:4254 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4258 +#: ../../library/stdtypes.rst:4259 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4263 +#: ../../library/stdtypes.rst:4264 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4268 +#: ../../library/stdtypes.rst:4269 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4272 +#: ../../library/stdtypes.rst:4273 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4276 +#: ../../library/stdtypes.rst:4277 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4281 +#: ../../library/stdtypes.rst:4282 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4285 +#: ../../library/stdtypes.rst:4286 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4290 +#: ../../library/stdtypes.rst:4291 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4293 +#: ../../library/stdtypes.rst:4294 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4509,18 +4509,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4298 +#: ../../library/stdtypes.rst:4299 msgid "" "Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :" "meth:`discard` methods may be a set. To support searching for an equivalent " "frozenset, a temporary one is created from *elem*." msgstr "" -#: ../../library/stdtypes.rst:4306 +#: ../../library/stdtypes.rst:4307 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4316 +#: ../../library/stdtypes.rst:4317 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4529,7 +4529,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4322 +#: ../../library/stdtypes.rst:4323 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4541,40 +4541,40 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4331 +#: ../../library/stdtypes.rst:4332 msgid "" "Dictionaries can be created by placing a comma-separated list of ``key: " "value`` pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` " "or ``{4098: 'jack', 4127: 'sjoerd'}``, or by the :class:`dict` constructor." msgstr "" -#: ../../library/stdtypes.rst:4339 +#: ../../library/stdtypes.rst:4340 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4342 +#: ../../library/stdtypes.rst:4343 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4344 +#: ../../library/stdtypes.rst:4345 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4346 +#: ../../library/stdtypes.rst:4347 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4347 +#: ../../library/stdtypes.rst:4348 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4350 +#: ../../library/stdtypes.rst:4351 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4586,7 +4586,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4360 +#: ../../library/stdtypes.rst:4361 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4594,39 +4594,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4365 +#: ../../library/stdtypes.rst:4366 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4377 +#: ../../library/stdtypes.rst:4378 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4381 +#: ../../library/stdtypes.rst:4382 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4386 +#: ../../library/stdtypes.rst:4387 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4390 +#: ../../library/stdtypes.rst:4391 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4394 +#: ../../library/stdtypes.rst:4395 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4399 +#: ../../library/stdtypes.rst:4400 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4637,51 +4637,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4417 +#: ../../library/stdtypes.rst:4418 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4423 +#: ../../library/stdtypes.rst:4424 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4427 +#: ../../library/stdtypes.rst:4428 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4432 +#: ../../library/stdtypes.rst:4433 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4436 +#: ../../library/stdtypes.rst:4437 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4440 +#: ../../library/stdtypes.rst:4441 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4445 +#: ../../library/stdtypes.rst:4446 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4449 +#: ../../library/stdtypes.rst:4450 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4453 +#: ../../library/stdtypes.rst:4454 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4455 +#: ../../library/stdtypes.rst:4456 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4690,70 +4690,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4463 +#: ../../library/stdtypes.rst:4464 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4469 +#: ../../library/stdtypes.rst:4470 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4474 +#: ../../library/stdtypes.rst:4475 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4479 +#: ../../library/stdtypes.rst:4480 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4485 +#: ../../library/stdtypes.rst:4486 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4488 +#: ../../library/stdtypes.rst:4489 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4492 +#: ../../library/stdtypes.rst:4493 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4498 +#: ../../library/stdtypes.rst:4499 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4505 +#: ../../library/stdtypes.rst:4506 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4511 +#: ../../library/stdtypes.rst:4512 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4514 +#: ../../library/stdtypes.rst:4515 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4761,71 +4761,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4521 +#: ../../library/stdtypes.rst:4522 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4524 +#: ../../library/stdtypes.rst:4525 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4534 +#: ../../library/stdtypes.rst:4535 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4542 +#: ../../library/stdtypes.rst:4543 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4548 +#: ../../library/stdtypes.rst:4549 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4552 +#: ../../library/stdtypes.rst:4553 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4570 +#: ../../library/stdtypes.rst:4571 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4574 +#: ../../library/stdtypes.rst:4575 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4586 +#: ../../library/stdtypes.rst:4587 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4591 +#: ../../library/stdtypes.rst:4592 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4598 +#: ../../library/stdtypes.rst:4599 msgid "Dictionary view objects" msgstr "" -#: ../../library/stdtypes.rst:4600 +#: ../../library/stdtypes.rst:4601 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4833,23 +4833,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4605 +#: ../../library/stdtypes.rst:4606 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4610 +#: ../../library/stdtypes.rst:4611 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4614 +#: ../../library/stdtypes.rst:4615 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4617 +#: ../../library/stdtypes.rst:4618 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4857,39 +4857,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4622 +#: ../../library/stdtypes.rst:4623 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4625 +#: ../../library/stdtypes.rst:4626 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4630 +#: ../../library/stdtypes.rst:4631 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4635 +#: ../../library/stdtypes.rst:4636 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4638 +#: ../../library/stdtypes.rst:4639 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4643 +#: ../../library/stdtypes.rst:4644 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4648 +#: ../../library/stdtypes.rst:4649 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4899,15 +4899,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4655 +#: ../../library/stdtypes.rst:4656 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4696 +#: ../../library/stdtypes.rst:4697 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4703 +#: ../../library/stdtypes.rst:4704 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4915,7 +4915,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4711 +#: ../../library/stdtypes.rst:4712 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4923,14 +4923,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4716 +#: ../../library/stdtypes.rst:4717 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4720 +#: ../../library/stdtypes.rst:4721 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4940,7 +4940,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4730 +#: ../../library/stdtypes.rst:4731 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4949,7 +4949,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4735 +#: ../../library/stdtypes.rst:4736 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4960,7 +4960,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4742 +#: ../../library/stdtypes.rst:4743 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4969,7 +4969,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4748 +#: ../../library/stdtypes.rst:4749 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -4978,7 +4978,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4754 +#: ../../library/stdtypes.rst:4755 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -4988,7 +4988,7 @@ msgid "" "by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4761 +#: ../../library/stdtypes.rst:4762 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -4997,30 +4997,30 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4769 +#: ../../library/stdtypes.rst:4770 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4774 +#: ../../library/stdtypes.rst:4775 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4781 +#: ../../library/stdtypes.rst:4782 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:4788 msgid "" "``GenericAlias`` objects are created by subscripting a class (usually a " "container), such as ``list[int]``. They are intended primarily for :term:" "`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4791 +#: ../../library/stdtypes.rst:4792 msgid "" "Usually, the :ref:`subscription ` of container objects calls " "the method :meth:`__getitem__` of the object. However, the subscription of " @@ -5029,35 +5029,35 @@ msgid "" "return a ``GenericAlias`` object." msgstr "" -#: ../../library/stdtypes.rst:4798 +#: ../../library/stdtypes.rst:4799 msgid "" "If the :meth:`__getitem__` of the class' metaclass is present, it will take " "precedence over the :meth:`__class_getitem__` defined in the class (see :pep:" "`560` for more details)." msgstr "" -#: ../../library/stdtypes.rst:4802 +#: ../../library/stdtypes.rst:4803 msgid "" "The ``GenericAlias`` object acts as a proxy for :term:`generic types " "`, implementing *parameterized generics* - a specific instance " "of a generic which provides the types for container elements." msgstr "" -#: ../../library/stdtypes.rst:4806 +#: ../../library/stdtypes.rst:4807 msgid "" "The user-exposed type for the ``GenericAlias`` object can be accessed from :" "class:`types.GenericAlias` and used for :func:`isinstance` checks. It can " "also be used to create ``GenericAlias`` objects directly." msgstr "" -#: ../../library/stdtypes.rst:4812 +#: ../../library/stdtypes.rst:4813 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` containing elements of " "types *X*, *Y*, and more depending on the ``T`` used. For example, a " "function expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4820 +#: ../../library/stdtypes.rst:4821 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5065,13 +5065,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4828 +#: ../../library/stdtypes.rst:4829 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4836 +#: ../../library/stdtypes.rst:4837 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating an " @@ -5080,25 +5080,25 @@ msgid "" "without errors::" msgstr "" -#: ../../library/stdtypes.rst:4846 +#: ../../library/stdtypes.rst:4847 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4857 +#: ../../library/stdtypes.rst:4858 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4865 +#: ../../library/stdtypes.rst:4866 msgid "" "The :meth:`__getitem__` method of generics will raise an exception to " "disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4873 +#: ../../library/stdtypes.rst:4874 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " @@ -5106,214 +5106,214 @@ msgid "" "__args__>`. ::" msgstr "" -#: ../../library/stdtypes.rst:4884 +#: ../../library/stdtypes.rst:4885 msgid "Standard Generic Collections" msgstr "" -#: ../../library/stdtypes.rst:4886 +#: ../../library/stdtypes.rst:4887 msgid "These standard library collections support parameterized generics." msgstr "" -#: ../../library/stdtypes.rst:4888 +#: ../../library/stdtypes.rst:4889 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4889 +#: ../../library/stdtypes.rst:4890 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4890 +#: ../../library/stdtypes.rst:4891 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4891 +#: ../../library/stdtypes.rst:4892 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4892 +#: ../../library/stdtypes.rst:4893 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4893 +#: ../../library/stdtypes.rst:4894 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4894 +#: ../../library/stdtypes.rst:4895 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4895 +#: ../../library/stdtypes.rst:4896 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4896 +#: ../../library/stdtypes.rst:4897 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4897 +#: ../../library/stdtypes.rst:4898 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4898 +#: ../../library/stdtypes.rst:4899 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4899 +#: ../../library/stdtypes.rst:4900 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4900 +#: ../../library/stdtypes.rst:4901 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4901 +#: ../../library/stdtypes.rst:4902 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4902 +#: ../../library/stdtypes.rst:4903 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4903 +#: ../../library/stdtypes.rst:4904 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4904 +#: ../../library/stdtypes.rst:4905 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4905 +#: ../../library/stdtypes.rst:4906 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4906 +#: ../../library/stdtypes.rst:4907 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4907 +#: ../../library/stdtypes.rst:4908 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4908 +#: ../../library/stdtypes.rst:4909 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4909 +#: ../../library/stdtypes.rst:4910 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4910 +#: ../../library/stdtypes.rst:4911 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4912 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4912 +#: ../../library/stdtypes.rst:4913 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4913 +#: ../../library/stdtypes.rst:4914 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4914 +#: ../../library/stdtypes.rst:4915 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4915 +#: ../../library/stdtypes.rst:4916 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4916 +#: ../../library/stdtypes.rst:4917 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4917 +#: ../../library/stdtypes.rst:4918 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4919 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4919 +#: ../../library/stdtypes.rst:4920 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4920 +#: ../../library/stdtypes.rst:4921 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4921 +#: ../../library/stdtypes.rst:4922 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4923 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4924 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4925 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4926 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4930 msgid "Special Attributes of Generic Alias" msgstr "" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4932 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4936 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4944 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`__class_getitem__` of the generic container::" msgstr "" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4954 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4965 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4971 msgid ":pep:`585` -- \"Type Hinting Generics In Standard Collections\"" msgstr "" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4972 msgid ":meth:`__class_getitem__` -- Used to implement parameterized generics." msgstr "" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4973 msgid ":ref:`generics` -- Generics in the :mod:`typing` module." msgstr "" -#: ../../library/stdtypes.rst:4980 +#: ../../library/stdtypes.rst:4981 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:4987 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5322,7 +5322,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:4993 +#: ../../library/stdtypes.rst:4994 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5330,76 +5330,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5003 +#: ../../library/stdtypes.rst:5004 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5005 +#: ../../library/stdtypes.rst:5006 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5009 +#: ../../library/stdtypes.rst:5010 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5013 +#: ../../library/stdtypes.rst:5014 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5017 +#: ../../library/stdtypes.rst:5018 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5021 +#: ../../library/stdtypes.rst:5022 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5028 +#: ../../library/stdtypes.rst:5029 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5034 +#: ../../library/stdtypes.rst:5035 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5042 +#: ../../library/stdtypes.rst:5043 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5055 +#: ../../library/stdtypes.rst:5056 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5073 +#: ../../library/stdtypes.rst:5074 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5081 +#: ../../library/stdtypes.rst:5082 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5083 +#: ../../library/stdtypes.rst:5084 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5090 +#: ../../library/stdtypes.rst:5091 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5092 +#: ../../library/stdtypes.rst:5093 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5410,7 +5410,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5099 +#: ../../library/stdtypes.rst:5100 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5421,32 +5421,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5107 +#: ../../library/stdtypes.rst:5108 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5115 +#: ../../library/stdtypes.rst:5116 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5117 +#: ../../library/stdtypes.rst:5118 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5123 +#: ../../library/stdtypes.rst:5124 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5125 +#: ../../library/stdtypes.rst:5126 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5128 +#: ../../library/stdtypes.rst:5129 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5454,15 +5454,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5132 +#: ../../library/stdtypes.rst:5133 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5138 +#: ../../library/stdtypes.rst:5139 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5142 +#: ../../library/stdtypes.rst:5143 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5470,7 +5470,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5147 +#: ../../library/stdtypes.rst:5148 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5482,7 +5482,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5156 +#: ../../library/stdtypes.rst:5157 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5492,15 +5492,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5176 ../../library/stdtypes.rst:5207 +#: ../../library/stdtypes.rst:5177 ../../library/stdtypes.rst:5208 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5184 +#: ../../library/stdtypes.rst:5185 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5190 +#: ../../library/stdtypes.rst:5191 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5510,23 +5510,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5197 +#: ../../library/stdtypes.rst:5198 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5204 +#: ../../library/stdtypes.rst:5205 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5213 +#: ../../library/stdtypes.rst:5214 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5219 +#: ../../library/stdtypes.rst:5220 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5534,30 +5534,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5224 +#: ../../library/stdtypes.rst:5225 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5230 +#: ../../library/stdtypes.rst:5231 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5232 +#: ../../library/stdtypes.rst:5233 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5236 +#: ../../library/stdtypes.rst:5237 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5243 +#: ../../library/stdtypes.rst:5244 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5245 +#: ../../library/stdtypes.rst:5246 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5565,15 +5565,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5250 +#: ../../library/stdtypes.rst:5251 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5256 +#: ../../library/stdtypes.rst:5257 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5258 +#: ../../library/stdtypes.rst:5259 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5581,15 +5581,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5263 +#: ../../library/stdtypes.rst:5264 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5269 +#: ../../library/stdtypes.rst:5270 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5271 +#: ../../library/stdtypes.rst:5272 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5600,104 +5600,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5284 +#: ../../library/stdtypes.rst:5285 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5290 +#: ../../library/stdtypes.rst:5291 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5292 +#: ../../library/stdtypes.rst:5293 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5299 +#: ../../library/stdtypes.rst:5300 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5301 +#: ../../library/stdtypes.rst:5302 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5308 +#: ../../library/stdtypes.rst:5309 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5314 +#: ../../library/stdtypes.rst:5315 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5319 +#: ../../library/stdtypes.rst:5320 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5324 +#: ../../library/stdtypes.rst:5325 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5330 +#: ../../library/stdtypes.rst:5331 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5338 +#: ../../library/stdtypes.rst:5339 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5344 +#: ../../library/stdtypes.rst:5345 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5351 +#: ../../library/stdtypes.rst:5352 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5360 +#: ../../library/stdtypes.rst:5361 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5361 +#: ../../library/stdtypes.rst:5362 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5364 +#: ../../library/stdtypes.rst:5365 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5367 +#: ../../library/stdtypes.rst:5368 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5369 +#: ../../library/stdtypes.rst:5370 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5372 +#: ../../library/stdtypes.rst:5373 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/reference/datamodel.po b/reference/datamodel.po index 7cdb52b4d8..3cc61a671c 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-19 00:09+0000\n" +"POT-Creation-Date: 2021-11-23 00:09+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-" @@ -841,13 +841,13 @@ msgstr "" msgid "" "A function or method which uses the :keyword:`yield` statement (see section :" "ref:`yield`) is called a :dfn:`generator function`. Such a function, when " -"called, always returns an iterator object which can be used to execute the " -"body of the function: calling the iterator's :meth:`iterator.__next__` " -"method will cause the function to execute until it provides a value using " -"the :keyword:`!yield` statement. When the function executes a :keyword:" -"`return` statement or falls off the end, a :exc:`StopIteration` exception is " -"raised and the iterator will have reached the end of the set of values to be " -"returned." +"called, always returns an :term:`iterator` object which can be used to " +"execute the body of the function: calling the iterator's :meth:`iterator." +"__next__` method will cause the function to execute until it provides a " +"value using the :keyword:`!yield` statement. When the function executes a :" +"keyword:`return` statement or falls off the end, a :exc:`StopIteration` " +"exception is raised and the iterator will have reached the end of the set of " +"values to be returned." msgstr "" #: ../../reference/datamodel.rst:667 @@ -871,9 +871,9 @@ msgstr "" msgid "" "A function or method which is defined using :keyword:`async def` and which " "uses the :keyword:`yield` statement is called a :dfn:`asynchronous generator " -"function`. Such a function, when called, returns an asynchronous iterator " -"object which can be used in an :keyword:`async for` statement to execute the " -"body of the function." +"function`. Such a function, when called, returns an :term:`asynchronous " +"iterator` object which can be used in an :keyword:`async for` statement to " +"execute the body of the function." msgstr "" #: ../../reference/datamodel.rst:680 @@ -2919,27 +2919,20 @@ msgstr "" #: ../../reference/datamodel.rst:2467 msgid "" -"This method is called when an iterator is required for a container. This " -"method should return a new iterator object that can iterate over all the " -"objects in the container. For mappings, it should iterate over the keys of " -"the container." +"This method is called when an :term:`iterator` is required for a container. " +"This method should return a new iterator object that can iterate over all " +"the objects in the container. For mappings, it should iterate over the keys " +"of the container." msgstr "" -#: ../../reference/datamodel.rst:2471 -msgid "" -"Iterator objects also need to implement this method; they are required to " -"return themselves. For more information on iterator objects, see :ref:" -"`typeiter`." -msgstr "" - -#: ../../reference/datamodel.rst:2477 +#: ../../reference/datamodel.rst:2475 msgid "" "Called (if present) by the :func:`reversed` built-in to implement reverse " "iteration. It should return a new iterator object that iterates over all " "the objects in the container in reverse order." msgstr "" -#: ../../reference/datamodel.rst:2481 +#: ../../reference/datamodel.rst:2479 msgid "" "If the :meth:`__reversed__` method is not provided, the :func:`reversed` " "built-in will fall back to using the sequence protocol (:meth:`__len__` and :" @@ -2948,7 +2941,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:2488 +#: ../../reference/datamodel.rst:2486 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -2956,14 +2949,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:2495 +#: ../../reference/datamodel.rst:2493 msgid "" "Called to implement membership test operators. Should return true if *item* " "is in *self*, false otherwise. For mapping objects, this should consider " "the keys of the mapping rather than the values or the key-item pairs." msgstr "" -#: ../../reference/datamodel.rst:2499 +#: ../../reference/datamodel.rst:2497 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -2971,11 +2964,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:2508 +#: ../../reference/datamodel.rst:2506 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:2510 +#: ../../reference/datamodel.rst:2508 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -2983,7 +2976,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:2536 +#: ../../reference/datamodel.rst:2534 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -2996,13 +2989,13 @@ msgid "" "version of the built-in :func:`pow` function is to be supported." msgstr "" -#: ../../reference/datamodel.rst:2547 +#: ../../reference/datamodel.rst:2545 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return ``NotImplemented``." msgstr "" -#: ../../reference/datamodel.rst:2570 +#: ../../reference/datamodel.rst:2568 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -3014,13 +3007,13 @@ msgid "" "__rsub__(x)`` is called if ``x.__sub__(y)`` returns *NotImplemented*." msgstr "" -#: ../../reference/datamodel.rst:2581 +#: ../../reference/datamodel.rst:2579 msgid "" "Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the " "coercion rules would become too complicated)." msgstr "" -#: ../../reference/datamodel.rst:2586 +#: ../../reference/datamodel.rst:2584 msgid "" "If the right operand's type is a subclass of the left operand's type and " "that subclass provides a different implementation of the reflected method " @@ -3029,7 +3022,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:2607 +#: ../../reference/datamodel.rst:2605 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3045,19 +3038,19 @@ msgid "" "fact part of the data model." msgstr "" -#: ../../reference/datamodel.rst:2628 +#: ../../reference/datamodel.rst:2626 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:2641 +#: ../../reference/datamodel.rst:2639 msgid "" "Called to implement the built-in functions :func:`complex`, :func:`int` and :" "func:`float`. Should return a value of the appropriate type." msgstr "" -#: ../../reference/datamodel.rst:2648 +#: ../../reference/datamodel.rst:2646 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3066,14 +3059,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:2654 +#: ../../reference/datamodel.rst:2652 msgid "" "If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not " "defined then corresponding built-in functions :func:`int`, :func:`float` " "and :func:`complex` fall back to :meth:`__index__`." msgstr "" -#: ../../reference/datamodel.rst:2666 +#: ../../reference/datamodel.rst:2664 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -3082,17 +3075,17 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:2672 +#: ../../reference/datamodel.rst:2670 msgid "" "The built-in function :func:`int` falls back to :meth:`__trunc__` if " "neither :meth:`__int__` nor :meth:`__index__` is defined." msgstr "" -#: ../../reference/datamodel.rst:2679 +#: ../../reference/datamodel.rst:2677 msgid "With Statement Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2681 +#: ../../reference/datamodel.rst:2679 msgid "" "A :dfn:`context manager` is an object that defines the runtime context to be " "established when executing a :keyword:`with` statement. The context manager " @@ -3102,32 +3095,32 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:2692 +#: ../../reference/datamodel.rst:2690 msgid "" "Typical uses of context managers include saving and restoring various kinds " "of global state, locking and unlocking resources, closing opened files, etc." msgstr "" -#: ../../reference/datamodel.rst:2695 +#: ../../reference/datamodel.rst:2693 msgid "" "For more information on context managers, see :ref:`typecontextmanager`." msgstr "" -#: ../../reference/datamodel.rst:2700 +#: ../../reference/datamodel.rst:2698 msgid "" "Enter the runtime context related to this object. The :keyword:`with` " "statement will bind this method's return value to the target(s) specified in " "the :keyword:`!as` clause of the statement, if any." msgstr "" -#: ../../reference/datamodel.rst:2707 +#: ../../reference/datamodel.rst:2705 msgid "" "Exit the runtime context related to this object. The parameters describe the " "exception that caused the context to be exited. If the context was exited " "without an exception, all three arguments will be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:2711 +#: ../../reference/datamodel.rst:2709 msgid "" "If an exception is supplied, and the method wishes to suppress the exception " "(i.e., prevent it from being propagated), it should return a true value. " @@ -3135,27 +3128,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:2715 +#: ../../reference/datamodel.rst:2713 msgid "" "Note that :meth:`__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:2722 +#: ../../reference/datamodel.rst:2720 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/datamodel.rst:2722 +#: ../../reference/datamodel.rst:2720 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2729 +#: ../../reference/datamodel.rst:2727 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:2731 +#: ../../reference/datamodel.rst:2729 msgid "" "When using a class name in a pattern, positional arguments in the pattern " "are not allowed by default, i.e. ``case MyClass(x, y)`` is typically invalid " @@ -3163,7 +3156,7 @@ msgid "" "patterns, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:2738 +#: ../../reference/datamodel.rst:2736 msgid "" "This class variable can be assigned a tuple of strings. When this class is " "used in a class pattern with positional arguments, each positional argument " @@ -3172,7 +3165,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:2744 +#: ../../reference/datamodel.rst:2742 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -3182,19 +3175,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2754 +#: ../../reference/datamodel.rst:2752 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:2755 +#: ../../reference/datamodel.rst:2753 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:2761 +#: ../../reference/datamodel.rst:2759 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:2763 +#: ../../reference/datamodel.rst:2761 msgid "" "For custom classes, implicit invocations of special methods are only " "guaranteed to work correctly if defined on an object's type, not in the " @@ -3202,7 +3195,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:2778 +#: ../../reference/datamodel.rst:2776 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`__hash__` and :meth:`__repr__` that are implemented by all " @@ -3211,21 +3204,21 @@ msgid "" "type object itself::" msgstr "" -#: ../../reference/datamodel.rst:2791 +#: ../../reference/datamodel.rst:2789 msgid "" "Incorrectly attempting to invoke an unbound method of a class in this way is " "sometimes referred to as 'metaclass confusion', and is avoided by bypassing " "the instance when looking up special methods::" msgstr "" -#: ../../reference/datamodel.rst:2800 +#: ../../reference/datamodel.rst:2798 msgid "" "In addition to bypassing any instance attributes in the interest of " "correctness, implicit special method lookup generally also bypasses the :" "meth:`__getattribute__` method even of the object's metaclass::" msgstr "" -#: ../../reference/datamodel.rst:2826 +#: ../../reference/datamodel.rst:2824 msgid "" "Bypassing the :meth:`__getattribute__` machinery in this fashion provides " "significant scope for speed optimisations within the interpreter, at the " @@ -3234,44 +3227,44 @@ msgid "" "invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:2837 +#: ../../reference/datamodel.rst:2835 msgid "Coroutines" msgstr "協程" -#: ../../reference/datamodel.rst:2841 +#: ../../reference/datamodel.rst:2839 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:2843 +#: ../../reference/datamodel.rst:2841 msgid "" "An :term:`awaitable` object generally implements an :meth:`__await__` " "method. :term:`Coroutine objects ` returned from :keyword:`async " "def` functions are awaitable." msgstr "" -#: ../../reference/datamodel.rst:2849 +#: ../../reference/datamodel.rst:2847 msgid "" "The :term:`generator iterator` objects returned from generators decorated " "with :func:`types.coroutine` or :func:`asyncio.coroutine` are also " "awaitable, but they do not implement :meth:`__await__`." msgstr "" -#: ../../reference/datamodel.rst:2855 +#: ../../reference/datamodel.rst:2853 msgid "" "Must return an :term:`iterator`. Should be used to implement :term:" "`awaitable` objects. For instance, :class:`asyncio.Future` implements this " "method to be compatible with the :keyword:`await` expression." msgstr "" -#: ../../reference/datamodel.rst:2861 +#: ../../reference/datamodel.rst:2859 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:2867 +#: ../../reference/datamodel.rst:2865 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:2869 +#: ../../reference/datamodel.rst:2867 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`__await__` and " @@ -3282,18 +3275,18 @@ msgid "" "not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:2877 +#: ../../reference/datamodel.rst:2875 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:2881 +#: ../../reference/datamodel.rst:2879 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:2887 +#: ../../reference/datamodel.rst:2885 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`__await__`. If " @@ -3303,7 +3296,7 @@ msgid "" "as when iterating over the :meth:`__await__` return value, described above." msgstr "" -#: ../../reference/datamodel.rst:2897 +#: ../../reference/datamodel.rst:2895 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -3314,7 +3307,7 @@ msgid "" "caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:2908 +#: ../../reference/datamodel.rst:2906 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -3324,97 +3317,97 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:2916 +#: ../../reference/datamodel.rst:2914 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:2922 +#: ../../reference/datamodel.rst:2920 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:2924 +#: ../../reference/datamodel.rst:2922 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:2927 +#: ../../reference/datamodel.rst:2925 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:2931 +#: ../../reference/datamodel.rst:2929 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:2935 +#: ../../reference/datamodel.rst:2933 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:2938 +#: ../../reference/datamodel.rst:2936 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:2955 +#: ../../reference/datamodel.rst:2953 msgid "" "Prior to Python 3.7, ``__aiter__`` could return an *awaitable* that would " "resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:2960 +#: ../../reference/datamodel.rst:2958 msgid "" "Starting with Python 3.7, ``__aiter__`` must return an asynchronous iterator " "object. Returning anything else will result in a :exc:`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:2968 +#: ../../reference/datamodel.rst:2966 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2970 +#: ../../reference/datamodel.rst:2968 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:2973 +#: ../../reference/datamodel.rst:2971 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2977 +#: ../../reference/datamodel.rst:2975 msgid "" "Semantically similar to :meth:`__enter__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:2982 +#: ../../reference/datamodel.rst:2980 msgid "" "Semantically similar to :meth:`__exit__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:2985 +#: ../../reference/datamodel.rst:2983 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:2998 +#: ../../reference/datamodel.rst:2996 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:2999 +#: ../../reference/datamodel.rst:2997 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:3003 +#: ../../reference/datamodel.rst:3001 msgid "" "The :meth:`__hash__`, :meth:`__iter__`, :meth:`__reversed__`, and :meth:" "`__contains__` methods have special handling for this; others will still " @@ -3422,7 +3415,7 @@ msgid "" "``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3008 +#: ../../reference/datamodel.rst:3006 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 " @@ -3430,7 +3423,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3014 +#: ../../reference/datamodel.rst:3012 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`__add__` -- fails then the overall operation is not "