diff --git a/c-api/file.po b/c-api/file.po index 148b93efd6..b1a5e88e1d 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,7 +116,7 @@ msgstr "" msgid "This function is safe to call before :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/file.rst:85 +#: ../../c-api/file.rst:21 msgid "" "Raises an :ref:`auditing event ` ``setopencodehook`` with no " "arguments." diff --git a/c-api/init.po b/c-api/init.po index c1af4d43c7..1c86953113 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -464,7 +464,7 @@ msgid "" "than once." msgstr "" -#: ../../c-api/init.rst:305 +#: ../../c-api/init.rst:29 msgid "" "Raises an :ref:`auditing event ` ``cpython." "_PySys_ClearAuditHooks`` with no arguments." @@ -1259,7 +1259,7 @@ msgid "" "function." msgstr "" -#: ../../c-api/init.rst:1109 +#: ../../c-api/init.rst:5 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_New`` with no arguments." @@ -1271,7 +1271,7 @@ msgid "" "interpreter lock must be held." msgstr "" -#: ../../c-api/init.rst:1117 +#: ../../c-api/init.rst:4 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_Clear`` with no arguments." @@ -2044,12 +2044,12 @@ msgstr "" msgid "" "Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " "calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " -"have been unassigned. This is a no-op if the *key* argument is `NULL`." +"have been unassigned. This is a no-op if the *key* argument is ``NULL``." msgstr "" #: ../../c-api/init.rst:1802 msgid "" -"A freed key becomes a dangling pointer. You should reset the key to `NULL`." +"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." msgstr "" #: ../../c-api/init.rst:1807 diff --git a/c-api/sys.po b/c-api/sys.po index b74b46459b..d638f9b2c2 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -454,7 +454,7 @@ msgid "" "events table `. Details are in each function's documentation." msgstr "" -#: ../../c-api/sys.rst:390 +#: ../../c-api/sys.rst:26 msgid "" "Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " "arguments." diff --git a/c-api/type.po b/c-api/type.po index ee278c4caa..0d2e3be55b 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -53,7 +53,7 @@ msgstr "" #: ../../c-api/type.rst:42 msgid "" "Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This " -"function is primarily meant for use with `Py_LIMITED_API`; the individual " +"function is primarily meant for use with ``Py_LIMITED_API``; the individual " "flag bits are guaranteed to be stable across Python releases, but access to :" "c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API." msgstr "" diff --git a/extending/embedding.po b/extending/embedding.po index 8d2b7ae682..4ab7fb15af 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -306,8 +306,8 @@ msgstr "" #: ../../extending/embedding.rst:304 msgid "" -"``pythonX.Y-config --ldflags`` will give you the recommended flags when " -"linking:" +"``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " +"when linking:" msgstr "" #: ../../extending/embedding.rst:313 diff --git a/faq/design.po b/faq/design.po index ae1641baae..a61749af22 100644 --- a/faq/design.po +++ b/faq/design.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-06 00:17+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-08-31 22:38+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -287,10 +287,10 @@ msgstr "從 Python 3.8 開始,你可以這麼做了!" #: ../../faq/design.rst:158 msgid "" -"Assignment expressions using the walrus operator `:=` assign a variable in " +"Assignment expressions using the walrus operator ``:=`` assign a variable in " "an expression::" msgstr "" -"指派運算式使用海象運算子 `:=` 來在運算式中指派變數值:\n" +"指派運算式使用海象運算子 ``:=`` 來在運算式中指派變數值:\n" "\n" "::" diff --git a/glossary.po b/glossary.po index 899233e8e9..fac1f36056 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-23 20:00+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1985,7 +1985,7 @@ msgstr "package(套件)" #: ../../glossary.rst:884 msgid "" "A Python :term:`module` which can contain submodules or recursively, " -"subpackages. Technically, a package is a Python module with an ``__path__`` " +"subpackages. Technically, a package is a Python module with a ``__path__`` " "attribute." msgstr "" "一個 Python 的 :term:`module`\\ (模組),它可以包含子模組 (submodule) 或是遞" diff --git a/howto/clinic.po b/howto/clinic.po index 84e7d1e542..9316afc22c 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../../howto/clinic.rst:5 +#: ../../howto/clinic.rst:7 msgid "Argument Clinic How-To" msgstr "" @@ -26,7 +26,7 @@ msgstr "" msgid "author" msgstr "作者" -#: ../../howto/clinic.rst:7 +#: ../../howto/clinic.rst:9 msgid "Larry Hastings" msgstr "Larry Hastings" @@ -34,7 +34,7 @@ msgstr "Larry Hastings" msgid "Abstract" msgstr "摘要" -#: ../../howto/clinic.rst:12 +#: ../../howto/clinic.rst:14 msgid "" "Argument Clinic is a preprocessor for CPython C files. Its purpose is to " "automate all the boilerplate involved with writing argument parsing code for " @@ -43,7 +43,7 @@ msgid "" "Argument Clinic usage." msgstr "" -#: ../../howto/clinic.rst:19 +#: ../../howto/clinic.rst:21 msgid "" "Currently Argument Clinic is considered internal-only for CPython. Its use " "is not supported for files outside CPython, and no guarantees are made " @@ -54,11 +54,11 @@ msgid "" "totally incompatible and break all your code." msgstr "" -#: ../../howto/clinic.rst:29 +#: ../../howto/clinic.rst:31 msgid "The Goals Of Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:31 +#: ../../howto/clinic.rst:33 msgid "" "Argument Clinic's primary goal is to take over responsibility for all " "argument parsing code inside CPython. This means that, when you convert a " @@ -69,7 +69,7 @@ msgid "" "*kwargs``) magically converted into the C variables and types you need." msgstr "" -#: ../../howto/clinic.rst:41 +#: ../../howto/clinic.rst:43 msgid "" "In order for Argument Clinic to accomplish its primary goal, it must be easy " "to use. Currently, working with CPython's argument parsing library is a " @@ -77,7 +77,7 @@ msgid "" "places. When you use Argument Clinic, you don't have to repeat yourself." msgstr "" -#: ../../howto/clinic.rst:47 +#: ../../howto/clinic.rst:49 msgid "" "Obviously, no one would want to use Argument Clinic unless it's solving " "their problem—and without creating new problems of its own. So it's " @@ -89,14 +89,14 @@ msgid "" "parsing library. That would make for the fastest argument parsing possible!)" msgstr "" -#: ../../howto/clinic.rst:59 +#: ../../howto/clinic.rst:61 msgid "" "Additionally, Argument Clinic must be flexible enough to work with any " "approach to argument parsing. Python has some functions with some very " "strange parsing behaviors; Argument Clinic's goal is to support all of them." msgstr "" -#: ../../howto/clinic.rst:64 +#: ../../howto/clinic.rst:66 msgid "" "Finally, the original motivation for Argument Clinic was to provide " "introspection \"signatures\" for CPython builtins. It used to be, the " @@ -104,7 +104,7 @@ msgid "" "builtin. With Argument Clinic, that's a thing of the past!" msgstr "" -#: ../../howto/clinic.rst:70 +#: ../../howto/clinic.rst:72 msgid "" "One idea you should keep in mind, as you work with Argument Clinic: the more " "information you give it, the better job it'll be able to do. Argument Clinic " @@ -113,36 +113,36 @@ msgid "" "things with all the information you give it." msgstr "" -#: ../../howto/clinic.rst:80 +#: ../../howto/clinic.rst:82 msgid "Basic Concepts And Usage" msgstr "" -#: ../../howto/clinic.rst:82 +#: ../../howto/clinic.rst:84 msgid "" "Argument Clinic ships with CPython; you'll find it in ``Tools/clinic/clinic." "py``. If you run that script, specifying a C file as an argument:" msgstr "" -#: ../../howto/clinic.rst:89 +#: ../../howto/clinic.rst:91 msgid "" "Argument Clinic will scan over the file looking for lines that look exactly " "like this:" msgstr "" -#: ../../howto/clinic.rst:96 +#: ../../howto/clinic.rst:98 msgid "" "When it finds one, it reads everything up to a line that looks exactly like " "this:" msgstr "" -#: ../../howto/clinic.rst:103 +#: ../../howto/clinic.rst:105 msgid "" "Everything in between these two lines is input for Argument Clinic. All of " "these lines, including the beginning and ending comment lines, are " "collectively called an Argument Clinic \"block\"." msgstr "" -#: ../../howto/clinic.rst:107 +#: ../../howto/clinic.rst:109 msgid "" "When Argument Clinic parses one of these blocks, it generates output. This " "output is rewritten into the C file immediately after the block, followed by " @@ -150,7 +150,7 @@ msgid "" "this:" msgstr "" -#: ../../howto/clinic.rst:120 +#: ../../howto/clinic.rst:122 msgid "" "If you run Argument Clinic on the same file a second time, Argument Clinic " "will discard the old output and write out the new output with a fresh " @@ -158,7 +158,7 @@ msgid "" "change either." msgstr "" -#: ../../howto/clinic.rst:124 +#: ../../howto/clinic.rst:126 msgid "" "You should never modify the output portion of an Argument Clinic block. " "Instead, change the input until it produces the output you want. (That's " @@ -167,38 +167,38 @@ msgid "" "output.)" msgstr "" -#: ../../howto/clinic.rst:129 +#: ../../howto/clinic.rst:131 msgid "" "For the sake of clarity, here's the terminology we'll use with Argument " "Clinic:" msgstr "" -#: ../../howto/clinic.rst:131 +#: ../../howto/clinic.rst:133 msgid "" "The first line of the comment (``/*[clinic input]``) is the *start line*." msgstr "" -#: ../../howto/clinic.rst:132 +#: ../../howto/clinic.rst:134 msgid "" "The last line of the initial comment (``[clinic start generated code]*/``) " "is the *end line*." msgstr "" -#: ../../howto/clinic.rst:133 +#: ../../howto/clinic.rst:135 msgid "" "The last line (``/*[clinic end generated code: checksum=...]*/``) is the " "*checksum line*." msgstr "" -#: ../../howto/clinic.rst:134 +#: ../../howto/clinic.rst:136 msgid "In between the start line and the end line is the *input*." msgstr "" -#: ../../howto/clinic.rst:135 +#: ../../howto/clinic.rst:137 msgid "In between the end line and the checksum line is the *output*." msgstr "" -#: ../../howto/clinic.rst:136 +#: ../../howto/clinic.rst:138 msgid "" "All the text collectively, from the start line to the checksum line " "inclusively, is the *block*. (A block that hasn't been successfully " @@ -206,11 +206,11 @@ msgid "" "it's still considered a block.)" msgstr "" -#: ../../howto/clinic.rst:143 +#: ../../howto/clinic.rst:145 msgid "Converting Your First Function" msgstr "" -#: ../../howto/clinic.rst:145 +#: ../../howto/clinic.rst:147 msgid "" "The best way to get a sense of how Argument Clinic works is to convert a " "function to work with it. Here, then, are the bare minimum steps you'd need " @@ -221,30 +221,30 @@ msgid "" "keep it simple for this walkthrough so you can learn." msgstr "" -#: ../../howto/clinic.rst:154 +#: ../../howto/clinic.rst:156 msgid "Let's dive in!" msgstr "" -#: ../../howto/clinic.rst:156 +#: ../../howto/clinic.rst:158 msgid "" "Make sure you're working with a freshly updated checkout of the CPython " "trunk." msgstr "" -#: ../../howto/clinic.rst:159 +#: ../../howto/clinic.rst:161 msgid "" "Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :c:" "func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work with " "Argument Clinic yet. For my example I'm using ``_pickle.Pickler.dump()``." msgstr "" -#: ../../howto/clinic.rst:164 +#: ../../howto/clinic.rst:166 msgid "" "If the call to the ``PyArg_Parse`` function uses any of the following format " "units:" msgstr "" -#: ../../howto/clinic.rst:176 +#: ../../howto/clinic.rst:178 msgid "" "or if it has multiple calls to :c:func:`PyArg_ParseTuple`, you should choose " "a different function. Argument Clinic *does* support all of these " @@ -252,7 +252,7 @@ msgid "" "your first function." msgstr "" -#: ../../howto/clinic.rst:181 +#: ../../howto/clinic.rst:183 msgid "" "Also, if the function has multiple calls to :c:func:`PyArg_ParseTuple` or :c:" "func:`PyArg_ParseTupleAndKeywords` where it supports different types for the " @@ -262,11 +262,11 @@ msgid "" "polymorphic parameters." msgstr "" -#: ../../howto/clinic.rst:188 +#: ../../howto/clinic.rst:190 msgid "Add the following boilerplate above the function, creating our block::" msgstr "" -#: ../../howto/clinic.rst:193 +#: ../../howto/clinic.rst:195 msgid "" "Cut the docstring and paste it in between the ``[clinic]`` lines, removing " "all the junk that makes it a properly quoted C string. When you're done you " @@ -274,7 +274,7 @@ msgid "" "80 characters. (Argument Clinic will preserve indents inside the docstring.)" msgstr "" -#: ../../howto/clinic.rst:199 +#: ../../howto/clinic.rst:201 msgid "" "If the old docstring had a first line that looked like a function signature, " "throw that line away. (The docstring doesn't need it anymore—when you use " @@ -282,14 +282,14 @@ msgid "" "automatically based on the function's signature.)" msgstr "" -#: ../../howto/clinic.rst:205 ../../howto/clinic.rst:226 -#: ../../howto/clinic.rst:250 ../../howto/clinic.rst:308 -#: ../../howto/clinic.rst:348 ../../howto/clinic.rst:375 -#: ../../howto/clinic.rst:481 ../../howto/clinic.rst:533 +#: ../../howto/clinic.rst:207 ../../howto/clinic.rst:228 +#: ../../howto/clinic.rst:252 ../../howto/clinic.rst:310 +#: ../../howto/clinic.rst:350 ../../howto/clinic.rst:377 +#: ../../howto/clinic.rst:483 ../../howto/clinic.rst:535 msgid "Sample::" msgstr "" -#: ../../howto/clinic.rst:211 +#: ../../howto/clinic.rst:213 msgid "" "If your docstring doesn't have a \"summary\" line, Argument Clinic will " "complain. So let's make sure it has one. The \"summary\" line should be a " @@ -297,13 +297,13 @@ msgid "" "docstring." msgstr "" -#: ../../howto/clinic.rst:216 +#: ../../howto/clinic.rst:218 msgid "" "(Our example docstring consists solely of a summary line, so the sample code " "doesn't have to change for this step.)" msgstr "" -#: ../../howto/clinic.rst:219 +#: ../../howto/clinic.rst:221 msgid "" "Above the docstring, enter the name of the function, followed by a blank " "line. This should be the Python name of the function, and should be the " @@ -312,7 +312,7 @@ msgid "" "it should include the class name too." msgstr "" -#: ../../howto/clinic.rst:234 +#: ../../howto/clinic.rst:236 msgid "" "If this is the first time that module or class has been used with Argument " "Clinic in this C file, you must declare the module and/or class. Proper " @@ -322,47 +322,47 @@ msgid "" "next to each other.)" msgstr "" -#: ../../howto/clinic.rst:242 +#: ../../howto/clinic.rst:244 msgid "" "The name of the class and module should be the same as the one seen by " "Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:" "`PyTypeObject` as appropriate." msgstr "" -#: ../../howto/clinic.rst:246 +#: ../../howto/clinic.rst:248 msgid "" "When you declare a class, you must also specify two aspects of its type in " "C: the type declaration you'd use for a pointer to an instance of this " "class, and a pointer to the :c:type:`PyTypeObject` for this class." msgstr "" -#: ../../howto/clinic.rst:266 +#: ../../howto/clinic.rst:268 msgid "" "Declare each of the parameters to the function. Each parameter should get " "its own line. All the parameter lines should be indented from the function " "name and the docstring." msgstr "" -#: ../../howto/clinic.rst:270 +#: ../../howto/clinic.rst:272 msgid "The general form of these parameter lines is as follows:" msgstr "" -#: ../../howto/clinic.rst:276 +#: ../../howto/clinic.rst:278 msgid "If the parameter has a default value, add that after the converter:" msgstr "" -#: ../../howto/clinic.rst:283 +#: ../../howto/clinic.rst:285 msgid "" "Argument Clinic's support for \"default values\" is quite sophisticated; " "please see :ref:`the section below on default values ` for " "more information." msgstr "" -#: ../../howto/clinic.rst:287 +#: ../../howto/clinic.rst:289 msgid "Add a blank line below the parameters." msgstr "" -#: ../../howto/clinic.rst:289 +#: ../../howto/clinic.rst:291 msgid "" "What's a \"converter\"? It establishes both the type of the variable used " "in C, and the method to convert the Python value into a C value at runtime. " @@ -371,7 +371,7 @@ msgid "" "easier." msgstr "" -#: ../../howto/clinic.rst:296 +#: ../../howto/clinic.rst:298 msgid "" "For each parameter, copy the \"format unit\" for that parameter from the " "``PyArg_Parse()`` format argument and specify *that* as its converter, as a " @@ -381,58 +381,58 @@ msgid "" "For more on format units please see :ref:`arg-parsing`.)" msgstr "" -#: ../../howto/clinic.rst:305 +#: ../../howto/clinic.rst:307 msgid "" "For multicharacter format units like ``z#``, use the entire two-or-three " "character string." msgstr "" -#: ../../howto/clinic.rst:323 +#: ../../howto/clinic.rst:325 msgid "" "If your function has ``|`` in the format string, meaning some parameters " "have default values, you can ignore it. Argument Clinic infers which " "parameters are optional based on whether or not they have default values." msgstr "" -#: ../../howto/clinic.rst:328 +#: ../../howto/clinic.rst:330 msgid "" "If your function has ``$`` in the format string, meaning it takes keyword-" "only arguments, specify ``*`` on a line by itself before the first keyword-" "only argument, indented the same as the parameter lines." msgstr "" -#: ../../howto/clinic.rst:333 +#: ../../howto/clinic.rst:335 msgid "(``_pickle.Pickler.dump`` has neither, so our sample is unchanged.)" msgstr "" -#: ../../howto/clinic.rst:336 +#: ../../howto/clinic.rst:338 msgid "" "If the existing C function calls :c:func:`PyArg_ParseTuple` (as opposed to :" "c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are positional-" "only." msgstr "" -#: ../../howto/clinic.rst:340 +#: ../../howto/clinic.rst:342 msgid "" "To mark all parameters as positional-only in Argument Clinic, add a ``/`` on " "a line by itself after the last parameter, indented the same as the " "parameter lines." msgstr "" -#: ../../howto/clinic.rst:344 +#: ../../howto/clinic.rst:346 msgid "" "Currently this is all-or-nothing; either all parameters are positional-only, " "or none of them are. (In the future Argument Clinic may relax this " "restriction.)" msgstr "" -#: ../../howto/clinic.rst:364 +#: ../../howto/clinic.rst:366 msgid "" "It's helpful to write a per-parameter docstring for each parameter. But per-" "parameter docstrings are optional; you can skip this step if you prefer." msgstr "" -#: ../../howto/clinic.rst:368 +#: ../../howto/clinic.rst:370 msgid "" "Here's how to add a per-parameter docstring. The first line of the per-" "parameter docstring must be indented further than the parameter definition. " @@ -442,34 +442,34 @@ msgid "" "you wish." msgstr "" -#: ../../howto/clinic.rst:392 +#: ../../howto/clinic.rst:394 msgid "" "Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With " "luck everything worked---your block now has output, and a ``.c.h`` file has " "been generated! Reopen the file in your text editor to see::" msgstr "" -#: ../../howto/clinic.rst:411 +#: ../../howto/clinic.rst:413 msgid "" "Obviously, if Argument Clinic didn't produce any output, it's because it " "found an error in your input. Keep fixing your errors and retrying until " "Argument Clinic processes your file without complaint." msgstr "" -#: ../../howto/clinic.rst:415 +#: ../../howto/clinic.rst:417 msgid "" "For readability, most of the glue code has been generated to a ``.c.h`` " "file. You'll need to include that in your original ``.c`` file, typically " "right after the clinic module block::" msgstr "" -#: ../../howto/clinic.rst:421 +#: ../../howto/clinic.rst:423 msgid "" "Double-check that the argument-parsing code Argument Clinic generated looks " "basically the same as the existing code." msgstr "" -#: ../../howto/clinic.rst:424 +#: ../../howto/clinic.rst:426 msgid "" "First, ensure both places use the same argument-parsing function. The " "existing code must call either :c:func:`PyArg_ParseTuple` or :c:func:" @@ -477,21 +477,21 @@ msgid "" "Clinic calls the *exact* same function." msgstr "" -#: ../../howto/clinic.rst:430 +#: ../../howto/clinic.rst:432 msgid "" "Second, the format string passed in to :c:func:`PyArg_ParseTuple` or :c:func:" "`PyArg_ParseTupleAndKeywords` should be *exactly* the same as the hand-" "written one in the existing function, up to the colon or semi-colon." msgstr "" -#: ../../howto/clinic.rst:435 +#: ../../howto/clinic.rst:437 msgid "" "(Argument Clinic always generates its format strings with a ``:`` followed " "by the name of the function. If the existing code's format string ends with " "``;``, to provide usage help, this change is harmless—don't worry about it.)" msgstr "" -#: ../../howto/clinic.rst:440 +#: ../../howto/clinic.rst:442 msgid "" "Third, for parameters whose format units require two arguments (like a " "length variable, or an encoding string, or a pointer to a conversion " @@ -499,27 +499,27 @@ msgid "" "two invocations." msgstr "" -#: ../../howto/clinic.rst:445 +#: ../../howto/clinic.rst:447 msgid "" "Fourth, inside the output portion of the block you'll find a preprocessor " "macro defining the appropriate static :c:type:`PyMethodDef` structure for " "this builtin::" msgstr "" -#: ../../howto/clinic.rst:452 +#: ../../howto/clinic.rst:454 msgid "" "This static structure should be *exactly* the same as the existing static :c:" "type:`PyMethodDef` structure for this builtin." msgstr "" -#: ../../howto/clinic.rst:455 +#: ../../howto/clinic.rst:457 msgid "" "If any of these items differ in *any way*, adjust your Argument Clinic " "function specification and rerun ``Tools/clinic/clinic.py`` until they *are* " "the same." msgstr "" -#: ../../howto/clinic.rst:460 +#: ../../howto/clinic.rst:462 msgid "" "Notice that the last line of its output is the declaration of your \"impl\" " "function. This is where the builtin's implementation goes. Delete the " @@ -530,20 +530,20 @@ msgid "" "used different names for these variables, fix it." msgstr "" -#: ../../howto/clinic.rst:468 +#: ../../howto/clinic.rst:470 msgid "" "Let's reiterate, just because it's kind of weird. Your code should now look " "like this::" msgstr "" -#: ../../howto/clinic.rst:477 +#: ../../howto/clinic.rst:479 msgid "" "Argument Clinic generated the checksum line and the function prototype just " "above it. You should write the opening (and closing) curly braces for the " "function, and the implementation inside." msgstr "" -#: ../../howto/clinic.rst:522 +#: ../../howto/clinic.rst:524 msgid "" "Remember the macro with the :c:type:`PyMethodDef` structure for this " "function? Find the existing :c:type:`PyMethodDef` structure for this " @@ -553,81 +553,81 @@ msgid "" "to the implementation.)" msgstr "" -#: ../../howto/clinic.rst:529 +#: ../../howto/clinic.rst:531 msgid "" "Note that the body of the macro contains a trailing comma. So when you " "replace the existing static :c:type:`PyMethodDef` structure with the macro, " "*don't* add a comma to the end." msgstr "" -#: ../../howto/clinic.rst:542 +#: ../../howto/clinic.rst:544 msgid "" "Compile, then run the relevant portions of the regression-test suite. This " "change should not introduce any new compile-time warnings or errors, and " "there should be no externally visible change to Python's behavior." msgstr "" -#: ../../howto/clinic.rst:546 +#: ../../howto/clinic.rst:548 msgid "" "Well, except for one difference: ``inspect.signature()`` run on your " "function should now provide a valid signature!" msgstr "" -#: ../../howto/clinic.rst:549 +#: ../../howto/clinic.rst:551 msgid "" "Congratulations, you've ported your first function to work with Argument " "Clinic!" msgstr "" -#: ../../howto/clinic.rst:552 +#: ../../howto/clinic.rst:554 msgid "Advanced Topics" msgstr "" -#: ../../howto/clinic.rst:554 +#: ../../howto/clinic.rst:556 msgid "" "Now that you've had some experience working with Argument Clinic, it's time " "for some advanced topics." msgstr "" -#: ../../howto/clinic.rst:559 +#: ../../howto/clinic.rst:561 msgid "Symbolic default values" msgstr "" -#: ../../howto/clinic.rst:561 +#: ../../howto/clinic.rst:563 msgid "" "The default value you provide for a parameter can't be any arbitrary " "expression. Currently the following are explicitly supported:" msgstr "" -#: ../../howto/clinic.rst:564 +#: ../../howto/clinic.rst:566 msgid "Numeric constants (integer and float)" msgstr "" -#: ../../howto/clinic.rst:565 +#: ../../howto/clinic.rst:567 msgid "String constants" msgstr "" -#: ../../howto/clinic.rst:566 +#: ../../howto/clinic.rst:568 msgid "``True``, ``False``, and ``None``" msgstr "" -#: ../../howto/clinic.rst:567 +#: ../../howto/clinic.rst:569 msgid "" "Simple symbolic constants like ``sys.maxsize``, which must start with the " "name of the module" msgstr "" -#: ../../howto/clinic.rst:570 +#: ../../howto/clinic.rst:572 msgid "" "(In the future, this may need to get even more elaborate, to allow full " "expressions like ``CONSTANT - 1``.)" msgstr "" -#: ../../howto/clinic.rst:575 +#: ../../howto/clinic.rst:577 msgid "Renaming the C functions and variables generated by Argument Clinic" msgstr "" -#: ../../howto/clinic.rst:577 +#: ../../howto/clinic.rst:579 msgid "" "Argument Clinic automatically names the functions it generates for you. " "Occasionally this may cause a problem, if the generated name collides with " @@ -639,19 +639,19 @@ msgid "" "impl function." msgstr "" -#: ../../howto/clinic.rst:585 +#: ../../howto/clinic.rst:587 msgid "" "For example, if we wanted to rename the C function names generated for " "``pickle.Pickler.dump``, it'd look like this::" msgstr "" -#: ../../howto/clinic.rst:593 +#: ../../howto/clinic.rst:595 msgid "" "The base function would now be named ``pickler_dumper()``, and the impl " "function would now be named ``pickler_dumper_impl()``." msgstr "" -#: ../../howto/clinic.rst:597 +#: ../../howto/clinic.rst:599 msgid "" "Similarly, you may have a problem where you want to give a parameter a " "specific Python name, but that name may be inconvenient in C. Argument " @@ -659,21 +659,21 @@ msgid "" "using the same ``\"as\"`` syntax::" msgstr "" -#: ../../howto/clinic.rst:611 +#: ../../howto/clinic.rst:613 msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be ``file``, but the C variable would be named ``file_obj``." msgstr "" -#: ../../howto/clinic.rst:614 +#: ../../howto/clinic.rst:616 msgid "You can use this to rename the ``self`` parameter too!" msgstr "" -#: ../../howto/clinic.rst:618 +#: ../../howto/clinic.rst:620 msgid "Converting functions using PyArg_UnpackTuple" msgstr "" -#: ../../howto/clinic.rst:620 +#: ../../howto/clinic.rst:622 msgid "" "To convert a function parsing its arguments with :c:func:" "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " @@ -682,17 +682,17 @@ msgid "" "a line by itself after the last argument)." msgstr "" -#: ../../howto/clinic.rst:626 +#: ../../howto/clinic.rst:628 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." msgstr "" -#: ../../howto/clinic.rst:630 +#: ../../howto/clinic.rst:632 msgid "Optional Groups" msgstr "" -#: ../../howto/clinic.rst:632 +#: ../../howto/clinic.rst:634 msgid "" "Some legacy functions have a tricky approach to parsing their arguments: " "they count the number of positional arguments, then use a ``switch`` " @@ -703,7 +703,7 @@ msgid "" "created." msgstr "" -#: ../../howto/clinic.rst:639 +#: ../../howto/clinic.rst:641 msgid "" "While functions using this approach can often be converted to use :c:func:" "`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " @@ -717,7 +717,7 @@ msgid "" "pass in ``x`` you may not pass in ``y`` either.)" msgstr "" -#: ../../howto/clinic.rst:651 +#: ../../howto/clinic.rst:653 msgid "" "In any case, the goal of Argument Clinic is to support argument parsing for " "all existing CPython builtins without changing their semantics. Therefore " @@ -727,7 +727,7 @@ msgid "" "required arguments. They can *only* be used with positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:659 +#: ../../howto/clinic.rst:661 msgid "" "Optional groups are *only* intended for use when converting functions that " "make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " @@ -738,7 +738,7 @@ msgid "" "possible." msgstr "" -#: ../../howto/clinic.rst:668 +#: ../../howto/clinic.rst:670 msgid "" "To specify an optional group, add a ``[`` on a line by itself before the " "parameters you wish to group together, and a ``]`` on a line by itself after " @@ -747,11 +747,11 @@ msgid "" "optional::" msgstr "" -#: ../../howto/clinic.rst:697 +#: ../../howto/clinic.rst:699 msgid "Notes:" msgstr "註解:" -#: ../../howto/clinic.rst:699 +#: ../../howto/clinic.rst:701 msgid "" "For every optional group, one additional parameter will be passed into the " "impl function representing the group. The parameter will be an int named " @@ -764,33 +764,33 @@ msgid "" "I mean whether or not the parameters received arguments in this invocation.)" msgstr "" -#: ../../howto/clinic.rst:710 +#: ../../howto/clinic.rst:712 msgid "" "If there are no required arguments, the optional groups will behave as if " "they're to the right of the required arguments." msgstr "" -#: ../../howto/clinic.rst:713 +#: ../../howto/clinic.rst:715 msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." msgstr "" -#: ../../howto/clinic.rst:716 +#: ../../howto/clinic.rst:718 msgid "Optional groups can only contain positional-only parameters." msgstr "" -#: ../../howto/clinic.rst:718 +#: ../../howto/clinic.rst:720 msgid "" "Optional groups are *only* intended for legacy code. Please do not use " "optional groups for new code." msgstr "" -#: ../../howto/clinic.rst:723 +#: ../../howto/clinic.rst:725 msgid "Using real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" -#: ../../howto/clinic.rst:725 +#: ../../howto/clinic.rst:727 msgid "" "To save time, and to minimize how much you need to learn to achieve your " "first port to Argument Clinic, the walkthrough above tells you to use " @@ -799,38 +799,38 @@ msgid "" "be clear, their use is acceptable when porting code for Python 3.4." msgstr "" -#: ../../howto/clinic.rst:732 +#: ../../howto/clinic.rst:734 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" msgstr "" -#: ../../howto/clinic.rst:736 +#: ../../howto/clinic.rst:738 msgid "" "The proper converters are far easier to read and clearer in their intent." msgstr "" -#: ../../howto/clinic.rst:737 +#: ../../howto/clinic.rst:739 msgid "" "There are some format units that are unsupported as \"legacy converters\", " "because they require arguments, and the legacy converter syntax doesn't " "support specifying arguments." msgstr "" -#: ../../howto/clinic.rst:740 +#: ../../howto/clinic.rst:742 msgid "" "In the future we may have a new argument parsing library that isn't " "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " "won't be available to parameters using legacy converters." msgstr "" -#: ../../howto/clinic.rst:744 +#: ../../howto/clinic.rst:746 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." msgstr "" -#: ../../howto/clinic.rst:747 +#: ../../howto/clinic.rst:749 msgid "" "In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " "like a Python function call. However, if there are no explicit arguments to " @@ -838,17 +838,17 @@ msgid "" "parentheses. Thus ``bool`` and ``bool()`` are exactly the same converters." msgstr "" -#: ../../howto/clinic.rst:753 +#: ../../howto/clinic.rst:755 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" msgstr "" -#: ../../howto/clinic.rst:761 ../../howto/clinic.rst:1311 +#: ../../howto/clinic.rst:763 ../../howto/clinic.rst:1313 msgid "``c_default``" msgstr "``c_default``" -#: ../../howto/clinic.rst:757 +#: ../../howto/clinic.rst:759 msgid "" "The default value for this parameter when defined in C. Specifically, this " "will be the initializer for the variable declared in the \"parse function" @@ -856,27 +856,27 @@ msgid "" "use this. Specified as a string." msgstr "" -#: ../../howto/clinic.rst:766 +#: ../../howto/clinic.rst:768 msgid "``annotation``" msgstr "``annotation``" -#: ../../howto/clinic.rst:764 +#: ../../howto/clinic.rst:766 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." msgstr "" -#: ../../howto/clinic.rst:768 +#: ../../howto/clinic.rst:770 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" msgstr "" -#: ../../howto/clinic.rst:777 +#: ../../howto/clinic.rst:779 msgid "``accept``" msgstr "``accept``" -#: ../../howto/clinic.rst:772 +#: ../../howto/clinic.rst:774 msgid "" "A set of Python types (and possibly pseudo-types); this restricts the " "allowable Python argument to values of these types. (This is not a general-" @@ -884,68 +884,68 @@ msgid "" "shown in the legacy converter table.)" msgstr "" -#: ../../howto/clinic.rst:777 +#: ../../howto/clinic.rst:779 msgid "To accept ``None``, add ``NoneType`` to this set." msgstr "" -#: ../../howto/clinic.rst:782 +#: ../../howto/clinic.rst:784 msgid "``bitwise``" msgstr "``bitwise``" -#: ../../howto/clinic.rst:780 +#: ../../howto/clinic.rst:782 msgid "" "Only supported for unsigned integers. The native integer value of this " "Python argument will be written to the parameter without any range checking, " "even for negative values." msgstr "" -#: ../../howto/clinic.rst:787 ../../howto/clinic.rst:1325 +#: ../../howto/clinic.rst:789 ../../howto/clinic.rst:1327 msgid "``converter``" msgstr "``converter``" -#: ../../howto/clinic.rst:785 +#: ../../howto/clinic.rst:787 msgid "" "Only supported by the ``object`` converter. Specifies the name of a :ref:`C " "\"converter function\" ` to use to convert this object to a " "native type." msgstr "" -#: ../../howto/clinic.rst:792 +#: ../../howto/clinic.rst:794 msgid "``encoding``" msgstr "``encoding``" -#: ../../howto/clinic.rst:790 +#: ../../howto/clinic.rst:792 msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." msgstr "" -#: ../../howto/clinic.rst:796 +#: ../../howto/clinic.rst:798 msgid "``subclass_of``" msgstr "``subclass_of``" -#: ../../howto/clinic.rst:795 +#: ../../howto/clinic.rst:797 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." msgstr "" -#: ../../howto/clinic.rst:801 ../../howto/clinic.rst:1297 +#: ../../howto/clinic.rst:803 ../../howto/clinic.rst:1299 msgid "``type``" msgstr "``type``" -#: ../../howto/clinic.rst:799 +#: ../../howto/clinic.rst:801 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " "type that will be used to declare the variable. Default value is ``" "\"PyObject *\"``." msgstr "" -#: ../../howto/clinic.rst:807 +#: ../../howto/clinic.rst:809 msgid "``zeroes``" msgstr "``zeroes``" -#: ../../howto/clinic.rst:804 +#: ../../howto/clinic.rst:806 msgid "" "Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " "permitted inside the value. The length of the string will be passed in to " @@ -953,7 +953,7 @@ msgid "" "``_length``." msgstr "" -#: ../../howto/clinic.rst:809 +#: ../../howto/clinic.rst:811 msgid "" "Please note, not every possible combination of arguments will work. Usually " "these arguments are implemented by specific ``PyArg_ParseTuple`` *format " @@ -964,350 +964,350 @@ msgid "" "least, not yet.)" msgstr "" -#: ../../howto/clinic.rst:817 +#: ../../howto/clinic.rst:819 msgid "" "Below is a table showing the mapping of legacy converters into real Argument " "Clinic converters. On the left is the legacy converter, on the right is the " "text you'd replace it with." msgstr "" -#: ../../howto/clinic.rst:822 +#: ../../howto/clinic.rst:824 msgid "``'B'``" msgstr "``'B'``" -#: ../../howto/clinic.rst:822 +#: ../../howto/clinic.rst:824 msgid "``unsigned_char(bitwise=True)``" msgstr "``unsigned_char(bitwise=True)``" -#: ../../howto/clinic.rst:823 +#: ../../howto/clinic.rst:825 msgid "``'b'``" msgstr "``'b'``" -#: ../../howto/clinic.rst:823 +#: ../../howto/clinic.rst:825 msgid "``unsigned_char``" msgstr "``unsigned_char``" -#: ../../howto/clinic.rst:824 +#: ../../howto/clinic.rst:826 msgid "``'c'``" msgstr "``'c'``" -#: ../../howto/clinic.rst:824 +#: ../../howto/clinic.rst:826 msgid "``char``" msgstr "``char``" -#: ../../howto/clinic.rst:825 +#: ../../howto/clinic.rst:827 msgid "``'C'``" msgstr "``'C'``" -#: ../../howto/clinic.rst:825 +#: ../../howto/clinic.rst:827 msgid "``int(accept={str})``" msgstr "``int(accept={str})``" -#: ../../howto/clinic.rst:826 +#: ../../howto/clinic.rst:828 msgid "``'d'``" msgstr "``'d'``" -#: ../../howto/clinic.rst:826 +#: ../../howto/clinic.rst:828 msgid "``double``" msgstr "``double``" -#: ../../howto/clinic.rst:827 +#: ../../howto/clinic.rst:829 msgid "``'D'``" msgstr "``'D'``" -#: ../../howto/clinic.rst:827 +#: ../../howto/clinic.rst:829 msgid "``Py_complex``" msgstr "``Py_complex``" -#: ../../howto/clinic.rst:828 +#: ../../howto/clinic.rst:830 msgid "``'es'``" msgstr "``'es'``" -#: ../../howto/clinic.rst:828 +#: ../../howto/clinic.rst:830 msgid "``str(encoding='name_of_encoding')``" msgstr "``str(encoding='name_of_encoding')``" -#: ../../howto/clinic.rst:829 +#: ../../howto/clinic.rst:831 msgid "``'es#'``" msgstr "``'es#'``" -#: ../../howto/clinic.rst:829 +#: ../../howto/clinic.rst:831 msgid "``str(encoding='name_of_encoding', zeroes=True)``" msgstr "``str(encoding='name_of_encoding', zeroes=True)``" -#: ../../howto/clinic.rst:830 +#: ../../howto/clinic.rst:832 msgid "``'et'``" msgstr "``'et'``" -#: ../../howto/clinic.rst:830 +#: ../../howto/clinic.rst:832 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -#: ../../howto/clinic.rst:831 +#: ../../howto/clinic.rst:833 msgid "``'et#'``" msgstr "``'et#'``" -#: ../../howto/clinic.rst:831 +#: ../../howto/clinic.rst:833 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" msgstr "" -#: ../../howto/clinic.rst:832 +#: ../../howto/clinic.rst:834 msgid "``'f'``" msgstr "``'f'``" -#: ../../howto/clinic.rst:832 +#: ../../howto/clinic.rst:834 msgid "``float``" msgstr "``float``" -#: ../../howto/clinic.rst:833 +#: ../../howto/clinic.rst:835 msgid "``'h'``" msgstr "``'h'``" -#: ../../howto/clinic.rst:833 +#: ../../howto/clinic.rst:835 msgid "``short``" msgstr "``short``" -#: ../../howto/clinic.rst:834 +#: ../../howto/clinic.rst:836 msgid "``'H'``" msgstr "``'H'``" -#: ../../howto/clinic.rst:834 +#: ../../howto/clinic.rst:836 msgid "``unsigned_short(bitwise=True)``" msgstr "``unsigned_short(bitwise=True)``" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:837 msgid "``'i'``" msgstr "``'i'``" -#: ../../howto/clinic.rst:835 +#: ../../howto/clinic.rst:837 msgid "``int``" msgstr "``int``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:838 msgid "``'I'``" msgstr "``'I'``" -#: ../../howto/clinic.rst:836 +#: ../../howto/clinic.rst:838 msgid "``unsigned_int(bitwise=True)``" msgstr "``unsigned_int(bitwise=True)``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:839 msgid "``'k'``" msgstr "``'k'``" -#: ../../howto/clinic.rst:837 +#: ../../howto/clinic.rst:839 msgid "``unsigned_long(bitwise=True)``" msgstr "``unsigned_long(bitwise=True)``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:840 msgid "``'K'``" msgstr "``'K'``" -#: ../../howto/clinic.rst:838 +#: ../../howto/clinic.rst:840 msgid "``unsigned_long_long(bitwise=True)``" msgstr "``unsigned_long_long(bitwise=True)``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:841 msgid "``'l'``" msgstr "``'l'``" -#: ../../howto/clinic.rst:839 +#: ../../howto/clinic.rst:841 msgid "``long``" msgstr "``long``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:842 msgid "``'L'``" msgstr "``'L'``" -#: ../../howto/clinic.rst:840 +#: ../../howto/clinic.rst:842 msgid "``long long``" msgstr "``long long``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:843 msgid "``'n'``" msgstr "``'n'``" -#: ../../howto/clinic.rst:841 +#: ../../howto/clinic.rst:843 msgid "``Py_ssize_t``" msgstr "``Py_ssize_t``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:844 msgid "``'O'``" msgstr "``'O'``" -#: ../../howto/clinic.rst:842 +#: ../../howto/clinic.rst:844 msgid "``object``" msgstr "``object``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:845 msgid "``'O!'``" msgstr "``'O!'``" -#: ../../howto/clinic.rst:843 +#: ../../howto/clinic.rst:845 msgid "``object(subclass_of='&PySomething_Type')``" msgstr "``object(subclass_of='&PySomething_Type')``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:846 msgid "``'O&'``" msgstr "``'O&'``" -#: ../../howto/clinic.rst:844 +#: ../../howto/clinic.rst:846 msgid "``object(converter='name_of_c_function')``" msgstr "``object(converter='name_of_c_function')``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:847 msgid "``'p'``" msgstr "``'p'``" -#: ../../howto/clinic.rst:845 +#: ../../howto/clinic.rst:847 msgid "``bool``" msgstr "``bool``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:848 msgid "``'S'``" msgstr "``'S'``" -#: ../../howto/clinic.rst:846 +#: ../../howto/clinic.rst:848 msgid "``PyBytesObject``" msgstr "``PyBytesObject``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:849 msgid "``'s'``" msgstr "``'s'``" -#: ../../howto/clinic.rst:847 +#: ../../howto/clinic.rst:849 msgid "``str``" msgstr "``str``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:850 msgid "``'s#'``" msgstr "``'s#'``" -#: ../../howto/clinic.rst:848 +#: ../../howto/clinic.rst:850 msgid "``str(zeroes=True)``" msgstr "``str(zeroes=True)``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:851 msgid "``'s*'``" msgstr "``'s*'``" -#: ../../howto/clinic.rst:849 +#: ../../howto/clinic.rst:851 msgid "``Py_buffer(accept={buffer, str})``" msgstr "``Py_buffer(accept={buffer, str})``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:852 msgid "``'U'``" msgstr "``'U'``" -#: ../../howto/clinic.rst:850 +#: ../../howto/clinic.rst:852 msgid "``unicode``" msgstr "``unicode``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:853 msgid "``'u'``" msgstr "``'u'``" -#: ../../howto/clinic.rst:851 +#: ../../howto/clinic.rst:853 msgid "``Py_UNICODE``" msgstr "``Py_UNICODE``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:854 msgid "``'u#'``" msgstr "``'u#'``" -#: ../../howto/clinic.rst:852 +#: ../../howto/clinic.rst:854 msgid "``Py_UNICODE(zeroes=True)``" msgstr "``Py_UNICODE(zeroes=True)``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:855 msgid "``'w*'``" msgstr "``'w*'``" -#: ../../howto/clinic.rst:853 +#: ../../howto/clinic.rst:855 msgid "``Py_buffer(accept={rwbuffer})``" msgstr "``Py_buffer(accept={rwbuffer})``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:856 msgid "``'Y'``" msgstr "``'Y'``" -#: ../../howto/clinic.rst:854 +#: ../../howto/clinic.rst:856 msgid "``PyByteArrayObject``" msgstr "``PyByteArrayObject``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:857 msgid "``'y'``" msgstr "``'y'``" -#: ../../howto/clinic.rst:855 +#: ../../howto/clinic.rst:857 msgid "``str(accept={bytes})``" msgstr "``str(accept={bytes})``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:858 msgid "``'y#'``" msgstr "``'y#'``" -#: ../../howto/clinic.rst:856 +#: ../../howto/clinic.rst:858 msgid "``str(accept={robuffer}, zeroes=True)``" msgstr "``str(accept={robuffer}, zeroes=True)``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:859 msgid "``'y*'``" msgstr "``'y*'``" -#: ../../howto/clinic.rst:857 +#: ../../howto/clinic.rst:859 msgid "``Py_buffer``" msgstr "``Py_buffer``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:860 msgid "``'Z'``" msgstr "``'Z'``" -#: ../../howto/clinic.rst:858 +#: ../../howto/clinic.rst:860 msgid "``Py_UNICODE(accept={str, NoneType})``" msgstr "``Py_UNICODE(accept={str, NoneType})``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:861 msgid "``'Z#'``" msgstr "``'Z#'``" -#: ../../howto/clinic.rst:859 +#: ../../howto/clinic.rst:861 msgid "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" msgstr "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:862 msgid "``'z'``" msgstr "``'z'``" -#: ../../howto/clinic.rst:860 +#: ../../howto/clinic.rst:862 msgid "``str(accept={str, NoneType})``" msgstr "``str(accept={str, NoneType})``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:863 msgid "``'z#'``" msgstr "``'z#'``" -#: ../../howto/clinic.rst:861 +#: ../../howto/clinic.rst:863 msgid "``str(accept={str, NoneType}, zeroes=True)``" msgstr "``str(accept={str, NoneType}, zeroes=True)``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:864 msgid "``'z*'``" msgstr "``'z*'``" -#: ../../howto/clinic.rst:862 +#: ../../howto/clinic.rst:864 msgid "``Py_buffer(accept={buffer, str, NoneType})``" msgstr "``Py_buffer(accept={buffer, str, NoneType})``" -#: ../../howto/clinic.rst:865 +#: ../../howto/clinic.rst:867 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" msgstr "" -#: ../../howto/clinic.rst:878 +#: ../../howto/clinic.rst:880 msgid "" "One advantage of real converters is that they're more flexible than legacy " "converters. For example, the ``unsigned_int`` converter (and all the " @@ -1316,7 +1316,7 @@ msgid "" "negative numbers. You just can't do that with a legacy converter!" msgstr "" -#: ../../howto/clinic.rst:884 +#: ../../howto/clinic.rst:886 msgid "" "Argument Clinic will show you all the converters it has available. For each " "converter it'll show you all the parameters it accepts, along with the " @@ -1324,11 +1324,11 @@ msgid "" "converters`` to see the full list." msgstr "" -#: ../../howto/clinic.rst:890 +#: ../../howto/clinic.rst:892 msgid "Py_buffer" msgstr "Py_buffer" -#: ../../howto/clinic.rst:892 +#: ../../howto/clinic.rst:894 msgid "" "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " "or ``'z*'`` legacy converters), you *must* not call :c:func:" @@ -1336,17 +1336,17 @@ msgid "" "that does it for you (in the parsing function)." msgstr "" -#: ../../howto/clinic.rst:900 +#: ../../howto/clinic.rst:902 msgid "Advanced converters" msgstr "" -#: ../../howto/clinic.rst:902 +#: ../../howto/clinic.rst:904 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." msgstr "" -#: ../../howto/clinic.rst:905 +#: ../../howto/clinic.rst:907 msgid "" "The trick is, all those format units take arguments—either conversion " "functions, or types, or strings specifying an encoding. (But \"legacy " @@ -1357,7 +1357,7 @@ msgid "" "units that start with ``e``)." msgstr "" -#: ../../howto/clinic.rst:913 +#: ../../howto/clinic.rst:915 msgid "" "When using ``subclass_of``, you may also want to use the other custom " "argument for ``object()``: ``type``, which lets you set the type actually " @@ -1366,7 +1366,7 @@ msgid "" "``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``." msgstr "" -#: ../../howto/clinic.rst:919 +#: ../../howto/clinic.rst:921 msgid "" "One possible problem with using Argument Clinic: it takes away some possible " "flexibility for the format units starting with ``e``. When writing a " @@ -1379,31 +1379,31 @@ msgid "" "strings for parameters whose format units start with ``e``." msgstr "" -#: ../../howto/clinic.rst:932 +#: ../../howto/clinic.rst:934 msgid "Parameter default values" msgstr "" -#: ../../howto/clinic.rst:934 +#: ../../howto/clinic.rst:936 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" msgstr "" -#: ../../howto/clinic.rst:943 +#: ../../howto/clinic.rst:945 msgid "They can also use any of Python's built-in constants:" msgstr "" -#: ../../howto/clinic.rst:951 +#: ../../howto/clinic.rst:953 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." msgstr "" -#: ../../howto/clinic.rst:956 +#: ../../howto/clinic.rst:958 msgid "The ``NULL`` default value" msgstr "" -#: ../../howto/clinic.rst:958 +#: ../../howto/clinic.rst:960 msgid "" "For string and object parameters, you can set them to ``None`` to indicate " "that there's no default. However, that means the C variable will be " @@ -1413,11 +1413,11 @@ msgid "" "with ``NULL``." msgstr "" -#: ../../howto/clinic.rst:966 +#: ../../howto/clinic.rst:968 msgid "Expressions specified as default values" msgstr "" -#: ../../howto/clinic.rst:968 +#: ../../howto/clinic.rst:970 msgid "" "The default value for a parameter can be more than just a literal value. It " "can be an entire expression, using math operators and looking up attributes " @@ -1425,11 +1425,11 @@ msgid "" "obvious semantics." msgstr "" -#: ../../howto/clinic.rst:973 +#: ../../howto/clinic.rst:975 msgid "Consider the following example:" msgstr "" -#: ../../howto/clinic.rst:979 +#: ../../howto/clinic.rst:981 msgid "" "``sys.maxsize`` can have different values on different platforms. Therefore " "Argument Clinic can't simply evaluate that expression locally and hard-code " @@ -1437,14 +1437,14 @@ msgid "" "at runtime, when the user asks for the function's signature." msgstr "" -#: ../../howto/clinic.rst:984 +#: ../../howto/clinic.rst:986 msgid "" "What namespace is available when the expression is evaluated? It's " "evaluated in the context of the module the builtin came from. So, if your " "module has an attribute called \"``max_widgets``\", you may simply use it:" msgstr "" -#: ../../howto/clinic.rst:992 +#: ../../howto/clinic.rst:994 msgid "" "If the symbol isn't found in the current module, it fails over to looking in " "``sys.modules``. That's how it can find ``sys.maxsize`` for example. " @@ -1453,7 +1453,7 @@ msgid "" "Python itself.)" msgstr "" -#: ../../howto/clinic.rst:997 +#: ../../howto/clinic.rst:999 msgid "" "Evaluating default values only at runtime means Argument Clinic can't " "compute the correct equivalent C default value. So you need to tell it " @@ -1461,7 +1461,7 @@ msgid "" "expression in C, using the ``c_default`` parameter to the converter:" msgstr "" -#: ../../howto/clinic.rst:1006 +#: ../../howto/clinic.rst:1008 msgid "" "Another complication: Argument Clinic can't know in advance whether or not " "the expression you supply is valid. It parses it to make sure it looks " @@ -1469,38 +1469,38 @@ msgid "" "expressions to specify values that are guaranteed to be valid at runtime!" msgstr "" -#: ../../howto/clinic.rst:1011 +#: ../../howto/clinic.rst:1013 msgid "" "Finally, because expressions must be representable as static C values, there " "are many restrictions on legal expressions. Here's a list of Python " "features you're not permitted to use:" msgstr "" -#: ../../howto/clinic.rst:1015 +#: ../../howto/clinic.rst:1017 msgid "Function calls." msgstr "" -#: ../../howto/clinic.rst:1016 +#: ../../howto/clinic.rst:1018 msgid "Inline if statements (``3 if foo else 5``)." msgstr "" -#: ../../howto/clinic.rst:1017 +#: ../../howto/clinic.rst:1019 msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." msgstr "" -#: ../../howto/clinic.rst:1018 +#: ../../howto/clinic.rst:1020 msgid "List/set/dict comprehensions and generator expressions." msgstr "" -#: ../../howto/clinic.rst:1019 +#: ../../howto/clinic.rst:1021 msgid "Tuple/list/set/dict literals." msgstr "" -#: ../../howto/clinic.rst:1024 +#: ../../howto/clinic.rst:1026 msgid "Using a return converter" msgstr "" -#: ../../howto/clinic.rst:1026 +#: ../../howto/clinic.rst:1028 msgid "" "By default the impl function Argument Clinic generates for you returns " "``PyObject *``. But your C function often computes some C type, then " @@ -1510,14 +1510,14 @@ msgid "" "too?" msgstr "" -#: ../../howto/clinic.rst:1032 +#: ../../howto/clinic.rst:1034 msgid "" "That's what a \"return converter\" does. It changes your impl function to " "return some C type, then adds code to the generated (non-impl) function to " "handle converting that value into the appropriate ``PyObject *``." msgstr "" -#: ../../howto/clinic.rst:1036 +#: ../../howto/clinic.rst:1038 msgid "" "The syntax for return converters is similar to that of parameter converters. " "You specify the return converter like it was a return annotation on the " @@ -1527,13 +1527,13 @@ msgid "" "parentheses." msgstr "" -#: ../../howto/clinic.rst:1042 +#: ../../howto/clinic.rst:1044 msgid "" "(If you use both ``\"as\"`` *and* a return converter for your function, the " "``\"as\"`` should come before the return converter.)" msgstr "" -#: ../../howto/clinic.rst:1045 +#: ../../howto/clinic.rst:1047 msgid "" "There's one additional complication when using return converters: how do you " "indicate an error has occurred? Normally, a function returns a valid (non-" @@ -1546,18 +1546,18 @@ msgid "" "you return like normal." msgstr "" -#: ../../howto/clinic.rst:1054 +#: ../../howto/clinic.rst:1056 msgid "Currently Argument Clinic supports only a few return converters:" msgstr "" -#: ../../howto/clinic.rst:1069 +#: ../../howto/clinic.rst:1071 msgid "" "None of these take parameters. For the first three, return -1 to indicate " "error. For ``DecodeFSDefault``, the return type is ``const char *``; return " "a ``NULL`` pointer to indicate an error." msgstr "" -#: ../../howto/clinic.rst:1073 +#: ../../howto/clinic.rst:1075 msgid "" "(There's also an experimental ``NoneType`` converter, which lets you return " "``Py_None`` on success or ``NULL`` on failure, without having to increment " @@ -1565,117 +1565,117 @@ msgid "" "be worth using.)" msgstr "" -#: ../../howto/clinic.rst:1078 +#: ../../howto/clinic.rst:1080 msgid "" "To see all the return converters Argument Clinic supports, along with their " "parameters (if any), just run ``Tools/clinic/clinic.py --converters`` for " "the full list." msgstr "" -#: ../../howto/clinic.rst:1084 +#: ../../howto/clinic.rst:1086 msgid "Cloning existing functions" msgstr "" -#: ../../howto/clinic.rst:1086 +#: ../../howto/clinic.rst:1088 msgid "" "If you have a number of functions that look similar, you may be able to use " "Clinic's \"clone\" feature. When you clone an existing function, you reuse:" msgstr "" -#: ../../howto/clinic.rst:1090 +#: ../../howto/clinic.rst:1092 msgid "its parameters, including" msgstr "" -#: ../../howto/clinic.rst:1092 +#: ../../howto/clinic.rst:1094 msgid "their names," msgstr "" -#: ../../howto/clinic.rst:1094 +#: ../../howto/clinic.rst:1096 msgid "their converters, with all parameters," msgstr "" -#: ../../howto/clinic.rst:1096 +#: ../../howto/clinic.rst:1098 msgid "their default values," msgstr "" -#: ../../howto/clinic.rst:1098 +#: ../../howto/clinic.rst:1100 msgid "their per-parameter docstrings," msgstr "" -#: ../../howto/clinic.rst:1100 +#: ../../howto/clinic.rst:1102 msgid "" "their *kind* (whether they're positional only, positional or keyword, or " "keyword only), and" msgstr "" -#: ../../howto/clinic.rst:1103 +#: ../../howto/clinic.rst:1105 msgid "its return converter." msgstr "" -#: ../../howto/clinic.rst:1105 +#: ../../howto/clinic.rst:1107 msgid "" "The only thing not copied from the original function is its docstring; the " "syntax allows you to specify a new docstring." msgstr "" -#: ../../howto/clinic.rst:1108 +#: ../../howto/clinic.rst:1110 msgid "Here's the syntax for cloning a function::" msgstr "" -#: ../../howto/clinic.rst:1116 +#: ../../howto/clinic.rst:1118 msgid "" "(The functions can be in different modules or classes. I wrote ``module." "class`` in the sample just to illustrate that you must use the full path to " "*both* functions.)" msgstr "" -#: ../../howto/clinic.rst:1120 +#: ../../howto/clinic.rst:1122 msgid "" "Sorry, there's no syntax for partially cloning a function, or cloning a " "function then modifying it. Cloning is an all-or nothing proposition." msgstr "" -#: ../../howto/clinic.rst:1123 +#: ../../howto/clinic.rst:1125 msgid "" "Also, the function you are cloning from must have been previously defined in " "the current file." msgstr "" -#: ../../howto/clinic.rst:1127 +#: ../../howto/clinic.rst:1129 msgid "Calling Python code" msgstr "" -#: ../../howto/clinic.rst:1129 +#: ../../howto/clinic.rst:1131 msgid "" "The rest of the advanced topics require you to write Python code which lives " "inside your C file and modifies Argument Clinic's runtime state. This is " "simple: you simply define a Python block." msgstr "" -#: ../../howto/clinic.rst:1133 +#: ../../howto/clinic.rst:1135 msgid "" "A Python block uses different delimiter lines than an Argument Clinic " "function block. It looks like this::" msgstr "" -#: ../../howto/clinic.rst:1140 +#: ../../howto/clinic.rst:1142 msgid "" "All the code inside the Python block is executed at the time it's parsed. " "All text written to stdout inside the block is redirected into the \"output" "\" after the block." msgstr "" -#: ../../howto/clinic.rst:1144 +#: ../../howto/clinic.rst:1146 msgid "" "As an example, here's a Python block that adds a static integer variable to " "the C code::" msgstr "" -#: ../../howto/clinic.rst:1155 +#: ../../howto/clinic.rst:1157 msgid "Using a \"self converter\"" msgstr "" -#: ../../howto/clinic.rst:1157 +#: ../../howto/clinic.rst:1159 msgid "" "Argument Clinic automatically adds a \"self\" parameter for you using a " "default converter. It automatically sets the ``type`` of this parameter to " @@ -1686,13 +1686,13 @@ msgid "" "a subclass thereof." msgstr "" -#: ../../howto/clinic.rst:1166 +#: ../../howto/clinic.rst:1168 msgid "" "What's the point? This lets you override the type of ``self``, or give it a " "different default name." msgstr "" -#: ../../howto/clinic.rst:1169 +#: ../../howto/clinic.rst:1171 msgid "" "How do you specify the custom type you want to cast ``self`` to? If you only " "have one or two functions with the same type for ``self``, you can directly " @@ -1700,18 +1700,18 @@ msgid "" "want to use as the ``type`` parameter::" msgstr "" -#: ../../howto/clinic.rst:1185 +#: ../../howto/clinic.rst:1187 msgid "" "On the other hand, if you have a lot of functions that will use the same " "type for ``self``, it's best to create your own converter, subclassing " "``self_converter`` but overwriting the ``type`` member::" msgstr "" -#: ../../howto/clinic.rst:1207 +#: ../../howto/clinic.rst:1209 msgid "Using a \"defining class\" converter" msgstr "" -#: ../../howto/clinic.rst:1209 +#: ../../howto/clinic.rst:1211 msgid "" "Argument Clinic facilitates gaining access to the defining class of a " "method. This is useful for :ref:`heap type ` methods that need " @@ -1721,25 +1721,25 @@ msgid "" "example from a module method." msgstr "" -#: ../../howto/clinic.rst:1215 +#: ../../howto/clinic.rst:1217 msgid "" "Example from ``Modules/zlibmodule.c``. First, ``defining_class`` is added " "to the clinic input::" msgstr "" -#: ../../howto/clinic.rst:1227 +#: ../../howto/clinic.rst:1229 msgid "" "After running the Argument Clinic tool, the following function signature is " "generated::" msgstr "" -#: ../../howto/clinic.rst:1237 +#: ../../howto/clinic.rst:1239 msgid "" "The following code can now use ``PyType_GetModuleState(cls)`` to fetch the " "module state::" msgstr "" -#: ../../howto/clinic.rst:1243 +#: ../../howto/clinic.rst:1245 msgid "" "Each method may only have one argument using this converter, and it must " "appear after ``self``, or, if ``self`` is not used, as the first argument. " @@ -1747,13 +1747,13 @@ msgid "" "appear in the ``__text_signature__``." msgstr "" -#: ../../howto/clinic.rst:1248 +#: ../../howto/clinic.rst:1250 msgid "" "The ``defining_class`` converter is not compatible with ``__init__`` and " "``__new__`` methods, which cannot use the ``METH_METHOD`` convention." msgstr "" -#: ../../howto/clinic.rst:1251 +#: ../../howto/clinic.rst:1253 msgid "" "It is not possible to use ``defining_class`` with slot methods. In order to " "fetch the module state from such methods, use :c:func:" @@ -1762,15 +1762,15 @@ msgid "" "``setattro`` slot method in ``Modules/_threadmodule.c``::" msgstr "" -#: ../../howto/clinic.rst:1266 +#: ../../howto/clinic.rst:1268 msgid "See also :pep:`573`." msgstr "也請見 :pep:`573`\\ 。" -#: ../../howto/clinic.rst:1270 +#: ../../howto/clinic.rst:1272 msgid "Writing a custom converter" msgstr "" -#: ../../howto/clinic.rst:1272 +#: ../../howto/clinic.rst:1274 msgid "" "As we hinted at in the previous section... you can write your own " "converters! A converter is simply a Python class that inherits from " @@ -1779,7 +1779,7 @@ msgid "" "a :c:func:`PyArg_ParseTuple` \"converter function\"." msgstr "" -#: ../../howto/clinic.rst:1278 +#: ../../howto/clinic.rst:1280 msgid "" "Your converter class should be named ``*something*_converter``. If the name " "follows this convention, then your converter class will be automatically " @@ -1788,7 +1788,7 @@ msgid "" "metaclass.)" msgstr "" -#: ../../howto/clinic.rst:1284 +#: ../../howto/clinic.rst:1286 msgid "" "You shouldn't subclass ``CConverter.__init__``. Instead, you should write a " "``converter_init()`` function. ``converter_init()`` always accepts a " @@ -1797,50 +1797,50 @@ msgid "" "passed along to your ``converter_init()``." msgstr "" -#: ../../howto/clinic.rst:1291 +#: ../../howto/clinic.rst:1293 msgid "" "There are some additional members of ``CConverter`` you may wish to specify " "in your subclass. Here's the current list:" msgstr "" -#: ../../howto/clinic.rst:1295 +#: ../../howto/clinic.rst:1297 msgid "" "The C type to use for this variable. ``type`` should be a Python string " "specifying the type, e.g. ``int``. If this is a pointer type, the type " "string should end with ``' *'``." msgstr "" -#: ../../howto/clinic.rst:1301 +#: ../../howto/clinic.rst:1303 msgid "``default``" msgstr "``default``" -#: ../../howto/clinic.rst:1300 +#: ../../howto/clinic.rst:1302 msgid "" "The Python default value for this parameter, as a Python value. Or the magic " "value ``unspecified`` if there is no default." msgstr "" -#: ../../howto/clinic.rst:1306 +#: ../../howto/clinic.rst:1308 msgid "``py_default``" msgstr "``py_default``" -#: ../../howto/clinic.rst:1304 +#: ../../howto/clinic.rst:1306 msgid "" "``default`` as it should appear in Python code, as a string. Or ``None`` if " "there is no default." msgstr "" -#: ../../howto/clinic.rst:1309 +#: ../../howto/clinic.rst:1311 msgid "" "``default`` as it should appear in C code, as a string. Or ``None`` if there " "is no default." msgstr "" -#: ../../howto/clinic.rst:1322 +#: ../../howto/clinic.rst:1324 msgid "``c_ignored_default``" msgstr "``c_ignored_default``" -#: ../../howto/clinic.rst:1314 +#: ../../howto/clinic.rst:1316 msgid "" "The default value used to initialize the C variable when there is no " "default, but not specifying a default may result in an \"uninitialized " @@ -1851,37 +1851,37 @@ msgid "" "non-empty string." msgstr "" -#: ../../howto/clinic.rst:1325 +#: ../../howto/clinic.rst:1327 msgid "The name of the C converter function, as a string." msgstr "" -#: ../../howto/clinic.rst:1330 +#: ../../howto/clinic.rst:1332 msgid "``impl_by_reference``" msgstr "``impl_by_reference``" -#: ../../howto/clinic.rst:1328 +#: ../../howto/clinic.rst:1330 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into the impl function." msgstr "" -#: ../../howto/clinic.rst:1336 +#: ../../howto/clinic.rst:1338 msgid "``parse_by_reference``" msgstr "``parse_by_reference``" -#: ../../howto/clinic.rst:1333 +#: ../../howto/clinic.rst:1335 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into :c:func:`PyArg_ParseTuple`." msgstr "" -#: ../../howto/clinic.rst:1338 +#: ../../howto/clinic.rst:1340 msgid "" "Here's the simplest example of a custom converter, from ``Modules/zlibmodule." "c``::" msgstr "" -#: ../../howto/clinic.rst:1349 +#: ../../howto/clinic.rst:1351 msgid "" "This block adds a converter to Argument Clinic named ``ssize_t``. " "Parameters declared as ``ssize_t`` will be declared as type :c:type:" @@ -1890,25 +1890,25 @@ msgid "" "automatically support default values." msgstr "" -#: ../../howto/clinic.rst:1355 +#: ../../howto/clinic.rst:1357 msgid "" "More sophisticated custom converters can insert custom C code to handle " "initialization and cleanup. You can see more examples of custom converters " "in the CPython source tree; grep the C files for the string ``CConverter``." msgstr "" -#: ../../howto/clinic.rst:1361 +#: ../../howto/clinic.rst:1363 msgid "Writing a custom return converter" msgstr "" -#: ../../howto/clinic.rst:1363 +#: ../../howto/clinic.rst:1365 msgid "" "Writing a custom return converter is much like writing a custom converter. " "Except it's somewhat simpler, because return converters are themselves much " "simpler." msgstr "" -#: ../../howto/clinic.rst:1367 +#: ../../howto/clinic.rst:1369 msgid "" "Return converters must subclass ``CReturnConverter``. There are no examples " "yet of custom return converters, because they are not widely used yet. If " @@ -1917,59 +1917,59 @@ msgid "" "its subclasses." msgstr "" -#: ../../howto/clinic.rst:1375 +#: ../../howto/clinic.rst:1377 msgid "METH_O and METH_NOARGS" msgstr "" -#: ../../howto/clinic.rst:1377 +#: ../../howto/clinic.rst:1379 msgid "" "To convert a function using ``METH_O``, make sure the function's single " "argument is using the ``object`` converter, and mark the arguments as " "positional-only::" msgstr "" -#: ../../howto/clinic.rst:1389 +#: ../../howto/clinic.rst:1391 msgid "" "To convert a function using ``METH_NOARGS``, just don't specify any " "arguments." msgstr "" -#: ../../howto/clinic.rst:1392 +#: ../../howto/clinic.rst:1394 msgid "" "You can still use a self converter, a return converter, and specify a " "``type`` argument to the object converter for ``METH_O``." msgstr "" -#: ../../howto/clinic.rst:1396 +#: ../../howto/clinic.rst:1398 msgid "tp_new and tp_init functions" msgstr "" -#: ../../howto/clinic.rst:1398 +#: ../../howto/clinic.rst:1400 msgid "" "You can convert ``tp_new`` and ``tp_init`` functions. Just name them " "``__new__`` or ``__init__`` as appropriate. Notes:" msgstr "" -#: ../../howto/clinic.rst:1401 +#: ../../howto/clinic.rst:1403 msgid "" "The function name generated for ``__new__`` doesn't end in ``__new__`` like " "it would by default. It's just the name of the class, converted into a " "valid C identifier." msgstr "" -#: ../../howto/clinic.rst:1405 +#: ../../howto/clinic.rst:1407 msgid "No ``PyMethodDef`` ``#define`` is generated for these functions." msgstr "" -#: ../../howto/clinic.rst:1407 +#: ../../howto/clinic.rst:1409 msgid "``__init__`` functions return ``int``, not ``PyObject *``." msgstr "" -#: ../../howto/clinic.rst:1409 +#: ../../howto/clinic.rst:1411 msgid "Use the docstring as the class docstring." msgstr "" -#: ../../howto/clinic.rst:1411 +#: ../../howto/clinic.rst:1413 msgid "" "Although ``__new__`` and ``__init__`` functions must always accept both the " "``args`` and ``kwargs`` objects, when converting you may specify any " @@ -1978,11 +1978,11 @@ msgid "" "it receives any.)" msgstr "" -#: ../../howto/clinic.rst:1418 +#: ../../howto/clinic.rst:1420 msgid "Changing and redirecting Clinic's output" msgstr "" -#: ../../howto/clinic.rst:1420 +#: ../../howto/clinic.rst:1422 msgid "" "It can be inconvenient to have Clinic's output interspersed with your " "conventional hand-edited C code. Luckily, Clinic is configurable: you can " @@ -1991,7 +1991,7 @@ msgid "" "Clinic's generated output." msgstr "" -#: ../../howto/clinic.rst:1426 +#: ../../howto/clinic.rst:1428 msgid "" "While changing Clinic's output in this manner can be a boon to readability, " "it may result in Clinic code using types before they are defined, or your " @@ -2003,15 +2003,15 @@ msgid "" "rearranging your code to fix definition-before-use problems.)" msgstr "" -#: ../../howto/clinic.rst:1435 +#: ../../howto/clinic.rst:1437 msgid "Let's start with defining some terminology:" msgstr "" -#: ../../howto/clinic.rst:1462 +#: ../../howto/clinic.rst:1464 msgid "*field*" msgstr "" -#: ../../howto/clinic.rst:1438 +#: ../../howto/clinic.rst:1440 msgid "" "A field, in this context, is a subsection of Clinic's output. For example, " "the ``#define`` for the ``PyMethodDef`` structure is a field, called " @@ -2019,7 +2019,7 @@ msgid "" "function definition:" msgstr "" -#: ../../howto/clinic.rst:1453 +#: ../../howto/clinic.rst:1455 msgid "" "All the names are of the form ``\"_\"``, where ``\"\"`` is the " "semantic object represented (the parsing function, the impl function, the " @@ -2032,45 +2032,45 @@ msgid "" "\"``, representing that it's a preprocessor #define.)" msgstr "" -#: ../../howto/clinic.rst:1496 +#: ../../howto/clinic.rst:1498 msgid "*destination*" msgstr "" -#: ../../howto/clinic.rst:1465 +#: ../../howto/clinic.rst:1467 msgid "" "A destination is a place Clinic can write output to. There are five built-" "in destinations:" msgstr "" -#: ../../howto/clinic.rst:1470 ../../howto/clinic.rst:1545 -#: ../../howto/clinic.rst:1623 +#: ../../howto/clinic.rst:1472 ../../howto/clinic.rst:1547 +#: ../../howto/clinic.rst:1625 msgid "``block``" msgstr "``block``" -#: ../../howto/clinic.rst:1469 +#: ../../howto/clinic.rst:1471 msgid "" "The default destination: printed in the output section of the current Clinic " "block." msgstr "" -#: ../../howto/clinic.rst:1476 ../../howto/clinic.rst:1572 -#: ../../howto/clinic.rst:1626 +#: ../../howto/clinic.rst:1478 ../../howto/clinic.rst:1574 +#: ../../howto/clinic.rst:1628 msgid "``buffer``" msgstr "``buffer``" -#: ../../howto/clinic.rst:1473 +#: ../../howto/clinic.rst:1475 msgid "" "A text buffer where you can save text for later. Text sent here is appended " "to the end of any existing text. It's an error to have any text left in the " "buffer when Clinic finishes processing a file." msgstr "" -#: ../../howto/clinic.rst:1487 ../../howto/clinic.rst:1558 -#: ../../howto/clinic.rst:1652 +#: ../../howto/clinic.rst:1489 ../../howto/clinic.rst:1560 +#: ../../howto/clinic.rst:1654 msgid "``file``" msgstr "``file``" -#: ../../howto/clinic.rst:1479 +#: ../../howto/clinic.rst:1481 msgid "" "A separate \"clinic file\" that will be created automatically by Clinic. The " "filename chosen for the file is ``{basename}.clinic{extension}``, where " @@ -2079,65 +2079,65 @@ msgid "" "for ``_pickle.c`` would be written to ``_pickle.clinic.c``.)" msgstr "" -#: ../../howto/clinic.rst:1486 +#: ../../howto/clinic.rst:1488 msgid "" "**Important: When using a** ``file`` **destination, you** *must check in* " "**the generated file!**" msgstr "" -#: ../../howto/clinic.rst:1492 ../../howto/clinic.rst:1585 -#: ../../howto/clinic.rst:1656 +#: ../../howto/clinic.rst:1494 ../../howto/clinic.rst:1587 +#: ../../howto/clinic.rst:1658 msgid "``two-pass``" msgstr "``two-pass``" -#: ../../howto/clinic.rst:1490 +#: ../../howto/clinic.rst:1492 msgid "" "A buffer like ``buffer``. However, a two-pass buffer can only be dumped " "once, and it prints out all text sent to it during all processing, even from " "Clinic blocks *after* the dumping point." msgstr "" -#: ../../howto/clinic.rst:1496 ../../howto/clinic.rst:1619 +#: ../../howto/clinic.rst:1498 ../../howto/clinic.rst:1621 msgid "``suppress``" msgstr "``suppress``" -#: ../../howto/clinic.rst:1495 +#: ../../howto/clinic.rst:1497 msgid "The text is suppressed—thrown away." msgstr "" -#: ../../howto/clinic.rst:1498 +#: ../../howto/clinic.rst:1500 msgid "Clinic defines five new directives that let you reconfigure its output." msgstr "" -#: ../../howto/clinic.rst:1500 +#: ../../howto/clinic.rst:1502 msgid "The first new directive is ``dump``:" msgstr "" -#: ../../howto/clinic.rst:1506 +#: ../../howto/clinic.rst:1508 msgid "" "This dumps the current contents of the named destination into the output of " "the current block, and empties it. This only works with ``buffer`` and " "``two-pass`` destinations." msgstr "" -#: ../../howto/clinic.rst:1510 +#: ../../howto/clinic.rst:1512 msgid "" "The second new directive is ``output``. The most basic form of ``output`` " "is like this:" msgstr "" -#: ../../howto/clinic.rst:1517 +#: ../../howto/clinic.rst:1519 msgid "" "This tells Clinic to output *field* to *destination*. ``output`` also " "supports a special meta-destination, called ``everything``, which tells " "Clinic to output *all* fields to that *destination*." msgstr "" -#: ../../howto/clinic.rst:1521 +#: ../../howto/clinic.rst:1523 msgid "``output`` has a number of other functions:" msgstr "" -#: ../../howto/clinic.rst:1530 +#: ../../howto/clinic.rst:1532 msgid "" "``output push`` and ``output pop`` allow you to push and pop configurations " "on an internal configuration stack, so that you can temporarily modify the " @@ -2146,25 +2146,25 @@ msgid "" "when you wish to restore the previous configuration." msgstr "" -#: ../../howto/clinic.rst:1537 +#: ../../howto/clinic.rst:1539 msgid "" "``output preset`` sets Clinic's output to one of several built-in preset " "configurations, as follows:" msgstr "" -#: ../../howto/clinic.rst:1541 +#: ../../howto/clinic.rst:1543 msgid "" "Clinic's original starting configuration. Writes everything immediately " "after the input block." msgstr "" -#: ../../howto/clinic.rst:1544 +#: ../../howto/clinic.rst:1546 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write " "everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1548 +#: ../../howto/clinic.rst:1550 msgid "" "Designed to write everything to the \"clinic file\" that it can. You then " "``#include`` this file near the top of your file. You may need to rearrange " @@ -2172,17 +2172,17 @@ msgid "" "declarations for various ``typedef`` and ``PyTypeObject`` definitions." msgstr "" -#: ../../howto/clinic.rst:1554 +#: ../../howto/clinic.rst:1556 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write the " "``impl_definition`` to ``block``, and write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1558 +#: ../../howto/clinic.rst:1560 msgid "The default filename is ``\"{dirname}/clinic/{basename}.h\"``." msgstr "" -#: ../../howto/clinic.rst:1561 +#: ../../howto/clinic.rst:1563 msgid "" "Save up most of the output from Clinic, to be written into your file near " "the end. For Python files implementing modules or builtin types, it's " @@ -2192,14 +2192,14 @@ msgid "" "static ``PyMethodDef`` arrays defined in the middle of the file." msgstr "" -#: ../../howto/clinic.rst:1570 +#: ../../howto/clinic.rst:1572 msgid "" "Suppress the ``parser_prototype``, ``impl_prototype``, and " "``docstring_prototype``, write the ``impl_definition`` to ``block``, and " "write everything else to ``file``." msgstr "" -#: ../../howto/clinic.rst:1575 +#: ../../howto/clinic.rst:1577 msgid "" "Similar to the ``buffer`` preset, but writes forward declarations to the " "``two-pass`` buffer, and definitions to the ``buffer``. This is similar to " @@ -2208,18 +2208,18 @@ msgid "" "near the end just like you would when using the ``buffer`` preset." msgstr "" -#: ../../howto/clinic.rst:1582 +#: ../../howto/clinic.rst:1584 msgid "" "Suppresses the ``impl_prototype``, write the ``impl_definition`` to " "``block``, write ``docstring_prototype``, ``methoddef_define``, and " "``parser_prototype`` to ``two-pass``, write everything else to ``buffer``." msgstr "" -#: ../../howto/clinic.rst:1596 +#: ../../howto/clinic.rst:1598 msgid "``partial-buffer``" msgstr "``partial-buffer``" -#: ../../howto/clinic.rst:1588 +#: ../../howto/clinic.rst:1590 msgid "" "Similar to the ``buffer`` preset, but writes more things to ``block``, only " "writing the really big chunks of generated code to ``buffer``. This avoids " @@ -2229,137 +2229,137 @@ msgid "" "preset." msgstr "" -#: ../../howto/clinic.rst:1595 +#: ../../howto/clinic.rst:1597 msgid "" "Suppresses the ``impl_prototype``, write the ``docstring_definition`` and " "``parser_definition`` to ``buffer``, write everything else to ``block``." msgstr "" -#: ../../howto/clinic.rst:1598 +#: ../../howto/clinic.rst:1600 msgid "The third new directive is ``destination``:" msgstr "" -#: ../../howto/clinic.rst:1604 +#: ../../howto/clinic.rst:1606 msgid "This performs an operation on the destination named ``name``." msgstr "" -#: ../../howto/clinic.rst:1606 +#: ../../howto/clinic.rst:1608 msgid "There are two defined subcommands: ``new`` and ``clear``." msgstr "" -#: ../../howto/clinic.rst:1608 +#: ../../howto/clinic.rst:1610 msgid "The ``new`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1614 +#: ../../howto/clinic.rst:1616 msgid "" "This creates a new destination with name ```` and type ````." msgstr "" -#: ../../howto/clinic.rst:1616 +#: ../../howto/clinic.rst:1618 msgid "There are five destination types:" msgstr "" -#: ../../howto/clinic.rst:1619 +#: ../../howto/clinic.rst:1621 msgid "Throws the text away." msgstr "" -#: ../../howto/clinic.rst:1622 +#: ../../howto/clinic.rst:1624 msgid "" "Writes the text to the current block. This is what Clinic originally did." msgstr "" -#: ../../howto/clinic.rst:1626 +#: ../../howto/clinic.rst:1628 msgid "A simple text buffer, like the \"buffer\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1629 +#: ../../howto/clinic.rst:1631 msgid "" "A text file. The file destination takes an extra argument, a template to " "use for building the filename, like so:" msgstr "" -#: ../../howto/clinic.rst:1632 +#: ../../howto/clinic.rst:1634 msgid "destination new " msgstr "" -#: ../../howto/clinic.rst:1634 +#: ../../howto/clinic.rst:1636 msgid "" "The template can use three strings internally that will be replaced by bits " "of the filename:" msgstr "" -#: ../../howto/clinic.rst:1637 +#: ../../howto/clinic.rst:1639 msgid "{path}" msgstr "" -#: ../../howto/clinic.rst:1638 +#: ../../howto/clinic.rst:1640 msgid "The full path to the file, including directory and full filename." msgstr "" -#: ../../howto/clinic.rst:1639 +#: ../../howto/clinic.rst:1641 msgid "{dirname}" msgstr "" -#: ../../howto/clinic.rst:1640 +#: ../../howto/clinic.rst:1642 msgid "The name of the directory the file is in." msgstr "" -#: ../../howto/clinic.rst:1641 +#: ../../howto/clinic.rst:1643 msgid "{basename}" msgstr "" -#: ../../howto/clinic.rst:1642 +#: ../../howto/clinic.rst:1644 msgid "Just the name of the file, not including the directory." msgstr "" -#: ../../howto/clinic.rst:1644 +#: ../../howto/clinic.rst:1646 msgid "{basename_root}" msgstr "" -#: ../../howto/clinic.rst:1644 +#: ../../howto/clinic.rst:1646 msgid "" "Basename with the extension clipped off (everything up to but not including " "the last '.')." msgstr "" -#: ../../howto/clinic.rst:1648 +#: ../../howto/clinic.rst:1650 msgid "{basename_extension}" msgstr "" -#: ../../howto/clinic.rst:1647 +#: ../../howto/clinic.rst:1649 msgid "" "The last '.' and everything after it. If the basename does not contain a " "period, this will be the empty string." msgstr "" -#: ../../howto/clinic.rst:1650 +#: ../../howto/clinic.rst:1652 msgid "" "If there are no periods in the filename, {basename} and {filename} are the " "same, and {extension} is empty. \"{basename}{extension}\" is always exactly " "the same as \"{filename}\".\"" msgstr "" -#: ../../howto/clinic.rst:1655 +#: ../../howto/clinic.rst:1657 msgid "A two-pass buffer, like the \"two-pass\" builtin destination above." msgstr "" -#: ../../howto/clinic.rst:1658 +#: ../../howto/clinic.rst:1660 msgid "The ``clear`` subcommand works like this:" msgstr "" -#: ../../howto/clinic.rst:1664 +#: ../../howto/clinic.rst:1666 msgid "" "It removes all the accumulated text up to this point in the destination. (I " "don't know what you'd need this for, but I thought maybe it'd be useful " "while someone's experimenting.)" msgstr "" -#: ../../howto/clinic.rst:1668 +#: ../../howto/clinic.rst:1670 msgid "The fourth new directive is ``set``:" msgstr "" -#: ../../howto/clinic.rst:1675 +#: ../../howto/clinic.rst:1677 msgid "" "``set`` lets you set two internal variables in Clinic. ``line_prefix`` is a " "string that will be prepended to every line of Clinic's output; " @@ -2367,35 +2367,35 @@ msgid "" "output." msgstr "" -#: ../../howto/clinic.rst:1679 +#: ../../howto/clinic.rst:1681 msgid "Both of these support two format strings:" msgstr "" -#: ../../howto/clinic.rst:1682 +#: ../../howto/clinic.rst:1684 msgid "``{block comment start}``" msgstr "``{block comment start}``" -#: ../../howto/clinic.rst:1682 +#: ../../howto/clinic.rst:1684 msgid "" "Turns into the string ``/*``, the start-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1685 +#: ../../howto/clinic.rst:1687 msgid "``{block comment end}``" msgstr "``{block comment end}``" -#: ../../howto/clinic.rst:1685 +#: ../../howto/clinic.rst:1687 msgid "" "Turns into the string ``*/``, the end-comment text sequence for C files." msgstr "" -#: ../../howto/clinic.rst:1687 +#: ../../howto/clinic.rst:1689 msgid "" "The final new directive is one you shouldn't need to use directly, called " "``preserve``:" msgstr "" -#: ../../howto/clinic.rst:1694 +#: ../../howto/clinic.rst:1696 msgid "" "This tells Clinic that the current contents of the output should be kept, " "unmodified. This is used internally by Clinic when dumping output into " @@ -2404,36 +2404,36 @@ msgid "" "gets overwritten." msgstr "" -#: ../../howto/clinic.rst:1701 +#: ../../howto/clinic.rst:1703 msgid "The #ifdef trick" msgstr "" -#: ../../howto/clinic.rst:1703 +#: ../../howto/clinic.rst:1705 msgid "" "If you're converting a function that isn't available on all platforms, " "there's a trick you can use to make life a little easier. The existing code " "probably looks like this::" msgstr "" -#: ../../howto/clinic.rst:1714 +#: ../../howto/clinic.rst:1716 msgid "" "And then in the ``PyMethodDef`` structure at the bottom the existing code " "will have:" msgstr "" -#: ../../howto/clinic.rst:1723 +#: ../../howto/clinic.rst:1725 msgid "" "In this scenario, you should enclose the body of your impl function inside " "the ``#ifdef``, like so::" msgstr "" -#: ../../howto/clinic.rst:1737 +#: ../../howto/clinic.rst:1739 msgid "" "Then, remove those three lines from the ``PyMethodDef`` structure, replacing " "them with the macro Argument Clinic generated:" msgstr "" -#: ../../howto/clinic.rst:1744 +#: ../../howto/clinic.rst:1746 msgid "" "(You can find the real name for this macro inside the generated code. Or you " "can calculate it yourself: it's the name of your function as defined on the " @@ -2441,27 +2441,27 @@ msgid "" "uppercased, and ``\"_METHODDEF\"`` added to the end.)" msgstr "" -#: ../../howto/clinic.rst:1749 +#: ../../howto/clinic.rst:1751 msgid "" "Perhaps you're wondering: what if ``HAVE_FUNCTIONNAME`` isn't defined? The " "``MODULE_FUNCTIONNAME_METHODDEF`` macro won't be defined either!" msgstr "" -#: ../../howto/clinic.rst:1752 +#: ../../howto/clinic.rst:1754 msgid "" "Here's where Argument Clinic gets very clever. It actually detects that the " "Argument Clinic block might be deactivated by the ``#ifdef``. When that " "happens, it generates a little extra code that looks like this::" msgstr "" -#: ../../howto/clinic.rst:1760 +#: ../../howto/clinic.rst:1762 msgid "" "That means the macro always works. If the function is defined, this turns " "into the correct structure, including the trailing comma. If the function " "is undefined, this turns into nothing." msgstr "" -#: ../../howto/clinic.rst:1764 +#: ../../howto/clinic.rst:1766 msgid "" "However, this causes one ticklish problem: where should Argument Clinic put " "this extra code when using the \"block\" output preset? It can't go in the " @@ -2469,24 +2469,24 @@ msgid "" "the whole point!)" msgstr "" -#: ../../howto/clinic.rst:1768 +#: ../../howto/clinic.rst:1770 msgid "" "In this situation, Argument Clinic writes the extra code to the \"buffer\" " "destination. This may mean that you get a complaint from Argument Clinic:" msgstr "" -#: ../../howto/clinic.rst:1776 +#: ../../howto/clinic.rst:1778 msgid "" "When this happens, just open your file, find the ``dump buffer`` block that " "Argument Clinic added to your file (it'll be at the very bottom), then move " "it above the ``PyMethodDef`` structure where that macro is used." msgstr "" -#: ../../howto/clinic.rst:1783 +#: ../../howto/clinic.rst:1785 msgid "Using Argument Clinic in Python files" msgstr "" -#: ../../howto/clinic.rst:1785 +#: ../../howto/clinic.rst:1787 msgid "" "It's actually possible to use Argument Clinic to preprocess Python files. " "There's no point to using Argument Clinic blocks, of course, as the output " @@ -2494,7 +2494,7 @@ msgid "" "Clinic to run Python blocks lets you use Python as a Python preprocessor!" msgstr "" -#: ../../howto/clinic.rst:1790 +#: ../../howto/clinic.rst:1792 msgid "" "Since Python comments are different from C comments, Argument Clinic blocks " "embedded in Python files look slightly different. They look like this:" diff --git a/howto/enum.po b/howto/enum.po index f86fd27338..79f481f38e 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1000,10 +1000,10 @@ msgid "" "The :class:`EnumType` metaclass is responsible for providing the :meth:" "`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " "allow one to do things with an :class:`Enum` class that fail on a typical " -"class, such as `list(Color)` or `some_enum_var in Color`. :class:`EnumType` " -"is responsible for ensuring that various other methods on the final :class:" -"`Enum` class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`, :" -"meth:`__str__` and :meth:`__repr__`)." +"class, such as ``list(Color)`` or ``some_enum_var in Color``. :class:" +"`EnumType` is responsible for ensuring that various other methods on the " +"final :class:`Enum` class are correct (such as :meth:`__new__`, :meth:" +"`__getnewargs__`, :meth:`__str__` and :meth:`__repr__`)." msgstr "" #: ../../howto/enum.rst:1130 diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index c7001bc070..72ceee2c09 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-16 07:36+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -372,8 +372,8 @@ msgid "" "management tool such as `Supervisor `_. `Here " "`_ is a " "Gist which provides the bare-bones files to run the above functionality " -"using Supervisor: you will need to change the `/path/to/` parts in the Gist " -"to reflect the actual paths you want to use." +"using Supervisor: you will need to change the ``/path/to/`` parts in the " +"Gist to reflect the actual paths you want to use." msgstr "" #: ../../howto/logging-cookbook.rst:779 @@ -930,27 +930,27 @@ msgid "" "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1845 ../../howto/logging-cookbook.rst:3800 +#: ../../howto/logging-cookbook.rst:1845 ../../howto/logging-cookbook.rst:3865 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../howto/logging-cookbook.rst:1845 ../../howto/logging-cookbook.rst:3800 +#: ../../howto/logging-cookbook.rst:1845 ../../howto/logging-cookbook.rst:3865 msgid "API reference for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1848 ../../howto/logging-cookbook.rst:3803 +#: ../../howto/logging-cookbook.rst:1848 ../../howto/logging-cookbook.rst:3868 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../howto/logging-cookbook.rst:1848 ../../howto/logging-cookbook.rst:3803 +#: ../../howto/logging-cookbook.rst:1848 ../../howto/logging-cookbook.rst:3868 msgid "Configuration API for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1851 ../../howto/logging-cookbook.rst:3806 +#: ../../howto/logging-cookbook.rst:1851 ../../howto/logging-cookbook.rst:3871 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../howto/logging-cookbook.rst:1851 ../../howto/logging-cookbook.rst:3806 +#: ../../howto/logging-cookbook.rst:1851 ../../howto/logging-cookbook.rst:3871 msgid "Useful handlers included with the logging module." msgstr "" @@ -1527,7 +1527,7 @@ msgstr "" #: ../../howto/logging-cookbook.rst:2983 msgid "" "Sometimes you want to format times using UTC, which can be done using a " -"class such as `UTCFormatter`, shown below::" +"class such as ``UTCFormatter``, shown below::" msgstr "" #: ../../howto/logging-cookbook.rst:2992 @@ -1796,11 +1796,38 @@ msgid "" "configure logging." msgstr "" -#: ../../howto/logging-cookbook.rst:3718 +#: ../../howto/logging-cookbook.rst:3715 +msgid "" +"Note that with the above scheme, you are somewhat at the mercy of buffering " +"and the sequence of write calls which you are intercepting. For example, " +"with the definition of ``LoggerWriter`` above, if you have the snippet" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3724 +msgid "then running the script results in" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3742 +msgid "" +"As you can see, this output isn't ideal. That's because the underlying code " +"which writes to ``sys.stderr`` makes mutiple writes, each of which results " +"in a separate logged line (for example, the last three lines above). To get " +"around this problem, you need to buffer things and only output log lines " +"when newlines are seen. Let's use a slghtly better implementation of " +"``LoggerWriter``:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3767 +msgid "" +"This just buffers up stuff until a newline is seen, and then logs complete " +"lines. With this approach, you get better output:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3783 msgid "Patterns to avoid" msgstr "" -#: ../../howto/logging-cookbook.rst:3720 +#: ../../howto/logging-cookbook.rst:3785 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -1808,11 +1835,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: ../../howto/logging-cookbook.rst:3726 +#: ../../howto/logging-cookbook.rst:3791 msgid "Opening the same log file multiple times" msgstr "" -#: ../../howto/logging-cookbook.rst:3728 +#: ../../howto/logging-cookbook.rst:3793 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -1820,32 +1847,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: ../../howto/logging-cookbook.rst:3733 +#: ../../howto/logging-cookbook.rst:3798 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: ../../howto/logging-cookbook.rst:3736 +#: ../../howto/logging-cookbook.rst:3801 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: ../../howto/logging-cookbook.rst:3739 +#: ../../howto/logging-cookbook.rst:3804 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: ../../howto/logging-cookbook.rst:3743 +#: ../../howto/logging-cookbook.rst:3808 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: ../../howto/logging-cookbook.rst:3746 +#: ../../howto/logging-cookbook.rst:3811 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -1854,7 +1881,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: ../../howto/logging-cookbook.rst:3752 +#: ../../howto/logging-cookbook.rst:3817 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -1864,17 +1891,17 @@ msgid "" "being supposedly in place." msgstr "" -#: ../../howto/logging-cookbook.rst:3759 +#: ../../howto/logging-cookbook.rst:3824 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: ../../howto/logging-cookbook.rst:3763 +#: ../../howto/logging-cookbook.rst:3828 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: ../../howto/logging-cookbook.rst:3765 +#: ../../howto/logging-cookbook.rst:3830 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -1885,12 +1912,12 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: ../../howto/logging-cookbook.rst:3774 +#: ../../howto/logging-cookbook.rst:3839 msgid "" "Adding handlers other than :class:`NullHandler` to a logger in a library" msgstr "" -#: ../../howto/logging-cookbook.rst:3776 +#: ../../howto/logging-cookbook.rst:3841 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -1898,11 +1925,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: ../../howto/logging-cookbook.rst:3782 +#: ../../howto/logging-cookbook.rst:3847 msgid "Creating a lot of loggers" msgstr "" -#: ../../howto/logging-cookbook.rst:3784 +#: ../../howto/logging-cookbook.rst:3849 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -1913,14 +1940,14 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: ../../howto/logging-cookbook.rst:3795 +#: ../../howto/logging-cookbook.rst:3860 msgid "Other resources" msgstr "" -#: ../../howto/logging-cookbook.rst:3808 +#: ../../howto/logging-cookbook.rst:3873 msgid ":ref:`Basic Tutorial `" msgstr "" -#: ../../howto/logging-cookbook.rst:3810 +#: ../../howto/logging-cookbook.rst:3875 msgid ":ref:`Advanced Tutorial `" msgstr "" diff --git a/howto/logging.po b/howto/logging.po index e6bf7b7391..b19516e766 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -753,18 +753,19 @@ msgstr "" #: ../../howto/logging.rst:555 msgid "" -"with the milliseconds tacked on at the end. The ``style`` is one of `%`, '{' " -"or '$'. If one of these is not specified, then '%' will be used." +"with the milliseconds tacked on at the end. The ``style`` is one of ``'%'``, " +"``'{'``, or ``'$'``. If one of these is not specified, then ``'%'`` will be " +"used." msgstr "" #: ../../howto/logging.rst:558 msgid "" -"If the ``style`` is '%', the message format string uses ``%()s`` styled string substitution; the possible keys are documented in :" -"ref:`logrecord-attributes`. If the style is '{', the message format string " -"is assumed to be compatible with :meth:`str.format` (using keyword " -"arguments), while if the style is '$' then the message format string should " -"conform to what is expected by :meth:`string.Template.substitute`." +"ref:`logrecord-attributes`. If the style is ``'{'``, the message format " +"string is assumed to be compatible with :meth:`str.format` (using keyword " +"arguments), while if the style is ``'$'`` then the message format string " +"should conform to what is expected by :meth:`string.Template.substitute`." msgstr "" #: ../../howto/logging.rst:565 diff --git a/howto/sorting.po b/howto/sorting.po index ace4f698fe..d72376d868 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -181,7 +181,7 @@ msgid "" msgstr "" #: ../../howto/sorting.rst:190 -msgid "The Old Way Using Decorate-Sort-Undecorate" +msgid "Decorate-Sort-Undecorate" msgstr "" #: ../../howto/sorting.rst:192 @@ -249,65 +249,53 @@ msgid "" "needed." msgstr "" -#: ../../howto/sorting.rst:231 -msgid "The Old Way Using the *cmp* Parameter" +#: ../../howto/sorting.rst:230 +msgid "Comparison Functions" msgstr "" -#: ../../howto/sorting.rst:233 +#: ../../howto/sorting.rst:232 msgid "" -"Many constructs given in this HOWTO assume Python 2.4 or later. Before that, " -"there was no :func:`sorted` builtin and :meth:`list.sort` took no keyword " -"arguments. Instead, all of the Py2.x versions supported a *cmp* parameter to " -"handle user specified comparison functions." +"Unlike key functions that return an absolute value for sorting, a comparison " +"function computes the relative ordering for two inputs." msgstr "" -#: ../../howto/sorting.rst:238 +#: ../../howto/sorting.rst:235 msgid "" -"In Py3.0, the *cmp* parameter was removed entirely (as part of a larger " -"effort to simplify and unify the language, eliminating the conflict between " -"rich comparisons and the :meth:`__cmp__` magic method)." +"For example, a `balance scale `_ compares two samples giving a " +"relative ordering: lighter, equal, or heavier. Likewise, a comparison " +"function such as ``cmp(a, b)`` will return a negative value for less-than, " +"zero if the inputs are equal, or a positive value for greater-than." msgstr "" #: ../../howto/sorting.rst:242 msgid "" -"In Py2.x, sort allowed an optional function which can be called for doing " -"the comparisons. That function should take two arguments to be compared and " -"then return a negative value for less-than, return zero if they are equal, " -"or return a positive value for greater-than. For example, we can do:" +"It is common to encounter comparison functions when translating algorithms " +"from other languages. Also, some libraries provide comparison functions as " +"part of their API. For example, :func:`locale.strcoll` is a comparison " +"function." msgstr "" -#: ../../howto/sorting.rst:254 -msgid "Or you can reverse the order of comparison with:" -msgstr "" - -#: ../../howto/sorting.rst:263 -msgid "" -"When porting code from Python 2.x to 3.x, the situation can arise when you " -"have the user supplying a comparison function and you need to convert that " -"to a key function. The following wrapper makes that easy to do:" -msgstr "" - -#: ../../howto/sorting.rst:294 -msgid "To convert to a key function, just wrap the old comparison function:" -msgstr "" - -#: ../../howto/sorting.rst:305 +#: ../../howto/sorting.rst:246 msgid "" -"In Python 3.2, the :func:`functools.cmp_to_key` function was added to the :" -"mod:`functools` module in the standard library." +"To accommodate those situations, Python provides :class:`functools." +"cmp_to_key` to wrap the comparison function to make it usable as a key " +"function::" msgstr "" -#: ../../howto/sorting.rst:309 +#: ../../howto/sorting.rst:253 msgid "Odds and Ends" msgstr "" -#: ../../howto/sorting.rst:311 +#: ../../howto/sorting.rst:255 msgid "" "For locale aware sorting, use :func:`locale.strxfrm` for a key function or :" -"func:`locale.strcoll` for a comparison function." +"func:`locale.strcoll` for a comparison function. This is necessary because " +"\"alphabetical\" sort orderings can vary across cultures even if the " +"underlying alphabet is the same." msgstr "" -#: ../../howto/sorting.rst:314 +#: ../../howto/sorting.rst:260 msgid "" "The *reverse* parameter still maintains sort stability (so that records with " "equal keys retain the original order). Interestingly, that effect can be " @@ -315,20 +303,20 @@ msgid "" "function twice:" msgstr "" -#: ../../howto/sorting.rst:328 +#: ../../howto/sorting.rst:274 msgid "" "The sort routines use ``<`` when making comparisons between two objects. So, " "it is easy to add a standard sort order to a class by defining an :meth:" "`__lt__` method:" msgstr "" -#: ../../howto/sorting.rst:338 +#: ../../howto/sorting.rst:284 msgid "" "However, note that ``<`` can fall back to using :meth:`__gt__` if :meth:" "`__lt__` is not implemented (see :func:`object.__lt__`)." msgstr "" -#: ../../howto/sorting.rst:341 +#: ../../howto/sorting.rst:287 msgid "" "Key functions need not depend directly on the objects being sorted. A key " "function can also access external resources. For instance, if the student " diff --git a/install/index.po b/install/index.po index 7ee05c3ba8..d2bee54fb5 100644 --- a/install/index.po +++ b/install/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 00:19+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1063,7 +1063,7 @@ msgstr "\\(5)" #: ../../install/index.rst:763 msgid "" "On all platforms, the \"personal\" file can be temporarily disabled by " -"passing the `--no-user-cfg` option." +"passing the ``--no-user-cfg`` option." msgstr "" #: ../../install/index.rst:769 diff --git a/library/argparse.po b/library/argparse.po index 63025e57ca..7091fb8bc2 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -136,7 +136,7 @@ msgid "Default value used when an argument is not provided" msgstr "" #: ../../library/argparse.rst:66 -msgid "Defaults to *None*" +msgid "Defaults to ``None``" msgstr "" #: ../../library/argparse.rst:67 @@ -313,87 +313,88 @@ msgid "" msgstr "" #: ../../library/argparse.rst:204 -msgid "description_ - Text to display before the argument help (default: none)" +msgid "" +"description_ - Text to display before the argument help (by default, no text)" msgstr "" -#: ../../library/argparse.rst:206 -msgid "epilog_ - Text to display after the argument help (default: none)" +#: ../../library/argparse.rst:207 +msgid "epilog_ - Text to display after the argument help (by default, no text)" msgstr "" -#: ../../library/argparse.rst:208 +#: ../../library/argparse.rst:209 msgid "" "parents_ - A list of :class:`ArgumentParser` objects whose arguments should " "also be included" msgstr "" -#: ../../library/argparse.rst:211 +#: ../../library/argparse.rst:212 msgid "formatter_class_ - A class for customizing the help output" msgstr "" -#: ../../library/argparse.rst:213 +#: ../../library/argparse.rst:214 msgid "" "prefix_chars_ - The set of characters that prefix optional arguments " "(default: '-')" msgstr "" -#: ../../library/argparse.rst:216 +#: ../../library/argparse.rst:217 msgid "" "fromfile_prefix_chars_ - The set of characters that prefix files from which " "additional arguments should be read (default: ``None``)" msgstr "" -#: ../../library/argparse.rst:219 +#: ../../library/argparse.rst:220 msgid "" "argument_default_ - The global default value for arguments (default: " "``None``)" msgstr "" -#: ../../library/argparse.rst:222 +#: ../../library/argparse.rst:223 msgid "" "conflict_handler_ - The strategy for resolving conflicting optionals " "(usually unnecessary)" msgstr "" -#: ../../library/argparse.rst:225 +#: ../../library/argparse.rst:226 msgid "" "add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)" msgstr "" -#: ../../library/argparse.rst:227 +#: ../../library/argparse.rst:228 msgid "" "allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " "unambiguous. (default: ``True``)" msgstr "" -#: ../../library/argparse.rst:230 +#: ../../library/argparse.rst:231 msgid "" "exit_on_error_ - Determines whether or not ArgumentParser exits with error " "info when an error occurs. (default: ``True``)" msgstr "" -#: ../../library/argparse.rst:233 +#: ../../library/argparse.rst:234 msgid "*allow_abbrev* parameter was added." msgstr "新增 *allow_abbrev* 參數。" -#: ../../library/argparse.rst:236 +#: ../../library/argparse.rst:237 msgid "" "In previous versions, *allow_abbrev* also disabled grouping of short flags " "such as ``-vv`` to mean ``-v -v``." msgstr "" -#: ../../library/argparse.rst:240 +#: ../../library/argparse.rst:241 msgid "*exit_on_error* parameter was added." msgstr "新增 *exit_on_error* 參數。" -#: ../../library/argparse.rst:243 ../../library/argparse.rst:769 +#: ../../library/argparse.rst:244 ../../library/argparse.rst:770 msgid "The following sections describe how each of these are used." msgstr "" -#: ../../library/argparse.rst:249 +#: ../../library/argparse.rst:250 msgid "prog" msgstr "" -#: ../../library/argparse.rst:251 +#: ../../library/argparse.rst:252 msgid "" "By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to determine " "how to display the name of the program in help messages. This default is " @@ -402,51 +403,51 @@ msgid "" "``myprogram.py`` with the following code::" msgstr "" -#: ../../library/argparse.rst:262 +#: ../../library/argparse.rst:263 msgid "" "The help for this program will display ``myprogram.py`` as the program name " "(regardless of where the program was invoked from):" msgstr "" -#: ../../library/argparse.rst:281 +#: ../../library/argparse.rst:282 msgid "" "To change this default behavior, another value can be supplied using the " "``prog=`` argument to :class:`ArgumentParser`::" msgstr "" -#: ../../library/argparse.rst:291 +#: ../../library/argparse.rst:292 msgid "" "Note that the program name, whether determined from ``sys.argv[0]`` or from " "the ``prog=`` argument, is available to help messages using the ``%(prog)s`` " "format specifier." msgstr "" -#: ../../library/argparse.rst:308 +#: ../../library/argparse.rst:309 msgid "usage" msgstr "" -#: ../../library/argparse.rst:310 +#: ../../library/argparse.rst:311 msgid "" "By default, :class:`ArgumentParser` calculates the usage message from the " "arguments it contains::" msgstr "" -#: ../../library/argparse.rst:326 +#: ../../library/argparse.rst:327 msgid "" "The default message can be overridden with the ``usage=`` keyword argument::" msgstr "" -#: ../../library/argparse.rst:341 +#: ../../library/argparse.rst:342 msgid "" "The ``%(prog)s`` format specifier is available to fill in the program name " "in your usage messages." msgstr "" -#: ../../library/argparse.rst:348 +#: ../../library/argparse.rst:349 msgid "description" msgstr "描述" -#: ../../library/argparse.rst:350 +#: ../../library/argparse.rst:351 msgid "" "Most calls to the :class:`ArgumentParser` constructor will use the " "``description=`` keyword argument. This argument gives a brief description " @@ -455,35 +456,35 @@ msgid "" "messages for the various arguments::" msgstr "" -#: ../../library/argparse.rst:365 +#: ../../library/argparse.rst:366 msgid "" "By default, the description will be line-wrapped so that it fits within the " "given space. To change this behavior, see the formatter_class_ argument." msgstr "" -#: ../../library/argparse.rst:370 +#: ../../library/argparse.rst:371 msgid "epilog" msgstr "" -#: ../../library/argparse.rst:372 +#: ../../library/argparse.rst:373 msgid "" "Some programs like to display additional description of the program after " "the description of the arguments. Such text can be specified using the " "``epilog=`` argument to :class:`ArgumentParser`::" msgstr "" -#: ../../library/argparse.rst:389 +#: ../../library/argparse.rst:390 msgid "" "As with the description_ argument, the ``epilog=`` text is by default line-" "wrapped, but this behavior can be adjusted with the formatter_class_ " "argument to :class:`ArgumentParser`." msgstr "" -#: ../../library/argparse.rst:395 +#: ../../library/argparse.rst:396 msgid "parents" msgstr "" -#: ../../library/argparse.rst:397 +#: ../../library/argparse.rst:398 msgid "" "Sometimes, several parsers share a common set of arguments. Rather than " "repeating the definitions of these arguments, a single parser with all the " @@ -494,32 +495,32 @@ msgid "" "object being constructed::" msgstr "" -#: ../../library/argparse.rst:417 +#: ../../library/argparse.rst:418 msgid "" "Note that most parent parsers will specify ``add_help=False``. Otherwise, " "the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the " "parent and one in the child) and raise an error." msgstr "" -#: ../../library/argparse.rst:422 +#: ../../library/argparse.rst:423 msgid "" "You must fully initialize the parsers before passing them via ``parents=``. " "If you change the parent parsers after the child parser, those changes will " "not be reflected in the child." msgstr "" -#: ../../library/argparse.rst:430 +#: ../../library/argparse.rst:431 msgid "formatter_class" msgstr "formatter_class" -#: ../../library/argparse.rst:432 +#: ../../library/argparse.rst:433 msgid "" ":class:`ArgumentParser` objects allow the help formatting to be customized " "by specifying an alternate formatting class. Currently, there are four such " "classes:" msgstr "" -#: ../../library/argparse.rst:441 +#: ../../library/argparse.rst:442 msgid "" ":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " "more control over how textual descriptions are displayed. By default, :class:" @@ -527,14 +528,14 @@ msgid "" "command-line help messages::" msgstr "" -#: ../../library/argparse.rst:466 +#: ../../library/argparse.rst:467 msgid "" "Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " "indicates that description_ and epilog_ are already correctly formatted and " "should not be line-wrapped::" msgstr "" -#: ../../library/argparse.rst:492 +#: ../../library/argparse.rst:493 msgid "" ":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " "text, including argument descriptions. However, multiple new lines are " @@ -542,24 +543,24 @@ msgid "" "between the newlines." msgstr "" -#: ../../library/argparse.rst:497 +#: ../../library/argparse.rst:498 msgid "" ":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " "default values to each of the argument help messages::" msgstr "" -#: ../../library/argparse.rst:515 +#: ../../library/argparse.rst:516 msgid "" ":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for " "each argument as the display name for its values (rather than using the " "dest_ as the regular formatter does)::" msgstr "" -#: ../../library/argparse.rst:536 +#: ../../library/argparse.rst:537 msgid "prefix_chars" msgstr "prefix_chars" -#: ../../library/argparse.rst:538 +#: ../../library/argparse.rst:539 msgid "" "Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. " "Parsers that need to support different or additional prefix characters, e.g. " @@ -567,18 +568,18 @@ msgid "" "``prefix_chars=`` argument to the ArgumentParser constructor::" msgstr "" -#: ../../library/argparse.rst:550 +#: ../../library/argparse.rst:551 msgid "" "The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of " "characters that does not include ``-`` will cause ``-f/--foo`` options to be " "disallowed." msgstr "" -#: ../../library/argparse.rst:556 +#: ../../library/argparse.rst:557 msgid "fromfile_prefix_chars" msgstr "fromfile_prefix_chars" -#: ../../library/argparse.rst:558 +#: ../../library/argparse.rst:559 msgid "" "Sometimes, when dealing with a particularly long argument list, it may make " "sense to keep the list of arguments in a file rather than typing it out at " @@ -588,7 +589,7 @@ msgid "" "by the arguments they contain. For example::" msgstr "" -#: ../../library/argparse.rst:572 +#: ../../library/argparse.rst:573 msgid "" "Arguments read from a file must by default be one per line (but see also :" "meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they " @@ -598,17 +599,17 @@ msgid "" "f', 'bar']``." msgstr "" -#: ../../library/argparse.rst:578 +#: ../../library/argparse.rst:579 msgid "" "The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " "arguments will never be treated as file references." msgstr "" -#: ../../library/argparse.rst:583 +#: ../../library/argparse.rst:584 msgid "argument_default" msgstr "argument_default" -#: ../../library/argparse.rst:585 +#: ../../library/argparse.rst:586 msgid "" "Generally, argument defaults are specified either by passing a default to :" "meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser." @@ -620,26 +621,26 @@ msgid "" "supply ``argument_default=SUPPRESS``::" msgstr "" -#: ../../library/argparse.rst:605 +#: ../../library/argparse.rst:606 msgid "allow_abbrev" msgstr "allow_abbrev" -#: ../../library/argparse.rst:607 +#: ../../library/argparse.rst:608 msgid "" "Normally, when you pass an argument list to the :meth:`~ArgumentParser." "parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " "abbreviations ` of long options." msgstr "" -#: ../../library/argparse.rst:611 +#: ../../library/argparse.rst:612 msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" msgstr "" -#: ../../library/argparse.rst:624 +#: ../../library/argparse.rst:625 msgid "conflict_handler" msgstr "conflict_handler" -#: ../../library/argparse.rst:626 +#: ../../library/argparse.rst:627 msgid "" ":class:`ArgumentParser` objects do not allow two actions with the same " "option string. By default, :class:`ArgumentParser` objects raise an " @@ -647,7 +648,7 @@ msgid "" "that is already in use::" msgstr "" -#: ../../library/argparse.rst:638 +#: ../../library/argparse.rst:639 msgid "" "Sometimes (e.g. when using parents_) it may be useful to simply override any " "older arguments with the same option string. To get this behavior, the " @@ -655,7 +656,7 @@ msgid "" "of :class:`ArgumentParser`::" msgstr "" -#: ../../library/argparse.rst:654 +#: ../../library/argparse.rst:655 msgid "" "Note that :class:`ArgumentParser` objects only remove an action if all of " "its option strings are overridden. So, in the example above, the old ``-f/--" @@ -663,31 +664,31 @@ msgid "" "option string was overridden." msgstr "" -#: ../../library/argparse.rst:661 +#: ../../library/argparse.rst:662 msgid "add_help" msgstr "add_help" -#: ../../library/argparse.rst:663 +#: ../../library/argparse.rst:664 msgid "" "By default, ArgumentParser objects add an option which simply displays the " "parser's help message. For example, consider a file named ``myprogram.py`` " "containing the following code::" msgstr "" -#: ../../library/argparse.rst:672 +#: ../../library/argparse.rst:673 msgid "" "If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser " "help will be printed:" msgstr "" -#: ../../library/argparse.rst:684 +#: ../../library/argparse.rst:685 msgid "" "Occasionally, it may be useful to disable the addition of this help option. " "This can be achieved by passing ``False`` as the ``add_help=`` argument to :" "class:`ArgumentParser`::" msgstr "" -#: ../../library/argparse.rst:696 +#: ../../library/argparse.rst:697 msgid "" "The help option is typically ``-h/--help``. The exception to this is if the " "``prefix_chars=`` is specified and does not include ``-``, in which case ``-" @@ -695,94 +696,94 @@ msgid "" "in ``prefix_chars`` is used to prefix the help options::" msgstr "" -#: ../../library/argparse.rst:711 +#: ../../library/argparse.rst:712 msgid "exit_on_error" msgstr "exit_on_error" -#: ../../library/argparse.rst:713 +#: ../../library/argparse.rst:714 msgid "" "Normally, when you pass an invalid argument list to the :meth:" "`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " "exit with error info." msgstr "" -#: ../../library/argparse.rst:716 +#: ../../library/argparse.rst:717 msgid "" "If the user would like to catch errors manually, the feature can be enabled " "by setting ``exit_on_error`` to ``False``::" msgstr "" -#: ../../library/argparse.rst:733 +#: ../../library/argparse.rst:734 msgid "The add_argument() method" msgstr "" -#: ../../library/argparse.rst:739 +#: ../../library/argparse.rst:740 msgid "" "Define how a single command-line argument should be parsed. Each parameter " "has its own more detailed description below, but in short they are:" msgstr "" -#: ../../library/argparse.rst:742 +#: ../../library/argparse.rst:743 msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` " "or ``-f, --foo``." msgstr "" -#: ../../library/argparse.rst:745 +#: ../../library/argparse.rst:746 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." msgstr "" -#: ../../library/argparse.rst:748 +#: ../../library/argparse.rst:749 msgid "nargs_ - The number of command-line arguments that should be consumed." msgstr "" -#: ../../library/argparse.rst:750 +#: ../../library/argparse.rst:751 msgid "" "const_ - A constant value required by some action_ and nargs_ selections." msgstr "" -#: ../../library/argparse.rst:752 +#: ../../library/argparse.rst:753 msgid "" "default_ - The value produced if the argument is absent from the command " "line and if it is absent from the namespace object." msgstr "" -#: ../../library/argparse.rst:755 +#: ../../library/argparse.rst:756 msgid "" "type_ - The type to which the command-line argument should be converted." msgstr "" -#: ../../library/argparse.rst:757 +#: ../../library/argparse.rst:758 msgid "choices_ - A container of the allowable values for the argument." msgstr "" -#: ../../library/argparse.rst:759 +#: ../../library/argparse.rst:760 msgid "" "required_ - Whether or not the command-line option may be omitted (optionals " "only)." msgstr "" -#: ../../library/argparse.rst:762 +#: ../../library/argparse.rst:763 msgid "help_ - A brief description of what the argument does." msgstr "" -#: ../../library/argparse.rst:764 +#: ../../library/argparse.rst:765 msgid "metavar_ - A name for the argument in usage messages." msgstr "" -#: ../../library/argparse.rst:766 +#: ../../library/argparse.rst:767 msgid "" "dest_ - The name of the attribute to be added to the object returned by :" "meth:`parse_args`." msgstr "" -#: ../../library/argparse.rst:775 +#: ../../library/argparse.rst:776 msgid "name or flags" msgstr "" -#: ../../library/argparse.rst:777 +#: ../../library/argparse.rst:778 msgid "" "The :meth:`~ArgumentParser.add_argument` method must know whether an " "optional argument, like ``-f`` or ``--foo``, or a positional argument, like " @@ -791,26 +792,26 @@ msgid "" "or a simple argument name." msgstr "" -#: ../../library/argparse.rst:783 +#: ../../library/argparse.rst:784 msgid "For example, an optional argument could be created like::" msgstr "" -#: ../../library/argparse.rst:787 +#: ../../library/argparse.rst:788 msgid "while a positional argument could be created like::" msgstr "" -#: ../../library/argparse.rst:791 +#: ../../library/argparse.rst:792 msgid "" "When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " "be identified by the ``-`` prefix, and the remaining arguments will be " "assumed to be positional::" msgstr "" -#: ../../library/argparse.rst:810 +#: ../../library/argparse.rst:811 msgid "action" msgstr "" -#: ../../library/argparse.rst:812 +#: ../../library/argparse.rst:813 msgid "" ":class:`ArgumentParser` objects associate command-line arguments with " "actions. These actions can do just about anything with the command-line " @@ -820,13 +821,13 @@ msgid "" "be handled. The supplied actions are:" msgstr "" -#: ../../library/argparse.rst:818 +#: ../../library/argparse.rst:819 msgid "" "``'store'`` - This just stores the argument's value. This is the default " "action. For example::" msgstr "" -#: ../../library/argparse.rst:826 +#: ../../library/argparse.rst:827 msgid "" "``'store_const'`` - This stores the value specified by the const_ keyword " "argument; note that the const_ keyword argument defaults to ``None``. The " @@ -834,7 +835,7 @@ msgid "" "specify some sort of flag. For example::" msgstr "" -#: ../../library/argparse.rst:836 +#: ../../library/argparse.rst:837 msgid "" "``'store_true'`` and ``'store_false'`` - These are special cases of " "``'store_const'`` used for storing the values ``True`` and ``False`` " @@ -842,7 +843,7 @@ msgid "" "``True`` respectively. For example::" msgstr "" -#: ../../library/argparse.rst:848 +#: ../../library/argparse.rst:849 msgid "" "``'append'`` - This stores a list, and appends each argument value to the " "list. It is useful to allow an option to be specified multiple times. If the " @@ -851,7 +852,7 @@ msgid "" "after those default values. Example usage::" msgstr "" -#: ../../library/argparse.rst:859 +#: ../../library/argparse.rst:860 msgid "" "``'append_const'`` - This stores a list, and appends the value specified by " "the const_ keyword argument to the list; note that the const_ keyword " @@ -860,17 +861,17 @@ msgid "" "example::" msgstr "" -#: ../../library/argparse.rst:871 +#: ../../library/argparse.rst:872 msgid "" "``'count'`` - This counts the number of times a keyword argument occurs. For " "example, this is useful for increasing verbosity levels::" msgstr "" -#: ../../library/argparse.rst:879 +#: ../../library/argparse.rst:880 msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." msgstr "" -#: ../../library/argparse.rst:881 +#: ../../library/argparse.rst:882 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -878,20 +879,20 @@ msgid "" "output is created." msgstr "" -#: ../../library/argparse.rst:886 +#: ../../library/argparse.rst:887 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " "exits when invoked::" msgstr "" -#: ../../library/argparse.rst:896 +#: ../../library/argparse.rst:897 msgid "" "``'extend'`` - This stores a list, and extends each argument value to the " "list. Example usage::" msgstr "" -#: ../../library/argparse.rst:907 +#: ../../library/argparse.rst:908 msgid "" "You may also specify an arbitrary action by passing an Action subclass or " "other object that implements the same interface. The " @@ -899,26 +900,26 @@ msgid "" "boolean actions such as ``--foo`` and ``--no-foo``::" msgstr "" -#: ../../library/argparse.rst:920 +#: ../../library/argparse.rst:921 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the ``__call__`` method and optionally the ``__init__`` and " "``format_usage`` methods." msgstr "" -#: ../../library/argparse.rst:924 +#: ../../library/argparse.rst:925 msgid "An example of a custom action::" msgstr "" -#: ../../library/argparse.rst:944 +#: ../../library/argparse.rst:945 msgid "For more details, see :class:`Action`." msgstr "" -#: ../../library/argparse.rst:950 +#: ../../library/argparse.rst:951 msgid "nargs" msgstr "" -#: ../../library/argparse.rst:952 +#: ../../library/argparse.rst:953 msgid "" "ArgumentParser objects usually associate a single command-line argument with " "a single action to be taken. The ``nargs`` keyword argument associates a " @@ -926,19 +927,19 @@ msgid "" "supported values are:" msgstr "" -#: ../../library/argparse.rst:957 +#: ../../library/argparse.rst:958 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: ../../library/argparse.rst:966 +#: ../../library/argparse.rst:967 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." msgstr "" -#: ../../library/argparse.rst:971 +#: ../../library/argparse.rst:972 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -948,13 +949,13 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: ../../library/argparse.rst:988 +#: ../../library/argparse.rst:989 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: ../../library/argparse.rst:1005 +#: ../../library/argparse.rst:1006 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -962,14 +963,14 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: ../../library/argparse.rst:1019 +#: ../../library/argparse.rst:1020 msgid "" "``'+'``. Just like ``'*'``, all command-line args present are gathered into " "a list. Additionally, an error message will be generated if there wasn't at " "least one command-line argument present. For example::" msgstr "" -#: ../../library/argparse.rst:1031 +#: ../../library/argparse.rst:1032 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -977,11 +978,11 @@ msgid "" "be produced." msgstr "" -#: ../../library/argparse.rst:1039 +#: ../../library/argparse.rst:1040 msgid "const" msgstr "" -#: ../../library/argparse.rst:1041 +#: ../../library/argparse.rst:1042 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -989,7 +990,7 @@ msgid "" "common uses of it are:" msgstr "" -#: ../../library/argparse.rst:1045 +#: ../../library/argparse.rst:1046 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='https://github.com/store_const'`` or ``action='https://github.com/append_const'``. These actions add " @@ -999,7 +1000,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: ../../library/argparse.rst:1053 +#: ../../library/argparse.rst:1054 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1009,17 +1010,17 @@ msgid "" "to be ``None`` instead. See the nargs_ description for examples." msgstr "" -#: ../../library/argparse.rst:1060 +#: ../../library/argparse.rst:1061 msgid "" "``const=None`` by default, including when ``action='https://github.com/append_const'`` or " "``action='https://github.com/store_const'``." msgstr "" -#: ../../library/argparse.rst:1067 +#: ../../library/argparse.rst:1068 msgid "default" msgstr "" -#: ../../library/argparse.rst:1069 +#: ../../library/argparse.rst:1070 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1029,13 +1030,13 @@ msgid "" "command line::" msgstr "" -#: ../../library/argparse.rst:1083 +#: ../../library/argparse.rst:1084 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not over write it::" msgstr "" -#: ../../library/argparse.rst:1091 +#: ../../library/argparse.rst:1092 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1043,23 +1044,23 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: ../../library/argparse.rst:1102 +#: ../../library/argparse.rst:1103 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" msgstr "" -#: ../../library/argparse.rst:1113 +#: ../../library/argparse.rst:1114 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" msgstr "" -#: ../../library/argparse.rst:1127 +#: ../../library/argparse.rst:1128 msgid "type" msgstr "" -#: ../../library/argparse.rst:1129 +#: ../../library/argparse.rst:1130 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1068,13 +1069,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: ../../library/argparse.rst:1135 +#: ../../library/argparse.rst:1136 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." msgstr "" -#: ../../library/argparse.rst:1138 +#: ../../library/argparse.rst:1139 msgid "" "The argument to ``type`` can be any callable that accepts a single string. " "If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" @@ -1082,22 +1083,22 @@ msgid "" "is displayed. No other exception types are handled." msgstr "" -#: ../../library/argparse.rst:1143 +#: ../../library/argparse.rst:1144 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: ../../library/argparse.rst:1159 +#: ../../library/argparse.rst:1160 msgid "User defined functions can be used as well:" msgstr "" -#: ../../library/argparse.rst:1171 +#: ../../library/argparse.rst:1172 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " "``True``. This is usually not what is desired." msgstr "" -#: ../../library/argparse.rst:1175 +#: ../../library/argparse.rst:1176 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1105,7 +1106,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: ../../library/argparse.rst:1180 +#: ../../library/argparse.rst:1181 msgid "" "For example, JSON or YAML conversions have complex error cases that require " "better reporting than can be given by the ``type`` keyword. A :exc:`~json." @@ -1113,7 +1114,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: ../../library/argparse.rst:1185 +#: ../../library/argparse.rst:1186 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses *FileType* and then a subsequent " @@ -1122,17 +1123,17 @@ msgid "" "run and then use the :keyword:`with`-statement to manage the files." msgstr "" -#: ../../library/argparse.rst:1191 +#: ../../library/argparse.rst:1192 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: ../../library/argparse.rst:1198 +#: ../../library/argparse.rst:1199 msgid "choices" msgstr "" -#: ../../library/argparse.rst:1200 +#: ../../library/argparse.rst:1201 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a container object as the *choices* " @@ -1141,26 +1142,26 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: ../../library/argparse.rst:1215 +#: ../../library/argparse.rst:1216 msgid "" "Note that inclusion in the *choices* container is checked after any type_ " "conversions have been performed, so the type of the objects in the *choices* " "container should match the type_ specified::" msgstr "" -#: ../../library/argparse.rst:1227 +#: ../../library/argparse.rst:1228 msgid "" "Any container can be passed as the *choices* value, so :class:`list` " "objects, :class:`set` objects, and custom containers are all supported." msgstr "" -#: ../../library/argparse.rst:1230 +#: ../../library/argparse.rst:1231 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." msgstr "" -#: ../../library/argparse.rst:1233 +#: ../../library/argparse.rst:1234 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1168,11 +1169,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: ../../library/argparse.rst:1242 +#: ../../library/argparse.rst:1243 msgid "required" msgstr "" -#: ../../library/argparse.rst:1244 +#: ../../library/argparse.rst:1245 msgid "" "In general, the :mod:`argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1180,24 +1181,24 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../library/argparse.rst:1257 +#: ../../library/argparse.rst:1258 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " "present at the command line." msgstr "" -#: ../../library/argparse.rst:1263 +#: ../../library/argparse.rst:1264 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." msgstr "" -#: ../../library/argparse.rst:1270 +#: ../../library/argparse.rst:1271 msgid "help" msgstr "" -#: ../../library/argparse.rst:1272 +#: ../../library/argparse.rst:1273 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1205,7 +1206,7 @@ msgid "" "each argument::" msgstr "" -#: ../../library/argparse.rst:1292 +#: ../../library/argparse.rst:1293 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1214,23 +1215,23 @@ msgid "" "%(type)s``, etc.::" msgstr "" -#: ../../library/argparse.rst:1309 +#: ../../library/argparse.rst:1310 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." msgstr "" -#: ../../library/argparse.rst:1312 +#: ../../library/argparse.rst:1313 msgid "" ":mod:`argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../library/argparse.rst:1327 +#: ../../library/argparse.rst:1328 msgid "metavar" msgstr "" -#: ../../library/argparse.rst:1329 +#: ../../library/argparse.rst:1330 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, ArgumentParser objects use the " @@ -1242,29 +1243,29 @@ msgid "" "argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../library/argparse.rst:1353 +#: ../../library/argparse.rst:1354 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: ../../library/argparse.rst:1370 +#: ../../library/argparse.rst:1371 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " "determined by the dest_ value." msgstr "" -#: ../../library/argparse.rst:1374 +#: ../../library/argparse.rst:1375 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " "each of the arguments::" msgstr "" -#: ../../library/argparse.rst:1393 +#: ../../library/argparse.rst:1394 msgid "dest" msgstr "" -#: ../../library/argparse.rst:1395 +#: ../../library/argparse.rst:1396 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1274,7 +1275,7 @@ msgid "" "add_argument`::" msgstr "" -#: ../../library/argparse.rst:1407 +#: ../../library/argparse.rst:1408 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1286,22 +1287,22 @@ msgid "" "below illustrate this behavior::" msgstr "" -#: ../../library/argparse.rst:1424 +#: ../../library/argparse.rst:1425 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: ../../library/argparse.rst:1432 +#: ../../library/argparse.rst:1433 msgid "Action classes" msgstr "" -#: ../../library/argparse.rst:1434 +#: ../../library/argparse.rst:1435 msgid "" "Action classes implement the Action API, a callable which returns a callable " "which processes arguments from the command-line. Any object which follows " "this API may be passed as the ``action`` parameter to :meth:`add_argument`." msgstr "" -#: ../../library/argparse.rst:1443 +#: ../../library/argparse.rst:1444 msgid "" "Action objects are used by an ArgumentParser to represent the information " "needed to parse a single argument from one or more strings from the command " @@ -1310,7 +1311,7 @@ msgid "" "the ``action`` itself." msgstr "" -#: ../../library/argparse.rst:1449 +#: ../../library/argparse.rst:1450 msgid "" "Instances of Action (or return value of any callable to the ``action`` " "parameter) should have attributes \"dest\", \"option_strings\", \"default\", " @@ -1318,114 +1319,114 @@ msgid "" "these attributes are defined is to call ``Action.__init__``." msgstr "" -#: ../../library/argparse.rst:1454 +#: ../../library/argparse.rst:1455 msgid "" "Action instances should be callable, so subclasses must override the " "``__call__`` method, which should accept four parameters:" msgstr "" -#: ../../library/argparse.rst:1457 +#: ../../library/argparse.rst:1458 msgid "``parser`` - The ArgumentParser object which contains this action." msgstr "" -#: ../../library/argparse.rst:1459 +#: ../../library/argparse.rst:1460 msgid "" "``namespace`` - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " "using :func:`setattr`." msgstr "" -#: ../../library/argparse.rst:1463 +#: ../../library/argparse.rst:1464 msgid "" "``values`` - The associated command-line arguments, with any type " "conversions applied. Type conversions are specified with the type_ keyword " "argument to :meth:`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1467 +#: ../../library/argparse.rst:1468 msgid "" "``option_string`` - The option string that was used to invoke this action. " "The ``option_string`` argument is optional, and will be absent if the action " "is associated with a positional argument." msgstr "" -#: ../../library/argparse.rst:1471 +#: ../../library/argparse.rst:1472 msgid "" "The ``__call__`` method may perform arbitrary actions, but will typically " "set attributes on the ``namespace`` based on ``dest`` and ``values``." msgstr "" -#: ../../library/argparse.rst:1474 +#: ../../library/argparse.rst:1475 msgid "" "Action subclasses can define a ``format_usage`` method that takes no " "argument and return a string which will be used when printing the usage of " "the program. If such method is not provided, a sensible default will be used." msgstr "" -#: ../../library/argparse.rst:1479 +#: ../../library/argparse.rst:1480 msgid "The parse_args() method" msgstr "" -#: ../../library/argparse.rst:1483 +#: ../../library/argparse.rst:1484 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: ../../library/argparse.rst:1486 +#: ../../library/argparse.rst:1487 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:" "`add_argument` for details." msgstr "" -#: ../../library/argparse.rst:1490 +#: ../../library/argparse.rst:1491 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: ../../library/argparse.rst:1493 +#: ../../library/argparse.rst:1494 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: ../../library/argparse.rst:1498 +#: ../../library/argparse.rst:1499 msgid "Option value syntax" msgstr "" -#: ../../library/argparse.rst:1500 +#: ../../library/argparse.rst:1501 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " "the option and its value are passed as two separate arguments::" msgstr "" -#: ../../library/argparse.rst:1512 +#: ../../library/argparse.rst:1513 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " "``=`` to separate them::" msgstr "" -#: ../../library/argparse.rst:1519 +#: ../../library/argparse.rst:1520 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: ../../library/argparse.rst:1525 +#: ../../library/argparse.rst:1526 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" msgstr "" -#: ../../library/argparse.rst:1537 +#: ../../library/argparse.rst:1538 msgid "Invalid arguments" msgstr "" -#: ../../library/argparse.rst:1539 +#: ../../library/argparse.rst:1540 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -1433,11 +1434,11 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: ../../library/argparse.rst:1565 +#: ../../library/argparse.rst:1566 msgid "Arguments containing ``-``" msgstr "" -#: ../../library/argparse.rst:1567 +#: ../../library/argparse.rst:1568 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1449,7 +1450,7 @@ msgid "" "negative numbers::" msgstr "" -#: ../../library/argparse.rst:1605 +#: ../../library/argparse.rst:1606 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1457,28 +1458,28 @@ msgid "" "positional argument::" msgstr "" -#: ../../library/argparse.rst:1616 +#: ../../library/argparse.rst:1617 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: ../../library/argparse.rst:1618 +#: ../../library/argparse.rst:1619 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " "abbreviation is unambiguous (the prefix matches a unique option)::" msgstr "" -#: ../../library/argparse.rst:1633 +#: ../../library/argparse.rst:1634 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." msgstr "" -#: ../../library/argparse.rst:1639 +#: ../../library/argparse.rst:1640 msgid "Beyond ``sys.argv``" msgstr "" -#: ../../library/argparse.rst:1641 +#: ../../library/argparse.rst:1642 msgid "" "Sometimes it may be useful to have an ArgumentParser parse arguments other " "than those of :data:`sys.argv`. This can be accomplished by passing a list " @@ -1486,39 +1487,39 @@ msgid "" "testing at the interactive prompt::" msgstr "" -#: ../../library/argparse.rst:1661 +#: ../../library/argparse.rst:1662 msgid "The Namespace object" msgstr "" -#: ../../library/argparse.rst:1665 +#: ../../library/argparse.rst:1666 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: ../../library/argparse.rst:1668 +#: ../../library/argparse.rst:1669 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " "attributes, you can use the standard Python idiom, :func:`vars`::" msgstr "" -#: ../../library/argparse.rst:1678 +#: ../../library/argparse.rst:1679 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " "This can be achieved by specifying the ``namespace=`` keyword argument::" msgstr "" -#: ../../library/argparse.rst:1694 +#: ../../library/argparse.rst:1695 msgid "Other utilities" msgstr "" -#: ../../library/argparse.rst:1697 +#: ../../library/argparse.rst:1698 msgid "Sub-commands" msgstr "" -#: ../../library/argparse.rst:1704 +#: ../../library/argparse.rst:1705 msgid "" "Many programs split up their functionality into a number of sub-commands, " "for example, the ``svn`` program can invoke sub-commands like ``svn " @@ -1534,72 +1535,72 @@ msgid "" "can be modified as usual." msgstr "" -#: ../../library/argparse.rst:1716 +#: ../../library/argparse.rst:1717 msgid "Description of parameters:" msgstr "" -#: ../../library/argparse.rst:1718 +#: ../../library/argparse.rst:1719 msgid "" "title - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " "positional arguments" msgstr "" -#: ../../library/argparse.rst:1722 +#: ../../library/argparse.rst:1723 msgid "" "description - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../library/argparse.rst:1725 +#: ../../library/argparse.rst:1726 msgid "" "prog - usage information that will be displayed with sub-command help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" -#: ../../library/argparse.rst:1729 +#: ../../library/argparse.rst:1730 msgid "" "parser_class - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. ArgumentParser)" msgstr "" -#: ../../library/argparse.rst:1732 +#: ../../library/argparse.rst:1733 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: ../../library/argparse.rst:1735 +#: ../../library/argparse.rst:1736 msgid "" "dest_ - name of the attribute under which sub-command name will be stored; " "by default ``None`` and no value is stored" msgstr "" -#: ../../library/argparse.rst:1738 +#: ../../library/argparse.rst:1739 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: ../../library/argparse.rst:1741 +#: ../../library/argparse.rst:1742 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: ../../library/argparse.rst:1743 +#: ../../library/argparse.rst:1744 msgid "" "metavar_ - string presenting available sub-commands in help; by default it " "is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../library/argparse.rst:1746 +#: ../../library/argparse.rst:1747 msgid "Some example usage::" msgstr "" "一些使用範例:\n" "\n" "::" -#: ../../library/argparse.rst:1767 +#: ../../library/argparse.rst:1768 msgid "" "Note that the object returned by :meth:`parse_args` will only contain " "attributes for the main parser and the subparser that was selected by the " @@ -1609,7 +1610,7 @@ msgid "" "``baz`` attributes are present." msgstr "" -#: ../../library/argparse.rst:1774 +#: ../../library/argparse.rst:1775 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -1618,21 +1619,21 @@ msgid "" "to :meth:`add_parser` as above.)" msgstr "" -#: ../../library/argparse.rst:1810 +#: ../../library/argparse.rst:1811 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " "commands will appear in their own group in the help output. For example::" msgstr "" -#: ../../library/argparse.rst:1831 +#: ../../library/argparse.rst:1832 msgid "" "Furthermore, ``add_parser`` supports an additional ``aliases`` argument, " "which allows multiple strings to refer to the same subparser. This example, " "like ``svn``, aliases ``co`` as a shorthand for ``checkout``::" msgstr "" -#: ../../library/argparse.rst:1842 +#: ../../library/argparse.rst:1843 msgid "" "One particularly effective way of handling sub-commands is to combine the " "use of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` " @@ -1640,7 +1641,7 @@ msgid "" "example::" msgstr "" -#: ../../library/argparse.rst:1879 +#: ../../library/argparse.rst:1880 msgid "" "This way, you can let :meth:`parse_args` do the job of calling the " "appropriate function after argument parsing is complete. Associating " @@ -1650,15 +1651,15 @@ msgid "" "argument to the :meth:`add_subparsers` call will work::" msgstr "" -#: ../../library/argparse.rst:1895 +#: ../../library/argparse.rst:1896 msgid "New *required* keyword argument." msgstr "" -#: ../../library/argparse.rst:1900 +#: ../../library/argparse.rst:1901 msgid "FileType objects" msgstr "FileType 物件" -#: ../../library/argparse.rst:1904 +#: ../../library/argparse.rst:1905 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -1667,22 +1668,22 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: ../../library/argparse.rst:1916 +#: ../../library/argparse.rst:1917 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " -"convert this into ``sys.stdin`` for readable :class:`FileType` objects and " -"``sys.stdout`` for writable :class:`FileType` objects::" +"convert this into :data:`sys.stdin` for readable :class:`FileType` objects " +"and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" -#: ../../library/argparse.rst:1925 +#: ../../library/argparse.rst:1926 msgid "The *encodings* and *errors* keyword arguments." msgstr "" -#: ../../library/argparse.rst:1930 +#: ../../library/argparse.rst:1931 msgid "Argument groups" msgstr "" -#: ../../library/argparse.rst:1934 +#: ../../library/argparse.rst:1935 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"optional arguments\" when displaying help " @@ -1691,7 +1692,7 @@ msgid "" "`add_argument_group` method::" msgstr "" -#: ../../library/argparse.rst:1951 +#: ../../library/argparse.rst:1952 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -1702,13 +1703,13 @@ msgid "" "this display::" msgstr "" -#: ../../library/argparse.rst:1977 +#: ../../library/argparse.rst:1978 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." msgstr "" -#: ../../library/argparse.rst:1980 +#: ../../library/argparse.rst:1981 msgid "" "Calling :meth:`add_argument_group` on an argument group is deprecated. This " "feature was never supported and does not always work correctly. The function " @@ -1716,32 +1717,32 @@ msgid "" "future." msgstr "" -#: ../../library/argparse.rst:1988 +#: ../../library/argparse.rst:1989 msgid "Mutual exclusion" msgstr "" -#: ../../library/argparse.rst:1992 +#: ../../library/argparse.rst:1993 msgid "" "Create a mutually exclusive group. :mod:`argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " "command line::" msgstr "" -#: ../../library/argparse.rst:2008 +#: ../../library/argparse.rst:2009 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " "is required::" msgstr "" -#: ../../library/argparse.rst:2020 +#: ../../library/argparse.rst:2021 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." "add_argument_group`." msgstr "" -#: ../../library/argparse.rst:2024 +#: ../../library/argparse.rst:2025 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group is deprecated. These features were never " @@ -1749,11 +1750,11 @@ msgid "" "by accident through inheritance and will be removed in the future." msgstr "" -#: ../../library/argparse.rst:2032 +#: ../../library/argparse.rst:2033 msgid "Parser defaults" msgstr "" -#: ../../library/argparse.rst:2036 +#: ../../library/argparse.rst:2037 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -1762,72 +1763,72 @@ msgid "" "command line to be added::" msgstr "" -#: ../../library/argparse.rst:2048 +#: ../../library/argparse.rst:2049 msgid "" "Note that parser-level defaults always override argument-level defaults::" msgstr "" -#: ../../library/argparse.rst:2056 +#: ../../library/argparse.rst:2057 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " "example of this type." msgstr "" -#: ../../library/argparse.rst:2062 +#: ../../library/argparse.rst:2063 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" msgstr "" -#: ../../library/argparse.rst:2073 +#: ../../library/argparse.rst:2074 msgid "Printing help" msgstr "" -#: ../../library/argparse.rst:2075 +#: ../../library/argparse.rst:2076 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " "several formatting methods are available:" msgstr "" -#: ../../library/argparse.rst:2081 +#: ../../library/argparse.rst:2082 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " "assumed." msgstr "" -#: ../../library/argparse.rst:2087 +#: ../../library/argparse.rst:2088 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " "``None``, :data:`sys.stdout` is assumed." msgstr "" -#: ../../library/argparse.rst:2091 +#: ../../library/argparse.rst:2092 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: ../../library/argparse.rst:2096 +#: ../../library/argparse.rst:2097 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: ../../library/argparse.rst:2101 +#: ../../library/argparse.rst:2102 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." msgstr "" -#: ../../library/argparse.rst:2106 +#: ../../library/argparse.rst:2107 msgid "Partial parsing" msgstr "" -#: ../../library/argparse.rst:2110 +#: ../../library/argparse.rst:2111 msgid "" "Sometimes a script may only parse a few of the command-line arguments, " "passing the remaining arguments on to another script or program. In these " @@ -1838,7 +1839,7 @@ msgid "" "remaining argument strings." msgstr "" -#: ../../library/argparse.rst:2126 +#: ../../library/argparse.rst:2127 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`parse_known_args`. The parser may consume an option even if it's just a " @@ -1846,11 +1847,11 @@ msgid "" "arguments list." msgstr "" -#: ../../library/argparse.rst:2133 +#: ../../library/argparse.rst:2134 msgid "Customizing file parsing" msgstr "" -#: ../../library/argparse.rst:2137 +#: ../../library/argparse.rst:2138 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -1858,41 +1859,41 @@ msgid "" "reading." msgstr "" -#: ../../library/argparse.rst:2142 +#: ../../library/argparse.rst:2143 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " "The method is called once per line read from the argument file, in order." msgstr "" -#: ../../library/argparse.rst:2146 +#: ../../library/argparse.rst:2147 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" msgstr "" -#: ../../library/argparse.rst:2155 +#: ../../library/argparse.rst:2156 msgid "Exiting methods" msgstr "" -#: ../../library/argparse.rst:2159 +#: ../../library/argparse.rst:2160 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* before that. The user can override this " "method to handle these steps differently::" msgstr "" -#: ../../library/argparse.rst:2171 +#: ../../library/argparse.rst:2172 msgid "" "This method prints a usage message including the *message* to the standard " "error and terminates the program with a status code of 2." msgstr "" -#: ../../library/argparse.rst:2176 +#: ../../library/argparse.rst:2177 msgid "Intermixed parsing" msgstr "" -#: ../../library/argparse.rst:2181 +#: ../../library/argparse.rst:2182 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -1900,7 +1901,7 @@ msgid "" "parsing style." msgstr "" -#: ../../library/argparse.rst:2186 +#: ../../library/argparse.rst:2187 msgid "" "These parsers do not support all the argparse features, and will raise " "exceptions if unsupported features are used. In particular, subparsers, " @@ -1908,7 +1909,7 @@ msgid "" "optionals and positionals are not supported." msgstr "" -#: ../../library/argparse.rst:2191 +#: ../../library/argparse.rst:2192 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -1916,7 +1917,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: ../../library/argparse.rst:2206 +#: ../../library/argparse.rst:2207 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -1924,11 +1925,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: ../../library/argparse.rst:2216 +#: ../../library/argparse.rst:2217 msgid "Upgrading optparse code" msgstr "" -#: ../../library/argparse.rst:2218 +#: ../../library/argparse.rst:2219 msgid "" "Originally, the :mod:`argparse` module had attempted to maintain " "compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " @@ -1939,47 +1940,47 @@ msgid "" "compatibility." msgstr "" -#: ../../library/argparse.rst:2225 +#: ../../library/argparse.rst:2226 msgid "" "The :mod:`argparse` module improves on the standard library :mod:`optparse` " "module in a number of ways including:" msgstr "" -#: ../../library/argparse.rst:2228 +#: ../../library/argparse.rst:2229 msgid "Handling positional arguments." msgstr "" -#: ../../library/argparse.rst:2229 +#: ../../library/argparse.rst:2230 msgid "Supporting sub-commands." msgstr "" -#: ../../library/argparse.rst:2230 +#: ../../library/argparse.rst:2231 msgid "Allowing alternative option prefixes like ``+`` and ``/``." msgstr "" -#: ../../library/argparse.rst:2231 +#: ../../library/argparse.rst:2232 msgid "Handling zero-or-more and one-or-more style arguments." msgstr "" -#: ../../library/argparse.rst:2232 +#: ../../library/argparse.rst:2233 msgid "Producing more informative usage messages." msgstr "" -#: ../../library/argparse.rst:2233 +#: ../../library/argparse.rst:2234 msgid "Providing a much simpler interface for custom ``type`` and ``action``." msgstr "" -#: ../../library/argparse.rst:2235 +#: ../../library/argparse.rst:2236 msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" msgstr "" -#: ../../library/argparse.rst:2237 +#: ../../library/argparse.rst:2238 msgid "" "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" "`ArgumentParser.add_argument` calls." msgstr "" -#: ../../library/argparse.rst:2240 +#: ../../library/argparse.rst:2241 msgid "" "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " @@ -1987,39 +1988,39 @@ msgid "" "``options``, now in the :mod:`argparse` context is called ``args``." msgstr "" -#: ../../library/argparse.rst:2245 +#: ../../library/argparse.rst:2246 msgid "" "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" "`~ArgumentParser.parse_args`." msgstr "" -#: ../../library/argparse.rst:2249 +#: ../../library/argparse.rst:2250 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." msgstr "" -#: ../../library/argparse.rst:2252 +#: ../../library/argparse.rst:2253 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." msgstr "" -#: ../../library/argparse.rst:2255 +#: ../../library/argparse.rst:2256 msgid "" "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." "OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." msgstr "" -#: ../../library/argparse.rst:2259 +#: ../../library/argparse.rst:2260 msgid "" "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " "with the standard Python syntax to use dictionaries to format strings, that " "is, ``%(default)s`` and ``%(prog)s``." msgstr "" -#: ../../library/argparse.rst:2263 +#: ../../library/argparse.rst:2264 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='https://github.com/version', version='\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -253,7 +253,7 @@ msgstr "" "meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其" "他情況時, 一個 iterable initializer 將被傳入 :meth:`extend` 方法之中。" -#: ../../library/array.rst:80 +#: ../../library/array.rst:11 msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 4a100fa9b4..a6494f098c 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-01-27 21:25+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -142,7 +142,7 @@ msgid ":func:`timeout`" msgstr ":func:`timeout`" #: ../../library/asyncio-api-index.rst:60 -msgid "Run with a timeout. Useful in cases when `wait_for` is not suitable." +msgid "Run with a timeout. Useful in cases when ``wait_for`` is not suitable." msgstr "" #: ../../library/asyncio-api-index.rst:62 diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 3da5edb11a..6f5cab92d4 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -252,7 +252,7 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:173 #: ../../library/asyncio-eventloop.rst:1196 -#: ../../library/asyncio-eventloop.rst:1578 +#: ../../library/asyncio-eventloop.rst:1584 msgid "Example::" msgstr "" "範例:\n" @@ -1468,17 +1468,25 @@ msgid "" "instance. The default executor is used if *executor* is ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1237 +#: ../../library/asyncio-eventloop.rst:1238 +msgid "" +"Note that the entry point guard (``if __name__ == '__main__'``) is required " +"for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " +"used by :class:`~concurrent.futures.ProcessPoolExecutor`. See :ref:`Safe " +"importing of main module `." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1243 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1239 +#: ../../library/asyncio-eventloop.rst:1245 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1242 +#: ../../library/asyncio-eventloop.rst:1248 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1486,32 +1494,32 @@ msgid "" "default." msgstr "" -#: ../../library/asyncio-eventloop.rst:1251 +#: ../../library/asyncio-eventloop.rst:1257 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1255 +#: ../../library/asyncio-eventloop.rst:1261 msgid "" "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1261 +#: ../../library/asyncio-eventloop.rst:1267 msgid "Error Handling API" msgstr "" -#: ../../library/asyncio-eventloop.rst:1263 +#: ../../library/asyncio-eventloop.rst:1269 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1267 +#: ../../library/asyncio-eventloop.rst:1273 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1269 +#: ../../library/asyncio-eventloop.rst:1275 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1520,158 +1528,158 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1279 +#: ../../library/asyncio-eventloop.rst:1285 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: ../../library/asyncio-eventloop.rst:1286 +#: ../../library/asyncio-eventloop.rst:1292 msgid "Default exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1288 +#: ../../library/asyncio-eventloop.rst:1294 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: ../../library/asyncio-eventloop.rst:1292 +#: ../../library/asyncio-eventloop.rst:1298 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1297 +#: ../../library/asyncio-eventloop.rst:1303 msgid "Call the current event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1299 +#: ../../library/asyncio-eventloop.rst:1305 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: ../../library/asyncio-eventloop.rst:1302 +#: ../../library/asyncio-eventloop.rst:1308 msgid "'message': Error message;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1303 +#: ../../library/asyncio-eventloop.rst:1309 msgid "'exception' (optional): Exception object;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1304 +#: ../../library/asyncio-eventloop.rst:1310 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1305 +#: ../../library/asyncio-eventloop.rst:1311 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1306 +#: ../../library/asyncio-eventloop.rst:1312 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1307 +#: ../../library/asyncio-eventloop.rst:1313 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1308 +#: ../../library/asyncio-eventloop.rst:1314 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1309 +#: ../../library/asyncio-eventloop.rst:1315 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1311 +#: ../../library/asyncio-eventloop.rst:1317 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: ../../library/asyncio-eventloop.rst:1311 +#: ../../library/asyncio-eventloop.rst:1317 msgid "the exception." msgstr "" -#: ../../library/asyncio-eventloop.rst:1315 +#: ../../library/asyncio-eventloop.rst:1321 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler()` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1320 +#: ../../library/asyncio-eventloop.rst:1326 msgid "Enabling debug mode" msgstr "" -#: ../../library/asyncio-eventloop.rst:1324 +#: ../../library/asyncio-eventloop.rst:1330 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1326 +#: ../../library/asyncio-eventloop.rst:1332 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-eventloop.rst:1332 +#: ../../library/asyncio-eventloop.rst:1338 msgid "Set the debug mode of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1336 +#: ../../library/asyncio-eventloop.rst:1342 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1341 +#: ../../library/asyncio-eventloop.rst:1347 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1345 +#: ../../library/asyncio-eventloop.rst:1351 msgid "Running Subprocesses" msgstr "" -#: ../../library/asyncio-eventloop.rst:1347 +#: ../../library/asyncio-eventloop.rst:1353 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: ../../library/asyncio-eventloop.rst:1354 +#: ../../library/asyncio-eventloop.rst:1360 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: ../../library/asyncio-eventloop.rst:1363 +#: ../../library/asyncio-eventloop.rst:1369 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1366 +#: ../../library/asyncio-eventloop.rst:1372 msgid "*args* must be a list of strings represented by:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1368 +#: ../../library/asyncio-eventloop.rst:1374 msgid ":class:`str`;" msgstr ":class:`str`\\ ;" -#: ../../library/asyncio-eventloop.rst:1369 +#: ../../library/asyncio-eventloop.rst:1375 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1372 +#: ../../library/asyncio-eventloop.rst:1378 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: ../../library/asyncio-eventloop.rst:1376 +#: ../../library/asyncio-eventloop.rst:1382 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1679,136 +1687,136 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1382 +#: ../../library/asyncio-eventloop.rst:1388 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1385 +#: ../../library/asyncio-eventloop.rst:1391 msgid "Other parameters:" msgstr "其他參數:" -#: ../../library/asyncio-eventloop.rst:1387 +#: ../../library/asyncio-eventloop.rst:1393 msgid "*stdin* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1389 +#: ../../library/asyncio-eventloop.rst:1395 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard input stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1392 -#: ../../library/asyncio-eventloop.rst:1404 -#: ../../library/asyncio-eventloop.rst:1416 +#: ../../library/asyncio-eventloop.rst:1398 +#: ../../library/asyncio-eventloop.rst:1410 +#: ../../library/asyncio-eventloop.rst:1422 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: ../../library/asyncio-eventloop.rst:1394 -#: ../../library/asyncio-eventloop.rst:1406 -#: ../../library/asyncio-eventloop.rst:1418 +#: ../../library/asyncio-eventloop.rst:1400 +#: ../../library/asyncio-eventloop.rst:1412 +#: ../../library/asyncio-eventloop.rst:1424 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: ../../library/asyncio-eventloop.rst:1396 -#: ../../library/asyncio-eventloop.rst:1408 -#: ../../library/asyncio-eventloop.rst:1420 +#: ../../library/asyncio-eventloop.rst:1402 +#: ../../library/asyncio-eventloop.rst:1414 +#: ../../library/asyncio-eventloop.rst:1426 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: ../../library/asyncio-eventloop.rst:1399 +#: ../../library/asyncio-eventloop.rst:1405 msgid "*stdout* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1401 +#: ../../library/asyncio-eventloop.rst:1407 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard output stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1411 +#: ../../library/asyncio-eventloop.rst:1417 msgid "*stderr* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1413 +#: ../../library/asyncio-eventloop.rst:1419 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard error stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1422 +#: ../../library/asyncio-eventloop.rst:1428 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: ../../library/asyncio-eventloop.rst:1425 +#: ../../library/asyncio-eventloop.rst:1431 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: ../../library/asyncio-eventloop.rst:1430 +#: ../../library/asyncio-eventloop.rst:1436 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: ../../library/asyncio-eventloop.rst:1434 +#: ../../library/asyncio-eventloop.rst:1440 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1437 +#: ../../library/asyncio-eventloop.rst:1443 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1445 +#: ../../library/asyncio-eventloop.rst:1451 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: ../../library/asyncio-eventloop.rst:1450 +#: ../../library/asyncio-eventloop.rst:1456 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1453 +#: ../../library/asyncio-eventloop.rst:1459 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1456 +#: ../../library/asyncio-eventloop.rst:1462 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1459 +#: ../../library/asyncio-eventloop.rst:1465 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1464 +#: ../../library/asyncio-eventloop.rst:1470 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -1818,105 +1826,105 @@ msgid "" "used to construct shell commands." msgstr "" -#: ../../library/asyncio-eventloop.rst:1473 +#: ../../library/asyncio-eventloop.rst:1479 msgid "Callback Handles" msgstr "" -#: ../../library/asyncio-eventloop.rst:1477 +#: ../../library/asyncio-eventloop.rst:1483 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1482 +#: ../../library/asyncio-eventloop.rst:1488 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: ../../library/asyncio-eventloop.rst:1487 +#: ../../library/asyncio-eventloop.rst:1493 msgid "Return ``True`` if the callback was cancelled." msgstr "" -#: ../../library/asyncio-eventloop.rst:1493 +#: ../../library/asyncio-eventloop.rst:1499 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1496 +#: ../../library/asyncio-eventloop.rst:1502 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1500 +#: ../../library/asyncio-eventloop.rst:1506 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: ../../library/asyncio-eventloop.rst:1502 +#: ../../library/asyncio-eventloop.rst:1508 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1509 +#: ../../library/asyncio-eventloop.rst:1515 msgid "Server Objects" msgstr "" -#: ../../library/asyncio-eventloop.rst:1511 +#: ../../library/asyncio-eventloop.rst:1517 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: ../../library/asyncio-eventloop.rst:1515 +#: ../../library/asyncio-eventloop.rst:1521 msgid "Do not instantiate the class directly." msgstr "" -#: ../../library/asyncio-eventloop.rst:1519 +#: ../../library/asyncio-eventloop.rst:1525 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1532 +#: ../../library/asyncio-eventloop.rst:1538 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: ../../library/asyncio-eventloop.rst:1537 +#: ../../library/asyncio-eventloop.rst:1543 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1540 +#: ../../library/asyncio-eventloop.rst:1546 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: ../../library/asyncio-eventloop.rst:1543 +#: ../../library/asyncio-eventloop.rst:1549 msgid "" "The server is closed asynchronously, use the :meth:`wait_closed` coroutine " "to wait until the server is closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1548 +#: ../../library/asyncio-eventloop.rst:1554 msgid "Return the event loop associated with the server object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1554 +#: ../../library/asyncio-eventloop.rst:1560 msgid "Start accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1556 +#: ../../library/asyncio-eventloop.rst:1562 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: ../../library/asyncio-eventloop.rst:1559 +#: ../../library/asyncio-eventloop.rst:1565 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -1925,96 +1933,96 @@ msgid "" "accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1570 +#: ../../library/asyncio-eventloop.rst:1576 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1574 +#: ../../library/asyncio-eventloop.rst:1580 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1596 +#: ../../library/asyncio-eventloop.rst:1602 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1602 +#: ../../library/asyncio-eventloop.rst:1608 msgid "Wait until the :meth:`close` method completes." msgstr "" -#: ../../library/asyncio-eventloop.rst:1606 +#: ../../library/asyncio-eventloop.rst:1612 msgid "List of :class:`socket.socket` objects the server is listening on." msgstr "" -#: ../../library/asyncio-eventloop.rst:1608 +#: ../../library/asyncio-eventloop.rst:1614 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: ../../library/asyncio-eventloop.rst:1618 +#: ../../library/asyncio-eventloop.rst:1624 msgid "Event Loop Implementations" msgstr "" -#: ../../library/asyncio-eventloop.rst:1620 +#: ../../library/asyncio-eventloop.rst:1626 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1623 +#: ../../library/asyncio-eventloop.rst:1629 msgid "" "By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " "and :class:`ProactorEventLoop` on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1629 +#: ../../library/asyncio-eventloop.rst:1635 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1631 +#: ../../library/asyncio-eventloop.rst:1637 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1646 +#: ../../library/asyncio-eventloop.rst:1652 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/asyncio-eventloop.rst:1651 +#: ../../library/asyncio-eventloop.rst:1657 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1654 +#: ../../library/asyncio-eventloop.rst:1660 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/asyncio-eventloop.rst:1657 +#: ../../library/asyncio-eventloop.rst:1663 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../library/asyncio-eventloop.rst:1663 +#: ../../library/asyncio-eventloop.rst:1669 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: ../../library/asyncio-eventloop.rst:1665 +#: ../../library/asyncio-eventloop.rst:1671 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: ../../library/asyncio-eventloop.rst:1671 +#: ../../library/asyncio-eventloop.rst:1677 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-eventloop.rst:1673 +#: ../../library/asyncio-eventloop.rst:1679 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -2022,70 +2030,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1683 +#: ../../library/asyncio-eventloop.rst:1689 msgid "Hello World with call_soon()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1685 +#: ../../library/asyncio-eventloop.rst:1691 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1709 +#: ../../library/asyncio-eventloop.rst:1715 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1716 +#: ../../library/asyncio-eventloop.rst:1722 msgid "Display the current date with call_later()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1718 +#: ../../library/asyncio-eventloop.rst:1724 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1746 +#: ../../library/asyncio-eventloop.rst:1752 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1753 +#: ../../library/asyncio-eventloop.rst:1759 msgid "Watch a file descriptor for read events" msgstr "" -#: ../../library/asyncio-eventloop.rst:1755 +#: ../../library/asyncio-eventloop.rst:1761 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1793 +#: ../../library/asyncio-eventloop.rst:1799 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1797 +#: ../../library/asyncio-eventloop.rst:1803 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: ../../library/asyncio-eventloop.rst:1805 +#: ../../library/asyncio-eventloop.rst:1811 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: ../../library/asyncio-eventloop.rst:1807 +#: ../../library/asyncio-eventloop.rst:1813 msgid "(This ``signals`` example only works on Unix.)" msgstr "" -#: ../../library/asyncio-eventloop.rst:1809 +#: ../../library/asyncio-eventloop.rst:1815 msgid "" "Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " "the :meth:`loop.add_signal_handler` method::" diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 036fb7273b..8beea6fac6 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -231,161 +231,161 @@ msgid "" "flushed asynchronously. No more data will be received. After all buffered " "data is flushed, the protocol's :meth:`protocol.connection_lost() " "` method will be called with :const:`None` as " -"its argument." +"its argument. The transport should not be used once it is closed." msgstr "" -#: ../../library/asyncio-protocol.rst:163 +#: ../../library/asyncio-protocol.rst:164 msgid "Return ``True`` if the transport is closing or is closed." msgstr "" -#: ../../library/asyncio-protocol.rst:167 +#: ../../library/asyncio-protocol.rst:168 msgid "Return information about the transport or underlying resources it uses." msgstr "" -#: ../../library/asyncio-protocol.rst:170 +#: ../../library/asyncio-protocol.rst:171 msgid "" "*name* is a string representing the piece of transport-specific information " "to get." msgstr "" -#: ../../library/asyncio-protocol.rst:173 +#: ../../library/asyncio-protocol.rst:174 msgid "" "*default* is the value to return if the information is not available, or if " "the transport does not support querying it with the given third-party event " "loop implementation or on the current platform." msgstr "" -#: ../../library/asyncio-protocol.rst:178 +#: ../../library/asyncio-protocol.rst:179 msgid "" "For example, the following code attempts to get the underlying socket object " "of the transport::" msgstr "" -#: ../../library/asyncio-protocol.rst:185 +#: ../../library/asyncio-protocol.rst:186 msgid "Categories of information that can be queried on some transports:" msgstr "" -#: ../../library/asyncio-protocol.rst:187 +#: ../../library/asyncio-protocol.rst:188 msgid "socket:" msgstr "" -#: ../../library/asyncio-protocol.rst:189 +#: ../../library/asyncio-protocol.rst:190 msgid "" "``'peername'``: the remote address to which the socket is connected, result " "of :meth:`socket.socket.getpeername` (``None`` on error)" msgstr "" -#: ../../library/asyncio-protocol.rst:193 +#: ../../library/asyncio-protocol.rst:194 msgid "``'socket'``: :class:`socket.socket` instance" msgstr "" -#: ../../library/asyncio-protocol.rst:195 +#: ../../library/asyncio-protocol.rst:196 msgid "" "``'sockname'``: the socket's own address, result of :meth:`socket.socket." "getsockname`" msgstr "" -#: ../../library/asyncio-protocol.rst:198 +#: ../../library/asyncio-protocol.rst:199 msgid "SSL socket:" msgstr "" -#: ../../library/asyncio-protocol.rst:200 +#: ../../library/asyncio-protocol.rst:201 msgid "" "``'compression'``: the compression algorithm being used as a string, or " "``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket." "compression`" msgstr "" -#: ../../library/asyncio-protocol.rst:204 +#: ../../library/asyncio-protocol.rst:205 msgid "" "``'cipher'``: a three-value tuple containing the name of the cipher being " "used, the version of the SSL protocol that defines its use, and the number " "of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`" msgstr "" -#: ../../library/asyncio-protocol.rst:209 +#: ../../library/asyncio-protocol.rst:210 msgid "" "``'peercert'``: peer certificate; result of :meth:`ssl.SSLSocket.getpeercert`" msgstr "" -#: ../../library/asyncio-protocol.rst:212 +#: ../../library/asyncio-protocol.rst:213 msgid "``'sslcontext'``: :class:`ssl.SSLContext` instance" msgstr "" -#: ../../library/asyncio-protocol.rst:214 +#: ../../library/asyncio-protocol.rst:215 msgid "" "``'ssl_object'``: :class:`ssl.SSLObject` or :class:`ssl.SSLSocket` instance" msgstr "" -#: ../../library/asyncio-protocol.rst:217 +#: ../../library/asyncio-protocol.rst:218 msgid "pipe:" msgstr "" -#: ../../library/asyncio-protocol.rst:219 +#: ../../library/asyncio-protocol.rst:220 msgid "``'pipe'``: pipe object" msgstr "" -#: ../../library/asyncio-protocol.rst:221 +#: ../../library/asyncio-protocol.rst:222 msgid "subprocess:" msgstr "" -#: ../../library/asyncio-protocol.rst:223 +#: ../../library/asyncio-protocol.rst:224 msgid "``'subprocess'``: :class:`subprocess.Popen` instance" msgstr "" -#: ../../library/asyncio-protocol.rst:227 +#: ../../library/asyncio-protocol.rst:228 msgid "Set a new protocol." msgstr "" -#: ../../library/asyncio-protocol.rst:229 +#: ../../library/asyncio-protocol.rst:230 msgid "" "Switching protocol should only be done when both protocols are documented to " "support the switch." msgstr "" -#: ../../library/asyncio-protocol.rst:234 +#: ../../library/asyncio-protocol.rst:235 msgid "Return the current protocol." msgstr "" -#: ../../library/asyncio-protocol.rst:238 +#: ../../library/asyncio-protocol.rst:239 msgid "Read-only Transports" msgstr "" -#: ../../library/asyncio-protocol.rst:242 +#: ../../library/asyncio-protocol.rst:243 msgid "Return ``True`` if the transport is receiving new data." msgstr "" -#: ../../library/asyncio-protocol.rst:248 +#: ../../library/asyncio-protocol.rst:249 msgid "" "Pause the receiving end of the transport. No data will be passed to the " "protocol's :meth:`protocol.data_received() ` method " "until :meth:`resume_reading` is called." msgstr "" -#: ../../library/asyncio-protocol.rst:252 +#: ../../library/asyncio-protocol.rst:253 msgid "" "The method is idempotent, i.e. it can be called when the transport is " "already paused or closed." msgstr "" -#: ../../library/asyncio-protocol.rst:258 +#: ../../library/asyncio-protocol.rst:259 msgid "" "Resume the receiving end. The protocol's :meth:`protocol.data_received() " "` method will be called once again if some data is " "available for reading." msgstr "" -#: ../../library/asyncio-protocol.rst:262 +#: ../../library/asyncio-protocol.rst:263 msgid "" "The method is idempotent, i.e. it can be called when the transport is " "already reading." msgstr "" -#: ../../library/asyncio-protocol.rst:268 +#: ../../library/asyncio-protocol.rst:269 msgid "Write-only Transports" msgstr "" -#: ../../library/asyncio-protocol.rst:272 +#: ../../library/asyncio-protocol.rst:273 msgid "" "Close the transport immediately, without waiting for pending operations to " "complete. Buffered data will be lost. No more data will be received. The " @@ -393,31 +393,31 @@ msgid "" "method will eventually be called with :const:`None` as its argument." msgstr "" -#: ../../library/asyncio-protocol.rst:280 +#: ../../library/asyncio-protocol.rst:281 msgid "" "Return :const:`True` if the transport supports :meth:`~WriteTransport." "write_eof`, :const:`False` if not." msgstr "" -#: ../../library/asyncio-protocol.rst:285 +#: ../../library/asyncio-protocol.rst:286 msgid "Return the current size of the output buffer used by the transport." msgstr "" -#: ../../library/asyncio-protocol.rst:289 +#: ../../library/asyncio-protocol.rst:290 msgid "" "Get the *high* and *low* watermarks for write flow control. Return a tuple " "``(low, high)`` where *low* and *high* are positive number of bytes." msgstr "" -#: ../../library/asyncio-protocol.rst:293 +#: ../../library/asyncio-protocol.rst:294 msgid "Use :meth:`set_write_buffer_limits` to set the limits." msgstr "" -#: ../../library/asyncio-protocol.rst:299 +#: ../../library/asyncio-protocol.rst:300 msgid "Set the *high* and *low* watermarks for write flow control." msgstr "" -#: ../../library/asyncio-protocol.rst:301 +#: ../../library/asyncio-protocol.rst:302 msgid "" "These two values (measured in number of bytes) control when the protocol's :" "meth:`protocol.pause_writing() ` and :meth:" @@ -426,7 +426,7 @@ msgid "" "high watermark. Neither *high* nor *low* can be negative." msgstr "" -#: ../../library/asyncio-protocol.rst:309 +#: ../../library/asyncio-protocol.rst:310 msgid "" ":meth:`~BaseProtocol.pause_writing` is called when the buffer size becomes " "greater than or equal to the *high* value. If writing has been paused, :meth:" @@ -434,7 +434,7 @@ msgid "" "than or equal to the *low* value." msgstr "" -#: ../../library/asyncio-protocol.rst:314 +#: ../../library/asyncio-protocol.rst:315 msgid "" "The defaults are implementation-specific. If only the high watermark is " "given, the low watermark defaults to an implementation-specific value less " @@ -446,52 +446,52 @@ msgid "" "opportunities for doing I/O and computation concurrently." msgstr "" -#: ../../library/asyncio-protocol.rst:325 +#: ../../library/asyncio-protocol.rst:326 msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits." msgstr "" -#: ../../library/asyncio-protocol.rst:330 +#: ../../library/asyncio-protocol.rst:331 msgid "Write some *data* bytes to the transport." msgstr "" -#: ../../library/asyncio-protocol.rst:332 -#: ../../library/asyncio-protocol.rst:361 +#: ../../library/asyncio-protocol.rst:333 +#: ../../library/asyncio-protocol.rst:362 msgid "" "This method does not block; it buffers the data and arranges for it to be " "sent out asynchronously." msgstr "" -#: ../../library/asyncio-protocol.rst:337 +#: ../../library/asyncio-protocol.rst:338 msgid "" "Write a list (or any iterable) of data bytes to the transport. This is " "functionally equivalent to calling :meth:`write` on each element yielded by " "the iterable, but may be implemented more efficiently." msgstr "" -#: ../../library/asyncio-protocol.rst:344 +#: ../../library/asyncio-protocol.rst:345 msgid "" "Close the write end of the transport after flushing all buffered data. Data " "may still be received." msgstr "" -#: ../../library/asyncio-protocol.rst:347 +#: ../../library/asyncio-protocol.rst:348 msgid "" "This method can raise :exc:`NotImplementedError` if the transport (e.g. SSL) " "doesn't support half-closed connections." msgstr "" -#: ../../library/asyncio-protocol.rst:352 +#: ../../library/asyncio-protocol.rst:353 msgid "Datagram Transports" msgstr "" -#: ../../library/asyncio-protocol.rst:356 +#: ../../library/asyncio-protocol.rst:357 msgid "" "Send the *data* bytes to the remote peer given by *addr* (a transport-" "dependent target address). If *addr* is :const:`None`, the data is sent to " "the target address given on transport creation." msgstr "" -#: ../../library/asyncio-protocol.rst:366 +#: ../../library/asyncio-protocol.rst:367 msgid "" "Close the transport immediately, without waiting for pending operations to " "complete. Buffered data will be lost. No more data will be received. The " @@ -499,109 +499,109 @@ msgid "" "method will eventually be called with :const:`None` as its argument." msgstr "" -#: ../../library/asyncio-protocol.rst:376 +#: ../../library/asyncio-protocol.rst:377 msgid "Subprocess Transports" msgstr "" -#: ../../library/asyncio-protocol.rst:380 +#: ../../library/asyncio-protocol.rst:381 msgid "Return the subprocess process id as an integer." msgstr "" -#: ../../library/asyncio-protocol.rst:384 +#: ../../library/asyncio-protocol.rst:385 msgid "" "Return the transport for the communication pipe corresponding to the integer " "file descriptor *fd*:" msgstr "" -#: ../../library/asyncio-protocol.rst:387 +#: ../../library/asyncio-protocol.rst:388 msgid "" "``0``: readable streaming transport of the standard input (*stdin*), or :" "const:`None` if the subprocess was not created with ``stdin=PIPE``" msgstr "" -#: ../../library/asyncio-protocol.rst:389 +#: ../../library/asyncio-protocol.rst:390 msgid "" "``1``: writable streaming transport of the standard output (*stdout*), or :" "const:`None` if the subprocess was not created with ``stdout=PIPE``" msgstr "" -#: ../../library/asyncio-protocol.rst:391 +#: ../../library/asyncio-protocol.rst:392 msgid "" "``2``: writable streaming transport of the standard error (*stderr*), or :" "const:`None` if the subprocess was not created with ``stderr=PIPE``" msgstr "" -#: ../../library/asyncio-protocol.rst:393 +#: ../../library/asyncio-protocol.rst:394 msgid "other *fd*: :const:`None`" msgstr "" -#: ../../library/asyncio-protocol.rst:397 +#: ../../library/asyncio-protocol.rst:398 msgid "" "Return the subprocess return code as an integer or :const:`None` if it " "hasn't returned, which is similar to the :attr:`subprocess.Popen.returncode` " "attribute." msgstr "" -#: ../../library/asyncio-protocol.rst:403 +#: ../../library/asyncio-protocol.rst:404 msgid "Kill the subprocess." msgstr "" -#: ../../library/asyncio-protocol.rst:405 +#: ../../library/asyncio-protocol.rst:406 msgid "" "On POSIX systems, the function sends SIGKILL to the subprocess. On Windows, " "this method is an alias for :meth:`terminate`." msgstr "" -#: ../../library/asyncio-protocol.rst:408 +#: ../../library/asyncio-protocol.rst:409 msgid "See also :meth:`subprocess.Popen.kill`." msgstr "另請參閱 :meth:`subprocess.Popen.kill`\\ 。" -#: ../../library/asyncio-protocol.rst:412 +#: ../../library/asyncio-protocol.rst:413 msgid "" "Send the *signal* number to the subprocess, as in :meth:`subprocess.Popen." "send_signal`." msgstr "" -#: ../../library/asyncio-protocol.rst:417 +#: ../../library/asyncio-protocol.rst:418 msgid "Stop the subprocess." msgstr "" -#: ../../library/asyncio-protocol.rst:419 +#: ../../library/asyncio-protocol.rst:420 msgid "" "On POSIX systems, this method sends SIGTERM to the subprocess. On Windows, " "the Windows API function TerminateProcess() is called to stop the subprocess." msgstr "" -#: ../../library/asyncio-protocol.rst:423 +#: ../../library/asyncio-protocol.rst:424 msgid "See also :meth:`subprocess.Popen.terminate`." msgstr "另請參閱 :meth:`subprocess.Popen.terminate`\\ 。" -#: ../../library/asyncio-protocol.rst:427 +#: ../../library/asyncio-protocol.rst:428 msgid "Kill the subprocess by calling the :meth:`kill` method." msgstr "" -#: ../../library/asyncio-protocol.rst:429 +#: ../../library/asyncio-protocol.rst:430 msgid "" "If the subprocess hasn't returned yet, and close transports of *stdin*, " "*stdout*, and *stderr* pipes." msgstr "" -#: ../../library/asyncio-protocol.rst:436 +#: ../../library/asyncio-protocol.rst:437 msgid "Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:438 +#: ../../library/asyncio-protocol.rst:439 msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" msgstr "**原始碼:**\\ :source:`Lib/asyncio/protocols.py`" -#: ../../library/asyncio-protocol.rst:442 +#: ../../library/asyncio-protocol.rst:443 msgid "" "asyncio provides a set of abstract base classes that should be used to " "implement network protocols. Those classes are meant to be used together " "with :ref:`transports `." msgstr "" -#: ../../library/asyncio-protocol.rst:446 +#: ../../library/asyncio-protocol.rst:447 msgid "" "Subclasses of abstract base protocol classes may implement some or all " "methods. All these methods are callbacks: they are called by transports on " @@ -609,117 +609,117 @@ msgid "" "method should be called by the corresponding transport." msgstr "" -#: ../../library/asyncio-protocol.rst:453 +#: ../../library/asyncio-protocol.rst:454 msgid "Base Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:457 +#: ../../library/asyncio-protocol.rst:458 msgid "Base protocol with methods that all protocols share." msgstr "" -#: ../../library/asyncio-protocol.rst:461 +#: ../../library/asyncio-protocol.rst:462 msgid "" "The base class for implementing streaming protocols (TCP, Unix sockets, etc)." msgstr "" -#: ../../library/asyncio-protocol.rst:466 +#: ../../library/asyncio-protocol.rst:467 msgid "" "A base class for implementing streaming protocols with manual control of the " "receive buffer." msgstr "" -#: ../../library/asyncio-protocol.rst:471 +#: ../../library/asyncio-protocol.rst:472 msgid "The base class for implementing datagram (UDP) protocols." msgstr "" -#: ../../library/asyncio-protocol.rst:475 +#: ../../library/asyncio-protocol.rst:476 msgid "" "The base class for implementing protocols communicating with child processes " "(unidirectional pipes)." msgstr "" -#: ../../library/asyncio-protocol.rst:480 +#: ../../library/asyncio-protocol.rst:481 msgid "Base Protocol" msgstr "" -#: ../../library/asyncio-protocol.rst:482 +#: ../../library/asyncio-protocol.rst:483 msgid "All asyncio protocols can implement Base Protocol callbacks." msgstr "" -#: ../../library/asyncio-protocol.rst:485 +#: ../../library/asyncio-protocol.rst:486 msgid "Connection Callbacks" msgstr "" -#: ../../library/asyncio-protocol.rst:486 +#: ../../library/asyncio-protocol.rst:487 msgid "" "Connection callbacks are called on all protocols, exactly once per a " "successful connection. All other protocol callbacks can only be called " "between those two methods." msgstr "" -#: ../../library/asyncio-protocol.rst:492 +#: ../../library/asyncio-protocol.rst:493 msgid "Called when a connection is made." msgstr "" -#: ../../library/asyncio-protocol.rst:494 +#: ../../library/asyncio-protocol.rst:495 msgid "" "The *transport* argument is the transport representing the connection. The " "protocol is responsible for storing the reference to its transport." msgstr "" -#: ../../library/asyncio-protocol.rst:500 +#: ../../library/asyncio-protocol.rst:501 msgid "Called when the connection is lost or closed." msgstr "" -#: ../../library/asyncio-protocol.rst:502 +#: ../../library/asyncio-protocol.rst:503 msgid "" "The argument is either an exception object or :const:`None`. The latter " "means a regular EOF is received, or the connection was aborted or closed by " "this side of the connection." msgstr "" -#: ../../library/asyncio-protocol.rst:508 +#: ../../library/asyncio-protocol.rst:509 msgid "Flow Control Callbacks" msgstr "" -#: ../../library/asyncio-protocol.rst:509 +#: ../../library/asyncio-protocol.rst:510 msgid "" "Flow control callbacks can be called by transports to pause or resume " "writing performed by the protocol." msgstr "" -#: ../../library/asyncio-protocol.rst:512 +#: ../../library/asyncio-protocol.rst:513 msgid "" "See the documentation of the :meth:`~WriteTransport.set_write_buffer_limits` " "method for more details." msgstr "" -#: ../../library/asyncio-protocol.rst:517 +#: ../../library/asyncio-protocol.rst:518 msgid "Called when the transport's buffer goes over the high watermark." msgstr "" -#: ../../library/asyncio-protocol.rst:521 +#: ../../library/asyncio-protocol.rst:522 msgid "Called when the transport's buffer drains below the low watermark." msgstr "" -#: ../../library/asyncio-protocol.rst:523 +#: ../../library/asyncio-protocol.rst:524 msgid "" "If the buffer size equals the high watermark, :meth:`~BaseProtocol." "pause_writing` is not called: the buffer size must go strictly over." msgstr "" -#: ../../library/asyncio-protocol.rst:527 +#: ../../library/asyncio-protocol.rst:528 msgid "" "Conversely, :meth:`~BaseProtocol.resume_writing` is called when the buffer " "size is equal or lower than the low watermark. These end conditions are " "important to ensure that things go as expected when either mark is zero." msgstr "" -#: ../../library/asyncio-protocol.rst:534 +#: ../../library/asyncio-protocol.rst:535 msgid "Streaming Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:536 +#: ../../library/asyncio-protocol.rst:537 msgid "" "Event methods, such as :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :meth:`loop.create_connection`, :meth:`loop." @@ -728,13 +728,13 @@ msgid "" "that return streaming protocols." msgstr "" -#: ../../library/asyncio-protocol.rst:544 +#: ../../library/asyncio-protocol.rst:545 msgid "" "Called when some data is received. *data* is a non-empty bytes object " "containing the incoming data." msgstr "" -#: ../../library/asyncio-protocol.rst:547 +#: ../../library/asyncio-protocol.rst:548 msgid "" "Whether the data is buffered, chunked or reassembled depends on the " "transport. In general, you shouldn't rely on specific semantics and instead " @@ -742,27 +742,27 @@ msgid "" "the correct order." msgstr "" -#: ../../library/asyncio-protocol.rst:552 +#: ../../library/asyncio-protocol.rst:553 msgid "" "The method can be called an arbitrary number of times while a connection is " "open." msgstr "" -#: ../../library/asyncio-protocol.rst:555 +#: ../../library/asyncio-protocol.rst:556 msgid "" "However, :meth:`protocol.eof_received() ` is called " -"at most once. Once `eof_received()` is called, ``data_received()`` is not " +"at most once. Once ``eof_received()`` is called, ``data_received()`` is not " "called anymore." msgstr "" -#: ../../library/asyncio-protocol.rst:561 +#: ../../library/asyncio-protocol.rst:562 msgid "" "Called when the other end signals it won't send any more data (for example " "by calling :meth:`transport.write_eof() `, if the " "other end also uses asyncio)." msgstr "" -#: ../../library/asyncio-protocol.rst:566 +#: ../../library/asyncio-protocol.rst:567 msgid "" "This method may return a false value (including ``None``), in which case the " "transport will close itself. Conversely, if this method returns a true " @@ -771,29 +771,29 @@ msgid "" "connection." msgstr "" -#: ../../library/asyncio-protocol.rst:572 +#: ../../library/asyncio-protocol.rst:573 msgid "" "Some transports, including SSL, don't support half-closed connections, in " "which case returning true from this method will result in the connection " "being closed." msgstr "" -#: ../../library/asyncio-protocol.rst:577 -#: ../../library/asyncio-protocol.rst:635 +#: ../../library/asyncio-protocol.rst:578 +#: ../../library/asyncio-protocol.rst:636 msgid "State machine:" msgstr "" -#: ../../library/asyncio-protocol.rst:588 +#: ../../library/asyncio-protocol.rst:589 msgid "Buffered Streaming Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:592 +#: ../../library/asyncio-protocol.rst:593 msgid "" "Buffered Protocols can be used with any event loop method that supports " "`Streaming Protocols`_." msgstr "" -#: ../../library/asyncio-protocol.rst:595 +#: ../../library/asyncio-protocol.rst:596 msgid "" "``BufferedProtocol`` implementations allow explicit manual allocation and " "control of the receive buffer. Event loops can then use the buffer provided " @@ -803,16 +803,16 @@ msgid "" "number of buffer allocations." msgstr "" -#: ../../library/asyncio-protocol.rst:602 +#: ../../library/asyncio-protocol.rst:603 msgid "" "The following callbacks are called on :class:`BufferedProtocol` instances:" msgstr "" -#: ../../library/asyncio-protocol.rst:607 +#: ../../library/asyncio-protocol.rst:608 msgid "Called to allocate a new receive buffer." msgstr "" -#: ../../library/asyncio-protocol.rst:609 +#: ../../library/asyncio-protocol.rst:610 msgid "" "*sizehint* is the recommended minimum size for the returned buffer. It is " "acceptable to return smaller or larger buffers than what *sizehint* " @@ -820,27 +820,27 @@ msgid "" "to return a buffer with a zero size." msgstr "" -#: ../../library/asyncio-protocol.rst:614 +#: ../../library/asyncio-protocol.rst:615 msgid "" "``get_buffer()`` must return an object implementing the :ref:`buffer " "protocol `." msgstr "" -#: ../../library/asyncio-protocol.rst:619 +#: ../../library/asyncio-protocol.rst:620 msgid "Called when the buffer was updated with the received data." msgstr "" -#: ../../library/asyncio-protocol.rst:621 +#: ../../library/asyncio-protocol.rst:622 msgid "*nbytes* is the total number of bytes that were written to the buffer." msgstr "" -#: ../../library/asyncio-protocol.rst:625 +#: ../../library/asyncio-protocol.rst:626 msgid "" "See the documentation of the :meth:`protocol.eof_received() ` method." msgstr "" -#: ../../library/asyncio-protocol.rst:629 +#: ../../library/asyncio-protocol.rst:630 msgid "" ":meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number of " "times during a connection. However, :meth:`protocol.eof_received() " @@ -849,44 +849,44 @@ msgid "" "won't be called after it." msgstr "" -#: ../../library/asyncio-protocol.rst:648 +#: ../../library/asyncio-protocol.rst:649 msgid "Datagram Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:650 +#: ../../library/asyncio-protocol.rst:651 msgid "" "Datagram Protocol instances should be constructed by protocol factories " "passed to the :meth:`loop.create_datagram_endpoint` method." msgstr "" -#: ../../library/asyncio-protocol.rst:655 +#: ../../library/asyncio-protocol.rst:656 msgid "" "Called when a datagram is received. *data* is a bytes object containing the " "incoming data. *addr* is the address of the peer sending the data; the " "exact format depends on the transport." msgstr "" -#: ../../library/asyncio-protocol.rst:661 +#: ../../library/asyncio-protocol.rst:662 msgid "" "Called when a previous send or receive operation raises an :class:" "`OSError`. *exc* is the :class:`OSError` instance." msgstr "" -#: ../../library/asyncio-protocol.rst:664 +#: ../../library/asyncio-protocol.rst:665 msgid "" "This method is called in rare conditions, when the transport (e.g. UDP) " "detects that a datagram could not be delivered to its recipient. In many " "conditions though, undeliverable datagrams will be silently dropped." msgstr "" -#: ../../library/asyncio-protocol.rst:671 +#: ../../library/asyncio-protocol.rst:672 msgid "" "On BSD systems (macOS, FreeBSD, etc.) flow control is not supported for " "datagram protocols, because there is no reliable way to detect send failures " "caused by writing too many packets." msgstr "" -#: ../../library/asyncio-protocol.rst:675 +#: ../../library/asyncio-protocol.rst:676 msgid "" "The socket always appears 'ready' and excess packets are dropped. An :class:" "`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may or may not be " @@ -894,138 +894,138 @@ msgid "" "error_received` but otherwise ignored." msgstr "" -#: ../../library/asyncio-protocol.rst:684 +#: ../../library/asyncio-protocol.rst:685 msgid "Subprocess Protocols" msgstr "" -#: ../../library/asyncio-protocol.rst:686 +#: ../../library/asyncio-protocol.rst:687 msgid "" "Subprocess Protocol instances should be constructed by protocol factories " "passed to the :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` " "methods." msgstr "" -#: ../../library/asyncio-protocol.rst:692 +#: ../../library/asyncio-protocol.rst:693 msgid "" "Called when the child process writes data into its stdout or stderr pipe." msgstr "" -#: ../../library/asyncio-protocol.rst:695 +#: ../../library/asyncio-protocol.rst:696 msgid "*fd* is the integer file descriptor of the pipe." msgstr "" -#: ../../library/asyncio-protocol.rst:697 +#: ../../library/asyncio-protocol.rst:698 msgid "*data* is a non-empty bytes object containing the received data." msgstr "" -#: ../../library/asyncio-protocol.rst:701 +#: ../../library/asyncio-protocol.rst:702 msgid "" "Called when one of the pipes communicating with the child process is closed." msgstr "" -#: ../../library/asyncio-protocol.rst:704 +#: ../../library/asyncio-protocol.rst:705 msgid "*fd* is the integer file descriptor that was closed." msgstr "" -#: ../../library/asyncio-protocol.rst:708 +#: ../../library/asyncio-protocol.rst:709 msgid "Called when the child process has exited." msgstr "" -#: ../../library/asyncio-protocol.rst:712 +#: ../../library/asyncio-protocol.rst:713 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-protocol.rst:717 +#: ../../library/asyncio-protocol.rst:718 msgid "TCP Echo Server" msgstr "" -#: ../../library/asyncio-protocol.rst:719 +#: ../../library/asyncio-protocol.rst:720 msgid "" "Create a TCP echo server using the :meth:`loop.create_server` method, send " "back received data, and close the connection::" msgstr "" -#: ../../library/asyncio-protocol.rst:760 +#: ../../library/asyncio-protocol.rst:761 msgid "" "The :ref:`TCP echo server using streams ` " "example uses the high-level :func:`asyncio.start_server` function." msgstr "" -#: ../../library/asyncio-protocol.rst:766 +#: ../../library/asyncio-protocol.rst:767 msgid "TCP Echo Client" msgstr "" -#: ../../library/asyncio-protocol.rst:768 +#: ../../library/asyncio-protocol.rst:769 msgid "" "A TCP echo client using the :meth:`loop.create_connection` method, sends " "data, and waits until the connection is closed::" msgstr "" -#: ../../library/asyncio-protocol.rst:816 +#: ../../library/asyncio-protocol.rst:817 msgid "" "The :ref:`TCP echo client using streams ` " "example uses the high-level :func:`asyncio.open_connection` function." msgstr "" -#: ../../library/asyncio-protocol.rst:823 +#: ../../library/asyncio-protocol.rst:824 msgid "UDP Echo Server" msgstr "" -#: ../../library/asyncio-protocol.rst:825 +#: ../../library/asyncio-protocol.rst:826 msgid "" "A UDP echo server, using the :meth:`loop.create_datagram_endpoint` method, " "sends back received data::" msgstr "" -#: ../../library/asyncio-protocol.rst:867 +#: ../../library/asyncio-protocol.rst:868 msgid "UDP Echo Client" msgstr "" -#: ../../library/asyncio-protocol.rst:869 +#: ../../library/asyncio-protocol.rst:870 msgid "" "A UDP echo client, using the :meth:`loop.create_datagram_endpoint` method, " "sends data and closes the transport when it receives the answer::" msgstr "" -#: ../../library/asyncio-protocol.rst:924 +#: ../../library/asyncio-protocol.rst:925 msgid "Connecting Existing Sockets" msgstr "" -#: ../../library/asyncio-protocol.rst:926 +#: ../../library/asyncio-protocol.rst:927 msgid "" "Wait until a socket receives data using the :meth:`loop.create_connection` " "method with a protocol::" msgstr "" -#: ../../library/asyncio-protocol.rst:980 +#: ../../library/asyncio-protocol.rst:981 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." "add_reader` method to register an FD." msgstr "" -#: ../../library/asyncio-protocol.rst:984 +#: ../../library/asyncio-protocol.rst:985 msgid "" "The :ref:`register an open socket to wait for data using streams " "` example uses high-level streams " "created by the :func:`open_connection` function in a coroutine." msgstr "" -#: ../../library/asyncio-protocol.rst:991 +#: ../../library/asyncio-protocol.rst:992 msgid "loop.subprocess_exec() and SubprocessProtocol" msgstr "" -#: ../../library/asyncio-protocol.rst:993 +#: ../../library/asyncio-protocol.rst:994 msgid "" "An example of a subprocess protocol used to get the output of a subprocess " "and to wait for the subprocess exit." msgstr "" -#: ../../library/asyncio-protocol.rst:996 +#: ../../library/asyncio-protocol.rst:997 msgid "The subprocess is created by the :meth:`loop.subprocess_exec` method::" msgstr "" -#: ../../library/asyncio-protocol.rst:1042 +#: ../../library/asyncio-protocol.rst:1043 msgid "" "See also the :ref:`same example ` " "written using high-level APIs." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index d516726706..a46ffd8bb3 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" -"PO-Revision-Date: 2022-06-11 15:06+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"PO-Revision-Date: 2022-10-31 16:28+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1\n" +"X-Generator: Poedit 3.1.1\n" #: ../../library/asyncio-stream.rst:7 msgid "Streams" @@ -203,10 +203,13 @@ msgstr "StreamReader" #: ../../library/asyncio-stream.rst:185 msgid "" "Represents a reader object that provides APIs to read data from the IO " -"stream." -msgstr "表示一個有提供 API 來從 IO 串流中讀取資料的 reader 物件。" +"stream. As an :term:`asynchronous iterable`, the object supports the :" +"keyword:`async for` statement." +msgstr "" +"表示一個有提供 API 來從 IO 串流中讀取資料的 reader 物件。作為一個 :term:" +"`asynchronous iterable`,此物件支援 :keyword:`async for` 陳述式。" -#: ../../library/asyncio-stream.rst:188 +#: ../../library/asyncio-stream.rst:189 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." @@ -214,7 +217,7 @@ msgstr "" "不建議直接實例化 *StreamReader* 物件;使用 :func:`open_connection` 和 :func:" "`start_server` 會是較好的做法。" -#: ../../library/asyncio-stream.rst:194 +#: ../../library/asyncio-stream.rst:195 msgid "" "Read up to *n* bytes. If *n* is not provided, or set to ``-1``, read until " "EOF and return all read bytes." @@ -222,34 +225,34 @@ msgstr "" "讀取至多 *n* 個位元組。如果沒有設定 *n* 或被設為 ``-1``,則表示要持續讀取直" "到 EOF 並回傳所有已讀取的位元組。" -#: ../../library/asyncio-stream.rst:197 +#: ../../library/asyncio-stream.rst:198 msgid "" "If EOF was received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "如果讀取到 EOF 且內部緩衝區是空的,則回傳一個空的 ``bytes`` 物件。" -#: ../../library/asyncio-stream.rst:202 +#: ../../library/asyncio-stream.rst:203 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "讀取一行,其中\"行\"指的是以 ``\\n`` 結尾的位元組序列。" -#: ../../library/asyncio-stream.rst:205 +#: ../../library/asyncio-stream.rst:206 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "如果讀取到 EOF 而沒有找到 ``\\n``,該方法會回傳部分的已讀取資料。" -#: ../../library/asyncio-stream.rst:208 +#: ../../library/asyncio-stream.rst:209 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "如果讀取到 EOF 且內部緩衝區是空的,則回傳一個空的 ``bytes`` 物件。" -#: ../../library/asyncio-stream.rst:213 +#: ../../library/asyncio-stream.rst:214 msgid "Read exactly *n* bytes." msgstr "讀取剛好 *n* 個位元組。" -#: ../../library/asyncio-stream.rst:215 +#: ../../library/asyncio-stream.rst:216 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " @@ -259,11 +262,11 @@ msgstr "" "`IncompleteReadError`。使用 :attr:`IncompleteReadError.partial` 屬性來獲取串" "流結束前已讀取的部分資料。" -#: ../../library/asyncio-stream.rst:221 +#: ../../library/asyncio-stream.rst:222 msgid "Read data from the stream until *separator* is found." msgstr "從串流中持續讀取資料直到出現 *separator*。" -#: ../../library/asyncio-stream.rst:223 +#: ../../library/asyncio-stream.rst:224 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." @@ -271,7 +274,7 @@ msgstr "" "成功後,資料和 separator(分隔符號)會從內部緩衝區中刪除(或者說是被消費掉 " "(consumed))。回傳的資料在末尾會有一個 separator。" -#: ../../library/asyncio-stream.rst:227 +#: ../../library/asyncio-stream.rst:228 msgid "" "If the amount of data read exceeds the configured stream limit, a :exc:" "`LimitOverrunError` exception is raised, and the data is left in the " @@ -280,7 +283,7 @@ msgstr "" "如果讀取的資料量超過了設定的串流限制,將會引發 :exc:`LimitOverrunError` 例" "外,資料將被留在內部緩衝區中,並可以再次被讀取。" -#: ../../library/asyncio-stream.rst:231 +#: ../../library/asyncio-stream.rst:232 msgid "" "If EOF is reached before the complete separator is found, an :exc:" "`IncompleteReadError` exception is raised, and the internal buffer is " @@ -291,20 +294,20 @@ msgstr "" "`IncompleteReadError` 例外,且內部緩衝區會被重置。:attr:`IncompleteReadError." "partial` 屬性可能包含一部分的 separator。" -#: ../../library/asyncio-stream.rst:240 +#: ../../library/asyncio-stream.rst:241 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "如果緩衝區是空的且 :meth:`feed_eof` 曾被呼叫則回傳 ``True``。" -#: ../../library/asyncio-stream.rst:245 +#: ../../library/asyncio-stream.rst:246 msgid "StreamWriter" msgstr "StreamWriter" -#: ../../library/asyncio-stream.rst:249 +#: ../../library/asyncio-stream.rst:250 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "表示一個有提供 API 來將資料寫入 IO 串流的 writer 物件。" -#: ../../library/asyncio-stream.rst:252 +#: ../../library/asyncio-stream.rst:253 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." @@ -312,7 +315,7 @@ msgstr "" "不建議直接實例化 *StreamWriter* 物件;使用 :func:`open_connection` 和 :func:" "`start_server` 會是較好的做法。" -#: ../../library/asyncio-stream.rst:258 +#: ../../library/asyncio-stream.rst:259 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " @@ -321,14 +324,14 @@ msgstr "" "此方法會嘗試立即將 *data* 寫入到底層的 socket。如果失敗,資料會被放到內部寫入" "緩衝中排隊等待 (queue),直到它可被發送。" -#: ../../library/asyncio-stream.rst:262 ../../library/asyncio-stream.rst:274 +#: ../../library/asyncio-stream.rst:263 ../../library/asyncio-stream.rst:275 msgid "The method should be used along with the ``drain()`` method::" msgstr "" "此方法應當與 ``drain()`` 方法一起使用:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:269 +#: ../../library/asyncio-stream.rst:270 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " @@ -337,18 +340,18 @@ msgstr "" "此方法會立即嘗試將一個位元組 list(或任何可疊代物件 (iterable))寫入到底層的 " "socket。如果失敗,資料會被放到內部寫入緩衝中排隊等待,直到它可被發送。" -#: ../../library/asyncio-stream.rst:281 +#: ../../library/asyncio-stream.rst:282 msgid "The method closes the stream and the underlying socket." msgstr "此方法會關閉串流以及底層的 socket。" -#: ../../library/asyncio-stream.rst:283 +#: ../../library/asyncio-stream.rst:284 msgid "The method should be used along with the ``wait_closed()`` method::" msgstr "" "此方法應與 ``wait_closed()`` 方法一起使用:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:290 +#: ../../library/asyncio-stream.rst:291 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." @@ -356,29 +359,29 @@ msgstr "" "如果底層的傳輸支援 :meth:`write_eof` 方法就回傳 ``True``,否則回傳 " "``False``。" -#: ../../library/asyncio-stream.rst:295 +#: ../../library/asyncio-stream.rst:296 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "在已緩衝的寫入資料被清理 (flush) 後關閉串流的寫入端。" -#: ../../library/asyncio-stream.rst:300 +#: ../../library/asyncio-stream.rst:301 msgid "Return the underlying asyncio transport." msgstr "回傳底層的 asyncio 傳輸。" -#: ../../library/asyncio-stream.rst:304 +#: ../../library/asyncio-stream.rst:305 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "存取可選的傳輸資訊;詳情請見 :meth:`BaseTransport.get_extra_info`。" -#: ../../library/asyncio-stream.rst:309 +#: ../../library/asyncio-stream.rst:310 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" "等待直到可以繼續寫入到串流。範例:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:315 +#: ../../library/asyncio-stream.rst:316 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -390,62 +393,62 @@ msgstr "" "(high watermark) 時,*drain()* 會阻塞直到緩衝區大小減少至最低標記位 (low " "watermark) 以便繼續寫入。當沒有要等待的資料時,:meth:`drain` 會立即回傳。" -#: ../../library/asyncio-stream.rst:325 +#: ../../library/asyncio-stream.rst:326 msgid "Upgrade an existing stream-based connection to TLS." msgstr "" -#: ../../library/asyncio-stream.rst:327 +#: ../../library/asyncio-stream.rst:328 msgid "Parameters:" msgstr "" -#: ../../library/asyncio-stream.rst:329 +#: ../../library/asyncio-stream.rst:330 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../library/asyncio-stream.rst:331 +#: ../../library/asyncio-stream.rst:332 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../library/asyncio-stream.rst:334 +#: ../../library/asyncio-stream.rst:335 msgid "" "*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " "to complete before aborting the connection. ``60.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:342 +#: ../../library/asyncio-stream.rst:343 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "如果串流已被關閉或正在被關閉則回傳 ``True``。" -#: ../../library/asyncio-stream.rst:349 +#: ../../library/asyncio-stream.rst:350 msgid "Wait until the stream is closed." msgstr "等待直到串流被關閉。" -#: ../../library/asyncio-stream.rst:351 +#: ../../library/asyncio-stream.rst:352 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed." msgstr "應當在 :meth:`close` 之後才被呼叫,這會持續等待直到底層的連線被關閉。" -#: ../../library/asyncio-stream.rst:358 +#: ../../library/asyncio-stream.rst:359 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-stream.rst:363 +#: ../../library/asyncio-stream.rst:364 msgid "TCP echo client using streams" msgstr "使用串流的 TCP echo 客戶端" -#: ../../library/asyncio-stream.rst:365 +#: ../../library/asyncio-stream.rst:366 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" "使用 :func:`asyncio.open_connection` 函式的 TCP echo 客戶端:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:388 +#: ../../library/asyncio-stream.rst:389 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" @@ -454,18 +457,18 @@ msgstr "" "使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 客戶端協定 " "`\\ 範例。" -#: ../../library/asyncio-stream.rst:395 +#: ../../library/asyncio-stream.rst:396 msgid "TCP echo server using streams" msgstr "使用串流的 TCP echo 伺服器" -#: ../../library/asyncio-stream.rst:397 +#: ../../library/asyncio-stream.rst:398 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" "TCP echo 伺服器使用 :func:`asyncio.start_server` 函式:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:430 +#: ../../library/asyncio-stream.rst:431 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." @@ -474,11 +477,11 @@ msgstr "" "使用 :meth:`loop.create_server` 方法的 :ref:`TCP echo 伺服器協定 " "` 範例。" -#: ../../library/asyncio-stream.rst:435 +#: ../../library/asyncio-stream.rst:436 msgid "Get HTTP headers" msgstr "獲取 HTTP 標頭" -#: ../../library/asyncio-stream.rst:437 +#: ../../library/asyncio-stream.rst:438 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" @@ -486,25 +489,25 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-stream.rst:475 +#: ../../library/asyncio-stream.rst:476 msgid "Usage::" msgstr "" "用法:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:479 +#: ../../library/asyncio-stream.rst:480 msgid "or with HTTPS::" msgstr "" "或使用 HTTPS:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:487 +#: ../../library/asyncio-stream.rst:488 msgid "Register an open socket to wait for data using streams" msgstr "註冊一個使用串流來等待資料的開放 socket" -#: ../../library/asyncio-stream.rst:489 +#: ../../library/asyncio-stream.rst:490 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" @@ -513,7 +516,7 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-stream.rst:523 +#: ../../library/asyncio-stream.rst:524 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " @@ -523,7 +526,7 @@ msgstr "" "`\\ 範例中,有使用了低階協定以及 :meth:" "`loop.create_connection` 方法。" -#: ../../library/asyncio-stream.rst:527 +#: ../../library/asyncio-stream.rst:528 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 4669564acf..fb13926ca6 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -598,7 +598,7 @@ msgstr "" #: ../../library/asyncio-task.rst:634 msgid "" -"If *when* is `None`, any current deadline will be removed, and the context " +"If *when* is ``None``, any current deadline will be removed, and the context " "manager will wait indefinitely." msgstr "" @@ -805,18 +805,18 @@ msgstr "" #: ../../library/asyncio-task.rst:870 msgid "" -"Directly calling `blocking_io()` in any coroutine would block the event loop " -"for its duration, resulting in an additional 1 second of run time. Instead, " -"by using `asyncio.to_thread()`, we can run it in a separate thread without " -"blocking the event loop." +"Directly calling ``blocking_io()`` in any coroutine would block the event " +"loop for its duration, resulting in an additional 1 second of run time. " +"Instead, by using ``asyncio.to_thread()``, we can run it in a separate " +"thread without blocking the event loop." msgstr "" #: ../../library/asyncio-task.rst:877 msgid "" -"Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used to " -"make IO-bound functions non-blocking. However, for extension modules that " +"Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " +"to make IO-bound functions non-blocking. However, for extension modules that " "release the GIL or alternative Python implementations that don't have one, " -"`asyncio.to_thread()` can also be used for CPU-bound functions." +"``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" #: ../../library/asyncio-task.rst:886 diff --git a/library/bdb.po b/library/bdb.po index 9826dc8103..896c11629a 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-03 00:15+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -207,8 +207,8 @@ msgstr "" msgid "" "For real file names, the canonical form is an operating-system-dependent, :" "func:`case-normalized ` :func:`absolute path `. A *filename* with angle brackets, such as `\"\"` generated " -"in interactive mode, is returned unchanged." +"abspath>`. A *filename* with angle brackets, such as ``\"\"`` " +"generated in interactive mode, is returned unchanged." msgstr "" #: ../../library/bdb.rst:151 diff --git a/library/bz2.po b/library/bz2.po index 0ae85b9ef2..9920291a02 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -297,9 +297,9 @@ msgstr "" #: ../../library/bz2.rst:208 msgid "" -"Attempting to decompress data after the end of stream is reached raises an " -"`EOFError`. Any data found after the end of the stream is ignored and saved " -"in the :attr:`~.unused_data` attribute." +"Attempting to decompress data after the end of stream is reached raises an :" +"exc:`EOFError`. Any data found after the end of the stream is ignored and " +"saved in the :attr:`~.unused_data` attribute." msgstr "" #: ../../library/bz2.rst:212 @@ -376,8 +376,8 @@ msgstr "" #: ../../library/bz2.rst:305 msgid "" -"The example above uses a very \"nonrandom\" stream of data (a stream of `b\"z" -"\"` chunks). Random data tends to compress poorly, while ordered, " +"The example above uses a very \"nonrandom\" stream of data (a stream of ``b" +"\"z\"`` chunks). Random data tends to compress poorly, while ordered, " "repetitive data usually yields a high compression ratio." msgstr "" diff --git a/library/codecs.po b/library/codecs.po index 0d4281702f..b88926545d 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -222,44 +222,44 @@ msgstr "" #: ../../library/codecs.rst:192 msgid "" -"Underlying encoded files are always opened in binary mode. No automatic " -"conversion of ``'\\n'`` is done on reading and writing. The *mode* argument " -"may be any binary mode acceptable to the built-in :func:`open` function; the " -"``'b'`` is automatically added." +"If *encoding* is not ``None``, then the underlying encoded files are always " +"opened in binary mode. No automatic conversion of ``'\\n'`` is done on " +"reading and writing. The *mode* argument may be any binary mode acceptable " +"to the built-in :func:`open` function; the ``'b'`` is automatically added." msgstr "" -#: ../../library/codecs.rst:197 +#: ../../library/codecs.rst:198 msgid "" "*encoding* specifies the encoding which is to be used for the file. Any " "encoding that encodes to and decodes from bytes is allowed, and the data " "types supported by the file methods depend on the codec used." msgstr "" -#: ../../library/codecs.rst:201 +#: ../../library/codecs.rst:202 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'`` which causes a :exc:`ValueError` to be raised in case an " "encoding error occurs." msgstr "" -#: ../../library/codecs.rst:204 +#: ../../library/codecs.rst:205 msgid "" "*buffering* has the same meaning as for the built-in :func:`open` function. " "It defaults to -1 which means that the default buffer size will be used." msgstr "" -#: ../../library/codecs.rst:207 +#: ../../library/codecs.rst:208 msgid "The ``'U'`` mode has been removed." msgstr "" -#: ../../library/codecs.rst:213 +#: ../../library/codecs.rst:214 msgid "" "Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " "provides transparent transcoding. The original file is closed when the " "wrapped version is closed." msgstr "" -#: ../../library/codecs.rst:217 +#: ../../library/codecs.rst:218 msgid "" "Data written to the wrapped file is decoded according to the given " "*data_encoding* and then written to the original file as bytes using " @@ -267,18 +267,18 @@ msgid "" "*file_encoding*, and the result is encoded using *data_encoding*." msgstr "" -#: ../../library/codecs.rst:223 +#: ../../library/codecs.rst:224 msgid "If *file_encoding* is not given, it defaults to *data_encoding*." msgstr "" -#: ../../library/codecs.rst:225 +#: ../../library/codecs.rst:226 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'``, which causes :exc:`ValueError` to be raised in case an " "encoding error occurs." msgstr "" -#: ../../library/codecs.rst:232 +#: ../../library/codecs.rst:233 msgid "" "Uses an incremental encoder to iteratively encode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -286,14 +286,14 @@ msgid "" "encoder." msgstr "" -#: ../../library/codecs.rst:237 +#: ../../library/codecs.rst:238 msgid "" "This function requires that the codec accept text :class:`str` objects to " "encode. Therefore it does not support bytes-to-bytes encoders such as " "``base64_codec``." msgstr "" -#: ../../library/codecs.rst:244 +#: ../../library/codecs.rst:245 msgid "" "Uses an incremental decoder to iteratively decode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -301,7 +301,7 @@ msgid "" "decoder." msgstr "" -#: ../../library/codecs.rst:249 +#: ../../library/codecs.rst:250 msgid "" "This function requires that the codec accept :class:`bytes` objects to " "decode. Therefore it does not support text-to-text encoders such as " @@ -309,13 +309,13 @@ msgid "" "`iterencode`." msgstr "" -#: ../../library/codecs.rst:255 +#: ../../library/codecs.rst:256 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" msgstr "" -#: ../../library/codecs.rst:270 +#: ../../library/codecs.rst:271 msgid "" "These constants define various byte sequences, being Unicode byte order " "marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " @@ -327,18 +327,18 @@ msgid "" "represent the BOM in UTF-8 and UTF-32 encodings." msgstr "" -#: ../../library/codecs.rst:284 +#: ../../library/codecs.rst:285 msgid "Codec Base Classes" msgstr "" -#: ../../library/codecs.rst:286 +#: ../../library/codecs.rst:287 msgid "" "The :mod:`codecs` module defines a set of base classes which define the " "interfaces for working with codec objects, and can also be used as the basis " "for custom codec implementations." msgstr "" -#: ../../library/codecs.rst:290 +#: ../../library/codecs.rst:291 msgid "" "Each codec has to define four interfaces to make it usable as codec in " "Python: stateless encoder, stateless decoder, stream reader and stream " @@ -347,69 +347,69 @@ msgid "" "how the codec will handle encoding and decoding errors." msgstr "" -#: ../../library/codecs.rst:301 +#: ../../library/codecs.rst:302 msgid "Error Handlers" msgstr "" -#: ../../library/codecs.rst:303 +#: ../../library/codecs.rst:304 msgid "" "To simplify and standardize error handling, codecs may implement different " "error handling schemes by accepting the *errors* string argument:" msgstr "" -#: ../../library/codecs.rst:323 +#: ../../library/codecs.rst:324 msgid "" "The following error handlers can be used with all Python :ref:`standard-" "encodings` codecs:" msgstr "" -#: ../../library/codecs.rst:329 ../../library/codecs.rst:371 -#: ../../library/codecs.rst:390 +#: ../../library/codecs.rst:330 ../../library/codecs.rst:372 +#: ../../library/codecs.rst:391 msgid "Value" msgstr "" -#: ../../library/codecs.rst:329 ../../library/codecs.rst:371 -#: ../../library/codecs.rst:390 ../../library/codecs.rst:1323 -#: ../../library/codecs.rst:1390 ../../library/codecs.rst:1445 +#: ../../library/codecs.rst:330 ../../library/codecs.rst:372 +#: ../../library/codecs.rst:391 ../../library/codecs.rst:1324 +#: ../../library/codecs.rst:1391 ../../library/codecs.rst:1446 msgid "Meaning" msgstr "" -#: ../../library/codecs.rst:331 +#: ../../library/codecs.rst:332 msgid "``'strict'``" msgstr "``'strict'``" -#: ../../library/codecs.rst:331 +#: ../../library/codecs.rst:332 msgid "" "Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " "in :func:`strict_errors`." msgstr "" -#: ../../library/codecs.rst:335 +#: ../../library/codecs.rst:336 msgid "``'ignore'``" msgstr "``'ignore'``" -#: ../../library/codecs.rst:335 +#: ../../library/codecs.rst:336 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." msgstr "" -#: ../../library/codecs.rst:339 +#: ../../library/codecs.rst:340 msgid "``'replace'``" msgstr "``'replace'``" -#: ../../library/codecs.rst:339 +#: ../../library/codecs.rst:340 msgid "" "Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " "On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " "Implemented in :func:`replace_errors`." msgstr "" -#: ../../library/codecs.rst:345 +#: ../../library/codecs.rst:346 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: ../../library/codecs.rst:345 +#: ../../library/codecs.rst:346 msgid "" "Replace with backslashed escape sequences. On encoding, use hexadecimal form " "of Unicode code point with formats ``\\xhh`` ``\\uxxxx`` ``\\Uxxxxxxxx``. On " @@ -417,11 +417,11 @@ msgid "" "Implemented in :func:`backslashreplace_errors`." msgstr "" -#: ../../library/codecs.rst:353 +#: ../../library/codecs.rst:354 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: ../../library/codecs.rst:353 +#: ../../library/codecs.rst:354 msgid "" "On decoding, replace byte with individual surrogate code ranging from ``U" "+DC80`` to ``U+DCFF``. This code will then be turned back into the same byte " @@ -429,92 +429,92 @@ msgid "" "(See :pep:`383` for more.)" msgstr "" -#: ../../library/codecs.rst:367 +#: ../../library/codecs.rst:368 msgid "" "The following error handlers are only applicable to encoding (within :term:" "`text encodings `):" msgstr "" -#: ../../library/codecs.rst:373 +#: ../../library/codecs.rst:374 msgid "``'xmlcharrefreplace'``" msgstr "``'xmlcharrefreplace'``" -#: ../../library/codecs.rst:373 +#: ../../library/codecs.rst:374 msgid "" "Replace with XML/HTML numeric character reference, which is a decimal form " "of Unicode code point with format ``&#num;`` Implemented in :func:" "`xmlcharrefreplace_errors`." msgstr "" -#: ../../library/codecs.rst:378 +#: ../../library/codecs.rst:379 msgid "``'namereplace'``" msgstr "``'namereplace'``" -#: ../../library/codecs.rst:378 +#: ../../library/codecs.rst:379 msgid "" "Replace with ``\\N{...}`` escape sequences, what appears in the braces is " "the Name property from Unicode Character Database. Implemented in :func:" "`namereplace_errors`." msgstr "" -#: ../../library/codecs.rst:387 +#: ../../library/codecs.rst:388 msgid "" "In addition, the following error handler is specific to the given codecs:" msgstr "" -#: ../../library/codecs.rst:390 +#: ../../library/codecs.rst:391 msgid "Codecs" msgstr "" -#: ../../library/codecs.rst:392 +#: ../../library/codecs.rst:393 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: ../../library/codecs.rst:392 +#: ../../library/codecs.rst:393 msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" msgstr "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" -#: ../../library/codecs.rst:392 +#: ../../library/codecs.rst:393 msgid "" "Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " "as normal code point. Otherwise these codecs treat the presence of surrogate " "code point in :class:`str` as an error." msgstr "" -#: ../../library/codecs.rst:399 +#: ../../library/codecs.rst:400 msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." msgstr "" -#: ../../library/codecs.rst:402 +#: ../../library/codecs.rst:403 msgid "" "The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " "codecs." msgstr "" -#: ../../library/codecs.rst:406 +#: ../../library/codecs.rst:407 msgid "The ``'namereplace'`` error handler." msgstr "" -#: ../../library/codecs.rst:409 +#: ../../library/codecs.rst:410 msgid "" "The ``'backslashreplace'`` error handler now works with decoding and " "translating." msgstr "" -#: ../../library/codecs.rst:413 +#: ../../library/codecs.rst:414 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" msgstr "" -#: ../../library/codecs.rst:418 +#: ../../library/codecs.rst:419 msgid "" "Register the error handling function *error_handler* under the name *name*. " "The *error_handler* argument will be called during encoding and decoding in " "case of an error, when *name* is specified as the errors parameter." msgstr "" -#: ../../library/codecs.rst:422 +#: ../../library/codecs.rst:423 msgid "" "For encoding, *error_handler* will be called with a :exc:" "`UnicodeEncodeError` instance, which contains information about the location " @@ -529,66 +529,66 @@ msgid "" "position is out of bound an :exc:`IndexError` will be raised." msgstr "" -#: ../../library/codecs.rst:434 +#: ../../library/codecs.rst:435 msgid "" "Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " "or :exc:`UnicodeTranslateError` will be passed to the handler and that the " "replacement from the error handler will be put into the output directly." msgstr "" -#: ../../library/codecs.rst:439 +#: ../../library/codecs.rst:440 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: ../../library/codecs.rst:444 +#: ../../library/codecs.rst:445 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: ../../library/codecs.rst:446 +#: ../../library/codecs.rst:447 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: ../../library/codecs.rst:448 +#: ../../library/codecs.rst:449 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" -#: ../../library/codecs.rst:453 +#: ../../library/codecs.rst:454 msgid "Implements the ``'strict'`` error handling." msgstr "" -#: ../../library/codecs.rst:455 +#: ../../library/codecs.rst:456 msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." msgstr "" -#: ../../library/codecs.rst:460 +#: ../../library/codecs.rst:461 msgid "Implements the ``'ignore'`` error handling." msgstr "" -#: ../../library/codecs.rst:462 +#: ../../library/codecs.rst:463 msgid "" "Malformed data is ignored; encoding or decoding is continued without further " "notice." msgstr "" -#: ../../library/codecs.rst:468 +#: ../../library/codecs.rst:469 msgid "Implements the ``'replace'`` error handling." msgstr "" -#: ../../library/codecs.rst:470 +#: ../../library/codecs.rst:471 msgid "" "Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " "the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" -#: ../../library/codecs.rst:476 +#: ../../library/codecs.rst:477 msgid "Implements the ``'backslashreplace'`` error handling." msgstr "" -#: ../../library/codecs.rst:478 +#: ../../library/codecs.rst:479 msgid "" "Malformed data is replaced by a backslashed escape sequence. On encoding, " "use the hexadecimal form of Unicode code point with formats ``\\xhh`` ``" @@ -596,30 +596,30 @@ msgid "" "value with format ``\\xhh``." msgstr "" -#: ../../library/codecs.rst:483 +#: ../../library/codecs.rst:484 msgid "Works with decoding and translating." msgstr "" -#: ../../library/codecs.rst:489 +#: ../../library/codecs.rst:490 msgid "" "Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" "term:`text encoding` only)." msgstr "" -#: ../../library/codecs.rst:492 +#: ../../library/codecs.rst:493 msgid "" "The unencodable character is replaced by an appropriate XML/HTML numeric " "character reference, which is a decimal form of Unicode code point with " "format ``&#num;`` ." msgstr "" -#: ../../library/codecs.rst:499 +#: ../../library/codecs.rst:500 msgid "" "Implements the ``'namereplace'`` error handling (for encoding within :term:" "`text encoding` only)." msgstr "" -#: ../../library/codecs.rst:502 +#: ../../library/codecs.rst:503 msgid "" "The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " "set of characters that appear in the braces is the Name property from " @@ -627,17 +627,17 @@ msgid "" "will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: ../../library/codecs.rst:513 +#: ../../library/codecs.rst:514 msgid "Stateless Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:515 +#: ../../library/codecs.rst:516 msgid "" "The base :class:`Codec` class defines these methods which also define the " "function interfaces of the stateless encoder and decoder:" msgstr "" -#: ../../library/codecs.rst:521 +#: ../../library/codecs.rst:522 msgid "" "Encodes the object *input* and returns a tuple (output object, length " "consumed). For instance, :term:`text encoding` converts a string object to a " @@ -645,26 +645,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: ../../library/codecs.rst:526 ../../library/codecs.rst:548 +#: ../../library/codecs.rst:527 ../../library/codecs.rst:549 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: ../../library/codecs.rst:529 +#: ../../library/codecs.rst:530 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamWriter` for codecs which have to keep state in order to make encoding " "efficient." msgstr "" -#: ../../library/codecs.rst:533 +#: ../../library/codecs.rst:534 msgid "" "The encoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: ../../library/codecs.rst:539 +#: ../../library/codecs.rst:540 msgid "" "Decodes the object *input* and returns a tuple (output object, length " "consumed). For instance, for a :term:`text encoding`, decoding converts a " @@ -672,31 +672,31 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:544 +#: ../../library/codecs.rst:545 msgid "" "For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " "or one which provides the read-only buffer interface -- for example, buffer " "objects and memory mapped files." msgstr "" -#: ../../library/codecs.rst:551 +#: ../../library/codecs.rst:552 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamReader` for codecs which have to keep state in order to make decoding " "efficient." msgstr "" -#: ../../library/codecs.rst:555 +#: ../../library/codecs.rst:556 msgid "" "The decoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: ../../library/codecs.rst:560 +#: ../../library/codecs.rst:561 msgid "Incremental Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:562 +#: ../../library/codecs.rst:563 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -707,7 +707,7 @@ msgid "" "during method calls." msgstr "" -#: ../../library/codecs.rst:570 +#: ../../library/codecs.rst:571 msgid "" "The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" "`~IncrementalDecoder.decode` method is the same as if all the single inputs " @@ -715,36 +715,36 @@ msgid "" "encoder/decoder." msgstr "" -#: ../../library/codecs.rst:579 +#: ../../library/codecs.rst:580 msgid "IncrementalEncoder Objects" msgstr "IncrementalEncoder 物件" -#: ../../library/codecs.rst:581 +#: ../../library/codecs.rst:582 msgid "" "The :class:`IncrementalEncoder` class is used for encoding an input in " "multiple steps. It defines the following methods which every incremental " "encoder must define in order to be compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:588 +#: ../../library/codecs.rst:589 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: ../../library/codecs.rst:590 +#: ../../library/codecs.rst:591 msgid "" "All incremental encoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: ../../library/codecs.rst:594 +#: ../../library/codecs.rst:595 msgid "" "The :class:`IncrementalEncoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: ../../library/codecs.rst:598 +#: ../../library/codecs.rst:599 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -752,21 +752,21 @@ msgid "" "`IncrementalEncoder` object." msgstr "" -#: ../../library/codecs.rst:606 +#: ../../library/codecs.rst:607 msgid "" "Encodes *object* (taking the current state of the encoder into account) and " "returns the resulting encoded object. If this is the last call to :meth:" "`encode` *final* must be true (the default is false)." msgstr "" -#: ../../library/codecs.rst:613 +#: ../../library/codecs.rst:614 msgid "" "Reset the encoder to the initial state. The output is discarded: call ``." "encode(object, final=True)``, passing an empty byte or text string if " "necessary, to reset the encoder and to get the output." msgstr "" -#: ../../library/codecs.rst:620 +#: ../../library/codecs.rst:621 msgid "" "Return the current state of the encoder which must be an integer. The " "implementation should make sure that ``0`` is the most common state. (States " @@ -775,42 +775,42 @@ msgid "" "into an integer.)" msgstr "" -#: ../../library/codecs.rst:629 +#: ../../library/codecs.rst:630 msgid "" "Set the state of the encoder to *state*. *state* must be an encoder state " "returned by :meth:`getstate`." msgstr "" -#: ../../library/codecs.rst:636 +#: ../../library/codecs.rst:637 msgid "IncrementalDecoder Objects" msgstr "IncrementalDecoder 物件" -#: ../../library/codecs.rst:638 +#: ../../library/codecs.rst:639 msgid "" "The :class:`IncrementalDecoder` class is used for decoding an input in " "multiple steps. It defines the following methods which every incremental " "decoder must define in order to be compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:645 +#: ../../library/codecs.rst:646 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: ../../library/codecs.rst:647 +#: ../../library/codecs.rst:648 msgid "" "All incremental decoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: ../../library/codecs.rst:651 +#: ../../library/codecs.rst:652 msgid "" "The :class:`IncrementalDecoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: ../../library/codecs.rst:655 +#: ../../library/codecs.rst:656 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -818,7 +818,7 @@ msgid "" "`IncrementalDecoder` object." msgstr "" -#: ../../library/codecs.rst:663 +#: ../../library/codecs.rst:664 msgid "" "Decodes *object* (taking the current state of the decoder into account) and " "returns the resulting decoded object. If this is the last call to :meth:" @@ -829,11 +829,11 @@ msgid "" "(which might raise an exception)." msgstr "" -#: ../../library/codecs.rst:674 +#: ../../library/codecs.rst:675 msgid "Reset the decoder to the initial state." msgstr "" -#: ../../library/codecs.rst:679 +#: ../../library/codecs.rst:680 msgid "" "Return the current state of the decoder. This must be a tuple with two " "items, the first must be the buffer containing the still undecoded input. " @@ -848,59 +848,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: ../../library/codecs.rst:694 +#: ../../library/codecs.rst:695 msgid "" "Set the state of the decoder to *state*. *state* must be a decoder state " "returned by :meth:`getstate`." msgstr "" -#: ../../library/codecs.rst:699 +#: ../../library/codecs.rst:700 msgid "Stream Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:702 +#: ../../library/codecs.rst:703 msgid "" "The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " "working interfaces which can be used to implement new encoding submodules " "very easily. See :mod:`encodings.utf_8` for an example of how this is done." msgstr "" -#: ../../library/codecs.rst:710 +#: ../../library/codecs.rst:711 msgid "StreamWriter Objects" msgstr "StreamWriter 物件" -#: ../../library/codecs.rst:712 +#: ../../library/codecs.rst:713 msgid "" "The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " "the following methods which every stream writer must define in order to be " "compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:719 +#: ../../library/codecs.rst:720 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: ../../library/codecs.rst:721 +#: ../../library/codecs.rst:722 msgid "" "All stream writers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: ../../library/codecs.rst:725 +#: ../../library/codecs.rst:726 msgid "" "The *stream* argument must be a file-like object open for writing text or " "binary data, as appropriate for the specific codec." msgstr "" -#: ../../library/codecs.rst:728 +#: ../../library/codecs.rst:729 msgid "" "The :class:`StreamWriter` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: ../../library/codecs.rst:732 +#: ../../library/codecs.rst:733 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -908,70 +908,70 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:738 +#: ../../library/codecs.rst:739 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: ../../library/codecs.rst:743 +#: ../../library/codecs.rst:744 msgid "" "Writes the concatenated iterable of strings to the stream (possibly by " "reusing the :meth:`write` method). Infinite or very large iterables are not " "supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: ../../library/codecs.rst:751 ../../library/codecs.rst:846 +#: ../../library/codecs.rst:752 ../../library/codecs.rst:847 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: ../../library/codecs.rst:753 +#: ../../library/codecs.rst:754 msgid "" "Calling this method should ensure that the data on the output is put into a " "clean state that allows appending of new fresh data without having to rescan " "the whole stream to recover state." msgstr "" -#: ../../library/codecs.rst:758 +#: ../../library/codecs.rst:759 msgid "" "In addition to the above methods, the :class:`StreamWriter` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:765 +#: ../../library/codecs.rst:766 msgid "StreamReader Objects" msgstr "StreamReader 物件" -#: ../../library/codecs.rst:767 +#: ../../library/codecs.rst:768 msgid "" "The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " "the following methods which every stream reader must define in order to be " "compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:774 +#: ../../library/codecs.rst:775 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: ../../library/codecs.rst:776 +#: ../../library/codecs.rst:777 msgid "" "All stream readers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: ../../library/codecs.rst:780 +#: ../../library/codecs.rst:781 msgid "" "The *stream* argument must be a file-like object open for reading text or " "binary data, as appropriate for the specific codec." msgstr "" -#: ../../library/codecs.rst:783 +#: ../../library/codecs.rst:784 msgid "" "The :class:`StreamReader` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: ../../library/codecs.rst:787 +#: ../../library/codecs.rst:788 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -979,24 +979,24 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:791 +#: ../../library/codecs.rst:792 msgid "" "The set of allowed values for the *errors* argument can be extended with :" "func:`register_error`." msgstr "" -#: ../../library/codecs.rst:797 +#: ../../library/codecs.rst:798 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: ../../library/codecs.rst:799 +#: ../../library/codecs.rst:800 msgid "" "The *chars* argument indicates the number of decoded code points or bytes to " "return. The :func:`read` method will never return more data than requested, " "but it might return less, if there is not enough available." msgstr "" -#: ../../library/codecs.rst:804 +#: ../../library/codecs.rst:805 msgid "" "The *size* argument indicates the approximate maximum number of encoded " "bytes or code points to read for decoding. The decoder can modify this " @@ -1005,13 +1005,13 @@ msgid "" "huge files in one step." msgstr "" -#: ../../library/codecs.rst:811 +#: ../../library/codecs.rst:812 msgid "" "The *firstline* flag indicates that it would be sufficient to only return " "the first line, if there are decoding errors on later lines." msgstr "" -#: ../../library/codecs.rst:815 +#: ../../library/codecs.rst:816 msgid "" "The method should use a greedy read strategy meaning that it should read as " "much data as is allowed within the definition of the encoding and the given " @@ -1019,68 +1019,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: ../../library/codecs.rst:823 +#: ../../library/codecs.rst:824 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: ../../library/codecs.rst:825 +#: ../../library/codecs.rst:826 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: ../../library/codecs.rst:828 +#: ../../library/codecs.rst:829 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: ../../library/codecs.rst:834 +#: ../../library/codecs.rst:835 msgid "" "Read all lines available on the input stream and return them as a list of " "lines." msgstr "" -#: ../../library/codecs.rst:837 +#: ../../library/codecs.rst:838 msgid "" "Line-endings are implemented using the codec's :meth:`decode` method and are " "included in the list entries if *keepends* is true." msgstr "" -#: ../../library/codecs.rst:840 +#: ../../library/codecs.rst:841 msgid "" "*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" "`read` method." msgstr "" -#: ../../library/codecs.rst:848 +#: ../../library/codecs.rst:849 msgid "" "Note that no stream repositioning should take place. This method is " "primarily intended to be able to recover from decoding errors." msgstr "" -#: ../../library/codecs.rst:852 +#: ../../library/codecs.rst:853 msgid "" "In addition to the above methods, the :class:`StreamReader` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:858 +#: ../../library/codecs.rst:859 msgid "StreamReaderWriter Objects" msgstr "StreamReaderWriter 物件" -#: ../../library/codecs.rst:860 +#: ../../library/codecs.rst:861 msgid "" "The :class:`StreamReaderWriter` is a convenience class that allows wrapping " "streams which work in both read and write modes." msgstr "" -#: ../../library/codecs.rst:863 ../../library/codecs.rst:887 +#: ../../library/codecs.rst:864 ../../library/codecs.rst:888 msgid "" "The design is such that one can use the factory functions returned by the :" "func:`lookup` function to construct the instance." msgstr "" -#: ../../library/codecs.rst:869 +#: ../../library/codecs.rst:870 msgid "" "Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " "object. *Reader* and *Writer* must be factory functions or classes providing " @@ -1089,24 +1089,24 @@ msgid "" "writers." msgstr "" -#: ../../library/codecs.rst:874 +#: ../../library/codecs.rst:875 msgid "" ":class:`StreamReaderWriter` instances define the combined interfaces of :" "class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " "other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:882 +#: ../../library/codecs.rst:883 msgid "StreamRecoder Objects" msgstr "StreamRecoder 物件" -#: ../../library/codecs.rst:884 +#: ../../library/codecs.rst:885 msgid "" "The :class:`StreamRecoder` translates data from one encoding to another, " "which is sometimes useful when dealing with different encoding environments." msgstr "" -#: ../../library/codecs.rst:893 +#: ../../library/codecs.rst:894 msgid "" "Creates a :class:`StreamRecoder` instance which implements a two-way " "conversion: *encode* and *decode* work on the frontend — the data visible to " @@ -1114,17 +1114,17 @@ msgid "" "work on the backend — the data in *stream*." msgstr "" -#: ../../library/codecs.rst:898 +#: ../../library/codecs.rst:899 msgid "" "You can use these objects to do transparent transcodings, e.g., from Latin-1 " "to UTF-8 and back." msgstr "" -#: ../../library/codecs.rst:901 +#: ../../library/codecs.rst:902 msgid "The *stream* argument must be a file-like object." msgstr "" -#: ../../library/codecs.rst:903 +#: ../../library/codecs.rst:904 msgid "" "The *encode* and *decode* arguments must adhere to the :class:`Codec` " "interface. *Reader* and *Writer* must be factory functions or classes " @@ -1132,24 +1132,24 @@ msgid "" "interface respectively." msgstr "" -#: ../../library/codecs.rst:908 +#: ../../library/codecs.rst:909 msgid "" "Error handling is done in the same way as defined for the stream readers and " "writers." msgstr "" -#: ../../library/codecs.rst:912 +#: ../../library/codecs.rst:913 msgid "" ":class:`StreamRecoder` instances define the combined interfaces of :class:" "`StreamReader` and :class:`StreamWriter` classes. They inherit all other " "methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:920 +#: ../../library/codecs.rst:921 msgid "Encodings and Unicode" msgstr "" -#: ../../library/codecs.rst:922 +#: ../../library/codecs.rst:923 msgid "" "Strings are stored internally as sequences of code points in range ``U" "+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " @@ -1161,7 +1161,7 @@ msgid "" "which are collectivity referred to as :term:`text encodings `." msgstr "" -#: ../../library/codecs.rst:932 +#: ../../library/codecs.rst:933 msgid "" "The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " "the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " @@ -1172,7 +1172,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: ../../library/codecs.rst:940 +#: ../../library/codecs.rst:941 msgid "" "There's another group of encodings (the so called charmap encodings) that " "choose a different subset of all Unicode code points and how these code " @@ -1182,7 +1182,7 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: ../../library/codecs.rst:947 +#: ../../library/codecs.rst:948 msgid "" "All of these encodings can only encode 256 of the 1114112 code points " "defined in Unicode. A simple and straightforward way that can store each " @@ -1212,7 +1212,7 @@ msgid "" "normal character that will be decoded like any other." msgstr "" -#: ../../library/codecs.rst:973 +#: ../../library/codecs.rst:974 msgid "" "There's another encoding that is able to encode the full range of Unicode " "characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " @@ -1223,59 +1223,59 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: ../../library/codecs.rst:982 +#: ../../library/codecs.rst:983 msgid "Range" msgstr "" -#: ../../library/codecs.rst:982 +#: ../../library/codecs.rst:983 msgid "Encoding" msgstr "" -#: ../../library/codecs.rst:984 +#: ../../library/codecs.rst:985 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: ../../library/codecs.rst:984 +#: ../../library/codecs.rst:985 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: ../../library/codecs.rst:986 +#: ../../library/codecs.rst:987 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: ../../library/codecs.rst:986 +#: ../../library/codecs.rst:987 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: ../../library/codecs.rst:988 +#: ../../library/codecs.rst:989 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: ../../library/codecs.rst:988 +#: ../../library/codecs.rst:989 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: ../../library/codecs.rst:990 +#: ../../library/codecs.rst:991 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: ../../library/codecs.rst:990 +#: ../../library/codecs.rst:991 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: ../../library/codecs.rst:993 +#: ../../library/codecs.rst:994 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: ../../library/codecs.rst:995 +#: ../../library/codecs.rst:996 msgid "" "As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " "character in the decoded string (even if it's the first character) is " "treated as a ``ZERO WIDTH NO-BREAK SPACE``." msgstr "" -#: ../../library/codecs.rst:999 +#: ../../library/codecs.rst:1000 msgid "" "Without external information it's impossible to reliably determine which " "encoding was used for encoding a string. Each charmap encoding can decode " @@ -1301,7 +1301,7 @@ msgstr "" msgid "INVERTED QUESTION MARK" msgstr "" -#: ../../library/codecs.rst:1015 +#: ../../library/codecs.rst:1016 msgid "" "in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " "can be correctly guessed from the byte sequence. So here the BOM is not used " @@ -1313,11 +1313,11 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: ../../library/codecs.rst:1028 +#: ../../library/codecs.rst:1029 msgid "Standard Encodings" msgstr "" -#: ../../library/codecs.rst:1030 +#: ../../library/codecs.rst:1031 msgid "" "Python comes with a number of codecs built-in, either implemented as C " "functions or with dictionaries as mapping tables. The following table lists " @@ -1329,7 +1329,7 @@ msgid "" "alias for the ``'utf_8'`` codec." msgstr "" -#: ../../library/codecs.rst:1040 +#: ../../library/codecs.rst:1041 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1339,11 +1339,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: ../../library/codecs.rst:1048 +#: ../../library/codecs.rst:1049 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: ../../library/codecs.rst:1051 +#: ../../library/codecs.rst:1052 msgid "" "Many of the character sets support the same languages. They vary in " "individual characters (e.g. whether the EURO SIGN is supported or not), and " @@ -1351,504 +1351,504 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: ../../library/codecs.rst:1056 +#: ../../library/codecs.rst:1057 msgid "an ISO 8859 codeset" msgstr "" -#: ../../library/codecs.rst:1058 +#: ../../library/codecs.rst:1059 msgid "" "a Microsoft Windows code page, which is typically derived from an 8859 " "codeset, but replaces control characters with additional graphic characters" msgstr "" -#: ../../library/codecs.rst:1061 +#: ../../library/codecs.rst:1062 msgid "an IBM EBCDIC code page" msgstr "" -#: ../../library/codecs.rst:1063 +#: ../../library/codecs.rst:1064 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: ../../library/codecs.rst:1068 ../../library/codecs.rst:1323 -#: ../../library/codecs.rst:1390 ../../library/codecs.rst:1445 +#: ../../library/codecs.rst:1069 ../../library/codecs.rst:1324 +#: ../../library/codecs.rst:1391 ../../library/codecs.rst:1446 msgid "Codec" msgstr "" -#: ../../library/codecs.rst:1068 ../../library/codecs.rst:1323 -#: ../../library/codecs.rst:1390 ../../library/codecs.rst:1445 +#: ../../library/codecs.rst:1069 ../../library/codecs.rst:1324 +#: ../../library/codecs.rst:1391 ../../library/codecs.rst:1446 msgid "Aliases" msgstr "" -#: ../../library/codecs.rst:1068 +#: ../../library/codecs.rst:1069 msgid "Languages" msgstr "語言" -#: ../../library/codecs.rst:1070 +#: ../../library/codecs.rst:1071 msgid "ascii" msgstr "ascii" -#: ../../library/codecs.rst:1070 +#: ../../library/codecs.rst:1071 msgid "646, us-ascii" msgstr "646, us-ascii" -#: ../../library/codecs.rst:1070 ../../library/codecs.rst:1076 -#: ../../library/codecs.rst:1084 +#: ../../library/codecs.rst:1071 ../../library/codecs.rst:1077 +#: ../../library/codecs.rst:1085 msgid "English" msgstr "英文" -#: ../../library/codecs.rst:1072 +#: ../../library/codecs.rst:1073 msgid "big5" msgstr "big5" -#: ../../library/codecs.rst:1072 +#: ../../library/codecs.rst:1073 msgid "big5-tw, csbig5" msgstr "big5-tw, csbig5" -#: ../../library/codecs.rst:1072 ../../library/codecs.rst:1074 -#: ../../library/codecs.rst:1132 +#: ../../library/codecs.rst:1073 ../../library/codecs.rst:1075 +#: ../../library/codecs.rst:1133 msgid "Traditional Chinese" msgstr "繁體中文" -#: ../../library/codecs.rst:1074 +#: ../../library/codecs.rst:1075 msgid "big5hkscs" msgstr "big5hkscs" -#: ../../library/codecs.rst:1074 +#: ../../library/codecs.rst:1075 msgid "big5-hkscs, hkscs" msgstr "big5-hkscs, hkscs" -#: ../../library/codecs.rst:1076 +#: ../../library/codecs.rst:1077 msgid "cp037" msgstr "cp037" -#: ../../library/codecs.rst:1076 +#: ../../library/codecs.rst:1077 msgid "IBM037, IBM039" msgstr "IBM037, IBM039" -#: ../../library/codecs.rst:1078 +#: ../../library/codecs.rst:1079 msgid "cp273" msgstr "cp273" -#: ../../library/codecs.rst:1078 +#: ../../library/codecs.rst:1079 msgid "273, IBM273, csIBM273" msgstr "273, IBM273, csIBM273" -#: ../../library/codecs.rst:1078 +#: ../../library/codecs.rst:1079 msgid "German" msgstr "德文" -#: ../../library/codecs.rst:1082 +#: ../../library/codecs.rst:1083 msgid "cp424" msgstr "cp424" -#: ../../library/codecs.rst:1082 +#: ../../library/codecs.rst:1083 msgid "EBCDIC-CP-HE, IBM424" msgstr "EBCDIC-CP-HE, IBM424" -#: ../../library/codecs.rst:1082 ../../library/codecs.rst:1102 -#: ../../library/codecs.rst:1112 ../../library/codecs.rst:1155 -#: ../../library/codecs.rst:1218 +#: ../../library/codecs.rst:1083 ../../library/codecs.rst:1103 +#: ../../library/codecs.rst:1113 ../../library/codecs.rst:1156 +#: ../../library/codecs.rst:1219 msgid "Hebrew" msgstr "希伯來文" -#: ../../library/codecs.rst:1084 +#: ../../library/codecs.rst:1085 msgid "cp437" msgstr "cp437" -#: ../../library/codecs.rst:1084 +#: ../../library/codecs.rst:1085 msgid "437, IBM437" msgstr "437, IBM437" -#: ../../library/codecs.rst:1086 +#: ../../library/codecs.rst:1087 msgid "cp500" msgstr "cp500" -#: ../../library/codecs.rst:1086 +#: ../../library/codecs.rst:1087 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" -#: ../../library/codecs.rst:1086 ../../library/codecs.rst:1095 -#: ../../library/codecs.rst:1106 ../../library/codecs.rst:1142 -#: ../../library/codecs.rst:1149 ../../library/codecs.rst:1202 -#: ../../library/codecs.rst:1230 ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1087 ../../library/codecs.rst:1096 +#: ../../library/codecs.rst:1107 ../../library/codecs.rst:1143 +#: ../../library/codecs.rst:1150 ../../library/codecs.rst:1203 +#: ../../library/codecs.rst:1231 ../../library/codecs.rst:1259 msgid "Western Europe" msgstr "" -#: ../../library/codecs.rst:1089 +#: ../../library/codecs.rst:1090 msgid "cp720" msgstr "cp720" -#: ../../library/codecs.rst:1089 ../../library/codecs.rst:1116 -#: ../../library/codecs.rst:1157 ../../library/codecs.rst:1214 +#: ../../library/codecs.rst:1090 ../../library/codecs.rst:1117 +#: ../../library/codecs.rst:1158 ../../library/codecs.rst:1215 msgid "Arabic" msgstr "阿拉伯文" -#: ../../library/codecs.rst:1091 +#: ../../library/codecs.rst:1092 msgid "cp737" msgstr "cp737" -#: ../../library/codecs.rst:1091 ../../library/codecs.rst:1122 -#: ../../library/codecs.rst:1126 ../../library/codecs.rst:1151 -#: ../../library/codecs.rst:1216 ../../library/codecs.rst:1251 +#: ../../library/codecs.rst:1092 ../../library/codecs.rst:1123 +#: ../../library/codecs.rst:1127 ../../library/codecs.rst:1152 +#: ../../library/codecs.rst:1217 ../../library/codecs.rst:1252 msgid "Greek" msgstr "希臘文" -#: ../../library/codecs.rst:1093 +#: ../../library/codecs.rst:1094 msgid "cp775" msgstr "cp775" -#: ../../library/codecs.rst:1093 +#: ../../library/codecs.rst:1094 msgid "IBM775" msgstr "IBM775" -#: ../../library/codecs.rst:1093 ../../library/codecs.rst:1159 -#: ../../library/codecs.rst:1209 ../../library/codecs.rst:1226 +#: ../../library/codecs.rst:1094 ../../library/codecs.rst:1160 +#: ../../library/codecs.rst:1210 ../../library/codecs.rst:1227 msgid "Baltic languages" msgstr "" -#: ../../library/codecs.rst:1095 +#: ../../library/codecs.rst:1096 msgid "cp850" msgstr "cp850" -#: ../../library/codecs.rst:1095 +#: ../../library/codecs.rst:1096 msgid "850, IBM850" msgstr "850, IBM850" -#: ../../library/codecs.rst:1097 +#: ../../library/codecs.rst:1098 msgid "cp852" msgstr "cp852" -#: ../../library/codecs.rst:1097 +#: ../../library/codecs.rst:1098 msgid "852, IBM852" msgstr "852, IBM852" -#: ../../library/codecs.rst:1097 ../../library/codecs.rst:1144 -#: ../../library/codecs.rst:1205 ../../library/codecs.rst:1255 +#: ../../library/codecs.rst:1098 ../../library/codecs.rst:1145 +#: ../../library/codecs.rst:1206 ../../library/codecs.rst:1256 msgid "Central and Eastern Europe" msgstr "" -#: ../../library/codecs.rst:1099 +#: ../../library/codecs.rst:1100 msgid "cp855" msgstr "cp855" -#: ../../library/codecs.rst:1099 +#: ../../library/codecs.rst:1100 msgid "855, IBM855" msgstr "855, IBM855" -#: ../../library/codecs.rst:1099 ../../library/codecs.rst:1146 -#: ../../library/codecs.rst:1211 ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1100 ../../library/codecs.rst:1147 +#: ../../library/codecs.rst:1212 ../../library/codecs.rst:1249 msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian" msgstr "" -#: ../../library/codecs.rst:1102 +#: ../../library/codecs.rst:1103 msgid "cp856" msgstr "cp856" -#: ../../library/codecs.rst:1104 +#: ../../library/codecs.rst:1105 msgid "cp857" msgstr "cp857" -#: ../../library/codecs.rst:1104 +#: ../../library/codecs.rst:1105 msgid "857, IBM857" msgstr "857, IBM857" -#: ../../library/codecs.rst:1104 ../../library/codecs.rst:1136 -#: ../../library/codecs.rst:1153 ../../library/codecs.rst:1220 -#: ../../library/codecs.rst:1260 +#: ../../library/codecs.rst:1105 ../../library/codecs.rst:1137 +#: ../../library/codecs.rst:1154 ../../library/codecs.rst:1221 +#: ../../library/codecs.rst:1261 msgid "Turkish" msgstr "土耳其文" -#: ../../library/codecs.rst:1106 +#: ../../library/codecs.rst:1107 msgid "cp858" msgstr "cp858" -#: ../../library/codecs.rst:1106 +#: ../../library/codecs.rst:1107 msgid "858, IBM858" msgstr "858, IBM858" -#: ../../library/codecs.rst:1108 +#: ../../library/codecs.rst:1109 msgid "cp860" msgstr "cp860" -#: ../../library/codecs.rst:1108 +#: ../../library/codecs.rst:1109 msgid "860, IBM860" msgstr "860, IBM860" -#: ../../library/codecs.rst:1108 +#: ../../library/codecs.rst:1109 msgid "Portuguese" msgstr "" -#: ../../library/codecs.rst:1110 +#: ../../library/codecs.rst:1111 msgid "cp861" msgstr "cp861" -#: ../../library/codecs.rst:1110 +#: ../../library/codecs.rst:1111 msgid "861, CP-IS, IBM861" msgstr "861, CP-IS, IBM861" -#: ../../library/codecs.rst:1110 ../../library/codecs.rst:1253 +#: ../../library/codecs.rst:1111 ../../library/codecs.rst:1254 msgid "Icelandic" msgstr "" -#: ../../library/codecs.rst:1112 +#: ../../library/codecs.rst:1113 msgid "cp862" msgstr "cp862" -#: ../../library/codecs.rst:1112 +#: ../../library/codecs.rst:1113 msgid "862, IBM862" msgstr "862, IBM862" -#: ../../library/codecs.rst:1114 +#: ../../library/codecs.rst:1115 msgid "cp863" msgstr "cp863" -#: ../../library/codecs.rst:1114 +#: ../../library/codecs.rst:1115 msgid "863, IBM863" msgstr "863, IBM863" -#: ../../library/codecs.rst:1114 +#: ../../library/codecs.rst:1115 msgid "Canadian" msgstr "" -#: ../../library/codecs.rst:1116 +#: ../../library/codecs.rst:1117 msgid "cp864" msgstr "cp864" -#: ../../library/codecs.rst:1116 +#: ../../library/codecs.rst:1117 msgid "IBM864" msgstr "IBM864" -#: ../../library/codecs.rst:1118 +#: ../../library/codecs.rst:1119 msgid "cp865" msgstr "cp865" -#: ../../library/codecs.rst:1118 +#: ../../library/codecs.rst:1119 msgid "865, IBM865" msgstr "865, IBM865" -#: ../../library/codecs.rst:1118 +#: ../../library/codecs.rst:1119 msgid "Danish, Norwegian" msgstr "" -#: ../../library/codecs.rst:1120 +#: ../../library/codecs.rst:1121 msgid "cp866" msgstr "cp866" -#: ../../library/codecs.rst:1120 +#: ../../library/codecs.rst:1121 msgid "866, IBM866" msgstr "866, IBM866" -#: ../../library/codecs.rst:1120 ../../library/codecs.rst:1236 +#: ../../library/codecs.rst:1121 ../../library/codecs.rst:1237 msgid "Russian" msgstr "俄羅斯文" -#: ../../library/codecs.rst:1122 +#: ../../library/codecs.rst:1123 msgid "cp869" msgstr "cp869" -#: ../../library/codecs.rst:1122 +#: ../../library/codecs.rst:1123 msgid "869, CP-GR, IBM869" msgstr "869, CP-GR, IBM869" -#: ../../library/codecs.rst:1124 +#: ../../library/codecs.rst:1125 msgid "cp874" msgstr "cp874" -#: ../../library/codecs.rst:1124 +#: ../../library/codecs.rst:1125 msgid "Thai" msgstr "泰文" -#: ../../library/codecs.rst:1126 +#: ../../library/codecs.rst:1127 msgid "cp875" msgstr "cp875" -#: ../../library/codecs.rst:1128 +#: ../../library/codecs.rst:1129 msgid "cp932" msgstr "cp932" -#: ../../library/codecs.rst:1128 +#: ../../library/codecs.rst:1129 msgid "932, ms932, mskanji, ms-kanji" msgstr "932, ms932, mskanji, ms-kanji" -#: ../../library/codecs.rst:1128 ../../library/codecs.rst:1163 -#: ../../library/codecs.rst:1165 ../../library/codecs.rst:1167 -#: ../../library/codecs.rst:1184 ../../library/codecs.rst:1187 -#: ../../library/codecs.rst:1192 ../../library/codecs.rst:1195 -#: ../../library/codecs.rst:1197 ../../library/codecs.rst:1265 -#: ../../library/codecs.rst:1268 ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1129 ../../library/codecs.rst:1164 +#: ../../library/codecs.rst:1166 ../../library/codecs.rst:1168 +#: ../../library/codecs.rst:1185 ../../library/codecs.rst:1188 +#: ../../library/codecs.rst:1193 ../../library/codecs.rst:1196 +#: ../../library/codecs.rst:1198 ../../library/codecs.rst:1266 +#: ../../library/codecs.rst:1269 ../../library/codecs.rst:1272 msgid "Japanese" msgstr "日文" -#: ../../library/codecs.rst:1130 +#: ../../library/codecs.rst:1131 msgid "cp949" msgstr "cp949" -#: ../../library/codecs.rst:1130 +#: ../../library/codecs.rst:1131 msgid "949, ms949, uhc" msgstr "949, ms949, uhc" -#: ../../library/codecs.rst:1130 ../../library/codecs.rst:1169 -#: ../../library/codecs.rst:1199 ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1131 ../../library/codecs.rst:1170 +#: ../../library/codecs.rst:1200 ../../library/codecs.rst:1235 msgid "Korean" msgstr "韓文" -#: ../../library/codecs.rst:1132 +#: ../../library/codecs.rst:1133 msgid "cp950" msgstr "cp950" -#: ../../library/codecs.rst:1132 +#: ../../library/codecs.rst:1133 msgid "950, ms950" msgstr "950, ms950" -#: ../../library/codecs.rst:1134 +#: ../../library/codecs.rst:1135 msgid "cp1006" msgstr "cp1006" -#: ../../library/codecs.rst:1134 +#: ../../library/codecs.rst:1135 msgid "Urdu" msgstr "" -#: ../../library/codecs.rst:1136 +#: ../../library/codecs.rst:1137 msgid "cp1026" msgstr "cp1026" -#: ../../library/codecs.rst:1136 +#: ../../library/codecs.rst:1137 msgid "ibm1026" msgstr "ibm1026" -#: ../../library/codecs.rst:1138 +#: ../../library/codecs.rst:1139 msgid "cp1125" msgstr "cp1125" -#: ../../library/codecs.rst:1138 +#: ../../library/codecs.rst:1139 msgid "1125, ibm1125, cp866u, ruscii" msgstr "1125, ibm1125, cp866u, ruscii" -#: ../../library/codecs.rst:1138 ../../library/codecs.rst:1242 +#: ../../library/codecs.rst:1139 ../../library/codecs.rst:1243 msgid "Ukrainian" msgstr "烏克蘭文" -#: ../../library/codecs.rst:1142 +#: ../../library/codecs.rst:1143 msgid "cp1140" msgstr "cp1140" -#: ../../library/codecs.rst:1142 +#: ../../library/codecs.rst:1143 msgid "ibm1140" msgstr "ibm1140" -#: ../../library/codecs.rst:1144 +#: ../../library/codecs.rst:1145 msgid "cp1250" msgstr "cp1250" -#: ../../library/codecs.rst:1144 +#: ../../library/codecs.rst:1145 msgid "windows-1250" msgstr "windows-1250" -#: ../../library/codecs.rst:1146 +#: ../../library/codecs.rst:1147 msgid "cp1251" msgstr "cp1251" -#: ../../library/codecs.rst:1146 +#: ../../library/codecs.rst:1147 msgid "windows-1251" msgstr "windows-1251" -#: ../../library/codecs.rst:1149 +#: ../../library/codecs.rst:1150 msgid "cp1252" msgstr "cp1252" -#: ../../library/codecs.rst:1149 +#: ../../library/codecs.rst:1150 msgid "windows-1252" msgstr "windows-1252" -#: ../../library/codecs.rst:1151 +#: ../../library/codecs.rst:1152 msgid "cp1253" msgstr "cp1253" -#: ../../library/codecs.rst:1151 +#: ../../library/codecs.rst:1152 msgid "windows-1253" msgstr "windows-1253" -#: ../../library/codecs.rst:1153 +#: ../../library/codecs.rst:1154 msgid "cp1254" msgstr "cp1254" -#: ../../library/codecs.rst:1153 +#: ../../library/codecs.rst:1154 msgid "windows-1254" msgstr "windows-1254" -#: ../../library/codecs.rst:1155 +#: ../../library/codecs.rst:1156 msgid "cp1255" msgstr "cp1255" -#: ../../library/codecs.rst:1155 +#: ../../library/codecs.rst:1156 msgid "windows-1255" msgstr "windows-1255" -#: ../../library/codecs.rst:1157 +#: ../../library/codecs.rst:1158 msgid "cp1256" msgstr "cp1256" -#: ../../library/codecs.rst:1157 +#: ../../library/codecs.rst:1158 msgid "windows-1256" msgstr "windows-1256" -#: ../../library/codecs.rst:1159 +#: ../../library/codecs.rst:1160 msgid "cp1257" msgstr "cp1257" -#: ../../library/codecs.rst:1159 +#: ../../library/codecs.rst:1160 msgid "windows-1257" msgstr "windows-1257" -#: ../../library/codecs.rst:1161 +#: ../../library/codecs.rst:1162 msgid "cp1258" msgstr "cp1258" -#: ../../library/codecs.rst:1161 +#: ../../library/codecs.rst:1162 msgid "windows-1258" msgstr "windows-1258" -#: ../../library/codecs.rst:1161 +#: ../../library/codecs.rst:1162 msgid "Vietnamese" msgstr "越南文" -#: ../../library/codecs.rst:1163 +#: ../../library/codecs.rst:1164 msgid "euc_jp" msgstr "euc_jp" -#: ../../library/codecs.rst:1163 +#: ../../library/codecs.rst:1164 msgid "eucjp, ujis, u-jis" msgstr "eucjp, ujis, u-jis" -#: ../../library/codecs.rst:1165 +#: ../../library/codecs.rst:1166 msgid "euc_jis_2004" msgstr "euc_jis_2004" -#: ../../library/codecs.rst:1165 +#: ../../library/codecs.rst:1166 msgid "jisx0213, eucjis2004" msgstr "jisx0213, eucjis2004" -#: ../../library/codecs.rst:1167 +#: ../../library/codecs.rst:1168 msgid "euc_jisx0213" msgstr "euc_jisx0213" -#: ../../library/codecs.rst:1167 +#: ../../library/codecs.rst:1168 msgid "eucjisx0213" msgstr "eucjisx0213" -#: ../../library/codecs.rst:1169 +#: ../../library/codecs.rst:1170 msgid "euc_kr" msgstr "euc_kr" -#: ../../library/codecs.rst:1169 +#: ../../library/codecs.rst:1170 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" -#: ../../library/codecs.rst:1173 +#: ../../library/codecs.rst:1174 msgid "gb2312" msgstr "gb2312" -#: ../../library/codecs.rst:1173 +#: ../../library/codecs.rst:1174 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -1856,446 +1856,446 @@ msgstr "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" -#: ../../library/codecs.rst:1173 ../../library/codecs.rst:1182 +#: ../../library/codecs.rst:1174 ../../library/codecs.rst:1183 msgid "Simplified Chinese" msgstr "簡體中文" -#: ../../library/codecs.rst:1178 +#: ../../library/codecs.rst:1179 msgid "gbk" msgstr "gbk" -#: ../../library/codecs.rst:1178 +#: ../../library/codecs.rst:1179 msgid "936, cp936, ms936" msgstr "936, cp936, ms936" -#: ../../library/codecs.rst:1178 ../../library/codecs.rst:1180 +#: ../../library/codecs.rst:1179 ../../library/codecs.rst:1181 msgid "Unified Chinese" msgstr "" -#: ../../library/codecs.rst:1180 +#: ../../library/codecs.rst:1181 msgid "gb18030" msgstr "gb18030" -#: ../../library/codecs.rst:1180 +#: ../../library/codecs.rst:1181 msgid "gb18030-2000" msgstr "gb18030-2000" -#: ../../library/codecs.rst:1182 +#: ../../library/codecs.rst:1183 msgid "hz" msgstr "" -#: ../../library/codecs.rst:1182 +#: ../../library/codecs.rst:1183 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "hzgb, hz-gb, hz-gb-2312" -#: ../../library/codecs.rst:1184 +#: ../../library/codecs.rst:1185 msgid "iso2022_jp" msgstr "iso2022_jp" -#: ../../library/codecs.rst:1184 +#: ../../library/codecs.rst:1185 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "csiso2022jp, iso2022jp, iso-2022-jp" -#: ../../library/codecs.rst:1187 +#: ../../library/codecs.rst:1188 msgid "iso2022_jp_1" msgstr "iso2022_jp_1" -#: ../../library/codecs.rst:1187 +#: ../../library/codecs.rst:1188 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "iso2022jp-1, iso-2022-jp-1" -#: ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1190 msgid "iso2022_jp_2" msgstr "iso2022_jp_2" -#: ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1190 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "iso2022jp-2, iso-2022-jp-2" -#: ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1190 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: ../../library/codecs.rst:1192 +#: ../../library/codecs.rst:1193 msgid "iso2022_jp_2004" msgstr "iso2022_jp_2004" -#: ../../library/codecs.rst:1192 +#: ../../library/codecs.rst:1193 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "iso2022jp-2004, iso-2022-jp-2004" -#: ../../library/codecs.rst:1195 +#: ../../library/codecs.rst:1196 msgid "iso2022_jp_3" msgstr "iso2022_jp_3" -#: ../../library/codecs.rst:1195 +#: ../../library/codecs.rst:1196 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "iso2022jp-3, iso-2022-jp-3" -#: ../../library/codecs.rst:1197 +#: ../../library/codecs.rst:1198 msgid "iso2022_jp_ext" msgstr "iso2022_jp_ext" -#: ../../library/codecs.rst:1197 +#: ../../library/codecs.rst:1198 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "iso2022jp-ext, iso-2022-jp-ext" -#: ../../library/codecs.rst:1199 +#: ../../library/codecs.rst:1200 msgid "iso2022_kr" msgstr "iso2022_kr" -#: ../../library/codecs.rst:1199 +#: ../../library/codecs.rst:1200 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "csiso2022kr, iso2022kr, iso-2022-kr" -#: ../../library/codecs.rst:1202 +#: ../../library/codecs.rst:1203 msgid "latin_1" msgstr "latin_1" -#: ../../library/codecs.rst:1202 +#: ../../library/codecs.rst:1203 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" -#: ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1206 msgid "iso8859_2" msgstr "iso8859_2" -#: ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1206 msgid "iso-8859-2, latin2, L2" msgstr "iso-8859-2, latin2, L2" -#: ../../library/codecs.rst:1207 +#: ../../library/codecs.rst:1208 msgid "iso8859_3" msgstr "iso8859_3" -#: ../../library/codecs.rst:1207 +#: ../../library/codecs.rst:1208 msgid "iso-8859-3, latin3, L3" msgstr "iso-8859-3, latin3, L3" -#: ../../library/codecs.rst:1207 +#: ../../library/codecs.rst:1208 msgid "Esperanto, Maltese" msgstr "" -#: ../../library/codecs.rst:1209 +#: ../../library/codecs.rst:1210 msgid "iso8859_4" msgstr "iso8859_4" -#: ../../library/codecs.rst:1209 +#: ../../library/codecs.rst:1210 msgid "iso-8859-4, latin4, L4" msgstr "iso-8859-4, latin4, L4" -#: ../../library/codecs.rst:1211 +#: ../../library/codecs.rst:1212 msgid "iso8859_5" msgstr "iso8859_5" -#: ../../library/codecs.rst:1211 +#: ../../library/codecs.rst:1212 msgid "iso-8859-5, cyrillic" msgstr "iso-8859-5, cyrillic" -#: ../../library/codecs.rst:1214 +#: ../../library/codecs.rst:1215 msgid "iso8859_6" msgstr "iso8859_6" -#: ../../library/codecs.rst:1214 +#: ../../library/codecs.rst:1215 msgid "iso-8859-6, arabic" msgstr "iso-8859-6, arabic" -#: ../../library/codecs.rst:1216 +#: ../../library/codecs.rst:1217 msgid "iso8859_7" msgstr "iso8859_7" -#: ../../library/codecs.rst:1216 +#: ../../library/codecs.rst:1217 msgid "iso-8859-7, greek, greek8" msgstr "iso-8859-7, greek, greek8" -#: ../../library/codecs.rst:1218 +#: ../../library/codecs.rst:1219 msgid "iso8859_8" msgstr "iso8859_8" -#: ../../library/codecs.rst:1218 +#: ../../library/codecs.rst:1219 msgid "iso-8859-8, hebrew" msgstr "iso-8859-8, hebrew" -#: ../../library/codecs.rst:1220 +#: ../../library/codecs.rst:1221 msgid "iso8859_9" msgstr "iso8859_9" -#: ../../library/codecs.rst:1220 +#: ../../library/codecs.rst:1221 msgid "iso-8859-9, latin5, L5" msgstr "iso-8859-9, latin5, L5" -#: ../../library/codecs.rst:1222 +#: ../../library/codecs.rst:1223 msgid "iso8859_10" msgstr "iso8859_10" -#: ../../library/codecs.rst:1222 +#: ../../library/codecs.rst:1223 msgid "iso-8859-10, latin6, L6" msgstr "iso-8859-10, latin6, L6" -#: ../../library/codecs.rst:1222 +#: ../../library/codecs.rst:1223 msgid "Nordic languages" msgstr "" -#: ../../library/codecs.rst:1224 +#: ../../library/codecs.rst:1225 msgid "iso8859_11" msgstr "iso8859_11" -#: ../../library/codecs.rst:1224 +#: ../../library/codecs.rst:1225 msgid "iso-8859-11, thai" msgstr "iso-8859-11, thai" -#: ../../library/codecs.rst:1224 +#: ../../library/codecs.rst:1225 msgid "Thai languages" msgstr "" -#: ../../library/codecs.rst:1226 +#: ../../library/codecs.rst:1227 msgid "iso8859_13" msgstr "iso8859_13" -#: ../../library/codecs.rst:1226 +#: ../../library/codecs.rst:1227 msgid "iso-8859-13, latin7, L7" msgstr "iso-8859-13, latin7, L7" -#: ../../library/codecs.rst:1228 +#: ../../library/codecs.rst:1229 msgid "iso8859_14" msgstr "iso8859_14" -#: ../../library/codecs.rst:1228 +#: ../../library/codecs.rst:1229 msgid "iso-8859-14, latin8, L8" msgstr "iso-8859-14, latin8, L8" -#: ../../library/codecs.rst:1228 +#: ../../library/codecs.rst:1229 msgid "Celtic languages" msgstr "" -#: ../../library/codecs.rst:1230 +#: ../../library/codecs.rst:1231 msgid "iso8859_15" msgstr "iso8859_15" -#: ../../library/codecs.rst:1230 +#: ../../library/codecs.rst:1231 msgid "iso-8859-15, latin9, L9" msgstr "iso-8859-15, latin9, L9" -#: ../../library/codecs.rst:1232 +#: ../../library/codecs.rst:1233 msgid "iso8859_16" msgstr "iso8859_16" -#: ../../library/codecs.rst:1232 +#: ../../library/codecs.rst:1233 msgid "iso-8859-16, latin10, L10" msgstr "iso-8859-16, latin10, L10" -#: ../../library/codecs.rst:1232 +#: ../../library/codecs.rst:1233 msgid "South-Eastern Europe" msgstr "" -#: ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1235 msgid "johab" msgstr "" -#: ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1235 msgid "cp1361, ms1361" msgstr "cp1361, ms1361" -#: ../../library/codecs.rst:1236 +#: ../../library/codecs.rst:1237 msgid "koi8_r" msgstr "koi8_r" -#: ../../library/codecs.rst:1238 +#: ../../library/codecs.rst:1239 msgid "koi8_t" msgstr "koi8_t" -#: ../../library/codecs.rst:1238 +#: ../../library/codecs.rst:1239 msgid "Tajik" msgstr "" -#: ../../library/codecs.rst:1242 +#: ../../library/codecs.rst:1243 msgid "koi8_u" msgstr "koi8_u" -#: ../../library/codecs.rst:1244 +#: ../../library/codecs.rst:1245 msgid "kz1048" msgstr "kz1048" -#: ../../library/codecs.rst:1244 +#: ../../library/codecs.rst:1245 msgid "kz_1048, strk1048_2002, rk1048" msgstr "kz_1048, strk1048_2002, rk1048" -#: ../../library/codecs.rst:1244 ../../library/codecs.rst:1262 +#: ../../library/codecs.rst:1245 ../../library/codecs.rst:1263 msgid "Kazakh" msgstr "" -#: ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1249 msgid "mac_cyrillic" msgstr "mac_cyrillic" -#: ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1249 msgid "maccyrillic" msgstr "" -#: ../../library/codecs.rst:1251 +#: ../../library/codecs.rst:1252 msgid "mac_greek" msgstr "mac_greek" -#: ../../library/codecs.rst:1251 +#: ../../library/codecs.rst:1252 msgid "macgreek" msgstr "" -#: ../../library/codecs.rst:1253 +#: ../../library/codecs.rst:1254 msgid "mac_iceland" msgstr "mac_iceland" -#: ../../library/codecs.rst:1253 +#: ../../library/codecs.rst:1254 msgid "maciceland" msgstr "" -#: ../../library/codecs.rst:1255 +#: ../../library/codecs.rst:1256 msgid "mac_latin2" msgstr "mac_latin2" -#: ../../library/codecs.rst:1255 +#: ../../library/codecs.rst:1256 msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "maclatin2, maccentraleurope, mac_centeuro" -#: ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1259 msgid "mac_roman" msgstr "mac_roman" -#: ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1259 msgid "macroman, macintosh" msgstr "macroman, macintosh" -#: ../../library/codecs.rst:1260 +#: ../../library/codecs.rst:1261 msgid "mac_turkish" msgstr "mac_turkish" -#: ../../library/codecs.rst:1260 +#: ../../library/codecs.rst:1261 msgid "macturkish" msgstr "" -#: ../../library/codecs.rst:1262 +#: ../../library/codecs.rst:1263 msgid "ptcp154" msgstr "ptcp154" -#: ../../library/codecs.rst:1262 +#: ../../library/codecs.rst:1263 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "csptcp154, pt154, cp154, cyrillic-asian" -#: ../../library/codecs.rst:1265 +#: ../../library/codecs.rst:1266 msgid "shift_jis" msgstr "shift_jis" -#: ../../library/codecs.rst:1265 +#: ../../library/codecs.rst:1266 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "csshiftjis, shiftjis, sjis, s_jis" -#: ../../library/codecs.rst:1268 +#: ../../library/codecs.rst:1269 msgid "shift_jis_2004" msgstr "shift_jis_2004" -#: ../../library/codecs.rst:1268 +#: ../../library/codecs.rst:1269 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "shiftjis2004, sjis_2004, sjis2004" -#: ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1272 msgid "shift_jisx0213" msgstr "shift_jisx0213" -#: ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1272 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "shiftjisx0213, sjisx0213, s_jisx0213" -#: ../../library/codecs.rst:1274 +#: ../../library/codecs.rst:1275 msgid "utf_32" msgstr "utf_32" -#: ../../library/codecs.rst:1274 +#: ../../library/codecs.rst:1275 msgid "U32, utf32" msgstr "U32, utf32" -#: ../../library/codecs.rst:1274 ../../library/codecs.rst:1276 -#: ../../library/codecs.rst:1278 ../../library/codecs.rst:1280 -#: ../../library/codecs.rst:1282 ../../library/codecs.rst:1284 -#: ../../library/codecs.rst:1286 ../../library/codecs.rst:1288 -#: ../../library/codecs.rst:1290 +#: ../../library/codecs.rst:1275 ../../library/codecs.rst:1277 +#: ../../library/codecs.rst:1279 ../../library/codecs.rst:1281 +#: ../../library/codecs.rst:1283 ../../library/codecs.rst:1285 +#: ../../library/codecs.rst:1287 ../../library/codecs.rst:1289 +#: ../../library/codecs.rst:1291 msgid "all languages" msgstr "" -#: ../../library/codecs.rst:1276 +#: ../../library/codecs.rst:1277 msgid "utf_32_be" msgstr "utf_32_be" -#: ../../library/codecs.rst:1276 +#: ../../library/codecs.rst:1277 msgid "UTF-32BE" msgstr "UTF-32BE" -#: ../../library/codecs.rst:1278 +#: ../../library/codecs.rst:1279 msgid "utf_32_le" msgstr "utf_32_le" -#: ../../library/codecs.rst:1278 +#: ../../library/codecs.rst:1279 msgid "UTF-32LE" msgstr "UTF-32LE" -#: ../../library/codecs.rst:1280 +#: ../../library/codecs.rst:1281 msgid "utf_16" msgstr "utf_16" -#: ../../library/codecs.rst:1280 +#: ../../library/codecs.rst:1281 msgid "U16, utf16" msgstr "U16, utf16" -#: ../../library/codecs.rst:1282 +#: ../../library/codecs.rst:1283 msgid "utf_16_be" msgstr "utf_16_be" -#: ../../library/codecs.rst:1282 +#: ../../library/codecs.rst:1283 msgid "UTF-16BE" msgstr "UTF-16BE" -#: ../../library/codecs.rst:1284 +#: ../../library/codecs.rst:1285 msgid "utf_16_le" msgstr "utf_16_le" -#: ../../library/codecs.rst:1284 +#: ../../library/codecs.rst:1285 msgid "UTF-16LE" msgstr "UTF-16LE" -#: ../../library/codecs.rst:1286 +#: ../../library/codecs.rst:1287 msgid "utf_7" msgstr "utf_7" -#: ../../library/codecs.rst:1286 +#: ../../library/codecs.rst:1287 msgid "U7, unicode-1-1-utf-7" msgstr "U7, unicode-1-1-utf-7" -#: ../../library/codecs.rst:1288 +#: ../../library/codecs.rst:1289 msgid "utf_8" msgstr "utf_8" -#: ../../library/codecs.rst:1288 +#: ../../library/codecs.rst:1289 msgid "U8, UTF, utf8, cp65001" msgstr "U8, UTF, utf8, cp65001" -#: ../../library/codecs.rst:1290 +#: ../../library/codecs.rst:1291 msgid "utf_8_sig" msgstr "utf_8_sig" -#: ../../library/codecs.rst:1293 +#: ../../library/codecs.rst:1294 msgid "" "The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " "(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " "decode byte sequences that correspond to surrogate code points." msgstr "" -#: ../../library/codecs.rst:1299 +#: ../../library/codecs.rst:1300 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: ../../library/codecs.rst:1304 +#: ../../library/codecs.rst:1305 msgid "Python Specific Encodings" msgstr "" -#: ../../library/codecs.rst:1306 +#: ../../library/codecs.rst:1307 msgid "" "A number of predefined codecs are specific to Python, so their codec names " "have no meaning outside Python. These are listed in the tables below based " @@ -2305,272 +2305,272 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: ../../library/codecs.rst:1314 +#: ../../library/codecs.rst:1315 msgid "Text Encodings" msgstr "" -#: ../../library/codecs.rst:1316 +#: ../../library/codecs.rst:1317 msgid "" "The following codecs provide :class:`str` to :class:`bytes` encoding and :" "term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " "text encodings." msgstr "" -#: ../../library/codecs.rst:1325 +#: ../../library/codecs.rst:1326 msgid "idna" msgstr "idna" -#: ../../library/codecs.rst:1325 +#: ../../library/codecs.rst:1326 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: ../../library/codecs.rst:1331 +#: ../../library/codecs.rst:1332 msgid "mbcs" msgstr "mbcs" -#: ../../library/codecs.rst:1331 +#: ../../library/codecs.rst:1332 msgid "ansi, dbcs" msgstr "ansi, dbcs" -#: ../../library/codecs.rst:1331 +#: ../../library/codecs.rst:1332 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: ../../library/codecs.rst:1335 +#: ../../library/codecs.rst:1336 msgid "oem" msgstr "oem" -#: ../../library/codecs.rst:1335 +#: ../../library/codecs.rst:1336 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: ../../library/codecs.rst:1341 +#: ../../library/codecs.rst:1342 msgid "palmos" msgstr "" -#: ../../library/codecs.rst:1341 +#: ../../library/codecs.rst:1342 msgid "Encoding of PalmOS 3.5." msgstr "" -#: ../../library/codecs.rst:1343 +#: ../../library/codecs.rst:1344 msgid "punycode" msgstr "" -#: ../../library/codecs.rst:1343 +#: ../../library/codecs.rst:1344 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: ../../library/codecs.rst:1347 +#: ../../library/codecs.rst:1348 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: ../../library/codecs.rst:1347 +#: ../../library/codecs.rst:1348 msgid "" "Latin-1 encoding with ``\\uXXXX`` and ``\\UXXXXXXXX`` for other code points. " "Existing backslashes are not escaped in any way. It is used in the Python " "pickle protocol." msgstr "" -#: ../../library/codecs.rst:1356 +#: ../../library/codecs.rst:1357 msgid "undefined" msgstr "" -#: ../../library/codecs.rst:1356 +#: ../../library/codecs.rst:1357 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: ../../library/codecs.rst:1361 +#: ../../library/codecs.rst:1362 msgid "unicode_escape" msgstr "unicode_escape" -#: ../../library/codecs.rst:1361 +#: ../../library/codecs.rst:1362 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: ../../library/codecs.rst:1373 +#: ../../library/codecs.rst:1374 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: ../../library/codecs.rst:1380 +#: ../../library/codecs.rst:1381 msgid "Binary Transforms" msgstr "" -#: ../../library/codecs.rst:1382 +#: ../../library/codecs.rst:1383 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: ../../library/codecs.rst:1390 +#: ../../library/codecs.rst:1391 msgid "Encoder / decoder" msgstr "" -#: ../../library/codecs.rst:1392 +#: ../../library/codecs.rst:1393 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: ../../library/codecs.rst:1392 +#: ../../library/codecs.rst:1393 msgid "base64, base_64" msgstr "base64, base_64" -#: ../../library/codecs.rst:1392 +#: ../../library/codecs.rst:1393 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: ../../library/codecs.rst:1397 +#: ../../library/codecs.rst:1398 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: ../../library/codecs.rst:1392 +#: ../../library/codecs.rst:1393 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" -#: ../../library/codecs.rst:1403 +#: ../../library/codecs.rst:1404 msgid "bz2_codec" msgstr "bz2_codec" -#: ../../library/codecs.rst:1403 +#: ../../library/codecs.rst:1404 msgid "bz2" msgstr "bz2" -#: ../../library/codecs.rst:1403 +#: ../../library/codecs.rst:1404 msgid "Compress the operand using bz2." msgstr "" -#: ../../library/codecs.rst:1403 +#: ../../library/codecs.rst:1404 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr ":meth:`bz2.compress` / :meth:`bz2.decompress`" -#: ../../library/codecs.rst:1406 +#: ../../library/codecs.rst:1407 msgid "hex_codec" msgstr "hex_codec" -#: ../../library/codecs.rst:1406 +#: ../../library/codecs.rst:1407 msgid "hex" msgstr "hex" -#: ../../library/codecs.rst:1406 +#: ../../library/codecs.rst:1407 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: ../../library/codecs.rst:1406 +#: ../../library/codecs.rst:1407 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" -#: ../../library/codecs.rst:1411 +#: ../../library/codecs.rst:1412 msgid "quopri_codec" msgstr "quopri_codec" -#: ../../library/codecs.rst:1411 +#: ../../library/codecs.rst:1412 msgid "quopri, quotedprintable, quoted_printable" msgstr "quopri, quotedprintable, quoted_printable" -#: ../../library/codecs.rst:1411 +#: ../../library/codecs.rst:1412 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: ../../library/codecs.rst:1411 +#: ../../library/codecs.rst:1412 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" -#: ../../library/codecs.rst:1415 +#: ../../library/codecs.rst:1416 msgid "uu_codec" msgstr "uu_codec" -#: ../../library/codecs.rst:1415 +#: ../../library/codecs.rst:1416 msgid "uu" msgstr "uu" -#: ../../library/codecs.rst:1415 +#: ../../library/codecs.rst:1416 msgid "Convert the operand using uuencode." msgstr "" -#: ../../library/codecs.rst:1415 +#: ../../library/codecs.rst:1416 msgid ":meth:`uu.encode` / :meth:`uu.decode`" msgstr ":meth:`uu.encode` / :meth:`uu.decode`" -#: ../../library/codecs.rst:1418 +#: ../../library/codecs.rst:1419 msgid "zlib_codec" msgstr "zlib_codec" -#: ../../library/codecs.rst:1418 +#: ../../library/codecs.rst:1419 msgid "zip, zlib" msgstr "zip, zlib" -#: ../../library/codecs.rst:1418 +#: ../../library/codecs.rst:1419 msgid "Compress the operand using gzip." msgstr "" -#: ../../library/codecs.rst:1418 +#: ../../library/codecs.rst:1419 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: ../../library/codecs.rst:1422 +#: ../../library/codecs.rst:1423 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: ../../library/codecs.rst:1426 +#: ../../library/codecs.rst:1427 msgid "Restoration of the binary transforms." msgstr "" -#: ../../library/codecs.rst:1429 +#: ../../library/codecs.rst:1430 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: ../../library/codecs.rst:1436 +#: ../../library/codecs.rst:1437 msgid "Text Transforms" msgstr "" -#: ../../library/codecs.rst:1438 +#: ../../library/codecs.rst:1439 msgid "" "The following codec provides a text transform: a :class:`str` to :class:" "`str` mapping. It is not supported by :meth:`str.encode` (which only " "produces :class:`bytes` output)." msgstr "" -#: ../../library/codecs.rst:1447 +#: ../../library/codecs.rst:1448 msgid "rot_13" msgstr "rot_13" -#: ../../library/codecs.rst:1447 +#: ../../library/codecs.rst:1448 msgid "rot13" msgstr "" -#: ../../library/codecs.rst:1447 +#: ../../library/codecs.rst:1448 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: ../../library/codecs.rst:1452 +#: ../../library/codecs.rst:1453 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: ../../library/codecs.rst:1455 +#: ../../library/codecs.rst:1456 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: ../../library/codecs.rst:1460 +#: ../../library/codecs.rst:1461 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: ../../library/codecs.rst:1466 +#: ../../library/codecs.rst:1467 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2578,13 +2578,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: ../../library/codecs.rst:1471 +#: ../../library/codecs.rst:1472 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " "third-party `idna module `_." msgstr "" -#: ../../library/codecs.rst:1474 +#: ../../library/codecs.rst:1475 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " "domain names. A domain name containing non-ASCII characters (such as ``www." @@ -2598,7 +2598,7 @@ msgid "" "presenting them to the user." msgstr "" -#: ../../library/codecs.rst:1485 +#: ../../library/codecs.rst:1486 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2615,14 +2615,14 @@ msgid "" "sends that field at all)." msgstr "" -#: ../../library/codecs.rst:1498 +#: ../../library/codecs.rst:1499 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: ../../library/codecs.rst:1502 +#: ../../library/codecs.rst:1503 msgid "" "The module :mod:`encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2630,49 +2630,49 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: ../../library/codecs.rst:1510 +#: ../../library/codecs.rst:1511 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: ../../library/codecs.rst:1516 +#: ../../library/codecs.rst:1517 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: ../../library/codecs.rst:1522 +#: ../../library/codecs.rst:1523 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: ../../library/codecs.rst:1526 +#: ../../library/codecs.rst:1527 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: ../../library/codecs.rst:1531 +#: ../../library/codecs.rst:1532 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: ../../library/codecs.rst:1534 +#: ../../library/codecs.rst:1535 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/codecs.rst:1535 +#: ../../library/codecs.rst:1536 msgid "Support any error handler." msgstr "" -#: ../../library/codecs.rst:1538 +#: ../../library/codecs.rst:1539 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: ../../library/codecs.rst:1544 +#: ../../library/codecs.rst:1545 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: ../../library/codecs.rst:1550 +#: ../../library/codecs.rst:1551 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 774f46d709..efca27d7e7 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -192,7 +192,7 @@ msgstr "" msgid "" "All threads enqueued to ``ThreadPoolExecutor`` will be joined before the " "interpreter can exit. Note that the exit handler which does this is executed " -"*before* any exit handlers added using `atexit`. This means exceptions in " +"*before* any exit handlers added using ``atexit``. This means exceptions in " "the main thread must be caught and handled in order to signal threads to " "exit gracefully. For this reason, it is recommended that " "``ThreadPoolExecutor`` not be used for long-running tasks." @@ -443,7 +443,7 @@ msgstr "" #: ../../library/concurrent.futures.rst:413 msgid "" "If the method returns ``False`` then the :class:`Future` was cancelled, i." -"e. :meth:`Future.cancel` was called and returned `True`. Any threads " +"e. :meth:`Future.cancel` was called and returned ``True``. Any threads " "waiting on the :class:`Future` completing (i.e. through :func:`as_completed` " "or :func:`wait`) will be woken up." msgstr "" @@ -452,7 +452,7 @@ msgstr "" msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " -"will return `True`." +"will return ``True``." msgstr "" #: ../../library/concurrent.futures.rst:422 diff --git a/library/configparser.po b/library/configparser.po index babab43c21..6db325f6f4 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-24 00:12+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -41,34 +41,44 @@ msgid "" msgstr "" #: ../../library/configparser.rst:38 -msgid "Module :mod:`shlex`" -msgstr ":mod:`shlex` 模組" +msgid "Module :mod:`tomllib`" +msgstr ":mod:`tomllib` 模組" #: ../../library/configparser.rst:37 msgid "" -"Support for creating Unix shell-like mini-languages which can be used as an " -"alternate format for application configuration files." +"TOML is a well-specified format for application configuration files. It is " +"specifically designed to be an improved version of INI." msgstr "" +#: ../../library/configparser.rst:42 +msgid "Module :mod:`shlex`" +msgstr ":mod:`shlex` 模組" + #: ../../library/configparser.rst:41 +msgid "" +"Support for creating Unix shell-like mini-languages which can also be used " +"for application configuration files." +msgstr "" + +#: ../../library/configparser.rst:45 msgid "Module :mod:`json`" msgstr ":mod:`json` 模組" -#: ../../library/configparser.rst:41 +#: ../../library/configparser.rst:45 msgid "" -"The json module implements a subset of JavaScript syntax which can also be " -"used for this purpose." +"The ``json`` module implements a subset of JavaScript syntax which is " +"sometimes used for configuration, but does not support comments." msgstr "" -#: ../../library/configparser.rst:56 +#: ../../library/configparser.rst:60 msgid "Quick Start" msgstr "" -#: ../../library/configparser.rst:58 +#: ../../library/configparser.rst:62 msgid "Let's take a very basic configuration file that looks like this:" msgstr "" -#: ../../library/configparser.rst:75 +#: ../../library/configparser.rst:79 msgid "" "The structure of INI files is described `in the following section " "<#supported-ini-file-structure>`_. Essentially, the file consists of " @@ -77,20 +87,20 @@ msgid "" "configuration file programmatically." msgstr "" -#: ../../library/configparser.rst:99 +#: ../../library/configparser.rst:103 msgid "" "As you can see, we can treat a config parser much like a dictionary. There " "are differences, `outlined later <#mapping-protocol-access>`_, but the " "behavior is very close to what you would expect from a dictionary." msgstr "" -#: ../../library/configparser.rst:103 +#: ../../library/configparser.rst:107 msgid "" "Now that we have created and saved a configuration file, let's read it back " "and explore the data it holds." msgstr "" -#: ../../library/configparser.rst:138 +#: ../../library/configparser.rst:142 msgid "" "As we can see above, the API is pretty straightforward. The only bit of " "magic involves the ``DEFAULT`` section which provides default values for all " @@ -98,7 +108,7 @@ msgid "" "and stored in lowercase [1]_." msgstr "" -#: ../../library/configparser.rst:143 +#: ../../library/configparser.rst:147 msgid "" "It is possible to read several configurations into a single :class:" "`ConfigParser`, where the most recently added configuration has the highest " @@ -106,24 +116,24 @@ msgid "" "while the previously existing keys are retained." msgstr "" -#: ../../library/configparser.rst:164 +#: ../../library/configparser.rst:168 msgid "" "This behaviour is equivalent to a :meth:`ConfigParser.read` call with " "several files passed to the *filenames* parameter." msgstr "" -#: ../../library/configparser.rst:169 +#: ../../library/configparser.rst:173 msgid "Supported Datatypes" msgstr "" -#: ../../library/configparser.rst:171 +#: ../../library/configparser.rst:175 msgid "" "Config parsers do not guess datatypes of values in configuration files, " "always storing them internally as strings. This means that if you need " "other datatypes, you should convert on your own:" msgstr "" -#: ../../library/configparser.rst:182 +#: ../../library/configparser.rst:186 msgid "" "Since this task is so common, config parsers provide a range of handy getter " "methods to handle integers, floats and booleans. The last one is the most " @@ -134,7 +144,7 @@ msgid "" "``'true'``/``'false'`` and ``'1'``/``'0'`` [1]_. For example:" msgstr "" -#: ../../library/configparser.rst:199 +#: ../../library/configparser.rst:203 msgid "" "Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide " "equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` " @@ -142,17 +152,17 @@ msgid "" "ones. [1]_" msgstr "" -#: ../../library/configparser.rst:205 +#: ../../library/configparser.rst:209 msgid "Fallback Values" msgstr "" -#: ../../library/configparser.rst:207 +#: ../../library/configparser.rst:211 msgid "" "As with a dictionary, you can use a section's :meth:`get` method to provide " "fallback values:" msgstr "" -#: ../../library/configparser.rst:220 +#: ../../library/configparser.rst:224 msgid "" "Please note that default values have precedence over fallback values. For " "instance, in our example the ``'CompressionLevel'`` key was specified only " @@ -161,7 +171,7 @@ msgid "" "specify a fallback:" msgstr "" -#: ../../library/configparser.rst:231 +#: ../../library/configparser.rst:235 msgid "" "One more thing to be aware of is that the parser-level :meth:`get` method " "provides a custom, more complex interface, maintained for backwards " @@ -169,18 +179,18 @@ msgid "" "the ``fallback`` keyword-only argument:" msgstr "" -#: ../../library/configparser.rst:242 +#: ../../library/configparser.rst:246 msgid "" "The same ``fallback`` argument can be used with the :meth:`~ConfigParser." "getint`, :meth:`~ConfigParser.getfloat` and :meth:`~ConfigParser.getboolean` " "methods, for example:" msgstr "" -#: ../../library/configparser.rst:258 +#: ../../library/configparser.rst:262 msgid "Supported INI File Structure" msgstr "" -#: ../../library/configparser.rst:260 +#: ../../library/configparser.rst:264 msgid "" "A configuration file consists of sections, each led by a ``[section]`` " "header, followed by key/value entries separated by a specific string (``=`` " @@ -193,35 +203,35 @@ msgid "" "parts of multiline values or ignored." msgstr "" -#: ../../library/configparser.rst:270 +#: ../../library/configparser.rst:274 msgid "" "By default, a valid section name can be any string that does not contain '\\" "\\n' or ']'. To change this, see :attr:`ConfigParser.SECTCRE`." msgstr "" -#: ../../library/configparser.rst:273 +#: ../../library/configparser.rst:277 msgid "" "Configuration files may include comments, prefixed by specific characters " "(``#`` and ``;`` by default [1]_). Comments may appear on their own on an " "otherwise empty line, possibly indented. [1]_" msgstr "" -#: ../../library/configparser.rst:277 ../../library/configparser.rst:340 +#: ../../library/configparser.rst:281 ../../library/configparser.rst:344 msgid "For example:" msgstr "" -#: ../../library/configparser.rst:325 +#: ../../library/configparser.rst:329 msgid "Interpolation of values" msgstr "" -#: ../../library/configparser.rst:327 +#: ../../library/configparser.rst:331 msgid "" "On top of the core functionality, :class:`ConfigParser` supports " "interpolation. This means values can be preprocessed before returning them " "from ``get()`` calls." msgstr "" -#: ../../library/configparser.rst:335 +#: ../../library/configparser.rst:339 msgid "" "The default implementation used by :class:`ConfigParser`. It enables values " "to contain format strings which refer to other values in the same section, " @@ -229,7 +239,7 @@ msgid "" "can be provided on initialization." msgstr "" -#: ../../library/configparser.rst:353 +#: ../../library/configparser.rst:357 msgid "" "In the example above, :class:`ConfigParser` with *interpolation* set to " "``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of " @@ -239,14 +249,14 @@ msgid "" "specific order in the configuration file." msgstr "" -#: ../../library/configparser.rst:360 +#: ../../library/configparser.rst:364 msgid "" "With ``interpolation`` set to ``None``, the parser would simply return ``" "%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" "lumberjack`` as the value of ``my_dir``." msgstr "" -#: ../../library/configparser.rst:368 +#: ../../library/configparser.rst:372 msgid "" "An alternative handler for interpolation which implements a more advanced " "syntax, used for instance in ``zc.buildout``. Extended interpolation is " @@ -256,21 +266,21 @@ msgid "" "possibly the default values from the special section)." msgstr "" -#: ../../library/configparser.rst:375 +#: ../../library/configparser.rst:379 msgid "" "For example, the configuration specified above with basic interpolation, " "would look like this with extended interpolation:" msgstr "" -#: ../../library/configparser.rst:389 +#: ../../library/configparser.rst:393 msgid "Values from other sections can be fetched as well:" msgstr "" -#: ../../library/configparser.rst:411 +#: ../../library/configparser.rst:415 msgid "Mapping Protocol Access" msgstr "" -#: ../../library/configparser.rst:415 +#: ../../library/configparser.rst:419 msgid "" "Mapping protocol access is a generic name for functionality that enables " "using custom objects as if they were dictionaries. In case of :mod:" @@ -278,7 +288,7 @@ msgid "" "``parser['section']['option']`` notation." msgstr "" -#: ../../library/configparser.rst:420 +#: ../../library/configparser.rst:424 msgid "" "``parser['section']`` in particular returns a proxy for the section's data " "in the parser. This means that the values are not copied but they are taken " @@ -287,7 +297,7 @@ msgid "" "original parser." msgstr "" -#: ../../library/configparser.rst:426 +#: ../../library/configparser.rst:430 msgid "" ":mod:`configparser` objects behave as close to actual dictionaries as " "possible. The mapping interface is complete and adheres to the :class:" @@ -295,7 +305,7 @@ msgid "" "that should be taken into account:" msgstr "" -#: ../../library/configparser.rst:431 +#: ../../library/configparser.rst:435 msgid "" "By default, all keys in sections are accessible in a case-insensitive manner " "[1]_. E.g. ``for option in parser[\"section\"]`` yields only " @@ -304,7 +314,7 @@ msgid "" "expressions return ``True``::" msgstr "" -#: ../../library/configparser.rst:439 +#: ../../library/configparser.rst:443 msgid "" "All sections include ``DEFAULTSECT`` values as well which means that ``." "clear()`` on a section may not leave the section visibly empty. This is " @@ -314,30 +324,30 @@ msgid "" "default value causes a :exc:`KeyError`." msgstr "" -#: ../../library/configparser.rst:446 +#: ../../library/configparser.rst:450 msgid "``DEFAULTSECT`` cannot be removed from the parser:" msgstr "" -#: ../../library/configparser.rst:448 +#: ../../library/configparser.rst:452 msgid "trying to delete it raises :exc:`ValueError`," msgstr "" -#: ../../library/configparser.rst:450 +#: ../../library/configparser.rst:454 msgid "``parser.clear()`` leaves it intact," msgstr "" -#: ../../library/configparser.rst:452 +#: ../../library/configparser.rst:456 msgid "``parser.popitem()`` never returns it." msgstr "" -#: ../../library/configparser.rst:454 +#: ../../library/configparser.rst:458 msgid "" "``parser.get(section, option, **kwargs)`` - the second argument is **not** a " "fallback value. Note however that the section-level ``get()`` methods are " "compatible both with the mapping protocol and the classic configparser API." msgstr "" -#: ../../library/configparser.rst:458 +#: ../../library/configparser.rst:462 msgid "" "``parser.items()`` is compatible with the mapping protocol (returns a list " "of *section_name*, *section_proxy* pairs including the DEFAULTSECT). " @@ -347,18 +357,18 @@ msgid "" "(unless ``raw=True`` is provided)." msgstr "" -#: ../../library/configparser.rst:465 +#: ../../library/configparser.rst:469 msgid "" "The mapping protocol is implemented on top of the existing legacy API so " "that subclasses overriding the original interface still should have mappings " "working as expected." msgstr "" -#: ../../library/configparser.rst:471 +#: ../../library/configparser.rst:475 msgid "Customizing Parser Behaviour" msgstr "" -#: ../../library/configparser.rst:473 +#: ../../library/configparser.rst:477 msgid "" "There are nearly as many INI format variants as there are applications using " "it. :mod:`configparser` goes a long way to provide support for the largest " @@ -367,17 +377,17 @@ msgid "" "customize some of the features." msgstr "" -#: ../../library/configparser.rst:479 +#: ../../library/configparser.rst:483 msgid "" "The most common way to change the way a specific config parser works is to " "use the :meth:`__init__` options:" msgstr "" -#: ../../library/configparser.rst:482 +#: ../../library/configparser.rst:486 msgid "*defaults*, default value: ``None``" msgstr "" -#: ../../library/configparser.rst:484 +#: ../../library/configparser.rst:488 msgid "" "This option accepts a dictionary of key-value pairs which will be initially " "put in the ``DEFAULT`` section. This makes for an elegant way to support " @@ -385,17 +395,17 @@ msgid "" "the documented default." msgstr "" -#: ../../library/configparser.rst:489 +#: ../../library/configparser.rst:493 msgid "" "Hint: if you want to specify default values for a specific section, use :" "meth:`read_dict` before you read the actual file." msgstr "" -#: ../../library/configparser.rst:492 +#: ../../library/configparser.rst:496 msgid "*dict_type*, default value: :class:`dict`" msgstr "" -#: ../../library/configparser.rst:494 +#: ../../library/configparser.rst:498 msgid "" "This option has a major impact on how the mapping protocol will behave and " "how the written configuration files look. With the standard dictionary, " @@ -403,24 +413,24 @@ msgid "" "goes for options within sections." msgstr "" -#: ../../library/configparser.rst:499 +#: ../../library/configparser.rst:503 msgid "" "An alternative dictionary type can be used for example to sort sections and " "options on write-back." msgstr "" -#: ../../library/configparser.rst:502 +#: ../../library/configparser.rst:506 msgid "" "Please note: there are ways to add a set of key-value pairs in a single " "operation. When you use a regular dictionary in those operations, the order " "of the keys will be ordered. For example:" msgstr "" -#: ../../library/configparser.rst:524 +#: ../../library/configparser.rst:528 msgid "*allow_no_value*, default value: ``False``" msgstr "" -#: ../../library/configparser.rst:526 +#: ../../library/configparser.rst:530 msgid "" "Some configuration files are known to include settings without values, but " "which otherwise conform to the syntax supported by :mod:`configparser`. The " @@ -428,32 +438,32 @@ msgid "" "such values should be accepted:" msgstr "" -#: ../../library/configparser.rst:561 +#: ../../library/configparser.rst:565 msgid "*delimiters*, default value: ``('=', ':')``" msgstr "" -#: ../../library/configparser.rst:563 +#: ../../library/configparser.rst:567 msgid "" "Delimiters are substrings that delimit keys from values within a section. " "The first occurrence of a delimiting substring on a line is considered a " "delimiter. This means values (but not keys) can contain the delimiters." msgstr "" -#: ../../library/configparser.rst:567 +#: ../../library/configparser.rst:571 msgid "" "See also the *space_around_delimiters* argument to :meth:`ConfigParser." "write`." msgstr "" -#: ../../library/configparser.rst:570 +#: ../../library/configparser.rst:574 msgid "*comment_prefixes*, default value: ``('#', ';')``" msgstr "" -#: ../../library/configparser.rst:572 +#: ../../library/configparser.rst:576 msgid "*inline_comment_prefixes*, default value: ``None``" msgstr "" -#: ../../library/configparser.rst:574 +#: ../../library/configparser.rst:578 msgid "" "Comment prefixes are strings that indicate the start of a valid comment " "within a config file. *comment_prefixes* are used only on otherwise empty " @@ -463,13 +473,13 @@ msgid "" "used as prefixes for whole line comments." msgstr "" -#: ../../library/configparser.rst:581 +#: ../../library/configparser.rst:585 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``." msgstr "" -#: ../../library/configparser.rst:585 +#: ../../library/configparser.rst:589 msgid "" "Please note that config parsers don't support escaping of comment prefixes " "so using *inline_comment_prefixes* may prevent users from specifying option " @@ -479,11 +489,11 @@ msgid "" "values is to interpolate the prefix, for example::" msgstr "" -#: ../../library/configparser.rst:631 +#: ../../library/configparser.rst:635 msgid "*strict*, default value: ``True``" msgstr "" -#: ../../library/configparser.rst:633 +#: ../../library/configparser.rst:637 msgid "" "When set to ``True``, the parser will not allow for any section or option " "duplicates while reading from a single source (using :meth:`read_file`, :" @@ -491,17 +501,17 @@ msgid "" "parsers in new applications." msgstr "" -#: ../../library/configparser.rst:638 +#: ../../library/configparser.rst:642 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``strict=False``." msgstr "" -#: ../../library/configparser.rst:642 +#: ../../library/configparser.rst:646 msgid "*empty_lines_in_values*, default value: ``True``" msgstr "" -#: ../../library/configparser.rst:644 +#: ../../library/configparser.rst:648 msgid "" "In config parsers, values can span multiple lines as long as they are " "indented more than the key that holds them. By default parsers also let " @@ -511,7 +521,7 @@ msgid "" "lose track of the file structure. Take for instance:" msgstr "" -#: ../../library/configparser.rst:659 +#: ../../library/configparser.rst:663 msgid "" "This can be especially problematic for the user to see if she's using a " "proportional font to edit the file. That is why when your application does " @@ -520,13 +530,13 @@ msgid "" "would produce two keys, ``key`` and ``this``." msgstr "" -#: ../../library/configparser.rst:665 +#: ../../library/configparser.rst:669 msgid "" "*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``" "\"DEFAULT\"``)" msgstr "" -#: ../../library/configparser.rst:668 +#: ../../library/configparser.rst:672 msgid "" "The convention of allowing a special section of default values for other " "sections or interpolation purposes is a powerful concept of this library, " @@ -540,11 +550,11 @@ msgid "" "files from one format to another)." msgstr "" -#: ../../library/configparser.rst:679 +#: ../../library/configparser.rst:683 msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" msgstr "" -#: ../../library/configparser.rst:681 +#: ../../library/configparser.rst:685 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -554,11 +564,11 @@ msgid "" "`RawConfigParser` has a default value of ``None``." msgstr "" -#: ../../library/configparser.rst:688 +#: ../../library/configparser.rst:692 msgid "*converters*, default value: not set" msgstr "" -#: ../../library/configparser.rst:690 +#: ../../library/configparser.rst:694 msgid "" "Config parsers provide option value getters that perform type conversion. " "By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " @@ -572,7 +582,7 @@ msgid "" "``parser_instance['section'].getdecimal('key', 0)``." msgstr "" -#: ../../library/configparser.rst:701 +#: ../../library/configparser.rst:705 msgid "" "If the converter needs to access the state of the parser, it can be " "implemented as a method on a config parser subclass. If the name of this " @@ -580,14 +590,14 @@ msgid "" "the dict-compatible form (see the ``getdecimal()`` example above)." msgstr "" -#: ../../library/configparser.rst:706 +#: ../../library/configparser.rst:710 msgid "" "More advanced customization may be achieved by overriding default values of " "these parser attributes. The defaults are defined on the classes, so they " "may be overridden by subclasses or by attribute assignment." msgstr "" -#: ../../library/configparser.rst:712 +#: ../../library/configparser.rst:716 msgid "" "By default when using :meth:`~ConfigParser.getboolean`, config parsers " "consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " @@ -596,13 +606,13 @@ msgid "" "strings and their Boolean outcomes. For example:" msgstr "" -#: ../../library/configparser.rst:730 +#: ../../library/configparser.rst:734 msgid "" "Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" "``disabled``." msgstr "" -#: ../../library/configparser.rst:736 +#: ../../library/configparser.rst:740 msgid "" "This method transforms option names on every read, get, or set operation. " "The default converts the name to lowercase. This also means that when a " @@ -610,14 +620,14 @@ msgid "" "method if that's unsuitable. For example:" msgstr "" -#: ../../library/configparser.rst:766 +#: ../../library/configparser.rst:770 msgid "" "The optionxform function transforms option names to a canonical form. This " "should be an idempotent function: if the name is already in canonical form, " "it should be returned unchanged." msgstr "" -#: ../../library/configparser.rst:773 +#: ../../library/configparser.rst:777 msgid "" "A compiled regular expression used to parse section headers. The default " "matches ``[section]`` to the name ``\"section\"``. Whitespace is considered " @@ -626,18 +636,18 @@ msgid "" "example:" msgstr "" -#: ../../library/configparser.rst:801 +#: ../../library/configparser.rst:805 msgid "" "While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing " "option lines, it's not recommended to override it because that would " "interfere with constructor options *allow_no_value* and *delimiters*." msgstr "" -#: ../../library/configparser.rst:807 +#: ../../library/configparser.rst:811 msgid "Legacy API Examples" msgstr "" -#: ../../library/configparser.rst:809 +#: ../../library/configparser.rst:813 msgid "" "Mainly because of backwards compatibility concerns, :mod:`configparser` " "provides also a legacy API with explicit ``get``/``set`` methods. While " @@ -646,29 +656,29 @@ msgid "" "advanced, low-level and downright counterintuitive." msgstr "" -#: ../../library/configparser.rst:815 +#: ../../library/configparser.rst:819 msgid "An example of writing to a configuration file::" msgstr "" -#: ../../library/configparser.rst:838 +#: ../../library/configparser.rst:842 msgid "An example of reading the configuration file again::" msgstr "" -#: ../../library/configparser.rst:856 +#: ../../library/configparser.rst:860 msgid "To get interpolation, use :class:`ConfigParser`::" msgstr "" -#: ../../library/configparser.rst:889 +#: ../../library/configparser.rst:893 msgid "" "Default values are available in both types of ConfigParsers. They are used " "in interpolation if an option used is not defined elsewhere. ::" msgstr "" -#: ../../library/configparser.rst:907 +#: ../../library/configparser.rst:911 msgid "ConfigParser Objects" msgstr "ConfigParser 物件" -#: ../../library/configparser.rst:911 +#: ../../library/configparser.rst:915 msgid "" "The main configuration parser. When *defaults* is given, it is initialized " "into the dictionary of intrinsic defaults. When *dict_type* is given, it " @@ -676,7 +686,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: ../../library/configparser.rst:916 +#: ../../library/configparser.rst:920 msgid "" "When *delimiters* is given, it is used as the set of substrings that divide " "keys from values. When *comment_prefixes* is given, it will be used as the " @@ -685,7 +695,7 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: ../../library/configparser.rst:922 +#: ../../library/configparser.rst:926 msgid "" "When *strict* is ``True`` (the default), the parser won't allow for any " "section or option duplicates while reading from a single source (file, " @@ -698,7 +708,7 @@ msgid "" "without the trailing delimiter." msgstr "" -#: ../../library/configparser.rst:932 +#: ../../library/configparser.rst:936 msgid "" "When *default_section* is given, it specifies the name for the special " "section holding default values for other sections and interpolation purposes " @@ -706,7 +716,7 @@ msgid "" "on runtime using the ``default_section`` instance attribute." msgstr "" -#: ../../library/configparser.rst:937 +#: ../../library/configparser.rst:941 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -715,7 +725,7 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: ../../library/configparser.rst:943 +#: ../../library/configparser.rst:947 msgid "" "All option names used in interpolation will be passed through the :meth:" "`optionxform` method just like any other option name reference. For " @@ -724,7 +734,7 @@ msgid "" "%(BAR)s`` are equivalent." msgstr "" -#: ../../library/configparser.rst:949 +#: ../../library/configparser.rst:953 msgid "" "When *converters* is given, it should be a dictionary where each key " "represents the name of a type converter and each value is a callable " @@ -733,44 +743,44 @@ msgid "" "object and section proxies." msgstr "" -#: ../../library/configparser.rst:955 +#: ../../library/configparser.rst:959 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: ../../library/configparser.rst:958 +#: ../../library/configparser.rst:962 msgid "" "*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, " "*empty_lines_in_values*, *default_section* and *interpolation* were added." msgstr "" -#: ../../library/configparser.rst:963 +#: ../../library/configparser.rst:967 msgid "The *converters* argument was added." msgstr "新增 *converters* 引數。" -#: ../../library/configparser.rst:966 +#: ../../library/configparser.rst:970 msgid "" "The *defaults* argument is read with :meth:`read_dict()`, providing " "consistent behavior across the parser: non-string keys and values are " "implicitly converted to strings." msgstr "" -#: ../../library/configparser.rst:971 ../../library/configparser.rst:1256 +#: ../../library/configparser.rst:975 ../../library/configparser.rst:1260 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: ../../library/configparser.rst:977 +#: ../../library/configparser.rst:981 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: ../../library/configparser.rst:982 +#: ../../library/configparser.rst:986 msgid "" "Return a list of the sections available; the *default section* is not " "included in the list." msgstr "" -#: ../../library/configparser.rst:988 +#: ../../library/configparser.rst:992 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " @@ -778,34 +788,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: ../../library/configparser.rst:993 +#: ../../library/configparser.rst:997 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: ../../library/configparser.rst:999 +#: ../../library/configparser.rst:1003 msgid "" "Indicates whether the named *section* is present in the configuration. The " "*default section* is not acknowledged." msgstr "" -#: ../../library/configparser.rst:1005 +#: ../../library/configparser.rst:1009 msgid "Return a list of options available in the specified *section*." msgstr "" -#: ../../library/configparser.rst:1010 +#: ../../library/configparser.rst:1014 msgid "" "If the given *section* exists, and contains the given *option*, return :" "const:`True`; otherwise return :const:`False`. If the specified *section* " "is :const:`None` or an empty string, DEFAULT is assumed." msgstr "" -#: ../../library/configparser.rst:1017 +#: ../../library/configparser.rst:1021 msgid "" "Attempt to read and parse an iterable of filenames, returning a list of " "filenames which were successfully parsed." msgstr "" -#: ../../library/configparser.rst:1020 +#: ../../library/configparser.rst:1024 msgid "" "If *filenames* is a string, a :class:`bytes` object or a :term:`path-like " "object`, it is treated as a single filename. If a file named in *filenames* " @@ -816,7 +826,7 @@ msgid "" "be read." msgstr "" -#: ../../library/configparser.rst:1029 +#: ../../library/configparser.rst:1033 msgid "" "If none of the named files exist, the :class:`ConfigParser` instance will " "contain an empty dataset. An application which requires initial values to " @@ -824,49 +834,49 @@ msgid "" "`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: ../../library/configparser.rst:1042 +#: ../../library/configparser.rst:1046 msgid "" "The *encoding* parameter. Previously, all files were read using the default " "encoding for :func:`open`." msgstr "" -#: ../../library/configparser.rst:1046 +#: ../../library/configparser.rst:1050 msgid "The *filenames* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/configparser.rst:1049 +#: ../../library/configparser.rst:1053 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: ../../library/configparser.rst:1055 +#: ../../library/configparser.rst:1059 msgid "" "Read and parse configuration data from *f* which must be an iterable " "yielding Unicode strings (for example files opened in text mode)." msgstr "" -#: ../../library/configparser.rst:1058 +#: ../../library/configparser.rst:1062 msgid "" "Optional argument *source* specifies the name of the file being read. If " "not given and *f* has a :attr:`name` attribute, that is used for *source*; " "the default is ``''``." msgstr "" -#: ../../library/configparser.rst:1062 +#: ../../library/configparser.rst:1066 msgid "Replaces :meth:`readfp`." msgstr "" -#: ../../library/configparser.rst:1067 +#: ../../library/configparser.rst:1071 msgid "Parse configuration data from a string." msgstr "" -#: ../../library/configparser.rst:1069 +#: ../../library/configparser.rst:1073 msgid "" "Optional argument *source* specifies a context-specific name of the string " "passed. If not given, ``''`` is used. This should commonly be a " "filesystem path or a URL." msgstr "" -#: ../../library/configparser.rst:1078 +#: ../../library/configparser.rst:1082 msgid "" "Load configuration from any object that provides a dict-like ``items()`` " "method. Keys are section names, values are dictionaries with keys and " @@ -875,17 +885,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: ../../library/configparser.rst:1084 +#: ../../library/configparser.rst:1088 msgid "" "Optional argument *source* specifies a context-specific name of the " "dictionary passed. If not given, ```` is used." msgstr "" -#: ../../library/configparser.rst:1087 +#: ../../library/configparser.rst:1091 msgid "This method can be used to copy state between parsers." msgstr "" -#: ../../library/configparser.rst:1094 +#: ../../library/configparser.rst:1098 msgid "" "Get an *option* value for the named *section*. If *vars* is provided, it " "must be a dictionary. The *option* is looked up in *vars* (if provided), " @@ -894,35 +904,35 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: ../../library/configparser.rst:1100 +#: ../../library/configparser.rst:1104 msgid "" "All the ``'%'`` interpolations are expanded in the return values, unless the " "*raw* argument is true. Values for interpolation keys are looked up in the " "same manner as the option." msgstr "" -#: ../../library/configparser.rst:1104 +#: ../../library/configparser.rst:1108 msgid "" "Arguments *raw*, *vars* and *fallback* are keyword only to protect users " "from trying to use the third argument as the *fallback* fallback (especially " "when using the mapping protocol)." msgstr "" -#: ../../library/configparser.rst:1112 +#: ../../library/configparser.rst:1116 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to an integer. See :meth:`get` for explanation of *raw*, *vars* and " "*fallback*." msgstr "" -#: ../../library/configparser.rst:1119 +#: ../../library/configparser.rst:1123 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a floating point number. See :meth:`get` for explanation of *raw*, " "*vars* and *fallback*." msgstr "" -#: ../../library/configparser.rst:1126 +#: ../../library/configparser.rst:1130 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a Boolean value. Note that the accepted values for the option are " @@ -934,34 +944,34 @@ msgid "" "*fallback*." msgstr "" -#: ../../library/configparser.rst:1139 +#: ../../library/configparser.rst:1143 msgid "" "When *section* is not given, return a list of *section_name*, " "*section_proxy* pairs, including DEFAULTSECT." msgstr "" -#: ../../library/configparser.rst:1142 +#: ../../library/configparser.rst:1146 msgid "" "Otherwise, return a list of *name*, *value* pairs for the options in the " "given *section*. Optional arguments have the same meaning as for the :meth:" "`get` method." msgstr "" -#: ../../library/configparser.rst:1146 +#: ../../library/configparser.rst:1150 msgid "" "Items present in *vars* no longer appear in the result. The previous " "behaviour mixed actual parser options with variables provided for " "interpolation." msgstr "" -#: ../../library/configparser.rst:1154 +#: ../../library/configparser.rst:1158 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. *option* and *value* must be " "strings; if not, :exc:`TypeError` is raised." msgstr "" -#: ../../library/configparser.rst:1161 +#: ../../library/configparser.rst:1165 msgid "" "Write a representation of the configuration to the specified :term:`file " "object`, which must be opened in text mode (accepting strings). This " @@ -970,27 +980,27 @@ msgid "" "surrounded by spaces." msgstr "" -#: ../../library/configparser.rst:1169 +#: ../../library/configparser.rst:1173 msgid "" "Comments in the original configuration file are not preserved when writing " "the configuration back. What is considered a comment, depends on the given " "values for *comment_prefix* and *inline_comment_prefix*." msgstr "" -#: ../../library/configparser.rst:1177 +#: ../../library/configparser.rst:1181 msgid "" "Remove the specified *option* from the specified *section*. If the section " "does not exist, raise :exc:`NoSectionError`. If the option existed to be " "removed, return :const:`True`; otherwise return :const:`False`." msgstr "" -#: ../../library/configparser.rst:1185 +#: ../../library/configparser.rst:1189 msgid "" "Remove the specified *section* from the configuration. If the section in " "fact existed, return ``True``. Otherwise return ``False``." msgstr "" -#: ../../library/configparser.rst:1191 +#: ../../library/configparser.rst:1195 msgid "" "Transforms the option name *option* as found in an input file or as passed " "in by client code to the form that should be used in the internal " @@ -999,7 +1009,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: ../../library/configparser.rst:1197 +#: ../../library/configparser.rst:1201 msgid "" "You don't need to subclass the parser to use this method, you can also set " "it on an instance, to a function that takes a string argument and returns a " @@ -1007,46 +1017,46 @@ msgid "" "sensitive::" msgstr "" -#: ../../library/configparser.rst:1205 +#: ../../library/configparser.rst:1209 msgid "" "Note that when reading configuration files, whitespace around the option " "names is stripped before :meth:`optionxform` is called." msgstr "" -#: ../../library/configparser.rst:1211 +#: ../../library/configparser.rst:1215 msgid "Use :meth:`read_file` instead." msgstr "" -#: ../../library/configparser.rst:1214 +#: ../../library/configparser.rst:1218 msgid "" ":meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``." msgstr "" -#: ../../library/configparser.rst:1217 +#: ../../library/configparser.rst:1221 msgid "" "For existing code calling :meth:`readfp` with arguments which don't support " "iteration, the following generator may be used as a wrapper around the file-" "like object::" msgstr "" -#: ../../library/configparser.rst:1227 +#: ../../library/configparser.rst:1231 msgid "" "Instead of ``parser.readfp(fp)`` use ``parser." "read_file(readline_generator(fp))``." msgstr "" -#: ../../library/configparser.rst:1233 +#: ../../library/configparser.rst:1237 msgid "" "The maximum depth for recursive interpolation for :meth:`get` when the *raw* " "parameter is false. This is relevant only when the default *interpolation* " "is used." msgstr "" -#: ../../library/configparser.rst:1241 +#: ../../library/configparser.rst:1245 msgid "RawConfigParser Objects" msgstr "RawConfigParser 物件" -#: ../../library/configparser.rst:1251 +#: ../../library/configparser.rst:1255 msgid "" "Legacy variant of the :class:`ConfigParser`. It has interpolation disabled " "by default and allows for non-string section names, option names, and values " @@ -1054,27 +1064,27 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: ../../library/configparser.rst:1261 +#: ../../library/configparser.rst:1265 msgid "" "Consider using :class:`ConfigParser` instead which checks types of the " "values to be stored internally. If you don't want interpolation, you can " "use ``ConfigParser(interpolation=None)``." msgstr "" -#: ../../library/configparser.rst:1268 +#: ../../library/configparser.rst:1272 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " "*default section* name is passed, :exc:`ValueError` is raised." msgstr "" -#: ../../library/configparser.rst:1272 +#: ../../library/configparser.rst:1276 msgid "" "Type of *section* is not checked which lets users create non-string named " "sections. This behaviour is unsupported and may cause internal errors." msgstr "" -#: ../../library/configparser.rst:1278 +#: ../../library/configparser.rst:1282 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. While it is possible to use :class:" @@ -1084,7 +1094,7 @@ msgid "" "string values." msgstr "" -#: ../../library/configparser.rst:1285 +#: ../../library/configparser.rst:1289 msgid "" "This method lets users assign non-string values to keys internally. This " "behaviour is unsupported and will cause errors when attempting to write to a " @@ -1092,32 +1102,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: ../../library/configparser.rst:1292 +#: ../../library/configparser.rst:1296 msgid "Exceptions" msgstr "例外" -#: ../../library/configparser.rst:1296 +#: ../../library/configparser.rst:1300 msgid "Base class for all other :mod:`configparser` exceptions." msgstr "" -#: ../../library/configparser.rst:1301 +#: ../../library/configparser.rst:1305 msgid "Exception raised when a specified section is not found." msgstr "" -#: ../../library/configparser.rst:1306 +#: ../../library/configparser.rst:1310 msgid "" "Exception raised if :meth:`add_section` is called with the name of a section " "that is already present or in strict parsers when a section if found more " "than once in a single input file, string or dictionary." msgstr "" -#: ../../library/configparser.rst:1310 +#: ../../library/configparser.rst:1314 msgid "" "Optional ``source`` and ``lineno`` attributes and arguments to :meth:" "`__init__` were added." msgstr "" -#: ../../library/configparser.rst:1317 +#: ../../library/configparser.rst:1321 msgid "" "Exception raised by strict parsers if a single option appears twice during " "reading from a single file, string or dictionary. This catches misspellings " @@ -1125,58 +1135,58 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: ../../library/configparser.rst:1325 +#: ../../library/configparser.rst:1329 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: ../../library/configparser.rst:1331 +#: ../../library/configparser.rst:1335 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: ../../library/configparser.rst:1337 +#: ../../library/configparser.rst:1341 msgid "" "Exception raised when string interpolation cannot be completed because the " "number of iterations exceeds :const:`MAX_INTERPOLATION_DEPTH`. Subclass of :" "exc:`InterpolationError`." msgstr "" -#: ../../library/configparser.rst:1344 +#: ../../library/configparser.rst:1348 msgid "" "Exception raised when an option referenced from a value does not exist. " "Subclass of :exc:`InterpolationError`." msgstr "" -#: ../../library/configparser.rst:1350 +#: ../../library/configparser.rst:1354 msgid "" "Exception raised when the source text into which substitutions are made does " "not conform to the required syntax. Subclass of :exc:`InterpolationError`." msgstr "" -#: ../../library/configparser.rst:1356 +#: ../../library/configparser.rst:1360 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: ../../library/configparser.rst:1362 +#: ../../library/configparser.rst:1366 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: ../../library/configparser.rst:1364 +#: ../../library/configparser.rst:1368 msgid "" "The ``filename`` attribute and :meth:`__init__` argument were renamed to " "``source`` for consistency." msgstr "" -#: ../../library/configparser.rst:1370 +#: ../../library/configparser.rst:1374 msgid "Footnotes" msgstr "註解" -#: ../../library/configparser.rst:1371 +#: ../../library/configparser.rst:1375 msgid "" "Config parsers allow for heavy customization. If you are interested in " "changing the behaviour outlined by the footnote reference, consult the " diff --git a/library/contextvars.po b/library/contextvars.po index 28be67321e..8296de9035 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-01 16:27+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -142,7 +142,7 @@ msgstr "" msgid "" "A read-only property. Set to the value the variable had before the :meth:" "`ContextVar.set` method call that created the token. It points to :attr:" -"`Token.MISSING` is the variable was not set before the call." +"`Token.MISSING` if the variable was not set before the call." msgstr "" #: ../../library/contextvars.rst:118 diff --git a/library/ctypes.po b/library/ctypes.po index 035429a77d..c9220486e6 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-16 03:20+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1833,7 +1833,7 @@ msgid "" "instance of a ctypes type." msgstr "" -#: ../../library/ctypes.rst:1826 +#: ../../library/ctypes.rst:4 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." @@ -1891,7 +1891,7 @@ msgid "" "not be used." msgstr "" -#: ../../library/ctypes.rst:1870 +#: ../../library/ctypes.rst:12 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." @@ -1918,7 +1918,7 @@ msgid "" "should not be used." msgstr "" -#: ../../library/ctypes.rst:1887 +#: ../../library/ctypes.rst:13 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." @@ -1970,8 +1970,8 @@ msgstr "" #: ../../library/ctypes.rst:1936 msgid "" "Windows only: Returns the last error code set by Windows in the calling " -"thread. This function calls the Windows `GetLastError()` function directly, " -"it does not return the ctypes-private copy of the error code." +"thread. This function calls the Windows ``GetLastError()`` function " +"directly, it does not return the ctypes-private copy of the error code." msgstr "" #: ../../library/ctypes.rst:1942 @@ -1980,7 +1980,7 @@ msgid "" "`errno` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:1945 +#: ../../library/ctypes.rst:4 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." @@ -1992,7 +1992,7 @@ msgid "" "system :data:`LastError` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:1952 +#: ../../library/ctypes.rst:4 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." @@ -2045,7 +2045,7 @@ msgid "" "variable in the calling thread to *value* and return the previous value." msgstr "" -#: ../../library/ctypes.rst:1997 +#: ../../library/ctypes.rst:4 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." @@ -2058,7 +2058,7 @@ msgid "" "return the previous value." msgstr "" -#: ../../library/ctypes.rst:2006 +#: ../../library/ctypes.rst:5 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." @@ -2077,7 +2077,7 @@ msgid "" "is assumed to be zero-terminated." msgstr "" -#: ../../library/ctypes.rst:2021 +#: ../../library/ctypes.rst:5 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." @@ -2104,7 +2104,7 @@ msgid "" "terminated." msgstr "" -#: ../../library/ctypes.rst:2043 +#: ../../library/ctypes.rst:6 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." @@ -2139,7 +2139,7 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../library/ctypes.rst:2072 ../../library/ctypes.rst:2082 +#: ../../library/ctypes.rst:7 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." @@ -2159,7 +2159,7 @@ msgid "" "*address* which must be an integer." msgstr "" -#: ../../library/ctypes.rst:2089 +#: ../../library/ctypes.rst:4 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." diff --git a/library/curses.po b/library/curses.po index 8ef7e66e11..e89005b9d1 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -337,7 +337,7 @@ msgid "" "Change the definition of a color, taking the number of the color to be " "changed followed by three RGB values (for the amounts of red, green, and " "blue components). The value of *color_number* must be between ``0`` and " -"`COLORS - 1`. Each of *r*, *g*, *b*, must be a value between ``0`` and " +"``COLORS - 1``. Each of *r*, *g*, *b*, must be a value between ``0`` and " "``1000``. When :func:`init_color` is used, all occurrences of that color on " "the screen immediately change to the new definition. This function is a no-" "op on most terminals; it is active only if :func:`can_change_color` returns " diff --git a/library/dataclasses.po b/library/dataclasses.po index c17b08c751..9209a49a1c 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -235,11 +235,11 @@ msgstr "" #: ../../library/dataclasses.rst:191 msgid "" "If a field name is already included in the ``__slots__`` of a base class, it " -"will not be included in the generated ``__slots__`` to prevent `overriding " -"them `_. Therefore, do not use ``__slots__`` to retrieve the field names of " -"a dataclass. Use :func:`fields` instead. To be able to determine inherited " -"slots, base class ``__slots__`` may be any iterable, but *not* an iterator." +"will not be included in the generated ``__slots__`` to prevent :ref:" +"`overriding them `. Therefore, do not use " +"``__slots__`` to retrieve the field names of a dataclass. Use :func:`fields` " +"instead. To be able to determine inherited slots, base class ``__slots__`` " +"may be any iterable, but *not* an iterator." msgstr "" #: ../../library/dataclasses.rst:201 diff --git a/library/datetime.po b/library/datetime.po index ff7ce0f1f3..069b1426e1 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1946,7 +1946,7 @@ msgstr "" #: ../../library/datetime.rst:1772 msgid "" -"The leading `T`, normally required in cases where there may be ambiguity " +"The leading ``T``, normally required in cases where there may be ambiguity " "between a date and a time, is not required." msgstr "" @@ -2403,8 +2403,8 @@ msgstr "" #: ../../library/datetime.rst:2267 msgid "" -"Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not ``'UTC" -"+00:00'``." +"Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " +"``'UTC+00:00'``." msgstr "" #: ../../library/datetime.rst:2274 diff --git a/library/decimal.po b/library/decimal.po index 15079d6aa8..5fb2c571ca 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:43+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -509,11 +509,11 @@ msgstr "" #: ../../library/decimal.rst:579 msgid "" -"Note `Decimal.from_float(0.1)` is not the same as `Decimal('0.1')`. Since " -"0.1 is not exactly representable in binary floating point, the value is " -"stored as the nearest representable value which is `0x1.999999999999ap-4`. " -"That equivalent value in decimal is " -"`0.1000000000000000055511151231257827021181583404541015625`." +"Note ``Decimal.from_float(0.1)`` is not the same as ``Decimal('0.1')``. " +"Since 0.1 is not exactly representable in binary floating point, the value " +"is stored as the nearest representable value which is " +"``0x1.999999999999ap-4``. That equivalent value in decimal is " +"``0.1000000000000000055511151231257827021181583404541015625``." msgstr "" #: ../../library/decimal.rst:585 @@ -1217,7 +1217,7 @@ msgid "Divides two numbers and returns the integer part of the result." msgstr "" #: ../../library/decimal.rst:1212 -msgid "Returns `e ** x`." +msgid "Returns ``e ** x``." msgstr "" #: ../../library/decimal.rst:1217 diff --git a/library/dis.po b/library/dis.po index 11fee26ec7..8c777742e8 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -63,49 +63,51 @@ msgid "" "Some instructions are accompanied by one or more inline cache entries, which " "take the form of :opcode:`CACHE` instructions. These instructions are hidden " "by default, but can be shown by passing ``show_caches=True`` to any :mod:" -"`dis` utility." +"`dis` utility. Furthermore, the interpreter now adapts the bytecode to " +"specialize it for different runtime conditions. The adaptive bytecode can be " +"shown by passing ``adaptive=True``." msgstr "" -#: ../../library/dis.rst:44 +#: ../../library/dis.rst:46 msgid "Example: Given the function :func:`myfunc`::" msgstr "" -#: ../../library/dis.rst:49 +#: ../../library/dis.rst:51 msgid "" "the following command can be used to display the disassembly of :func:" "`myfunc`:" msgstr "" -#: ../../library/dis.rst:63 +#: ../../library/dis.rst:65 msgid "(The \"2\" is a line number)." msgstr "" -#: ../../library/dis.rst:66 +#: ../../library/dis.rst:68 msgid "Bytecode analysis" msgstr "" -#: ../../library/dis.rst:70 +#: ../../library/dis.rst:72 msgid "" "The bytecode analysis API allows pieces of Python code to be wrapped in a :" "class:`Bytecode` object that provides easy access to details of the compiled " "code." msgstr "" -#: ../../library/dis.rst:77 +#: ../../library/dis.rst:79 msgid "" "Analyse the bytecode corresponding to a function, generator, asynchronous " "generator, coroutine, method, string of source code, or a code object (as " "returned by :func:`compile`)." msgstr "" -#: ../../library/dis.rst:81 +#: ../../library/dis.rst:83 msgid "" "This is a convenience wrapper around many of the functions listed below, " "most notably :func:`get_instructions`, as iterating over a :class:`Bytecode` " "instance yields the bytecode operations as :class:`Instruction` instances." msgstr "" -#: ../../library/dis.rst:85 ../../library/dis.rst:262 +#: ../../library/dis.rst:87 ../../library/dis.rst:276 msgid "" "If *first_line* is not ``None``, it indicates the line number that should be " "reported for the first source line in the disassembled code. Otherwise, the " @@ -113,7 +115,7 @@ msgid "" "code object." msgstr "" -#: ../../library/dis.rst:90 +#: ../../library/dis.rst:92 msgid "" "If *current_offset* is not ``None``, it refers to an instruction offset in " "the disassembled code. Setting this means :meth:`.dis` will display a " @@ -122,50 +124,62 @@ msgstr "" #: ../../library/dis.rst:96 msgid "" +"If *show_caches* is ``True``, :meth:`.dis` will display inline cache entries " +"used by the interpreter to specialize the bytecode." +msgstr "" + +#: ../../library/dis.rst:99 +msgid "" +"If *adaptive* is ``True``, :meth:`.dis` will display specialized bytecode " +"that may be different from the original bytecode." +msgstr "" + +#: ../../library/dis.rst:104 +msgid "" "Construct a :class:`Bytecode` instance from the given traceback, setting " "*current_offset* to the instruction responsible for the exception." msgstr "" -#: ../../library/dis.rst:101 +#: ../../library/dis.rst:109 msgid "The compiled code object." msgstr "" -#: ../../library/dis.rst:105 +#: ../../library/dis.rst:113 msgid "The first source line of the code object (if available)" msgstr "" -#: ../../library/dis.rst:109 +#: ../../library/dis.rst:117 msgid "" "Return a formatted view of the bytecode operations (the same as printed by :" "func:`dis.dis`, but returned as a multi-line string)." msgstr "" -#: ../../library/dis.rst:114 +#: ../../library/dis.rst:122 msgid "" "Return a formatted multi-line string with detailed information about the " "code object, like :func:`code_info`." msgstr "" -#: ../../library/dis.rst:117 ../../library/dis.rst:158 -#: ../../library/dis.rst:204 +#: ../../library/dis.rst:125 ../../library/dis.rst:166 +#: ../../library/dis.rst:218 msgid "This can now handle coroutine and asynchronous generator objects." msgstr "" -#: ../../library/dis.rst:120 ../../library/dis.rst:207 -#: ../../library/dis.rst:223 ../../library/dis.rst:250 -#: ../../library/dis.rst:269 -msgid "Added the ``show_caches`` parameter." -msgstr "新增 ``show_caches`` 參數。" +#: ../../library/dis.rst:128 ../../library/dis.rst:221 +#: ../../library/dis.rst:237 ../../library/dis.rst:264 +#: ../../library/dis.rst:285 +msgid "Added the *show_caches* and *adaptive* parameters." +msgstr "新增 *show_caches* 與 *adaptive* 參數。" -#: ../../library/dis.rst:123 +#: ../../library/dis.rst:131 msgid "Example:" msgstr "範例:" -#: ../../library/dis.rst:140 +#: ../../library/dis.rst:148 msgid "Analysis functions" msgstr "" -#: ../../library/dis.rst:142 +#: ../../library/dis.rst:150 msgid "" "The :mod:`dis` module also defines the following analysis functions that " "convert the input directly to the desired output. They can be useful if only " @@ -173,39 +187,39 @@ msgid "" "isn't useful:" msgstr "" -#: ../../library/dis.rst:148 +#: ../../library/dis.rst:156 msgid "" "Return a formatted multi-line string with detailed code object information " "for the supplied function, generator, asynchronous generator, coroutine, " "method, source code string or code object." msgstr "" -#: ../../library/dis.rst:152 +#: ../../library/dis.rst:160 msgid "" "Note that the exact contents of code info strings are highly implementation " "dependent and they may change arbitrarily across Python VMs or Python " "releases." msgstr "" -#: ../../library/dis.rst:164 +#: ../../library/dis.rst:172 msgid "" "Print detailed code object information for the supplied function, method, " "source code string or code object to *file* (or ``sys.stdout`` if *file* is " "not specified)." msgstr "" -#: ../../library/dis.rst:168 +#: ../../library/dis.rst:176 msgid "" "This is a convenient shorthand for ``print(code_info(x), file=file)``, " "intended for interactive exploration at the interpreter prompt." msgstr "" -#: ../../library/dis.rst:173 ../../library/dis.rst:198 -#: ../../library/dis.rst:220 ../../library/dis.rst:247 +#: ../../library/dis.rst:181 ../../library/dis.rst:212 +#: ../../library/dis.rst:234 ../../library/dis.rst:261 msgid "Added *file* parameter." msgstr "新增 *file* 參數。" -#: ../../library/dis.rst:179 +#: ../../library/dis.rst:187 msgid "" "Disassemble the *x* object. *x* can denote either a module, a class, a " "method, a function, a generator, an asynchronous generator, a coroutine, a " @@ -220,110 +234,127 @@ msgid "" "provided, this function disassembles the last traceback." msgstr "" -#: ../../library/dis.rst:192 ../../library/dis.rst:217 -#: ../../library/dis.rst:244 +#: ../../library/dis.rst:200 ../../library/dis.rst:231 +#: ../../library/dis.rst:258 msgid "" "The disassembly is written as text to the supplied *file* argument if " "provided and to ``sys.stdout`` otherwise." msgstr "" -#: ../../library/dis.rst:195 +#: ../../library/dis.rst:203 msgid "" "The maximal depth of recursion is limited by *depth* unless it is ``None``. " "``depth=0`` means no recursion." msgstr "" -#: ../../library/dis.rst:201 +#: ../../library/dis.rst:206 +msgid "" +"If *show_caches* is ``True``, this function will display inline cache " +"entries used by the interpreter to specialize the bytecode." +msgstr "" + +#: ../../library/dis.rst:209 +msgid "" +"If *adaptive* is ``True``, this function will display specialized bytecode " +"that may be different from the original bytecode." +msgstr "" + +#: ../../library/dis.rst:215 msgid "Implemented recursive disassembling and added *depth* parameter." msgstr "" -#: ../../library/dis.rst:213 +#: ../../library/dis.rst:227 msgid "" "Disassemble the top-of-stack function of a traceback, using the last " "traceback if none was passed. The instruction causing the exception is " "indicated." msgstr "" -#: ../../library/dis.rst:230 +#: ../../library/dis.rst:244 msgid "" "Disassemble a code object, indicating the last instruction if *lasti* was " "provided. The output is divided in the following columns:" msgstr "" -#: ../../library/dis.rst:233 +#: ../../library/dis.rst:247 msgid "the line number, for the first instruction of each line" msgstr "" -#: ../../library/dis.rst:234 +#: ../../library/dis.rst:248 msgid "the current instruction, indicated as ``-->``," msgstr "" -#: ../../library/dis.rst:235 +#: ../../library/dis.rst:249 msgid "a labelled instruction, indicated with ``>>``," msgstr "" -#: ../../library/dis.rst:236 +#: ../../library/dis.rst:250 msgid "the address of the instruction," msgstr "" -#: ../../library/dis.rst:237 +#: ../../library/dis.rst:251 msgid "the operation code name," msgstr "" -#: ../../library/dis.rst:238 +#: ../../library/dis.rst:252 msgid "operation parameters, and" msgstr "" -#: ../../library/dis.rst:239 +#: ../../library/dis.rst:253 msgid "interpretation of the parameters in parentheses." msgstr "" -#: ../../library/dis.rst:241 +#: ../../library/dis.rst:255 msgid "" "The parameter interpretation recognizes local and global variable names, " "constant values, branch targets, and compare operators." msgstr "" -#: ../../library/dis.rst:256 +#: ../../library/dis.rst:270 msgid "" "Return an iterator over the instructions in the supplied function, method, " "source code string or code object." msgstr "" -#: ../../library/dis.rst:259 +#: ../../library/dis.rst:273 msgid "" "The iterator generates a series of :class:`Instruction` named tuples giving " "the details of each operation in the supplied code." msgstr "" -#: ../../library/dis.rst:275 +#: ../../library/dis.rst:281 +msgid "" +"The *show_caches* and *adaptive* parameters work as they do in :func:`dis`." +msgstr "" + +#: ../../library/dis.rst:291 msgid "" "This generator function uses the ``co_lines`` method of the code object " "*code* to find the offsets which are starts of lines in the source code. " "They are generated as ``(offset, lineno)`` pairs." msgstr "" -#: ../../library/dis.rst:279 +#: ../../library/dis.rst:295 msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "" -#: ../../library/dis.rst:282 +#: ../../library/dis.rst:298 msgid "" "The :pep:`626` ``co_lines`` method is used instead of the ``co_firstlineno`` " "and ``co_lnotab`` attributes of the code object." msgstr "" -#: ../../library/dis.rst:289 +#: ../../library/dis.rst:305 msgid "" "Detect all offsets in the raw compiled bytecode string *code* which are jump " "targets, and return a list of these offsets." msgstr "" -#: ../../library/dis.rst:295 +#: ../../library/dis.rst:311 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: ../../library/dis.rst:297 +#: ../../library/dis.rst:313 msgid "" "If the code has a jump target and *jump* is ``True``, :func:`~stack_effect` " "will return the stack effect of jumping. If *jump* is ``False``, it will " @@ -331,104 +362,105 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: ../../library/dis.rst:304 +#: ../../library/dis.rst:320 msgid "Added *jump* parameter." msgstr "新增 *jump* 參數。" -#: ../../library/dis.rst:311 +#: ../../library/dis.rst:327 msgid "Python Bytecode Instructions" msgstr "" -#: ../../library/dis.rst:313 +#: ../../library/dis.rst:329 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" msgstr "" -#: ../../library/dis.rst:318 +#: ../../library/dis.rst:334 msgid "Details for a bytecode operation" msgstr "" -#: ../../library/dis.rst:322 +#: ../../library/dis.rst:338 msgid "" "numeric code for operation, corresponding to the opcode values listed below " "and the bytecode values in the :ref:`opcode_collections`." msgstr "" -#: ../../library/dis.rst:328 +#: ../../library/dis.rst:344 msgid "human readable name for operation" msgstr "" -#: ../../library/dis.rst:333 +#: ../../library/dis.rst:349 msgid "numeric argument to operation (if any), otherwise ``None``" msgstr "" -#: ../../library/dis.rst:338 +#: ../../library/dis.rst:354 msgid "resolved arg value (if any), otherwise ``None``" msgstr "" -#: ../../library/dis.rst:343 +#: ../../library/dis.rst:359 msgid "" "human readable description of operation argument (if any), otherwise an " "empty string." msgstr "" -#: ../../library/dis.rst:349 +#: ../../library/dis.rst:365 msgid "start index of operation within bytecode sequence" msgstr "" -#: ../../library/dis.rst:354 +#: ../../library/dis.rst:370 msgid "line started by this opcode (if any), otherwise ``None``" msgstr "" -#: ../../library/dis.rst:359 +#: ../../library/dis.rst:375 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: ../../library/dis.rst:364 +#: ../../library/dis.rst:380 msgid "" ":class:`dis.Positions` object holding the start and end locations that are " "covered by this instruction." msgstr "" -#: ../../library/dis.rst:371 +#: ../../library/dis.rst:387 msgid "Field ``positions`` is added." msgstr "" -#: ../../library/dis.rst:376 -msgid "In case the information is not available, some fields might be `None`." +#: ../../library/dis.rst:392 +msgid "" +"In case the information is not available, some fields might be ``None``." msgstr "" -#: ../../library/dis.rst:386 +#: ../../library/dis.rst:402 msgid "" "The Python compiler currently generates the following bytecode instructions." msgstr "" -#: ../../library/dis.rst:389 +#: ../../library/dis.rst:405 msgid "**General instructions**" msgstr "" -#: ../../library/dis.rst:393 +#: ../../library/dis.rst:409 msgid "" "Do nothing code. Used as a placeholder by the bytecode optimizer, and to " "generate line tracing events." msgstr "" -#: ../../library/dis.rst:399 +#: ../../library/dis.rst:415 msgid "Removes the top-of-stack (TOS) item." msgstr "" -#: ../../library/dis.rst:404 +#: ../../library/dis.rst:420 msgid "" "Push the *i*-th item to the top of the stack. The item is not removed from " "its original location." msgstr "" -#: ../../library/dis.rst:412 +#: ../../library/dis.rst:428 msgid "Swap TOS with the item at position *i*." msgstr "" -#: ../../library/dis.rst:419 +#: ../../library/dis.rst:435 msgid "" "Rather than being an actual instruction, this opcode is used to mark extra " "space for the interpreter to cache useful data directly in the bytecode " @@ -436,68 +468,68 @@ msgid "" "viewed with ``show_caches=True``." msgstr "" -#: ../../library/dis.rst:424 +#: ../../library/dis.rst:440 msgid "" "Logically, this space is part of the preceding instruction. Many opcodes " "expect to be followed by an exact number of caches, and will instruct the " "interpreter to skip over them at runtime." msgstr "" -#: ../../library/dis.rst:428 +#: ../../library/dis.rst:444 msgid "" "Populated caches can look like arbitrary instructions, so great care should " "be taken when reading or modifying raw, adaptive bytecode containing " "quickened data." msgstr "" -#: ../../library/dis.rst:435 +#: ../../library/dis.rst:451 msgid "**Unary operations**" msgstr "" -#: ../../library/dis.rst:437 +#: ../../library/dis.rst:453 msgid "" "Unary operations take the top of the stack, apply the operation, and push " "the result back on the stack." msgstr "" -#: ../../library/dis.rst:442 +#: ../../library/dis.rst:458 msgid "Implements ``TOS = +TOS``." msgstr "" -#: ../../library/dis.rst:447 +#: ../../library/dis.rst:463 msgid "Implements ``TOS = -TOS``." msgstr "" -#: ../../library/dis.rst:452 +#: ../../library/dis.rst:468 msgid "Implements ``TOS = not TOS``." msgstr "" -#: ../../library/dis.rst:457 +#: ../../library/dis.rst:473 msgid "Implements ``TOS = ~TOS``." msgstr "" -#: ../../library/dis.rst:462 +#: ../../library/dis.rst:478 msgid "Implements ``TOS = iter(TOS)``." msgstr "" -#: ../../library/dis.rst:467 +#: ../../library/dis.rst:483 msgid "" "If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object it is " "left as is. Otherwise, implements ``TOS = iter(TOS)``." msgstr "" -#: ../../library/dis.rst:473 +#: ../../library/dis.rst:489 msgid "**Binary and in-place operations**" msgstr "" -#: ../../library/dis.rst:475 +#: ../../library/dis.rst:491 msgid "" "Binary operations remove the top of the stack (TOS) and the second top-most " "stack item (TOS1) from the stack. They perform the operation, and put the " "result back on the stack." msgstr "" -#: ../../library/dis.rst:479 +#: ../../library/dis.rst:495 msgid "" "In-place operations are like binary operations, in that they remove TOS and " "TOS1, and push the result back on the stack, but the operation is done in-" @@ -505,68 +537,68 @@ msgid "" "to be) the original TOS1." msgstr "" -#: ../../library/dis.rst:487 +#: ../../library/dis.rst:503 msgid "" "Implements the binary and in-place operators (depending on the value of " "*op*)." msgstr "" -#: ../../library/dis.rst:495 +#: ../../library/dis.rst:511 msgid "Implements ``TOS = TOS1[TOS]``." msgstr "" -#: ../../library/dis.rst:500 +#: ../../library/dis.rst:516 msgid "Implements ``TOS1[TOS] = TOS2``." msgstr "" -#: ../../library/dis.rst:505 +#: ../../library/dis.rst:521 msgid "Implements ``del TOS1[TOS]``." msgstr "" -#: ../../library/dis.rst:508 +#: ../../library/dis.rst:524 msgid "**Coroutine opcodes**" msgstr "" -#: ../../library/dis.rst:512 +#: ../../library/dis.rst:528 msgid "" "Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)`` returns " "``o`` if ``o`` is a coroutine object or a generator object with the " "CO_ITERABLE_COROUTINE flag, or resolves ``o.__await__``." msgstr "" -#: ../../library/dis.rst:517 +#: ../../library/dis.rst:533 msgid "" "If the ``where`` operand is nonzero, it indicates where the instruction " "occurs:" msgstr "" -#: ../../library/dis.rst:520 +#: ../../library/dis.rst:536 msgid "``1`` After a call to ``__aenter__``" msgstr "" -#: ../../library/dis.rst:521 +#: ../../library/dis.rst:537 msgid "``2`` After a call to ``__aexit__``" msgstr "" -#: ../../library/dis.rst:525 +#: ../../library/dis.rst:541 msgid "Previously, this instruction did not have an oparg." msgstr "" -#: ../../library/dis.rst:531 +#: ../../library/dis.rst:547 msgid "Implements ``TOS = TOS.__aiter__()``." msgstr "" -#: ../../library/dis.rst:534 +#: ../../library/dis.rst:550 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: ../../library/dis.rst:541 +#: ../../library/dis.rst:557 msgid "" "Pushes ``get_awaitable(TOS.__anext__())`` to the stack. See " "``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -#: ../../library/dis.rst:549 +#: ../../library/dis.rst:565 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " "awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 3 values from " @@ -575,50 +607,50 @@ msgid "" "exception handler block is removed from the block stack." msgstr "" -#: ../../library/dis.rst:557 ../../library/dis.rst:635 -#: ../../library/dis.rst:646 +#: ../../library/dis.rst:573 ../../library/dis.rst:651 +#: ../../library/dis.rst:662 msgid "" "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: ../../library/dis.rst:562 +#: ../../library/dis.rst:578 msgid "" "Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the " "stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack." msgstr "" -#: ../../library/dis.rst:569 +#: ../../library/dis.rst:585 msgid "**Miscellaneous opcodes**" msgstr "" -#: ../../library/dis.rst:573 +#: ../../library/dis.rst:589 msgid "" "Implements the expression statement for the interactive mode. TOS is " "removed from the stack and printed. In non-interactive mode, an expression " "statement is terminated with :opcode:`POP_TOP`." msgstr "" -#: ../../library/dis.rst:580 +#: ../../library/dis.rst:596 msgid "" "Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." msgstr "" -#: ../../library/dis.rst:585 +#: ../../library/dis.rst:601 msgid "" "Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." msgstr "" -#: ../../library/dis.rst:590 +#: ../../library/dis.rst:606 msgid "" "Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " "comprehensions." msgstr "" -#: ../../library/dis.rst:594 +#: ../../library/dis.rst:610 msgid "Map value is TOS and map key is TOS1. Before, those were reversed." msgstr "" -#: ../../library/dis.rst:597 +#: ../../library/dis.rst:613 msgid "" "For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" "`MAP_ADD` instructions, while the added value or key/value pair is popped " @@ -626,15 +658,15 @@ msgid "" "further iterations of the loop." msgstr "" -#: ../../library/dis.rst:605 +#: ../../library/dis.rst:621 msgid "Returns with TOS to the caller of the function." msgstr "" -#: ../../library/dis.rst:610 +#: ../../library/dis.rst:626 msgid "Pops TOS and yields it from a :term:`generator`." msgstr "" -#: ../../library/dis.rst:616 +#: ../../library/dis.rst:632 msgid "" "Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " "set up to an empty ``dict``. This opcode is only emitted if a class or " @@ -642,45 +674,45 @@ msgid "" "statically." msgstr "" -#: ../../library/dis.rst:626 +#: ../../library/dis.rst:642 msgid "" "Loads all symbols not starting with ``'_'`` directly from the module TOS to " "the local namespace. The module is popped after loading all names. This " "opcode implements ``from module import *``." msgstr "" -#: ../../library/dis.rst:633 +#: ../../library/dis.rst:649 msgid "" "Pops a value from the stack, which is used to restore the exception state." msgstr "" -#: ../../library/dis.rst:640 +#: ../../library/dis.rst:656 msgid "" "Re-raises the exception currently on top of the stack. If oparg is non-zero, " "pops an additional value from the stack which is used to set ``f_lasti`` of " "the current frame." msgstr "" -#: ../../library/dis.rst:651 +#: ../../library/dis.rst:667 msgid "" "Pops a value from the stack. Pushes the current exception to the top of the " "stack. Pushes the value originally popped back to the stack. Used in " "exception handlers." msgstr "" -#: ../../library/dis.rst:659 +#: ../../library/dis.rst:675 msgid "" "Performs exception matching for ``except``. Tests whether the TOS1 is an " "exception matching TOS. Pops TOS and pushes the boolean result of the test." msgstr "" -#: ../../library/dis.rst:666 +#: ../../library/dis.rst:682 msgid "" "Performs exception matching for ``except*``. Applies ``split(TOS)`` on the " "exception group representing TOS1." msgstr "" -#: ../../library/dis.rst:669 +#: ../../library/dis.rst:685 msgid "" "In case of a match, pops two items from the stack and pushes the non-" "matching subgroup (``None`` in case of full match) followed by the matching " @@ -688,7 +720,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/dis.rst:678 +#: ../../library/dis.rst:694 msgid "" "Combines the raised and reraised exceptions list from TOS, into an exception " "group to propagate from a try-except* block. Uses the original exception " @@ -697,7 +729,7 @@ msgid "" "there isn't one." msgstr "" -#: ../../library/dis.rst:688 +#: ../../library/dis.rst:704 msgid "" "Calls the function in position 4 on the stack with arguments (type, val, tb) " "representing the exception at the top of the stack. Used to implement the " @@ -705,25 +737,25 @@ msgid "" "occurred in a :keyword:`with` statement." msgstr "" -#: ../../library/dis.rst:695 +#: ../../library/dis.rst:711 msgid "" "The ``__exit__`` function is in position 4 of the stack rather than 7. " "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: ../../library/dis.rst:702 +#: ../../library/dis.rst:718 msgid "" "Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " "statement." msgstr "" -#: ../../library/dis.rst:710 +#: ../../library/dis.rst:726 msgid "" "Pushes :func:`builtins.__build_class__` onto the stack. It is later called " "to construct a class." msgstr "" -#: ../../library/dis.rst:716 +#: ../../library/dis.rst:732 msgid "" "This opcode performs several operations before a with block starts. First, " "it loads :meth:`~object.__exit__` from the context manager and pushes it " @@ -732,11 +764,11 @@ msgid "" "``__enter__()`` method is pushed onto the stack." msgstr "" -#: ../../library/dis.rst:727 +#: ../../library/dis.rst:743 msgid "Push ``len(TOS)`` onto the stack." msgstr "" -#: ../../library/dis.rst:734 +#: ../../library/dis.rst:750 msgid "" "If TOS is an instance of :class:`collections.abc.Mapping` (or, more " "technically: if it has the :const:`Py_TPFLAGS_MAPPING` flag set in its :c:" @@ -744,7 +776,7 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:744 +#: ../../library/dis.rst:760 msgid "" "If TOS is an instance of :class:`collections.abc.Sequence` and is *not* an " "instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, more " @@ -753,39 +785,39 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:754 +#: ../../library/dis.rst:770 msgid "" "TOS is a tuple of mapping keys, and TOS1 is the match subject. If TOS1 " "contains all of the keys in TOS, push a :class:`tuple` containing the " "corresponding values. Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:760 ../../library/dis.rst:1305 +#: ../../library/dis.rst:776 ../../library/dis.rst:1321 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." msgstr "" -#: ../../library/dis.rst:767 +#: ../../library/dis.rst:783 msgid "" "Implements ``name = TOS``. *namei* is the index of *name* in the attribute :" "attr:`co_names` of the code object. The compiler tries to use :opcode:" "`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible." msgstr "" -#: ../../library/dis.rst:774 +#: ../../library/dis.rst:790 msgid "" "Implements ``del name``, where *namei* is the index into :attr:`co_names` " "attribute of the code object." msgstr "" -#: ../../library/dis.rst:780 +#: ../../library/dis.rst:796 msgid "" "Unpacks TOS into *count* individual values, which are put onto the stack " "right-to-left." msgstr "" -#: ../../library/dis.rst:786 +#: ../../library/dis.rst:802 msgid "" "Implements assignment with a starred target: Unpacks an iterable in TOS into " "individual values, where the total number of values can be smaller than the " @@ -793,119 +825,119 @@ msgid "" "leftover items." msgstr "" -#: ../../library/dis.rst:791 +#: ../../library/dis.rst:807 msgid "" "The low byte of *counts* is the number of values before the list value, the " "high byte of *counts* the number of values after it. The resulting values " "are put onto the stack right-to-left." msgstr "" -#: ../../library/dis.rst:798 +#: ../../library/dis.rst:814 msgid "" "Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" "`co_names`." msgstr "" -#: ../../library/dis.rst:804 +#: ../../library/dis.rst:820 msgid "" "Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." msgstr "" -#: ../../library/dis.rst:809 +#: ../../library/dis.rst:825 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: ../../library/dis.rst:814 +#: ../../library/dis.rst:830 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: ../../library/dis.rst:819 +#: ../../library/dis.rst:835 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: ../../library/dis.rst:824 +#: ../../library/dis.rst:840 msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." msgstr "" -#: ../../library/dis.rst:829 +#: ../../library/dis.rst:845 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack." msgstr "" -#: ../../library/dis.rst:835 +#: ../../library/dis.rst:851 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: ../../library/dis.rst:840 +#: ../../library/dis.rst:856 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: ../../library/dis.rst:845 +#: ../../library/dis.rst:861 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., TOS3: TOS2, TOS1: TOS}``." msgstr "" -#: ../../library/dis.rst:849 +#: ../../library/dis.rst:865 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: ../../library/dis.rst:856 +#: ../../library/dis.rst:872 msgid "" "The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " "top element on the stack which contains a tuple of keys, then starting from " "``TOS1``, pops *count* values to form values in the built dictionary." msgstr "" -#: ../../library/dis.rst:865 +#: ../../library/dis.rst:881 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: ../../library/dis.rst:873 +#: ../../library/dis.rst:889 msgid "" "Pops a list from the stack and pushes a tuple containing the same values." msgstr "" -#: ../../library/dis.rst:880 +#: ../../library/dis.rst:896 msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." msgstr "" -#: ../../library/dis.rst:887 +#: ../../library/dis.rst:903 msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." msgstr "" -#: ../../library/dis.rst:894 +#: ../../library/dis.rst:910 msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." msgstr "" -#: ../../library/dis.rst:901 +#: ../../library/dis.rst:917 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: ../../library/dis.rst:908 +#: ../../library/dis.rst:924 msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." msgstr "" -#: ../../library/dis.rst:913 +#: ../../library/dis.rst:929 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname]``." msgstr "" -#: ../../library/dis.rst:919 +#: ../../library/dis.rst:935 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:926 +#: ../../library/dis.rst:942 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:933 +#: ../../library/dis.rst:949 msgid "" "Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide " "the *fromlist* and *level* arguments of :func:`__import__`. The module " @@ -914,86 +946,86 @@ msgid "" "modifies the namespace." msgstr "" -#: ../../library/dis.rst:942 +#: ../../library/dis.rst:958 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in TOS. The " "resulting object is pushed onto the stack, to be subsequently stored by a :" "opcode:`STORE_FAST` instruction." msgstr "" -#: ../../library/dis.rst:949 +#: ../../library/dis.rst:965 msgid "Increments bytecode counter by *delta*." msgstr "" -#: ../../library/dis.rst:954 +#: ../../library/dis.rst:970 msgid "Decrements bytecode counter by *delta*. Checks for interrupts." msgstr "" -#: ../../library/dis.rst:961 +#: ../../library/dis.rst:977 msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: ../../library/dis.rst:968 +#: ../../library/dis.rst:984 msgid "" "If TOS is true, increments the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:975 +#: ../../library/dis.rst:991 msgid "" "If TOS is true, decrements the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:982 +#: ../../library/dis.rst:998 msgid "" "If TOS is false, increments the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:989 +#: ../../library/dis.rst:1005 msgid "" "If TOS is false, decrements the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:996 +#: ../../library/dis.rst:1012 msgid "" "If TOS is not ``None``, increments the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1003 +#: ../../library/dis.rst:1019 msgid "" "If TOS is not ``None``, decrements the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1010 +#: ../../library/dis.rst:1026 msgid "" "If TOS is ``None``, increments the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1017 +#: ../../library/dis.rst:1033 msgid "" "If TOS is ``None``, decrements the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1024 +#: ../../library/dis.rst:1040 msgid "" "If TOS is true, increments the bytecode counter by *delta* and leaves TOS on " "the stack. Otherwise (TOS is false), TOS is popped." msgstr "" -#: ../../library/dis.rst:1029 ../../library/dis.rst:1039 +#: ../../library/dis.rst:1045 ../../library/dis.rst:1055 msgid "The oparg is now a relative delta rather than an absolute target." msgstr "" -#: ../../library/dis.rst:1034 +#: ../../library/dis.rst:1050 msgid "" "If TOS is false, increments the bytecode counter by *delta* and leaves TOS " "on the stack. Otherwise (TOS is true), TOS is popped." msgstr "" -#: ../../library/dis.rst:1045 +#: ../../library/dis.rst:1061 msgid "" "TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If " "this yields a new value, push it on the stack (leaving the iterator below " @@ -1001,153 +1033,153 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: ../../library/dis.rst:1053 +#: ../../library/dis.rst:1069 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1055 +#: ../../library/dis.rst:1071 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " "before the global variable." msgstr "" -#: ../../library/dis.rst:1061 +#: ../../library/dis.rst:1077 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1066 +#: ../../library/dis.rst:1082 msgid "Stores TOS into the local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1071 +#: ../../library/dis.rst:1087 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1076 +#: ../../library/dis.rst:1092 msgid "" "Creates a new cell in slot ``i``. If that slot is empty then that value is " "stored into the new cell." msgstr "" -#: ../../library/dis.rst:1084 +#: ../../library/dis.rst:1100 msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast locals" "\" storage. The name of the variable is ``co_fastlocalnames[i]``." msgstr "" -#: ../../library/dis.rst:1087 +#: ../../library/dis.rst:1103 msgid "" "Note that ``LOAD_CLOSURE`` is effectively an alias for ``LOAD_FAST``. It " "exists to keep bytecode a little more readable." msgstr "" -#: ../../library/dis.rst:1090 ../../library/dis.rst:1099 -#: ../../library/dis.rst:1111 ../../library/dis.rst:1120 -#: ../../library/dis.rst:1131 +#: ../../library/dis.rst:1106 ../../library/dis.rst:1115 +#: ../../library/dis.rst:1127 ../../library/dis.rst:1136 +#: ../../library/dis.rst:1147 msgid "``i`` is no longer offset by the length of ``co_varnames``." msgstr "" -#: ../../library/dis.rst:1096 +#: ../../library/dis.rst:1112 msgid "" "Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: ../../library/dis.rst:1105 +#: ../../library/dis.rst:1121 msgid "" "Much like :opcode:`LOAD_DEREF` but first checks the locals dictionary before " "consulting the cell. This is used for loading free variables in class " "bodies." msgstr "" -#: ../../library/dis.rst:1117 +#: ../../library/dis.rst:1133 msgid "" "Stores TOS into the cell contained in slot ``i`` of the \"fast locals\" " "storage." msgstr "" -#: ../../library/dis.rst:1126 +#: ../../library/dis.rst:1142 msgid "" "Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " "Used by the :keyword:`del` statement." msgstr "" -#: ../../library/dis.rst:1137 +#: ../../library/dis.rst:1153 msgid "" "Copies the ``n`` free variables from the closure into the frame. Removes the " "need for special code on the caller's side when calling closures." msgstr "" -#: ../../library/dis.rst:1146 +#: ../../library/dis.rst:1162 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: ../../library/dis.rst:1149 +#: ../../library/dis.rst:1165 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: ../../library/dis.rst:1150 +#: ../../library/dis.rst:1166 msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" msgstr "" -#: ../../library/dis.rst:1151 +#: ../../library/dis.rst:1167 msgid "" "2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1`` " "with ``__cause__`` set to ``TOS``)" msgstr "" -#: ../../library/dis.rst:1157 +#: ../../library/dis.rst:1173 msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including the named arguments specified by the preceding :opcode:`KW_NAMES`, " "if any. On the stack are (in ascending order), either:" msgstr "" -#: ../../library/dis.rst:1162 +#: ../../library/dis.rst:1178 msgid "NULL" msgstr "" -#: ../../library/dis.rst:1163 ../../library/dis.rst:1169 +#: ../../library/dis.rst:1179 ../../library/dis.rst:1185 msgid "The callable" msgstr "" -#: ../../library/dis.rst:1164 +#: ../../library/dis.rst:1180 msgid "The positional arguments" msgstr "" -#: ../../library/dis.rst:1165 ../../library/dis.rst:1172 +#: ../../library/dis.rst:1181 ../../library/dis.rst:1188 msgid "The named arguments" msgstr "" -#: ../../library/dis.rst:1167 +#: ../../library/dis.rst:1183 msgid "or:" msgstr "" -#: ../../library/dis.rst:1170 +#: ../../library/dis.rst:1186 msgid "``self``" msgstr "" -#: ../../library/dis.rst:1171 +#: ../../library/dis.rst:1187 msgid "The remaining positional arguments" msgstr "" -#: ../../library/dis.rst:1174 +#: ../../library/dis.rst:1190 msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self`` when a ``NULL`` is not present." msgstr "" -#: ../../library/dis.rst:1177 +#: ../../library/dis.rst:1193 msgid "" "``CALL`` pops all arguments and the callable object off the stack, calls the " "callable object with those arguments, and pushes the return value returned " "by the callable object." msgstr "" -#: ../../library/dis.rst:1186 +#: ../../library/dis.rst:1202 msgid "" "Calls a callable object with variable set of positional and keyword " "arguments. If the lowest bit of *flags* is set, the top of the stack " @@ -1159,7 +1191,7 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1201 +#: ../../library/dis.rst:1217 msgid "" "Loads a method named ``co_names[namei]`` from the TOS object. TOS is popped. " "This bytecode distinguishes two cases: if TOS has a method with the correct " @@ -1169,70 +1201,70 @@ msgid "" "are pushed." msgstr "" -#: ../../library/dis.rst:1213 +#: ../../library/dis.rst:1229 msgid "" "Prefixes :opcode:`CALL`. Logically this is a no op. It exists to enable " "effective specialization of calls. ``argc`` is the number of arguments as " "described in :opcode:`CALL`." msgstr "" -#: ../../library/dis.rst:1222 +#: ../../library/dis.rst:1238 msgid "" "Pushes a ``NULL`` to the stack. Used in the call sequence to match the " "``NULL`` pushed by :opcode:`LOAD_METHOD` for non-method calls." msgstr "" -#: ../../library/dis.rst:1231 +#: ../../library/dis.rst:1247 msgid "" "Prefixes :opcode:`PRECALL`. Stores a reference to ``co_consts[consti]`` into " "an internal variable for use by :opcode:`CALL`. ``co_consts[consti]`` must " "be a tuple of strings." msgstr "" -#: ../../library/dis.rst:1240 +#: ../../library/dis.rst:1256 msgid "" "Pushes a new function object on the stack. From bottom to top, the consumed " "stack must consist of values if the argument carries a specified flag value" msgstr "" -#: ../../library/dis.rst:1243 +#: ../../library/dis.rst:1259 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: ../../library/dis.rst:1245 +#: ../../library/dis.rst:1261 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: ../../library/dis.rst:1246 +#: ../../library/dis.rst:1262 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: ../../library/dis.rst:1247 +#: ../../library/dis.rst:1263 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: ../../library/dis.rst:1248 +#: ../../library/dis.rst:1264 msgid "the code associated with the function (at TOS1)" msgstr "" -#: ../../library/dis.rst:1249 +#: ../../library/dis.rst:1265 msgid "the :term:`qualified name` of the function (at TOS)" msgstr "" -#: ../../library/dis.rst:1251 +#: ../../library/dis.rst:1267 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: ../../library/dis.rst:1258 +#: ../../library/dis.rst:1274 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is " "pushed. See the :func:`slice` built-in function for more information." msgstr "" -#: ../../library/dis.rst:1265 +#: ../../library/dis.rst:1281 msgid "" "Prefixes any opcode which has an argument too big to fit into the default " "one byte. *ext* holds an additional byte which act as higher bits in the " @@ -1240,142 +1272,142 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: ../../library/dis.rst:1273 +#: ../../library/dis.rst:1289 msgid "" "Used for implementing formatted literal strings (f-strings). Pops an " "optional *fmt_spec* from the stack, then a required *value*. *flags* is " "interpreted as follows:" msgstr "" -#: ../../library/dis.rst:1277 +#: ../../library/dis.rst:1293 msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." msgstr "" -#: ../../library/dis.rst:1278 +#: ../../library/dis.rst:1294 msgid "" "``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." msgstr "" -#: ../../library/dis.rst:1280 +#: ../../library/dis.rst:1296 msgid "" "``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1282 +#: ../../library/dis.rst:1298 msgid "" "``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1284 +#: ../../library/dis.rst:1300 msgid "" "``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use it, else " "use an empty *fmt_spec*." msgstr "" -#: ../../library/dis.rst:1287 +#: ../../library/dis.rst:1303 msgid "" "Formatting is performed using :c:func:`PyObject_Format`. The result is " "pushed on the stack." msgstr "" -#: ../../library/dis.rst:1295 +#: ../../library/dis.rst:1311 msgid "" "TOS is a tuple of keyword attribute names, TOS1 is the class being matched " "against, and TOS2 is the match subject. *count* is the number of positional " "sub-patterns." msgstr "" -#: ../../library/dis.rst:1299 +#: ../../library/dis.rst:1315 msgid "" "Pop TOS, TOS1, and TOS2. If TOS2 is an instance of TOS1 and has the " "positional and keyword attributes required by *count* and TOS, push a tuple " "of extracted attributes. Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:1312 +#: ../../library/dis.rst:1328 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: ../../library/dis.rst:1314 +#: ../../library/dis.rst:1330 msgid "The ``where`` operand marks where the ``RESUME`` occurs:" msgstr "" -#: ../../library/dis.rst:1316 +#: ../../library/dis.rst:1332 msgid "``0`` The start of a function" msgstr "" -#: ../../library/dis.rst:1317 +#: ../../library/dis.rst:1333 msgid "``1`` After a ``yield`` expression" msgstr "" -#: ../../library/dis.rst:1318 +#: ../../library/dis.rst:1334 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: ../../library/dis.rst:1319 +#: ../../library/dis.rst:1335 msgid "``3`` After an ``await`` expression" msgstr "" -#: ../../library/dis.rst:1326 +#: ../../library/dis.rst:1342 msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Clear the current frame and return the newly created generator." msgstr "" -#: ../../library/dis.rst:1334 +#: ../../library/dis.rst:1350 msgid "" "Sends ``None`` to the sub-generator of this generator. Used in ``yield " "from`` and ``await`` statements." msgstr "" -#: ../../library/dis.rst:1342 +#: ../../library/dis.rst:1358 msgid "" "Wraps the value on top of the stack in an ``async_generator_wrapped_value``. " "Used to yield in async generators." msgstr "" -#: ../../library/dis.rst:1350 +#: ../../library/dis.rst:1366 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes which don't use their argument and those that do (``< " "HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: ../../library/dis.rst:1354 +#: ../../library/dis.rst:1370 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: ../../library/dis.rst:1362 +#: ../../library/dis.rst:1378 msgid "Opcode collections" msgstr "" -#: ../../library/dis.rst:1364 +#: ../../library/dis.rst:1380 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../library/dis.rst:1369 +#: ../../library/dis.rst:1385 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../library/dis.rst:1374 +#: ../../library/dis.rst:1390 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../library/dis.rst:1379 +#: ../../library/dis.rst:1395 msgid "Sequence of all compare operation names." msgstr "" -#: ../../library/dis.rst:1384 +#: ../../library/dis.rst:1400 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../library/dis.rst:1389 +#: ../../library/dis.rst:1405 msgid "" "Sequence of bytecodes that access a free variable (note that 'free' in this " "context refers to names in the current scope that are referenced by inner " @@ -1383,22 +1415,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: ../../library/dis.rst:1397 +#: ../../library/dis.rst:1413 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../library/dis.rst:1402 +#: ../../library/dis.rst:1418 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../library/dis.rst:1407 +#: ../../library/dis.rst:1423 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../library/dis.rst:1412 +#: ../../library/dis.rst:1428 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../library/dis.rst:1417 +#: ../../library/dis.rst:1433 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 82627eb6c5..666659df4a 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-02 00:25+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -353,7 +353,7 @@ msgid "" "In a model generated from bytes, any header values that (in contravention of " "the RFCs) contain non-ASCII bytes will, when retrieved through this " "interface, be represented as :class:`~email.header.Header` objects with a " -"charset of `unknown-8bit`." +"charset of ``unknown-8bit``." msgstr "" #: ../../library/email.compat32-message.rst:306 diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index c2bf9bfa5b..57ed52af01 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 14:44+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -197,7 +197,7 @@ msgid "" "representing that date. If the timezone of the input date is specified as " "``-0000`` (indicating it is in UTC but contains no information about the " "source timezone), then :attr:`.datetime` will be a naive :class:`~datetime." -"datetime`. If a specific timezone offset is found (including `+0000`), " +"datetime`. If a specific timezone offset is found (including ``+0000``), " "then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:" "`datetime.timezone` to record the timezone offset." msgstr "" diff --git a/library/ensurepip.po b/library/ensurepip.po index 102db9b60c..0e16796da4 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -204,7 +204,7 @@ msgid "" "bootstrapping operation." msgstr "" -#: ../../library/ensurepip.rst:134 +#: ../../library/ensurepip.rst:27 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." diff --git a/library/enum.po b/library/enum.po index 597c2c846f..744c6f41a4 100644 --- a/library/enum.po +++ b/library/enum.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -159,107 +159,136 @@ msgid "" msgstr "" #: ../../library/enum.rst:95 +msgid ":class:`ReprEnum`" +msgstr ":class:`ReprEnum`" + +#: ../../library/enum.rst:97 +msgid "" +"Used by :class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag` to keep " +"the :class:`str() ` of the mixed-in type." +msgstr "" + +#: ../../library/enum.rst:100 msgid ":class:`EnumCheck`" msgstr ":class:`EnumCheck`" -#: ../../library/enum.rst:97 +#: ../../library/enum.rst:102 msgid "" "An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and " "``UNIQUE``, for use with :func:`verify` to ensure various constraints are " "met by a given enumeration." msgstr "" -#: ../../library/enum.rst:101 +#: ../../library/enum.rst:106 msgid ":class:`FlagBoundary`" msgstr ":class:`FlagBoundary`" -#: ../../library/enum.rst:103 +#: ../../library/enum.rst:108 msgid "" "An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and " "``KEEP`` which allows for more fine-grained control over how invalid values " "are dealt with in an enumeration." msgstr "" -#: ../../library/enum.rst:107 +#: ../../library/enum.rst:112 msgid ":class:`auto`" msgstr ":class:`auto`" -#: ../../library/enum.rst:109 +#: ../../library/enum.rst:114 msgid "" "Instances are replaced with an appropriate value for Enum members. :class:" "`StrEnum` defaults to the lower-cased version of the member name, while " "other Enums default to 1 and increase from there." msgstr "" -#: ../../library/enum.rst:113 +#: ../../library/enum.rst:118 msgid ":func:`~enum.property`" msgstr ":func:`~enum.property`" -#: ../../library/enum.rst:115 +#: ../../library/enum.rst:120 msgid "" "Allows :class:`Enum` members to have attributes without conflicting with " "member names." msgstr "" -#: ../../library/enum.rst:118 +#: ../../library/enum.rst:123 msgid ":func:`unique`" msgstr ":func:`unique`" -#: ../../library/enum.rst:120 +#: ../../library/enum.rst:125 msgid "" "Enum class decorator that ensures only one name is bound to any one value." msgstr "" -#: ../../library/enum.rst:122 +#: ../../library/enum.rst:127 msgid ":func:`verify`" msgstr ":func:`verify`" -#: ../../library/enum.rst:124 +#: ../../library/enum.rst:129 msgid "" "Enum class decorator that checks user-selectable constraints on an " "enumeration." msgstr "" -#: ../../library/enum.rst:127 +#: ../../library/enum.rst:132 msgid ":func:`member`" msgstr ":func:`member`" -#: ../../library/enum.rst:129 +#: ../../library/enum.rst:134 msgid "Make ``obj`` a member. Can be used as a decorator." msgstr "" -#: ../../library/enum.rst:131 +#: ../../library/enum.rst:136 msgid ":func:`nonmember`" msgstr ":func:`nonmember`" -#: ../../library/enum.rst:133 +#: ../../library/enum.rst:138 msgid "Do not make ``obj`` a member. Can be used as a decorator." msgstr "" -#: ../../library/enum.rst:136 +#: ../../library/enum.rst:140 +msgid ":func:`global_enum`" +msgstr ":func:`global_enum`" + +#: ../../library/enum.rst:142 +msgid "" +"Modify the :class:`str() ` and :func:`repr` of an enum to show its " +"members as belonging to the module instead of its class. Should only be used " +"if the enum members will be exported to the module global namespace." +msgstr "" + +#: ../../library/enum.rst:147 +msgid ":func:`show_flag_values`" +msgstr "" + +#: ../../library/enum.rst:149 +msgid "Return a list of all power-of-two integers contained in a flag." +msgstr "" + +#: ../../library/enum.rst:152 msgid "``Flag``, ``IntFlag``, ``auto``" msgstr "``Flag``, ``IntFlag``, ``auto``" -#: ../../library/enum.rst:137 +#: ../../library/enum.rst:153 msgid "" -"``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``, ``member``, " -"``nonmember``" +"``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " +"``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" msgstr "" -"``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``, ``member``, " -"``nonmember``" +"``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " +"``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" -#: ../../library/enum.rst:142 +#: ../../library/enum.rst:158 msgid "Data Types" msgstr "" -#: ../../library/enum.rst:147 +#: ../../library/enum.rst:163 msgid "" "*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " "to subclass *EnumType* -- see :ref:`Subclassing EnumType ` for details." msgstr "" -#: ../../library/enum.rst:151 +#: ../../library/enum.rst:167 msgid "" "*EnumType* is responsible for setting the correct :meth:`__repr__`, :meth:" "`__str__`, :meth:`__format__`, and :meth:`__reduce__` methods on the final " @@ -267,64 +296,64 @@ msgid "" "providing iteration over the enum class, etc." msgstr "" -#: ../../library/enum.rst:158 +#: ../../library/enum.rst:174 msgid "Returns ``True`` if member belongs to the ``cls``::" msgstr "" -#: ../../library/enum.rst:166 +#: ../../library/enum.rst:182 msgid "" "In Python 3.12 it will be possible to check for member values and not just " "members; until then, a ``TypeError`` will be raised if a non-Enum-member is " "used in a containment check." msgstr "" -#: ../../library/enum.rst:172 +#: ../../library/enum.rst:188 msgid "" "Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " "names of the members in *cls*::" msgstr "" -#: ../../library/enum.rst:180 +#: ../../library/enum.rst:196 msgid "" "Returns the Enum member in *cls* matching *name*, or raises an :exc:" "`AttributeError`::" msgstr "" -#: ../../library/enum.rst:187 +#: ../../library/enum.rst:203 msgid "" "Returns the Enum member in *cls* matching *name*, or raises an :exc:" "`KeyError`::" msgstr "" -#: ../../library/enum.rst:194 +#: ../../library/enum.rst:210 msgid "Returns each member in *cls* in definition order::" msgstr "" -#: ../../library/enum.rst:201 +#: ../../library/enum.rst:217 msgid "Returns the number of member in *cls*::" msgstr "" -#: ../../library/enum.rst:208 +#: ../../library/enum.rst:224 msgid "Returns each member in *cls* in reverse definition order::" msgstr "" -#: ../../library/enum.rst:216 +#: ../../library/enum.rst:232 msgid "*Enum* is the base class for all *enum* enumerations." msgstr "" -#: ../../library/enum.rst:220 +#: ../../library/enum.rst:236 msgid "The name used to define the ``Enum`` member::" msgstr "" -#: ../../library/enum.rst:227 +#: ../../library/enum.rst:243 msgid "The value given to the ``Enum`` member::" msgstr "" -#: ../../library/enum.rst:232 +#: ../../library/enum.rst:248 msgid "Enum member values" msgstr "" -#: ../../library/enum.rst:234 +#: ../../library/enum.rst:250 msgid "" "Member values can be anything: :class:`int`, :class:`str`, etc.. If the " "exact value is unimportant you may use :class:`auto` instances and an " @@ -332,24 +361,24 @@ msgid "" "class:`auto` with other values." msgstr "" -#: ../../library/enum.rst:241 +#: ../../library/enum.rst:257 msgid "" "``_ignore_`` is only used during creation and is removed from the " "enumeration once creation is complete." msgstr "" -#: ../../library/enum.rst:244 +#: ../../library/enum.rst:260 msgid "" "``_ignore_`` is a list of names that will not become members, and whose " "names will also be removed from the completed enumeration. See :ref:" "`TimePeriod ` for an example." msgstr "" -#: ../../library/enum.rst:250 +#: ../../library/enum.rst:266 msgid "This method is called in two different ways:" msgstr "" -#: ../../library/enum.rst:252 +#: ../../library/enum.rst:268 msgid "to look up an existing member:" msgstr "" @@ -357,7 +386,7 @@ msgstr "" msgid "cls" msgstr "cls" -#: ../../library/enum.rst:254 ../../library/enum.rst:259 +#: ../../library/enum.rst:270 ../../library/enum.rst:275 msgid "The enum class being called." msgstr "" @@ -365,15 +394,15 @@ msgstr "" msgid "value" msgstr "" -#: ../../library/enum.rst:255 +#: ../../library/enum.rst:271 msgid "The value to lookup." msgstr "" -#: ../../library/enum.rst:257 +#: ../../library/enum.rst:273 msgid "to use the ``cls`` enum to create a new enum:" msgstr "" -#: ../../library/enum.rst:260 +#: ../../library/enum.rst:276 msgid "The name of the new Enum to create." msgstr "" @@ -381,7 +410,7 @@ msgstr "" msgid "names" msgstr "" -#: ../../library/enum.rst:261 +#: ../../library/enum.rst:277 msgid "The names/values of the members for the new Enum." msgstr "" @@ -389,7 +418,7 @@ msgstr "" msgid "module" msgstr "模組" -#: ../../library/enum.rst:262 +#: ../../library/enum.rst:278 msgid "The name of the module the new Enum is created in." msgstr "" @@ -397,7 +426,7 @@ msgstr "" msgid "qualname" msgstr "" -#: ../../library/enum.rst:263 +#: ../../library/enum.rst:279 msgid "The actual location in the module where this Enum can be found." msgstr "" @@ -405,7 +434,7 @@ msgstr "" msgid "type" msgstr "" -#: ../../library/enum.rst:264 +#: ../../library/enum.rst:280 msgid "A mix-in type for the new Enum." msgstr "" @@ -413,7 +442,7 @@ msgstr "" msgid "start" msgstr "" -#: ../../library/enum.rst:265 +#: ../../library/enum.rst:281 msgid "The first integer value for the Enum (used by :class:`auto`)" msgstr "" @@ -421,12 +450,12 @@ msgstr "" msgid "boundary" msgstr "" -#: ../../library/enum.rst:266 +#: ../../library/enum.rst:282 msgid "" "How to handle out-of-range values from bit operations (:class:`Flag` only)" msgstr "" -#: ../../library/enum.rst:270 +#: ../../library/enum.rst:286 msgid "" "Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " "public methods defined on *self.__class__*::" @@ -436,11 +465,11 @@ msgstr "" msgid "name" msgstr "" -#: ../../library/enum.rst:290 +#: ../../library/enum.rst:306 msgid "The name of the member being defined (e.g. 'RED')." msgstr "" -#: ../../library/enum.rst:291 +#: ../../library/enum.rst:307 msgid "The start value for the Enum; the default is 1." msgstr "" @@ -448,7 +477,7 @@ msgstr "" msgid "count" msgstr "" -#: ../../library/enum.rst:292 +#: ../../library/enum.rst:308 msgid "The number of members currently defined, not including this one." msgstr "" @@ -456,53 +485,53 @@ msgstr "" msgid "last_values" msgstr "" -#: ../../library/enum.rst:293 +#: ../../library/enum.rst:309 msgid "A list of the previous values." msgstr "" -#: ../../library/enum.rst:295 +#: ../../library/enum.rst:311 msgid "" "A *staticmethod* that is used to determine the next value returned by :class:" "`auto`::" msgstr "" -#: ../../library/enum.rst:310 +#: ../../library/enum.rst:326 msgid "" "A *classmethod* that is used to further configure subsequent subclasses. By " "default, does nothing." msgstr "" -#: ../../library/enum.rst:315 +#: ../../library/enum.rst:331 msgid "" "A *classmethod* for looking up values not found in *cls*. By default it " "does nothing, but can be overridden to implement custom search behavior::" msgstr "" -#: ../../library/enum.rst:336 +#: ../../library/enum.rst:352 msgid "" "Returns the string used for *repr()* calls. By default, returns the *Enum* " "name, member name, and value, but can be overridden::" msgstr "" -#: ../../library/enum.rst:351 +#: ../../library/enum.rst:367 msgid "" "Returns the string used for *str()* calls. By default, returns the *Enum* " "name and member name, but can be overridden::" msgstr "" -#: ../../library/enum.rst:365 +#: ../../library/enum.rst:381 msgid "" "Returns the string used for *format()* and *f-string* calls. By default, " "returns :meth:`__str__` returns, but can be overridden::" msgstr "" -#: ../../library/enum.rst:379 +#: ../../library/enum.rst:395 msgid "" "Using :class:`auto` with :class:`Enum` results in integers of increasing " "value, starting with ``1``." msgstr "" -#: ../../library/enum.rst:385 +#: ../../library/enum.rst:401 msgid "" "*IntEnum* is the same as *Enum*, but its members are also integers and can " "be used anywhere that an integer can be used. If any integer operation is " @@ -510,20 +539,20 @@ msgid "" "enumeration status." msgstr "" -#: ../../library/enum.rst:405 +#: ../../library/enum.rst:421 msgid "" "Using :class:`auto` with :class:`IntEnum` results in integers of increasing " "value, starting with ``1``." msgstr "" -#: ../../library/enum.rst:408 ../../library/enum.rst:579 +#: ../../library/enum.rst:424 ../../library/enum.rst:595 msgid "" ":meth:`__str__` is now :func:`int.__str__` to better support the " "*replacement of existing constants* use-case. :meth:`__format__` was " "already :func:`int.__format__` for that same reason." msgstr "" -#: ../../library/enum.rst:415 +#: ../../library/enum.rst:431 msgid "" "*StrEnum* is the same as *Enum*, but its members are also strings and can be " "used in most of the same places that a string can be used. The result of " @@ -531,255 +560,276 @@ msgid "" "the enumeration." msgstr "" -#: ../../library/enum.rst:419 +#: ../../library/enum.rst:435 msgid "" "There are places in the stdlib that check for an exact :class:`str` instead " "of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " -"``isinstance(str, unknown)``), and in those locations you will need to use " +"``isinstance(unknown, str)``), and in those locations you will need to use " "``str(StrEnum.member)``." msgstr "" -#: ../../library/enum.rst:426 +#: ../../library/enum.rst:442 msgid "" "Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " "name as the value." msgstr "" -#: ../../library/enum.rst:429 +#: ../../library/enum.rst:445 msgid "" ":meth:`__str__` is :func:`str.__str__` to better support the *replacement of " "existing constants* use-case. :meth:`__format__` is likewise :func:`str." "__format__` for that same reason." msgstr "" -#: ../../library/enum.rst:437 +#: ../../library/enum.rst:453 msgid "" "*Flag* members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), " "``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operators are " "members of the enumeration." msgstr "" -#: ../../library/enum.rst:443 +#: ../../library/enum.rst:459 msgid "Returns *True* if value is in self::" msgstr "" -#: ../../library/enum.rst:463 +#: ../../library/enum.rst:479 msgid "Returns all contained members::" msgstr "" -#: ../../library/enum.rst:472 +#: ../../library/enum.rst:488 msgid "Returns number of members in flag::" msgstr "" -#: ../../library/enum.rst:481 +#: ../../library/enum.rst:497 msgid "Returns *True* if any members in flag, *False* otherwise::" msgstr "" -#: ../../library/enum.rst:493 +#: ../../library/enum.rst:509 msgid "Returns current flag binary or'ed with other::" msgstr "" -#: ../../library/enum.rst:500 +#: ../../library/enum.rst:516 msgid "Returns current flag binary and'ed with other::" msgstr "" -#: ../../library/enum.rst:509 +#: ../../library/enum.rst:525 msgid "Returns current flag binary xor'ed with other::" msgstr "" -#: ../../library/enum.rst:518 +#: ../../library/enum.rst:534 msgid "Returns all the flags in *type(self)* that are not in self::" msgstr "" -#: ../../library/enum.rst:529 +#: ../../library/enum.rst:545 msgid "" "Function used to format any remaining unnamed numeric values. Default is " "the value's repr; common choices are :func:`hex` and :func:`oct`." msgstr "" -#: ../../library/enum.rst:534 +#: ../../library/enum.rst:550 msgid "" "Using :class:`auto` with :class:`Flag` results in integers that are powers " "of two, starting with ``1``." msgstr "" -#: ../../library/enum.rst:537 +#: ../../library/enum.rst:553 msgid "The *repr()* of zero-valued flags has changed. It is now::" msgstr "" -#: ../../library/enum.rst:545 +#: ../../library/enum.rst:561 msgid "" "*IntFlag* is the same as *Flag*, but its members are also integers and can " "be used anywhere that an integer can be used." msgstr "" -#: ../../library/enum.rst:558 +#: ../../library/enum.rst:574 msgid "" "If any integer operation is performed with an *IntFlag* member, the result " "is not an *IntFlag*::" msgstr "" -#: ../../library/enum.rst:564 +#: ../../library/enum.rst:580 msgid "If a *Flag* operation is performed with an *IntFlag* member and:" msgstr "" -#: ../../library/enum.rst:566 +#: ../../library/enum.rst:582 msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" msgstr "" -#: ../../library/enum.rst:567 +#: ../../library/enum.rst:583 msgid "" "the result is not a valid *IntFlag*: the result depends on the " "*FlagBoundary* setting" msgstr "" -#: ../../library/enum.rst:569 +#: ../../library/enum.rst:585 msgid "The *repr()* of unnamed zero-valued flags has changed. It is now:" msgstr "" -#: ../../library/enum.rst:576 +#: ../../library/enum.rst:592 msgid "" "Using :class:`auto` with :class:`IntFlag` results in integers that are " "powers of two, starting with ``1``." msgstr "" -#: ../../library/enum.rst:586 +#: ../../library/enum.rst:601 +msgid "" +":class:`!ReprEum` uses the :meth:`repr() ` of :class:`Enum`, " +"but the :class:`str() ` of the mixed-in data type:" +msgstr "" + +#: ../../library/enum.rst:604 +msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`" +msgstr "" + +#: ../../library/enum.rst:605 +msgid ":meth:`!str.__str__` for :class:`StrEnum`" +msgstr "" + +#: ../../library/enum.rst:607 +msgid "" +"Inherit from :class:`!ReprEnum` to keep the :class:`str() / :func:" +"`format` of the mixed-in data type instead of using the :class:`Enum`-" +"default :meth:`str() `." +msgstr "" + +#: ../../library/enum.rst:616 msgid "" "*EnumCheck* contains the options used by the :func:`verify` decorator to " "ensure various constraints; failed constraints result in a :exc:`ValueError`." msgstr "" -#: ../../library/enum.rst:591 +#: ../../library/enum.rst:621 msgid "Ensure that each value has only one name::" msgstr "" -#: ../../library/enum.rst:607 +#: ../../library/enum.rst:637 msgid "" "Ensure that there are no missing values between the lowest-valued member and " "the highest-valued member::" msgstr "" -#: ../../library/enum.rst:622 +#: ../../library/enum.rst:652 msgid "" "Ensure that any flag groups/masks contain only named flags -- useful when " "values are specified instead of being generated by :func:`auto`" msgstr "" -#: ../../library/enum.rst:639 +#: ../../library/enum.rst:669 msgid "" "CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." msgstr "" -#: ../../library/enum.rst:645 +#: ../../library/enum.rst:675 msgid "" "*FlagBoundary* controls how out-of-range values are handled in *Flag* and " "its subclasses." msgstr "" -#: ../../library/enum.rst:650 +#: ../../library/enum.rst:680 msgid "" "Out-of-range values cause a :exc:`ValueError` to be raised. This is the " "default for :class:`Flag`::" msgstr "" -#: ../../library/enum.rst:667 +#: ../../library/enum.rst:697 msgid "" "Out-of-range values have invalid values removed, leaving a valid *Flag* " "value::" msgstr "" -#: ../../library/enum.rst:680 +#: ../../library/enum.rst:710 msgid "" "Out-of-range values lose their *Flag* membership and revert to :class:`int`. " "This is the default for :class:`IntFlag`::" msgstr "" -#: ../../library/enum.rst:693 +#: ../../library/enum.rst:723 msgid "" "Out-of-range values are kept, and the *Flag* membership is kept. This is " "used for some stdlib flags:" msgstr "" -#: ../../library/enum.rst:709 +#: ../../library/enum.rst:739 msgid "Supported ``__dunder__`` names" msgstr "" -#: ../../library/enum.rst:711 +#: ../../library/enum.rst:741 msgid "" ":attr:`__members__` is a read-only ordered mapping of ``member_name``:" "``member`` items. It is only available on the class." msgstr "" -#: ../../library/enum.rst:714 +#: ../../library/enum.rst:744 msgid "" ":meth:`__new__`, if specified, must create and return the enum members; it " "is also a very good idea to set the member's :attr:`_value_` appropriately. " "Once all the members are created it is no longer used." msgstr "" -#: ../../library/enum.rst:720 +#: ../../library/enum.rst:750 msgid "Supported ``_sunder_`` names" msgstr "" -#: ../../library/enum.rst:722 +#: ../../library/enum.rst:752 msgid "``_name_`` -- name of the member" msgstr "" -#: ../../library/enum.rst:723 +#: ../../library/enum.rst:753 msgid "" "``_value_`` -- value of the member; can be set / modified in ``__new__``" msgstr "" -#: ../../library/enum.rst:725 +#: ../../library/enum.rst:755 msgid "" "``_missing_`` -- a lookup function used when a value is not found; may be " "overridden" msgstr "" -#: ../../library/enum.rst:727 +#: ../../library/enum.rst:757 msgid "" "``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" "`str`, that will not be transformed into members, and will be removed from " "the final class" msgstr "" -#: ../../library/enum.rst:730 +#: ../../library/enum.rst:760 msgid "" "``_order_`` -- used in Python 2/3 code to ensure member order is consistent " "(class attribute, removed during class creation)" msgstr "" -#: ../../library/enum.rst:732 +#: ../../library/enum.rst:762 msgid "" "``_generate_next_value_`` -- used to get an appropriate value for an enum " "member; may be overridden" msgstr "" -#: ../../library/enum.rst:737 +#: ../../library/enum.rst:767 msgid "" "For standard :class:`Enum` classes the next value chosen is the last value " "seen incremented by one." msgstr "" -#: ../../library/enum.rst:740 +#: ../../library/enum.rst:770 msgid "" "For :class:`Flag` classes the next value chosen will be the next highest " "power-of-two, regardless of the last value seen." msgstr "" -#: ../../library/enum.rst:743 +#: ../../library/enum.rst:773 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "``_missing_``\\ 、\\ ``_order_``\\ 、\\ ``_generate_next_value_``" -#: ../../library/enum.rst:744 +#: ../../library/enum.rst:774 msgid "``_ignore_``" msgstr "``_ignore_``" -#: ../../library/enum.rst:749 +#: ../../library/enum.rst:779 msgid "Utilities and Decorators" msgstr "" -#: ../../library/enum.rst:753 +#: ../../library/enum.rst:783 msgid "" "*auto* can be used in place of a value. If used, the *Enum* machinery will " "call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. " @@ -789,27 +839,27 @@ msgid "" "member's name." msgstr "" -#: ../../library/enum.rst:760 +#: ../../library/enum.rst:790 msgid "" "``_generate_next_value_`` can be overridden to customize the values used by " "*auto*." msgstr "" -#: ../../library/enum.rst:763 +#: ../../library/enum.rst:793 msgid "" "in 3.13 the default ``\"generate_next_value_`` will always return the " "highest member value incremented by 1, and will fail if any member is an " "incompatible type." msgstr "" -#: ../../library/enum.rst:769 +#: ../../library/enum.rst:799 msgid "" "A decorator similar to the built-in *property*, but specifically for " "enumerations. It allows member attributes to have the same names as members " "themselves." msgstr "" -#: ../../library/enum.rst:773 +#: ../../library/enum.rst:803 msgid "" "the *property* and the member must be defined in separate classes; for " "example, the *value* and *name* attributes are defined in the *Enum* class, " @@ -817,59 +867,71 @@ msgid "" "``name``." msgstr "" -#: ../../library/enum.rst:782 +#: ../../library/enum.rst:812 msgid "" "A :keyword:`class` decorator specifically for enumerations. It searches an " "enumeration's :attr:`__members__`, gathering any aliases it finds; if any " "are found :exc:`ValueError` is raised with the details::" msgstr "" -#: ../../library/enum.rst:800 +#: ../../library/enum.rst:830 msgid "" "A :keyword:`class` decorator specifically for enumerations. Members from :" "class:`EnumCheck` are used to specify which constraints should be checked on " "the decorated enumeration." msgstr "" -#: ../../library/enum.rst:808 +#: ../../library/enum.rst:838 msgid "A decorator for use in enums: its target will become a member." msgstr "" -#: ../../library/enum.rst:814 +#: ../../library/enum.rst:844 msgid "A decorator for use in enums: its target will not become a member." msgstr "" -#: ../../library/enum.rst:821 +#: ../../library/enum.rst:850 +msgid "" +"A decorator to change the :class:`str() ` and :func:`repr` of an enum " +"to show its members as belonging to the module instead of its class. Should " +"only be used when the enum members are exported to the module global " +"namespace (see :class:`re.RegexFlag` for an example)." +msgstr "" + +#: ../../library/enum.rst:860 +msgid "Return a list of all power-of-two integers contained in a flag *value*." +msgstr "" + +#: ../../library/enum.rst:867 msgid "Notes" msgstr "" -#: ../../library/enum.rst:823 +#: ../../library/enum.rst:869 msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" msgstr "" -#: ../../library/enum.rst:825 +#: ../../library/enum.rst:871 msgid "" "These three enum types are designed to be drop-in replacements for existing " "integer- and string-based values; as such, they have extra limitations:" msgstr "" -#: ../../library/enum.rst:828 +#: ../../library/enum.rst:874 msgid "``__str__`` uses the value and not the name of the enum member" msgstr "" -#: ../../library/enum.rst:830 +#: ../../library/enum.rst:876 msgid "" "``__format__``, because it uses ``__str__``, will also use the value of the " "enum member instead of its name" msgstr "" -#: ../../library/enum.rst:833 +#: ../../library/enum.rst:879 msgid "" "If you do not need/want those limitations, you can either create your own " "base class by mixing in the ``int`` or ``str`` type yourself::" msgstr "" -#: ../../library/enum.rst:840 +#: ../../library/enum.rst:886 msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" msgstr "" diff --git a/library/fcntl.po b/library/fcntl.po index e42f38f310..5a3f9f78a7 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -112,7 +112,7 @@ msgstr "" msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised." msgstr "" -#: ../../library/fcntl.rst:90 +#: ../../library/fcntl.rst:20 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." @@ -181,7 +181,7 @@ msgstr "" "\n" "::" -#: ../../library/fcntl.rst:141 +#: ../../library/fcntl.rst:47 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." @@ -199,7 +199,7 @@ msgstr "" msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised." msgstr "" -#: ../../library/fcntl.rst:153 +#: ../../library/fcntl.rst:8 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." @@ -264,7 +264,7 @@ msgid "" "file. The default for *whence* is also 0." msgstr "" -#: ../../library/fcntl.rst:188 +#: ../../library/fcntl.rst:31 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." diff --git a/library/ftplib.po b/library/ftplib.po index 9654515783..09e81aa4b1 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -210,7 +210,7 @@ msgid "" "port)`` for the socket to bind to as its source address before connecting." msgstr "" -#: ../../library/ftplib.rst:223 +#: ../../library/ftplib.rst:13 msgid "" "Raises an :ref:`auditing event ` ``ftplib.connect`` with arguments " "``self``, ``host``, ``port``." @@ -246,7 +246,7 @@ msgid "" "Send a simple command string to the server and return the response string." msgstr "" -#: ../../library/ftplib.rst:258 ../../library/ftplib.rst:267 +#: ../../library/ftplib.rst:3 ../../library/ftplib.rst:5 msgid "" "Raises an :ref:`auditing event ` ``ftplib.sendcmd`` with arguments " "``self``, ``cmd``." diff --git a/library/functions.po b/library/functions.po index 70ee7c6692..0242b0d010 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-01 14:30+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -520,7 +520,7 @@ msgid "" "not accessible, this function will raise :exc:`RuntimeError`." msgstr "" -#: ../../library/functions.rst:171 +#: ../../library/functions.rst:13 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." @@ -798,7 +798,7 @@ msgid "" "parse`." msgstr "如果您想解析 Python 程式碼為 AST 運算式,請參閱 :func:`ast.parse`。" -#: ../../library/functions.rst:334 +#: ../../library/functions.rst:47 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source``, ``filename``." @@ -1126,7 +1126,7 @@ msgstr "" "另外可以參閱 :func:`ast.literal_eval`,該函式可以安全執行僅包含文字的運算式字" "串。" -#: ../../library/functions.rst:559 ../../library/functions.rst:600 +#: ../../library/functions.rst:33 ../../library/functions.rst:43 msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." @@ -1525,7 +1525,7 @@ msgstr "" msgid "This is the address of the object in memory." msgstr "" -#: ../../library/functions.rst:851 +#: ../../library/functions.rst:8 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." @@ -1552,7 +1552,7 @@ msgstr "" "如果載入了 :mod:`readline` module,:func:`input` 將使用它來提供複雜的行編輯和" "歷史記錄功能。" -#: ../../library/functions.rst:870 +#: ../../library/functions.rst:14 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." @@ -1564,7 +1564,7 @@ msgid "" "``prompt`` before reading input" msgstr "" -#: ../../library/functions.rst:875 +#: ../../library/functions.rst:19 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." @@ -1666,7 +1666,8 @@ msgstr "" "物件型別的 tuple(或多個遞迴 tuple)或一個包含多種型別的 :ref:`types-union`," "若 *object* 是其中的任何一個物件的實例則回傳 ``True``。如果 *classinfo* 既不" "是型別,也不是型別 tuple 或型別的遞迴 tuple,那麼會觸發 :exc:`TypeError` 異" -"常。若是先前檢查已經成功,:exc:`TypeError` 可能不會再因為不合格的型別而被引發。" +"常。若是先前檢查已經成功,:exc:`TypeError` 可能不會再因為不合格的型別而被引" +"發。" #: ../../library/functions.rst:946 ../../library/functions.rst:960 msgid "*classinfo* can be a :ref:`types-union`." @@ -1943,9 +1944,9 @@ msgstr "" "以文字模式開啟並讀取。其他常見模式有:寫入 ``'w'``\\ (會捨去已經存在的檔" "案)、唯一性創建 ``'x'``\\ 、追加寫入 ``'a'``\\ (在\\ *一些* Unix 系統上,無" "論當前的檔案指標在什麼位置,*所有* 寫入都會追加到檔案末尾)。在文字模式,如果" -"沒有指定 *encoding*,則根據電腦平臺來決定使用的編碼:呼叫 :func:" -"`locale.getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 " -"bytes,請使用二進位制模式且不要指定 *encoding*。)可用的模式有:" +"沒有指定 *encoding*,則根據電腦平臺來決定使用的編碼:呼叫 :func:`locale." +"getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 bytes,請使用二進位制" +"模式且不要指定 *encoding*。)可用的模式有:" #: ../../library/functions.rst:1178 msgid "Character" @@ -2213,7 +2214,7 @@ msgstr "" "`open` 的 module )、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 以及 :mod:" "`shutil`。" -#: ../../library/functions.rst:1341 +#: ../../library/functions.rst:191 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." diff --git a/library/functools.po b/library/functools.po index dbadeb7858..8adce1b2e5 100644 --- a/library/functools.po +++ b/library/functools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -161,8 +161,9 @@ msgstr "" #: ../../library/functools.rst:146 msgid "" "Distinct argument patterns may be considered to be distinct calls with " -"separate cache entries. For example, `f(a=1, b=2)` and `f(b=2, a=1)` differ " -"in their keyword argument order and may have two separate cache entries." +"separate cache entries. For example, ``f(a=1, b=2)`` and ``f(b=2, a=1)`` " +"differ in their keyword argument order and may have two separate cache " +"entries." msgstr "" #: ../../library/functools.rst:151 @@ -232,7 +233,7 @@ msgstr "" #: ../../library/functools.rst:194 msgid "" -"If a method is cached, the `self` instance argument is included in the " +"If a method is cached, the ``self`` instance argument is included in the " "cache. See :ref:`faq-cache-method-calls`" msgstr "" diff --git a/library/gc.po b/library/gc.po index 4713abbbfc..4a147b3986 100644 --- a/library/gc.po +++ b/library/gc.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -90,7 +90,7 @@ msgstr "" msgid "New *generation* parameter." msgstr "" -#: ../../library/gc.rst:75 +#: ../../library/gc.rst:8 msgid "" "Raises an :ref:`auditing event ` ``gc.get_objects`` with argument " "``generation``." @@ -181,7 +181,7 @@ msgid "" "other than debugging." msgstr "" -#: ../../library/gc.rst:146 +#: ../../library/gc.rst:17 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." @@ -199,7 +199,7 @@ msgid "" "object may or may not appear in the result list." msgstr "" -#: ../../library/gc.rst:159 +#: ../../library/gc.rst:9 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." diff --git a/library/glob.po b/library/glob.po index a5988be3d4..6873244ea1 100644 --- a/library/glob.po +++ b/library/glob.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:02+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -94,13 +94,13 @@ msgid "" "directories." msgstr "" -#: ../../library/glob.rst:73 ../../library/glob.rst:96 +#: ../../library/glob.rst:4 ../../library/glob.rst:29 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" -#: ../../library/glob.rst:74 ../../library/glob.rst:97 +#: ../../library/glob.rst:5 ../../library/glob.rst:30 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." diff --git a/library/hashlib.po b/library/hashlib.po index 5e55aa9c76..92c10c588b 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -535,7 +535,7 @@ msgstr "" #: ../../library/hashlib.rst:434 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " -"(`False` for sequential mode)." +"(``False`` for sequential mode)." msgstr "" #: ../../library/hashlib.rst:-1 diff --git a/library/http.client.po b/library/http.client.po index 54280f908f..190c7ef32c 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -410,7 +410,7 @@ msgid "" "already have a connection." msgstr "" -#: ../../library/http.client.rst:384 +#: ../../library/http.client.rst:5 msgid "" "Raises an :ref:`auditing event ` ``http.client.connect`` with " "arguments ``self``, ``host``, ``port``." @@ -486,7 +486,7 @@ msgid "" "`endheaders` method has been called and before :meth:`getresponse` is called." msgstr "" -#: ../../library/http.client.rst:455 +#: ../../library/http.client.rst:5 msgid "" "Raises an :ref:`auditing event ` ``http.client.send`` with " "arguments ``self``, ``data``." diff --git a/library/imaplib.po b/library/imaplib.po index 420e523212..f01db88762 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -429,7 +429,7 @@ msgid "" "method." msgstr "" -#: ../../library/imaplib.rst:392 +#: ../../library/imaplib.rst:11 msgid "" "Raises an :ref:`auditing event ` ``imaplib.open`` with arguments " "``self``, ``host``, ``port``." @@ -504,7 +504,7 @@ msgstr "" msgid "Sends ``data`` to the remote server. You may override this method." msgstr "" -#: ../../library/imaplib.rst:465 +#: ../../library/imaplib.rst:3 msgid "" "Raises an :ref:`auditing event ` ``imaplib.send`` with arguments " "``self``, ``data``." diff --git a/library/inspect.po b/library/inspect.po index fdb3576ef7..c04503ec41 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-16 06:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -716,27 +716,27 @@ msgstr "" #: ../../library/inspect.rst:437 msgid "" "These are instances of :class:`~types.MethodWrapperType`, such as :meth:" -"`~object().__str__`, :meth:`~object().__eq__` and :meth:`~object().__repr__`" +"`~object.__str__`, :meth:`~object.__eq__` and :meth:`~object.__repr__`." msgstr "" -#: ../../library/inspect.rst:443 +#: ../../library/inspect.rst:445 msgid "" "Return ``True`` if the object is a user-defined or built-in function or " "method." msgstr "" -#: ../../library/inspect.rst:448 +#: ../../library/inspect.rst:450 msgid "Return ``True`` if the object is an abstract base class." msgstr "" -#: ../../library/inspect.rst:453 +#: ../../library/inspect.rst:455 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" "`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " "true." msgstr "" -#: ../../library/inspect.rst:457 +#: ../../library/inspect.rst:459 msgid "" "This, for example, is true of ``int.__add__``. An object passing this test " "has a :meth:`~object.__get__` method but not a :meth:`~object.__set__` " @@ -744,7 +744,7 @@ msgid "" "__name__` attribute is usually sensible, and :attr:`__doc__` often is." msgstr "" -#: ../../library/inspect.rst:463 +#: ../../library/inspect.rst:465 msgid "" "Methods implemented via descriptors that also pass one of the other tests " "return ``False`` from the :func:`ismethoddescriptor` test, simply because " @@ -752,11 +752,11 @@ msgid "" "`__func__` attribute (etc) when an object passes :func:`ismethod`." msgstr "" -#: ../../library/inspect.rst:471 +#: ../../library/inspect.rst:473 msgid "Return ``True`` if the object is a data descriptor." msgstr "" -#: ../../library/inspect.rst:473 +#: ../../library/inspect.rst:475 msgid "" "Data descriptors have a :attr:`~object.__set__` or a :attr:`~object." "__delete__` method. Examples are properties (defined in Python), getsets, " @@ -767,33 +767,33 @@ msgid "" "and members have both of these attributes), but this is not guaranteed." msgstr "" -#: ../../library/inspect.rst:484 +#: ../../library/inspect.rst:486 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: ../../library/inspect.rst:488 +#: ../../library/inspect.rst:490 msgid "" "getsets are attributes defined in extension modules via :c:type:" "`PyGetSetDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:495 +#: ../../library/inspect.rst:497 msgid "Return ``True`` if the object is a member descriptor." msgstr "" -#: ../../library/inspect.rst:499 +#: ../../library/inspect.rst:501 msgid "" "Member descriptors are attributes defined in extension modules via :c:type:" "`PyMemberDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../library/inspect.rst:507 +#: ../../library/inspect.rst:509 msgid "Retrieving source code" msgstr "" -#: ../../library/inspect.rst:511 +#: ../../library/inspect.rst:513 msgid "" "Get the documentation string for an object, cleaned up with :func:" "`cleandoc`. If the documentation string for an object is not provided and " @@ -802,11 +802,11 @@ msgid "" "documentation string is invalid or missing." msgstr "" -#: ../../library/inspect.rst:517 +#: ../../library/inspect.rst:519 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: ../../library/inspect.rst:523 +#: ../../library/inspect.rst:525 msgid "" "Return in a single string any lines of comments immediately preceding the " "object's source code (for a class, function, or method), or at the top of " @@ -815,27 +815,27 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: ../../library/inspect.rst:532 +#: ../../library/inspect.rst:534 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" -#: ../../library/inspect.rst:539 +#: ../../library/inspect.rst:541 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: ../../library/inspect.rst:545 +#: ../../library/inspect.rst:547 msgid "" "Return the name of the Python source file in which an object was defined or " "``None`` if no way can be identified to get the source. This will fail with " "a :exc:`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: ../../library/inspect.rst:553 +#: ../../library/inspect.rst:555 msgid "" "Return a list of source lines and starting line number for an object. The " "argument may be a module, class, method, function, traceback, frame, or code " @@ -845,13 +845,13 @@ msgid "" "code cannot be retrieved." msgstr "" -#: ../../library/inspect.rst:560 ../../library/inspect.rst:572 +#: ../../library/inspect.rst:562 ../../library/inspect.rst:574 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: ../../library/inspect.rst:567 +#: ../../library/inspect.rst:569 msgid "" "Return the text of the source code for an object. The argument may be a " "module, class, method, function, traceback, frame, or code object. The " @@ -859,13 +859,13 @@ msgid "" "the source code cannot be retrieved." msgstr "" -#: ../../library/inspect.rst:579 +#: ../../library/inspect.rst:581 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: ../../library/inspect.rst:582 +#: ../../library/inspect.rst:584 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -873,28 +873,28 @@ msgid "" "Also, all tabs are expanded to spaces." msgstr "" -#: ../../library/inspect.rst:591 +#: ../../library/inspect.rst:593 msgid "Introspecting callables with the Signature object" msgstr "" -#: ../../library/inspect.rst:595 +#: ../../library/inspect.rst:597 msgid "" "The Signature object represents the call signature of a callable object and " "its return annotation. To retrieve a Signature object, use the :func:" "`signature` function." msgstr "" -#: ../../library/inspect.rst:601 +#: ../../library/inspect.rst:603 msgid "Return a :class:`Signature` object for the given ``callable``::" msgstr "" -#: ../../library/inspect.rst:618 +#: ../../library/inspect.rst:620 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: ../../library/inspect.rst:621 +#: ../../library/inspect.rst:623 msgid "" "For objects defined in modules using stringized annotations (``from " "__future__ import annotations``), :func:`signature` will attempt to " @@ -905,7 +905,7 @@ msgid "" "instructions on how to use these parameters." msgstr "" -#: ../../library/inspect.rst:630 +#: ../../library/inspect.rst:632 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -914,39 +914,39 @@ msgid "" "exception." msgstr "" -#: ../../library/inspect.rst:636 +#: ../../library/inspect.rst:638 msgid "" "A slash(/) in the signature of a function denotes that the parameters prior " "to it are positional-only. For more info, see :ref:`the FAQ entry on " "positional-only parameters `." msgstr "" -#: ../../library/inspect.rst:640 +#: ../../library/inspect.rst:642 msgid "" "``follow_wrapped`` parameter. Pass ``False`` to get a signature of " "``callable`` specifically (``callable.__wrapped__`` will not be used to " "unwrap decorated callables.)" msgstr "" -#: ../../library/inspect.rst:645 +#: ../../library/inspect.rst:647 msgid "``globals``, ``locals``, and ``eval_str`` parameters." msgstr "" -#: ../../library/inspect.rst:650 +#: ../../library/inspect.rst:652 msgid "" "Some callables may not be introspectable in certain implementations of " "Python. For example, in CPython, some built-in functions defined in C " "provide no metadata about their arguments." msgstr "" -#: ../../library/inspect.rst:657 +#: ../../library/inspect.rst:659 msgid "" "A Signature object represents the call signature of a function and its " "return annotation. For each parameter accepted by the function it stores a :" "class:`Parameter` object in its :attr:`parameters` collection." msgstr "" -#: ../../library/inspect.rst:661 +#: ../../library/inspect.rst:663 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -955,54 +955,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: ../../library/inspect.rst:667 +#: ../../library/inspect.rst:669 msgid "" "The optional *return_annotation* argument, can be an arbitrary Python " "object, is the \"return\" annotation of the callable." msgstr "" -#: ../../library/inspect.rst:670 +#: ../../library/inspect.rst:672 msgid "" "Signature objects are *immutable*. Use :meth:`Signature.replace` to make a " "modified copy." msgstr "" -#: ../../library/inspect.rst:673 +#: ../../library/inspect.rst:675 msgid "Signature objects are picklable and hashable." msgstr "" -#: ../../library/inspect.rst:678 +#: ../../library/inspect.rst:680 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: ../../library/inspect.rst:682 +#: ../../library/inspect.rst:684 msgid "" "An ordered mapping of parameters' names to the corresponding :class:" "`Parameter` objects. Parameters appear in strict definition order, " "including keyword-only parameters." msgstr "" -#: ../../library/inspect.rst:686 ../../library/inspect.rst:1010 +#: ../../library/inspect.rst:688 ../../library/inspect.rst:1012 msgid "" "Python only explicitly guaranteed that it preserved the declaration order of " "keyword-only parameters as of version 3.7, although in practice this order " "had always been preserved in Python 3." msgstr "" -#: ../../library/inspect.rst:693 +#: ../../library/inspect.rst:695 msgid "" "The \"return\" annotation for the callable. If the callable has no \"return" "\" annotation, this attribute is set to :attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:698 +#: ../../library/inspect.rst:700 msgid "" "Create a mapping from positional and keyword arguments to parameters. " "Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the " "signature, or raises a :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:704 +#: ../../library/inspect.rst:706 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1010,7 +1010,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: ../../library/inspect.rst:711 +#: ../../library/inspect.rst:713 msgid "" "Create a new Signature instance based on the instance replace was invoked " "on. It is possible to pass different ``parameters`` and/or " @@ -1019,7 +1019,7 @@ msgid "" "attr:`Signature.empty`." msgstr "" -#: ../../library/inspect.rst:728 +#: ../../library/inspect.rst:730 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "``obj``. Pass ``follow_wrapped=False`` to get a signature of ``obj`` " @@ -1027,138 +1027,138 @@ msgid "" "will be used as the namespaces when resolving annotations." msgstr "" -#: ../../library/inspect.rst:733 +#: ../../library/inspect.rst:735 msgid "This method simplifies subclassing of :class:`Signature`::" msgstr "" -#: ../../library/inspect.rst:742 +#: ../../library/inspect.rst:744 msgid "``globalns`` and ``localns`` parameters." msgstr "" -#: ../../library/inspect.rst:748 +#: ../../library/inspect.rst:750 msgid "" "Parameter objects are *immutable*. Instead of modifying a Parameter object, " "you can use :meth:`Parameter.replace` to create a modified copy." msgstr "" -#: ../../library/inspect.rst:751 +#: ../../library/inspect.rst:753 msgid "Parameter objects are picklable and hashable." msgstr "" -#: ../../library/inspect.rst:756 +#: ../../library/inspect.rst:758 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: ../../library/inspect.rst:761 +#: ../../library/inspect.rst:763 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: ../../library/inspect.rst:766 +#: ../../library/inspect.rst:768 msgid "" "CPython generates implicit parameter names of the form ``.0`` on the code " "objects used to implement comprehensions and generator expressions." msgstr "" -#: ../../library/inspect.rst:770 +#: ../../library/inspect.rst:772 msgid "" "These parameter names are exposed by this module as names like ``implicit0``." msgstr "" -#: ../../library/inspect.rst:776 +#: ../../library/inspect.rst:778 msgid "" "The default value for the parameter. If the parameter has no default value, " "this attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:781 +#: ../../library/inspect.rst:783 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:786 +#: ../../library/inspect.rst:788 msgid "" "Describes how argument values are bound to the parameter. Possible values " "(accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):" msgstr "" -#: ../../library/inspect.rst:792 +#: ../../library/inspect.rst:794 msgid "Name" msgstr "名稱" -#: ../../library/inspect.rst:792 +#: ../../library/inspect.rst:794 msgid "Meaning" msgstr "意義" -#: ../../library/inspect.rst:794 +#: ../../library/inspect.rst:796 msgid "*POSITIONAL_ONLY*" msgstr "*POSITIONAL_ONLY*" -#: ../../library/inspect.rst:794 +#: ../../library/inspect.rst:796 msgid "" "Value must be supplied as a positional argument. Positional only parameters " "are those which appear before a ``/`` entry (if present) in a Python " "function definition." msgstr "" -#: ../../library/inspect.rst:799 +#: ../../library/inspect.rst:801 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "*POSITIONAL_OR_KEYWORD*" -#: ../../library/inspect.rst:799 +#: ../../library/inspect.rst:801 msgid "" "Value may be supplied as either a keyword or positional argument (this is " "the standard binding behaviour for functions implemented in Python.)" msgstr "" -#: ../../library/inspect.rst:804 +#: ../../library/inspect.rst:806 msgid "*VAR_POSITIONAL*" msgstr "*VAR_POSITIONAL*" -#: ../../library/inspect.rst:804 +#: ../../library/inspect.rst:806 msgid "" "A tuple of positional arguments that aren't bound to any other parameter. " "This corresponds to a ``*args`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:809 +#: ../../library/inspect.rst:811 msgid "*KEYWORD_ONLY*" msgstr "*KEYWORD_ONLY*" -#: ../../library/inspect.rst:809 +#: ../../library/inspect.rst:811 msgid "" "Value must be supplied as a keyword argument. Keyword only parameters are " "those which appear after a ``*`` or ``*args`` entry in a Python function " "definition." msgstr "" -#: ../../library/inspect.rst:814 +#: ../../library/inspect.rst:816 msgid "*VAR_KEYWORD*" msgstr "*VAR_KEYWORD*" -#: ../../library/inspect.rst:814 +#: ../../library/inspect.rst:816 msgid "" "A dict of keyword arguments that aren't bound to any other parameter. This " "corresponds to a ``**kwargs`` parameter in a Python function definition." msgstr "" -#: ../../library/inspect.rst:820 +#: ../../library/inspect.rst:822 msgid "Example: print all keyword-only arguments without default values::" msgstr "" -#: ../../library/inspect.rst:834 +#: ../../library/inspect.rst:836 msgid "Describes a enum value of Parameter.kind." msgstr "" -#: ../../library/inspect.rst:838 +#: ../../library/inspect.rst:840 msgid "Example: print all descriptions of arguments::" msgstr "" -#: ../../library/inspect.rst:853 +#: ../../library/inspect.rst:855 msgid "" "Create a new Parameter instance based on the instance replaced was invoked " "on. To override a :class:`Parameter` attribute, pass the corresponding " @@ -1166,94 +1166,94 @@ msgid "" "pass :attr:`Parameter.empty`." msgstr "" -#: ../../library/inspect.rst:871 +#: ../../library/inspect.rst:873 msgid "" "In Python 3.3 Parameter objects were allowed to have ``name`` set to " "``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no longer " "permitted." msgstr "" -#: ../../library/inspect.rst:878 +#: ../../library/inspect.rst:880 msgid "" "Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call. " "Holds the mapping of arguments to the function's parameters." msgstr "" -#: ../../library/inspect.rst:883 +#: ../../library/inspect.rst:885 msgid "" "A mutable mapping of parameters' names to arguments' values. Contains only " "explicitly bound arguments. Changes in :attr:`arguments` will reflect in :" "attr:`args` and :attr:`kwargs`." msgstr "" -#: ../../library/inspect.rst:887 +#: ../../library/inspect.rst:889 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: ../../library/inspect.rst:892 +#: ../../library/inspect.rst:894 msgid "" "Arguments for which :meth:`Signature.bind` or :meth:`Signature.bind_partial` " "relied on a default value are skipped. However, if needed, use :meth:" "`BoundArguments.apply_defaults` to add them." msgstr "" -#: ../../library/inspect.rst:897 +#: ../../library/inspect.rst:899 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: ../../library/inspect.rst:903 +#: ../../library/inspect.rst:905 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../library/inspect.rst:908 +#: ../../library/inspect.rst:910 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../library/inspect.rst:913 +#: ../../library/inspect.rst:915 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../library/inspect.rst:917 +#: ../../library/inspect.rst:919 msgid "Set default values for missing arguments." msgstr "" -#: ../../library/inspect.rst:919 +#: ../../library/inspect.rst:921 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../library/inspect.rst:922 +#: ../../library/inspect.rst:924 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../library/inspect.rst:935 +#: ../../library/inspect.rst:937 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions::" msgstr "" -#: ../../library/inspect.rst:948 +#: ../../library/inspect.rst:950 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: ../../library/inspect.rst:949 +#: ../../library/inspect.rst:951 msgid "The detailed specification, implementation details and examples." msgstr "" -#: ../../library/inspect.rst:955 +#: ../../library/inspect.rst:957 msgid "Classes and functions" msgstr "" -#: ../../library/inspect.rst:959 +#: ../../library/inspect.rst:961 msgid "" "Arrange the given list of classes into a hierarchy of nested lists. Where a " "nested list appears, it contains classes derived from the class whose entry " @@ -1264,19 +1264,19 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../library/inspect.rst:970 +#: ../../library/inspect.rst:972 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../library/inspect.rst:973 +#: ../../library/inspect.rst:975 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: ../../library/inspect.rst:976 +#: ../../library/inspect.rst:978 msgid "" "*args* is a list of the positional parameter names. *varargs* is the name of " "the ``*`` parameter or ``None`` if arbitrary positional arguments are not " @@ -1291,7 +1291,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../library/inspect.rst:991 +#: ../../library/inspect.rst:993 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1301,14 +1301,14 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../library/inspect.rst:998 +#: ../../library/inspect.rst:1000 msgid "" "This function is now based on :func:`signature`, but still ignores " "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" -#: ../../library/inspect.rst:1003 +#: ../../library/inspect.rst:1005 msgid "" "This method was previously documented as deprecated in favour of :func:" "`signature` in Python 3.5, but that decision has been reversed in order to " @@ -1316,7 +1316,7 @@ msgid "" "code migrating away from the legacy :func:`getargspec` API." msgstr "" -#: ../../library/inspect.rst:1018 +#: ../../library/inspect.rst:1020 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1325,18 +1325,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../library/inspect.rst:1025 ../../library/inspect.rst:1035 +#: ../../library/inspect.rst:1027 ../../library/inspect.rst:1037 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../library/inspect.rst:1030 +#: ../../library/inspect.rst:1032 msgid "" "Format a pretty argument spec from the four values returned by :func:" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" -#: ../../library/inspect.rst:1040 +#: ../../library/inspect.rst:1042 msgid "" "Return a tuple of class cls's base classes, including cls, in method " "resolution order. No class appears more than once in this tuple. Note that " @@ -1344,7 +1344,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../library/inspect.rst:1048 +#: ../../library/inspect.rst:1050 msgid "" "Bind the *args* and *kwds* to the argument names of the Python function or " "method *func*, as if it was called with them. For bound methods, bind also " @@ -1357,11 +1357,11 @@ msgid "" "example::" msgstr "" -#: ../../library/inspect.rst:1071 +#: ../../library/inspect.rst:1073 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "" -#: ../../library/inspect.rst:1077 +#: ../../library/inspect.rst:1079 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1373,18 +1373,18 @@ msgid "" "builtins." msgstr "" -#: ../../library/inspect.rst:1086 +#: ../../library/inspect.rst:1088 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "" -#: ../../library/inspect.rst:1093 +#: ../../library/inspect.rst:1095 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" -#: ../../library/inspect.rst:1096 +#: ../../library/inspect.rst:1098 msgid "" "*stop* is an optional callback accepting an object in the wrapper chain as " "its sole argument that allows the unwrapping to be terminated early if the " @@ -1394,68 +1394,68 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../library/inspect.rst:1103 +#: ../../library/inspect.rst:1105 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "" -#: ../../library/inspect.rst:1110 +#: ../../library/inspect.rst:1112 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../library/inspect.rst:1112 +#: ../../library/inspect.rst:1114 msgid "" "``obj`` may be a callable, class, or module. Passing in an object of any " "other type raises :exc:`TypeError`." msgstr "" -#: ../../library/inspect.rst:1115 +#: ../../library/inspect.rst:1117 msgid "" "Returns a dict. ``get_annotations()`` returns a new dict every time it's " "called; calling it twice on the same object will return two different but " "equivalent dicts." msgstr "" -#: ../../library/inspect.rst:1119 +#: ../../library/inspect.rst:1121 msgid "This function handles several details for you:" msgstr "" -#: ../../library/inspect.rst:1121 +#: ../../library/inspect.rst:1123 msgid "" "If ``eval_str`` is true, values of type ``str`` will be un-stringized using :" "func:`eval()`. This is intended for use with stringized annotations (``from " "__future__ import annotations``)." msgstr "" -#: ../../library/inspect.rst:1125 +#: ../../library/inspect.rst:1127 msgid "" "If ``obj`` doesn't have an annotations dict, returns an empty dict. " "(Functions and methods always have an annotations dict; classes, modules, " "and other types of callables may not.)" msgstr "" -#: ../../library/inspect.rst:1129 +#: ../../library/inspect.rst:1131 msgid "" "Ignores inherited annotations on classes. If a class doesn't have its own " "annotations dict, returns an empty dict." msgstr "" -#: ../../library/inspect.rst:1131 +#: ../../library/inspect.rst:1133 msgid "" "All accesses to object members and dict values are done using ``getattr()`` " "and ``dict.get()`` for safety." msgstr "" -#: ../../library/inspect.rst:1133 +#: ../../library/inspect.rst:1135 msgid "Always, always, always returns a freshly created dict." msgstr "" -#: ../../library/inspect.rst:1135 +#: ../../library/inspect.rst:1137 msgid "" "``eval_str`` controls whether or not values of type ``str`` are replaced " "with the result of calling :func:`eval()` on those values:" msgstr "" -#: ../../library/inspect.rst:1138 +#: ../../library/inspect.rst:1140 msgid "" "If eval_str is true, :func:`eval()` is called on values of type ``str``. " "(Note that ``get_annotations`` doesn't catch exceptions; if :func:`eval()` " @@ -1463,12 +1463,12 @@ msgid "" "call.)" msgstr "" -#: ../../library/inspect.rst:1142 +#: ../../library/inspect.rst:1144 msgid "" "If eval_str is false (the default), values of type ``str`` are unchanged." msgstr "" -#: ../../library/inspect.rst:1144 +#: ../../library/inspect.rst:1146 msgid "" "``globals`` and ``locals`` are passed in to :func:`eval()`; see the " "documentation for :func:`eval()` for more information. If ``globals`` or " @@ -1476,35 +1476,35 @@ msgid "" "specific default, contingent on ``type(obj)``:" msgstr "" -#: ../../library/inspect.rst:1149 +#: ../../library/inspect.rst:1151 msgid "If ``obj`` is a module, ``globals`` defaults to ``obj.__dict__``." msgstr "" -#: ../../library/inspect.rst:1150 +#: ../../library/inspect.rst:1152 msgid "" "If ``obj`` is a class, ``globals`` defaults to ``sys.modules[obj.__module__]." "__dict__`` and ``locals`` defaults to the ``obj`` class namespace." msgstr "" -#: ../../library/inspect.rst:1153 +#: ../../library/inspect.rst:1155 msgid "" "If ``obj`` is a callable, ``globals`` defaults to ``obj.__globals__``, " "although if ``obj`` is a wrapped function (using ``functools." "update_wrapper()``) it is first unwrapped." msgstr "" -#: ../../library/inspect.rst:1157 +#: ../../library/inspect.rst:1159 msgid "" "Calling ``get_annotations`` is best practice for accessing the annotations " "dict of any object. See :ref:`annotations-howto` for more information on " "annotations best practices." msgstr "" -#: ../../library/inspect.rst:1167 +#: ../../library/inspect.rst:1169 msgid "The interpreter stack" msgstr "" -#: ../../library/inspect.rst:1169 +#: ../../library/inspect.rst:1171 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1512,89 +1512,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../library/inspect.rst:1178 +#: ../../library/inspect.rst:1180 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../library/inspect.rst:1182 +#: ../../library/inspect.rst:1184 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../library/inspect.rst:1187 +#: ../../library/inspect.rst:1189 msgid "" "The line number of the current line associated with the code being executed " "by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1192 +#: ../../library/inspect.rst:1194 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1196 +#: ../../library/inspect.rst:1198 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1201 ../../library/inspect.rst:1239 +#: ../../library/inspect.rst:1203 ../../library/inspect.rst:1242 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../library/inspect.rst:1205 +#: ../../library/inspect.rst:1207 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this record corresponds to." msgstr "" -#: ../../library/inspect.rst:1209 -msgid "Return a named tuple instead of a tuple." +#: ../../library/inspect.rst:1211 +msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../library/inspect.rst:1212 +#: ../../library/inspect.rst:1214 msgid "" -"Changed the return object from a named tuple to a regular object (that is " -"backwards compatible with the previous named tuple)." +":class:`!FrameInfo` is now a class instance (that is backwards compatible " +"with the previous :term:`named tuple`)." msgstr "" -#: ../../library/inspect.rst:1220 +#: ../../library/inspect.rst:1223 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1225 +#: ../../library/inspect.rst:1228 msgid "" "The line number of the current line associated with the code being executed " "by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1230 +#: ../../library/inspect.rst:1233 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../library/inspect.rst:1234 +#: ../../library/inspect.rst:1237 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1243 +#: ../../library/inspect.rst:1246 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this traceback corresponds to." msgstr "" -#: ../../library/inspect.rst:1250 +#: ../../library/inspect.rst:1251 +msgid "" +":class:`!Traceback` is now a class instance (that is backwards compatible " +"with the previous :term:`named tuple`)." +msgstr "" + +#: ../../library/inspect.rst:1258 msgid "" "Keeping references to frame objects, as found in the first element of the " "frame records these functions return, can cause your program to create " @@ -1606,7 +1612,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../library/inspect.rst:1258 +#: ../../library/inspect.rst:1266 msgid "" "Though the cycle detector will catch these, destruction of the frames (and " "local variables) can be made deterministic by removing the cycle in a :" @@ -1614,31 +1620,31 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../library/inspect.rst:1270 +#: ../../library/inspect.rst:1278 msgid "" "If you want to keep the frame around (for example to print a traceback " "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" -#: ../../library/inspect.rst:1274 +#: ../../library/inspect.rst:1282 msgid "" "The optional *context* argument supported by most of these functions " "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" -#: ../../library/inspect.rst:1281 +#: ../../library/inspect.rst:1289 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../library/inspect.rst:1284 +#: ../../library/inspect.rst:1292 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../library/inspect.rst:1289 +#: ../../library/inspect.rst:1297 msgid "" "Get a list of :class:`FrameInfo` objects for a frame and all outer frames. " "These frames represent the calls that lead to the creation of *frame*. The " @@ -1646,19 +1652,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../library/inspect.rst:1294 ../../library/inspect.rst:1309 -#: ../../library/inspect.rst:1335 ../../library/inspect.rst:1350 +#: ../../library/inspect.rst:1302 ../../library/inspect.rst:1317 +#: ../../library/inspect.rst:1343 ../../library/inspect.rst:1358 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../library/inspect.rst:1299 ../../library/inspect.rst:1314 -#: ../../library/inspect.rst:1340 ../../library/inspect.rst:1355 +#: ../../library/inspect.rst:1307 ../../library/inspect.rst:1322 +#: ../../library/inspect.rst:1348 ../../library/inspect.rst:1363 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "" -#: ../../library/inspect.rst:1304 +#: ../../library/inspect.rst:1312 msgid "" "Get a list of :class:`FrameInfo` objects for a traceback's frame and all " "inner frames. These frames represent calls made as a consequence of " @@ -1666,11 +1672,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1319 +#: ../../library/inspect.rst:1327 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../library/inspect.rst:1323 +#: ../../library/inspect.rst:1331 msgid "" "This function relies on Python stack frame support in the interpreter, which " "isn't guaranteed to exist in all implementations of Python. If running in " @@ -1678,14 +1684,14 @@ msgid "" "``None``." msgstr "" -#: ../../library/inspect.rst:1331 +#: ../../library/inspect.rst:1339 msgid "" "Return a list of :class:`FrameInfo` objects for the caller's stack. The " "first entry in the returned list represents the caller; the last entry " "represents the outermost call on the stack." msgstr "" -#: ../../library/inspect.rst:1345 +#: ../../library/inspect.rst:1353 msgid "" "Return a list of :class:`FrameInfo` objects for the stack between the " "current frame and the frame in which an exception currently being handled " @@ -1693,11 +1699,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../library/inspect.rst:1359 +#: ../../library/inspect.rst:1367 msgid "Fetching attributes statically" msgstr "" -#: ../../library/inspect.rst:1361 +#: ../../library/inspect.rst:1369 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -1705,20 +1711,20 @@ msgid "" "`__getattribute__` may be called." msgstr "" -#: ../../library/inspect.rst:1366 +#: ../../library/inspect.rst:1374 msgid "" "For cases where you want passive introspection, like documentation tools, " "this can be inconvenient. :func:`getattr_static` has the same signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" -#: ../../library/inspect.rst:1372 +#: ../../library/inspect.rst:1380 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`__getattr__` or :meth:`__getattribute__`." msgstr "" -#: ../../library/inspect.rst:1375 +#: ../../library/inspect.rst:1383 msgid "" "Note: this function may not be able to retrieve all attributes that getattr " "can fetch (like dynamically created attributes) and may find attributes that " @@ -1726,31 +1732,31 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../library/inspect.rst:1381 +#: ../../library/inspect.rst:1389 msgid "" "If the instance :attr:`~object.__dict__` is shadowed by another member (for " "example a property) then this function will be unable to find instance " "members." msgstr "" -#: ../../library/inspect.rst:1387 +#: ../../library/inspect.rst:1395 msgid "" ":func:`getattr_static` does not resolve descriptors, for example slot " "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" -#: ../../library/inspect.rst:1391 +#: ../../library/inspect.rst:1399 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" -#: ../../library/inspect.rst:1417 +#: ../../library/inspect.rst:1425 msgid "Current State of Generators and Coroutines" msgstr "" -#: ../../library/inspect.rst:1419 +#: ../../library/inspect.rst:1427 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -1759,31 +1765,31 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../library/inspect.rst:1427 +#: ../../library/inspect.rst:1435 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../library/inspect.rst:1433 ../../library/inspect.rst:1448 +#: ../../library/inspect.rst:1441 ../../library/inspect.rst:1456 msgid "Possible states are:" msgstr "" -#: ../../library/inspect.rst:1430 +#: ../../library/inspect.rst:1438 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1431 +#: ../../library/inspect.rst:1439 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1432 +#: ../../library/inspect.rst:1440 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../library/inspect.rst:1433 +#: ../../library/inspect.rst:1441 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1439 +#: ../../library/inspect.rst:1447 msgid "" "Get current state of a coroutine object. The function is intended to be " "used with coroutine objects created by :keyword:`async def` functions, but " @@ -1791,30 +1797,30 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../library/inspect.rst:1445 +#: ../../library/inspect.rst:1453 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../library/inspect.rst:1446 +#: ../../library/inspect.rst:1454 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../library/inspect.rst:1447 +#: ../../library/inspect.rst:1455 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../library/inspect.rst:1448 +#: ../../library/inspect.rst:1456 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../library/inspect.rst:1452 +#: ../../library/inspect.rst:1460 msgid "" "The current internal state of the generator can also be queried. This is " "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" -#: ../../library/inspect.rst:1458 +#: ../../library/inspect.rst:1466 msgid "" "Get the mapping of live local variables in *generator* to their current " "values. A dictionary is returned that maps from variable names to values. " @@ -1822,14 +1828,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../library/inspect.rst:1463 +#: ../../library/inspect.rst:1471 msgid "" "If *generator* is a :term:`generator` with no currently associated frame, " "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" -#: ../../library/inspect.rst:1469 +#: ../../library/inspect.rst:1477 msgid "" "This function relies on the generator exposing a Python stack frame for " "introspection, which isn't guaranteed to be the case in all implementations " @@ -1837,72 +1843,72 @@ msgid "" "dictionary." msgstr "" -#: ../../library/inspect.rst:1478 +#: ../../library/inspect.rst:1486 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../library/inspect.rst:1487 +#: ../../library/inspect.rst:1495 msgid "Code Objects Bit Flags" msgstr "" -#: ../../library/inspect.rst:1489 +#: ../../library/inspect.rst:1497 msgid "" "Python code objects have a ``co_flags`` attribute, which is a bitmap of the " "following flags:" msgstr "" -#: ../../library/inspect.rst:1494 +#: ../../library/inspect.rst:1502 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../library/inspect.rst:1498 +#: ../../library/inspect.rst:1506 msgid "" "If set, a new dict will be created for the frame's ``f_locals`` when the " "code object is executed." msgstr "" -#: ../../library/inspect.rst:1503 +#: ../../library/inspect.rst:1511 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../library/inspect.rst:1507 +#: ../../library/inspect.rst:1515 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../library/inspect.rst:1511 +#: ../../library/inspect.rst:1519 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../library/inspect.rst:1515 +#: ../../library/inspect.rst:1523 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" -#: ../../library/inspect.rst:1520 +#: ../../library/inspect.rst:1528 msgid "" "The flag is set when the code object is a coroutine function. When the code " "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" -#: ../../library/inspect.rst:1528 +#: ../../library/inspect.rst:1536 msgid "" "The flag is used to transform generators into generator-based coroutines. " "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" -#: ../../library/inspect.rst:1537 +#: ../../library/inspect.rst:1545 msgid "" "The flag is set when the code object is an asynchronous generator function. " "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" -#: ../../library/inspect.rst:1544 +#: ../../library/inspect.rst:1552 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -1910,24 +1916,24 @@ msgid "" "use public APIs from the :mod:`inspect` module for any introspection needs." msgstr "" -#: ../../library/inspect.rst:1554 +#: ../../library/inspect.rst:1562 msgid "Command Line Interface" msgstr "" -#: ../../library/inspect.rst:1556 +#: ../../library/inspect.rst:1564 msgid "" "The :mod:`inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../library/inspect.rst:1561 +#: ../../library/inspect.rst:1569 msgid "" "By default, accepts the name of a module and prints the source of that " "module. A class or function within the module can be printed instead by " "appended a colon and the qualified name of the target object." msgstr "" -#: ../../library/inspect.rst:1567 +#: ../../library/inspect.rst:1575 msgid "" "Print information about the specified object rather than the source code" msgstr "" diff --git a/library/io.po b/library/io.po index 18c47885bd..fbf75a0122 100644 --- a/library/io.po +++ b/library/io.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -229,7 +229,7 @@ msgstr "" msgid "This is an alias for the builtin :func:`open` function." msgstr "" -#: ../../library/io.rst:175 +#: ../../library/io.rst:3 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." @@ -1428,11 +1428,11 @@ msgid "" "The initial value of the buffer can be set by providing *initial_value*. If " "newline translation is enabled, newlines will be encoded as if by :meth:" "`~TextIOBase.write`. The stream is positioned at the start of the buffer " -"which emulates opening an existing file in a `w+` mode, making it ready for " -"an immediate write from the beginning or for a write that would overwrite " -"the initial value. To emulate opening a file in an `a+` mode ready for " -"appending, use `f.seek(0, io.SEEK_END)` to reposition the stream at the end " -"of the buffer." +"which emulates opening an existing file in a ``w+`` mode, making it ready " +"for an immediate write from the beginning or for a write that would " +"overwrite the initial value. To emulate opening a file in an ``a+`` mode " +"ready for appending, use ``f.seek(0, io.SEEK_END)`` to reposition the stream " +"at the end of the buffer." msgstr "" #: ../../library/io.rst:1064 diff --git a/library/itertools.po b/library/itertools.po index e66cab350b..48bf1a0182 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,14 +22,14 @@ msgstr "" msgid ":mod:`itertools` --- Functions creating iterators for efficient looping" msgstr "" -#: ../../library/itertools.rst:16 +#: ../../library/itertools.rst:20 msgid "" "This module implements a number of :term:`iterator` building blocks inspired " "by constructs from APL, Haskell, and SML. Each has been recast in a form " "suitable for Python." msgstr "" -#: ../../library/itertools.rst:20 +#: ../../library/itertools.rst:24 msgid "" "The module standardizes a core set of fast, memory efficient tools that are " "useful by themselves or in combination. Together, they form an \"iterator " @@ -37,14 +37,14 @@ msgid "" "efficiently in pure Python." msgstr "" -#: ../../library/itertools.rst:25 +#: ../../library/itertools.rst:29 msgid "" "For instance, SML provides a tabulation tool: ``tabulate(f)`` which produces " "a sequence ``f(0), f(1), ...``. The same effect can be achieved in Python " "by combining :func:`map` and :func:`count` to form ``map(f, count())``." msgstr "" -#: ../../library/itertools.rst:29 +#: ../../library/itertools.rst:33 msgid "" "These tools and their built-in counterparts also work well with the high-" "speed functions in the :mod:`operator` module. For example, the " @@ -52,364 +52,364 @@ msgid "" "efficient dot-product: ``sum(map(operator.mul, vector1, vector2))``." msgstr "" -#: ../../library/itertools.rst:35 +#: ../../library/itertools.rst:39 msgid "**Infinite iterators:**" msgstr "" -#: ../../library/itertools.rst:38 ../../library/itertools.rst:48 -#: ../../library/itertools.rst:68 +#: ../../library/itertools.rst:42 ../../library/itertools.rst:52 +#: ../../library/itertools.rst:72 msgid "Iterator" msgstr "" -#: ../../library/itertools.rst:38 ../../library/itertools.rst:48 -#: ../../library/itertools.rst:68 +#: ../../library/itertools.rst:42 ../../library/itertools.rst:52 +#: ../../library/itertools.rst:72 msgid "Arguments" msgstr "引數" -#: ../../library/itertools.rst:38 ../../library/itertools.rst:48 -#: ../../library/itertools.rst:68 ../../library/itertools.rst:77 +#: ../../library/itertools.rst:42 ../../library/itertools.rst:52 +#: ../../library/itertools.rst:72 ../../library/itertools.rst:81 msgid "Results" msgstr "結果" -#: ../../library/itertools.rst:38 ../../library/itertools.rst:48 +#: ../../library/itertools.rst:42 ../../library/itertools.rst:52 msgid "Example" msgstr "範例" -#: ../../library/itertools.rst:40 +#: ../../library/itertools.rst:44 msgid ":func:`count`" msgstr ":func:`count`" -#: ../../library/itertools.rst:40 +#: ../../library/itertools.rst:44 msgid "start, [step]" msgstr "" -#: ../../library/itertools.rst:40 +#: ../../library/itertools.rst:44 msgid "start, start+step, start+2*step, ..." msgstr "" -#: ../../library/itertools.rst:40 +#: ../../library/itertools.rst:44 msgid "``count(10) --> 10 11 12 13 14 ...``" msgstr "``count(10) --> 10 11 12 13 14 ...``" -#: ../../library/itertools.rst:41 +#: ../../library/itertools.rst:45 msgid ":func:`cycle`" msgstr ":func:`cycle`" -#: ../../library/itertools.rst:41 +#: ../../library/itertools.rst:45 msgid "p" msgstr "p" -#: ../../library/itertools.rst:41 +#: ../../library/itertools.rst:45 msgid "p0, p1, ... plast, p0, p1, ..." msgstr "p0, p1, ... plast, p0, p1, ..." -#: ../../library/itertools.rst:41 +#: ../../library/itertools.rst:45 msgid "``cycle('ABCD') --> A B C D A B C D ...``" msgstr "``cycle('ABCD') --> A B C D A B C D ...``" -#: ../../library/itertools.rst:42 +#: ../../library/itertools.rst:46 msgid ":func:`repeat`" msgstr ":func:`repeat`" -#: ../../library/itertools.rst:42 +#: ../../library/itertools.rst:46 msgid "elem [,n]" msgstr "elem [,n]" -#: ../../library/itertools.rst:42 +#: ../../library/itertools.rst:46 msgid "elem, elem, elem, ... endlessly or up to n times" msgstr "" -#: ../../library/itertools.rst:42 +#: ../../library/itertools.rst:46 msgid "``repeat(10, 3) --> 10 10 10``" msgstr "``repeat(10, 3) --> 10 10 10``" -#: ../../library/itertools.rst:45 +#: ../../library/itertools.rst:49 msgid "**Iterators terminating on the shortest input sequence:**" msgstr "" -#: ../../library/itertools.rst:50 +#: ../../library/itertools.rst:54 msgid ":func:`accumulate`" msgstr ":func:`accumulate`" -#: ../../library/itertools.rst:50 +#: ../../library/itertools.rst:54 msgid "p [,func]" msgstr "p [,func]" -#: ../../library/itertools.rst:50 +#: ../../library/itertools.rst:54 msgid "p0, p0+p1, p0+p1+p2, ..." msgstr "p0, p0+p1, p0+p1+p2, ..." -#: ../../library/itertools.rst:50 +#: ../../library/itertools.rst:54 msgid "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" msgstr "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" -#: ../../library/itertools.rst:51 +#: ../../library/itertools.rst:55 msgid ":func:`chain`" msgstr ":func:`chain`" -#: ../../library/itertools.rst:51 ../../library/itertools.rst:62 +#: ../../library/itertools.rst:55 ../../library/itertools.rst:66 msgid "p, q, ..." msgstr "p, q, ..." -#: ../../library/itertools.rst:51 ../../library/itertools.rst:52 +#: ../../library/itertools.rst:55 ../../library/itertools.rst:56 msgid "p0, p1, ... plast, q0, q1, ..." msgstr "p0, p1, ... plast, q0, q1, ..." -#: ../../library/itertools.rst:51 +#: ../../library/itertools.rst:55 msgid "``chain('ABC', 'DEF') --> A B C D E F``" msgstr "``chain('ABC', 'DEF') --> A B C D E F``" -#: ../../library/itertools.rst:52 +#: ../../library/itertools.rst:56 msgid ":func:`chain.from_iterable`" msgstr ":func:`chain.from_iterable`" -#: ../../library/itertools.rst:52 ../../library/itertools.rst:58 +#: ../../library/itertools.rst:56 ../../library/itertools.rst:62 msgid "iterable" msgstr "" -#: ../../library/itertools.rst:52 +#: ../../library/itertools.rst:56 msgid "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" msgstr "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" -#: ../../library/itertools.rst:53 +#: ../../library/itertools.rst:57 msgid ":func:`compress`" msgstr ":func:`compress`" -#: ../../library/itertools.rst:53 +#: ../../library/itertools.rst:57 msgid "data, selectors" msgstr "" -#: ../../library/itertools.rst:53 +#: ../../library/itertools.rst:57 msgid "(d[0] if s[0]), (d[1] if s[1]), ..." msgstr "(d[0] if s[0]), (d[1] if s[1]), ..." -#: ../../library/itertools.rst:53 +#: ../../library/itertools.rst:57 msgid "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" msgstr "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" -#: ../../library/itertools.rst:54 +#: ../../library/itertools.rst:58 msgid ":func:`dropwhile`" msgstr ":func:`dropwhile`" -#: ../../library/itertools.rst:54 ../../library/itertools.rst:55 -#: ../../library/itertools.rst:60 +#: ../../library/itertools.rst:58 ../../library/itertools.rst:59 +#: ../../library/itertools.rst:64 msgid "pred, seq" msgstr "pred, seq" -#: ../../library/itertools.rst:54 +#: ../../library/itertools.rst:58 msgid "seq[n], seq[n+1], starting when pred fails" msgstr "" -#: ../../library/itertools.rst:54 +#: ../../library/itertools.rst:58 msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" -#: ../../library/itertools.rst:55 +#: ../../library/itertools.rst:59 msgid ":func:`filterfalse`" msgstr ":func:`filterfalse`" -#: ../../library/itertools.rst:55 +#: ../../library/itertools.rst:59 msgid "elements of seq where pred(elem) is false" msgstr "" -#: ../../library/itertools.rst:55 +#: ../../library/itertools.rst:59 msgid "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" msgstr "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" -#: ../../library/itertools.rst:56 +#: ../../library/itertools.rst:60 msgid ":func:`groupby`" msgstr ":func:`groupby`" -#: ../../library/itertools.rst:56 +#: ../../library/itertools.rst:60 msgid "iterable[, key]" msgstr "iterable[, key]" -#: ../../library/itertools.rst:56 +#: ../../library/itertools.rst:60 msgid "sub-iterators grouped by value of key(v)" msgstr "" -#: ../../library/itertools.rst:57 +#: ../../library/itertools.rst:61 msgid ":func:`islice`" msgstr ":func:`islice`" -#: ../../library/itertools.rst:57 +#: ../../library/itertools.rst:61 msgid "seq, [start,] stop [, step]" msgstr "seq, [start,] stop [, step]" -#: ../../library/itertools.rst:57 +#: ../../library/itertools.rst:61 msgid "elements from seq[start:stop:step]" msgstr "" -#: ../../library/itertools.rst:57 +#: ../../library/itertools.rst:61 msgid "``islice('ABCDEFG', 2, None) --> C D E F G``" msgstr "``islice('ABCDEFG', 2, None) --> C D E F G``" -#: ../../library/itertools.rst:58 +#: ../../library/itertools.rst:62 msgid ":func:`pairwise`" msgstr ":func:`pairwise`" -#: ../../library/itertools.rst:58 +#: ../../library/itertools.rst:62 msgid "(p[0], p[1]), (p[1], p[2])" msgstr "(p[0], p[1]), (p[1], p[2])" -#: ../../library/itertools.rst:58 +#: ../../library/itertools.rst:62 msgid "``pairwise('ABCDEFG') --> AB BC CD DE EF FG``" msgstr "``pairwise('ABCDEFG') --> AB BC CD DE EF FG``" -#: ../../library/itertools.rst:59 +#: ../../library/itertools.rst:63 msgid ":func:`starmap`" msgstr ":func:`starmap`" -#: ../../library/itertools.rst:59 +#: ../../library/itertools.rst:63 msgid "func, seq" msgstr "func, seq" -#: ../../library/itertools.rst:59 +#: ../../library/itertools.rst:63 msgid "func(\\*seq[0]), func(\\*seq[1]), ..." msgstr "func(\\*seq[0]), func(\\*seq[1]), ..." -#: ../../library/itertools.rst:59 +#: ../../library/itertools.rst:63 msgid "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" msgstr "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" -#: ../../library/itertools.rst:60 +#: ../../library/itertools.rst:64 msgid ":func:`takewhile`" msgstr ":func:`takewhile`" -#: ../../library/itertools.rst:60 +#: ../../library/itertools.rst:64 msgid "seq[0], seq[1], until pred fails" msgstr "seq[0], seq[1], until pred fails" -#: ../../library/itertools.rst:60 +#: ../../library/itertools.rst:64 msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" -#: ../../library/itertools.rst:61 +#: ../../library/itertools.rst:65 msgid ":func:`tee`" msgstr ":func:`tee`" -#: ../../library/itertools.rst:61 +#: ../../library/itertools.rst:65 msgid "it, n" msgstr "it, n" -#: ../../library/itertools.rst:61 +#: ../../library/itertools.rst:65 msgid "it1, it2, ... itn splits one iterator into n" msgstr "" -#: ../../library/itertools.rst:62 +#: ../../library/itertools.rst:66 msgid ":func:`zip_longest`" msgstr ":func:`zip_longest`" -#: ../../library/itertools.rst:62 +#: ../../library/itertools.rst:66 msgid "(p[0], q[0]), (p[1], q[1]), ..." msgstr "(p[0], q[0]), (p[1], q[1]), ..." -#: ../../library/itertools.rst:62 +#: ../../library/itertools.rst:66 msgid "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" msgstr "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" -#: ../../library/itertools.rst:65 +#: ../../library/itertools.rst:69 msgid "**Combinatoric iterators:**" msgstr "" -#: ../../library/itertools.rst:70 +#: ../../library/itertools.rst:74 msgid ":func:`product`" msgstr ":func:`product`" -#: ../../library/itertools.rst:70 +#: ../../library/itertools.rst:74 msgid "p, q, ... [repeat=1]" msgstr "p, q, ... [repeat=1]" -#: ../../library/itertools.rst:70 +#: ../../library/itertools.rst:74 msgid "cartesian product, equivalent to a nested for-loop" msgstr "" -#: ../../library/itertools.rst:71 +#: ../../library/itertools.rst:75 msgid ":func:`permutations`" msgstr ":func:`permutations`" -#: ../../library/itertools.rst:71 +#: ../../library/itertools.rst:75 msgid "p[, r]" msgstr "p[, r]" -#: ../../library/itertools.rst:71 +#: ../../library/itertools.rst:75 msgid "r-length tuples, all possible orderings, no repeated elements" msgstr "" -#: ../../library/itertools.rst:72 +#: ../../library/itertools.rst:76 msgid ":func:`combinations`" msgstr ":func:`combinations`" -#: ../../library/itertools.rst:72 ../../library/itertools.rst:73 +#: ../../library/itertools.rst:76 ../../library/itertools.rst:77 msgid "p, r" msgstr "p, r" -#: ../../library/itertools.rst:72 +#: ../../library/itertools.rst:76 msgid "r-length tuples, in sorted order, no repeated elements" msgstr "" -#: ../../library/itertools.rst:73 +#: ../../library/itertools.rst:77 msgid ":func:`combinations_with_replacement`" msgstr ":func:`combinations_with_replacement`" -#: ../../library/itertools.rst:73 +#: ../../library/itertools.rst:77 msgid "r-length tuples, in sorted order, with repeated elements" msgstr "" -#: ../../library/itertools.rst:77 +#: ../../library/itertools.rst:81 msgid "Examples" msgstr "" -#: ../../library/itertools.rst:79 +#: ../../library/itertools.rst:83 msgid "``product('ABCD', repeat=2)``" msgstr "``product('ABCD', repeat=2)``" -#: ../../library/itertools.rst:79 +#: ../../library/itertools.rst:83 msgid "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" msgstr "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" -#: ../../library/itertools.rst:80 +#: ../../library/itertools.rst:84 msgid "``permutations('ABCD', 2)``" msgstr "``permutations('ABCD', 2)``" -#: ../../library/itertools.rst:80 +#: ../../library/itertools.rst:84 msgid "``AB AC AD BA BC BD CA CB CD DA DB DC``" msgstr "``AB AC AD BA BC BD CA CB CD DA DB DC``" -#: ../../library/itertools.rst:81 +#: ../../library/itertools.rst:85 msgid "``combinations('ABCD', 2)``" msgstr "``combinations('ABCD', 2)``" -#: ../../library/itertools.rst:81 +#: ../../library/itertools.rst:85 msgid "``AB AC AD BC BD CD``" msgstr "``AB AC AD BC BD CD``" -#: ../../library/itertools.rst:82 +#: ../../library/itertools.rst:86 msgid "``combinations_with_replacement('ABCD', 2)``" msgstr "``combinations_with_replacement('ABCD', 2)``" -#: ../../library/itertools.rst:82 +#: ../../library/itertools.rst:86 msgid "``AA AB AC AD BB BC BD CC CD DD``" msgstr "``AA AB AC AD BB BC BD CC CD DD``" -#: ../../library/itertools.rst:89 +#: ../../library/itertools.rst:93 msgid "Itertool functions" msgstr "" -#: ../../library/itertools.rst:91 +#: ../../library/itertools.rst:95 msgid "" "The following module functions all construct and return iterators. Some " "provide streams of infinite length, so they should only be accessed by " "functions or loops that truncate the stream." msgstr "" -#: ../../library/itertools.rst:97 +#: ../../library/itertools.rst:101 msgid "" "Make an iterator that returns accumulated sums, or accumulated results of " "other binary functions (specified via the optional *func* argument)." msgstr "" -#: ../../library/itertools.rst:101 +#: ../../library/itertools.rst:105 msgid "" "If *func* is supplied, it should be a function of two arguments. Elements of " "the input *iterable* may be any type that can be accepted as arguments to " @@ -418,7 +418,7 @@ msgid "" "`~fractions.Fraction`.)" msgstr "" -#: ../../library/itertools.rst:108 +#: ../../library/itertools.rst:112 msgid "" "Usually, the number of elements output matches the input iterable. However, " "if the keyword argument *initial* is provided, the accumulation leads off " @@ -426,42 +426,39 @@ msgid "" "input iterable." msgstr "" -#: ../../library/itertools.rst:113 ../../library/itertools.rst:211 -#: ../../library/itertools.rst:260 ../../library/itertools.rst:487 -#: ../../library/itertools.rst:514 ../../library/itertools.rst:596 -#: ../../library/itertools.rst:649 +#: ../../library/itertools.rst:117 ../../library/itertools.rst:203 +#: ../../library/itertools.rst:252 ../../library/itertools.rst:452 +#: ../../library/itertools.rst:488 ../../library/itertools.rst:515 +#: ../../library/itertools.rst:595 msgid "Roughly equivalent to::" msgstr "" "大致等價於:\n" "\n" "::" -#: ../../library/itertools.rst:132 +#: ../../library/itertools.rst:136 msgid "" "There are a number of uses for the *func* argument. It can be set to :func:" "`min` for a running minimum, :func:`max` for a running maximum, or :func:" "`operator.mul` for a running product. Amortization tables can be built by " -"accumulating interest and applying payments. First-order `recurrence " -"relations `_ can be " -"modeled by supplying the initial value in the iterable and using only the " -"accumulated total in *func* argument::" +"accumulating interest and applying payments:" msgstr "" -#: ../../library/itertools.rst:162 +#: ../../library/itertools.rst:154 msgid "" "See :func:`functools.reduce` for a similar function that returns only the " "final accumulated value." msgstr "" -#: ../../library/itertools.rst:167 +#: ../../library/itertools.rst:159 msgid "Added the optional *func* parameter." msgstr "新增選用的 *func* 參數。" -#: ../../library/itertools.rst:170 +#: ../../library/itertools.rst:162 msgid "Added the optional *initial* parameter." msgstr "新增選用的 *initial* 參數。" -#: ../../library/itertools.rst:175 +#: ../../library/itertools.rst:167 msgid "" "Make an iterator that returns elements from the first iterable until it is " "exhausted, then proceeds to the next iterable, until all of the iterables " @@ -469,69 +466,69 @@ msgid "" "sequence. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:189 +#: ../../library/itertools.rst:181 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:201 +#: ../../library/itertools.rst:193 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:203 ../../library/itertools.rst:252 +#: ../../library/itertools.rst:195 ../../library/itertools.rst:244 msgid "" "The combination tuples are emitted in lexicographic ordering according to " "the order of the input *iterable*. So, if the input *iterable* is sorted, " -"the combination tuples will be produced in sorted order." +"the output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:207 +#: ../../library/itertools.rst:199 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So if the input elements are unique, there will be no repeat values in each " -"combination." +"So if the input elements are unique, there will be no repeated values in " +"each combination." msgstr "" -#: ../../library/itertools.rst:233 +#: ../../library/itertools.rst:225 msgid "" "The code for :func:`combinations` can be also expressed as a subsequence of :" "func:`permutations` after filtering entries where the elements are not in " "sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:244 +#: ../../library/itertools.rst:236 msgid "" "The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " "zero when ``r > n``." msgstr "" -#: ../../library/itertools.rst:249 +#: ../../library/itertools.rst:241 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" -#: ../../library/itertools.rst:256 +#: ../../library/itertools.rst:248 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, the generated combinations will also be " "unique." msgstr "" -#: ../../library/itertools.rst:279 +#: ../../library/itertools.rst:271 msgid "" "The code for :func:`combinations_with_replacement` can be also expressed as " "a subsequence of :func:`product` after filtering entries where the elements " "are not in sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:290 +#: ../../library/itertools.rst:282 msgid "" "The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." msgstr "" -#: ../../library/itertools.rst:297 +#: ../../library/itertools.rst:289 msgid "" "Make an iterator that filters elements from *data* returning only those that " "have a corresponding element in *selectors* that evaluates to ``True``. " @@ -539,7 +536,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:311 +#: ../../library/itertools.rst:303 msgid "" "Make an iterator that returns evenly spaced values starting with number " "*start*. Often used as an argument to :func:`map` to generate consecutive " @@ -547,31 +544,31 @@ msgid "" "equivalent to::" msgstr "" -#: ../../library/itertools.rst:323 +#: ../../library/itertools.rst:315 msgid "" "When counting with floating point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" -#: ../../library/itertools.rst:327 +#: ../../library/itertools.rst:319 msgid "Added *step* argument and allowed non-integer arguments." msgstr "新增 *step* 引數並允許非整數引數。" -#: ../../library/itertools.rst:332 +#: ../../library/itertools.rst:324 msgid "" "Make an iterator returning elements from the iterable and saving a copy of " "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:346 +#: ../../library/itertools.rst:338 msgid "" "Note, this member of the toolkit may require significant auxiliary storage " "(depending on the length of the iterable)." msgstr "" -#: ../../library/itertools.rst:352 +#: ../../library/itertools.rst:344 msgid "" "Make an iterator that drops elements from the iterable as long as the " "predicate is true; afterwards, returns every element. Note, the iterator " @@ -579,14 +576,14 @@ msgid "" "may have a lengthy start-up time. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:369 +#: ../../library/itertools.rst:361 msgid "" "Make an iterator that filters elements from iterable returning only those " "for which the predicate is ``False``. If *predicate* is ``None``, return the " "items that are false. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:384 +#: ../../library/itertools.rst:376 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " @@ -595,7 +592,7 @@ msgid "" "sorted on the same key function." msgstr "" -#: ../../library/itertools.rst:390 +#: ../../library/itertools.rst:382 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " @@ -604,7 +601,7 @@ msgid "" "aggregates common elements regardless of their input order." msgstr "" -#: ../../library/itertools.rst:396 +#: ../../library/itertools.rst:388 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" @@ -612,94 +609,98 @@ msgid "" "if that data is needed later, it should be stored as a list::" msgstr "" -#: ../../library/itertools.rst:408 +#: ../../library/itertools.rst:400 msgid ":func:`groupby` is roughly equivalent to::" msgstr "" ":func:`groupby` 大致等價於:\n" "\n" "::" -#: ../../library/itertools.rst:441 +#: ../../library/itertools.rst:437 msgid "" "Make an iterator that returns selected elements from the iterable. If " "*start* is non-zero, then elements from the iterable are skipped until start " "is reached. Afterward, elements are returned consecutively unless *step* is " "set higher than one which results in items being skipped. If *stop* is " "``None``, then iteration continues until the iterator is exhausted, if at " -"all; otherwise, it stops at the specified position. Unlike regular " -"slicing, :func:`islice` does not support negative values for *start*, " -"*stop*, or *step*. Can be used to extract related fields from data where " -"the internal structure has been flattened (for example, a multi-line report " -"may list a name field on every third line). Roughly equivalent to::" +"all; otherwise, it stops at the specified position." msgstr "" -#: ../../library/itertools.rst:476 +#: ../../library/itertools.rst:444 msgid "" "If *start* is ``None``, then iteration starts at zero. If *step* is " "``None``, then the step defaults to one." msgstr "" -#: ../../library/itertools.rst:481 +#: ../../library/itertools.rst:447 +msgid "" +"Unlike regular slicing, :func:`islice` does not support negative values for " +"*start*, *stop*, or *step*. Can be used to extract related fields from data " +"where the internal structure has been flattened (for example, a multi-line " +"report may list a name field on every third line)." +msgstr "" + +#: ../../library/itertools.rst:482 msgid "Return successive overlapping pairs taken from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:483 +#: ../../library/itertools.rst:484 msgid "" "The number of 2-tuples in the output iterator will be one fewer than the " "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" -#: ../../library/itertools.rst:500 +#: ../../library/itertools.rst:501 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" -#: ../../library/itertools.rst:502 +#: ../../library/itertools.rst:503 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../library/itertools.rst:506 +#: ../../library/itertools.rst:507 msgid "" -"The permutation tuples are emitted in lexicographic ordering according to " -"the order of the input *iterable*. So, if the input *iterable* is sorted, " -"the combination tuples will be produced in sorted order." +"The permutation tuples are emitted in lexicographic order according to the " +"order of the input *iterable*. So, if the input *iterable* is sorted, the " +"output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:510 +#: ../../library/itertools.rst:511 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So if the input elements are unique, there will be no repeat values in each " -"permutation." +"So if the input elements are unique, there will be no repeated values within " +"a permutation." msgstr "" -#: ../../library/itertools.rst:541 +#: ../../library/itertools.rst:542 msgid "" "The code for :func:`permutations` can be also expressed as a subsequence of :" "func:`product`, filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:553 +#: ../../library/itertools.rst:554 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" -#: ../../library/itertools.rst:558 +#: ../../library/itertools.rst:559 msgid "Cartesian product of input iterables." msgstr "" -#: ../../library/itertools.rst:560 +#: ../../library/itertools.rst:561 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../library/itertools.rst:563 +#: ../../library/itertools.rst:564 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -707,82 +708,85 @@ msgid "" "sorted order." msgstr "" -#: ../../library/itertools.rst:568 +#: ../../library/itertools.rst:569 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../library/itertools.rst:572 +#: ../../library/itertools.rst:573 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../library/itertools.rst:585 +#: ../../library/itertools.rst:586 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../library/itertools.rst:591 +#: ../../library/itertools.rst:592 msgid "" "Make an iterator that returns *object* over and over again. Runs " -"indefinitely unless the *times* argument is specified. Used as argument to :" -"func:`map` for invariant parameters to the called function. Also used with :" -"func:`zip` to create an invariant part of a tuple record." +"indefinitely unless the *times* argument is specified." msgstr "" -#: ../../library/itertools.rst:607 +#: ../../library/itertools.rst:606 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " -"or *zip*::" +"or *zip*:" msgstr "" -#: ../../library/itertools.rst:615 +#: ../../library/itertools.rst:616 msgid "" "Make an iterator that computes the function using arguments obtained from " "the iterable. Used instead of :func:`map` when argument parameters are " -"already grouped in tuples from a single iterable (the data has been \"pre-" -"zipped\"). The difference between :func:`map` and :func:`starmap` parallels " -"the distinction between ``function(a,b)`` and ``function(*c)``. Roughly " +"already grouped in tuples from a single iterable (when the data has been " +"\"pre-zipped\")." +msgstr "" + +#: ../../library/itertools.rst:621 +msgid "" +"The difference between :func:`map` and :func:`starmap` parallels the " +"distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../library/itertools.rst:629 +#: ../../library/itertools.rst:633 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:643 +#: ../../library/itertools.rst:647 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:645 +#: ../../library/itertools.rst:649 msgid "" "The following Python code helps explain what *tee* does (although the actual " "implementation is more complex and uses only a single underlying :abbr:`FIFO " -"(first-in, first-out)` queue)." +"(first-in, first-out)` queue)::" msgstr "" -#: ../../library/itertools.rst:666 +#: ../../library/itertools.rst:668 msgid "" -"Once :func:`tee` has made a split, the original *iterable* should not be " +"Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:670 +#: ../../library/itertools.rst:672 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when using simultaneously iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:674 +#: ../../library/itertools.rst:676 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -790,7 +794,7 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:682 +#: ../../library/itertools.rst:684 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " @@ -798,7 +802,7 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:706 +#: ../../library/itertools.rst:708 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " @@ -806,30 +810,50 @@ msgid "" "specified, *fillvalue* defaults to ``None``." msgstr "" -#: ../../library/itertools.rst:715 +#: ../../library/itertools.rst:717 msgid "Itertools Recipes" msgstr "" -#: ../../library/itertools.rst:717 +#: ../../library/itertools.rst:719 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../library/itertools.rst:720 +#: ../../library/itertools.rst:722 +msgid "" +"The primary purpose of the itertools recipes is educational. The recipes " +"show various ways of thinking about individual tools — for example, that " +"``chain.from_iterable`` is related to the concept of flattening. The " +"recipes also give ideas about ways that the tools can be combined — for " +"example, how `compress()` and `range()` can work together. The recipes also " +"show patterns for using itertools with the :mod:`operator` and :mod:" +"`collections` modules as well as with the built-in itertools such as " +"``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." +msgstr "" + +#: ../../library/itertools.rst:731 +msgid "" +"A secondary purpose of the recipes is to serve as an incubator. The " +"``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " +"as recipes. Currently, the ``iter_index()`` recipe is being tested to see " +"whether it proves its worth." +msgstr "" + +#: ../../library/itertools.rst:736 msgid "" "Substantially all of these recipes and many, many others can be installed " "from the `more-itertools project `_ found on the Python Package Index::" msgstr "" -#: ../../library/itertools.rst:726 +#: ../../library/itertools.rst:742 msgid "" -"The extended tools offer the same high performance as the underlying " -"toolset. The superior memory performance is kept by processing elements one " -"at a time rather than bringing the whole iterable into memory all at once. " -"Code volume is kept small by linking the tools together in a functional " -"style which helps eliminate temporary variables. High speed is retained by " +"Many of the recipes offer the same high performance as the underlying " +"toolset. Superior memory performance is kept by processing elements one at a " +"time rather than bringing the whole iterable into memory all at once. Code " +"volume is kept small by linking the tools together in a functional style " +"which helps eliminate temporary variables. High speed is retained by " "preferring \"vectorized\" building blocks over the use of for-loops and :" "term:`generator`\\s which incur interpreter overhead." msgstr "" diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 2aeb9a10cf..5855f98090 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -839,13 +839,24 @@ msgstr "新增 *socktype*\\ 。" msgid "Closes the socket to the remote host." msgstr "" -#: ../../library/logging.handlers.rst:656 +#: ../../library/logging.handlers.rst:655 +msgid "" +"Tries to create a socket and, if it's not a datagram socket, connect it to " +"the other end. This method is called during handler initialization, but it's " +"not regarded as an error if the other end isn't listening at this point - " +"the method will be called again when emitting an event, if but it's not " +"regarded as an error if the other end isn't listening yet --- the method " +"will be called again when emitting an event, if there is no socket at that " +"point." +msgstr "" + +#: ../../library/logging.handlers.rst:667 msgid "" "The record is formatted, and then sent to the syslog server. If exception " "information is present, it is *not* sent to the server." msgstr "" -#: ../../library/logging.handlers.rst:659 +#: ../../library/logging.handlers.rst:670 msgid "" "(See: :issue:`12168`.) In earlier versions, the message sent to the syslog " "daemons was always terminated with a NUL byte, because early versions of " @@ -856,7 +867,7 @@ msgid "" "byte on as part of the message." msgstr "" -#: ../../library/logging.handlers.rst:668 +#: ../../library/logging.handlers.rst:679 msgid "" "To enable easier handling of syslog messages in the face of all these " "differing daemon behaviours, the appending of the NUL byte has been made " @@ -866,7 +877,7 @@ msgid "" "*not* append the NUL terminator." msgstr "" -#: ../../library/logging.handlers.rst:675 +#: ../../library/logging.handlers.rst:686 msgid "" "(See: :issue:`12419`.) In earlier versions, there was no facility for an " "\"ident\" or \"tag\" prefix to identify the source of the message. This can " @@ -877,262 +888,262 @@ msgid "" "bytes, and is prepended to the message exactly as is." msgstr "" -#: ../../library/logging.handlers.rst:686 +#: ../../library/logging.handlers.rst:697 msgid "" "Encodes the facility and priority into an integer. You can pass in strings " "or integers - if strings are passed, internal mapping dictionaries are used " "to convert them to integers." msgstr "" -#: ../../library/logging.handlers.rst:690 +#: ../../library/logging.handlers.rst:701 msgid "" "The symbolic ``LOG_`` values are defined in :class:`SysLogHandler` and " "mirror the values defined in the ``sys/syslog.h`` header file." msgstr "" -#: ../../library/logging.handlers.rst:693 +#: ../../library/logging.handlers.rst:704 msgid "**Priorities**" msgstr "" -#: ../../library/logging.handlers.rst:696 -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:707 +#: ../../library/logging.handlers.rst:729 msgid "Name (string)" msgstr "" -#: ../../library/logging.handlers.rst:696 -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:707 +#: ../../library/logging.handlers.rst:729 msgid "Symbolic value" msgstr "" -#: ../../library/logging.handlers.rst:698 +#: ../../library/logging.handlers.rst:709 msgid "``alert``" msgstr "``alert``" -#: ../../library/logging.handlers.rst:698 +#: ../../library/logging.handlers.rst:709 msgid "LOG_ALERT" msgstr "LOG_ALERT" -#: ../../library/logging.handlers.rst:700 +#: ../../library/logging.handlers.rst:711 msgid "``crit`` or ``critical``" msgstr "``crit`` 或 ``critical``" -#: ../../library/logging.handlers.rst:700 +#: ../../library/logging.handlers.rst:711 msgid "LOG_CRIT" msgstr "LOG_CRIT" -#: ../../library/logging.handlers.rst:702 +#: ../../library/logging.handlers.rst:713 msgid "``debug``" msgstr "``debug``" -#: ../../library/logging.handlers.rst:702 +#: ../../library/logging.handlers.rst:713 msgid "LOG_DEBUG" msgstr "LOG_DEBUG" -#: ../../library/logging.handlers.rst:704 +#: ../../library/logging.handlers.rst:715 msgid "``emerg`` or ``panic``" msgstr "``emerg`` 或 ``panic``" -#: ../../library/logging.handlers.rst:704 +#: ../../library/logging.handlers.rst:715 msgid "LOG_EMERG" msgstr "LOG_EMERG" -#: ../../library/logging.handlers.rst:706 +#: ../../library/logging.handlers.rst:717 msgid "``err`` or ``error``" msgstr "``err`` 或 ``error``" -#: ../../library/logging.handlers.rst:706 +#: ../../library/logging.handlers.rst:717 msgid "LOG_ERR" msgstr "LOG_ERR" -#: ../../library/logging.handlers.rst:708 +#: ../../library/logging.handlers.rst:719 msgid "``info``" msgstr "``info``" -#: ../../library/logging.handlers.rst:708 +#: ../../library/logging.handlers.rst:719 msgid "LOG_INFO" msgstr "LOG_INFO" -#: ../../library/logging.handlers.rst:710 +#: ../../library/logging.handlers.rst:721 msgid "``notice``" msgstr "``notice``" -#: ../../library/logging.handlers.rst:710 +#: ../../library/logging.handlers.rst:721 msgid "LOG_NOTICE" msgstr "LOG_NOTICE" -#: ../../library/logging.handlers.rst:712 +#: ../../library/logging.handlers.rst:723 msgid "``warn`` or ``warning``" msgstr "``warn`` 或 ``warning``" -#: ../../library/logging.handlers.rst:712 +#: ../../library/logging.handlers.rst:723 msgid "LOG_WARNING" msgstr "LOG_WARNING" -#: ../../library/logging.handlers.rst:715 +#: ../../library/logging.handlers.rst:726 msgid "**Facilities**" msgstr "" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:731 msgid "``auth``" msgstr "``auth``" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:731 msgid "LOG_AUTH" msgstr "LOG_AUTH" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:733 msgid "``authpriv``" msgstr "``authpriv``" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:733 msgid "LOG_AUTHPRIV" msgstr "LOG_AUTHPRIV" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:735 msgid "``cron``" msgstr "``cron``" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:735 msgid "LOG_CRON" msgstr "LOG_CRON" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:737 msgid "``daemon``" msgstr "``daemon``" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:737 msgid "LOG_DAEMON" msgstr "LOG_DAEMON" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:739 msgid "``ftp``" msgstr "``ftp``" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:739 msgid "LOG_FTP" msgstr "LOG_FTP" -#: ../../library/logging.handlers.rst:730 +#: ../../library/logging.handlers.rst:741 msgid "``kern``" msgstr "``kern``" -#: ../../library/logging.handlers.rst:730 +#: ../../library/logging.handlers.rst:741 msgid "LOG_KERN" msgstr "LOG_KERN" -#: ../../library/logging.handlers.rst:732 +#: ../../library/logging.handlers.rst:743 msgid "``lpr``" msgstr "``lpr``" -#: ../../library/logging.handlers.rst:732 +#: ../../library/logging.handlers.rst:743 msgid "LOG_LPR" msgstr "LOG_LPR" -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:745 msgid "``mail``" msgstr "``mail``" -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:745 msgid "LOG_MAIL" msgstr "LOG_MAIL" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:747 msgid "``news``" msgstr "``news``" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:747 msgid "LOG_NEWS" msgstr "LOG_NEWS" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:749 msgid "``syslog``" msgstr "``syslog``" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:749 msgid "LOG_SYSLOG" msgstr "LOG_SYSLOG" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:751 msgid "``user``" msgstr "``user``" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:751 msgid "LOG_USER" msgstr "LOG_USER" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:753 msgid "``uucp``" msgstr "``uucp``" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:753 msgid "LOG_UUCP" msgstr "LOG_UUCP" -#: ../../library/logging.handlers.rst:744 +#: ../../library/logging.handlers.rst:755 msgid "``local0``" msgstr "``local0``" -#: ../../library/logging.handlers.rst:744 +#: ../../library/logging.handlers.rst:755 msgid "LOG_LOCAL0" msgstr "LOG_LOCAL0" -#: ../../library/logging.handlers.rst:746 +#: ../../library/logging.handlers.rst:757 msgid "``local1``" msgstr "``local1``" -#: ../../library/logging.handlers.rst:746 +#: ../../library/logging.handlers.rst:757 msgid "LOG_LOCAL1" msgstr "LOG_LOCAL1" -#: ../../library/logging.handlers.rst:748 +#: ../../library/logging.handlers.rst:759 msgid "``local2``" msgstr "``local2``" -#: ../../library/logging.handlers.rst:748 +#: ../../library/logging.handlers.rst:759 msgid "LOG_LOCAL2" msgstr "LOG_LOCAL2" -#: ../../library/logging.handlers.rst:750 +#: ../../library/logging.handlers.rst:761 msgid "``local3``" msgstr "``local3``" -#: ../../library/logging.handlers.rst:750 +#: ../../library/logging.handlers.rst:761 msgid "LOG_LOCAL3" msgstr "LOG_LOCAL3" -#: ../../library/logging.handlers.rst:752 +#: ../../library/logging.handlers.rst:763 msgid "``local4``" msgstr "``local4``" -#: ../../library/logging.handlers.rst:752 +#: ../../library/logging.handlers.rst:763 msgid "LOG_LOCAL4" msgstr "LOG_LOCAL4" -#: ../../library/logging.handlers.rst:754 +#: ../../library/logging.handlers.rst:765 msgid "``local5``" msgstr "``local5``" -#: ../../library/logging.handlers.rst:754 +#: ../../library/logging.handlers.rst:765 msgid "LOG_LOCAL5" msgstr "LOG_LOCAL5" -#: ../../library/logging.handlers.rst:756 +#: ../../library/logging.handlers.rst:767 msgid "``local6``" msgstr "``local6``" -#: ../../library/logging.handlers.rst:756 +#: ../../library/logging.handlers.rst:767 msgid "LOG_LOCAL6" msgstr "LOG_LOCAL6" -#: ../../library/logging.handlers.rst:758 +#: ../../library/logging.handlers.rst:769 msgid "``local7``" msgstr "``local7``" -#: ../../library/logging.handlers.rst:758 +#: ../../library/logging.handlers.rst:769 msgid "LOG_LOCAL7" msgstr "LOG_LOCAL7" -#: ../../library/logging.handlers.rst:763 +#: ../../library/logging.handlers.rst:774 msgid "" "Maps a logging level name to a syslog priority name. You may need to " "override this if you are using custom levels, or if the default algorithm is " @@ -1141,11 +1152,11 @@ msgid "" "all other level names to 'warning'." msgstr "" -#: ../../library/logging.handlers.rst:773 +#: ../../library/logging.handlers.rst:784 msgid "NTEventLogHandler" msgstr "NTEventLogHandler" -#: ../../library/logging.handlers.rst:775 +#: ../../library/logging.handlers.rst:786 msgid "" "The :class:`NTEventLogHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a local Windows NT, Windows " @@ -1153,7 +1164,7 @@ msgid "" "Win32 extensions for Python installed." msgstr "" -#: ../../library/logging.handlers.rst:783 +#: ../../library/logging.handlers.rst:794 msgid "" "Returns a new instance of the :class:`NTEventLogHandler` class. The " "*appname* is used to define the application name as it appears in the event " @@ -1169,7 +1180,7 @@ msgid "" "or ``'Security'``, and defaults to ``'Application'``." msgstr "" -#: ../../library/logging.handlers.rst:799 +#: ../../library/logging.handlers.rst:810 msgid "" "At this point, you can remove the application name from the registry as a " "source of event log entries. However, if you do this, you will not be able " @@ -1178,19 +1189,19 @@ msgid "" "not do this." msgstr "" -#: ../../library/logging.handlers.rst:808 +#: ../../library/logging.handlers.rst:819 msgid "" "Determines the message ID, event category and event type, and then logs the " "message in the NT event log." msgstr "" -#: ../../library/logging.handlers.rst:814 +#: ../../library/logging.handlers.rst:825 msgid "" "Returns the event category for the record. Override this if you want to " "specify your own categories. This version returns 0." msgstr "" -#: ../../library/logging.handlers.rst:820 +#: ../../library/logging.handlers.rst:831 msgid "" "Returns the event type for the record. Override this if you want to specify " "your own types. This version does a mapping using the handler's typemap " @@ -1201,7 +1212,7 @@ msgid "" "the handler's *typemap* attribute." msgstr "" -#: ../../library/logging.handlers.rst:831 +#: ../../library/logging.handlers.rst:842 msgid "" "Returns the message ID for the record. If you are using your own messages, " "you could do this by having the *msg* passed to the logger being an ID " @@ -1210,17 +1221,17 @@ msgid "" "message ID in :file:`win32service.pyd`." msgstr "" -#: ../../library/logging.handlers.rst:840 +#: ../../library/logging.handlers.rst:851 msgid "SMTPHandler" msgstr "SMTPHandler" -#: ../../library/logging.handlers.rst:842 +#: ../../library/logging.handlers.rst:853 msgid "" "The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to an email address via SMTP." msgstr "" -#: ../../library/logging.handlers.rst:848 +#: ../../library/logging.handlers.rst:859 msgid "" "Returns a new instance of the :class:`SMTPHandler` class. The instance is " "initialized with the from and to addresses and subject line of the email. " @@ -1231,7 +1242,7 @@ msgid "" "*credentials* argument." msgstr "" -#: ../../library/logging.handlers.rst:855 +#: ../../library/logging.handlers.rst:866 msgid "" "To specify the use of a secure protocol (TLS), pass in a tuple to the " "*secure* argument. This will only be used when authentication credentials " @@ -1241,31 +1252,31 @@ msgid "" "SMTP.starttls` method.)" msgstr "" -#: ../../library/logging.handlers.rst:862 +#: ../../library/logging.handlers.rst:873 msgid "" "A timeout can be specified for communication with the SMTP server using the " "*timeout* argument." msgstr "" -#: ../../library/logging.handlers.rst:865 +#: ../../library/logging.handlers.rst:876 msgid "The *timeout* argument was added." msgstr "新增 *timeout* 引數。" -#: ../../library/logging.handlers.rst:870 +#: ../../library/logging.handlers.rst:881 msgid "Formats the record and sends it to the specified addressees." msgstr "" -#: ../../library/logging.handlers.rst:875 +#: ../../library/logging.handlers.rst:886 msgid "" "If you want to specify a subject line which is record-dependent, override " "this method." msgstr "" -#: ../../library/logging.handlers.rst:881 +#: ../../library/logging.handlers.rst:892 msgid "MemoryHandler" msgstr "MemoryHandler" -#: ../../library/logging.handlers.rst:883 +#: ../../library/logging.handlers.rst:894 msgid "" "The :class:`MemoryHandler` class, located in the :mod:`logging.handlers` " "module, supports buffering of logging records in memory, periodically " @@ -1273,7 +1284,7 @@ msgid "" "buffer is full, or when an event of a certain severity or greater is seen." msgstr "" -#: ../../library/logging.handlers.rst:888 +#: ../../library/logging.handlers.rst:899 msgid "" ":class:`MemoryHandler` is a subclass of the more general :class:" "`BufferingHandler`, which is an abstract class. This buffers logging records " @@ -1282,31 +1293,31 @@ msgid "" "should, then :meth:`flush` is expected to do the flushing." msgstr "" -#: ../../library/logging.handlers.rst:897 +#: ../../library/logging.handlers.rst:908 msgid "" "Initializes the handler with a buffer of the specified capacity. Here, " "*capacity* means the number of logging records buffered." msgstr "" -#: ../../library/logging.handlers.rst:903 +#: ../../library/logging.handlers.rst:914 msgid "" "Append the record to the buffer. If :meth:`shouldFlush` returns true, call :" "meth:`flush` to process the buffer." msgstr "" -#: ../../library/logging.handlers.rst:909 +#: ../../library/logging.handlers.rst:920 msgid "" "You can override this to implement custom flushing behavior. This version " "just zaps the buffer to empty." msgstr "" -#: ../../library/logging.handlers.rst:915 +#: ../../library/logging.handlers.rst:926 msgid "" "Return ``True`` if the buffer is up to capacity. This method can be " "overridden to implement custom flushing strategies." msgstr "" -#: ../../library/logging.handlers.rst:921 +#: ../../library/logging.handlers.rst:932 msgid "" "Returns a new instance of the :class:`MemoryHandler` class. The instance is " "initialized with a buffer size of *capacity* (number of records buffered). " @@ -1318,41 +1329,41 @@ msgid "" "the buffer will occur when the handler is closed." msgstr "" -#: ../../library/logging.handlers.rst:930 +#: ../../library/logging.handlers.rst:941 msgid "The *flushOnClose* parameter was added." msgstr "新增 *flushOnClose* 參數。" -#: ../../library/logging.handlers.rst:936 +#: ../../library/logging.handlers.rst:947 msgid "Calls :meth:`flush`, sets the target to ``None`` and clears the buffer." msgstr "" -#: ../../library/logging.handlers.rst:942 +#: ../../library/logging.handlers.rst:953 msgid "" "For a :class:`MemoryHandler`, flushing means just sending the buffered " "records to the target, if there is one. The buffer is also cleared when this " "happens. Override if you want different behavior." msgstr "" -#: ../../library/logging.handlers.rst:949 +#: ../../library/logging.handlers.rst:960 msgid "Sets the target handler for this handler." msgstr "" -#: ../../library/logging.handlers.rst:954 +#: ../../library/logging.handlers.rst:965 msgid "Checks for buffer full or a record at the *flushLevel* or higher." msgstr "" -#: ../../library/logging.handlers.rst:960 +#: ../../library/logging.handlers.rst:971 msgid "HTTPHandler" msgstr "HTTPHandler" -#: ../../library/logging.handlers.rst:962 +#: ../../library/logging.handlers.rst:973 msgid "" "The :class:`HTTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a web server, using either " "``GET`` or ``POST`` semantics." msgstr "" -#: ../../library/logging.handlers.rst:969 +#: ../../library/logging.handlers.rst:980 msgid "" "Returns a new instance of the :class:`HTTPHandler` class. The *host* can be " "of the form ``host:port``, should you need to use a specific port number. " @@ -1366,11 +1377,11 @@ msgid "" "cleartext across the wire." msgstr "" -#: ../../library/logging.handlers.rst:980 +#: ../../library/logging.handlers.rst:991 msgid "The *context* parameter was added." msgstr "新增 *context* 參數。" -#: ../../library/logging.handlers.rst:985 +#: ../../library/logging.handlers.rst:996 msgid "" "Provides a dictionary, based on ``record``, which is to be URL-encoded and " "sent to the web server. The default implementation just returns ``record." @@ -1379,14 +1390,14 @@ msgid "" "customization of what's sent to the server is required." msgstr "" -#: ../../library/logging.handlers.rst:993 +#: ../../library/logging.handlers.rst:1004 msgid "" "Sends the record to the web server as a URL-encoded dictionary. The :meth:" "`mapLogRecord` method is used to convert the record to the dictionary to be " "sent." msgstr "" -#: ../../library/logging.handlers.rst:997 +#: ../../library/logging.handlers.rst:1008 msgid "" "Since preparing a record for sending it to a web server is not the same as a " "generic formatting operation, using :meth:`~logging.Handler.setFormatter` to " @@ -1396,18 +1407,18 @@ msgid "" "the dictionary in a form suitable for sending to a web server." msgstr "" -#: ../../library/logging.handlers.rst:1010 +#: ../../library/logging.handlers.rst:1021 msgid "QueueHandler" msgstr "QueueHandler" -#: ../../library/logging.handlers.rst:1014 +#: ../../library/logging.handlers.rst:1025 msgid "" "The :class:`QueueHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a queue, such as those " "implemented in the :mod:`queue` or :mod:`multiprocessing` modules." msgstr "" -#: ../../library/logging.handlers.rst:1018 +#: ../../library/logging.handlers.rst:1029 msgid "" "Along with the :class:`QueueListener` class, :class:`QueueHandler` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1417,7 +1428,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1027 +#: ../../library/logging.handlers.rst:1038 msgid "" "Returns a new instance of the :class:`QueueHandler` class. The instance is " "initialized with the queue to send messages to. The *queue* can be any queue-" @@ -1427,14 +1438,14 @@ msgid "" "instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1034 -#: ../../library/logging.handlers.rst:1117 +#: ../../library/logging.handlers.rst:1045 +#: ../../library/logging.handlers.rst:1128 msgid "" "If you are using :mod:`multiprocessing`, you should avoid using :class:" "`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`." msgstr "" -#: ../../library/logging.handlers.rst:1039 +#: ../../library/logging.handlers.rst:1050 msgid "" "Enqueues the result of preparing the LogRecord. Should an exception occur (e." "g. because a bounded queue has filled up), the :meth:`~logging.Handler." @@ -1444,13 +1455,13 @@ msgid "" "raiseExceptions` is ``True``)." msgstr "" -#: ../../library/logging.handlers.rst:1048 +#: ../../library/logging.handlers.rst:1059 msgid "" "Prepares a record for queuing. The object returned by this method is " "enqueued." msgstr "" -#: ../../library/logging.handlers.rst:1051 +#: ../../library/logging.handlers.rst:1062 msgid "" "The base implementation formats the record to merge the message, arguments, " "exception and stack information, if present. It also removes unpickleable " @@ -1460,14 +1471,14 @@ msgid "" "attr:`exc_info` and :attr:`exc_text` attributes to ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1059 +#: ../../library/logging.handlers.rst:1070 msgid "" "You might want to override this method if you want to convert the record to " "a dict or JSON string, or send a modified copy of the record while leaving " "the original intact." msgstr "" -#: ../../library/logging.handlers.rst:1063 +#: ../../library/logging.handlers.rst:1074 msgid "" "The base implementation formats the message with arguments, sets the " "``message`` and ``msg`` attributes to the formatted message and sets the " @@ -1483,18 +1494,18 @@ msgid "" "libraries that you use.)" msgstr "" -#: ../../library/logging.handlers.rst:1079 +#: ../../library/logging.handlers.rst:1090 msgid "" "Enqueues the record on the queue using ``put_nowait()``; you may want to " "override this if you want to use blocking behaviour, or a timeout, or a " "customized queue implementation." msgstr "" -#: ../../library/logging.handlers.rst:1088 +#: ../../library/logging.handlers.rst:1099 msgid "QueueListener" msgstr "QueueListener" -#: ../../library/logging.handlers.rst:1092 +#: ../../library/logging.handlers.rst:1103 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1505,7 +1516,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1100 +#: ../../library/logging.handlers.rst:1111 msgid "" "Along with the :class:`QueueHandler` class, :class:`QueueListener` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1515,7 +1526,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1109 +#: ../../library/logging.handlers.rst:1120 msgid "" "Returns a new instance of the :class:`QueueListener` class. The instance is " "initialized with the queue to send messages to and a list of handlers which " @@ -1526,7 +1537,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1120 +#: ../../library/logging.handlers.rst:1131 msgid "" "If ``respect_handler_level`` is ``True``, a handler's level is respected " "(compared with the level for the message) when deciding whether to pass " @@ -1534,82 +1545,82 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1125 +#: ../../library/logging.handlers.rst:1136 msgid "The ``respect_handler_level`` argument was added." msgstr "新增 ``respect_handler_level`` 引數。" -#: ../../library/logging.handlers.rst:1130 +#: ../../library/logging.handlers.rst:1141 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1132 +#: ../../library/logging.handlers.rst:1143 msgid "" "The base implementation uses ``get()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1138 +#: ../../library/logging.handlers.rst:1149 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1140 +#: ../../library/logging.handlers.rst:1151 msgid "" "This implementation just returns the passed-in record. You may want to " "override this method if you need to do any custom marshalling or " "manipulation of the record before passing it to the handlers." msgstr "" -#: ../../library/logging.handlers.rst:1146 +#: ../../library/logging.handlers.rst:1157 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1148 +#: ../../library/logging.handlers.rst:1159 msgid "" "This just loops through the handlers offering them the record to handle. The " "actual object passed to the handlers is that which is returned from :meth:" "`prepare`." msgstr "" -#: ../../library/logging.handlers.rst:1154 +#: ../../library/logging.handlers.rst:1165 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1156 +#: ../../library/logging.handlers.rst:1167 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1161 +#: ../../library/logging.handlers.rst:1172 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1163 +#: ../../library/logging.handlers.rst:1174 msgid "" "This asks the thread to terminate, and then waits for it to do so. Note that " "if you don't call this before your application exits, there may be some " "records still left on the queue, which won't be processed." msgstr "" -#: ../../library/logging.handlers.rst:1169 +#: ../../library/logging.handlers.rst:1180 msgid "" "Writes a sentinel to the queue to tell the listener to quit. This " "implementation uses ``put_nowait()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1180 +#: ../../library/logging.handlers.rst:1191 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.handlers.rst:1180 +#: ../../library/logging.handlers.rst:1191 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1182 +#: ../../library/logging.handlers.rst:1193 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.handlers.rst:1183 +#: ../../library/logging.handlers.rst:1194 msgid "Configuration API for the logging module." msgstr "" diff --git a/library/lzma.po b/library/lzma.po index c8c89d784c..a2e0a64ac0 100644 --- a/library/lzma.po +++ b/library/lzma.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -383,9 +383,9 @@ msgstr "" #: ../../library/lzma.rst:260 msgid "" -"Attempting to decompress data after the end of stream is reached raises an " -"`EOFError`. Any data found after the end of the stream is ignored and saved " -"in the :attr:`~.unused_data` attribute." +"Attempting to decompress data after the end of stream is reached raises an :" +"exc:`EOFError`. Any data found after the end of the stream is ignored and " +"saved in the :attr:`~.unused_data` attribute." msgstr "" #: ../../library/lzma.rst:264 diff --git a/library/marshal.po b/library/marshal.po index e219dc92e5..ace4774866 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2021-12-15 12:53+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -130,7 +130,7 @@ msgid "" "(see below)." msgstr "*version* 引數指明 ``dump`` 應該使用的資料格式(見下文)。" -#: ../../library/marshal.rst:69 ../../library/marshal.rst:101 +#: ../../library/marshal.rst:8 ../../library/marshal.rst:11 msgid "" "Raises an :ref:`auditing event ` ``marshal.dumps`` with arguments " "``value``, ``version``." @@ -149,7 +149,7 @@ msgstr "" "Python 版本的不相容 marshal 格式),則會引發 :exc:`EOFError`\\ 、\\ :exc:" "`ValueError` 或 :exc:`TypeError`。檔案必須為可讀取的 :term:`binary file`\\ 。" -#: ../../library/marshal.rst:79 +#: ../../library/marshal.rst:6 msgid "" "Raises an :ref:`auditing event ` ``marshal.load`` with no " "arguments." @@ -198,7 +198,7 @@ msgstr "" "`EOFError`\\ 、\\ :exc:`ValueError` 或 :exc:`TypeError`\\ 。輸入中額外的位元" "組串會被忽略。" -#: ../../library/marshal.rst:110 +#: ../../library/marshal.rst:5 msgid "" "Raises an :ref:`auditing event ` ``marshal.loads`` with argument " "``bytes``." diff --git a/library/mmap.po b/library/mmap.po index 12540a806d..1e07afcbe8 100644 --- a/library/mmap.po +++ b/library/mmap.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -119,7 +119,7 @@ msgid "" "`ALLOCATIONGRANULARITY`." msgstr "" -#: ../../library/mmap.rst:83 ../../library/mmap.rst:174 +#: ../../library/mmap.rst:20 ../../library/mmap.rst:87 msgid "" "Raises an :ref:`auditing event ` ``mmap.__new__`` with arguments " "``fileno``, ``length``, ``access``, ``offset``." diff --git a/library/msvcrt.po b/library/msvcrt.po index 799367aff7..0f88d7da3e 100644 --- a/library/msvcrt.po +++ b/library/msvcrt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,7 +65,7 @@ msgid "" "individually." msgstr "" -#: ../../library/msvcrt.rst:45 +#: ../../library/msvcrt.rst:8 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.locking`` with arguments " "``fd``, ``mode``, ``nbytes``." @@ -103,7 +103,7 @@ msgid "" "as a parameter to :func:`os.fdopen` to create a file object." msgstr "" -#: ../../library/msvcrt.rst:82 +#: ../../library/msvcrt.rst:6 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.open_osfhandle`` with " "arguments ``handle``, ``flags``." @@ -115,7 +115,7 @@ msgid "" "if *fd* is not recognized." msgstr "" -#: ../../library/msvcrt.rst:90 +#: ../../library/msvcrt.rst:4 msgid "" "Raises an :ref:`auditing event ` ``msvcrt.get_osfhandle`` with " "argument ``fd``." diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 4e14175634..f8677a3243 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3235,60 +3235,60 @@ msgid "" "problems." msgstr "" -#: ../../library/multiprocessing.rst:2957 +#: ../../library/multiprocessing.rst:2959 msgid "Safe importing of main module" msgstr "" -#: ../../library/multiprocessing.rst:2959 +#: ../../library/multiprocessing.rst:2961 msgid "" "Make sure that the main module can be safely imported by a new Python " "interpreter without causing unintended side effects (such a starting a new " "process)." msgstr "" -#: ../../library/multiprocessing.rst:2963 +#: ../../library/multiprocessing.rst:2965 msgid "" "For example, using the *spawn* or *forkserver* start method running the " "following module would fail with a :exc:`RuntimeError`::" msgstr "" -#: ../../library/multiprocessing.rst:2975 +#: ../../library/multiprocessing.rst:2977 msgid "" "Instead one should protect the \"entry point\" of the program by using ``if " "__name__ == '__main__':`` as follows::" msgstr "" -#: ../../library/multiprocessing.rst:2989 +#: ../../library/multiprocessing.rst:2991 msgid "" "(The ``freeze_support()`` line can be omitted if the program will be run " "normally instead of frozen.)" msgstr "" -#: ../../library/multiprocessing.rst:2992 +#: ../../library/multiprocessing.rst:2994 msgid "" "This allows the newly spawned Python interpreter to safely import the module " "and then run the module's ``foo()`` function." msgstr "" -#: ../../library/multiprocessing.rst:2995 +#: ../../library/multiprocessing.rst:2997 msgid "" "Similar restrictions apply if a pool or manager is created in the main " "module." msgstr "" -#: ../../library/multiprocessing.rst:3002 +#: ../../library/multiprocessing.rst:3004 msgid "Examples" msgstr "範例" -#: ../../library/multiprocessing.rst:3004 +#: ../../library/multiprocessing.rst:3006 msgid "Demonstration of how to create and use customized managers and proxies:" msgstr "" -#: ../../library/multiprocessing.rst:3010 +#: ../../library/multiprocessing.rst:3012 msgid "Using :class:`~multiprocessing.pool.Pool`:" msgstr "" -#: ../../library/multiprocessing.rst:3016 +#: ../../library/multiprocessing.rst:3018 msgid "" "An example showing how to use queues to feed tasks to a collection of worker " "processes and collect the results:" diff --git a/library/nntplib.po b/library/nntplib.po index a9b475e268..d29bd31401 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -83,13 +83,13 @@ msgid "" "close the NNTP connection when done, e.g.:" msgstr "" -#: ../../library/nntplib.rst:99 ../../library/nntplib.rst:131 +#: ../../library/nntplib.rst:13 ../../library/nntplib.rst:24 msgid "" "Raises an :ref:`auditing event ` ``nntplib.connect`` with " "arguments ``self``, ``host``, ``port``." msgstr "" -#: ../../library/nntplib.rst:101 ../../library/nntplib.rst:133 +#: ../../library/nntplib.rst:15 ../../library/nntplib.rst:26 msgid "" "Raises an :ref:`auditing event ` ``nntplib.putline`` with " "arguments ``self``, ``line``." diff --git a/library/os.po b/library/os.po index a0a435532a..add7b9514c 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-16 08:11+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -673,7 +673,7 @@ msgid "" "cause memory leaks. Refer to the system documentation for :c:func:`putenv`." msgstr "" -#: ../../library/os.rst:553 +#: ../../library/os.rst:18 msgid "" "Raises an :ref:`auditing event ` ``os.putenv`` with arguments " "``key``, ``value``." @@ -848,7 +848,7 @@ msgid "" "items of :data:`os.environ`." msgstr "" -#: ../../library/os.rst:753 +#: ../../library/os.rst:12 msgid "" "Raises an :ref:`auditing event ` ``os.unsetenv`` with argument " "``key``." @@ -1008,7 +1008,7 @@ msgid "" "this is equivalent to ``os.chmod(fd, mode)``." msgstr "" -#: ../../library/os.rst:891 ../../library/os.rst:1909 ../../library/os.rst:2003 +#: ../../library/os.rst:5 ../../library/os.rst:6 ../../library/os.rst:38 msgid "" "Raises an :ref:`auditing event ` ``os.chmod`` with arguments " "``path``, ``mode``, ``dir_fd``." @@ -1029,7 +1029,7 @@ msgid "" "`chown`. As of Python 3.3, this is equivalent to ``os.chown(fd, uid, gid)``." msgstr "" -#: ../../library/os.rst:906 ../../library/os.rst:1931 ../../library/os.rst:2016 +#: ../../library/os.rst:5 ../../library/os.rst:6 ../../library/os.rst:11 msgid "" "Raises an :ref:`auditing event ` ``os.chown`` with arguments " "``path``, ``uid``, ``gid``, ``dir_fd``." @@ -1110,7 +1110,7 @@ msgid "" "truncate(fd, length)``." msgstr "" -#: ../../library/os.rst:984 +#: ../../library/os.rst:5 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``fd``, ``length``." @@ -1145,7 +1145,7 @@ msgid "" "specifies the section of the file to lock." msgstr "" -#: ../../library/os.rst:1021 +#: ../../library/os.rst:7 msgid "" "Raises an :ref:`auditing event ` ``os.lockf`` with arguments " "``fd``, ``cmd``, ``len``." @@ -1206,7 +1206,7 @@ msgid "" "` with the *dir_fd* parameter." msgstr "" -#: ../../library/os.rst:1087 +#: ../../library/os.rst:14 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." @@ -1936,7 +1936,7 @@ msgid "" "`FileNotFoundError`, :exc:`PermissionError`, and :exc:`NotADirectoryError`." msgstr "" -#: ../../library/os.rst:1829 ../../library/os.rst:1962 +#: ../../library/os.rst:5 ../../library/os.rst:11 msgid "" "Raises an :ref:`auditing event ` ``os.chdir`` with argument " "``path``." @@ -2007,7 +2007,7 @@ msgid "" "This function can support :ref:`not following symlinks `." msgstr "" -#: ../../library/os.rst:1859 ../../library/os.rst:1988 +#: ../../library/os.rst:5 ../../library/os.rst:19 msgid "" "Raises an :ref:`auditing event ` ``os.chflags`` with arguments " "``path``, ``flags``." @@ -2196,7 +2196,7 @@ msgid "" "`not following symlinks `." msgstr "" -#: ../../library/os.rst:2032 +#: ../../library/os.rst:7 msgid "" "Raises an :ref:`auditing event ` ``os.link`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." @@ -2238,7 +2238,7 @@ msgid "" "`; the file descriptor must refer to a directory." msgstr "" -#: ../../library/os.rst:2062 +#: ../../library/os.rst:15 msgid "" "Raises an :ref:`auditing event ` ``os.listdir`` with argument " "``path``." @@ -2332,7 +2332,7 @@ msgid "" "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: ../../library/os.rst:2139 ../../library/os.rst:2173 +#: ../../library/os.rst:20 ../../library/os.rst:24 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." @@ -2517,8 +2517,7 @@ msgstr "" msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: ../../library/os.rst:2341 ../../library/os.rst:2363 -#: ../../library/os.rst:3150 +#: ../../library/os.rst:6 ../../library/os.rst:12 ../../library/os.rst:14 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." @@ -2570,8 +2569,7 @@ msgid "" "`replace`." msgstr "" -#: ../../library/os.rst:2390 ../../library/os.rst:2411 -#: ../../library/os.rst:2428 +#: ../../library/os.rst:10 ../../library/os.rst:11 ../../library/os.rst:20 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." @@ -2617,7 +2615,7 @@ msgid "" "rmtree` can be used." msgstr "" -#: ../../library/os.rst:2446 +#: ../../library/os.rst:9 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." @@ -2658,7 +2656,7 @@ msgid "" "they will be of type ``str``." msgstr "" -#: ../../library/os.rst:2483 +#: ../../library/os.rst:27 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." @@ -3391,7 +3389,7 @@ msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: ../../library/os.rst:3093 +#: ../../library/os.rst:23 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." @@ -3417,7 +3415,7 @@ msgid "" "bytes in size." msgstr "" -#: ../../library/os.rst:3130 +#: ../../library/os.rst:6 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." @@ -3468,11 +3466,11 @@ msgid "" "func:`~os.stat` call, depending on the resolution with which your operating " "system records access and modification times; see :func:`~os.stat`. The best " "way to preserve exact times is to use the *st_atime_ns* and *st_mtime_ns* " -"fields from the :func:`os.stat` result object with the *ns* parameter to " -"`utime`." +"fields from the :func:`os.stat` result object with the *ns* parameter to :" +"func:`utime`." msgstr "" -#: ../../library/os.rst:3189 +#: ../../library/os.rst:29 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." @@ -3575,7 +3573,7 @@ msgid "" "deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3288 +#: ../../library/os.rst:88 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." @@ -3620,7 +3618,7 @@ msgid "" "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: ../../library/os.rst:3349 +#: ../../library/os.rst:50 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." @@ -3770,7 +3768,7 @@ msgid "" "encoding." msgstr "" -#: ../../library/os.rst:3521 +#: ../../library/os.rst:9 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." @@ -3789,7 +3787,7 @@ msgid "" "the current directory." msgstr "" -#: ../../library/os.rst:3537 +#: ../../library/os.rst:9 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." @@ -3803,7 +3801,7 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: ../../library/os.rst:3553 +#: ../../library/os.rst:9 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." @@ -3827,7 +3825,7 @@ msgid "" "be ignored on some filesystems." msgstr "" -#: ../../library/os.rst:3578 +#: ../../library/os.rst:18 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." @@ -3903,7 +3901,7 @@ msgid "" "DLLs are loaded." msgstr "" -#: ../../library/os.rst:3642 +#: ../../library/os.rst:14 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." @@ -3985,7 +3983,7 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../library/os.rst:3710 +#: ../../library/os.rst:43 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." @@ -4120,7 +4118,7 @@ msgid "" "issues when using ``fork()`` from a thread." msgstr "" -#: ../../library/os.rst:3877 +#: ../../library/os.rst:7 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" @@ -4144,7 +4142,7 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../library/os.rst:3898 +#: ../../library/os.rst:7 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" @@ -4175,7 +4173,7 @@ msgstr "" msgid "See also :func:`signal.pthread_kill`." msgstr "另請參閱 :func:`signal.pthread_kill`\\ 。" -#: ../../library/os.rst:3926 +#: ../../library/os.rst:18 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." @@ -4189,7 +4187,7 @@ msgstr "" msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: ../../library/os.rst:3942 +#: ../../library/os.rst:7 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." @@ -4362,7 +4360,7 @@ msgstr "" #: ../../library/os.rst:4074 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " -"`posix_spawn`. *setsid* requires :c:data:`POSIX_SPAWN_SETSID` or :c:data:" +"``posix_spawn``. *setsid* requires :c:data:`POSIX_SPAWN_SETSID` or :c:data:" "`POSIX_SPAWN_SETSID_NP` flag. Otherwise, :exc:`NotImplementedError` is " "raised." msgstr "" @@ -4392,7 +4390,7 @@ msgid "" "`POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: ../../library/os.rst:4095 ../../library/os.rst:4111 +#: ../../library/os.rst:7 ../../library/os.rst:77 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." @@ -4534,7 +4532,7 @@ msgid "" "are equivalent::" msgstr "" -#: ../../library/os.rst:4215 +#: ../../library/os.rst:54 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." @@ -4635,13 +4633,13 @@ msgid "" "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: ../../library/os.rst:4300 +#: ../../library/os.rst:37 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." msgstr "" -#: ../../library/os.rst:4302 +#: ../../library/os.rst:39 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." @@ -4694,7 +4692,7 @@ msgid "" "code." msgstr "" -#: ../../library/os.rst:4339 +#: ../../library/os.rst:27 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." diff --git a/library/pathlib.po b/library/pathlib.po index d889fa1f07..4721ec5347 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -329,8 +329,8 @@ msgstr "" #: ../../library/pathlib.rst:392 msgid "" "If you want to walk an arbitrary filesystem path upwards, it is recommended " -"to first call :meth:`Path.resolve` so as to resolve symlinks and eliminate `" -"\"..\"` components." +"to first call :meth:`Path.resolve` so as to resolve symlinks and eliminate ``" +"\"..\"`` components." msgstr "" #: ../../library/pathlib.rst:399 @@ -583,7 +583,7 @@ msgid "" "inordinate amount of time." msgstr "" -#: ../../library/pathlib.rst:842 +#: ../../library/pathlib.rst:24 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " "arguments ``self``, ``pattern``." @@ -826,7 +826,7 @@ msgid "" "the given relative *pattern*::" msgstr "" -#: ../../library/pathlib.rst:1135 +#: ../../library/pathlib.rst:11 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " "arguments ``self``, ``pattern``." diff --git a/library/pdb.po b/library/pdb.po index ff48f6c8a4..e33c673406 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -207,7 +207,7 @@ msgstr "" msgid "Example call to enable tracing with *skip*::" msgstr "" -#: ../../library/pdb.rst:183 +#: ../../library/pdb.rst:22 msgid "" "Raises an :ref:`auditing event ` ``pdb.Pdb`` with no arguments." msgstr "" diff --git a/library/pickle.po b/library/pickle.po index 28b59c56f2..84757fc6a0 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -616,7 +616,7 @@ msgid "" "`pickle-restrict` for details." msgstr "" -#: ../../library/pickle.rst:460 +#: ../../library/pickle.rst:10 msgid "" "Raises an :ref:`auditing event ` ``pickle.find_class`` with " "arguments ``module``, ``name``." diff --git a/library/poplib.po b/library/poplib.po index 2ef9edf5a7..a04c8a513d 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -75,13 +75,13 @@ msgid "" "timeout setting will be used)." msgstr "" -#: ../../library/poplib.rst:55 ../../library/poplib.rst:81 +#: ../../library/poplib.rst:7 ../../library/poplib.rst:13 msgid "" "Raises an :ref:`auditing event ` ``poplib.connect`` with arguments " "``self``, ``host``, ``port``." msgstr "" -#: ../../library/poplib.rst:57 ../../library/poplib.rst:83 +#: ../../library/poplib.rst:9 ../../library/poplib.rst:15 msgid "" "Raises an :ref:`auditing event ` ``poplib.putline`` with arguments " "``self``, ``line``." diff --git a/library/pty.po b/library/pty.po index efea201104..9a098648b0 100644 --- a/library/pty.po +++ b/library/pty.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2016-11-19 00:33+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -114,7 +114,7 @@ msgid "" "an exit code." msgstr "" -#: ../../library/pty.rst:77 +#: ../../library/pty.rst:34 msgid "" "Raises an :ref:`auditing event ` ``pty.spawn`` with argument " "``argv``." diff --git a/library/random.po b/library/random.po index a085ddf360..1a372a270c 100644 --- a/library/random.po +++ b/library/random.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-10-16 06:34+0800\n" "Last-Translator: Allen Wu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -770,6 +770,12 @@ msgstr "使用方案" #: ../../library/random.rst:567 msgid "" +"These recipes show how to efficiently make random selections from the " +"combinatoric iterators in the :mod:`itertools` module:" +msgstr "" + +#: ../../library/random.rst:598 +msgid "" "The default :func:`.random` returns multiples of 2⁻⁵³ in the range *0.0 ≤ x " "< 1.0*. All such numbers are evenly spaced and are exactly representable as " "Python floats. However, many other representable floats in that interval " @@ -780,7 +786,7 @@ msgstr "" "均勻分佈的,並且可以完全表示為 Python float。但是,該間隔中的許多其他可表示" "的 float 不是可能的選擇。 例如 ``0.05954861408025609`` 不是 2⁻⁵³ 的整數倍。" -#: ../../library/random.rst:573 +#: ../../library/random.rst:604 msgid "" "The following recipe takes a different approach. All floats in the interval " "are possible selections. The mantissa comes from a uniform distribution of " @@ -792,7 +798,7 @@ msgstr "" "數 < 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現" "頻率是下一個較大指數的一半。" -#: ../../library/random.rst:595 +#: ../../library/random.rst:626 msgid "" "All :ref:`real valued distributions ` in the " "class will use the new method::" @@ -802,7 +808,7 @@ msgstr "" "\n" "::" -#: ../../library/random.rst:604 +#: ../../library/random.rst:635 msgid "" "The recipe is conceptually equivalent to an algorithm that chooses from all " "the multiples of 2⁻¹⁰⁷⁴ in the range *0.0 ≤ x < 1.0*. All such numbers are " @@ -815,7 +821,7 @@ msgstr "" "示的 Python float。(2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math." "ulp(0.0)``)" -#: ../../library/random.rst:613 +#: ../../library/random.rst:644 msgid "" "`Generating Pseudo-random Floating-Point Values `_ a paper by Allen B. Downey describing " diff --git a/library/resource.po b/library/resource.po index 9403c548d8..259ce31fe9 100644 --- a/library/resource.po +++ b/library/resource.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -121,7 +121,7 @@ msgstr "" msgid "VxWorks only supports setting :data:`RLIMIT_NOFILE`." msgstr "" -#: ../../library/resource.rst:94 +#: ../../library/resource.rst:20 msgid "" "Raises an :ref:`auditing event ` ``resource.setrlimit`` with " "arguments ``resource``, ``limits``." @@ -150,7 +150,7 @@ msgid "" "process." msgstr "" -#: ../../library/resource.rst:113 +#: ../../library/resource.rst:15 msgid "" "Raises an :ref:`auditing event ` ``resource.prlimit`` with " "arguments ``pid``, ``resource``, ``limits``." diff --git a/library/select.po b/library/select.po index dc425ac81e..664f3b6ddd 100644 --- a/library/select.po +++ b/library/select.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:09+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -97,7 +97,7 @@ msgstr "" #: ../../library/select.rst:63 msgid "" "*sizehint* informs epoll about the expected number of events to be " -"registered. It must be positive, or `-1` to use the default. It is only " +"registered. It must be positive, or ``-1`` to use the default. It is only " "used on older systems where :c:func:`epoll_create1` is not available; " "otherwise it has no effect (though its value is still checked)." msgstr "" diff --git a/library/shutil.po b/library/shutil.po index f9d05f3d16..448f858a87 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -92,8 +92,7 @@ msgid "" "link will be created instead of copying the file *src* points to." msgstr "" -#: ../../library/shutil.rst:70 ../../library/shutil.rst:177 -#: ../../library/shutil.rst:208 +#: ../../library/shutil.rst:17 ../../library/shutil.rst:18 msgid "" "Raises an :ref:`auditing event ` ``shutil.copyfile`` with " "arguments ``src``, ``dst``." @@ -138,7 +137,7 @@ msgid "" "platform, and it is asked to do so, it will do nothing and return." msgstr "" -#: ../../library/shutil.rst:106 ../../library/shutil.rst:179 +#: ../../library/shutil.rst:11 ../../library/shutil.rst:20 msgid "" "Raises an :ref:`auditing event ` ``shutil.copymode`` with " "arguments ``src``, ``dst``." @@ -201,7 +200,7 @@ msgstr "" msgid "Please see :data:`os.supports_follow_symlinks` for more information." msgstr "更多資訊請見 :data:`os.supports_follow_symlinks`\\ 。" -#: ../../library/shutil.rst:153 ../../library/shutil.rst:210 +#: ../../library/shutil.rst:19 ../../library/shutil.rst:41 msgid "" "Raises an :ref:`auditing event ` ``shutil.copystat`` with " "arguments ``src``, ``dst``." @@ -344,7 +343,7 @@ msgid "" "*src* tree." msgstr "" -#: ../../library/shutil.rst:275 +#: ../../library/shutil.rst:43 msgid "" "Raises an :ref:`auditing event ` ``shutil.copytree`` with " "arguments ``src``, ``dst``." @@ -406,7 +405,7 @@ msgid "" "exc_info`. Exceptions raised by *onerror* will not be caught." msgstr "" -#: ../../library/shutil.rst:327 +#: ../../library/shutil.rst:31 msgid "" "Raises an :ref:`auditing event ` ``shutil.rmtree`` with arguments " "``path``, ``dir_fd``." @@ -467,7 +466,7 @@ msgid "" "the expense of not copying any of the metadata." msgstr "" -#: ../../library/shutil.rst:371 +#: ../../library/shutil.rst:21 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." @@ -516,7 +515,7 @@ msgstr "" msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../library/shutil.rst:412 +#: ../../library/shutil.rst:8 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." @@ -702,7 +701,7 @@ msgstr "" msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:573 +#: ../../library/shutil.rst:32 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." @@ -812,7 +811,7 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:643 +#: ../../library/shutil.rst:13 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." diff --git a/library/signal.po b/library/signal.po index 8c3eb90062..0410cd82c0 100644 --- a/library/signal.po +++ b/library/signal.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -162,7 +162,9 @@ msgstr ":ref:`適用 `:Unix。" msgid "" "See the man page :manpage:`sigprocmask(2)` and :manpage:`pthread_sigmask(3)` " "for further information." -msgstr "更多資訊請見 :manpage:`sigprocmask(2)` 與 :manpage:`pthread_sigmask(3)` 手冊頁。" +msgstr "" +"更多資訊請見 :manpage:`sigprocmask(2)` 與 :manpage:`pthread_sigmask(3)` 手冊" +"頁。" #: ../../library/signal.rst:109 msgid "The variables defined in the :mod:`signal` module are:" @@ -483,7 +485,7 @@ msgid "" "performed; this can be used to check if the target thread is still running." msgstr "" -#: ../../library/signal.rst:431 +#: ../../library/signal.rst:16 msgid "" "Raises an :ref:`auditing event ` ``signal.pthread_kill`` with " "arguments ``thread_id``, ``signalnum``." diff --git a/library/smtplib.po b/library/smtplib.po index 2e34dff3b1..bc30846ae5 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -78,7 +78,7 @@ msgid "" "keyword:`!with` statement exits. E.g.::" msgstr "" -#: ../../library/smtplib.rst:70 +#: ../../library/smtplib.rst:34 msgid "" "Raises an :ref:`auditing event ` ``smtplib.send`` with arguments " "``self``, ``data``." @@ -310,7 +310,7 @@ msgid "" "connection response." msgstr "" -#: ../../library/smtplib.rst:273 +#: ../../library/smtplib.rst:9 msgid "" "Raises an :ref:`auditing event ` ``smtplib.connect`` with " "arguments ``self``, ``host``, ``port``." diff --git a/library/sndhdr.po b/library/sndhdr.po index 790a1ec6bd..c8d756a432 100644 --- a/library/sndhdr.po +++ b/library/sndhdr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-06-11 15:40+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -135,75 +135,75 @@ msgstr "``'hcom'``" msgid "HCOM Files" msgstr "HCOM 檔案" -#: ../../library/sndhdr.rst:72 +#: ../../library/sndhdr.rst:71 msgid "``'sndt'``" msgstr "``'sndt'``" -#: ../../library/sndhdr.rst:72 +#: ../../library/sndhdr.rst:71 msgid "Sndtool Sound Files" msgstr "" -#: ../../library/sndhdr.rst:74 +#: ../../library/sndhdr.rst:73 msgid "``'voc'``" msgstr "``'voc'``" -#: ../../library/sndhdr.rst:74 +#: ../../library/sndhdr.rst:73 msgid "Creative Labs Audio Files" msgstr "" -#: ../../library/sndhdr.rst:76 +#: ../../library/sndhdr.rst:75 msgid "``'wav'``" msgstr "``'wav'``" -#: ../../library/sndhdr.rst:76 +#: ../../library/sndhdr.rst:75 msgid "Waveform Audio File Format Files" msgstr "" -#: ../../library/sndhdr.rst:78 +#: ../../library/sndhdr.rst:77 msgid "``'8svx'``" msgstr "``'8svx'``" -#: ../../library/sndhdr.rst:78 +#: ../../library/sndhdr.rst:77 msgid "8-Bit Sampled Voice Files" msgstr "" -#: ../../library/sndhdr.rst:80 +#: ../../library/sndhdr.rst:79 msgid "``'sb'``" msgstr "``'sb'``" -#: ../../library/sndhdr.rst:80 +#: ../../library/sndhdr.rst:79 msgid "Signed Byte Audio Data Files" msgstr "" -#: ../../library/sndhdr.rst:82 +#: ../../library/sndhdr.rst:81 msgid "``'ub'``" msgstr "``'ub'``" -#: ../../library/sndhdr.rst:82 +#: ../../library/sndhdr.rst:81 msgid "UB Files" msgstr "UB 檔案" -#: ../../library/sndhdr.rst:84 +#: ../../library/sndhdr.rst:83 msgid "``'ul'``" msgstr "``'ul'``" -#: ../../library/sndhdr.rst:84 +#: ../../library/sndhdr.rst:83 msgid "uLAW Audio Files" msgstr "uLAW 音檔" -#: ../../library/sndhdr.rst:89 +#: ../../library/sndhdr.rst:88 msgid "" "A list of functions performing the individual tests. Each function takes " "two arguments: the byte-stream and an open file-like object. When :func:" "`what` is called with a byte-stream, the file-like object will be ``None``." msgstr "" -#: ../../library/sndhdr.rst:93 +#: ../../library/sndhdr.rst:92 msgid "" "The test function should return a string describing the image type if the " "test succeeded, or ``None`` if it failed." msgstr "" -#: ../../library/sndhdr.rst:96 +#: ../../library/sndhdr.rst:95 msgid "Example:" msgstr "範例:" diff --git a/library/socket.po b/library/socket.po index 6e0dff4b2c..c9f51081a8 100644 --- a/library/socket.po +++ b/library/socket.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -768,7 +768,7 @@ msgstr "" msgid "The newly created socket is :ref:`non-inheritable `." msgstr "" -#: ../../library/socket.rst:637 +#: ../../library/socket.rst:22 msgid "" "Raises an :ref:`auditing event ` ``socket.__new__`` with arguments " "``self``, ``family``, ``type``, ``protocol``." @@ -794,7 +794,7 @@ msgstr "" msgid "" "When :const:`SOCK_NONBLOCK` or :const:`SOCK_CLOEXEC` bit flags are applied " "to *type* they are cleared, and :attr:`socket.type` will not reflect them. " -"They are still passed to the underlying system `socket()` call. Therefore," +"They are still passed to the underlying system ``socket()`` call. Therefore," msgstr "" #: ../../library/socket.rst:653 @@ -1004,7 +1004,7 @@ msgid "" "be passed to the :meth:`socket.connect` method." msgstr "" -#: ../../library/socket.rst:848 +#: ../../library/socket.rst:30 msgid "" "Raises an :ref:`auditing event ` ``socket.getaddrinfo`` with " "arguments ``host``, ``port``, ``family``, ``type``, ``protocol``." @@ -1048,7 +1048,7 @@ msgid "" "stack support." msgstr "" -#: ../../library/socket.rst:886 ../../library/socket.rst:902 +#: ../../library/socket.rst:7 ../../library/socket.rst:10 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostbyname`` with " "argument ``hostname``." @@ -1083,7 +1083,7 @@ msgid "" "interpreter is currently executing." msgstr "" -#: ../../library/socket.rst:912 +#: ../../library/socket.rst:4 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostname`` with no " "arguments." @@ -1106,7 +1106,7 @@ msgid "" "`gethostbyaddr` supports both IPv4 and IPv6." msgstr "" -#: ../../library/socket.rst:930 +#: ../../library/socket.rst:9 msgid "" "Raises an :ref:`auditing event ` ``socket.gethostbyaddr`` with " "argument ``ip_address``." @@ -1131,7 +1131,7 @@ msgid "" "For more information about *flags* you can consult :manpage:`getnameinfo(3)`." msgstr "" -#: ../../library/socket.rst:947 +#: ../../library/socket.rst:11 msgid "" "Raises an :ref:`auditing event ` ``socket.getnameinfo`` with " "argument ``sockaddr``." @@ -1153,7 +1153,7 @@ msgid "" "``'udp'``, otherwise any protocol will match." msgstr "" -#: ../../library/socket.rst:969 +#: ../../library/socket.rst:5 msgid "" "Raises an :ref:`auditing event ` ``socket.getservbyname`` with " "arguments ``servicename``, ``protocolname``." @@ -1166,7 +1166,7 @@ msgid "" "``'udp'``, otherwise any protocol will match." msgstr "" -#: ../../library/socket.rst:980 +#: ../../library/socket.rst:5 msgid "" "Raises an :ref:`auditing event ` ``socket.getservbyport`` with " "arguments ``port``, ``protocolname``." @@ -1356,7 +1356,7 @@ msgid "" "you don't have enough rights." msgstr "" -#: ../../library/socket.rst:1167 +#: ../../library/socket.rst:4 msgid "" "Raises an :ref:`auditing event ` ``socket.sethostname`` with " "argument ``name``." @@ -1497,7 +1497,7 @@ msgid "" "format of *address* depends on the address family --- see above.)" msgstr "" -#: ../../library/socket.rst:1304 +#: ../../library/socket.rst:4 msgid "" "Raises an :ref:`auditing event ` ``socket.bind`` with arguments " "``self``, ``address``." @@ -1549,7 +1549,7 @@ msgid "" "(or the exception raised by the signal handler)." msgstr "" -#: ../../library/socket.rst:1345 ../../library/socket.rst:1365 +#: ../../library/socket.rst:8 ../../library/socket.rst:11 msgid "" "Raises an :ref:`auditing event ` ``socket.connect`` with arguments " "``self``, ``address``." @@ -1887,7 +1887,7 @@ msgid "" "address family --- see above.)" msgstr "" -#: ../../library/socket.rst:1720 +#: ../../library/socket.rst:7 msgid "" "Raises an :ref:`auditing event ` ``socket.sendto`` with arguments " "``self``, ``address``." @@ -1925,7 +1925,7 @@ msgstr "" msgid ":ref:`Availability `: Unix, not WASI." msgstr ":ref:`適用 `:Unix、非 WASI。" -#: ../../library/socket.rst:1763 +#: ../../library/socket.rst:34 msgid "" "Raises an :ref:`auditing event ` ``socket.sendmsg`` with arguments " "``self``, ``address``." diff --git a/library/sqlite3.po b/library/sqlite3.po index 41c64624ff..08ecd36d74 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -329,13 +329,13 @@ msgstr "" msgid "Return type" msgstr "" -#: ../../library/sqlite3.rst:326 +#: ../../library/sqlite3.rst:64 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect`` with argument " "``database``." msgstr "" -#: ../../library/sqlite3.rst:327 +#: ../../library/sqlite3.rst:65 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect/handle`` with " "argument ``connection_handle``." @@ -997,7 +997,7 @@ msgid "" "program:`configure`." msgstr "" -#: ../../library/sqlite3.rst:954 +#: ../../library/sqlite3.rst:17 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." @@ -1014,7 +1014,7 @@ msgid "" "method." msgstr "" -#: ../../library/sqlite3.rst:1005 +#: ../../library/sqlite3.rst:5 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." diff --git a/library/statistics.po b/library/statistics.po index 4024ac327c..4a665c6d29 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-27 16:57+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -927,7 +927,7 @@ msgid "" "The relative likelihood is computed as the probability of a sample occurring " "in a narrow range divided by the width of the range (hence the word \"density" "\"). Since the likelihood is relative to other points, its value can be " -"greater than `1.0`." +"greater than ``1.0``." msgstr "" #: ../../library/statistics.rst:820 diff --git a/library/stdtypes.po b/library/stdtypes.po index 82078235e0..8e24d259b5 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-06-12 15:22+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -4589,40 +4589,37 @@ msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " "mutable types (that are compared by value rather than by object identity) " -"may not be used as keys. Numeric types used for keys obey the normal rules " -"for numeric comparison: if two numbers compare equal (such as ``1`` and " -"``1.0``) then they can be used interchangeably to index the same dictionary " -"entry. (Note however, that since computers store floating-point numbers as " -"approximations it is usually unwise to use them as dictionary keys.)" +"may not be used as keys. Values that compare equal (such as ``1``, ``1.0``, " +"and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -#: ../../library/stdtypes.rst:4383 +#: ../../library/stdtypes.rst:4381 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4386 +#: ../../library/stdtypes.rst:4384 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4388 +#: ../../library/stdtypes.rst:4386 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4390 +#: ../../library/stdtypes.rst:4388 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4391 +#: ../../library/stdtypes.rst:4389 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4394 +#: ../../library/stdtypes.rst:4392 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4634,7 +4631,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4404 +#: ../../library/stdtypes.rst:4402 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4642,39 +4639,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4409 +#: ../../library/stdtypes.rst:4407 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4421 +#: ../../library/stdtypes.rst:4419 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4425 +#: ../../library/stdtypes.rst:4423 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4430 +#: ../../library/stdtypes.rst:4428 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4434 +#: ../../library/stdtypes.rst:4432 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4438 +#: ../../library/stdtypes.rst:4436 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4443 +#: ../../library/stdtypes.rst:4441 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4685,51 +4682,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4461 +#: ../../library/stdtypes.rst:4459 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4467 +#: ../../library/stdtypes.rst:4465 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4471 +#: ../../library/stdtypes.rst:4469 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4476 +#: ../../library/stdtypes.rst:4474 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4480 +#: ../../library/stdtypes.rst:4478 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4484 +#: ../../library/stdtypes.rst:4482 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4489 +#: ../../library/stdtypes.rst:4487 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4493 +#: ../../library/stdtypes.rst:4491 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4497 +#: ../../library/stdtypes.rst:4495 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4499 +#: ../../library/stdtypes.rst:4497 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4738,70 +4735,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4507 +#: ../../library/stdtypes.rst:4505 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4513 +#: ../../library/stdtypes.rst:4511 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4518 +#: ../../library/stdtypes.rst:4516 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4523 +#: ../../library/stdtypes.rst:4521 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4529 +#: ../../library/stdtypes.rst:4527 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4532 +#: ../../library/stdtypes.rst:4530 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4536 +#: ../../library/stdtypes.rst:4534 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4542 +#: ../../library/stdtypes.rst:4540 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4549 +#: ../../library/stdtypes.rst:4547 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4555 +#: ../../library/stdtypes.rst:4553 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4558 +#: ../../library/stdtypes.rst:4556 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4809,71 +4806,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4565 +#: ../../library/stdtypes.rst:4563 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4568 +#: ../../library/stdtypes.rst:4566 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4578 +#: ../../library/stdtypes.rst:4576 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4586 +#: ../../library/stdtypes.rst:4584 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4592 +#: ../../library/stdtypes.rst:4590 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4596 +#: ../../library/stdtypes.rst:4594 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4614 +#: ../../library/stdtypes.rst:4612 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4618 +#: ../../library/stdtypes.rst:4616 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4630 +#: ../../library/stdtypes.rst:4628 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4635 +#: ../../library/stdtypes.rst:4633 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4642 +#: ../../library/stdtypes.rst:4640 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4644 +#: ../../library/stdtypes.rst:4642 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4881,23 +4878,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4649 +#: ../../library/stdtypes.rst:4647 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4654 +#: ../../library/stdtypes.rst:4652 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4658 +#: ../../library/stdtypes.rst:4656 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4661 +#: ../../library/stdtypes.rst:4659 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4905,39 +4902,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4666 +#: ../../library/stdtypes.rst:4664 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4669 +#: ../../library/stdtypes.rst:4667 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4674 +#: ../../library/stdtypes.rst:4672 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4679 +#: ../../library/stdtypes.rst:4677 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4682 +#: ../../library/stdtypes.rst:4680 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4687 +#: ../../library/stdtypes.rst:4685 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4692 +#: ../../library/stdtypes.rst:4690 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4947,15 +4944,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4699 +#: ../../library/stdtypes.rst:4697 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4740 +#: ../../library/stdtypes.rst:4738 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4747 +#: ../../library/stdtypes.rst:4745 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4963,7 +4960,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4755 +#: ../../library/stdtypes.rst:4753 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4971,14 +4968,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4760 +#: ../../library/stdtypes.rst:4758 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4764 +#: ../../library/stdtypes.rst:4762 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4988,7 +4985,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4774 +#: ../../library/stdtypes.rst:4772 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4997,7 +4994,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4779 +#: ../../library/stdtypes.rst:4777 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -5008,7 +5005,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4786 +#: ../../library/stdtypes.rst:4784 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -5017,7 +5014,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4792 +#: ../../library/stdtypes.rst:4790 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -5026,7 +5023,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4798 +#: ../../library/stdtypes.rst:4796 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -5036,7 +5033,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4805 +#: ../../library/stdtypes.rst:4803 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -5045,23 +5042,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4813 +#: ../../library/stdtypes.rst:4811 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4818 +#: ../../library/stdtypes.rst:4816 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4825 +#: ../../library/stdtypes.rst:4823 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4831 +#: ../../library/stdtypes.rst:4829 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5071,19 +5068,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4841 +#: ../../library/stdtypes.rst:4839 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4844 +#: ../../library/stdtypes.rst:4842 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4847 +#: ../../library/stdtypes.rst:4845 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5092,7 +5089,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4853 +#: ../../library/stdtypes.rst:4851 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5101,7 +5098,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4859 +#: ../../library/stdtypes.rst:4857 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5109,7 +5106,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4865 +#: ../../library/stdtypes.rst:4863 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5118,21 +5115,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4871 +#: ../../library/stdtypes.rst:4869 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4877 +#: ../../library/stdtypes.rst:4875 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4885 +#: ../../library/stdtypes.rst:4883 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5140,13 +5137,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4893 +#: ../../library/stdtypes.rst:4891 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4901 +#: ../../library/stdtypes.rst:4899 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5155,331 +5152,331 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4909 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4920 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4928 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4936 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4947 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4949 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4952 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4953 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4954 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4955 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4956 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4957 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4958 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4959 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4960 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4961 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4962 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4963 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4964 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4965 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4966 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4967 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4968 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4969 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4970 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4971 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4972 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:4973 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4976 +#: ../../library/stdtypes.rst:4974 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4977 +#: ../../library/stdtypes.rst:4975 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4978 +#: ../../library/stdtypes.rst:4976 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4979 +#: ../../library/stdtypes.rst:4977 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4980 +#: ../../library/stdtypes.rst:4978 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4981 +#: ../../library/stdtypes.rst:4979 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4982 +#: ../../library/stdtypes.rst:4980 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4983 +#: ../../library/stdtypes.rst:4981 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4984 +#: ../../library/stdtypes.rst:4982 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4985 +#: ../../library/stdtypes.rst:4983 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:4984 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4987 +#: ../../library/stdtypes.rst:4985 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4988 +#: ../../library/stdtypes.rst:4986 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4989 +#: ../../library/stdtypes.rst:4987 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4990 +#: ../../library/stdtypes.rst:4988 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4991 +#: ../../library/stdtypes.rst:4989 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4992 +#: ../../library/stdtypes.rst:4990 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4993 +#: ../../library/stdtypes.rst:4991 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4994 +#: ../../library/stdtypes.rst:4992 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4995 +#: ../../library/stdtypes.rst:4993 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4996 +#: ../../library/stdtypes.rst:4994 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4997 +#: ../../library/stdtypes.rst:4995 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4998 +#: ../../library/stdtypes.rst:4996 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4999 +#: ../../library/stdtypes.rst:4997 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:5000 +#: ../../library/stdtypes.rst:4998 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:5001 +#: ../../library/stdtypes.rst:4999 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:5002 +#: ../../library/stdtypes.rst:5000 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:5003 +#: ../../library/stdtypes.rst:5001 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:5004 +#: ../../library/stdtypes.rst:5002 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:5005 +#: ../../library/stdtypes.rst:5003 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:5006 +#: ../../library/stdtypes.rst:5004 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:5007 +#: ../../library/stdtypes.rst:5005 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:5012 +#: ../../library/stdtypes.rst:5010 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:5014 +#: ../../library/stdtypes.rst:5012 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:5018 +#: ../../library/stdtypes.rst:5016 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:5026 +#: ../../library/stdtypes.rst:5024 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5036 +#: ../../library/stdtypes.rst:5034 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5047 +#: ../../library/stdtypes.rst:5045 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:5054 +#: ../../library/stdtypes.rst:5052 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." msgstr "" -#: ../../library/stdtypes.rst:5063 +#: ../../library/stdtypes.rst:5061 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5063 +#: ../../library/stdtypes.rst:5061 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5068 +#: ../../library/stdtypes.rst:5066 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5066 +#: ../../library/stdtypes.rst:5064 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5071 +#: ../../library/stdtypes.rst:5069 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5071 +#: ../../library/stdtypes.rst:5069 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5080 +#: ../../library/stdtypes.rst:5078 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5086 +#: ../../library/stdtypes.rst:5084 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5488,7 +5485,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5091 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5496,76 +5493,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5103 +#: ../../library/stdtypes.rst:5101 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5105 +#: ../../library/stdtypes.rst:5103 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5109 +#: ../../library/stdtypes.rst:5107 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5113 +#: ../../library/stdtypes.rst:5111 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5117 +#: ../../library/stdtypes.rst:5115 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5121 +#: ../../library/stdtypes.rst:5119 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5128 +#: ../../library/stdtypes.rst:5126 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5134 +#: ../../library/stdtypes.rst:5132 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5142 +#: ../../library/stdtypes.rst:5140 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5155 +#: ../../library/stdtypes.rst:5153 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5173 +#: ../../library/stdtypes.rst:5171 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5181 +#: ../../library/stdtypes.rst:5179 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5183 +#: ../../library/stdtypes.rst:5181 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5190 +#: ../../library/stdtypes.rst:5188 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5192 +#: ../../library/stdtypes.rst:5190 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5576,7 +5573,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5199 +#: ../../library/stdtypes.rst:5197 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5587,32 +5584,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5207 +#: ../../library/stdtypes.rst:5205 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5215 +#: ../../library/stdtypes.rst:5213 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5217 +#: ../../library/stdtypes.rst:5215 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5223 +#: ../../library/stdtypes.rst:5221 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5225 +#: ../../library/stdtypes.rst:5223 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5228 +#: ../../library/stdtypes.rst:5226 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5620,15 +5617,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5232 +#: ../../library/stdtypes.rst:5230 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5238 +#: ../../library/stdtypes.rst:5236 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5242 +#: ../../library/stdtypes.rst:5240 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5636,7 +5633,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5247 +#: ../../library/stdtypes.rst:5245 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5648,7 +5645,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5256 +#: ../../library/stdtypes.rst:5254 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5658,15 +5655,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5276 ../../library/stdtypes.rst:5307 +#: ../../library/stdtypes.rst:5274 ../../library/stdtypes.rst:5305 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5284 +#: ../../library/stdtypes.rst:5282 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5290 +#: ../../library/stdtypes.rst:5288 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5676,23 +5673,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5297 +#: ../../library/stdtypes.rst:5295 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5304 +#: ../../library/stdtypes.rst:5302 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5313 +#: ../../library/stdtypes.rst:5311 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5319 +#: ../../library/stdtypes.rst:5317 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5700,30 +5697,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5324 +#: ../../library/stdtypes.rst:5322 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5330 +#: ../../library/stdtypes.rst:5328 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5332 +#: ../../library/stdtypes.rst:5330 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5336 +#: ../../library/stdtypes.rst:5334 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5343 +#: ../../library/stdtypes.rst:5341 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5345 +#: ../../library/stdtypes.rst:5343 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5731,15 +5728,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5350 +#: ../../library/stdtypes.rst:5348 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5356 +#: ../../library/stdtypes.rst:5354 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5358 +#: ../../library/stdtypes.rst:5356 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5747,15 +5744,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5363 +#: ../../library/stdtypes.rst:5361 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5369 +#: ../../library/stdtypes.rst:5367 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5371 +#: ../../library/stdtypes.rst:5369 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5766,81 +5763,81 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5384 +#: ../../library/stdtypes.rst:5382 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5390 +#: ../../library/stdtypes.rst:5388 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5392 +#: ../../library/stdtypes.rst:5390 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5399 +#: ../../library/stdtypes.rst:5397 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5401 +#: ../../library/stdtypes.rst:5399 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5408 +#: ../../library/stdtypes.rst:5406 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5414 +#: ../../library/stdtypes.rst:5412 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5419 +#: ../../library/stdtypes.rst:5417 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5424 +#: ../../library/stdtypes.rst:5422 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5430 +#: ../../library/stdtypes.rst:5428 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5438 +#: ../../library/stdtypes.rst:5436 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5444 +#: ../../library/stdtypes.rst:5442 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5451 +#: ../../library/stdtypes.rst:5449 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5462 +#: ../../library/stdtypes.rst:5460 msgid "Integer string conversion length limitation" msgstr "" -#: ../../library/stdtypes.rst:5464 +#: ../../library/stdtypes.rst:5462 msgid "" "CPython has a global limit for converting between :class:`int` and :class:" "`str` to mitigate denial of service attacks. This limit *only* applies to " @@ -5848,7 +5845,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../library/stdtypes.rst:5469 +#: ../../library/stdtypes.rst:5467 msgid "" "The :class:`int` type in CPython is an abitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -5858,25 +5855,25 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../library/stdtypes.rst:5476 +#: ../../library/stdtypes.rst:5474 msgid "" "Limiting conversion size offers a practical way to avoid `CVE-2020-10735 " "`_." msgstr "" -#: ../../library/stdtypes.rst:5479 +#: ../../library/stdtypes.rst:5477 msgid "" "The limit is applied to the number of digit characters in the input or " "output string when a non-linear conversion algorithm would be involved. " "Underscores and the sign are not counted towards the limit." msgstr "" -#: ../../library/stdtypes.rst:5483 +#: ../../library/stdtypes.rst:5481 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../library/stdtypes.rst:5505 +#: ../../library/stdtypes.rst:5503 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -5884,94 +5881,94 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../library/stdtypes.rst:5510 +#: ../../library/stdtypes.rst:5508 msgid "Verification:" msgstr "" -#: ../../library/stdtypes.rst:5525 +#: ../../library/stdtypes.rst:5523 msgid "Affected APIs" msgstr "" -#: ../../library/stdtypes.rst:5527 +#: ../../library/stdtypes.rst:5525 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../library/stdtypes.rst:5530 +#: ../../library/stdtypes.rst:5528 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../library/stdtypes.rst:5531 +#: ../../library/stdtypes.rst:5529 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../library/stdtypes.rst:5532 +#: ../../library/stdtypes.rst:5530 msgid "``str(integer)``." msgstr "``str(integer)``。" -#: ../../library/stdtypes.rst:5533 +#: ../../library/stdtypes.rst:5531 msgid "``repr(integer)``" msgstr "``repr(integer)``" -#: ../../library/stdtypes.rst:5534 +#: ../../library/stdtypes.rst:5532 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, ``" "\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../library/stdtypes.rst:5537 +#: ../../library/stdtypes.rst:5535 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../library/stdtypes.rst:5539 +#: ../../library/stdtypes.rst:5537 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../library/stdtypes.rst:5540 +#: ../../library/stdtypes.rst:5538 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../library/stdtypes.rst:5541 +#: ../../library/stdtypes.rst:5539 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../library/stdtypes.rst:5542 +#: ../../library/stdtypes.rst:5540 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../library/stdtypes.rst:5543 +#: ../../library/stdtypes.rst:5541 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../library/stdtypes.rst:5544 +#: ../../library/stdtypes.rst:5542 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../library/stdtypes.rst:5547 +#: ../../library/stdtypes.rst:5545 msgid "Configuring the limit" msgstr "" -#: ../../library/stdtypes.rst:5549 +#: ../../library/stdtypes.rst:5547 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" msgstr "" -#: ../../library/stdtypes.rst:5552 +#: ../../library/stdtypes.rst:5550 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " "the limitation." msgstr "" -#: ../../library/stdtypes.rst:5555 +#: ../../library/stdtypes.rst:5553 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../library/stdtypes.rst:5557 +#: ../../library/stdtypes.rst:5555 msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -5980,38 +5977,38 @@ msgid "" "int_info.default_max_str_digits` was used during initilization." msgstr "" -#: ../../library/stdtypes.rst:5563 +#: ../../library/stdtypes.rst:5561 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../library/stdtypes.rst:5566 +#: ../../library/stdtypes.rst:5564 msgid "" ":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " "are a getter and setter for the interpreter-wide limit. Subinterpreters have " "their own limit." msgstr "" -#: ../../library/stdtypes.rst:5570 +#: ../../library/stdtypes.rst:5568 msgid "" "Information about the default and minimum can be found in :attr:`sys." "int_info`:" msgstr "" -#: ../../library/stdtypes.rst:5572 +#: ../../library/stdtypes.rst:5570 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../library/stdtypes.rst:5574 +#: ../../library/stdtypes.rst:5572 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." msgstr "" -#: ../../library/stdtypes.rst:5581 +#: ../../library/stdtypes.rst:5579 msgid "" "Setting a low limit *can* lead to problems. While rare, code exists that " "contains integer constants in decimal in their source that exceed the " @@ -6023,7 +6020,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../library/stdtypes.rst:5590 +#: ../../library/stdtypes.rst:5588 msgid "" "Test your application thoroughly if you use a low limit. Ensure your tests " "run with the limit set early via the environment or flag so that it applies " @@ -6031,11 +6028,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../library/stdtypes.rst:5596 +#: ../../library/stdtypes.rst:5594 msgid "Recommended configuration" msgstr "" -#: ../../library/stdtypes.rst:5598 +#: ../../library/stdtypes.rst:5596 msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -6043,45 +6040,45 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.11." msgstr "" -#: ../../library/stdtypes.rst:5603 +#: ../../library/stdtypes.rst:5601 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:5615 +#: ../../library/stdtypes.rst:5613 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../library/stdtypes.rst:5619 +#: ../../library/stdtypes.rst:5617 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5620 +#: ../../library/stdtypes.rst:5618 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5623 +#: ../../library/stdtypes.rst:5621 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5626 +#: ../../library/stdtypes.rst:5624 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5628 +#: ../../library/stdtypes.rst:5626 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5631 +#: ../../library/stdtypes.rst:5629 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/library/subprocess.po b/library/subprocess.po index 7be8fa22ed..d7d96b75fb 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -861,7 +861,7 @@ msgid "" "waited for. ::" msgstr "" -#: ../../library/subprocess.rst:687 +#: ../../library/subprocess.rst:324 msgid "" "Raises an :ref:`auditing event ` ``subprocess.Popen`` with " "arguments ``executable``, ``args``, ``cwd``, ``env``." @@ -1064,7 +1064,7 @@ msgstr "" msgid "" "On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and " "CTRL_BREAK_EVENT can be sent to processes started with a *creationflags* " -"parameter which includes `CREATE_NEW_PROCESS_GROUP`." +"parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" #: ../../library/subprocess.rst:837 diff --git a/library/sys.po b/library/sys.po index 5bf4e394ac..7bb0f03927 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -57,7 +57,7 @@ msgid "" "terminate the process entirely." msgstr "" -#: ../../library/sys.rst:38 +#: ../../library/sys.rst:11 msgid "" "Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " "arguments." @@ -243,7 +243,7 @@ msgid "" "by the time calling code examines the frame." msgstr "" -#: ../../library/sys.rst:199 +#: ../../library/sys.rst:14 msgid "" "Raises an :ref:`auditing event ` ``sys._current_frames`` with no " "arguments." @@ -261,7 +261,7 @@ msgstr "" msgid "This is most useful for statistical profiling." msgstr "" -#: ../../library/sys.rst:212 +#: ../../library/sys.rst:10 msgid "" "Raises an :ref:`auditing event ` ``sys._current_exceptions`` with " "no arguments." @@ -319,9 +319,9 @@ msgstr "" #: ../../library/sys.rst:253 msgid "" -"If Python is `built in debug mode ` (:option:`configure --with-" -"pydebug option <--with-pydebug>`), it also performs some expensive internal " -"consistency checks." +"If Python is :ref:`built in debug mode ` (:option:`configure --" +"with-pydebug option <--with-pydebug>`), it also performs some expensive " +"internal consistency checks." msgstr "" #: ../../library/sys.rst:261 @@ -436,9 +436,9 @@ msgid "" "files to (and read them from) a parallel directory tree rooted at this " "directory, rather than from ``__pycache__`` directories in the source code " "tree. Any ``__pycache__`` directories in the source code tree will be " -"ignored and new `.pyc` files written within the pycache prefix. Thus if you " -"use :mod:`compileall` as a pre-build step, you must ensure you run it with " -"the same pycache prefix (if any) that you will use at runtime." +"ignored and new ``.pyc`` files written within the pycache prefix. Thus if " +"you use :mod:`compileall` as a pre-build step, you must ensure you run it " +"with the same pycache prefix (if any) that you will use at runtime." msgstr "" #: ../../library/sys.rst:356 @@ -470,7 +470,7 @@ msgid "" "excepthook``." msgstr "" -#: ../../library/sys.rst:377 +#: ../../library/sys.rst:10 msgid "" "Raises an :ref:`auditing event ` ``sys.excepthook`` with arguments " "``hook``, ``type``, ``value``, ``traceback``." @@ -1156,7 +1156,7 @@ msgid "" "stack." msgstr "" -#: ../../library/sys.rst:788 +#: ../../library/sys.rst:6 msgid "" "Raises an :ref:`auditing event ` ``sys._getframe`` with argument " "``frame``." @@ -1271,7 +1271,7 @@ msgstr "新增 *platform_version*" #: ../../library/sys.rst:876 msgid "" "Returns an *asyncgen_hooks* object, which is similar to a :class:" -"`~collections.namedtuple` of the form `(firstiter, finalizer)`, where " +"`~collections.namedtuple` of the form ``(firstiter, finalizer)``, where " "*firstiter* and *finalizer* are expected to be either ``None`` or functions " "which take an :term:`asynchronous generator iterator` as an argument, and " "are used to schedule finalization of an asynchronous generator by an event " @@ -1508,7 +1508,7 @@ msgid "" "`." msgstr "" -#: ../../library/sys.rst:1044 +#: ../../library/sys.rst:7 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with argument ``hook``." @@ -1679,7 +1679,7 @@ msgstr "" #: ../../library/sys.rst:1180 msgid "" "To not prepend this potentially unsafe path, use the :option:`-P` command " -"line option or the :envvar:`PYTHONSAFEPATH` environment variable?" +"line option or the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" #: ../../library/sys.rst:1183 @@ -1936,7 +1936,7 @@ msgid "" "depends on the event type." msgstr "" -#: ../../library/sys.rst:1364 +#: ../../library/sys.rst:21 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." @@ -2146,7 +2146,7 @@ msgstr "" msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../library/sys.rst:1498 +#: ../../library/sys.rst:78 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." @@ -2175,13 +2175,13 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../library/sys.rst:1520 +#: ../../library/sys.rst:7 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" -#: ../../library/sys.rst:1522 +#: ../../library/sys.rst:9 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." @@ -2516,7 +2516,7 @@ msgstr "" msgid "See also :func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../library/sys.rst:1751 +#: ../../library/sys.rst:32 msgid "" "Raises an :ref:`auditing event ` ``sys.unraisablehook`` with " "arguments ``hook``, ``unraisable``." diff --git a/library/syslog.po b/library/syslog.po index b7343c775b..3081f2dbf3 100644 --- a/library/syslog.po +++ b/library/syslog.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -67,7 +67,7 @@ msgid "" "func:`openlog` will be called with no arguments." msgstr "" -#: ../../library/syslog.rst:47 +#: ../../library/syslog.rst:11 msgid "" "Raises an :ref:`auditing event ` ``syslog.syslog`` with arguments " "``priority``, ``message``." @@ -97,7 +97,7 @@ msgid "" "for messages which do not have a facility explicitly encoded." msgstr "" -#: ../../library/syslog.rst:68 +#: ../../library/syslog.rst:12 msgid "" "Raises an :ref:`auditing event ` ``syslog.openlog`` with arguments " "``ident``, ``logoption``, ``facility``." @@ -122,7 +122,7 @@ msgid "" "`openlog` parameters are reset to defaults." msgstr "" -#: ../../library/syslog.rst:84 +#: ../../library/syslog.rst:8 msgid "" "Raises an :ref:`auditing event ` ``syslog.closelog`` with no " "arguments." @@ -138,7 +138,7 @@ msgid "" "and including *pri*." msgstr "" -#: ../../library/syslog.rst:96 +#: ../../library/syslog.rst:8 msgid "" "Raises an :ref:`auditing event ` ``syslog.setlogmask`` with " "argument ``maskpri``." diff --git a/library/telnetlib.po b/library/telnetlib.po index 836c01f2ee..0ce0276564 100644 --- a/library/telnetlib.po +++ b/library/telnetlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-05-22 02:15+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -194,7 +194,7 @@ msgstr "" msgid "Do not try to reopen an already connected instance." msgstr "" -#: ../../library/telnetlib.rst:161 +#: ../../library/telnetlib.rst:8 msgid "" "Raises an :ref:`auditing event ` ``telnetlib.Telnet.open`` with " "arguments ``self``, ``host``, ``port``." @@ -232,7 +232,7 @@ msgid "" "connection is closed." msgstr "" -#: ../../library/telnetlib.rst:198 +#: ../../library/telnetlib.rst:5 msgid "" "Raises an :ref:`auditing event ` ``telnetlib.Telnet.write`` with " "arguments ``self``, ``buffer``." diff --git a/library/tempfile.po b/library/tempfile.po index c11126289e..6c9afc8090 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-06-12 15:17+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -134,8 +134,8 @@ msgid "" msgstr "" "在不是 Posix 或 Cygwin 的平臺上,TemporaryFile 是 NamedTemporaryFile 的別名。" -#: ../../library/tempfile.rst:68 ../../library/tempfile.rst:96 -#: ../../library/tempfile.rst:205 +#: ../../library/tempfile.rst:17 ../../library/tempfile.rst:33 +#: ../../library/tempfile.rst:42 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkstemp`` with " "argument ``fullpath``." @@ -263,7 +263,7 @@ msgstr "" "被引發(:func:`cleanup` 呼叫、退出情境管理器、物件被作為垃圾回收或直譯器關閉" "等)。" -#: ../../library/tempfile.rst:154 ../../library/tempfile.rst:231 +#: ../../library/tempfile.rst:13 ../../library/tempfile.rst:21 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkdtemp`` with " "argument ``fullpath``." diff --git a/library/types.po b/library/types.po index 8db3bad99f..327e5d470d 100644 --- a/library/types.po +++ b/library/types.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -171,7 +171,7 @@ msgid "" "`lambda` expressions." msgstr "" -#: ../../library/types.rst:119 +#: ../../library/types.rst:4 msgid "" "Raises an :ref:`auditing event ` ``function.__new__`` with " "argument ``code``." @@ -205,7 +205,7 @@ msgstr "" msgid "The type for code objects such as returned by :func:`compile`." msgstr "" -#: ../../library/types.rst:153 +#: ../../library/types.rst:5 msgid "" "Raises an :ref:`auditing event ` ``code.__new__`` with arguments " "``code``, ``filename``, ``name``, ``argcount``, ``posonlyargcount``, " diff --git a/library/typing.po b/library/typing.po index ba18ccceff..a707db6ec4 100644 --- a/library/typing.po +++ b/library/typing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -337,7 +337,7 @@ msgid "" msgstr "" #: ../../library/typing.rst:222 ../../library/typing.rst:1164 -#: ../../library/typing.rst:2795 +#: ../../library/typing.rst:2801 msgid "For example::" msgstr "" "舉例來說:\n" @@ -409,7 +409,7 @@ msgstr "" #: ../../library/typing.rst:321 msgid "" "The :class:`Generic` base class defines :meth:`~object.__class_getitem__` so " -"that ``LoggedVar[t]`` is valid as a type::" +"that ``LoggedVar[T]`` is valid as a type::" msgstr "" #: ../../library/typing.rst:330 @@ -657,7 +657,7 @@ msgid "" "``LiteralString``-typed objects is also acceptable as a ``LiteralString``." msgstr "" -#: ../../library/typing.rst:615 ../../library/typing.rst:2437 +#: ../../library/typing.rst:615 ../../library/typing.rst:2443 msgid "Example::" msgstr "" "舉例來說:\n" @@ -786,8 +786,8 @@ msgstr "" #: ../../library/typing.rst:762 msgid "" -":class:`builtins.tuple ` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:768 @@ -892,8 +892,8 @@ msgstr "" #: ../../library/typing.rst:851 msgid "" -":class:`collections.abc.Callable` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:860 @@ -969,8 +969,8 @@ msgstr "" #: ../../library/typing.rst:959 msgid "" -":class:`builtins.type ` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:965 @@ -1024,7 +1024,7 @@ msgid "" "be re-assigned or overridden in a subclass. For example::" msgstr "" -#: ../../library/typing.rst:1031 ../../library/typing.rst:2678 +#: ../../library/typing.rst:1031 ../../library/typing.rst:2684 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." @@ -1767,8 +1767,8 @@ msgstr "" #: ../../library/typing.rst:1898 msgid "" -":class:`builtins.dict ` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:1904 @@ -1784,8 +1784,8 @@ msgstr "" #: ../../library/typing.rst:1919 msgid "" -":class:`builtins.list ` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:1925 @@ -1797,8 +1797,8 @@ msgstr "" #: ../../library/typing.rst:1929 msgid "" -":class:`builtins.set ` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" #: ../../library/typing.rst:1935 @@ -1807,86 +1807,86 @@ msgstr "" #: ../../library/typing.rst:1937 msgid "" -":class:`builtins.frozenset ` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`builtins.frozenset ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1941 +#: ../../library/typing.rst:1942 msgid ":data:`Tuple` is a special form." msgstr "" -#: ../../library/typing.rst:1944 +#: ../../library/typing.rst:1945 msgid "Corresponding to types in :mod:`collections`" msgstr "" -#: ../../library/typing.rst:1948 +#: ../../library/typing.rst:1949 msgid "A generic version of :class:`collections.defaultdict`." msgstr "" -#: ../../library/typing.rst:1952 +#: ../../library/typing.rst:1953 msgid "" -":class:`collections.defaultdict` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.defaultdict` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1958 +#: ../../library/typing.rst:1959 msgid "A generic version of :class:`collections.OrderedDict`." msgstr "" -#: ../../library/typing.rst:1962 +#: ../../library/typing.rst:1963 msgid "" -":class:`collections.OrderedDict` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1968 +#: ../../library/typing.rst:1969 msgid "A generic version of :class:`collections.ChainMap`." msgstr "" -#: ../../library/typing.rst:1973 +#: ../../library/typing.rst:1974 msgid "" -":class:`collections.ChainMap` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1979 +#: ../../library/typing.rst:1980 msgid "A generic version of :class:`collections.Counter`." msgstr "" -#: ../../library/typing.rst:1984 +#: ../../library/typing.rst:1985 msgid "" -":class:`collections.Counter` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:1990 +#: ../../library/typing.rst:1991 msgid "A generic version of :class:`collections.deque`." msgstr "" -#: ../../library/typing.rst:1995 +#: ../../library/typing.rst:1996 msgid "" -":class:`collections.deque` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`collections.deque` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2000 +#: ../../library/typing.rst:2001 msgid "Other concrete types" msgstr "" -#: ../../library/typing.rst:2006 +#: ../../library/typing.rst:2007 msgid "" "Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` and " "``BinaryIO(IO[bytes])`` represent the types of I/O streams such as returned " "by :func:`open`." msgstr "" -#: ../../library/typing.rst:2013 +#: ../../library/typing.rst:2014 msgid "" "The ``typing.io`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:2018 +#: ../../library/typing.rst:2019 msgid "" "These type aliases correspond to the return types from :func:`re.compile` " "and :func:`re.match`. These types (and the corresponding functions) are " @@ -1894,32 +1894,32 @@ msgid "" "``Pattern[bytes]``, ``Match[str]``, or ``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:2028 +#: ../../library/typing.rst:2029 msgid "" "The ``typing.re`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:2029 +#: ../../library/typing.rst:2030 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2035 +#: ../../library/typing.rst:2036 msgid "" "``Text`` is an alias for ``str``. It is provided to supply a forward " "compatible path for Python 2 code: in Python 2, ``Text`` is an alias for " "``unicode``." msgstr "" -#: ../../library/typing.rst:2039 +#: ../../library/typing.rst:2040 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:2047 +#: ../../library/typing.rst:2048 msgid "" "Python 2 is no longer supported, and most type checkers also no longer " "support type checking Python 2 code. Removal of the alias is not currently " @@ -1927,416 +1927,416 @@ msgid "" "wherever possible." msgstr "" -#: ../../library/typing.rst:2054 +#: ../../library/typing.rst:2055 msgid "Abstract Base Classes" msgstr "" -#: ../../library/typing.rst:2057 +#: ../../library/typing.rst:2058 msgid "Corresponding to collections in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:2061 +#: ../../library/typing.rst:2062 msgid "A generic version of :class:`collections.abc.Set`." msgstr "" -#: ../../library/typing.rst:2063 +#: ../../library/typing.rst:2064 msgid "" -":class:`collections.abc.Set` now supports ``[]``. See :pep:`585` and :ref:" -"`types-genericalias`." +":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" +"`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2069 +#: ../../library/typing.rst:2070 msgid "A generic version of :class:`collections.abc.ByteString`." msgstr "" -#: ../../library/typing.rst:2071 +#: ../../library/typing.rst:2072 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview` of byte sequences." msgstr "" -#: ../../library/typing.rst:2074 +#: ../../library/typing.rst:2075 msgid "" "As a shorthand for this type, :class:`bytes` can be used to annotate " "arguments of any of the types mentioned above." msgstr "" -#: ../../library/typing.rst:2077 +#: ../../library/typing.rst:2078 msgid "" -":class:`collections.abc.ByteString` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.ByteString` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2083 +#: ../../library/typing.rst:2084 msgid "A generic version of :class:`collections.abc.Collection`" msgstr "" -#: ../../library/typing.rst:2087 +#: ../../library/typing.rst:2088 msgid "" -":class:`collections.abc.Collection` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2093 +#: ../../library/typing.rst:2094 msgid "A generic version of :class:`collections.abc.Container`." msgstr "" -#: ../../library/typing.rst:2095 +#: ../../library/typing.rst:2096 msgid "" -":class:`collections.abc.Container` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Container` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2101 +#: ../../library/typing.rst:2102 msgid "A generic version of :class:`collections.abc.ItemsView`." msgstr "" -#: ../../library/typing.rst:2103 +#: ../../library/typing.rst:2104 msgid "" -":class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2109 +#: ../../library/typing.rst:2110 msgid "A generic version of :class:`collections.abc.KeysView`." msgstr "" -#: ../../library/typing.rst:2111 +#: ../../library/typing.rst:2112 msgid "" -":class:`collections.abc.KeysView` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2117 +#: ../../library/typing.rst:2118 msgid "" "A generic version of :class:`collections.abc.Mapping`. This type can be used " "as follows::" msgstr "" -#: ../../library/typing.rst:2123 +#: ../../library/typing.rst:2124 msgid "" -":class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2129 +#: ../../library/typing.rst:2130 msgid "A generic version of :class:`collections.abc.MappingView`." msgstr "" -#: ../../library/typing.rst:2131 +#: ../../library/typing.rst:2132 msgid "" -":class:`collections.abc.MappingView` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.MappingView` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2137 +#: ../../library/typing.rst:2138 msgid "A generic version of :class:`collections.abc.MutableMapping`." msgstr "" -#: ../../library/typing.rst:2139 +#: ../../library/typing.rst:2140 msgid "" -":class:`collections.abc.MutableMapping` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2145 +#: ../../library/typing.rst:2147 msgid "A generic version of :class:`collections.abc.MutableSequence`." msgstr "" -#: ../../library/typing.rst:2147 +#: ../../library/typing.rst:2149 msgid "" -":class:`collections.abc.MutableSequence` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2153 +#: ../../library/typing.rst:2156 msgid "A generic version of :class:`collections.abc.MutableSet`." msgstr "" -#: ../../library/typing.rst:2155 +#: ../../library/typing.rst:2158 msgid "" -":class:`collections.abc.MutableSet` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2161 +#: ../../library/typing.rst:2164 msgid "A generic version of :class:`collections.abc.Sequence`." msgstr "" -#: ../../library/typing.rst:2163 +#: ../../library/typing.rst:2166 msgid "" -":class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2169 +#: ../../library/typing.rst:2172 msgid "A generic version of :class:`collections.abc.ValuesView`." msgstr "" -#: ../../library/typing.rst:2171 +#: ../../library/typing.rst:2174 msgid "" -":class:`collections.abc.ValuesView` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2176 +#: ../../library/typing.rst:2179 msgid "Corresponding to other types in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:2180 +#: ../../library/typing.rst:2183 msgid "A generic version of :class:`collections.abc.Iterable`." msgstr "" -#: ../../library/typing.rst:2182 +#: ../../library/typing.rst:2185 msgid "" -":class:`collections.abc.Iterable` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2188 +#: ../../library/typing.rst:2191 msgid "A generic version of :class:`collections.abc.Iterator`." msgstr "" -#: ../../library/typing.rst:2190 +#: ../../library/typing.rst:2193 msgid "" -":class:`collections.abc.Iterator` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2196 +#: ../../library/typing.rst:2199 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" -#: ../../library/typing.rst:2205 +#: ../../library/typing.rst:2208 msgid "" "Note that unlike many other generics in the typing module, the ``SendType`` " "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" -#: ../../library/typing.rst:2209 +#: ../../library/typing.rst:2212 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:2217 +#: ../../library/typing.rst:2220 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:2225 +#: ../../library/typing.rst:2228 msgid "" -":class:`collections.abc.Generator` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2231 +#: ../../library/typing.rst:2234 msgid "An alias to :class:`collections.abc.Hashable`." msgstr "" -#: ../../library/typing.rst:2235 +#: ../../library/typing.rst:2238 msgid "A generic version of :class:`collections.abc.Reversible`." msgstr "" -#: ../../library/typing.rst:2237 +#: ../../library/typing.rst:2240 msgid "" -":class:`collections.abc.Reversible` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2243 +#: ../../library/typing.rst:2246 msgid "An alias to :class:`collections.abc.Sized`." msgstr "" -#: ../../library/typing.rst:2246 +#: ../../library/typing.rst:2249 msgid "Asynchronous programming" msgstr "" -#: ../../library/typing.rst:2250 +#: ../../library/typing.rst:2253 msgid "" "A generic version of :class:`collections.abc.Coroutine`. The variance and " "order of type variables correspond to those of :class:`Generator`, for " "example::" msgstr "" -#: ../../library/typing.rst:2262 +#: ../../library/typing.rst:2265 msgid "" -":class:`collections.abc.Coroutine` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2268 +#: ../../library/typing.rst:2271 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:2277 +#: ../../library/typing.rst:2280 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:2281 +#: ../../library/typing.rst:2284 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:2289 +#: ../../library/typing.rst:2292 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:2299 +#: ../../library/typing.rst:2302 msgid "" -":class:`collections.abc.AsyncGenerator` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2305 +#: ../../library/typing.rst:2309 msgid "A generic version of :class:`collections.abc.AsyncIterable`." msgstr "" -#: ../../library/typing.rst:2309 +#: ../../library/typing.rst:2313 msgid "" -":class:`collections.abc.AsyncIterable` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2315 +#: ../../library/typing.rst:2319 msgid "A generic version of :class:`collections.abc.AsyncIterator`." msgstr "" -#: ../../library/typing.rst:2319 +#: ../../library/typing.rst:2323 msgid "" -":class:`collections.abc.AsyncIterator` now supports ``[]``. See :pep:`585` " -"and :ref:`types-genericalias`." +":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2325 +#: ../../library/typing.rst:2329 msgid "A generic version of :class:`collections.abc.Awaitable`." msgstr "" -#: ../../library/typing.rst:2329 +#: ../../library/typing.rst:2333 msgid "" -":class:`collections.abc.Awaitable` now supports ``[]``. See :pep:`585` and :" -"ref:`types-genericalias`." +":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" +"pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2335 +#: ../../library/typing.rst:2339 msgid "Context manager types" msgstr "" -#: ../../library/typing.rst:2339 +#: ../../library/typing.rst:2343 msgid "A generic version of :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:2344 +#: ../../library/typing.rst:2348 msgid "" -":class:`contextlib.AbstractContextManager` now supports ``[]``. See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`contextlib.AbstractContextManager` now supports subscripting " +"(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2350 +#: ../../library/typing.rst:2355 msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:2355 +#: ../../library/typing.rst:2360 msgid "" -":class:`contextlib.AbstractAsyncContextManager` now supports ``[]``. See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " +"(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:2360 +#: ../../library/typing.rst:2366 msgid "Protocols" msgstr "" -#: ../../library/typing.rst:2362 +#: ../../library/typing.rst:2368 msgid "These protocols are decorated with :func:`runtime_checkable`." msgstr "" -#: ../../library/typing.rst:2366 +#: ../../library/typing.rst:2372 msgid "" "An ABC with one abstract method ``__abs__`` that is covariant in its return " "type." msgstr "" -#: ../../library/typing.rst:2371 +#: ../../library/typing.rst:2377 msgid "An ABC with one abstract method ``__bytes__``." msgstr "" -#: ../../library/typing.rst:2375 +#: ../../library/typing.rst:2381 msgid "An ABC with one abstract method ``__complex__``." msgstr "" -#: ../../library/typing.rst:2379 +#: ../../library/typing.rst:2385 msgid "An ABC with one abstract method ``__float__``." msgstr "" -#: ../../library/typing.rst:2383 +#: ../../library/typing.rst:2389 msgid "An ABC with one abstract method ``__index__``." msgstr "" -#: ../../library/typing.rst:2389 +#: ../../library/typing.rst:2395 msgid "An ABC with one abstract method ``__int__``." msgstr "" -#: ../../library/typing.rst:2393 +#: ../../library/typing.rst:2399 msgid "" "An ABC with one abstract method ``__round__`` that is covariant in its " "return type." msgstr "" -#: ../../library/typing.rst:2397 +#: ../../library/typing.rst:2403 msgid "Functions and decorators" msgstr "函式與裝飾器" -#: ../../library/typing.rst:2401 +#: ../../library/typing.rst:2407 msgid "Cast a value to a type." msgstr "" -#: ../../library/typing.rst:2403 +#: ../../library/typing.rst:2409 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:2410 +#: ../../library/typing.rst:2416 msgid "" "Ask a static type checker to confirm that *val* has an inferred type of " "*typ*." msgstr "" -#: ../../library/typing.rst:2412 +#: ../../library/typing.rst:2418 msgid "" "When the type checker encounters a call to ``assert_type()``, it emits an " "error if the value is not of the specified type::" msgstr "" -#: ../../library/typing.rst:2419 +#: ../../library/typing.rst:2425 msgid "" "At runtime this returns the first argument unchanged with no side effects." msgstr "" -#: ../../library/typing.rst:2421 +#: ../../library/typing.rst:2427 msgid "" "This function is useful for ensuring the type checker's understanding of a " "script is in line with the developer's intentions::" msgstr "" -#: ../../library/typing.rst:2435 +#: ../../library/typing.rst:2441 msgid "" "Ask a static type checker to confirm that a line of code is unreachable." msgstr "" -#: ../../library/typing.rst:2448 +#: ../../library/typing.rst:2454 msgid "" "Here, the annotations allow the type checker to infer that the last case can " "never execute, because ``arg`` is either an :class:`int` or a :class:`str`, " @@ -2349,53 +2349,53 @@ msgid "" "bottom type, :data:`Never`, and nothing else." msgstr "" -#: ../../library/typing.rst:2460 +#: ../../library/typing.rst:2466 msgid "At runtime, this throws an exception when called." msgstr "" -#: ../../library/typing.rst:2463 +#: ../../library/typing.rst:2469 msgid "" "`Unreachable Code and Exhaustiveness Checking `__ has more information about " "exhaustiveness checking with static typing." msgstr "" -#: ../../library/typing.rst:2471 +#: ../../library/typing.rst:2477 msgid "Reveal the inferred static type of an expression." msgstr "" -#: ../../library/typing.rst:2473 +#: ../../library/typing.rst:2479 msgid "" "When a static type checker encounters a call to this function, it emits a " "diagnostic with the type of the argument. For example::" msgstr "" -#: ../../library/typing.rst:2479 +#: ../../library/typing.rst:2485 msgid "" "This can be useful when you want to debug how your type checker handles a " "particular piece of code." msgstr "" -#: ../../library/typing.rst:2482 +#: ../../library/typing.rst:2488 msgid "" "The function returns its argument unchanged, which allows using it within an " "expression::" msgstr "" -#: ../../library/typing.rst:2487 +#: ../../library/typing.rst:2493 msgid "" "Most type checkers support ``reveal_type()`` anywhere, even if the name is " "not imported from ``typing``. Importing the name from ``typing`` allows your " "code to run without runtime errors and communicates intent more clearly." msgstr "" -#: ../../library/typing.rst:2492 +#: ../../library/typing.rst:2498 msgid "" "At runtime, this function prints the runtime type of its argument to stderr " "and returns it unchanged::" msgstr "" -#: ../../library/typing.rst:2502 +#: ../../library/typing.rst:2508 msgid "" ":data:`~typing.dataclass_transform` may be used to decorate a class, " "metaclass, or a function that is itself a decorator. The presence of " @@ -2404,19 +2404,19 @@ msgid "" "`dataclasses.dataclass`-like behaviors." msgstr "" -#: ../../library/typing.rst:2508 +#: ../../library/typing.rst:2514 msgid "Example usage with a decorator function::" msgstr "" -#: ../../library/typing.rst:2522 +#: ../../library/typing.rst:2528 msgid "On a base class::" msgstr "" -#: ../../library/typing.rst:2531 +#: ../../library/typing.rst:2537 msgid "On a metaclass::" msgstr "" -#: ../../library/typing.rst:2542 +#: ../../library/typing.rst:2548 msgid "" "The ``CustomerModel`` classes defined above will be treated by type checkers " "similarly to classes created with :func:`@dataclasses.dataclass `-decorated definitions for " "*func*. *func* is the function object for the implementation of the " @@ -2562,25 +2562,25 @@ msgid "" "returns an empty sequence." msgstr "" -#: ../../library/typing.rst:2644 +#: ../../library/typing.rst:2650 msgid "" "``get_overloads()`` can be used for introspecting an overloaded function at " "runtime." msgstr "" -#: ../../library/typing.rst:2652 +#: ../../library/typing.rst:2658 msgid "" "Clear all registered overloads in the internal registry. This can be used to " "reclaim the memory used by the registry." msgstr "" -#: ../../library/typing.rst:2660 +#: ../../library/typing.rst:2666 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:2683 +#: ../../library/typing.rst:2689 msgid "" "The decorator will now set the ``__final__`` attribute to ``True`` on the " "decorated object. Thus, a check like ``if getattr(obj, \"__final__\", " @@ -2590,59 +2590,59 @@ msgid "" "exception." msgstr "" -#: ../../library/typing.rst:2694 +#: ../../library/typing.rst:2700 msgid "Decorator to indicate that annotations are not type hints." msgstr "" -#: ../../library/typing.rst:2696 +#: ../../library/typing.rst:2702 msgid "" "This works as class or function :term:`decorator`. With a class, it applies " "recursively to all methods and classes defined in that class (but not to " "methods defined in its superclasses or subclasses)." msgstr "" -#: ../../library/typing.rst:2700 +#: ../../library/typing.rst:2706 msgid "This mutates the function(s) in place." msgstr "" -#: ../../library/typing.rst:2704 +#: ../../library/typing.rst:2710 msgid "Decorator to give another decorator the :func:`no_type_check` effect." msgstr "" -#: ../../library/typing.rst:2706 +#: ../../library/typing.rst:2712 msgid "" "This wraps the decorator with something that wraps the decorated function " "in :func:`no_type_check`." msgstr "" -#: ../../library/typing.rst:2711 +#: ../../library/typing.rst:2717 msgid "Decorator to mark a class or function to be unavailable at runtime." msgstr "" -#: ../../library/typing.rst:2713 +#: ../../library/typing.rst:2719 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:2724 +#: ../../library/typing.rst:2730 msgid "" "Note that returning instances of private classes is not recommended. It is " "usually preferable to make such classes public." msgstr "" -#: ../../library/typing.rst:2728 +#: ../../library/typing.rst:2734 msgid "Introspection helpers" msgstr "" -#: ../../library/typing.rst:2732 +#: ../../library/typing.rst:2738 msgid "" "Return a dictionary containing type hints for a function, method, module or " "class object." msgstr "" -#: ../../library/typing.rst:2735 +#: ../../library/typing.rst:2741 msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " @@ -2651,36 +2651,36 @@ msgid "" "__mro__`` in reverse order." msgstr "" -#: ../../library/typing.rst:2741 +#: ../../library/typing.rst:2747 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:2756 +#: ../../library/typing.rst:2762 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:2761 +#: ../../library/typing.rst:2767 msgid "Added ``include_extras`` parameter as part of :pep:`593`." msgstr "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。" -#: ../../library/typing.rst:2764 +#: ../../library/typing.rst:2770 msgid "" "Previously, ``Optional[t]`` was added for function and method annotations if " "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" -#: ../../library/typing.rst:2772 +#: ../../library/typing.rst:2778 msgid "Provide basic introspection for generic types and special typing forms." msgstr "" -#: ../../library/typing.rst:2774 +#: ../../library/typing.rst:2780 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:" @@ -2691,11 +2691,11 @@ msgid "" "and ``()`` correspondingly. Examples::" msgstr "" -#: ../../library/typing.rst:2793 +#: ../../library/typing.rst:2799 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2808 +#: ../../library/typing.rst:2814 msgid "" "A class used for internal typing representation of string forward " "references. For example, ``List[\"SomeClass\"]`` is implicitly transformed " @@ -2703,24 +2703,24 @@ msgid "" "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2814 +#: ../../library/typing.rst:2820 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:2821 +#: ../../library/typing.rst:2827 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:2825 +#: ../../library/typing.rst:2831 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:2834 +#: ../../library/typing.rst:2840 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2728,7 +2728,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:2841 +#: ../../library/typing.rst:2847 msgid "" "If ``from __future__ import annotations`` is used, annotations are not " "evaluated at function definition time. Instead, they are stored as strings " @@ -2736,11 +2736,11 @@ msgid "" "annotation (see :pep:`563`)." msgstr "" -#: ../../library/typing.rst:2850 +#: ../../library/typing.rst:2856 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:2852 +#: ../../library/typing.rst:2858 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -2748,62 +2748,62 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:2857 +#: ../../library/typing.rst:2863 msgid "Feature" msgstr "" -#: ../../library/typing.rst:2857 +#: ../../library/typing.rst:2863 msgid "Deprecated in" msgstr "" -#: ../../library/typing.rst:2857 +#: ../../library/typing.rst:2863 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:2857 +#: ../../library/typing.rst:2863 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:2859 +#: ../../library/typing.rst:2865 msgid "``typing.io`` and ``typing.re`` submodules" msgstr "" -#: ../../library/typing.rst:2859 +#: ../../library/typing.rst:2865 msgid "3.8" msgstr "" -#: ../../library/typing.rst:2859 +#: ../../library/typing.rst:2865 msgid "3.12" msgstr "" -#: ../../library/typing.rst:2859 +#: ../../library/typing.rst:2865 msgid ":issue:`38291`" msgstr "" -#: ../../library/typing.rst:2862 +#: ../../library/typing.rst:2868 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:2862 +#: ../../library/typing.rst:2868 msgid "3.9" msgstr "" -#: ../../library/typing.rst:2862 ../../library/typing.rst:2865 +#: ../../library/typing.rst:2868 ../../library/typing.rst:2871 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:2862 +#: ../../library/typing.rst:2868 msgid ":pep:`585`" msgstr "" -#: ../../library/typing.rst:2865 +#: ../../library/typing.rst:2871 msgid "``typing.Text``" msgstr "" -#: ../../library/typing.rst:2865 +#: ../../library/typing.rst:2871 msgid "3.11" msgstr "" -#: ../../library/typing.rst:2865 +#: ../../library/typing.rst:2871 msgid ":gh:`92332`" msgstr "" diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index 34ae6879f1..cd4698242d 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2016-11-19 00:35+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -902,7 +902,7 @@ msgid "" "import. Importing fetches an *object* from the :data:`sys.modules` " "dictionary. Note that it fetches an *object*, which need not be a module. " "Importing a module for the first time results in a module object being put " -"in `sys.modules`, so usually when you import something you get a module " +"in ``sys.modules``, so usually when you import something you get a module " "back. This need not be the case however." msgstr "" diff --git a/library/urllib.request.po b/library/urllib.request.po index e047504dbd..fdfc0fa2a1 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-04-21 17:59+0800\n" "Last-Translator: Jordan Su \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -194,7 +194,7 @@ msgstr "" "的處理,以往是透過傳遞 dictionary(字典)參數給 ``urllib.urlopen`` 來取得的," "現在則可以透過 :class:`ProxyHandler` 物件來取得。" -#: ../../library/urllib.request.rst:102 +#: ../../library/urllib.request.rst:61 msgid "" "Raises an :ref:`auditing event ` ``urllib.Request`` with arguments " "``fullurl``, ``data``, ``headers``, ``method``." diff --git a/library/venv.po b/library/venv.po index b4fbf159ce..54a73aae0b 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -26,22 +26,30 @@ msgstr "" msgid "**Source code:** :source:`Lib/venv/`" msgstr "**原始碼:**\\ :source:`Lib/venv/`" -#: ../../library/venv.rst:18 +#: ../../library/venv.rst:21 msgid "" -"The :mod:`venv` module provides support for creating lightweight \"virtual " -"environments\" with their own site directories, optionally isolated from " -"system site directories. Each virtual environment has its own Python binary " -"(which matches the version of the binary that was used to create this " -"environment) and can have its own independent set of installed Python " -"packages in its site directories." +"The :mod:`!venv` module supports creating lightweight \"virtual environments" +"\", each with their own independent set of Python packages installed in " +"their :mod:`site` directories. A virtual environment is created on top of an " +"existing Python installation, known as the virtual environment's \"base\" " +"Python, and may optionally be isolated from the packages in the base " +"environment, so only those explicitly installed in the virtual environment " +"are available." msgstr "" -#: ../../library/venv.rst:25 -msgid "See :pep:`405` for more information about Python virtual environments." -msgstr "更多關於 Python 虛擬環境的資訊請見 :pep:`405`\\ 。" - #: ../../library/venv.rst:29 msgid "" +"When used from within a virtual environment, common installation tools such " +"as `pip`_ will install Python packages into a virtual environment without " +"needing to be told to do so explicitly." +msgstr "" + +#: ../../library/venv.rst:33 +msgid "See :pep:`405` for more background on Python virtual environments." +msgstr "更多關於 Python 虛擬環境的背景資訊請見 :pep:`405`\\ 。" + +#: ../../library/venv.rst:37 +msgid "" "`Python Packaging User Guide: Creating and using virtual environments " "`__" @@ -58,7 +66,7 @@ msgid "" "more information." msgstr "" -#: ../../library/venv.rst:35 +#: ../../library/venv.rst:43 msgid "Creating virtual environments" msgstr "" @@ -85,8 +93,7 @@ msgstr "" #: ../../using/venv-create.inc:17 msgid "" "``pyvenv`` was the recommended tool for creating virtual environments for " -"Python 3.3 and 3.4, and is `deprecated in Python 3.6 `_." +"Python 3.3 and 3.4, and is :ref:`deprecated in Python 3.6 `." msgstr "" #: ../../using/venv-create.inc:22 @@ -171,180 +178,135 @@ msgid "" "provided path." msgstr "" -#: ../../using/venv-create.inc:108 +#: ../../library/venv.rst:50 +msgid "How venvs work" +msgstr "" + +#: ../../library/venv.rst:52 +msgid "" +"When a Python interpreter is running from a virtual environment, :data:`sys." +"prefix` and :data:`sys.exec_prefix` point to the directories of the virtual " +"environment, whereas :data:`sys.base_prefix` and :data:`sys." +"base_exec_prefix` point to those of the base Python used to create the " +"environment. It is sufficient to check ``sys.prefix == sys.base_prefix`` to " +"determine if the current interpreter is running from a virtual environment." +msgstr "" + +#: ../../library/venv.rst:61 msgid "" -"Once a virtual environment has been created, it can be \"activated\" using a " -"script in the virtual environment's binary directory. The invocation of the " -"script is platform-specific (`` must be replaced by the path of the " -"directory containing the virtual environment):" +"A virtual environment may be \"activated\" using a script in its binary " +"directory (``bin`` on POSIX; ``Scripts`` on Windows). This will prepend that " +"directory to your :envvar:`!PATH`, so that running :program:`!python` will " +"invoke the environment's Python interpreter and you can run installed " +"scripts without having to use their full path. The invocation of the " +"activation script is platform-specific (:samp:`{}` must be replaced by " +"the path to the directory containing the virtual environment):" msgstr "" -#: ../../using/venv-create.inc:114 +#: ../../library/venv.rst:71 msgid "Platform" msgstr "平台" -#: ../../using/venv-create.inc:114 +#: ../../library/venv.rst:71 msgid "Shell" msgstr "" -#: ../../using/venv-create.inc:114 +#: ../../library/venv.rst:71 msgid "Command to activate virtual environment" msgstr "" -#: ../../using/venv-create.inc:116 +#: ../../library/venv.rst:73 msgid "POSIX" msgstr "POSIX" -#: ../../using/venv-create.inc:116 +#: ../../library/venv.rst:73 msgid "bash/zsh" msgstr "bash/zsh" -#: ../../using/venv-create.inc:116 -msgid "$ source /bin/activate" -msgstr "$ source /bin/activate" +#: ../../library/venv.rst:73 +msgid ":samp:`$ source {}/bin/activate`" +msgstr ":samp:`$ source {}/bin/activate`" -#: ../../using/venv-create.inc:118 +#: ../../library/venv.rst:75 msgid "fish" msgstr "fish" -#: ../../using/venv-create.inc:118 -msgid "$ source /bin/activate.fish" -msgstr "$ source /bin/activate.fish" +#: ../../library/venv.rst:75 +msgid ":samp:`$ source {}/bin/activate.fish`" +msgstr ":samp:`$ source {}/bin/activate.fish`" -#: ../../using/venv-create.inc:120 +#: ../../library/venv.rst:77 msgid "csh/tcsh" msgstr "csh/tcsh" -#: ../../using/venv-create.inc:120 -msgid "$ source /bin/activate.csh" -msgstr "$ source /bin/activate.csh" +#: ../../library/venv.rst:77 +msgid ":samp:`$ source {}/bin/activate.csh`" +msgstr ":samp:`$ source {}/bin/activate.csh`" -#: ../../using/venv-create.inc:122 -msgid "PowerShell Core" -msgstr "" +#: ../../library/venv.rst:79 ../../library/venv.rst:83 +msgid "PowerShell" +msgstr "PowerShell" -#: ../../using/venv-create.inc:122 -msgid "$ /bin/Activate.ps1" -msgstr "$ /bin/Activate.ps1" +#: ../../library/venv.rst:79 +msgid ":samp:`$ {}/bin/Activate.ps1`" +msgstr ":samp:`$ {}/bin/Activate.ps1`" -#: ../../using/venv-create.inc:124 +#: ../../library/venv.rst:81 msgid "Windows" msgstr "Windows" -#: ../../using/venv-create.inc:124 +#: ../../library/venv.rst:81 msgid "cmd.exe" msgstr "cmd.exe" -#: ../../using/venv-create.inc:124 -msgid "C:\\\\> \\\\Scripts\\\\activate.bat" -msgstr "C:\\\\> \\\\Scripts\\\\activate.bat" - -#: ../../using/venv-create.inc:126 -msgid "PowerShell" -msgstr "PowerShell" - -#: ../../using/venv-create.inc:126 -msgid "PS C:\\\\> \\\\Scripts\\\\Activate.ps1" -msgstr "PS C:\\\\> \\\\Scripts\\\\Activate.ps1" - -#: ../../using/venv-create.inc:129 -msgid "" -"When a virtual environment is active, the :envvar:`VIRTUAL_ENV` environment " -"variable is set to the path of the virtual environment. This can be used to " -"check if one is running inside a virtual environment." -msgstr "" - -#: ../../using/venv-create.inc:133 -msgid "" -"You don't specifically *need* to activate an environment; activation just " -"prepends the virtual environment's binary directory to your path, so that " -"\"python\" invokes the virtual environment's Python interpreter and you can " -"run installed scripts without having to use their full path. However, all " -"scripts installed in a virtual environment should be runnable without " -"activating it, and run with the virtual environment's Python automatically." -msgstr "" +#: ../../library/venv.rst:81 +msgid ":samp:`C:\\\\> {}\\\\Scripts\\\\activate.bat`" +msgstr ":samp:`C:\\\\> {}\\\\Scripts\\\\activate.bat`" -#: ../../using/venv-create.inc:140 -msgid "" -"You can deactivate a virtual environment by typing \"deactivate\" in your " -"shell. The exact mechanism is platform-specific and is an internal " -"implementation detail (typically a script or shell function will be used)." -msgstr "" +#: ../../library/venv.rst:83 +msgid ":samp:`PS C:\\\\> {}\\\\Scripts\\\\Activate.ps1`" +msgstr ":samp:`PS C:\\\\> {}\\\\Scripts\\\\Activate.ps1`" -#: ../../using/venv-create.inc:144 -msgid "``fish`` and ``csh`` activation scripts." +#: ../../library/venv.rst:86 +msgid ":program:`!fish` and :program:`!csh` activation scripts." msgstr "" -#: ../../using/venv-create.inc:147 +#: ../../library/venv.rst:89 msgid "" "PowerShell activation scripts installed under POSIX for PowerShell Core " "support." msgstr "" -#: ../../library/venv.rst:42 -msgid "" -"A virtual environment is a Python environment such that the Python " -"interpreter, libraries and scripts installed into it are isolated from those " -"installed in other virtual environments, and (by default) any libraries " -"installed in a \"system\" Python, i.e., one which is installed as part of " -"your operating system." -msgstr "" - -#: ../../library/venv.rst:48 -msgid "" -"A virtual environment is a directory tree which contains Python executable " -"files and other files which indicate that it is a virtual environment." -msgstr "" - -#: ../../library/venv.rst:51 -msgid "" -"Common installation tools such as setuptools_ and pip_ work as expected with " -"virtual environments. In other words, when a virtual environment is active, " -"they install Python packages into the virtual environment without needing to " -"be told to do so explicitly." -msgstr "" - -#: ../../library/venv.rst:56 +#: ../../library/venv.rst:93 msgid "" -"When a virtual environment is active (i.e., the virtual environment's Python " -"interpreter is running), the attributes :attr:`sys.prefix` and :attr:`sys." -"exec_prefix` point to the base directory of the virtual environment, " -"whereas :attr:`sys.base_prefix` and :attr:`sys.base_exec_prefix` point to " -"the non-virtual environment Python installation which was used to create the " -"virtual environment. If a virtual environment is not active, then :attr:`sys." -"prefix` is the same as :attr:`sys.base_prefix` and :attr:`sys.exec_prefix` " -"is the same as :attr:`sys.base_exec_prefix` (they all point to a non-virtual " -"environment Python installation)." +"You don't specifically *need* to activate a virtual environment, as you can " +"just specify the full path to that environment's Python interpreter when " +"invoking Python. Furthermore, all scripts installed in the environment " +"should be runnable without activating it." msgstr "" -#: ../../library/venv.rst:67 +#: ../../library/venv.rst:99 msgid "" -"When a virtual environment is active, any options that change the " -"installation path will be ignored from all :mod:`distutils` configuration " -"files to prevent projects being inadvertently installed outside of the " -"virtual environment." +"In order to achieve this, scripts installed into virtual environments have a " +"\"shebang\" line which points to the environment's Python interpreter, i.e. :" +"samp:`#!/{}/bin/python`. This means that the script will run " +"with that interpreter regardless of the value of :envvar:`!PATH`. On " +"Windows, \"shebang\" line processing is supported if you have the :ref:" +"`launcher` installed. Thus, double-clicking an installed script in a Windows " +"Explorer window should run it with the correct interpreter without the " +"environment needing to be activated or on the :envvar:`!PATH`." msgstr "" -#: ../../library/venv.rst:72 +#: ../../library/venv.rst:108 msgid "" -"When working in a command shell, users can make a virtual environment active " -"by running an ``activate`` script in the virtual environment's executables " -"directory (the precise filename and command to use the file is shell-" -"dependent), which prepends the virtual environment's directory for " -"executables to the ``PATH`` environment variable for the running shell. " -"There should be no need in other circumstances to activate a virtual " -"environment; scripts installed into virtual environments have a \"shebang\" " -"line which points to the virtual environment's Python interpreter. This " -"means that the script will run with that interpreter regardless of the value " -"of ``PATH``. On Windows, \"shebang\" line processing is supported if you " -"have the Python Launcher for Windows installed (this was added to Python in " -"3.3 - see :pep:`397` for more details). Thus, double-clicking an installed " -"script in a Windows Explorer window should run the script with the correct " -"interpreter without there needing to be any reference to its virtual " -"environment in ``PATH``." +"When a virtual environment has been activated, the :envvar:`!VIRTUAL_ENV` " +"environment variable is set to the path of the environment. Since explicitly " +"activating a virtual environment is not required to use it, :envvar:`!" +"VIRTUAL_ENV` cannot be relied upon to determine whether a virtual " +"environment is being used." msgstr "" -#: ../../library/venv.rst:88 +#: ../../library/venv.rst:114 msgid "" "Because scripts installed in environments should not expect the environment " "to be activated, their shebang lines contain the absolute paths to their " @@ -360,11 +322,18 @@ msgid "" "Otherwise, software installed into the environment may not work as expected." msgstr "" -#: ../../library/venv.rst:105 +#: ../../library/venv.rst:128 +msgid "" +"You can deactivate a virtual environment by typing ``deactivate`` in your " +"shell. The exact mechanism is platform-specific and is an internal " +"implementation detail (typically, a script or shell function will be used)." +msgstr "" + +#: ../../library/venv.rst:136 msgid "API" msgstr "API" -#: ../../library/venv.rst:109 +#: ../../library/venv.rst:140 msgid "" "The high-level method described above makes use of a simple API which " "provides mechanisms for third-party virtual environment creators to " @@ -372,46 +341,46 @@ msgid "" "`EnvBuilder` class." msgstr "" -#: ../../library/venv.rst:117 +#: ../../library/venv.rst:148 msgid "" "The :class:`EnvBuilder` class accepts the following keyword arguments on " "instantiation:" msgstr "" -#: ../../library/venv.rst:120 +#: ../../library/venv.rst:151 msgid "" "``system_site_packages`` -- a Boolean value indicating that the system " "Python site-packages should be available to the environment (defaults to " "``False``)." msgstr "" -#: ../../library/venv.rst:123 +#: ../../library/venv.rst:154 msgid "" "``clear`` -- a Boolean value which, if true, will delete the contents of any " "existing target directory, before creating the environment." msgstr "" -#: ../../library/venv.rst:126 +#: ../../library/venv.rst:157 msgid "" "``symlinks`` -- a Boolean value indicating whether to attempt to symlink the " "Python binary rather than copying." msgstr "" -#: ../../library/venv.rst:129 +#: ../../library/venv.rst:160 msgid "" "``upgrade`` -- a Boolean value which, if true, will upgrade an existing " "environment with the running Python - for use when that Python has been " "upgraded in-place (defaults to ``False``)." msgstr "" -#: ../../library/venv.rst:133 +#: ../../library/venv.rst:164 msgid "" "``with_pip`` -- a Boolean value which, if true, ensures pip is installed in " "the virtual environment. This uses :mod:`ensurepip` with the ``--default-" "pip`` option." msgstr "" -#: ../../library/venv.rst:137 +#: ../../library/venv.rst:168 msgid "" "``prompt`` -- a String to be used after virtual environment is activated " "(defaults to ``None`` which means directory name of the environment would be " @@ -419,33 +388,33 @@ msgid "" "current directory is used as the prompt." msgstr "" -#: ../../library/venv.rst:142 +#: ../../library/venv.rst:173 msgid "``upgrade_deps`` -- Update the base venv modules to the latest on PyPI" msgstr "" -#: ../../library/venv.rst:144 ../../library/venv.rst:280 +#: ../../library/venv.rst:175 ../../library/venv.rst:350 msgid "Added the ``with_pip`` parameter" msgstr "新增 ``with_pip`` 參數" -#: ../../library/venv.rst:147 ../../library/venv.rst:283 +#: ../../library/venv.rst:178 ../../library/venv.rst:353 msgid "Added the ``prompt`` parameter" msgstr "新增 ``prompt`` 參數" -#: ../../library/venv.rst:150 ../../library/venv.rst:286 +#: ../../library/venv.rst:181 ../../library/venv.rst:356 msgid "Added the ``upgrade_deps`` parameter" msgstr "新增 ``upgrade_deps`` 參數" -#: ../../library/venv.rst:153 +#: ../../library/venv.rst:184 msgid "" "Creators of third-party virtual environment tools will be free to use the " "provided :class:`EnvBuilder` class as a base class." msgstr "" -#: ../../library/venv.rst:156 +#: ../../library/venv.rst:187 msgid "The returned env-builder is an object which has a method, ``create``:" msgstr "" -#: ../../library/venv.rst:160 +#: ../../library/venv.rst:191 msgid "" "Create a virtual environment by specifying the target directory (absolute or " "relative to the current directory) which is to contain the virtual " @@ -453,20 +422,20 @@ msgid "" "the specified directory, or raise an appropriate exception." msgstr "" -#: ../../library/venv.rst:166 +#: ../../library/venv.rst:197 msgid "" "The ``create`` method of the :class:`EnvBuilder` class illustrates the hooks " "available for subclass customization::" msgstr "" -#: ../../library/venv.rst:181 +#: ../../library/venv.rst:212 msgid "" "Each of the methods :meth:`ensure_directories`, :meth:" "`create_configuration`, :meth:`setup_python`, :meth:`setup_scripts` and :" "meth:`post_setup` can be overridden." msgstr "" -#: ../../library/venv.rst:187 +#: ../../library/venv.rst:218 msgid "" "Creates the environment directory and all necessary subdirectories that " "don't already exist, and returns a context object. This context object is " @@ -476,17 +445,87 @@ msgid "" "subdirectories will be recreated." msgstr "" -#: ../../library/venv.rst:194 +#: ../../library/venv.rst:225 +msgid "" +"The returned context object is a :class:`types.SimpleNamespace` with the " +"following attributes:" +msgstr "" + +#: ../../library/venv.rst:228 +msgid "" +"``env_dir`` - The location of the virtual environment. Used for " +"``__VENV_DIR__`` in activation scripts (see :meth:`install_scripts`)." +msgstr "" + +#: ../../library/venv.rst:231 +msgid "" +"``env_name`` - The name of the virtual environment. Used for " +"``__VENV_NAME__`` in activation scripts (see :meth:`install_scripts`)." +msgstr "" + +#: ../../library/venv.rst:234 +msgid "" +"``prompt`` - The prompt to be used by the activation scripts. Used for " +"``__VENV_PROMPT__`` in activation scripts (see :meth:`install_scripts`)." +msgstr "" + +#: ../../library/venv.rst:237 +msgid "" +"``executable`` - The underlying Python executable used by the virtual " +"environment. This takes into account the case where a virtual environment is " +"created from another virtual environment." +msgstr "" + +#: ../../library/venv.rst:241 +msgid "``inc_path`` - The include path for the virtual environment." +msgstr "" + +#: ../../library/venv.rst:243 +msgid "``lib_path`` - The purelib path for the virtual environment." +msgstr "" + +#: ../../library/venv.rst:245 +msgid "``bin_path`` - The script path for the virtual environment." +msgstr "" + +#: ../../library/venv.rst:247 +msgid "" +"``bin_name`` - The name of the script path relative to the virtual " +"environment location. Used for ``__VENV_BIN_NAME__`` in activation scripts " +"(see :meth:`install_scripts`)." +msgstr "" + +#: ../../library/venv.rst:251 +msgid "" +"``env_exe`` - The name of the Python interpreter in the virtual environment. " +"Used for ``__VENV_PYTHON__`` in activation scripts (see :meth:" +"`install_scripts`)." +msgstr "" + +#: ../../library/venv.rst:255 +msgid "" +"``env_exec_cmd`` - The name of the Python interpreter, taking into account " +"filesystem redirections. This can be used to run Python in the virtual " +"environment." +msgstr "" + +#: ../../library/venv.rst:260 +msgid "" +"The attribute ``lib_path`` was added to the context, and the context object " +"was documented." +msgstr "" + +#: ../../library/venv.rst:264 msgid "" "The *venv* :ref:`sysconfig installation scheme ` is used " "to construct the paths of the created directories." msgstr "" -#: ../../library/venv.rst:201 +#: ../../library/venv.rst:271 msgid "Creates the ``pyvenv.cfg`` configuration file in the environment." msgstr "" -#: ../../library/venv.rst:205 +#: ../../library/venv.rst:275 msgid "" "Creates a copy or symlink to the Python executable in the environment. On " "POSIX systems, if a specific executable ``python3.x`` was used, symlinks to " @@ -494,48 +533,48 @@ msgid "" "unless files with those names already exist." msgstr "" -#: ../../library/venv.rst:212 +#: ../../library/venv.rst:282 msgid "" "Installs activation scripts appropriate to the platform into the virtual " "environment." msgstr "" -#: ../../library/venv.rst:217 +#: ../../library/venv.rst:287 msgid "" "Upgrades the core venv dependency packages (currently ``pip`` and " "``setuptools``) in the environment. This is done by shelling out to the " "``pip`` executable in the environment." msgstr "" -#: ../../library/venv.rst:225 +#: ../../library/venv.rst:295 msgid "" "A placeholder method which can be overridden in third party implementations " "to pre-install packages in the virtual environment or perform other post-" "creation steps." msgstr "" -#: ../../library/venv.rst:229 +#: ../../library/venv.rst:299 msgid "" "Windows now uses redirector scripts for ``python[w].exe`` instead of copying " "the actual binaries. In 3.7.2 only :meth:`setup_python` does nothing unless " "running from a build in the source tree." msgstr "" -#: ../../library/venv.rst:234 +#: ../../library/venv.rst:304 msgid "" "Windows copies the redirector scripts as part of :meth:`setup_python` " "instead of :meth:`setup_scripts`. This was not the case in 3.7.2. When using " "symlinks, the original executables will be linked." msgstr "" -#: ../../library/venv.rst:239 +#: ../../library/venv.rst:309 msgid "" "In addition, :class:`EnvBuilder` provides this utility method that can be " "called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to " "assist in installing custom scripts into the virtual environment." msgstr "" -#: ../../library/venv.rst:245 +#: ../../library/venv.rst:315 msgid "" "*path* is the path to a directory that should contain subdirectories \"common" "\", \"posix\", \"nt\", each containing scripts destined for the bin " @@ -544,64 +583,64 @@ msgid "" "placeholders:" msgstr "" -#: ../../library/venv.rst:251 +#: ../../library/venv.rst:321 msgid "" "``__VENV_DIR__`` is replaced with the absolute path of the environment " "directory." msgstr "" -#: ../../library/venv.rst:254 +#: ../../library/venv.rst:324 msgid "" "``__VENV_NAME__`` is replaced with the environment name (final path segment " "of environment directory)." msgstr "" -#: ../../library/venv.rst:257 +#: ../../library/venv.rst:327 msgid "" "``__VENV_PROMPT__`` is replaced with the prompt (the environment name " "surrounded by parentheses and with a following space)" msgstr "" -#: ../../library/venv.rst:260 +#: ../../library/venv.rst:330 msgid "" "``__VENV_BIN_NAME__`` is replaced with the name of the bin directory (either " "``bin`` or ``Scripts``)." msgstr "" -#: ../../library/venv.rst:263 +#: ../../library/venv.rst:333 msgid "" "``__VENV_PYTHON__`` is replaced with the absolute path of the environment's " "executable." msgstr "" -#: ../../library/venv.rst:266 +#: ../../library/venv.rst:336 msgid "" "The directories are allowed to exist (for when an existing environment is " "being upgraded)." msgstr "" -#: ../../library/venv.rst:269 +#: ../../library/venv.rst:339 msgid "There is also a module-level convenience function:" msgstr "" -#: ../../library/venv.rst:275 +#: ../../library/venv.rst:345 msgid "" "Create an :class:`EnvBuilder` with the given keyword arguments, and call " "its :meth:`~EnvBuilder.create` method with the *env_dir* argument." msgstr "" -#: ../../library/venv.rst:290 +#: ../../library/venv.rst:360 msgid "An example of extending ``EnvBuilder``" msgstr "" -#: ../../library/venv.rst:292 +#: ../../library/venv.rst:362 msgid "" "The following script shows how to extend :class:`EnvBuilder` by implementing " "a subclass which installs setuptools and pip into a created virtual " "environment::" msgstr "" -#: ../../library/venv.rst:511 +#: ../../library/venv.rst:581 msgid "" "This script is also available for download `online `_." diff --git a/library/weakref.po b/library/weakref.po index a172e7dd35..23d7f14849 100644 --- a/library/weakref.po +++ b/library/weakref.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -210,22 +210,28 @@ msgstr "" #: ../../library/weakref.rst:149 msgid "" +"Accessing an attribute of the proxy object after the referent is garbage " +"collected raises :exc:`ReferenceError`." +msgstr "" + +#: ../../library/weakref.rst:152 +msgid "" "Extended the operator support on proxy objects to include the matrix " "multiplication operators ``@`` and ``@=``." msgstr "" -#: ../../library/weakref.rst:156 +#: ../../library/weakref.rst:159 msgid "" "Return the number of weak references and proxies which refer to *object*." msgstr "" -#: ../../library/weakref.rst:161 +#: ../../library/weakref.rst:164 msgid "" "Return a list of all weak reference and proxy objects which refer to " "*object*." msgstr "" -#: ../../library/weakref.rst:166 +#: ../../library/weakref.rst:169 msgid "" "Mapping class that references keys weakly. Entries in the dictionary will " "be discarded when there is no longer a strong reference to the key. This " @@ -234,11 +240,11 @@ msgid "" "especially useful with objects that override attribute accesses." msgstr "" -#: ../../library/weakref.rst:172 +#: ../../library/weakref.rst:175 msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." msgstr "新增 :pep:`584` 所述對於 ``|`` 與 ``|=`` 運算子的支援。" -#: ../../library/weakref.rst:175 +#: ../../library/weakref.rst:178 msgid "" ":class:`WeakKeyDictionary` objects have an additional method that exposes " "the internal references directly. The references are not guaranteed to be " @@ -248,39 +254,39 @@ msgid "" "longer than needed." msgstr "" -#: ../../library/weakref.rst:185 +#: ../../library/weakref.rst:188 msgid "Return an iterable of the weak references to the keys." msgstr "" -#: ../../library/weakref.rst:190 +#: ../../library/weakref.rst:193 msgid "" "Mapping class that references values weakly. Entries in the dictionary will " "be discarded when no strong reference to the value exists any more." msgstr "" -#: ../../library/weakref.rst:193 +#: ../../library/weakref.rst:196 msgid "" "Added support for ``|`` and ``|=`` operators, as specified in :pep:`584`." msgstr "" -#: ../../library/weakref.rst:196 +#: ../../library/weakref.rst:199 msgid "" ":class:`WeakValueDictionary` objects have an additional method that has the " "same issues as the :meth:`keyrefs` method of :class:`WeakKeyDictionary` " "objects." msgstr "" -#: ../../library/weakref.rst:203 +#: ../../library/weakref.rst:206 msgid "Return an iterable of the weak references to the values." msgstr "" -#: ../../library/weakref.rst:208 +#: ../../library/weakref.rst:211 msgid "" "Set class that keeps weak references to its elements. An element will be " "discarded when no strong reference to it exists any more." msgstr "" -#: ../../library/weakref.rst:214 +#: ../../library/weakref.rst:217 msgid "" "A custom :class:`ref` subclass which simulates a weak reference to a bound " "method (i.e., a method defined on a class and looked up on an instance). " @@ -289,7 +295,7 @@ msgid "" "method until either the object or the original function dies::" msgstr "" -#: ../../library/weakref.rst:242 +#: ../../library/weakref.rst:245 msgid "" "Return a callable finalizer object which will be called when *obj* is " "garbage collected. Unlike an ordinary weak reference, a finalizer will " @@ -297,7 +303,7 @@ msgid "" "lifecycle management." msgstr "" -#: ../../library/weakref.rst:247 +#: ../../library/weakref.rst:250 msgid "" "A finalizer is considered *alive* until it is called (either explicitly or " "at garbage collection), and after that it is *dead*. Calling a live " @@ -305,7 +311,7 @@ msgid "" "calling a dead finalizer returns :const:`None`." msgstr "" -#: ../../library/weakref.rst:252 +#: ../../library/weakref.rst:255 msgid "" "Exceptions raised by finalizer callbacks during garbage collection will be " "shown on the standard error output, but cannot be propagated. They are " @@ -313,50 +319,50 @@ msgid "" "`__del__` method or a weak reference's callback." msgstr "" -#: ../../library/weakref.rst:258 +#: ../../library/weakref.rst:261 msgid "" "When the program exits, each remaining live finalizer is called unless its :" "attr:`atexit` attribute has been set to false. They are called in reverse " "order of creation." msgstr "" -#: ../../library/weakref.rst:262 +#: ../../library/weakref.rst:265 msgid "" "A finalizer will never invoke its callback during the later part of the :" "term:`interpreter shutdown` when module globals are liable to have been " "replaced by :const:`None`." msgstr "" -#: ../../library/weakref.rst:268 +#: ../../library/weakref.rst:271 msgid "" "If *self* is alive then mark it as dead and return the result of calling " "``func(*args, **kwargs)``. If *self* is dead then return :const:`None`." msgstr "" -#: ../../library/weakref.rst:274 +#: ../../library/weakref.rst:277 msgid "" "If *self* is alive then mark it as dead and return the tuple ``(obj, func, " "args, kwargs)``. If *self* is dead then return :const:`None`." msgstr "" -#: ../../library/weakref.rst:280 +#: ../../library/weakref.rst:283 msgid "" "If *self* is alive then return the tuple ``(obj, func, args, kwargs)``. If " "*self* is dead then return :const:`None`." msgstr "" -#: ../../library/weakref.rst:285 +#: ../../library/weakref.rst:288 msgid "Property which is true if the finalizer is alive, false otherwise." msgstr "" -#: ../../library/weakref.rst:289 +#: ../../library/weakref.rst:292 msgid "" "A writable boolean property which by default is true. When the program " "exits, it calls all remaining live finalizers for which :attr:`.atexit` is " "true. They are called in reverse order of creation." msgstr "" -#: ../../library/weakref.rst:296 +#: ../../library/weakref.rst:299 msgid "" "It is important to ensure that *func*, *args* and *kwargs* do not own any " "references to *obj*, either directly or indirectly, since otherwise *obj* " @@ -364,60 +370,60 @@ msgid "" "bound method of *obj*." msgstr "" -#: ../../library/weakref.rst:306 +#: ../../library/weakref.rst:309 msgid "The type object for weak references objects." msgstr "" -#: ../../library/weakref.rst:311 +#: ../../library/weakref.rst:314 msgid "The type object for proxies of objects which are not callable." msgstr "" -#: ../../library/weakref.rst:316 +#: ../../library/weakref.rst:319 msgid "The type object for proxies of callable objects." msgstr "" -#: ../../library/weakref.rst:321 +#: ../../library/weakref.rst:324 msgid "" "Sequence containing all the type objects for proxies. This can make it " "simpler to test if an object is a proxy without being dependent on naming " "both proxy types." msgstr "" -#: ../../library/weakref.rst:329 +#: ../../library/weakref.rst:332 msgid ":pep:`205` - Weak References" msgstr "" -#: ../../library/weakref.rst:329 +#: ../../library/weakref.rst:332 msgid "" "The proposal and rationale for this feature, including links to earlier " "implementations and information about similar features in other languages." msgstr "" -#: ../../library/weakref.rst:336 +#: ../../library/weakref.rst:339 msgid "Weak Reference Objects" msgstr "" -#: ../../library/weakref.rst:338 +#: ../../library/weakref.rst:341 msgid "" "Weak reference objects have no methods and no attributes besides :attr:`ref." "__callback__`. A weak reference object allows the referent to be obtained, " "if it still exists, by calling it:" msgstr "" -#: ../../library/weakref.rst:352 +#: ../../library/weakref.rst:355 msgid "" "If the referent no longer exists, calling the reference object returns :" "const:`None`:" msgstr "" -#: ../../library/weakref.rst:359 +#: ../../library/weakref.rst:362 msgid "" "Testing that a weak reference object is still live should be done using the " "expression ``ref() is not None``. Normally, application code that needs to " "use a reference object should follow this pattern::" msgstr "" -#: ../../library/weakref.rst:372 +#: ../../library/weakref.rst:375 msgid "" "Using a separate test for \"liveness\" creates race conditions in threaded " "applications; another thread can cause a weak reference to become " @@ -425,7 +431,7 @@ msgid "" "safe in threaded applications as well as single-threaded applications." msgstr "" -#: ../../library/weakref.rst:377 +#: ../../library/weakref.rst:380 msgid "" "Specialized versions of :class:`ref` objects can be created through " "subclassing. This is used in the implementation of the :class:" @@ -435,18 +441,18 @@ msgid "" "to retrieve the referent." msgstr "" -#: ../../library/weakref.rst:383 +#: ../../library/weakref.rst:386 msgid "" "This example shows how a subclass of :class:`ref` can be used to store " "additional information about an object and affect the value that's returned " "when the referent is accessed::" msgstr "" -#: ../../library/weakref.rst:410 +#: ../../library/weakref.rst:413 msgid "Example" msgstr "範例" -#: ../../library/weakref.rst:412 +#: ../../library/weakref.rst:415 msgid "" "This simple example shows how an application can use object IDs to retrieve " "objects that it has seen before. The IDs of the objects can then be used in " @@ -454,67 +460,67 @@ msgid "" "objects can still be retrieved by ID if they do." msgstr "" -#: ../../library/weakref.rst:437 +#: ../../library/weakref.rst:440 msgid "Finalizer Objects" msgstr "" -#: ../../library/weakref.rst:439 +#: ../../library/weakref.rst:442 msgid "" "The main benefit of using :class:`finalize` is that it makes it simple to " "register a callback without needing to preserve the returned finalizer " "object. For instance" msgstr "" -#: ../../library/weakref.rst:453 +#: ../../library/weakref.rst:456 msgid "" "The finalizer can be called directly as well. However the finalizer will " "invoke the callback at most once." msgstr "" -#: ../../library/weakref.rst:469 +#: ../../library/weakref.rst:472 msgid "" "You can unregister a finalizer using its :meth:`~finalize.detach` method. " "This kills the finalizer and returns the arguments passed to the constructor " "when it was created." msgstr "" -#: ../../library/weakref.rst:483 +#: ../../library/weakref.rst:486 msgid "" "Unless you set the :attr:`~finalize.atexit` attribute to :const:`False`, a " "finalizer will be called when the program exits if it is still alive. For " "instance" msgstr "" -#: ../../library/weakref.rst:498 +#: ../../library/weakref.rst:501 msgid "Comparing finalizers with :meth:`__del__` methods" msgstr "" -#: ../../library/weakref.rst:500 +#: ../../library/weakref.rst:503 msgid "" "Suppose we want to create a class whose instances represent temporary " "directories. The directories should be deleted with their contents when the " "first of the following events occurs:" msgstr "" -#: ../../library/weakref.rst:504 +#: ../../library/weakref.rst:507 msgid "the object is garbage collected," msgstr "" -#: ../../library/weakref.rst:505 +#: ../../library/weakref.rst:508 msgid "the object's :meth:`remove` method is called, or" msgstr "" -#: ../../library/weakref.rst:506 +#: ../../library/weakref.rst:509 msgid "the program exits." msgstr "" -#: ../../library/weakref.rst:508 +#: ../../library/weakref.rst:511 msgid "" "We might try to implement the class using a :meth:`__del__` method as " "follows::" msgstr "" -#: ../../library/weakref.rst:527 +#: ../../library/weakref.rst:530 msgid "" "Starting with Python 3.4, :meth:`__del__` methods no longer prevent " "reference cycles from being garbage collected, and module globals are no " @@ -522,35 +528,35 @@ msgid "" "code should work without any issues on CPython." msgstr "" -#: ../../library/weakref.rst:532 +#: ../../library/weakref.rst:535 msgid "" "However, handling of :meth:`__del__` methods is notoriously implementation " "specific, since it depends on internal details of the interpreter's garbage " "collector implementation." msgstr "" -#: ../../library/weakref.rst:536 +#: ../../library/weakref.rst:539 msgid "" "A more robust alternative can be to define a finalizer which only references " "the specific functions and objects that it needs, rather than having access " "to the full state of the object::" msgstr "" -#: ../../library/weakref.rst:552 +#: ../../library/weakref.rst:555 msgid "" "Defined like this, our finalizer only receives a reference to the details it " "needs to clean up the directory appropriately. If the object never gets " "garbage collected the finalizer will still be called at exit." msgstr "" -#: ../../library/weakref.rst:556 +#: ../../library/weakref.rst:559 msgid "" "The other advantage of weakref based finalizers is that they can be used to " "register finalizers for classes where the definition is controlled by a " "third party, such as running code when a module is unloaded::" msgstr "" -#: ../../library/weakref.rst:568 +#: ../../library/weakref.rst:571 msgid "" "If you create a finalizer object in a daemonic thread just as the program " "exits then there is the possibility that the finalizer does not get called " diff --git a/library/webbrowser.po b/library/webbrowser.po index 12d5cc53a1..75c080afbe 100644 --- a/library/webbrowser.po +++ b/library/webbrowser.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2017-09-22 18:27+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -109,7 +109,7 @@ msgid "" "is neither supported nor portable." msgstr "" -#: ../../library/webbrowser.rst:80 +#: ../../library/webbrowser.rst:12 msgid "" "Raises an :ref:`auditing event ` ``webbrowser.open`` with argument " "``url``." diff --git a/library/winreg.po b/library/winreg.po index 19084ad240..44a722e6c0 100644 --- a/library/winreg.po +++ b/library/winreg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-04 00:16+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -79,7 +79,7 @@ msgid "" "exc:`OSError` exception is raised." msgstr "" -#: ../../library/winreg.rst:56 +#: ../../library/winreg.rst:12 msgid "" "Raises an :ref:`auditing event ` ``winreg.ConnectRegistry`` with " "arguments ``computer_name``, ``key``." @@ -126,14 +126,14 @@ msgstr "" msgid "If the key already exists, this function opens the existing key." msgstr "" -#: ../../library/winreg.rst:80 ../../library/winreg.rst:112 +#: ../../library/winreg.rst:17 ../../library/winreg.rst:23 msgid "" "Raises an :ref:`auditing event ` ``winreg.CreateKey`` with " "arguments ``key``, ``sub_key``, ``access``." msgstr "" -#: ../../library/winreg.rst:82 ../../library/winreg.rst:114 -#: ../../library/winreg.rst:324 +#: ../../library/winreg.rst:19 ../../library/winreg.rst:20 +#: ../../library/winreg.rst:25 msgid "" "Raises an :ref:`auditing event ` ``winreg.OpenKey/result`` with " "argument ``key``." @@ -172,7 +172,7 @@ msgid "" "removed. If the method fails, an :exc:`OSError` exception is raised." msgstr "" -#: ../../library/winreg.rst:137 ../../library/winreg.rst:168 +#: ../../library/winreg.rst:14 ../../library/winreg.rst:24 msgid "" "Raises an :ref:`auditing event ` ``winreg.DeleteKey`` with " "arguments ``key``, ``sub_key``, ``access``." @@ -205,7 +205,7 @@ msgstr "" msgid "*value* is a string that identifies the value to remove." msgstr "" -#: ../../library/winreg.rst:185 +#: ../../library/winreg.rst:8 msgid "" "Raises an :ref:`auditing event ` ``winreg.DeleteValue`` with " "arguments ``key``, ``value``." @@ -226,7 +226,7 @@ msgid "" "indicating, no more values are available." msgstr "" -#: ../../library/winreg.rst:201 +#: ../../library/winreg.rst:12 msgid "" "Raises an :ref:`auditing event ` ``winreg.EnumKey`` with arguments " "``key``, ``index``." @@ -292,7 +292,7 @@ msgid "" "for :meth:`SetValueEx`)" msgstr "" -#: ../../library/winreg.rst:236 +#: ../../library/winreg.rst:28 msgid "" "Raises an :ref:`auditing event ` ``winreg.EnumValue`` with " "arguments ``key``, ``index``." @@ -304,7 +304,7 @@ msgid "" "`REG_EXPAND_SZ`::" msgstr "" -#: ../../library/winreg.rst:253 +#: ../../library/winreg.rst:7 msgid "" "Raises an :ref:`auditing event ` ``winreg." "ExpandEnvironmentStrings`` with argument ``str``." @@ -368,7 +368,7 @@ msgid "" "specified in *file_name* is relative to the remote computer." msgstr "" -#: ../../library/winreg.rst:299 +#: ../../library/winreg.rst:22 msgid "" "Raises an :ref:`auditing event ` ``winreg.LoadKey`` with arguments " "``key``, ``sub_key``, ``file_name``." @@ -403,7 +403,7 @@ msgstr "" msgid "If the function fails, :exc:`OSError` is raised." msgstr "" -#: ../../library/winreg.rst:322 +#: ../../library/winreg.rst:18 msgid "" "Raises an :ref:`auditing event ` ``winreg.OpenKey`` with arguments " "``key``, ``sub_key``, ``access``." @@ -431,7 +431,7 @@ msgid "" "nanoseconds since Jan 1, 1601." msgstr "" -#: ../../library/winreg.rst:356 +#: ../../library/winreg.rst:22 msgid "" "Raises an :ref:`auditing event ` ``winreg.QueryInfoKey`` with " "argument ``key``." @@ -457,7 +457,7 @@ msgid "" "`QueryValueEx` if possible." msgstr "" -#: ../../library/winreg.rst:375 ../../library/winreg.rst:400 +#: ../../library/winreg.rst:15 ../../library/winreg.rst:21 msgid "" "Raises an :ref:`auditing event ` ``winreg.QueryValue`` with " "arguments ``key``, ``sub_key``, ``value_name``." @@ -513,7 +513,7 @@ msgstr "" msgid "This function passes ``NULL`` for *security_attributes* to the API." msgstr "" -#: ../../library/winreg.rst:425 +#: ../../library/winreg.rst:21 msgid "" "Raises an :ref:`auditing event ` ``winreg.SaveKey`` with arguments " "``key``, ``file_name``." @@ -559,7 +559,7 @@ msgid "" "`KEY_SET_VALUE` access." msgstr "" -#: ../../library/winreg.rst:453 ../../library/winreg.rst:483 +#: ../../library/winreg.rst:24 ../../library/winreg.rst:26 msgid "" "Raises an :ref:`auditing event ` ``winreg.SetValue`` with " "arguments ``key``, ``sub_key``, ``type``, ``value``." @@ -616,7 +616,7 @@ msgid "" "subkeys." msgstr "" -#: ../../library/winreg.rst:501 +#: ../../library/winreg.rst:14 msgid "" "Raises an :ref:`auditing event ` ``winreg.DisableReflectionKey`` " "with argument ``key``." @@ -631,7 +631,7 @@ msgid "" "Restoring reflection for a key does not affect reflection of any subkeys." msgstr "" -#: ../../library/winreg.rst:516 +#: ../../library/winreg.rst:11 msgid "" "Raises an :ref:`auditing event ` ``winreg.EnableReflectionKey`` " "with argument ``key``." @@ -645,7 +645,7 @@ msgstr "" msgid "Returns ``True`` if reflection is disabled." msgstr "" -#: ../../library/winreg.rst:531 +#: ../../library/winreg.rst:11 msgid "" "Raises an :ref:`auditing event ` ``winreg.QueryReflectionKey`` " "with argument ``key``." @@ -936,7 +936,7 @@ msgid "" "underlying Win32 handle to exist beyond the lifetime of the handle object." msgstr "" -#: ../../library/winreg.rst:784 +#: ../../library/winreg.rst:11 msgid "" "Raises an :ref:`auditing event ` ``winreg.PyHKEY.Detach`` with " "argument ``key``." diff --git a/library/xml.dom.minidom.po b/library/xml.dom.minidom.po index 39cd26b2f1..9d75cc0204 100644 --- a/library/xml.dom.minidom.po +++ b/library/xml.dom.minidom.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-01 00:17+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:15+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -178,8 +178,8 @@ msgstr "" msgid "" "Similarly, explicitly stating the *standalone* argument causes the " "standalone document declarations to be added to the prologue of the XML " -"document. If the value is set to `True`, `standalone=\"yes\"` is added, " -"otherwise it is set to `\"no\"`. Not stating the argument will omit the " +"document. If the value is set to ``True``, ``standalone=\"yes\"`` is added, " +"otherwise it is set to ``\"no\"``. Not stating the argument will omit the " "declaration from the document." msgstr "" diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index a9e05eacc7..376697484c 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -86,7 +86,7 @@ msgid "" "class:`bytes` and :class:`bytearray` objects may be passed to calls. The " "*headers* parameter is an optional sequence of HTTP headers to send with " "each request, expressed as a sequence of 2-tuples representing the header " -"name and value. (e.g. `[('Header-Name', 'value')]`). The obsolete " +"name and value. (e.g. ``[('Header-Name', 'value')]``). The obsolete " "*use_datetime* flag is similar to *use_builtin_types* but it applies only to " "date/time values." msgstr "" diff --git a/library/xmlrpc.server.po b/library/xmlrpc.server.po index 1793e1f172..253a63f278 100644 --- a/library/xmlrpc.server.po +++ b/library/xmlrpc.server.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:16+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -213,8 +213,8 @@ msgstr "" #: ../../library/xmlrpc.server.rst:265 msgid "" -"The client that interacts with the above server is included in `Lib/xmlrpc/" -"client.py`::" +"The client that interacts with the above server is included in ``Lib/xmlrpc/" +"client.py``::" msgstr "" #: ../../library/xmlrpc.server.rst:285 diff --git a/license.po b/license.po index 276218d8fa..a3518a528d 100644 --- a/license.po +++ b/license.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 00:19+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2022-06-27 09:40+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -549,3 +549,31 @@ msgstr "" "clause BSD 授權被發佈:\n" "\n" "::" + +#: ../../license.rst:989 +msgid "Audioop" +msgstr "" + +#: ../../license.rst:1010 +msgid "" +"The audioop module uses the code base in g771.c file of the SoX project::" +msgstr "" + +#: ../../license.rst:991 +msgid "" +"Programming the AdLib/Sound Blaster FM Music Chips Version 2.0 (24 Feb 1992) " +"Copyright (c) 1991, 1992 by Jeffrey S. Lee jlee@smylex.uucp Warranty and " +"Copyright Policy This document is provided on an \"as-is\" basis, and its " +"author makes no warranty or representation, express or implied, with respect " +"to its quality performance or fitness for a particular purpose. In no event " +"will the author of this document be liable for direct, indirect, special, " +"incidental, or consequential damages arising out of the use or inability to " +"use the information contained within. Use of this document is at your own " +"risk. This file may be used and copied freely so long as the applicable " +"copyright notices are retained, and no modifications are made to the text of " +"the document. No money shall be charged for its distribution beyond " +"reasonable shipping, handling and duplication costs, nor shall proprietary " +"changes be made to this document so that it cannot be distributed freely. " +"This document may not be included in published material or commercial " +"packages without the written consent of its author." +msgstr "" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 0b954b788f..35afe8eba6 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -283,20 +283,27 @@ msgid "" "keyword:`except`, but in the case of exception groups we can have partial " "matches when the type matches some of the exceptions in the group. This " "means that multiple :keyword:`!except*` clauses can execute, each handling " -"part of the exception group. Each clause executes once and handles an " -"exception group of all matching exceptions. Each exception in the group is " -"handled by at most one :keyword:`!except*` clause, the first that matches " +"part of the exception group. Each clause executes at most once and handles " +"an exception group of all matching exceptions. Each exception in the group " +"is handled by at most one :keyword:`!except*` clause, the first that matches " "it. ::" msgstr "" -#: ../../reference/compound_stmts.rst:367 +#: ../../reference/compound_stmts.rst:368 msgid "" "Any remaining exceptions that were not handled by any :keyword:`!except*` " "clause are re-raised at the end, combined into an exception group along with " "all exceptions that were raised from within :keyword:`!except*` clauses." msgstr "" -#: ../../reference/compound_stmts.rst:371 +#: ../../reference/compound_stmts.rst:372 +msgid "" +"If the raised exception is not an exception group and its type matches one " +"of the :keyword:`!except*` clauses, it is caught and wrapped by an exception " +"group with an empty message string. ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:383 msgid "" "An :keyword:`!except*` clause must have a matching type, and this type " "cannot be a subclass of :exc:`BaseExceptionGroup`. It is not possible to " @@ -305,11 +312,11 @@ msgid "" "an :keyword:`!except*` clause." msgstr "" -#: ../../reference/compound_stmts.rst:388 +#: ../../reference/compound_stmts.rst:400 msgid ":keyword:`!else` clause" msgstr "" -#: ../../reference/compound_stmts.rst:390 +#: ../../reference/compound_stmts.rst:402 msgid "" "The optional :keyword:`!else` clause is executed if the control flow leaves " "the :keyword:`try` suite, no exception was raised, and no :keyword:" @@ -318,11 +325,11 @@ msgid "" "keyword:`except` clauses." msgstr "" -#: ../../reference/compound_stmts.rst:402 +#: ../../reference/compound_stmts.rst:414 msgid ":keyword:`!finally` clause" msgstr "" -#: ../../reference/compound_stmts.rst:404 +#: ../../reference/compound_stmts.rst:416 msgid "" "If :keyword:`!finally` is present, it specifies a 'cleanup' handler. The :" "keyword:`try` clause is executed, including any :keyword:`except` and :" @@ -336,13 +343,13 @@ msgid "" "exception is discarded::" msgstr "" -#: ../../reference/compound_stmts.rst:423 +#: ../../reference/compound_stmts.rst:435 msgid "" "The exception information is not available to the program during execution " "of the :keyword:`!finally` clause." msgstr "" -#: ../../reference/compound_stmts.rst:431 +#: ../../reference/compound_stmts.rst:443 msgid "" "When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " "is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ :keyword:`!" @@ -350,7 +357,7 @@ msgid "" "way out.'" msgstr "" -#: ../../reference/compound_stmts.rst:435 +#: ../../reference/compound_stmts.rst:447 msgid "" "The return value of a function is determined by the last :keyword:`return` " "statement executed. Since the :keyword:`!finally` clause always executes, " @@ -358,17 +365,17 @@ msgid "" "will always be the last one executed::" msgstr "" -#: ../../reference/compound_stmts.rst:449 +#: ../../reference/compound_stmts.rst:461 msgid "" "Prior to Python 3.8, a :keyword:`continue` statement was illegal in the :" "keyword:`!finally` clause due to a problem with the implementation." msgstr "" -#: ../../reference/compound_stmts.rst:458 +#: ../../reference/compound_stmts.rst:470 msgid "The :keyword:`!with` statement" msgstr "" -#: ../../reference/compound_stmts.rst:467 +#: ../../reference/compound_stmts.rst:479 msgid "" "The :keyword:`with` statement is used to wrap the execution of a block with " "methods defined by a context manager (see section :ref:`context-managers`). " @@ -376,37 +383,37 @@ msgid "" "`finally` usage patterns to be encapsulated for convenient reuse." msgstr "" -#: ../../reference/compound_stmts.rst:477 +#: ../../reference/compound_stmts.rst:489 msgid "" "The execution of the :keyword:`with` statement with one \"item\" proceeds as " "follows:" msgstr "" -#: ../../reference/compound_stmts.rst:479 +#: ../../reference/compound_stmts.rst:491 msgid "" "The context expression (the expression given in the :token:`~python-grammar:" "with_item`) is evaluated to obtain a context manager." msgstr "" -#: ../../reference/compound_stmts.rst:482 +#: ../../reference/compound_stmts.rst:494 msgid "The context manager's :meth:`__enter__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:496 msgid "The context manager's :meth:`__exit__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:486 +#: ../../reference/compound_stmts.rst:498 msgid "The context manager's :meth:`__enter__` method is invoked." msgstr "" -#: ../../reference/compound_stmts.rst:488 +#: ../../reference/compound_stmts.rst:500 msgid "" "If a target was included in the :keyword:`with` statement, the return value " "from :meth:`__enter__` is assigned to it." msgstr "" -#: ../../reference/compound_stmts.rst:493 +#: ../../reference/compound_stmts.rst:505 msgid "" "The :keyword:`with` statement guarantees that if the :meth:`__enter__` " "method returns without an error, then :meth:`__exit__` will always be " @@ -415,11 +422,11 @@ msgid "" "See step 6 below." msgstr "" -#: ../../reference/compound_stmts.rst:499 +#: ../../reference/compound_stmts.rst:511 msgid "The suite is executed." msgstr "" -#: ../../reference/compound_stmts.rst:501 +#: ../../reference/compound_stmts.rst:513 msgid "" "The context manager's :meth:`__exit__` method is invoked. If an exception " "caused the suite to be exited, its type, value, and traceback are passed as " @@ -427,7 +434,7 @@ msgid "" "supplied." msgstr "" -#: ../../reference/compound_stmts.rst:506 +#: ../../reference/compound_stmts.rst:518 msgid "" "If the suite was exited due to an exception, and the return value from the :" "meth:`__exit__` method was false, the exception is reraised. If the return " @@ -435,119 +442,119 @@ msgid "" "the statement following the :keyword:`with` statement." msgstr "" -#: ../../reference/compound_stmts.rst:511 +#: ../../reference/compound_stmts.rst:523 msgid "" "If the suite was exited for any reason other than an exception, the return " "value from :meth:`__exit__` is ignored, and execution proceeds at the normal " "location for the kind of exit that was taken." msgstr "" -#: ../../reference/compound_stmts.rst:515 -#: ../../reference/compound_stmts.rst:1505 -#: ../../reference/compound_stmts.rst:1546 +#: ../../reference/compound_stmts.rst:527 +#: ../../reference/compound_stmts.rst:1517 +#: ../../reference/compound_stmts.rst:1558 msgid "The following code::" msgstr "" -#: ../../reference/compound_stmts.rst:520 -#: ../../reference/compound_stmts.rst:545 -#: ../../reference/compound_stmts.rst:1551 +#: ../../reference/compound_stmts.rst:532 +#: ../../reference/compound_stmts.rst:557 +#: ../../reference/compound_stmts.rst:1563 msgid "is semantically equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:539 +#: ../../reference/compound_stmts.rst:551 msgid "" "With more than one item, the context managers are processed as if multiple :" "keyword:`with` statements were nested::" msgstr "" -#: ../../reference/compound_stmts.rst:551 +#: ../../reference/compound_stmts.rst:563 msgid "" "You can also write multi-item context managers in multiple lines if the " "items are surrounded by parentheses. For example::" msgstr "" -#: ../../reference/compound_stmts.rst:560 +#: ../../reference/compound_stmts.rst:572 msgid "Support for multiple context expressions." msgstr "" -#: ../../reference/compound_stmts.rst:563 +#: ../../reference/compound_stmts.rst:575 msgid "" "Support for using grouping parentheses to break the statement in multiple " "lines." msgstr "" -#: ../../reference/compound_stmts.rst:569 +#: ../../reference/compound_stmts.rst:581 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/compound_stmts.rst:569 +#: ../../reference/compound_stmts.rst:581 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/compound_stmts.rst:575 +#: ../../reference/compound_stmts.rst:587 msgid "The :keyword:`!match` statement" msgstr "" -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:600 msgid "The match statement is used for pattern matching. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:597 +#: ../../reference/compound_stmts.rst:609 msgid "" "This section uses single quotes to denote :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:600 +#: ../../reference/compound_stmts.rst:612 msgid "" "Pattern matching takes a pattern as input (following ``case``) and a subject " "value (following ``match``). The pattern (which may contain subpatterns) is " "matched against the subject value. The outcomes are:" msgstr "" -#: ../../reference/compound_stmts.rst:604 +#: ../../reference/compound_stmts.rst:616 msgid "A match success or failure (also termed a pattern success or failure)." msgstr "" -#: ../../reference/compound_stmts.rst:606 +#: ../../reference/compound_stmts.rst:618 msgid "" "Possible binding of matched values to a name. The prerequisites for this " "are further discussed below." msgstr "" -#: ../../reference/compound_stmts.rst:609 +#: ../../reference/compound_stmts.rst:621 msgid "" "The ``match`` and ``case`` keywords are :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:613 -#: ../../reference/compound_stmts.rst:1168 +#: ../../reference/compound_stmts.rst:625 +#: ../../reference/compound_stmts.rst:1180 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../reference/compound_stmts.rst:614 -#: ../../reference/compound_stmts.rst:1169 +#: ../../reference/compound_stmts.rst:626 +#: ../../reference/compound_stmts.rst:1181 msgid ":pep:`636` -- Structural Pattern Matching: Tutorial" msgstr "" -#: ../../reference/compound_stmts.rst:618 +#: ../../reference/compound_stmts.rst:630 msgid "Overview" msgstr "" -#: ../../reference/compound_stmts.rst:620 +#: ../../reference/compound_stmts.rst:632 msgid "Here's an overview of the logical flow of a match statement:" msgstr "" -#: ../../reference/compound_stmts.rst:623 +#: ../../reference/compound_stmts.rst:635 msgid "" "The subject expression ``subject_expr`` is evaluated and a resulting subject " "value obtained. If the subject expression contains a comma, a tuple is " "constructed using :ref:`the standard rules `." msgstr "" -#: ../../reference/compound_stmts.rst:627 +#: ../../reference/compound_stmts.rst:639 msgid "" "Each pattern in a ``case_block`` is attempted to match with the subject " "value. The specific rules for success or failure are described below. The " @@ -557,7 +564,7 @@ msgid "" "outlive the executed block and can be used after the match statement**." msgstr "" -#: ../../reference/compound_stmts.rst:636 +#: ../../reference/compound_stmts.rst:648 msgid "" "During failed pattern matches, some subpatterns may succeed. Do not rely on " "bindings being made for a failed match. Conversely, do not rely on " @@ -566,87 +573,87 @@ msgid "" "made to allow different implementations to add optimizations." msgstr "" -#: ../../reference/compound_stmts.rst:643 +#: ../../reference/compound_stmts.rst:655 msgid "" "If the pattern succeeds, the corresponding guard (if present) is evaluated. " "In this case all name bindings are guaranteed to have happened." msgstr "" -#: ../../reference/compound_stmts.rst:646 +#: ../../reference/compound_stmts.rst:658 msgid "" "If the guard evaluates as true or is missing, the ``block`` inside " "``case_block`` is executed." msgstr "" -#: ../../reference/compound_stmts.rst:649 +#: ../../reference/compound_stmts.rst:661 msgid "Otherwise, the next ``case_block`` is attempted as described above." msgstr "" -#: ../../reference/compound_stmts.rst:651 +#: ../../reference/compound_stmts.rst:663 msgid "If there are no further case blocks, the match statement is completed." msgstr "" -#: ../../reference/compound_stmts.rst:655 +#: ../../reference/compound_stmts.rst:667 msgid "" "Users should generally never rely on a pattern being evaluated. Depending " "on implementation, the interpreter may cache values or use other " "optimizations which skip repeated evaluations." msgstr "" -#: ../../reference/compound_stmts.rst:659 +#: ../../reference/compound_stmts.rst:671 msgid "A sample match statement::" msgstr "" -#: ../../reference/compound_stmts.rst:675 +#: ../../reference/compound_stmts.rst:687 msgid "" "In this case, ``if flag`` is a guard. Read more about that in the next " "section." msgstr "" -#: ../../reference/compound_stmts.rst:678 +#: ../../reference/compound_stmts.rst:690 msgid "Guards" msgstr "" -#: ../../reference/compound_stmts.rst:685 +#: ../../reference/compound_stmts.rst:697 msgid "" "A ``guard`` (which is part of the ``case``) must succeed for code inside the " "``case`` block to execute. It takes the form: :keyword:`if` followed by an " "expression." msgstr "" -#: ../../reference/compound_stmts.rst:690 +#: ../../reference/compound_stmts.rst:702 msgid "The logical flow of a ``case`` block with a ``guard`` follows:" msgstr "" -#: ../../reference/compound_stmts.rst:692 +#: ../../reference/compound_stmts.rst:704 msgid "" "Check that the pattern in the ``case`` block succeeded. If the pattern " "failed, the ``guard`` is not evaluated and the next ``case`` block is " "checked." msgstr "" -#: ../../reference/compound_stmts.rst:696 +#: ../../reference/compound_stmts.rst:708 msgid "If the pattern succeeded, evaluate the ``guard``." msgstr "" -#: ../../reference/compound_stmts.rst:698 +#: ../../reference/compound_stmts.rst:710 msgid "" "If the ``guard`` condition evaluates as true, the case block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:701 +#: ../../reference/compound_stmts.rst:713 msgid "" "If the ``guard`` condition evaluates as false, the case block is not " "selected." msgstr "" -#: ../../reference/compound_stmts.rst:704 +#: ../../reference/compound_stmts.rst:716 msgid "" "If the ``guard`` raises an exception during evaluation, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:707 +#: ../../reference/compound_stmts.rst:719 msgid "" "Guards are allowed to have side effects as they are expressions. Guard " "evaluation must proceed from the first to the last case block, one at a " @@ -655,17 +662,17 @@ msgid "" "block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:717 +#: ../../reference/compound_stmts.rst:729 msgid "Irrefutable Case Blocks" msgstr "" -#: ../../reference/compound_stmts.rst:721 +#: ../../reference/compound_stmts.rst:733 msgid "" "An irrefutable case block is a match-all case block. A match statement may " "have at most one irrefutable case block, and it must be last." msgstr "" -#: ../../reference/compound_stmts.rst:724 +#: ../../reference/compound_stmts.rst:736 msgid "" "A case block is considered irrefutable if it has no guard and its pattern is " "irrefutable. A pattern is considered irrefutable if we can prove from its " @@ -673,47 +680,47 @@ msgid "" "irrefutable:" msgstr "" -#: ../../reference/compound_stmts.rst:729 +#: ../../reference/compound_stmts.rst:741 msgid ":ref:`as-patterns` whose left-hand side is irrefutable" msgstr "" -#: ../../reference/compound_stmts.rst:731 +#: ../../reference/compound_stmts.rst:743 msgid ":ref:`or-patterns` containing at least one irrefutable pattern" msgstr "" -#: ../../reference/compound_stmts.rst:733 +#: ../../reference/compound_stmts.rst:745 msgid ":ref:`capture-patterns`" msgstr ":ref:`capture-patterns`" -#: ../../reference/compound_stmts.rst:735 +#: ../../reference/compound_stmts.rst:747 msgid ":ref:`wildcard-patterns`" msgstr ":ref:`wildcard-patterns`" -#: ../../reference/compound_stmts.rst:737 +#: ../../reference/compound_stmts.rst:749 msgid "parenthesized irrefutable patterns" msgstr "" -#: ../../reference/compound_stmts.rst:741 +#: ../../reference/compound_stmts.rst:753 msgid "Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:748 +#: ../../reference/compound_stmts.rst:760 msgid "This section uses grammar notations beyond standard EBNF:" msgstr "" -#: ../../reference/compound_stmts.rst:750 +#: ../../reference/compound_stmts.rst:762 msgid "the notation ``SEP.RULE+`` is shorthand for ``RULE (SEP RULE)*``" msgstr "" -#: ../../reference/compound_stmts.rst:752 +#: ../../reference/compound_stmts.rst:764 msgid "the notation ``!RULE`` is shorthand for a negative lookahead assertion" msgstr "" -#: ../../reference/compound_stmts.rst:755 +#: ../../reference/compound_stmts.rst:767 msgid "The top-level syntax for ``patterns`` is:" msgstr "" -#: ../../reference/compound_stmts.rst:769 +#: ../../reference/compound_stmts.rst:781 msgid "" "The descriptions below will include a description \"in simple terms\" of " "what a pattern does for illustration purposes (credits to Raymond Hettinger " @@ -723,70 +730,70 @@ msgid "" "forms." msgstr "" -#: ../../reference/compound_stmts.rst:779 +#: ../../reference/compound_stmts.rst:791 msgid "OR Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:781 +#: ../../reference/compound_stmts.rst:793 msgid "" "An OR pattern is two or more patterns separated by vertical bars ``|``. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:787 +#: ../../reference/compound_stmts.rst:799 msgid "" "Only the final subpattern may be :ref:`irrefutable `, and " "each subpattern must bind the same set of names to avoid ambiguity." msgstr "" -#: ../../reference/compound_stmts.rst:790 +#: ../../reference/compound_stmts.rst:802 msgid "" "An OR pattern matches each of its subpatterns in turn to the subject value, " "until one succeeds. The OR pattern is then considered successful. " "Otherwise, if none of the subpatterns succeed, the OR pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:794 +#: ../../reference/compound_stmts.rst:806 msgid "" "In simple terms, ``P1 | P2 | ...`` will try to match ``P1``, if it fails it " "will try to match ``P2``, succeeding immediately if any succeeds, failing " "otherwise." msgstr "" -#: ../../reference/compound_stmts.rst:800 +#: ../../reference/compound_stmts.rst:812 msgid "AS Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:802 +#: ../../reference/compound_stmts.rst:814 msgid "" "An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword " "against a subject. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:808 +#: ../../reference/compound_stmts.rst:820 msgid "" "If the OR pattern fails, the AS pattern fails. Otherwise, the AS pattern " "binds the subject to the name on the right of the as keyword and succeeds. " "``capture_pattern`` cannot be a a ``_``." msgstr "" -#: ../../reference/compound_stmts.rst:812 +#: ../../reference/compound_stmts.rst:824 msgid "" "In simple terms ``P as NAME`` will match with ``P``, and on success it will " "set ``NAME = ``." msgstr "" -#: ../../reference/compound_stmts.rst:819 +#: ../../reference/compound_stmts.rst:831 msgid "Literal Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:821 +#: ../../reference/compound_stmts.rst:833 msgid "" "A literal pattern corresponds to most :ref:`literals ` in Python. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:834 +#: ../../reference/compound_stmts.rst:846 msgid "" "The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:" "`standard Python grammar <./grammar>`. Triple-quoted strings are " @@ -794,42 +801,42 @@ msgid "" "are not supported." msgstr "" -#: ../../reference/compound_stmts.rst:839 +#: ../../reference/compound_stmts.rst:851 msgid "" "The forms ``signed_number '+' NUMBER`` and ``signed_number '-' NUMBER`` are " "for expressing :ref:`complex numbers `; they require a real " "number on the left and an imaginary number on the right. E.g. ``3 + 4j``." msgstr "" -#: ../../reference/compound_stmts.rst:843 +#: ../../reference/compound_stmts.rst:855 msgid "" "In simple terms, ``LITERAL`` will succeed only if `` == LITERAL``. " "For the singletons ``None``, ``True`` and ``False``, the :keyword:`is` " "operator is used." msgstr "" -#: ../../reference/compound_stmts.rst:849 +#: ../../reference/compound_stmts.rst:861 msgid "Capture Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:851 +#: ../../reference/compound_stmts.rst:863 msgid "A capture pattern binds the subject value to a name. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:857 +#: ../../reference/compound_stmts.rst:869 msgid "" "A single underscore ``_`` is not a capture pattern (this is what ``!'_'`` " "expresses). It is instead treated as a :token:`~python-grammar:" "wildcard_pattern`." msgstr "" -#: ../../reference/compound_stmts.rst:861 +#: ../../reference/compound_stmts.rst:873 msgid "" "In a given pattern, a given name can only be bound once. E.g. ``case x, " "x: ...`` is invalid while ``case [x] | x: ...`` is allowed." msgstr "" -#: ../../reference/compound_stmts.rst:864 +#: ../../reference/compound_stmts.rst:876 msgid "" "Capture patterns always succeed. The binding follows scoping rules " "established by the assignment expression operator in :pep:`572`; the name " @@ -837,55 +844,55 @@ msgid "" "there's an applicable :keyword:`global` or :keyword:`nonlocal` statement." msgstr "" -#: ../../reference/compound_stmts.rst:869 +#: ../../reference/compound_stmts.rst:881 msgid "" "In simple terms ``NAME`` will always succeed and it will set ``NAME = " "``." msgstr "" -#: ../../reference/compound_stmts.rst:874 +#: ../../reference/compound_stmts.rst:886 msgid "Wildcard Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:876 +#: ../../reference/compound_stmts.rst:888 msgid "" "A wildcard pattern always succeeds (matches anything) and binds no name. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:882 +#: ../../reference/compound_stmts.rst:894 msgid "" "``_`` is a :ref:`soft keyword ` within any pattern, but only " "within patterns. It is an identifier, as usual, even within ``match`` " "subject expressions, ``guard``\\ s, and ``case`` blocks." msgstr "" -#: ../../reference/compound_stmts.rst:886 +#: ../../reference/compound_stmts.rst:898 msgid "In simple terms, ``_`` will always succeed." msgstr "" -#: ../../reference/compound_stmts.rst:891 +#: ../../reference/compound_stmts.rst:903 msgid "Value Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:893 +#: ../../reference/compound_stmts.rst:905 msgid "A value pattern represents a named value in Python. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:901 +#: ../../reference/compound_stmts.rst:913 msgid "" "The dotted name in the pattern is looked up using standard Python :ref:`name " "resolution rules `. The pattern succeeds if the value found " "compares equal to the subject value (using the ``==`` equality operator)." msgstr "" -#: ../../reference/compound_stmts.rst:906 +#: ../../reference/compound_stmts.rst:918 msgid "" "In simple terms ``NAME1.NAME2`` will succeed only if `` == NAME1." "NAME2``" msgstr "" -#: ../../reference/compound_stmts.rst:910 +#: ../../reference/compound_stmts.rst:922 msgid "" "If the same value occurs multiple times in the same match statement, the " "interpreter may cache the first value found and reuse it rather than repeat " @@ -893,44 +900,44 @@ msgid "" "given match statement." msgstr "" -#: ../../reference/compound_stmts.rst:918 +#: ../../reference/compound_stmts.rst:930 msgid "Group Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:920 +#: ../../reference/compound_stmts.rst:932 msgid "" "A group pattern allows users to add parentheses around patterns to emphasize " "the intended grouping. Otherwise, it has no additional syntax. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:927 +#: ../../reference/compound_stmts.rst:939 msgid "In simple terms ``(P)`` has the same effect as ``P``." msgstr "" -#: ../../reference/compound_stmts.rst:932 +#: ../../reference/compound_stmts.rst:944 msgid "Sequence Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:934 +#: ../../reference/compound_stmts.rst:946 msgid "" "A sequence pattern contains several subpatterns to be matched against " "sequence elements. The syntax is similar to the unpacking of a list or tuple." msgstr "" -#: ../../reference/compound_stmts.rst:945 +#: ../../reference/compound_stmts.rst:957 msgid "" "There is no difference if parentheses or square brackets are used for " "sequence patterns (i.e. ``(...)`` vs ``[...]`` )." msgstr "" -#: ../../reference/compound_stmts.rst:949 +#: ../../reference/compound_stmts.rst:961 msgid "" "A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3 " "| 4)``) is a :ref:`group pattern `. While a single pattern " "enclosed in square brackets (e.g. ``[3 | 4]``) is still a sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:954 +#: ../../reference/compound_stmts.rst:966 msgid "" "At most one star subpattern may be in a sequence pattern. The star " "subpattern may occur in any position. If no star subpattern is present, the " @@ -938,40 +945,40 @@ msgid "" "variable-length sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:959 +#: ../../reference/compound_stmts.rst:971 msgid "" "The following is the logical flow for matching a sequence pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:962 +#: ../../reference/compound_stmts.rst:974 msgid "" "If the subject value is not a sequence [#]_, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:965 +#: ../../reference/compound_stmts.rst:977 msgid "" "If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " "the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:968 +#: ../../reference/compound_stmts.rst:980 msgid "" "The subsequent steps depend on whether the sequence pattern is fixed or " "variable-length." msgstr "" -#: ../../reference/compound_stmts.rst:971 +#: ../../reference/compound_stmts.rst:983 msgid "If the sequence pattern is fixed-length:" msgstr "" -#: ../../reference/compound_stmts.rst:973 +#: ../../reference/compound_stmts.rst:985 msgid "" "If the length of the subject sequence is not equal to the number of " "subpatterns, the sequence pattern fails" msgstr "" -#: ../../reference/compound_stmts.rst:976 +#: ../../reference/compound_stmts.rst:988 msgid "" "Subpatterns in the sequence pattern are matched to their corresponding items " "in the subject sequence from left to right. Matching stops as soon as a " @@ -979,118 +986,118 @@ msgid "" "corresponding item, the sequence pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:981 +#: ../../reference/compound_stmts.rst:993 msgid "Otherwise, if the sequence pattern is variable-length:" msgstr "" -#: ../../reference/compound_stmts.rst:983 +#: ../../reference/compound_stmts.rst:995 msgid "" "If the length of the subject sequence is less than the number of non-star " "subpatterns, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:986 +#: ../../reference/compound_stmts.rst:998 msgid "" "The leading non-star subpatterns are matched to their corresponding items as " "for fixed-length sequences." msgstr "" -#: ../../reference/compound_stmts.rst:989 +#: ../../reference/compound_stmts.rst:1001 msgid "" "If the previous step succeeds, the star subpattern matches a list formed of " "the remaining subject items, excluding the remaining items corresponding to " "non-star subpatterns following the star subpattern." msgstr "" -#: ../../reference/compound_stmts.rst:993 +#: ../../reference/compound_stmts.rst:1005 msgid "" "Remaining non-star subpatterns are matched to their corresponding subject " "items, as for a fixed-length sequence." msgstr "" -#: ../../reference/compound_stmts.rst:996 +#: ../../reference/compound_stmts.rst:1008 msgid "" "The length of the subject sequence is obtained via :func:`len` (i.e. via " "the :meth:`__len__` protocol). This length may be cached by the interpreter " "in a similar manner as :ref:`value patterns `." msgstr "" -#: ../../reference/compound_stmts.rst:1002 +#: ../../reference/compound_stmts.rst:1014 msgid "" "In simple terms ``[P1, P2, P3,`` ... ``, P]`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1005 +#: ../../reference/compound_stmts.rst:1017 msgid "check ```` is a sequence" msgstr "" -#: ../../reference/compound_stmts.rst:1006 +#: ../../reference/compound_stmts.rst:1018 msgid "``len(subject) == ``" msgstr "``len(subject) == ``" -#: ../../reference/compound_stmts.rst:1007 +#: ../../reference/compound_stmts.rst:1019 msgid "" "``P1`` matches ``[0]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:1008 +#: ../../reference/compound_stmts.rst:1020 msgid "" "``P2`` matches ``[1]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:1009 +#: ../../reference/compound_stmts.rst:1021 msgid "... and so on for the corresponding pattern/element." msgstr "" -#: ../../reference/compound_stmts.rst:1014 +#: ../../reference/compound_stmts.rst:1026 msgid "Mapping Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:1016 +#: ../../reference/compound_stmts.rst:1028 msgid "" "A mapping pattern contains one or more key-value patterns. The syntax is " "similar to the construction of a dictionary. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:1027 +#: ../../reference/compound_stmts.rst:1039 msgid "" "At most one double star pattern may be in a mapping pattern. The double " "star pattern must be the last subpattern in the mapping pattern." msgstr "" -#: ../../reference/compound_stmts.rst:1030 +#: ../../reference/compound_stmts.rst:1042 msgid "" "Duplicate keys in mapping patterns are disallowed. Duplicate literal keys " "will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value " "will raise a :exc:`ValueError` at runtime." msgstr "" -#: ../../reference/compound_stmts.rst:1034 +#: ../../reference/compound_stmts.rst:1046 msgid "" "The following is the logical flow for matching a mapping pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:1037 +#: ../../reference/compound_stmts.rst:1049 msgid "If the subject value is not a mapping [#]_,the mapping pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:1039 +#: ../../reference/compound_stmts.rst:1051 msgid "" "If every key given in the mapping pattern is present in the subject mapping, " "and the pattern for each key matches the corresponding item of the subject " "mapping, the mapping pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:1043 +#: ../../reference/compound_stmts.rst:1055 msgid "" "If duplicate keys are detected in the mapping pattern, the pattern is " "considered invalid. A :exc:`SyntaxError` is raised for duplicate literal " "values; or a :exc:`ValueError` for named keys of the same value." msgstr "" -#: ../../reference/compound_stmts.rst:1047 +#: ../../reference/compound_stmts.rst:1059 msgid "" "Key-value pairs are matched using the two-argument form of the mapping " "subject's ``get()`` method. Matched key-value pairs must already be present " @@ -1098,256 +1105,256 @@ msgid "" "`__getitem__`." msgstr "" -#: ../../reference/compound_stmts.rst:1052 +#: ../../reference/compound_stmts.rst:1064 msgid "" "In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1055 +#: ../../reference/compound_stmts.rst:1067 msgid "check ```` is a mapping" msgstr "" -#: ../../reference/compound_stmts.rst:1056 +#: ../../reference/compound_stmts.rst:1068 msgid "``KEY1 in ``" msgstr "``KEY1 in ``" -#: ../../reference/compound_stmts.rst:1057 +#: ../../reference/compound_stmts.rst:1069 msgid "``P1`` matches ``[KEY1]``" msgstr "" -#: ../../reference/compound_stmts.rst:1058 +#: ../../reference/compound_stmts.rst:1070 msgid "... and so on for the corresponding KEY/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:1064 +#: ../../reference/compound_stmts.rst:1076 msgid "Class Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:1066 +#: ../../reference/compound_stmts.rst:1078 msgid "" "A class pattern represents a class and its positional and keyword arguments " "(if any). Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:1077 +#: ../../reference/compound_stmts.rst:1089 msgid "The same keyword should not be repeated in class patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1079 +#: ../../reference/compound_stmts.rst:1091 msgid "" "The following is the logical flow for matching a class pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:1082 +#: ../../reference/compound_stmts.rst:1094 msgid "" "If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise :" "exc:`TypeError`." msgstr "" -#: ../../reference/compound_stmts.rst:1085 +#: ../../reference/compound_stmts.rst:1097 msgid "" "If the subject value is not an instance of ``name_or_attr`` (tested via :" "func:`isinstance`), the class pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:1088 +#: ../../reference/compound_stmts.rst:1100 msgid "" "If no pattern arguments are present, the pattern succeeds. Otherwise, the " "subsequent steps depend on whether keyword or positional argument patterns " "are present." msgstr "" -#: ../../reference/compound_stmts.rst:1092 +#: ../../reference/compound_stmts.rst:1104 msgid "" "For a number of built-in types (specified below), a single positional " "subpattern is accepted which will match the entire subject; for these types " "keyword patterns also work as for other types." msgstr "" -#: ../../reference/compound_stmts.rst:1096 +#: ../../reference/compound_stmts.rst:1108 msgid "" "If only keyword patterns are present, they are processed as follows, one by " "one:" msgstr "" -#: ../../reference/compound_stmts.rst:1099 +#: ../../reference/compound_stmts.rst:1111 msgid "I. The keyword is looked up as an attribute on the subject." msgstr "" -#: ../../reference/compound_stmts.rst:1101 +#: ../../reference/compound_stmts.rst:1113 msgid "" "If this raises an exception other than :exc:`AttributeError`, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1104 +#: ../../reference/compound_stmts.rst:1116 msgid "If this raises :exc:`AttributeError`, the class pattern has failed." msgstr "" -#: ../../reference/compound_stmts.rst:1106 +#: ../../reference/compound_stmts.rst:1118 msgid "" "Else, the subpattern associated with the keyword pattern is matched against " "the subject's attribute value. If this fails, the class pattern fails; if " "this succeeds, the match proceeds to the next keyword." msgstr "" -#: ../../reference/compound_stmts.rst:1111 +#: ../../reference/compound_stmts.rst:1123 msgid "II. If all keyword patterns succeed, the class pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:1113 +#: ../../reference/compound_stmts.rst:1125 msgid "" "If any positional patterns are present, they are converted to keyword " "patterns using the :data:`~object.__match_args__` attribute on the class " "``name_or_attr`` before matching:" msgstr "" -#: ../../reference/compound_stmts.rst:1117 +#: ../../reference/compound_stmts.rst:1129 msgid "" "I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." msgstr "" -#: ../../reference/compound_stmts.rst:1119 +#: ../../reference/compound_stmts.rst:1131 msgid "If this raises an exception, the exception bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1121 +#: ../../reference/compound_stmts.rst:1133 msgid "" "If the returned value is not a tuple, the conversion fails and :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1124 +#: ../../reference/compound_stmts.rst:1136 msgid "" "If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1127 +#: ../../reference/compound_stmts.rst:1139 msgid "" "Otherwise, positional pattern ``i`` is converted to a keyword pattern using " "``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " "string; if not :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1131 +#: ../../reference/compound_stmts.rst:1143 msgid "If there are duplicate keywords, :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1133 +#: ../../reference/compound_stmts.rst:1145 msgid ":ref:`class-pattern-matching`" msgstr ":ref:`class-pattern-matching`" -#: ../../reference/compound_stmts.rst:1136 +#: ../../reference/compound_stmts.rst:1148 msgid "" "II. Once all positional patterns have been converted to keyword patterns," msgstr "" -#: ../../reference/compound_stmts.rst:1136 +#: ../../reference/compound_stmts.rst:1148 msgid "the match proceeds as if there were only keyword patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1138 +#: ../../reference/compound_stmts.rst:1150 msgid "" "For the following built-in types the handling of positional subpatterns is " "different:" msgstr "" -#: ../../reference/compound_stmts.rst:1141 +#: ../../reference/compound_stmts.rst:1153 msgid ":class:`bool`" msgstr ":class:`bool`" -#: ../../reference/compound_stmts.rst:1142 +#: ../../reference/compound_stmts.rst:1154 msgid ":class:`bytearray`" msgstr ":class:`bytearray`" -#: ../../reference/compound_stmts.rst:1143 +#: ../../reference/compound_stmts.rst:1155 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../reference/compound_stmts.rst:1144 +#: ../../reference/compound_stmts.rst:1156 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../reference/compound_stmts.rst:1145 +#: ../../reference/compound_stmts.rst:1157 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../reference/compound_stmts.rst:1146 +#: ../../reference/compound_stmts.rst:1158 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../reference/compound_stmts.rst:1147 +#: ../../reference/compound_stmts.rst:1159 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../reference/compound_stmts.rst:1148 -#: ../../reference/compound_stmts.rst:1599 +#: ../../reference/compound_stmts.rst:1160 +#: ../../reference/compound_stmts.rst:1611 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../reference/compound_stmts.rst:1149 +#: ../../reference/compound_stmts.rst:1161 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../reference/compound_stmts.rst:1150 +#: ../../reference/compound_stmts.rst:1162 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../reference/compound_stmts.rst:1151 -#: ../../reference/compound_stmts.rst:1602 +#: ../../reference/compound_stmts.rst:1163 +#: ../../reference/compound_stmts.rst:1614 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../reference/compound_stmts.rst:1153 +#: ../../reference/compound_stmts.rst:1165 msgid "" "These classes accept a single positional argument, and the pattern there is " "matched against the whole object rather than an attribute. For example " "``int(0|1)`` matches the value ``0``, but not the value ``0.0``." msgstr "" -#: ../../reference/compound_stmts.rst:1157 +#: ../../reference/compound_stmts.rst:1169 msgid "" "In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1159 +#: ../../reference/compound_stmts.rst:1171 msgid "``isinstance(, CLS)``" msgstr "``isinstance(, CLS)``" -#: ../../reference/compound_stmts.rst:1160 +#: ../../reference/compound_stmts.rst:1172 msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgstr "" -#: ../../reference/compound_stmts.rst:1162 +#: ../../reference/compound_stmts.rst:1174 msgid "For each keyword argument ``attr=P2``:" msgstr "" -#: ../../reference/compound_stmts.rst:1162 +#: ../../reference/compound_stmts.rst:1174 msgid "``hasattr(, \"attr\")``" msgstr "``hasattr(, \"attr\")``" -#: ../../reference/compound_stmts.rst:1163 +#: ../../reference/compound_stmts.rst:1175 msgid "``P2`` matches ``.attr``" msgstr "" -#: ../../reference/compound_stmts.rst:1164 +#: ../../reference/compound_stmts.rst:1176 msgid "... and so on for the corresponding keyword argument/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:1179 +#: ../../reference/compound_stmts.rst:1191 msgid "Function definitions" msgstr "函式定義" -#: ../../reference/compound_stmts.rst:1194 +#: ../../reference/compound_stmts.rst:1206 msgid "" "A function definition defines a user-defined function object (see section :" "ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1225 msgid "" "A function definition is an executable statement. Its execution binds the " "function name in the current local namespace to a function object (a wrapper " @@ -1356,13 +1363,13 @@ msgid "" "used when the function is called." msgstr "" -#: ../../reference/compound_stmts.rst:1219 +#: ../../reference/compound_stmts.rst:1231 msgid "" "The function definition does not execute the function body; this gets " "executed only when the function is called. [#]_" msgstr "" -#: ../../reference/compound_stmts.rst:1225 +#: ../../reference/compound_stmts.rst:1237 msgid "" "A function definition may be wrapped by one or more :term:`decorator` " "expressions. Decorator expressions are evaluated when the function is " @@ -1373,28 +1380,28 @@ msgid "" "example, the following code ::" msgstr "" -#: ../../reference/compound_stmts.rst:1236 -#: ../../reference/compound_stmts.rst:1413 +#: ../../reference/compound_stmts.rst:1248 +#: ../../reference/compound_stmts.rst:1425 msgid "is roughly equivalent to ::" msgstr "" "大致等價於:\n" "\n" "::" -#: ../../reference/compound_stmts.rst:1241 +#: ../../reference/compound_stmts.rst:1253 msgid "" "except that the original function is not temporarily bound to the name " "``func``." msgstr "" -#: ../../reference/compound_stmts.rst:1243 +#: ../../reference/compound_stmts.rst:1255 msgid "" "Functions may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1253 +#: ../../reference/compound_stmts.rst:1265 msgid "" "When one or more :term:`parameters ` have the form *parameter* " "``=`` *expression*, the function is said to have \"default parameter values." @@ -1405,7 +1412,7 @@ msgid "" "syntactic restriction that is not expressed by the grammar." msgstr "" -#: ../../reference/compound_stmts.rst:1261 +#: ../../reference/compound_stmts.rst:1273 msgid "" "**Default parameter values are evaluated from left to right when the " "function definition is executed.** This means that the expression is " @@ -1418,7 +1425,7 @@ msgid "" "the default, and explicitly test for it in the body of the function, e.g.::" msgstr "" -#: ../../reference/compound_stmts.rst:1282 +#: ../../reference/compound_stmts.rst:1294 msgid "" "Function call semantics are described in more detail in section :ref:" "`calls`. A function call always assigns values to all parameters mentioned " @@ -1434,13 +1441,13 @@ msgid "" "positional arguments." msgstr "" -#: ../../reference/compound_stmts.rst:1294 +#: ../../reference/compound_stmts.rst:1306 msgid "" "The ``/`` function parameter syntax may be used to indicate positional-only " "parameters. See :pep:`570` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1303 +#: ../../reference/compound_stmts.rst:1315 msgid "" "Parameters may have an :term:`annotation ` of the form " "\"``: expression``\" following the parameter name. Any parameter may have " @@ -1457,7 +1464,7 @@ msgid "" "different order than they appear in the source code." msgstr "" -#: ../../reference/compound_stmts.rst:1318 +#: ../../reference/compound_stmts.rst:1330 msgid "" "It is also possible to create anonymous functions (functions not bound to a " "name), for immediate use in expressions. This uses lambda expressions, " @@ -1469,7 +1476,7 @@ msgid "" "execution of multiple statements and annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1326 +#: ../../reference/compound_stmts.rst:1338 msgid "" "**Programmer's note:** Functions are first-class objects. A \"``def``\" " "statement executed inside a function definition defines a local function " @@ -1478,51 +1485,51 @@ msgid "" "See section :ref:`naming` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1335 +#: ../../reference/compound_stmts.rst:1347 msgid ":pep:`3107` - Function Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1335 +#: ../../reference/compound_stmts.rst:1347 msgid "The original specification for function annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1338 +#: ../../reference/compound_stmts.rst:1350 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/compound_stmts.rst:1338 +#: ../../reference/compound_stmts.rst:1350 msgid "Definition of a standard meaning for annotations: type hints." msgstr "" -#: ../../reference/compound_stmts.rst:1342 +#: ../../reference/compound_stmts.rst:1354 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1341 +#: ../../reference/compound_stmts.rst:1353 msgid "" "Ability to type hint variable declarations, including class variables and " "instance variables" msgstr "" -#: ../../reference/compound_stmts.rst:1345 +#: ../../reference/compound_stmts.rst:1357 msgid ":pep:`563` - Postponed Evaluation of Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1345 +#: ../../reference/compound_stmts.rst:1357 msgid "" "Support for forward references within annotations by preserving annotations " "in a string form at runtime instead of eager evaluation." msgstr "" -#: ../../reference/compound_stmts.rst:1352 +#: ../../reference/compound_stmts.rst:1364 msgid "Class definitions" msgstr "" -#: ../../reference/compound_stmts.rst:1367 +#: ../../reference/compound_stmts.rst:1379 msgid "A class definition defines a class object (see section :ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1374 +#: ../../reference/compound_stmts.rst:1386 msgid "" "A class definition is an executable statement. The inheritance list usually " "gives a list of base classes (see :ref:`metaclasses` for more advanced " @@ -1531,11 +1538,11 @@ msgid "" "default, from the base class :class:`object`; hence, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1383 +#: ../../reference/compound_stmts.rst:1395 msgid "is equivalent to ::" msgstr "" -#: ../../reference/compound_stmts.rst:1388 +#: ../../reference/compound_stmts.rst:1400 msgid "" "The class's suite is then executed in a new execution frame (see :ref:" "`naming`), using a newly created local namespace and the original global " @@ -1547,7 +1554,7 @@ msgid "" "original local namespace." msgstr "" -#: ../../reference/compound_stmts.rst:1397 +#: ../../reference/compound_stmts.rst:1409 msgid "" "The order in which attributes are defined in the class body is preserved in " "the new class's ``__dict__``. Note that this is reliable only right after " @@ -1555,30 +1562,30 @@ msgid "" "definition syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1402 +#: ../../reference/compound_stmts.rst:1414 msgid "" "Class creation can be customized heavily using :ref:`metaclasses " "`." msgstr "" -#: ../../reference/compound_stmts.rst:1407 +#: ../../reference/compound_stmts.rst:1419 msgid "Classes can also be decorated: just like when decorating functions, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1418 +#: ../../reference/compound_stmts.rst:1430 msgid "" "The evaluation rules for the decorator expressions are the same as for " "function decorators. The result is then bound to the class name." msgstr "" -#: ../../reference/compound_stmts.rst:1421 +#: ../../reference/compound_stmts.rst:1433 msgid "" "Classes may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1426 +#: ../../reference/compound_stmts.rst:1438 msgid "" "**Programmer's note:** Variables defined in the class definition are class " "attributes; they are shared by instances. Instance attributes can be set in " @@ -1591,35 +1598,35 @@ msgid "" "implementation details." msgstr "" -#: ../../reference/compound_stmts.rst:1441 +#: ../../reference/compound_stmts.rst:1453 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/compound_stmts.rst:1439 +#: ../../reference/compound_stmts.rst:1451 msgid "" "The proposal that changed the declaration of metaclasses to the current " "syntax, and the semantics for how classes with metaclasses are constructed." msgstr "" -#: ../../reference/compound_stmts.rst:1444 +#: ../../reference/compound_stmts.rst:1456 msgid ":pep:`3129` - Class Decorators" msgstr "" -#: ../../reference/compound_stmts.rst:1444 +#: ../../reference/compound_stmts.rst:1456 msgid "" "The proposal that added class decorators. Function and method decorators " "were introduced in :pep:`318`." msgstr "" -#: ../../reference/compound_stmts.rst:1451 +#: ../../reference/compound_stmts.rst:1463 msgid "Coroutines" msgstr "協程" -#: ../../reference/compound_stmts.rst:1459 +#: ../../reference/compound_stmts.rst:1471 msgid "Coroutine function definition" msgstr "" -#: ../../reference/compound_stmts.rst:1469 +#: ../../reference/compound_stmts.rst:1481 msgid "" "Execution of Python coroutines can be suspended and resumed at many points " "(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` " @@ -1627,189 +1634,189 @@ msgid "" "function." msgstr "" -#: ../../reference/compound_stmts.rst:1473 +#: ../../reference/compound_stmts.rst:1485 msgid "" "Functions defined with ``async def`` syntax are always coroutine functions, " "even if they do not contain ``await`` or ``async`` keywords." msgstr "" -#: ../../reference/compound_stmts.rst:1476 +#: ../../reference/compound_stmts.rst:1488 msgid "" "It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1479 +#: ../../reference/compound_stmts.rst:1491 msgid "An example of a coroutine function::" msgstr "" "一個協程韓式函式範例:\n" "\n" "::" -#: ../../reference/compound_stmts.rst:1485 +#: ../../reference/compound_stmts.rst:1497 msgid "" "``await`` and ``async`` are now keywords; previously they were only treated " "as such inside the body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1493 +#: ../../reference/compound_stmts.rst:1505 msgid "The :keyword:`!async for` statement" msgstr "" -#: ../../reference/compound_stmts.rst:1498 +#: ../../reference/compound_stmts.rst:1510 msgid "" "An :term:`asynchronous iterable` provides an ``__aiter__`` method that " "directly returns an :term:`asynchronous iterator`, which can call " "asynchronous code in its ``__anext__`` method." msgstr "" -#: ../../reference/compound_stmts.rst:1502 +#: ../../reference/compound_stmts.rst:1514 msgid "" "The ``async for`` statement allows convenient iteration over asynchronous " "iterables." msgstr "" -#: ../../reference/compound_stmts.rst:1512 +#: ../../reference/compound_stmts.rst:1524 msgid "Is semantically equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:1528 +#: ../../reference/compound_stmts.rst:1540 msgid "" "See also :meth:`~object.__aiter__` and :meth:`~object.__anext__` for details." msgstr "" "更多細節請見 :meth:`~object.__aiter__` 與 :meth:`~object.__anext__`\\ 。" -#: ../../reference/compound_stmts.rst:1530 +#: ../../reference/compound_stmts.rst:1542 msgid "" "It is a :exc:`SyntaxError` to use an ``async for`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1538 +#: ../../reference/compound_stmts.rst:1550 msgid "The :keyword:`!async with` statement" msgstr "" -#: ../../reference/compound_stmts.rst:1543 +#: ../../reference/compound_stmts.rst:1555 msgid "" "An :term:`asynchronous context manager` is a :term:`context manager` that is " "able to suspend execution in its *enter* and *exit* methods." msgstr "" -#: ../../reference/compound_stmts.rst:1570 +#: ../../reference/compound_stmts.rst:1582 msgid "" "See also :meth:`~object.__aenter__` and :meth:`~object.__aexit__` for " "details." msgstr "" "更多細節請見 :meth:`~object.__aenter__` 與 :meth:`~object.__aexit__`\\ 。" -#: ../../reference/compound_stmts.rst:1572 +#: ../../reference/compound_stmts.rst:1584 msgid "" "It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1578 +#: ../../reference/compound_stmts.rst:1590 msgid ":pep:`492` - Coroutines with async and await syntax" msgstr "" -#: ../../reference/compound_stmts.rst:1578 +#: ../../reference/compound_stmts.rst:1590 msgid "" "The proposal that made coroutines a proper standalone concept in Python, and " "added supporting syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1583 +#: ../../reference/compound_stmts.rst:1595 msgid "Footnotes" msgstr "註解" -#: ../../reference/compound_stmts.rst:1584 +#: ../../reference/compound_stmts.rst:1596 msgid "" "The exception is propagated to the invocation stack unless there is a :" "keyword:`finally` clause which happens to raise another exception. That new " "exception causes the old one to be lost." msgstr "" -#: ../../reference/compound_stmts.rst:1588 +#: ../../reference/compound_stmts.rst:1600 msgid "In pattern matching, a sequence is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1590 +#: ../../reference/compound_stmts.rst:1602 msgid "a class that inherits from :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1591 +#: ../../reference/compound_stmts.rst:1603 msgid "" "a Python class that has been registered as :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1592 +#: ../../reference/compound_stmts.rst:1604 msgid "" "a builtin class that has its (CPython) :data:`Py_TPFLAGS_SEQUENCE` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1593 -#: ../../reference/compound_stmts.rst:1612 +#: ../../reference/compound_stmts.rst:1605 +#: ../../reference/compound_stmts.rst:1624 msgid "a class that inherits from any of the above" msgstr "" -#: ../../reference/compound_stmts.rst:1595 +#: ../../reference/compound_stmts.rst:1607 msgid "The following standard library classes are sequences:" msgstr "" -#: ../../reference/compound_stmts.rst:1597 +#: ../../reference/compound_stmts.rst:1609 msgid ":class:`array.array`" msgstr ":class:`array.array`" -#: ../../reference/compound_stmts.rst:1598 +#: ../../reference/compound_stmts.rst:1610 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../reference/compound_stmts.rst:1600 +#: ../../reference/compound_stmts.rst:1612 msgid ":class:`memoryview`" msgstr ":class:`memoryview`" -#: ../../reference/compound_stmts.rst:1601 +#: ../../reference/compound_stmts.rst:1613 msgid ":class:`range`" msgstr ":class:`range`" -#: ../../reference/compound_stmts.rst:1604 +#: ../../reference/compound_stmts.rst:1616 msgid "" "Subject values of type ``str``, ``bytes``, and ``bytearray`` do not match " "sequence patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1607 +#: ../../reference/compound_stmts.rst:1619 msgid "In pattern matching, a mapping is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1609 +#: ../../reference/compound_stmts.rst:1621 msgid "a class that inherits from :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1610 +#: ../../reference/compound_stmts.rst:1622 msgid "" "a Python class that has been registered as :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1611 +#: ../../reference/compound_stmts.rst:1623 msgid "" "a builtin class that has its (CPython) :data:`Py_TPFLAGS_MAPPING` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1614 +#: ../../reference/compound_stmts.rst:1626 msgid "" "The standard library classes :class:`dict` and :class:`types." "MappingProxyType` are mappings." msgstr "" -#: ../../reference/compound_stmts.rst:1617 +#: ../../reference/compound_stmts.rst:1629 msgid "" "A string literal appearing as the first statement in the function body is " "transformed into the function's ``__doc__`` attribute and therefore the " "function's :term:`docstring`." msgstr "" -#: ../../reference/compound_stmts.rst:1621 +#: ../../reference/compound_stmts.rst:1633 msgid "" "A string literal appearing as the first statement in the class body is " "transformed into the namespace's ``__doc__`` item and therefore the class's :" diff --git a/reference/datamodel.po b/reference/datamodel.po index fdc90f9ae6..efa54ab3e2 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -1944,7 +1944,7 @@ msgid "" "See :ref:`special-lookup`." msgstr "" -#: ../../reference/datamodel.rst:1637 +#: ../../reference/datamodel.rst:16 msgid "" "Raises an :ref:`auditing event ` ``object.__getattr__`` with " "arguments ``obj``, ``name``." @@ -1970,7 +1970,7 @@ msgid "" "__setattr__(self, name, value)``." msgstr "" -#: ../../reference/datamodel.rst:1654 +#: ../../reference/datamodel.rst:9 msgid "" "Raises an :ref:`auditing event ` ``object.__setattr__`` with " "arguments ``obj``, ``name``, ``value``." @@ -1990,7 +1990,7 @@ msgid "" "object." msgstr "" -#: ../../reference/datamodel.rst:1666 +#: ../../reference/datamodel.rst:4 msgid "" "Raises an :ref:`auditing event ` ``object.__delattr__`` with " "arguments ``obj``, ``name``." @@ -2263,18 +2263,18 @@ msgid "" "`~object.__dict__` and *__weakref__* for each instance." msgstr "" -#: ../../reference/datamodel.rst:1908 +#: ../../reference/datamodel.rst:1910 msgid "Notes on using *__slots__*" msgstr "" -#: ../../reference/datamodel.rst:1910 +#: ../../reference/datamodel.rst:1912 msgid "" "When inheriting from a class without *__slots__*, the :attr:`~object." "__dict__` and *__weakref__* attribute of the instances will always be " "accessible." msgstr "" -#: ../../reference/datamodel.rst:1914 +#: ../../reference/datamodel.rst:1916 msgid "" "Without a :attr:`~object.__dict__` variable, instances cannot be assigned " "new variables not listed in the *__slots__* definition. Attempts to assign " @@ -2283,7 +2283,7 @@ msgid "" "sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:1921 +#: ../../reference/datamodel.rst:1923 msgid "" "Without a *__weakref__* variable for each instance, classes defining " "*__slots__* do not support :mod:`weak references ` to its " @@ -2291,7 +2291,7 @@ msgid "" "to the sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:1927 +#: ../../reference/datamodel.rst:1929 msgid "" "*__slots__* are implemented at the class level by creating :ref:`descriptors " "` for each variable name. As a result, class attributes cannot " @@ -2299,7 +2299,7 @@ msgid "" "otherwise, the class attribute would overwrite the descriptor assignment." msgstr "" -#: ../../reference/datamodel.rst:1933 +#: ../../reference/datamodel.rst:1935 msgid "" "The action of a *__slots__* declaration is not limited to the class where it " "is defined. *__slots__* declared in parents are available in child classes. " @@ -2308,7 +2308,7 @@ msgid "" "names of any *additional* slots)." msgstr "" -#: ../../reference/datamodel.rst:1939 +#: ../../reference/datamodel.rst:1941 msgid "" "If a class defines a slot also defined in a base class, the instance " "variable defined by the base class slot is inaccessible (except by " @@ -2317,17 +2317,17 @@ msgid "" "prevent this." msgstr "" -#: ../../reference/datamodel.rst:1944 +#: ../../reference/datamodel.rst:1946 msgid "" "Nonempty *__slots__* does not work for classes derived from \"variable-length" "\" built-in types such as :class:`int`, :class:`bytes` and :class:`tuple`." msgstr "" -#: ../../reference/datamodel.rst:1947 +#: ../../reference/datamodel.rst:1949 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:1949 +#: ../../reference/datamodel.rst:1951 msgid "" "If a :class:`dictionary ` is used to assign *__slots__*, the " "dictionary keys will be used as the slot names. The values of the dictionary " @@ -2335,13 +2335,13 @@ msgid "" "func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../reference/datamodel.rst:1954 +#: ../../reference/datamodel.rst:1956 msgid "" ":attr:`~instance.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:1957 +#: ../../reference/datamodel.rst:1959 msgid "" ":ref:`Multiple inheritance ` with multiple slotted parent " "classes can be used, but only one parent is allowed to have attributes " @@ -2349,18 +2349,18 @@ msgid "" "raise :exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:1963 +#: ../../reference/datamodel.rst:1965 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:1971 +#: ../../reference/datamodel.rst:1973 msgid "Customizing class creation" msgstr "" -#: ../../reference/datamodel.rst:1973 +#: ../../reference/datamodel.rst:1975 msgid "" "Whenever a class inherits from another class, :meth:`~object." "__init_subclass__` is called on the parent class. This way, it is possible " @@ -2370,14 +2370,14 @@ msgid "" "future subclasses of the class defining the method." msgstr "" -#: ../../reference/datamodel.rst:1982 +#: ../../reference/datamodel.rst:1984 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:1986 +#: ../../reference/datamodel.rst:1988 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 " @@ -2385,13 +2385,13 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../reference/datamodel.rst:2000 +#: ../../reference/datamodel.rst:2002 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../reference/datamodel.rst:2005 +#: ../../reference/datamodel.rst:2007 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -2399,41 +2399,41 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../reference/datamodel.rst:2013 +#: ../../reference/datamodel.rst:2015 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:2018 +#: ../../reference/datamodel.rst:2020 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:2024 +#: ../../reference/datamodel.rst:2026 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:2035 +#: ../../reference/datamodel.rst:2037 msgid "See :ref:`class-object-creation` for more details." msgstr "更多細節請見 :ref:`class-object-creation`\\ 。" -#: ../../reference/datamodel.rst:2043 +#: ../../reference/datamodel.rst:2045 msgid "Metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2050 +#: ../../reference/datamodel.rst:2052 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:2054 +#: ../../reference/datamodel.rst:2056 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -2441,41 +2441,41 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../reference/datamodel.rst:2068 +#: ../../reference/datamodel.rst:2070 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:2071 +#: ../../reference/datamodel.rst:2073 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../reference/datamodel.rst:2073 +#: ../../reference/datamodel.rst:2075 msgid "MRO entries are resolved;" msgstr "" -#: ../../reference/datamodel.rst:2074 +#: ../../reference/datamodel.rst:2076 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../reference/datamodel.rst:2075 +#: ../../reference/datamodel.rst:2077 msgid "the class namespace is prepared;" msgstr "" -#: ../../reference/datamodel.rst:2076 +#: ../../reference/datamodel.rst:2078 msgid "the class body is executed;" msgstr "" -#: ../../reference/datamodel.rst:2077 +#: ../../reference/datamodel.rst:2079 msgid "the class object is created." msgstr "" -#: ../../reference/datamodel.rst:2081 +#: ../../reference/datamodel.rst:2083 msgid "Resolving MRO entries" msgstr "" -#: ../../reference/datamodel.rst:2083 +#: ../../reference/datamodel.rst:2085 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 " @@ -2484,37 +2484,37 @@ msgid "" "such case the original base is ignored." msgstr "" -#: ../../reference/datamodel.rst:2091 +#: ../../reference/datamodel.rst:2093 msgid ":pep:`560` - Core support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:2095 +#: ../../reference/datamodel.rst:2097 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../reference/datamodel.rst:2099 +#: ../../reference/datamodel.rst:2101 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../reference/datamodel.rst:2101 +#: ../../reference/datamodel.rst:2103 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../reference/datamodel.rst:2102 +#: ../../reference/datamodel.rst:2104 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:2104 +#: ../../reference/datamodel.rst:2106 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:2107 +#: ../../reference/datamodel.rst:2109 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -2523,11 +2523,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../reference/datamodel.rst:2117 +#: ../../reference/datamodel.rst:2119 msgid "Preparing the class namespace" msgstr "" -#: ../../reference/datamodel.rst:2122 +#: ../../reference/datamodel.rst:2124 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -2539,25 +2539,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../reference/datamodel.rst:2131 +#: ../../reference/datamodel.rst:2133 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../reference/datamodel.rst:2136 +#: ../../reference/datamodel.rst:2138 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/datamodel.rst:2137 +#: ../../reference/datamodel.rst:2139 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../reference/datamodel.rst:2141 +#: ../../reference/datamodel.rst:2143 msgid "Executing the class body" msgstr "" -#: ../../reference/datamodel.rst:2146 +#: ../../reference/datamodel.rst:2148 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -2566,7 +2566,7 @@ msgid "" "inside a function." msgstr "" -#: ../../reference/datamodel.rst:2152 +#: ../../reference/datamodel.rst:2154 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. " @@ -2575,11 +2575,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../reference/datamodel.rst:2161 +#: ../../reference/datamodel.rst:2163 msgid "Creating the class object" msgstr "" -#: ../../reference/datamodel.rst:2168 +#: ../../reference/datamodel.rst:2170 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -2587,7 +2587,7 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../reference/datamodel.rst:2173 +#: ../../reference/datamodel.rst:2175 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 " @@ -2598,7 +2598,7 @@ msgid "" "is identified based on the first argument passed to the method." msgstr "" -#: ../../reference/datamodel.rst:2183 +#: ../../reference/datamodel.rst:2185 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 " @@ -2607,39 +2607,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../reference/datamodel.rst:2189 +#: ../../reference/datamodel.rst:2191 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:2193 +#: ../../reference/datamodel.rst:2195 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:2195 +#: ../../reference/datamodel.rst:2197 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../reference/datamodel.rst:2197 +#: ../../reference/datamodel.rst:2199 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:2200 +#: ../../reference/datamodel.rst:2202 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:2204 +#: ../../reference/datamodel.rst:2206 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 " @@ -2647,19 +2647,19 @@ msgid "" "becomes the :attr:`~object.__dict__` attribute of the class object." msgstr "" -#: ../../reference/datamodel.rst:2211 +#: ../../reference/datamodel.rst:2213 msgid ":pep:`3135` - New super" msgstr "" -#: ../../reference/datamodel.rst:2212 +#: ../../reference/datamodel.rst:2214 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../reference/datamodel.rst:2216 +#: ../../reference/datamodel.rst:2218 msgid "Uses for metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2218 +#: ../../reference/datamodel.rst:2220 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -2667,17 +2667,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../reference/datamodel.rst:2225 +#: ../../reference/datamodel.rst:2227 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../reference/datamodel.rst:2227 +#: ../../reference/datamodel.rst:2229 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:2230 +#: ../../reference/datamodel.rst:2232 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -2685,21 +2685,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../reference/datamodel.rst:2237 +#: ../../reference/datamodel.rst:2239 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:2244 +#: ../../reference/datamodel.rst:2246 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:2249 +#: ../../reference/datamodel.rst:2251 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 " @@ -2707,11 +2707,11 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:2260 +#: ../../reference/datamodel.rst:2262 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../reference/datamodel.rst:2257 +#: ../../reference/datamodel.rst:2259 msgid "" "Includes the specification for customizing :func:`isinstance` and :func:" "`issubclass` behavior through :meth:`~class.__instancecheck__` and :meth:" @@ -2720,11 +2720,11 @@ msgid "" "language." msgstr "" -#: ../../reference/datamodel.rst:2265 +#: ../../reference/datamodel.rst:2267 msgid "Emulating generic types" msgstr "" -#: ../../reference/datamodel.rst:2267 +#: ../../reference/datamodel.rst:2269 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -2732,65 +2732,65 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:2275 +#: ../../reference/datamodel.rst:2277 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/datamodel.rst:2275 +#: ../../reference/datamodel.rst:2277 msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../reference/datamodel.rst:2278 +#: ../../reference/datamodel.rst:2280 msgid ":ref:`Generic Alias Types`" msgstr "" -#: ../../reference/datamodel.rst:2278 +#: ../../reference/datamodel.rst:2280 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:2281 +#: ../../reference/datamodel.rst:2283 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" -#: ../../reference/datamodel.rst:2281 +#: ../../reference/datamodel.rst:2283 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../reference/datamodel.rst:2284 +#: ../../reference/datamodel.rst:2286 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2289 +#: ../../reference/datamodel.rst:2291 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../reference/datamodel.rst:2292 +#: ../../reference/datamodel.rst:2294 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:2298 +#: ../../reference/datamodel.rst:2300 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2300 +#: ../../reference/datamodel.rst:2302 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:2304 +#: ../../reference/datamodel.rst:2306 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " @@ -2799,7 +2799,7 @@ msgid "" "own implementation of ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2310 +#: ../../reference/datamodel.rst:2312 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -2807,11 +2807,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../reference/datamodel.rst:2320 +#: ../../reference/datamodel.rst:2322 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2322 +#: ../../reference/datamodel.rst:2324 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -2821,14 +2821,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../reference/datamodel.rst:2329 +#: ../../reference/datamodel.rst:2331 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:2357 +#: ../../reference/datamodel.rst:2359 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 " @@ -2838,40 +2838,40 @@ msgid "" "__class_getitem__` being called::" msgstr "" -#: ../../reference/datamodel.rst:2376 +#: ../../reference/datamodel.rst:2378 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:2401 +#: ../../reference/datamodel.rst:2403 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:2400 +#: ../../reference/datamodel.rst:2402 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:2408 +#: ../../reference/datamodel.rst:2410 msgid "Emulating callable objects" msgstr "" -#: ../../reference/datamodel.rst:2415 +#: ../../reference/datamodel.rst:2417 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:2422 +#: ../../reference/datamodel.rst:2424 msgid "Emulating container types" msgstr "" -#: ../../reference/datamodel.rst:2424 +#: ../../reference/datamodel.rst:2426 msgid "" "The following methods can be defined to implement container objects. " "Containers usually are :term:`sequences ` (such as :class:`lists " @@ -2907,7 +2907,7 @@ msgid "" "the values." msgstr "" -#: ../../reference/datamodel.rst:2464 +#: ../../reference/datamodel.rst:2466 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 " @@ -2915,7 +2915,7 @@ msgid "" "zero is considered to be false in a Boolean context." msgstr "" -#: ../../reference/datamodel.rst:2471 +#: ../../reference/datamodel.rst:2473 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:" @@ -2924,7 +2924,7 @@ msgid "" "`__bool__` method." msgstr "" -#: ../../reference/datamodel.rst:2480 +#: ../../reference/datamodel.rst:2482 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). " @@ -2934,20 +2934,20 @@ msgid "" "never required for correctness." msgstr "" -#: ../../reference/datamodel.rst:2494 +#: ../../reference/datamodel.rst:2496 msgid "" "Slicing is done exclusively with the following three methods. A call like ::" msgstr "" -#: ../../reference/datamodel.rst:2498 +#: ../../reference/datamodel.rst:2500 msgid "is translated to ::" msgstr "" -#: ../../reference/datamodel.rst:2502 +#: ../../reference/datamodel.rst:2504 msgid "and so forth. Missing slice items are always filled in with ``None``." msgstr "" -#: ../../reference/datamodel.rst:2507 +#: ../../reference/datamodel.rst:2509 msgid "" "Called to implement evaluation of ``self[key]``. For :term:`sequence` types, " "the accepted keys should be integers and slice objects. Note that the " @@ -2960,20 +2960,20 @@ msgid "" "`KeyError` should be raised." msgstr "" -#: ../../reference/datamodel.rst:2519 +#: ../../reference/datamodel.rst:2521 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:2524 +#: ../../reference/datamodel.rst:2526 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:2532 +#: ../../reference/datamodel.rst:2534 msgid "" "Called to implement assignment to ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -2982,7 +2982,7 @@ msgid "" "for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:2541 +#: ../../reference/datamodel.rst:2543 msgid "" "Called to implement deletion of ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -2991,13 +2991,13 @@ msgid "" "values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:2550 +#: ../../reference/datamodel.rst:2552 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:2556 +#: ../../reference/datamodel.rst:2558 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 " @@ -3005,14 +3005,14 @@ msgid "" "of the container." msgstr "" -#: ../../reference/datamodel.rst:2564 +#: ../../reference/datamodel.rst:2566 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:2568 +#: ../../reference/datamodel.rst:2570 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 :" @@ -3021,7 +3021,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:2575 +#: ../../reference/datamodel.rst:2577 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -3029,14 +3029,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:2582 +#: ../../reference/datamodel.rst:2584 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:2586 +#: ../../reference/datamodel.rst:2588 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -3044,11 +3044,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:2595 +#: ../../reference/datamodel.rst:2597 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:2597 +#: ../../reference/datamodel.rst:2599 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -3056,7 +3056,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:2623 +#: ../../reference/datamodel.rst:2625 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -3070,13 +3070,13 @@ msgid "" "supported." msgstr "" -#: ../../reference/datamodel.rst:2634 +#: ../../reference/datamodel.rst:2636 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return ``NotImplemented``." msgstr "" -#: ../../reference/datamodel.rst:2657 +#: ../../reference/datamodel.rst:2659 msgid "" "These methods are called to implement the binary arithmetic operations (``" "+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, " @@ -3089,13 +3089,13 @@ msgid "" "*NotImplemented*." msgstr "" -#: ../../reference/datamodel.rst:2669 +#: ../../reference/datamodel.rst:2671 msgid "" "Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the " "coercion rules would become too complicated)." msgstr "" -#: ../../reference/datamodel.rst:2674 +#: ../../reference/datamodel.rst:2676 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 " @@ -3104,7 +3104,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:2695 +#: ../../reference/datamodel.rst:2697 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3120,19 +3120,19 @@ msgid "" "fact part of the data model." msgstr "" -#: ../../reference/datamodel.rst:2716 +#: ../../reference/datamodel.rst:2718 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:2729 +#: ../../reference/datamodel.rst:2731 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:2736 +#: ../../reference/datamodel.rst:2738 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3141,14 +3141,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:2742 +#: ../../reference/datamodel.rst:2744 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:2754 +#: ../../reference/datamodel.rst:2756 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -3157,21 +3157,21 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:2760 +#: ../../reference/datamodel.rst:2762 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:2763 +#: ../../reference/datamodel.rst:2765 msgid "The delegation of :func:`int` to :meth:`__trunc__` is deprecated." msgstr "" -#: ../../reference/datamodel.rst:2770 +#: ../../reference/datamodel.rst:2772 msgid "With Statement Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2772 +#: ../../reference/datamodel.rst:2774 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 " @@ -3181,32 +3181,32 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:2783 +#: ../../reference/datamodel.rst:2785 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:2786 +#: ../../reference/datamodel.rst:2788 msgid "" "For more information on context managers, see :ref:`typecontextmanager`." msgstr "" -#: ../../reference/datamodel.rst:2791 +#: ../../reference/datamodel.rst:2793 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:2798 +#: ../../reference/datamodel.rst:2800 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:2802 +#: ../../reference/datamodel.rst:2804 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. " @@ -3214,27 +3214,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:2806 +#: ../../reference/datamodel.rst:2808 msgid "" "Note that :meth:`__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:2813 +#: ../../reference/datamodel.rst:2815 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/datamodel.rst:2813 +#: ../../reference/datamodel.rst:2815 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2820 +#: ../../reference/datamodel.rst:2822 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:2822 +#: ../../reference/datamodel.rst:2824 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 " @@ -3242,7 +3242,7 @@ msgid "" "patterns, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:2829 +#: ../../reference/datamodel.rst:2831 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 " @@ -3251,7 +3251,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:2835 +#: ../../reference/datamodel.rst:2837 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -3261,19 +3261,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2845 +#: ../../reference/datamodel.rst:2847 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:2846 +#: ../../reference/datamodel.rst:2848 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:2852 +#: ../../reference/datamodel.rst:2854 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:2854 +#: ../../reference/datamodel.rst:2856 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 " @@ -3281,7 +3281,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:2869 +#: ../../reference/datamodel.rst:2871 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -3290,21 +3290,21 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../reference/datamodel.rst:2883 +#: ../../reference/datamodel.rst:2885 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:2892 +#: ../../reference/datamodel.rst:2894 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:2918 +#: ../../reference/datamodel.rst:2920 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -3313,44 +3313,44 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:2929 +#: ../../reference/datamodel.rst:2931 msgid "Coroutines" msgstr "協程" -#: ../../reference/datamodel.rst:2933 +#: ../../reference/datamodel.rst:2935 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:2935 +#: ../../reference/datamodel.rst:2937 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:2941 +#: ../../reference/datamodel.rst:2943 msgid "" "The :term:`generator iterator` objects returned from generators decorated " "with :func:`types.coroutine` are also awaitable, but they do not implement :" "meth:`~object.__await__`." msgstr "" -#: ../../reference/datamodel.rst:2947 +#: ../../reference/datamodel.rst:2949 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:2953 +#: ../../reference/datamodel.rst:2955 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:2959 +#: ../../reference/datamodel.rst:2961 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:2961 +#: ../../reference/datamodel.rst:2963 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -3361,18 +3361,18 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:2969 +#: ../../reference/datamodel.rst:2971 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:2973 +#: ../../reference/datamodel.rst:2975 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:2979 +#: ../../reference/datamodel.rst:2981 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -3383,7 +3383,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:2990 +#: ../../reference/datamodel.rst:2992 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -3394,7 +3394,7 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:3001 +#: ../../reference/datamodel.rst:3003 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -3404,99 +3404,99 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:3009 +#: ../../reference/datamodel.rst:3011 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:3015 +#: ../../reference/datamodel.rst:3017 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:3017 +#: ../../reference/datamodel.rst:3019 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:3020 +#: ../../reference/datamodel.rst:3022 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:3024 +#: ../../reference/datamodel.rst:3026 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:3028 +#: ../../reference/datamodel.rst:3030 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:3031 +#: ../../reference/datamodel.rst:3033 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:3048 +#: ../../reference/datamodel.rst:3050 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:3053 +#: ../../reference/datamodel.rst:3055 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:3061 +#: ../../reference/datamodel.rst:3063 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3063 +#: ../../reference/datamodel.rst:3065 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:3066 +#: ../../reference/datamodel.rst:3068 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3070 +#: ../../reference/datamodel.rst:3072 msgid "" "Semantically similar to :meth:`__enter__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3075 +#: ../../reference/datamodel.rst:3077 msgid "" "Semantically similar to :meth:`__exit__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3078 +#: ../../reference/datamodel.rst:3080 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3091 +#: ../../reference/datamodel.rst:3093 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:3092 +#: ../../reference/datamodel.rst:3094 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:3096 +#: ../../reference/datamodel.rst:3098 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, and :meth:`~object.__contains__` methods have special " @@ -3504,7 +3504,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3102 +#: ../../reference/datamodel.rst:3104 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 " @@ -3512,7 +3512,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3108 +#: ../../reference/datamodel.rst:3110 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`~object.__add__` -- fails then the overall " diff --git a/reference/expressions.po b/reference/expressions.po index aaca985495..edf034dd54 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -169,9 +169,9 @@ msgstr "" #: ../../reference/expressions.rst:156 msgid "" "Note that tuples are not formed by the parentheses, but rather by use of the " -"comma operator. The exception is the empty tuple, for which parentheses " -"*are* required --- allowing unparenthesized \"nothing\" in expressions would " -"cause ambiguities and allow common typos to pass uncaught." +"comma. The exception is the empty tuple, for which parentheses *are* " +"required --- allowing unparenthesized \"nothing\" in expressions would cause " +"ambiguities and allow common typos to pass uncaught." msgstr "" #: ../../reference/expressions.rst:165 @@ -1620,7 +1620,7 @@ msgstr "" #: ../../reference/expressions.rst:1553 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " -"equal `(key, value)` pairs. Equality comparison of the keys and values " +"equal ``(key, value)`` pairs. Equality comparison of the keys and values " "enforces reflexivity." msgstr "" diff --git a/reference/import.po b/reference/import.po index 86b725c03d..46db958063 100644 --- a/reference/import.po +++ b/reference/import.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -1044,7 +1044,7 @@ msgid "" "The path based finder iterates over every entry in the search path, and for " "each of these, looks for an appropriate :term:`path entry finder` (:class:" "`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " -"an expensive operation (e.g. there may be `stat()` call overheads for this " +"an expensive operation (e.g. there may be ``stat()`` call overheads for this " "search), the path based finder maintains a cache mapping path entries to " "path entry finders. This cache is maintained in :data:`sys." "path_importer_cache` (despite the name, this cache actually stores finder " diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 37dc14af9d..216ad53f11 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -1026,7 +1026,7 @@ msgstr "" msgid "The :keyword:`!nonlocal` statement" msgstr "" -#: ../../reference/simple_stmts.rst:1001 +#: ../../reference/simple_stmts.rst:997 msgid "" "The :keyword:`nonlocal` statement causes the listed identifiers to refer to " "previously bound variables in the nearest enclosing scope excluding globals. " @@ -1035,7 +1035,7 @@ msgid "" "variables outside of the local scope besides the global (module) scope." msgstr "" -#: ../../reference/simple_stmts.rst:1011 +#: ../../reference/simple_stmts.rst:1003 msgid "" "Names listed in a :keyword:`nonlocal` statement, unlike those listed in a :" "keyword:`global` statement, must refer to pre-existing bindings in an " @@ -1043,16 +1043,16 @@ msgid "" "be determined unambiguously)." msgstr "" -#: ../../reference/simple_stmts.rst:1016 +#: ../../reference/simple_stmts.rst:1008 msgid "" "Names listed in a :keyword:`nonlocal` statement must not collide with pre-" "existing bindings in the local scope." msgstr "" -#: ../../reference/simple_stmts.rst:1021 +#: ../../reference/simple_stmts.rst:1013 msgid ":pep:`3104` - Access to Names in Outer Scopes" msgstr "" -#: ../../reference/simple_stmts.rst:1022 +#: ../../reference/simple_stmts.rst:1014 msgid "The specification for the :keyword:`nonlocal` statement." msgstr "" diff --git a/using/cmdline.po b/using/cmdline.po index f7d9bedc90..5d6b1ed37c 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -118,7 +118,7 @@ msgid "" "modules)." msgstr "" -#: ../../using/cmdline.rst:73 +#: ../../using/cmdline.rst:10 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_command`` with " "argument ``command``." @@ -177,7 +177,7 @@ msgid "" "execution as a script. An example is the :mod:`timeit` module::" msgstr "" -#: ../../using/cmdline.rst:115 +#: ../../using/cmdline.rst:39 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_module`` with " "argument ``module-name``." @@ -216,7 +216,7 @@ msgid "" "path`." msgstr "" -#: ../../using/cmdline.rst:140 +#: ../../using/cmdline.rst:8 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." @@ -258,7 +258,7 @@ msgid "" "too." msgstr "" -#: ../../using/cmdline.rst:167 +#: ../../using/cmdline.rst:22 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_file`` with " "argument ``filename``." @@ -873,7 +873,7 @@ msgid "" "file." msgstr "" -#: ../../using/cmdline.rst:662 +#: ../../using/cmdline.rst:8 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with " "argument ``filename``." diff --git a/using/configure.po b/using/configure.po index 92a36e4550..020a88e3d3 100644 --- a/using/configure.po +++ b/using/configure.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -1081,14 +1081,14 @@ msgstr "" #: ../../using/configure.rst:753 msgid "" -"the compiler flag `-I` (for setting the search path for include files). The " -"`-I` flags are processed from left to right, and any flags in :envvar:" -"`CFLAGS` would take precedence over user- and package-supplied `-I` flags." +"the compiler flag ``-I`` (for setting the search path for include files). " +"The ``-I`` flags are processed from left to right, and any flags in :envvar:" +"`CFLAGS` would take precedence over user- and package-supplied ``-I`` flags." msgstr "" #: ../../using/configure.rst:758 msgid "" -"hardening flags such as `-Werror` because distributions cannot control " +"hardening flags such as ``-Werror`` because distributions cannot control " "whether packages installed by users conform to such heightened standards." msgstr "" @@ -1219,9 +1219,9 @@ msgstr "" #: ../../using/configure.rst:876 msgid "" -"the compiler flag `-L` (for setting the search path for libraries). The `-L` " -"flags are processed from left to right, and any flags in :envvar:`LDFLAGS` " -"would take precedence over user- and package-supplied `-L` flags." +"the compiler flag ``-L`` (for setting the search path for libraries). The ``-" +"L`` flags are processed from left to right, and any flags in :envvar:" +"`LDFLAGS` would take precedence over user- and package-supplied ``-L`` flags." msgstr "" #: ../../using/configure.rst:883 diff --git a/using/unix.po b/using/unix.po index 2ce4002092..12fdee43c8 100644 --- a/using/unix.po +++ b/using/unix.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" -"PO-Revision-Date: 2022-06-27 09:41+0800\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"PO-Revision-Date: 2022-10-31 16:31+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.1\n" +"X-Generator: Poedit 3.1.1\n" #: ../../using/unix.rst:7 msgid "Using Python on Unix platforms" @@ -296,11 +296,11 @@ msgstr "" #: ../../using/unix.rst:172 msgid "" -"Build Python with custom OpenSSL (see the configure `--with-openssl` and `--" -"with-openssl-rpath` options)" +"Build Python with custom OpenSSL (see the configure ``--with-openssl`` and " +"``--with-openssl-rpath`` options)" msgstr "" -"使用客製化 OpenSSL 建置 Python(參見配置 `--with-openssl` 和 `--with-openssl-" -"rpath` 選項)" +"使用客製化 OpenSSL 建置 Python(參見配置 ``--with-openssl`` 和 ``--with-" +"openssl-rpath`` 選項)" #: ../../using/unix.rst:187 msgid "" diff --git a/using/windows.po b/using/windows.po index 516b06736e..5d67585cb3 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -456,7 +456,7 @@ msgid "Include_symbols" msgstr "Include_symbols" #: ../../using/windows.rst:206 -msgid "Install debugging symbols (`*`.pdb)" +msgid "Install debugging symbols (``*.pdb``)" msgstr "" #: ../../using/windows.rst:208 diff --git a/whatsnew/2.2.po b/whatsnew/2.2.po index c1e161e3f7..c4bf8916fd 100644 --- a/whatsnew/2.2.po +++ b/whatsnew/2.2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-07 00:27+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -465,11 +465,10 @@ msgstr "" #: ../../whatsnew/2.2.rst:398 msgid "" -"https://docs.python.org/dev/howto/descriptor.html%20is%20a%20lengthy%20tutorial" -"introduction to the descriptor features, written by Guido van Rossum. If my " -"description has whetted your appetite, go read this tutorial next, because " -"it goes into much more detail about the new features while still remaining " -"quite easy to read." +"The :ref:`descriptorhowto` is a lengthy tutorial introduction to the " +"descriptor features, written by Guido van Rossum. If my description has " +"whetted your appetite, go read this tutorial next, because it goes into much " +"more detail about the new features while still remaining quite easy to read." msgstr "" #: ../../whatsnew/2.2.rst:403 diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 53e1ab2b4a..656b33d763 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -735,16 +735,17 @@ msgstr "" #: ../../whatsnew/2.6.rst:720 msgid "" -"In Python 3.0, the `%` operator is supplemented by a more powerful string " +"In Python 3.0, the ``%`` operator is supplemented by a more powerful string " "formatting method, :meth:`format`. Support for the :meth:`str.format` " "method has been backported to Python 2.6." msgstr "" #: ../../whatsnew/2.6.rst:724 msgid "" -"In 2.6, both 8-bit and Unicode strings have a `.format()` method that treats " -"the string as a template and takes the arguments to be formatted. The " -"formatting template uses curly brackets (`{`, `}`) as special characters::" +"In 2.6, both 8-bit and Unicode strings have a ``.format()`` method that " +"treats the string as a template and takes the arguments to be formatted. The " +"formatting template uses curly brackets (``{``, ``}``) as special " +"characters::" msgstr "" #: ../../whatsnew/2.6.rst:737 diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 32c1ae4464..32c8745257 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1884,7 +1884,7 @@ msgid "" "Michael Foord.)" msgstr "" -#: ../../whatsnew/2.7.rst:1691 +#: ../../whatsnew/2.7.rst:1691 ../../whatsnew/2.7.rst:2486 msgid "" "The ElementTree library, :mod:`xml.etree`, no longer escapes ampersands and " "angle brackets when outputting an XML processing instruction (which looks " @@ -2936,14 +2936,6 @@ msgid "" "are now hashable. (Fixed by Mark Dickinson; :issue:`7279`.)" msgstr "" -#: ../../whatsnew/2.7.rst:2486 -msgid "" -"The ElementTree library, :mod:`xml.etree`, no longer escapes ampersands and " -"angle brackets when outputting an XML processing instruction (which looks " -"like ``) or comment (which looks like " -"``). (Patch by Neil Muller; :issue:`2746`.)" -msgstr "" - #: ../../whatsnew/2.7.rst:2492 msgid "" "The :meth:`~StringIO.StringIO.readline` method of :class:`~StringIO." diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index b03dcc18bd..5bf3b8fd9b 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -1372,8 +1372,8 @@ msgstr "" #: ../../whatsnew/3.10.rst:1186 msgid "" -"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and " -"Terry Jan Reedy in :issue:`45447`.)" +"Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " +"and Terry Jan Reedy in :issue:`45447`.)" msgstr "" #: ../../whatsnew/3.10.rst:1189 @@ -1981,7 +1981,7 @@ msgid "" "issue:`43785`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1595 ../../whatsnew/3.10.rst:2216 +#: ../../whatsnew/3.10.rst:1595 ../../whatsnew/3.10.rst:2214 msgid "Deprecated" msgstr "" @@ -2268,7 +2268,7 @@ msgid "" "Rittau in :issue:`38291`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1799 ../../whatsnew/3.10.rst:2224 +#: ../../whatsnew/3.10.rst:1799 ../../whatsnew/3.10.rst:2222 msgid "Removed" msgstr "" @@ -2785,11 +2785,11 @@ 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 ``#``: " "``es#``, ``et#``, ``s#``, ``u#``, ``y#``, ``z#``, ``U#`` and ``Z#``. See :" -"ref:`Parsing arguments and building values ` and the :pep:" -"`353`. (Contributed by Victor Stinner in :issue:`40943`.)" +"ref:`arg-parsing` and :pep:`353`. (Contributed by Victor Stinner in :issue:" +"`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2158 +#: ../../whatsnew/3.10.rst:2157 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, " @@ -2797,18 +2797,18 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2167 +#: ../../whatsnew/3.10.rst:2166 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2169 +#: ../../whatsnew/3.10.rst:2168 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2173 +#: ../../whatsnew/3.10.rst:2172 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -2816,25 +2816,24 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2178 +#: ../../whatsnew/3.10.rst:2177 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2182 +#: ../../whatsnew/3.10.rst:2181 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" "`Py_GetProgramName` functions now return ``NULL`` if called before :c:func:" -"`Py_Initialize` (before Python is initialized). Use the new :ref:`Python " -"Initialization Configuration API ` to get the :ref:`Python Path " -"Configuration. `. (Contributed by Victor Stinner in :" -"issue:`42260`.)" +"`Py_Initialize` (before Python is initialized). Use the new :ref:`init-" +"config` API to get the :ref:`init-path-config`. (Contributed by Victor " +"Stinner in :issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2190 +#: ../../whatsnew/3.10.rst:2188 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 " @@ -2844,18 +2843,18 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2197 +#: ../../whatsnew/3.10.rst:2195 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." "h``, and ``pytime.h`` have been moved to the ``Include/cpython`` directory. " "These files must not be included directly, as they are already included in " -"``Python.h``: :ref:`Include Files `. If they have been " -"included directly, consider including ``Python.h`` instead. (Contributed by " -"Nicholas Sim in :issue:`35134`.)" +"``Python.h``; see :ref:`api-includes`. If they have been included directly, " +"consider including ``Python.h`` instead. (Contributed by Nicholas Sim in :" +"issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2205 +#: ../../whatsnew/3.10.rst:2203 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 " @@ -2864,85 +2863,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2211 +#: ../../whatsnew/3.10.rst:2209 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:2218 +#: ../../whatsnew/3.10.rst:2216 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:2226 +#: ../../whatsnew/3.10.rst:2224 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2229 +#: ../../whatsnew/3.10.rst:2227 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2231 +#: ../../whatsnew/3.10.rst:2229 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2233 +#: ../../whatsnew/3.10.rst:2231 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2235 +#: ../../whatsnew/3.10.rst:2233 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2236 +#: ../../whatsnew/3.10.rst:2234 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2237 +#: ../../whatsnew/3.10.rst:2235 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2240 +#: ../../whatsnew/3.10.rst:2238 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2243 +#: ../../whatsnew/3.10.rst:2241 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2246 +#: ../../whatsnew/3.10.rst:2244 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:2250 +#: ../../whatsnew/3.10.rst:2248 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:2254 +#: ../../whatsnew/3.10.rst:2252 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -2950,14 +2949,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2259 +#: ../../whatsnew/3.10.rst:2257 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:2264 +#: ../../whatsnew/3.10.rst:2262 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 " @@ -2965,48 +2964,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2269 +#: ../../whatsnew/3.10.rst:2267 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2271 +#: ../../whatsnew/3.10.rst:2269 msgid "``PyST_GetScope()``" msgstr "``PyST_GetScope()``" -#: ../../whatsnew/3.10.rst:2272 +#: ../../whatsnew/3.10.rst:2270 msgid "``PySymtable_Build()``" msgstr "``PySymtable_Build()``" -#: ../../whatsnew/3.10.rst:2273 +#: ../../whatsnew/3.10.rst:2271 msgid "``PySymtable_BuildObject()``" msgstr "``PySymtable_BuildObject()``" -#: ../../whatsnew/3.10.rst:2274 +#: ../../whatsnew/3.10.rst:2272 msgid "``PySymtable_Free()``" msgstr "``PySymtable_Free()``" -#: ../../whatsnew/3.10.rst:2275 +#: ../../whatsnew/3.10.rst:2273 msgid "``Py_SymtableString()``" msgstr "``Py_SymtableString()``" -#: ../../whatsnew/3.10.rst:2276 +#: ../../whatsnew/3.10.rst:2274 msgid "``Py_SymtableStringObject()``" msgstr "``Py_SymtableStringObject()``" -#: ../../whatsnew/3.10.rst:2278 +#: ../../whatsnew/3.10.rst:2276 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:2282 +#: ../../whatsnew/3.10.rst:2280 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2285 +#: ../../whatsnew/3.10.rst:2283 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -3014,7 +3013,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2291 +#: ../../whatsnew/3.10.rst:2289 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 " @@ -3025,86 +3024,86 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2299 +#: ../../whatsnew/3.10.rst:2297 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2302 +#: ../../whatsnew/3.10.rst:2300 msgid "``PyAST_Compile()``" msgstr "``PyAST_Compile()``" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2301 msgid "``PyAST_CompileEx()``" msgstr "``PyAST_CompileEx()``" -#: ../../whatsnew/3.10.rst:2304 +#: ../../whatsnew/3.10.rst:2302 msgid "``PyAST_CompileObject()``" msgstr "``PyAST_CompileObject()``" -#: ../../whatsnew/3.10.rst:2305 +#: ../../whatsnew/3.10.rst:2303 msgid "``PyFuture_FromAST()``" msgstr "``PyFuture_FromAST()``" -#: ../../whatsnew/3.10.rst:2306 +#: ../../whatsnew/3.10.rst:2304 msgid "``PyFuture_FromASTObject()``" msgstr "``PyFuture_FromASTObject()``" -#: ../../whatsnew/3.10.rst:2307 +#: ../../whatsnew/3.10.rst:2305 msgid "``PyParser_ASTFromFile()``" msgstr "``PyParser_ASTFromFile()``" -#: ../../whatsnew/3.10.rst:2308 +#: ../../whatsnew/3.10.rst:2306 msgid "``PyParser_ASTFromFileObject()``" msgstr "``PyParser_ASTFromFileObject()``" -#: ../../whatsnew/3.10.rst:2309 +#: ../../whatsnew/3.10.rst:2307 msgid "``PyParser_ASTFromFilename()``" msgstr "``PyParser_ASTFromFilename()``" -#: ../../whatsnew/3.10.rst:2310 +#: ../../whatsnew/3.10.rst:2308 msgid "``PyParser_ASTFromString()``" msgstr "``PyParser_ASTFromString()``" -#: ../../whatsnew/3.10.rst:2311 +#: ../../whatsnew/3.10.rst:2309 msgid "``PyParser_ASTFromStringObject()``" msgstr "``PyParser_ASTFromStringObject()``" -#: ../../whatsnew/3.10.rst:2313 +#: ../../whatsnew/3.10.rst:2311 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2316 +#: ../../whatsnew/3.10.rst:2314 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2318 +#: ../../whatsnew/3.10.rst:2316 msgid "``PyArena_New()``" msgstr "``PyArena_New()``" -#: ../../whatsnew/3.10.rst:2319 +#: ../../whatsnew/3.10.rst:2317 msgid "``PyArena_Free()``" msgstr "``PyArena_Free()``" -#: ../../whatsnew/3.10.rst:2320 +#: ../../whatsnew/3.10.rst:2318 msgid "``PyArena_Malloc()``" msgstr "``PyArena_Malloc()``" -#: ../../whatsnew/3.10.rst:2321 +#: ../../whatsnew/3.10.rst:2319 msgid "``PyArena_AddPyObject()``" msgstr "``PyArena_AddPyObject()``" -#: ../../whatsnew/3.10.rst:2323 +#: ../../whatsnew/3.10.rst:2321 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:2327 +#: ../../whatsnew/3.10.rst:2325 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 7585a42a97..3aa85054ce 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -37,124 +37,136 @@ msgstr "日期" msgid "|today|" msgstr "|today|" -#: ../../whatsnew/3.11.rst:48 +#: ../../whatsnew/3.11.rst:0 +msgid "Editor" +msgstr "" + +#: ../../whatsnew/3.11.rst:7 +msgid "Pablo Galindo Salgado" +msgstr "" + +#: ../../whatsnew/3.11.rst:49 msgid "" "This article explains the new features in Python 3.11, compared to 3.10." msgstr "" -#: ../../whatsnew/3.11.rst:50 +#: ../../whatsnew/3.11.rst:51 msgid "For full details, see the :ref:`changelog `." msgstr "" -#: ../../whatsnew/3.11.rst:56 +#: ../../whatsnew/3.11.rst:57 msgid "Summary -- Release highlights" msgstr "" -#: ../../whatsnew/3.11.rst:61 +#: ../../whatsnew/3.11.rst:62 msgid "" "Python 3.11 is between 10-60% faster than Python 3.10. On average, we " -"measured a 1.25x speedup on the standard benchmark suite. See `Faster " -"CPython`_ for details." -msgstr "" - -#: ../../whatsnew/3.11.rst:66 -msgid "New syntax features:" +"measured a 1.25x speedup on the standard benchmark suite. See :ref:" +"`whatsnew311-faster-cpython` for details." msgstr "" #: ../../whatsnew/3.11.rst:68 -msgid ":pep:`654`: Exception Groups and ``except*``." +msgid "New syntax features:" msgstr "" #: ../../whatsnew/3.11.rst:70 -msgid "New built-in features:" +msgid ":ref:`whatsnew311-pep654`" msgstr "" #: ../../whatsnew/3.11.rst:72 -msgid ":pep:`678`: Enriching Exceptions with Notes." +msgid "New built-in features:" msgstr "" #: ../../whatsnew/3.11.rst:74 -msgid "New standard library modules:" +msgid ":ref:`whatsnew311-pep678`" msgstr "" #: ../../whatsnew/3.11.rst:76 -msgid "" -":pep:`680`: ``tomllib`` — Support for Parsing TOML in the Standard Library." +msgid "New standard library modules:" msgstr "" #: ../../whatsnew/3.11.rst:78 +msgid "" +":pep:`680`: :mod:`tomllib` — Support for parsing `TOML `_ " +"in the Standard Library" +msgstr "" + +#: ../../whatsnew/3.11.rst:81 msgid "Interpreter improvements:" msgstr "" -#: ../../whatsnew/3.11.rst:80 -msgid ":pep:`657`: Include Fine Grained Error Locations in Tracebacks." +#: ../../whatsnew/3.11.rst:83 +msgid ":ref:`whatsnew311-pep657`" msgstr "" -#: ../../whatsnew/3.11.rst:81 +#: ../../whatsnew/3.11.rst:84 msgid "" "New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` " -"environment variable to disable automatically prepending a potentially " -"unsafe path (the working dir or script directory, depending on invocation) " -"to :data:`sys.path`." -msgstr "" - -#: ../../whatsnew/3.11.rst:86 -msgid "New typing features:" +"environment variable to :ref:`disable automatically prepending potentially " +"unsafe paths ` to :data:`sys.path`" msgstr "" #: ../../whatsnew/3.11.rst:88 -msgid ":pep:`646`: Variadic generics." -msgstr "" - -#: ../../whatsnew/3.11.rst:89 -msgid "" -":pep:`655`: Marking individual TypedDict items as required or potentially " -"missing." +msgid "New typing features:" msgstr "" #: ../../whatsnew/3.11.rst:90 -msgid ":pep:`673`: ``Self`` type." +msgid ":ref:`whatsnew311-pep646`" msgstr "" #: ../../whatsnew/3.11.rst:91 -msgid ":pep:`675`: Arbitrary literal string type." +msgid ":ref:`whatsnew311-pep655`" msgstr "" #: ../../whatsnew/3.11.rst:92 -msgid ":pep:`681`: Data Class Transforms." +msgid ":ref:`whatsnew311-pep673`" +msgstr "" + +#: ../../whatsnew/3.11.rst:93 +msgid ":ref:`whatsnew311-pep675`" msgstr "" #: ../../whatsnew/3.11.rst:94 -msgid "Important deprecations, removals or restrictions:" +msgid ":ref:`whatsnew311-pep681`" msgstr "" #: ../../whatsnew/3.11.rst:96 -msgid ":pep:`594`: Removing dead batteries from the standard library." +msgid "Important deprecations, removals and restrictions:" msgstr "" -#: ../../whatsnew/3.11.rst:97 -msgid ":pep:`624`: Remove ``Py_UNICODE`` encoder APIs." +#: ../../whatsnew/3.11.rst:98 +msgid "" +":pep:`594`: :ref:`Many legacy standard library modules have been deprecated " +"` and will be removed in Python 3.13" msgstr "" -#: ../../whatsnew/3.11.rst:98 -msgid ":pep:`670`: Convert macros to functions in the Python C API." +#: ../../whatsnew/3.11.rst:101 +msgid "" +":pep:`624`: :ref:`Py_UNICODE encoder APIs have been removed `" msgstr "" -#: ../../whatsnew/3.11.rst:104 ../../whatsnew/3.11.rst:1837 +#: ../../whatsnew/3.11.rst:103 +msgid "" +":pep:`670`: :ref:`Macros converted to static inline functions `" +msgstr "" + +#: ../../whatsnew/3.11.rst:110 ../../whatsnew/3.11.rst:2175 msgid "New Features" msgstr "" -#: ../../whatsnew/3.11.rst:109 -msgid "PEP 657: Enhanced error locations in tracebacks" +#: ../../whatsnew/3.11.rst:115 +msgid "PEP 657: Fine-grained error locations in tracebacks" msgstr "" -#: ../../whatsnew/3.11.rst:111 +#: ../../whatsnew/3.11.rst:117 msgid "" "When printing tracebacks, the interpreter will now point to the exact " "expression that caused the error, instead of just the line. For example:" msgstr "" -#: ../../whatsnew/3.11.rst:125 +#: ../../whatsnew/3.11.rst:131 msgid "" "Previous versions of the interpreter would point to just the line, making it " "ambiguous which object was ``None``. These enhanced errors can also be " @@ -162,11 +174,11 @@ msgid "" "function calls:" msgstr "" -#: ../../whatsnew/3.11.rst:145 +#: ../../whatsnew/3.11.rst:151 msgid "As well as complex arithmetic expressions:" msgstr "" -#: ../../whatsnew/3.11.rst:155 +#: ../../whatsnew/3.11.rst:161 msgid "" "Additionally, the information used by the enhanced traceback feature is made " "available via a general API, that can be used to correlate :term:`bytecode` :" @@ -174,21 +186,21 @@ msgid "" "can be retrieved using:" msgstr "" -#: ../../whatsnew/3.11.rst:160 +#: ../../whatsnew/3.11.rst:166 msgid "The :meth:`codeobject.co_positions` method in Python." msgstr "" -#: ../../whatsnew/3.11.rst:161 +#: ../../whatsnew/3.11.rst:167 msgid "The :c:func:`PyCode_Addr2Location` function in the C API." msgstr "" -#: ../../whatsnew/3.11.rst:163 +#: ../../whatsnew/3.11.rst:169 msgid "" "See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan " "Taskaya and Ammar Askar in :issue:`43950`.)" msgstr "" -#: ../../whatsnew/3.11.rst:167 +#: ../../whatsnew/3.11.rst:173 msgid "" "This feature requires storing column positions in :ref:`codeobjects`, which " "may result in a small increase in interpreter memory usage and disk usage " @@ -198,11 +210,11 @@ msgid "" "`PYTHONNODEBUGRANGES` environment variable." msgstr "" -#: ../../whatsnew/3.11.rst:179 +#: ../../whatsnew/3.11.rst:185 msgid "PEP 654: Exception Groups and ``except*``" msgstr "" -#: ../../whatsnew/3.11.rst:181 +#: ../../whatsnew/3.11.rst:187 msgid "" ":pep:`654` introduces language features that enable a program to raise and " "handle multiple unrelated exceptions simultaneously. The builtin types :exc:" @@ -212,21 +224,21 @@ msgid "" "exception groups." msgstr "" -#: ../../whatsnew/3.11.rst:188 +#: ../../whatsnew/3.11.rst:194 msgid "See :pep:`654` for more details." msgstr "詳情請見 :pep:`654`。" -#: ../../whatsnew/3.11.rst:190 +#: ../../whatsnew/3.11.rst:196 msgid "" "(Contributed by Irit Katriel in :issue:`45292`. PEP written by Irit Katriel, " "Yury Selivanov and Guido van Rossum.)" msgstr "" -#: ../../whatsnew/3.11.rst:197 +#: ../../whatsnew/3.11.rst:203 msgid "PEP 678: Exceptions can be enriched with notes" msgstr "" -#: ../../whatsnew/3.11.rst:199 +#: ../../whatsnew/3.11.rst:205 msgid "" "The :meth:`~BaseException.add_note` method is added to :exc:`BaseException`. " "It can be used to enrich exceptions with context information that is not " @@ -234,21 +246,21 @@ msgid "" "in the default traceback." msgstr "" -#: ../../whatsnew/3.11.rst:204 +#: ../../whatsnew/3.11.rst:210 msgid "See :pep:`678` for more details." msgstr "詳情請見 :pep:`678`。" -#: ../../whatsnew/3.11.rst:206 +#: ../../whatsnew/3.11.rst:212 msgid "" "(Contributed by Irit Katriel in :issue:`45607`. PEP written by Zac Hatfield-" "Dodds.)" msgstr "" -#: ../../whatsnew/3.11.rst:213 +#: ../../whatsnew/3.11.rst:219 msgid "Windows ``py.exe`` launcher improvements" msgstr "" -#: ../../whatsnew/3.11.rst:215 +#: ../../whatsnew/3.11.rst:221 msgid "" "The copy of the :ref:`launcher` included with Python 3.11 has been " "significantly updated. It now supports company/tag syntax as defined in :pep:" @@ -257,7 +269,7 @@ msgid "" "``PythonCore``, the one hosted on `python.org `_." msgstr "" -#: ../../whatsnew/3.11.rst:221 +#: ../../whatsnew/3.11.rst:227 msgid "" "When using ``-V:`` selectors, either company or tag can be omitted, but all " "installs will be searched. For example, ``-V:OtherPython/`` will select the " @@ -265,7 +277,7 @@ msgid "" "V:/3.11`` will select the \"best\" distribution with tag ``3.11``." msgstr "" -#: ../../whatsnew/3.11.rst:226 +#: ../../whatsnew/3.11.rst:232 msgid "" "When using the legacy ``-``, ``-.``, ``--" "`` or ``-.-`` arguments, all existing " @@ -277,21 +289,21 @@ msgid "" "their 32-bit builds." msgstr "" -#: ../../whatsnew/3.11.rst:240 +#: ../../whatsnew/3.11.rst:246 msgid "New Features Related to Type Hints" msgstr "" -#: ../../whatsnew/3.11.rst:242 +#: ../../whatsnew/3.11.rst:248 msgid "" "This section covers major changes affecting :pep:`484` type hints and the :" "mod:`typing` module." msgstr "" -#: ../../whatsnew/3.11.rst:249 +#: ../../whatsnew/3.11.rst:255 msgid "PEP 646: Variadic generics" msgstr "" -#: ../../whatsnew/3.11.rst:251 +#: ../../whatsnew/3.11.rst:257 msgid "" ":pep:`484` previously introduced :data:`~typing.TypeVar`, enabling creation " "of generics parameterised with a single type. :pep:`646` adds :data:`~typing." @@ -300,7 +312,7 @@ msgid "" "variable, enabling *variadic* generics." msgstr "" -#: ../../whatsnew/3.11.rst:258 +#: ../../whatsnew/3.11.rst:264 msgid "" "This enables a wide variety of use cases. In particular, it allows the type " "of array-like structures in numerical computing libraries such as NumPy and " @@ -309,23 +321,23 @@ msgid "" "libraries." msgstr "" -#: ../../whatsnew/3.11.rst:264 +#: ../../whatsnew/3.11.rst:270 msgid "See :pep:`646` for more details." msgstr "詳情請見 :pep:`646`。" -#: ../../whatsnew/3.11.rst:266 +#: ../../whatsnew/3.11.rst:272 msgid "" "(Contributed by Matthew Rahtz in :issue:`43224`, with contributions by " "Serhiy Storchaka and Jelle Zijlstra. PEP written by Mark Mendoza, Matthew " "Rahtz, Pradeep Kumar Srinivasan, and Vincent Siles.)" msgstr "" -#: ../../whatsnew/3.11.rst:274 +#: ../../whatsnew/3.11.rst:280 msgid "" "PEP 655: Marking individual ``TypedDict`` items as required or not-required" msgstr "" -#: ../../whatsnew/3.11.rst:276 +#: ../../whatsnew/3.11.rst:282 msgid "" ":data:`~typing.Required` and :data:`~typing.NotRequired` provide a " "straightforward way to mark whether individual items in a :class:`~typing." @@ -333,7 +345,7 @@ msgid "" "inheritance." msgstr "" -#: ../../whatsnew/3.11.rst:281 +#: ../../whatsnew/3.11.rst:287 msgid "" "All fields are still required by default, unless the *total* parameter is " "set to ``False``, in which case all fields are still not-required by " @@ -341,25 +353,25 @@ msgid "" "required and one not-required key::" msgstr "" -#: ../../whatsnew/3.11.rst:295 +#: ../../whatsnew/3.11.rst:301 msgid "The following definition is equivalent::" msgstr "" -#: ../../whatsnew/3.11.rst:301 +#: ../../whatsnew/3.11.rst:307 msgid "See :pep:`655` for more details." msgstr "詳情請見 :pep:`655`。" -#: ../../whatsnew/3.11.rst:303 +#: ../../whatsnew/3.11.rst:309 msgid "" "(Contributed by David Foster and Jelle Zijlstra in :issue:`47087`. PEP " "written by David Foster.)" msgstr "" -#: ../../whatsnew/3.11.rst:310 +#: ../../whatsnew/3.11.rst:316 msgid "PEP 673: ``Self`` type" msgstr "" -#: ../../whatsnew/3.11.rst:312 +#: ../../whatsnew/3.11.rst:318 msgid "" "The new :data:`~typing.Self` annotation provides a simple and intuitive way " "to annotate methods that return an instance of their class. This behaves the " @@ -368,34 +380,34 @@ msgid "" "easier to follow." msgstr "" -#: ../../whatsnew/3.11.rst:318 +#: ../../whatsnew/3.11.rst:324 msgid "" "Common use cases include alternative constructors provided as :func:" "`classmethod `\\s, and :meth:`~object.__enter__` methods that " "return ``self``::" msgstr "" -#: ../../whatsnew/3.11.rst:336 +#: ../../whatsnew/3.11.rst:342 msgid "" ":data:`~typing.Self` can also be used to annotate method parameters or " "attributes of the same type as their enclosing class." msgstr "" -#: ../../whatsnew/3.11.rst:339 +#: ../../whatsnew/3.11.rst:345 msgid "See :pep:`673` for more details." msgstr "詳情請見 :pep:`673`。" -#: ../../whatsnew/3.11.rst:341 +#: ../../whatsnew/3.11.rst:347 msgid "" "(Contributed by James Hilton-Balfe in :issue:`46534`. PEP written by Pradeep " "Kumar Srinivasan and James Hilton-Balfe.)" msgstr "" -#: ../../whatsnew/3.11.rst:348 +#: ../../whatsnew/3.11.rst:354 msgid "PEP 675: Arbitrary literal string type" msgstr "" -#: ../../whatsnew/3.11.rst:350 +#: ../../whatsnew/3.11.rst:356 msgid "" "The new :data:`~typing.LiteralString` annotation may be used to indicate " "that a function parameter can be of any literal string type. This allows a " @@ -406,25 +418,25 @@ msgid "" "against injection attacks." msgstr "" -#: ../../whatsnew/3.11.rst:358 +#: ../../whatsnew/3.11.rst:364 msgid "For example, a SQL query function could be annotated as follows::" msgstr "" -#: ../../whatsnew/3.11.rst:376 +#: ../../whatsnew/3.11.rst:382 msgid "See :pep:`675` for more details." msgstr "詳情請見 :pep:`675`。" -#: ../../whatsnew/3.11.rst:378 +#: ../../whatsnew/3.11.rst:384 msgid "" "(Contributed by Jelle Zijlstra in :issue:`47088`. PEP written by Pradeep " "Kumar Srinivasan and Graham Bleaney.)" msgstr "" -#: ../../whatsnew/3.11.rst:385 -msgid "PEP 681: Data Class Transforms" +#: ../../whatsnew/3.11.rst:391 +msgid "PEP 681: Data class transforms" msgstr "" -#: ../../whatsnew/3.11.rst:387 +#: ../../whatsnew/3.11.rst:393 msgid "" ":data:`~typing.dataclass_transform` may be used to decorate a class, " "metaclass, or a function that is itself a decorator. The presence of " @@ -433,28 +445,28 @@ msgid "" "`dataclass `-like behaviors." msgstr "" -#: ../../whatsnew/3.11.rst:393 +#: ../../whatsnew/3.11.rst:399 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../whatsnew/3.11.rst:411 +#: ../../whatsnew/3.11.rst:417 msgid "See :pep:`681` for more details." msgstr "詳情請見 :pep:`681`。" -#: ../../whatsnew/3.11.rst:413 +#: ../../whatsnew/3.11.rst:419 msgid "" "(Contributed by Jelle Zijlstra in :gh:`91860`. PEP written by Erik De Bonte " "and Eric Traut.)" msgstr "" -#: ../../whatsnew/3.11.rst:420 +#: ../../whatsnew/3.11.rst:426 msgid "PEP 563 may not be the future" msgstr "" -#: ../../whatsnew/3.11.rst:422 +#: ../../whatsnew/3.11.rst:428 msgid "" ":pep:`563` Postponed Evaluation of Annotations (the ``from __future__ import " "annotations`` :ref:`future statement `) that was originally planned " @@ -464,17 +476,17 @@ msgid "" "information." msgstr "" -#: ../../whatsnew/3.11.rst:433 +#: ../../whatsnew/3.11.rst:439 msgid "Other Language Changes" msgstr "" -#: ../../whatsnew/3.11.rst:435 +#: ../../whatsnew/3.11.rst:441 msgid "" "Starred unpacking expressions can now be used in :keyword:`for` statements. " "(See :issue:`46725` for more details.)" msgstr "" -#: ../../whatsnew/3.11.rst:438 +#: ../../whatsnew/3.11.rst:444 msgid "" "Asynchronous :ref:`comprehensions ` are now allowed inside " "comprehensions in :ref:`asynchronous functions `. Outer " @@ -482,7 +494,7 @@ msgid "" "Serhiy Storchaka in :issue:`33346`.)" msgstr "" -#: ../../whatsnew/3.11.rst:443 +#: ../../whatsnew/3.11.rst:449 msgid "" "A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in :" "keyword:`with` statements and :meth:`contextlib.ExitStack.enter_context` for " @@ -493,7 +505,7 @@ msgid "" "`12022` and :issue:`44471`.)" msgstr "" -#: ../../whatsnew/3.11.rst:451 +#: ../../whatsnew/3.11.rst:457 msgid "" "Added :meth:`object.__getstate__`, which provides the default implementation " "of the :meth:`!__getstate__` method. :mod:`copy`\\ing and :mod:`pickle`\\ing " @@ -504,7 +516,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`26579`.)" msgstr "" -#: ../../whatsnew/3.11.rst:460 +#: ../../whatsnew/3.11.rst:468 msgid "" "Added a :option:`-P` command line option and a :envvar:`PYTHONSAFEPATH` " "environment variable, which disable the automatic prepending to :data:`sys." @@ -516,14 +528,14 @@ msgid "" "`57684`.)" msgstr "" -#: ../../whatsnew/3.11.rst:471 +#: ../../whatsnew/3.11.rst:479 msgid "" "A ``\"z\"`` option was added to the :ref:`formatspec` that coerces negative " "to positive zero after rounding to the format precision. See :pep:`682` for " "more details. (Contributed by John Belmonte in :gh:`90153`.)" msgstr "" -#: ../../whatsnew/3.11.rst:476 +#: ../../whatsnew/3.11.rst:484 msgid "" "Bytes are no longer accepted on :data:`sys.path`. Support broke sometime " "between Python 3.2 and 3.6, with no one noticing until after Python 3.10.0 " @@ -533,11 +545,11 @@ msgid "" "Thomas Grainger in :gh:`91181`.)" msgstr "" -#: ../../whatsnew/3.11.rst:487 +#: ../../whatsnew/3.11.rst:495 msgid "Other CPython Implementation Changes" msgstr "" -#: ../../whatsnew/3.11.rst:489 +#: ../../whatsnew/3.11.rst:497 msgid "" "The special methods :meth:`~object.__complex__` for :class:`complex` and :" "meth:`~object.__bytes__` for :class:`bytes` are implemented to support the :" @@ -545,7 +557,7 @@ msgid "" "(Contributed by Mark Dickinson and Dong-hee Na in :issue:`24234`.)" msgstr "" -#: ../../whatsnew/3.11.rst:494 +#: ../../whatsnew/3.11.rst:502 msgid "" "``siphash13`` is added as a new internal hashing algorithm. It has similar " "security properties as ``siphash24``, but it is slightly faster for long " @@ -555,7 +567,7 @@ msgid "" "in :issue:`29410`.)" msgstr "" -#: ../../whatsnew/3.11.rst:503 +#: ../../whatsnew/3.11.rst:511 msgid "" "When an active exception is re-raised by a :keyword:`raise` statement with " "no parameters, the traceback attached to this exception is now always ``sys." @@ -564,7 +576,7 @@ msgid "" "exception. (Contributed by Irit Katriel in :issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:509 +#: ../../whatsnew/3.11.rst:517 msgid "" "The interpreter state's representation of handled exceptions (aka " "``exc_info`` or ``_PyErr_StackItem``) now only has the ``exc_value`` field; " @@ -572,7 +584,7 @@ msgid "" "from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:515 +#: ../../whatsnew/3.11.rst:523 msgid "" "A new :ref:`command line option `, ``AppendPath``, has " "been added for the Windows installer. It behaves similarly to " @@ -580,7 +592,7 @@ msgid "" "prepending them. (Contributed by Bastian Neuburger in :issue:`44934`.)" msgstr "" -#: ../../whatsnew/3.11.rst:521 +#: ../../whatsnew/3.11.rst:529 msgid "" "The :c:member:`PyConfig.module_search_paths_set` field must now be set to " "``1`` for initialization to use :c:member:`PyConfig.module_search_paths` to " @@ -588,7 +600,7 @@ msgid "" "path and replace any values added to ``module_search_paths``." msgstr "" -#: ../../whatsnew/3.11.rst:526 +#: ../../whatsnew/3.11.rst:534 msgid "" "The output of the :option:`--help` option now fits in 50 lines/80 columns. " "Information about :ref:`Python environment variables ` " @@ -597,7 +609,7 @@ msgid "" "help-all`. (Contributed by Éric Araujo in :issue:`46142`.)" msgstr "" -#: ../../whatsnew/3.11.rst:533 +#: ../../whatsnew/3.11.rst:541 msgid "" "Converting between :class:`int` and :class:`str` in bases other than 2 " "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " @@ -611,31 +623,31 @@ msgid "" "string form." msgstr "" -#: ../../whatsnew/3.11.rst:548 +#: ../../whatsnew/3.11.rst:556 msgid "New Modules" msgstr "" -#: ../../whatsnew/3.11.rst:550 +#: ../../whatsnew/3.11.rst:558 msgid "" ":mod:`tomllib`: For parsing `TOML `_. See :pep:`680` for " "more details. (Contributed by Taneli Hukkinen in :issue:`40059`.)" msgstr "" -#: ../../whatsnew/3.11.rst:554 +#: ../../whatsnew/3.11.rst:562 msgid "" ":mod:`wsgiref.types`: :pep:`WSGI <3333>`-specific types for static type " "checking. (Contributed by Sebastian Rittau in :issue:`42012`.)" msgstr "" -#: ../../whatsnew/3.11.rst:560 +#: ../../whatsnew/3.11.rst:570 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.11.rst:565 +#: ../../whatsnew/3.11.rst:575 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.11.rst:567 +#: ../../whatsnew/3.11.rst:577 msgid "" "Added the :class:`~asyncio.TaskGroup` class, an :ref:`asynchronous context " "manager ` holding a group of tasks that will wait " @@ -644,7 +656,7 @@ msgid "" "Yury Selivanov and others in :gh:`90908`.)" msgstr "" -#: ../../whatsnew/3.11.rst:574 +#: ../../whatsnew/3.11.rst:584 msgid "" "Added :func:`~asyncio.timeout`, an asynchronous context manager for setting " "a timeout on asynchronous operations. For new code this is recommended over " @@ -652,34 +664,34 @@ msgid "" "gh:`90927`.)" msgstr "" -#: ../../whatsnew/3.11.rst:579 +#: ../../whatsnew/3.11.rst:589 msgid "" "Added the :class:`~asyncio.Runner` class, which exposes the machinery used " "by :func:`~asyncio.run`. (Contributed by Andrew Svetlov in :gh:`91218`.)" msgstr "" -#: ../../whatsnew/3.11.rst:583 +#: ../../whatsnew/3.11.rst:593 msgid "" "Added the :class:`~asyncio.Barrier` class to the synchronization primitives " "in the asyncio library, and the related :exc:`~asyncio.BrokenBarrierError` " "exception. (Contributed by Yves Duprat and Andrew Svetlov in :gh:`87518`.)" msgstr "" -#: ../../whatsnew/3.11.rst:588 +#: ../../whatsnew/3.11.rst:598 msgid "" "Added keyword argument *all_errors* to :meth:`asyncio.loop." "create_connection` so that multiple connection errors can be raised as an :" "exc:`ExceptionGroup`." msgstr "" -#: ../../whatsnew/3.11.rst:591 +#: ../../whatsnew/3.11.rst:601 msgid "" "Added the :meth:`asyncio.StreamWriter.start_tls` method for upgrading " "existing stream-based connections to TLS. (Contributed by Ian Good in :issue:" "`34975`.)" msgstr "" -#: ../../whatsnew/3.11.rst:595 +#: ../../whatsnew/3.11.rst:605 msgid "" "Added raw datagram socket functions to the event loop: :meth:`~asyncio.loop." "sock_sendto`, :meth:`~asyncio.loop.sock_recvfrom` and :meth:`~asyncio.loop." @@ -688,29 +700,29 @@ msgid "" "Alex Grönholm in :issue:`46805`.)" msgstr "" -#: ../../whatsnew/3.11.rst:603 +#: ../../whatsnew/3.11.rst:613 msgid "" "Added :meth:`~asyncio.Task.cancelling` and :meth:`~asyncio.Task.uncancel` " "methods to :class:`~asyncio.Task`. These are primarily intended for internal " "use, notably by :class:`~asyncio.TaskGroup`." msgstr "" -#: ../../whatsnew/3.11.rst:609 +#: ../../whatsnew/3.11.rst:622 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.11.rst:611 +#: ../../whatsnew/3.11.rst:624 msgid "" "Added non parallel-safe :func:`~contextlib.chdir` context manager to change " "the current working directory and then restore it on exit. Simple wrapper " "around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)" msgstr "" -#: ../../whatsnew/3.11.rst:616 +#: ../../whatsnew/3.11.rst:632 msgid "dataclasses" msgstr "dataclasses" -#: ../../whatsnew/3.11.rst:618 +#: ../../whatsnew/3.11.rst:634 msgid "" "Change field default mutability check, allowing only defaults which are :" "term:`hashable` instead of any object which is not an instance of :class:" @@ -718,17 +730,17 @@ msgid "" "issue:`44674`.)" msgstr "" -#: ../../whatsnew/3.11.rst:624 +#: ../../whatsnew/3.11.rst:643 msgid "datetime" msgstr "datetime" -#: ../../whatsnew/3.11.rst:626 +#: ../../whatsnew/3.11.rst:645 msgid "" "Add :attr:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." "utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" msgstr "" -#: ../../whatsnew/3.11.rst:628 +#: ../../whatsnew/3.11.rst:648 msgid "" ":meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` " "and :meth:`datetime.datetime.fromisoformat` can now be used to parse most " @@ -736,132 +748,159 @@ msgid "" "minutes). (Contributed by Paul Ganssle in :gh:`80010`.)" msgstr "" -#: ../../whatsnew/3.11.rst:634 +#: ../../whatsnew/3.11.rst:657 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.11.rst:636 -msgid "``EnumMeta`` renamed to ``EnumType`` (``EnumMeta`` kept as alias)." +#: ../../whatsnew/3.11.rst:659 +msgid "" +"Renamed :class:`!EnumMeta` to :class:`~enum.EnumType` (:class:`!EnumMeta` " +"kept as an alias)." msgstr "" -#: ../../whatsnew/3.11.rst:638 -msgid "``StrEnum`` added -- enum members are and must be strings." +#: ../../whatsnew/3.11.rst:662 +msgid "" +"Added :class:`~enum.StrEnum`, with members that can be used as (and must be) " +"strings." msgstr "" -#: ../../whatsnew/3.11.rst:640 +#: ../../whatsnew/3.11.rst:665 msgid "" -"``ReprEnum`` added -- causes only the ``__repr__`` to be modified, not the " -"``__str__`` nor the ``__format__``." +"Added :class:`~enum.ReprEnum`, which only modifies the :meth:`~object." +"__repr__` of members while returning their literal values (rather than " +"names) for :meth:`~object.__str__` and :meth:`~object.__format__` (used by :" +"func:`str`, :func:`format` and :term:`f-string`\\s)." msgstr "" -#: ../../whatsnew/3.11.rst:643 +#: ../../whatsnew/3.11.rst:671 msgid "" -"``FlagBoundary`` added -- controls behavior when invalid values are given to " -"a flag." +"Changed :class:`~enum.IntEnum`, :class:`~enum.IntFlag` and :class:`~enum." +"StrEnum` to now inherit from :class:`~enum.ReprEnum`, so their :func:`str` " +"output now matches :func:`format` (both ``str(AnIntEnum.ONE)`` and " +"``format(AnIntEnum.ONE)`` return ``'1'``, whereas before ``str(AnIntEnum." +"ONE)`` returned ``'AnIntEnum.ONE'``." msgstr "" -#: ../../whatsnew/3.11.rst:646 +#: ../../whatsnew/3.11.rst:677 msgid "" -"``EnumCheck`` added -- used by ``verify`` to ensure various constraints." +"Changed :meth:`Enum.__format__() ` (the default for :" +"func:`format`, :meth:`str.format` and :term:`f-string`\\s) of enums with " +"mixed-in types (e.g. :class:`int`, :class:`str`) to also include the class " +"name in the output, not just the member's key. This matches the existing " +"behavior of :meth:`enum.Enum.__str__`, returning e.g. ``'AnEnum.MEMBER'`` " +"for an enum ``AnEnum(str, Enum)`` instead of just ``'MEMBER'``." msgstr "" -#: ../../whatsnew/3.11.rst:648 -msgid "``verify`` added -- function to ensure given ``EnumCheck`` constraints." +#: ../../whatsnew/3.11.rst:685 +msgid "" +"Added a new *boundary* class parameter to :class:`~enum.Flag` enums and the :" +"class:`~enum.FlagBoundary` enum with its options, to control how to handle " +"out-of-range flag values." msgstr "" -#: ../../whatsnew/3.11.rst:650 +#: ../../whatsnew/3.11.rst:689 msgid "" -"``member`` added -- decorator to ensure given object is converted to an enum " -"member." +"Added the :func:`~enum.verify` enum decorator and the :class:`~enum." +"EnumCheck` enum with its options, to check enum classes against several " +"specific constraints." msgstr "" -#: ../../whatsnew/3.11.rst:653 +#: ../../whatsnew/3.11.rst:693 msgid "" -"``nonmember`` added -- decorator to ensure given object is not converted to " -"an enum member." +"Added the :func:`~enum.member` and :func:`~enum.nonmember` decorators, to " +"ensure the decorated object is/is not converted to an enum member." msgstr "" -#: ../../whatsnew/3.11.rst:656 -msgid "``property`` added -- use instead of ``types.DynamicClassAttribute``." +#: ../../whatsnew/3.11.rst:696 +msgid "" +"Added the :func:`~enum.property` decorator, which works like :func:" +"`property` except for enums. Use this instead of :func:`types." +"DynamicClassAttribute`." msgstr "" -#: ../../whatsnew/3.11.rst:658 +#: ../../whatsnew/3.11.rst:700 msgid "" -"``global_enum`` added -- enum decorator to adjust ``__repr__`` and " -"``__str__`` to show members in the global context -- see ``re.RegexFlag`` " -"for an example." +"Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" +"`~object.__repr__` and :meth:`~object.__str__` to show values as members of " +"their module rather than the enum class. For example, ``'re.ASCII'`` for " +"the :data:`~re.ASCII` member of :class:`re.RegexFlag` rather than " +"``'RegexFlag.ASCII'``." msgstr "" -#: ../../whatsnew/3.11.rst:661 +#: ../../whatsnew/3.11.rst:706 msgid "" -"``Flag`` enhancements: members support length, iteration, and containment " -"checks." +"Enhanced :class:`~enum.Flag` to support :func:`len`, iteration and :keyword:" +"`in`/:keyword:`not in` on its members. For example, the following now works: " +"``len(AFlag(3)) == 2 and list(AFlag(3)) == (AFlag.ONE, AFlag.TWO)``" msgstr "" -#: ../../whatsnew/3.11.rst:664 +#: ../../whatsnew/3.11.rst:711 msgid "" -"``Enum``/``Flag`` fixes: members are now defined before " -"``__init_subclass__`` is called; ``dir()`` now includes methods, etc., from " -"mixed-in data types." +"Changed :class:`~enum.Enum` and :class:`~enum.Flag` so that members are now " +"defined before :meth:`~object.__init_subclass__` is called; :func:`dir` now " +"includes methods, etc., from mixed-in data types." msgstr "" -#: ../../whatsnew/3.11.rst:667 +#: ../../whatsnew/3.11.rst:716 msgid "" -"``Flag`` fixes: only primary values (power of two) are considered canonical " -"while composite values (3, 6, 10, etc.) are considered aliases; inverted " -"flags are coerced to their positive equivalent." +"Changed :class:`~enum.Flag` to only consider primary values (power of two) " +"canonical while composite values (``3``, ``6``, ``10``, etc.) are considered " +"aliases; inverted flags are coerced to their positive equivalent." msgstr "" -#: ../../whatsnew/3.11.rst:671 +#: ../../whatsnew/3.11.rst:725 +msgid "fcntl" +msgstr "fcntl" + +#: ../../whatsnew/3.11.rst:727 msgid "" -"``IntEnum`` / ``IntFlag`` / ``StrEnum`` fixes: these now inherit from " -"``ReprEnum`` so the ``str()`` output now matches ``format()`` output, which " -"is the data types' (so both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum." -"ONE)`` is equal to ``'1'``)." +"On FreeBSD, the :data:`!F_DUP2FD` and :data:`!F_DUP2FD_CLOEXEC` flags " +"respectively are supported, the former equals to ``dup2`` usage while the " +"latter set the ``FD_CLOEXEC`` flag in addition." msgstr "" -#: ../../whatsnew/3.11.rst:677 +#: ../../whatsnew/3.11.rst:735 msgid "fractions" msgstr "fractions" -#: ../../whatsnew/3.11.rst:679 +#: ../../whatsnew/3.11.rst:737 msgid "" "Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from " "string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)" msgstr "" -#: ../../whatsnew/3.11.rst:682 +#: ../../whatsnew/3.11.rst:740 msgid "" ":class:`~fractions.Fraction` now implements an ``__int__`` method, so that " "an ``isinstance(some_fraction, typing.SupportsInt)`` check passes. " "(Contributed by Mark Dickinson in :issue:`44547`.)" msgstr "" -#: ../../whatsnew/3.11.rst:687 +#: ../../whatsnew/3.11.rst:748 msgid "functools" msgstr "functools" -#: ../../whatsnew/3.11.rst:689 +#: ../../whatsnew/3.11.rst:750 msgid "" ":func:`functools.singledispatch` now supports :data:`types.UnionType` and :" "data:`typing.Union` as annotations to the dispatch argument.::" msgstr "" -#: ../../whatsnew/3.11.rst:714 +#: ../../whatsnew/3.11.rst:775 msgid "(Contributed by Yurii Karabas in :issue:`46014`.)" msgstr "" -#: ../../whatsnew/3.11.rst:717 +#: ../../whatsnew/3.11.rst:781 msgid "hashlib" msgstr "hashlib" -#: ../../whatsnew/3.11.rst:719 +#: ../../whatsnew/3.11.rst:783 msgid "" ":func:`hashlib.blake2b` and :func:`hashlib.blake2s` now prefer `libb2`_ over " "Python's vendored copy. (Contributed by Christian Heimes in :issue:`47095`.)" msgstr "" -#: ../../whatsnew/3.11.rst:723 +#: ../../whatsnew/3.11.rst:787 msgid "" "The internal ``_sha3`` module with SHA3 and SHAKE algorithms now uses " "*tiny_sha3* instead of the *Keccak Code Package* to reduce code and binary " @@ -870,85 +909,128 @@ msgid "" "OpenSSL support. (Contributed by Christian Heimes in :issue:`47098`.)" msgstr "" -#: ../../whatsnew/3.11.rst:730 +#: ../../whatsnew/3.11.rst:794 msgid "" "Add :func:`hashlib.file_digest`, a helper function for efficient hashing of " "files or file-like objects. (Contributed by Christian Heimes in :gh:`89313`.)" msgstr "" -#: ../../whatsnew/3.11.rst:735 +#: ../../whatsnew/3.11.rst:802 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.11.rst:737 +#: ../../whatsnew/3.11.rst:804 msgid "" -"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and " -"Terry Jan Reedy in :issue:`45447`.)" +"Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " +"and Terry Jan Reedy in :issue:`45447`.)" msgstr "" -#: ../../whatsnew/3.11.rst:740 +#: ../../whatsnew/3.11.rst:807 msgid "" "Include prompts when saving Shell with inputs and outputs. (Contributed by " "Terry Jan Reedy in :gh:`95191`.)" msgstr "" -#: ../../whatsnew/3.11.rst:744 +#: ../../whatsnew/3.11.rst:814 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.11.rst:745 +#: ../../whatsnew/3.11.rst:816 msgid "" -"Add :func:`inspect.getmembers_static`: return all members without triggering " -"dynamic lookup via the descriptor protocol. (Contributed by Weipeng Hong in :" -"issue:`30533`.)" +"Add :func:`~inspect.getmembers_static` to return all members without " +"triggering dynamic lookup via the descriptor protocol. (Contributed by " +"Weipeng Hong in :issue:`30533`.)" msgstr "" -#: ../../whatsnew/3.11.rst:749 +#: ../../whatsnew/3.11.rst:820 msgid "" -"Add :func:`inspect.ismethodwrapper` for checking if the type of an object is " -"a :class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :issue:" -"`29418`.)" +"Add :func:`~inspect.ismethodwrapper` for checking if the type of an object " +"is a :class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :" +"issue:`29418`.)" msgstr "" -#: ../../whatsnew/3.11.rst:752 +#: ../../whatsnew/3.11.rst:824 msgid "" -"Change the frame-related functions in the :mod:`inspect` module to return a " -"regular object (that is backwards compatible with the old tuple-like " -"interface) that include the extended :pep:`657` position information (end " -"line number, column and end column). The affected functions are: :func:" -"`inspect.getframeinfo`, :func:`inspect.getouterframes`, :func:`inspect." -"getinnerframes`, :func:`inspect.stack` and :func:`inspect.trace`. " -"(Contributed by Pablo Galindo in :gh:`88116`.)" +"Change the frame-related functions in the :mod:`inspect` module to return " +"new :class:`~inspect.FrameInfo` and :class:`~inspect.Traceback` class " +"instances (backwards compatible with the previous :term:`named tuple`-like " +"interfaces) that includes the extended :pep:`657` position information (end " +"line number, column and end column). The affected functions are:" +msgstr "" + +#: ../../whatsnew/3.11.rst:830 +msgid ":func:`inspect.getframeinfo`" +msgstr "" + +#: ../../whatsnew/3.11.rst:831 +msgid ":func:`inspect.getouterframes`" +msgstr "" + +#: ../../whatsnew/3.11.rst:832 +msgid ":func:`inspect.getinnerframes`," msgstr "" -#: ../../whatsnew/3.11.rst:761 +#: ../../whatsnew/3.11.rst:833 +msgid ":func:`inspect.stack`" +msgstr "" + +#: ../../whatsnew/3.11.rst:834 +msgid ":func:`inspect.trace`" +msgstr "" + +#: ../../whatsnew/3.11.rst:836 +msgid "(Contributed by Pablo Galindo in :gh:`88116`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:842 msgid "locale" msgstr "locale" -#: ../../whatsnew/3.11.rst:763 +#: ../../whatsnew/3.11.rst:844 msgid "" "Add :func:`locale.getencoding` to get the current locale encoding. It is " "similar to ``locale.getpreferredencoding(False)`` but ignores the :ref:" "`Python UTF-8 Mode `." msgstr "" -#: ../../whatsnew/3.11.rst:768 +#: ../../whatsnew/3.11.rst:852 +msgid "logging" +msgstr "" + +#: ../../whatsnew/3.11.rst:854 +msgid "" +"Added :func:`~logging.getLevelNamesMapping` to return a mapping from logging " +"level names (e.g. ``'CRITICAL'``) to the values of their corresponding :ref:" +"`levels` (e.g. ``50``, by default). (Contributed by Andrei Kulakovin in :gh:" +"`88024`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:859 +msgid "" +"Added a :meth:`~logging.handlers.SysLogHandler.createSocket` method to :" +"class:`~logging.handlers.SysLogHandler`, to match :meth:`SocketHandler." +"createSocket() `. It is called " +"automatically during handler initialization and when emitting an event, if " +"there is no active socket. (Contributed by Kirill Pinchuk in :gh:`88457`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:871 msgid "math" msgstr "math" -#: ../../whatsnew/3.11.rst:770 +#: ../../whatsnew/3.11.rst:873 msgid "" "Add :func:`math.exp2`: return 2 raised to the power of x. (Contributed by " "Gideon Mitchell in :issue:`45917`.)" msgstr "" -#: ../../whatsnew/3.11.rst:773 +#: ../../whatsnew/3.11.rst:876 msgid "" "Add :func:`math.cbrt`: return the cube root of x. (Contributed by Ajith " "Ramachandran in :issue:`44357`.)" msgstr "" -#: ../../whatsnew/3.11.rst:776 +#: ../../whatsnew/3.11.rst:879 msgid "" "The behaviour of two :func:`math.pow` corner cases was changed, for " "consistency with the IEEE 754 specification. The operations ``math.pow(0.0, -" @@ -957,39 +1039,39 @@ msgid "" "`44339`.)" msgstr "" -#: ../../whatsnew/3.11.rst:782 +#: ../../whatsnew/3.11.rst:885 msgid "" "The :data:`math.nan` value is now always available. (Contributed by Victor " "Stinner in :issue:`46917`.)" msgstr "" -#: ../../whatsnew/3.11.rst:787 +#: ../../whatsnew/3.11.rst:892 msgid "operator" msgstr "operator" -#: ../../whatsnew/3.11.rst:789 +#: ../../whatsnew/3.11.rst:894 msgid "" "A new function ``operator.call`` has been added, such that ``operator." "call(obj, *args, **kwargs) == obj(*args, **kwargs)``. (Contributed by Antony " "Lee in :issue:`44019`.)" msgstr "" -#: ../../whatsnew/3.11.rst:795 +#: ../../whatsnew/3.11.rst:902 msgid "os" msgstr "os" -#: ../../whatsnew/3.11.rst:797 +#: ../../whatsnew/3.11.rst:904 msgid "" "On Windows, :func:`os.urandom` now uses ``BCryptGenRandom()``, instead of " "``CryptGenRandom()`` which is deprecated. (Contributed by Dong-hee Na in :" "issue:`44611`.)" msgstr "" -#: ../../whatsnew/3.11.rst:803 +#: ../../whatsnew/3.11.rst:912 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.11.rst:805 +#: ../../whatsnew/3.11.rst:914 msgid "" ":meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only " "directories if *pattern* ends with a pathname components separator: :data:" @@ -997,56 +1079,56 @@ msgid "" "`22276` and :issue:`33392`.)" msgstr "" -#: ../../whatsnew/3.11.rst:811 +#: ../../whatsnew/3.11.rst:923 msgid "re" msgstr "re" -#: ../../whatsnew/3.11.rst:813 +#: ../../whatsnew/3.11.rst:925 msgid "" "Atomic grouping (``(?>...)``) and possessive quantifiers (``*+``, ``++``, ``?" "+``, ``{m,n}+``) are now supported in regular expressions. (Contributed by " "Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)" msgstr "" -#: ../../whatsnew/3.11.rst:818 +#: ../../whatsnew/3.11.rst:933 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.11.rst:820 +#: ../../whatsnew/3.11.rst:935 msgid "" "Add optional parameter *dir_fd* in :func:`shutil.rmtree`. (Contributed by " "Serhiy Storchaka in :issue:`46245`.)" msgstr "" -#: ../../whatsnew/3.11.rst:825 +#: ../../whatsnew/3.11.rst:942 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.11.rst:827 +#: ../../whatsnew/3.11.rst:944 msgid "" "Add CAN Socket support for NetBSD. (Contributed by Thomas Klausner in :issue:" "`30512`.)" msgstr "" -#: ../../whatsnew/3.11.rst:830 +#: ../../whatsnew/3.11.rst:947 msgid "" ":meth:`~socket.create_connection` has an option to raise, in case of failure " "to connect, an :exc:`ExceptionGroup` containing all errors instead of only " "raising the last error. (Contributed by Irit Katriel in :issue:`29980`.)" msgstr "" -#: ../../whatsnew/3.11.rst:836 +#: ../../whatsnew/3.11.rst:956 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.11.rst:838 +#: ../../whatsnew/3.11.rst:958 msgid "" "You can now disable the authorizer by passing :const:`None` to :meth:" "`~sqlite3.Connection.set_authorizer`. (Contributed by Erlend E. Aasland in :" "issue:`44491`.)" msgstr "" -#: ../../whatsnew/3.11.rst:842 +#: ../../whatsnew/3.11.rst:962 msgid "" "Collation name :meth:`~sqlite3.Connection.create_collation` can now contain " "any Unicode character. Collation names with invalid characters now raise :" @@ -1054,7 +1136,7 @@ msgid "" "(Contributed by Erlend E. Aasland in :issue:`44688`.)" msgstr "" -#: ../../whatsnew/3.11.rst:847 +#: ../../whatsnew/3.11.rst:967 msgid "" ":mod:`sqlite3` exceptions now include the SQLite extended error code as :" "attr:`~sqlite3.Error.sqlite_errorcode` and the SQLite error name as :attr:" @@ -1062,7 +1144,7 @@ msgid "" "Shahaf, and Erlend E. Aasland in :issue:`16379` and :issue:`24139`.)" msgstr "" -#: ../../whatsnew/3.11.rst:853 +#: ../../whatsnew/3.11.rst:973 msgid "" "Add :meth:`~sqlite3.Connection.setlimit` and :meth:`~sqlite3.Connection." "getlimit` to :class:`sqlite3.Connection` for setting and getting SQLite " @@ -1070,14 +1152,14 @@ msgid "" "`45243`.)" msgstr "" -#: ../../whatsnew/3.11.rst:858 +#: ../../whatsnew/3.11.rst:978 msgid "" ":mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default " "threading mode the underlying SQLite library has been compiled with. " "(Contributed by Erlend E. Aasland in :issue:`45613`.)" msgstr "" -#: ../../whatsnew/3.11.rst:862 +#: ../../whatsnew/3.11.rst:982 msgid "" ":mod:`sqlite3` C callbacks now use unraisable exceptions if callback " "tracebacks are enabled. Users can now register an :func:`unraisable hook " @@ -1085,14 +1167,14 @@ msgid "" "(Contributed by Erlend E. Aasland in :issue:`45828`.)" msgstr "" -#: ../../whatsnew/3.11.rst:868 +#: ../../whatsnew/3.11.rst:988 msgid "" "Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`. " "Instead we leave it to the SQLite library to handle these cases. " "(Contributed by Erlend E. Aasland in :issue:`44092`.)" msgstr "" -#: ../../whatsnew/3.11.rst:872 +#: ../../whatsnew/3.11.rst:992 msgid "" "Add :meth:`~sqlite3.Connection.serialize` and :meth:`~sqlite3.Connection." "deserialize` to :class:`sqlite3.Connection` for serializing and " @@ -1100,51 +1182,63 @@ msgid "" "`41930`.)" msgstr "" -#: ../../whatsnew/3.11.rst:877 +#: ../../whatsnew/3.11.rst:997 msgid "" "Add :meth:`~sqlite3.Connection.create_window_function` to :class:`sqlite3." "Connection` for creating aggregate window functions. (Contributed by Erlend " "E. Aasland in :issue:`34916`.)" msgstr "" -#: ../../whatsnew/3.11.rst:881 +#: ../../whatsnew/3.11.rst:1001 msgid "" "Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`. :" "class:`sqlite3.Blob` allows incremental I/O operations on blobs. " "(Contributed by Aviv Palivoda and Erlend E. Aasland in :issue:`24905`.)" msgstr "" -#: ../../whatsnew/3.11.rst:887 +#: ../../whatsnew/3.11.rst:1009 +msgid "string" +msgstr "" + +#: ../../whatsnew/3.11.rst:1011 +msgid "" +"Add :meth:`~string.Template.get_identifiers` and :meth:`~string.Template." +"is_valid` to :class:`string.Template`, which respectively return all valid " +"placeholders, and whether any invalid placeholders are present. (Contributed " +"by Ben Kehoe in :gh:`90465`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1021 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.11.rst:889 +#: ../../whatsnew/3.11.rst:1023 msgid "" ":func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields from " "the ``value`` (the exception instance), so when an exception is modified " "while it is being handled, the changes are reflected in the results of " -"subsequent calls to :func:`exc_info`. (Contributed by Irit Katriel in :issue:" -"`45711`.)" +"subsequent calls to :func:`!exc_info`. (Contributed by Irit Katriel in :" +"issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:895 +#: ../../whatsnew/3.11.rst:1029 msgid "" "Add :func:`sys.exception` which returns the active exception instance " "(equivalent to ``sys.exc_info()[1]``). (Contributed by Irit Katriel in :" "issue:`46328`.)" msgstr "" -#: ../../whatsnew/3.11.rst:899 +#: ../../whatsnew/3.11.rst:1033 msgid "" "Add the :data:`sys.flags.safe_path ` flag. (Contributed by Victor " "Stinner in :gh:`57684`.)" msgstr "" -#: ../../whatsnew/3.11.rst:904 +#: ../../whatsnew/3.11.rst:1040 msgid "sysconfig" msgstr "sysconfig" -#: ../../whatsnew/3.11.rst:906 +#: ../../whatsnew/3.11.rst:1042 msgid "" "Three new :ref:`installation schemes ` (*posix_venv*, " "*nt_venv* and *venv*) were added and are used when Python creates new " @@ -1158,11 +1252,24 @@ msgid "" "(Contributed by Miro Hrončok in :issue:`45413`.)" msgstr "" -#: ../../whatsnew/3.11.rst:921 +#: ../../whatsnew/3.11.rst:1059 +msgid "tempfile" +msgstr "" + +#: ../../whatsnew/3.11.rst:1061 +msgid "" +":class:`~tempfile.SpooledTemporaryFile` objects now fully implement the " +"methods of :class:`io.BufferedIOBase` or :class:`io.TextIOBase` (depending " +"on file mode). This lets them work correctly with APIs that expect file-like " +"objects, such as compression modules. (Contributed by Carey Metcalfe in :gh:" +"`70363`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1072 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.11.rst:923 +#: ../../whatsnew/3.11.rst:1074 msgid "" "On Unix, if the ``sem_clockwait()`` function is available in the C library " "(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses " @@ -1172,11 +1279,11 @@ msgid "" "`41710`.)" msgstr "" -#: ../../whatsnew/3.11.rst:932 +#: ../../whatsnew/3.11.rst:1085 msgid "time" msgstr "time" -#: ../../whatsnew/3.11.rst:934 +#: ../../whatsnew/3.11.rst:1087 msgid "" "On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or " "``nanosleep()`` function, if available, which has a resolution of 1 " @@ -1185,7 +1292,7 @@ msgid "" "Benjamin Szőke and Victor Stinner in :issue:`21302`.)" msgstr "" -#: ../../whatsnew/3.11.rst:940 +#: ../../whatsnew/3.11.rst:1093 msgid "" "On Windows 8.1 and newer, :func:`time.sleep` now uses a waitable timer based " "on `high-resolution timers `. " "(Contributed by Niklas Rosenstein in :gh:`85542`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1017 +#: ../../whatsnew/3.11.rst:1184 msgid "" ":func:`typing.get_type_hints` no longer adds :data:`~typing.Optional` to " "parameters with ``None`` as a default. (Contributed by Nikita Sobolev in :gh:" "`90353`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1021 +#: ../../whatsnew/3.11.rst:1188 msgid "" ":func:`typing.get_type_hints` now supports evaluating bare stringified :data:" "`~typing.ClassVar` annotations. (Contributed by Gregory Beauregard in :gh:" "`90711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1025 +#: ../../whatsnew/3.11.rst:1192 msgid "" ":func:`typing.no_type_check` no longer modifies external classes and " "functions. It also now correctly marks classmethods as not to be type " "checked. (Contributed by Nikita Sobolev in :gh:`90729`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1031 -msgid "tkinter" -msgstr "tkinter" - -#: ../../whatsnew/3.11.rst:1033 -msgid "" -"Added method ``info_patchlevel()`` which returns the exact version of the " -"Tcl library as a named tuple similar to :data:`sys.version_info`. " -"(Contributed by Serhiy Storchaka in :gh:`91827`.)" -msgstr "" - -#: ../../whatsnew/3.11.rst:1039 +#: ../../whatsnew/3.11.rst:1200 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.11.rst:1041 +#: ../../whatsnew/3.11.rst:1202 msgid "" -"The Unicode database has been updated to version 14.0.0. (Contributed by " +"The Unicode database has been updated to version 14.0.0. (Contributed by " "Benjamin Peterson in :issue:`45190`)." msgstr "" -#: ../../whatsnew/3.11.rst:1045 +#: ../../whatsnew/3.11.rst:1209 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.11.rst:1047 +#: ../../whatsnew/3.11.rst:1211 msgid "" "Added methods :meth:`~unittest.TestCase.enterContext` and :meth:`~unittest." "TestCase.enterClassContext` of class :class:`~unittest.TestCase`, method :" @@ -1359,11 +1466,11 @@ msgid "" "enterModuleContext`. (Contributed by Serhiy Storchaka in :issue:`45046`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1057 +#: ../../whatsnew/3.11.rst:1223 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.11.rst:1059 +#: ../../whatsnew/3.11.rst:1225 msgid "" "When new Python virtual environments are created, the *venv* :ref:`sysconfig " "installation scheme ` is used to determine the paths " @@ -1375,11 +1482,11 @@ msgid "" "`45413`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1070 +#: ../../whatsnew/3.11.rst:1239 msgid "warnings" msgstr "warnings" -#: ../../whatsnew/3.11.rst:1072 +#: ../../whatsnew/3.11.rst:1241 msgid "" ":func:`warnings.catch_warnings` now accepts arguments for :func:`warnings." "simplefilter`, providing a more concise way to locally ignore warnings or " @@ -1387,82 +1494,111 @@ msgid "" "`47074`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1077 +#: ../../whatsnew/3.11.rst:1249 msgid "zipfile" msgstr "zipfile" -#: ../../whatsnew/3.11.rst:1079 +#: ../../whatsnew/3.11.rst:1251 msgid "" -"Added support for specifying member name encoding for reading metadata in " -"the zipfile's directory and file headers. (Contributed by Stephen J. " -"Turnbull and Serhiy Storchaka in :issue:`28080`.)" +"Added support for specifying member name encoding for reading metadata in a :" +"class:`~zipfile.ZipFile`'s directory and file headers. (Contributed by " +"Stephen J. Turnbull and Serhiy Storchaka in :issue:`28080`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1084 -msgid "fcntl" -msgstr "fcntl" +#: ../../whatsnew/3.11.rst:1255 +msgid "" +"Added :meth:`ZipFile.mkdir() ` for creating new " +"directories inside ZIP archives. (Contributed by Sam Ezeh in :gh:`49083`.)" +msgstr "" -#: ../../whatsnew/3.11.rst:1086 +#: ../../whatsnew/3.11.rst:1259 msgid "" -"On FreeBSD, the :attr:`F_DUP2FD` and :attr:`F_DUP2FD_CLOEXEC` flags " -"respectively are supported, the former equals to ``dup2`` usage while the " -"latter set the ``FD_CLOEXEC`` flag in addition." +"Added :attr:`~zipfile.Path.stem`, :attr:`~zipfile.Path.suffix` and :attr:" +"`~zipfile.Path.suffixes` to :class:`zipfile.Path`. (Contributed by Miguel " +"Brito in :gh:`88261`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1092 +#: ../../whatsnew/3.11.rst:1267 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.11.rst:1094 +#: ../../whatsnew/3.11.rst:1269 msgid "" -"Compiler now optimizes simple C-style formatting with literal format " -"containing only format codes ``%s``, ``%r`` and ``%a`` and makes it as fast " -"as corresponding f-string expression. (Contributed by Serhiy Storchaka in :" -"issue:`28307`.)" +"This section covers specific optimizations independent of the :ref:" +"`whatsnew311-faster-cpython` project, which is covered in its own section." msgstr "" -#: ../../whatsnew/3.11.rst:1099 +#: ../../whatsnew/3.11.rst:1272 msgid "" -"\"Zero-cost\" exceptions are implemented. The cost of ``try`` statements is " -"almost eliminated when no exception is raised. (Contributed by Mark Shannon " -"in :issue:`40222`.)" +"The compiler now optimizes simple :ref:`printf-style % formatting ` on string literals containing only the format codes ``" +"%s``, ``%r`` and ``%a`` and makes it as fast as a corresponding :term:`f-" +"string` expression. (Contributed by Serhiy Storchaka in :issue:`28307`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1103 +#: ../../whatsnew/3.11.rst:1278 msgid "" -"Pure ASCII strings are now normalized in constant time by :func:`unicodedata." -"normalize`. (Contributed by Dong-hee Na in :issue:`44987`.)" +"Integer division (``//``) is better tuned for optimization by compilers. It " +"is now around 20% faster on x86-64 when dividing an :class:`int` by a value " +"smaller than ``2**30``. (Contributed by Gregory P. Smith and Tim Peters in :" +"gh:`90564`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1106 +#: ../../whatsnew/3.11.rst:1283 msgid "" -":mod:`math` functions :func:`~math.comb` and :func:`~math.perm` are now up " -"to 10 times or more faster for large arguments (the speed up is larger for " -"larger *k*). (Contributed by Serhiy Storchaka in :issue:`37295`.)" +":func:`sum` is now nearly 30% faster for integers smaller than ``2**30``. " +"(Contributed by Stefan Behnel in :gh:`68264`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1111 +#: ../../whatsnew/3.11.rst:1286 msgid "" -"Dict don't store hash value when all inserted keys are Unicode objects. This " -"reduces dict size. For example, ``sys.getsizeof(dict.fromkeys(\"abcdefg" -"\"))`` becomes 272 bytes from 352 bytes on 64bit platform. (Contributed by " -"Inada Naoki in :issue:`46845`.)" +"Resizing lists is streamlined for the common case, speeding up :meth:`list." +"append` by ≈15% and simple :term:`list comprehension`\\s by up to 20-30% " +"(Contributed by Dennis Sweeney in :gh:`91165`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1116 +#: ../../whatsnew/3.11.rst:1291 +msgid "" +"Dictionaries don't store hash values when all keys are Unicode objects, " +"decreasing :class:`dict` size. For example, ``sys.getsizeof(dict." +"fromkeys(\"abcdefg\"))`` is reduced from 352 bytes to 272 bytes (23% " +"smaller) on 64-bit platforms. (Contributed by Inada Naoki in :issue:`46845`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1297 +msgid "" +"Using :class:`asyncio.DatagramProtocol` is now orders of magnitude faster " +"when transferring large files over UDP, with speeds over 100 times higher " +"for a ≈60 MiB file. (Contributed by msoxzw in :gh:`91487`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1302 +msgid "" +":mod:`math` functions :func:`~math.comb` and :func:`~math.perm` are now ≈10 " +"times faster for large arguments (with a larger speedup for larger *k*). " +"(Contributed by Serhiy Storchaka in :issue:`37295`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1306 +msgid "" +"The :mod:`statistics` functions :func:`~statistics.mean`, :func:`~statistics." +"variance` and :func:`~statistics.stdev` now consume iterators in one pass " +"rather than converting them to a :class:`list` first. This is twice as fast " +"and can save substantial memory. (Contributed by Raymond Hettinger in :gh:" +"`90415`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1312 msgid "" -":mod:`re`'s regular expression matching engine has been partially " -"refactored, and now uses computed gotos (or \"threaded code\") on supported " -"platforms. As a result, Python 3.11 executes the `pyperformance regular " -"expression benchmarks `_ up to 10% faster than Python 3.10." +":func:`unicodedata.normalize` now normalizes pure-ASCII strings in constant " +"time. (Contributed by Dong-hee Na in :issue:`44987`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1124 +#: ../../whatsnew/3.11.rst:1320 msgid "Faster CPython" msgstr "" -#: ../../whatsnew/3.11.rst:1126 +#: ../../whatsnew/3.11.rst:1322 msgid "" "CPython 3.11 is on average `25% faster `_ than CPython 3.10 when measured with the " @@ -1471,32 +1607,32 @@ msgid "" "speedup could be up to 10-60% faster." msgstr "" -#: ../../whatsnew/3.11.rst:1132 +#: ../../whatsnew/3.11.rst:1328 msgid "" "This project focuses on two major areas in Python: faster startup and faster " "runtime. Other optimizations not under this project are listed in " "`Optimizations`_." msgstr "" -#: ../../whatsnew/3.11.rst:1136 +#: ../../whatsnew/3.11.rst:1335 msgid "Faster Startup" msgstr "" -#: ../../whatsnew/3.11.rst:1139 +#: ../../whatsnew/3.11.rst:1340 msgid "Frozen imports / Static code objects" msgstr "" -#: ../../whatsnew/3.11.rst:1141 +#: ../../whatsnew/3.11.rst:1342 msgid "" "Python caches bytecode in the :ref:`__pycache__` directory to " "speed up module loading." msgstr "" -#: ../../whatsnew/3.11.rst:1144 +#: ../../whatsnew/3.11.rst:1345 msgid "Previously in 3.10, Python module execution looked like this:" msgstr "" -#: ../../whatsnew/3.11.rst:1150 +#: ../../whatsnew/3.11.rst:1351 msgid "" "In Python 3.11, the core modules essential for Python startup are \"frozen" "\". This means that their code objects (and bytecode) are statically " @@ -1504,48 +1640,48 @@ msgid "" "process to this:" msgstr "" -#: ../../whatsnew/3.11.rst:1158 +#: ../../whatsnew/3.11.rst:1359 msgid "" "Interpreter startup is now 10-15% faster in Python 3.11. This has a big " "impact for short-running programs using Python." msgstr "" -#: ../../whatsnew/3.11.rst:1161 +#: ../../whatsnew/3.11.rst:1362 msgid "" "(Contributed by Eric Snow, Guido van Rossum and Kumar Aditya in numerous " "issues.)" msgstr "" -#: ../../whatsnew/3.11.rst:1165 +#: ../../whatsnew/3.11.rst:1368 msgid "Faster Runtime" msgstr "" -#: ../../whatsnew/3.11.rst:1168 +#: ../../whatsnew/3.11.rst:1373 msgid "Cheaper, lazy Python frames" msgstr "" -#: ../../whatsnew/3.11.rst:1169 +#: ../../whatsnew/3.11.rst:1375 msgid "" "Python frames are created whenever Python calls a Python function. This " "frame holds execution information. The following are new frame optimizations:" msgstr "" -#: ../../whatsnew/3.11.rst:1172 +#: ../../whatsnew/3.11.rst:1378 msgid "Streamlined the frame creation process." msgstr "" -#: ../../whatsnew/3.11.rst:1173 +#: ../../whatsnew/3.11.rst:1379 msgid "" "Avoided memory allocation by generously re-using frame space on the C stack." msgstr "" -#: ../../whatsnew/3.11.rst:1174 +#: ../../whatsnew/3.11.rst:1380 msgid "" "Streamlined the internal frame struct to contain only essential information. " "Frames previously held extra debugging and memory management information." msgstr "" -#: ../../whatsnew/3.11.rst:1177 +#: ../../whatsnew/3.11.rst:1383 msgid "" "Old-style frame objects are now created only when requested by debuggers or " "by Python introspection functions such as ``sys._getframe`` or ``inspect." @@ -1554,29 +1690,29 @@ msgid "" "measured a 3-7% speedup in pyperformance." msgstr "" -#: ../../whatsnew/3.11.rst:1183 +#: ../../whatsnew/3.11.rst:1389 msgid "(Contributed by Mark Shannon in :issue:`44590`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1188 +#: ../../whatsnew/3.11.rst:1396 msgid "Inlined Python function calls" msgstr "" -#: ../../whatsnew/3.11.rst:1189 +#: ../../whatsnew/3.11.rst:1398 msgid "" "During a Python function call, Python will call an evaluating C function to " "interpret that function's code. This effectively limits pure Python " "recursion to what's safe for the C stack." msgstr "" -#: ../../whatsnew/3.11.rst:1193 +#: ../../whatsnew/3.11.rst:1402 msgid "" "In 3.11, when CPython detects Python code calling another Python function, " "it sets up a new frame, and \"jumps\" to the new code inside the new frame. " "This avoids calling the C interpreting function altogether." msgstr "" -#: ../../whatsnew/3.11.rst:1197 +#: ../../whatsnew/3.11.rst:1406 msgid "" "Most Python function calls now consume no C stack space. This speeds up most " "of such calls. In simple recursive functions like fibonacci or factorial, a " @@ -1585,15 +1721,15 @@ msgid "" "measured a 1-3% improvement in pyperformance." msgstr "" -#: ../../whatsnew/3.11.rst:1203 +#: ../../whatsnew/3.11.rst:1412 msgid "(Contributed by Pablo Galindo and Mark Shannon in :issue:`45256`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1206 +#: ../../whatsnew/3.11.rst:1418 msgid "PEP 659: Specializing Adaptive Interpreter" msgstr "" -#: ../../whatsnew/3.11.rst:1207 +#: ../../whatsnew/3.11.rst:1420 msgid "" ":pep:`659` is one of the key parts of the faster CPython project. The " "general idea is that while Python is a dynamic language, most code has " @@ -1601,7 +1737,7 @@ msgid "" "*type stability*." msgstr "" -#: ../../whatsnew/3.11.rst:1211 +#: ../../whatsnew/3.11.rst:1424 msgid "" "At runtime, Python will try to look for common patterns and type stability " "in the executing code. Python will then replace the current operation with a " @@ -1612,13 +1748,13 @@ msgid "" "bytecode." msgstr "" -#: ../../whatsnew/3.11.rst:1218 +#: ../../whatsnew/3.11.rst:1431 msgid "" "The specializer will also combine certain common instruction pairs into one " "superinstruction. This reduces the overhead during execution." msgstr "" -#: ../../whatsnew/3.11.rst:1221 +#: ../../whatsnew/3.11.rst:1434 msgid "" "Python will only specialize when it sees code that is \"hot\" (executed " "multiple times). This prevents Python from wasting time for run-once code. " @@ -1628,286 +1764,286 @@ msgid "" "circumstances." msgstr "" -#: ../../whatsnew/3.11.rst:1228 +#: ../../whatsnew/3.11.rst:1441 msgid "" "(PEP written by Mark Shannon, with ideas inspired by Stefan Brunthaler. See :" "pep:`659` for more information. Implementation by Mark Shannon and Brandt " "Bucher, with additional help from Irit Katriel and Dennis Sweeney.)" msgstr "" -#: ../../whatsnew/3.11.rst:1236 +#: ../../whatsnew/3.11.rst:1449 msgid "Operation" msgstr "" -#: ../../whatsnew/3.11.rst:1236 +#: ../../whatsnew/3.11.rst:1449 msgid "Form" msgstr "" -#: ../../whatsnew/3.11.rst:1236 +#: ../../whatsnew/3.11.rst:1449 msgid "Specialization" msgstr "" -#: ../../whatsnew/3.11.rst:1236 +#: ../../whatsnew/3.11.rst:1449 msgid "Operation speedup (up to)" msgstr "" -#: ../../whatsnew/3.11.rst:1236 +#: ../../whatsnew/3.11.rst:1449 msgid "Contributor(s)" msgstr "" -#: ../../whatsnew/3.11.rst:1239 +#: ../../whatsnew/3.11.rst:1452 msgid "Binary operations" msgstr "" -#: ../../whatsnew/3.11.rst:1239 +#: ../../whatsnew/3.11.rst:1452 msgid "``x+x; x*x; x-x;``" msgstr "``x+x; x*x; x-x;``" -#: ../../whatsnew/3.11.rst:1239 +#: ../../whatsnew/3.11.rst:1452 msgid "" "Binary add, multiply and subtract for common types such as ``int``, " "``float``, and ``str`` take custom fast paths for their underlying types." msgstr "" -#: ../../whatsnew/3.11.rst:1239 +#: ../../whatsnew/3.11.rst:1452 msgid "10%" msgstr "10%" -#: ../../whatsnew/3.11.rst:1239 +#: ../../whatsnew/3.11.rst:1452 msgid "Mark Shannon, Dong-hee Na, Brandt Bucher, Dennis Sweeney" msgstr "" -#: ../../whatsnew/3.11.rst:1244 +#: ../../whatsnew/3.11.rst:1457 msgid "Subscript" msgstr "" -#: ../../whatsnew/3.11.rst:1244 +#: ../../whatsnew/3.11.rst:1457 msgid "``a[i]``" msgstr "``a[i]``" -#: ../../whatsnew/3.11.rst:1244 +#: ../../whatsnew/3.11.rst:1457 msgid "" "Subscripting container types such as ``list``, ``tuple`` and ``dict`` " "directly index the underlying data structures." msgstr "" -#: ../../whatsnew/3.11.rst:1248 +#: ../../whatsnew/3.11.rst:1461 msgid "" "Subscripting custom ``__getitem__`` is also inlined similar to :ref:`inline-" "calls`." msgstr "" -#: ../../whatsnew/3.11.rst:1244 ../../whatsnew/3.11.rst:1251 +#: ../../whatsnew/3.11.rst:1457 ../../whatsnew/3.11.rst:1464 msgid "10-25%" msgstr "10-25%" -#: ../../whatsnew/3.11.rst:1244 +#: ../../whatsnew/3.11.rst:1457 msgid "Irit Katriel, Mark Shannon" msgstr "Irit Katriel, Mark Shannon" -#: ../../whatsnew/3.11.rst:1251 +#: ../../whatsnew/3.11.rst:1464 msgid "Store subscript" msgstr "" -#: ../../whatsnew/3.11.rst:1251 +#: ../../whatsnew/3.11.rst:1464 msgid "``a[i] = z``" msgstr "``a[i] = z``" -#: ../../whatsnew/3.11.rst:1251 +#: ../../whatsnew/3.11.rst:1464 msgid "Similar to subscripting specialization above." msgstr "" -#: ../../whatsnew/3.11.rst:1251 +#: ../../whatsnew/3.11.rst:1464 msgid "Dennis Sweeney" msgstr "Dennis Sweeney" -#: ../../whatsnew/3.11.rst:1254 +#: ../../whatsnew/3.11.rst:1467 msgid "Calls" msgstr "" -#: ../../whatsnew/3.11.rst:1254 +#: ../../whatsnew/3.11.rst:1467 msgid "``f(arg)`` ``C(arg)``" msgstr "``f(arg)`` ``C(arg)``" -#: ../../whatsnew/3.11.rst:1254 +#: ../../whatsnew/3.11.rst:1467 msgid "" "Calls to common builtin (C) functions and types such as ``len`` and ``str`` " "directly call their underlying C version. This avoids going through the " "internal calling convention." msgstr "" -#: ../../whatsnew/3.11.rst:1254 +#: ../../whatsnew/3.11.rst:1467 msgid "20%" msgstr "20%" -#: ../../whatsnew/3.11.rst:1254 +#: ../../whatsnew/3.11.rst:1467 msgid "Mark Shannon, Ken Jin" msgstr "Mark Shannon, Ken Jin" -#: ../../whatsnew/3.11.rst:1260 +#: ../../whatsnew/3.11.rst:1473 msgid "Load global variable" msgstr "" -#: ../../whatsnew/3.11.rst:1260 +#: ../../whatsnew/3.11.rst:1473 msgid "``print`` ``len``" msgstr "``print`` ``len``" -#: ../../whatsnew/3.11.rst:1260 +#: ../../whatsnew/3.11.rst:1473 msgid "" "The object's index in the globals/builtins namespace is cached. Loading " "globals and builtins require zero namespace lookups." msgstr "" -#: ../../whatsnew/3.11.rst:1260 +#: ../../whatsnew/3.11.rst:1473 msgid "[1]_" msgstr "[1]_" -#: ../../whatsnew/3.11.rst:1260 ../../whatsnew/3.11.rst:1264 -#: ../../whatsnew/3.11.rst:1273 +#: ../../whatsnew/3.11.rst:1473 ../../whatsnew/3.11.rst:1477 +#: ../../whatsnew/3.11.rst:1486 msgid "Mark Shannon" msgstr "Mark Shannon" -#: ../../whatsnew/3.11.rst:1264 +#: ../../whatsnew/3.11.rst:1477 msgid "Load attribute" msgstr "" -#: ../../whatsnew/3.11.rst:1264 +#: ../../whatsnew/3.11.rst:1477 msgid "``o.attr``" msgstr "``o.attr``" -#: ../../whatsnew/3.11.rst:1264 +#: ../../whatsnew/3.11.rst:1477 msgid "" "Similar to loading global variables. The attribute's index inside the class/" "object's namespace is cached. In most cases, attribute loading will require " "zero namespace lookups." msgstr "" -#: ../../whatsnew/3.11.rst:1264 +#: ../../whatsnew/3.11.rst:1477 msgid "[2]_" msgstr "[2]_" -#: ../../whatsnew/3.11.rst:1269 +#: ../../whatsnew/3.11.rst:1482 msgid "Load methods for call" msgstr "" -#: ../../whatsnew/3.11.rst:1269 +#: ../../whatsnew/3.11.rst:1482 msgid "``o.meth()``" msgstr "``o.meth()``" -#: ../../whatsnew/3.11.rst:1269 +#: ../../whatsnew/3.11.rst:1482 msgid "" "The actual address of the method is cached. Method loading now has no " "namespace lookups -- even for classes with long inheritance chains." msgstr "" -#: ../../whatsnew/3.11.rst:1269 +#: ../../whatsnew/3.11.rst:1482 msgid "10-20%" msgstr "10-20%" -#: ../../whatsnew/3.11.rst:1269 +#: ../../whatsnew/3.11.rst:1482 msgid "Ken Jin, Mark Shannon" msgstr "Ken Jin, Mark Shannon" -#: ../../whatsnew/3.11.rst:1273 +#: ../../whatsnew/3.11.rst:1486 msgid "Store attribute" msgstr "" -#: ../../whatsnew/3.11.rst:1273 +#: ../../whatsnew/3.11.rst:1486 msgid "``o.attr = z``" msgstr "``o.attr = z``" -#: ../../whatsnew/3.11.rst:1273 +#: ../../whatsnew/3.11.rst:1486 msgid "Similar to load attribute optimization." msgstr "" -#: ../../whatsnew/3.11.rst:1273 +#: ../../whatsnew/3.11.rst:1486 msgid "2% in pyperformance" msgstr "" -#: ../../whatsnew/3.11.rst:1276 +#: ../../whatsnew/3.11.rst:1489 msgid "Unpack Sequence" msgstr "" -#: ../../whatsnew/3.11.rst:1276 +#: ../../whatsnew/3.11.rst:1489 msgid "``*seq``" msgstr "``*seq``" -#: ../../whatsnew/3.11.rst:1276 +#: ../../whatsnew/3.11.rst:1489 msgid "" "Specialized for common containers such as ``list`` and ``tuple``. Avoids " "internal calling convention." msgstr "" -#: ../../whatsnew/3.11.rst:1276 +#: ../../whatsnew/3.11.rst:1489 msgid "8%" msgstr "8%" -#: ../../whatsnew/3.11.rst:1276 +#: ../../whatsnew/3.11.rst:1489 msgid "Brandt Bucher" msgstr "" -#: ../../whatsnew/3.11.rst:1280 +#: ../../whatsnew/3.11.rst:1493 msgid "" "A similar optimization already existed since Python 3.8. 3.11 specializes " "for more forms and reduces some overhead." msgstr "" -#: ../../whatsnew/3.11.rst:1283 +#: ../../whatsnew/3.11.rst:1496 msgid "" "A similar optimization already existed since Python 3.10. 3.11 specializes " "for more forms. Furthermore, all attribute loads should be sped up by :issue:" "`45947`." msgstr "" -#: ../../whatsnew/3.11.rst:1289 +#: ../../whatsnew/3.11.rst:1504 msgid "Misc" msgstr "" -#: ../../whatsnew/3.11.rst:1291 +#: ../../whatsnew/3.11.rst:1506 msgid "" "Objects now require less memory due to lazily created object namespaces. " "Their namespace dictionaries now also share keys more freely. (Contributed " "Mark Shannon in :issue:`45340` and :issue:`40116`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1295 +#: ../../whatsnew/3.11.rst:1510 msgid "" "A more concise representation of exceptions in the interpreter reduced the " "time required for catching an exception by about 10%. (Contributed by Irit " "Katriel in :issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1300 +#: ../../whatsnew/3.11.rst:1518 msgid "FAQ" msgstr "" -#: ../../whatsnew/3.11.rst:1302 +#: ../../whatsnew/3.11.rst:1520 msgid "Q: How should I write my code to utilize these speedups?" msgstr "" -#: ../../whatsnew/3.11.rst:1306 +#: ../../whatsnew/3.11.rst:1524 msgid "" "A: You don't have to change your code. Write Pythonic code that follows " "common best practices. The Faster CPython project optimizes for common code " "patterns we observe." msgstr "" -#: ../../whatsnew/3.11.rst:1309 +#: ../../whatsnew/3.11.rst:1527 msgid "Q: Will CPython 3.11 use more memory?" msgstr "" -#: ../../whatsnew/3.11.rst:1313 +#: ../../whatsnew/3.11.rst:1531 msgid "" "A: Maybe not. We don't expect memory use to exceed 20% more than 3.10. This " "is offset by memory optimizations for frame objects and object dictionaries " "as mentioned above." msgstr "" -#: ../../whatsnew/3.11.rst:1316 +#: ../../whatsnew/3.11.rst:1534 msgid "Q: I don't see any speedups in my workload. Why?" msgstr "" -#: ../../whatsnew/3.11.rst:1321 +#: ../../whatsnew/3.11.rst:1539 msgid "" "A: Certain code won't have noticeable benefits. If your code spends most of " "its time on I/O operations, or already does most of its computation in a C " @@ -1915,26 +2051,26 @@ msgid "" "project currently benefits pure-Python workloads the most." msgstr "" -#: ../../whatsnew/3.11.rst:1325 +#: ../../whatsnew/3.11.rst:1543 msgid "" "Furthermore, the pyperformance figures are a geometric mean. Even within the " "pyperformance benchmarks, certain benchmarks have slowed down slightly, " "while others have sped up by nearly 2x!" msgstr "" -#: ../../whatsnew/3.11.rst:1328 +#: ../../whatsnew/3.11.rst:1546 msgid "Q: Is there a JIT compiler?" msgstr "" -#: ../../whatsnew/3.11.rst:1330 +#: ../../whatsnew/3.11.rst:1548 msgid "A: No. We're still exploring other optimizations." msgstr "" -#: ../../whatsnew/3.11.rst:1334 +#: ../../whatsnew/3.11.rst:1554 msgid "About" msgstr "" -#: ../../whatsnew/3.11.rst:1336 +#: ../../whatsnew/3.11.rst:1556 msgid "" "Faster CPython explores optimizations for :term:`CPython`. The main team is " "funded by Microsoft to work on this full-time. Pablo Galindo Salgado is also " @@ -1942,362 +2078,532 @@ msgid "" "contributors are volunteers from the community." msgstr "" -#: ../../whatsnew/3.11.rst:1343 +#: ../../whatsnew/3.11.rst:1565 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.11.rst:1345 +#: ../../whatsnew/3.11.rst:1567 msgid "" -"The bytecode now contains inline cache entries, which take the form of :" -"opcode:`CACHE` instructions. Many opcodes expect to be followed by an exact " -"number of caches, and instruct the interpreter to skip over them at runtime. " -"Populated caches can look like arbitrary instructions, so great care should " -"be taken when reading or modifying raw, adaptive bytecode containing " -"quickened data." +"The bytecode now contains inline cache entries, which take the form of the " +"newly-added :opcode:`CACHE` instructions. Many opcodes expect to be followed " +"by an exact number of caches, and instruct the interpreter to skip over them " +"at runtime. Populated caches can look like arbitrary instructions, so great " +"care should be taken when reading or modifying raw, adaptive bytecode " +"containing quickened data." msgstr "" -#: ../../whatsnew/3.11.rst:1352 -msgid "" -"Replaced all numeric ``BINARY_*`` and ``INPLACE_*`` instructions with a " -"single :opcode:`BINARY_OP` implementation." +#: ../../whatsnew/3.11.rst:1579 +msgid "New opcodes" msgstr "" -#: ../../whatsnew/3.11.rst:1355 +#: ../../whatsnew/3.11.rst:1581 msgid "" -"Replaced the three call instructions: :opcode:`CALL_FUNCTION`, :opcode:" -"`CALL_FUNCTION_KW` and :opcode:`CALL_METHOD` with :opcode:`PUSH_NULL`, :" -"opcode:`PRECALL`, :opcode:`CALL`, and :opcode:`KW_NAMES`. This decouples the " -"argument shifting for methods from the handling of keyword arguments and " -"allows better specialization of calls." +":opcode:`ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`, " +"used in generators and co-routines." msgstr "" -#: ../../whatsnew/3.11.rst:1362 -msgid "Removed ``COPY_DICT_WITHOUT_KEYS`` and ``GEN_START``." +#: ../../whatsnew/3.11.rst:1584 +msgid "" +":opcode:`COPY_FREE_VARS`, which avoids needing special caller-side code for " +"closures." msgstr "" -#: ../../whatsnew/3.11.rst:1364 +#: ../../whatsnew/3.11.rst:1587 msgid "" -":opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` no longer push an additional " -"boolean value indicating whether the match succeeded or failed. Instead, " -"they indicate failure with :const:`None` (where a tuple of extracted values " -"would otherwise be)." +":opcode:`JUMP_BACKWARD_NO_INTERRUPT`, for use in certain loops where " +"handling interrupts is undesirable." msgstr "" -#: ../../whatsnew/3.11.rst:1369 -msgid "" -"Replace several stack manipulation instructions (``DUP_TOP``, " -"``DUP_TOP_TWO``, ``ROT_TWO``, ``ROT_THREE``, ``ROT_FOUR``, and ``ROT_N``) " -"with new :opcode:`COPY` and :opcode:`SWAP` instructions." +#: ../../whatsnew/3.11.rst:1590 +msgid ":opcode:`MAKE_CELL`, to create :ref:`cell-objects`." msgstr "" -#: ../../whatsnew/3.11.rst:1373 +#: ../../whatsnew/3.11.rst:1592 msgid "" -"Replaced :opcode:`JUMP_IF_NOT_EXC_MATCH` by :opcode:`CHECK_EXC_MATCH` which " -"performs the check but does not jump." +":opcode:`CHECK_EG_MATCH` and :opcode:`PREP_RERAISE_STAR`, to handle the :" +"ref:`new exception groups and except* ` added in :pep:" +"`654`." msgstr "" -#: ../../whatsnew/3.11.rst:1376 -msgid "" -"Replaced :opcode:`JUMP_IF_NOT_EG_MATCH` by :opcode:`CHECK_EG_MATCH` which " -"performs the check but does not jump." +#: ../../whatsnew/3.11.rst:1596 +msgid ":opcode:`PUSH_EXC_INFO`, for use in exception handlers." msgstr "" -#: ../../whatsnew/3.11.rst:1379 +#: ../../whatsnew/3.11.rst:1598 msgid "" -"Replaced :opcode:`JUMP_ABSOLUTE` by the relative :opcode:`JUMP_BACKWARD`." +":opcode:`RESUME`, a no-op, for internal tracing, debugging and optimization " +"checks." msgstr "" -#: ../../whatsnew/3.11.rst:1381 -msgid "" -"Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops " -"where it is undesirable to handle interrupts." +#: ../../whatsnew/3.11.rst:1605 +msgid "Replaced opcodes" msgstr "" -#: ../../whatsnew/3.11.rst:1384 -msgid "" -"Replaced :opcode:`POP_JUMP_IF_TRUE` and :opcode:`POP_JUMP_IF_FALSE` by the " -"relative :opcode:`POP_JUMP_FORWARD_IF_TRUE`, :opcode:" -"`POP_JUMP_BACKWARD_IF_TRUE`, :opcode:`POP_JUMP_FORWARD_IF_FALSE` and :opcode:" -"`POP_JUMP_BACKWARD_IF_FALSE`." +#: ../../whatsnew/3.11.rst:1608 +msgid "Replaced Opcode(s)" msgstr "" -#: ../../whatsnew/3.11.rst:1388 -msgid "" -"Added :opcode:`POP_JUMP_FORWARD_IF_NOT_NONE`, :opcode:" -"`POP_JUMP_BACKWARD_IF_NOT_NONE`, :opcode:`POP_JUMP_FORWARD_IF_NONE` and :" -"opcode:`POP_JUMP_BACKWARD_IF_NONE` opcodes to speed up conditional jumps." +#: ../../whatsnew/3.11.rst:1608 +msgid "New Opcode(s)" msgstr "" -#: ../../whatsnew/3.11.rst:1392 -msgid "" -":opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP` are now " -"relative rather than absolute." +#: ../../whatsnew/3.11.rst:1608 +msgid "Notes" msgstr "" -#: ../../whatsnew/3.11.rst:1395 -msgid "" -":opcode:`RESUME` has been added. It is a no-op. Performs internal tracing, " -"debugging and optimization checks." +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!BINARY_*`" msgstr "" -#: ../../whatsnew/3.11.rst:1399 ../../whatsnew/3.11.rst:2186 -msgid "Deprecated" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!INPLACE_*`" msgstr "" -#: ../../whatsnew/3.11.rst:1401 -msgid "" -"Chaining :class:`classmethod` descriptors (introduced in :issue:`19072`) is " -"now deprecated. It can no longer be used to wrap other descriptors such as :" -"class:`property`. The core design of this feature was flawed and caused a " -"number of downstream problems. To \"pass-through\" a :class:`classmethod`, " -"consider using the ``__wrapped__`` attribute that was added in Python 3.10. " -"(Contributed by Raymond Hettinger in :gh:`89519`.)" +#: ../../whatsnew/3.11.rst:1610 +msgid ":opcode:`BINARY_OP`" msgstr "" -#: ../../whatsnew/3.11.rst:1409 -msgid "" -"Octal escapes in string and bytes literals with value larger than ``0o377`` " -"now produce :exc:`DeprecationWarning`. In a future Python version they will " -"be a :exc:`SyntaxWarning` and eventually a :exc:`SyntaxError`. (Contributed " -"by Serhiy Storchaka in :gh:`81548`.)" +#: ../../whatsnew/3.11.rst:1610 +msgid "Replaced all numeric binary/in-place opcodes with a single opcode" msgstr "" -#: ../../whatsnew/3.11.rst:1415 -msgid "" -"The :mod:`lib2to3` package and ``2to3`` tool are now deprecated and may not " -"be able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser " -"for CPython). (Contributed by Victor Stinner in :issue:`40360`.)" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_FUNCTION`" msgstr "" -#: ../../whatsnew/3.11.rst:1419 -msgid "" -"Undocumented modules ``sre_compile``, ``sre_constants`` and ``sre_parse`` " -"are now deprecated. (Contributed by Serhiy Storchaka in :issue:`47152`.)" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_FUNCTION_KW`" msgstr "" -#: ../../whatsnew/3.11.rst:1423 -msgid "" -":class:`webbrowser.MacOSX` is deprecated and will be removed in Python 3.13. " -"It is untested and undocumented and also not used by webbrowser itself. " -"(Contributed by Dong-hee Na in :issue:`42255`.)" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_METHOD`" msgstr "" -#: ../../whatsnew/3.11.rst:1427 -msgid "" -"The behavior of returning a value from a :class:`~unittest.TestCase` and :" -"class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the " -"default ``None`` value), is now deprecated." +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`CALL`" msgstr "" -#: ../../whatsnew/3.11.rst:1431 +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`KW_NAMES`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`PRECALL`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`PUSH_NULL`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1613 msgid "" -"Deprecated the following :mod:`unittest` functions, scheduled for removal in " -"Python 3.13:" +"Decouples argument shifting for methods from handling of keyword arguments; " +"allows better specialization of calls" msgstr "" -#: ../../whatsnew/3.11.rst:1434 -msgid ":func:`unittest.findTestCases`" -msgstr ":func:`unittest.findTestCases`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!DUP_TOP`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!DUP_TOP_TWO`" +msgstr "" -#: ../../whatsnew/3.11.rst:1435 -msgid ":func:`unittest.makeSuite`" -msgstr ":func:`unittest.makeSuite`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_TWO`" +msgstr "" -#: ../../whatsnew/3.11.rst:1436 -msgid ":func:`unittest.getTestCaseNames`" -msgstr ":func:`unittest.getTestCaseNames`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_THREE`" +msgstr "" -#: ../../whatsnew/3.11.rst:1438 -msgid "Use :class:`~unittest.TestLoader` method instead:" -msgstr "改用 :class:`~unittest.TestLoader`:" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_FOUR`" +msgstr "" -#: ../../whatsnew/3.11.rst:1440 -msgid ":meth:`unittest.TestLoader.loadTestsFromModule`" -msgstr ":meth:`unittest.TestLoader.loadTestsFromModule`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_N`" +msgstr "" -#: ../../whatsnew/3.11.rst:1441 -msgid ":meth:`unittest.TestLoader.loadTestsFromTestCase`" -msgstr ":meth:`unittest.TestLoader.loadTestsFromTestCase`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`COPY`" +msgstr "" -#: ../../whatsnew/3.11.rst:1442 -msgid ":meth:`unittest.TestLoader.getTestCaseNames`" -msgstr ":meth:`unittest.TestLoader.getTestCaseNames`" +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`SWAP`" +msgstr "" -#: ../../whatsnew/3.11.rst:1444 -msgid "(Contributed by Erlend E. Aasland in :issue:`5846`.)" +#: ../../whatsnew/3.11.rst:1618 +msgid "Stack manipulation instructions" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!JUMP_IF_NOT_EXC_MATCH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`CHECK_EXC_MATCH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1625 +msgid "Now performs check but doesn't jump" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!JUMP_ABSOLUTE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_IF_FALSE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_IF_TRUE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`JUMP_BACKWARD`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`POP_JUMP_BACKWARD_IF_* `" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`POP_JUMP_FORWARD_IF_* `" msgstr "" -#: ../../whatsnew/3.11.rst:1446 +#: ../../whatsnew/3.11.rst:1627 msgid "" -"The :meth:`turtle.RawTurtle.settiltangle` is deprecated since Python 3.1, it " -"now emits a deprecation warning and will be removed in Python 3.13. Use :" -"meth:`turtle.RawTurtle.tiltangle` instead (it was earlier incorrectly marked " -"as deprecated, its docstring is now corrected). (Contributed by Hugo van " -"Kemenade in :issue:`45837`.)" +"See [#bytecode-jump]_; ``TRUE``, ``FALSE``, ``NONE`` and ``NOT_NONE`` " +"variants for each direction" msgstr "" -#: ../../whatsnew/3.11.rst:1452 +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!SETUP_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!SETUP_ASYNC_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1633 +msgid ":opcode:`BEFORE_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1633 +msgid ":keyword:`with` block setup" +msgstr "" + +#: ../../whatsnew/3.11.rst:1637 msgid "" -"The delegation of :func:`int` to :meth:`__trunc__` is now deprecated. " -"Calling ``int(a)`` when ``type(a)`` implements :meth:`__trunc__` but not :" -"meth:`__int__` or :meth:`__index__` now raises a :exc:`DeprecationWarning`. " -"(Contributed by Zackery Spytz in :issue:`44977`.)" +"All jump opcodes are now relative, including the existing :opcode:" +"`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP`. The argument is " +"now an offset from the current instruction rather than an absolute location." msgstr "" -#: ../../whatsnew/3.11.rst:1457 +#: ../../whatsnew/3.11.rst:1648 +msgid "Changed/removed opcodes" +msgstr "" + +#: ../../whatsnew/3.11.rst:1650 msgid "" -"The following have been deprecated in :mod:`configparser` since Python 3.2. " -"Their deprecation warnings have now been updated to note they will removed " -"in Python 3.12:" +"Changed :opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` to no longer push an " +"additional boolean value to indicate success/failure. Instead, ``None`` is " +"pushed on failure in place of the tuple of extracted values." msgstr "" -#: ../../whatsnew/3.11.rst:1461 -msgid "the :class:`configparser.SafeConfigParser` class" -msgstr ":class:`configparser.SafeConfigParser` class" +#: ../../whatsnew/3.11.rst:1655 +msgid "" +"Changed opcodes that work with exceptions to reflect them now being " +"represented as one item on the stack instead of three (see :gh:`89874`)." +msgstr "" -#: ../../whatsnew/3.11.rst:1462 -msgid "the :attr:`configparser.ParsingError.filename` property" -msgstr ":attr:`configparser.ParsingError.filename` 特性" +#: ../../whatsnew/3.11.rst:1659 +msgid "" +"Removed :opcode:`!COPY_DICT_WITHOUT_KEYS`, :opcode:`!GEN_START`, :opcode:`!" +"POP_BLOCK`, :opcode:`!SETUP_FINALLY` and :opcode:`!YIELD_FROM`." +msgstr "" -#: ../../whatsnew/3.11.rst:1463 -msgid "the :meth:`configparser.RawConfigParser.readfp` method" -msgstr ":meth:`configparser.RawConfigParser.readfp` 方法" +#: ../../whatsnew/3.11.rst:1667 ../../whatsnew/3.11.rst:2543 +msgid "Deprecated" +msgstr "" -#: ../../whatsnew/3.11.rst:1465 -msgid "(Contributed by Hugo van Kemenade in :issue:`45173`.)" +#: ../../whatsnew/3.11.rst:1669 +msgid "" +"This section lists Python APIs that have been deprecated in Python 3.11." msgstr "" -#: ../../whatsnew/3.11.rst:1467 +#: ../../whatsnew/3.11.rst:1671 msgid "" -":class:`configparser.LegacyInterpolation` has been deprecated in the " -"docstring since Python 3.2. It now emits a :exc:`DeprecationWarning` and " -"will be removed in Python 3.13. Use :class:`configparser.BasicInterpolation` " -"or :class:`configparser.ExtendedInterpolation` instead. (Contributed by Hugo " -"van Kemenade in :issue:`46607`.)" +"Deprecated C APIs are :ref:`listed separately `." msgstr "" -#: ../../whatsnew/3.11.rst:1473 +#: ../../whatsnew/3.11.rst:1678 +msgid "Language/Builtins" +msgstr "" + +#: ../../whatsnew/3.11.rst:1680 msgid "" -"The :func:`locale.getdefaultlocale` function is deprecated and will be " -"removed in Python 3.13. Use :func:`locale.setlocale`, :func:`locale." -"getpreferredencoding(False) ` and :func:`locale." -"getlocale` functions instead. (Contributed by Victor Stinner in :gh:`90817`.)" +"Chaining :class:`classmethod` descriptors (introduced in :issue:`19072`) is " +"now deprecated. It can no longer be used to wrap other descriptors such as :" +"class:`property`. The core design of this feature was flawed and caused a " +"number of downstream problems. To \"pass-through\" a :class:`classmethod`, " +"consider using the :attr:`!__wrapped__` attribute that was added in Python " +"3.10. (Contributed by Raymond Hettinger in :gh:`89519`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1479 +#: ../../whatsnew/3.11.rst:1688 msgid "" -"The :func:`locale.resetlocale` function is deprecated and will be removed in " -"Python 3.13. Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. " -"(Contributed by Victor Stinner in :gh:`90817`.)" +"Octal escapes in string and bytes literals with values larger than ``0o377`` " +"(255 in decimal) now produce a :exc:`DeprecationWarning`. In a future Python " +"version, they will raise a :exc:`SyntaxWarning` and eventually a :exc:" +"`SyntaxError`. (Contributed by Serhiy Storchaka in :gh:`81548`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1483 +#: ../../whatsnew/3.11.rst:1694 msgid "" -"The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been " -"deprecated since at least Python 3.6. Their documentation and deprecation " -"warnings have now been updated to note they will removed in Python 3.12 (:" -"pep:`594`). (Contributed by Hugo van Kemenade in :issue:`47022`.)" +"The delegation of :func:`int` to :meth:`~object.__trunc__` is now " +"deprecated. Calling ``int(a)`` when ``type(a)`` implements :meth:`!" +"__trunc__` but not :meth:`~object.__int__` or :meth:`~object.__index__` now " +"raises a :exc:`DeprecationWarning`. (Contributed by Zackery Spytz in :issue:" +"`44977`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1489 +#: ../../whatsnew/3.11.rst:1704 +msgid "Modules" +msgstr "" + +#: ../../whatsnew/3.11.rst:1708 msgid "" -":pep:`594` led to the deprecations of the following modules which are slated " -"for removal in Python 3.13:" +":pep:`594` led to the deprecations of the following modules slated for " +"removal in Python 3.13:" msgstr "" -#: ../../whatsnew/3.11.rst:1492 +#: ../../whatsnew/3.11.rst:1712 msgid ":mod:`aifc`" msgstr ":mod:`aifc`" -#: ../../whatsnew/3.11.rst:1493 -msgid ":mod:`audioop`" -msgstr ":mod:`audioop`" +#: ../../whatsnew/3.11.rst:1712 +msgid ":mod:`chunk`" +msgstr ":mod:`chunk`" -#: ../../whatsnew/3.11.rst:1494 -msgid ":mod:`cgi`" -msgstr ":mod:`cgi`" +#: ../../whatsnew/3.11.rst:1712 +msgid ":mod:`msilib`" +msgstr ":mod:`msilib`" -#: ../../whatsnew/3.11.rst:1495 -msgid ":mod:`cgitb`" -msgstr ":mod:`cgitb`" +#: ../../whatsnew/3.11.rst:1712 +msgid ":mod:`pipes`" +msgstr ":mod:`pipes`" -#: ../../whatsnew/3.11.rst:1496 -msgid ":mod:`chunk`" -msgstr ":mod:`chunk`" +#: ../../whatsnew/3.11.rst:1712 +msgid ":mod:`telnetlib`" +msgstr ":mod:`telnetlib`" -#: ../../whatsnew/3.11.rst:1497 +#: ../../whatsnew/3.11.rst:1714 +msgid ":mod:`audioop`" +msgstr ":mod:`audioop`" + +#: ../../whatsnew/3.11.rst:1714 msgid ":mod:`crypt`" msgstr ":mod:`crypt`" -#: ../../whatsnew/3.11.rst:1498 -msgid ":mod:`imghdr`" -msgstr ":mod:`imghdr`" +#: ../../whatsnew/3.11.rst:1714 +msgid ":mod:`nis`" +msgstr ":mod:`nis`" -#: ../../whatsnew/3.11.rst:1499 -msgid ":mod:`mailcap`" -msgstr ":mod:`mailcap`" +#: ../../whatsnew/3.11.rst:1714 +msgid ":mod:`sndhdr`" +msgstr ":mod:`sndhdr`" -#: ../../whatsnew/3.11.rst:1500 -msgid ":mod:`msilib`" -msgstr ":mod:`msilib`" +#: ../../whatsnew/3.11.rst:1714 +msgid ":mod:`uu`" +msgstr ":mod:`uu`" -#: ../../whatsnew/3.11.rst:1501 -msgid ":mod:`nis`" -msgstr ":mod:`nis`" +#: ../../whatsnew/3.11.rst:1716 +msgid ":mod:`cgi`" +msgstr ":mod:`cgi`" + +#: ../../whatsnew/3.11.rst:1716 +msgid ":mod:`imghdr`" +msgstr ":mod:`imghdr`" -#: ../../whatsnew/3.11.rst:1502 +#: ../../whatsnew/3.11.rst:1716 msgid ":mod:`nntplib`" msgstr ":mod:`nntplib`" -#: ../../whatsnew/3.11.rst:1503 -msgid ":mod:`ossaudiodev`" -msgstr ":mod:`ossaudiodev`" +#: ../../whatsnew/3.11.rst:1716 +msgid ":mod:`spwd`" +msgstr ":mod:`spwd`" -#: ../../whatsnew/3.11.rst:1504 -msgid ":mod:`pipes`" -msgstr ":mod:`pipes`" +#: ../../whatsnew/3.11.rst:1716 +msgid ":mod:`xdrlib`" +msgstr ":mod:`xdrlib`" -#: ../../whatsnew/3.11.rst:1505 -msgid ":mod:`sndhdr`" -msgstr ":mod:`sndhdr`" +#: ../../whatsnew/3.11.rst:1718 +msgid ":mod:`cgitb`" +msgstr ":mod:`cgitb`" -#: ../../whatsnew/3.11.rst:1506 -msgid ":mod:`spwd`" -msgstr ":mod:`spwd`" +#: ../../whatsnew/3.11.rst:1718 +msgid ":mod:`mailcap`" +msgstr ":mod:`mailcap`" -#: ../../whatsnew/3.11.rst:1507 +#: ../../whatsnew/3.11.rst:1718 +msgid ":mod:`ossaudiodev`" +msgstr ":mod:`ossaudiodev`" + +#: ../../whatsnew/3.11.rst:1718 msgid ":mod:`sunau`" msgstr ":mod:`sunau`" -#: ../../whatsnew/3.11.rst:1508 -msgid ":mod:`telnetlib`" -msgstr ":mod:`telnetlib`" +#: ../../whatsnew/3.11.rst:1721 +msgid "" +"(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:" +"`68966`.)" +msgstr "" -#: ../../whatsnew/3.11.rst:1509 -msgid ":mod:`uu`" -msgstr ":mod:`uu`" +#: ../../whatsnew/3.11.rst:1724 +msgid "" +"The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been " +"deprecated since at least Python 3.6. Their documentation and deprecation " +"warnings have now been updated to note they will be removed in Python 3.12. " +"(Contributed by Hugo van Kemenade in :issue:`47022`.)" +msgstr "" -#: ../../whatsnew/3.11.rst:1510 -msgid ":mod:`xdrlib`" -msgstr ":mod:`xdrlib`" +#: ../../whatsnew/3.11.rst:1729 +msgid "" +"The :mod:`lib2to3` package and :ref:`2to3 <2to3-reference>` tool are now " +"deprecated and may not be able to parse Python 3.10 or newer. See :pep:" +"`617`, introducing the new PEG parser, for details. (Contributed by Victor " +"Stinner in :issue:`40360`.)" +msgstr "" -#: ../../whatsnew/3.11.rst:1512 +#: ../../whatsnew/3.11.rst:1734 msgid "" -"(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:" -"`68966`.)" +"Undocumented modules :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!" +"sre_parse` are now deprecated. (Contributed by Serhiy Storchaka in :issue:" +"`47152`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1742 +msgid "Standard Library" +msgstr "" + +#: ../../whatsnew/3.11.rst:1744 +msgid "" +"The following have been deprecated in :mod:`configparser` since Python 3.2. " +"Their deprecation warnings have now been updated to note they will be " +"removed in Python 3.12:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1748 +msgid "the :class:`!configparser.SafeConfigParser` class" +msgstr "" + +#: ../../whatsnew/3.11.rst:1749 +msgid "the :attr:`!configparser.ParsingError.filename` property" +msgstr "" + +#: ../../whatsnew/3.11.rst:1750 +msgid "the :meth:`configparser.RawConfigParser.readfp` method" +msgstr ":meth:`configparser.RawConfigParser.readfp` 方法" + +#: ../../whatsnew/3.11.rst:1752 +msgid "(Contributed by Hugo van Kemenade in :issue:`45173`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid "" +":class:`!configparser.LegacyInterpolation` has been deprecated in the " +"docstring since Python 3.2, and is not listed in the :mod:`configparser` " +"documentation. It now emits a :exc:`DeprecationWarning` and will be removed " +"in Python 3.13. Use :class:`configparser.BasicInterpolation` or :class:" +"`configparser.ExtendedInterpolation` instead. (Contributed by Hugo van " +"Kemenade in :issue:`46607`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1761 +msgid "" +"The older set of :mod:`importlib.resources` functions were deprecated in " +"favor of the replacements added in Python 3.9 and will be removed in a " +"future Python version, due to not supporting resources located within " +"package subdirectories:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1766 +msgid ":func:`importlib.resources.contents`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1767 +msgid ":func:`importlib.resources.is_resource`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1768 +msgid ":func:`importlib.resources.open_binary`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1769 +msgid ":func:`importlib.resources.open_text`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1770 +msgid ":func:`importlib.resources.read_binary`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1771 +msgid ":func:`importlib.resources.read_text`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1772 +msgid ":func:`importlib.resources.path`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1774 +msgid "" +"The :func:`locale.getdefaultlocale` function is deprecated and will be " +"removed in Python 3.13. Use :func:`locale.setlocale`, :func:`locale." +"getpreferredencoding(False) ` and :func:`locale." +"getlocale` functions instead. (Contributed by Victor Stinner in :gh:`90817`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1780 +msgid "" +"The :func:`locale.resetlocale` function is deprecated and will be removed in " +"Python 3.13. Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. " +"(Contributed by Victor Stinner in :gh:`90817`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1515 +#: ../../whatsnew/3.11.rst:1784 msgid "" -"More strict rules will be applied now applied for numerical group references " -"and group names in regular expressions in future Python versions. Only " -"sequence of ASCII digits will be now accepted as a numerical reference. The " -"group name in bytes patterns and replacement strings could only contain " -"ASCII letters and digits and underscore. For now, a deprecation warning is " -"raised for such syntax. (Contributed by Serhiy Storchaka in :gh:`91760`.)" +"Stricter rules will now be applied for numerical group references and group " +"names in :ref:`regular expressions `. Only sequences of ASCII " +"digits will now be accepted as a numerical reference, and the group name in :" +"class:`bytes` patterns and replacement strings can only contain ASCII " +"letters, digits and underscores. For now, a deprecation warning is raised " +"for syntax violating these rules. (Contributed by Serhiy Storchaka in :gh:" +"`91760`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1523 +#: ../../whatsnew/3.11.rst:1792 +msgid "" +"In the :mod:`re` module, the :func:`!re.template` function and the " +"corresponding :data:`!re.TEMPLATE` and :data:`!re.T` flags are deprecated, " +"as they were undocumented and lacked an obvious purpose. They will be " +"removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro Hrončok " +"in :gh:`92728`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1798 +msgid "" +":func:`turtle.settiltangle` has been deprecated since Python 3.1; it now " +"emits a deprecation warning and will be removed in Python 3.13. Use :func:" +"`turtle.tiltangle` instead (it was earlier incorrectly marked as deprecated, " +"and its docstring is now corrected). (Contributed by Hugo van Kemenade in :" +"issue:`45837`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1804 msgid "" ":class:`typing.Text`, which exists solely to provide compatibility support " "between Python 2 and Python 3 code, is now deprecated. Its removal is " @@ -2305,244 +2611,361 @@ msgid "" "wherever possible. (Contributed by Alex Waygood in :gh:`92332`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1529 +#: ../../whatsnew/3.11.rst:1810 msgid "" -"The keyword argument syntax for constructing :data:`~typing.TypedDict` types " +"The keyword argument syntax for constructing :data:`typing.TypedDict` types " "is now deprecated. Support will be removed in Python 3.13. (Contributed by " "Jingchen Ye in :gh:`90224`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1533 +#: ../../whatsnew/3.11.rst:1814 msgid "" -"The :func:`re.template` function and the corresponding :const:`re.TEMPLATE` " -"and :const:`re.T` flags are deprecated, as they were undocumented and lacked " -"an obvious purpose. They will be removed in Python 3.13. (Contributed by " -"Serhiy Storchaka and Miro Hrončok in :gh:`92728`.)" +":class:`!webbrowser.MacOSX` is deprecated and will be removed in Python " +"3.13. It is untested, undocumented, and not used by :mod:`webbrowser` " +"itself. (Contributed by Dong-hee Na in :issue:`42255`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1818 +msgid "" +"The behavior of returning a value from a :class:`~unittest.TestCase` and :" +"class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the " +"default ``None`` value) is now deprecated." +msgstr "" + +#: ../../whatsnew/3.11.rst:1822 +msgid "" +"Deprecated the following not-formally-documented :mod:`unittest` functions, " +"scheduled for removal in Python 3.13:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1825 +msgid ":func:`!unittest.findTestCases`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1826 +msgid ":func:`!unittest.makeSuite`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1827 +msgid ":func:`!unittest.getTestCaseNames`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1829 +msgid "Use :class:`~unittest.TestLoader` methods instead:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1831 +msgid ":meth:`unittest.TestLoader.loadTestsFromModule`" +msgstr ":meth:`unittest.TestLoader.loadTestsFromModule`" + +#: ../../whatsnew/3.11.rst:1832 +msgid ":meth:`unittest.TestLoader.loadTestsFromTestCase`" +msgstr ":meth:`unittest.TestLoader.loadTestsFromTestCase`" + +#: ../../whatsnew/3.11.rst:1833 +msgid ":meth:`unittest.TestLoader.getTestCaseNames`" +msgstr ":meth:`unittest.TestLoader.getTestCaseNames`" + +#: ../../whatsnew/3.11.rst:1835 +msgid "(Contributed by Erlend E. Aasland in :issue:`5846`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1540 +#: ../../whatsnew/3.11.rst:1842 ../../whatsnew/3.11.rst:2571 msgid "Pending Removal in Python 3.12" msgstr "" -#: ../../whatsnew/3.11.rst:1542 +#: ../../whatsnew/3.11.rst:1844 msgid "" -"The following APIs have been deprecated in earlier Python releases, and will " -"be removed in Python 3.12." +"The following Python APIs have been deprecated in earlier Python releases, " +"and will be removed in Python 3.12." msgstr "" -#: ../../whatsnew/3.11.rst:1545 -msgid "Python API:" +#: ../../whatsnew/3.11.rst:1847 +msgid "" +"C APIs pending removal are :ref:`listed separately `." msgstr "" -#: ../../whatsnew/3.11.rst:1547 -msgid ":class:`pkgutil.ImpImporter`" -msgstr ":class:`pkgutil.ImpImporter`" +#: ../../whatsnew/3.11.rst:1850 +msgid "The :mod:`asynchat` module" +msgstr "" -#: ../../whatsnew/3.11.rst:1548 -msgid ":class:`pkgutil.ImpLoader`" -msgstr ":class:`pkgutil.ImpLoader`" +#: ../../whatsnew/3.11.rst:1851 +msgid "The :mod:`asyncore` module" +msgstr "" + +#: ../../whatsnew/3.11.rst:1852 +msgid "The :ref:`entire distutils package `" +msgstr "" -#: ../../whatsnew/3.11.rst:1549 -msgid ":envvar:`PYTHONTHREADDEBUG`" -msgstr ":envvar:`PYTHONTHREADDEBUG`" +#: ../../whatsnew/3.11.rst:1853 +msgid "The :mod:`imp` module" +msgstr "" -#: ../../whatsnew/3.11.rst:1550 -msgid ":func:`importlib.find_loader`" -msgstr ":func:`importlib.find_loader`" +#: ../../whatsnew/3.11.rst:1854 +msgid "The :class:`typing.io ` namespace" +msgstr "" -#: ../../whatsnew/3.11.rst:1551 -msgid ":func:`importlib.util.module_for_loader`" -msgstr ":func:`importlib.util.module_for_loader`" +#: ../../whatsnew/3.11.rst:1855 +msgid "The :class:`typing.re ` namespace" +msgstr "" -#: ../../whatsnew/3.11.rst:1552 -msgid ":func:`importlib.util.set_loader_wrapper`" -msgstr ":func:`importlib.util.set_loader_wrapper`" +#: ../../whatsnew/3.11.rst:1856 +msgid ":func:`!cgi.log`" +msgstr "" -#: ../../whatsnew/3.11.rst:1553 -msgid ":func:`importlib.util.set_package_wrapper`" -msgstr ":func:`importlib.util.set_package_wrapper`" +#: ../../whatsnew/3.11.rst:1857 +msgid ":func:`importlib.find_loader`" +msgstr ":func:`importlib.find_loader`" -#: ../../whatsnew/3.11.rst:1554 +#: ../../whatsnew/3.11.rst:1858 msgid ":meth:`importlib.abc.Loader.module_repr`" msgstr ":meth:`importlib.abc.Loader.module_repr`" -#: ../../whatsnew/3.11.rst:1555 -msgid ":meth:`importlib.abc.Loadermodule_repr`" -msgstr ":meth:`importlib.abc.Loadermodule_repr`" - -#: ../../whatsnew/3.11.rst:1556 ../../whatsnew/3.11.rst:1557 +#: ../../whatsnew/3.11.rst:1859 msgid ":meth:`importlib.abc.MetaPathFinder.find_module`" msgstr ":meth:`importlib.abc.MetaPathFinder.find_module`" -#: ../../whatsnew/3.11.rst:1558 +#: ../../whatsnew/3.11.rst:1860 msgid ":meth:`importlib.abc.PathEntryFinder.find_loader`" msgstr ":meth:`importlib.abc.PathEntryFinder.find_loader`" -#: ../../whatsnew/3.11.rst:1559 +#: ../../whatsnew/3.11.rst:1861 msgid ":meth:`importlib.abc.PathEntryFinder.find_module`" msgstr ":meth:`importlib.abc.PathEntryFinder.find_module`" -#: ../../whatsnew/3.11.rst:1560 -msgid ":meth:`importlib.machinery.BuiltinImporter.find_module`" -msgstr ":meth:`importlib.machinery.BuiltinImporter.find_module`" +#: ../../whatsnew/3.11.rst:1862 +msgid ":meth:`!importlib.machinery.BuiltinImporter.find_module`" +msgstr "" -#: ../../whatsnew/3.11.rst:1561 -msgid ":meth:`importlib.machinery.BuiltinLoader.module_repr`" -msgstr ":meth:`importlib.machinery.BuiltinLoader.module_repr`" +#: ../../whatsnew/3.11.rst:1863 +msgid ":meth:`!importlib.machinery.BuiltinLoader.module_repr`" +msgstr "" -#: ../../whatsnew/3.11.rst:1562 -msgid ":meth:`importlib.machinery.FileFinder.find_loader`" -msgstr ":meth:`importlib.machinery.FileFinder.find_loader`" +#: ../../whatsnew/3.11.rst:1864 +msgid ":meth:`!importlib.machinery.FileFinder.find_loader`" +msgstr "" -#: ../../whatsnew/3.11.rst:1563 -msgid ":meth:`importlib.machinery.FileFinder.find_module`" -msgstr ":meth:`importlib.machinery.FileFinder.find_module`" +#: ../../whatsnew/3.11.rst:1865 +msgid ":meth:`!importlib.machinery.FileFinder.find_module`" +msgstr "" -#: ../../whatsnew/3.11.rst:1564 -msgid ":meth:`importlib.machinery.FrozenImporter.find_module`" -msgstr ":meth:`importlib.machinery.FrozenImporter.find_module`" +#: ../../whatsnew/3.11.rst:1866 +msgid ":meth:`!importlib.machinery.FrozenImporter.find_module`" +msgstr "" -#: ../../whatsnew/3.11.rst:1565 -msgid ":meth:`importlib.machinery.FrozenLoader.module_repr`" -msgstr ":meth:`importlib.machinery.FrozenLoader.module_repr`" +#: ../../whatsnew/3.11.rst:1867 +msgid ":meth:`!importlib.machinery.FrozenLoader.module_repr`" +msgstr "" -#: ../../whatsnew/3.11.rst:1566 +#: ../../whatsnew/3.11.rst:1868 msgid ":meth:`importlib.machinery.PathFinder.find_module`" msgstr ":meth:`importlib.machinery.PathFinder.find_module`" -#: ../../whatsnew/3.11.rst:1567 -msgid ":meth:`importlib.machinery.WindowsRegistryFinder.find_module`" -msgstr ":meth:`importlib.machinery.WindowsRegistryFinder.find_module`" +#: ../../whatsnew/3.11.rst:1869 +msgid ":meth:`!importlib.machinery.WindowsRegistryFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1870 +msgid ":func:`importlib.util.module_for_loader`" +msgstr ":func:`importlib.util.module_for_loader`" + +#: ../../whatsnew/3.11.rst:1871 +msgid ":func:`!importlib.util.set_loader_wrapper`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1872 +msgid ":func:`!importlib.util.set_package_wrapper`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1873 +msgid ":class:`pkgutil.ImpImporter`" +msgstr ":class:`pkgutil.ImpImporter`" + +#: ../../whatsnew/3.11.rst:1874 +msgid ":class:`pkgutil.ImpLoader`" +msgstr ":class:`pkgutil.ImpLoader`" -#: ../../whatsnew/3.11.rst:1568 +#: ../../whatsnew/3.11.rst:1875 msgid ":meth:`pathlib.Path.link_to`" msgstr ":meth:`pathlib.Path.link_to`" -#: ../../whatsnew/3.11.rst:1569 -msgid "The entire :ref:`distutils namespace `" +#: ../../whatsnew/3.11.rst:1876 +msgid ":func:`!sqlite3.enable_shared_cache`" msgstr "" -#: ../../whatsnew/3.11.rst:1570 -msgid ":func:`cgi.log`" -msgstr ":func:`cgi.log`" +#: ../../whatsnew/3.11.rst:1877 +msgid ":func:`!sqlite3.OptimizedUnicode`" +msgstr "" -#: ../../whatsnew/3.11.rst:1571 -msgid ":func:`sqlite3.OptimizedUnicode`" -msgstr ":func:`sqlite3.OptimizedUnicode`" +#: ../../whatsnew/3.11.rst:1878 +msgid ":envvar:`PYTHONTHREADDEBUG` environment variable" +msgstr "" -#: ../../whatsnew/3.11.rst:1572 -msgid ":func:`sqlite3.enable_shared_cache`" -msgstr ":func:`sqlite3.enable_shared_cache`" +#: ../../whatsnew/3.11.rst:1879 +msgid "The following deprecated aliases in :mod:`unittest`:" +msgstr "" -#: ../../whatsnew/3.11.rst:1574 -msgid "C API:" +#: ../../whatsnew/3.11.rst:1882 +msgid "Deprecated alias" msgstr "" -#: ../../whatsnew/3.11.rst:1576 -msgid ":c:func:`PyUnicode_AS_DATA`" -msgstr ":c:func:`PyUnicode_AS_DATA`" +#: ../../whatsnew/3.11.rst:1882 +msgid "Method Name" +msgstr "" -#: ../../whatsnew/3.11.rst:1577 -msgid ":c:func:`PyUnicode_AS_UNICODE`" -msgstr ":c:func:`PyUnicode_AS_UNICODE`" +#: ../../whatsnew/3.11.rst:1882 +msgid "Deprecated in" +msgstr "" -#: ../../whatsnew/3.11.rst:1578 -msgid ":c:func:`PyUnicode_AsUnicodeAndSize`" -msgstr ":c:func:`PyUnicode_AsUnicodeAndSize`" +#: ../../whatsnew/3.11.rst:1884 +msgid "``failUnless``" +msgstr "" -#: ../../whatsnew/3.11.rst:1579 -msgid ":c:func:`PyUnicode_AsUnicode`" -msgstr ":c:func:`PyUnicode_AsUnicode`" +#: ../../whatsnew/3.11.rst:1884 ../../whatsnew/3.11.rst:1891 +msgid ":meth:`.assertTrue`" +msgstr "" -#: ../../whatsnew/3.11.rst:1580 -msgid ":c:func:`PyUnicode_FromUnicode`" -msgstr ":c:func:`PyUnicode_FromUnicode`" +#: ../../whatsnew/3.11.rst:1884 ../../whatsnew/3.11.rst:1885 +#: ../../whatsnew/3.11.rst:1886 ../../whatsnew/3.11.rst:1887 +#: ../../whatsnew/3.11.rst:1888 ../../whatsnew/3.11.rst:1889 +#: ../../whatsnew/3.11.rst:1890 +msgid "3.1" +msgstr "" -#: ../../whatsnew/3.11.rst:1581 -msgid ":c:func:`PyUnicode_GET_DATA_SIZE`" -msgstr ":c:func:`PyUnicode_GET_DATA_SIZE`" +#: ../../whatsnew/3.11.rst:1885 +msgid "``failIf``" +msgstr "" -#: ../../whatsnew/3.11.rst:1582 -msgid ":c:func:`PyUnicode_GET_SIZE`" -msgstr ":c:func:`PyUnicode_GET_SIZE`" +#: ../../whatsnew/3.11.rst:1885 +msgid ":meth:`.assertFalse`" +msgstr "" -#: ../../whatsnew/3.11.rst:1583 -msgid ":c:func:`PyUnicode_GetSize`" -msgstr ":c:func:`PyUnicode_GetSize`" +#: ../../whatsnew/3.11.rst:1886 +msgid "``failUnlessEqual``" +msgstr "" -#: ../../whatsnew/3.11.rst:1584 -msgid ":c:func:`PyUnicode_IS_COMPACT`" -msgstr ":c:func:`PyUnicode_IS_COMPACT`" +#: ../../whatsnew/3.11.rst:1886 ../../whatsnew/3.11.rst:1892 +msgid ":meth:`.assertEqual`" +msgstr "" -#: ../../whatsnew/3.11.rst:1585 -msgid ":c:func:`PyUnicode_IS_READY`" -msgstr ":c:func:`PyUnicode_IS_READY`" +#: ../../whatsnew/3.11.rst:1887 +msgid "``failIfEqual``" +msgstr "" -#: ../../whatsnew/3.11.rst:1586 -msgid ":c:func:`PyUnicode_READY`" -msgstr ":c:func:`PyUnicode_READY`" +#: ../../whatsnew/3.11.rst:1887 ../../whatsnew/3.11.rst:1893 +msgid ":meth:`.assertNotEqual`" +msgstr "" -#: ../../whatsnew/3.11.rst:1587 -msgid ":c:func:`Py_UNICODE_WSTR_LENGTH`" -msgstr ":c:func:`Py_UNICODE_WSTR_LENGTH`" +#: ../../whatsnew/3.11.rst:1888 +msgid "``failUnlessAlmostEqual``" +msgstr "" -#: ../../whatsnew/3.11.rst:1588 -msgid ":c:func:`_PyUnicode_AsUnicode`" -msgstr ":c:func:`_PyUnicode_AsUnicode`" +#: ../../whatsnew/3.11.rst:1888 ../../whatsnew/3.11.rst:1894 +msgid ":meth:`.assertAlmostEqual`" +msgstr "" -#: ../../whatsnew/3.11.rst:1589 -msgid ":c:macro:`PyUnicode_WCHAR_KIND`" -msgstr ":c:macro:`PyUnicode_WCHAR_KIND`" +#: ../../whatsnew/3.11.rst:1889 +msgid "``failIfAlmostEqual``" +msgstr "" -#: ../../whatsnew/3.11.rst:1590 -msgid ":c:type:`PyUnicodeObject`" -msgstr ":c:type:`PyUnicodeObject`" +#: ../../whatsnew/3.11.rst:1889 ../../whatsnew/3.11.rst:1895 +msgid ":meth:`.assertNotAlmostEqual`" +msgstr "" -#: ../../whatsnew/3.11.rst:1591 -msgid ":c:func:`PyUnicode_InternImmortal()`" -msgstr ":c:func:`PyUnicode_InternImmortal()`" +#: ../../whatsnew/3.11.rst:1890 +msgid "``failUnlessRaises``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1890 +msgid ":meth:`.assertRaises`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1891 +msgid "``assert_``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1891 ../../whatsnew/3.11.rst:1892 +#: ../../whatsnew/3.11.rst:1893 ../../whatsnew/3.11.rst:1894 +#: ../../whatsnew/3.11.rst:1895 ../../whatsnew/3.11.rst:1896 +#: ../../whatsnew/3.11.rst:1897 +msgid "3.2" +msgstr "" + +#: ../../whatsnew/3.11.rst:1892 +msgid "``assertEquals``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1893 +msgid "``assertNotEquals``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1894 +msgid "``assertAlmostEquals``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1895 +msgid "``assertNotAlmostEquals``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1896 +msgid "``assertRegexpMatches``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1896 +msgid ":meth:`.assertRegex`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1897 +msgid "``assertRaisesRegexp``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1897 +msgid ":meth:`.assertRaisesRegex`" +msgstr "" -#: ../../whatsnew/3.11.rst:1595 ../../whatsnew/3.11.rst:2211 -msgid "Removed" +#: ../../whatsnew/3.11.rst:1898 +msgid "``assertNotRegexpMatches``" msgstr "" -#: ../../whatsnew/3.11.rst:1597 -msgid "" -":class:`smtpd.MailmanProxy` is now removed as it is unusable without an " -"external module, ``mailman``. (Contributed by Dong-hee Na in :issue:`35800`.)" +#: ../../whatsnew/3.11.rst:1898 +msgid ":meth:`.assertNotRegex`" msgstr "" -#: ../../whatsnew/3.11.rst:1600 -msgid "" -"The ``binhex`` module, deprecated in Python 3.9, is now removed. The " -"following :mod:`binascii` functions, deprecated in Python 3.9, are now also " -"removed:" +#: ../../whatsnew/3.11.rst:1898 +msgid "3.5" msgstr "" -#: ../../whatsnew/3.11.rst:1604 -msgid "``a2b_hqx()``, ``b2a_hqx()``;" -msgstr "``a2b_hqx()``, ``b2a_hqx()``;" +#: ../../whatsnew/3.11.rst:1905 ../../whatsnew/3.11.rst:2597 +msgid "Removed" +msgstr "" -#: ../../whatsnew/3.11.rst:1605 -msgid "``rlecode_hqx()``, ``rledecode_hqx()``." -msgstr "``rlecode_hqx()``, ``rledecode_hqx()``." +#: ../../whatsnew/3.11.rst:1907 +msgid "This section lists Python APIs that have been removed in Python 3.11." +msgstr "" -#: ../../whatsnew/3.11.rst:1607 -msgid "The :func:`binascii.crc_hqx` function remains available." +#: ../../whatsnew/3.11.rst:1909 +msgid "" +"Removed C APIs are :ref:`listed separately `." msgstr "" -#: ../../whatsnew/3.11.rst:1609 -msgid "(Contributed by Victor Stinner in :issue:`45085`.)" +#: ../../whatsnew/3.11.rst:1911 +msgid "" +"Removed the :func:`!@asyncio.coroutine` :term:`decorator` enabling legacy " +"generator-based coroutines to be compatible with :keyword:`async` / :keyword:" +"`await` code. The function has been deprecated since Python 3.8 and the " +"removal was initially scheduled for Python 3.10. Use :keyword:`async def` " +"instead. (Contributed by Illia Volochii in :issue:`43216`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1611 +#: ../../whatsnew/3.11.rst:1918 msgid "" -"The distutils ``bdist_msi`` command, deprecated in Python 3.9, is now " -"removed. Use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo " -"van Kemenade in :issue:`45124`.)" +"Removed :class:`!asyncio.coroutines.CoroWrapper` used for wrapping legacy " +"generator-based coroutine objects in the debug mode. (Contributed by Illia " +"Volochii in :issue:`43216`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1615 +#: ../../whatsnew/3.11.rst:1922 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint`, disabled in Python 3.9, is now " @@ -2551,156 +2974,184 @@ msgid "" "`45129`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1621 +#: ../../whatsnew/3.11.rst:1928 msgid "" -"Removed :meth:`__getitem__` methods of :class:`xml.dom.pulldom." -"DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput." -"FileInput`, deprecated since Python 3.9. (Contributed by Hugo van Kemenade " -"in :issue:`45132`.)" +"Removed the :mod:`!binhex` module, deprecated in Python 3.9. Also removed " +"the related, similarly-deprecated :mod:`binascii` functions:" msgstr "" -#: ../../whatsnew/3.11.rst:1626 -msgid "" -"The following deprecated functions and methods are removed in the :mod:" -"`gettext` module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`, :" -"func:`~gettext.lngettext` and :func:`~gettext.ldngettext`." +#: ../../whatsnew/3.11.rst:1931 +msgid ":func:`!binascii.a2b_hqx`" msgstr "" -#: ../../whatsnew/3.11.rst:1630 -msgid "" -"Function :func:`~gettext.bind_textdomain_codeset`, methods :meth:`~gettext." -"NullTranslations.output_charset` and :meth:`~gettext.NullTranslations." -"set_output_charset`, and the *codeset* parameter of functions :func:" -"`~gettext.translation` and :func:`~gettext.install` are also removed, since " -"they are only used for the ``l*gettext()`` functions. (Contributed by Dong-" -"hee Na and Serhiy Storchaka in :issue:`44235`.)" +#: ../../whatsnew/3.11.rst:1932 +msgid ":func:`!binascii.b2a_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1933 +msgid ":func:`!binascii.rlecode_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1934 +msgid ":func:`!binascii.rldecode_hqx`" msgstr "" -#: ../../whatsnew/3.11.rst:1638 +#: ../../whatsnew/3.11.rst:1936 +msgid "The :func:`binascii.crc_hqx` function remains available." +msgstr "" + +#: ../../whatsnew/3.11.rst:1938 +msgid "(Contributed by Victor Stinner in :issue:`45085`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1940 msgid "" -"The :func:`@asyncio.coroutine ` :term:`decorator` " -"enabling legacy generator-based coroutines to be compatible with async/await " -"code. The function has been deprecated since Python 3.8 and the removal was " -"initially scheduled for Python 3.10. Use :keyword:`async def` instead. " -"(Contributed by Illia Volochii in :issue:`43216`.)" +"Removed the :mod:`distutils` ``bdist_msi`` command deprecated in Python 3.9. " +"Use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo van " +"Kemenade in :issue:`45124`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1644 +#: ../../whatsnew/3.11.rst:1944 msgid "" -":class:`asyncio.coroutines.CoroWrapper` used for wrapping legacy generator-" -"based coroutine objects in the debug mode. (Contributed by Illia Volochii " -"in :issue:`43216`.)" +"Removed the :meth:`~object.__getitem__` methods of :class:`xml.dom.pulldom." +"DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput." +"FileInput`, deprecated since Python 3.9. (Contributed by Hugo van Kemenade " +"in :issue:`45132`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1648 +#: ../../whatsnew/3.11.rst:1949 msgid "" -"Removed the deprecated ``split()`` method of :class:`_tkinter.TkappType`. " -"(Contributed by Erlend E. Aasland in :issue:`38371`.)" +"Removed the deprecated :mod:`gettext` functions :func:`!lgettext`, :func:`!" +"ldgettext`, :func:`!lngettext` and :func:`!ldngettext`. Also removed the :" +"func:`!bind_textdomain_codeset` function, the :meth:`!NullTranslations." +"output_charset` and :meth:`!NullTranslations.set_output_charset` methods, " +"and the *codeset* parameter of :func:`!translation` and :func:`!install`, " +"since they are only used for the :func:`!l*gettext` functions. (Contributed " +"by Dong-hee Na and Serhiy Storchaka in :issue:`44235`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1651 +#: ../../whatsnew/3.11.rst:1959 msgid "Removed from the :mod:`inspect` module:" msgstr "" -#: ../../whatsnew/3.11.rst:1653 +#: ../../whatsnew/3.11.rst:1961 msgid "" -"the ``getargspec`` function, deprecated since Python 3.0; use :func:`inspect." -"signature` or :func:`inspect.getfullargspec` instead." +"The :func:`!getargspec` function, deprecated since Python 3.0; use :func:" +"`inspect.signature` or :func:`inspect.getfullargspec` instead." msgstr "" -#: ../../whatsnew/3.11.rst:1656 +#: ../../whatsnew/3.11.rst:1964 msgid "" -"the ``formatargspec`` function, deprecated since Python 3.5; use the :func:" -"`inspect.signature` function and :class:`Signature` object directly." +"The :func:`!formatargspec` function, deprecated since Python 3.5; use the :" +"func:`inspect.signature` function or the :class:`inspect.Signature` object " +"directly." msgstr "" -#: ../../whatsnew/3.11.rst:1660 +#: ../../whatsnew/3.11.rst:1968 msgid "" -"the undocumented ``Signature.from_builtin`` and ``Signature.from_function`` " -"functions, deprecated since Python 3.5; use the :meth:`Signature." -"from_callable() ` method instead." +"The undocumented :meth:`!Signature.from_builtin` and :meth:`!Signature." +"from_function` methods, deprecated since Python 3.5; use the :meth:" +"`Signature.from_callable() ` method instead." msgstr "" -#: ../../whatsnew/3.11.rst:1665 +#: ../../whatsnew/3.11.rst:1973 msgid "(Contributed by Hugo van Kemenade in :issue:`45320`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1667 +#: ../../whatsnew/3.11.rst:1975 msgid "" -"Remove namespace package support from unittest discovery. It was introduced " -"in Python 3.4 but has been broken since Python 3.7. (Contributed by Inada " -"Naoki in :issue:`23882`.)" +"Removed the :meth:`~object.__class_getitem__` method from :class:`pathlib." +"PurePath`, because it was not used and added by mistake in previous " +"versions. (Contributed by Nikita Sobolev in :issue:`46483`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1671 +#: ../../whatsnew/3.11.rst:1980 msgid "" -"Remove ``__class_getitem__`` method from :class:`pathlib.PurePath`, because " -"it was not used and added by mistake in previous versions. (Contributed by " -"Nikita Sobolev in :issue:`46483`.)" +"Removed the :class:`!MailmanProxy` class in the :mod:`smtpd` module, as it " +"is unusable without the external :mod:`!mailman` package. (Contributed by " +"Dong-hee Na in :issue:`35800`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1675 +#: ../../whatsnew/3.11.rst:1984 msgid "" -"Remove the undocumented private ``float.__set_format__()`` method, " -"previously known as ``float.__setformat__()`` in Python 3.7. Its docstring " -"said: \"You probably don't want to use this function. It exists mainly to be " -"used in Python's test suite.\" (Contributed by Victor Stinner in :issue:" -"`46852`.)" +"Removed the deprecated :meth:`!split` method of :class:`!_tkinter." +"TkappType`. (Contributed by Erlend E. Aasland in :issue:`38371`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1681 +#: ../../whatsnew/3.11.rst:1987 msgid "" -"The ``--experimental-isolated-subinterpreters`` configure flag (and " -"corresponding ``EXPERIMENTAL_ISOLATED_SUBINTERPRETERS``) have been removed." +"Removed namespace package support from :mod:`unittest` discovery. It was " +"introduced in Python 3.4 but has been broken since Python 3.7. (Contributed " +"by Inada Naoki in :issue:`23882`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1685 +#: ../../whatsnew/3.11.rst:1991 msgid "" -"Pynche --- The Pythonically Natural Color and Hue Editor --- has been moved " -"out of ``Tools/scripts`` and is `being developed independently `_ from the Python source tree." +"Removed the undocumented private :meth:`!float.__set_format__()` method, " +"previously known as :meth:`!float.__setformat__()` in Python 3.7. Its " +"docstring said: \"You probably don't want to use this function. It exists " +"mainly to be used in Python's test suite.\" (Contributed by Victor Stinner " +"in :issue:`46852`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1690 ../../whatsnew/3.11.rst:1900 -msgid "Porting to Python 3.11" +#: ../../whatsnew/3.11.rst:1997 +msgid "" +"The :option:`!--experimental-isolated-subinterpreters` configure flag (and " +"corresponding :c:macro:`!EXPERIMENTAL_ISOLATED_SUBINTERPRETERS` macro) have " +"been removed." msgstr "" -#: ../../whatsnew/3.11.rst:1692 +#: ../../whatsnew/3.11.rst:2001 msgid "" -"This section lists previously described changes and other bugfixes that may " -"require changes to your code." +"`Pynche `_ --- The Pythonically Natural " +"Color and Hue Editor --- has been moved out of ``Tools/scripts`` and is " +"`being developed independently `_ from the Python source tree." msgstr "" -#: ../../whatsnew/3.11.rst:1697 -msgid "Changes in the Python API" +#: ../../whatsnew/3.11.rst:2011 ../../whatsnew/3.11.rst:2241 +msgid "Porting to Python 3.11" msgstr "" -#: ../../whatsnew/3.11.rst:1699 +#: ../../whatsnew/3.11.rst:2013 msgid "" -"Prohibited passing non-:class:`concurrent.futures.ThreadPoolExecutor` " -"executors to :meth:`loop.set_default_executor` following a deprecation in " -"Python 3.8. (Contributed by Illia Volochii in :issue:`43234`.)" +"This section lists previously described changes and other bugfixes in the " +"Python API that may require changes to your Python code." msgstr "" -#: ../../whatsnew/3.11.rst:1704 +#: ../../whatsnew/3.11.rst:2016 +msgid "" +"Porting notes for the C API are :ref:`listed separately `." +msgstr "" + +#: ../../whatsnew/3.11.rst:2019 msgid "" ":func:`open`, :func:`io.open`, :func:`codecs.open` and :class:`fileinput." "FileInput` no longer accept ``'U'`` (\"universal newline\") in the file " -"mode. This flag was deprecated since Python 3.3. In Python 3, the " -"\"universal newline\" is used by default when a file is open in text mode. " -"The :ref:`newline parameter ` of :func:`open` " -"controls how universal newlines works. (Contributed by Victor Stinner in :" -"issue:`37330`.)" +"mode. In Python 3, \"universal newline\" mode is used by default whenever a " +"file is opened in text mode, and the ``'U'`` flag has been deprecated since " +"Python 3.3. The :ref:`newline parameter ` to these " +"functions controls how universal newlines work. (Contributed by Victor " +"Stinner in :issue:`37330`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1712 +#: ../../whatsnew/3.11.rst:2028 msgid "" -"The :mod:`pdb` module now reads the :file:`.pdbrc` configuration file with " -"the ``'utf-8'`` encoding. (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ " -"రెడ్డి తాటిపర్తి) in :issue:`41137`.)" +":class:`ast.AST` node positions are now validated when provided to :func:" +"`compile` and other related functions. If invalid positions are detected, a :" +"exc:`ValueError` will be raised. (Contributed by Pablo Galindo in :gh:" +"`93351`)" msgstr "" -#: ../../whatsnew/3.11.rst:1716 +#: ../../whatsnew/3.11.rst:2032 +msgid "" +"Prohibited passing non-:class:`concurrent.futures.ThreadPoolExecutor` " +"executors to :meth:`asyncio.loop.set_default_executor` following a " +"deprecation in Python 3.8. (Contributed by Illia Volochii in :issue:`43234`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2037 msgid "" ":mod:`calendar`: The :class:`calendar.LocaleTextCalendar` and :class:" "`calendar.LocaleHTMLCalendar` classes now use :func:`locale.getlocale`, " @@ -2708,96 +3159,132 @@ msgid "" "(Contributed by Victor Stinner in :issue:`46659`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1722 +#: ../../whatsnew/3.11.rst:2043 msgid "" -"Global inline flags (e.g. ``(?i)``) can now only be used at the start of the " -"regular expressions. Using them not at the start of expression was " -"deprecated since Python 3.6. (Contributed by Serhiy Storchaka in :issue:" -"`47066`.)" +"The :mod:`pdb` module now reads the :file:`.pdbrc` configuration file with " +"the ``'UTF-8'`` encoding. (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ " +"రెడ్డి తాటిపర్తి) in :issue:`41137`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1727 +#: ../../whatsnew/3.11.rst:2047 msgid "" -":mod:`re` module: Fix a few long-standing bugs where, in rare cases, " -"capturing group could get wrong result. So the result may be different than " -"before. (Contributed by Ma Lin in :issue:`35859`.)" +"The *population* parameter of :func:`random.sample` must be a sequence, and " +"automatic conversion of :class:`set`\\s to :class:`list`\\s is no longer " +"supported. Also, if the sample size is larger than the population size, a :" +"exc:`ValueError` is raised. (Contributed by Raymond Hettinger in :issue:" +"`40465`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1732 +#: ../../whatsnew/3.11.rst:2053 msgid "" -"The *population* parameter of :func:`random.sample` must be a sequence. " -"Automatic conversion of sets to lists is no longer supported. If the sample " -"size is larger than the population size, a :exc:`ValueError` is raised. " -"(Contributed by Raymond Hettinger in :issue:`40465`.)" +"The *random* optional parameter of :func:`random.shuffle` was removed. It " +"was previously an arbitrary random function to use for the shuffle; now, :" +"func:`random.random` (its previous default) will always be used." msgstr "" -#: ../../whatsnew/3.11.rst:1737 +#: ../../whatsnew/3.11.rst:2057 msgid "" -":class:`ast.AST` node positions are now validated when provided to :func:" -"`compile` and other related functions. If invalid positions are detected, a :" -"exc:`ValueError` will be raised. (Contributed by Pablo Galindo in :gh:" -"`93351`)" +"In :mod:`re` :ref:`re-syntax`, global inline flags (e.g. ``(?i)``) can now " +"only be used at the start of regular expressions. Using them elsewhere has " +"been deprecated since Python 3.6. (Contributed by Serhiy Storchaka in :issue:" +"`47066`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1741 +#: ../../whatsnew/3.11.rst:2062 msgid "" -":c:member:`~PyTypeObject.tp_dictoffset` should be treated as write-only. It " -"can be set to describe C extension clases to the VM, but should be regarded " -"as meaningless when read. To get the pointer to the object's dictionary " -"call :c:func:`PyObject_GenericGetDict` instead." +"In the :mod:`re` module, several long-standing bugs where fixed that, in " +"rare cases, could cause capture groups to get the wrong result. Therefore, " +"this could change the captured output in these cases. (Contributed by Ma Lin " +"in :issue:`35859`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1747 +#: ../../whatsnew/3.11.rst:2071 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.11.rst:1749 +#: ../../whatsnew/3.11.rst:2073 msgid "" -"Building Python now requires a C11 compiler. Optional C11 features are not " -"required. (Contributed by Victor Stinner in :issue:`46656`.)" +"CPython now has :pep:`11` :pep:`Tier 3 support <11#tier-3>` for cross " +"compiling to the `WebAssembly `_ platforms " +"`Emscripten `_ (``wasm32-unknown-emscripten``, i.e. " +"Python in the browser) and `WebAssembly System Interface (WASI) `_ (``wasm32-unknown-wasi``). The effort is inspired by previous " +"work like `Pyodide `_. These platforms provide a " +"limited subset of POSIX APIs; Python standard libraries features and modules " +"related to networking, processes, threading, signals, mmap, and users/groups " +"are not available or don't work. (Emscripten contributed by Christian Heimes " +"and Ethan Smith in :gh:`84461` and WASI contributed by Christian Heimes in :" +"gh:`90473`; platforms promoted in :gh:`95085`)" msgstr "" -#: ../../whatsnew/3.11.rst:1753 +#: ../../whatsnew/3.11.rst:2087 +msgid "Building Python now requires:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2089 msgid "" -"Building Python now requires support of IEEE 754 floating point numbers. " -"(Contributed by Victor Stinner in :issue:`46917`.)" +"A `C11 `_ compiler. `Optional C11 " +"features `_ are not required. " +"(Contributed by Victor Stinner in :issue:`46656`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1756 +#: ../../whatsnew/3.11.rst:2095 msgid "" -"CPython can now be built with the ThinLTO option via ``--with-lto=thin``. " -"(Contributed by Dong-hee Na and Brett Holman in :issue:`44340`.)" +"Support for `IEEE 754 `_ floating " +"point numbers. (Contributed by Victor Stinner in :issue:`46917`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1759 +#: ../../whatsnew/3.11.rst:2099 msgid "" -"libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert " -"in :issue:`45433`.)" +"Support for `floating point Not-a-Number (NaN) `_, as the :c:macro:`!Py_NO_NAN` macro has been " +"removed. (Contributed by Victor Stinner in :issue:`46656`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1762 +#: ../../whatsnew/3.11.rst:2104 msgid "" -"Building Python now requires a C99 ```` header file providing the " -"following functions: ``copysign()``, ``hypot()``, ``isfinite()``, " -"``isinf()``, ``isnan()``, ``round()``. (Contributed by Victor Stinner in :" -"issue:`45440`.)" +"A `C99 `_ ```` header file " +"providing the :c:func:`!copysign`, :c:func:`!hypot`, :c:func:`!isfinite`, :c:" +"func:`!isinf`, :c:func:`!isnan`, and :c:func:`!round` functions (contributed " +"by Victor Stinner in :issue:`45440`); and a :c:data:`!NAN` constant or the :" +"c:func:`!__builtin_nan` function (Contributed by Victor Stinner in :issue:" +"`46640`)." msgstr "" -#: ../../whatsnew/3.11.rst:1767 +#: ../../whatsnew/3.11.rst:2112 msgid "" -"Building Python now requires a C99 ```` header file providing a " -"``NAN`` constant, or the ``__builtin_nan()`` built-in function. (Contributed " -"by Victor Stinner in :issue:`46640`.)" +"The :mod:`tkinter` package now requires `Tcl/Tk `_ " +"version 8.5.12 or newer. (Contributed by Serhiy Storchaka in :issue:`46996`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1771 +#: ../../whatsnew/3.11.rst:2116 msgid "" -"Building Python now requires support for floating point Not-a-Number (NaN): " -"remove the ``Py_NO_NAN`` macro. (Contributed by Victor Stinner in :issue:" -"`46656`.)" +"Build dependencies, compiler flags, and linker flags for most stdlib " +"extension modules are now detected by :program:`configure`. libffi, libnsl, " +"libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk, and uuid flags are " +"detected by `pkg-config `_ (when available). :mod:`tkinter` now requires a pkg-config " +"command to detect development settings for `Tcl/Tk`_ headers and libraries. " +"(Contributed by Christian Heimes and Erlend Egeberg Aasland in :issue:" +"`45847`, :issue:`45747`, and :issue:`45763`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2126 +msgid "" +"libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert " +"in :issue:`45433`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1775 +#: ../../whatsnew/3.11.rst:2129 +msgid "" +"CPython can now be built with the `ThinLTO `_ option via passing ``thin`` to :option:`--with-lto`, i.e. " +"``--with-lto=thin``. (Contributed by Dong-hee Na and Brett Holman in :issue:" +"`44340`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2134 msgid "" "Freelists for object structs can now be disabled. A new :program:`configure` " "option :option:`!--without-freelists` can be used to disable all freelists " @@ -2805,97 +3292,60 @@ msgid "" "`45522`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1780 +#: ../../whatsnew/3.11.rst:2139 msgid "" "``Modules/Setup`` and ``Modules/makesetup`` have been improved and tied up. " "Extension modules can now be built through ``makesetup``. All except some " -"test modules can be linked statically into main binary or library. " +"test modules can be linked statically into a main binary or library. " "(Contributed by Brett Cannon and Christian Heimes in :issue:`45548`, :issue:" "`45570`, :issue:`45571`, and :issue:`43974`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1786 -msgid "" -"Build dependencies, compiler flags, and linker flags for most stdlib " -"extension modules are now detected by :program:`configure`. libffi, libnsl, " -"libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk, and uuid flags are " -"detected by ``pkg-config`` (when available). :mod:`tkinter` now requires " -"``pkg-config`` command to detect development settings for Tcl/Tk headers and " -"libraries. (Contributed by Christian Heimes and Erlend Egeberg Aasland in :" -"issue:`45847`, :issue:`45747`, and :issue:`45763`.)" -msgstr "" - -#: ../../whatsnew/3.11.rst:1796 +#: ../../whatsnew/3.11.rst:2146 msgid "" -"Use the environment variables :envvar:`TCLTK_CFLAGS` and :envvar:" -"`TCLTK_LIBS` to manually specify the location of Tcl/Tk headers and " -"libraries. The :program:`configure` options ``--with-tcltk-includes`` and " -"``--with-tcltk-libs`` have been removed." +"Use the environment variables :envvar:`!TCLTK_CFLAGS` and :envvar:`!" +"TCLTK_LIBS` to manually specify the location of Tcl/Tk headers and " +"libraries. The :program:`configure` options :option:`!--with-tcltk-includes` " +"and :option:`!--with-tcltk-libs` have been removed." msgstr "" -#: ../../whatsnew/3.11.rst:1801 +#: ../../whatsnew/3.11.rst:2152 msgid "" "On RHEL 7 and CentOS 7 the development packages do not provide ``tcl.pc`` " -"and ``tk.pc``, use :envvar:`TCLTK_LIBS=\"-ltk8.5 -ltkstub8.5 -ltcl8.5\"`. " -"The directory ``Misc/rhel7`` contains ``.pc`` files and instructions how to " +"and ``tk.pc``; use ``TCLTK_LIBS=\"-ltk8.5 -ltkstub8.5 -ltcl8.5\"``. The " +"directory ``Misc/rhel7`` contains ``.pc`` files and instructions on how to " "build Python with RHEL 7's and CentOS 7's Tcl/Tk and OpenSSL." msgstr "" -#: ../../whatsnew/3.11.rst:1806 -msgid "" -"CPython now has :pep:`11` tier 3 support for cross compiling to WebAssembly " -"platform ``wasm32-unknown-emscripten`` (Python in the browser). The effort " -"is inspired by previous work like `Pyodide `_. " -"Emscripten provides a limited subset of POSIX APIs. Python standard " -"libraries features and modules related to networking, processes, threading, " -"signals, mmap, and users/groups are not available or don't work. " -"(Contributed by Christian Heimes and Ethan Smith in :gh:`84461`, promoted " -"in :gh:`95085`)" -msgstr "" - -#: ../../whatsnew/3.11.rst:1815 -msgid "" -"CPython now has :pep:`11` tier 3 support for cross compiling to WebAssembly " -"platform ``wasm32-unknown-wasi`` (WebAssembly System Interface). Like on " -"Emscripten, only a subset of Python's standard library is available on WASI. " -"(Contributed by Christian Heimes in :gh:`90473`, promoted in :gh:`95085`)" -msgstr "" - -#: ../../whatsnew/3.11.rst:1820 +#: ../../whatsnew/3.11.rst:2157 msgid "" "CPython will now use 30-bit digits by default for the Python :class:`int` " "implementation. Previously, the default was to use 30-bit digits on " "platforms with ``SIZEOF_VOID_P >= 8``, and 15-bit digits otherwise. It's " -"still possible to explicitly request use of 15-bit digits via either the ``--" -"enable-big-digits`` option to the configure script or (for Windows) the " -"``PYLONG_BITS_IN_DIGIT`` variable in ``PC/pyconfig.h``, but this option may " -"be removed at some point in the future. (Contributed by Mark Dickinson in :" -"issue:`45569`.)" +"still possible to explicitly request use of 15-bit digits via either the :" +"option:`--enable-big-digits` option to the configure script or (for Windows) " +"the ``PYLONG_BITS_IN_DIGIT`` variable in ``PC/pyconfig.h``, but this option " +"may be removed at some point in the future. (Contributed by Mark Dickinson " +"in :issue:`45569`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1829 -msgid "" -"The :mod:`tkinter` package now requires Tcl/Tk version 8.5.12 or newer. " -"(Contributed by Serhiy Storchaka in :issue:`46996`.)" -msgstr "" - -#: ../../whatsnew/3.11.rst:1834 +#: ../../whatsnew/3.11.rst:2170 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.11.rst:1839 +#: ../../whatsnew/3.11.rst:2177 msgid "" "Add a new :c:func:`PyType_GetName` function to get type's short name. " "(Contributed by Hai Shi in :issue:`42035`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1842 +#: ../../whatsnew/3.11.rst:2180 msgid "" "Add a new :c:func:`PyType_GetQualName` function to get type's qualified " "name. (Contributed by Hai Shi in :issue:`42035`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1845 +#: ../../whatsnew/3.11.rst:2183 msgid "" "Add new :c:func:`PyThreadState_EnterTracing` and :c:func:" "`PyThreadState_LeaveTracing` functions to the limited C API to suspend and " @@ -2903,78 +3353,78 @@ msgid "" "`43760`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1850 +#: ../../whatsnew/3.11.rst:2188 msgid "" "Added the :c:data:`Py_Version` constant which bears the same value as :c:" "macro:`PY_VERSION_HEX`. (Contributed by Gabriele N. Tornetta in :issue:" "`43931`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1854 +#: ../../whatsnew/3.11.rst:2192 msgid "" ":c:type:`Py_buffer` and APIs are now part of the limited API and the stable " "ABI:" msgstr "" -#: ../../whatsnew/3.11.rst:1857 +#: ../../whatsnew/3.11.rst:2195 msgid ":c:func:`PyObject_CheckBuffer`" msgstr ":c:func:`PyObject_CheckBuffer`" -#: ../../whatsnew/3.11.rst:1858 +#: ../../whatsnew/3.11.rst:2196 msgid ":c:func:`PyObject_GetBuffer`" msgstr ":c:func:`PyObject_GetBuffer`" -#: ../../whatsnew/3.11.rst:1859 +#: ../../whatsnew/3.11.rst:2197 msgid ":c:func:`PyBuffer_GetPointer`" msgstr ":c:func:`PyBuffer_GetPointer`" -#: ../../whatsnew/3.11.rst:1860 +#: ../../whatsnew/3.11.rst:2198 msgid ":c:func:`PyBuffer_SizeFromFormat`" msgstr ":c:func:`PyBuffer_SizeFromFormat`" -#: ../../whatsnew/3.11.rst:1861 +#: ../../whatsnew/3.11.rst:2199 msgid ":c:func:`PyBuffer_ToContiguous`" msgstr ":c:func:`PyBuffer_ToContiguous`" -#: ../../whatsnew/3.11.rst:1862 +#: ../../whatsnew/3.11.rst:2200 msgid ":c:func:`PyBuffer_FromContiguous`" msgstr ":c:func:`PyBuffer_FromContiguous`" -#: ../../whatsnew/3.11.rst:1863 +#: ../../whatsnew/3.11.rst:2201 msgid ":c:func:`PyBuffer_CopyData`" msgstr ":c:func:`PyBuffer_CopyData`" -#: ../../whatsnew/3.11.rst:1864 +#: ../../whatsnew/3.11.rst:2202 msgid ":c:func:`PyBuffer_IsContiguous`" msgstr ":c:func:`PyBuffer_IsContiguous`" -#: ../../whatsnew/3.11.rst:1865 +#: ../../whatsnew/3.11.rst:2203 msgid ":c:func:`PyBuffer_FillContiguousStrides`" msgstr ":c:func:`PyBuffer_FillContiguousStrides`" -#: ../../whatsnew/3.11.rst:1866 +#: ../../whatsnew/3.11.rst:2204 msgid ":c:func:`PyBuffer_FillInfo`" msgstr ":c:func:`PyBuffer_FillInfo`" -#: ../../whatsnew/3.11.rst:1867 +#: ../../whatsnew/3.11.rst:2205 msgid ":c:func:`PyBuffer_Release`" msgstr ":c:func:`PyBuffer_Release`" -#: ../../whatsnew/3.11.rst:1868 +#: ../../whatsnew/3.11.rst:2206 msgid ":c:func:`PyMemoryView_FromBuffer`" msgstr ":c:func:`PyMemoryView_FromBuffer`" -#: ../../whatsnew/3.11.rst:1869 +#: ../../whatsnew/3.11.rst:2207 msgid "" ":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." "bf_releasebuffer` type slots" msgstr "" -#: ../../whatsnew/3.11.rst:1872 +#: ../../whatsnew/3.11.rst:2210 msgid "(Contributed by Christian Heimes in :issue:`45459`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1874 +#: ../../whatsnew/3.11.rst:2212 msgid "" "Added the :c:data:`PyType_GetModuleByDef` function, used to get the module " "in which a method was defined, in cases where this information is not " @@ -2982,7 +3432,7 @@ msgid "" "in :issue:`46613`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1879 +#: ../../whatsnew/3.11.rst:2217 msgid "" "Add new functions to pack and unpack C double (serialize and deserialize): :" "c:func:`PyFloat_Pack2`, :c:func:`PyFloat_Pack4`, :c:func:`PyFloat_Pack8`, :c:" @@ -2990,14 +3440,14 @@ msgid "" "`PyFloat_Unpack8`. (Contributed by Victor Stinner in :issue:`46906`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1885 +#: ../../whatsnew/3.11.rst:2223 msgid "" "Add new functions to get frame object attributes: :c:func:" "`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`, :c:func:" "`PyFrame_GetGlobals`, :c:func:`PyFrame_GetLasti`." msgstr "" -#: ../../whatsnew/3.11.rst:1889 +#: ../../whatsnew/3.11.rst:2227 msgid "" "Added two new functions to get and set the active exception instance: :c:" "func:`PyErr_GetHandledException` and :c:func:`PyErr_SetHandledException`. " @@ -3006,13 +3456,25 @@ msgid "" "exceptions. (Contributed by Irit Katriel in :issue:`46343`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1896 +#: ../../whatsnew/3.11.rst:2234 msgid "" "Added the :c:member:`PyConfig.safe_path` member. (Contributed by Victor " "Stinner in :gh:`57684`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1902 +#: ../../whatsnew/3.11.rst:2245 +msgid "" +"Some macros have been converted to static inline functions to avoid `macro " +"pitfalls `_. The " +"change should be mostly transparent to users, as the replacement functions " +"will cast their arguments to the expected types to avoid compiler warnings " +"due to static type checks. However, when the limited C API is set to >=3.11, " +"these casts are not done, and callers will need to cast arguments to their " +"expected types. See :pep:`670` for more details. (Contributed by Victor " +"Stinner and Erlend E. Aasland in :gh:`89653`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2256 msgid "" ":c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback`` " "arguments, the interpreter now derives those values from the exception " @@ -3020,14 +3482,14 @@ msgid "" "all three arguments. (Contributed by Irit Katriel in :issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1908 +#: ../../whatsnew/3.11.rst:2262 msgid "" ":c:func:`PyErr_GetExcInfo()` now derives the ``type`` and ``traceback`` " "fields of the result from the exception instance (the ``value`` field). " "(Contributed by Irit Katriel in :issue:`45711`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1912 +#: ../../whatsnew/3.11.rst:2266 msgid "" ":c:struct:`_frozen` has a new ``is_package`` field to indicate whether or " "not the frozen module is a package. Previously, a negative value in the " @@ -3035,14 +3497,14 @@ msgid "" "``size``. (Contributed by Kumar Aditya in :issue:`46608`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1918 +#: ../../whatsnew/3.11.rst:2272 msgid "" ":c:func:`_PyFrameEvalFunction` now takes ``_PyInterpreterFrame*`` as its " "second parameter, instead of ``PyFrameObject*``. See :pep:`523` for more " "details of how to use this function pointer type." msgstr "" -#: ../../whatsnew/3.11.rst:1922 +#: ../../whatsnew/3.11.rst:2276 msgid "" ":c:func:`PyCode_New` and :c:func:`PyCode_NewWithPosOnlyArgs` now take an " "additional ``exception_table`` argument. Using these functions should be " @@ -3051,7 +3513,7 @@ msgid "" "method." msgstr "" -#: ../../whatsnew/3.11.rst:1928 +#: ../../whatsnew/3.11.rst:2282 msgid "" ":c:type:`PyCodeObject` no longer has the ``co_code``, ``co_varnames``, " "``co_cellvars`` and ``co_freevars`` fields. Instead, use :c:func:" @@ -3061,35 +3523,35 @@ msgid "" "and :gh:`94936`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1936 +#: ../../whatsnew/3.11.rst:2290 msgid "" "The old trashcan macros (``Py_TRASHCAN_SAFE_BEGIN``/" "``Py_TRASHCAN_SAFE_END``) are now deprecated. They should be replaced by the " "new macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``." msgstr "" -#: ../../whatsnew/3.11.rst:1940 +#: ../../whatsnew/3.11.rst:2294 msgid "A tp_dealloc function that has the old macros, such as::" msgstr "" -#: ../../whatsnew/3.11.rst:1951 +#: ../../whatsnew/3.11.rst:2305 msgid "should migrate to the new macros as follows::" msgstr "" -#: ../../whatsnew/3.11.rst:1962 +#: ../../whatsnew/3.11.rst:2316 msgid "" "Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " "deallocation function it is in." msgstr "" -#: ../../whatsnew/3.11.rst:1965 +#: ../../whatsnew/3.11.rst:2319 msgid "" "To support older Python versions in the same codebase, you can define the " "following macros and use them throughout the code (credit: these were copied " "from the ``mypy`` codebase)::" msgstr "" -#: ../../whatsnew/3.11.rst:1977 +#: ../../whatsnew/3.11.rst:2331 msgid "" "The :c:func:`PyType_Ready` function now raises an error if a type is defined " "with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function (:" @@ -3097,7 +3559,7 @@ msgid "" "issue:`44263`.)" msgstr "" -#: ../../whatsnew/3.11.rst:1982 +#: ../../whatsnew/3.11.rst:2336 msgid "" "Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit " "the :pep:`590` vectorcall protocol. Previously, this was only possible for :" @@ -3105,7 +3567,7 @@ msgid "" "issue:`43908`)" msgstr "" -#: ../../whatsnew/3.11.rst:1987 +#: ../../whatsnew/3.11.rst:2341 msgid "" "Since :c:func:`Py_TYPE()` is changed to a inline static function, " "``Py_TYPE(obj) = new_type`` must be replaced with ``Py_SET_TYPE(obj, " @@ -3113,11 +3575,11 @@ msgid "" "Python 3.9). For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.11.rst:1999 ../../whatsnew/3.11.rst:2013 +#: ../../whatsnew/3.11.rst:2353 ../../whatsnew/3.11.rst:2367 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2001 +#: ../../whatsnew/3.11.rst:2355 msgid "" "Since :c:func:`Py_SIZE()` is changed to a inline static function, " "``Py_SIZE(obj) = new_size`` must be replaced with ``Py_SET_SIZE(obj, " @@ -3125,7 +3587,7 @@ msgid "" "Python 3.9). For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.11.rst:2015 +#: ../../whatsnew/3.11.rst:2369 msgid "" "```` no longer includes the header files ````, ````, ```` and ```` when the ``Py_LIMITED_API`` macro is " @@ -3134,7 +3596,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`45434`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2021 +#: ../../whatsnew/3.11.rst:2375 msgid "" "The non-limited API files ``cellobject.h``, ``classobject.h``, ``code.h``, " "``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have " @@ -3145,7 +3607,7 @@ msgid "" "instead. (Contributed by Victor Stinner in :issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2029 +#: ../../whatsnew/3.11.rst:2383 msgid "" "The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the " "limited C API. It was never usable there, because it used internal " @@ -3153,149 +3615,149 @@ msgid "" "Victor Stinner in :issue:`46007`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2034 +#: ../../whatsnew/3.11.rst:2388 msgid "" "The following frame functions and type are now directly available with " "``#include ``, it's no longer needed to add ``#include " "``:" msgstr "" -#: ../../whatsnew/3.11.rst:2038 +#: ../../whatsnew/3.11.rst:2392 msgid ":c:func:`PyFrame_Check`" msgstr ":c:func:`PyFrame_Check`" -#: ../../whatsnew/3.11.rst:2039 +#: ../../whatsnew/3.11.rst:2393 msgid ":c:func:`PyFrame_GetBack`" msgstr ":c:func:`PyFrame_GetBack`" -#: ../../whatsnew/3.11.rst:2040 +#: ../../whatsnew/3.11.rst:2394 msgid ":c:func:`PyFrame_GetBuiltins`" msgstr ":c:func:`PyFrame_GetBuiltins`" -#: ../../whatsnew/3.11.rst:2041 +#: ../../whatsnew/3.11.rst:2395 msgid ":c:func:`PyFrame_GetGenerator`" msgstr ":c:func:`PyFrame_GetGenerator`" -#: ../../whatsnew/3.11.rst:2042 +#: ../../whatsnew/3.11.rst:2396 msgid ":c:func:`PyFrame_GetGlobals`" msgstr ":c:func:`PyFrame_GetGlobals`" -#: ../../whatsnew/3.11.rst:2043 +#: ../../whatsnew/3.11.rst:2397 msgid ":c:func:`PyFrame_GetLasti`" msgstr ":c:func:`PyFrame_GetLasti`" -#: ../../whatsnew/3.11.rst:2044 +#: ../../whatsnew/3.11.rst:2398 msgid ":c:func:`PyFrame_GetLocals`" msgstr ":c:func:`PyFrame_GetLocals`" -#: ../../whatsnew/3.11.rst:2045 +#: ../../whatsnew/3.11.rst:2399 msgid ":c:type:`PyFrame_Type`" msgstr ":c:type:`PyFrame_Type`" -#: ../../whatsnew/3.11.rst:2047 +#: ../../whatsnew/3.11.rst:2401 msgid "(Contributed by Victor Stinner in :gh:`93937`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2051 +#: ../../whatsnew/3.11.rst:2405 msgid "" "The :c:type:`PyFrameObject` structure members have been removed from the " "public C API." msgstr "" -#: ../../whatsnew/3.11.rst:2054 +#: ../../whatsnew/3.11.rst:2408 msgid "" "While the documentation notes that the :c:type:`PyFrameObject` fields are " "subject to change at any time, they have been stable for a long time and " "were used in several popular extensions." msgstr "" -#: ../../whatsnew/3.11.rst:2058 +#: ../../whatsnew/3.11.rst:2412 msgid "" "In Python 3.11, the frame struct was reorganized to allow performance " "optimizations. Some fields were removed entirely, as they were details of " "the old implementation." msgstr "" -#: ../../whatsnew/3.11.rst:2062 +#: ../../whatsnew/3.11.rst:2416 msgid ":c:type:`PyFrameObject` fields:" msgstr "" -#: ../../whatsnew/3.11.rst:2064 +#: ../../whatsnew/3.11.rst:2418 msgid "``f_back``: use :c:func:`PyFrame_GetBack`." msgstr "" -#: ../../whatsnew/3.11.rst:2065 +#: ../../whatsnew/3.11.rst:2419 msgid "``f_blockstack``: removed." msgstr "" -#: ../../whatsnew/3.11.rst:2066 +#: ../../whatsnew/3.11.rst:2420 msgid "``f_builtins``: use :c:func:`PyFrame_GetBuiltins`." msgstr "" -#: ../../whatsnew/3.11.rst:2067 +#: ../../whatsnew/3.11.rst:2421 msgid "``f_code``: use :c:func:`PyFrame_GetCode`." msgstr "" -#: ../../whatsnew/3.11.rst:2068 +#: ../../whatsnew/3.11.rst:2422 msgid "``f_gen``: use :c:func:`PyFrame_GetGenerator`." msgstr "" -#: ../../whatsnew/3.11.rst:2069 +#: ../../whatsnew/3.11.rst:2423 msgid "``f_globals``: use :c:func:`PyFrame_GetGlobals`." msgstr "" -#: ../../whatsnew/3.11.rst:2070 +#: ../../whatsnew/3.11.rst:2424 msgid "``f_iblock``: removed." msgstr "" -#: ../../whatsnew/3.11.rst:2071 +#: ../../whatsnew/3.11.rst:2425 msgid "" "``f_lasti``: use :c:func:`PyFrame_GetLasti`. Code using ``f_lasti`` with " "``PyCode_Addr2Line()`` should use :c:func:`PyFrame_GetLineNumber` instead; " "it may be faster." msgstr "" -#: ../../whatsnew/3.11.rst:2074 +#: ../../whatsnew/3.11.rst:2428 msgid "``f_lineno``: use :c:func:`PyFrame_GetLineNumber`" msgstr "" -#: ../../whatsnew/3.11.rst:2075 +#: ../../whatsnew/3.11.rst:2429 msgid "``f_locals``: use :c:func:`PyFrame_GetLocals`." msgstr "" -#: ../../whatsnew/3.11.rst:2076 +#: ../../whatsnew/3.11.rst:2430 msgid "``f_stackdepth``: removed." msgstr "" -#: ../../whatsnew/3.11.rst:2077 +#: ../../whatsnew/3.11.rst:2431 msgid "``f_state``: no public API (renamed to ``f_frame.f_state``)." msgstr "" -#: ../../whatsnew/3.11.rst:2078 +#: ../../whatsnew/3.11.rst:2432 msgid "``f_trace``: no public API." msgstr "" -#: ../../whatsnew/3.11.rst:2079 +#: ../../whatsnew/3.11.rst:2433 msgid "" "``f_trace_lines``: use ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_lines\")``." msgstr "" -#: ../../whatsnew/3.11.rst:2080 +#: ../../whatsnew/3.11.rst:2434 msgid "" "``f_trace_opcodes``: use ``PyObject_GetAttrString((PyObject*)frame, " "\"f_trace_opcodes\")``." msgstr "" -#: ../../whatsnew/3.11.rst:2081 +#: ../../whatsnew/3.11.rst:2435 msgid "``f_localsplus``: no public API (renamed to ``f_frame.localsplus``)." msgstr "" -#: ../../whatsnew/3.11.rst:2082 +#: ../../whatsnew/3.11.rst:2436 msgid "``f_valuestack``: removed." msgstr "" -#: ../../whatsnew/3.11.rst:2084 +#: ../../whatsnew/3.11.rst:2438 msgid "" "The Python frame object is now created lazily. A side effect is that the " "``f_back`` member must not be accessed directly, since its value is now also " @@ -3303,7 +3765,7 @@ msgid "" "instead." msgstr "" -#: ../../whatsnew/3.11.rst:2089 +#: ../../whatsnew/3.11.rst:2443 msgid "" "Debuggers that accessed the ``f_locals`` directly *must* call :c:func:" "`PyFrame_GetLocals` instead. They no longer need to call :c:func:" @@ -3312,71 +3774,71 @@ msgid "" "now managed by the virtual machine." msgstr "" -#: ../../whatsnew/3.11.rst:2095 +#: ../../whatsnew/3.11.rst:2449 msgid "Code defining ``PyFrame_GetCode()`` on Python 3.8 and older::" msgstr "" -#: ../../whatsnew/3.11.rst:2105 +#: ../../whatsnew/3.11.rst:2459 msgid "Code defining ``PyFrame_GetBack()`` on Python 3.8 and older::" msgstr "" -#: ../../whatsnew/3.11.rst:2115 +#: ../../whatsnew/3.11.rst:2469 msgid "" "Or use the `pythoncapi_compat project `__ to get these two functions on older Python versions." msgstr "" -#: ../../whatsnew/3.11.rst:2119 +#: ../../whatsnew/3.11.rst:2473 msgid "Changes of the :c:type:`PyThreadState` structure members:" msgstr "" -#: ../../whatsnew/3.11.rst:2121 +#: ../../whatsnew/3.11.rst:2475 msgid "" "``frame``: removed, use :c:func:`PyThreadState_GetFrame` (function added to " "Python 3.9 by :issue:`40429`). Warning: the function returns a :term:`strong " "reference`, need to call :c:func:`Py_XDECREF`." msgstr "" -#: ../../whatsnew/3.11.rst:2125 +#: ../../whatsnew/3.11.rst:2479 msgid "" "``tracing``: changed, use :c:func:`PyThreadState_EnterTracing` and :c:func:" "`PyThreadState_LeaveTracing` (functions added to Python 3.11 by :issue:" "`43760`)." msgstr "" -#: ../../whatsnew/3.11.rst:2128 +#: ../../whatsnew/3.11.rst:2482 msgid "" "``recursion_depth``: removed, use ``(tstate->recursion_limit - tstate-" ">recursion_remaining)`` instead." msgstr "" -#: ../../whatsnew/3.11.rst:2130 +#: ../../whatsnew/3.11.rst:2484 msgid "``stackcheck_counter``: removed." msgstr "" -#: ../../whatsnew/3.11.rst:2132 +#: ../../whatsnew/3.11.rst:2486 msgid "Code defining ``PyThreadState_GetFrame()`` on Python 3.8 and older::" msgstr "" -#: ../../whatsnew/3.11.rst:2142 +#: ../../whatsnew/3.11.rst:2496 msgid "" "Code defining ``PyThreadState_EnterTracing()`` and " "``PyThreadState_LeaveTracing()`` on Python 3.10 and older::" msgstr "" -#: ../../whatsnew/3.11.rst:2168 +#: ../../whatsnew/3.11.rst:2522 msgid "" "Or use `the pythoncapi_compat project `__ to get these functions on old Python functions." msgstr "" -#: ../../whatsnew/3.11.rst:2172 +#: ../../whatsnew/3.11.rst:2526 msgid "" "Distributors are encouraged to build Python with the optimized Blake2 " "library `libb2`_." msgstr "" -#: ../../whatsnew/3.11.rst:2175 +#: ../../whatsnew/3.11.rst:2529 msgid "" "The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 " "for initialization to use :c:member:`PyConfig.module_search_paths` to " @@ -3384,7 +3846,7 @@ msgid "" "path and replace any values added to ``module_search_paths``." msgstr "" -#: ../../whatsnew/3.11.rst:2180 +#: ../../whatsnew/3.11.rst:2534 msgid "" ":c:func:`PyConfig_Read` no longer calculates the initial search path, and " "will not fill any values into :c:member:`PyConfig.module_search_paths`. To " @@ -3393,107 +3855,177 @@ msgid "" "object and modify it directly." msgstr "" -#: ../../whatsnew/3.11.rst:2188 +#: ../../whatsnew/3.11.rst:2545 msgid "" "Deprecate the following functions to configure the Python initialization:" msgstr "" -#: ../../whatsnew/3.11.rst:2190 +#: ../../whatsnew/3.11.rst:2547 msgid ":c:func:`PySys_AddWarnOptionUnicode`" msgstr ":c:func:`PySys_AddWarnOptionUnicode`" -#: ../../whatsnew/3.11.rst:2191 +#: ../../whatsnew/3.11.rst:2548 msgid ":c:func:`PySys_AddWarnOption`" msgstr ":c:func:`PySys_AddWarnOption`" -#: ../../whatsnew/3.11.rst:2192 +#: ../../whatsnew/3.11.rst:2549 msgid ":c:func:`PySys_AddXOption`" msgstr ":c:func:`PySys_AddXOption`" -#: ../../whatsnew/3.11.rst:2193 +#: ../../whatsnew/3.11.rst:2550 msgid ":c:func:`PySys_HasWarnOptions`" msgstr ":c:func:`PySys_HasWarnOptions`" -#: ../../whatsnew/3.11.rst:2194 +#: ../../whatsnew/3.11.rst:2551 msgid ":c:func:`PySys_SetArgvEx`" msgstr ":c:func:`PySys_SetArgvEx`" -#: ../../whatsnew/3.11.rst:2195 +#: ../../whatsnew/3.11.rst:2552 msgid ":c:func:`PySys_SetArgv`" msgstr ":c:func:`PySys_SetArgv`" -#: ../../whatsnew/3.11.rst:2196 +#: ../../whatsnew/3.11.rst:2553 msgid ":c:func:`PySys_SetPath`" msgstr ":c:func:`PySys_SetPath`" -#: ../../whatsnew/3.11.rst:2197 +#: ../../whatsnew/3.11.rst:2554 msgid ":c:func:`Py_SetPath`" msgstr ":c:func:`Py_SetPath`" -#: ../../whatsnew/3.11.rst:2198 +#: ../../whatsnew/3.11.rst:2555 msgid ":c:func:`Py_SetProgramName`" msgstr ":c:func:`Py_SetProgramName`" -#: ../../whatsnew/3.11.rst:2199 +#: ../../whatsnew/3.11.rst:2556 msgid ":c:func:`Py_SetPythonHome`" msgstr ":c:func:`Py_SetPythonHome`" -#: ../../whatsnew/3.11.rst:2200 +#: ../../whatsnew/3.11.rst:2557 msgid ":c:func:`Py_SetStandardStreamEncoding`" msgstr ":c:func:`Py_SetStandardStreamEncoding`" -#: ../../whatsnew/3.11.rst:2201 +#: ../../whatsnew/3.11.rst:2558 msgid ":c:func:`_Py_SetProgramFullPath`" msgstr ":c:func:`_Py_SetProgramFullPath`" -#: ../../whatsnew/3.11.rst:2203 +#: ../../whatsnew/3.11.rst:2560 msgid "" "Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " "Configuration ` instead (:pep:`587`). (Contributed by Victor " "Stinner in :gh:`88279`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2207 +#: ../../whatsnew/3.11.rst:2564 msgid "" "Deprecate the ``ob_shash`` member of the :c:type:`PyBytesObject`. Use :c:" "func:`PyObject_Hash` instead. (Contributed by Inada Naoki in :issue:`46864`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2213 +#: ../../whatsnew/3.11.rst:2573 +msgid "" +"The following C APIs have been deprecated in earlier Python releases, and " +"will be removed in Python 3.12." +msgstr "" + +#: ../../whatsnew/3.11.rst:2576 +msgid ":c:func:`PyUnicode_AS_DATA`" +msgstr ":c:func:`PyUnicode_AS_DATA`" + +#: ../../whatsnew/3.11.rst:2577 +msgid ":c:func:`PyUnicode_AS_UNICODE`" +msgstr ":c:func:`PyUnicode_AS_UNICODE`" + +#: ../../whatsnew/3.11.rst:2578 +msgid ":c:func:`PyUnicode_AsUnicodeAndSize`" +msgstr ":c:func:`PyUnicode_AsUnicodeAndSize`" + +#: ../../whatsnew/3.11.rst:2579 +msgid ":c:func:`PyUnicode_AsUnicode`" +msgstr ":c:func:`PyUnicode_AsUnicode`" + +#: ../../whatsnew/3.11.rst:2580 +msgid ":c:func:`PyUnicode_FromUnicode`" +msgstr ":c:func:`PyUnicode_FromUnicode`" + +#: ../../whatsnew/3.11.rst:2581 +msgid ":c:func:`PyUnicode_GET_DATA_SIZE`" +msgstr ":c:func:`PyUnicode_GET_DATA_SIZE`" + +#: ../../whatsnew/3.11.rst:2582 +msgid ":c:func:`PyUnicode_GET_SIZE`" +msgstr ":c:func:`PyUnicode_GET_SIZE`" + +#: ../../whatsnew/3.11.rst:2583 +msgid ":c:func:`PyUnicode_GetSize`" +msgstr ":c:func:`PyUnicode_GetSize`" + +#: ../../whatsnew/3.11.rst:2584 +msgid ":c:func:`PyUnicode_IS_COMPACT`" +msgstr ":c:func:`PyUnicode_IS_COMPACT`" + +#: ../../whatsnew/3.11.rst:2585 +msgid ":c:func:`PyUnicode_IS_READY`" +msgstr ":c:func:`PyUnicode_IS_READY`" + +#: ../../whatsnew/3.11.rst:2586 +msgid ":c:func:`PyUnicode_READY`" +msgstr ":c:func:`PyUnicode_READY`" + +#: ../../whatsnew/3.11.rst:2587 +msgid ":c:func:`Py_UNICODE_WSTR_LENGTH`" +msgstr ":c:func:`Py_UNICODE_WSTR_LENGTH`" + +#: ../../whatsnew/3.11.rst:2588 +msgid ":c:func:`_PyUnicode_AsUnicode`" +msgstr ":c:func:`_PyUnicode_AsUnicode`" + +#: ../../whatsnew/3.11.rst:2589 +msgid ":c:macro:`PyUnicode_WCHAR_KIND`" +msgstr ":c:macro:`PyUnicode_WCHAR_KIND`" + +#: ../../whatsnew/3.11.rst:2590 +msgid ":c:type:`PyUnicodeObject`" +msgstr ":c:type:`PyUnicodeObject`" + +#: ../../whatsnew/3.11.rst:2591 +msgid ":c:func:`PyUnicode_InternImmortal()`" +msgstr ":c:func:`PyUnicode_InternImmortal()`" + +#: ../../whatsnew/3.11.rst:2599 msgid "" ":c:func:`PyFrame_BlockSetup` and :c:func:`PyFrame_BlockPop` have been " "removed. (Contributed by Mark Shannon in :issue:`40222`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2217 +#: ../../whatsnew/3.11.rst:2603 msgid "Remove the following math macros using the ``errno`` variable:" msgstr "" -#: ../../whatsnew/3.11.rst:2219 +#: ../../whatsnew/3.11.rst:2605 msgid "``Py_ADJUST_ERANGE1()``" msgstr "``Py_ADJUST_ERANGE1()``" -#: ../../whatsnew/3.11.rst:2220 +#: ../../whatsnew/3.11.rst:2606 msgid "``Py_ADJUST_ERANGE2()``" msgstr "``Py_ADJUST_ERANGE2()``" -#: ../../whatsnew/3.11.rst:2221 +#: ../../whatsnew/3.11.rst:2607 msgid "``Py_OVERFLOWED()``" msgstr "``Py_OVERFLOWED()``" -#: ../../whatsnew/3.11.rst:2222 +#: ../../whatsnew/3.11.rst:2608 msgid "``Py_SET_ERANGE_IF_OVERFLOW()``" msgstr "``Py_SET_ERANGE_IF_OVERFLOW()``" -#: ../../whatsnew/3.11.rst:2223 +#: ../../whatsnew/3.11.rst:2609 msgid "``Py_SET_ERRNO_ON_MATH_ERROR()``" msgstr "``Py_SET_ERRNO_ON_MATH_ERROR()``" -#: ../../whatsnew/3.11.rst:2225 +#: ../../whatsnew/3.11.rst:2611 msgid "(Contributed by Victor Stinner in :issue:`45412`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2227 +#: ../../whatsnew/3.11.rst:2613 msgid "" "Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated " "since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()`` " @@ -3501,62 +4033,62 @@ msgid "" "(Contributed by Victor Stinner in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2232 +#: ../../whatsnew/3.11.rst:2618 msgid "" "Remove the ``pystrhex.h`` header file. It only contains private functions. C " "extensions should only include the main ```` header file. " "(Contributed by Victor Stinner in :issue:`45434`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2236 +#: ../../whatsnew/3.11.rst:2622 msgid "" "Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the " "``Py_IS_INFINITY()`` macro. (Contributed by Victor Stinner in :issue:" "`45440`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2240 +#: ../../whatsnew/3.11.rst:2626 msgid "" "The following items are no longer available when :c:macro:`Py_LIMITED_API` " "is defined:" msgstr "" -#: ../../whatsnew/3.11.rst:2243 +#: ../../whatsnew/3.11.rst:2629 msgid ":c:func:`PyMarshal_WriteLongToFile`" msgstr ":c:func:`PyMarshal_WriteLongToFile`" -#: ../../whatsnew/3.11.rst:2244 +#: ../../whatsnew/3.11.rst:2630 msgid ":c:func:`PyMarshal_WriteObjectToFile`" msgstr ":c:func:`PyMarshal_WriteObjectToFile`" -#: ../../whatsnew/3.11.rst:2245 +#: ../../whatsnew/3.11.rst:2631 msgid ":c:func:`PyMarshal_ReadObjectFromString`" msgstr ":c:func:`PyMarshal_ReadObjectFromString`" -#: ../../whatsnew/3.11.rst:2246 +#: ../../whatsnew/3.11.rst:2632 msgid ":c:func:`PyMarshal_WriteObjectToString`" msgstr ":c:func:`PyMarshal_WriteObjectToString`" -#: ../../whatsnew/3.11.rst:2247 +#: ../../whatsnew/3.11.rst:2633 msgid "the ``Py_MARSHAL_VERSION`` macro" msgstr "``Py_MARSHAL_VERSION`` 巨集" -#: ../../whatsnew/3.11.rst:2249 +#: ../../whatsnew/3.11.rst:2635 msgid "These are not part of the :ref:`limited API `." msgstr "" -#: ../../whatsnew/3.11.rst:2251 +#: ../../whatsnew/3.11.rst:2637 msgid "(Contributed by Victor Stinner in :issue:`45474`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2253 +#: ../../whatsnew/3.11.rst:2639 msgid "" "Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never " "worked since the :c:type:`PyWeakReference` structure is opaque in the " "limited C API. (Contributed by Victor Stinner in :issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2258 +#: ../../whatsnew/3.11.rst:2644 msgid "" "Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed in the public " "C API by mistake, it must only be used by Python internally. Use the " @@ -3564,77 +4096,143 @@ msgid "" "in :issue:`40170`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2263 +#: ../../whatsnew/3.11.rst:2649 msgid "" "Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the internal C " "API). (Contributed by Victor Stinner in :issue:`45412`.)" msgstr "" -#: ../../whatsnew/3.11.rst:2267 +#: ../../whatsnew/3.11.rst:2655 msgid "" "Remove the :c:type:`Py_UNICODE` encoder APIs, as they have been deprecated " "since Python 3.3, are little used and are inefficient relative to the " "recommended alternatives." msgstr "" -#: ../../whatsnew/3.11.rst:2272 +#: ../../whatsnew/3.11.rst:2660 msgid "The removed functions are:" msgstr "" -#: ../../whatsnew/3.11.rst:2274 +#: ../../whatsnew/3.11.rst:2662 msgid ":func:`!PyUnicode_Encode`" msgstr ":func:`!PyUnicode_Encode`" -#: ../../whatsnew/3.11.rst:2275 +#: ../../whatsnew/3.11.rst:2663 msgid ":func:`!PyUnicode_EncodeASCII`" msgstr ":func:`!PyUnicode_EncodeASCII`" -#: ../../whatsnew/3.11.rst:2276 +#: ../../whatsnew/3.11.rst:2664 msgid ":func:`!PyUnicode_EncodeLatin1`" msgstr ":func:`!PyUnicode_EncodeLatin1`" -#: ../../whatsnew/3.11.rst:2277 +#: ../../whatsnew/3.11.rst:2665 msgid ":func:`!PyUnicode_EncodeUTF7`" msgstr ":func:`!PyUnicode_EncodeUTF7`" -#: ../../whatsnew/3.11.rst:2278 +#: ../../whatsnew/3.11.rst:2666 msgid ":func:`!PyUnicode_EncodeUTF8`" msgstr ":func:`!PyUnicode_EncodeUTF8`" -#: ../../whatsnew/3.11.rst:2279 +#: ../../whatsnew/3.11.rst:2667 msgid ":func:`!PyUnicode_EncodeUTF16`" msgstr ":func:`!PyUnicode_EncodeUTF16`" -#: ../../whatsnew/3.11.rst:2280 +#: ../../whatsnew/3.11.rst:2668 msgid ":func:`!PyUnicode_EncodeUTF32`" msgstr ":func:`!PyUnicode_EncodeUTF32`" -#: ../../whatsnew/3.11.rst:2281 +#: ../../whatsnew/3.11.rst:2669 msgid ":func:`!PyUnicode_EncodeUnicodeEscape`" msgstr ":func:`!PyUnicode_EncodeUnicodeEscape`" -#: ../../whatsnew/3.11.rst:2282 +#: ../../whatsnew/3.11.rst:2670 msgid ":func:`!PyUnicode_EncodeRawUnicodeEscape`" msgstr ":func:`!PyUnicode_EncodeRawUnicodeEscape`" -#: ../../whatsnew/3.11.rst:2283 +#: ../../whatsnew/3.11.rst:2671 msgid ":func:`!PyUnicode_EncodeCharmap`" msgstr ":func:`!PyUnicode_EncodeCharmap`" -#: ../../whatsnew/3.11.rst:2284 +#: ../../whatsnew/3.11.rst:2672 msgid ":func:`!PyUnicode_TranslateCharmap`" msgstr ":func:`!PyUnicode_TranslateCharmap`" -#: ../../whatsnew/3.11.rst:2285 +#: ../../whatsnew/3.11.rst:2673 msgid ":func:`!PyUnicode_EncodeDecimal`" msgstr ":func:`!PyUnicode_EncodeDecimal`" -#: ../../whatsnew/3.11.rst:2286 +#: ../../whatsnew/3.11.rst:2674 msgid ":func:`!PyUnicode_TransformDecimalToASCII`" msgstr ":func:`!PyUnicode_TransformDecimalToASCII`" -#: ../../whatsnew/3.11.rst:2288 +#: ../../whatsnew/3.11.rst:2676 msgid "" "See :pep:`624` for details and :pep:`migration guidance <624#alternative-" "apis>`. (Contributed by Inada Naoki in :issue:`44029`.)" msgstr "" + +#~ msgid ":func:`unittest.findTestCases`" +#~ msgstr ":func:`unittest.findTestCases`" + +#~ msgid ":func:`unittest.makeSuite`" +#~ msgstr ":func:`unittest.makeSuite`" + +#~ msgid ":func:`unittest.getTestCaseNames`" +#~ msgstr ":func:`unittest.getTestCaseNames`" + +#~ msgid "Use :class:`~unittest.TestLoader` method instead:" +#~ msgstr "改用 :class:`~unittest.TestLoader`:" + +#~ msgid "the :class:`configparser.SafeConfigParser` class" +#~ msgstr ":class:`configparser.SafeConfigParser` class" + +#~ msgid "the :attr:`configparser.ParsingError.filename` property" +#~ msgstr ":attr:`configparser.ParsingError.filename` 特性" + +#~ msgid ":envvar:`PYTHONTHREADDEBUG`" +#~ msgstr ":envvar:`PYTHONTHREADDEBUG`" + +#~ msgid ":func:`importlib.util.set_loader_wrapper`" +#~ msgstr ":func:`importlib.util.set_loader_wrapper`" + +#~ msgid ":func:`importlib.util.set_package_wrapper`" +#~ msgstr ":func:`importlib.util.set_package_wrapper`" + +#~ msgid ":meth:`importlib.abc.Loadermodule_repr`" +#~ msgstr ":meth:`importlib.abc.Loadermodule_repr`" + +#~ msgid ":meth:`importlib.machinery.BuiltinImporter.find_module`" +#~ msgstr ":meth:`importlib.machinery.BuiltinImporter.find_module`" + +#~ msgid ":meth:`importlib.machinery.BuiltinLoader.module_repr`" +#~ msgstr ":meth:`importlib.machinery.BuiltinLoader.module_repr`" + +#~ msgid ":meth:`importlib.machinery.FileFinder.find_loader`" +#~ msgstr ":meth:`importlib.machinery.FileFinder.find_loader`" + +#~ msgid ":meth:`importlib.machinery.FileFinder.find_module`" +#~ msgstr ":meth:`importlib.machinery.FileFinder.find_module`" + +#~ msgid ":meth:`importlib.machinery.FrozenImporter.find_module`" +#~ msgstr ":meth:`importlib.machinery.FrozenImporter.find_module`" + +#~ msgid ":meth:`importlib.machinery.FrozenLoader.module_repr`" +#~ msgstr ":meth:`importlib.machinery.FrozenLoader.module_repr`" + +#~ msgid ":meth:`importlib.machinery.WindowsRegistryFinder.find_module`" +#~ msgstr ":meth:`importlib.machinery.WindowsRegistryFinder.find_module`" + +#~ msgid ":func:`cgi.log`" +#~ msgstr ":func:`cgi.log`" + +#~ msgid ":func:`sqlite3.OptimizedUnicode`" +#~ msgstr ":func:`sqlite3.OptimizedUnicode`" + +#~ msgid ":func:`sqlite3.enable_shared_cache`" +#~ msgstr ":func:`sqlite3.enable_shared_cache`" + +#~ msgid "``a2b_hqx()``, ``b2a_hqx()``;" +#~ msgstr "``a2b_hqx()``, ``b2a_hqx()``;" + +#~ msgid "``rlecode_hqx()``, ``rledecode_hqx()``." +#~ msgstr "``rlecode_hqx()``, ``rledecode_hqx()``." diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 5699f73d83..f4bc1a9565 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1929,7 +1929,7 @@ msgid "" "instead of module names for running specific tests (:issue:`10620`). The " "new test discovery can find tests within packages, locating any test " "importable from the top-level directory. The top-level directory can be " -"specified with the `-t` option, a pattern for matching files with ``-p``, " +"specified with the ``-t`` option, a pattern for matching files with ``-p``, " "and a directory to start discovery with ``-s``:" msgstr "" @@ -2110,7 +2110,7 @@ msgstr "asyncore" #: ../../whatsnew/3.2.rst:1859 msgid "" ":class:`asyncore.dispatcher` now provides a :meth:`~asyncore.dispatcher." -"handle_accepted()` method returning a `(sock, addr)` pair which is called " +"handle_accepted()` method returning a ``(sock, addr)`` pair which is called " "when a connection has actually been established with a new remote endpoint. " "This is supposed to be used as a replacement for old :meth:`~asyncore." "dispatcher.handle_accept()` and avoids the user to call :meth:`~asyncore." diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 3dcb10efa9..e3234c5200 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3655,11 +3655,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:2392 msgid "" -":class:`importlib.abc.Finder` no longer specifies a `find_module()` abstract " -"method that must be implemented. If you were relying on subclasses to " -"implement that method, make sure to check for the method's existence first. " -"You will probably want to check for `find_loader()` first, though, in the " -"case of working with :term:`path entry finders `." +":class:`importlib.abc.Finder` no longer specifies a ``find_module()`` " +"abstract method that must be implemented. If you were relying on subclasses " +"to implement that method, make sure to check for the method's existence " +"first. You will probably want to check for ``find_loader()`` first, though, " +"in the case of working with :term:`path entry finders `." msgstr "" #: ../../whatsnew/3.3.rst:2398 diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index 8d0fa92fe2..48e92b7d51 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-28 00:27+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3213,12 +3213,12 @@ msgid "" "optional ``opt-`` tag in ``.pyc`` file names. The :func:`importlib.util." "cache_from_source` has gained an *optimization* parameter to help control " "the ``opt-`` tag. Because of this, the *debug_override* parameter of the " -"function is now deprecated. `.pyo` files are also no longer supported as a " +"function is now deprecated. ``.pyo`` files are also no longer supported as a " "file argument to the Python interpreter and thus serve no purpose when " "distributed on their own (i.e. sourceless code distribution). Due to the " -"fact that the magic number for bytecode has changed in Python 3.5, all old `." -"pyo` files from previous versions of Python are invalid regardless of this " -"PEP." +"fact that the magic number for bytecode has changed in Python 3.5, all old " +"``.pyo`` files from previous versions of Python are invalid regardless of " +"this PEP." msgstr "" #: ../../whatsnew/3.5.rst:2479 diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 0a0f2021db..d67eb574cf 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -1139,7 +1139,7 @@ msgid "" "Hettinger in :issue:`17941`.)" msgstr "" -#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2279 +#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2281 msgid "" "The *verbose* and *rename* arguments for :func:`~collections.namedtuple` are " "now keyword-only. (Contributed by Raymond Hettinger in :issue:`25628`.)" @@ -1171,8 +1171,8 @@ msgstr "contextlib" msgid "" "The :class:`contextlib.AbstractContextManager` class has been added to " "provide an abstract base class for context managers. It provides a sensible " -"default implementation for `__enter__()` which returns ``self`` and leaves " -"`__exit__()` an abstract method. A matching class has been added to the :" +"default implementation for ``__enter__()`` which returns ``self`` and leaves " +"``__exit__()`` an abstract method. A matching class has been added to the :" "mod:`typing` module as :class:`typing.ContextManager`. (Contributed by Brett " "Cannon in :issue:`25609`.)" msgstr "" @@ -1767,7 +1767,7 @@ msgstr "site" #: ../../whatsnew/3.6.rst:1391 msgid "" -"When specifying paths to add to :attr:`sys.path` in a `.pth` file, you may " +"When specifying paths to add to :attr:`sys.path` in a ``.pth`` file, you may " "now specify file paths on top of directories (e.g. zip files). (Contributed " "by Wolfgang Langner in :issue:`26587`)." msgstr "" @@ -2160,7 +2160,7 @@ msgid "" "in :issue:`16099`.)" msgstr "" -#: ../../whatsnew/3.6.rst:1687 ../../whatsnew/3.6.rst:2056 +#: ../../whatsnew/3.6.rst:1687 ../../whatsnew/3.6.rst:2058 msgid "venv" msgstr "venv" @@ -2667,7 +2667,7 @@ msgid "" "should use :mod:`tkinter.ttk` instead." msgstr "" -#: ../../whatsnew/3.6.rst:2058 +#: ../../whatsnew/3.6.rst:2060 msgid "" "The ``pyvenv`` script has been deprecated in favour of ``python3 -m venv``. " "This prevents confusion as to what Python interpreter ``pyvenv`` is " @@ -2675,11 +2675,11 @@ msgid "" "environment. (Contributed by Brett Cannon in :issue:`25154`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2065 +#: ../../whatsnew/3.6.rst:2067 msgid "Deprecated functions and types of the C API" msgstr "" -#: ../../whatsnew/3.6.rst:2067 +#: ../../whatsnew/3.6.rst:2069 msgid "" "Undocumented functions :c:func:`PyUnicode_AsEncodedObject`, :c:func:" "`PyUnicode_AsDecodedObject`, :c:func:`PyUnicode_AsEncodedUnicode` and :c:" @@ -2687,11 +2687,11 @@ msgid "" "codec based API ` instead." msgstr "" -#: ../../whatsnew/3.6.rst:2074 +#: ../../whatsnew/3.6.rst:2076 msgid "Deprecated Build Options" msgstr "" -#: ../../whatsnew/3.6.rst:2076 +#: ../../whatsnew/3.6.rst:2078 msgid "" "The ``--with-system-ffi`` configure flag is now on by default on non-macOS " "UNIX platforms. It may be disabled by using ``--without-system-ffi``, but " @@ -2700,15 +2700,15 @@ msgid "" "the ``--with-system-ffi`` flag when building their system Python." msgstr "" -#: ../../whatsnew/3.6.rst:2084 +#: ../../whatsnew/3.6.rst:2086 msgid "Removed" msgstr "" -#: ../../whatsnew/3.6.rst:2087 +#: ../../whatsnew/3.6.rst:2089 msgid "API and Feature Removals" msgstr "" -#: ../../whatsnew/3.6.rst:2089 +#: ../../whatsnew/3.6.rst:2091 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter in regular " "expressions will now cause an error. In replacement templates for :func:`re." @@ -2716,14 +2716,14 @@ msgid "" "now only be used with binary patterns." msgstr "" -#: ../../whatsnew/3.6.rst:2094 +#: ../../whatsnew/3.6.rst:2096 msgid "" "``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3). :" "func:`inspect.getmodulename` should be used for obtaining the module name " "for a given path. (Contributed by Yury Selivanov in :issue:`13248`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2099 +#: ../../whatsnew/3.6.rst:2101 msgid "" "``traceback.Ignore`` class and ``traceback.usage``, ``traceback.modname``, " "``traceback.fullmodname``, ``traceback.find_lines_from_code``, ``traceback." @@ -2733,14 +2733,14 @@ msgid "" "equivalent functionality is available from private methods." msgstr "" -#: ../../whatsnew/3.6.rst:2106 +#: ../../whatsnew/3.6.rst:2108 msgid "" "The ``tk_menuBar()`` and ``tk_bindForTraversal()`` dummy methods in :mod:" "`tkinter` widget classes were removed (corresponding Tk commands were " "obsolete since Tk 4.0)." msgstr "" -#: ../../whatsnew/3.6.rst:2110 +#: ../../whatsnew/3.6.rst:2112 msgid "" "The :meth:`~zipfile.ZipFile.open` method of the :class:`zipfile.ZipFile` " "class no longer supports the ``'U'`` mode (was deprecated since Python 3.4). " @@ -2748,7 +2748,7 @@ msgid "" "`universal newlines` mode." msgstr "" -#: ../../whatsnew/3.6.rst:2115 +#: ../../whatsnew/3.6.rst:2117 msgid "" "The undocumented ``IN``, ``CDROM``, ``DLFCN``, ``TYPES``, ``CDIO``, and " "``STROPTS`` modules have been removed. They had been available in the " @@ -2759,25 +2759,25 @@ msgid "" "blob/v3.6.15/Tools/scripts/h2py.py>`_." msgstr "" -#: ../../whatsnew/3.6.rst:2123 +#: ../../whatsnew/3.6.rst:2125 msgid "The deprecated ``asynchat.fifo`` class has been removed." msgstr "" -#: ../../whatsnew/3.6.rst:2127 +#: ../../whatsnew/3.6.rst:2129 msgid "Porting to Python 3.6" msgstr "" -#: ../../whatsnew/3.6.rst:2129 +#: ../../whatsnew/3.6.rst:2131 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.6.rst:2133 +#: ../../whatsnew/3.6.rst:2135 msgid "Changes in 'python' Command Behavior" msgstr "" -#: ../../whatsnew/3.6.rst:2135 +#: ../../whatsnew/3.6.rst:2137 msgid "" "The output of a special Python build with defined ``COUNT_ALLOCS``, " "``SHOW_ALLOC_COUNT`` or ``SHOW_TRACK_COUNT`` macros is now off by default. " @@ -2786,42 +2786,42 @@ msgid "" "issue:`23034`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2143 +#: ../../whatsnew/3.6.rst:2145 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.6.rst:2145 +#: ../../whatsnew/3.6.rst:2147 msgid "" ":func:`open() ` will no longer allow combining the ``'U'`` mode flag " "with ``'+'``. (Contributed by Jeff Balogh and John O'Connor in :issue:" "`2091`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2149 +#: ../../whatsnew/3.6.rst:2151 msgid "" ":mod:`sqlite3` no longer implicitly commits an open transaction before DDL " "statements." msgstr "" -#: ../../whatsnew/3.6.rst:2152 +#: ../../whatsnew/3.6.rst:2154 msgid "" "On Linux, :func:`os.urandom` now blocks until the system urandom entropy " "pool is initialized to increase the security." msgstr "" -#: ../../whatsnew/3.6.rst:2155 +#: ../../whatsnew/3.6.rst:2157 msgid "" "When :meth:`importlib.abc.Loader.exec_module` is defined, :meth:`importlib." "abc.Loader.create_module` must also be defined." msgstr "" -#: ../../whatsnew/3.6.rst:2158 +#: ../../whatsnew/3.6.rst:2160 msgid "" ":c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** " "argument is not set. Previously only ``NULL`` was returned." msgstr "" -#: ../../whatsnew/3.6.rst:2161 +#: ../../whatsnew/3.6.rst:2163 msgid "" "The format of the ``co_lnotab`` attribute of code objects changed to support " "a negative line number delta. By default, Python does not emit bytecode with " @@ -2834,7 +2834,7 @@ msgid "" "see the :pep:`511` for the rationale." msgstr "" -#: ../../whatsnew/3.6.rst:2171 +#: ../../whatsnew/3.6.rst:2173 msgid "" "The functions in the :mod:`compileall` module now return booleans instead of " "``1`` or ``0`` to represent success or failure, respectively. Thanks to " @@ -2842,7 +2842,7 @@ msgid "" "were doing identity checks for ``1`` or ``0``. See :issue:`25768`." msgstr "" -#: ../../whatsnew/3.6.rst:2176 +#: ../../whatsnew/3.6.rst:2178 msgid "" "Reading the :attr:`~urllib.parse.SplitResult.port` attribute of :func:" "`urllib.parse.urlsplit` and :func:`~urllib.parse.urlparse` results now " @@ -2850,13 +2850,13 @@ msgid "" "const:`None`. See :issue:`20059`." msgstr "" -#: ../../whatsnew/3.6.rst:2181 +#: ../../whatsnew/3.6.rst:2183 msgid "" "The :mod:`imp` module now raises a :exc:`DeprecationWarning` instead of :exc:" "`PendingDeprecationWarning`." msgstr "" -#: ../../whatsnew/3.6.rst:2184 +#: ../../whatsnew/3.6.rst:2186 msgid "" "The following modules have had missing APIs added to their :attr:`__all__` " "attributes to match the documented APIs: :mod:`calendar`, :mod:`cgi`, :mod:" @@ -2868,21 +2868,21 @@ msgid "" "Kołodziej in :issue:`23883`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2195 +#: ../../whatsnew/3.6.rst:2197 msgid "" "When performing a relative import, if ``__package__`` does not compare equal " "to ``__spec__.parent`` then :exc:`ImportWarning` is raised. (Contributed by " "Brett Cannon in :issue:`25791`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2199 +#: ../../whatsnew/3.6.rst:2201 msgid "" "When a relative import is performed and no parent package is known, then :" "exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be " "raised. (Contributed by Brett Cannon in :issue:`18018`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2203 +#: ../../whatsnew/3.6.rst:2205 msgid "" "Servers based on the :mod:`socketserver` module, including those defined in :" "mod:`http.server`, :mod:`xmlrpc.server` and :mod:`wsgiref.simple_server`, " @@ -2893,20 +2893,20 @@ msgid "" "(Contributed by Martin Panter in :issue:`23430`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2212 +#: ../../whatsnew/3.6.rst:2214 msgid "" ":func:`spwd.getspnam` now raises a :exc:`PermissionError` instead of :exc:" "`KeyError` if the user doesn't have privileges." msgstr "" -#: ../../whatsnew/3.6.rst:2215 +#: ../../whatsnew/3.6.rst:2217 msgid "" "The :meth:`socket.socket.close` method now raises an exception if an error " "(e.g. ``EBADF``) was reported by the underlying system call. (Contributed by " "Martin Panter in :issue:`26685`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2219 +#: ../../whatsnew/3.6.rst:2221 msgid "" "The *decode_data* argument for the :class:`smtpd.SMTPChannel` and :class:" "`smtpd.SMTPServer` constructors is now ``False`` by default. This means that " @@ -2916,7 +2916,7 @@ msgid "" "deprecation warning generated by 3.5 will not be affected." msgstr "" -#: ../../whatsnew/3.6.rst:2227 +#: ../../whatsnew/3.6.rst:2229 msgid "" "All optional arguments of the :func:`~json.dump`, :func:`~json.dumps`, :func:" "`~json.load` and :func:`~json.loads` functions and :class:`~json." @@ -2925,13 +2925,13 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`18726`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2234 +#: ../../whatsnew/3.6.rst:2236 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../whatsnew/3.6.rst:2237 +#: ../../whatsnew/3.6.rst:2239 msgid "" "As part of :pep:`487`, the handling of keyword arguments passed to :class:" "`type` (other than the metaclass hint, ``metaclass``) is now consistently " @@ -2943,7 +2943,7 @@ msgid "" "__new__` (whether direct or via :class:`super`) accordingly." msgstr "" -#: ../../whatsnew/3.6.rst:2246 +#: ../../whatsnew/3.6.rst:2248 msgid "" "In :class:`distutils.command.sdist.sdist`, the ``default_format`` attribute " "has been removed and is no longer honored. Instead, the gzipped tarfile " @@ -2953,13 +2953,13 @@ msgid "" "containing the following:" msgstr "" -#: ../../whatsnew/3.6.rst:2259 +#: ../../whatsnew/3.6.rst:2261 msgid "" "This behavior has also been backported to earlier Python versions by " "Setuptools 26.0.0." msgstr "" -#: ../../whatsnew/3.6.rst:2262 +#: ../../whatsnew/3.6.rst:2264 msgid "" "In the :mod:`urllib.request` module and the :meth:`http.client." "HTTPConnection.request` method, if no Content-Length header field has been " @@ -2970,47 +2970,47 @@ msgid "" "`12319`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2271 +#: ../../whatsnew/3.6.rst:2273 msgid "" "The :class:`~csv.DictReader` now returns rows of type :class:`~collections." "OrderedDict`. (Contributed by Steve Holden in :issue:`27842`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2275 +#: ../../whatsnew/3.6.rst:2277 msgid "" "The :const:`crypt.METHOD_CRYPT` will no longer be added to ``crypt.methods`` " "if unsupported by the platform. (Contributed by Victor Stinner in :issue:" "`25287`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2283 +#: ../../whatsnew/3.6.rst:2285 msgid "" "On Linux, :func:`ctypes.util.find_library` now looks in ``LD_LIBRARY_PATH`` " "for shared libraries. (Contributed by Vinay Sajip in :issue:`9998`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2287 +#: ../../whatsnew/3.6.rst:2289 msgid "" "The :class:`imaplib.IMAP4` class now handles flags containing the ``']'`` " "character in messages sent from the server to improve real-world " "compatibility. (Contributed by Lita Cho in :issue:`21815`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2292 +#: ../../whatsnew/3.6.rst:2294 msgid "" "The :func:`mmap.write() ` function now returns the number of " "bytes written like other write methods. (Contributed by Jakub Stasiak in :" "issue:`26335`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2296 +#: ../../whatsnew/3.6.rst:2298 msgid "" "The :func:`pkgutil.iter_modules` and :func:`pkgutil.walk_packages` functions " "now return :class:`~pkgutil.ModuleInfo` named tuples. (Contributed by " "Ramchandra Apte in :issue:`17211`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2300 +#: ../../whatsnew/3.6.rst:2302 msgid "" ":func:`re.sub` now raises an error for invalid numerical group references in " "replacement templates even if the pattern is not found in the string. The " @@ -3019,7 +3019,7 @@ msgid "" "in :issue:`25953`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2306 +#: ../../whatsnew/3.6.rst:2308 msgid "" ":class:`zipfile.ZipFile` will now raise :exc:`NotImplementedError` for " "unrecognized compression values. Previously a plain :exc:`RuntimeError` was " @@ -3029,7 +3029,7 @@ msgid "" "`RuntimeError` was raised in those scenarios." msgstr "" -#: ../../whatsnew/3.6.rst:2313 +#: ../../whatsnew/3.6.rst:2315 msgid "" "when custom metaclasses are combined with zero-argument :func:`super` or " "direct references from methods to the implicit ``__class__`` closure " @@ -3039,7 +3039,7 @@ msgid "" "Python 3.8." msgstr "" -#: ../../whatsnew/3.6.rst:2320 +#: ../../whatsnew/3.6.rst:2322 msgid "" "With the introduction of :exc:`ModuleNotFoundError`, import system consumers " "may start expecting import system replacements to raise that more specific " @@ -3052,11 +3052,11 @@ msgid "" "the default import system will raise the new subclass when appropriate." msgstr "" -#: ../../whatsnew/3.6.rst:2332 +#: ../../whatsnew/3.6.rst:2334 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.6.rst:2334 +#: ../../whatsnew/3.6.rst:2336 msgid "" "The :c:func:`PyMem_Malloc` allocator family now uses the :ref:`pymalloc " "allocator ` rather than the system :c:func:`malloc`. Applications " @@ -3065,29 +3065,29 @@ msgid "" "usage of memory allocators in your application. See :issue:`26249`." msgstr "" -#: ../../whatsnew/3.6.rst:2340 +#: ../../whatsnew/3.6.rst:2342 msgid "" ":c:func:`Py_Exit` (and the main interpreter) now override the exit status " "with 120 if flushing buffered data failed. See :issue:`5319`." msgstr "" -#: ../../whatsnew/3.6.rst:2345 +#: ../../whatsnew/3.6.rst:2347 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.6.rst:2347 +#: ../../whatsnew/3.6.rst:2349 msgid "" "There have been several major changes to the :term:`bytecode` in Python 3.6." msgstr "" -#: ../../whatsnew/3.6.rst:2349 +#: ../../whatsnew/3.6.rst:2351 msgid "" "The Python interpreter now uses a 16-bit wordcode instead of bytecode. " "(Contributed by Demur Rumed with input and reviews from Serhiy Storchaka and " "Victor Stinner in :issue:`26647` and :issue:`28050`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2353 +#: ../../whatsnew/3.6.rst:2355 msgid "" "The new :opcode:`FORMAT_VALUE` and :opcode:`BUILD_STRING` opcodes as part of " "the :ref:`formatted string literal ` implementation. " @@ -3095,14 +3095,14 @@ msgid "" "`27078`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2358 +#: ../../whatsnew/3.6.rst:2360 msgid "" "The new :opcode:`BUILD_CONST_KEY_MAP` opcode to optimize the creation of " "dictionaries with constant keys. (Contributed by Serhiy Storchaka in :issue:" "`27140`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2362 +#: ../../whatsnew/3.6.rst:2364 msgid "" "The function call opcodes have been heavily reworked for better performance " "and simpler implementation. The :opcode:`MAKE_FUNCTION`, :opcode:" @@ -3114,22 +3114,22 @@ msgid "" "issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2373 +#: ../../whatsnew/3.6.rst:2375 msgid "" "The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes " "have been added to support the new :term:`variable annotation` syntax. " "(Contributed by Ivan Levkivskyi in :issue:`27985`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2379 +#: ../../whatsnew/3.6.rst:2381 msgid "Notable changes in Python 3.6.2" msgstr "" -#: ../../whatsnew/3.6.rst:2382 +#: ../../whatsnew/3.6.rst:2384 msgid "New ``make regen-all`` build target" msgstr "" -#: ../../whatsnew/3.6.rst:2384 +#: ../../whatsnew/3.6.rst:2386 msgid "" "To simplify cross-compilation, and to ensure that CPython can reliably be " "compiled without requiring an existing version of Python to already be " @@ -3137,43 +3137,43 @@ msgid "" "recompile generated files based on file modification times." msgstr "" -#: ../../whatsnew/3.6.rst:2389 +#: ../../whatsnew/3.6.rst:2391 msgid "" "Instead, a new ``make regen-all`` command has been added to force " "regeneration of these files when desired (e.g. after an initial version of " "Python has already been built based on the pregenerated versions)." msgstr "" -#: ../../whatsnew/3.6.rst:2393 +#: ../../whatsnew/3.6.rst:2395 msgid "" "More selective regeneration targets are also defined - see :source:`Makefile." "pre.in` for details." msgstr "" -#: ../../whatsnew/3.6.rst:2396 ../../whatsnew/3.6.rst:2409 +#: ../../whatsnew/3.6.rst:2398 ../../whatsnew/3.6.rst:2411 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2402 +#: ../../whatsnew/3.6.rst:2404 msgid "Removal of ``make touch`` build target" msgstr "" -#: ../../whatsnew/3.6.rst:2404 +#: ../../whatsnew/3.6.rst:2406 msgid "" "The ``make touch`` build target previously used to request implicit " "regeneration of generated files by updating their modification times has " "been removed." msgstr "" -#: ../../whatsnew/3.6.rst:2407 +#: ../../whatsnew/3.6.rst:2409 msgid "It has been replaced by the new ``make regen-all`` target." msgstr "" -#: ../../whatsnew/3.6.rst:2415 +#: ../../whatsnew/3.6.rst:2417 msgid "Notable changes in Python 3.6.4" msgstr "" -#: ../../whatsnew/3.6.rst:2417 +#: ../../whatsnew/3.6.rst:2419 msgid "" "The ``PyExc_RecursionErrorInst`` singleton that was part of the public API " "has been removed as its members being never cleared may cause a segfault " @@ -3181,22 +3181,22 @@ msgid "" "issue:`22898` and :issue:`30697`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2424 +#: ../../whatsnew/3.6.rst:2426 msgid "Notable changes in Python 3.6.5" msgstr "" -#: ../../whatsnew/3.6.rst:2426 +#: ../../whatsnew/3.6.rst:2428 msgid "" "The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE`` " "locale to the ``LC_NUMERIC`` locale in some cases. (Contributed by Victor " "Stinner in :issue:`31900`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2431 +#: ../../whatsnew/3.6.rst:2433 msgid "Notable changes in Python 3.6.7" msgstr "" -#: ../../whatsnew/3.6.rst:2433 +#: ../../whatsnew/3.6.rst:2435 msgid "" "In 3.6.7 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " "when provided with input that does not have a trailing new line. This " @@ -3204,11 +3204,11 @@ msgid "" "Ammar Askar in :issue:`33899`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2439 +#: ../../whatsnew/3.6.rst:2441 msgid "Notable changes in Python 3.6.10" msgstr "" -#: ../../whatsnew/3.6.rst:2441 +#: ../../whatsnew/3.6.rst:2443 msgid "" "Due to significant security concerns, the *reuse_address* parameter of :meth:" "`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " @@ -3218,11 +3218,11 @@ msgid "" "`37228`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2449 +#: ../../whatsnew/3.6.rst:2451 msgid "Notable changes in Python 3.6.13" msgstr "" -#: ../../whatsnew/3.6.rst:2451 +#: ../../whatsnew/3.6.rst:2453 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 0fcf84e000..e811b6763c 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3511,7 +3511,7 @@ msgstr "" msgid "" ":c:func:`PySys_AddWarnOptionUnicode` is not currently usable by embedding " "applications due to the requirement to create a Unicode object prior to " -"calling `Py_Initialize`. Use :c:func:`PySys_AddWarnOption` instead." +"calling ``Py_Initialize``. Use :c:func:`PySys_AddWarnOption` instead." msgstr "" #: ../../whatsnew/3.7.rst:2502 diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 3badd29d9a..fe32a89acc 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -106,8 +106,8 @@ msgid "" "There is a new function parameter syntax ``/`` to indicate that some " "function parameters must be specified positionally and cannot be used as " "keyword arguments. This is the same notation shown by ``help()`` for C " -"functions annotated with Larry Hastings' `Argument Clinic `_ tool." +"functions annotated with Larry Hastings' :ref:`Argument Clinic ` tool." msgstr "" #: ../../whatsnew/3.8.rst:128 diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 2a67c01462..c436caf514 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2022-10-31 08:13+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-" @@ -730,8 +730,8 @@ msgstr "" #: ../../whatsnew/3.9.rst:503 msgid "" -"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and " -"Terry Jan Reedy in :issue:`45447`.)" +"Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " +"and Terry Jan Reedy in :issue:`45447`.)" msgstr "" #: ../../whatsnew/3.9.rst:507