diff --git a/c-api/allocation.po b/c-api/allocation.po index 7c61158b1c9..7fd72fde6d2 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2016-01-31 07:06+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -24,7 +24,7 @@ msgstr "" #: ../../c-api/allocation.rst:17 msgid "" -"Initialize a newly-allocated object *op* with its type and initial " +"Initialize a newly allocated object *op* with its type and initial " "reference. Returns the initialized object. If *type* indicates that the " "object participates in the cyclic garbage detector, it is added to the " "detector's set of observed objects. Other fields of the object are not " diff --git a/c-api/intro.po b/c-api/intro.po index 11a04e60883..9b48ef67cd4 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -705,7 +705,7 @@ msgid "" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " "available that support tracing of reference counts, debugging the memory " "allocator, or low-level profiling of the main interpreter loop. Only the " -"most frequently-used builds will be described in the remainder of this " +"most frequently used builds will be described in the remainder of this " "section." msgstr "" diff --git a/c-api/memory.po b/c-api/memory.po index be72772543e..1ba8e67a73d 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-08 00:15+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -87,7 +87,7 @@ msgid "" "extended with new object types written in C. Another reason for using the " "Python heap is the desire to *inform* the Python memory manager about the " "memory needs of the extension module. Even when the requested memory is used " -"exclusively for internal, highly-specific purposes, delegating all memory " +"exclusively for internal, highly specific purposes, delegating all memory " "requests to the Python memory manager causes the interpreter to have a more " "accurate image of its memory footprint as a whole. Consequently, under " "certain circumstances, the Python memory manager may or may not trigger " diff --git a/c-api/typeobj.po b/c-api/typeobj.po index c719140aef8..c193bf5b0b7 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-27 00:16+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1241,7 +1241,7 @@ msgid "" "``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects " "`, these fields always remain ``NULL``. For :ref:`dynamically " "allocated objects `, these two fields are used to link the " -"object into a doubly-linked list of *all* live objects on the heap." +"object into a doubly linked list of *all* live objects on the heap." msgstr "" #: ../../c-api/typeobj.rst:534 diff --git a/c-api/weakref.po b/c-api/weakref.po index 19c83e28bce..091a449530a 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -54,7 +54,7 @@ msgid "" "a callable object that receives notification when *ob* is garbage collected; " "it should accept a single parameter, which will be the weak reference object " "itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " -"weakly-referencable object, or if *callback* is not callable, ``None``, or " +"weakly referencable object, or if *callback* is not callable, ``None``, or " "``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." msgstr "" @@ -66,7 +66,7 @@ msgid "" "can be a callable object that receives notification when *ob* is garbage " "collected; it should accept a single parameter, which will be the weak " "reference object itself. *callback* may also be ``None`` or ``NULL``. If " -"*ob* is not a weakly-referencable object, or if *callback* is not callable, " +"*ob* is not a weakly referencable object, or if *callback* is not callable, " "``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." msgstr "" diff --git a/distutils/apiref.po b/distutils/apiref.po index 82ea1a51d95..2681889597b 100644 --- a/distutils/apiref.po +++ b/distutils/apiref.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:33+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1665,7 +1665,7 @@ msgstr "" #: ../../distutils/apiref.rst:1201 msgid "" -"Note that this is not a fully-fledged string interpolation function. A valid " +"Note that this is not a full-fledged string interpolation function. A valid " "``$variable`` can consist only of upper and lower case letters, numbers and " "an underscore. No { } or ( ) style quoting is available." msgstr "" diff --git a/extending/building.po b/extending/building.po index 354c39d25b1..b2950e6ec71 100644 --- a/extending/building.po +++ b/extending/building.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -42,7 +42,7 @@ msgstr "" #: ../../extending/building.rst:20 msgid "" -"It returns either a fully-initialized module, or a :c:type:`PyModuleDef` " +"It returns either a fully initialized module, or a :c:type:`PyModuleDef` " "instance. See :ref:`initializing-modules` for details." msgstr "" diff --git a/extending/newtypes.po b/extending/newtypes.po index ee63c0dbae3..0e42b4832c8 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-03 13:29+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -160,7 +160,7 @@ msgstr "" msgid "" "If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the " "interpreter will supply a representation that uses the type's :c:member:" -"`~PyTypeObject.tp_name` and a uniquely-identifying value for the object." +"`~PyTypeObject.tp_name` and a uniquely identifying value for the object." msgstr "" #: ../../extending/newtypes.rst:181 @@ -595,7 +595,7 @@ msgid "" msgstr "" #: ../../extending/newtypes.rst:592 -msgid "And the corresponding member in the statically-declared type object::" +msgid "And the corresponding member in the statically declared type object::" msgstr "" #: ../../extending/newtypes.rst:600 diff --git a/faq/design.po b/faq/design.po index a6479085644..1fd2594ee7b 100644 --- a/faq/design.po +++ b/faq/design.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-01 05:12+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -413,7 +413,7 @@ msgstr "" msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " -"locally-defined function is that you don't need to invent a name for the " +"locally defined function is that you don't need to invent a name for the " "function -- but that's just a local variable to which the function object " "(which is exactly the same type of object that a lambda expression yields) " "is assigned!" diff --git a/faq/programming.po b/faq/programming.po index e5f47a105ce..e39a58a296d 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-27 00:16+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -410,7 +410,7 @@ msgid "" msgstr "" #: ../../faq/programming.rst:297 -msgid "locally-developed modules" +msgid "locally developed modules" msgstr "" #: ../../faq/programming.rst:299 @@ -890,7 +890,7 @@ msgstr "" msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " -"an externally-usable name. Upon calling a function that accepts positional-" +"an externally usable name. Upon calling a function that accepts positional-" "only parameters, arguments are mapped to parameters based solely on their " "position. For example, :func:`divmod` is a function that accepts positional-" "only parameters. Its documentation looks like this::" diff --git a/glossary.po b/glossary.po index ca3e9cdbed6..4405148f040 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2021-11-15 11:05+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1194,9 +1194,10 @@ msgstr "" "(parallelism)。" #: ../../glossary.rst:544 +#, fuzzy msgid "" "However, some extension modules, either standard or third-party, are " -"designed so as to release the GIL when doing computationally-intensive tasks " +"designed so as to release the GIL when doing computationally intensive tasks " "such as compression or hashing. Also, the GIL is always released when doing " "I/O." msgstr "" diff --git a/howto/clinic.po b/howto/clinic.po index e275e3218fb..cc0d6234566 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-03 00:13+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -564,7 +564,7 @@ msgstr "" 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." +"there should be no externally visible change to Python's behavior." msgstr "" #: ../../howto/clinic.rst:546 @@ -1637,7 +1637,7 @@ msgstr "" #: ../../howto/clinic.rst:1123 msgid "" -"Sorry, there's no syntax for partially-cloning a function, or cloning a " +"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 "" @@ -1851,7 +1851,7 @@ 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 " "variable\" warning. This can easily happen when using option groups—" -"although properly-written code will never actually use this value, the " +"although properly written code will never actually use this value, the " "variable does get passed in to the impl, and the C compiler will complain " "about the \"use\" of the uninitialized value. This value should always be a " "non-empty string." diff --git a/howto/functional.po b/howto/functional.po index bcdc66bcc54..f30172f9821 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-26 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -826,7 +826,7 @@ msgstr "" #: ../../howto/functional.rst:744 msgid "" -"The :mod:`itertools` module contains a number of commonly-used iterators as " +"The :mod:`itertools` module contains a number of commonly used iterators as " "well as functions for combining several iterators. This section will " "introduce the module's contents by showing small examples." msgstr "" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index de7b856fc06..3a814243af8 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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" @@ -120,7 +120,7 @@ msgstr "" #: ../../howto/instrumentation.rst:125 msgid "" "The above metadata contains information for SystemTap describing how it can " -"patch strategically-placed machine code instructions to enable the tracing " +"patch strategically placed machine code instructions to enable the tracing " "hooks used by a SystemTap script." msgstr "" @@ -332,6 +332,6 @@ msgstr "" #: ../../howto/instrumentation.rst:412 msgid "" "The following script uses the tapset above to provide a top-like view of all " -"running CPython code, showing the top 20 most frequently-entered bytecode " +"running CPython code, showing the top 20 most frequently entered bytecode " "frames, each second, across the whole system:" msgstr "" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index fabce73aeba..ba33899d56e 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-11 00:15+0000\n" +"POT-Creation-Date: 2022-07-05 00:15+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-" @@ -33,14 +33,15 @@ msgstr "Vinay Sajip " #: ../../howto/logging-cookbook.rst:9 msgid "" "This page contains a number of recipes related to logging, which have been " -"found useful in the past." +"found useful in the past. For links to tutorial and reference information, " +"please see :ref:`cookbook-ref-links`." msgstr "" -#: ../../howto/logging-cookbook.rst:15 +#: ../../howto/logging-cookbook.rst:16 msgid "Using logging in multiple modules" msgstr "" -#: ../../howto/logging-cookbook.rst:17 +#: ../../howto/logging-cookbook.rst:18 msgid "" "Multiple calls to ``logging.getLogger('someLogger')`` return a reference to " "the same logger object. This is true not only within the same module, but " @@ -52,39 +53,39 @@ msgid "" "module::" msgstr "" -#: ../../howto/logging-cookbook.rst:55 +#: ../../howto/logging-cookbook.rst:56 msgid "Here is the auxiliary module::" msgstr "" -#: ../../howto/logging-cookbook.rst:75 +#: ../../howto/logging-cookbook.rst:76 msgid "The output looks like this:" msgstr "" -#: ../../howto/logging-cookbook.rst:101 +#: ../../howto/logging-cookbook.rst:102 msgid "Logging from multiple threads" msgstr "" -#: ../../howto/logging-cookbook.rst:103 +#: ../../howto/logging-cookbook.rst:104 msgid "" "Logging from multiple threads requires no special effort. The following " "example shows logging from the main (initial) thread and another thread::" msgstr "" -#: ../../howto/logging-cookbook.rst:132 +#: ../../howto/logging-cookbook.rst:133 msgid "When run, the script should print something like the following:" msgstr "" -#: ../../howto/logging-cookbook.rst:154 +#: ../../howto/logging-cookbook.rst:155 msgid "" "This shows the logging output interspersed as one might expect. This " "approach works for more threads than shown here, of course." msgstr "" -#: ../../howto/logging-cookbook.rst:158 +#: ../../howto/logging-cookbook.rst:159 msgid "Multiple handlers and formatters" msgstr "" -#: ../../howto/logging-cookbook.rst:160 +#: ../../howto/logging-cookbook.rst:161 msgid "" "Loggers are plain Python objects. The :meth:`~Logger.addHandler` method has " "no minimum or maximum quota for the number of handlers you may add. " @@ -96,14 +97,14 @@ msgid "" "example::" msgstr "" -#: ../../howto/logging-cookbook.rst:193 +#: ../../howto/logging-cookbook.rst:194 msgid "" "Notice that the 'application' code does not care about multiple handlers. " "All that changed was the addition and configuration of a new handler named " "*fh*." msgstr "" -#: ../../howto/logging-cookbook.rst:196 +#: ../../howto/logging-cookbook.rst:197 msgid "" "The ability to create new handlers with higher- or lower-severity filters " "can be very helpful when writing and testing an application. Instead of " @@ -115,11 +116,11 @@ msgid "" "debug." msgstr "" -#: ../../howto/logging-cookbook.rst:207 +#: ../../howto/logging-cookbook.rst:208 msgid "Logging to multiple destinations" msgstr "" -#: ../../howto/logging-cookbook.rst:209 +#: ../../howto/logging-cookbook.rst:210 msgid "" "Let's say you want to log to console and file with different message formats " "and in differing circumstances. Say you want to log messages with levels of " @@ -128,53 +129,53 @@ msgid "" "console messages should not. Here's how you can achieve this::" msgstr "" -#: ../../howto/logging-cookbook.rst:247 +#: ../../howto/logging-cookbook.rst:248 msgid "When you run this, on the console you will see" msgstr "" -#: ../../howto/logging-cookbook.rst:256 +#: ../../howto/logging-cookbook.rst:257 msgid "and in the file you will see something like" msgstr "" -#: ../../howto/logging-cookbook.rst:266 +#: ../../howto/logging-cookbook.rst:267 msgid "" "As you can see, the DEBUG message only shows up in the file. The other " "messages are sent to both destinations." msgstr "" -#: ../../howto/logging-cookbook.rst:269 +#: ../../howto/logging-cookbook.rst:270 msgid "" "This example uses console and file handlers, but you can use any number and " "combination of handlers you choose." msgstr "" -#: ../../howto/logging-cookbook.rst:274 +#: ../../howto/logging-cookbook.rst:275 msgid "Configuration server example" msgstr "" -#: ../../howto/logging-cookbook.rst:276 +#: ../../howto/logging-cookbook.rst:277 msgid "Here is an example of a module using the logging configuration server::" msgstr "" -#: ../../howto/logging-cookbook.rst:307 +#: ../../howto/logging-cookbook.rst:308 msgid "" "And here is a script that takes a filename and sends that file to the " "server, properly preceded with the binary-encoded length, as the new logging " "configuration::" msgstr "" -#: ../../howto/logging-cookbook.rst:330 +#: ../../howto/logging-cookbook.rst:331 msgid "Dealing with handlers that block" msgstr "" -#: ../../howto/logging-cookbook.rst:334 +#: ../../howto/logging-cookbook.rst:335 msgid "" "Sometimes you have to get your logging handlers to do their work without " "blocking the thread you're logging from. This is common in web applications, " "though of course it also occurs in other scenarios." msgstr "" -#: ../../howto/logging-cookbook.rst:338 +#: ../../howto/logging-cookbook.rst:339 msgid "" "A common culprit which demonstrates sluggish behaviour is the :class:" "`SMTPHandler`: sending emails can take a long time, for a number of reasons " @@ -185,7 +186,7 @@ msgid "" "below the Python layer, and outside your control)." msgstr "" -#: ../../howto/logging-cookbook.rst:346 +#: ../../howto/logging-cookbook.rst:347 msgid "" "One solution is to use a two-part approach. For the first part, attach only " "a :class:`QueueHandler` to those loggers which are accessed from performance-" @@ -199,7 +200,7 @@ msgid "" "developers who will use your code." msgstr "" -#: ../../howto/logging-cookbook.rst:357 +#: ../../howto/logging-cookbook.rst:358 msgid "" "The second part of the solution is :class:`QueueListener`, which has been " "designed as the counterpart to :class:`QueueHandler`. A :class:" @@ -210,7 +211,7 @@ msgid "" "handlers for processing." msgstr "" -#: ../../howto/logging-cookbook.rst:365 +#: ../../howto/logging-cookbook.rst:366 msgid "" "The advantage of having a separate :class:`QueueListener` class is that you " "can use the same instance to service multiple ``QueueHandlers``. This is " @@ -219,15 +220,15 @@ msgid "" "benefit." msgstr "" -#: ../../howto/logging-cookbook.rst:370 +#: ../../howto/logging-cookbook.rst:371 msgid "An example of using these two classes follows (imports omitted)::" msgstr "" -#: ../../howto/logging-cookbook.rst:388 +#: ../../howto/logging-cookbook.rst:389 msgid "which, when run, will produce:" msgstr "" -#: ../../howto/logging-cookbook.rst:394 +#: ../../howto/logging-cookbook.rst:395 msgid "" "Prior to Python 3.5, the :class:`QueueListener` always passed every message " "received from the queue to every handler it was initialized with. (This was " @@ -239,30 +240,30 @@ msgid "" "handler if it's appropriate to do so." msgstr "" -#: ../../howto/logging-cookbook.rst:407 +#: ../../howto/logging-cookbook.rst:408 msgid "Sending and receiving logging events across a network" msgstr "" -#: ../../howto/logging-cookbook.rst:409 +#: ../../howto/logging-cookbook.rst:410 msgid "" "Let's say you want to send logging events across a network, and handle them " "at the receiving end. A simple way of doing this is attaching a :class:" "`SocketHandler` instance to the root logger at the sending end::" msgstr "" -#: ../../howto/logging-cookbook.rst:437 +#: ../../howto/logging-cookbook.rst:438 msgid "" "At the receiving end, you can set up a receiver using the :mod:" "`socketserver` module. Here is a basic working example::" msgstr "" -#: ../../howto/logging-cookbook.rst:525 +#: ../../howto/logging-cookbook.rst:526 msgid "" "First run the server, and then the client. On the client side, nothing is " "printed on the console; on the server side, you should see something like:" msgstr "" -#: ../../howto/logging-cookbook.rst:537 +#: ../../howto/logging-cookbook.rst:538 msgid "" "Note that there are some security issues with pickle in some scenarios. If " "these affect you, you can use an alternative serialization scheme by " @@ -271,11 +272,11 @@ msgid "" "use your alternative serialization." msgstr "" -#: ../../howto/logging-cookbook.rst:545 +#: ../../howto/logging-cookbook.rst:546 msgid "Running a logging socket listener in production" msgstr "" -#: ../../howto/logging-cookbook.rst:547 +#: ../../howto/logging-cookbook.rst:548 msgid "" "To run a logging listener in production, you may need to use a process-" "management tool such as `Supervisor `_. `Here " @@ -285,11 +286,11 @@ msgid "" "to reflect the actual paths you want to use." msgstr "" -#: ../../howto/logging-cookbook.rst:558 +#: ../../howto/logging-cookbook.rst:559 msgid "Adding contextual information to your logging output" msgstr "" -#: ../../howto/logging-cookbook.rst:560 +#: ../../howto/logging-cookbook.rst:561 msgid "" "Sometimes you want logging output to contain contextual information in " "addition to the parameters passed to the logging call. For example, in a " @@ -305,11 +306,11 @@ msgid "" "`Logger` instances becomes effectively unbounded." msgstr "" -#: ../../howto/logging-cookbook.rst:575 +#: ../../howto/logging-cookbook.rst:576 msgid "Using LoggerAdapters to impart contextual information" msgstr "" -#: ../../howto/logging-cookbook.rst:577 +#: ../../howto/logging-cookbook.rst:578 msgid "" "An easy way in which you can pass contextual information to be output along " "with logging event information is to use the :class:`LoggerAdapter` class. " @@ -320,7 +321,7 @@ msgid "" "types of instances interchangeably." msgstr "" -#: ../../howto/logging-cookbook.rst:585 +#: ../../howto/logging-cookbook.rst:586 msgid "" "When you create an instance of :class:`LoggerAdapter`, you pass it a :class:" "`Logger` instance and a dict-like object which contains your contextual " @@ -331,7 +332,7 @@ msgid "" "of :class:`LoggerAdapter`::" msgstr "" -#: ../../howto/logging-cookbook.rst:601 +#: ../../howto/logging-cookbook.rst:602 msgid "" "The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " "the contextual information is added to the logging output. It's passed the " @@ -344,7 +345,7 @@ msgid "" "be silently overwritten." msgstr "" -#: ../../howto/logging-cookbook.rst:610 +#: ../../howto/logging-cookbook.rst:611 msgid "" "The advantage of using 'extra' is that the values in the dict-like object " "are merged into the :class:`LogRecord` instance's __dict__, allowing you to " @@ -355,21 +356,21 @@ msgid "" "`~LoggerAdapter.process` to do what you need. Here is a simple example::" msgstr "" -#: ../../howto/logging-cookbook.rst:626 +#: ../../howto/logging-cookbook.rst:627 msgid "which you can use like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:631 +#: ../../howto/logging-cookbook.rst:632 msgid "" "Then any events that you log to the adapter will have the value of " "``some_conn_id`` prepended to the log messages." msgstr "" -#: ../../howto/logging-cookbook.rst:635 +#: ../../howto/logging-cookbook.rst:636 msgid "Using objects other than dicts to pass contextual information" msgstr "" -#: ../../howto/logging-cookbook.rst:637 +#: ../../howto/logging-cookbook.rst:638 msgid "" "You don't need to pass an actual dict to a :class:`LoggerAdapter` - you " "could pass an instance of a class which implements ``__getitem__`` and " @@ -378,11 +379,11 @@ msgid "" "would be constant)." msgstr "" -#: ../../howto/logging-cookbook.rst:646 +#: ../../howto/logging-cookbook.rst:647 msgid "Using Filters to impart contextual information" msgstr "" -#: ../../howto/logging-cookbook.rst:648 +#: ../../howto/logging-cookbook.rst:649 msgid "" "You can also add contextual information to log output using a user-defined :" "class:`Filter`. ``Filter`` instances are allowed to modify the " @@ -391,7 +392,7 @@ msgid "" "class:`Formatter`." msgstr "" -#: ../../howto/logging-cookbook.rst:653 +#: ../../howto/logging-cookbook.rst:654 msgid "" "For example in a web application, the request being processed (or at least, " "the interesting parts of it) can be stored in a threadlocal (:class:" @@ -403,15 +404,74 @@ msgid "" "an example script::" msgstr "" -#: ../../howto/logging-cookbook.rst:699 +#: ../../howto/logging-cookbook.rst:700 msgid "which, when run, produces something like:" msgstr "" +#: ../../howto/logging-cookbook.rst:718 +msgid "Use of ``contextvars``" +msgstr "" + #: ../../howto/logging-cookbook.rst:720 +msgid "" +"Since Python 3.7, the :mod:`contextvars` module has provided context-local " +"storage which works for both :mod:`threading` and :mod:`asyncio` processing " +"needs. This type of storage may thus be generally preferable to thread-" +"locals. The following example shows how, in a multi-threaded environment, " +"logs can populated with contextual information such as, for example, request " +"attributes handled by web applications." +msgstr "" + +#: ../../howto/logging-cookbook.rst:726 +msgid "" +"For the purposes of illustration, say that you have different web " +"applications, each independent of the other but running in the same Python " +"process and using a library common to them. How can each of these " +"applications have their own log, where all logging messages from the library " +"(and other request processing code) are directed to the appropriate " +"application's log file, while including in the log additional contextual " +"information such as client IP, HTTP request method and client username?" +msgstr "" + +#: ../../howto/logging-cookbook.rst:733 +msgid "Let's assume that the library can be simulated by the following code:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:749 +msgid "" +"We can simulate the multiple web applications by means of two simple " +"classes, ``Request`` and ``WebApp``. These simulate how real threaded web " +"applications work - each request is handled by a thread:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:893 +msgid "" +"If you run the above, you should find that roughly half the requests go " +"into :file:`app1.log` and the rest into :file:`app2.log`, and the all the " +"requests are logged to :file:`app.log`. Each webapp-specific log will " +"contain only log entries for only that webapp, and the request information " +"will be displayed consistently in the log (i.e. the information in each " +"dummy request will always appear together in a log line). This is " +"illustrated by the following shell output:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:940 +msgid "Imparting contextual information in handlers" +msgstr "" + +#: ../../howto/logging-cookbook.rst:942 +msgid "" +"Each :class:`~Handler` has its own chain of filters. If you want to add " +"contextual information to a :class:`LogRecord` without leaking it to other " +"handlers, you can use a filter that returns a new :class:`~LogRecord` " +"instead of modifying it in-place, as shown in the following script::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:969 msgid "Logging to a single file from multiple processes" msgstr "" -#: ../../howto/logging-cookbook.rst:722 +#: ../../howto/logging-cookbook.rst:971 msgid "" "Although logging is thread-safe, and logging to a single file from multiple " "threads in a single process *is* supported, logging to a single file from " @@ -427,7 +487,7 @@ msgid "" "you to adapt in your own applications." msgstr "" -#: ../../howto/logging-cookbook.rst:735 +#: ../../howto/logging-cookbook.rst:984 msgid "" "You could also write your own handler which uses the :class:" "`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " @@ -438,7 +498,7 @@ msgid "" "platforms (see https://bugs.python.org/issue3770)." msgstr "" -#: ../../howto/logging-cookbook.rst:745 +#: ../../howto/logging-cookbook.rst:994 msgid "" "Alternatively, you can use a ``Queue`` and a :class:`QueueHandler` to send " "all logging events to one of the processes in your multi-process " @@ -453,13 +513,13 @@ msgid "" "requirements::" msgstr "" -#: ../../howto/logging-cookbook.rst:861 +#: ../../howto/logging-cookbook.rst:1110 msgid "" "A variant of the above script keeps the logging in the main process, in a " "separate thread::" msgstr "" -#: ../../howto/logging-cookbook.rst:956 +#: ../../howto/logging-cookbook.rst:1205 msgid "" "This variant shows how you can e.g. apply configuration for particular " "loggers - e.g. the ``foo`` logger has a special handler which stores all " @@ -469,34 +529,34 @@ msgid "" "appropriate destinations." msgstr "" -#: ../../howto/logging-cookbook.rst:963 +#: ../../howto/logging-cookbook.rst:1212 msgid "Using concurrent.futures.ProcessPoolExecutor" msgstr "" -#: ../../howto/logging-cookbook.rst:965 +#: ../../howto/logging-cookbook.rst:1214 msgid "" "If you want to use :class:`concurrent.futures.ProcessPoolExecutor` to start " "your worker processes, you need to create the queue slightly differently. " "Instead of" msgstr "" -#: ../../howto/logging-cookbook.rst:973 +#: ../../howto/logging-cookbook.rst:1222 msgid "you should use" msgstr "" -#: ../../howto/logging-cookbook.rst:979 +#: ../../howto/logging-cookbook.rst:1228 msgid "and you can then replace the worker creation from this::" msgstr "" -#: ../../howto/logging-cookbook.rst:990 +#: ../../howto/logging-cookbook.rst:1239 msgid "to this (remembering to first import :mod:`concurrent.futures`)::" msgstr "" -#: ../../howto/logging-cookbook.rst:997 +#: ../../howto/logging-cookbook.rst:1246 msgid "Deploying Web applications using Gunicorn and uWSGI" msgstr "" -#: ../../howto/logging-cookbook.rst:999 +#: ../../howto/logging-cookbook.rst:1248 msgid "" "When deploying Web applications using `Gunicorn `_ or " "`uWSGI `_ (or similar), " @@ -508,11 +568,11 @@ msgid "" "listener in production`_ for more details." msgstr "" -#: ../../howto/logging-cookbook.rst:1009 +#: ../../howto/logging-cookbook.rst:1258 msgid "Using file rotation" msgstr "" -#: ../../howto/logging-cookbook.rst:1014 +#: ../../howto/logging-cookbook.rst:1263 msgid "" "Sometimes you want to let a log file grow to a certain size, then open a new " "file and log to that. You may want to keep a certain number of these files, " @@ -522,13 +582,13 @@ msgid "" "RotatingFileHandler`::" msgstr "" -#: ../../howto/logging-cookbook.rst:1046 +#: ../../howto/logging-cookbook.rst:1295 msgid "" "The result should be 6 separate files, each with part of the log history for " "the application:" msgstr "" -#: ../../howto/logging-cookbook.rst:1058 +#: ../../howto/logging-cookbook.rst:1307 msgid "" "The most current file is always :file:`logging_rotatingfile_example.out`, " "and each time it reaches the size limit it is renamed with the suffix " @@ -536,17 +596,17 @@ msgid "" "(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased." msgstr "" -#: ../../howto/logging-cookbook.rst:1063 +#: ../../howto/logging-cookbook.rst:1312 msgid "" "Obviously this example sets the log length much too small as an extreme " "example. You would want to set *maxBytes* to an appropriate value." msgstr "" -#: ../../howto/logging-cookbook.rst:1069 +#: ../../howto/logging-cookbook.rst:1318 msgid "Use of alternative formatting styles" msgstr "" -#: ../../howto/logging-cookbook.rst:1071 +#: ../../howto/logging-cookbook.rst:1320 msgid "" "When logging was added to the Python standard library, the only way of " "formatting messages with variable content was to use the %-formatting " @@ -555,7 +615,7 @@ msgid "" "Python 2.6)." msgstr "" -#: ../../howto/logging-cookbook.rst:1077 +#: ../../howto/logging-cookbook.rst:1326 msgid "" "Logging (as of 3.2) provides improved support for these two additional " "formatting styles. The :class:`Formatter` class been enhanced to take an " @@ -568,14 +628,14 @@ msgid "" "session to show the possibilities:" msgstr "" -#: ../../howto/logging-cookbook.rst:1111 +#: ../../howto/logging-cookbook.rst:1360 msgid "" "Note that the formatting of logging messages for final output to logs is " "completely independent of how an individual logging message is constructed. " "That can still use %-formatting, as shown here::" msgstr "" -#: ../../howto/logging-cookbook.rst:1119 +#: ../../howto/logging-cookbook.rst:1368 msgid "" "Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -591,7 +651,7 @@ msgid "" "strings." msgstr "" -#: ../../howto/logging-cookbook.rst:1132 +#: ../../howto/logging-cookbook.rst:1381 msgid "" "There is, however, a way that you can use {}- and $- formatting to construct " "your individual log messages. Recall that for a message you can use an " @@ -600,7 +660,7 @@ msgid "" "the following two classes::" msgstr "" -#: ../../howto/logging-cookbook.rst:1156 +#: ../../howto/logging-cookbook.rst:1405 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -611,21 +671,21 @@ msgid "" "used as a synonym/alias for :func:`gettext.gettext` or its brethren)." msgstr "" -#: ../../howto/logging-cookbook.rst:1164 +#: ../../howto/logging-cookbook.rst:1413 msgid "" "The above classes are not included in Python, though they're easy enough to " "copy and paste into your own code. They can be used as follows (assuming " "that they're declared in a module called ``wherever``):" msgstr "" -#: ../../howto/logging-cookbook.rst:1186 +#: ../../howto/logging-cookbook.rst:1435 msgid "" "While the above examples use ``print()`` to show how the formatting works, " "you would of course use ``logger.debug()`` or similar to actually log using " "this approach." msgstr "" -#: ../../howto/logging-cookbook.rst:1190 +#: ../../howto/logging-cookbook.rst:1439 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -636,23 +696,23 @@ msgid "" "sugar for a constructor call to one of the XXXMessage classes." msgstr "" -#: ../../howto/logging-cookbook.rst:1198 +#: ../../howto/logging-cookbook.rst:1447 msgid "" "If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar " "effect to the above, as in the following example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1229 +#: ../../howto/logging-cookbook.rst:1478 msgid "" "The above script should log the message ``Hello, world!`` when run with " "Python 3.2 or later." msgstr "" -#: ../../howto/logging-cookbook.rst:1238 +#: ../../howto/logging-cookbook.rst:1487 msgid "Customizing ``LogRecord``" msgstr "" -#: ../../howto/logging-cookbook.rst:1240 +#: ../../howto/logging-cookbook.rst:1489 msgid "" "Every logging event is represented by a :class:`LogRecord` instance. When an " "event is logged and not filtered out by a logger's level, a :class:" @@ -663,13 +723,13 @@ msgid "" "was done:" msgstr "" -#: ../../howto/logging-cookbook.rst:1247 +#: ../../howto/logging-cookbook.rst:1496 msgid "" ":meth:`Logger.makeRecord`, which is called in the normal process of logging " "an event. This invoked :class:`LogRecord` directly to create an instance." msgstr "" -#: ../../howto/logging-cookbook.rst:1250 +#: ../../howto/logging-cookbook.rst:1499 msgid "" ":func:`makeLogRecord`, which is called with a dictionary containing " "attributes to be added to the LogRecord. This is typically invoked when a " @@ -678,27 +738,27 @@ msgid "" "`~handlers.HTTPHandler`)." msgstr "" -#: ../../howto/logging-cookbook.rst:1256 +#: ../../howto/logging-cookbook.rst:1505 msgid "" "This has usually meant that if you need to do anything special with a :class:" "`LogRecord`, you've had to do one of the following." msgstr "" -#: ../../howto/logging-cookbook.rst:1259 +#: ../../howto/logging-cookbook.rst:1508 msgid "" "Create your own :class:`Logger` subclass, which overrides :meth:`Logger." "makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " "loggers that you care about are instantiated." msgstr "" -#: ../../howto/logging-cookbook.rst:1262 +#: ../../howto/logging-cookbook.rst:1511 msgid "" "Add a :class:`Filter` to a logger or handler, which does the necessary " "special manipulation you need when its :meth:`~Filter.filter` method is " "called." msgstr "" -#: ../../howto/logging-cookbook.rst:1266 +#: ../../howto/logging-cookbook.rst:1515 msgid "" "The first approach would be a little unwieldy in the scenario where (say) " "several different libraries wanted to do different things. Each would " @@ -706,7 +766,7 @@ msgid "" "last would win." msgstr "" -#: ../../howto/logging-cookbook.rst:1271 +#: ../../howto/logging-cookbook.rst:1520 msgid "" "The second approach works reasonably well for many cases, but does not allow " "you to e.g. use a specialized subclass of :class:`LogRecord`. Library " @@ -715,7 +775,7 @@ msgid "" "would do simply by adding new packages or modules and doing ::" msgstr "" -#: ../../howto/logging-cookbook.rst:1279 +#: ../../howto/logging-cookbook.rst:1528 msgid "" "at module level). It's probably one too many things to think about. " "Developers could also add the filter to a :class:`~logging.NullHandler` " @@ -725,7 +785,7 @@ msgid "" "developer." msgstr "" -#: ../../howto/logging-cookbook.rst:1285 +#: ../../howto/logging-cookbook.rst:1534 msgid "" "In Python 3.2 and later, :class:`~logging.LogRecord` creation is done " "through a factory, which you can specify. The factory is just a callable you " @@ -735,7 +795,7 @@ msgid "" "`LogRecord` is the default setting for the factory." msgstr "" -#: ../../howto/logging-cookbook.rst:1292 +#: ../../howto/logging-cookbook.rst:1541 msgid "" "This approach allows a custom factory to control all aspects of LogRecord " "creation. For example, you could return a subclass, or just add some " @@ -743,7 +803,7 @@ msgid "" "this::" msgstr "" -#: ../../howto/logging-cookbook.rst:1305 +#: ../../howto/logging-cookbook.rst:1554 msgid "" "This pattern allows different libraries to chain factories together, and as " "long as they don't overwrite each other's attributes or unintentionally " @@ -753,70 +813,70 @@ msgid "" "used when the use of a :class:`Filter` does not provide the desired result." msgstr "" -#: ../../howto/logging-cookbook.rst:1316 +#: ../../howto/logging-cookbook.rst:1565 msgid "Subclassing QueueHandler - a ZeroMQ example" msgstr "" -#: ../../howto/logging-cookbook.rst:1318 +#: ../../howto/logging-cookbook.rst:1567 msgid "" "You can use a :class:`QueueHandler` subclass to send messages to other kinds " "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " "socket is created separately and passed to the handler (as its 'queue')::" msgstr "" -#: ../../howto/logging-cookbook.rst:1337 +#: ../../howto/logging-cookbook.rst:1586 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" msgstr "" -#: ../../howto/logging-cookbook.rst:1355 +#: ../../howto/logging-cookbook.rst:1604 msgid "Subclassing QueueListener - a ZeroMQ example" msgstr "" -#: ../../howto/logging-cookbook.rst:1357 +#: ../../howto/logging-cookbook.rst:1606 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1376 +#: ../../howto/logging-cookbook.rst:1625 ../../howto/logging-cookbook.rst:3425 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../howto/logging-cookbook.rst:1376 +#: ../../howto/logging-cookbook.rst:1625 ../../howto/logging-cookbook.rst:3425 msgid "API reference for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1379 +#: ../../howto/logging-cookbook.rst:1628 ../../howto/logging-cookbook.rst:3428 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../howto/logging-cookbook.rst:1379 +#: ../../howto/logging-cookbook.rst:1628 ../../howto/logging-cookbook.rst:3428 msgid "Configuration API for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1382 +#: ../../howto/logging-cookbook.rst:1631 ../../howto/logging-cookbook.rst:3431 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../howto/logging-cookbook.rst:1382 +#: ../../howto/logging-cookbook.rst:1631 ../../howto/logging-cookbook.rst:3431 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:1384 +#: ../../howto/logging-cookbook.rst:1633 msgid ":ref:`A basic logging tutorial `" msgstr "" -#: ../../howto/logging-cookbook.rst:1386 +#: ../../howto/logging-cookbook.rst:1635 msgid ":ref:`A more advanced logging tutorial `" msgstr "" -#: ../../howto/logging-cookbook.rst:1390 +#: ../../howto/logging-cookbook.rst:1639 msgid "An example dictionary-based configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:1392 +#: ../../howto/logging-cookbook.rst:1641 msgid "" "Below is an example of a logging configuration dictionary - it's taken from " "the `documentation on the Django project `_ of the Django documentation." msgstr "" -#: ../../howto/logging-cookbook.rst:1455 +#: ../../howto/logging-cookbook.rst:1704 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" -#: ../../howto/logging-cookbook.rst:1457 +#: ../../howto/logging-cookbook.rst:1706 msgid "" "An example of how you can define a namer and rotator is given in the " "following snippet, which shows zlib-based compression of the log file::" msgstr "" -#: ../../howto/logging-cookbook.rst:1475 +#: ../../howto/logging-cookbook.rst:1724 msgid "" "These are not \"true\" .gz files, as they are bare compressed data, with no " "\"container\" such as you’d find in an actual gzip file. This snippet is " "just for illustration purposes." msgstr "" -#: ../../howto/logging-cookbook.rst:1480 +#: ../../howto/logging-cookbook.rst:1729 msgid "A more elaborate multiprocessing example" msgstr "" -#: ../../howto/logging-cookbook.rst:1482 +#: ../../howto/logging-cookbook.rst:1731 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " @@ -860,7 +920,7 @@ msgid "" "in a real multiprocessing scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:1487 +#: ../../howto/logging-cookbook.rst:1736 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -873,17 +933,17 @@ msgid "" "own scenario." msgstr "" -#: ../../howto/logging-cookbook.rst:1497 +#: ../../howto/logging-cookbook.rst:1746 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" -#: ../../howto/logging-cookbook.rst:1709 +#: ../../howto/logging-cookbook.rst:1958 msgid "Inserting a BOM into messages sent to a SysLogHandler" msgstr "" -#: ../../howto/logging-cookbook.rst:1711 +#: ../../howto/logging-cookbook.rst:1960 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -892,7 +952,7 @@ msgid "" "<5424#section-6>`.)" msgstr "" -#: ../../howto/logging-cookbook.rst:1717 +#: ../../howto/logging-cookbook.rst:1966 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " @@ -900,7 +960,7 @@ msgid "" "hence not allowing any pure-ASCII component to appear before it." msgstr "" -#: ../../howto/logging-cookbook.rst:1723 +#: ../../howto/logging-cookbook.rst:1972 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -909,33 +969,33 @@ msgid "" "encoded using UTF-8, then you need to do the following:" msgstr "" -#: ../../howto/logging-cookbook.rst:1729 +#: ../../howto/logging-cookbook.rst:1978 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:1735 +#: ../../howto/logging-cookbook.rst:1984 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" -#: ../../howto/logging-cookbook.rst:1738 +#: ../../howto/logging-cookbook.rst:1987 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" -#: ../../howto/logging-cookbook.rst:1742 +#: ../../howto/logging-cookbook.rst:1991 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" -#: ../../howto/logging-cookbook.rst:1746 +#: ../../howto/logging-cookbook.rst:1995 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -944,11 +1004,11 @@ msgid "" "daemon may complain." msgstr "" -#: ../../howto/logging-cookbook.rst:1753 +#: ../../howto/logging-cookbook.rst:2002 msgid "Implementing structured logging" msgstr "" -#: ../../howto/logging-cookbook.rst:1755 +#: ../../howto/logging-cookbook.rst:2004 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -960,31 +1020,31 @@ msgid "" "machine-parseable manner::" msgstr "" -#: ../../howto/logging-cookbook.rst:1779 +#: ../../howto/logging-cookbook.rst:2028 msgid "If the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:1785 ../../howto/logging-cookbook.rst:1834 +#: ../../howto/logging-cookbook.rst:2034 ../../howto/logging-cookbook.rst:2076 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" -#: ../../howto/logging-cookbook.rst:1788 +#: ../../howto/logging-cookbook.rst:2037 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:1828 +#: ../../howto/logging-cookbook.rst:2070 msgid "When the above script is run, it prints:" msgstr "" -#: ../../howto/logging-cookbook.rst:1843 +#: ../../howto/logging-cookbook.rst:2085 msgid "Customizing handlers with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:1845 +#: ../../howto/logging-cookbook.rst:2087 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -994,24 +1054,24 @@ msgid "" "customize handler creation using a plain function such as::" msgstr "" -#: ../../howto/logging-cookbook.rst:1859 +#: ../../howto/logging-cookbook.rst:2101 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" -#: ../../howto/logging-cookbook.rst:1892 +#: ../../howto/logging-cookbook.rst:2134 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" -#: ../../howto/logging-cookbook.rst:1939 +#: ../../howto/logging-cookbook.rst:2181 msgid "To run this, you will probably need to run as ``root``:" msgstr "" -#: ../../howto/logging-cookbook.rst:1949 +#: ../../howto/logging-cookbook.rst:2191 msgid "" "Note that this example uses Python 3.3 because that's where :func:`shutil." "chown` makes an appearance. This approach should work with any Python " @@ -1020,17 +1080,17 @@ msgid "" "change using e.g. :func:`os.chown`." msgstr "" -#: ../../howto/logging-cookbook.rst:1955 +#: ../../howto/logging-cookbook.rst:2197 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" -#: ../../howto/logging-cookbook.rst:1960 +#: ../../howto/logging-cookbook.rst:2202 msgid "you could use e.g.::" msgstr "" -#: ../../howto/logging-cookbook.rst:1964 +#: ../../howto/logging-cookbook.rst:2206 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" @@ -1038,25 +1098,25 @@ msgid "" "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" -#: ../../howto/logging-cookbook.rst:1969 +#: ../../howto/logging-cookbook.rst:2211 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" -#: ../../howto/logging-cookbook.rst:1973 +#: ../../howto/logging-cookbook.rst:2215 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" -#: ../../howto/logging-cookbook.rst:1983 +#: ../../howto/logging-cookbook.rst:2225 msgid "Using particular formatting styles throughout your application" msgstr "" -#: ../../howto/logging-cookbook.rst:1985 +#: ../../howto/logging-cookbook.rst:2227 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1067,7 +1127,7 @@ msgid "" "is constructed." msgstr "" -#: ../../howto/logging-cookbook.rst:1992 +#: ../../howto/logging-cookbook.rst:2234 msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1082,7 +1142,7 @@ msgid "" "calls which are out there in existing code will be using %-format strings." msgstr "" -#: ../../howto/logging-cookbook.rst:2004 +#: ../../howto/logging-cookbook.rst:2246 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -1090,7 +1150,7 @@ msgid "" "formatting." msgstr "" -#: ../../howto/logging-cookbook.rst:2008 +#: ../../howto/logging-cookbook.rst:2250 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -1098,11 +1158,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: ../../howto/logging-cookbook.rst:2015 +#: ../../howto/logging-cookbook.rst:2257 msgid "Using LogRecord factories" msgstr "" -#: ../../howto/logging-cookbook.rst:2017 +#: ../../howto/logging-cookbook.rst:2259 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -1117,17 +1177,17 @@ msgid "" "implementation does." msgstr "" -#: ../../howto/logging-cookbook.rst:2028 +#: ../../howto/logging-cookbook.rst:2270 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` and :" "class:`LogRecord` for more information." msgstr "" -#: ../../howto/logging-cookbook.rst:2033 +#: ../../howto/logging-cookbook.rst:2275 msgid "Using custom message objects" msgstr "" -#: ../../howto/logging-cookbook.rst:2035 +#: ../../howto/logging-cookbook.rst:2277 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " "to construct your individual log messages. You may recall (from :ref:" @@ -1137,7 +1197,7 @@ msgid "" "following two classes::" msgstr "" -#: ../../howto/logging-cookbook.rst:2060 +#: ../../howto/logging-cookbook.rst:2302 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1148,17 +1208,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: ../../howto/logging-cookbook.rst:2068 +#: ../../howto/logging-cookbook.rst:2310 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2082 +#: ../../howto/logging-cookbook.rst:2324 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: ../../howto/logging-cookbook.rst:2089 +#: ../../howto/logging-cookbook.rst:2331 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -1170,11 +1230,11 @@ msgid "" "above." msgstr "" -#: ../../howto/logging-cookbook.rst:2103 +#: ../../howto/logging-cookbook.rst:2345 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: ../../howto/logging-cookbook.rst:2105 +#: ../../howto/logging-cookbook.rst:2347 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " @@ -1189,22 +1249,22 @@ msgid "" "complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2158 +#: ../../howto/logging-cookbook.rst:2400 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: ../../howto/logging-cookbook.rst:2166 +#: ../../howto/logging-cookbook.rst:2408 msgid "which shows that the filter is working as configured." msgstr "" -#: ../../howto/logging-cookbook.rst:2168 +#: ../../howto/logging-cookbook.rst:2410 msgid "A couple of extra points to note:" msgstr "" -#: ../../howto/logging-cookbook.rst:2170 +#: ../../howto/logging-cookbook.rst:2412 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -1214,7 +1274,7 @@ msgid "" "the above example." msgstr "" -#: ../../howto/logging-cookbook.rst:2177 +#: ../../howto/logging-cookbook.rst:2419 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -1223,11 +1283,11 @@ msgid "" "above." msgstr "" -#: ../../howto/logging-cookbook.rst:2186 +#: ../../howto/logging-cookbook.rst:2428 msgid "Customized exception formatting" msgstr "" -#: ../../howto/logging-cookbook.rst:2188 +#: ../../howto/logging-cookbook.rst:2430 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -1235,22 +1295,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2229 +#: ../../howto/logging-cookbook.rst:2471 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: ../../howto/logging-cookbook.rst:2236 +#: ../../howto/logging-cookbook.rst:2478 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: ../../howto/logging-cookbook.rst:2243 +#: ../../howto/logging-cookbook.rst:2485 msgid "Speaking logging messages" msgstr "" -#: ../../howto/logging-cookbook.rst:2245 +#: ../../howto/logging-cookbook.rst:2487 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " @@ -1267,24 +1327,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: ../../howto/logging-cookbook.rst:2287 +#: ../../howto/logging-cookbook.rst:2529 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: ../../howto/logging-cookbook.rst:2289 +#: ../../howto/logging-cookbook.rst:2531 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: ../../howto/logging-cookbook.rst:2297 +#: ../../howto/logging-cookbook.rst:2539 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: ../../howto/logging-cookbook.rst:2299 +#: ../../howto/logging-cookbook.rst:2541 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -1294,7 +1354,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: ../../howto/logging-cookbook.rst:2306 +#: ../../howto/logging-cookbook.rst:2548 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -1307,7 +1367,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: ../../howto/logging-cookbook.rst:2316 +#: ../../howto/logging-cookbook.rst:2558 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -1316,7 +1376,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: ../../howto/logging-cookbook.rst:2322 +#: ../../howto/logging-cookbook.rst:2564 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " @@ -1328,36 +1388,36 @@ msgid "" "respectively." msgstr "" -#: ../../howto/logging-cookbook.rst:2330 +#: ../../howto/logging-cookbook.rst:2572 msgid "Here's the script::" msgstr "" -#: ../../howto/logging-cookbook.rst:2393 +#: ../../howto/logging-cookbook.rst:2635 msgid "When this script is run, the following output should be observed:" msgstr "" -#: ../../howto/logging-cookbook.rst:2423 +#: ../../howto/logging-cookbook.rst:2665 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: ../../howto/logging-cookbook.rst:2427 +#: ../../howto/logging-cookbook.rst:2669 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: ../../howto/logging-cookbook.rst:2437 +#: ../../howto/logging-cookbook.rst:2679 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:2439 +#: ../../howto/logging-cookbook.rst:2681 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as `UTCFormatter`, shown below::" msgstr "" -#: ../../howto/logging-cookbook.rst:2448 +#: ../../howto/logging-cookbook.rst:2690 msgid "" "and you can then use the ``UTCFormatter`` in your code instead of :class:" "`~logging.Formatter`. If you want to do that via configuration, you can use " @@ -1365,21 +1425,21 @@ msgid "" "the following complete example::" msgstr "" -#: ../../howto/logging-cookbook.rst:2491 +#: ../../howto/logging-cookbook.rst:2733 msgid "When this script is run, it should print something like:" msgstr "" -#: ../../howto/logging-cookbook.rst:2498 +#: ../../howto/logging-cookbook.rst:2740 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: ../../howto/logging-cookbook.rst:2505 +#: ../../howto/logging-cookbook.rst:2747 msgid "Using a context manager for selective logging" msgstr "" -#: ../../howto/logging-cookbook.rst:2507 +#: ../../howto/logging-cookbook.rst:2749 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -1389,7 +1449,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: ../../howto/logging-cookbook.rst:2540 +#: ../../howto/logging-cookbook.rst:2782 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -1398,13 +1458,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: ../../howto/logging-cookbook.rst:2546 +#: ../../howto/logging-cookbook.rst:2788 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: ../../howto/logging-cookbook.rst:2564 +#: ../../howto/logging-cookbook.rst:2806 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -1417,56 +1477,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: ../../howto/logging-cookbook.rst:2574 +#: ../../howto/logging-cookbook.rst:2816 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: ../../howto/logging-cookbook.rst:2585 +#: ../../howto/logging-cookbook.rst:2827 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: ../../howto/logging-cookbook.rst:2593 +#: ../../howto/logging-cookbook.rst:2835 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: ../../howto/logging-cookbook.rst:2603 +#: ../../howto/logging-cookbook.rst:2845 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: ../../howto/logging-cookbook.rst:2605 +#: ../../howto/logging-cookbook.rst:2847 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: ../../howto/logging-cookbook.rst:2613 +#: ../../howto/logging-cookbook.rst:2855 msgid "A CLI application starter template" msgstr "" -#: ../../howto/logging-cookbook.rst:2615 +#: ../../howto/logging-cookbook.rst:2857 msgid "Here's an example which shows how you can:" msgstr "" -#: ../../howto/logging-cookbook.rst:2617 +#: ../../howto/logging-cookbook.rst:2859 msgid "Use a logging level based on command-line arguments" msgstr "" -#: ../../howto/logging-cookbook.rst:2618 +#: ../../howto/logging-cookbook.rst:2860 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: ../../howto/logging-cookbook.rst:2620 +#: ../../howto/logging-cookbook.rst:2862 msgid "Make use of simple, minimal configuration" msgstr "" -#: ../../howto/logging-cookbook.rst:2622 +#: ../../howto/logging-cookbook.rst:2864 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " @@ -1477,53 +1537,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: ../../howto/logging-cookbook.rst:2671 +#: ../../howto/logging-cookbook.rst:2913 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: ../../howto/logging-cookbook.rst:2684 +#: ../../howto/logging-cookbook.rst:2926 msgid "and thus for stopping::" msgstr "" -#: ../../howto/logging-cookbook.rst:2705 +#: ../../howto/logging-cookbook.rst:2947 msgid "and similarly for restarting::" msgstr "" -#: ../../howto/logging-cookbook.rst:2726 +#: ../../howto/logging-cookbook.rst:2968 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: ../../howto/logging-cookbook.rst:2739 +#: ../../howto/logging-cookbook.rst:2981 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: ../../howto/logging-cookbook.rst:2742 +#: ../../howto/logging-cookbook.rst:2984 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: ../../howto/logging-cookbook.rst:2759 +#: ../../howto/logging-cookbook.rst:3001 msgid "And if we want less:" msgstr "" -#: ../../howto/logging-cookbook.rst:2767 +#: ../../howto/logging-cookbook.rst:3009 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: ../../howto/logging-cookbook.rst:2773 +#: ../../howto/logging-cookbook.rst:3015 msgid "A Qt GUI for logging" msgstr "" -#: ../../howto/logging-cookbook.rst:2775 +#: ../../howto/logging-cookbook.rst:3017 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt `_ framework is a popular cross-" @@ -1531,7 +1591,7 @@ msgid "" "project/PySide2/>`_ or `PyQt5 `_ libraries." msgstr "" -#: ../../howto/logging-cookbook.rst:2781 +#: ../../howto/logging-cookbook.rst:3023 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -1541,14 +1601,14 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: ../../howto/logging-cookbook.rst:2788 +#: ../../howto/logging-cookbook.rst:3030 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: ../../howto/logging-cookbook.rst:2792 +#: ../../howto/logging-cookbook.rst:3034 msgid "" "The code should work with recent releases of either ``PySide2`` or " "``PyQt5``. You should be able to adapt the approach to earlier versions of " @@ -1556,11 +1616,11 @@ msgid "" "information." msgstr "" -#: ../../howto/logging-cookbook.rst:3006 +#: ../../howto/logging-cookbook.rst:3248 msgid "Logging to syslog with RFC5424 support" msgstr "" -#: ../../howto/logging-cookbook.rst:3008 +#: ../../howto/logging-cookbook.rst:3250 msgid "" "Although :rfc:`5424` dates from 2009, most syslog servers are configured by " "detault to use the older :rfc:`3164`, which hails from 2001. When " @@ -1570,14 +1630,14 @@ msgid "" "handlers.SysLogHandler` functionality has not been updated." msgstr "" -#: ../../howto/logging-cookbook.rst:3015 +#: ../../howto/logging-cookbook.rst:3257 msgid "" "RFC 5424 contains some useful features such as support for structured data, " "and if you need to be able to log to a syslog server with support for it, " "you can do so with a subclassed handler which looks something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3081 +#: ../../howto/logging-cookbook.rst:3323 msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " @@ -1586,11 +1646,11 @@ msgid "" "using something like this::" msgstr "" -#: ../../howto/logging-cookbook.rst:3098 +#: ../../howto/logging-cookbook.rst:3340 msgid "Patterns to avoid" msgstr "" -#: ../../howto/logging-cookbook.rst:3100 +#: ../../howto/logging-cookbook.rst:3342 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 " @@ -1598,11 +1658,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: ../../howto/logging-cookbook.rst:3107 +#: ../../howto/logging-cookbook.rst:3349 msgid "Opening the same log file multiple times" msgstr "" -#: ../../howto/logging-cookbook.rst:3109 +#: ../../howto/logging-cookbook.rst:3351 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. " @@ -1610,32 +1670,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: ../../howto/logging-cookbook.rst:3114 +#: ../../howto/logging-cookbook.rst:3356 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:3117 +#: ../../howto/logging-cookbook.rst:3359 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:3120 +#: ../../howto/logging-cookbook.rst:3362 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:3124 +#: ../../howto/logging-cookbook.rst:3366 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:3127 +#: ../../howto/logging-cookbook.rst:3369 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 " @@ -1644,25 +1704,27 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: ../../howto/logging-cookbook.rst:3133 +#: ../../howto/logging-cookbook.rst:3375 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 " "confusion and wasted debugging time - log entries end up in unexpected " -"places, or are lost altogether." +"places, or are lost altogether. Or a file that was supposed to be moved " +"remains in place, and grows in size unexpectedly despite size-based rotation " +"being supposedly in place." msgstr "" -#: ../../howto/logging-cookbook.rst:3138 +#: ../../howto/logging-cookbook.rst:3382 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: ../../howto/logging-cookbook.rst:3142 +#: ../../howto/logging-cookbook.rst:3386 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: ../../howto/logging-cookbook.rst:3144 +#: ../../howto/logging-cookbook.rst:3388 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 " @@ -1673,12 +1735,12 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: ../../howto/logging-cookbook.rst:3154 +#: ../../howto/logging-cookbook.rst:3398 msgid "" "Adding handlers other than :class:`NullHandler` to a logger in a library" msgstr "" -#: ../../howto/logging-cookbook.rst:3156 +#: ../../howto/logging-cookbook.rst:3400 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -1686,11 +1748,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: ../../howto/logging-cookbook.rst:3163 +#: ../../howto/logging-cookbook.rst:3407 msgid "Creating a lot of loggers" msgstr "" -#: ../../howto/logging-cookbook.rst:3165 +#: ../../howto/logging-cookbook.rst:3409 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. " @@ -1700,3 +1762,15 @@ msgid "" "those describing areas within your application (generally modules, but " "occasionally slightly more fine-grained than that)." msgstr "" + +#: ../../howto/logging-cookbook.rst:3420 +msgid "Other resources" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3433 +msgid ":ref:`Basic Tutorial `" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3435 +msgid ":ref:`Advanced Tutorial `" +msgstr "" diff --git a/howto/logging.po b/howto/logging.po index d9e2d890000..c26b5eeb3ea 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-24 00:16+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -236,7 +236,7 @@ msgstr "" #: ../../howto/logging.rst:126 msgid "" "A very common situation is that of recording logging events in a file, so " -"let's look at that next. Be sure to try the following in a newly-started " +"let's look at that next. Be sure to try the following in a newly started " "Python interpreter, and don't just continue from the session described " "above::" msgstr "" diff --git a/howto/regex.po b/howto/regex.po index fb60f29e340..9fdd567b369 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-03 00:13+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1351,7 +1351,7 @@ msgstr "" #: ../../howto/regex.rst:952 msgid "" -"Named groups are handy because they let you use easily-remembered names, " +"Named groups are handy because they let you use easily remembered names, " "instead of having to remember numbers. Here's an example RE from the :mod:" "`imaplib` module::" msgstr "" diff --git a/howto/urllib2.po b/howto/urllib2.po index 74776189c3b..3fc3feb0ab3 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-06-27 09:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -387,7 +387,7 @@ msgstr "" #: ../../howto/urllib2.rst:422 msgid "" "When you fetch a URL you use an opener (an instance of the perhaps " -"confusingly-named :class:`urllib.request.OpenerDirector`). Normally we have " +"confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " "been using the default opener - via ``urlopen`` - but you can create custom " "openers. Openers use handlers. All the \"heavy lifting\" is done by the " "handlers. Each handler knows how to open URLs for a particular URL scheme " diff --git a/install/index.po b/install/index.po index 01318f33159..566b5c75de8 100644 --- a/install/index.po +++ b/install/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -109,7 +109,7 @@ msgid "" "Distutils. First, the distribution's name and version number will be " "featured prominently in the name of the downloaded archive, e.g. :file:" "`foo-1.0.tar.gz` or :file:`widget-0.9.7.zip`. Next, the archive will unpack " -"into a similarly-named directory: :file:`foo-1.0` or :file:`widget-0.9.7`. " +"into a similarly named directory: :file:`foo-1.0` or :file:`widget-0.9.7`. " "Additionally, the distribution will contain a setup script :file:`setup.py`, " "and a file named :file:`README.txt` or possibly just :file:`README`, which " "should explain that building and installing the module distribution is a " diff --git a/library/asynchat.po b/library/asynchat.po index efea4799047..aecb9d95f05 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-05-22 01:58+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -153,7 +153,7 @@ msgstr "" #: ../../library/asynchat.rst:127 msgid "" "Takes a producer object and adds it to the producer queue associated with " -"the channel. When all currently-pushed producers have been exhausted the " +"the channel. When all currently pushed producers have been exhausted the " "channel will consume this producer's data by calling its :meth:`more` method " "and send the data to the remote endpoint." msgstr "" diff --git a/library/custominterp.po b/library/custominterp.po index e089262f12d..b4f3155ece4 100644 --- a/library/custominterp.po +++ b/library/custominterp.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -28,7 +28,7 @@ msgid "" "Python's interactive interpreter. If you want a Python interpreter that " "supports some special feature in addition to the Python language, you should " "look at the :mod:`code` module. (The :mod:`codeop` module is lower-level, " -"used to support compiling a possibly-incomplete chunk of Python code.)" +"used to support compiling a possibly incomplete chunk of Python code.)" msgstr "" #: ../../library/custominterp.rst:13 diff --git a/library/dataclasses.po b/library/dataclasses.po index dbe48dc2150..538aa2b2d8f 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-10 00:10+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -770,3 +770,44 @@ msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "" + +#: ../../library/dataclasses.rst:731 +msgid "Descriptor-typed fields" +msgstr "" + +#: ../../library/dataclasses.rst:733 +msgid "" +"Fields that are assigned :ref:`descriptor objects ` as their " +"default value have the following special behaviors:" +msgstr "" + +#: ../../library/dataclasses.rst:736 +msgid "" +"The value for the field passed to the dataclass's ``__init__`` method is " +"passed to the descriptor's ``__set__`` method rather than overwriting the " +"descriptor object." +msgstr "" + +#: ../../library/dataclasses.rst:739 +msgid "" +"Similarly, when getting or setting the field, the descriptor's ``__get__`` " +"or ``__set__`` method is called rather than returning or overwriting the " +"descriptor object." +msgstr "" + +#: ../../library/dataclasses.rst:742 +msgid "" +"To determine whether a field contains a default value, ``dataclasses`` will " +"call the descriptor's ``__get__`` method using its class access form (i.e. " +"``descriptor.__get__(obj=None, type=cls)``. If the descriptor returns a " +"value in this case, it will be used as the field's default. On the other " +"hand, if the descriptor raises :exc:`AttributeError` in this situation, no " +"default value will be provided for the field." +msgstr "" + +#: ../../library/dataclasses.rst:777 +msgid "" +"Note that if a field is annotated with a descriptor type, but is not " +"assigned a descriptor object as its default value, the field will act like a " +"normal field." +msgstr "" diff --git a/library/decimal.po b/library/decimal.po index 8a47afc3584..8a88e7adb8b 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/decimal.py`" #: ../../library/decimal.rst:33 msgid "" -"The :mod:`decimal` module provides support for fast correctly-rounded " +"The :mod:`decimal` module provides support for fast correctly rounded " "decimal floating point arithmetic. It offers several advantages over the :" "class:`float` datatype:" msgstr "" @@ -1332,7 +1332,7 @@ msgid "" "With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " "be integral. The result will be inexact unless ``y`` is integral and the " "result is finite and can be expressed exactly in 'precision' digits. The " -"rounding mode of the context is used. Results are always correctly-rounded " +"rounding mode of the context is used. Results are always correctly rounded " "in the Python version." msgstr "" @@ -1344,9 +1344,9 @@ msgstr "" #: ../../library/decimal.rst:1364 msgid "" -"The C module computes :meth:`power` in terms of the correctly-rounded :meth:" +"The C module computes :meth:`power` in terms of the correctly rounded :meth:" "`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " -"always correctly-rounded\"." +"always correctly rounded\"." msgstr "" #: ../../library/decimal.rst:1369 @@ -1977,7 +1977,7 @@ msgid "" "A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " "the decimal module integrate the high speed `libmpdec `_ library for arbitrary precision " -"correctly-rounded decimal floating point arithmetic [#]_. ``libmpdec`` uses " +"correctly rounded decimal floating point arithmetic [#]_. ``libmpdec`` uses " "`Karatsuba multiplication `_ for medium-sized numbers and the `Number Theoretic " "Transform \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -280,28 +280,32 @@ msgstr "" #: ../../library/dis.rst:235 msgid "" -"This generator function uses the ``co_firstlineno`` and ``co_lnotab`` " -"attributes 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. " -"See :source:`Objects/lnotab_notes.txt` for the ``co_lnotab`` format and how " -"to decode it." +"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:241 +#: ../../library/dis.rst:239 msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "" -#: ../../library/dis.rst:247 +#: ../../library/dis.rst:242 +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:249 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:253 +#: ../../library/dis.rst:255 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: ../../library/dis.rst:255 +#: ../../library/dis.rst:257 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 " @@ -309,209 +313,209 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: ../../library/dis.rst:262 +#: ../../library/dis.rst:264 msgid "Added *jump* parameter." msgstr "新增 *jump* 參數。" -#: ../../library/dis.rst:269 +#: ../../library/dis.rst:271 msgid "Python Bytecode Instructions" msgstr "" -#: ../../library/dis.rst:271 +#: ../../library/dis.rst:273 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" msgstr "" -#: ../../library/dis.rst:276 +#: ../../library/dis.rst:278 msgid "Details for a bytecode operation" msgstr "" -#: ../../library/dis.rst:280 +#: ../../library/dis.rst:282 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:286 +#: ../../library/dis.rst:288 msgid "human readable name for operation" msgstr "" -#: ../../library/dis.rst:291 +#: ../../library/dis.rst:293 msgid "numeric argument to operation (if any), otherwise ``None``" msgstr "" -#: ../../library/dis.rst:296 +#: ../../library/dis.rst:298 msgid "resolved arg value (if known), otherwise same as arg" msgstr "" -#: ../../library/dis.rst:301 +#: ../../library/dis.rst:303 msgid "human readable description of operation argument" msgstr "" -#: ../../library/dis.rst:306 +#: ../../library/dis.rst:308 msgid "start index of operation within bytecode sequence" msgstr "" -#: ../../library/dis.rst:311 +#: ../../library/dis.rst:313 msgid "line started by this opcode (if any), otherwise ``None``" msgstr "" -#: ../../library/dis.rst:316 +#: ../../library/dis.rst:318 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: ../../library/dis.rst:321 +#: ../../library/dis.rst:323 msgid "" "The Python compiler currently generates the following bytecode instructions." msgstr "" -#: ../../library/dis.rst:324 +#: ../../library/dis.rst:326 msgid "**General instructions**" msgstr "" -#: ../../library/dis.rst:328 +#: ../../library/dis.rst:330 msgid "Do nothing code. Used as a placeholder by the bytecode optimizer." msgstr "" -#: ../../library/dis.rst:333 +#: ../../library/dis.rst:335 msgid "Removes the top-of-stack (TOS) item." msgstr "" -#: ../../library/dis.rst:338 +#: ../../library/dis.rst:340 msgid "Swaps the two top-most stack items." msgstr "" -#: ../../library/dis.rst:343 +#: ../../library/dis.rst:345 msgid "" "Lifts second and third stack item one position up, moves top down to " "position three." msgstr "" -#: ../../library/dis.rst:349 +#: ../../library/dis.rst:351 msgid "" "Lifts second, third and fourth stack items one position up, moves top down " "to position four." msgstr "" -#: ../../library/dis.rst:357 +#: ../../library/dis.rst:359 msgid "Duplicates the reference on top of the stack." msgstr "" -#: ../../library/dis.rst:364 +#: ../../library/dis.rst:366 msgid "" "Duplicates the two references on top of the stack, leaving them in the same " "order." msgstr "" -#: ../../library/dis.rst:370 +#: ../../library/dis.rst:372 msgid "**Unary operations**" msgstr "" -#: ../../library/dis.rst:372 +#: ../../library/dis.rst:374 msgid "" "Unary operations take the top of the stack, apply the operation, and push " "the result back on the stack." msgstr "" -#: ../../library/dis.rst:377 +#: ../../library/dis.rst:379 msgid "Implements ``TOS = +TOS``." msgstr "" -#: ../../library/dis.rst:382 +#: ../../library/dis.rst:384 msgid "Implements ``TOS = -TOS``." msgstr "" -#: ../../library/dis.rst:387 +#: ../../library/dis.rst:389 msgid "Implements ``TOS = not TOS``." msgstr "" -#: ../../library/dis.rst:392 +#: ../../library/dis.rst:394 msgid "Implements ``TOS = ~TOS``." msgstr "" -#: ../../library/dis.rst:397 +#: ../../library/dis.rst:399 msgid "Implements ``TOS = iter(TOS)``." msgstr "" -#: ../../library/dis.rst:402 +#: ../../library/dis.rst:404 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:408 +#: ../../library/dis.rst:410 msgid "**Binary operations**" msgstr "" -#: ../../library/dis.rst:410 +#: ../../library/dis.rst:412 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:416 +#: ../../library/dis.rst:418 msgid "Implements ``TOS = TOS1 ** TOS``." msgstr "" -#: ../../library/dis.rst:421 +#: ../../library/dis.rst:423 msgid "Implements ``TOS = TOS1 * TOS``." msgstr "" -#: ../../library/dis.rst:426 +#: ../../library/dis.rst:428 msgid "Implements ``TOS = TOS1 @ TOS``." msgstr "" -#: ../../library/dis.rst:433 +#: ../../library/dis.rst:435 msgid "Implements ``TOS = TOS1 // TOS``." msgstr "" -#: ../../library/dis.rst:438 +#: ../../library/dis.rst:440 msgid "Implements ``TOS = TOS1 / TOS``." msgstr "" -#: ../../library/dis.rst:443 +#: ../../library/dis.rst:445 msgid "Implements ``TOS = TOS1 % TOS``." msgstr "" -#: ../../library/dis.rst:448 +#: ../../library/dis.rst:450 msgid "Implements ``TOS = TOS1 + TOS``." msgstr "" -#: ../../library/dis.rst:453 +#: ../../library/dis.rst:455 msgid "Implements ``TOS = TOS1 - TOS``." msgstr "" -#: ../../library/dis.rst:458 +#: ../../library/dis.rst:460 msgid "Implements ``TOS = TOS1[TOS]``." msgstr "" -#: ../../library/dis.rst:463 +#: ../../library/dis.rst:465 msgid "Implements ``TOS = TOS1 << TOS``." msgstr "" -#: ../../library/dis.rst:468 +#: ../../library/dis.rst:470 msgid "Implements ``TOS = TOS1 >> TOS``." msgstr "" -#: ../../library/dis.rst:473 +#: ../../library/dis.rst:475 msgid "Implements ``TOS = TOS1 & TOS``." msgstr "" -#: ../../library/dis.rst:478 +#: ../../library/dis.rst:480 msgid "Implements ``TOS = TOS1 ^ TOS``." msgstr "" -#: ../../library/dis.rst:483 +#: ../../library/dis.rst:485 msgid "Implements ``TOS = TOS1 | TOS``." msgstr "" -#: ../../library/dis.rst:486 +#: ../../library/dis.rst:488 msgid "**In-place operations**" msgstr "" -#: ../../library/dis.rst:488 +#: ../../library/dis.rst:490 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-" @@ -519,92 +523,92 @@ msgid "" "to be) the original TOS1." msgstr "" -#: ../../library/dis.rst:495 +#: ../../library/dis.rst:497 msgid "Implements in-place ``TOS = TOS1 ** TOS``." msgstr "" -#: ../../library/dis.rst:500 +#: ../../library/dis.rst:502 msgid "Implements in-place ``TOS = TOS1 * TOS``." msgstr "" -#: ../../library/dis.rst:505 +#: ../../library/dis.rst:507 msgid "Implements in-place ``TOS = TOS1 @ TOS``." msgstr "" -#: ../../library/dis.rst:512 +#: ../../library/dis.rst:514 msgid "Implements in-place ``TOS = TOS1 // TOS``." msgstr "" -#: ../../library/dis.rst:517 +#: ../../library/dis.rst:519 msgid "Implements in-place ``TOS = TOS1 / TOS``." msgstr "" -#: ../../library/dis.rst:522 +#: ../../library/dis.rst:524 msgid "Implements in-place ``TOS = TOS1 % TOS``." msgstr "" -#: ../../library/dis.rst:527 +#: ../../library/dis.rst:529 msgid "Implements in-place ``TOS = TOS1 + TOS``." msgstr "" -#: ../../library/dis.rst:532 +#: ../../library/dis.rst:534 msgid "Implements in-place ``TOS = TOS1 - TOS``." msgstr "" -#: ../../library/dis.rst:537 +#: ../../library/dis.rst:539 msgid "Implements in-place ``TOS = TOS1 << TOS``." msgstr "" -#: ../../library/dis.rst:542 +#: ../../library/dis.rst:544 msgid "Implements in-place ``TOS = TOS1 >> TOS``." msgstr "" -#: ../../library/dis.rst:547 +#: ../../library/dis.rst:549 msgid "Implements in-place ``TOS = TOS1 & TOS``." msgstr "" -#: ../../library/dis.rst:552 +#: ../../library/dis.rst:554 msgid "Implements in-place ``TOS = TOS1 ^ TOS``." msgstr "" -#: ../../library/dis.rst:557 +#: ../../library/dis.rst:559 msgid "Implements in-place ``TOS = TOS1 | TOS``." msgstr "" -#: ../../library/dis.rst:562 +#: ../../library/dis.rst:564 msgid "Implements ``TOS1[TOS] = TOS2``." msgstr "" -#: ../../library/dis.rst:567 +#: ../../library/dis.rst:569 msgid "Implements ``del TOS1[TOS]``." msgstr "" -#: ../../library/dis.rst:570 +#: ../../library/dis.rst:572 msgid "**Coroutine opcodes**" msgstr "" -#: ../../library/dis.rst:574 +#: ../../library/dis.rst:576 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:584 +#: ../../library/dis.rst:586 msgid "Implements ``TOS = TOS.__aiter__()``." msgstr "" -#: ../../library/dis.rst:587 +#: ../../library/dis.rst:589 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: ../../library/dis.rst:594 +#: ../../library/dis.rst:596 msgid "" "Pushes ``get_awaitable(TOS.__anext__())`` to the stack. See " "``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -#: ../../library/dis.rst:602 +#: ../../library/dis.rst:604 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " "awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 7 values from " @@ -613,48 +617,48 @@ msgid "" "exception handler block is removed from the block stack." msgstr "" -#: ../../library/dis.rst:613 +#: ../../library/dis.rst:615 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:621 +#: ../../library/dis.rst:623 msgid "Creates a new frame object." msgstr "" -#: ../../library/dis.rst:627 +#: ../../library/dis.rst:629 msgid "**Miscellaneous opcodes**" msgstr "" -#: ../../library/dis.rst:631 +#: ../../library/dis.rst:633 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:638 +#: ../../library/dis.rst:640 msgid "" "Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." msgstr "" -#: ../../library/dis.rst:643 +#: ../../library/dis.rst:645 msgid "" "Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." msgstr "" -#: ../../library/dis.rst:648 +#: ../../library/dis.rst:650 msgid "" "Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " "comprehensions." msgstr "" -#: ../../library/dis.rst:652 +#: ../../library/dis.rst:654 msgid "Map value is TOS and map key is TOS1. Before, those were reversed." msgstr "" -#: ../../library/dis.rst:655 +#: ../../library/dis.rst:657 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 " @@ -662,19 +666,19 @@ msgid "" "further iterations of the loop." msgstr "" -#: ../../library/dis.rst:663 +#: ../../library/dis.rst:665 msgid "Returns with TOS to the caller of the function." msgstr "" -#: ../../library/dis.rst:668 +#: ../../library/dis.rst:670 msgid "Pops TOS and yields it from a :term:`generator`." msgstr "" -#: ../../library/dis.rst:673 +#: ../../library/dis.rst:675 msgid "Pops TOS and delegates to it as a subiterator from a :term:`generator`." msgstr "" -#: ../../library/dis.rst:680 +#: ../../library/dis.rst:682 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 " @@ -682,20 +686,20 @@ msgid "" "statically." msgstr "" -#: ../../library/dis.rst:690 +#: ../../library/dis.rst:692 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:697 +#: ../../library/dis.rst:699 msgid "" "Removes one block from the block stack. Per frame, there is a stack of " "blocks, denoting :keyword:`try` statements, and such." msgstr "" -#: ../../library/dis.rst:703 +#: ../../library/dis.rst:705 msgid "" "Removes one block from the block stack. The popped block must be an " "exception handler block, as implicitly created when entering an except " @@ -703,14 +707,14 @@ msgid "" "last three popped values are used to restore the exception state." msgstr "" -#: ../../library/dis.rst:711 +#: ../../library/dis.rst:713 msgid "" "Re-raises the exception currently on top of the stack. If oparg is non-zero, " "restores ``f_lasti`` of the current frame to its value when the exception " "was raised." msgstr "" -#: ../../library/dis.rst:719 +#: ../../library/dis.rst:721 msgid "" "Calls the function in position 7 on the stack with the top three items on " "the stack as arguments. Used to implement the call ``context_manager." @@ -718,19 +722,19 @@ msgid "" "statement." msgstr "" -#: ../../library/dis.rst:729 +#: ../../library/dis.rst:731 msgid "" "Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " "statement." msgstr "" -#: ../../library/dis.rst:737 +#: ../../library/dis.rst:739 msgid "" "Pushes :func:`builtins.__build_class__` onto the stack. It is later called " "by :opcode:`CALL_FUNCTION` to construct a class." msgstr "" -#: ../../library/dis.rst:743 +#: ../../library/dis.rst:745 msgid "" "This opcode performs several operations before a with block starts. First, " "it loads :meth:`~object.__exit__` from the context manager and pushes it " @@ -742,18 +746,18 @@ msgid "" "or :opcode:`UNPACK_SEQUENCE`)." msgstr "" -#: ../../library/dis.rst:757 +#: ../../library/dis.rst:759 msgid "" "TOS is a tuple of mapping keys, and TOS1 is the match subject. Replace TOS " "with a :class:`dict` formed from the items of TOS1, but without any of the " "keys in TOS." msgstr "" -#: ../../library/dis.rst:766 +#: ../../library/dis.rst:768 msgid "Push ``len(TOS)`` onto the stack." msgstr "" -#: ../../library/dis.rst:773 +#: ../../library/dis.rst:775 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:" @@ -761,7 +765,7 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:783 +#: ../../library/dis.rst:785 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 " @@ -770,7 +774,7 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:793 +#: ../../library/dis.rst:795 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 " @@ -778,30 +782,30 @@ msgid "" "followed by ``False``." msgstr "" -#: ../../library/dis.rst:801 +#: ../../library/dis.rst:803 msgid "All of the following opcodes use their arguments." msgstr "" -#: ../../library/dis.rst:805 +#: ../../library/dis.rst:807 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:812 +#: ../../library/dis.rst:814 msgid "" "Implements ``del name``, where *namei* is the index into :attr:`co_names` " "attribute of the code object." msgstr "" -#: ../../library/dis.rst:818 +#: ../../library/dis.rst:820 msgid "" "Unpacks TOS into *count* individual values, which are put onto the stack " "right-to-left." msgstr "" -#: ../../library/dis.rst:824 +#: ../../library/dis.rst:826 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 " @@ -809,119 +813,119 @@ msgid "" "leftover items." msgstr "" -#: ../../library/dis.rst:829 +#: ../../library/dis.rst:831 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:836 +#: ../../library/dis.rst:838 msgid "" "Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" "`co_names`." msgstr "" -#: ../../library/dis.rst:842 +#: ../../library/dis.rst:844 msgid "" "Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." msgstr "" -#: ../../library/dis.rst:847 +#: ../../library/dis.rst:849 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: ../../library/dis.rst:852 +#: ../../library/dis.rst:854 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: ../../library/dis.rst:857 +#: ../../library/dis.rst:859 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: ../../library/dis.rst:862 +#: ../../library/dis.rst:864 msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." msgstr "" -#: ../../library/dis.rst:867 +#: ../../library/dis.rst:869 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack." msgstr "" -#: ../../library/dis.rst:873 +#: ../../library/dis.rst:875 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: ../../library/dis.rst:878 +#: ../../library/dis.rst:880 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: ../../library/dis.rst:883 +#: ../../library/dis.rst:885 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:887 +#: ../../library/dis.rst:889 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: ../../library/dis.rst:894 +#: ../../library/dis.rst:896 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:903 +#: ../../library/dis.rst:905 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: ../../library/dis.rst:911 +#: ../../library/dis.rst:913 msgid "" "Pops a list from the stack and pushes a tuple containing the same values." msgstr "" -#: ../../library/dis.rst:918 +#: ../../library/dis.rst:920 msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." msgstr "" -#: ../../library/dis.rst:925 +#: ../../library/dis.rst:927 msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." msgstr "" -#: ../../library/dis.rst:932 +#: ../../library/dis.rst:934 msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." msgstr "" -#: ../../library/dis.rst:939 +#: ../../library/dis.rst:941 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: ../../library/dis.rst:946 +#: ../../library/dis.rst:948 msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." msgstr "" -#: ../../library/dis.rst:951 +#: ../../library/dis.rst:953 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname]``." msgstr "" -#: ../../library/dis.rst:957 +#: ../../library/dis.rst:959 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:964 +#: ../../library/dis.rst:966 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:971 +#: ../../library/dis.rst:973 msgid "" "Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide " "the *fromlist* and *level* arguments of :func:`__import__`. The module " @@ -930,48 +934,48 @@ msgid "" "modifies the namespace." msgstr "" -#: ../../library/dis.rst:980 +#: ../../library/dis.rst:982 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:987 +#: ../../library/dis.rst:989 msgid "Increments bytecode counter by *delta*." msgstr "" -#: ../../library/dis.rst:992 +#: ../../library/dis.rst:994 msgid "If TOS is true, sets the bytecode counter to *target*. TOS is popped." msgstr "" -#: ../../library/dis.rst:999 +#: ../../library/dis.rst:1001 msgid "If TOS is false, sets the bytecode counter to *target*. TOS is popped." msgstr "" -#: ../../library/dis.rst:1005 +#: ../../library/dis.rst:1007 msgid "" "Tests whether the second value on the stack is an exception matching TOS, " "and jumps if it is not. Pops two values from the stack." msgstr "" -#: ../../library/dis.rst:1013 +#: ../../library/dis.rst:1015 msgid "" "If TOS is true, sets the bytecode counter to *target* and leaves TOS on the " "stack. Otherwise (TOS is false), TOS is popped." msgstr "" -#: ../../library/dis.rst:1021 +#: ../../library/dis.rst:1023 msgid "" "If TOS is false, sets the bytecode counter to *target* and leaves TOS on the " "stack. Otherwise (TOS is true), TOS is popped." msgstr "" -#: ../../library/dis.rst:1029 +#: ../../library/dis.rst:1031 msgid "Set bytecode counter to *target*." msgstr "" -#: ../../library/dis.rst:1034 +#: ../../library/dis.rst:1036 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 " @@ -979,30 +983,30 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: ../../library/dis.rst:1042 +#: ../../library/dis.rst:1044 msgid "Loads the global named ``co_names[namei]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1047 +#: ../../library/dis.rst:1049 msgid "" "Pushes a try block from a try-finally or try-except clause onto the block " "stack. *delta* points to the finally block or the first except block." msgstr "" -#: ../../library/dis.rst:1053 +#: ../../library/dis.rst:1055 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1058 +#: ../../library/dis.rst:1060 msgid "Stores TOS into the local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1063 +#: ../../library/dis.rst:1065 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1068 +#: ../../library/dis.rst:1070 msgid "" "Pushes a reference to the cell contained in slot *i* of the cell and free " "variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is " @@ -1010,52 +1014,52 @@ msgid "" "len(co_cellvars)]``." msgstr "" -#: ../../library/dis.rst:1076 +#: ../../library/dis.rst:1078 msgid "" "Loads the cell contained in slot *i* of the cell and free variable storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: ../../library/dis.rst:1082 +#: ../../library/dis.rst:1084 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:1091 +#: ../../library/dis.rst:1093 msgid "" "Stores TOS into the cell contained in slot *i* of the cell and free variable " "storage." msgstr "" -#: ../../library/dis.rst:1097 +#: ../../library/dis.rst:1099 msgid "" "Empties the cell contained in slot *i* of the cell and free variable " "storage. Used by the :keyword:`del` statement." msgstr "" -#: ../../library/dis.rst:1105 +#: ../../library/dis.rst:1107 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: ../../library/dis.rst:1108 +#: ../../library/dis.rst:1110 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: ../../library/dis.rst:1109 +#: ../../library/dis.rst:1111 msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" msgstr "" -#: ../../library/dis.rst:1110 +#: ../../library/dis.rst:1112 msgid "" "2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1`` " "with ``__cause__`` set to ``TOS``)" msgstr "" -#: ../../library/dis.rst:1116 +#: ../../library/dis.rst:1118 msgid "" "Calls a callable object with positional arguments. *argc* indicates the " "number of positional arguments. The top of the stack contains positional " @@ -1065,11 +1069,11 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1124 +#: ../../library/dis.rst:1126 msgid "This opcode is used only for calls with positional arguments." msgstr "" -#: ../../library/dis.rst:1130 +#: ../../library/dis.rst:1132 msgid "" "Calls a callable object with positional (if any) and keyword arguments. " "*argc* indicates the total number of positional and keyword arguments. The " @@ -1083,13 +1087,13 @@ msgid "" "object." msgstr "" -#: ../../library/dis.rst:1142 +#: ../../library/dis.rst:1144 msgid "" "Keyword arguments are packed in a tuple instead of a dictionary, *argc* " "indicates the total number of arguments." msgstr "" -#: ../../library/dis.rst:1149 +#: ../../library/dis.rst:1151 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 " @@ -1101,7 +1105,7 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1164 +#: ../../library/dis.rst:1166 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 " @@ -1111,7 +1115,7 @@ msgid "" "lookup are pushed." msgstr "" -#: ../../library/dis.rst:1176 +#: ../../library/dis.rst:1178 msgid "" "Calls a method. *argc* is the number of positional arguments. Keyword " "arguments are not supported. This opcode is designed to be used with :" @@ -1121,50 +1125,50 @@ msgid "" "callable). All of them are popped and the return value is pushed." msgstr "" -#: ../../library/dis.rst:1188 +#: ../../library/dis.rst:1190 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:1191 +#: ../../library/dis.rst:1193 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: ../../library/dis.rst:1193 +#: ../../library/dis.rst:1195 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: ../../library/dis.rst:1194 +#: ../../library/dis.rst:1196 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: ../../library/dis.rst:1195 +#: ../../library/dis.rst:1197 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: ../../library/dis.rst:1196 +#: ../../library/dis.rst:1198 msgid "the code associated with the function (at TOS1)" msgstr "" -#: ../../library/dis.rst:1197 +#: ../../library/dis.rst:1199 msgid "the :term:`qualified name` of the function (at TOS)" msgstr "" -#: ../../library/dis.rst:1199 +#: ../../library/dis.rst:1201 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: ../../library/dis.rst:1206 +#: ../../library/dis.rst:1208 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:1213 +#: ../../library/dis.rst:1215 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 " @@ -1172,113 +1176,113 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: ../../library/dis.rst:1221 +#: ../../library/dis.rst:1223 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:1225 +#: ../../library/dis.rst:1227 msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." msgstr "" -#: ../../library/dis.rst:1226 +#: ../../library/dis.rst:1228 msgid "" "``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." msgstr "" -#: ../../library/dis.rst:1228 +#: ../../library/dis.rst:1230 msgid "" "``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1230 +#: ../../library/dis.rst:1232 msgid "" "``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1232 +#: ../../library/dis.rst:1234 msgid "" "``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use it, else " "use an empty *fmt_spec*." msgstr "" -#: ../../library/dis.rst:1235 +#: ../../library/dis.rst:1237 msgid "" "Formatting is performed using :c:func:`PyObject_Format`. The result is " "pushed on the stack." msgstr "" -#: ../../library/dis.rst:1243 +#: ../../library/dis.rst:1245 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:1247 +#: ../../library/dis.rst:1249 msgid "" "Pop TOS. If TOS2 is an instance of TOS1 and has the positional and keyword " "attributes required by *count* and TOS, set TOS to ``True`` and TOS1 to a " "tuple of extracted attributes. Otherwise, set TOS to ``False``." msgstr "" -#: ../../library/dis.rst:1255 +#: ../../library/dis.rst:1257 msgid "" "Pops TOS. The ``kind`` operand corresponds to the type of generator or " "coroutine. The legal kinds are 0 for generator, 1 for coroutine, and 2 for " "async generator." msgstr "" -#: ../../library/dis.rst:1264 +#: ../../library/dis.rst:1266 msgid "" "Lift the top *count* stack items one position up, and move TOS down to " "position *count*." msgstr "" -#: ../../library/dis.rst:1272 +#: ../../library/dis.rst:1274 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:1276 +#: ../../library/dis.rst:1278 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:1284 +#: ../../library/dis.rst:1286 msgid "Opcode collections" msgstr "" -#: ../../library/dis.rst:1286 +#: ../../library/dis.rst:1288 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../library/dis.rst:1291 +#: ../../library/dis.rst:1293 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../library/dis.rst:1296 +#: ../../library/dis.rst:1298 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../library/dis.rst:1301 +#: ../../library/dis.rst:1303 msgid "Sequence of all compare operation names." msgstr "" -#: ../../library/dis.rst:1306 +#: ../../library/dis.rst:1308 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../library/dis.rst:1311 +#: ../../library/dis.rst:1313 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 " @@ -1286,22 +1290,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: ../../library/dis.rst:1319 +#: ../../library/dis.rst:1321 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../library/dis.rst:1324 +#: ../../library/dis.rst:1326 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../library/dis.rst:1329 +#: ../../library/dis.rst:1331 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../library/dis.rst:1334 +#: ../../library/dis.rst:1336 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../library/dis.rst:1339 +#: ../../library/dis.rst:1341 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/library/doctest.po b/library/doctest.po index 1741a416317..813b983a9f6 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -540,7 +540,7 @@ msgstr "" #: ../../library/doctest.rst:567 msgid "" "When specified, doctests expecting exceptions pass so long as an exception " -"of the expected type is raised, even if the details (message and fully-" +"of the expected type is raised, even if the details (message and fully " "qualified exception name) don't match." msgstr "" @@ -548,7 +548,7 @@ msgstr "" msgid "" "For example, an example expecting ``ValueError: 42`` will pass if the actual " "exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" -"`TypeError` is raised instead. It will also ignore any fully-qualified name " +"`TypeError` is raised instead. It will also ignore any fully qualified name " "included before the exception class, which can vary between implementations " "and versions of Python and the code/libraries in use. Hence, all three of " "these variations will work with the flag specified:" diff --git a/library/glob.po b/library/glob.po index 891873ccabf..136d685b96a 100644 --- a/library/glob.po +++ b/library/glob.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -56,7 +56,7 @@ msgstr "" #: ../../library/glob.rst:44 msgid "" -"Return a possibly-empty list of path names that match *pathname*, which must " +"Return a possibly empty list of path names that match *pathname*, which must " "be a string containing a path specification. *pathname* can be either " "absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like :file:" "`../../Tools/\\*/\\*.gif`), and can contain shell-style wildcards. Broken " diff --git a/library/hmac.po b/library/hmac.po index 9847f0496d8..cb0c221a56b 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-03-30 00:16+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,7 +116,7 @@ msgstr "" #: ../../library/hmac.rst:72 msgid "" -"When comparing the output of :meth:`digest` to an externally-supplied digest " +"When comparing the output of :meth:`digest` to an externally supplied digest " "during a verification routine, it is recommended to use the :func:" "`compare_digest` function instead of the ``==`` operator to reduce the " "vulnerability to timing attacks." @@ -136,7 +136,7 @@ msgstr "" #: ../../library/hmac.rst:86 msgid "" -"When comparing the output of :meth:`hexdigest` to an externally-supplied " +"When comparing the output of :meth:`hexdigest` to an externally supplied " "digest during a verification routine, it is recommended to use the :func:" "`compare_digest` function instead of the ``==`` operator to reduce the " "vulnerability to timing attacks." @@ -151,8 +151,8 @@ msgid "" "efficiently compute the digests of strings that share a common initial " "substring." msgstr "" -"回傳 hmac 物件的拷貝 (\"clone\")。這可以被用來有效率地計算那些共享相同初始" -"子字串的字串的摘要。" +"回傳 hmac 物件的拷貝 (\"clone\")。這可以被用來有效率地計算那些共享相同初始子" +"字串的字串的摘要。" #: ../../library/hmac.rst:98 msgid "A hash object has the following attributes:" diff --git a/library/http.server.po b/library/http.server.po index 2a734e93d75..ce9bb0ad5fe 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-23 00:09+0000\n" +"POT-Creation-Date: 2022-07-02 00:16+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-" @@ -32,8 +32,8 @@ msgstr "" #: ../../library/http.server.rst:22 msgid "" -":mod:`http.server` is not recommended for production. It only implements " -"basic security checks." +":mod:`http.server` is not recommended for production. It only implements :" +"ref:`basic security checks `." msgstr "" #: ../../library/http.server.rst:25 @@ -586,3 +586,14 @@ msgid "" ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing " "the ``--cgi`` option::" msgstr "" + +#: ../../library/http.server.rst:495 +msgid "Security Considerations" +msgstr "" + +#: ../../library/http.server.rst:499 +msgid "" +":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling " +"requests, this makes it possible for files outside of the specified " +"directory to be served." +msgstr "" diff --git a/library/idle.po b/library/idle.po index 6076fb5d01b..2f18ce811a3 100644 --- a/library/idle.po +++ b/library/idle.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-27 07:52+0000\n" +"POT-Creation-Date: 2022-07-04 00:18+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-" @@ -716,7 +716,7 @@ msgid "" msgstr "" #: ../../library/idle.rst:361 -msgid "Context Menus" +msgid "Context menus" msgstr "" #: ../../library/idle.rst:363 @@ -778,7 +778,7 @@ msgid "" msgstr "" #: ../../library/idle.rst:402 -msgid "Editing and navigation" +msgid "Editing and Navigation" msgstr "" #: ../../library/idle.rst:405 @@ -1050,65 +1050,84 @@ msgid "" msgstr "" #: ../../library/idle.rst:580 -msgid "Python Shell window" +msgid "Shell window" msgstr "" #: ../../library/idle.rst:582 msgid "" -"With IDLE's Shell, one enters, edits, and recalls complete statements. Most " -"consoles and terminals only work with a single physical line at a time." +"In IDLE's Shell, enter, edit, and recall complete statements. (Most consoles " +"and terminals only work with a single physical line at a time)." msgstr "" #: ../../library/idle.rst:585 msgid "" +"Submit a single-line statement for execution by hitting :kbd:`Return` with " +"the cursor anywhere on the line. If a line is extended with Backslash (:kbd:" +"`\\\\`), the cursor must be on the last physical line. Submit a multi-line " +"compound statement by entering a blank line after the statement." +msgstr "" + +#: ../../library/idle.rst:591 +msgid "" "When one pastes code into Shell, it is not compiled and possibly executed " -"until one hits :kbd:`Return`. One may edit pasted code first. If one pastes " -"more that one statement into Shell, the result will be a :exc:`SyntaxError` " -"when multiple statements are compiled as if they were one." +"until one hits :kbd:`Return`, as specified above. One may edit pasted code " +"first. If one pastes more than one statement into Shell, the result will be " +"a :exc:`SyntaxError` when multiple statements are compiled as if they were " +"one." msgstr "" -#: ../../library/idle.rst:590 +#: ../../library/idle.rst:597 +msgid "" +"Lines containing ``RESTART`` mean that the user execution process has been " +"re-started. This occurs when the user execution process has crashed, when " +"one requests a restart on the Shell menu, or when one runs code in an editor " +"window." +msgstr "" + +#: ../../library/idle.rst:602 msgid "" "The editing features described in previous subsections work when entering " "code interactively. IDLE's Shell window also responds to the following keys." msgstr "" -#: ../../library/idle.rst:593 +#: ../../library/idle.rst:605 msgid ":kbd:`C-c` interrupts executing command" msgstr "" -#: ../../library/idle.rst:595 +#: ../../library/idle.rst:607 msgid "" ":kbd:`C-d` sends end-of-file; closes window if typed at a ``>>>`` prompt" msgstr "" -#: ../../library/idle.rst:597 +#: ../../library/idle.rst:609 msgid ":kbd:`Alt-/` (Expand word) is also useful to reduce typing" msgstr "" -#: ../../library/idle.rst:599 +#: ../../library/idle.rst:611 msgid "Command history" msgstr "" -#: ../../library/idle.rst:601 +#: ../../library/idle.rst:613 msgid "" ":kbd:`Alt-p` retrieves previous command matching what you have typed. On " "macOS use :kbd:`C-p`." msgstr "" -#: ../../library/idle.rst:604 +#: ../../library/idle.rst:616 msgid ":kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`." msgstr "" -#: ../../library/idle.rst:606 -msgid ":kbd:`Return` while on any previous command retrieves that command" +#: ../../library/idle.rst:618 +msgid "" +":kbd:`Return` while the cursor is on any previous command retrieves that " +"command" msgstr "" -#: ../../library/idle.rst:609 +#: ../../library/idle.rst:622 msgid "Text colors" msgstr "" -#: ../../library/idle.rst:611 +#: ../../library/idle.rst:624 msgid "" "Idle defaults to black on white text, but colors text with special meanings. " "For the shell, these are shell output, shell error, user output, and user " @@ -1118,7 +1137,7 @@ msgid "" "(when present), found text (when possible), and selected text." msgstr "" -#: ../../library/idle.rst:618 +#: ../../library/idle.rst:631 msgid "" "IDLE also highlights the :ref:`soft keywords ` :keyword:" "`match`, :keyword:`case `, and :keyword:`_ ` in " @@ -1127,7 +1146,7 @@ msgid "" "patterns." msgstr "" -#: ../../library/idle.rst:624 +#: ../../library/idle.rst:637 msgid "" "Text coloring is done in the background, so uncolorized text is occasionally " "visible. To change the color scheme, use the Configure IDLE dialog " @@ -1135,11 +1154,11 @@ msgid "" "and text in popups and dialogs is not user-configurable." msgstr "" -#: ../../library/idle.rst:631 -msgid "Startup and code execution" +#: ../../library/idle.rst:644 +msgid "Startup and Code Execution" msgstr "" -#: ../../library/idle.rst:633 +#: ../../library/idle.rst:646 msgid "" "Upon startup with the ``-s`` option, IDLE will execute the file referenced " "by the environment variables :envvar:`IDLESTARTUP` or :envvar:" @@ -1151,7 +1170,7 @@ msgid "" "modules." msgstr "" -#: ../../library/idle.rst:641 +#: ../../library/idle.rst:654 msgid "" "In addition, ``Tk`` also loads a startup file if it is present. Note that " "the Tk file is loaded unconditionally. This additional file is ``.Idle.py`` " @@ -1160,15 +1179,15 @@ msgid "" "importing functions to be used from IDLE's Python shell." msgstr "" -#: ../../library/idle.rst:648 +#: ../../library/idle.rst:661 msgid "Command line usage" msgstr "" -#: ../../library/idle.rst:664 +#: ../../library/idle.rst:677 msgid "If there are arguments:" msgstr "" -#: ../../library/idle.rst:666 +#: ../../library/idle.rst:679 msgid "" "If ``-``, ``-c``, or ``r`` is used, all arguments are placed in ``sys." "argv[1:...]`` and ``sys.argv[0]`` is set to ``''``, ``'-c'``, or ``'-r'``. " @@ -1176,17 +1195,17 @@ msgid "" "dialog." msgstr "" -#: ../../library/idle.rst:671 +#: ../../library/idle.rst:684 msgid "" "Otherwise, arguments are files opened for editing and ``sys.argv`` reflects " "the arguments passed to IDLE itself." msgstr "" -#: ../../library/idle.rst:675 +#: ../../library/idle.rst:688 msgid "Startup failure" msgstr "" -#: ../../library/idle.rst:677 +#: ../../library/idle.rst:690 msgid "" "IDLE uses a socket to communicate between the IDLE GUI process and the user " "code execution process. A connection must be established whenever the Shell " @@ -1196,7 +1215,7 @@ msgid "" "directs the user here. It then exits." msgstr "" -#: ../../library/idle.rst:684 +#: ../../library/idle.rst:697 msgid "" "One specific connection failure on Unix systems results from misconfigured " "masquerading rules somewhere in a system's network setup. When IDLE is " @@ -1206,7 +1225,7 @@ msgid "" "``tcplisten `` in another." msgstr "" -#: ../../library/idle.rst:692 +#: ../../library/idle.rst:705 msgid "" "A common cause of failure is a user-written file with the same name as a " "standard library module, such as *random.py* and *tkinter.py*. When such a " @@ -1215,7 +1234,7 @@ msgid "" "file." msgstr "" -#: ../../library/idle.rst:698 +#: ../../library/idle.rst:711 msgid "" "Though less common than in the past, an antivirus or firewall program may " "stop the connection. If the program cannot be taught to allow the " @@ -1225,7 +1244,7 @@ msgid "" "connections." msgstr "" -#: ../../library/idle.rst:705 +#: ../../library/idle.rst:718 msgid "" "Python installation issues occasionally stop IDLE: multiple versions can " "clash, or a single installation might need admin access. If one undo the " @@ -1233,7 +1252,7 @@ msgid "" "completely remove Python and start over." msgstr "" -#: ../../library/idle.rst:710 +#: ../../library/idle.rst:723 msgid "" "A zombie pythonw.exe process could be a problem. On Windows, use Task " "Manager to check for one and stop it if there is. Sometimes a restart " @@ -1242,7 +1261,7 @@ msgid "" "may fix a temporary problem." msgstr "" -#: ../../library/idle.rst:716 +#: ../../library/idle.rst:729 msgid "" "When IDLE first starts, it attempts to read user configuration files in ``~/." "idlerc/`` (~ is one's home directory). If there is a problem, an error " @@ -1253,14 +1272,14 @@ msgid "" "with the settings dialog." msgstr "" -#: ../../library/idle.rst:724 +#: ../../library/idle.rst:737 msgid "" "If IDLE quits with no message, and it was not started from a console, try " "starting it from a console or terminal (``python -m idlelib``) and see if " "this results in an error message." msgstr "" -#: ../../library/idle.rst:728 +#: ../../library/idle.rst:741 msgid "" "On Unix-based systems with tcl/tk older than ``8.6.11`` (see ``About IDLE``) " "certain characters of certain fonts can cause a tk failure with a message to " @@ -1269,11 +1288,11 @@ msgid "" "upgrade tcl/tk, then re-configure IDLE to use a font that works better." msgstr "" -#: ../../library/idle.rst:736 +#: ../../library/idle.rst:749 msgid "Running user code" msgstr "" -#: ../../library/idle.rst:738 +#: ../../library/idle.rst:751 msgid "" "With rare exceptions, the result of executing Python code with IDLE is " "intended to be the same as executing the same code by the default method, " @@ -1283,7 +1302,7 @@ msgid "" "``threading.active_count()`` returns 2 instead of 1." msgstr "" -#: ../../library/idle.rst:745 +#: ../../library/idle.rst:758 msgid "" "By default, IDLE runs user code in a separate OS process rather than in the " "user interface process that runs the shell and editor. In the execution " @@ -1293,7 +1312,7 @@ msgid "" "__stderr__`` are not touched, but may be ``None``." msgstr "" -#: ../../library/idle.rst:752 +#: ../../library/idle.rst:765 msgid "" "Sending print output from one process to a text widget in another is slower " "than printing to a system terminal in the same process. This has the most " @@ -1305,24 +1324,25 @@ msgid "" "fields and lines." msgstr "" -#: ../../library/idle.rst:761 +#: ../../library/idle.rst:774 msgid "" "IDLE's standard stream replacements are not inherited by subprocesses " "created in the execution process, whether directly by user code or by " "modules such as multiprocessing. If such subprocess use ``input`` from sys." "stdin or ``print`` or ``write`` to sys.stdout or sys.stderr, IDLE should be " -"started in a command line window. The secondary subprocess will then be " +"started in a command line window. (On Windows, use ``python`` or ``py`` " +"rather than ``pythonw`` or ``pyw``.) The secondary subprocess will then be " "attached to that window for input and output." msgstr "" -#: ../../library/idle.rst:768 +#: ../../library/idle.rst:783 msgid "" "If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``, " "IDLE's changes are lost and input from the keyboard and output to the screen " "will not work correctly." msgstr "" -#: ../../library/idle.rst:772 +#: ../../library/idle.rst:787 msgid "" "When Shell has the focus, it controls the keyboard and screen. This is " "normally transparent, but functions that directly access the keyboard and " @@ -1330,7 +1350,7 @@ msgid "" "determine whether a key has been pressed and if so, which." msgstr "" -#: ../../library/idle.rst:777 +#: ../../library/idle.rst:792 msgid "" "The IDLE code running in the execution process adds frames to the call stack " "that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and " @@ -1338,17 +1358,17 @@ msgid "" "frames." msgstr "" -#: ../../library/idle.rst:782 +#: ../../library/idle.rst:797 msgid "" "When user code raises SystemExit either directly or by calling sys.exit, " "IDLE returns to a Shell prompt instead of exiting." msgstr "" -#: ../../library/idle.rst:786 +#: ../../library/idle.rst:801 msgid "User output in Shell" msgstr "" -#: ../../library/idle.rst:788 +#: ../../library/idle.rst:803 msgid "" "When a program outputs text, the result is determined by the corresponding " "output device. When IDLE executes user code, ``sys.stdout`` and ``sys." @@ -1358,7 +1378,7 @@ msgid "" "rather than production runs." msgstr "" -#: ../../library/idle.rst:795 +#: ../../library/idle.rst:810 msgid "" "For instance, Shell never throws away output. A program that sends " "unlimited output to Shell will eventually fill memory, resulting in a memory " @@ -1367,7 +1387,7 @@ msgid "" "lines, with 300 the default." msgstr "" -#: ../../library/idle.rst:801 +#: ../../library/idle.rst:816 msgid "" "A Tk Text widget, and hence IDLE's Shell, displays characters (codepoints) " "in the BMP (Basic Multilingual Plane) subset of Unicode. Which characters " @@ -1381,7 +1401,7 @@ msgid "" "spacing behavior.) ::" msgstr "" -#: ../../library/idle.rst:819 +#: ../../library/idle.rst:834 msgid "" "The ``repr`` function is used for interactive echo of expression values. It " "returns an altered version of the input string in which control codes, some " @@ -1390,13 +1410,13 @@ msgid "" "regardless of how they are displayed." msgstr "" -#: ../../library/idle.rst:825 +#: ../../library/idle.rst:840 msgid "" "Normal and error output are generally kept separate (on separate lines) from " "code input and each other. They each get different highlight colors." msgstr "" -#: ../../library/idle.rst:828 +#: ../../library/idle.rst:843 msgid "" "For SyntaxError tracebacks, the normal '^' marking where the error was " "detected is replaced by coloring the text with an error highlight. When code " @@ -1405,7 +1425,7 @@ msgid "" "opened if necessary." msgstr "" -#: ../../library/idle.rst:834 +#: ../../library/idle.rst:849 msgid "" "Shell has a special facility for squeezing output lines down to a 'Squeezed " "text' label. This is done automatically for output over N lines (N = 50 by " @@ -1414,18 +1434,18 @@ msgid "" "on the output. This can be useful lines long enough to slow down scrolling." msgstr "" -#: ../../library/idle.rst:842 +#: ../../library/idle.rst:857 msgid "" "Squeezed output is expanded in place by double-clicking the label. It can " "also be sent to the clipboard or a separate view window by right-clicking " "the label." msgstr "" -#: ../../library/idle.rst:847 +#: ../../library/idle.rst:862 msgid "Developing tkinter applications" msgstr "" -#: ../../library/idle.rst:849 +#: ../../library/idle.rst:864 msgid "" "IDLE is intentionally different from standard Python in order to facilitate " "development of tkinter programs. Enter ``import tkinter as tk; root = tk." @@ -1437,7 +1457,7 @@ msgid "" "changes in standard Python until one enters ``root.update()``." msgstr "" -#: ../../library/idle.rst:858 +#: ../../library/idle.rst:873 msgid "" "Most tkinter programs run ``root.mainloop()``, which usually does not return " "until the tk app is destroyed. If the program is run with ``python -i`` or " @@ -1445,7 +1465,7 @@ msgid "" "``mainloop()`` returns, at which time there is nothing left to interact with." msgstr "" -#: ../../library/idle.rst:864 +#: ../../library/idle.rst:879 msgid "" "When running a tkinter program from an IDLE editor, one can comment out the " "mainloop call. One then gets a shell prompt immediately and can interact " @@ -1453,11 +1473,11 @@ msgid "" "mainloop call when running in standard Python." msgstr "" -#: ../../library/idle.rst:870 +#: ../../library/idle.rst:885 msgid "Running without a subprocess" msgstr "" -#: ../../library/idle.rst:872 +#: ../../library/idle.rst:887 msgid "" "By default, IDLE executes user code in a separate subprocess via a socket, " "which uses the internal loopback interface. This connection is not " @@ -1465,7 +1485,7 @@ msgid "" "firewall software complains anyway, you can ignore it." msgstr "" -#: ../../library/idle.rst:877 +#: ../../library/idle.rst:892 msgid "" "If the attempt to make the socket connection fails, Idle will notify you. " "Such failures are sometimes transient, but if persistent, the problem may be " @@ -1474,7 +1494,7 @@ msgid "" "command line switch." msgstr "" -#: ../../library/idle.rst:883 +#: ../../library/idle.rst:898 msgid "" "If IDLE is started with the -n command line switch it will run in a single " "process and will not create the subprocess which runs the RPC Python " @@ -1488,15 +1508,15 @@ msgid "" "at all possible." msgstr "" -#: ../../library/idle.rst:898 -msgid "Help and preferences" +#: ../../library/idle.rst:913 +msgid "Help and Preferences" msgstr "" -#: ../../library/idle.rst:903 +#: ../../library/idle.rst:918 msgid "Help sources" msgstr "" -#: ../../library/idle.rst:905 +#: ../../library/idle.rst:920 msgid "" "Help menu entry \"IDLE Help\" displays a formatted html version of the IDLE " "chapter of the Library Reference. The result, in a read-only tkinter text " @@ -1506,7 +1526,7 @@ msgid "" "the opened box." msgstr "" -#: ../../library/idle.rst:913 +#: ../../library/idle.rst:928 msgid "" "Help menu entry \"Python Docs\" opens the extensive sources of help, " "including tutorials, available at ``docs.python.org/x.y``, where 'x.y' is " @@ -1515,17 +1535,17 @@ msgid "" "instead." msgstr "" -#: ../../library/idle.rst:919 +#: ../../library/idle.rst:934 msgid "" "Selected URLs can be added or removed from the help menu at any time using " "the General tab of the Configure IDLE dialog." msgstr "" -#: ../../library/idle.rst:925 +#: ../../library/idle.rst:940 msgid "Setting preferences" msgstr "" -#: ../../library/idle.rst:927 +#: ../../library/idle.rst:942 msgid "" "The font preferences, highlighting, keys, and general preferences can be " "changed via Configure IDLE on the Option menu. Non-default user settings are " @@ -1534,7 +1554,7 @@ msgid "" "or more of the files in ``.idlerc``." msgstr "" -#: ../../library/idle.rst:933 +#: ../../library/idle.rst:948 msgid "" "On the Font tab, see the text sample for the effect of font face and size on " "multiple characters in multiple languages. Edit the sample to add other " @@ -1543,7 +1563,7 @@ msgid "" "them to the top of the sample and try changing first size and then font." msgstr "" -#: ../../library/idle.rst:940 +#: ../../library/idle.rst:955 msgid "" "On the Highlights and Keys tab, select a built-in or custom color theme and " "key set. To use a newer built-in color theme or key set with older IDLEs, " @@ -1551,22 +1571,22 @@ msgid "" "IDLEs." msgstr "" -#: ../../library/idle.rst:946 +#: ../../library/idle.rst:961 msgid "IDLE on macOS" msgstr "" -#: ../../library/idle.rst:948 +#: ../../library/idle.rst:963 msgid "" "Under System Preferences: Dock, one can set \"Prefer tabs when opening " "documents\" to \"Always\". This setting is not compatible with the tk/" "tkinter GUI framework used by IDLE, and it breaks a few IDLE features." msgstr "" -#: ../../library/idle.rst:953 +#: ../../library/idle.rst:968 msgid "Extensions" msgstr "" -#: ../../library/idle.rst:955 +#: ../../library/idle.rst:970 msgid "" "IDLE contains an extension facility. Preferences for extensions can be " "changed with the Extensions tab of the preferences dialog. See the beginning " diff --git a/library/importlib.po b/library/importlib.po index 94ad73a135d..aef447e603f 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-24 00:16+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -612,7 +612,7 @@ msgstr ":attr:`__package__`" #: ../../library/importlib.rst:450 msgid "" -"The fully-qualified name of the package under which the module was loaded as " +"The fully qualified name of the package under which the module was loaded as " "a submodule (or the empty string for top-level modules). For packages, it is " "the same as :attr:`__name__`. The :func:`importlib.util.module_for_loader` " "decorator can handle the details for :attr:`__package__`." @@ -1635,7 +1635,7 @@ msgid "(``__name__``)" msgstr "(``__name__``)" #: ../../library/importlib.rst:1413 -msgid "A string for the fully-qualified name of the module." +msgid "A string for the fully qualified name of the module." msgstr "" #: ../../library/importlib.rst:1417 @@ -1689,7 +1689,7 @@ msgstr "(``__package__``)" #: ../../library/importlib.rst:1453 msgid "" -"(Read-only) The fully-qualified name of the package under which the module " +"(Read-only) The fully qualified name of the package under which the module " "should be loaded as a submodule (or the empty string for top-level modules). " "For packages, it is the same as :attr:`__name__`." msgstr "" diff --git a/library/inspect.po b/library/inspect.po index 391f7c569a9..2dba689b4c3 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1463,7 +1463,7 @@ msgid "" msgstr "" #: ../../library/inspect.rst:1150 -msgid "Always, always, always returns a freshly-created dict." +msgid "Always, always, always returns a freshly created dict." msgstr "" #: ../../library/inspect.rst:1152 diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 566e366c9d1..3272fd14832 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-08 00:09+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1425,29 +1425,39 @@ msgstr "" #: ../../library/logging.handlers.rst:1036 msgid "" "The base implementation formats the record to merge the message, arguments, " -"and exception information, if present. It also removes unpickleable items " -"from the record in-place." +"exception and stack information, if present. It also removes unpickleable " +"items from the record in-place. Specifically, it overwrites the record's :" +"attr:`msg` and :attr:`message` attributes with the merged message (obtained " +"by calling the handler's :meth:`format` method), and sets the :attr:`args`, :" +"attr:`exc_info` and :attr:`exc_text` attributes to ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1040 +#: ../../library/logging.handlers.rst:1044 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:1046 +#: ../../library/logging.handlers.rst:1050 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:1055 +#: ../../library/logging.handlers.rst:1056 +msgid "" +"When created via configuration using :func:`~logging.config.dictConfig`, " +"this attribute will contain a :class:`QueueListener` instance for use with " +"this handler. Otherwise, it will be ``None``." +msgstr "" + +#: ../../library/logging.handlers.rst:1065 msgid "QueueListener" msgstr "QueueListener" -#: ../../library/logging.handlers.rst:1059 +#: ../../library/logging.handlers.rst:1069 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1458,7 +1468,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1067 +#: ../../library/logging.handlers.rst:1077 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 " @@ -1468,7 +1478,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1076 +#: ../../library/logging.handlers.rst:1086 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 " @@ -1479,7 +1489,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1084 +#: ../../library/logging.handlers.rst:1094 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 " @@ -1487,82 +1497,82 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1089 +#: ../../library/logging.handlers.rst:1099 msgid "The ``respect_handler_level`` argument was added." msgstr "新增 ``respect_handler_level`` 引數。" -#: ../../library/logging.handlers.rst:1094 +#: ../../library/logging.handlers.rst:1104 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1096 +#: ../../library/logging.handlers.rst:1106 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:1102 +#: ../../library/logging.handlers.rst:1112 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1104 +#: ../../library/logging.handlers.rst:1114 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:1110 +#: ../../library/logging.handlers.rst:1120 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1112 +#: ../../library/logging.handlers.rst:1122 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:1118 +#: ../../library/logging.handlers.rst:1128 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1120 +#: ../../library/logging.handlers.rst:1130 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1125 +#: ../../library/logging.handlers.rst:1135 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1127 +#: ../../library/logging.handlers.rst:1137 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:1133 +#: ../../library/logging.handlers.rst:1143 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:1144 +#: ../../library/logging.handlers.rst:1154 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.handlers.rst:1144 +#: ../../library/logging.handlers.rst:1154 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1146 +#: ../../library/logging.handlers.rst:1156 msgid "Module :mod:`logging.config`" msgstr ":mod:`logging.config` 模組" -#: ../../library/logging.handlers.rst:1147 +#: ../../library/logging.handlers.rst:1157 msgid "Configuration API for the logging module." msgstr "" diff --git a/library/logging.po b/library/logging.po index 9c70a33b41c..84d40bbb1bc 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-11 00:15+0000\n" +"POT-Creation-Date: 2022-07-05 00:15+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-" @@ -318,11 +318,11 @@ msgstr "" msgid "would print something like" msgstr "" -#: ../../library/logging.rst:235 ../../library/logging.rst:1035 +#: ../../library/logging.rst:235 msgid "" "The keys in the dictionary passed in *extra* should not clash with the keys " -"used by the logging system. (See the :class:`Formatter` documentation for " -"more information on which keys are used by the logging system.)" +"used by the logging system. (See the section on :ref:`logrecord-attributes` " +"for more information on which keys are used by the logging system.)" msgstr "" #: ../../library/logging.rst:239 @@ -1470,6 +1470,13 @@ msgstr "" msgid "would print something like:" msgstr "" +#: ../../library/logging.rst:1035 +msgid "" +"The keys in the dictionary passed in *extra* should not clash with the keys " +"used by the logging system. (See the :class:`Formatter` documentation for " +"more information on which keys are used by the logging system.)" +msgstr "" + #: ../../library/logging.rst:1039 msgid "" "If you choose to use these attributes in logged messages, you need to " diff --git a/library/mailbox.po b/library/mailbox.po index d9d84852bbf..5887ecb5f9c 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1732,7 +1732,7 @@ msgstr "" msgid "" "Raised when some mailbox-related condition beyond the control of the program " "causes it to be unable to proceed, such as when failing to acquire a lock " -"that another program already holds a lock, or when a uniquely-generated file " +"that another program already holds a lock, or when a uniquely generated file " "name already exists." msgstr "" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 2e35255491a..d92e892a13d 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-01 00:17+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-" @@ -97,7 +97,7 @@ msgstr "" #: ../../library/multiprocessing.rst:99 msgid "" -"The parent process starts a fresh python interpreter process. The child " +"The parent process starts a fresh Python interpreter process. The child " "process will only inherit those resources necessary to run the process " "object's :meth:`~Process.run` method. In particular, unnecessary file " "descriptors and handles from the parent process will not be inherited. " diff --git a/library/optparse.po b/library/optparse.po index 2ce5aa0f2f7..6234dcacf3d 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -670,7 +670,7 @@ msgstr "" #: ../../library/optparse.rst:532 msgid "" -"options that take a value indicate this fact in their automatically-" +"options that take a value indicate this fact in their automatically " "generated help message, e.g. for the \"mode\" option::" msgstr "" @@ -681,7 +681,7 @@ msgid "" "`optparse` converts the destination variable name to uppercase and uses that " "for the meta-variable. Sometimes, that's not what you want---for example, " "the ``--filename`` option explicitly sets ``metavar=\"FILE\"``, resulting in " -"this automatically-generated option description::" +"this automatically generated option description::" msgstr "" #: ../../library/optparse.rst:546 @@ -1769,7 +1769,7 @@ msgstr "" #: ../../library/optparse.rst:1452 msgid "" -"At this point, :mod:`optparse` detects that a previously-added option is " +"At this point, :mod:`optparse` detects that a previously added option is " "already using the ``-n`` option string. Since ``conflict_handler`` is ``" "\"resolve\"``, it resolves the situation by removing ``-n`` from the earlier " "option's list of option strings. Now ``--dry-run`` is the only way for the " @@ -1779,7 +1779,7 @@ msgstr "" #: ../../library/optparse.rst:1463 msgid "" -"It's possible to whittle away the option strings for a previously-added " +"It's possible to whittle away the option strings for a previously added " "option until there are none left, and the user has no way of invoking that " "option from the command-line. In that case, :mod:`optparse` removes that " "option completely, so it doesn't show up in help text or anywhere else. " diff --git a/library/os.po b/library/os.po index da252c26aa9..ae26278dd88 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -2288,7 +2288,7 @@ msgstr "" msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " -"interpreted. To set the file permission bits of any newly-created parent " +"interpreted. To set the file permission bits of any newly created parent " "directories you can set the umask before invoking :func:`makedirs`. The " "file permission bits of existing parent directories are not changed." msgstr "" @@ -2323,7 +2323,7 @@ msgstr "" #: ../../library/os.rst:2118 msgid "" -"The *mode* argument no longer affects the file permission bits of newly-" +"The *mode* argument no longer affects the file permission bits of newly " "created intermediate-level directories." msgstr "" diff --git a/library/py_compile.po b/library/py_compile.po index 06068bc01e6..0f97c857d52 100644 --- a/library/py_compile.po +++ b/library/py_compile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-06-30 00:15+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-" @@ -52,15 +52,16 @@ msgid "" "written to *cfile*, which defaults to the :pep:`3147`/:pep:`488` path, " "ending in ``.pyc``. For example, if *file* is ``/foo/bar/baz.py`` *cfile* " "will default to ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. " -"If *dfile* is specified, it is used as the name of the source file in error " -"messages instead of *file*. If *doraise* is true, a :exc:`PyCompileError` " -"is raised when an error is encountered while compiling *file*. If *doraise* " -"is false (the default), an error string is written to ``sys.stderr``, but no " -"exception is raised. This function returns the path to byte-compiled file, " -"i.e. whatever *cfile* value was used." +"If *dfile* is specified, it is used instead of *file* as the name of the " +"source file from which source lines are obtained for display in exception " +"tracebacks. If *doraise* is true, a :exc:`PyCompileError` is raised when an " +"error is encountered while compiling *file*. If *doraise* is false (the " +"default), an error string is written to ``sys.stderr``, but no exception is " +"raised. This function returns the path to byte-compiled file, i.e. whatever " +"*cfile* value was used." msgstr "" -#: ../../library/py_compile.rst:45 +#: ../../library/py_compile.rst:46 msgid "" "The *doraise* and *quiet* arguments determine how errors are handled while " "compiling file. If *quiet* is 0 or 1, and *doraise* is false, the default " @@ -70,7 +71,7 @@ msgid "" "written, and *doraise* has no effect." msgstr "" -#: ../../library/py_compile.rst:52 +#: ../../library/py_compile.rst:53 msgid "" "If the path that *cfile* becomes (either explicitly specified or computed) " "is a symlink or non-regular file, :exc:`FileExistsError` will be raised. " @@ -80,14 +81,14 @@ msgid "" "file into place to prevent concurrent file writing issues." msgstr "" -#: ../../library/py_compile.rst:59 +#: ../../library/py_compile.rst:60 msgid "" "*optimize* controls the optimization level and is passed to the built-in :" "func:`compile` function. The default of ``-1`` selects the optimization " "level of the current interpreter." msgstr "" -#: ../../library/py_compile.rst:63 +#: ../../library/py_compile.rst:64 msgid "" "*invalidation_mode* should be a member of the :class:`PycInvalidationMode` " "enum and controls how the generated bytecode cache is invalidated at " @@ -96,14 +97,14 @@ msgid "" "default is :attr:`PycInvalidationMode.TIMESTAMP`." msgstr "" -#: ../../library/py_compile.rst:69 +#: ../../library/py_compile.rst:70 msgid "" "Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous " "default was *file* + ``'c'`` (``'o'`` if optimization was enabled). Also " "added the *optimize* parameter." msgstr "" -#: ../../library/py_compile.rst:74 +#: ../../library/py_compile.rst:75 msgid "" "Changed code to use :mod:`importlib` for the byte-code cache file writing. " "This means file creation/writing semantics now match what :mod:`importlib` " @@ -112,7 +113,7 @@ msgid "" "file." msgstr "" -#: ../../library/py_compile.rst:81 +#: ../../library/py_compile.rst:82 msgid "" "The *invalidation_mode* parameter was added as specified in :pep:`552`. If " "the :envvar:`SOURCE_DATE_EPOCH` environment variable is set, " @@ -120,18 +121,18 @@ msgid "" "CHECKED_HASH`." msgstr "" -#: ../../library/py_compile.rst:87 +#: ../../library/py_compile.rst:88 msgid "" "The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer overrides the " "value of the *invalidation_mode* argument, and determines its default value " "instead." msgstr "" -#: ../../library/py_compile.rst:92 +#: ../../library/py_compile.rst:93 msgid "The *quiet* parameter was added." msgstr "新增 *quiet* 參數。" -#: ../../library/py_compile.rst:98 +#: ../../library/py_compile.rst:99 msgid "" "A enumeration of possible methods the interpreter can use to determine " "whether a bytecode file is up to date with a source file. The ``.pyc`` file " @@ -140,38 +141,38 @@ msgid "" "at runtime." msgstr "" -#: ../../library/py_compile.rst:108 +#: ../../library/py_compile.rst:109 msgid "" "The ``.pyc`` file includes the timestamp and size of the source file, which " "Python will compare against the metadata of the source file at runtime to " "determine if the ``.pyc`` file needs to be regenerated." msgstr "" -#: ../../library/py_compile.rst:114 +#: ../../library/py_compile.rst:115 msgid "" "The ``.pyc`` file includes a hash of the source file content, which Python " "will compare against the source at runtime to determine if the ``.pyc`` file " "needs to be regenerated." msgstr "" -#: ../../library/py_compile.rst:120 +#: ../../library/py_compile.rst:121 msgid "" "Like :attr:`CHECKED_HASH`, the ``.pyc`` file includes a hash of the source " "file content. However, Python will at runtime assume the ``.pyc`` file is up " "to date and not validate the ``.pyc`` against the source file at all." msgstr "" -#: ../../library/py_compile.rst:124 +#: ../../library/py_compile.rst:125 msgid "" "This option is useful when the ``.pycs`` are kept up to date by some system " "external to Python like a build system." msgstr "" -#: ../../library/py_compile.rst:129 +#: ../../library/py_compile.rst:130 msgid "Command-Line Interface" msgstr "" -#: ../../library/py_compile.rst:131 +#: ../../library/py_compile.rst:132 msgid "" "This module can be invoked as a script to compile several source files. The " "files named in *filenames* are compiled and the resulting bytecode is cached " @@ -180,28 +181,28 @@ msgid "" "status is nonzero if one of the files could not be compiled." msgstr "" -#: ../../library/py_compile.rst:143 +#: ../../library/py_compile.rst:144 msgid "" "Positional arguments are files to compile. If ``-`` is the only parameter, " "the list of files is taken from standard input." msgstr "" -#: ../../library/py_compile.rst:148 +#: ../../library/py_compile.rst:149 msgid "Suppress errors output." msgstr "" -#: ../../library/py_compile.rst:150 +#: ../../library/py_compile.rst:151 msgid "Added support for ``-``." msgstr "新增對 ``-`` 的支援。" -#: ../../library/py_compile.rst:153 +#: ../../library/py_compile.rst:154 msgid "Added support for :option:`-q`." msgstr "新增對 :option:`-q` 的支援。" -#: ../../library/py_compile.rst:159 +#: ../../library/py_compile.rst:160 msgid "Module :mod:`compileall`" msgstr ":mod:`compileall` 模組" -#: ../../library/py_compile.rst:160 +#: ../../library/py_compile.rst:161 msgid "Utilities to compile all Python source files in a directory tree." msgstr "" diff --git a/library/queue.po b/library/queue.po index ad88e74bc6f..ec99aec72e8 100644 --- a/library/queue.po +++ b/library/queue.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-15 00:13+0000\n" +"POT-Creation-Date: 2022-07-02 00:16+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-" @@ -189,7 +189,7 @@ msgid "" "`KeyboardInterrupt`." msgstr "" -#: ../../library/queue.rst:161 ../../library/queue.rst:267 +#: ../../library/queue.rst:161 ../../library/queue.rst:268 msgid "Equivalent to ``get(False)``." msgstr "" @@ -236,29 +236,29 @@ msgstr "" msgid "Example of how to wait for enqueued tasks to be completed::" msgstr "" -#: ../../library/queue.rst:217 +#: ../../library/queue.rst:218 msgid "SimpleQueue Objects" msgstr "SimpleQueue 物件" -#: ../../library/queue.rst:219 +#: ../../library/queue.rst:220 msgid "" ":class:`SimpleQueue` objects provide the public methods described below." msgstr "" -#: ../../library/queue.rst:223 +#: ../../library/queue.rst:224 msgid "" "Return the approximate size of the queue. Note, qsize() > 0 doesn't " "guarantee that a subsequent get() will not block." msgstr "" -#: ../../library/queue.rst:229 +#: ../../library/queue.rst:230 msgid "" "Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " "returns ``False`` it doesn't guarantee that a subsequent call to get() will " "not block." msgstr "" -#: ../../library/queue.rst:236 +#: ../../library/queue.rst:237 msgid "" "Put *item* into the queue. The method never blocks and always succeeds " "(except for potential low-level errors such as failure to allocate memory). " @@ -266,13 +266,13 @@ msgid "" "compatibility with :meth:`Queue.put`." msgstr "" -#: ../../library/queue.rst:251 +#: ../../library/queue.rst:252 msgid "" "Equivalent to ``put(item, block=False)``, provided for compatibility with :" "meth:`Queue.put_nowait`." msgstr "" -#: ../../library/queue.rst:257 +#: ../../library/queue.rst:258 msgid "" "Remove and return an item from the queue. If optional args *block* is true " "and *timeout* is ``None`` (the default), block if necessary until an item is " @@ -283,17 +283,17 @@ msgid "" "ignored in that case)." msgstr "" -#: ../../library/queue.rst:274 +#: ../../library/queue.rst:275 msgid "Class :class:`multiprocessing.Queue`" msgstr ":class:`multiprocessing.Queue` 類型" -#: ../../library/queue.rst:273 +#: ../../library/queue.rst:274 msgid "" "A queue class for use in a multi-processing (rather than multi-threading) " "context." msgstr "" -#: ../../library/queue.rst:276 +#: ../../library/queue.rst:277 msgid "" ":class:`collections.deque` is an alternative implementation of unbounded " "queues with fast atomic :meth:`~collections.deque.append` and :meth:" diff --git a/library/secrets.po b/library/secrets.po index 7f9a43dc1b3..36f4efafc8b 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-07 00:13+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-06-11 14:07+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -71,7 +71,7 @@ msgstr "" "`random.SystemRandom` 以獲取更多細節。" #: ../../library/secrets.rst:47 -msgid "Return a randomly-chosen element from a non-empty sequence." +msgid "Return a randomly chosen element from a non-empty sequence." msgstr "從一非空序列中,回傳一個隨機選取的元素。" #: ../../library/secrets.rst:51 @@ -204,7 +204,7 @@ msgstr "產生八個字元長的字母數字密碼:" msgid "" "Applications should not `store passwords in a recoverable format `_, whether plain text or encrypted. " -"They should be salted and hashed using a cryptographically-strong one-way " +"They should be salted and hashed using a cryptographically strong one-way " "(irreversible) hash function." msgstr "" "應用程式不能\\ `以可復原的格式存儲密碼 \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -45,7 +45,8 @@ msgstr "" #: ../../library/security_warnings.rst:16 msgid "" ":mod:`http.server` is not suitable for production use, only implementing " -"basic security checks" +"basic security checks. See the :ref:`security considerations `." msgstr "" #: ../../library/security_warnings.rst:18 diff --git a/library/select.po b/library/select.po index fdcc7f84793..a83216a4d2d 100644 --- a/library/select.po +++ b/library/select.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-24 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -301,7 +301,7 @@ msgstr "" #: ../../library/select.rst:255 msgid "" -"Polls the set of registered file descriptors, and returns a possibly-empty " +"Polls the set of registered file descriptors, and returns a possibly empty " "list containing ``(fd, event)`` 2-tuples for the descriptors that have " "events or errors to report. *fd* is the file descriptor, and *event* is a " "bitmask with bits set for the reported events for that descriptor --- :const:" @@ -601,7 +601,7 @@ msgstr "" #: ../../library/select.rst:443 msgid "" -"Polls the set of registered file descriptors, and returns a possibly-empty " +"Polls the set of registered file descriptors, and returns a possibly empty " "list containing ``(fd, event)`` 2-tuples for the descriptors that have " "events or errors to report. *fd* is the file descriptor, and *event* is a " "bitmask with bits set for the reported events for that descriptor --- :const:" diff --git a/library/shutil.po b/library/shutil.po index 7191ad0c735..4d73e41bc1c 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-23 00:14+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -250,7 +250,7 @@ msgstr "" #: ../../library/shutil.rst:195 msgid "" "When *follow_symlinks* is false, and *src* is a symbolic link, :func:`copy2` " -"attempts to copy all metadata from the *src* symbolic link to the newly-" +"attempts to copy all metadata from the *src* symbolic link to the newly " "created *dst* symbolic link. However, this functionality is not available on " "all platforms. On platforms where some or all of this functionality is " "unavailable, :func:`copy2` will preserve all the metadata it can; :func:" diff --git a/library/smtpd.po b/library/smtpd.po index 64f477a397a..8ee34981e96 100644 --- a/library/smtpd.po +++ b/library/smtpd.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-05-22 02:12+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -330,7 +330,7 @@ msgstr "" #: ../../library/smtpd.rst:249 msgid "" -"Holds the fully-qualified domain name of the server as returned by :func:" +"Holds the fully qualified domain name of the server as returned by :func:" "`socket.getfqdn`." msgstr "" diff --git a/library/socket.po b/library/socket.po index 7e858868fb2..471e5130ef9 100644 --- a/library/socket.po +++ b/library/socket.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -211,7 +211,7 @@ msgstr "" msgid "" "A string or a tuple ``(id, unit)`` is used for the :const:`SYSPROTO_CONTROL` " "protocol of the :const:`PF_SYSTEM` family. The string is the name of a " -"kernel control using a dynamically-assigned ID. The tuple can be used if ID " +"kernel control using a dynamically assigned ID. The tuple can be used if ID " "and unit number of the kernel control are known or if a registered ID is " "used." msgstr "" @@ -1036,7 +1036,7 @@ msgstr "" #: ../../library/socket.rst:871 msgid "" "Translate a socket address *sockaddr* into a 2-tuple ``(host, port)``. " -"Depending on the settings of *flags*, the result can contain a fully-" +"Depending on the settings of *flags*, the result can contain a fully " "qualified domain name or numeric address representation in *host*. " "Similarly, *port* can contain a string port name or a numeric port number." msgstr "" diff --git a/library/sqlite3.po b/library/sqlite3.po index e6d7e474121..38bc541c520 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-26 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -656,7 +656,7 @@ msgstr "" #: ../../library/sqlite3.rst:583 msgid "" "If returning a tuple doesn't suffice and you want name-based access to " -"columns, you should consider setting :attr:`row_factory` to the highly-" +"columns, you should consider setting :attr:`row_factory` to the highly " "optimized :class:`sqlite3.Row` type. :class:`Row` provides both index-based " "and case-insensitive name-based access to columns with almost no memory " "overhead. It will probably be better than your own custom dictionary-based " diff --git a/library/struct.po b/library/struct.po index 762fd3a234b..c6cbe95dbdf 100644 --- a/library/struct.po +++ b/library/struct.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-10 00:16+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -105,7 +105,7 @@ msgstr "" #: ../../library/struct.rst:83 msgid "" "Iteratively unpack from the buffer *buffer* according to the format string " -"*format*. This function returns an iterator which will read equally-sized " +"*format*. This function returns an iterator which will read equally sized " "chunks from the buffer until all its contents have been consumed. The " "buffer's size in bytes must be a multiple of the size required by the " "format, as reflected by :func:`calcsize`." diff --git a/library/subprocess.po b/library/subprocess.po index 666aa9b6e44..b0dc28bb93e 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -397,7 +397,7 @@ msgstr "" #: ../../library/subprocess.rst:361 msgid "" -"For maximum reliability, use a fully-qualified path for the executable. To " +"For maximum reliability, use a fully qualified path for the executable. To " "search for an unqualified name on :envvar:`PATH`, use :meth:`shutil.which`. " "On all platforms, passing :data:`sys.executable` is the recommended way to " "launch the current Python interpreter again, and use the ``-m`` command-line " diff --git a/library/tarfile.po b/library/tarfile.po index 3eac5c682fc..801642bd64d 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1032,7 +1032,7 @@ msgid "" "large files and stores pathnames in a portable way. Modern tar " "implementations, including GNU tar, bsdtar/libarchive and star, fully " "support extended *pax* features; some old or unmaintained libraries may not, " -"but should treat *pax* archives as if they were in the universally-supported " +"but should treat *pax* archives as if they were in the universally supported " "*ustar* format. It is the current default format for new archives." msgstr "" diff --git a/library/tkinter.ttk.po b/library/tkinter.ttk.po index 0874ac3b978..2903a2b6945 100644 --- a/library/tkinter.ttk.po +++ b/library/tkinter.ttk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-24 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -492,7 +492,7 @@ msgstr "" msgid "" "Modify or inquire widget state. If *statespec* is specified, sets the widget " "state according to it and return a new *statespec* indicating which flags " -"were changed. If *statespec* is not specified, returns the currently-enabled " +"were changed. If *statespec* is not specified, returns the currently enabled " "state flags." msgstr "" @@ -749,7 +749,7 @@ msgstr "" msgid "" "Ttk Notebook widget manages a collection of windows and displays a single " "one at a time. Each child window is associated with a tab, which the user " -"may select to change the currently-displayed window." +"may select to change the currently displayed window." msgstr "" #: ../../library/tkinter.ttk.rst:483 @@ -859,7 +859,7 @@ msgstr "" #: ../../library/tkinter.ttk.rst:548 msgid "" -"The literal string \"current\", which identifies the currently-selected tab" +"The literal string \"current\", which identifies the currently selected tab" msgstr "" #: ../../library/tkinter.ttk.rst:549 @@ -942,7 +942,7 @@ msgstr "" #: ../../library/tkinter.ttk.rst:617 msgid "" -"The associated child window will be displayed, and the previously-selected " +"The associated child window will be displayed, and the previously selected " "window (if different) is unmapped. If *tab_id* is omitted, returns the " "widget name of the currently selected pane." msgstr "" diff --git a/library/urllib.request.po b/library/urllib.request.po index d09736df0cf..c8ac19886ff 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1514,7 +1514,7 @@ msgstr "" #: ../../library/urllib.request.rst:1271 msgid "" "This example replaces the default :class:`ProxyHandler` with one that uses " -"programmatically-supplied proxy URLs, and adds proxy authorization support " +"programmatically supplied proxy URLs, and adds proxy authorization support " "with :class:`ProxyBasicAuthHandler`. ::" msgstr "" diff --git a/library/uuid.po b/library/uuid.po index a62f1631d6f..57aa106c0f1 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-15 00:10+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -272,7 +272,7 @@ msgstr "" #: ../../library/uuid.rst:214 msgid "" -"When this namespace is specified, the *name* string is a fully-qualified " +"When this namespace is specified, the *name* string is a fully qualified " "domain name." msgstr "" diff --git a/library/warnings.po b/library/warnings.po index 88f458afb72..9a502df8b04 100644 --- a/library/warnings.po +++ b/library/warnings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-01 05:12+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -330,8 +330,8 @@ msgstr "" #: ../../library/warnings.rst:165 msgid "" "*module* is a string containing a regular expression that the start of the " -"fully-qualified module name must match, case-sensitively. In :option:`-W` " -"and :envvar:`PYTHONWARNINGS`, *module* is a literal string that the fully-" +"fully qualified module name must match, case-sensitively. In :option:`-W` " +"and :envvar:`PYTHONWARNINGS`, *module* is a literal string that the fully " "qualified module name must be equal to (case-sensitively), ignoring any " "whitespace at the start or end of *module*." msgstr "" diff --git a/library/wsgiref.po b/library/wsgiref.po index c043fb25218..45b9873eb40 100644 --- a/library/wsgiref.po +++ b/library/wsgiref.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2016-11-19 00:36+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -359,7 +359,7 @@ msgid "" msgstr "" #: ../../library/wsgiref.rst:332 -msgid "Returns the currently-set application callable." +msgid "Returns the currently set application callable." msgstr "" #: ../../library/wsgiref.rst:334 @@ -697,7 +697,7 @@ msgstr "" #: ../../library/wsgiref.rst:638 msgid "" -"Set the :attr:`environ` attribute to a fully-populated WSGI environment. " +"Set the :attr:`environ` attribute to a fully populated WSGI environment. " "The default implementation uses all of the above methods and attributes, " "plus the :meth:`get_stdin`, :meth:`get_stderr`, and :meth:`add_cgi_vars` " "methods and the :attr:`wsgi_file_wrapper` attribute. It also inserts a " diff --git a/library/xml.dom.minidom.po b/library/xml.dom.minidom.po index 515aa0cae3c..c87a8245598 100644 --- a/library/xml.dom.minidom.po +++ b/library/xml.dom.minidom.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-12 19:07+0000\n" +"POT-Creation-Date: 2022-07-01 00:17+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-" @@ -115,7 +115,7 @@ msgid "" "When you are finished with a DOM tree, you may optionally call the :meth:" "`unlink` method to encourage early cleanup of the now-unneeded objects. :" "meth:`unlink` is an :mod:`xml.dom.minidom`\\ -specific extension to the DOM " -"API that renders the node and its descendants are essentially useless. " +"API that renders the node and its descendants essentially useless. " "Otherwise, Python's garbage collector will eventually take care of the " "objects in the tree." msgstr "" diff --git a/library/xml.po b/library/xml.po index cc8353eaa5d..cb3d85b753e 100644 --- a/library/xml.po +++ b/library/xml.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -226,7 +226,7 @@ msgid "" "abuses entity expansion, too. Instead of nested entities it repeats one " "large entity with a couple of thousand chars over and over again. The attack " "isn't as efficient as the exponential case but it avoids triggering parser " -"countermeasures that forbid deeply-nested entities." +"countermeasures that forbid deeply nested entities." msgstr "" #: ../../library/xml.rst:101 diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index 6e0a86ff070..ea56fab2f7d 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -65,7 +65,7 @@ msgid "" "The following parameters govern the use of the returned proxy instance. If " "*allow_none* is true, the Python constant ``None`` will be translated into " "XML; the default behaviour is for ``None`` to raise a :exc:`TypeError`. This " -"is a commonly-used extension to the XML-RPC specification, but isn't " +"is a commonly used extension to the XML-RPC specification, but isn't " "supported by all clients and servers; see `http://ontosys.com/xml-rpc/" "extensions.php `_ for a description. The *use_builtin_types* " diff --git a/library/zlib.po b/library/zlib.po index c7602c50019..137760e6c6a 100644 --- a/library/zlib.po +++ b/library/zlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-21 00:13+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -348,7 +348,7 @@ msgstr "" #: ../../library/zlib.rst:262 msgid "" -"This makes it possible to distinguish between a properly-formed compressed " +"This makes it possible to distinguish between a properly formed compressed " "stream, and an incomplete or truncated one." msgstr "" diff --git a/reference/datamodel.po b/reference/datamodel.po index 0fc511ac39b..c8ba5ab2004 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-01 00:15+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -1480,7 +1480,7 @@ msgstr "" msgid "" "Typical implementations create a new instance of the class by invoking the " "superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])`` " -"with appropriate arguments and then modifying the newly-created instance as " +"with appropriate arguments and then modifying the newly created instance as " "necessary before returning it." msgstr "" @@ -1796,7 +1796,7 @@ msgstr "" #: ../../reference/datamodel.rst:1527 msgid "" "This is intended to provide protection against a denial-of-service caused by " -"carefully-chosen inputs that exploit the worst case performance of a dict " +"carefully chosen inputs that exploit the worst case performance of a dict " "insertion, O(n\\ :sup:`2`) complexity. See http://www.ocert.org/advisories/" "ocert-2011-003.html for details." msgstr "" diff --git a/reference/import.po b/reference/import.po index b8470bc3325..5cdb06702d6 100644 --- a/reference/import.po +++ b/reference/import.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-18 00:15+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -678,7 +678,7 @@ msgstr "" #: ../../reference/import.rst:544 msgid "" -"The ``__name__`` attribute must be set to the fully-qualified name of the " +"The ``__name__`` attribute must be set to the fully qualified name of the " "module. This name is used to uniquely identify the module in the import " "system." msgstr "" diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index e181a1a49b3..a8854e83deb 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -943,7 +943,7 @@ msgstr "" msgid "" "Top-level format specifiers may include nested replacement fields. These " "nested fields may include their own conversion fields and :ref:`format " -"specifiers `, but may not include more deeply-nested replacement " +"specifiers `, but may not include more deeply nested replacement " "fields. The :ref:`format specifier mini-language ` is the same " "as that used by the :meth:`str.format` method." msgstr "" diff --git a/tutorial/classes.po b/tutorial/classes.po index d8ba99c2418..76d256a2fc3 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-08 06:07+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2021-06-06 02:14+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -516,7 +516,7 @@ msgstr "" #: ../../tutorial/classes.rst:299 msgid "" "When a class defines an :meth:`__init__` method, class instantiation " -"automatically invokes :meth:`__init__` for the newly-created class " +"automatically invokes :meth:`__init__` for the newly created class " "instance. So in this example, a new, initialized instance can be obtained " "by::" msgstr "" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index c109dc57279..5918038772e 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+0000\n" "PO-Revision-Date: 2022-06-27 09:44+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -264,7 +264,7 @@ msgstr "" #: ../../tutorial/inputoutput.rst:192 msgid "" -"As an example, the following lines produce a tidily-aligned set of columns " +"As an example, the following lines produce a tidily aligned set of columns " "giving integers and their squares and cubes::" msgstr "" "例如,下面的程式碼產生一組排列整齊的欄,列出整數及其平方與立方:\n" diff --git a/tutorial/modules.po b/tutorial/modules.po index 3c56c5fe693..870198403a8 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -11,8 +11,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-21 17:35+0000\n" -"PO-Revision-Date: 2022-05-22 02:31+0800\n" +"POT-Creation-Date: 2022-06-29 00:14+0000\n" +"PO-Revision-Date: 2022-07-07 00:38+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -21,7 +21,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.0.1\n" +"X-Generator: Poedit 3.1\n" #: ../../tutorial/modules.rst:5 msgid "Modules" @@ -83,16 +83,18 @@ msgstr "" #: ../../tutorial/modules.rst:50 msgid "" -"This does not enter the names of the functions defined in ``fibo`` directly " -"in the current symbol table; it only enters the module name ``fibo`` there. " -"Using the module name you can access the functions::" +"This does not add the names of the functions defined in ``fibo`` directly " +"to the current :term:`namespace` (see :ref:`tut-scopes` for more details); " +"it only adds the module name ``fibo`` there. Using the module name you can " +"access the functions::" msgstr "" -"這並不會將 ``fibo`` 中定義的函式名稱直接輸入當前的符號表中;它只會輸入 " -"``fibo`` 的模組名稱。使用此模組名稱,就可以存取函式:\n" +"這並不會將 ``fibo`` 中定義的函式名稱直接加入當前的 :term:`namespace` 中(詳情" +"請見 :ref:`tut-scopes`);它只會加入 ``fibo`` 的模組名稱。使用此模組名稱,就" +"可以存取函式:\n" "\n" "::" -#: ../../tutorial/modules.rst:61 +#: ../../tutorial/modules.rst:62 msgid "" "If you intend to use a function often you can assign it to a local name::" msgstr "" @@ -100,11 +102,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:71 +#: ../../tutorial/modules.rst:72 msgid "More on Modules" msgstr "深入了解模組" -#: ../../tutorial/modules.rst:73 +#: ../../tutorial/modules.rst:74 msgid "" "A module can contain executable statements as well as function definitions. " "These statements are intended to initialize the module. They are executed " @@ -115,58 +117,59 @@ msgstr "" "只會在\\ *第一次*\\ 被 import 時才會執行。\\ [#]_\\ (如果檔案被當成腳本執" "行,也會執行它們)。" -#: ../../tutorial/modules.rst:78 +#: ../../tutorial/modules.rst:79 msgid "" -"Each module has its own private symbol table, which is used as the global " -"symbol table by all functions defined in the module. Thus, the author of a " +"Each module has its own private namespace, which is used as the global " +"namespace by all functions defined in the module. Thus, the author of a " "module can use global variables in the module without worrying about " "accidental clashes with a user's global variables. On the other hand, if you " "know what you are doing you can touch a module's global variables with the " "same notation used to refer to its functions, ``modname.itemname``." msgstr "" -"每個模組都有它自己的私有符號表,模組內定義的函式會把該模組的私有符號表當成全" -"域符號表使用。因此,模組的作者可以在模組中使用全域變數,而不必擔心和使用者的" -"全域變數發生意外的名稱衝突。另一方面,如果你知道自己在做什麼,你可以用這個方" -"式取用模組的全域變數,以和引用函式一樣的寫法,\\ ``modname.itemname``\\ 。" +"每個模組都有它自己的私有命名空間 (namespace),模組內定義的函式會把該模組的私" +"有符號表當成全域命名空間使用。因此,模組的作者可以在模組中使用全域變數,而不" +"必擔心和使用者的全域變數發生意外的名稱衝突。另一方面,如果你知道自己在做什" +"麼,你可以用這個方式取用模組的全域變數,以和引用函式一樣的寫法,\\ ``modname." +"itemname``\\ 。" -#: ../../tutorial/modules.rst:85 +#: ../../tutorial/modules.rst:86 msgid "" "Modules can import other modules. It is customary but not required to place " "all :keyword:`import` statements at the beginning of a module (or script, " -"for that matter). The imported module names are placed in the importing " -"module's global symbol table." +"for that matter). The imported module names, if placed at the top level of " +"a module (outside any functions or classes), are added to the module's " +"global namespace." msgstr "" "在一個模組中可以 import 其他模組。把所有的 :keyword:`import` 陳述式放在模組" -"(就這邊來說,腳本也是一樣)的最開頭是個慣例,但並沒有強制。被 import 的模組" -"名稱放置在原模組的全域符號表中。" +"(就這邊來說,腳本也是一樣)的最開頭是個慣例,但並沒有強制。如放置在模組的最" +"高層(不在任何函式或 class 中),被 import 的模組名稱將被加入全域命名空間中。" -#: ../../tutorial/modules.rst:90 +#: ../../tutorial/modules.rst:91 msgid "" "There is a variant of the :keyword:`import` statement that imports names " -"from a module directly into the importing module's symbol table. For " -"example::" +"from a module directly into the importing module's namespace. For example::" msgstr "" ":keyword:`import` 陳述式有另一種變形寫法,可以直接將名稱從欲 import 的模組," -"直接 import 至原模組的符號表中。例如:\n" +"直接 import 至原模組的命名空間中。例如:\n" "\n" "::" -#: ../../tutorial/modules.rst:97 +#: ../../tutorial/modules.rst:98 msgid "" "This does not introduce the module name from which the imports are taken in " -"the local symbol table (so in the example, ``fibo`` is not defined)." +"the local namespace (so in the example, ``fibo`` is not defined)." msgstr "" -"在 import 之後的名稱會被導入,但定義該函式的整個模組名稱並不會被引入在區域符" -"號表中(因此,示例中的 ``fibo`` 未被定義)。" +"在 import 之後的名稱會被導入,但定義該函式的整個模組名稱並不會被引入在區域命" +"名空間中(因此,示例中的 ``fibo`` 未被定義)。" -#: ../../tutorial/modules.rst:100 +#: ../../tutorial/modules.rst:101 msgid "There is even a variant to import all names that a module defines::" msgstr "" "甚至還有另一種變形寫法,可以 import 模組定義的所有名稱:\n" "\n" "::" -#: ../../tutorial/modules.rst:106 +#: ../../tutorial/modules.rst:107 msgid "" "This imports all names except those beginning with an underscore (``_``). In " "most cases Python programmers do not use this facility since it introduces " @@ -177,7 +180,7 @@ msgstr "" "多數情況下,Python 程式設計師不大使用這個功能,因為它在直譯器中引入了一組未知" "的名稱,並且可能覆蓋了某些您已經定義的內容。" -#: ../../tutorial/modules.rst:111 +#: ../../tutorial/modules.rst:112 msgid "" "Note that in general the practice of importing ``*`` from a module or " "package is frowned upon, since it often causes poorly readable code. " @@ -187,7 +190,7 @@ msgstr "" "致可讀性較差的程式碼。但若是使用它來在互動模式中節省打字時間,則是可以接受" "的。" -#: ../../tutorial/modules.rst:115 +#: ../../tutorial/modules.rst:116 msgid "" "If the module name is followed by :keyword:`!as`, then the name following :" "keyword:`!as` is bound directly to the imported module." @@ -195,7 +198,7 @@ msgstr "" "如果模組名稱後面出現 :keyword:`!as`\\ ,則 :keyword:`!as` 之後的名稱將直接和" "被 import 模組綁定在一起。" -#: ../../tutorial/modules.rst:124 +#: ../../tutorial/modules.rst:125 msgid "" "This is effectively importing the module in the same way that ``import " "fibo`` will do, with the only difference of it being available as ``fib``." @@ -203,7 +206,7 @@ msgstr "" "這個 import 方式和 ``import fibo`` 實質上是一樣的,唯一的差別是現在要用 " "``fib`` 使用模組。" -#: ../../tutorial/modules.rst:127 +#: ../../tutorial/modules.rst:128 msgid "" "It can also be used when utilising :keyword:`from` with similar effects::" msgstr "" @@ -211,7 +214,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:136 +#: ../../tutorial/modules.rst:137 msgid "" "For efficiency reasons, each module is only imported once per interpreter " "session. Therefore, if you change your modules, you must restart the " @@ -224,18 +227,18 @@ msgstr "" "可以使用 :func:`importlib.reload`\\ 。例如:\\ ``import importlib; importlib." "reload(modulename)``\\ 。" -#: ../../tutorial/modules.rst:146 +#: ../../tutorial/modules.rst:147 msgid "Executing modules as scripts" msgstr "把模組當作腳本執行" -#: ../../tutorial/modules.rst:148 +#: ../../tutorial/modules.rst:149 msgid "When you run a Python module with ::" msgstr "" "當使用以下內容運行 Python 模組時:\n" "\n" "::" -#: ../../tutorial/modules.rst:152 +#: ../../tutorial/modules.rst:153 msgid "" "the code in the module will be executed, just as if you imported it, but " "with the ``__name__`` set to ``\"__main__\"``. That means that by adding " @@ -246,7 +249,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:160 +#: ../../tutorial/modules.rst:161 msgid "" "you can make the file usable as a script as well as an importable module, " "because the code that parses the command line only runs if the module is " @@ -255,14 +258,14 @@ msgstr "" "你可以將檔案作為腳本也同時可以作為被 import 的模組,因為剖析 (parse) 命令列的" "程式碼只會在當模組是「主」檔案時,才會執行:" -#: ../../tutorial/modules.rst:169 +#: ../../tutorial/modules.rst:170 msgid "If the module is imported, the code is not run::" msgstr "" "如果此模組是被 import 的,則該段程式碼不會被執行:\n" "\n" "::" -#: ../../tutorial/modules.rst:174 +#: ../../tutorial/modules.rst:175 msgid "" "This is often used either to provide a convenient user interface to a " "module, or for testing purposes (running the module as a script executes a " @@ -271,11 +274,11 @@ msgstr "" "這通常是用來為模組提供方便的使用者介面,或者用於測試目的(執行測試套件時,以" "腳本的方式執行模組)。" -#: ../../tutorial/modules.rst:181 +#: ../../tutorial/modules.rst:182 msgid "The Module Search Path" msgstr "模組的搜尋路徑" -#: ../../tutorial/modules.rst:185 +#: ../../tutorial/modules.rst:186 msgid "" "When a module named :mod:`spam` is imported, the interpreter first searches " "for a built-in module with that name. These module names are listed in :data:" @@ -288,13 +291,13 @@ msgstr "" "數 :data:`sys.path` 所給定的資料夾清單之中,搜尋一個名為 :file:`spam.py` 的檔" "案。\\ :data:`sys.path` 從這些位置開始進行初始化:" -#: ../../tutorial/modules.rst:191 +#: ../../tutorial/modules.rst:192 msgid "" "The directory containing the input script (or the current directory when no " "file is specified)." msgstr "輸入腳本所位在的資料夾(如未指定檔案時,則是當前資料夾)。" -#: ../../tutorial/modules.rst:193 +#: ../../tutorial/modules.rst:194 msgid "" ":envvar:`PYTHONPATH` (a list of directory names, with the same syntax as the " "shell variable :envvar:`PATH`)." @@ -302,7 +305,7 @@ msgstr "" ":envvar:`PYTHONPATH`\\ (一連串和 shell 變數 :envvar:`PATH` 的語法相同的資料" "夾名稱)。" -#: ../../tutorial/modules.rst:195 +#: ../../tutorial/modules.rst:196 msgid "" "The installation-dependent default (by convention including a ``site-" "packages`` directory, handled by the :mod:`site` module)." @@ -310,7 +313,7 @@ msgstr "" "與安裝相關的預設值(按慣例會包含一個 ``site-packages`` 資料夾,它是由 :mod:" "`site` 模組所處理)。" -#: ../../tutorial/modules.rst:199 +#: ../../tutorial/modules.rst:200 msgid "" "On file systems which support symlinks, the directory containing the input " "script is calculated after the symlink is followed. In other words the " @@ -320,7 +323,7 @@ msgstr "" "後才被計算的。換言之,包含符號連結的資料夾\\ **並沒有**\\ 增加到模組的搜尋路" "徑中。" -#: ../../tutorial/modules.rst:203 +#: ../../tutorial/modules.rst:204 msgid "" "After initialization, Python programs can modify :data:`sys.path`. The " "directory containing the script being run is placed at the beginning of the " @@ -334,11 +337,11 @@ msgstr "" "而不是函式庫資料夾中相同名稱的模組。除非是有意要做這樣的替換,否則這是一個錯" "誤。 請參見\\ :ref:`tut-standardmodules`\\ 以瞭解更多資訊。" -#: ../../tutorial/modules.rst:214 +#: ../../tutorial/modules.rst:215 msgid "\"Compiled\" Python files" msgstr "「編譯」Python 檔案" -#: ../../tutorial/modules.rst:216 +#: ../../tutorial/modules.rst:217 msgid "" "To speed up loading modules, Python caches the compiled version of each " "module in the ``__pycache__`` directory under the name :file:`module." @@ -354,7 +357,7 @@ msgstr "" "spam.py 的編譯版本將被暫存為 ``__pycache__/spam.cpython-33.pyc``\\ 。此命名準" "則可以讓來自不同版本的編譯模組和 Python 的不同版本同時共存。" -#: ../../tutorial/modules.rst:224 +#: ../../tutorial/modules.rst:225 msgid "" "Python checks the modification date of the source against the compiled " "version to see if it's out of date and needs to be recompiled. This is a " @@ -366,7 +369,7 @@ msgstr "" "完全自動的過程。另外,編譯後的模組獨立於平台,因此不同架構的作業系統之間可以" "共用同一函式庫。" -#: ../../tutorial/modules.rst:229 +#: ../../tutorial/modules.rst:230 msgid "" "Python does not check the cache in two circumstances. First, it always " "recompiles and does not store the result for the module that's loaded " @@ -379,11 +382,11 @@ msgstr "" "列載入的模組的結果。第二,如果沒有源模組,則不會檢查快取。要支援非源模組(僅" "編譯)的發布,編譯後的模組必須位於原始資料夾中,並且不能有源模組。" -#: ../../tutorial/modules.rst:236 +#: ../../tutorial/modules.rst:237 msgid "Some tips for experts:" msgstr "一些給專家的秘訣:" -#: ../../tutorial/modules.rst:238 +#: ../../tutorial/modules.rst:239 msgid "" "You can use the :option:`-O` or :option:`-OO` switches on the Python command " "to reduce the size of a compiled module. The ``-O`` switch removes assert " @@ -399,7 +402,7 @@ msgstr "" "只有在您知道自己在做什麼時,才應使用此參數。「已優化」模組有 ``opt-`` 標記," "且通常較小。未來的版本可能會改變優化的效果。" -#: ../../tutorial/modules.rst:246 +#: ../../tutorial/modules.rst:247 msgid "" "A program doesn't run any faster when it is read from a ``.pyc`` file than " "when it is read from a ``.py`` file; the only thing that's faster about ``." @@ -408,23 +411,23 @@ msgstr "" "讀取 ``.pyc`` 檔案時,程式的執行速度並不會比讀取 ``.py`` 檔案快。唯一比較快的" "地方是載入的速度。" -#: ../../tutorial/modules.rst:250 +#: ../../tutorial/modules.rst:251 msgid "" "The module :mod:`compileall` can create .pyc files for all modules in a " "directory." msgstr "模組 :mod:`compileall` 可以為資料夾中的所有模組創建 .pyc 檔。" -#: ../../tutorial/modules.rst:253 +#: ../../tutorial/modules.rst:254 msgid "" "There is more detail on this process, including a flow chart of the " "decisions, in :pep:`3147`." msgstr "更多的細節,包括決策流程圖,請參考\\ :pep:`3147`\\ 。" -#: ../../tutorial/modules.rst:260 +#: ../../tutorial/modules.rst:261 msgid "Standard Modules" msgstr "標準模組" -#: ../../tutorial/modules.rst:264 +#: ../../tutorial/modules.rst:265 msgid "" "Python comes with a library of standard modules, described in a separate " "document, the Python Library Reference (\"Library Reference\" hereafter). " @@ -448,13 +451,13 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:287 +#: ../../tutorial/modules.rst:288 msgid "" "These two variables are only defined if the interpreter is in interactive " "mode." msgstr "只有直譯器在互動模式時,才需要定義這兩個變數。" -#: ../../tutorial/modules.rst:289 +#: ../../tutorial/modules.rst:290 msgid "" "The variable ``sys.path`` is a list of strings that determines the " "interpreter's search path for modules. It is initialized to a default path " @@ -468,11 +471,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:302 +#: ../../tutorial/modules.rst:303 msgid "The :func:`dir` Function" msgstr ":func:`dir` 函式" -#: ../../tutorial/modules.rst:304 +#: ../../tutorial/modules.rst:305 msgid "" "The built-in function :func:`dir` is used to find out which names a module " "defines. It returns a sorted list of strings::" @@ -482,7 +485,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:333 +#: ../../tutorial/modules.rst:334 msgid "" "Without arguments, :func:`dir` lists the names you have defined currently::" msgstr "" @@ -490,12 +493,12 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:341 +#: ../../tutorial/modules.rst:342 msgid "" "Note that it lists all types of names: variables, modules, functions, etc." msgstr "請注意,它列出所有類型的名稱:變數、模組、函式等。" -#: ../../tutorial/modules.rst:345 +#: ../../tutorial/modules.rst:346 msgid "" ":func:`dir` does not list the names of built-in functions and variables. If " "you want a list of those, they are defined in the standard module :mod:" @@ -506,11 +509,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:384 +#: ../../tutorial/modules.rst:385 msgid "Packages" msgstr "套件 (Package)" -#: ../../tutorial/modules.rst:386 +#: ../../tutorial/modules.rst:387 msgid "" "Packages are a way of structuring Python's module namespace by using " "\"dotted module names\". For example, the module name :mod:`A.B` designates " @@ -525,7 +528,7 @@ msgstr "" "的作者不需擔心與其他模組的全域變數名稱重複,點分隔模組名稱的使用,也讓多模組" "套件(像 NumPy 或 Pillow)的作者們不須擔心其他套件的模組名稱。" -#: ../../tutorial/modules.rst:394 +#: ../../tutorial/modules.rst:395 msgid "" "Suppose you want to design a collection of modules (a \"package\") for the " "uniform handling of sound files and sound data. There are many different " @@ -547,13 +550,13 @@ msgstr "" "一系列無止盡的模組來執行這些作業。以下是你的套件可能的架構(以階層式檔案系統" "的方式表示):" -#: ../../tutorial/modules.rst:431 +#: ../../tutorial/modules.rst:432 msgid "" "When importing the package, Python searches through the directories on ``sys." "path`` looking for the package subdirectory." msgstr "Import 套件時,Python 會搜尋 ``sys.path`` 裡的目錄,尋找套件的子目錄。" -#: ../../tutorial/modules.rst:434 +#: ../../tutorial/modules.rst:435 msgid "" "The :file:`__init__.py` files are required to make Python treat directories " "containing the file as packages. This prevents directories with a common " @@ -567,7 +570,7 @@ msgstr "" "尋路徑中的有效模組。在最簡單的情況,\\ :file:`__init__.py` 可以只是一個空白檔" "案;但它也可以執行套件的初始化程式碼,或設置 ``__all__`` 變數,之後會詳述。" -#: ../../tutorial/modules.rst:441 +#: ../../tutorial/modules.rst:442 msgid "" "Users of the package can import individual modules from the package, for " "example::" @@ -576,7 +579,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:446 +#: ../../tutorial/modules.rst:447 msgid "" "This loads the submodule :mod:`sound.effects.echo`. It must be referenced " "with its full name. ::" @@ -585,14 +588,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:451 +#: ../../tutorial/modules.rst:452 msgid "An alternative way of importing the submodule is::" msgstr "" "另一種 import 子模組的方法是:\n" "\n" "::" -#: ../../tutorial/modules.rst:455 +#: ../../tutorial/modules.rst:456 msgid "" "This also loads the submodule :mod:`echo`, and makes it available without " "its package prefix, so it can be used as follows::" @@ -602,7 +605,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:460 +#: ../../tutorial/modules.rst:461 msgid "" "Yet another variation is to import the desired function or variable " "directly::" @@ -611,7 +614,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:464 +#: ../../tutorial/modules.rst:465 msgid "" "Again, this loads the submodule :mod:`echo`, but this makes its function :" "func:`echofilter` directly available::" @@ -621,7 +624,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:469 +#: ../../tutorial/modules.rst:470 msgid "" "Note that when using ``from package import item``, the item can be either a " "submodule (or subpackage) of the package, or some other name defined in the " @@ -635,7 +638,7 @@ msgstr "" "陳述式首先測試套件中有沒有定義該 item;如果沒有,則會假設它是模組,並嘗試載" "入。如果還是找不到 item,則會引發 :exc:`ImportError` 例外。" -#: ../../tutorial/modules.rst:476 +#: ../../tutorial/modules.rst:477 msgid "" "Contrarily, when using syntax like ``import item.subitem.subsubitem``, each " "item except for the last must be a package; the last item can be a module or " @@ -646,11 +649,11 @@ msgstr "" "一項都必須是套件;最後一項可以是模組或套件,但不能是前一項中定義的 class、函" "式或變數。" -#: ../../tutorial/modules.rst:485 +#: ../../tutorial/modules.rst:486 msgid "Importing \\* From a Package" msgstr "從套件中 import \\*" -#: ../../tutorial/modules.rst:489 +#: ../../tutorial/modules.rst:490 msgid "" "Now what happens when the user writes ``from sound.effects import *``? " "Ideally, one would hope that this somehow goes out to the filesystem, finds " @@ -663,7 +666,7 @@ msgstr "" "會花費較長的時間,且 import 子模組的過程可能會有不必要的副作用,這些副作用只" "有在明確地 import 子模組時才會發生。" -#: ../../tutorial/modules.rst:495 +#: ../../tutorial/modules.rst:496 msgid "" "The only solution is for the package author to provide an explicit index of " "the package. The :keyword:`import` statement uses the following convention: " @@ -684,7 +687,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:507 +#: ../../tutorial/modules.rst:508 msgid "" "This would mean that ``from sound.effects import *`` would import the three " "named submodules of the :mod:`sound.effects` package." @@ -692,7 +695,7 @@ msgstr "" "意思是,\\ ``from sound.effects import *`` 將會 import :mod:`sound.effects` " "套件中,這三個被提名的子模組。" -#: ../../tutorial/modules.rst:510 +#: ../../tutorial/modules.rst:511 msgid "" "If ``__all__`` is not defined, the statement ``from sound.effects import *`` " "does *not* import all submodules from the package :mod:`sound.effects` into " @@ -713,7 +716,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:523 +#: ../../tutorial/modules.rst:524 msgid "" "In this example, the :mod:`echo` and :mod:`surround` modules are imported in " "the current namespace because they are defined in the :mod:`sound.effects` " @@ -724,7 +727,7 @@ msgstr "" "`surround` 模組被 import 進當前的命名空間,因為它們是在 :mod:`sound.effects` " "套件裡定義的。(當 ``__all__`` 有被定義時,這規則也有效。)" -#: ../../tutorial/modules.rst:528 +#: ../../tutorial/modules.rst:529 msgid "" "Although certain modules are designed to export only names that follow " "certain patterns when you use ``import *``, it is still considered bad " @@ -733,7 +736,7 @@ msgstr "" "雖然,有些特定模組的設計,讓你使用 ``import *`` 時,該模組只會輸出遵循特定樣" "式的名稱,但在正式環境 (production) 的程式碼中這仍然被視為是不良習慣。" -#: ../../tutorial/modules.rst:532 +#: ../../tutorial/modules.rst:533 msgid "" "Remember, there is nothing wrong with using ``from package import " "specific_submodule``! In fact, this is the recommended notation unless the " @@ -743,11 +746,11 @@ msgstr "" "記住,使用 ``from package import specific_submodule`` 不會有任何問題!實際" "上,這是推薦用法,除非 import 的模組需要用到的子模組和其他套件的子模組同名。" -#: ../../tutorial/modules.rst:541 +#: ../../tutorial/modules.rst:542 msgid "Intra-package References" msgstr "套件內引用" -#: ../../tutorial/modules.rst:543 +#: ../../tutorial/modules.rst:544 msgid "" "When packages are structured into subpackages (as with the :mod:`sound` " "package in the example), you can use absolute imports to refer to submodules " @@ -760,7 +763,7 @@ msgstr "" "filters.vocoder` 模組中使用 :mod:`sound.effects` 中的 :mod:`echo` 模組時,可" "以用 ``from sound.effects import echo``\\ 。" -#: ../../tutorial/modules.rst:549 +#: ../../tutorial/modules.rst:550 msgid "" "You can also write relative imports, with the ``from module import name`` " "form of import statement. These imports use leading dots to indicate the " @@ -773,7 +776,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/modules.rst:558 +#: ../../tutorial/modules.rst:559 msgid "" "Note that relative imports are based on the name of the current module. " "Since the name of the main module is always ``\"__main__\"``, modules " @@ -784,11 +787,11 @@ msgstr "" "\"__main__\"``\\ ,所以如果一個模組預期被用作 Python 應用程式的主模組,那它必" "須永遠使用絕對 import。" -#: ../../tutorial/modules.rst:564 +#: ../../tutorial/modules.rst:565 msgid "Packages in Multiple Directories" msgstr "多目錄中的套件" -#: ../../tutorial/modules.rst:566 +#: ../../tutorial/modules.rst:567 msgid "" "Packages support one more special attribute, :attr:`__path__`. This is " "initialized to be a list containing the name of the directory holding the " @@ -801,21 +804,21 @@ msgstr "" "執行之前。這個變數可以被修改,但這樣做會影響將來對套件內的模組和子套件的搜" "尋。" -#: ../../tutorial/modules.rst:572 +#: ../../tutorial/modules.rst:573 msgid "" "While this feature is not often needed, it can be used to extend the set of " "modules found in a package." msgstr "雖然這個特色不太常被需要,但它可用於擴充套件中的模組集合。" -#: ../../tutorial/modules.rst:577 +#: ../../tutorial/modules.rst:578 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/modules.rst:578 +#: ../../tutorial/modules.rst:579 msgid "" "In fact function definitions are also 'statements' that are 'executed'; the " -"execution of a module-level function definition enters the function name in " -"the module's global symbol table." +"execution of a module-level function definition adds the function name to " +"the module's global namespace." msgstr "" -"實際上,函式定義也是「被執行」的「陳述式」;在執行模組階層的函式定義時,會輸" -"入函式名稱到模組的全域符號表。" +"實際上,函式定義也是「被執行」的「陳述式」;在執行模組階層的函式定義時,會將" +"函式名稱加到模組的全域命名空間。" diff --git a/using/cmdline.po b/using/cmdline.po index 36f25391712..fa12c60c1d2 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -421,7 +421,7 @@ msgstr "" #: ../../using/cmdline.rst:323 msgid "" "Hash randomization is intended to provide protection against a denial-of-" -"service caused by carefully-chosen inputs that exploit the worst case " +"service caused by carefully chosen inputs that exploit the worst case " "performance of a dict construction, O(n\\ :sup:`2`) complexity. See http://" "www.ocert.org/advisories/ocert-2011-003.html for details." msgstr "" @@ -540,7 +540,7 @@ msgstr "" #: ../../using/cmdline.rst:420 msgid "" -"The *module* field matches the (fully-qualified) module name; this match is " +"The *module* field matches the (fully qualified) module name; this match is " "case-sensitive." msgstr "" diff --git a/whatsnew/2.0.po b/whatsnew/2.0.po index 92ed0214b17..c88d9564840 100644 --- a/whatsnew/2.0.po +++ b/whatsnew/2.0.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -48,7 +48,7 @@ msgid "" "flow of bug fixes and improvements are always being submitted. A host of " "minor fixes, a few optimizations, additional docstrings, and better error " "messages went into 2.0; to list them all would be impossible, but they're " -"certainly significant. Consult the publicly-available CVS logs if you want " +"certainly significant. Consult the publicly available CVS logs if you want " "to see the full list. This progress is due to the five developers working " "for PythonLabs are now getting paid to spend their days fixing bugs, and " "also due to the improved communication resulting from moving to SourceForge." diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index edc50769f4c..28001834981 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -557,7 +557,7 @@ msgid "" "to be ignored or can modify the record before passing it along. When " "they're finally output, :class:`LogRecord` instances are converted to text " "by a :class:`Formatter` class. All of these classes can be replaced by your " -"own specially-written classes." +"own specially written classes." msgstr "" #: ../../whatsnew/2.3.rst:533 diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index 5d8340de2ba..266f9d7286a 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -144,7 +144,7 @@ msgid "" "comprehensions don't fit into this picture very well because they produce a " "Python list object containing all of the items. This unavoidably pulls all " "of the objects into memory, which can be a problem if your data set is very " -"large. When trying to write a functionally-styled program, it would be " +"large. When trying to write a functionally styled program, it would be " "natural to write something like::" msgstr "" @@ -1029,7 +1029,7 @@ msgstr "" #: ../../whatsnew/2.4.rst:921 msgid "" -"Encountering a failure while importing a module no longer leaves a partially-" +"Encountering a failure while importing a module no longer leaves a partially " "initialized module object in ``sys.modules``. The incomplete module object " "left behind would fool further imports of the same module into succeeding, " "leading to confusing errors. (Fixed by Tim Peters.)" @@ -1775,7 +1775,7 @@ msgstr "" #: ../../whatsnew/2.4.rst:1543 msgid "" -"Encountering a failure while importing a module no longer leaves a partially-" +"Encountering a failure while importing a module no longer leaves a partially " "initialized module object in ``sys.modules``." msgstr "" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 8f745374b6f..5e09c8dab91 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -41,7 +41,7 @@ msgstr "" msgid "" "The changes in Python 2.5 are an interesting mix of language and library " "improvements. The library enhancements will be more important to Python's " -"user community, I think, because several widely-useful packages were added. " +"user community, I think, because several widely useful packages were added. " "New modules include ElementTree for XML processing (:mod:`xml.etree`), the " "SQLite database module (:mod:`sqlite`), and the :mod:`ctypes` module for " "calling C functions." @@ -1497,7 +1497,7 @@ msgid "" "received several enhancements and a number of bugfixes. You can now set the " "maximum size in bytes of a field by calling the ``csv." "field_size_limit(new_limit)`` function; omitting the *new_limit* argument " -"will return the currently-set limit. The :class:`reader` class now has a :" +"will return the currently set limit. The :class:`reader` class now has a :" "attr:`line_num` attribute that counts the number of physical lines read from " "the source; records can span multiple physical lines, so :attr:`line_num` is " "not the same as the number of records read." diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 0e59a3653c7..bc177f0de47 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -592,7 +592,7 @@ msgstr "" msgid "" "When you run Python, the module search path ``sys.path`` usually includes a " "directory whose path ends in ``\"site-packages\"``. This directory is " -"intended to hold locally-installed packages available to all users using a " +"intended to hold locally installed packages available to all users using a " "machine or a particular site installation." msgstr "" @@ -2766,7 +2766,7 @@ msgid "" "function that can be used to exclude certain filenames from an archive. The " "function must take a filename and return true if the file should be excluded " "or false if it should be archived. The function is applied to both the name " -"initially passed to :meth:`add` and to the names of files in recursively-" +"initially passed to :meth:`add` and to the names of files in recursively " "added directories." msgstr "" @@ -2835,7 +2835,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:2515 msgid "" "The :mod:`textwrap` module can now preserve existing whitespace at the " -"beginnings and ends of the newly-created lines by specifying " +"beginnings and ends of the newly created lines by specifying " "``drop_whitespace=False`` as an argument::" msgstr "" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index cde2879bd7d..e1de2ddb2dd 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -331,7 +331,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:281 msgid "" -"How does the :class:`~collections.OrderedDict` work? It maintains a doubly-" +"How does the :class:`~collections.OrderedDict` work? It maintains a doubly " "linked list of keys, appending new keys to the list as they're inserted. A " "secondary dictionary maps keys to their corresponding list node, so deletion " "doesn't have to traverse the entire linked list and therefore remains O(1)." @@ -2285,7 +2285,7 @@ msgstr "" msgid "" ":meth:`~unittest.TestCase.assertAlmostEqual` and :meth:`~unittest.TestCase." "assertNotAlmostEqual` test whether *first* and *second* are approximately " -"equal. This method can either round their difference to an optionally-" +"equal. This method can either round their difference to an optionally " "specified number of *places* (the default is 7) and compare it to zero, or " "require the difference to be smaller than a supplied *delta* value." msgstr "" @@ -2738,7 +2738,7 @@ msgstr "" msgid "" "The :mod:`_winreg` module for accessing the registry now implements the :" "func:`~_winreg.CreateKeyEx` and :func:`~_winreg.DeleteKeyEx` functions, " -"extended versions of previously-supported functions that take several extra " +"extended versions of previously supported functions that take several extra " "arguments. The :func:`~_winreg.DisableReflectionKey`, :func:`~_winreg." "EnableReflectionKey`, and :func:`~_winreg.QueryReflectionKey` were also " "tested and documented. (Implemented by Brian Curtin: :issue:`7347`.)" diff --git a/whatsnew/3.0.po b/whatsnew/3.0.po index 7fe0cbba568..70469f5ffeb 100644 --- a/whatsnew/3.0.po +++ b/whatsnew/3.0.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-30 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -938,7 +938,7 @@ msgid "" "`string.uppercase`) are gone. Use :data:`string.ascii_letters` etc. " "instead. (The reason for the removal is that :data:`string.letters` and " "friends had locale-specific behavior, which is a bad idea for such " -"attractively-named global \"constants\".)" +"attractively named global \"constants\".)" msgstr "" #: ../../whatsnew/3.0.rst:668 diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 8a9f7d8426e..1866bc4f004 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -138,7 +138,7 @@ msgstr "" msgid "" "Virtual environments help create separate Python setups while sharing a " "system-wide base install, for ease of maintenance. Virtual environments " -"have their own set of private site packages (i.e. locally-installed " +"have their own set of private site packages (i.e. locally installed " "libraries), and are optionally segregated from the system-wide site " "packages. Their concept and implementation are inspired by the popular " "``virtualenv`` third-party package, but benefit from tighter integration " @@ -1183,7 +1183,7 @@ msgstr "lzma" #: ../../whatsnew/3.3.rst:901 msgid "" -"The newly-added :mod:`lzma` module provides data compression and " +"The newly added :mod:`lzma` module provides data compression and " "decompression using the LZMA algorithm, including support for the ``.xz`` " "and ``.lzma`` file formats." msgstr "" @@ -1510,7 +1510,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:1098 msgid "" "The new C version of the decimal module integrates the high speed libmpdec " -"library for arbitrary precision correctly-rounded decimal floating point " +"library for arbitrary precision correctly rounded decimal floating point " "arithmetic. libmpdec conforms to IBM's General Decimal Arithmetic " "Specification." msgstr "" @@ -1666,8 +1666,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:1161 msgid "" -"The power function in decimal.py is always correctly-rounded. In the C " -"version, it is defined in terms of the correctly-rounded :meth:`~decimal." +"The power function in decimal.py is always correctly rounded. In the C " +"version, it is defined in terms of the correctly rounded :meth:`~decimal." "Decimal.exp` and :meth:`~decimal.Decimal.ln` functions, but the final result " "is only \"almost always correctly rounded\"." msgstr "" @@ -3132,7 +3132,7 @@ msgstr "zlib" #: ../../whatsnew/3.3.rst:2139 msgid "" "New attribute :attr:`zlib.Decompress.eof` makes it possible to distinguish " -"between a properly-formed compressed stream and an incomplete or truncated " +"between a properly formed compressed stream and an incomplete or truncated " "one. (Contributed by Nadeem Vawda in :issue:`12646`.)" msgstr "" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index d97ba9bb6ef..51684160bb2 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -2250,7 +2250,7 @@ msgid "" "block becomes a \"sub-test\". This context manager allows a test method to " "dynamically generate subtests by, say, calling the ``subTest`` context " "manager inside a loop. A single test method can thereby produce an " -"indefinite number of separately-identified and separately-counted tests, all " +"indefinite number of separately identified and separately counted tests, all " "of which will run even if one or more of them fail. For example::" msgstr "" @@ -2817,7 +2817,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2059 msgid "" -":func:`os.urandom` now uses a lazily-opened persistent file descriptor so as " +":func:`os.urandom` now uses a lazily opened persistent file descriptor so as " "to avoid using many file descriptors when run in parallel from multiple " "threads. (Contributed by Antoine Pitrou in :issue:`18756`.)" msgstr "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index cfe3c883dc1..d1a6be8890d 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-22 00:18+0000\n" +"POT-Creation-Date: 2022-07-06 00:17+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-" @@ -403,7 +403,7 @@ msgid "" "While Python provides a C API for thread-local storage support; the " "existing :ref:`Thread Local Storage (TLS) API ` " "has used :c:type:`int` to represent TLS keys across all platforms. This has " -"not generally been a problem for officially-support platforms, but that is " +"not generally been a problem for officially support platforms, but that is " "neither POSIX-compliant, nor portable in any practical sense." msgstr "" @@ -1648,7 +1648,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:1177 msgid "" "The mode argument of :func:`os.makedirs` no longer affects the file " -"permission bits of newly-created intermediate-level directories. " +"permission bits of newly created intermediate-level directories. " "(Contributed by Serhiy Storchaka in :issue:`19930`.)" msgstr "" @@ -3234,7 +3234,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:2298 msgid "" "The *mode* argument of :func:`os.makedirs` no longer affects the file " -"permission bits of newly-created intermediate-level directories. To set " +"permission bits of newly created intermediate-level directories. To set " "their file permission bits you can set the umask before invoking " "``makedirs()``. (Contributed by Serhiy Storchaka in :issue:`19930`.)" msgstr ""