From 7c1ab43b4dd57e73344619d33ff01f4566cb8de5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Feb 2022 00:12:30 +0000 Subject: [PATCH 1/6] sync with cpython b2719533 --- faq/programming.po | 6 +++--- library/__main__.po | 4 ++-- library/multiprocessing.po | 8 ++++---- library/tkinter.po | 8 ++++---- library/uuid.po | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/faq/programming.po b/faq/programming.po index 1ae6dcb86b..57d97128f1 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: 2021-11-21 00:09+0000\n" +"POT-Creation-Date: 2022-02-15 00:10+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-" @@ -1988,7 +1988,7 @@ msgstr "" #: ../../faq/programming.rst:1821 msgid "" "2) Detecting optional arguments can be tricky when ``None`` is a valid input " -"value. In those situations, you can create an singleton sentinel object " +"value. In those situations, you can create a singleton sentinel object " "guaranteed to be distinct from other objects. For example, here is how to " "implement a method that behaves like :meth:`dict.pop`::" msgstr "" @@ -2049,7 +2049,7 @@ msgstr "" #: ../../faq/programming.rst:1911 msgid "" -"The advantage is that when an instance is not longer used, the cached method " +"The advantage is that when an instance is no longer used, the cached method " "result will be released right away. The disadvantage is that if instances " "accumulate, so too will the accumulated method results. They can grow " "without bound." diff --git a/library/__main__.po b/library/__main__.po index 85d18e9728..3a402e4e9e 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-14 00:09+0000\n" +"POT-Creation-Date: 2022-02-15 00:10+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-" @@ -271,7 +271,7 @@ msgstr "" msgid "" "This won't work for ``__main__.py`` files in the root directory of a .zip " "file though. Hence, for consistency, minimal ``__main__.py`` like the :mod:" -"`venv` one mentioned above are preferred." +"`venv` one mentioned below are preferred." msgstr "" #: ../../library/__main__.rst:260 diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 1ea8a423b7..2082d4684b 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-01-19 00:09+0000\n" +"POT-Creation-Date: 2022-02-15 00:10+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-" @@ -1119,9 +1119,9 @@ msgstr "" #: ../../library/multiprocessing.rst:1052 msgid "" -"Sets the path of the Python interpreter to use when starting a child " -"process. (By default :data:`sys.executable` is used). Embedders will " -"probably need to do some thing like ::" +"Set the path of the Python interpreter to use when starting a child process. " +"(By default :data:`sys.executable` is used). Embedders will probably need " +"to do some thing like ::" msgstr "" #: ../../library/multiprocessing.rst:1058 diff --git a/library/tkinter.po b/library/tkinter.po index 1ff490db18..5b8de29416 100644 --- a/library/tkinter.po +++ b/library/tkinter.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-02-15 00:10+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-" @@ -157,8 +157,8 @@ msgid "" "By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover " "Tkinter. (ISBN 978-0321336330)" msgstr "" -"由 Tcl/Tk 發明者 John Ousterhout 與 Ken Jones 所著;不包含 Tkinter。" -"(ISBN 978-0321336330)" +"由 Tcl/Tk 發明者 John Ousterhout 與 Ken Jones 所著;不包含 Tkinter。(ISBN " +"978-0321336330)" #: ../../library/tkinter.rst:72 msgid "Architecture" @@ -1175,7 +1175,7 @@ msgstr "" msgid "" "Colors can be given as the names of X colors in the rgb.txt file, or as " "strings representing RGB values in 4 bit: ``\"#RGB\"``, 8 bit: ``\"#RRGGBB" -"\"``, 12 bit\" ``\"#RRRGGGBBB\"``, or 16 bit ``\"#RRRRGGGGBBBB\"`` ranges, " +"\"``, 12 bit: ``\"#RRRGGGBBB\"``, or 16 bit: ``\"#RRRRGGGGBBBB\"`` ranges, " "where R,G,B here represent any legal hex digit. See page 160 of " "Ousterhout's book for details." msgstr "" diff --git a/library/uuid.po b/library/uuid.po index 95da1e1c2c..a62f1631d6 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: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-02-15 00:10+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-" @@ -186,7 +186,7 @@ msgid "the 14-bit sequence number" msgstr "" #: ../../library/uuid.rst:121 -msgid "The UUID as a 32-character hexadecimal string." +msgid "The UUID as a 32-character lowercase hexadecimal string." msgstr "" #: ../../library/uuid.rst:126 From f1973de8d8d0f0f188956571775bd43c25ff4e20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 16 Feb 2022 00:11:41 +0000 Subject: [PATCH 2/6] sync with cpython 5b63ba3f --- library/xml.dom.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/xml.dom.po b/library/xml.dom.po index 661e664c0f..1e9627fa94 100644 --- a/library/xml.dom.po +++ b/library/xml.dom.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-02-16 00:09+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-" @@ -115,8 +115,8 @@ msgstr "" #: ../../library/xml.dom.rst:76 msgid "" -"`Python Language Mapping Specification `_" +"`Python Language Mapping Specification `_" msgstr "" #: ../../library/xml.dom.rst:77 From 3e80af60d468c8b48c8d74df1e2edd6f616eaaba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Feb 2022 00:13:13 +0000 Subject: [PATCH 3/6] sync with cpython cb7551d5 --- library/html.parser.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/html.parser.po b/library/html.parser.po index cee77063cc..aa8611e838 100644 --- a/library/html.parser.po +++ b/library/html.parser.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-02-18 00:10+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-" @@ -133,8 +133,8 @@ msgstr "" #: ../../library/html.parser.rst:129 msgid "" -"This method is called to handle the start of a tag (e.g. ``
``)." +"This method is called to handle the start tag of an element (e.g. ``
``)." msgstr "" #: ../../library/html.parser.rst:131 From 6705187fd7bf7eb61c86e51ca91f8fd36a908ada Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 19 Feb 2022 00:15:03 +0000 Subject: [PATCH 4/6] sync with cpython 6eb34772 --- library/asyncio-eventloop.po | 554 +++++++++++++++++----------------- library/asyncio-future.po | 5 +- library/asyncio-queue.po | 67 ++-- library/asyncio-stream.po | 159 +++++----- library/asyncio-subprocess.po | 139 +++++---- library/asyncio-sync.po | 125 ++++---- library/asyncio-task.po | 294 +++++++++--------- tutorial/controlflow.po | 12 +- 8 files changed, 679 insertions(+), 676 deletions(-) diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index e42f226afb..9d1d07da7f 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-14 00:10+0000\n" +"POT-Creation-Date: 2022-02-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:38+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -250,8 +250,8 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:171 -#: ../../library/asyncio-eventloop.rst:1088 -#: ../../library/asyncio-eventloop.rst:1474 +#: ../../library/asyncio-eventloop.rst:1078 +#: ../../library/asyncio-eventloop.rst:1464 msgid "Example::" msgstr "" "範例:\n" @@ -447,7 +447,8 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:345 -msgid "Added the ``name`` parameter." +#, fuzzy +msgid "Added the *name* parameter." msgstr "加入 ``name`` 參數。" #: ../../library/asyncio-eventloop.rst:350 @@ -489,8 +490,8 @@ msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." msgstr "" #: ../../library/asyncio-eventloop.rst:383 -#: ../../library/asyncio-eventloop.rst:1004 -#: ../../library/asyncio-eventloop.rst:1020 +#: ../../library/asyncio-eventloop.rst:994 +#: ../../library/asyncio-eventloop.rst:1010 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." @@ -607,7 +608,7 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:455 -#: ../../library/asyncio-eventloop.rst:813 +#: ../../library/asyncio-eventloop.rst:803 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " @@ -615,10 +616,27 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:461 +#: ../../library/asyncio-eventloop.rst:673 +msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:465 +msgid "" +"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " +"TCP connections." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:470 +#: ../../library/asyncio-eventloop.rst:743 +#, fuzzy +msgid "Added the *ssl_handshake_timeout* parameter." +msgstr "*ssl_handshake_timeout* 參數。" + +#: ../../library/asyncio-eventloop.rst:474 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "加入 *happy_eyeballs_delay* 和 *interleave* 參數。" -#: ../../library/asyncio-eventloop.rst:463 +#: ../../library/asyncio-eventloop.rst:476 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -629,28 +647,10 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: ../../library/asyncio-eventloop.rst:472 +#: ../../library/asyncio-eventloop.rst:485 msgid "For more information: https://tools.ietf.org/html/rfc6555" msgstr "更多資訊請見:\\ https://tools.ietf.org/html/rfc6555" -#: ../../library/asyncio-eventloop.rst:476 -#: ../../library/asyncio-eventloop.rst:593 -#: ../../library/asyncio-eventloop.rst:751 -msgid "The *ssl_handshake_timeout* parameter." -msgstr "*ssl_handshake_timeout* 參數。" - -#: ../../library/asyncio-eventloop.rst:480 -#: ../../library/asyncio-eventloop.rst:681 -msgid "" -"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " -"TCP connections." -msgstr "" - -#: ../../library/asyncio-eventloop.rst:485 -#: ../../library/asyncio-eventloop.rst:686 -msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." -msgstr "" - #: ../../library/asyncio-eventloop.rst:489 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " @@ -696,8 +696,8 @@ msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." msgstr "" #: ../../library/asyncio-eventloop.rst:522 -#: ../../library/asyncio-eventloop.rst:618 -#: ../../library/asyncio-eventloop.rst:734 +#: ../../library/asyncio-eventloop.rst:614 +#: ../../library/asyncio-eventloop.rst:724 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." @@ -799,59 +799,61 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:590 -#: ../../library/asyncio-eventloop.rst:715 -#: ../../library/asyncio-eventloop.rst:1071 +#: ../../library/asyncio-eventloop.rst:708 +#: ../../library/asyncio-eventloop.rst:1061 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/asyncio-eventloop.rst:597 -msgid "The *path* parameter can now be a :term:`path-like object`." +#: ../../library/asyncio-eventloop.rst:591 +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`." msgstr "" -#: ../../library/asyncio-eventloop.rst:601 +#: ../../library/asyncio-eventloop.rst:597 msgid "Creating network servers" msgstr "" -#: ../../library/asyncio-eventloop.rst:611 +#: ../../library/asyncio-eventloop.rst:607 msgid "" "Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening on " "*port* of the *host* address." msgstr "" -#: ../../library/asyncio-eventloop.rst:614 +#: ../../library/asyncio-eventloop.rst:610 msgid "Returns a :class:`Server` object." msgstr "" -#: ../../library/asyncio-eventloop.rst:616 +#: ../../library/asyncio-eventloop.rst:612 msgid "Arguments:" msgstr "引數:" -#: ../../library/asyncio-eventloop.rst:621 +#: ../../library/asyncio-eventloop.rst:617 msgid "" "The *host* parameter can be set to several types which determine where the " "server would be listening:" msgstr "" -#: ../../library/asyncio-eventloop.rst:624 +#: ../../library/asyncio-eventloop.rst:620 msgid "" "If *host* is a string, the TCP server is bound to a single network interface " "specified by *host*." msgstr "" -#: ../../library/asyncio-eventloop.rst:627 +#: ../../library/asyncio-eventloop.rst:623 msgid "" "If *host* is a sequence of strings, the TCP server is bound to all network " "interfaces specified by the sequence." msgstr "" -#: ../../library/asyncio-eventloop.rst:630 +#: ../../library/asyncio-eventloop.rst:626 msgid "" "If *host* is an empty string or ``None``, all interfaces are assumed and a " "list of multiple sockets will be returned (most likely one for IPv4 and " "another one for IPv6)." msgstr "" -#: ../../library/asyncio-eventloop.rst:634 +#: ../../library/asyncio-eventloop.rst:630 msgid "" "The *port* parameter can be set to specify which port the server should " "listen on. If ``0`` or ``None`` (the default), a random unused port will be " @@ -859,57 +861,57 @@ msgid "" "different random port will be selected for each interface)." msgstr "" -#: ../../library/asyncio-eventloop.rst:639 +#: ../../library/asyncio-eventloop.rst:635 msgid "" "*family* can be set to either :data:`socket.AF_INET` or :data:`~socket." "AF_INET6` to force the socket to use IPv4 or IPv6. If not set, the *family* " "will be determined from host name (defaults to :data:`~socket.AF_UNSPEC`)." msgstr "" -#: ../../library/asyncio-eventloop.rst:644 +#: ../../library/asyncio-eventloop.rst:640 msgid "*flags* is a bitmask for :meth:`getaddrinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:646 +#: ../../library/asyncio-eventloop.rst:642 msgid "" "*sock* can optionally be specified in order to use a preexisting socket " "object. If specified, *host* and *port* must not be specified." msgstr "" -#: ../../library/asyncio-eventloop.rst:649 +#: ../../library/asyncio-eventloop.rst:645 msgid "" "*backlog* is the maximum number of queued connections passed to :meth:" "`~socket.socket.listen` (defaults to 100)." msgstr "" -#: ../../library/asyncio-eventloop.rst:652 +#: ../../library/asyncio-eventloop.rst:648 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " "the accepted connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:655 +#: ../../library/asyncio-eventloop.rst:651 msgid "" "*reuse_address* tells the kernel to reuse a local socket in ``TIME_WAIT`` " "state, without waiting for its natural timeout to expire. If not specified " "will automatically be set to ``True`` on Unix." msgstr "" -#: ../../library/asyncio-eventloop.rst:660 +#: ../../library/asyncio-eventloop.rst:656 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " "flag when being created. This option is not supported on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:665 +#: ../../library/asyncio-eventloop.rst:661 msgid "" "*ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait " "for the TLS handshake to complete before aborting the connection. ``60.0`` " "seconds if ``None`` (default)." msgstr "" -#: ../../library/asyncio-eventloop.rst:669 +#: ../../library/asyncio-eventloop.rst:665 msgid "" "*start_serving* set to ``True`` (the default) causes the created server to " "start accepting connections immediately. When set to ``False``, the user " @@ -918,104 +920,106 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:677 -msgid "Added *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。" - -#: ../../library/asyncio-eventloop.rst:690 msgid "The *host* parameter can be a sequence of strings." msgstr "" -#: ../../library/asyncio-eventloop.rst:694 +#: ../../library/asyncio-eventloop.rst:681 +msgid "" +"Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " +"option :py:data:`~socket.TCP_NODELAY` is set by default for all TCP " +"connections." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:687 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " "be used in an async/await code." msgstr "" -#: ../../library/asyncio-eventloop.rst:703 +#: ../../library/asyncio-eventloop.rst:696 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:data:`~socket." "AF_UNIX` socket family." msgstr "" -#: ../../library/asyncio-eventloop.rst:706 +#: ../../library/asyncio-eventloop.rst:699 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " "and :class:`~pathlib.Path` paths are supported." msgstr "" -#: ../../library/asyncio-eventloop.rst:711 +#: ../../library/asyncio-eventloop.rst:704 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: ../../library/asyncio-eventloop.rst:718 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "" - -#: ../../library/asyncio-eventloop.rst:722 -msgid "The *path* parameter can now be a :class:`~pathlib.Path` object." -msgstr "" +#: ../../library/asyncio-eventloop.rst:711 +#, fuzzy +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :class:`~pathlib.Path` object." +msgstr "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。" -#: ../../library/asyncio-eventloop.rst:727 +#: ../../library/asyncio-eventloop.rst:717 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: ../../library/asyncio-eventloop.rst:729 +#: ../../library/asyncio-eventloop.rst:719 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." msgstr "" -#: ../../library/asyncio-eventloop.rst:732 -#: ../../library/asyncio-eventloop.rst:799 +#: ../../library/asyncio-eventloop.rst:722 +#: ../../library/asyncio-eventloop.rst:789 msgid "Parameters:" msgstr "參數:" -#: ../../library/asyncio-eventloop.rst:737 +#: ../../library/asyncio-eventloop.rst:727 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: ../../library/asyncio-eventloop.rst:740 +#: ../../library/asyncio-eventloop.rst:730 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:743 +#: ../../library/asyncio-eventloop.rst:733 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: ../../library/asyncio-eventloop.rst:747 +#: ../../library/asyncio-eventloop.rst:737 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: ../../library/asyncio-eventloop.rst:757 +#: ../../library/asyncio-eventloop.rst:747 msgid "Transferring files" msgstr "" -#: ../../library/asyncio-eventloop.rst:762 +#: ../../library/asyncio-eventloop.rst:752 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:765 +#: ../../library/asyncio-eventloop.rst:755 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: ../../library/asyncio-eventloop.rst:767 +#: ../../library/asyncio-eventloop.rst:757 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:769 -#: ../../library/asyncio-eventloop.rst:959 +#: ../../library/asyncio-eventloop.rst:759 +#: ../../library/asyncio-eventloop.rst:949 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -1024,98 +1028,98 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:776 +#: ../../library/asyncio-eventloop.rst:766 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " "SSL socket on Unix)." msgstr "" -#: ../../library/asyncio-eventloop.rst:780 +#: ../../library/asyncio-eventloop.rst:770 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../library/asyncio-eventloop.rst:787 +#: ../../library/asyncio-eventloop.rst:777 msgid "TLS Upgrade" msgstr "" -#: ../../library/asyncio-eventloop.rst:793 +#: ../../library/asyncio-eventloop.rst:783 msgid "Upgrade an existing transport-based connection to TLS." msgstr "" -#: ../../library/asyncio-eventloop.rst:795 +#: ../../library/asyncio-eventloop.rst:785 msgid "" "Return a new transport instance, that the *protocol* must start using " "immediately after the *await*. The *transport* instance passed to the " "*start_tls* method should never be used again." msgstr "" -#: ../../library/asyncio-eventloop.rst:801 +#: ../../library/asyncio-eventloop.rst:791 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: ../../library/asyncio-eventloop.rst:805 +#: ../../library/asyncio-eventloop.rst:795 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../library/asyncio-eventloop.rst:807 +#: ../../library/asyncio-eventloop.rst:797 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." msgstr "" -#: ../../library/asyncio-eventloop.rst:810 +#: ../../library/asyncio-eventloop.rst:800 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../library/asyncio-eventloop.rst:821 +#: ../../library/asyncio-eventloop.rst:811 msgid "Watching file descriptors" msgstr "" -#: ../../library/asyncio-eventloop.rst:825 +#: ../../library/asyncio-eventloop.rst:815 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." msgstr "" -#: ../../library/asyncio-eventloop.rst:831 +#: ../../library/asyncio-eventloop.rst:821 msgid "Stop monitoring the *fd* file descriptor for read availability." msgstr "" -#: ../../library/asyncio-eventloop.rst:835 +#: ../../library/asyncio-eventloop.rst:825 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " "*callback* with the specified arguments once *fd* is available for writing." msgstr "" -#: ../../library/asyncio-eventloop.rst:839 -#: ../../library/asyncio-eventloop.rst:1058 +#: ../../library/asyncio-eventloop.rst:829 +#: ../../library/asyncio-eventloop.rst:1048 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: ../../library/asyncio-eventloop.rst:844 +#: ../../library/asyncio-eventloop.rst:834 msgid "Stop monitoring the *fd* file descriptor for write availability." msgstr "" -#: ../../library/asyncio-eventloop.rst:846 +#: ../../library/asyncio-eventloop.rst:836 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: ../../library/asyncio-eventloop.rst:851 +#: ../../library/asyncio-eventloop.rst:841 msgid "Working with socket objects directly" msgstr "" -#: ../../library/asyncio-eventloop.rst:853 +#: ../../library/asyncio-eventloop.rst:843 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1124,49 +1128,49 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: ../../library/asyncio-eventloop.rst:862 +#: ../../library/asyncio-eventloop.rst:852 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:865 +#: ../../library/asyncio-eventloop.rst:855 msgid "Return the received data as a bytes object." msgstr "" -#: ../../library/asyncio-eventloop.rst:867 -#: ../../library/asyncio-eventloop.rst:881 -#: ../../library/asyncio-eventloop.rst:896 -#: ../../library/asyncio-eventloop.rst:909 -#: ../../library/asyncio-eventloop.rst:935 -#: ../../library/asyncio-eventloop.rst:973 +#: ../../library/asyncio-eventloop.rst:857 +#: ../../library/asyncio-eventloop.rst:871 +#: ../../library/asyncio-eventloop.rst:886 +#: ../../library/asyncio-eventloop.rst:899 +#: ../../library/asyncio-eventloop.rst:925 +#: ../../library/asyncio-eventloop.rst:963 msgid "*sock* must be a non-blocking socket." msgstr "" -#: ../../library/asyncio-eventloop.rst:869 +#: ../../library/asyncio-eventloop.rst:859 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:876 +#: ../../library/asyncio-eventloop.rst:866 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:879 +#: ../../library/asyncio-eventloop.rst:869 msgid "Return the number of bytes written to the buffer." msgstr "" -#: ../../library/asyncio-eventloop.rst:887 +#: ../../library/asyncio-eventloop.rst:877 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:890 +#: ../../library/asyncio-eventloop.rst:880 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1175,23 +1179,23 @@ msgid "" "the connection." msgstr "" -#: ../../library/asyncio-eventloop.rst:898 +#: ../../library/asyncio-eventloop.rst:888 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned an :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:905 +#: ../../library/asyncio-eventloop.rst:895 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: ../../library/asyncio-eventloop.rst:907 +#: ../../library/asyncio-eventloop.rst:897 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:911 +#: ../../library/asyncio-eventloop.rst:901 msgid "" "``address`` no longer needs to be resolved. ``sock_connect`` will try to " "check if the *address* is already resolved by calling :func:`socket." @@ -1199,19 +1203,19 @@ msgid "" "*address*." msgstr "" -#: ../../library/asyncio-eventloop.rst:920 +#: ../../library/asyncio-eventloop.rst:910 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: ../../library/asyncio-eventloop.rst:926 +#: ../../library/asyncio-eventloop.rst:916 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:929 +#: ../../library/asyncio-eventloop.rst:919 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1219,64 +1223,64 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: ../../library/asyncio-eventloop.rst:937 +#: ../../library/asyncio-eventloop.rst:927 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:944 +#: ../../library/asyncio-eventloop.rst:934 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr ":meth:`loop.create_server` 和 :func:`start_server`\\ 。" -#: ../../library/asyncio-eventloop.rst:949 +#: ../../library/asyncio-eventloop.rst:939 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:952 +#: ../../library/asyncio-eventloop.rst:942 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:954 +#: ../../library/asyncio-eventloop.rst:944 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: ../../library/asyncio-eventloop.rst:957 +#: ../../library/asyncio-eventloop.rst:947 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:966 +#: ../../library/asyncio-eventloop.rst:956 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " "or SSL socket on Unix)." msgstr "" -#: ../../library/asyncio-eventloop.rst:970 +#: ../../library/asyncio-eventloop.rst:960 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../library/asyncio-eventloop.rst:979 +#: ../../library/asyncio-eventloop.rst:969 msgid "DNS" msgstr "DNS" -#: ../../library/asyncio-eventloop.rst:984 +#: ../../library/asyncio-eventloop.rst:974 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:988 +#: ../../library/asyncio-eventloop.rst:978 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:990 +#: ../../library/asyncio-eventloop.rst:980 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1284,67 +1288,67 @@ msgid "" "coroutines." msgstr "" -#: ../../library/asyncio-eventloop.rst:998 +#: ../../library/asyncio-eventloop.rst:988 msgid "Working with pipes" msgstr "" -#: ../../library/asyncio-eventloop.rst:1002 +#: ../../library/asyncio-eventloop.rst:992 msgid "Register the read end of *pipe* in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1007 +#: ../../library/asyncio-eventloop.rst:997 msgid "*pipe* is a :term:`file-like object `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1009 +#: ../../library/asyncio-eventloop.rst:999 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1013 -#: ../../library/asyncio-eventloop.rst:1029 +#: ../../library/asyncio-eventloop.rst:1003 +#: ../../library/asyncio-eventloop.rst:1019 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1018 +#: ../../library/asyncio-eventloop.rst:1008 msgid "Register the write end of *pipe* in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1023 +#: ../../library/asyncio-eventloop.rst:1013 msgid "*pipe* is :term:`file-like object `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1025 +#: ../../library/asyncio-eventloop.rst:1015 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1034 +#: ../../library/asyncio-eventloop.rst:1024 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1039 +#: ../../library/asyncio-eventloop.rst:1029 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: ../../library/asyncio-eventloop.rst:1044 +#: ../../library/asyncio-eventloop.rst:1034 msgid "Unix signals" msgstr "" -#: ../../library/asyncio-eventloop.rst:1048 +#: ../../library/asyncio-eventloop.rst:1038 msgid "Set *callback* as the handler for the *signum* signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1050 +#: ../../library/asyncio-eventloop.rst:1040 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1352,56 +1356,56 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1055 +#: ../../library/asyncio-eventloop.rst:1045 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1061 +#: ../../library/asyncio-eventloop.rst:1051 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: ../../library/asyncio-eventloop.rst:1066 +#: ../../library/asyncio-eventloop.rst:1056 msgid "Remove the handler for the *sig* signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1068 +#: ../../library/asyncio-eventloop.rst:1058 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1075 +#: ../../library/asyncio-eventloop.rst:1065 msgid "The :mod:`signal` module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1079 +#: ../../library/asyncio-eventloop.rst:1069 msgid "Executing code in thread or process pools" msgstr "" -#: ../../library/asyncio-eventloop.rst:1083 +#: ../../library/asyncio-eventloop.rst:1073 msgid "Arrange for *func* to be called in the specified executor." msgstr "" -#: ../../library/asyncio-eventloop.rst:1085 +#: ../../library/asyncio-eventloop.rst:1075 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1129 +#: ../../library/asyncio-eventloop.rst:1119 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1131 +#: ../../library/asyncio-eventloop.rst:1121 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1134 +#: ../../library/asyncio-eventloop.rst:1124 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1409,38 +1413,38 @@ msgid "" "default." msgstr "" -#: ../../library/asyncio-eventloop.rst:1143 +#: ../../library/asyncio-eventloop.rst:1133 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* should be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1147 +#: ../../library/asyncio-eventloop.rst:1137 msgid "" "Using an executor that is not an instance of :class:`~concurrent.futures." "ThreadPoolExecutor` is deprecated and will trigger an error in Python 3.9." msgstr "" -#: ../../library/asyncio-eventloop.rst:1152 +#: ../../library/asyncio-eventloop.rst:1142 msgid "" "*executor* must be an instance of :class:`concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1157 +#: ../../library/asyncio-eventloop.rst:1147 msgid "Error Handling API" msgstr "" -#: ../../library/asyncio-eventloop.rst:1159 +#: ../../library/asyncio-eventloop.rst:1149 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1163 +#: ../../library/asyncio-eventloop.rst:1153 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1165 +#: ../../library/asyncio-eventloop.rst:1155 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1449,158 +1453,158 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1175 +#: ../../library/asyncio-eventloop.rst:1165 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: ../../library/asyncio-eventloop.rst:1182 +#: ../../library/asyncio-eventloop.rst:1172 msgid "Default exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1184 +#: ../../library/asyncio-eventloop.rst:1174 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: ../../library/asyncio-eventloop.rst:1188 +#: ../../library/asyncio-eventloop.rst:1178 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1193 +#: ../../library/asyncio-eventloop.rst:1183 msgid "Call the current event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1195 +#: ../../library/asyncio-eventloop.rst:1185 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: ../../library/asyncio-eventloop.rst:1198 +#: ../../library/asyncio-eventloop.rst:1188 msgid "'message': Error message;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1199 +#: ../../library/asyncio-eventloop.rst:1189 msgid "'exception' (optional): Exception object;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1200 +#: ../../library/asyncio-eventloop.rst:1190 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1201 +#: ../../library/asyncio-eventloop.rst:1191 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1202 +#: ../../library/asyncio-eventloop.rst:1192 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1203 +#: ../../library/asyncio-eventloop.rst:1193 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1204 +#: ../../library/asyncio-eventloop.rst:1194 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1205 +#: ../../library/asyncio-eventloop.rst:1195 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1207 +#: ../../library/asyncio-eventloop.rst:1197 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: ../../library/asyncio-eventloop.rst:1207 +#: ../../library/asyncio-eventloop.rst:1197 msgid "the exception." msgstr "" -#: ../../library/asyncio-eventloop.rst:1211 +#: ../../library/asyncio-eventloop.rst:1201 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler()` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1216 +#: ../../library/asyncio-eventloop.rst:1206 msgid "Enabling debug mode" msgstr "" -#: ../../library/asyncio-eventloop.rst:1220 +#: ../../library/asyncio-eventloop.rst:1210 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1222 +#: ../../library/asyncio-eventloop.rst:1212 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-eventloop.rst:1228 +#: ../../library/asyncio-eventloop.rst:1218 msgid "Set the debug mode of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1232 +#: ../../library/asyncio-eventloop.rst:1222 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1237 +#: ../../library/asyncio-eventloop.rst:1227 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1241 +#: ../../library/asyncio-eventloop.rst:1231 msgid "Running Subprocesses" msgstr "" -#: ../../library/asyncio-eventloop.rst:1243 +#: ../../library/asyncio-eventloop.rst:1233 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: ../../library/asyncio-eventloop.rst:1250 +#: ../../library/asyncio-eventloop.rst:1240 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: ../../library/asyncio-eventloop.rst:1259 +#: ../../library/asyncio-eventloop.rst:1249 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1262 +#: ../../library/asyncio-eventloop.rst:1252 msgid "*args* must be a list of strings represented by:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1264 +#: ../../library/asyncio-eventloop.rst:1254 msgid ":class:`str`;" msgstr ":class:`str`\\ ;" -#: ../../library/asyncio-eventloop.rst:1265 +#: ../../library/asyncio-eventloop.rst:1255 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1268 +#: ../../library/asyncio-eventloop.rst:1258 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: ../../library/asyncio-eventloop.rst:1272 +#: ../../library/asyncio-eventloop.rst:1262 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1608,136 +1612,136 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1278 +#: ../../library/asyncio-eventloop.rst:1268 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1281 +#: ../../library/asyncio-eventloop.rst:1271 msgid "Other parameters:" msgstr "其他參數:" -#: ../../library/asyncio-eventloop.rst:1283 +#: ../../library/asyncio-eventloop.rst:1273 msgid "*stdin* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1285 +#: ../../library/asyncio-eventloop.rst:1275 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard input stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1288 -#: ../../library/asyncio-eventloop.rst:1300 -#: ../../library/asyncio-eventloop.rst:1312 +#: ../../library/asyncio-eventloop.rst:1278 +#: ../../library/asyncio-eventloop.rst:1290 +#: ../../library/asyncio-eventloop.rst:1302 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: ../../library/asyncio-eventloop.rst:1290 -#: ../../library/asyncio-eventloop.rst:1302 -#: ../../library/asyncio-eventloop.rst:1314 +#: ../../library/asyncio-eventloop.rst:1280 +#: ../../library/asyncio-eventloop.rst:1292 +#: ../../library/asyncio-eventloop.rst:1304 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: ../../library/asyncio-eventloop.rst:1292 -#: ../../library/asyncio-eventloop.rst:1304 -#: ../../library/asyncio-eventloop.rst:1316 +#: ../../library/asyncio-eventloop.rst:1282 +#: ../../library/asyncio-eventloop.rst:1294 +#: ../../library/asyncio-eventloop.rst:1306 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: ../../library/asyncio-eventloop.rst:1295 +#: ../../library/asyncio-eventloop.rst:1285 msgid "*stdout* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1297 +#: ../../library/asyncio-eventloop.rst:1287 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard output stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1307 +#: ../../library/asyncio-eventloop.rst:1297 msgid "*stderr* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1309 +#: ../../library/asyncio-eventloop.rst:1299 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard error stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1318 +#: ../../library/asyncio-eventloop.rst:1308 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: ../../library/asyncio-eventloop.rst:1321 +#: ../../library/asyncio-eventloop.rst:1311 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: ../../library/asyncio-eventloop.rst:1326 +#: ../../library/asyncio-eventloop.rst:1316 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: ../../library/asyncio-eventloop.rst:1330 +#: ../../library/asyncio-eventloop.rst:1320 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1333 +#: ../../library/asyncio-eventloop.rst:1323 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1341 +#: ../../library/asyncio-eventloop.rst:1331 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: ../../library/asyncio-eventloop.rst:1346 +#: ../../library/asyncio-eventloop.rst:1336 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1349 +#: ../../library/asyncio-eventloop.rst:1339 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1352 +#: ../../library/asyncio-eventloop.rst:1342 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1355 +#: ../../library/asyncio-eventloop.rst:1345 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1360 +#: ../../library/asyncio-eventloop.rst:1350 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -1747,105 +1751,105 @@ msgid "" "used to construct shell commands." msgstr "" -#: ../../library/asyncio-eventloop.rst:1369 +#: ../../library/asyncio-eventloop.rst:1359 msgid "Callback Handles" msgstr "" -#: ../../library/asyncio-eventloop.rst:1373 +#: ../../library/asyncio-eventloop.rst:1363 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1378 +#: ../../library/asyncio-eventloop.rst:1368 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: ../../library/asyncio-eventloop.rst:1383 +#: ../../library/asyncio-eventloop.rst:1373 msgid "Return ``True`` if the callback was cancelled." msgstr "" -#: ../../library/asyncio-eventloop.rst:1389 +#: ../../library/asyncio-eventloop.rst:1379 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1392 +#: ../../library/asyncio-eventloop.rst:1382 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1396 +#: ../../library/asyncio-eventloop.rst:1386 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: ../../library/asyncio-eventloop.rst:1398 +#: ../../library/asyncio-eventloop.rst:1388 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1405 +#: ../../library/asyncio-eventloop.rst:1395 msgid "Server Objects" msgstr "" -#: ../../library/asyncio-eventloop.rst:1407 +#: ../../library/asyncio-eventloop.rst:1397 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: ../../library/asyncio-eventloop.rst:1411 +#: ../../library/asyncio-eventloop.rst:1401 msgid "Do not instantiate the class directly." msgstr "" -#: ../../library/asyncio-eventloop.rst:1415 +#: ../../library/asyncio-eventloop.rst:1405 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1428 +#: ../../library/asyncio-eventloop.rst:1418 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: ../../library/asyncio-eventloop.rst:1433 +#: ../../library/asyncio-eventloop.rst:1423 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1436 +#: ../../library/asyncio-eventloop.rst:1426 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: ../../library/asyncio-eventloop.rst:1439 +#: ../../library/asyncio-eventloop.rst:1429 msgid "" "The server is closed asynchronously, use the :meth:`wait_closed` coroutine " "to wait until the server is closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1444 +#: ../../library/asyncio-eventloop.rst:1434 msgid "Return the event loop associated with the server object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1450 +#: ../../library/asyncio-eventloop.rst:1440 msgid "Start accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1452 +#: ../../library/asyncio-eventloop.rst:1442 msgid "" "This method is idempotent, so it can be called when the server is already " "being serving." msgstr "" -#: ../../library/asyncio-eventloop.rst:1455 +#: ../../library/asyncio-eventloop.rst:1445 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -1854,97 +1858,97 @@ msgid "" "accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1466 +#: ../../library/asyncio-eventloop.rst:1456 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1470 +#: ../../library/asyncio-eventloop.rst:1460 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1492 +#: ../../library/asyncio-eventloop.rst:1482 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1498 +#: ../../library/asyncio-eventloop.rst:1488 msgid "Wait until the :meth:`close` method completes." msgstr "" -#: ../../library/asyncio-eventloop.rst:1502 +#: ../../library/asyncio-eventloop.rst:1492 msgid "List of :class:`socket.socket` objects the server is listening on." msgstr "" -#: ../../library/asyncio-eventloop.rst:1504 +#: ../../library/asyncio-eventloop.rst:1494 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: ../../library/asyncio-eventloop.rst:1513 +#: ../../library/asyncio-eventloop.rst:1503 msgid "Event Loop Implementations" msgstr "" -#: ../../library/asyncio-eventloop.rst:1515 +#: ../../library/asyncio-eventloop.rst:1505 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1518 +#: ../../library/asyncio-eventloop.rst:1508 msgid "" "By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " "and :class:`ProactorEventLoop` on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1524 +#: ../../library/asyncio-eventloop.rst:1514 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1526 +#: ../../library/asyncio-eventloop.rst:1516 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1538 +#: ../../library/asyncio-eventloop.rst:1528 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/asyncio-eventloop.rst:1543 +#: ../../library/asyncio-eventloop.rst:1533 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1546 +#: ../../library/asyncio-eventloop.rst:1536 msgid ":ref:`Availability `: Windows." msgstr ":ref:`適用 `:Windows。" -#: ../../library/asyncio-eventloop.rst:1549 +#: ../../library/asyncio-eventloop.rst:1539 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../library/asyncio-eventloop.rst:1555 +#: ../../library/asyncio-eventloop.rst:1545 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: ../../library/asyncio-eventloop.rst:1557 +#: ../../library/asyncio-eventloop.rst:1547 msgid "" "The :ref:`Event Loop Methods ` section lists all methods " "that an alternative implementation of ``AbstractEventLoop`` should have " "defined." msgstr "" -#: ../../library/asyncio-eventloop.rst:1563 +#: ../../library/asyncio-eventloop.rst:1553 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-eventloop.rst:1565 +#: ../../library/asyncio-eventloop.rst:1555 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -1952,70 +1956,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1575 +#: ../../library/asyncio-eventloop.rst:1565 msgid "Hello World with call_soon()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1577 +#: ../../library/asyncio-eventloop.rst:1567 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1601 +#: ../../library/asyncio-eventloop.rst:1591 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1608 +#: ../../library/asyncio-eventloop.rst:1598 msgid "Display the current date with call_later()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1610 +#: ../../library/asyncio-eventloop.rst:1600 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1638 +#: ../../library/asyncio-eventloop.rst:1628 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1645 +#: ../../library/asyncio-eventloop.rst:1635 msgid "Watch a file descriptor for read events" msgstr "" -#: ../../library/asyncio-eventloop.rst:1647 +#: ../../library/asyncio-eventloop.rst:1637 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1685 +#: ../../library/asyncio-eventloop.rst:1675 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1689 +#: ../../library/asyncio-eventloop.rst:1679 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: ../../library/asyncio-eventloop.rst:1697 +#: ../../library/asyncio-eventloop.rst:1687 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: ../../library/asyncio-eventloop.rst:1699 +#: ../../library/asyncio-eventloop.rst:1689 msgid "(This ``signals`` example only works on Unix.)" msgstr "" -#: ../../library/asyncio-eventloop.rst:1701 +#: ../../library/asyncio-eventloop.rst:1691 msgid "" "Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " "the :meth:`loop.add_signal_handler` method::" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index a46476a4ec..a413d229a5 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-22 09:18+0000\n" +"POT-Creation-Date: 2022-02-19 00:13+0000\n" "PO-Revision-Date: 2022-01-25 01:29+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -320,7 +320,8 @@ msgstr "" "Future 狀態改為 *cancelled* 並在為回呼函式排程後回傳 ``True``\\ 。" #: ../../library/asyncio-future.rst:196 -msgid "Added the ``msg`` parameter." +#, fuzzy +msgid "Added the *msg* parameter." msgstr "新增 ``msg`` 參數。" #: ../../library/asyncio-future.rst:201 diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index fff0b3d496..ce2b1a7dca 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.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-02-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -64,44 +64,48 @@ msgid "" "always known and can be returned by calling the :meth:`qsize` method." msgstr "" -#: ../../library/asyncio-queue.rst:40 +#: ../../library/asyncio-queue.rst:39 +msgid "Removed the *loop* parameter." +msgstr "" + +#: ../../library/asyncio-queue.rst:43 msgid "This class is :ref:`not thread safe `." msgstr "" -#: ../../library/asyncio-queue.rst:44 +#: ../../library/asyncio-queue.rst:47 msgid "Number of items allowed in the queue." msgstr "" -#: ../../library/asyncio-queue.rst:48 +#: ../../library/asyncio-queue.rst:51 msgid "Return ``True`` if the queue is empty, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-queue.rst:52 +#: ../../library/asyncio-queue.rst:55 msgid "Return ``True`` if there are :attr:`maxsize` items in the queue." msgstr "" -#: ../../library/asyncio-queue.rst:54 +#: ../../library/asyncio-queue.rst:57 msgid "" "If the queue was initialized with ``maxsize=0`` (the default), then :meth:" "`full()` never returns ``True``." msgstr "" -#: ../../library/asyncio-queue.rst:59 +#: ../../library/asyncio-queue.rst:62 msgid "" "Remove and return an item from the queue. If queue is empty, wait until an " "item is available." msgstr "" -#: ../../library/asyncio-queue.rst:64 +#: ../../library/asyncio-queue.rst:67 msgid "" "Return an item if one is immediately available, else raise :exc:`QueueEmpty`." msgstr "" -#: ../../library/asyncio-queue.rst:69 +#: ../../library/asyncio-queue.rst:72 msgid "Block until all items in the queue have been received and processed." msgstr "" -#: ../../library/asyncio-queue.rst:71 +#: ../../library/asyncio-queue.rst:74 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " "queue. The count goes down whenever a consumer coroutine calls :meth:" @@ -110,100 +114,93 @@ msgid "" "unblocks." msgstr "" -#: ../../library/asyncio-queue.rst:79 +#: ../../library/asyncio-queue.rst:82 msgid "" "Put an item into the queue. If the queue is full, wait until a free slot is " "available before adding the item." msgstr "" -#: ../../library/asyncio-queue.rst:84 +#: ../../library/asyncio-queue.rst:87 msgid "Put an item into the queue without blocking." msgstr "" -#: ../../library/asyncio-queue.rst:86 +#: ../../library/asyncio-queue.rst:89 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "" -#: ../../library/asyncio-queue.rst:90 +#: ../../library/asyncio-queue.rst:93 msgid "Return the number of items in the queue." msgstr "" -#: ../../library/asyncio-queue.rst:94 +#: ../../library/asyncio-queue.rst:97 msgid "Indicate that a formerly enqueued task is complete." msgstr "" -#: ../../library/asyncio-queue.rst:96 +#: ../../library/asyncio-queue.rst:99 msgid "" "Used by queue consumers. For each :meth:`~Queue.get` used to fetch a task, a " "subsequent call to :meth:`task_done` tells the queue that the processing on " "the task is complete." msgstr "" -#: ../../library/asyncio-queue.rst:100 +#: ../../library/asyncio-queue.rst:103 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " "item that had been :meth:`~Queue.put` into the queue)." msgstr "" -#: ../../library/asyncio-queue.rst:105 +#: ../../library/asyncio-queue.rst:108 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." msgstr "" -#: ../../library/asyncio-queue.rst:110 -msgid "" -"The ``loop`` parameter. This function has been implicitly getting the " -"current running loop since 3.7. See :ref:`What's New in 3.10's Removed " -"section ` for more information." -msgstr "" - -#: ../../library/asyncio-queue.rst:117 +#: ../../library/asyncio-queue.rst:113 msgid "Priority Queue" msgstr "" -#: ../../library/asyncio-queue.rst:121 +#: ../../library/asyncio-queue.rst:117 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." msgstr "" -#: ../../library/asyncio-queue.rst:124 +#: ../../library/asyncio-queue.rst:120 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "" -#: ../../library/asyncio-queue.rst:129 +#: ../../library/asyncio-queue.rst:125 msgid "LIFO Queue" msgstr "" -#: ../../library/asyncio-queue.rst:133 +#: ../../library/asyncio-queue.rst:129 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." msgstr "" -#: ../../library/asyncio-queue.rst:138 +#: ../../library/asyncio-queue.rst:134 msgid "Exceptions" msgstr "例外" -#: ../../library/asyncio-queue.rst:142 +#: ../../library/asyncio-queue.rst:138 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." msgstr "" -#: ../../library/asyncio-queue.rst:148 +#: ../../library/asyncio-queue.rst:144 msgid "" "Exception raised when the :meth:`~Queue.put_nowait` method is called on a " "queue that has reached its *maxsize*." msgstr "" -#: ../../library/asyncio-queue.rst:153 +#: ../../library/asyncio-queue.rst:149 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-queue.rst:157 +#: ../../library/asyncio-queue.rst:153 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 8dc3bd187c..29b625f144 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.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-02-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -63,7 +63,7 @@ msgid "" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" -#: ../../library/asyncio-stream.rst:62 ../../library/asyncio-stream.rst:100 +#: ../../library/asyncio-stream.rst:62 ../../library/asyncio-stream.rst:95 msgid "" "*limit* determines the buffer size limit used by the returned :class:" "`StreamReader` instance. By default the *limit* is set to 64 KiB." @@ -75,23 +75,21 @@ msgid "" "create_connection`." msgstr "" -#: ../../library/asyncio-stream.rst:71 ../../library/asyncio-stream.rst:136 -msgid "The *ssl_handshake_timeout* parameter." +#: ../../library/asyncio-stream.rst:69 +#, fuzzy +msgid "Added the *ssl_handshake_timeout* parameter." msgstr "*ssl_handshake_timeout* 參數。" -#: ../../library/asyncio-stream.rst:75 ../../library/asyncio-stream.rst:113 -#: ../../library/asyncio-stream.rst:144 ../../library/asyncio-stream.rst:172 -msgid "" -"The ``loop`` parameter. This function has been implicitly getting the " -"current running loop since 3.7. See :ref:`What's New in 3.10's Removed " -"section ` for more information." +#: ../../library/asyncio-stream.rst:72 ../../library/asyncio-stream.rst:105 +#: ../../library/asyncio-stream.rst:128 ../../library/asyncio-stream.rst:148 +msgid "Removed the *loop* parameter." msgstr "" -#: ../../library/asyncio-stream.rst:89 +#: ../../library/asyncio-stream.rst:84 msgid "Start a socket server." msgstr "" -#: ../../library/asyncio-stream.rst:91 +#: ../../library/asyncio-stream.rst:86 msgid "" "The *client_connected_cb* callback is called whenever a new client " "connection is established. It receives a ``(reader, writer)`` pair as two " @@ -99,137 +97,144 @@ msgid "" "classes." msgstr "" -#: ../../library/asyncio-stream.rst:96 +#: ../../library/asyncio-stream.rst:91 msgid "" "*client_connected_cb* can be a plain callable or a :ref:`coroutine function " "`; if it is a coroutine function, it will be automatically " "scheduled as a :class:`Task`." msgstr "" -#: ../../library/asyncio-stream.rst:104 +#: ../../library/asyncio-stream.rst:99 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: ../../library/asyncio-stream.rst:109 ../../library/asyncio-stream.rst:164 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "" +#: ../../library/asyncio-stream.rst:102 +#, fuzzy +msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." +msgstr "*ssl_handshake_timeout* 參數。" -#: ../../library/asyncio-stream.rst:120 +#: ../../library/asyncio-stream.rst:110 msgid "Unix Sockets" msgstr "" -#: ../../library/asyncio-stream.rst:125 +#: ../../library/asyncio-stream.rst:115 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" -#: ../../library/asyncio-stream.rst:128 +#: ../../library/asyncio-stream.rst:118 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" -#: ../../library/asyncio-stream.rst:130 +#: ../../library/asyncio-stream.rst:120 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "另請參閱 :meth:`loop.create_unix_connection` 文件。" -#: ../../library/asyncio-stream.rst:133 ../../library/asyncio-stream.rst:161 +#: ../../library/asyncio-stream.rst:123 ../../library/asyncio-stream.rst:143 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/asyncio-stream.rst:140 -msgid "The *path* parameter can now be a :term:`path-like object`" +#: ../../library/asyncio-stream.rst:124 +#, fuzzy +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`" msgstr "*path* 參數現在可以是個 :term:`path-like object`" -#: ../../library/asyncio-stream.rst:154 +#: ../../library/asyncio-stream.rst:136 msgid "Start a Unix socket server." msgstr "" -#: ../../library/asyncio-stream.rst:156 +#: ../../library/asyncio-stream.rst:138 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" -#: ../../library/asyncio-stream.rst:158 +#: ../../library/asyncio-stream.rst:140 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "另請參閱 :meth:`loop.create_unix_server` 文件。" -#: ../../library/asyncio-stream.rst:168 -msgid "The *path* parameter can now be a :term:`path-like object`." -msgstr "" +#: ../../library/asyncio-stream.rst:144 +#, fuzzy +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :term:`path-like object`." +msgstr "*path* 參數現在可以是個 :term:`path-like object`" -#: ../../library/asyncio-stream.rst:179 +#: ../../library/asyncio-stream.rst:153 msgid "StreamReader" msgstr "StreamReader" -#: ../../library/asyncio-stream.rst:183 +#: ../../library/asyncio-stream.rst:157 msgid "" "Represents a reader object that provides APIs to read data from the IO " "stream." msgstr "" -#: ../../library/asyncio-stream.rst:186 +#: ../../library/asyncio-stream.rst:160 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:192 +#: ../../library/asyncio-stream.rst:166 msgid "" "Read up to *n* bytes. If *n* is not provided, or set to ``-1``, read until " "EOF and return all read bytes." msgstr "" -#: ../../library/asyncio-stream.rst:195 +#: ../../library/asyncio-stream.rst:169 msgid "" "If EOF was received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:200 +#: ../../library/asyncio-stream.rst:174 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" -#: ../../library/asyncio-stream.rst:203 +#: ../../library/asyncio-stream.rst:177 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "" -#: ../../library/asyncio-stream.rst:206 +#: ../../library/asyncio-stream.rst:180 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:211 +#: ../../library/asyncio-stream.rst:185 msgid "Read exactly *n* bytes." msgstr "" -#: ../../library/asyncio-stream.rst:213 +#: ../../library/asyncio-stream.rst:187 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " "partially read data." msgstr "" -#: ../../library/asyncio-stream.rst:219 +#: ../../library/asyncio-stream.rst:193 msgid "Read data from the stream until *separator* is found." msgstr "" -#: ../../library/asyncio-stream.rst:221 +#: ../../library/asyncio-stream.rst:195 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." msgstr "" -#: ../../library/asyncio-stream.rst:225 +#: ../../library/asyncio-stream.rst:199 msgid "" "If the amount of data read exceeds the configured stream limit, a :exc:" "`LimitOverrunError` exception is raised, and the data is left in the " "internal buffer and can be read again." msgstr "" -#: ../../library/asyncio-stream.rst:229 +#: ../../library/asyncio-stream.rst:203 msgid "" "If EOF is reached before the complete separator is found, an :exc:" "`IncompleteReadError` exception is raised, and the internal buffer is " @@ -237,77 +242,77 @@ msgid "" "portion of the separator." msgstr "" -#: ../../library/asyncio-stream.rst:238 +#: ../../library/asyncio-stream.rst:212 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" -#: ../../library/asyncio-stream.rst:243 +#: ../../library/asyncio-stream.rst:217 msgid "StreamWriter" msgstr "StreamWriter" -#: ../../library/asyncio-stream.rst:247 +#: ../../library/asyncio-stream.rst:221 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "" -#: ../../library/asyncio-stream.rst:250 +#: ../../library/asyncio-stream.rst:224 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:256 +#: ../../library/asyncio-stream.rst:230 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:260 ../../library/asyncio-stream.rst:272 +#: ../../library/asyncio-stream.rst:234 ../../library/asyncio-stream.rst:246 msgid "The method should be used along with the ``drain()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:267 +#: ../../library/asyncio-stream.rst:241 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:279 +#: ../../library/asyncio-stream.rst:253 msgid "The method closes the stream and the underlying socket." msgstr "" -#: ../../library/asyncio-stream.rst:281 +#: ../../library/asyncio-stream.rst:255 msgid "The method should be used along with the ``wait_closed()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:288 +#: ../../library/asyncio-stream.rst:262 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-stream.rst:293 +#: ../../library/asyncio-stream.rst:267 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "" -#: ../../library/asyncio-stream.rst:298 +#: ../../library/asyncio-stream.rst:272 msgid "Return the underlying asyncio transport." msgstr "" -#: ../../library/asyncio-stream.rst:302 +#: ../../library/asyncio-stream.rst:276 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" -#: ../../library/asyncio-stream.rst:307 +#: ../../library/asyncio-stream.rst:281 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" -#: ../../library/asyncio-stream.rst:313 +#: ../../library/asyncio-stream.rst:287 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -316,93 +321,93 @@ msgid "" "`drain` returns immediately." msgstr "" -#: ../../library/asyncio-stream.rst:322 +#: ../../library/asyncio-stream.rst:296 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" -#: ../../library/asyncio-stream.rst:329 +#: ../../library/asyncio-stream.rst:303 msgid "Wait until the stream is closed." msgstr "" -#: ../../library/asyncio-stream.rst:331 +#: ../../library/asyncio-stream.rst:305 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed." msgstr "" -#: ../../library/asyncio-stream.rst:338 +#: ../../library/asyncio-stream.rst:312 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-stream.rst:343 +#: ../../library/asyncio-stream.rst:317 msgid "TCP echo client using streams" msgstr "" -#: ../../library/asyncio-stream.rst:345 +#: ../../library/asyncio-stream.rst:319 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:367 +#: ../../library/asyncio-stream.rst:341 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:374 +#: ../../library/asyncio-stream.rst:348 msgid "TCP echo server using streams" msgstr "" -#: ../../library/asyncio-stream.rst:376 +#: ../../library/asyncio-stream.rst:350 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: ../../library/asyncio-stream.rst:409 +#: ../../library/asyncio-stream.rst:383 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." "create_server` method." msgstr "" -#: ../../library/asyncio-stream.rst:414 +#: ../../library/asyncio-stream.rst:388 msgid "Get HTTP headers" msgstr "" -#: ../../library/asyncio-stream.rst:416 +#: ../../library/asyncio-stream.rst:390 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: ../../library/asyncio-stream.rst:454 +#: ../../library/asyncio-stream.rst:428 msgid "Usage::" msgstr "" "用法:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:458 +#: ../../library/asyncio-stream.rst:432 msgid "or with HTTPS::" msgstr "" -#: ../../library/asyncio-stream.rst:466 +#: ../../library/asyncio-stream.rst:440 msgid "Register an open socket to wait for data using streams" msgstr "" -#: ../../library/asyncio-stream.rst:468 +#: ../../library/asyncio-stream.rst:442 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:502 +#: ../../library/asyncio-stream.rst:476 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:506 +#: ../../library/asyncio-stream.rst:480 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index 2360d3e7d6..5b09831ff4 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.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-02-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -68,7 +68,7 @@ msgid "Create a subprocess." msgstr "" #: ../../library/asyncio-subprocess.rst:69 -#: ../../library/asyncio-subprocess.rst:91 +#: ../../library/asyncio-subprocess.rst:87 msgid "" "The *limit* argument sets the buffer limit for :class:`StreamReader` " "wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :attr:" @@ -76,7 +76,7 @@ msgid "" msgstr "" #: ../../library/asyncio-subprocess.rst:73 -#: ../../library/asyncio-subprocess.rst:95 +#: ../../library/asyncio-subprocess.rst:91 msgid "Return a :class:`~asyncio.subprocess.Process` instance." msgstr "" @@ -85,24 +85,21 @@ msgid "" "See the documentation of :meth:`loop.subprocess_exec` for other parameters." msgstr "" -#: ../../library/asyncio-subprocess.rst:80 -#: ../../library/asyncio-subprocess.rst:111 -msgid "" -"The ``loop`` parameter. This function has been implicitly getting the " -"current running loop since 3.7. See :ref:`What's New in 3.10's Removed " -"section ` for more information." +#: ../../library/asyncio-subprocess.rst:78 +#: ../../library/asyncio-subprocess.rst:105 +msgid "Removed the *loop* parameter." msgstr "" -#: ../../library/asyncio-subprocess.rst:89 +#: ../../library/asyncio-subprocess.rst:85 msgid "Run the *cmd* shell command." msgstr "" -#: ../../library/asyncio-subprocess.rst:97 +#: ../../library/asyncio-subprocess.rst:93 msgid "" "See the documentation of :meth:`loop.subprocess_shell` for other parameters." msgstr "" -#: ../../library/asyncio-subprocess.rst:102 +#: ../../library/asyncio-subprocess.rst:98 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -112,14 +109,14 @@ msgid "" "be used to construct shell commands." msgstr "" -#: ../../library/asyncio-subprocess.rst:118 +#: ../../library/asyncio-subprocess.rst:110 msgid "" "Subprocesses are available for Windows if a :class:`ProactorEventLoop` is " "used. See :ref:`Subprocess Support on Windows ` " "for details." msgstr "" -#: ../../library/asyncio-subprocess.rst:124 +#: ../../library/asyncio-subprocess.rst:116 msgid "" "asyncio also has the following *low-level* APIs to work with subprocesses: :" "meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop." @@ -128,22 +125,22 @@ msgid "" "Protocols `." msgstr "" -#: ../../library/asyncio-subprocess.rst:132 +#: ../../library/asyncio-subprocess.rst:124 msgid "Constants" msgstr "常數" -#: ../../library/asyncio-subprocess.rst:136 +#: ../../library/asyncio-subprocess.rst:128 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." msgstr "" -#: ../../library/asyncio-subprocess.rst:138 +#: ../../library/asyncio-subprocess.rst:130 msgid "" "If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin ` attribute will point to a :class:`StreamWriter` " "instance." msgstr "" -#: ../../library/asyncio-subprocess.rst:142 +#: ../../library/asyncio-subprocess.rst:134 msgid "" "If *PIPE* is passed to *stdout* or *stderr* arguments, the :attr:`Process." "stdout ` and :attr:`Process.stderr " @@ -151,24 +148,24 @@ msgid "" "`StreamReader` instances." msgstr "" -#: ../../library/asyncio-subprocess.rst:149 +#: ../../library/asyncio-subprocess.rst:141 msgid "" "Special value that can be used as the *stderr* argument and indicates that " "standard error should be redirected into standard output." msgstr "" -#: ../../library/asyncio-subprocess.rst:154 +#: ../../library/asyncio-subprocess.rst:146 msgid "" "Special value that can be used as the *stdin*, *stdout* or *stderr* argument " "to process creation functions. It indicates that the special file :data:`os." "devnull` will be used for the corresponding subprocess stream." msgstr "" -#: ../../library/asyncio-subprocess.rst:160 +#: ../../library/asyncio-subprocess.rst:152 msgid "Interacting with Subprocesses" msgstr "" -#: ../../library/asyncio-subprocess.rst:162 +#: ../../library/asyncio-subprocess.rst:154 msgid "" "Both :func:`create_subprocess_exec` and :func:`create_subprocess_shell` " "functions return instances of the *Process* class. *Process* is a high-" @@ -176,61 +173,61 @@ msgid "" "their completion." msgstr "" -#: ../../library/asyncio-subprocess.rst:169 +#: ../../library/asyncio-subprocess.rst:161 msgid "" "An object that wraps OS processes created by the :func:" "`create_subprocess_exec` and :func:`create_subprocess_shell` functions." msgstr "" -#: ../../library/asyncio-subprocess.rst:173 +#: ../../library/asyncio-subprocess.rst:165 msgid "" "This class is designed to have a similar API to the :class:`subprocess." "Popen` class, but there are some notable differences:" msgstr "" -#: ../../library/asyncio-subprocess.rst:177 +#: ../../library/asyncio-subprocess.rst:169 msgid "" "unlike Popen, Process instances do not have an equivalent to the :meth:" "`~subprocess.Popen.poll` method;" msgstr "" -#: ../../library/asyncio-subprocess.rst:180 +#: ../../library/asyncio-subprocess.rst:172 msgid "" "the :meth:`~asyncio.subprocess.Process.communicate` and :meth:`~asyncio." "subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" "func:`wait_for` function;" msgstr "" -#: ../../library/asyncio-subprocess.rst:184 +#: ../../library/asyncio-subprocess.rst:176 msgid "" "the :meth:`Process.wait() ` method is " "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " "a blocking busy loop;" msgstr "" -#: ../../library/asyncio-subprocess.rst:188 +#: ../../library/asyncio-subprocess.rst:180 msgid "the *universal_newlines* parameter is not supported." msgstr "" -#: ../../library/asyncio-subprocess.rst:190 +#: ../../library/asyncio-subprocess.rst:182 msgid "This class is :ref:`not thread safe `." msgstr "" -#: ../../library/asyncio-subprocess.rst:192 +#: ../../library/asyncio-subprocess.rst:184 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." msgstr "" -#: ../../library/asyncio-subprocess.rst:197 +#: ../../library/asyncio-subprocess.rst:189 msgid "Wait for the child process to terminate." msgstr "" -#: ../../library/asyncio-subprocess.rst:199 +#: ../../library/asyncio-subprocess.rst:191 msgid "Set and return the :attr:`returncode` attribute." msgstr "" -#: ../../library/asyncio-subprocess.rst:203 +#: ../../library/asyncio-subprocess.rst:195 msgid "" "This method can deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and " "the child process generates so much output that it blocks waiting for the OS " @@ -238,33 +235,33 @@ msgid "" "using pipes to avoid this condition." msgstr "" -#: ../../library/asyncio-subprocess.rst:211 +#: ../../library/asyncio-subprocess.rst:203 msgid "Interact with process:" msgstr "" -#: ../../library/asyncio-subprocess.rst:213 +#: ../../library/asyncio-subprocess.rst:205 msgid "send data to *stdin* (if *input* is not ``None``);" msgstr "" -#: ../../library/asyncio-subprocess.rst:214 +#: ../../library/asyncio-subprocess.rst:206 msgid "read data from *stdout* and *stderr*, until EOF is reached;" msgstr "" -#: ../../library/asyncio-subprocess.rst:215 +#: ../../library/asyncio-subprocess.rst:207 msgid "wait for process to terminate." msgstr "" -#: ../../library/asyncio-subprocess.rst:217 +#: ../../library/asyncio-subprocess.rst:209 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:220 +#: ../../library/asyncio-subprocess.rst:212 msgid "Return a tuple ``(stdout_data, stderr_data)``." msgstr "" -#: ../../library/asyncio-subprocess.rst:222 +#: ../../library/asyncio-subprocess.rst:214 msgid "" "If either :exc:`BrokenPipeError` or :exc:`ConnectionResetError` exception is " "raised when writing *input* into *stdin*, the exception is ignored. This " @@ -272,7 +269,7 @@ msgid "" "*stdin*." msgstr "" -#: ../../library/asyncio-subprocess.rst:227 +#: ../../library/asyncio-subprocess.rst:219 msgid "" "If it is desired to send data to the process' *stdin*, the process needs to " "be created with ``stdin=PIPE``. Similarly, to get anything other than " @@ -280,71 +277,71 @@ msgid "" "``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." msgstr "" -#: ../../library/asyncio-subprocess.rst:233 +#: ../../library/asyncio-subprocess.rst:225 msgid "" "Note, that the data read is buffered in memory, so do not use this method if " "the data size is large or unlimited." msgstr "" -#: ../../library/asyncio-subprocess.rst:238 +#: ../../library/asyncio-subprocess.rst:230 msgid "Sends the signal *signal* to the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:242 +#: ../../library/asyncio-subprocess.rst:234 msgid "" "On Windows, :py:data:`SIGTERM` is an alias for :meth:`terminate`. " "``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT`` can be sent to processes started " "with a *creationflags* parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" -#: ../../library/asyncio-subprocess.rst:249 +#: ../../library/asyncio-subprocess.rst:241 msgid "Stop the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:251 +#: ../../library/asyncio-subprocess.rst:243 msgid "" "On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " "process." msgstr "" -#: ../../library/asyncio-subprocess.rst:254 +#: ../../library/asyncio-subprocess.rst:246 msgid "" "On Windows the Win32 API function :c:func:`TerminateProcess` is called to " "stop the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:259 +#: ../../library/asyncio-subprocess.rst:251 msgid "Kill the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:261 +#: ../../library/asyncio-subprocess.rst:253 msgid "" "On POSIX systems this method sends :py:data:`SIGKILL` to the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:264 +#: ../../library/asyncio-subprocess.rst:256 msgid "On Windows this method is an alias for :meth:`terminate`." msgstr "" -#: ../../library/asyncio-subprocess.rst:268 +#: ../../library/asyncio-subprocess.rst:260 msgid "" "Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " "created with ``stdin=None``." msgstr "" -#: ../../library/asyncio-subprocess.rst:273 +#: ../../library/asyncio-subprocess.rst:265 msgid "" "Standard output stream (:class:`StreamReader`) or ``None`` if the process " "was created with ``stdout=None``." msgstr "" -#: ../../library/asyncio-subprocess.rst:278 +#: ../../library/asyncio-subprocess.rst:270 msgid "" "Standard error stream (:class:`StreamReader`) or ``None`` if the process was " "created with ``stderr=None``." msgstr "" -#: ../../library/asyncio-subprocess.rst:283 +#: ../../library/asyncio-subprocess.rst:275 msgid "" "Use the :meth:`communicate` method rather than :attr:`process.stdin.write() " "`, :attr:`await process.stdout.read() ` or :attr:`await " @@ -352,93 +349,93 @@ msgid "" "reading or writing and blocking the child process." msgstr "" -#: ../../library/asyncio-subprocess.rst:292 +#: ../../library/asyncio-subprocess.rst:284 msgid "Process identification number (PID)." msgstr "" -#: ../../library/asyncio-subprocess.rst:294 +#: ../../library/asyncio-subprocess.rst:286 msgid "" "Note that for processes created by the :func:`create_subprocess_shell` " "function, this attribute is the PID of the spawned shell." msgstr "" -#: ../../library/asyncio-subprocess.rst:299 +#: ../../library/asyncio-subprocess.rst:291 msgid "Return code of the process when it exits." msgstr "" -#: ../../library/asyncio-subprocess.rst:301 +#: ../../library/asyncio-subprocess.rst:293 msgid "A ``None`` value indicates that the process has not terminated yet." msgstr "" -#: ../../library/asyncio-subprocess.rst:303 +#: ../../library/asyncio-subprocess.rst:295 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." msgstr "" -#: ../../library/asyncio-subprocess.rst:310 +#: ../../library/asyncio-subprocess.rst:302 msgid "Subprocess and Threads" msgstr "子行程與線程" -#: ../../library/asyncio-subprocess.rst:312 +#: ../../library/asyncio-subprocess.rst:304 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" -#: ../../library/asyncio-subprocess.rst:315 +#: ../../library/asyncio-subprocess.rst:307 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." msgstr "" -#: ../../library/asyncio-subprocess.rst:318 +#: ../../library/asyncio-subprocess.rst:310 msgid "" "On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" "`asyncio-watchers` for more info." msgstr "" -#: ../../library/asyncio-subprocess.rst:324 +#: ../../library/asyncio-subprocess.rst:316 msgid "" "UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " "from different threads without any limitation." msgstr "" -#: ../../library/asyncio-subprocess.rst:327 +#: ../../library/asyncio-subprocess.rst:319 msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" -#: ../../library/asyncio-subprocess.rst:330 +#: ../../library/asyncio-subprocess.rst:322 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." msgstr "" -#: ../../library/asyncio-subprocess.rst:335 +#: ../../library/asyncio-subprocess.rst:327 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" -#: ../../library/asyncio-subprocess.rst:340 +#: ../../library/asyncio-subprocess.rst:332 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-subprocess.rst:342 +#: ../../library/asyncio-subprocess.rst:334 msgid "" "An example using the :class:`~asyncio.subprocess.Process` class to control a " "subprocess and the :class:`StreamReader` class to read from its standard " "output." msgstr "" -#: ../../library/asyncio-subprocess.rst:348 +#: ../../library/asyncio-subprocess.rst:340 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" -#: ../../library/asyncio-subprocess.rst:375 +#: ../../library/asyncio-subprocess.rst:367 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index e589c94133..299ecc2beb 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.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-02-19 00:13+0000\n" "PO-Revision-Date: 2022-02-09 19:27+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -98,31 +98,28 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-sync.rst:55 ../../library/asyncio-sync.rst:207 -#: ../../library/asyncio-sync.rst:309 +#: ../../library/asyncio-sync.rst:55 ../../library/asyncio-sync.rst:198 +#: ../../library/asyncio-sync.rst:297 msgid "which is equivalent to::" msgstr "" "這等價於:\n" "\n" "::" -#: ../../library/asyncio-sync.rst:71 ../../library/asyncio-sync.rst:119 -#: ../../library/asyncio-sync.rst:197 ../../library/asyncio-sync.rst:299 -#: ../../library/asyncio-sync.rst:354 -msgid "" -"The ``loop`` parameter. This class has been implicitly getting the current " -"running loop since 3.7. See :ref:`What's New in 3.10's Removed section " -"` for more information." +#: ../../library/asyncio-sync.rst:66 ../../library/asyncio-sync.rst:111 +#: ../../library/asyncio-sync.rst:186 ../../library/asyncio-sync.rst:285 +#: ../../library/asyncio-sync.rst:340 +msgid "Removed the *loop* parameter." msgstr "" "``loop`` 參數。自從 3.7 版本開始,此類別會隱晦地拿到當前正在運行的事件迴圈。" "更多資訊請見 :ref:`3.10 有什麼新功能中的被移除功能相關段落 `\\ 。" -#: ../../library/asyncio-sync.rst:74 +#: ../../library/asyncio-sync.rst:71 msgid "Acquire the lock." msgstr "獲得鎖。" -#: ../../library/asyncio-sync.rst:76 +#: ../../library/asyncio-sync.rst:73 msgid "" "This method waits until the lock is *unlocked*, sets it to *locked* and " "returns ``True``." @@ -130,7 +127,7 @@ msgstr "" "此方法會持續等待直到鎖的狀態成為 *unlocked*\\ ,並將其設置為 *locked* 和回傳 " "``True``\\ 。" -#: ../../library/asyncio-sync.rst:79 +#: ../../library/asyncio-sync.rst:76 msgid "" "When more than one coroutine is blocked in :meth:`acquire` waiting for the " "lock to be unlocked, only one coroutine eventually proceeds." @@ -138,45 +135,45 @@ msgstr "" "當多於一個的協程 (coroutine) 在 :meth:`acquire` 中等待解鎖而被阻塞,最終只會" "有其中的一個被處理。" -#: ../../library/asyncio-sync.rst:83 +#: ../../library/asyncio-sync.rst:80 msgid "" "Acquiring a lock is *fair*: the coroutine that proceeds will be the first " "coroutine that started waiting on the lock." msgstr "" "鎖的獲取方式是\\ *公平*\\ 的:被處理的協程會是最早開始等待解鎖的那一個。" -#: ../../library/asyncio-sync.rst:88 +#: ../../library/asyncio-sync.rst:85 msgid "Release the lock." msgstr "釋放鎖。" -#: ../../library/asyncio-sync.rst:90 +#: ../../library/asyncio-sync.rst:87 msgid "When the lock is *locked*, reset it to *unlocked* and return." msgstr "如果鎖的狀態為 *locked* 則將其重置為 *unlocked* 並回傳。" -#: ../../library/asyncio-sync.rst:92 +#: ../../library/asyncio-sync.rst:89 msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." msgstr "如果鎖的狀態為 *unlocked* 則 :exc:`RuntimeError` 會被引發。" -#: ../../library/asyncio-sync.rst:96 +#: ../../library/asyncio-sync.rst:93 msgid "Return ``True`` if the lock is *locked*." msgstr "如果鎖的狀態為 *locked* 則回傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:100 +#: ../../library/asyncio-sync.rst:97 msgid "Event" msgstr "Event" -#: ../../library/asyncio-sync.rst:104 +#: ../../library/asyncio-sync.rst:101 msgid "An event object. Not thread-safe." msgstr "一個事件 (event) 物件。不支援執行緒安全。" -#: ../../library/asyncio-sync.rst:106 +#: ../../library/asyncio-sync.rst:103 msgid "" "An asyncio event can be used to notify multiple asyncio tasks that some " "event has happened." msgstr "" "一個 asyncio 事件可以被用於通知多個有發生某些事件於其中的 asyncio 任務。" -#: ../../library/asyncio-sync.rst:109 +#: ../../library/asyncio-sync.rst:106 msgid "" "An Event object manages an internal flag that can be set to *true* with the :" "meth:`~Event.set` method and reset to *false* with the :meth:`clear` " @@ -188,18 +185,18 @@ msgstr "" "`~Event.wait` 方法會被阻塞 (block) 直到該旗標被設為 *true*\\ 。該旗標初始設置" "為 *false*\\ 。" -#: ../../library/asyncio-sync.rst:122 +#: ../../library/asyncio-sync.rst:116 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/asyncio-sync.rst:147 +#: ../../library/asyncio-sync.rst:141 msgid "Wait until the event is set." msgstr "持續等待直到事件被設置。" -#: ../../library/asyncio-sync.rst:149 +#: ../../library/asyncio-sync.rst:143 msgid "" "If the event is set, return ``True`` immediately. Otherwise block until " "another task calls :meth:`~Event.set`." @@ -207,19 +204,19 @@ msgstr "" "如果事件有被設置則立刻回傳 ``True``\\ 。否則持續阻塞直到另一個任務呼叫 :meth:" "`~Event.set`\\ 。" -#: ../../library/asyncio-sync.rst:154 +#: ../../library/asyncio-sync.rst:148 msgid "Set the event." msgstr "設置事件。" -#: ../../library/asyncio-sync.rst:156 +#: ../../library/asyncio-sync.rst:150 msgid "All tasks waiting for event to be set will be immediately awakened." msgstr "所有正在等待事件被設置的任務會立即被喚醒。" -#: ../../library/asyncio-sync.rst:161 +#: ../../library/asyncio-sync.rst:155 msgid "Clear (unset) the event." msgstr "清除(還原)事件。" -#: ../../library/asyncio-sync.rst:163 +#: ../../library/asyncio-sync.rst:157 msgid "" "Tasks awaiting on :meth:`~Event.wait` will now block until the :meth:`~Event." "set` method is called again." @@ -227,19 +224,19 @@ msgstr "" "正透過 :meth:`~Event.wait` 等待的 Tasks 現在會持續阻塞直到 :meth:`~Event." "set` 方法再次被呼叫。" -#: ../../library/asyncio-sync.rst:168 +#: ../../library/asyncio-sync.rst:162 msgid "Return ``True`` if the event is set." msgstr "如果事件有被設置則回傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:172 +#: ../../library/asyncio-sync.rst:166 msgid "Condition" msgstr "Condition" -#: ../../library/asyncio-sync.rst:176 +#: ../../library/asyncio-sync.rst:170 msgid "A Condition object. Not thread-safe." msgstr "一個條件 (codition) 物件。不支援執行緒安全。" -#: ../../library/asyncio-sync.rst:178 +#: ../../library/asyncio-sync.rst:172 msgid "" "An asyncio condition primitive can be used by a task to wait for some event " "to happen and then get exclusive access to a shared resource." @@ -247,7 +244,7 @@ msgstr "" "一個 asyncio 條件原始物件可以被任務用來等待某事件發生,並獲得一個共享資源的獨" "佔存取權。" -#: ../../library/asyncio-sync.rst:182 +#: ../../library/asyncio-sync.rst:176 msgid "" "In essence, a Condition object combines the functionality of an :class:" "`Event` and a :class:`Lock`. It is possible to have multiple Condition " @@ -259,7 +256,7 @@ msgstr "" "個 Condition 物件共享一個 Lock 是有可能發生的,這能夠協調關注同一共享資源的不" "同狀態以獲取其獨佔存取權的多個任務。" -#: ../../library/asyncio-sync.rst:188 +#: ../../library/asyncio-sync.rst:182 msgid "" "The optional *lock* argument must be a :class:`Lock` object or ``None``. In " "the latter case a new Lock object is created automatically." @@ -267,7 +264,7 @@ msgstr "" "可選的 *lock* 引數必須是一個 :class:`Lock` 物件或者為 ``None``\\ 。如為後者則" "一個新的 Lock 物件會被自動建立。" -#: ../../library/asyncio-sync.rst:198 +#: ../../library/asyncio-sync.rst:189 msgid "" "The preferred way to use a Condition is an :keyword:`async with` statement::" msgstr "" @@ -275,11 +272,11 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-sync.rst:220 +#: ../../library/asyncio-sync.rst:211 msgid "Acquire the underlying lock." msgstr "獲取底層的鎖。" -#: ../../library/asyncio-sync.rst:222 +#: ../../library/asyncio-sync.rst:213 msgid "" "This method waits until the underlying lock is *unlocked*, sets it to " "*locked* and returns ``True``." @@ -287,7 +284,7 @@ msgstr "" "此方法會持續等待直到底層的鎖為 *unlocked*\\ ,並將其設為 *locked* 並回傳 " "``True``\\ 。" -#: ../../library/asyncio-sync.rst:227 +#: ../../library/asyncio-sync.rst:218 msgid "" "Wake up at most *n* tasks (1 by default) waiting on this condition. The " "method is no-op if no tasks are waiting." @@ -295,7 +292,7 @@ msgstr "" "喚醒至多 *n* 個正在等待此條件的任務(預設為 1),如果沒有正在等待的任務則此方" "法為空操作 (no-op)。" -#: ../../library/asyncio-sync.rst:230 ../../library/asyncio-sync.rst:245 +#: ../../library/asyncio-sync.rst:221 ../../library/asyncio-sync.rst:236 msgid "" "The lock must be acquired before this method is called and released shortly " "after. If called with an *unlocked* lock a :exc:`RuntimeError` error is " @@ -304,31 +301,31 @@ msgstr "" "在此方法被呼叫前必須先獲得鎖,並在之後立刻將其釋放。如果呼叫於一個 " "*unlocked* 的鎖則 :exc:`RuntimeError` 錯誤會被引發。" -#: ../../library/asyncio-sync.rst:236 +#: ../../library/asyncio-sync.rst:227 msgid "Return ``True`` if the underlying lock is acquired." msgstr "如果已獲取底層的鎖則回傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:240 +#: ../../library/asyncio-sync.rst:231 msgid "Wake up all tasks waiting on this condition." msgstr "喚醒所有正在等待此條件的任務。" -#: ../../library/asyncio-sync.rst:242 +#: ../../library/asyncio-sync.rst:233 msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." msgstr "這個方法的行為就像 :meth:`notify`\\ ,但會喚醒所有正在等待的任務。" -#: ../../library/asyncio-sync.rst:251 +#: ../../library/asyncio-sync.rst:242 msgid "Release the underlying lock." msgstr "釋放底層的鎖。" -#: ../../library/asyncio-sync.rst:253 +#: ../../library/asyncio-sync.rst:244 msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." msgstr "當調用於一個未被解開的鎖之上時,會引發一個 :exc:`RuntimeError`\\ 。" -#: ../../library/asyncio-sync.rst:258 +#: ../../library/asyncio-sync.rst:249 msgid "Wait until notified." msgstr "持續等待直到被通知 (notify)。" -#: ../../library/asyncio-sync.rst:260 +#: ../../library/asyncio-sync.rst:251 msgid "" "If the calling task has not acquired the lock when this method is called, a :" "exc:`RuntimeError` is raised." @@ -336,7 +333,7 @@ msgstr "" "當此方法被呼叫時,如果呼叫它的任務還沒有獲取鎖的話,\\ :exc:`RuntimeError` 會" "被引發。" -#: ../../library/asyncio-sync.rst:263 +#: ../../library/asyncio-sync.rst:254 msgid "" "This method releases the underlying lock, and then blocks until it is " "awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the " @@ -346,11 +343,11 @@ msgstr "" "`notify_all` 的呼叫所喚醒。一但被喚醒,Condition 會重新獲取該鎖且此方法會回" "傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:270 +#: ../../library/asyncio-sync.rst:261 msgid "Wait until a predicate becomes *true*." msgstr "持續等待直到謂語 (predicate) 成為 *true*\\ 。" -#: ../../library/asyncio-sync.rst:272 +#: ../../library/asyncio-sync.rst:263 msgid "" "The predicate must be a callable which result will be interpreted as a " "boolean value. The final value is the return value." @@ -358,15 +355,15 @@ msgstr "" "謂語必須是一個結果可被直譯為一個 boolean 值的可呼叫物件 (callable)。最終值為" "回傳值。" -#: ../../library/asyncio-sync.rst:278 +#: ../../library/asyncio-sync.rst:269 msgid "Semaphore" msgstr "Semaphore" -#: ../../library/asyncio-sync.rst:282 +#: ../../library/asyncio-sync.rst:273 msgid "A Semaphore object. Not thread-safe." msgstr "一個旗號 (semaphore) 物件。不支援執行緒安全。" -#: ../../library/asyncio-sync.rst:284 +#: ../../library/asyncio-sync.rst:275 msgid "" "A semaphore manages an internal counter which is decremented by each :meth:" "`acquire` call and incremented by each :meth:`release` call. The counter can " @@ -377,7 +374,7 @@ msgstr "" "呼叫 :meth:`release` 時增加一。此計數器永遠不會少於零;當 :meth:`acquire` 發" "現它是零時,它會持續阻塞並等待某任務呼叫 :meth:`release`\\ 。" -#: ../../library/asyncio-sync.rst:290 +#: ../../library/asyncio-sync.rst:281 msgid "" "The optional *value* argument gives the initial value for the internal " "counter (``1`` by default). If the given value is less than ``0`` a :exc:" @@ -386,7 +383,7 @@ msgstr "" "可選的 *value* 引數給定了內部計數器的初始值(預設為 ``1``\\ )。如給定的值少" "於 ``0`` 則 :exc:`ValueError` 會被引發。" -#: ../../library/asyncio-sync.rst:300 +#: ../../library/asyncio-sync.rst:288 msgid "" "The preferred way to use a Semaphore is an :keyword:`async with` statement::" msgstr "" @@ -394,11 +391,11 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-sync.rst:322 +#: ../../library/asyncio-sync.rst:310 msgid "Acquire a semaphore." msgstr "獲取一個旗號。" -#: ../../library/asyncio-sync.rst:324 +#: ../../library/asyncio-sync.rst:312 msgid "" "If the internal counter is greater than zero, decrement it by one and return " "``True`` immediately. If it is zero, wait until a :meth:`release` is called " @@ -407,11 +404,11 @@ msgstr "" "如果內部計數器大於零,將其減一並立刻回傳 ``True``\\ 。如果為零,則持續等待直" "到 :meth:`release` 被呼叫,並回傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:330 +#: ../../library/asyncio-sync.rst:318 msgid "Returns ``True`` if semaphore can not be acquired immediately." msgstr "如果旗號無法立即被取得則回傳 ``True``\\ 。" -#: ../../library/asyncio-sync.rst:334 +#: ../../library/asyncio-sync.rst:322 msgid "" "Release a semaphore, incrementing the internal counter by one. Can wake up a " "task waiting to acquire the semaphore." @@ -419,7 +416,7 @@ msgstr "" "釋放一個旗號,並為其內部的計數器數值增加一。可以把一個正在等待獲取旗號的任務" "叫醒。" -#: ../../library/asyncio-sync.rst:337 +#: ../../library/asyncio-sync.rst:325 msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." @@ -427,15 +424,15 @@ msgstr "" "和 :class:`BoundedSemaphore` 不同,\\ :class:`Semaphore` 允許 ``release()`` " "的呼叫次數多於 ``acquire()``\\ 。" -#: ../../library/asyncio-sync.rst:342 +#: ../../library/asyncio-sync.rst:330 msgid "BoundedSemaphore" msgstr "BoundedSemaphore" -#: ../../library/asyncio-sync.rst:346 +#: ../../library/asyncio-sync.rst:334 msgid "A bounded semaphore object. Not thread-safe." msgstr "一個有界的旗號物件。不支援執行緒安全。" -#: ../../library/asyncio-sync.rst:348 +#: ../../library/asyncio-sync.rst:336 msgid "" "Bounded Semaphore is a version of :class:`Semaphore` that raises a :exc:" "`ValueError` in :meth:`~Semaphore.release` if it increases the internal " @@ -445,7 +442,7 @@ msgstr "" "加至大於初始 *value* 值的話,\\ :exc:`ValueError` 會在 :meth:`~Semaphore." "release` 時被引發。" -#: ../../library/asyncio-sync.rst:364 +#: ../../library/asyncio-sync.rst:348 msgid "" "Acquiring a lock using ``await lock`` or ``yield from lock`` and/or :keyword:" "`with` statement (``with await lock``, ``with (yield from lock)``) was " diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 33d15cd68b..48d1a3191e 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-05 00:08+0000\n" +"POT-Creation-Date: 2022-02-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -213,8 +213,8 @@ msgid "" "ideally only be called once." msgstr "" -#: ../../library/asyncio-task.rst:230 ../../library/asyncio-task.rst:379 -#: ../../library/asyncio-task.rst:521 ../../library/asyncio-task.rst:670 +#: ../../library/asyncio-task.rst:230 ../../library/asyncio-task.rst:372 +#: ../../library/asyncio-task.rst:505 ../../library/asyncio-task.rst:641 msgid "Example::" msgstr "" "範例:\n" @@ -265,8 +265,9 @@ msgid "" "disappearing mid execution." msgstr "" -#: ../../library/asyncio-task.rst:284 ../../library/asyncio-task.rst:862 -msgid "Added the ``name`` parameter." +#: ../../library/asyncio-task.rst:284 ../../library/asyncio-task.rst:830 +#, fuzzy +msgid "Added the *name* parameter." msgstr "新增 ``name`` 參數。" #: ../../library/asyncio-task.rst:289 @@ -295,12 +296,7 @@ msgid "" "loop for the full duration of the function call." msgstr "" -#: ../../library/asyncio-task.rst:310 ../../library/asyncio-task.rst:333 -#: ../../library/asyncio-task.rst:376 ../../library/asyncio-task.rst:433 -#: ../../library/asyncio-task.rst:481 ../../library/asyncio-task.rst:518 -#: ../../library/asyncio-task.rst:550 ../../library/asyncio-task.rst:613 -#: ../../library/asyncio-task.rst:643 ../../library/asyncio-task.rst:669 -#: ../../library/asyncio-task.rst:681 +#: ../../library/asyncio-task.rst:310 msgid "" "The ``loop`` parameter. This function has been implicitly getting the " "current running loop since 3.7. See :ref:`What's New in 3.10's Removed " @@ -312,30 +308,39 @@ msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" -#: ../../library/asyncio-task.rst:340 +#: ../../library/asyncio-task.rst:331 ../../library/asyncio-task.rst:367 +#: ../../library/asyncio-task.rst:421 ../../library/asyncio-task.rst:466 +#: ../../library/asyncio-task.rst:500 ../../library/asyncio-task.rst:530 +#: ../../library/asyncio-task.rst:589 ../../library/asyncio-task.rst:624 +#: ../../library/asyncio-task.rst:638 ../../library/asyncio-task.rst:647 +#, fuzzy +msgid "Removed the *loop* parameter." +msgstr "*loop* 參數。" + +#: ../../library/asyncio-task.rst:336 msgid "Running Tasks Concurrently" msgstr "" -#: ../../library/asyncio-task.rst:344 +#: ../../library/asyncio-task.rst:340 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." msgstr "" -#: ../../library/asyncio-task.rst:347 +#: ../../library/asyncio-task.rst:343 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." msgstr "" -#: ../../library/asyncio-task.rst:350 +#: ../../library/asyncio-task.rst:346 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " "order of awaitables in *aws*." msgstr "" -#: ../../library/asyncio-task.rst:354 +#: ../../library/asyncio-task.rst:350 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -343,19 +348,19 @@ msgid "" "run." msgstr "" -#: ../../library/asyncio-task.rst:359 +#: ../../library/asyncio-task.rst:355 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." msgstr "" -#: ../../library/asyncio-task.rst:362 +#: ../../library/asyncio-task.rst:358 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." msgstr "" -#: ../../library/asyncio-task.rst:365 +#: ../../library/asyncio-task.rst:361 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -363,7 +368,7 @@ msgid "" "submitted Task/Future to cause other Tasks/Futures to be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:417 +#: ../../library/asyncio-task.rst:410 msgid "" "If *return_exceptions* is False, cancelling gather() after it has been " "marked done won't cancel any submitted awaitables. For instance, gather can " @@ -372,42 +377,42 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: ../../library/asyncio-task.rst:424 +#: ../../library/asyncio-task.rst:417 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." msgstr "" -#: ../../library/asyncio-task.rst:434 +#: ../../library/asyncio-task.rst:424 msgid "" "Deprecation warning is emitted if no positional arguments are provided or " "not all positional arguments are Future-like objects and there is no running " "event loop." msgstr "" -#: ../../library/asyncio-task.rst:441 +#: ../../library/asyncio-task.rst:431 msgid "Shielding From Cancellation" msgstr "" -#: ../../library/asyncio-task.rst:445 +#: ../../library/asyncio-task.rst:435 msgid "" "Protect an :ref:`awaitable object ` from being :meth:" "`cancelled `." msgstr "" -#: ../../library/asyncio-task.rst:448 ../../library/asyncio-task.rst:495 +#: ../../library/asyncio-task.rst:438 ../../library/asyncio-task.rst:482 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" -#: ../../library/asyncio-task.rst:450 +#: ../../library/asyncio-task.rst:440 msgid "The statement::" msgstr "" -#: ../../library/asyncio-task.rst:454 +#: ../../library/asyncio-task.rst:444 msgid "is equivalent to::" msgstr "" -#: ../../library/asyncio-task.rst:458 +#: ../../library/asyncio-task.rst:448 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " @@ -416,178 +421,178 @@ msgid "" "`CancelledError`." msgstr "" -#: ../../library/asyncio-task.rst:464 +#: ../../library/asyncio-task.rst:454 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." msgstr "" -#: ../../library/asyncio-task.rst:467 +#: ../../library/asyncio-task.rst:457 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " "follows::" msgstr "" -#: ../../library/asyncio-task.rst:482 +#: ../../library/asyncio-task.rst:469 msgid "" "Deprecation warning is emitted if *aw* is not Future-like object and there " "is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:488 +#: ../../library/asyncio-task.rst:475 msgid "Timeouts" msgstr "" -#: ../../library/asyncio-task.rst:492 +#: ../../library/asyncio-task.rst:479 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." msgstr "" -#: ../../library/asyncio-task.rst:497 +#: ../../library/asyncio-task.rst:484 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." msgstr "" -#: ../../library/asyncio-task.rst:501 +#: ../../library/asyncio-task.rst:488 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`asyncio." "TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:504 +#: ../../library/asyncio-task.rst:491 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." msgstr "" -#: ../../library/asyncio-task.rst:507 +#: ../../library/asyncio-task.rst:494 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " "cancellation, it is propagated." msgstr "" -#: ../../library/asyncio-task.rst:511 +#: ../../library/asyncio-task.rst:498 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "" -#: ../../library/asyncio-task.rst:541 +#: ../../library/asyncio-task.rst:525 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`asyncio.TimeoutError` immediately." msgstr "" -#: ../../library/asyncio-task.rst:554 +#: ../../library/asyncio-task.rst:535 msgid "Waiting Primitives" msgstr "" -#: ../../library/asyncio-task.rst:558 +#: ../../library/asyncio-task.rst:539 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently and block until the condition specified by *return_when*." msgstr "" -#: ../../library/asyncio-task.rst:562 +#: ../../library/asyncio-task.rst:543 msgid "The *aws* iterable must not be empty." msgstr "" -#: ../../library/asyncio-task.rst:564 +#: ../../library/asyncio-task.rst:545 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "" -#: ../../library/asyncio-task.rst:566 +#: ../../library/asyncio-task.rst:547 msgid "Usage::" msgstr "" "用法:\n" "\n" "::" -#: ../../library/asyncio-task.rst:570 +#: ../../library/asyncio-task.rst:551 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." msgstr "" -#: ../../library/asyncio-task.rst:573 +#: ../../library/asyncio-task.rst:554 msgid "" "Note that this function does not raise :exc:`asyncio.TimeoutError`. Futures " "or Tasks that aren't done when the timeout occurs are simply returned in the " "second set." msgstr "" -#: ../../library/asyncio-task.rst:577 +#: ../../library/asyncio-task.rst:558 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: ../../library/asyncio-task.rst:583 +#: ../../library/asyncio-task.rst:564 msgid "Constant" msgstr "常數" -#: ../../library/asyncio-task.rst:583 +#: ../../library/asyncio-task.rst:564 msgid "Description" msgstr "描述" -#: ../../library/asyncio-task.rst:585 +#: ../../library/asyncio-task.rst:566 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: ../../library/asyncio-task.rst:585 +#: ../../library/asyncio-task.rst:566 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: ../../library/asyncio-task.rst:588 +#: ../../library/asyncio-task.rst:569 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: ../../library/asyncio-task.rst:588 +#: ../../library/asyncio-task.rst:569 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: ../../library/asyncio-task.rst:594 +#: ../../library/asyncio-task.rst:575 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: ../../library/asyncio-task.rst:594 +#: ../../library/asyncio-task.rst:575 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: ../../library/asyncio-task.rst:598 +#: ../../library/asyncio-task.rst:579 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." msgstr "" -#: ../../library/asyncio-task.rst:603 +#: ../../library/asyncio-task.rst:584 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task. Passing coroutines objects to ``wait()`` directly is deprecated as it " "leads to :ref:`confusing behavior `." msgstr "" -#: ../../library/asyncio-task.rst:617 +#: ../../library/asyncio-task.rst:595 msgid "" "``wait()`` schedules coroutines as Tasks automatically and later returns " "those implicitly created Task objects in ``(done, pending)`` sets. " "Therefore the following code won't work as expected::" msgstr "" -#: ../../library/asyncio-task.rst:630 +#: ../../library/asyncio-task.rst:608 msgid "Here is how the above snippet can be fixed::" msgstr "" -#: ../../library/asyncio-task.rst:650 +#: ../../library/asyncio-task.rst:621 msgid "Passing coroutine objects to ``wait()`` directly is deprecated." msgstr "" -#: ../../library/asyncio-task.rst:656 +#: ../../library/asyncio-task.rst:630 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently. Return an iterator of coroutines. Each coroutine returned can " @@ -595,27 +600,27 @@ msgid "" "remaining awaitables." msgstr "" -#: ../../library/asyncio-task.rst:661 +#: ../../library/asyncio-task.rst:635 msgid "" "Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures " "are done." msgstr "" -#: ../../library/asyncio-task.rst:682 +#: ../../library/asyncio-task.rst:650 msgid "" "Deprecation warning is emitted if not all awaitable objects in the *aws* " "iterable are Future-like objects and there is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:688 +#: ../../library/asyncio-task.rst:656 msgid "Running in Threads" msgstr "" -#: ../../library/asyncio-task.rst:692 +#: ../../library/asyncio-task.rst:660 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: ../../library/asyncio-task.rst:694 +#: ../../library/asyncio-task.rst:662 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -623,19 +628,19 @@ msgid "" "separate thread." msgstr "" -#: ../../library/asyncio-task.rst:699 +#: ../../library/asyncio-task.rst:667 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: ../../library/asyncio-task.rst:701 +#: ../../library/asyncio-task.rst:669 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " "were ran in the main thread. For example::" msgstr "" -#: ../../library/asyncio-task.rst:731 +#: ../../library/asyncio-task.rst:699 msgid "" "Directly calling `blocking_io()` in any coroutine would block the event loop " "for its duration, resulting in an additional 1 second of run time. Instead, " @@ -643,7 +648,7 @@ msgid "" "blocking the event loop." msgstr "" -#: ../../library/asyncio-task.rst:738 +#: ../../library/asyncio-task.rst:706 msgid "" "Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used to " "make IO-bound functions non-blocking. However, for extension modules that " @@ -651,81 +656,81 @@ msgid "" "`asyncio.to_thread()` can also be used for CPU-bound functions." msgstr "" -#: ../../library/asyncio-task.rst:747 +#: ../../library/asyncio-task.rst:715 msgid "Scheduling From Other Threads" msgstr "" -#: ../../library/asyncio-task.rst:751 +#: ../../library/asyncio-task.rst:719 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" -#: ../../library/asyncio-task.rst:753 +#: ../../library/asyncio-task.rst:721 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." msgstr "" -#: ../../library/asyncio-task.rst:756 +#: ../../library/asyncio-task.rst:724 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" msgstr "" -#: ../../library/asyncio-task.rst:768 +#: ../../library/asyncio-task.rst:736 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" msgstr "" -#: ../../library/asyncio-task.rst:782 +#: ../../library/asyncio-task.rst:750 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" -#: ../../library/asyncio-task.rst:785 +#: ../../library/asyncio-task.rst:753 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." msgstr "" -#: ../../library/asyncio-task.rst:792 +#: ../../library/asyncio-task.rst:760 msgid "Introspection" msgstr "" -#: ../../library/asyncio-task.rst:797 +#: ../../library/asyncio-task.rst:765 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." msgstr "" -#: ../../library/asyncio-task.rst:800 +#: ../../library/asyncio-task.rst:768 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." msgstr "" -#: ../../library/asyncio-task.rst:808 +#: ../../library/asyncio-task.rst:776 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" -#: ../../library/asyncio-task.rst:811 +#: ../../library/asyncio-task.rst:779 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." msgstr "" -#: ../../library/asyncio-task.rst:818 +#: ../../library/asyncio-task.rst:786 msgid "Task Object" msgstr "" -#: ../../library/asyncio-task.rst:822 +#: ../../library/asyncio-task.rst:790 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." msgstr "" -#: ../../library/asyncio-task.rst:825 +#: ../../library/asyncio-task.rst:793 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -733,21 +738,21 @@ msgid "" "wrapped coroutine resumes." msgstr "" -#: ../../library/asyncio-task.rst:831 +#: ../../library/asyncio-task.rst:799 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " "runs other Tasks, callbacks, or performs IO operations." msgstr "" -#: ../../library/asyncio-task.rst:836 +#: ../../library/asyncio-task.rst:804 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " "Manual instantiation of Tasks is discouraged." msgstr "" -#: ../../library/asyncio-task.rst:841 +#: ../../library/asyncio-task.rst:809 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -755,51 +760,47 @@ msgid "" "cancellation, the Future object will be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:846 +#: ../../library/asyncio-task.rst:814 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" "`CancelledError` exception and was actually cancelled." msgstr "" -#: ../../library/asyncio-task.rst:851 +#: ../../library/asyncio-task.rst:819 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." msgstr "" -#: ../../library/asyncio-task.rst:855 +#: ../../library/asyncio-task.rst:823 msgid "" "Tasks support the :mod:`contextvars` module. When a Task is created it " "copies the current context and later runs its coroutine in the copied " "context." msgstr "" -#: ../../library/asyncio-task.rst:859 +#: ../../library/asyncio-task.rst:827 msgid "Added support for the :mod:`contextvars` module." msgstr "" -#: ../../library/asyncio-task.rst:867 -msgid "The *loop* parameter." -msgstr "*loop* 參數。" - -#: ../../library/asyncio-task.rst:868 +#: ../../library/asyncio-task.rst:833 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: ../../library/asyncio-task.rst:874 +#: ../../library/asyncio-task.rst:839 msgid "Request the Task to be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:876 +#: ../../library/asyncio-task.rst:841 msgid "" "This arranges for a :exc:`CancelledError` exception to be thrown into the " "wrapped coroutine on the next cycle of the event loop." msgstr "" -#: ../../library/asyncio-task.rst:879 +#: ../../library/asyncio-task.rst:844 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -809,103 +810,104 @@ msgid "" "is actively discouraged." msgstr "" -#: ../../library/asyncio-task.rst:887 -msgid "Added the ``msg`` parameter." +#: ../../library/asyncio-task.rst:852 +#, fuzzy +msgid "Added the *msg* parameter." msgstr "新增 ``msg`` 參數。" -#: ../../library/asyncio-task.rst:892 +#: ../../library/asyncio-task.rst:857 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" msgstr "" -#: ../../library/asyncio-task.rst:931 +#: ../../library/asyncio-task.rst:896 msgid "Return ``True`` if the Task is *cancelled*." msgstr "" -#: ../../library/asyncio-task.rst:933 +#: ../../library/asyncio-task.rst:898 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " "exception thrown into it." msgstr "" -#: ../../library/asyncio-task.rst:939 +#: ../../library/asyncio-task.rst:904 msgid "Return ``True`` if the Task is *done*." msgstr "" -#: ../../library/asyncio-task.rst:941 +#: ../../library/asyncio-task.rst:906 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." msgstr "" -#: ../../library/asyncio-task.rst:946 +#: ../../library/asyncio-task.rst:911 msgid "Return the result of the Task." msgstr "" -#: ../../library/asyncio-task.rst:948 +#: ../../library/asyncio-task.rst:913 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" msgstr "" -#: ../../library/asyncio-task.rst:952 ../../library/asyncio-task.rst:966 +#: ../../library/asyncio-task.rst:917 ../../library/asyncio-task.rst:931 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." msgstr "" -#: ../../library/asyncio-task.rst:955 +#: ../../library/asyncio-task.rst:920 msgid "" "If the Task's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." msgstr "" -#: ../../library/asyncio-task.rst:960 +#: ../../library/asyncio-task.rst:925 msgid "Return the exception of the Task." msgstr "" -#: ../../library/asyncio-task.rst:962 +#: ../../library/asyncio-task.rst:927 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." msgstr "" -#: ../../library/asyncio-task.rst:969 +#: ../../library/asyncio-task.rst:934 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." msgstr "" -#: ../../library/asyncio-task.rst:974 +#: ../../library/asyncio-task.rst:939 msgid "Add a callback to be run when the Task is *done*." msgstr "" -#: ../../library/asyncio-task.rst:976 ../../library/asyncio-task.rst:985 +#: ../../library/asyncio-task.rst:941 ../../library/asyncio-task.rst:950 msgid "This method should only be used in low-level callback-based code." msgstr "" -#: ../../library/asyncio-task.rst:978 +#: ../../library/asyncio-task.rst:943 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" -#: ../../library/asyncio-task.rst:983 +#: ../../library/asyncio-task.rst:948 msgid "Remove *callback* from the callbacks list." msgstr "" -#: ../../library/asyncio-task.rst:987 +#: ../../library/asyncio-task.rst:952 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." msgstr "" -#: ../../library/asyncio-task.rst:992 +#: ../../library/asyncio-task.rst:957 msgid "Return the list of stack frames for this Task." msgstr "" -#: ../../library/asyncio-task.rst:994 +#: ../../library/asyncio-task.rst:959 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -913,15 +915,15 @@ msgid "" "this returns the list of traceback frames." msgstr "" -#: ../../library/asyncio-task.rst:1000 +#: ../../library/asyncio-task.rst:965 msgid "The frames are always ordered from oldest to newest." msgstr "" -#: ../../library/asyncio-task.rst:1002 +#: ../../library/asyncio-task.rst:967 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "" -#: ../../library/asyncio-task.rst:1004 +#: ../../library/asyncio-task.rst:969 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -930,111 +932,111 @@ msgid "" "are returned. (This matches the behavior of the traceback module.)" msgstr "" -#: ../../library/asyncio-task.rst:1013 +#: ../../library/asyncio-task.rst:978 msgid "Print the stack or traceback for this Task." msgstr "" -#: ../../library/asyncio-task.rst:1015 +#: ../../library/asyncio-task.rst:980 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." msgstr "" -#: ../../library/asyncio-task.rst:1018 +#: ../../library/asyncio-task.rst:983 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "" -#: ../../library/asyncio-task.rst:1020 +#: ../../library/asyncio-task.rst:985 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stderr`." msgstr "" -#: ../../library/asyncio-task.rst:1025 +#: ../../library/asyncio-task.rst:990 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "" -#: ../../library/asyncio-task.rst:1031 +#: ../../library/asyncio-task.rst:996 msgid "Return the name of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1033 +#: ../../library/asyncio-task.rst:998 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." msgstr "" -#: ../../library/asyncio-task.rst:1041 +#: ../../library/asyncio-task.rst:1006 msgid "Set the name of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1043 +#: ../../library/asyncio-task.rst:1008 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" -#: ../../library/asyncio-task.rst:1046 +#: ../../library/asyncio-task.rst:1011 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." msgstr "" -#: ../../library/asyncio-task.rst:1055 +#: ../../library/asyncio-task.rst:1020 msgid "Generator-based Coroutines" msgstr "" -#: ../../library/asyncio-task.rst:1059 +#: ../../library/asyncio-task.rst:1024 msgid "" "Support for generator-based coroutines is **deprecated** and is removed in " "Python 3.11." msgstr "" -#: ../../library/asyncio-task.rst:1062 +#: ../../library/asyncio-task.rst:1027 msgid "" "Generator-based coroutines predate async/await syntax. They are Python " "generators that use ``yield from`` expressions to await on Futures and other " "coroutines." msgstr "" -#: ../../library/asyncio-task.rst:1066 +#: ../../library/asyncio-task.rst:1031 msgid "" "Generator-based coroutines should be decorated with :func:`@asyncio." "coroutine `, although this is not enforced." msgstr "" -#: ../../library/asyncio-task.rst:1073 +#: ../../library/asyncio-task.rst:1038 msgid "Decorator to mark generator-based coroutines." msgstr "" -#: ../../library/asyncio-task.rst:1075 +#: ../../library/asyncio-task.rst:1040 msgid "" "This decorator enables legacy generator-based coroutines to be compatible " "with async/await code::" msgstr "" -#: ../../library/asyncio-task.rst:1085 +#: ../../library/asyncio-task.rst:1050 msgid "This decorator should not be used for :keyword:`async def` coroutines." msgstr "" -#: ../../library/asyncio-task.rst:1090 +#: ../../library/asyncio-task.rst:1055 msgid "Use :keyword:`async def` instead." msgstr "" -#: ../../library/asyncio-task.rst:1094 +#: ../../library/asyncio-task.rst:1059 msgid "Return ``True`` if *obj* is a :ref:`coroutine object `." msgstr "" -#: ../../library/asyncio-task.rst:1096 +#: ../../library/asyncio-task.rst:1061 msgid "" "This method is different from :func:`inspect.iscoroutine` because it returns " "``True`` for generator-based coroutines." msgstr "" -#: ../../library/asyncio-task.rst:1101 +#: ../../library/asyncio-task.rst:1066 msgid "Return ``True`` if *func* is a :ref:`coroutine function `." msgstr "" -#: ../../library/asyncio-task.rst:1104 +#: ../../library/asyncio-task.rst:1069 msgid "" "This method is different from :func:`inspect.iscoroutinefunction` because it " "returns ``True`` for generator-based coroutine functions decorated with :" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index c8372a706d..9e352ba2c1 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-15 00:09+0000\n" +"POT-Creation-Date: 2022-02-19 00:13+0000\n" "PO-Revision-Date: 2021-06-01 22:43+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -287,11 +287,11 @@ msgstr ":keyword:`!match` 陳述式" #: ../../tutorial/controlflow.rst:253 msgid "" -"A match statement takes an expression and compares its value to successive " -"patterns given as one or more case blocks. This is superficially similar to " -"a switch statement in C, Java or JavaScript (and many other languages), but " -"it can also extract components (sequence elements or object attributes) from " -"the value into variables." +"A :keyword:`match` statement takes an expression and compares its value to " +"successive patterns given as one or more case blocks. This is superficially " +"similar to a switch statement in C, Java or JavaScript (and many other " +"languages), but it can also extract components (sequence elements or object " +"attributes) from the value into variables." msgstr "" #: ../../tutorial/controlflow.rst:259 From 36da4a8d389aa9b9161eb4712f44c5e65b52eff3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 20 Feb 2022 00:15:52 +0000 Subject: [PATCH 5/6] sync with cpython 75c5dbc2 --- library/collections.po | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/collections.po b/library/collections.po index 9b06fd5ceb..1960ca77b6 100644 --- a/library/collections.po +++ b/library/collections.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-02 05:33+0000\n" +"POT-Creation-Date: 2022-02-20 00:14+0000\n" "PO-Revision-Date: 2022-02-07 11:41+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -400,8 +400,9 @@ msgstr "" "的時間先後、再按照運算元右邊出現的時間先後來排列。" #: ../../library/collections.rst:279 +#, fuzzy msgid "" -"Counter objects support three methods beyond those available for all " +"Counter objects support additional methods beyond those available for all " "dictionaries:" msgstr "除了字典的方法外,Counter 物件額外支援三個新方法:" From d5dff32f628709d18e5ea2422a6897a289f9b8aa Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Sun, 20 Feb 2022 12:40:42 +0800 Subject: [PATCH 6/6] fix fuzzy entries --- library/asyncio-eventloop.po | 14 +++++++------- library/asyncio-future.po | 3 +-- library/asyncio-stream.po | 19 ++++++++++--------- library/asyncio-sync.po | 5 +---- library/asyncio-task.po | 9 +++------ library/collections.po | 3 +-- 6 files changed, 23 insertions(+), 30 deletions(-) diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 9d1d07da7f..b8a07461c2 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-02-19 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 14:38+0000\n" +"PO-Revision-Date: 2022-02-20 12:36+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.0.1\n" #: ../../library/asyncio-eventloop.rst:6 msgid "Event Loop" @@ -447,9 +448,8 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:345 -#, fuzzy msgid "Added the *name* parameter." -msgstr "加入 ``name`` 參數。" +msgstr "加入 *name* 參數。" #: ../../library/asyncio-eventloop.rst:350 msgid "Set a task factory that will be used by :meth:`loop.create_task`." @@ -628,9 +628,8 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:470 #: ../../library/asyncio-eventloop.rst:743 -#, fuzzy msgid "Added the *ssl_handshake_timeout* parameter." -msgstr "*ssl_handshake_timeout* 參數。" +msgstr "增加 *ssl_handshake_timeout* 參數。" #: ../../library/asyncio-eventloop.rst:474 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." @@ -957,11 +956,12 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:711 -#, fuzzy msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :class:`~pathlib.Path` object." -msgstr "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。" +msgstr "" +"新增 *ssl_handshake_timeout* 與 *start_serving* 參數。\\ *path* 參數現在可為" +"一個 :class:`~pathlib.Path` 物件。" #: ../../library/asyncio-eventloop.rst:717 msgid "Wrap an already accepted connection into a transport/protocol pair." diff --git a/library/asyncio-future.po b/library/asyncio-future.po index a413d229a5..43896a87a5 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -320,9 +320,8 @@ msgstr "" "Future 狀態改為 *cancelled* 並在為回呼函式排程後回傳 ``True``\\ 。" #: ../../library/asyncio-future.rst:196 -#, fuzzy msgid "Added the *msg* parameter." -msgstr "新增 ``msg`` 參數。" +msgstr "新增 *msg* 參數。" #: ../../library/asyncio-future.rst:201 msgid "Return the exception that was set on this Future." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 29b625f144..3c08c3679f 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-02-19 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 14:39+0000\n" +"PO-Revision-Date: 2022-02-20 12:39+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.0.1\n" #: ../../library/asyncio-stream.rst:7 msgid "Streams" @@ -76,9 +77,8 @@ msgid "" msgstr "" #: ../../library/asyncio-stream.rst:69 -#, fuzzy msgid "Added the *ssl_handshake_timeout* parameter." -msgstr "*ssl_handshake_timeout* 參數。" +msgstr "新增 *ssl_handshake_timeout* 參數。" #: ../../library/asyncio-stream.rst:72 ../../library/asyncio-stream.rst:105 #: ../../library/asyncio-stream.rst:128 ../../library/asyncio-stream.rst:148 @@ -110,9 +110,8 @@ msgid "" msgstr "" #: ../../library/asyncio-stream.rst:102 -#, fuzzy msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "*ssl_handshake_timeout* 參數。" +msgstr "新增 *ssl_handshake_timeout* 與 *start_serving* 參數。" #: ../../library/asyncio-stream.rst:110 msgid "Unix Sockets" @@ -136,11 +135,12 @@ msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" #: ../../library/asyncio-stream.rst:124 -#, fuzzy msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`" -msgstr "*path* 參數現在可以是個 :term:`path-like object`" +msgstr "" +"新增 *ssl_handshake_timeout* 參數。\\ *path* 參數現在可以是個\\ :term:`path-" +"like object`" #: ../../library/asyncio-stream.rst:136 msgid "Start a Unix socket server." @@ -155,11 +155,12 @@ msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "另請參閱 :meth:`loop.create_unix_server` 文件。" #: ../../library/asyncio-stream.rst:144 -#, fuzzy msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :term:`path-like object`." -msgstr "*path* 參數現在可以是個 :term:`path-like object`" +msgstr "" +"新增 *ssl_handshake_timeout* 與 *start_serving* 參數。\\ *path* 參數現在可以" +"是個 :term:`path-like object`\\ 。" #: ../../library/asyncio-stream.rst:153 msgid "StreamReader" diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 299ecc2beb..c5160a161a 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -110,10 +110,7 @@ msgstr "" #: ../../library/asyncio-sync.rst:186 ../../library/asyncio-sync.rst:285 #: ../../library/asyncio-sync.rst:340 msgid "Removed the *loop* parameter." -msgstr "" -"``loop`` 參數。自從 3.7 版本開始,此類別會隱晦地拿到當前正在運行的事件迴圈。" -"更多資訊請見 :ref:`3.10 有什麼新功能中的被移除功能相關段落 `\\ 。" +msgstr "移除 ``loop`` 參數。" #: ../../library/asyncio-sync.rst:71 msgid "Acquire the lock." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 48d1a3191e..feb6edf424 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -266,9 +266,8 @@ msgid "" msgstr "" #: ../../library/asyncio-task.rst:284 ../../library/asyncio-task.rst:830 -#, fuzzy msgid "Added the *name* parameter." -msgstr "新增 ``name`` 參數。" +msgstr "新增 *name* 參數。" #: ../../library/asyncio-task.rst:289 msgid "Sleeping" @@ -313,9 +312,8 @@ msgstr "" #: ../../library/asyncio-task.rst:500 ../../library/asyncio-task.rst:530 #: ../../library/asyncio-task.rst:589 ../../library/asyncio-task.rst:624 #: ../../library/asyncio-task.rst:638 ../../library/asyncio-task.rst:647 -#, fuzzy msgid "Removed the *loop* parameter." -msgstr "*loop* 參數。" +msgstr "移除 *loop* 參數。" #: ../../library/asyncio-task.rst:336 msgid "Running Tasks Concurrently" @@ -811,9 +809,8 @@ msgid "" msgstr "" #: ../../library/asyncio-task.rst:852 -#, fuzzy msgid "Added the *msg* parameter." -msgstr "新增 ``msg`` 參數。" +msgstr "新增 *msg* 參數。" #: ../../library/asyncio-task.rst:857 msgid "" diff --git a/library/collections.po b/library/collections.po index 1960ca77b6..26ef916402 100644 --- a/library/collections.po +++ b/library/collections.po @@ -400,11 +400,10 @@ msgstr "" "的時間先後、再按照運算元右邊出現的時間先後來排列。" #: ../../library/collections.rst:279 -#, fuzzy msgid "" "Counter objects support additional methods beyond those available for all " "dictionaries:" -msgstr "除了字典的方法外,Counter 物件額外支援三個新方法:" +msgstr "除了字典原本就有的方法外,Counter 物件額外支援數個新方法:" #: ../../library/collections.rst:284 msgid ""