From ef7368121cd2e5102f8f88c231fb65b63c0033cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Dec 2021 19:35:33 +0000 Subject: [PATCH 1/4] sync with cpython 0194bbbe --- library/asyncio.po | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/library/asyncio.po b/library/asyncio.po index 4cf9af6967..2fa27ac82f 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2021-12-16 19:33+0000\n" "PO-Revision-Date: 2021-11-23 12:40+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -20,14 +20,26 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.0\n" -#: ../../library/asyncio.rst:None -msgid "Hello World!" -msgstr "Hello World!" +#: ../../library/asyncio.rst:66 +msgid "High-level APIs" +msgstr "高階 API" + +#: ../../library/asyncio.rst:77 +msgid "Low-level APIs" +msgstr "低階 API" + +#: ../../library/asyncio.rst:87 +msgid "Guides and Tutorials" +msgstr "指南與教學" #: ../../library/asyncio.rst:2 msgid ":mod:`asyncio` --- Asynchronous I/O" msgstr ":mod:`asyncio` --- 非同步 I/O" +#: ../../library/asyncio.rst:None +msgid "Hello World!" +msgstr "Hello World!" + #: ../../library/asyncio.rst:23 msgid "" "asyncio is a library to write **concurrent** code using the **async/await** " @@ -118,18 +130,6 @@ msgstr "" msgid "Reference" msgstr "參閱" -#: ../../library/asyncio.rst:66 -msgid "High-level APIs" -msgstr "高階 API" - -#: ../../library/asyncio.rst:77 -msgid "Low-level APIs" -msgstr "低階 API" - -#: ../../library/asyncio.rst:87 -msgid "Guides and Tutorials" -msgstr "指南與教學" - #: ../../library/asyncio.rst:96 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "asyncio 的原始碼可以在 :source:`Lib/asyncio/` 中找到。" From d4a99fa306dc8691e01935131cbf0facbde5191c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 Dec 2021 00:11:50 +0000 Subject: [PATCH 2/4] sync with cpython dbd1dc23 --- distutils/sourcedist.po | 99 +++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/distutils/sourcedist.po b/distutils/sourcedist.po index 2462796898..0c8d65b16e 100644 --- a/distutils/sourcedist.po +++ b/distutils/sourcedist.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2021-12-18 00:09+0000\n" "PO-Revision-Date: 2018-05-23 14:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -97,6 +97,11 @@ msgstr "``bztar``" msgid "bzip2'ed tar file (:file:`.tar.bz2`)" msgstr "" +#: ../../distutils/sourcedist.rst:34 ../../distutils/sourcedist.rst:37 +#: ../../distutils/sourcedist.rst:43 +msgid "\\(5)" +msgstr "\\(5)" + #: ../../distutils/sourcedist.rst:37 msgid "``xztar``" msgstr "``xztar``" @@ -114,8 +119,8 @@ msgid "compressed tar file (:file:`.tar.Z`)" msgstr "" #: ../../distutils/sourcedist.rst:40 -msgid "\\(4)" -msgstr "\\(4)" +msgid "(4),(5)" +msgstr "(4),(5)" #: ../../distutils/sourcedist.rst:43 msgid "``tar``" @@ -155,44 +160,50 @@ msgstr "" #: ../../distutils/sourcedist.rst:65 msgid "" +"deprecated by `PEP 527 `_; `PyPI " +"`_ only accepts ``.zip`` and ``.tar.gz`` files." +msgstr "" + +#: ../../distutils/sourcedist.rst:68 +msgid "" "When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or " "``tar``), under Unix you can specify the ``owner`` and ``group`` names that " "will be set for each member of the archive." msgstr "" -#: ../../distutils/sourcedist.rst:69 +#: ../../distutils/sourcedist.rst:72 msgid "For example, if you want all files of the archive to be owned by root::" msgstr "" -#: ../../distutils/sourcedist.rst:77 +#: ../../distutils/sourcedist.rst:80 msgid "Specifying the files to distribute" msgstr "" -#: ../../distutils/sourcedist.rst:79 +#: ../../distutils/sourcedist.rst:82 msgid "" "If you don't supply an explicit list of files (or instructions on how to " "generate one), the :command:`sdist` command puts a minimal default set into " "the source distribution:" msgstr "" -#: ../../distutils/sourcedist.rst:83 +#: ../../distutils/sourcedist.rst:86 msgid "" "all Python source files implied by the ``py_modules`` and ``packages`` " "options" msgstr "" -#: ../../distutils/sourcedist.rst:86 +#: ../../distutils/sourcedist.rst:89 msgid "" "all C source files mentioned in the ``ext_modules`` or ``libraries`` options" msgstr "" -#: ../../distutils/sourcedist.rst:92 +#: ../../distutils/sourcedist.rst:95 msgid "" "scripts identified by the ``scripts`` option See :ref:`distutils-installing-" "scripts`." msgstr "" -#: ../../distutils/sourcedist.rst:95 +#: ../../distutils/sourcedist.rst:98 msgid "" "anything that looks like a test script: :file:`test/test\\*.py` (currently, " "the Distutils don't do anything with test scripts except include them in " @@ -200,26 +211,26 @@ msgid "" "Python module distributions)" msgstr "" -#: ../../distutils/sourcedist.rst:100 +#: ../../distutils/sourcedist.rst:103 msgid "" "Any of the standard README files (:file:`README`, :file:`README.txt`, or :" "file:`README.rst`), :file:`setup.py` (or whatever you called your setup " "script), and :file:`setup.cfg`." msgstr "" -#: ../../distutils/sourcedist.rst:104 +#: ../../distutils/sourcedist.rst:107 msgid "" "all files that matches the ``package_data`` metadata. See :ref:`distutils-" "installing-package-data`." msgstr "" -#: ../../distutils/sourcedist.rst:107 +#: ../../distutils/sourcedist.rst:110 msgid "" "all files that matches the ``data_files`` metadata. See :ref:`distutils-" "additional-files`." msgstr "" -#: ../../distutils/sourcedist.rst:110 +#: ../../distutils/sourcedist.rst:113 msgid "" "Sometimes this is enough, but usually you will want to specify additional " "files to distribute. The typical way to do this is to write a *manifest " @@ -231,7 +242,7 @@ msgid "" "filesystem." msgstr "" -#: ../../distutils/sourcedist.rst:118 +#: ../../distutils/sourcedist.rst:121 msgid "" "If you prefer to roll your own manifest file, the format is simple: one " "filename per line, regular files (or symlinks to them) only. If you do " @@ -239,38 +250,38 @@ msgid "" "set of files described above does not apply in this case." msgstr "" -#: ../../distutils/sourcedist.rst:123 +#: ../../distutils/sourcedist.rst:126 msgid "" "An existing generated :file:`MANIFEST` will be regenerated without :command:" "`sdist` comparing its modification time to the one of :file:`MANIFEST.in` " "or :file:`setup.py`." msgstr "" -#: ../../distutils/sourcedist.rst:128 +#: ../../distutils/sourcedist.rst:131 msgid "" ":file:`MANIFEST` files start with a comment indicating they are generated. " "Files without this comment are not overwritten or removed." msgstr "" -#: ../../distutils/sourcedist.rst:132 +#: ../../distutils/sourcedist.rst:135 msgid "" ":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` " "exists, like it used to do." msgstr "" -#: ../../distutils/sourcedist.rst:136 +#: ../../distutils/sourcedist.rst:139 msgid "" ":file:`README.rst` is now included in the list of distutils standard READMEs." msgstr "" -#: ../../distutils/sourcedist.rst:140 +#: ../../distutils/sourcedist.rst:143 msgid "" "The manifest template has one command per line, where each command specifies " "a set of files to include or exclude from the source distribution. For an " "example, again we turn to the Distutils' own manifest template:" msgstr "" -#: ../../distutils/sourcedist.rst:150 +#: ../../distutils/sourcedist.rst:153 msgid "" "The meanings should be fairly clear: include all files in the distribution " "root matching :file:`\\*.txt`, all files anywhere under the :file:`examples` " @@ -283,7 +294,7 @@ msgid "" "language; see section :ref:`sdist-cmd`." msgstr "" -#: ../../distutils/sourcedist.rst:160 +#: ../../distutils/sourcedist.rst:163 msgid "" "The order of commands in the manifest template matters: initially, we have " "the list of default files as described above, and each command in the " @@ -292,37 +303,37 @@ msgid "" "in the source distribution:" msgstr "" -#: ../../distutils/sourcedist.rst:166 +#: ../../distutils/sourcedist.rst:169 msgid "all files in the Distutils \"build\" tree (default :file:`build/`)" msgstr "" -#: ../../distutils/sourcedist.rst:168 +#: ../../distutils/sourcedist.rst:171 msgid "" "all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:" "`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`" msgstr "" -#: ../../distutils/sourcedist.rst:171 +#: ../../distutils/sourcedist.rst:174 msgid "" "Now we have our complete list of files, which is written to the manifest for " "future reference, and then used to build the source distribution archive(s)." msgstr "" -#: ../../distutils/sourcedist.rst:174 +#: ../../distutils/sourcedist.rst:177 msgid "" "You can disable the default set of included files with the :option:`!--no-" "defaults` option, and you can disable the standard exclude set with :option:" "`!--no-prune`." msgstr "" -#: ../../distutils/sourcedist.rst:178 +#: ../../distutils/sourcedist.rst:181 msgid "" "Following the Distutils' own manifest template, let's trace how the :command:" "`sdist` command builds the list of files to include in the Distutils source " "distribution:" msgstr "" -#: ../../distutils/sourcedist.rst:182 +#: ../../distutils/sourcedist.rst:185 msgid "" "include all Python source files in the :file:`distutils` and :file:" "`distutils/command` subdirectories (because packages corresponding to those " @@ -330,29 +341,29 @@ msgid "" "script---see section :ref:`setup-script`)" msgstr "" -#: ../../distutils/sourcedist.rst:187 +#: ../../distutils/sourcedist.rst:190 msgid "" "include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` " "(standard files)" msgstr "" -#: ../../distutils/sourcedist.rst:190 +#: ../../distutils/sourcedist.rst:193 msgid "include :file:`test/test\\*.py` (standard files)" msgstr "" -#: ../../distutils/sourcedist.rst:192 +#: ../../distutils/sourcedist.rst:195 msgid "" "include :file:`\\*.txt` in the distribution root (this will find :file:" "`README.txt` a second time, but such redundancies are weeded out later)" msgstr "" -#: ../../distutils/sourcedist.rst:195 +#: ../../distutils/sourcedist.rst:198 msgid "" "include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree " "under :file:`examples`," msgstr "" -#: ../../distutils/sourcedist.rst:198 +#: ../../distutils/sourcedist.rst:201 msgid "" "exclude all files in the sub-trees starting at directories matching :file:" "`examples/sample?/build`\\ ---this may exclude files included by the " @@ -360,14 +371,14 @@ msgid "" "manifest template comes after the ``recursive-include`` command" msgstr "" -#: ../../distutils/sourcedist.rst:203 +#: ../../distutils/sourcedist.rst:206 msgid "" "exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, :" "file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` " "directories" msgstr "" -#: ../../distutils/sourcedist.rst:207 +#: ../../distutils/sourcedist.rst:210 msgid "" "Just like in the setup script, file and directory names in the manifest " "template should always be slash-separated; the Distutils will take care of " @@ -375,54 +386,54 @@ msgid "" "the manifest template is portable across operating systems." msgstr "" -#: ../../distutils/sourcedist.rst:216 +#: ../../distutils/sourcedist.rst:219 msgid "Manifest-related options" msgstr "" -#: ../../distutils/sourcedist.rst:218 +#: ../../distutils/sourcedist.rst:221 msgid "" "The normal course of operations for the :command:`sdist` command is as " "follows:" msgstr "" -#: ../../distutils/sourcedist.rst:220 +#: ../../distutils/sourcedist.rst:223 msgid "" "if the manifest file (:file:`MANIFEST` by default) exists and the first line " "does not have a comment indicating it is generated from :file:`MANIFEST.in`, " "then it is used as is, unaltered" msgstr "" -#: ../../distutils/sourcedist.rst:224 +#: ../../distutils/sourcedist.rst:227 msgid "" "if the manifest file doesn't exist or has been previously automatically " "generated, read :file:`MANIFEST.in` and create the manifest" msgstr "" -#: ../../distutils/sourcedist.rst:227 +#: ../../distutils/sourcedist.rst:230 msgid "" "if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest " "with just the default file set" msgstr "" -#: ../../distutils/sourcedist.rst:230 +#: ../../distutils/sourcedist.rst:233 msgid "" "use the list of files now in :file:`MANIFEST` (either just generated or read " "in) to create the source distribution archive(s)" msgstr "" -#: ../../distutils/sourcedist.rst:233 +#: ../../distutils/sourcedist.rst:236 msgid "" "There are a couple of options that modify this behaviour. First, use the :" "option:`!--no-defaults` and :option:`!--no-prune` to disable the standard " "\"include\" and \"exclude\" sets." msgstr "" -#: ../../distutils/sourcedist.rst:237 +#: ../../distutils/sourcedist.rst:240 msgid "" "Second, you might just want to (re)generate the manifest, but not create a " "source distribution::" msgstr "" -#: ../../distutils/sourcedist.rst:242 +#: ../../distutils/sourcedist.rst:245 msgid ":option:`!-o` is a shortcut for :option:`!--manifest-only`." msgstr "" From 15ce99b06e4f744ff4a4207dc1cab0c3cfe22103 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Dec 2021 00:12:32 +0000 Subject: [PATCH 3/4] sync with cpython bb286d45 --- library/stdtypes.po | 6 +-- library/typing.po | 116 ++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/library/stdtypes.po b/library/stdtypes.po index 6eb9c950ee..249ff0c227 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-12-11 00:08+0000\n" +"POT-Creation-Date: 2021-12-19 00:10+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-" @@ -1880,7 +1880,7 @@ msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" #: ../../library/stdtypes.rst:1428 -msgid "Double quotes: ``\"allows embedded 'single' quotes\"``." +msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" #: ../../library/stdtypes.rst:1429 @@ -3089,7 +3089,7 @@ msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" #: ../../library/stdtypes.rst:2436 -msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``." +msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" #: ../../library/stdtypes.rst:2437 diff --git a/library/typing.po b/library/typing.po index eb5060537e..f6a7a9c97c 100644 --- a/library/typing.po +++ b/library/typing.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-12-19 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:14+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -274,7 +274,7 @@ msgid "" msgstr "" #: ../../library/typing.rst:199 ../../library/typing.rst:1011 -#: ../../library/typing.rst:2089 +#: ../../library/typing.rst:2088 msgid "For example::" msgstr "" "舉例來說:\n" @@ -864,7 +864,7 @@ msgid "" "be re-assigned or overridden in a subclass. For example::" msgstr "" -#: ../../library/typing.rst:889 ../../library/typing.rst:1984 +#: ../../library/typing.rst:889 ../../library/typing.rst:1983 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." @@ -1777,152 +1777,152 @@ msgid "" "example::" msgstr "" -#: ../../library/typing.rst:1790 +#: ../../library/typing.rst:1789 msgid "" ":class:`collections.abc.Coroutine` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1796 +#: ../../library/typing.rst:1795 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:1805 +#: ../../library/typing.rst:1804 msgid "" "Unlike normal generators, async generators cannot return a value, so there " "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" -#: ../../library/typing.rst:1809 +#: ../../library/typing.rst:1808 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:1817 +#: ../../library/typing.rst:1816 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:1827 +#: ../../library/typing.rst:1826 msgid "" ":class:`collections.abc.AsyncGenerator` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1833 +#: ../../library/typing.rst:1832 msgid "A generic version of :class:`collections.abc.AsyncIterable`." msgstr "" -#: ../../library/typing.rst:1837 +#: ../../library/typing.rst:1836 msgid "" ":class:`collections.abc.AsyncIterable` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1843 +#: ../../library/typing.rst:1842 msgid "A generic version of :class:`collections.abc.AsyncIterator`." msgstr "" -#: ../../library/typing.rst:1847 +#: ../../library/typing.rst:1846 msgid "" ":class:`collections.abc.AsyncIterator` now supports ``[]``. See :pep:`585` " "and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1853 +#: ../../library/typing.rst:1852 msgid "A generic version of :class:`collections.abc.Awaitable`." msgstr "" -#: ../../library/typing.rst:1857 +#: ../../library/typing.rst:1856 msgid "" ":class:`collections.abc.Awaitable` now supports ``[]``. See :pep:`585` and :" "ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1863 +#: ../../library/typing.rst:1862 msgid "Context manager types" msgstr "" -#: ../../library/typing.rst:1867 +#: ../../library/typing.rst:1866 msgid "A generic version of :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:1872 +#: ../../library/typing.rst:1871 msgid "" ":class:`contextlib.AbstractContextManager` now supports ``[]``. See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1878 +#: ../../library/typing.rst:1877 msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:1883 +#: ../../library/typing.rst:1882 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1888 +#: ../../library/typing.rst:1887 msgid "Protocols" msgstr "" -#: ../../library/typing.rst:1890 +#: ../../library/typing.rst:1889 msgid "These protocols are decorated with :func:`runtime_checkable`." msgstr "" -#: ../../library/typing.rst:1894 +#: ../../library/typing.rst:1893 msgid "" "An ABC with one abstract method ``__abs__`` that is covariant in its return " "type." msgstr "" -#: ../../library/typing.rst:1899 +#: ../../library/typing.rst:1898 msgid "An ABC with one abstract method ``__bytes__``." msgstr "" -#: ../../library/typing.rst:1903 +#: ../../library/typing.rst:1902 msgid "An ABC with one abstract method ``__complex__``." msgstr "" -#: ../../library/typing.rst:1907 +#: ../../library/typing.rst:1906 msgid "An ABC with one abstract method ``__float__``." msgstr "" -#: ../../library/typing.rst:1911 +#: ../../library/typing.rst:1910 msgid "An ABC with one abstract method ``__index__``." msgstr "" -#: ../../library/typing.rst:1917 +#: ../../library/typing.rst:1916 msgid "An ABC with one abstract method ``__int__``." msgstr "" -#: ../../library/typing.rst:1921 +#: ../../library/typing.rst:1920 msgid "" "An ABC with one abstract method ``__round__`` that is covariant in its " "return type." msgstr "" -#: ../../library/typing.rst:1925 +#: ../../library/typing.rst:1924 msgid "Functions and decorators" msgstr "函式與裝飾器" -#: ../../library/typing.rst:1929 +#: ../../library/typing.rst:1928 msgid "Cast a value to a type." msgstr "" -#: ../../library/typing.rst:1931 +#: ../../library/typing.rst:1930 msgid "" "This returns the value unchanged. To the type checker this signals that the " "return value has the designated type, but at runtime we intentionally don't " "check anything (we want this to be as fast as possible)." msgstr "" -#: ../../library/typing.rst:1938 +#: ../../library/typing.rst:1937 msgid "" "The ``@overload`` decorator allows describing functions and methods that " "support multiple different combinations of argument types. A series of " @@ -1937,69 +1937,69 @@ msgid "" "variable::" msgstr "" -#: ../../library/typing.rst:1962 +#: ../../library/typing.rst:1961 msgid "See :pep:`484` for details and comparison with other typing semantics." msgstr "" -#: ../../library/typing.rst:1966 +#: ../../library/typing.rst:1965 msgid "" "A decorator to indicate to type checkers that the decorated method cannot be " "overridden, and the decorated class cannot be subclassed. For example::" msgstr "" -#: ../../library/typing.rst:1991 +#: ../../library/typing.rst:1990 msgid "Decorator to indicate that annotations are not type hints." msgstr "" -#: ../../library/typing.rst:1993 +#: ../../library/typing.rst:1992 msgid "" "This works as class or function :term:`decorator`. With a class, it applies " "recursively to all methods defined in that class (but not to methods defined " "in its superclasses or subclasses)." msgstr "" -#: ../../library/typing.rst:1997 +#: ../../library/typing.rst:1996 msgid "This mutates the function(s) in place." msgstr "" -#: ../../library/typing.rst:2001 +#: ../../library/typing.rst:2000 msgid "Decorator to give another decorator the :func:`no_type_check` effect." msgstr "" -#: ../../library/typing.rst:2003 +#: ../../library/typing.rst:2002 msgid "" "This wraps the decorator with something that wraps the decorated function " "in :func:`no_type_check`." msgstr "" -#: ../../library/typing.rst:2008 +#: ../../library/typing.rst:2007 msgid "Decorator to mark a class or function to be unavailable at runtime." msgstr "" -#: ../../library/typing.rst:2010 +#: ../../library/typing.rst:2009 msgid "" "This decorator is itself not available at runtime. It is mainly intended to " "mark classes that are defined in type stub files if an implementation " "returns an instance of a private class::" msgstr "" -#: ../../library/typing.rst:2021 +#: ../../library/typing.rst:2020 msgid "" "Note that returning instances of private classes is not recommended. It is " "usually preferable to make such classes public." msgstr "" -#: ../../library/typing.rst:2025 +#: ../../library/typing.rst:2024 msgid "Introspection helpers" msgstr "" -#: ../../library/typing.rst:2029 +#: ../../library/typing.rst:2028 msgid "" "Return a dictionary containing type hints for a function, method, module or " "class object." msgstr "" -#: ../../library/typing.rst:2032 +#: ../../library/typing.rst:2031 msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " @@ -2009,29 +2009,29 @@ msgid "" "merging all the ``__annotations__`` along ``C.__mro__`` in reverse order." msgstr "" -#: ../../library/typing.rst:2040 +#: ../../library/typing.rst:2039 msgid "" "The function recursively replaces all ``Annotated[T, ...]`` with ``T``, " "unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " "more information). For example::" msgstr "" -#: ../../library/typing.rst:2055 +#: ../../library/typing.rst:2054 msgid "" ":func:`get_type_hints` does not work with imported :ref:`type aliases ` that include forward references. Enabling postponed evaluation of " "annotations (:pep:`563`) may remove the need for most forward references." msgstr "" -#: ../../library/typing.rst:2060 +#: ../../library/typing.rst:2059 msgid "Added ``include_extras`` parameter as part of :pep:`593`." msgstr "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。" -#: ../../library/typing.rst:2066 +#: ../../library/typing.rst:2065 msgid "Provide basic introspection for generic types and special typing forms." msgstr "" -#: ../../library/typing.rst:2068 +#: ../../library/typing.rst:2067 msgid "" "For a typing object of the form ``X[Y, Z, ...]`` these functions return " "``X`` and ``(Y, Z, ...)``. If ``X`` is a generic alias for a builtin or :mod:" @@ -2042,11 +2042,11 @@ msgid "" "and ``()`` correspondingly. Examples::" msgstr "" -#: ../../library/typing.rst:2087 +#: ../../library/typing.rst:2086 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2102 +#: ../../library/typing.rst:2101 msgid "" "A class used for internal typing representation of string forward " "references. For example, ``List[\"SomeClass\"]`` is implicitly transformed " @@ -2054,24 +2054,24 @@ msgid "" "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2108 +#: ../../library/typing.rst:2107 msgid "" ":pep:`585` generic types such as ``list[\"SomeClass\"]`` will not be " "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" -#: ../../library/typing.rst:2115 +#: ../../library/typing.rst:2114 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:2119 +#: ../../library/typing.rst:2118 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime. Usage::" msgstr "" -#: ../../library/typing.rst:2128 +#: ../../library/typing.rst:2127 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2079,7 +2079,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:2135 +#: ../../library/typing.rst:2134 msgid "" "If ``from __future__ import annotations`` is used in Python 3.7 or later, " "annotations are not evaluated at function definition time. Instead, they are " From 6e4271ba3a626560319f8897ea67c4ac5e131e8c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Dec 2021 00:12:16 +0000 Subject: [PATCH 4/4] sync with cpython d7537ac8 --- reference/datamodel.po | 363 ++++++++++---------- whatsnew/3.10.po | 748 ++++++++++++++++++++--------------------- 2 files changed, 558 insertions(+), 553 deletions(-) diff --git a/reference/datamodel.po b/reference/datamodel.po index 5337067a9a..ffcaf003eb 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-12-14 00:10+0000\n" +"POT-Creation-Date: 2021-12-20 00:10+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-" @@ -2259,19 +2259,24 @@ msgid "" msgstr "" #: ../../reference/datamodel.rst:1880 +msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." +msgstr "" + +#: ../../reference/datamodel.rst:1882 msgid "" -"Any non-string iterable may be assigned to *__slots__*. Mappings may also be " -"used; however, in the future, special meaning may be assigned to the values " -"corresponding to each key." +"If a :class:`dictionary ` is used to assign *__slots__*, the " +"dictionary keys will be used as the slot names. The values of the dictionary " +"can be used to provide per-attribute docstrings that will be recognised by :" +"func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../reference/datamodel.rst:1884 +#: ../../reference/datamodel.rst:1887 msgid "" ":attr:`~instance.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:1887 +#: ../../reference/datamodel.rst:1890 msgid "" ":ref:`Multiple inheritance ` with multiple slotted parent " "classes can be used, but only one parent is allowed to have attributes " @@ -2279,18 +2284,18 @@ msgid "" "raise :exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:1893 +#: ../../reference/datamodel.rst:1896 msgid "" "If an :term:`iterator` is used for *__slots__* then a :term:`descriptor` is " "created for each of the iterator's values. However, the *__slots__* " "attribute will be an empty iterator." msgstr "" -#: ../../reference/datamodel.rst:1901 +#: ../../reference/datamodel.rst:1904 msgid "Customizing class creation" msgstr "" -#: ../../reference/datamodel.rst:1903 +#: ../../reference/datamodel.rst:1906 msgid "" "Whenever a class inherits from another class, :meth:`~object." "__init_subclass__` is called on that class. This way, it is possible to " @@ -2300,14 +2305,14 @@ msgid "" "future subclasses of the class defining the method." msgstr "" -#: ../../reference/datamodel.rst:1912 +#: ../../reference/datamodel.rst:1915 msgid "" "This method is called whenever the containing class is subclassed. *cls* is " "then the new subclass. If defined as a normal instance method, this method " "is implicitly converted to a class method." msgstr "" -#: ../../reference/datamodel.rst:1916 +#: ../../reference/datamodel.rst:1919 msgid "" "Keyword arguments which are given to a new class are passed to the parent's " "class ``__init_subclass__``. For compatibility with other classes using " @@ -2315,13 +2320,13 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../reference/datamodel.rst:1930 +#: ../../reference/datamodel.rst:1933 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../reference/datamodel.rst:1935 +#: ../../reference/datamodel.rst:1938 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -2329,41 +2334,41 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../reference/datamodel.rst:1943 +#: ../../reference/datamodel.rst:1946 msgid "" "When a class is created, :meth:`type.__new__` scans the class variables and " "makes callbacks to those with a :meth:`~object.__set_name__` hook." msgstr "" -#: ../../reference/datamodel.rst:1948 +#: ../../reference/datamodel.rst:1951 msgid "" "Automatically called at the time the owning class *owner* is created. The " "object has been assigned to *name* in that class::" msgstr "" -#: ../../reference/datamodel.rst:1954 +#: ../../reference/datamodel.rst:1957 msgid "" "If the class variable is assigned after the class is created, :meth:" "`__set_name__` will not be called automatically. If needed, :meth:" "`__set_name__` can be called directly::" msgstr "" -#: ../../reference/datamodel.rst:1965 +#: ../../reference/datamodel.rst:1968 msgid "See :ref:`class-object-creation` for more details." msgstr "更多細節請見 :ref:`class-object-creation`\\ 。" -#: ../../reference/datamodel.rst:1973 +#: ../../reference/datamodel.rst:1976 msgid "Metaclasses" msgstr "" -#: ../../reference/datamodel.rst:1980 +#: ../../reference/datamodel.rst:1983 msgid "" "By default, classes are constructed using :func:`type`. The class body is " "executed in a new namespace and the class name is bound locally to the " "result of ``type(name, bases, namespace)``." msgstr "" -#: ../../reference/datamodel.rst:1984 +#: ../../reference/datamodel.rst:1987 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -2371,41 +2376,41 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../reference/datamodel.rst:1998 +#: ../../reference/datamodel.rst:2001 msgid "" "Any other keyword arguments that are specified in the class definition are " "passed through to all metaclass operations described below." msgstr "" -#: ../../reference/datamodel.rst:2001 +#: ../../reference/datamodel.rst:2004 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../reference/datamodel.rst:2003 +#: ../../reference/datamodel.rst:2006 msgid "MRO entries are resolved;" msgstr "" -#: ../../reference/datamodel.rst:2004 +#: ../../reference/datamodel.rst:2007 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../reference/datamodel.rst:2005 +#: ../../reference/datamodel.rst:2008 msgid "the class namespace is prepared;" msgstr "" -#: ../../reference/datamodel.rst:2006 +#: ../../reference/datamodel.rst:2009 msgid "the class body is executed;" msgstr "" -#: ../../reference/datamodel.rst:2007 +#: ../../reference/datamodel.rst:2010 msgid "the class object is created." msgstr "" -#: ../../reference/datamodel.rst:2011 +#: ../../reference/datamodel.rst:2014 msgid "Resolving MRO entries" msgstr "" -#: ../../reference/datamodel.rst:2013 +#: ../../reference/datamodel.rst:2016 msgid "" "If a base that appears in class definition is not an instance of :class:" "`type`, then an ``__mro_entries__`` method is searched on it. If found, it " @@ -2414,37 +2419,37 @@ msgid "" "such case the original base is ignored." msgstr "" -#: ../../reference/datamodel.rst:2021 +#: ../../reference/datamodel.rst:2024 msgid ":pep:`560` - Core support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:2025 +#: ../../reference/datamodel.rst:2028 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../reference/datamodel.rst:2029 +#: ../../reference/datamodel.rst:2032 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../reference/datamodel.rst:2031 +#: ../../reference/datamodel.rst:2034 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../reference/datamodel.rst:2032 +#: ../../reference/datamodel.rst:2035 msgid "" "if an explicit metaclass is given and it is *not* an instance of :func:" "`type`, then it is used directly as the metaclass;" msgstr "" -#: ../../reference/datamodel.rst:2034 +#: ../../reference/datamodel.rst:2037 msgid "" "if an instance of :func:`type` is given as the explicit metaclass, or bases " "are defined, then the most derived metaclass is used." msgstr "" -#: ../../reference/datamodel.rst:2037 +#: ../../reference/datamodel.rst:2040 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -2453,11 +2458,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../reference/datamodel.rst:2047 +#: ../../reference/datamodel.rst:2050 msgid "Preparing the class namespace" msgstr "" -#: ../../reference/datamodel.rst:2052 +#: ../../reference/datamodel.rst:2055 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -2469,25 +2474,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../reference/datamodel.rst:2061 +#: ../../reference/datamodel.rst:2064 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../reference/datamodel.rst:2066 +#: ../../reference/datamodel.rst:2069 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/datamodel.rst:2067 +#: ../../reference/datamodel.rst:2070 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../reference/datamodel.rst:2071 +#: ../../reference/datamodel.rst:2074 msgid "Executing the class body" msgstr "" -#: ../../reference/datamodel.rst:2076 +#: ../../reference/datamodel.rst:2079 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -2496,7 +2501,7 @@ msgid "" "inside a function." msgstr "" -#: ../../reference/datamodel.rst:2082 +#: ../../reference/datamodel.rst:2085 msgid "" "However, even when the class definition occurs inside the function, methods " "defined inside the class still cannot see names defined at the class scope. " @@ -2505,11 +2510,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../reference/datamodel.rst:2091 +#: ../../reference/datamodel.rst:2094 msgid "Creating the class object" msgstr "" -#: ../../reference/datamodel.rst:2098 +#: ../../reference/datamodel.rst:2101 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -2517,7 +2522,7 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../reference/datamodel.rst:2103 +#: ../../reference/datamodel.rst:2106 msgid "" "This class object is the one that will be referenced by the zero-argument " "form of :func:`super`. ``__class__`` is an implicit closure reference " @@ -2528,7 +2533,7 @@ msgid "" "is identified based on the first argument passed to the method." msgstr "" -#: ../../reference/datamodel.rst:2113 +#: ../../reference/datamodel.rst:2116 msgid "" "In CPython 3.6 and later, the ``__class__`` cell is passed to the metaclass " "as a ``__classcell__`` entry in the class namespace. If present, this must " @@ -2537,39 +2542,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../reference/datamodel.rst:2119 +#: ../../reference/datamodel.rst:2122 msgid "" "When using the default metaclass :class:`type`, or any metaclass that " "ultimately calls ``type.__new__``, the following additional customization " "steps are invoked after creating the class object:" msgstr "" -#: ../../reference/datamodel.rst:2123 +#: ../../reference/datamodel.rst:2126 msgid "" "The ``type.__new__`` method collects all of the attributes in the class " "namespace that define a :meth:`~object.__set_name__` method;" msgstr "" -#: ../../reference/datamodel.rst:2125 +#: ../../reference/datamodel.rst:2128 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../reference/datamodel.rst:2127 +#: ../../reference/datamodel.rst:2130 msgid "" "The :meth:`~object.__init_subclass__` hook is called on the immediate parent " "of the new class in its method resolution order." msgstr "" -#: ../../reference/datamodel.rst:2130 +#: ../../reference/datamodel.rst:2133 msgid "" "After the class object is created, it is passed to the class decorators " "included in the class definition (if any) and the resulting object is bound " "in the local namespace as the defined class." msgstr "" -#: ../../reference/datamodel.rst:2134 +#: ../../reference/datamodel.rst:2137 msgid "" "When a new class is created by ``type.__new__``, the object provided as the " "namespace parameter is copied to a new ordered mapping and the original " @@ -2577,19 +2582,19 @@ msgid "" "becomes the :attr:`~object.__dict__` attribute of the class object." msgstr "" -#: ../../reference/datamodel.rst:2141 +#: ../../reference/datamodel.rst:2144 msgid ":pep:`3135` - New super" msgstr "" -#: ../../reference/datamodel.rst:2142 +#: ../../reference/datamodel.rst:2145 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../reference/datamodel.rst:2146 +#: ../../reference/datamodel.rst:2149 msgid "Uses for metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2148 +#: ../../reference/datamodel.rst:2151 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -2597,17 +2602,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../reference/datamodel.rst:2155 +#: ../../reference/datamodel.rst:2158 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../reference/datamodel.rst:2157 +#: ../../reference/datamodel.rst:2160 msgid "" "The following methods are used to override the default behavior of the :func:" "`isinstance` and :func:`issubclass` built-in functions." msgstr "" -#: ../../reference/datamodel.rst:2160 +#: ../../reference/datamodel.rst:2163 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -2615,21 +2620,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../reference/datamodel.rst:2167 +#: ../../reference/datamodel.rst:2170 msgid "" "Return true if *instance* should be considered a (direct or indirect) " "instance of *class*. If defined, called to implement ``isinstance(instance, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2174 +#: ../../reference/datamodel.rst:2177 msgid "" "Return true if *subclass* should be considered a (direct or indirect) " "subclass of *class*. If defined, called to implement ``issubclass(subclass, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2179 +#: ../../reference/datamodel.rst:2182 msgid "" "Note that these methods are looked up on the type (metaclass) of a class. " "They cannot be defined as class methods in the actual class. This is " @@ -2637,11 +2642,11 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:2190 +#: ../../reference/datamodel.rst:2193 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../reference/datamodel.rst:2187 +#: ../../reference/datamodel.rst:2190 msgid "" "Includes the specification for customizing :func:`isinstance` and :func:" "`issubclass` behavior through :meth:`~class.__instancecheck__` and :meth:" @@ -2650,11 +2655,11 @@ msgid "" "language." msgstr "" -#: ../../reference/datamodel.rst:2195 +#: ../../reference/datamodel.rst:2198 msgid "Emulating generic types" msgstr "" -#: ../../reference/datamodel.rst:2197 +#: ../../reference/datamodel.rst:2200 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -2662,65 +2667,65 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:2205 +#: ../../reference/datamodel.rst:2208 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/datamodel.rst:2205 +#: ../../reference/datamodel.rst:2208 msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../reference/datamodel.rst:2208 +#: ../../reference/datamodel.rst:2211 msgid ":ref:`Generic Alias Types`" msgstr "" -#: ../../reference/datamodel.rst:2208 +#: ../../reference/datamodel.rst:2211 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:2211 +#: ../../reference/datamodel.rst:2214 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" -#: ../../reference/datamodel.rst:2211 +#: ../../reference/datamodel.rst:2214 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../reference/datamodel.rst:2214 +#: ../../reference/datamodel.rst:2217 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2219 +#: ../../reference/datamodel.rst:2222 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../reference/datamodel.rst:2222 +#: ../../reference/datamodel.rst:2225 msgid "" "When defined on a class, ``__class_getitem__()`` is automatically a class " "method. As such, there is no need for it to be decorated with :func:" "`@classmethod` when it is defined." msgstr "" -#: ../../reference/datamodel.rst:2228 +#: ../../reference/datamodel.rst:2231 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2230 +#: ../../reference/datamodel.rst:2233 msgid "" "The purpose of :meth:`~object.__class_getitem__` is to allow runtime " "parameterization of standard-library generic classes in order to more easily " "apply :term:`type hints` to these classes." msgstr "" -#: ../../reference/datamodel.rst:2234 +#: ../../reference/datamodel.rst:2237 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " @@ -2729,7 +2734,7 @@ msgid "" "own implementation of ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2240 +#: ../../reference/datamodel.rst:2243 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -2737,11 +2742,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../reference/datamodel.rst:2250 +#: ../../reference/datamodel.rst:2253 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2252 +#: ../../reference/datamodel.rst:2255 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -2751,14 +2756,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../reference/datamodel.rst:2259 +#: ../../reference/datamodel.rst:2262 msgid "" "Presented with the :term:`expression` ``obj[x]``, the Python interpreter " "follows something like the following process to decide whether :meth:" "`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" msgstr "" -#: ../../reference/datamodel.rst:2287 +#: ../../reference/datamodel.rst:2290 msgid "" "In Python, all classes are themselves instances of other classes. The class " "of a class is known as that class's :term:`metaclass`, and most classes have " @@ -2768,40 +2773,40 @@ msgid "" "__class_getitem__` being called::" msgstr "" -#: ../../reference/datamodel.rst:2306 +#: ../../reference/datamodel.rst:2309 msgid "" "However, if a class has a custom metaclass that defines :meth:`~object." "__getitem__`, subscribing the class may result in different behaviour. An " "example of this can be found in the :mod:`enum` module::" msgstr "" -#: ../../reference/datamodel.rst:2331 +#: ../../reference/datamodel.rst:2334 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:2330 +#: ../../reference/datamodel.rst:2333 msgid "" "Introducing :meth:`~object.__class_getitem__`, and outlining when a :ref:" "`subscription` results in ``__class_getitem__()`` being " "called instead of :meth:`~object.__getitem__`" msgstr "" -#: ../../reference/datamodel.rst:2338 +#: ../../reference/datamodel.rst:2341 msgid "Emulating callable objects" msgstr "" -#: ../../reference/datamodel.rst:2345 +#: ../../reference/datamodel.rst:2348 msgid "" "Called when the instance is \"called\" as a function; if this method is " "defined, ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, " "arg1, ...)``." msgstr "" -#: ../../reference/datamodel.rst:2352 +#: ../../reference/datamodel.rst:2355 msgid "Emulating container types" msgstr "" -#: ../../reference/datamodel.rst:2354 +#: ../../reference/datamodel.rst:2357 msgid "" "The following methods can be defined to implement container objects. " "Containers usually are :term:`sequences ` (such as :class:`lists " @@ -2837,7 +2842,7 @@ msgid "" "the values." msgstr "" -#: ../../reference/datamodel.rst:2394 +#: ../../reference/datamodel.rst:2397 msgid "" "Called to implement the built-in function :func:`len`. Should return the " "length of the object, an integer ``>=`` 0. Also, an object that doesn't " @@ -2845,7 +2850,7 @@ msgid "" "zero is considered to be false in a Boolean context." msgstr "" -#: ../../reference/datamodel.rst:2401 +#: ../../reference/datamodel.rst:2404 msgid "" "In CPython, the length is required to be at most :attr:`sys.maxsize`. If the " "length is larger than :attr:`!sys.maxsize` some features (such as :func:" @@ -2854,7 +2859,7 @@ msgid "" "`__bool__` method." msgstr "" -#: ../../reference/datamodel.rst:2410 +#: ../../reference/datamodel.rst:2413 msgid "" "Called to implement :func:`operator.length_hint`. Should return an estimated " "length for the object (which may be greater or less than the actual length). " @@ -2864,20 +2869,20 @@ msgid "" "never required for correctness." msgstr "" -#: ../../reference/datamodel.rst:2424 +#: ../../reference/datamodel.rst:2427 msgid "" "Slicing is done exclusively with the following three methods. A call like ::" msgstr "" -#: ../../reference/datamodel.rst:2428 +#: ../../reference/datamodel.rst:2431 msgid "is translated to ::" msgstr "" -#: ../../reference/datamodel.rst:2432 +#: ../../reference/datamodel.rst:2435 msgid "and so forth. Missing slice items are always filled in with ``None``." msgstr "" -#: ../../reference/datamodel.rst:2437 +#: ../../reference/datamodel.rst:2440 msgid "" "Called to implement evaluation of ``self[key]``. For :term:`sequence` types, " "the accepted keys should be integers and slice objects. Note that the " @@ -2890,20 +2895,20 @@ msgid "" "`KeyError` should be raised." msgstr "" -#: ../../reference/datamodel.rst:2449 +#: ../../reference/datamodel.rst:2452 msgid "" ":keyword:`for` loops expect that an :exc:`IndexError` will be raised for " "illegal indexes to allow proper detection of the end of the sequence." msgstr "" -#: ../../reference/datamodel.rst:2454 +#: ../../reference/datamodel.rst:2457 msgid "" "When :ref:`subscripting` a *class*, the special class method :" "meth:`~object.__class_getitem__` may be called instead of ``__getitem__()``. " "See :ref:`classgetitem-versus-getitem` for more details." msgstr "" -#: ../../reference/datamodel.rst:2462 +#: ../../reference/datamodel.rst:2465 msgid "" "Called to implement assignment to ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -2912,7 +2917,7 @@ msgid "" "for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:2471 +#: ../../reference/datamodel.rst:2474 msgid "" "Called to implement deletion of ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -2921,13 +2926,13 @@ msgid "" "values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:2480 +#: ../../reference/datamodel.rst:2483 msgid "" "Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` " "for dict subclasses when key is not in the dictionary." msgstr "" -#: ../../reference/datamodel.rst:2486 +#: ../../reference/datamodel.rst:2489 msgid "" "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 " @@ -2935,14 +2940,14 @@ msgid "" "of the container." msgstr "" -#: ../../reference/datamodel.rst:2494 +#: ../../reference/datamodel.rst:2497 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:2498 +#: ../../reference/datamodel.rst:2501 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 :" @@ -2951,7 +2956,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:2505 +#: ../../reference/datamodel.rst:2508 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -2959,14 +2964,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:2512 +#: ../../reference/datamodel.rst:2515 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:2516 +#: ../../reference/datamodel.rst:2519 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -2974,11 +2979,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:2525 +#: ../../reference/datamodel.rst:2528 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:2527 +#: ../../reference/datamodel.rst:2530 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -2986,7 +2991,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:2553 +#: ../../reference/datamodel.rst:2556 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -2999,13 +3004,13 @@ msgid "" "version of the built-in :func:`pow` function is to be supported." msgstr "" -#: ../../reference/datamodel.rst:2564 +#: ../../reference/datamodel.rst:2567 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return ``NotImplemented``." msgstr "" -#: ../../reference/datamodel.rst:2587 +#: ../../reference/datamodel.rst:2590 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -3017,13 +3022,13 @@ msgid "" "__rsub__(x)`` is called if ``x.__sub__(y)`` returns *NotImplemented*." msgstr "" -#: ../../reference/datamodel.rst:2598 +#: ../../reference/datamodel.rst:2601 msgid "" "Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the " "coercion rules would become too complicated)." msgstr "" -#: ../../reference/datamodel.rst:2603 +#: ../../reference/datamodel.rst:2606 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 " @@ -3032,7 +3037,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:2624 +#: ../../reference/datamodel.rst:2627 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3048,19 +3053,19 @@ msgid "" "fact part of the data model." msgstr "" -#: ../../reference/datamodel.rst:2645 +#: ../../reference/datamodel.rst:2648 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:2658 +#: ../../reference/datamodel.rst:2661 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:2665 +#: ../../reference/datamodel.rst:2668 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3069,14 +3074,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:2671 +#: ../../reference/datamodel.rst:2674 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:2683 +#: ../../reference/datamodel.rst:2686 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -3085,17 +3090,17 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:2689 +#: ../../reference/datamodel.rst:2692 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:2696 +#: ../../reference/datamodel.rst:2699 msgid "With Statement Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2698 +#: ../../reference/datamodel.rst:2701 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 " @@ -3105,32 +3110,32 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:2709 +#: ../../reference/datamodel.rst:2712 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:2712 +#: ../../reference/datamodel.rst:2715 msgid "" "For more information on context managers, see :ref:`typecontextmanager`." msgstr "" -#: ../../reference/datamodel.rst:2717 +#: ../../reference/datamodel.rst:2720 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:2724 +#: ../../reference/datamodel.rst:2727 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:2728 +#: ../../reference/datamodel.rst:2731 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. " @@ -3138,27 +3143,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:2732 +#: ../../reference/datamodel.rst:2735 msgid "" "Note that :meth:`__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:2739 +#: ../../reference/datamodel.rst:2742 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/datamodel.rst:2739 +#: ../../reference/datamodel.rst:2742 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2746 +#: ../../reference/datamodel.rst:2749 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:2748 +#: ../../reference/datamodel.rst:2751 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 " @@ -3166,7 +3171,7 @@ msgid "" "patterns, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:2755 +#: ../../reference/datamodel.rst:2758 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 " @@ -3175,7 +3180,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:2761 +#: ../../reference/datamodel.rst:2764 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -3185,19 +3190,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2771 +#: ../../reference/datamodel.rst:2774 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:2772 +#: ../../reference/datamodel.rst:2775 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:2778 +#: ../../reference/datamodel.rst:2781 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:2780 +#: ../../reference/datamodel.rst:2783 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 " @@ -3205,7 +3210,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:2798 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -3214,21 +3219,21 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../reference/datamodel.rst:2809 +#: ../../reference/datamodel.rst:2812 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:2818 +#: ../../reference/datamodel.rst:2821 msgid "" "In addition to bypassing any instance attributes in the interest of " "correctness, implicit special method lookup generally also bypasses the :" "meth:`~object.__getattribute__` method even of the object's metaclass::" msgstr "" -#: ../../reference/datamodel.rst:2844 +#: ../../reference/datamodel.rst:2847 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -3237,44 +3242,44 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:2855 +#: ../../reference/datamodel.rst:2858 msgid "Coroutines" msgstr "協程" -#: ../../reference/datamodel.rst:2859 +#: ../../reference/datamodel.rst:2862 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:2861 +#: ../../reference/datamodel.rst:2864 msgid "" "An :term:`awaitable` object generally implements an :meth:`~object." "__await__` method. :term:`Coroutine objects ` returned from :" "keyword:`async def` functions are awaitable." msgstr "" -#: ../../reference/datamodel.rst:2867 +#: ../../reference/datamodel.rst:2870 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:`~object.__await__`." msgstr "" -#: ../../reference/datamodel.rst:2873 +#: ../../reference/datamodel.rst:2876 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:2879 +#: ../../reference/datamodel.rst:2882 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:2885 +#: ../../reference/datamodel.rst:2888 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:2887 +#: ../../reference/datamodel.rst:2890 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -3285,18 +3290,18 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:2895 +#: ../../reference/datamodel.rst:2898 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:2899 +#: ../../reference/datamodel.rst:2902 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:2905 +#: ../../reference/datamodel.rst:2908 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -3307,7 +3312,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:2915 +#: ../../reference/datamodel.rst:2918 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -3318,7 +3323,7 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:2926 +#: ../../reference/datamodel.rst:2929 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -3328,99 +3333,99 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:2934 +#: ../../reference/datamodel.rst:2937 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:2940 +#: ../../reference/datamodel.rst:2943 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:2942 +#: ../../reference/datamodel.rst:2945 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:2945 +#: ../../reference/datamodel.rst:2948 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:2949 +#: ../../reference/datamodel.rst:2952 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:2953 +#: ../../reference/datamodel.rst:2956 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:2956 +#: ../../reference/datamodel.rst:2959 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:2973 +#: ../../reference/datamodel.rst:2976 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:2978 +#: ../../reference/datamodel.rst:2981 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " "asynchronous iterator object. Returning anything else will result in a :exc:" "`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:2986 +#: ../../reference/datamodel.rst:2989 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2988 +#: ../../reference/datamodel.rst:2991 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:2991 +#: ../../reference/datamodel.rst:2994 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2995 +#: ../../reference/datamodel.rst:2998 msgid "" "Semantically similar to :meth:`__enter__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3000 +#: ../../reference/datamodel.rst:3003 msgid "" "Semantically similar to :meth:`__exit__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3003 +#: ../../reference/datamodel.rst:3006 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3016 +#: ../../reference/datamodel.rst:3019 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:3017 +#: ../../reference/datamodel.rst:3020 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:3021 +#: ../../reference/datamodel.rst:3024 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, and :meth:`~object.__contains__` methods have special " @@ -3428,7 +3433,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3027 +#: ../../reference/datamodel.rst:3030 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 " @@ -3436,7 +3441,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3033 +#: ../../reference/datamodel.rst:3036 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`~object.__add__` -- fails then the overall " diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index b5ffe9af65..3bbc576446 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-08 16:23+0000\n" +"POT-Creation-Date: 2021-12-20 00:10+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-" @@ -137,7 +137,7 @@ msgstr "" msgid ":pep:`597`, Add optional EncodingWarning" msgstr "" -#: ../../whatsnew/3.10.rst:93 ../../whatsnew/3.10.rst:2031 +#: ../../whatsnew/3.10.rst:93 ../../whatsnew/3.10.rst:2032 msgid "New Features" msgstr "" @@ -686,64 +686,64 @@ msgstr "" msgid "See :ref:`io-text-encoding` for more information." msgstr "更多資訊請見 :ref:`io-text-encoding`\\ 。" -#: ../../whatsnew/3.10.rst:709 +#: ../../whatsnew/3.10.rst:710 msgid "New Features Related to Type Hints" msgstr "" -#: ../../whatsnew/3.10.rst:711 +#: ../../whatsnew/3.10.rst:712 msgid "" "This section covers major changes affecting :pep:`484` type hints and the :" "mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:716 +#: ../../whatsnew/3.10.rst:717 msgid "PEP 604: New Type Union Operator" msgstr "" -#: ../../whatsnew/3.10.rst:718 +#: ../../whatsnew/3.10.rst:719 msgid "" "A new type union operator was introduced which enables the syntax ``X | Y``. " "This provides a cleaner way of expressing 'either type X or type Y' instead " "of using :data:`typing.Union`, especially in type hints." msgstr "" -#: ../../whatsnew/3.10.rst:722 +#: ../../whatsnew/3.10.rst:723 msgid "" "In previous versions of Python, to apply a type hint for functions accepting " "arguments of multiple types, :data:`typing.Union` was used::" msgstr "" -#: ../../whatsnew/3.10.rst:729 +#: ../../whatsnew/3.10.rst:730 msgid "Type hints can now be written in a more succinct manner::" msgstr "" -#: ../../whatsnew/3.10.rst:735 +#: ../../whatsnew/3.10.rst:736 msgid "" "This new syntax is also accepted as the second argument to :func:" "`isinstance` and :func:`issubclass`::" msgstr "" -#: ../../whatsnew/3.10.rst:741 +#: ../../whatsnew/3.10.rst:742 msgid "See :ref:`types-union` and :pep:`604` for more details." msgstr "更多資訊請見 :ref:`types-union` 與 :pep:`604`\\ 。" -#: ../../whatsnew/3.10.rst:743 +#: ../../whatsnew/3.10.rst:744 msgid "" "(Contributed by Maggie Moss and Philippe Prados in :issue:`41428`, with " "additions by Yurii Karabas and Serhiy Storchaka in :issue:`44490`.)" msgstr "" -#: ../../whatsnew/3.10.rst:748 +#: ../../whatsnew/3.10.rst:749 msgid "PEP 612: Parameter Specification Variables" msgstr "" -#: ../../whatsnew/3.10.rst:750 +#: ../../whatsnew/3.10.rst:751 msgid "" "Two new options to improve the information provided to static type checkers " "for :pep:`484`\\ 's ``Callable`` have been added to the :mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:753 +#: ../../whatsnew/3.10.rst:754 msgid "" "The first is the parameter specification variable. They are used to forward " "the parameter types of one callable to another callable -- a pattern " @@ -752,7 +752,7 @@ msgid "" "to type annotate dependency of parameter types in such a precise manner." msgstr "" -#: ../../whatsnew/3.10.rst:759 +#: ../../whatsnew/3.10.rst:760 msgid "" "The second option is the new ``Concatenate`` operator. It's used in " "conjunction with parameter specification variables to type annotate a higher " @@ -760,24 +760,24 @@ msgid "" "Examples of usage can be found in :class:`typing.Concatenate`." msgstr "" -#: ../../whatsnew/3.10.rst:764 +#: ../../whatsnew/3.10.rst:765 msgid "" "See :class:`typing.Callable`, :class:`typing.ParamSpec`, :class:`typing." "Concatenate`, :class:`typing.ParamSpecArgs`, :class:`typing." "ParamSpecKwargs`, and :pep:`612` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:768 +#: ../../whatsnew/3.10.rst:769 msgid "" "(Contributed by Ken Jin in :issue:`41559`, with minor enhancements by Jelle " "Zijlstra in :issue:`43783`. PEP written by Mark Mendoza.)" msgstr "" -#: ../../whatsnew/3.10.rst:773 +#: ../../whatsnew/3.10.rst:774 msgid "PEP 613: TypeAlias" msgstr "" -#: ../../whatsnew/3.10.rst:775 +#: ../../whatsnew/3.10.rst:776 msgid "" ":pep:`484` introduced the concept of type aliases, only requiring them to be " "top-level unannotated assignments. This simplicity sometimes made it " @@ -786,25 +786,25 @@ msgid "" "involved. Compare::" msgstr "" -#: ../../whatsnew/3.10.rst:783 +#: ../../whatsnew/3.10.rst:784 msgid "" "Now the :mod:`typing` module has a special value :data:`TypeAlias` which " "lets you declare type aliases more explicitly::" msgstr "" -#: ../../whatsnew/3.10.rst:789 +#: ../../whatsnew/3.10.rst:790 msgid "See :pep:`613` for more details." msgstr "更多資訊請見 :pep:`613`\\ 。" -#: ../../whatsnew/3.10.rst:791 +#: ../../whatsnew/3.10.rst:792 msgid "(Contributed by Mikhail Golubev in :issue:`41923`.)" msgstr "" -#: ../../whatsnew/3.10.rst:794 +#: ../../whatsnew/3.10.rst:795 msgid "PEP 647: User-Defined Type Guards" msgstr "" -#: ../../whatsnew/3.10.rst:796 +#: ../../whatsnew/3.10.rst:797 msgid "" ":data:`TypeGuard` has been added to the :mod:`typing` module to annotate " "type guard functions and improve information provided to static type " @@ -812,24 +812,24 @@ msgid "" "`TypeGuard`\\ 's documentation, and :pep:`647`." msgstr "" -#: ../../whatsnew/3.10.rst:801 +#: ../../whatsnew/3.10.rst:802 msgid "" "(Contributed by Ken Jin and Guido van Rossum in :issue:`43766`. PEP written " "by Eric Traut.)" msgstr "" -#: ../../whatsnew/3.10.rst:805 +#: ../../whatsnew/3.10.rst:806 msgid "Other Language Changes" msgstr "" -#: ../../whatsnew/3.10.rst:807 +#: ../../whatsnew/3.10.rst:808 msgid "" "The :class:`int` type has a new method :meth:`int.bit_count`, returning the " "number of ones in the binary expansion of a given integer, also known as the " "population count. (Contributed by Niklas Fiekas in :issue:`29882`.)" msgstr "" -#: ../../whatsnew/3.10.rst:811 +#: ../../whatsnew/3.10.rst:812 msgid "" "The views returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:`dict." "items` now all have a ``mapping`` attribute that gives a :class:`types." @@ -837,13 +837,13 @@ msgid "" "Dennis Sweeney in :issue:`40890`.)" msgstr "" -#: ../../whatsnew/3.10.rst:816 +#: ../../whatsnew/3.10.rst:817 msgid "" ":pep:`618`: The :func:`zip` function now has an optional ``strict`` flag, " "used to require that all the iterables have an equal length." msgstr "" -#: ../../whatsnew/3.10.rst:819 +#: ../../whatsnew/3.10.rst:820 msgid "" "Builtin and extension functions that take integer arguments no longer " "accept :class:`~decimal.Decimal`\\ s, :class:`~fractions.Fraction`\\ s and " @@ -852,20 +852,20 @@ msgid "" "__index__` method). (Contributed by Serhiy Storchaka in :issue:`37999`.)" msgstr "" -#: ../../whatsnew/3.10.rst:826 +#: ../../whatsnew/3.10.rst:827 msgid "" "If :func:`object.__ipow__` returns :const:`NotImplemented`, the operator " "will correctly fall back to :func:`object.__pow__` and :func:`object." "__rpow__` as expected. (Contributed by Alex Shkop in :issue:`38302`.)" msgstr "" -#: ../../whatsnew/3.10.rst:830 +#: ../../whatsnew/3.10.rst:831 msgid "" "Assignment expressions can now be used unparenthesized within set literals " "and set comprehensions, as well as in sequence indexes (but not slices)." msgstr "" -#: ../../whatsnew/3.10.rst:833 +#: ../../whatsnew/3.10.rst:834 msgid "" "Functions have a new ``__builtins__`` attribute which is used to look for " "builtin symbols when a function is executed, instead of looking into " @@ -874,7 +874,7 @@ msgid "" "builtins. (Contributed by Mark Shannon in :issue:`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:839 +#: ../../whatsnew/3.10.rst:840 msgid "" "Two new builtin functions -- :func:`aiter` and :func:`anext` have been added " "to provide asynchronous counterparts to :func:`iter` and :func:`next`, " @@ -882,7 +882,7 @@ msgid "" "in :issue:`31861`.)" msgstr "" -#: ../../whatsnew/3.10.rst:844 +#: ../../whatsnew/3.10.rst:845 msgid "" "Static methods (:func:`@staticmethod `) and class methods (:" "func:`@classmethod `) now inherit the method attributes " @@ -892,7 +892,7 @@ msgid "" "Stinner in :issue:`43682`.)" msgstr "" -#: ../../whatsnew/3.10.rst:851 +#: ../../whatsnew/3.10.rst:852 msgid "" "Annotations for complex targets (everything beside ``simple name`` targets " "defined by :pep:`526`) no longer cause any runtime effects with ``from " @@ -900,7 +900,7 @@ msgid "" "`42737`.)" msgstr "" -#: ../../whatsnew/3.10.rst:855 +#: ../../whatsnew/3.10.rst:856 msgid "" "Class and module objects now lazy-create empty annotations dicts on demand. " "The annotations dicts are stored in the object’s ``__dict__`` for backwards " @@ -909,7 +909,7 @@ msgid "" "howto`. (Contributed by Larry Hastings in :issue:`43901`.)" msgstr "" -#: ../../whatsnew/3.10.rst:862 +#: ../../whatsnew/3.10.rst:863 msgid "" "Annotations consist of ``yield``, ``yield from``, ``await`` or named " "expressions are now forbidden under ``from __future__ import annotations`` " @@ -917,7 +917,7 @@ msgid "" "`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:867 +#: ../../whatsnew/3.10.rst:868 msgid "" "Usage of unbound variables, ``super()`` and other expressions that might " "alter the processing of symbol table as annotations are now rendered " @@ -925,7 +925,7 @@ msgid "" "Batuhan Taskaya in :issue:`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:872 +#: ../../whatsnew/3.10.rst:873 msgid "" "Hashes of NaN values of both :class:`float` type and :class:`decimal." "Decimal` type now depend on object identity. Formerly, they always hashed to " @@ -935,121 +935,121 @@ msgid "" "Raymond Hettinger in :issue:`43475`.)" msgstr "" -#: ../../whatsnew/3.10.rst:879 +#: ../../whatsnew/3.10.rst:880 msgid "" "A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when " "deleting the :const:`__debug__` constant. (Contributed by Dong-hee Na in :" "issue:`45000`.)" msgstr "" -#: ../../whatsnew/3.10.rst:882 +#: ../../whatsnew/3.10.rst:883 msgid "" ":exc:`SyntaxError` exceptions now have ``end_lineno`` and ``end_offset`` " "attributes. They will be ``None`` if not determined. (Contributed by Pablo " "Galindo in :issue:`43914`.)" msgstr "" -#: ../../whatsnew/3.10.rst:887 +#: ../../whatsnew/3.10.rst:888 msgid "New Modules" msgstr "" -#: ../../whatsnew/3.10.rst:889 +#: ../../whatsnew/3.10.rst:890 msgid "None yet." msgstr "" -#: ../../whatsnew/3.10.rst:893 +#: ../../whatsnew/3.10.rst:894 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.10.rst:896 +#: ../../whatsnew/3.10.rst:897 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.10.rst:898 +#: ../../whatsnew/3.10.rst:899 msgid "" "Add missing :meth:`~asyncio.events.AbstractEventLoop." "connect_accepted_socket` method. (Contributed by Alex Grönholm in :issue:" "`41332`.)" msgstr "" -#: ../../whatsnew/3.10.rst:903 +#: ../../whatsnew/3.10.rst:904 msgid "argparse" msgstr "argparse" -#: ../../whatsnew/3.10.rst:905 +#: ../../whatsnew/3.10.rst:906 msgid "" "Misleading phrase \"optional arguments\" was replaced with \"options\" in " "argparse help. Some tests might require adaptation if they rely on exact " "output match. (Contributed by Raymond Hettinger in :issue:`9694`.)" msgstr "" -#: ../../whatsnew/3.10.rst:909 +#: ../../whatsnew/3.10.rst:910 msgid "array" msgstr "array" -#: ../../whatsnew/3.10.rst:911 +#: ../../whatsnew/3.10.rst:912 msgid "" "The :meth:`~array.array.index` method of :class:`array.array` now has " "optional *start* and *stop* parameters. (Contributed by Anders Lorentsen and " "Zackery Spytz in :issue:`31956`.)" msgstr "" -#: ../../whatsnew/3.10.rst:916 +#: ../../whatsnew/3.10.rst:917 msgid "asynchat, asyncore, smtpd" msgstr "asynchat, asyncore, smtpd" -#: ../../whatsnew/3.10.rst:917 +#: ../../whatsnew/3.10.rst:918 msgid "" "These modules have been marked as deprecated in their module documentation " "since Python 3.6. An import-time :class:`DeprecationWarning` has now been " "added to all three of these modules." msgstr "" -#: ../../whatsnew/3.10.rst:922 +#: ../../whatsnew/3.10.rst:923 msgid "base64" msgstr "base64" -#: ../../whatsnew/3.10.rst:924 +#: ../../whatsnew/3.10.rst:925 msgid "" "Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support " "the Base32 Encoding with Extended Hex Alphabet." msgstr "" -#: ../../whatsnew/3.10.rst:928 +#: ../../whatsnew/3.10.rst:929 msgid "bdb" msgstr "bdb" -#: ../../whatsnew/3.10.rst:930 +#: ../../whatsnew/3.10.rst:931 msgid "" "Add :meth:`~bdb.Breakpoint.clearBreakpoints` to reset all set breakpoints. " "(Contributed by Irit Katriel in :issue:`24160`.)" msgstr "" -#: ../../whatsnew/3.10.rst:934 +#: ../../whatsnew/3.10.rst:935 msgid "bisect" msgstr "bisect" -#: ../../whatsnew/3.10.rst:936 +#: ../../whatsnew/3.10.rst:937 msgid "" "Added the possibility of providing a *key* function to the APIs in the :mod:" "`bisect` module. (Contributed by Raymond Hettinger in :issue:`4356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:940 +#: ../../whatsnew/3.10.rst:941 msgid "codecs" msgstr "codecs" -#: ../../whatsnew/3.10.rst:942 +#: ../../whatsnew/3.10.rst:943 msgid "" "Add a :func:`codecs.unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:946 +#: ../../whatsnew/3.10.rst:947 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.10.rst:948 +#: ../../whatsnew/3.10.rst:949 msgid "" "The ``__args__`` of the :ref:`parameterized generic ` " "for :class:`collections.abc.Callable` are now consistent with :data:`typing." @@ -1065,34 +1065,34 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:961 +#: ../../whatsnew/3.10.rst:962 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.10.rst:963 +#: ../../whatsnew/3.10.rst:964 msgid "" "Add a :func:`contextlib.aclosing` context manager to safely close async " "generators and objects representing asynchronously released resources. " "(Contributed by Joongi Kim and John Belmonte in :issue:`41229`.)" msgstr "" -#: ../../whatsnew/3.10.rst:967 +#: ../../whatsnew/3.10.rst:968 msgid "" "Add asynchronous context manager support to :func:`contextlib.nullcontext`. " "(Contributed by Tom Gringauz in :issue:`41543`.)" msgstr "" -#: ../../whatsnew/3.10.rst:970 +#: ../../whatsnew/3.10.rst:971 msgid "" "Add :class:`AsyncContextDecorator`, for supporting usage of async context " "managers as decorators." msgstr "" -#: ../../whatsnew/3.10.rst:974 +#: ../../whatsnew/3.10.rst:975 msgid "curses" msgstr "curses" -#: ../../whatsnew/3.10.rst:976 +#: ../../whatsnew/3.10.rst:977 msgid "" "The extended color functions added in ncurses 6.1 will be used transparently " "by :func:`curses.color_content`, :func:`curses.init_color`, :func:`curses." @@ -1102,53 +1102,53 @@ msgid "" "Kintscher and Hans Petter Jansson in :issue:`36982`.)" msgstr "" -#: ../../whatsnew/3.10.rst:983 +#: ../../whatsnew/3.10.rst:984 msgid "" "The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if " "they are provided by the underlying curses library. (Contributed by Zackery " "Spytz in :issue:`39273`.)" msgstr "" -#: ../../whatsnew/3.10.rst:988 +#: ../../whatsnew/3.10.rst:989 msgid "dataclasses" msgstr "dataclasses" -#: ../../whatsnew/3.10.rst:991 +#: ../../whatsnew/3.10.rst:992 msgid "__slots__" msgstr "__slots__" -#: ../../whatsnew/3.10.rst:993 +#: ../../whatsnew/3.10.rst:994 msgid "" "Added ``slots`` parameter in :func:`dataclasses.dataclass` decorator. " "(Contributed by Yurii Karabas in :issue:`42269`)" msgstr "" -#: ../../whatsnew/3.10.rst:997 +#: ../../whatsnew/3.10.rst:998 msgid "Keyword-only fields" msgstr "" -#: ../../whatsnew/3.10.rst:999 +#: ../../whatsnew/3.10.rst:1000 msgid "" "dataclasses now supports fields that are keyword-only in the generated " "__init__ method. There are a number of ways of specifying keyword-only " "fields." msgstr "" -#: ../../whatsnew/3.10.rst:1003 +#: ../../whatsnew/3.10.rst:1004 msgid "You can say that every field is keyword-only:" msgstr "" -#: ../../whatsnew/3.10.rst:1014 +#: ../../whatsnew/3.10.rst:1015 msgid "" "Both ``name`` and ``birthday`` are keyword-only parameters to the generated " "__init__ method." msgstr "" -#: ../../whatsnew/3.10.rst:1017 +#: ../../whatsnew/3.10.rst:1018 msgid "You can specify keyword-only on a per-field basis:" msgstr "" -#: ../../whatsnew/3.10.rst:1028 +#: ../../whatsnew/3.10.rst:1029 msgid "" "Here only ``birthday`` is keyword-only. If you set ``kw_only`` on " "individual fields, be aware that there are rules about re-ordering fields " @@ -1156,23 +1156,23 @@ msgid "" "the full dataclasses documentation for details." msgstr "" -#: ../../whatsnew/3.10.rst:1033 +#: ../../whatsnew/3.10.rst:1034 msgid "" "You can also specify that all fields following a KW_ONLY marker are keyword-" "only. This will probably be the most common usage:" msgstr "" -#: ../../whatsnew/3.10.rst:1048 +#: ../../whatsnew/3.10.rst:1049 msgid "" "Here, ``z`` and ``t`` are keyword-only parameters, while ``x`` and ``y`` are " "not. (Contributed by Eric V. Smith in :issue:`43532`)" msgstr "" -#: ../../whatsnew/3.10.rst:1055 +#: ../../whatsnew/3.10.rst:1056 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.10.rst:1057 +#: ../../whatsnew/3.10.rst:1058 msgid "" "The entire ``distutils`` package is deprecated, to be removed in Python " "3.12. Its functionality for specifying package builds has already been " @@ -1185,131 +1185,131 @@ msgid "" "`632` for discussion." msgstr "" -#: ../../whatsnew/3.10.rst:1067 +#: ../../whatsnew/3.10.rst:1068 msgid "" "The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. The " "``bdist_wheel`` command is now recommended to distribute binary packages on " "Windows. (Contributed by Victor Stinner in :issue:`42802`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1073 +#: ../../whatsnew/3.10.rst:1074 msgid "doctest" msgstr "doctest" -#: ../../whatsnew/3.10.rst:1075 ../../whatsnew/3.10.rst:1186 -#: ../../whatsnew/3.10.rst:1207 ../../whatsnew/3.10.rst:1306 +#: ../../whatsnew/3.10.rst:1076 ../../whatsnew/3.10.rst:1187 +#: ../../whatsnew/3.10.rst:1208 ../../whatsnew/3.10.rst:1307 msgid "" "When a module does not define ``__loader__``, fall back to ``__spec__." "loader``. (Contributed by Brett Cannon in :issue:`42133`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1079 +#: ../../whatsnew/3.10.rst:1080 msgid "encodings" msgstr "encodings" -#: ../../whatsnew/3.10.rst:1081 +#: ../../whatsnew/3.10.rst:1082 msgid "" ":func:`encodings.normalize_encoding` now ignores non-ASCII characters. " "(Contributed by Hai Shi in :issue:`39337`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1085 +#: ../../whatsnew/3.10.rst:1086 msgid "fileinput" msgstr "fileinput" -#: ../../whatsnew/3.10.rst:1087 +#: ../../whatsnew/3.10.rst:1088 msgid "" "Add *encoding* and *errors* parameters in :func:`fileinput.input` and :class:" "`fileinput.FileInput`. (Contributed by Inada Naoki in :issue:`43712`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1091 +#: ../../whatsnew/3.10.rst:1092 msgid "" ":func:`fileinput.hook_compressed` now returns :class:`TextIOWrapper` object " "when *mode* is \"r\" and file is compressed, like uncompressed files. " "(Contributed by Inada Naoki in :issue:`5758`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1096 +#: ../../whatsnew/3.10.rst:1097 msgid "faulthandler" msgstr "faulthandler" -#: ../../whatsnew/3.10.rst:1098 +#: ../../whatsnew/3.10.rst:1099 msgid "" "The :mod:`faulthandler` module now detects if a fatal error occurs during a " "garbage collector collection. (Contributed by Victor Stinner in :issue:" "`44466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1103 +#: ../../whatsnew/3.10.rst:1104 msgid "gc" msgstr "gc" -#: ../../whatsnew/3.10.rst:1105 +#: ../../whatsnew/3.10.rst:1106 msgid "" "Add audit hooks for :func:`gc.get_objects`, :func:`gc.get_referrers` and :" "func:`gc.get_referents`. (Contributed by Pablo Galindo in :issue:`43439`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1109 +#: ../../whatsnew/3.10.rst:1110 msgid "glob" msgstr "glob" -#: ../../whatsnew/3.10.rst:1111 +#: ../../whatsnew/3.10.rst:1112 msgid "" "Add the *root_dir* and *dir_fd* parameters in :func:`~glob.glob` and :func:" "`~glob.iglob` which allow to specify the root directory for searching. " "(Contributed by Serhiy Storchaka in :issue:`38144`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1116 +#: ../../whatsnew/3.10.rst:1117 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.10.rst:1118 +#: ../../whatsnew/3.10.rst:1119 msgid "" "The hashlib module requires OpenSSL 1.1.1 or newer. (Contributed by " "Christian Heimes in :pep:`644` and :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1121 +#: ../../whatsnew/3.10.rst:1122 msgid "" "The hashlib module has preliminary support for OpenSSL 3.0.0. (Contributed " "by Christian Heimes in :issue:`38820` and other issues.)" msgstr "" -#: ../../whatsnew/3.10.rst:1124 +#: ../../whatsnew/3.10.rst:1125 msgid "" "The pure-Python fallback of :func:`~hashlib.pbkdf2_hmac` is deprecated. In " "the future PBKDF2-HMAC will only be available when Python has been built " "with OpenSSL support. (Contributed by Christian Heimes in :issue:`43880`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1130 +#: ../../whatsnew/3.10.rst:1131 msgid "hmac" msgstr "hmac" -#: ../../whatsnew/3.10.rst:1132 +#: ../../whatsnew/3.10.rst:1133 msgid "" "The hmac module now uses OpenSSL's HMAC implementation internally. " "(Contributed by Christian Heimes in :issue:`40645`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1136 +#: ../../whatsnew/3.10.rst:1137 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.10.rst:1138 +#: ../../whatsnew/3.10.rst:1139 msgid "" "Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User " "hooks were previously ignored. (Patch by Ken Hilton in :issue:`43008`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1142 +#: ../../whatsnew/3.10.rst:1143 msgid "This change was backported to a 3.9 maintenance release." msgstr "" -#: ../../whatsnew/3.10.rst:1144 +#: ../../whatsnew/3.10.rst:1145 msgid "" "Add a Shell sidebar. Move the primary prompt ('>>>') to the sidebar. Add " "secondary prompts ('...') to the sidebar. Left click and optional drag " @@ -1320,7 +1320,7 @@ msgid "" "text. (Contributed by Tal Einat in :issue:`37903`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1153 +#: ../../whatsnew/3.10.rst:1154 msgid "" "Use spaces instead of tabs to indent interactive code. This makes " "interactive code entries 'look right'. Making this feasible was a major " @@ -1328,13 +1328,13 @@ msgid "" "issue:`37892`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1158 +#: ../../whatsnew/3.10.rst:1159 msgid "" "We expect to backport these shell changes to a future 3.9 maintenance " "release." msgstr "" -#: ../../whatsnew/3.10.rst:1161 +#: ../../whatsnew/3.10.rst:1162 msgid "" "Highlight the new :ref:`soft keywords ` :keyword:`match`, :" "keyword:`case `, and :keyword:`_ ` in pattern-" @@ -1343,17 +1343,17 @@ msgid "" "(Contributed by Tal Einat in :issue:`44010`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1168 +#: ../../whatsnew/3.10.rst:1169 msgid "importlib.metadata" msgstr "importlib.metadata" -#: ../../whatsnew/3.10.rst:1170 +#: ../../whatsnew/3.10.rst:1171 msgid "" "Feature parity with ``importlib_metadata`` 4.6 (`history `_)." msgstr "" -#: ../../whatsnew/3.10.rst:1173 +#: ../../whatsnew/3.10.rst:1174 msgid "" ":ref:`importlib.metadata entry points ` now provide a nicer " "experience for selecting entry points by group and name through a new :class:" @@ -1361,18 +1361,18 @@ msgid "" "docs for more info on the deprecation and usage." msgstr "" -#: ../../whatsnew/3.10.rst:1179 +#: ../../whatsnew/3.10.rst:1180 msgid "" "Added :func:`importlib.metadata.packages_distributions` for resolving top-" "level Python modules and packages to their :class:`importlib.metadata." "Distribution`." msgstr "" -#: ../../whatsnew/3.10.rst:1184 +#: ../../whatsnew/3.10.rst:1185 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.10.rst:1189 +#: ../../whatsnew/3.10.rst:1190 msgid "" "Add :func:`inspect.get_annotations`, which safely computes the annotations " "defined on an object. It works around the quirks of accessing the " @@ -1390,28 +1390,28 @@ msgid "" "`43817`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1205 +#: ../../whatsnew/3.10.rst:1206 msgid "linecache" msgstr "linecache" -#: ../../whatsnew/3.10.rst:1211 +#: ../../whatsnew/3.10.rst:1212 msgid "os" msgstr "os" -#: ../../whatsnew/3.10.rst:1213 +#: ../../whatsnew/3.10.rst:1214 msgid "" "Add :func:`os.cpu_count()` support for VxWorks RTOS. (Contributed by Peixing " "Xin in :issue:`41440`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1216 +#: ../../whatsnew/3.10.rst:1217 msgid "" "Add a new function :func:`os.eventfd` and related helpers to wrap the " "``eventfd2`` syscall on Linux. (Contributed by Christian Heimes in :issue:" "`41001`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1220 +#: ../../whatsnew/3.10.rst:1221 msgid "" "Add :func:`os.splice()` that allows to move data between two file " "descriptors without copying between kernel address space and user address " @@ -1419,41 +1419,41 @@ msgid "" "by Pablo Galindo in :issue:`41625`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1225 +#: ../../whatsnew/3.10.rst:1226 msgid "" "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and :" "data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :issue:" "`43106`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1230 +#: ../../whatsnew/3.10.rst:1231 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.10.rst:1232 +#: ../../whatsnew/3.10.rst:1233 msgid "" ":func:`os.path.realpath` now accepts a *strict* keyword-only argument. When " "set to ``True``, :exc:`OSError` is raised if a path doesn't exist or a " "symlink loop is encountered. (Contributed by Barney Gale in :issue:`43757`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1238 +#: ../../whatsnew/3.10.rst:1239 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.10.rst:1240 +#: ../../whatsnew/3.10.rst:1241 msgid "" "Add slice support to :attr:`PurePath.parents `. " "(Contributed by Joshua Cannon in :issue:`35498`)" msgstr "" -#: ../../whatsnew/3.10.rst:1243 +#: ../../whatsnew/3.10.rst:1244 msgid "" "Add negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`)" msgstr "" -#: ../../whatsnew/3.10.rst:1247 +#: ../../whatsnew/3.10.rst:1248 msgid "" "Add :meth:`Path.hardlink_to ` method that " "supersedes :meth:`~pathlib.Path.link_to`. The new method has the same " @@ -1461,7 +1461,7 @@ msgid "" "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1252 +#: ../../whatsnew/3.10.rst:1253 msgid "" ":meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now accept a " "*follow_symlinks* keyword-only argument for consistency with corresponding " @@ -1469,11 +1469,11 @@ msgid "" "`39906`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1258 +#: ../../whatsnew/3.10.rst:1259 msgid "platform" msgstr "platform" -#: ../../whatsnew/3.10.rst:1260 +#: ../../whatsnew/3.10.rst:1261 msgid "" "Add :func:`platform.freedesktop_os_release()` to retrieve operation system " "identification from `freedesktop.org os-release ` section for " "more information." msgstr "" -#: ../../whatsnew/3.10.rst:1605 +#: ../../whatsnew/3.10.rst:1606 msgid "" "Non-integer arguments to :func:`random.randrange` are deprecated. The :exc:" "`ValueError` is deprecated in favor of a :exc:`TypeError`. (Contributed by " "Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1609 +#: ../../whatsnew/3.10.rst:1610 msgid "" "The various ``load_module()`` methods of :mod:`importlib` have been " "documented as deprecated since Python 3.6, but will now also trigger a :exc:" @@ -1999,21 +1999,21 @@ msgid "" "(Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1615 +#: ../../whatsnew/3.10.rst:1616 msgid "" ":meth:`zimport.zipimporter.load_module` has been deprecated in preference " "for :meth:`~zipimport.zipimporter.exec_module`. (Contributed by Brett Cannon " "in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1619 +#: ../../whatsnew/3.10.rst:1620 msgid "" "The use of :meth:`~importlib.abc.Loader.load_module` by the import system " "now triggers an :exc:`ImportWarning` as :meth:`~importlib.abc.Loader." "exec_module` is preferred. (Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1624 +#: ../../whatsnew/3.10.rst:1625 msgid "" "The use of :meth:`importlib.abc.MetaPathFinder.find_module` and :meth:" "`importlib.abc.PathEntryFinder.find_module` by the import system now trigger " @@ -2023,7 +2023,7 @@ msgid "" "porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1633 +#: ../../whatsnew/3.10.rst:1634 msgid "" "The use of :meth:`importlib.abc.PathEntryFinder.find_loader` by the import " "system now triggers an :exc:`ImportWarning` as :meth:`importlib.abc." @@ -2032,7 +2032,7 @@ msgid "" "`43672`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1639 +#: ../../whatsnew/3.10.rst:1640 msgid "" "The various implementations of :meth:`importlib.abc.MetaPathFinder." "find_module` ( :meth:`importlib.machinery.BuiltinImporter.find_module`, :" @@ -2047,7 +2047,7 @@ msgid "" "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1655 +#: ../../whatsnew/3.10.rst:1656 msgid "" ":class:`importlib.abc.Finder` is deprecated (including its sole method, :" "meth:`~importlib.abc.Finder.find_module`). Both :class:`importlib.abc." @@ -2056,7 +2056,7 @@ msgid "" "appropriate instead. (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1662 +#: ../../whatsnew/3.10.rst:1663 msgid "" "The deprecations of :mod:`imp`, :func:`importlib.find_loader`, :func:" "`importlib.util.set_package_wrapper`, :func:`importlib.util." @@ -2067,7 +2067,7 @@ msgid "" "Brett Cannon in :issue:`43720`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1672 +#: ../../whatsnew/3.10.rst:1673 msgid "" "The import system now uses the ``__spec__`` attribute on modules before " "falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's " @@ -2075,7 +2075,7 @@ msgid "" "for Python 3.12. (Contributed by Brett Cannon in :issue:`42137`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1678 +#: ../../whatsnew/3.10.rst:1679 msgid "" ":meth:`importlib.abc.Loader.module_repr`, :meth:`importlib.machinery." "FrozenLoader.module_repr`, and :meth:`importlib.machinery.BuiltinLoader." @@ -2083,7 +2083,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42136`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1684 +#: ../../whatsnew/3.10.rst:1685 msgid "" "``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python " "3.3, when it was made an alias to :class:`str`. It is now deprecated, " @@ -2091,7 +2091,7 @@ msgid "" "issue:`42264`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1689 +#: ../../whatsnew/3.10.rst:1690 msgid "" ":func:`asyncio.get_event_loop` now emits a deprecation warning if there is " "no running event loop. In the future it will be an alias of :func:`~asyncio." @@ -2105,7 +2105,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`39529`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1702 +#: ../../whatsnew/3.10.rst:1703 msgid "" "The undocumented built-in function ``sqlite3.enable_shared_cache`` is now " "deprecated, scheduled for removal in Python 3.12. Its use is strongly " @@ -2115,68 +2115,68 @@ msgid "" "query parameter. (Contributed by Erlend E. Aasland in :issue:`24464`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1710 +#: ../../whatsnew/3.10.rst:1711 msgid "The following ``threading`` methods are now deprecated:" msgstr "" -#: ../../whatsnew/3.10.rst:1712 +#: ../../whatsnew/3.10.rst:1713 msgid "``threading.currentThread`` => :func:`threading.current_thread`" msgstr "``threading.currentThread`` => :func:`threading.current_thread`" -#: ../../whatsnew/3.10.rst:1714 +#: ../../whatsnew/3.10.rst:1715 msgid "``threading.activeCount`` => :func:`threading.active_count`" msgstr "``threading.activeCount`` => :func:`threading.active_count`" -#: ../../whatsnew/3.10.rst:1716 +#: ../../whatsnew/3.10.rst:1717 msgid "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" msgstr "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" -#: ../../whatsnew/3.10.rst:1719 +#: ../../whatsnew/3.10.rst:1720 msgid "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" msgstr "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" -#: ../../whatsnew/3.10.rst:1721 +#: ../../whatsnew/3.10.rst:1722 msgid "``threading.Thread.setName`` => :attr:`threading.Thread.name`" msgstr "``threading.Thread.setName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1723 +#: ../../whatsnew/3.10.rst:1724 msgid "``threading.thread.getName`` => :attr:`threading.Thread.name`" msgstr "``threading.thread.getName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1725 +#: ../../whatsnew/3.10.rst:1726 msgid "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1727 +#: ../../whatsnew/3.10.rst:1728 msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1729 +#: ../../whatsnew/3.10.rst:1730 msgid "(Contributed by Jelle Zijlstra in :issue:`21574`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1731 +#: ../../whatsnew/3.10.rst:1732 msgid "" ":meth:`pathlib.Path.link_to` is deprecated and slated for removal in Python " "3.12. Use :meth:`pathlib.Path.hardlink_to` instead. (Contributed by Barney " "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1735 +#: ../../whatsnew/3.10.rst:1736 msgid "" "``cgi.log()`` is deprecated and slated for removal in Python 3.12. " "(Contributed by Inada Naoki in :issue:`41139`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1738 +#: ../../whatsnew/3.10.rst:1739 msgid "" "The following :mod:`ssl` features have been deprecated since Python 3.6, " "Python 3.7, or OpenSSL 1.1.0 and will be removed in 3.11:" msgstr "" -#: ../../whatsnew/3.10.rst:1741 +#: ../../whatsnew/3.10.rst:1742 msgid "" ":data:`~ssl.OP_NO_SSLv2`, :data:`~ssl.OP_NO_SSLv3`, :data:`~ssl." "OP_NO_TLSv1`, :data:`~ssl.OP_NO_TLSv1_1`, :data:`~ssl.OP_NO_TLSv1_2`, and :" @@ -2184,7 +2184,7 @@ msgid "" "minimum_version` and :attr:`sslSSLContext.maximum_version`." msgstr "" -#: ../../whatsnew/3.10.rst:1747 +#: ../../whatsnew/3.10.rst:1748 msgid "" ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." @@ -2193,26 +2193,26 @@ msgid "" "and :data:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -#: ../../whatsnew/3.10.rst:1753 +#: ../../whatsnew/3.10.rst:1754 msgid "" ":func:`~ssl.wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`" msgstr "" -#: ../../whatsnew/3.10.rst:1755 +#: ../../whatsnew/3.10.rst:1756 msgid ":func:`~ssl.match_hostname`" msgstr ":func:`~ssl.match_hostname`" -#: ../../whatsnew/3.10.rst:1757 +#: ../../whatsnew/3.10.rst:1758 msgid ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" msgstr ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" -#: ../../whatsnew/3.10.rst:1759 +#: ../../whatsnew/3.10.rst:1760 msgid "" "NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and :meth:`ssl." "SSLContext.set_npn_protocols` are replaced by ALPN." msgstr "" -#: ../../whatsnew/3.10.rst:1762 +#: ../../whatsnew/3.10.rst:1763 msgid "" "The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is " "deprecated in Python 3.10 and will be removed in Python 3.12. This feature " @@ -2220,7 +2220,7 @@ msgid "" "Victor Stinner in :issue:`44584`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1767 +#: ../../whatsnew/3.10.rst:1768 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules will be removed in a future " @@ -2229,11 +2229,11 @@ msgid "" "Rittau in :issue:`38291`)" msgstr "" -#: ../../whatsnew/3.10.rst:1776 ../../whatsnew/3.10.rst:2200 +#: ../../whatsnew/3.10.rst:1777 ../../whatsnew/3.10.rst:2201 msgid "Removed" msgstr "" -#: ../../whatsnew/3.10.rst:1778 +#: ../../whatsnew/3.10.rst:1779 msgid "" "Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, " "``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and " @@ -2241,7 +2241,7 @@ msgid "" "`TypeError`. (Contributed by Serhiy Storchaka in :issue:`41974`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1784 +#: ../../whatsnew/3.10.rst:1785 msgid "" "The ``ParserBase.error()`` method from the private and undocumented " "``_markupbase`` module has been removed. :class:`html.parser.HTMLParser` is " @@ -2250,7 +2250,7 @@ msgid "" "`31844`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1790 +#: ../../whatsnew/3.10.rst:1791 msgid "" "Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal " "PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was " @@ -2258,7 +2258,7 @@ msgid "" "`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1795 +#: ../../whatsnew/3.10.rst:1796 msgid "" "Removed the ``parser`` module, which was deprecated in 3.9 due to the switch " "to the new PEG parser, as well as all the C source and header files that " @@ -2266,7 +2266,7 @@ msgid "" "``graminit.h`` and ``grammar.h``." msgstr "" -#: ../../whatsnew/3.10.rst:1800 +#: ../../whatsnew/3.10.rst:1801 msgid "" "Removed the Public C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2274,7 +2274,7 @@ msgid "" "deprecated in 3.9 due to the switch to the new PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1805 +#: ../../whatsnew/3.10.rst:1806 msgid "" "Removed the ``formatter`` module, which was deprecated in Python 3.4. It is " "somewhat obsolete, little used, and not tested. It was originally scheduled " @@ -2284,71 +2284,71 @@ msgid "" "`42299`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1812 +#: ../../whatsnew/3.10.rst:1813 msgid "" "Removed the :c:func:`PyModule_GetWarningsModule` function that was useless " "now due to the _warnings module was converted to a builtin module in 2.6. " "(Contributed by Hai Shi in :issue:`42599`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1816 +#: ../../whatsnew/3.10.rst:1817 msgid "" "Remove deprecated aliases to :ref:`collections-abstract-base-classes` from " "the :mod:`collections` module. (Contributed by Victor Stinner in :issue:" "`37324`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1820 +#: ../../whatsnew/3.10.rst:1821 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8. The motivation behind this change is multifold:" msgstr "" -#: ../../whatsnew/3.10.rst:1824 +#: ../../whatsnew/3.10.rst:1825 msgid "This simplifies the high-level API." msgstr "" -#: ../../whatsnew/3.10.rst:1825 +#: ../../whatsnew/3.10.rst:1826 msgid "" "The functions in the high-level API have been implicitly getting the current " "thread's running event loop since Python 3.7. There isn't a need to pass " "the event loop to the API in most normal use cases." msgstr "" -#: ../../whatsnew/3.10.rst:1828 +#: ../../whatsnew/3.10.rst:1829 msgid "" "Event loop passing is error-prone especially when dealing with loops running " "in different threads." msgstr "" -#: ../../whatsnew/3.10.rst:1831 +#: ../../whatsnew/3.10.rst:1832 msgid "" "Note that the low-level API will still accept ``loop``. See `Changes in the " "Python API`_ for examples of how to replace existing code." msgstr "" -#: ../../whatsnew/3.10.rst:1834 ../../whatsnew/3.10.rst:1905 +#: ../../whatsnew/3.10.rst:1835 ../../whatsnew/3.10.rst:1906 msgid "" "(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle " "Stanley in :issue:`42392`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1839 ../../whatsnew/3.10.rst:2125 +#: ../../whatsnew/3.10.rst:1840 ../../whatsnew/3.10.rst:2126 msgid "Porting to Python 3.10" msgstr "" -#: ../../whatsnew/3.10.rst:1841 +#: ../../whatsnew/3.10.rst:1842 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.10.rst:1846 +#: ../../whatsnew/3.10.rst:1847 msgid "Changes in the Python syntax" msgstr "" -#: ../../whatsnew/3.10.rst:1848 +#: ../../whatsnew/3.10.rst:1849 msgid "" "Deprecation warning is now emitted when compiling previously valid syntax if " "the numeric literal is immediately followed by a keyword (like in ``0in " @@ -2358,11 +2358,11 @@ msgid "" "following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`)." msgstr "" -#: ../../whatsnew/3.10.rst:1858 +#: ../../whatsnew/3.10.rst:1859 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.10.rst:1860 +#: ../../whatsnew/3.10.rst:1861 msgid "" "The *etype* parameters of the :func:`~traceback.format_exception`, :func:" "`~traceback.format_exception_only`, and :func:`~traceback.print_exception` " @@ -2370,7 +2370,7 @@ msgid "" "(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1866 +#: ../../whatsnew/3.10.rst:1867 msgid "" ":mod:`atexit`: At Python exit, if a callback registered with :func:`atexit." "register` fails, its exception is now logged. Previously, only some " @@ -2378,7 +2378,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1872 +#: ../../whatsnew/3.10.rst:1873 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2391,7 +2391,7 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1882 +#: ../../whatsnew/3.10.rst:1883 msgid "" ":meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` " "instead of :exc:`DeprecationWarning` if the given parameter will not fit in " @@ -2399,29 +2399,29 @@ msgid "" "`42393`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1887 +#: ../../whatsnew/3.10.rst:1888 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8." msgstr "" -#: ../../whatsnew/3.10.rst:1891 +#: ../../whatsnew/3.10.rst:1892 msgid "A coroutine that currently looks like this::" msgstr "" -#: ../../whatsnew/3.10.rst:1896 +#: ../../whatsnew/3.10.rst:1897 msgid "Should be replaced with this::" msgstr "" -#: ../../whatsnew/3.10.rst:1901 +#: ../../whatsnew/3.10.rst:1902 msgid "" "If ``foo()`` was specifically designed *not* to run in the current thread's " "running event loop (e.g. running in another thread's event loop), consider " "using :func:`asyncio.run_coroutine_threadsafe` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1908 +#: ../../whatsnew/3.10.rst:1909 msgid "" "The :data:`types.FunctionType` constructor now inherits the current builtins " "if the *globals* dictionary has no ``\"__builtins__\"`` key, rather than " @@ -2432,11 +2432,11 @@ msgid "" "`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1917 +#: ../../whatsnew/3.10.rst:1918 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.10.rst:1919 +#: ../../whatsnew/3.10.rst:1920 msgid "" "The C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2445,31 +2445,31 @@ msgid "" "PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1925 +#: ../../whatsnew/3.10.rst:1926 msgid "" "Source should be now be compiled directly to a code object using, for " "example, :c:func:`Py_CompileString`. The resulting code object can then be " "evaluated using, for example, :c:func:`PyEval_EvalCode`." msgstr "" -#: ../../whatsnew/3.10.rst:1929 +#: ../../whatsnew/3.10.rst:1930 msgid "Specifically:" msgstr "" -#: ../../whatsnew/3.10.rst:1931 +#: ../../whatsnew/3.10.rst:1932 msgid "" "A call to ``PyParser_SimpleParseStringFlags`` followed by ``PyNode_Compile`` " "can be replaced by calling :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1934 +#: ../../whatsnew/3.10.rst:1935 msgid "" "There is no direct replacement for ``PyParser_SimpleParseFileFlags``. To " "compile code from a ``FILE *`` argument, you will need to read the file in C " "and pass the resulting buffer to :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1938 +#: ../../whatsnew/3.10.rst:1939 msgid "" "To compile a file given a ``char *`` filename, explicitly open the file, " "read it and compile the result. One way to do this is using the :py:mod:`io` " @@ -2478,7 +2478,7 @@ msgid "" "(Declarations and error handling are omitted.) ::" msgstr "" -#: ../../whatsnew/3.10.rst:1951 +#: ../../whatsnew/3.10.rst:1952 msgid "" "For ``FrameObject`` objects, the ``f_lasti`` member now represents a " "wordcode offset instead of a simple offset into the bytecode string. This " @@ -2488,53 +2488,53 @@ msgid "" "considered stable: please use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1959 +#: ../../whatsnew/3.10.rst:1960 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.10.rst:1961 +#: ../../whatsnew/3.10.rst:1962 msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " "Inada Naoki in :issue:`42202`)" msgstr "" -#: ../../whatsnew/3.10.rst:1966 +#: ../../whatsnew/3.10.rst:1967 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.10.rst:1968 +#: ../../whatsnew/3.10.rst:1969 msgid "" ":pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no " "longer supported. (Contributed by Christian Heimes in :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1972 +#: ../../whatsnew/3.10.rst:1973 msgid "" "The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now " "required to build Python. (Contributed by Victor Stinner in :issue:`36020`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1976 +#: ../../whatsnew/3.10.rst:1977 msgid "" ":mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey " "Fedoseev and Erlend E. Aasland :issue:`40744` and :issue:`40810`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1979 +#: ../../whatsnew/3.10.rst:1980 msgid "" "The :mod:`atexit` module must now always be built as a built-in module. " "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1982 +#: ../../whatsnew/3.10.rst:1983 msgid "" "Add :option:`--disable-test-modules` option to the ``configure`` script: " "don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas " "Petazzoni and Peixing Xin in :issue:`27640`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1986 +#: ../../whatsnew/3.10.rst:1987 msgid "" "Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` to the " "``./configure`` script. If specified, the :mod:`ensurepip` module looks for " @@ -2543,7 +2543,7 @@ msgid "" "packages." msgstr "" -#: ../../whatsnew/3.10.rst:1992 +#: ../../whatsnew/3.10.rst:1993 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -2551,22 +2551,22 @@ msgid "" "_bundled`` package." msgstr "" -#: ../../whatsnew/3.10.rst:1997 +#: ../../whatsnew/3.10.rst:1998 msgid "(Contributed by Victor Stinner in :issue:`42856`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1999 +#: ../../whatsnew/3.10.rst:2000 msgid "" "Add a new :option:`configure --without-static-libpython option <--without-" "static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` static " "library and not install the ``python.o`` object file." msgstr "" -#: ../../whatsnew/3.10.rst:2003 +#: ../../whatsnew/3.10.rst:2004 msgid "(Contributed by Victor Stinner in :issue:`43103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2005 +#: ../../whatsnew/3.10.rst:2006 msgid "" "The ``configure`` script now uses the ``pkg-config`` utility, if available, " "to detect the location of Tcl/Tk headers and libraries. As before, those " @@ -2575,7 +2575,7 @@ msgid "" "(Contributed by Manolis Stamatogiannakis in :issue:`42603`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2011 +#: ../../whatsnew/3.10.rst:2012 msgid "" "Add :option:`--with-openssl-rpath` option to ``configure`` script. The " "option simplifies building Python with a custom OpenSSL installation, e.g. " @@ -2583,15 +2583,15 @@ msgid "" "(Contributed by Christian Heimes in :issue:`43466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2018 +#: ../../whatsnew/3.10.rst:2019 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.10.rst:2021 +#: ../../whatsnew/3.10.rst:2022 msgid "PEP 652: Maintaining the Stable ABI" msgstr "" -#: ../../whatsnew/3.10.rst:2023 +#: ../../whatsnew/3.10.rst:2024 msgid "" "The Stable ABI (Application Binary Interface) for extension modules or " "embedding Python is now explicitly defined. :ref:`stable` describes C API " @@ -2599,25 +2599,25 @@ msgid "" "ABI." msgstr "" -#: ../../whatsnew/3.10.rst:2028 +#: ../../whatsnew/3.10.rst:2029 msgid "(Contributed by Petr Viktorin in :pep:`652` and :issue:`43795`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2033 +#: ../../whatsnew/3.10.rst:2034 msgid "" "The result of :c:func:`PyNumber_Index` now always has exact type :class:" "`int`. Previously, the result could have been an instance of a subclass of " "``int``. (Contributed by Serhiy Storchaka in :issue:`40792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2037 +#: ../../whatsnew/3.10.rst:2038 msgid "" "Add a new :c:member:`~PyConfig.orig_argv` member to the :c:type:`PyConfig` " "structure: the list of the original command line arguments passed to the " "Python executable. (Contributed by Victor Stinner in :issue:`23427`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2042 +#: ../../whatsnew/3.10.rst:2043 msgid "" "The :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:" "`PyDateTime_TIME_GET_TZINFO` macros have been added for accessing the " @@ -2625,72 +2625,72 @@ msgid "" "time` objects. (Contributed by Zackery Spytz in :issue:`30155`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2048 +#: ../../whatsnew/3.10.rst:2049 msgid "" "Add a :c:func:`PyCodec_Unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2052 +#: ../../whatsnew/3.10.rst:2053 msgid "" "The :c:func:`PyIter_Send` function was added to allow sending value into " "iterator without raising ``StopIteration`` exception. (Contributed by " "Vladimir Matveev in :issue:`41756`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2056 +#: ../../whatsnew/3.10.rst:2057 msgid "" "Add :c:func:`PyUnicode_AsUTF8AndSize` to the limited C API. (Contributed by " "Alex Gaynor in :issue:`41784`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2059 +#: ../../whatsnew/3.10.rst:2060 msgid "" "Add :c:func:`PyModule_AddObjectRef` function: similar to :c:func:" "`PyModule_AddObject` but don't steal a reference to the value on success. " "(Contributed by Victor Stinner in :issue:`1635741`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2064 +#: ../../whatsnew/3.10.rst:2065 msgid "" "Add :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the " "reference count of an object and return the object. (Contributed by Victor " "Stinner in :issue:`42262`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2068 +#: ../../whatsnew/3.10.rst:2069 msgid "" "The :c:func:`PyType_FromSpecWithBases` and :c:func:" "`PyType_FromModuleAndSpec` functions now accept a single class as the " "*bases* argument. (Contributed by Serhiy Storchaka in :issue:`42423`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2072 +#: ../../whatsnew/3.10.rst:2073 msgid "" "The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` " "slot. (Contributed by Hai Shi in :issue:`41832`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2076 +#: ../../whatsnew/3.10.rst:2077 msgid "" "The :c:func:`PyType_GetSlot` function can accept :ref:`static types `. (Contributed by Hai Shi and Petr Viktorin in :issue:`41073`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2080 +#: ../../whatsnew/3.10.rst:2081 msgid "" "Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an " "object is an instance of :class:`set` but not an instance of a subtype. " "(Contributed by Pablo Galindo in :issue:`43277`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2084 +#: ../../whatsnew/3.10.rst:2085 msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2088 +#: ../../whatsnew/3.10.rst:2089 msgid "" "The limited C API is now supported if :ref:`Python is built in debug mode " "` (if the ``Py_DEBUG`` macro is defined). In the limited C API, " @@ -2703,14 +2703,14 @@ msgid "" "`36465`)." msgstr "" -#: ../../whatsnew/3.10.rst:2098 +#: ../../whatsnew/3.10.rst:2099 msgid "" "The limited C API is still not supported in the :option:`--with-trace-refs` " "special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :" "issue:`43688`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2102 +#: ../../whatsnew/3.10.rst:2103 msgid "" "Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is " "the *y* object, the same as ``x is y`` in Python. Add also the :c:func:" @@ -2720,7 +2720,7 @@ msgid "" "`43753`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2109 +#: ../../whatsnew/3.10.rst:2110 msgid "" "Add new functions to control the garbage collector from C code: :c:func:" "`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`. These " @@ -2728,20 +2728,20 @@ msgid "" "collector from C code without having to import the :mod:`gc` module." msgstr "" -#: ../../whatsnew/3.10.rst:2116 +#: ../../whatsnew/3.10.rst:2117 msgid "" "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2120 +#: ../../whatsnew/3.10.rst:2121 msgid "" "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2127 +#: ../../whatsnew/3.10.rst:2128 msgid "" "The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use :c:func:" "`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use ``#``: " @@ -2750,7 +2750,7 @@ msgid "" "`353`. (Contributed by Victor Stinner in :issue:`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2134 +#: ../../whatsnew/3.10.rst:2135 msgid "" "Since :c:func:`Py_REFCNT()` is changed to the inline static function, " "``Py_REFCNT(obj) = new_refcnt`` must be replaced with ``Py_SET_REFCNT(obj, " @@ -2758,18 +2758,18 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2143 +#: ../../whatsnew/3.10.rst:2144 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2145 +#: ../../whatsnew/3.10.rst:2146 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2149 +#: ../../whatsnew/3.10.rst:2150 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -2777,14 +2777,14 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2154 +#: ../../whatsnew/3.10.rst:2155 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2158 +#: ../../whatsnew/3.10.rst:2159 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" @@ -2795,7 +2795,7 @@ msgid "" "issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2166 +#: ../../whatsnew/3.10.rst:2167 msgid "" ":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:" "`PyCell_SET` macros can no longer be used as l-value or r-value. For " @@ -2805,7 +2805,7 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2173 +#: ../../whatsnew/3.10.rst:2174 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." @@ -2816,7 +2816,7 @@ msgid "" "Nicholas Sim in :issue:`35134`)" msgstr "" -#: ../../whatsnew/3.10.rst:2181 +#: ../../whatsnew/3.10.rst:2182 msgid "" "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " @@ -2825,85 +2825,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2187 +#: ../../whatsnew/3.10.rst:2188 msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " "(Contributed by Petr Viktorin in :issue:`26241`)" msgstr "" -#: ../../whatsnew/3.10.rst:2194 +#: ../../whatsnew/3.10.rst:2195 msgid "" "The ``PyUnicode_InternImmortal()`` function is now deprecated and will be " "removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. " "(Contributed by Victor Stinner in :issue:`41692`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2202 +#: ../../whatsnew/3.10.rst:2203 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2205 +#: ../../whatsnew/3.10.rst:2206 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2207 +#: ../../whatsnew/3.10.rst:2208 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2209 +#: ../../whatsnew/3.10.rst:2210 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2211 +#: ../../whatsnew/3.10.rst:2212 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2212 +#: ../../whatsnew/3.10.rst:2213 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2213 +#: ../../whatsnew/3.10.rst:2214 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2216 +#: ../../whatsnew/3.10.rst:2217 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2219 +#: ../../whatsnew/3.10.rst:2220 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2222 +#: ../../whatsnew/3.10.rst:2223 msgid "" "Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:" "`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` (Contributed " "by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2226 +#: ../../whatsnew/3.10.rst:2227 msgid "" "Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by " "``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. " "(Contributed by Victor Stinner in :issue:`41834`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2230 +#: ../../whatsnew/3.10.rst:2231 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -2911,14 +2911,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2235 +#: ../../whatsnew/3.10.rst:2236 msgid "" "Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing " "Python already implicitly installs signal handlers: see :c:member:`PyConfig." "install_signal_handlers`. (Contributed by Victor Stinner in :issue:`41713`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2240 +#: ../../whatsnew/3.10.rst:2241 msgid "" "Remove the ``PyAST_Validate()`` function. It is no longer possible to build " "a AST object (``mod_ty`` type) with the public C API. The function was " @@ -2926,48 +2926,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2245 +#: ../../whatsnew/3.10.rst:2246 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2247 +#: ../../whatsnew/3.10.rst:2248 msgid "``PyST_GetScope()``" msgstr "``PyST_GetScope()``" -#: ../../whatsnew/3.10.rst:2248 +#: ../../whatsnew/3.10.rst:2249 msgid "``PySymtable_Build()``" msgstr "``PySymtable_Build()``" -#: ../../whatsnew/3.10.rst:2249 +#: ../../whatsnew/3.10.rst:2250 msgid "``PySymtable_BuildObject()``" msgstr "``PySymtable_BuildObject()``" -#: ../../whatsnew/3.10.rst:2250 +#: ../../whatsnew/3.10.rst:2251 msgid "``PySymtable_Free()``" msgstr "``PySymtable_Free()``" -#: ../../whatsnew/3.10.rst:2251 +#: ../../whatsnew/3.10.rst:2252 msgid "``Py_SymtableString()``" msgstr "``Py_SymtableString()``" -#: ../../whatsnew/3.10.rst:2252 +#: ../../whatsnew/3.10.rst:2253 msgid "``Py_SymtableStringObject()``" msgstr "``Py_SymtableStringObject()``" -#: ../../whatsnew/3.10.rst:2254 +#: ../../whatsnew/3.10.rst:2255 msgid "" "The ``Py_SymtableString()`` function was part the stable ABI by mistake but " "it could not be used, because the ``symtable.h`` header file was excluded " "from the limited C API." msgstr "" -#: ../../whatsnew/3.10.rst:2258 +#: ../../whatsnew/3.10.rst:2259 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2261 +#: ../../whatsnew/3.10.rst:2262 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -2975,7 +2975,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2267 +#: ../../whatsnew/3.10.rst:2268 msgid "" "Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These " "functions were undocumented and excluded from the limited C API. Most names " @@ -2986,86 +2986,86 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2275 +#: ../../whatsnew/3.10.rst:2276 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2278 +#: ../../whatsnew/3.10.rst:2279 msgid "``PyAST_Compile()``" msgstr "``PyAST_Compile()``" -#: ../../whatsnew/3.10.rst:2279 +#: ../../whatsnew/3.10.rst:2280 msgid "``PyAST_CompileEx()``" msgstr "``PyAST_CompileEx()``" -#: ../../whatsnew/3.10.rst:2280 +#: ../../whatsnew/3.10.rst:2281 msgid "``PyAST_CompileObject()``" msgstr "``PyAST_CompileObject()``" -#: ../../whatsnew/3.10.rst:2281 +#: ../../whatsnew/3.10.rst:2282 msgid "``PyFuture_FromAST()``" msgstr "``PyFuture_FromAST()``" -#: ../../whatsnew/3.10.rst:2282 +#: ../../whatsnew/3.10.rst:2283 msgid "``PyFuture_FromASTObject()``" msgstr "``PyFuture_FromASTObject()``" -#: ../../whatsnew/3.10.rst:2283 +#: ../../whatsnew/3.10.rst:2284 msgid "``PyParser_ASTFromFile()``" msgstr "``PyParser_ASTFromFile()``" -#: ../../whatsnew/3.10.rst:2284 +#: ../../whatsnew/3.10.rst:2285 msgid "``PyParser_ASTFromFileObject()``" msgstr "``PyParser_ASTFromFileObject()``" -#: ../../whatsnew/3.10.rst:2285 +#: ../../whatsnew/3.10.rst:2286 msgid "``PyParser_ASTFromFilename()``" msgstr "``PyParser_ASTFromFilename()``" -#: ../../whatsnew/3.10.rst:2286 +#: ../../whatsnew/3.10.rst:2287 msgid "``PyParser_ASTFromString()``" msgstr "``PyParser_ASTFromString()``" -#: ../../whatsnew/3.10.rst:2287 +#: ../../whatsnew/3.10.rst:2288 msgid "``PyParser_ASTFromStringObject()``" msgstr "``PyParser_ASTFromStringObject()``" -#: ../../whatsnew/3.10.rst:2289 +#: ../../whatsnew/3.10.rst:2290 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2292 +#: ../../whatsnew/3.10.rst:2293 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2294 +#: ../../whatsnew/3.10.rst:2295 msgid "``PyArena_New()``" msgstr "``PyArena_New()``" -#: ../../whatsnew/3.10.rst:2295 +#: ../../whatsnew/3.10.rst:2296 msgid "``PyArena_Free()``" msgstr "``PyArena_Free()``" -#: ../../whatsnew/3.10.rst:2296 +#: ../../whatsnew/3.10.rst:2297 msgid "``PyArena_Malloc()``" msgstr "``PyArena_Malloc()``" -#: ../../whatsnew/3.10.rst:2297 +#: ../../whatsnew/3.10.rst:2298 msgid "``PyArena_AddPyObject()``" msgstr "``PyArena_AddPyObject()``" -#: ../../whatsnew/3.10.rst:2299 +#: ../../whatsnew/3.10.rst:2300 msgid "" "These functions were undocumented, excluded from the limited C API, and were " "only used internally by the compiler. (Contributed by Victor Stinner in :" "issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2304 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)"