From 85059c5b95b1b80aeb04d151fa1120e199294941 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 20 Mar 2022 00:15:47 +0000 Subject: [PATCH 1/5] sync with cpython 906f1a4a --- library/textwrap.po | 88 ++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/library/textwrap.po b/library/textwrap.po index 0d35800b20..ddd3901437 100644 --- a/library/textwrap.po +++ b/library/textwrap.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-03-20 00:13+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -35,42 +35,42 @@ msgid "" "`TextWrapper` for efficiency." msgstr "" -#: ../../library/textwrap.rst:26 +#: ../../library/textwrap.rst:27 msgid "" "Wraps the single paragraph in *text* (a string) so every line is at most " "*width* characters long. Returns a list of output lines, without final " "newlines." msgstr "" -#: ../../library/textwrap.rst:30 +#: ../../library/textwrap.rst:31 msgid "" "Optional keyword arguments correspond to the instance attributes of :class:" "`TextWrapper`, documented below." msgstr "" -#: ../../library/textwrap.rst:33 +#: ../../library/textwrap.rst:34 msgid "" "See the :meth:`TextWrapper.wrap` method for additional details on how :func:" "`wrap` behaves." msgstr "" -#: ../../library/textwrap.rst:44 +#: ../../library/textwrap.rst:45 msgid "" "Wraps the single paragraph in *text*, and returns a single string containing " "the wrapped paragraph. :func:`fill` is shorthand for ::" msgstr "" -#: ../../library/textwrap.rst:49 +#: ../../library/textwrap.rst:50 msgid "" "In particular, :func:`fill` accepts exactly the same keyword arguments as :" "func:`wrap`." msgstr "" -#: ../../library/textwrap.rst:57 +#: ../../library/textwrap.rst:58 msgid "Collapse and truncate the given *text* to fit in the given *width*." msgstr "" -#: ../../library/textwrap.rst:59 +#: ../../library/textwrap.rst:60 msgid "" "First the whitespace in *text* is collapsed (all whitespace is replaced by " "single spaces). If the result fits in the *width*, it is returned. " @@ -78,7 +78,7 @@ msgid "" "plus the :attr:`placeholder` fit within :attr:`width`::" msgstr "" -#: ../../library/textwrap.rst:71 +#: ../../library/textwrap.rst:72 msgid "" "Optional keyword arguments correspond to the instance attributes of :class:" "`TextWrapper`, documented below. Note that the whitespace is collapsed " @@ -87,58 +87,58 @@ msgid "" "drop_whitespace`, and :attr:`.replace_whitespace` will have no effect." msgstr "" -#: ../../library/textwrap.rst:81 +#: ../../library/textwrap.rst:82 msgid "Remove any common leading whitespace from every line in *text*." msgstr "" -#: ../../library/textwrap.rst:83 +#: ../../library/textwrap.rst:84 msgid "" "This can be used to make triple-quoted strings line up with the left edge of " "the display, while still presenting them in the source code in indented form." msgstr "" -#: ../../library/textwrap.rst:86 +#: ../../library/textwrap.rst:87 msgid "" "Note that tabs and spaces are both treated as whitespace, but they are not " "equal: the lines ``\" hello\"`` and ``\"\\thello\"`` are considered to have " "no common leading whitespace." msgstr "" -#: ../../library/textwrap.rst:90 +#: ../../library/textwrap.rst:91 msgid "" "Lines containing only whitespace are ignored in the input and normalized to " "a single newline character in the output." msgstr "" -#: ../../library/textwrap.rst:93 ../../library/textwrap.rst:114 +#: ../../library/textwrap.rst:94 ../../library/textwrap.rst:115 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/textwrap.rst:107 +#: ../../library/textwrap.rst:108 msgid "Add *prefix* to the beginning of selected lines in *text*." msgstr "" -#: ../../library/textwrap.rst:109 +#: ../../library/textwrap.rst:110 msgid "Lines are separated by calling ``text.splitlines(True)``." msgstr "" -#: ../../library/textwrap.rst:111 +#: ../../library/textwrap.rst:112 msgid "" "By default, *prefix* is added to all lines that do not consist solely of " "whitespace (including any line endings)." msgstr "" -#: ../../library/textwrap.rst:120 +#: ../../library/textwrap.rst:121 msgid "" "The optional *predicate* argument can be used to control which lines are " "indented. For example, it is easy to add *prefix* to even empty and " "whitespace-only lines::" msgstr "" -#: ../../library/textwrap.rst:133 +#: ../../library/textwrap.rst:134 msgid "" ":func:`wrap`, :func:`fill` and :func:`shorten` work by creating a :class:" "`TextWrapper` instance and calling a single method on it. That instance is " @@ -147,38 +147,38 @@ msgid "" "class:`TextWrapper` object." msgstr "" -#: ../../library/textwrap.rst:139 +#: ../../library/textwrap.rst:140 msgid "" "Text is preferably wrapped on whitespaces and right after the hyphens in " "hyphenated words; only then will long words be broken if necessary, unless :" "attr:`TextWrapper.break_long_words` is set to false." msgstr "" -#: ../../library/textwrap.rst:145 +#: ../../library/textwrap.rst:146 msgid "" "The :class:`TextWrapper` constructor accepts a number of optional keyword " "arguments. Each keyword argument corresponds to an instance attribute, so " "for example ::" msgstr "" -#: ../../library/textwrap.rst:151 +#: ../../library/textwrap.rst:152 msgid "is the same as ::" msgstr "" -#: ../../library/textwrap.rst:156 +#: ../../library/textwrap.rst:157 msgid "" "You can re-use the same :class:`TextWrapper` object many times, and you can " "change any of its options through direct assignment to instance attributes " "between uses." msgstr "" -#: ../../library/textwrap.rst:160 +#: ../../library/textwrap.rst:161 msgid "" "The :class:`TextWrapper` instance attributes (and keyword arguments to the " "constructor) are as follows:" msgstr "" -#: ../../library/textwrap.rst:166 +#: ../../library/textwrap.rst:167 msgid "" "(default: ``70``) The maximum length of wrapped lines. As long as there are " "no individual words in the input text longer than :attr:`width`, :class:" @@ -186,20 +186,20 @@ msgid "" "`width` characters." msgstr "" -#: ../../library/textwrap.rst:174 +#: ../../library/textwrap.rst:175 msgid "" "(default: ``True``) If true, then all tab characters in *text* will be " "expanded to spaces using the :meth:`expandtabs` method of *text*." msgstr "" -#: ../../library/textwrap.rst:180 +#: ../../library/textwrap.rst:181 msgid "" "(default: ``8``) If :attr:`expand_tabs` is true, then all tab characters in " "*text* will be expanded to zero or more spaces, depending on the current " "column and the given tab size." msgstr "" -#: ../../library/textwrap.rst:189 +#: ../../library/textwrap.rst:190 msgid "" "(default: ``True``) If true, after tab expansion but before wrapping, the :" "meth:`wrap` method will replace each whitespace character with a single " @@ -207,14 +207,14 @@ msgid "" "vertical tab, formfeed, and carriage return (``'\\t\\n\\v\\f\\r'``)." msgstr "" -#: ../../library/textwrap.rst:197 +#: ../../library/textwrap.rst:198 msgid "" "If :attr:`expand_tabs` is false and :attr:`replace_whitespace` is true, each " "tab character will be replaced by a single space, which is *not* the same as " "tab expansion." msgstr "" -#: ../../library/textwrap.rst:203 +#: ../../library/textwrap.rst:204 msgid "" "If :attr:`replace_whitespace` is false, newlines may appear in the middle of " "a line and cause strange output. For this reason, text should be split into " @@ -222,7 +222,7 @@ msgid "" "separately." msgstr "" -#: ../../library/textwrap.rst:211 +#: ../../library/textwrap.rst:212 msgid "" "(default: ``True``) If true, whitespace at the beginning and ending of every " "line (after wrapping but before indenting) is dropped. Whitespace at the " @@ -231,21 +231,21 @@ msgid "" "line is dropped." msgstr "" -#: ../../library/textwrap.rst:220 +#: ../../library/textwrap.rst:221 msgid "" "(default: ``''``) String that will be prepended to the first line of wrapped " "output. Counts towards the length of the first line. The empty string is " "not indented." msgstr "" -#: ../../library/textwrap.rst:227 +#: ../../library/textwrap.rst:228 msgid "" "(default: ``''``) String that will be prepended to all lines of wrapped " "output except the first. Counts towards the length of each line except the " "first." msgstr "" -#: ../../library/textwrap.rst:234 +#: ../../library/textwrap.rst:235 msgid "" "(default: ``False``) If true, :class:`TextWrapper` attempts to detect " "sentence endings and ensure that sentences are always separated by exactly " @@ -257,15 +257,15 @@ msgid "" "unable to detect the difference between \"Dr.\" in ::" msgstr "" -#: ../../library/textwrap.rst:245 +#: ../../library/textwrap.rst:246 msgid "and \"Spot.\" in ::" msgstr "" -#: ../../library/textwrap.rst:249 +#: ../../library/textwrap.rst:250 msgid ":attr:`fix_sentence_endings` is false by default." msgstr "" -#: ../../library/textwrap.rst:251 +#: ../../library/textwrap.rst:252 msgid "" "Since the sentence detection algorithm relies on ``string.lowercase`` for " "the definition of \"lowercase letter\", and a convention of using two spaces " @@ -273,7 +273,7 @@ msgid "" "English-language texts." msgstr "" -#: ../../library/textwrap.rst:259 +#: ../../library/textwrap.rst:260 msgid "" "(default: ``True``) If true, then words longer than :attr:`width` will be " "broken in order to ensure that no lines are longer than :attr:`width`. If " @@ -282,7 +282,7 @@ msgid "" "order to minimize the amount by which :attr:`width` is exceeded.)" msgstr "" -#: ../../library/textwrap.rst:268 +#: ../../library/textwrap.rst:269 msgid "" "(default: ``True``) If true, wrapping will occur preferably on whitespaces " "and right after hyphens in compound words, as it is customary in English. If " @@ -292,25 +292,25 @@ msgid "" "always allow breaking hyphenated words." msgstr "" -#: ../../library/textwrap.rst:278 +#: ../../library/textwrap.rst:279 msgid "" "(default: ``None``) If not ``None``, then the output will contain at most " "*max_lines* lines, with *placeholder* appearing at the end of the output." msgstr "" -#: ../../library/textwrap.rst:288 +#: ../../library/textwrap.rst:289 msgid "" "(default: ``' [...]'``) String that will appear at the end of the output " "text if it has been truncated." msgstr "" -#: ../../library/textwrap.rst:294 +#: ../../library/textwrap.rst:295 msgid "" ":class:`TextWrapper` also provides some public methods, analogous to the " "module-level convenience functions:" msgstr "" -#: ../../library/textwrap.rst:299 +#: ../../library/textwrap.rst:300 msgid "" "Wraps the single paragraph in *text* (a string) so every line is at most :" "attr:`width` characters long. All wrapping options are taken from instance " @@ -319,7 +319,7 @@ msgid "" "returned list is empty." msgstr "" -#: ../../library/textwrap.rst:308 +#: ../../library/textwrap.rst:309 msgid "" "Wraps the single paragraph in *text*, and returns a single string containing " "the wrapped paragraph." From 1f8465ad87d64770c77ff36876490124d3a5e32a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 21 Mar 2022 00:15:52 +0000 Subject: [PATCH 2/5] sync with cpython 4c989e19 --- library/asynchat.po | 70 ++++++++--------- library/asyncore.po | 108 ++++++++++++++------------- library/binascii.po | 48 ++++++------ library/smtpd.po | 165 +++++++++++++++++++++-------------------- library/zlib.po | 122 +++++++++++++++--------------- reference/datamodel.po | 12 +-- 6 files changed, 265 insertions(+), 260 deletions(-) diff --git a/library/asynchat.po b/library/asynchat.po index eb1a9c28a8..2893de7370 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-03-21 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-" @@ -22,21 +22,23 @@ msgstr "" msgid ":mod:`asynchat` --- Asynchronous socket command/response handler" msgstr "" -#: ../../library/asynchat.rst:10 +#: ../../library/asynchat.rst:11 msgid "**Source code:** :source:`Lib/asynchat.py`" msgstr "**原始碼:**\\ :source:`Lib/asynchat.py`" -#: ../../library/asynchat.rst:12 -msgid "Please use :mod:`asyncio` instead." +#: ../../library/asynchat.rst:13 +msgid "" +":mod:`asynchat` will be removed in Python 3.12 (:pep:`594`). Please use :mod:" +"`asyncio` instead." msgstr "" -#: ../../library/asynchat.rst:19 +#: ../../library/asynchat.rst:21 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." msgstr "" -#: ../../library/asynchat.rst:22 +#: ../../library/asynchat.rst:24 msgid "" "This module builds on the :mod:`asyncore` infrastructure, simplifying " "asynchronous clients and servers and making it easier to handle protocols " @@ -51,7 +53,7 @@ msgid "" "connection requests." msgstr "" -#: ../../library/asynchat.rst:37 +#: ../../library/asynchat.rst:39 msgid "" "This class is an abstract subclass of :class:`asyncore.dispatcher`. To make " "practical use of the code you must subclass :class:`async_chat`, providing " @@ -60,7 +62,7 @@ msgid "" "all make sense in a message/response context." msgstr "" -#: ../../library/asynchat.rst:44 +#: ../../library/asynchat.rst:46 msgid "" "Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of " "events that are generated by an analysis of socket conditions after a :c:" @@ -69,21 +71,21 @@ msgid "" "with no action on the part of the programmer." msgstr "" -#: ../../library/asynchat.rst:50 +#: ../../library/asynchat.rst:52 msgid "" "Two class attributes can be modified, to improve performance, or possibly " "even to conserve memory." msgstr "" -#: ../../library/asynchat.rst:56 +#: ../../library/asynchat.rst:58 msgid "The asynchronous input buffer size (default ``4096``)." msgstr "" -#: ../../library/asynchat.rst:61 +#: ../../library/asynchat.rst:63 msgid "The asynchronous output buffer size (default ``4096``)." msgstr "" -#: ../../library/asynchat.rst:63 +#: ../../library/asynchat.rst:65 msgid "" "Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to " "define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer " @@ -98,7 +100,7 @@ msgid "" "transmission from the remote endpoint." msgstr "" -#: ../../library/asynchat.rst:76 +#: ../../library/asynchat.rst:78 msgid "" "To build a functioning :class:`async_chat` subclass your input methods :" "meth:`collect_incoming_data` and :meth:`found_terminator` must handle the " @@ -106,26 +108,26 @@ msgid "" "below." msgstr "" -#: ../../library/asynchat.rst:84 +#: ../../library/asynchat.rst:86 msgid "" "Pushes a ``None`` on to the producer queue. When this producer is popped off " "the queue it causes the channel to be closed." msgstr "" -#: ../../library/asynchat.rst:90 +#: ../../library/asynchat.rst:92 msgid "" "Called with *data* holding an arbitrary amount of received data. The " "default method, which must be overridden, raises a :exc:" "`NotImplementedError` exception." msgstr "" -#: ../../library/asynchat.rst:97 +#: ../../library/asynchat.rst:99 msgid "" "In emergencies this method will discard any data held in the input and/or " "output buffers and the producer queue." msgstr "" -#: ../../library/asynchat.rst:103 +#: ../../library/asynchat.rst:105 msgid "" "Called when the incoming data stream matches the termination condition set " "by :meth:`set_terminator`. The default method, which must be overridden, " @@ -133,11 +135,11 @@ msgid "" "should be available via an instance attribute." msgstr "" -#: ../../library/asynchat.rst:111 +#: ../../library/asynchat.rst:113 msgid "Returns the current terminator for the channel." msgstr "" -#: ../../library/asynchat.rst:116 +#: ../../library/asynchat.rst:118 msgid "" "Pushes data on to the channel's queue to ensure its transmission. This is " "all you need to do to have the channel write the data out to the network, " @@ -145,7 +147,7 @@ msgid "" "implement encryption and chunking, for example." msgstr "" -#: ../../library/asynchat.rst:124 +#: ../../library/asynchat.rst:126 msgid "" "Takes a producer object and adds it to the producer queue associated with " "the channel. When all currently-pushed producers have been exhausted the " @@ -153,60 +155,60 @@ msgid "" "and send the data to the remote endpoint." msgstr "" -#: ../../library/asynchat.rst:132 +#: ../../library/asynchat.rst:134 msgid "" "Sets the terminating condition to be recognized on the channel. ``term`` " "may be any of three types of value, corresponding to three different ways to " "handle incoming protocol data." msgstr "" -#: ../../library/asynchat.rst:137 +#: ../../library/asynchat.rst:139 msgid "term" msgstr "" -#: ../../library/asynchat.rst:137 +#: ../../library/asynchat.rst:139 msgid "Description" msgstr "描述" -#: ../../library/asynchat.rst:139 +#: ../../library/asynchat.rst:141 msgid "*string*" msgstr "" -#: ../../library/asynchat.rst:139 +#: ../../library/asynchat.rst:141 msgid "" "Will call :meth:`found_terminator` when the string is found in the input " "stream" msgstr "" -#: ../../library/asynchat.rst:142 +#: ../../library/asynchat.rst:144 msgid "*integer*" msgstr "" -#: ../../library/asynchat.rst:142 +#: ../../library/asynchat.rst:144 msgid "" "Will call :meth:`found_terminator` when the indicated number of characters " "have been received" msgstr "" -#: ../../library/asynchat.rst:146 +#: ../../library/asynchat.rst:148 msgid "``None``" msgstr "``None``" -#: ../../library/asynchat.rst:146 +#: ../../library/asynchat.rst:148 msgid "The channel continues to collect data forever" msgstr "" -#: ../../library/asynchat.rst:150 +#: ../../library/asynchat.rst:152 msgid "" "Note that any data following the terminator will be available for reading by " "the channel after :meth:`found_terminator` is called." msgstr "" -#: ../../library/asynchat.rst:157 +#: ../../library/asynchat.rst:159 msgid "asynchat Example" msgstr "" -#: ../../library/asynchat.rst:159 +#: ../../library/asynchat.rst:161 msgid "" "The following partial example shows how HTTP requests can be read with :" "class:`async_chat`. A web server might create an :class:" @@ -216,7 +218,7 @@ msgid "" "read." msgstr "" -#: ../../library/asynchat.rst:166 +#: ../../library/asynchat.rst:168 msgid "" "Once the headers have been read, if the request is of type POST (indicating " "that further data are present in the input stream) then the ``Content-Length:" @@ -224,7 +226,7 @@ msgid "" "data from the channel." msgstr "" -#: ../../library/asynchat.rst:171 +#: ../../library/asynchat.rst:173 msgid "" "The :meth:`handle_request` method is called once all relevant input has been " "marshalled, after setting the channel terminator to ``None`` to ensure that " diff --git a/library/asyncore.po b/library/asyncore.po index 332c98161d..6ba4011ba6 100644 --- a/library/asyncore.po +++ b/library/asyncore.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-03-21 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-" @@ -22,27 +22,29 @@ msgstr "" msgid ":mod:`asyncore` --- Asynchronous socket handler" msgstr "" -#: ../../library/asyncore.rst:13 +#: ../../library/asyncore.rst:14 msgid "**Source code:** :source:`Lib/asyncore.py`" msgstr "**原始碼:**\\ :source:`Lib/asyncore.py`" -#: ../../library/asyncore.rst:15 -msgid "Please use :mod:`asyncio` instead." +#: ../../library/asyncore.rst:16 +msgid "" +":mod:`asyncore` will be removed in Python 3.12 (:pep:`594`). Please use :mod:" +"`asyncio` instead." msgstr "" -#: ../../library/asyncore.rst:22 +#: ../../library/asyncore.rst:24 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." msgstr "" -#: ../../library/asyncore.rst:25 +#: ../../library/asyncore.rst:27 msgid "" "This module provides the basic infrastructure for writing asynchronous " "socket service clients and servers." msgstr "" -#: ../../library/asyncore.rst:28 +#: ../../library/asyncore.rst:30 msgid "" "There are only two ways to have a program on a single processor do \"more " "than one thing at a time.\" Multi-threaded programming is the simplest and " @@ -54,7 +56,7 @@ msgid "" "servers are rarely processor bound, however." msgstr "" -#: ../../library/asyncore.rst:37 +#: ../../library/asyncore.rst:39 msgid "" "If your operating system supports the :c:func:`select` system call in its I/" "O library (and nearly all do), then you can use it to juggle multiple " @@ -68,7 +70,7 @@ msgid "" "module is invaluable." msgstr "" -#: ../../library/asyncore.rst:48 +#: ../../library/asyncore.rst:50 msgid "" "The basic idea behind both modules is to create one or more network " "*channels*, instances of class :class:`asyncore.dispatcher` and :class:" @@ -77,7 +79,7 @@ msgid "" "*map*." msgstr "" -#: ../../library/asyncore.rst:54 +#: ../../library/asyncore.rst:56 msgid "" "Once the initial channel(s) is(are) created, calling the :func:`loop` " "function activates channel service, which continues until the last channel " @@ -85,7 +87,7 @@ msgid "" "is closed." msgstr "" -#: ../../library/asyncore.rst:61 +#: ../../library/asyncore.rst:63 msgid "" "Enter a polling loop that terminates after count passes or all open channels " "have been closed. All arguments are optional. The *count* parameter " @@ -97,7 +99,7 @@ msgid "" "preference to :func:`~select.select` (the default is ``False``)." msgstr "" -#: ../../library/asyncore.rst:70 +#: ../../library/asyncore.rst:72 msgid "" "The *map* parameter is a dictionary whose items are the channels to watch. " "As channels are closed they are deleted from their map. If *map* is " @@ -106,7 +108,7 @@ msgid "" "be mixed in the map." msgstr "" -#: ../../library/asyncore.rst:79 +#: ../../library/asyncore.rst:81 msgid "" "The :class:`dispatcher` class is a thin wrapper around a low-level socket " "object. To make it more useful, it has a few methods for event-handling " @@ -114,7 +116,7 @@ msgid "" "as a normal non-blocking socket object." msgstr "" -#: ../../library/asyncore.rst:84 +#: ../../library/asyncore.rst:86 msgid "" "The firing of low-level events at certain times or in certain connection " "states tells the asynchronous loop that certain higher-level events have " @@ -125,39 +127,39 @@ msgid "" "events are:" msgstr "" -#: ../../library/asyncore.rst:93 +#: ../../library/asyncore.rst:95 msgid "Event" msgstr "" -#: ../../library/asyncore.rst:93 +#: ../../library/asyncore.rst:95 msgid "Description" msgstr "描述" -#: ../../library/asyncore.rst:95 +#: ../../library/asyncore.rst:97 msgid "``handle_connect()``" msgstr "``handle_connect()``" -#: ../../library/asyncore.rst:95 +#: ../../library/asyncore.rst:97 msgid "Implied by the first read or write event" msgstr "" -#: ../../library/asyncore.rst:98 +#: ../../library/asyncore.rst:100 msgid "``handle_close()``" msgstr "``handle_close()``" -#: ../../library/asyncore.rst:98 +#: ../../library/asyncore.rst:100 msgid "Implied by a read event with no data available" msgstr "" -#: ../../library/asyncore.rst:101 +#: ../../library/asyncore.rst:103 msgid "``handle_accepted()``" msgstr "``handle_accepted()``" -#: ../../library/asyncore.rst:101 +#: ../../library/asyncore.rst:103 msgid "Implied by a read event on a listening socket" msgstr "" -#: ../../library/asyncore.rst:105 +#: ../../library/asyncore.rst:107 msgid "" "During asynchronous processing, each mapped channel's :meth:`readable` and :" "meth:`writable` methods are used to determine whether the channel's socket " @@ -165,49 +167,49 @@ msgid "" "`poll`\\ ed for read and write events." msgstr "" -#: ../../library/asyncore.rst:110 +#: ../../library/asyncore.rst:112 msgid "" "Thus, the set of channel events is larger than the basic socket events. The " "full set of methods that can be overridden in your subclass follows:" msgstr "" -#: ../../library/asyncore.rst:116 +#: ../../library/asyncore.rst:118 msgid "" "Called when the asynchronous loop detects that a :meth:`read` call on the " "channel's socket will succeed." msgstr "" -#: ../../library/asyncore.rst:122 +#: ../../library/asyncore.rst:124 msgid "" "Called when the asynchronous loop detects that a writable socket can be " "written. Often this method will implement the necessary buffering for " "performance. For example::" msgstr "" -#: ../../library/asyncore.rst:133 +#: ../../library/asyncore.rst:135 msgid "" "Called when there is out of band (OOB) data for a socket connection. This " "will almost never happen, as OOB is tenuously supported and rarely used." msgstr "" -#: ../../library/asyncore.rst:139 +#: ../../library/asyncore.rst:141 msgid "" "Called when the active opener's socket actually makes a connection. Might " "send a \"welcome\" banner, or initiate a protocol negotiation with the " "remote endpoint, for example." msgstr "" -#: ../../library/asyncore.rst:146 +#: ../../library/asyncore.rst:148 msgid "Called when the socket is closed." msgstr "" -#: ../../library/asyncore.rst:151 +#: ../../library/asyncore.rst:153 msgid "" "Called when an exception is raised and not otherwise handled. The default " "version prints a condensed traceback." msgstr "" -#: ../../library/asyncore.rst:157 +#: ../../library/asyncore.rst:159 msgid "" "Called on listening channels (passive openers) when a connection can be " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -215,7 +217,7 @@ msgid "" "`handle_accepted` instead." msgstr "" -#: ../../library/asyncore.rst:167 +#: ../../library/asyncore.rst:169 msgid "" "Called on listening channels (passive openers) when a connection has been " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -224,7 +226,7 @@ msgid "" "socket on the other end of the connection." msgstr "" -#: ../../library/asyncore.rst:178 +#: ../../library/asyncore.rst:180 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which read events can " @@ -232,7 +234,7 @@ msgid "" "default, all channels will be interested in read events." msgstr "" -#: ../../library/asyncore.rst:186 +#: ../../library/asyncore.rst:188 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which write events can " @@ -240,55 +242,55 @@ msgid "" "default, all channels will be interested in write events." msgstr "" -#: ../../library/asyncore.rst:192 +#: ../../library/asyncore.rst:194 msgid "" "In addition, each channel delegates or extends many of the socket methods. " "Most of these are nearly identical to their socket partners." msgstr "" -#: ../../library/asyncore.rst:198 +#: ../../library/asyncore.rst:200 msgid "" "This is identical to the creation of a normal socket, and will use the same " "options for creation. Refer to the :mod:`socket` documentation for " "information on creating sockets." msgstr "" -#: ../../library/asyncore.rst:202 +#: ../../library/asyncore.rst:204 msgid "*family* and *type* arguments can be omitted." msgstr "" -#: ../../library/asyncore.rst:208 +#: ../../library/asyncore.rst:210 msgid "" "As with the normal socket object, *address* is a tuple with the first " "element the host to connect to, and the second the port number." msgstr "" -#: ../../library/asyncore.rst:214 +#: ../../library/asyncore.rst:216 msgid "Send *data* to the remote end-point of the socket." msgstr "" -#: ../../library/asyncore.rst:219 +#: ../../library/asyncore.rst:221 msgid "" "Read at most *buffer_size* bytes from the socket's remote end-point. An " "empty bytes object implies that the channel has been closed from the other " "end." msgstr "" -#: ../../library/asyncore.rst:223 +#: ../../library/asyncore.rst:225 msgid "" "Note that :meth:`recv` may raise :exc:`BlockingIOError` , even though :func:" "`select.select` or :func:`select.poll` has reported the socket ready for " "reading." msgstr "" -#: ../../library/asyncore.rst:230 +#: ../../library/asyncore.rst:232 msgid "" "Listen for connections made to the socket. The *backlog* argument specifies " "the maximum number of queued connections and should be at least 1; the " "maximum value is system-dependent (usually 5)." msgstr "" -#: ../../library/asyncore.rst:237 +#: ../../library/asyncore.rst:239 msgid "" "Bind the socket to *address*. The socket must not already be bound. (The " "format of *address* depends on the address family --- refer to the :mod:" @@ -297,7 +299,7 @@ msgid "" "`dispatcher` object's :meth:`set_reuse_addr` method." msgstr "" -#: ../../library/asyncore.rst:246 +#: ../../library/asyncore.rst:248 msgid "" "Accept a connection. The socket must be bound to an address and listening " "for connections. The return value can be either ``None`` or a pair ``(conn, " @@ -308,21 +310,21 @@ msgid "" "this event and keep listening for further incoming connections." msgstr "" -#: ../../library/asyncore.rst:258 +#: ../../library/asyncore.rst:260 msgid "" "Close the socket. All future operations on the socket object will fail. The " "remote end-point will receive no more data (after queued data is flushed). " "Sockets are automatically closed when they are garbage-collected." msgstr "" -#: ../../library/asyncore.rst:266 +#: ../../library/asyncore.rst:268 msgid "" "A :class:`dispatcher` subclass which adds simple buffered output capability, " "useful for simple clients. For more sophisticated usage use :class:`asynchat." "async_chat`." msgstr "" -#: ../../library/asyncore.rst:272 +#: ../../library/asyncore.rst:274 msgid "" "A file_dispatcher takes a file descriptor or :term:`file object` along with " "an optional map argument and wraps it for use with the :c:func:`poll` or :c:" @@ -331,11 +333,11 @@ msgid "" "`file_wrapper` constructor." msgstr "" -#: ../../library/asyncore.rst:278 ../../library/asyncore.rst:287 +#: ../../library/asyncore.rst:280 ../../library/asyncore.rst:289 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/asyncore.rst:282 +#: ../../library/asyncore.rst:284 msgid "" "A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to " "duplicate the handle so that the original handle may be closed independently " @@ -343,21 +345,21 @@ msgid "" "socket for use by the :class:`file_dispatcher` class." msgstr "" -#: ../../library/asyncore.rst:293 +#: ../../library/asyncore.rst:295 msgid "asyncore Example basic HTTP client" msgstr "" -#: ../../library/asyncore.rst:295 +#: ../../library/asyncore.rst:297 msgid "" "Here is a very basic HTTP client that uses the :class:`dispatcher` class to " "implement its socket handling::" msgstr "" -#: ../../library/asyncore.rst:332 +#: ../../library/asyncore.rst:334 msgid "asyncore Example basic echo server" msgstr "" -#: ../../library/asyncore.rst:334 +#: ../../library/asyncore.rst:336 msgid "" "Here is a basic echo server that uses the :class:`dispatcher` class to " "accept connections and dispatches the incoming connections to a handler::" diff --git a/library/binascii.po b/library/binascii.po index 56d25fd92b..63525cb52e 100644 --- a/library/binascii.po +++ b/library/binascii.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-03-21 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-" @@ -146,33 +146,33 @@ msgstr "" #: ../../library/binascii.rst:138 msgid "" -"Compute CRC-32, the 32-bit checksum of *data*, starting with an initial CRC " -"of *value*. The default initial CRC is zero. The algorithm is consistent " -"with the ZIP file checksum. Since the algorithm is designed for use as a " -"checksum algorithm, it is not suitable for use as a general hash algorithm. " -"Use as follows::" +"Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an " +"initial CRC of *value*. The default initial CRC is zero. The algorithm is " +"consistent with the ZIP file checksum. Since the algorithm is designed for " +"use as a checksum algorithm, it is not suitable for use as a general hash " +"algorithm. Use as follows::" msgstr "" #: ../../library/binascii.rst:150 msgid "" -"The result is always unsigned. To generate the same numeric value across all " -"Python versions and platforms, use ``crc32(data) & 0xffffffff``." +"The result is always unsigned. To generate the same numeric value when using " +"Python 2 or earlier, use ``crc32(data) & 0xffffffff``." msgstr "" -#: ../../library/binascii.rst:159 +#: ../../library/binascii.rst:158 msgid "" "Return the hexadecimal representation of the binary *data*. Every byte of " "*data* is converted into the corresponding 2-digit hex representation. The " "returned bytes object is therefore twice as long as the length of *data*." msgstr "" -#: ../../library/binascii.rst:163 +#: ../../library/binascii.rst:162 msgid "" "Similar functionality (but returning a text string) is also conveniently " "accessible using the :meth:`bytes.hex` method." msgstr "" -#: ../../library/binascii.rst:166 +#: ../../library/binascii.rst:165 msgid "" "If *sep* is specified, it must be a single character str or bytes object. It " "will be inserted in the output after every *bytes_per_sep* input bytes. " @@ -180,11 +180,11 @@ msgid "" "if you wish to count from the left, supply a negative *bytes_per_sep* value." msgstr "" -#: ../../library/binascii.rst:181 +#: ../../library/binascii.rst:180 msgid "The *sep* and *bytes_per_sep* parameters were added." msgstr "新增 *sep* 與 *bytes_per_sep* 參數。" -#: ../../library/binascii.rst:187 +#: ../../library/binascii.rst:186 msgid "" "Return the binary data represented by the hexadecimal string *hexstr*. This " "function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even " @@ -192,52 +192,52 @@ msgid "" "an :exc:`Error` exception is raised." msgstr "" -#: ../../library/binascii.rst:192 +#: ../../library/binascii.rst:191 msgid "" "Similar functionality (accepting only text string arguments, but more " "liberal towards whitespace) is also accessible using the :meth:`bytes." "fromhex` class method." msgstr "" -#: ../../library/binascii.rst:198 +#: ../../library/binascii.rst:197 msgid "Exception raised on errors. These are usually programming errors." msgstr "" -#: ../../library/binascii.rst:203 +#: ../../library/binascii.rst:202 msgid "" "Exception raised on incomplete data. These are usually not programming " "errors, but may be handled by reading a little more data and trying again." msgstr "" -#: ../../library/binascii.rst:211 +#: ../../library/binascii.rst:210 msgid "Module :mod:`base64`" msgstr ":mod:`base64` 模組" -#: ../../library/binascii.rst:210 +#: ../../library/binascii.rst:209 msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" -#: ../../library/binascii.rst:214 +#: ../../library/binascii.rst:213 msgid "Module :mod:`binhex`" msgstr ":mod:`binhex` 模組" -#: ../../library/binascii.rst:214 +#: ../../library/binascii.rst:213 msgid "Support for the binhex format used on the Macintosh." msgstr "" -#: ../../library/binascii.rst:217 +#: ../../library/binascii.rst:216 msgid "Module :mod:`uu`" msgstr ":mod:`uu` 模組" -#: ../../library/binascii.rst:217 +#: ../../library/binascii.rst:216 msgid "Support for UU encoding used on Unix." msgstr "" -#: ../../library/binascii.rst:219 +#: ../../library/binascii.rst:218 msgid "Module :mod:`quopri`" msgstr ":mod:`quopri` 模組" -#: ../../library/binascii.rst:220 +#: ../../library/binascii.rst:219 msgid "Support for quoted-printable encoding used in MIME email messages." msgstr "" diff --git a/library/smtpd.po b/library/smtpd.po index e0c605a582..0f7b49a1a4 100644 --- a/library/smtpd.po +++ b/library/smtpd.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-03-21 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,45 +22,46 @@ msgstr "" msgid ":mod:`smtpd` --- SMTP Server" msgstr "" -#: ../../library/smtpd.rst:10 +#: ../../library/smtpd.rst:11 msgid "**Source code:** :source:`Lib/smtpd.py`" msgstr "**原始碼:**\\ :source:`Lib/smtpd.py`" -#: ../../library/smtpd.rst:14 +#: ../../library/smtpd.rst:15 msgid "This module offers several classes to implement SMTP (email) servers." msgstr "" -#: ../../library/smtpd.rst:16 +#: ../../library/smtpd.rst:17 msgid "" -"The `aiosmtpd `_ package is a recommended " -"replacement for this module. It is based on :mod:`asyncio` and provides a " -"more straightforward API." +":mod:`smtpd` will be removed in Python 3.12 (:pep:`594`). The `aiosmtpd " +"`_ package is a recommended replacement " +"for this module. It is based on :mod:`asyncio` and provides a more " +"straightforward API." msgstr "" -#: ../../library/smtpd.rst:21 +#: ../../library/smtpd.rst:23 msgid "" "Several server implementations are present; one is a generic do-nothing " "implementation, which can be overridden, while the other two offer specific " "mail-sending strategies." msgstr "" -#: ../../library/smtpd.rst:25 +#: ../../library/smtpd.rst:27 msgid "" "Additionally the SMTPChannel may be extended to implement very specific " "interaction behaviour with SMTP clients." msgstr "" -#: ../../library/smtpd.rst:28 +#: ../../library/smtpd.rst:30 msgid "" "The code supports :RFC:`5321`, plus the :rfc:`1870` SIZE and :rfc:`6531` " "SMTPUTF8 extensions." msgstr "" -#: ../../library/smtpd.rst:33 +#: ../../library/smtpd.rst:35 msgid "SMTPServer Objects" msgstr "SMTPServer 物件" -#: ../../library/smtpd.rst:39 +#: ../../library/smtpd.rst:41 msgid "" "Create a new :class:`SMTPServer` object, which binds to local address " "*localaddr*. It will treat *remoteaddr* as an upstream SMTP relayer. Both " @@ -69,20 +70,20 @@ msgid "" "insert itself into :mod:`asyncore`'s event loop on instantiation." msgstr "" -#: ../../library/smtpd.rst:45 ../../library/smtpd.rst:173 +#: ../../library/smtpd.rst:47 ../../library/smtpd.rst:175 msgid "" "*data_size_limit* specifies the maximum number of bytes that will be " "accepted in a ``DATA`` command. A value of ``None`` or ``0`` means no limit." msgstr "" -#: ../../library/smtpd.rst:49 +#: ../../library/smtpd.rst:51 msgid "" "*map* is the socket map to use for connections (an initially empty " "dictionary is a suitable value). If not specified the :mod:`asyncore` " "global socket map is used." msgstr "" -#: ../../library/smtpd.rst:53 +#: ../../library/smtpd.rst:55 msgid "" "*enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined " "in :RFC:`6531`) should be enabled. The default is ``False``. When ``True``, " @@ -92,7 +93,7 @@ msgid "" "be set to ``True`` at the same time." msgstr "" -#: ../../library/smtpd.rst:60 +#: ../../library/smtpd.rst:62 msgid "" "*decode_data* specifies whether the data portion of the SMTP transaction " "should be decoded using UTF-8. When *decode_data* is ``False`` (the " @@ -103,7 +104,7 @@ msgid "" "be set to ``True`` at the same time." msgstr "" -#: ../../library/smtpd.rst:70 +#: ../../library/smtpd.rst:72 msgid "" "Raise a :exc:`NotImplementedError` exception. Override this in subclasses to " "do something useful with this message. Whatever was passed in the " @@ -114,110 +115,110 @@ msgid "" "format)." msgstr "" -#: ../../library/smtpd.rst:78 +#: ../../library/smtpd.rst:80 msgid "" "If the *decode_data* constructor keyword is set to ``True``, the *data* " "argument will be a unicode string. If it is set to ``False``, it will be a " "bytes object." msgstr "" -#: ../../library/smtpd.rst:82 +#: ../../library/smtpd.rst:84 msgid "" "*kwargs* is a dictionary containing additional information. It is empty if " "``decode_data=True`` was given as an init argument, otherwise it contains " "the following keys:" msgstr "" -#: ../../library/smtpd.rst:89 +#: ../../library/smtpd.rst:91 msgid "*mail_options*:" msgstr "" -#: ../../library/smtpd.rst:87 +#: ../../library/smtpd.rst:89 msgid "" "a list of all received parameters to the ``MAIL`` command (the elements are " "uppercase strings; example: ``['BODY=8BITMIME', 'SMTPUTF8']``)." msgstr "" -#: ../../library/smtpd.rst:94 +#: ../../library/smtpd.rst:96 msgid "*rcpt_options*:" msgstr "" -#: ../../library/smtpd.rst:92 +#: ../../library/smtpd.rst:94 msgid "" "same as *mail_options* but for the ``RCPT`` command. Currently no ``RCPT " "TO`` options are supported, so for now this will always be an empty list." msgstr "" -#: ../../library/smtpd.rst:96 +#: ../../library/smtpd.rst:98 msgid "" "Implementations of ``process_message`` should use the ``**kwargs`` signature " "to accept arbitrary keyword arguments, since future feature enhancements may " "add keys to the kwargs dictionary." msgstr "" -#: ../../library/smtpd.rst:100 +#: ../../library/smtpd.rst:102 msgid "" "Return ``None`` to request a normal ``250 Ok`` response; otherwise return " "the desired response string in :RFC:`5321` format." msgstr "" -#: ../../library/smtpd.rst:105 +#: ../../library/smtpd.rst:107 msgid "" "Override this in subclasses to use a custom :class:`SMTPChannel` for " "managing SMTP clients." msgstr "" -#: ../../library/smtpd.rst:108 +#: ../../library/smtpd.rst:110 msgid "The *map* constructor argument." msgstr "" -#: ../../library/smtpd.rst:111 +#: ../../library/smtpd.rst:113 msgid "*localaddr* and *remoteaddr* may now contain IPv6 addresses." msgstr "" -#: ../../library/smtpd.rst:114 +#: ../../library/smtpd.rst:116 msgid "" "The *decode_data* and *enable_SMTPUTF8* constructor parameters, and the " "*kwargs* parameter to :meth:`process_message` when *decode_data* is " "``False``." msgstr "" -#: ../../library/smtpd.rst:119 ../../library/smtpd.rst:195 +#: ../../library/smtpd.rst:121 ../../library/smtpd.rst:197 msgid "*decode_data* is now ``False`` by default." msgstr "" -#: ../../library/smtpd.rst:124 +#: ../../library/smtpd.rst:126 msgid "DebuggingServer Objects" msgstr "DebuggingServer 物件" -#: ../../library/smtpd.rst:129 +#: ../../library/smtpd.rst:131 msgid "" "Create a new debugging server. Arguments are as per :class:`SMTPServer`. " "Messages will be discarded, and printed on stdout." msgstr "" -#: ../../library/smtpd.rst:134 +#: ../../library/smtpd.rst:136 msgid "PureProxy Objects" msgstr "PureProxy 物件" -#: ../../library/smtpd.rst:139 +#: ../../library/smtpd.rst:141 msgid "" "Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. " "Everything will be relayed to *remoteaddr*. Note that running this has a " "good chance to make you into an open relay, so please be careful." msgstr "" -#: ../../library/smtpd.rst:145 +#: ../../library/smtpd.rst:147 msgid "MailmanProxy Objects" msgstr "MailmanProxy 物件" -#: ../../library/smtpd.rst:152 +#: ../../library/smtpd.rst:154 msgid "" ":class:`MailmanProxy` is deprecated, it depends on a ``Mailman`` module " "which no longer exists and therefore is already broken." msgstr "" -#: ../../library/smtpd.rst:156 +#: ../../library/smtpd.rst:158 msgid "" "Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. " "Everything will be relayed to *remoteaddr*, unless local mailman " @@ -226,116 +227,116 @@ msgid "" "relay, so please be careful." msgstr "" -#: ../../library/smtpd.rst:163 +#: ../../library/smtpd.rst:165 msgid "SMTPChannel Objects" msgstr "SMTPChannel 物件" -#: ../../library/smtpd.rst:168 +#: ../../library/smtpd.rst:170 msgid "" "Create a new :class:`SMTPChannel` object which manages the communication " "between the server and a single SMTP client." msgstr "" -#: ../../library/smtpd.rst:171 +#: ../../library/smtpd.rst:173 msgid "*conn* and *addr* are as per the instance variables described below." msgstr "" -#: ../../library/smtpd.rst:177 +#: ../../library/smtpd.rst:179 msgid "" "*enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined " "in :RFC:`6531`) should be enabled. The default is ``False``. *decode_data* " "and *enable_SMTPUTF8* cannot be set to ``True`` at the same time." msgstr "" -#: ../../library/smtpd.rst:182 +#: ../../library/smtpd.rst:184 msgid "" "A dictionary can be specified in *map* to avoid using a global socket map." msgstr "" -#: ../../library/smtpd.rst:184 +#: ../../library/smtpd.rst:186 msgid "" "*decode_data* specifies whether the data portion of the SMTP transaction " "should be decoded using UTF-8. The default is ``False``. *decode_data* and " "*enable_SMTPUTF8* cannot be set to ``True`` at the same time." msgstr "" -#: ../../library/smtpd.rst:189 +#: ../../library/smtpd.rst:191 msgid "" "To use a custom SMTPChannel implementation you need to override the :attr:" "`SMTPServer.channel_class` of your :class:`SMTPServer`." msgstr "" -#: ../../library/smtpd.rst:192 +#: ../../library/smtpd.rst:194 msgid "The *decode_data* and *enable_SMTPUTF8* parameters were added." msgstr "新增 *decode_data* 與 *enable_SMTPUTF8* 參數。" -#: ../../library/smtpd.rst:198 +#: ../../library/smtpd.rst:200 msgid "The :class:`SMTPChannel` has the following instance variables:" msgstr "" -#: ../../library/smtpd.rst:202 +#: ../../library/smtpd.rst:204 msgid "Holds the :class:`SMTPServer` that spawned this channel." msgstr "" -#: ../../library/smtpd.rst:206 +#: ../../library/smtpd.rst:208 msgid "Holds the socket object connecting to the client." msgstr "" -#: ../../library/smtpd.rst:210 +#: ../../library/smtpd.rst:212 msgid "" "Holds the address of the client, the second value returned by :func:`socket." "accept `" msgstr "" -#: ../../library/smtpd.rst:215 +#: ../../library/smtpd.rst:217 msgid "" "Holds a list of the line strings (decoded using UTF-8) received from the " "client. The lines have their ``\"\\r\\n\"`` line ending translated to ``\"\\n" "\"``." msgstr "" -#: ../../library/smtpd.rst:221 +#: ../../library/smtpd.rst:223 msgid "" "Holds the current state of the channel. This will be either :attr:`COMMAND` " "initially and then :attr:`DATA` after the client sends a \"DATA\" line." msgstr "" -#: ../../library/smtpd.rst:227 +#: ../../library/smtpd.rst:229 msgid "" "Holds a string containing the greeting sent by the client in its \"HELO\"." msgstr "" -#: ../../library/smtpd.rst:231 +#: ../../library/smtpd.rst:233 msgid "" "Holds a string containing the address identified in the \"MAIL FROM:\" line " "from the client." msgstr "" -#: ../../library/smtpd.rst:236 +#: ../../library/smtpd.rst:238 msgid "" "Holds a list of strings containing the addresses identified in the \"RCPT TO:" "\" lines from the client." msgstr "" -#: ../../library/smtpd.rst:241 +#: ../../library/smtpd.rst:243 msgid "" "Holds a string containing all of the data sent by the client during the DATA " "state, up to but not including the terminating ``\"\\r\\n.\\r\\n\"``." msgstr "" -#: ../../library/smtpd.rst:246 +#: ../../library/smtpd.rst:248 msgid "" "Holds the fully-qualified domain name of the server as returned by :func:" "`socket.getfqdn`." msgstr "" -#: ../../library/smtpd.rst:251 +#: ../../library/smtpd.rst:253 msgid "" "Holds the name of the client peer as returned by ``conn.getpeername()`` " "where ``conn`` is :attr:`conn`." msgstr "" -#: ../../library/smtpd.rst:254 +#: ../../library/smtpd.rst:256 msgid "" "The :class:`SMTPChannel` operates by invoking methods named " "``smtp_`` upon reception of a command line from the client. Built " @@ -343,112 +344,112 @@ msgid "" "following commands (and responding to them appropriately):" msgstr "" -#: ../../library/smtpd.rst:260 +#: ../../library/smtpd.rst:262 msgid "Command" msgstr "指令" -#: ../../library/smtpd.rst:260 +#: ../../library/smtpd.rst:262 msgid "Action taken" msgstr "" -#: ../../library/smtpd.rst:262 +#: ../../library/smtpd.rst:264 msgid "HELO" msgstr "HELO" -#: ../../library/smtpd.rst:262 +#: ../../library/smtpd.rst:264 msgid "" "Accepts the greeting from the client and stores it in :attr:" "`seen_greeting`. Sets server to base command mode." msgstr "" -#: ../../library/smtpd.rst:264 +#: ../../library/smtpd.rst:266 msgid "EHLO" msgstr "EHLO" -#: ../../library/smtpd.rst:264 +#: ../../library/smtpd.rst:266 msgid "" "Accepts the greeting from the client and stores it in :attr:" "`seen_greeting`. Sets server to extended command mode." msgstr "" -#: ../../library/smtpd.rst:266 +#: ../../library/smtpd.rst:268 msgid "NOOP" msgstr "NOOP" -#: ../../library/smtpd.rst:266 +#: ../../library/smtpd.rst:268 msgid "Takes no action." msgstr "" -#: ../../library/smtpd.rst:267 +#: ../../library/smtpd.rst:269 msgid "QUIT" msgstr "QUIT" -#: ../../library/smtpd.rst:267 +#: ../../library/smtpd.rst:269 msgid "Closes the connection cleanly." msgstr "" -#: ../../library/smtpd.rst:268 +#: ../../library/smtpd.rst:270 msgid "MAIL" msgstr "MAIL" -#: ../../library/smtpd.rst:268 +#: ../../library/smtpd.rst:270 msgid "" "Accepts the \"MAIL FROM:\" syntax and stores the supplied address as :attr:" "`mailfrom`. In extended command mode, accepts the :rfc:`1870` SIZE " "attribute and responds appropriately based on the value of *data_size_limit*." msgstr "" -#: ../../library/smtpd.rst:272 +#: ../../library/smtpd.rst:274 msgid "RCPT" msgstr "RCPT" -#: ../../library/smtpd.rst:272 +#: ../../library/smtpd.rst:274 msgid "" "Accepts the \"RCPT TO:\" syntax and stores the supplied addresses in the :" "attr:`rcpttos` list." msgstr "" -#: ../../library/smtpd.rst:274 +#: ../../library/smtpd.rst:276 msgid "RSET" msgstr "RSET" -#: ../../library/smtpd.rst:274 +#: ../../library/smtpd.rst:276 msgid "" "Resets the :attr:`mailfrom`, :attr:`rcpttos`, and :attr:`received_data`, but " "not the greeting." msgstr "" -#: ../../library/smtpd.rst:276 +#: ../../library/smtpd.rst:278 msgid "DATA" msgstr "DATA" -#: ../../library/smtpd.rst:276 +#: ../../library/smtpd.rst:278 msgid "" "Sets the internal state to :attr:`DATA` and stores remaining lines from the " "client in :attr:`received_data` until the terminator ``\"\\r\\n.\\r\\n\"`` " "is received." msgstr "" -#: ../../library/smtpd.rst:279 +#: ../../library/smtpd.rst:281 msgid "HELP" msgstr "HELP" -#: ../../library/smtpd.rst:279 +#: ../../library/smtpd.rst:281 msgid "Returns minimal information on command syntax" msgstr "" -#: ../../library/smtpd.rst:280 +#: ../../library/smtpd.rst:282 msgid "VRFY" msgstr "VRFY" -#: ../../library/smtpd.rst:280 +#: ../../library/smtpd.rst:282 msgid "Returns code 252 (the server doesn't know if the address is valid)" msgstr "" -#: ../../library/smtpd.rst:281 +#: ../../library/smtpd.rst:283 msgid "EXPN" msgstr "EXPN" -#: ../../library/smtpd.rst:281 +#: ../../library/smtpd.rst:283 msgid "Reports that the command is not implemented." msgstr "" diff --git a/library/zlib.po b/library/zlib.po index fe089c7f6f..c7602c5001 100644 --- a/library/zlib.po +++ b/library/zlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-03-21 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -67,11 +67,11 @@ msgstr "" #: ../../library/zlib.rst:44 msgid "" -"Always returns an unsigned value. To generate the same numeric value across " -"all Python versions and platforms, use ``adler32(data) & 0xffffffff``." +"The result is always unsigned. To generate the same numeric value when using " +"Python 2 or earlier, use ``adler32(data) & 0xffffffff``." msgstr "" -#: ../../library/zlib.rst:52 +#: ../../library/zlib.rst:51 msgid "" "Compresses the bytes in *data*, returning a bytes object containing " "compressed data. *level* is an integer from ``0`` to ``9`` or ``-1`` " @@ -83,17 +83,17 @@ msgid "" "level 6). Raises the :exc:`error` exception if any error occurs." msgstr "" -#: ../../library/zlib.rst:60 +#: ../../library/zlib.rst:59 msgid "*level* can now be used as a keyword parameter." msgstr "" -#: ../../library/zlib.rst:66 +#: ../../library/zlib.rst:65 msgid "" "Returns a compression object, to be used for compressing data streams that " "won't fit into memory at once." msgstr "" -#: ../../library/zlib.rst:69 +#: ../../library/zlib.rst:68 msgid "" "*level* is the compression level -- an integer from ``0`` to ``9`` or " "``-1``. A value of ``1`` (Z_BEST_SPEED) is fastest and produces the least " @@ -104,13 +104,13 @@ msgid "" "level 6)." msgstr "" -#: ../../library/zlib.rst:76 +#: ../../library/zlib.rst:75 msgid "" "*method* is the compression algorithm. Currently, the only supported value " "is :const:`DEFLATED`." msgstr "" -#: ../../library/zlib.rst:79 +#: ../../library/zlib.rst:78 msgid "" "The *wbits* argument controls the size of the history buffer (or the " "\"window size\") used when compressing data, and whether a header and " @@ -118,7 +118,7 @@ msgid "" "defaulting to ``15`` (MAX_WBITS):" msgstr "" -#: ../../library/zlib.rst:84 +#: ../../library/zlib.rst:83 msgid "" "+9 to +15: The base-two logarithm of the window size, which therefore ranges " "between 512 and 32768. Larger values produce better compression at the " @@ -126,34 +126,34 @@ msgid "" "specific header and trailer." msgstr "" -#: ../../library/zlib.rst:89 +#: ../../library/zlib.rst:88 msgid "" "−9 to −15: Uses the absolute value of *wbits* as the window size logarithm, " "while producing a raw output stream with no header or trailing checksum." msgstr "" -#: ../../library/zlib.rst:93 +#: ../../library/zlib.rst:92 msgid "" "+25 to +31 = 16 + (9 to 15): Uses the low 4 bits of the value as the window " "size logarithm, while including a basic :program:`gzip` header and trailing " "checksum in the output." msgstr "" -#: ../../library/zlib.rst:97 +#: ../../library/zlib.rst:96 msgid "" "The *memLevel* argument controls the amount of memory used for the internal " "compression state. Valid values range from ``1`` to ``9``. Higher values use " "more memory, but are faster and produce smaller output." msgstr "" -#: ../../library/zlib.rst:101 +#: ../../library/zlib.rst:100 msgid "" "*strategy* is used to tune the compression algorithm. Possible values are :" "const:`Z_DEFAULT_STRATEGY`, :const:`Z_FILTERED`, :const:`Z_HUFFMAN_ONLY`, :" "const:`Z_RLE` (zlib 1.2.0.1) and :const:`Z_FIXED` (zlib 1.2.2.2)." msgstr "" -#: ../../library/zlib.rst:105 +#: ../../library/zlib.rst:104 msgid "" "*zdict* is a predefined compression dictionary. This is a sequence of bytes " "(such as a :class:`bytes` object) containing subsequences that are expected " @@ -161,11 +161,11 @@ msgid "" "that are expected to be most common should come at the end of the dictionary." msgstr "" -#: ../../library/zlib.rst:110 +#: ../../library/zlib.rst:109 msgid "Added the *zdict* parameter and keyword argument support." msgstr "新增 *zdict* 參數與支援關鍵字引數" -#: ../../library/zlib.rst:120 +#: ../../library/zlib.rst:119 msgid "" "Computes a CRC (Cyclic Redundancy Check) checksum of *data*. The result is " "an unsigned 32-bit integer. If *value* is present, it is used as the " @@ -177,13 +177,13 @@ msgid "" "suitable for use as a general hash algorithm." msgstr "" -#: ../../library/zlib.rst:129 +#: ../../library/zlib.rst:128 msgid "" -"Always returns an unsigned value. To generate the same numeric value across " -"all Python versions and platforms, use ``crc32(data) & 0xffffffff``." +"The result is always unsigned. To generate the same numeric value when using " +"Python 2 or earlier, use ``crc32(data) & 0xffffffff``." msgstr "" -#: ../../library/zlib.rst:137 +#: ../../library/zlib.rst:135 msgid "" "Decompresses the bytes in *data*, returning a bytes object containing the " "uncompressed data. The *wbits* parameter depends on the format of *data*, " @@ -192,44 +192,44 @@ msgid "" "error occurs." msgstr "" -#: ../../library/zlib.rst:145 +#: ../../library/zlib.rst:143 msgid "" "The *wbits* parameter controls the size of the history buffer (or \"window " "size\"), and what header and trailer format is expected. It is similar to " "the parameter for :func:`compressobj`, but accepts more ranges of values:" msgstr "" -#: ../../library/zlib.rst:150 +#: ../../library/zlib.rst:148 msgid "" "+8 to +15: The base-two logarithm of the window size. The input must " "include a zlib header and trailer." msgstr "" -#: ../../library/zlib.rst:153 +#: ../../library/zlib.rst:151 msgid "" "0: Automatically determine the window size from the zlib header. Only " "supported since zlib 1.2.3.5." msgstr "" -#: ../../library/zlib.rst:156 +#: ../../library/zlib.rst:154 msgid "" "−8 to −15: Uses the absolute value of *wbits* as the window size logarithm. " "The input must be a raw stream with no header or trailer." msgstr "" -#: ../../library/zlib.rst:159 +#: ../../library/zlib.rst:157 msgid "" "+24 to +31 = 16 + (8 to 15): Uses the low 4 bits of the value as the window " "size logarithm. The input must include a gzip header and trailer." msgstr "" -#: ../../library/zlib.rst:163 +#: ../../library/zlib.rst:161 msgid "" "+40 to +47 = 32 + (8 to 15): Uses the low 4 bits of the value as the window " "size logarithm, and automatically accepts either the zlib or gzip format." msgstr "" -#: ../../library/zlib.rst:167 +#: ../../library/zlib.rst:165 msgid "" "When decompressing a stream, the window size must not be smaller than the " "size originally used to compress the stream; using a too-small value may " @@ -238,7 +238,7 @@ msgid "" "included." msgstr "" -#: ../../library/zlib.rst:173 +#: ../../library/zlib.rst:171 msgid "" "*bufsize* is the initial size of the buffer used to hold decompressed data. " "If more space is required, the buffer size will be increased as needed, so " @@ -246,46 +246,46 @@ msgid "" "few calls to :c:func:`malloc`." msgstr "" -#: ../../library/zlib.rst:178 +#: ../../library/zlib.rst:176 msgid "*wbits* and *bufsize* can be used as keyword arguments." msgstr "" -#: ../../library/zlib.rst:183 +#: ../../library/zlib.rst:181 msgid "" "Returns a decompression object, to be used for decompressing data streams " "that won't fit into memory at once." msgstr "" -#: ../../library/zlib.rst:186 +#: ../../library/zlib.rst:184 msgid "" "The *wbits* parameter controls the size of the history buffer (or the " "\"window size\"), and what header and trailer format is expected. It has " "the same meaning as `described for decompress() <#decompress-wbits>`__." msgstr "" -#: ../../library/zlib.rst:190 +#: ../../library/zlib.rst:188 msgid "" "The *zdict* parameter specifies a predefined compression dictionary. If " "provided, this must be the same dictionary as was used by the compressor " "that produced the data that is to be decompressed." msgstr "" -#: ../../library/zlib.rst:196 +#: ../../library/zlib.rst:194 msgid "" "If *zdict* is a mutable object (such as a :class:`bytearray`), you must not " "modify its contents between the call to :func:`decompressobj` and the first " "call to the decompressor's ``decompress()`` method." msgstr "" -#: ../../library/zlib.rst:200 +#: ../../library/zlib.rst:198 msgid "Added the *zdict* parameter." msgstr "新增 *zdict* 參數。" -#: ../../library/zlib.rst:204 +#: ../../library/zlib.rst:202 msgid "Compression objects support the following methods:" msgstr "" -#: ../../library/zlib.rst:209 +#: ../../library/zlib.rst:207 msgid "" "Compress *data*, returning a bytes object containing compressed data for at " "least part of the data in *data*. This data should be concatenated to the " @@ -293,7 +293,7 @@ msgid "" "input may be kept in internal buffers for later processing." msgstr "" -#: ../../library/zlib.rst:217 +#: ../../library/zlib.rst:215 msgid "" "All pending input is processed, and a bytes object containing the remaining " "compressed output is returned. *mode* can be selected from the constants :" @@ -307,23 +307,23 @@ msgid "" "delete the object." msgstr "" -#: ../../library/zlib.rst:230 +#: ../../library/zlib.rst:228 msgid "" "Returns a copy of the compression object. This can be used to efficiently " "compress a set of data that share a common initial prefix." msgstr "" -#: ../../library/zlib.rst:234 +#: ../../library/zlib.rst:232 msgid "" "Added :func:`copy.copy` and :func:`copy.deepcopy` support to compression " "objects." msgstr "" -#: ../../library/zlib.rst:239 +#: ../../library/zlib.rst:237 msgid "Decompression objects support the following methods and attributes:" msgstr "" -#: ../../library/zlib.rst:244 +#: ../../library/zlib.rst:242 msgid "" "A bytes object which contains any bytes past the end of the compressed data. " "That is, this remains ``b\"\"`` until the last byte that contains " @@ -331,7 +331,7 @@ msgid "" "contain compressed data, this is ``b\"\"``, an empty bytes object." msgstr "" -#: ../../library/zlib.rst:252 +#: ../../library/zlib.rst:250 msgid "" "A bytes object that contains any data that was not consumed by the last :" "meth:`decompress` call because it exceeded the limit for the uncompressed " @@ -340,19 +340,19 @@ msgid "" "subsequent :meth:`decompress` method call in order to get correct output." msgstr "" -#: ../../library/zlib.rst:261 +#: ../../library/zlib.rst:259 msgid "" "A boolean indicating whether the end of the compressed data stream has been " "reached." msgstr "" -#: ../../library/zlib.rst:264 +#: ../../library/zlib.rst:262 msgid "" "This makes it possible to distinguish between a properly-formed compressed " "stream, and an incomplete or truncated one." msgstr "" -#: ../../library/zlib.rst:272 +#: ../../library/zlib.rst:270 msgid "" "Decompress *data*, returning a bytes object containing the uncompressed data " "corresponding to at least part of the data in *string*. This data should be " @@ -361,7 +361,7 @@ msgid "" "buffers for later processing." msgstr "" -#: ../../library/zlib.rst:278 +#: ../../library/zlib.rst:276 msgid "" "If the optional parameter *max_length* is non-zero then the return value " "will be no longer than *max_length*. This may mean that not all of the " @@ -372,11 +372,11 @@ msgid "" "`unconsumed_tail` is empty." msgstr "" -#: ../../library/zlib.rst:285 +#: ../../library/zlib.rst:283 msgid "*max_length* can be used as a keyword argument." msgstr "" -#: ../../library/zlib.rst:291 +#: ../../library/zlib.rst:289 msgid "" "All pending input is processed, and a bytes object containing the remaining " "uncompressed output is returned. After calling :meth:`flush`, the :meth:" @@ -384,63 +384,63 @@ msgid "" "delete the object." msgstr "" -#: ../../library/zlib.rst:296 +#: ../../library/zlib.rst:294 msgid "" "The optional parameter *length* sets the initial size of the output buffer." msgstr "" -#: ../../library/zlib.rst:301 +#: ../../library/zlib.rst:299 msgid "" "Returns a copy of the decompression object. This can be used to save the " "state of the decompressor midway through the data stream in order to speed " "up random seeks into the stream at a future point." msgstr "" -#: ../../library/zlib.rst:306 +#: ../../library/zlib.rst:304 msgid "" "Added :func:`copy.copy` and :func:`copy.deepcopy` support to decompression " "objects." msgstr "" -#: ../../library/zlib.rst:311 +#: ../../library/zlib.rst:309 msgid "" "Information about the version of the zlib library in use is available " "through the following constants:" msgstr "" -#: ../../library/zlib.rst:317 +#: ../../library/zlib.rst:315 msgid "" "The version string of the zlib library that was used for building the " "module. This may be different from the zlib library actually used at " "runtime, which is available as :const:`ZLIB_RUNTIME_VERSION`." msgstr "" -#: ../../library/zlib.rst:324 +#: ../../library/zlib.rst:322 msgid "" "The version string of the zlib library actually loaded by the interpreter." msgstr "" -#: ../../library/zlib.rst:332 +#: ../../library/zlib.rst:330 msgid "Module :mod:`gzip`" msgstr ":mod:`gzip` 模組" -#: ../../library/zlib.rst:332 +#: ../../library/zlib.rst:330 msgid "Reading and writing :program:`gzip`\\ -format files." msgstr "" -#: ../../library/zlib.rst:335 +#: ../../library/zlib.rst:333 msgid "http://www.zlib.net" msgstr "http://www.zlib.net" -#: ../../library/zlib.rst:335 +#: ../../library/zlib.rst:333 msgid "The zlib library home page." msgstr "" -#: ../../library/zlib.rst:338 +#: ../../library/zlib.rst:336 msgid "http://www.zlib.net/manual.html" msgstr "http://www.zlib.net/manual.html" -#: ../../library/zlib.rst:338 +#: ../../library/zlib.rst:336 msgid "" "The zlib manual explains the semantics and usage of the library's many " "functions." diff --git a/reference/datamodel.po b/reference/datamodel.po index 270ee657fb..4b0286d849 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-08 14:58+0000\n" +"POT-Creation-Date: 2022-03-21 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1722,11 +1722,11 @@ msgstr "" msgid "" "Called by built-in function :func:`hash` and for operations on members of " "hashed collections including :class:`set`, :class:`frozenset`, and :class:" -"`dict`. :meth:`__hash__` should return an integer. The only required " -"property is that objects which compare equal have the same hash value; it is " -"advised to mix together the hash values of the components of the object that " -"also play a part in comparison of objects by packing them into a tuple and " -"hashing the tuple. Example::" +"`dict`. The ``__hash__()`` method should return an integer. The only " +"required property is that objects which compare equal have the same hash " +"value; it is advised to mix together the hash values of the components of " +"the object that also play a part in comparison of objects by packing them " +"into a tuple and hashing the tuple. Example::" msgstr "" #: ../../reference/datamodel.rst:1480 From 87e37c0d050f4ebfeef2b58cc22634602d89fff3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Mar 2022 00:16:32 +0000 Subject: [PATCH 3/5] sync with cpython 7fc12540 --- reference/compound_stmts.po | 568 ++++++++++++++++++------------------ reference/executionmodel.po | 16 +- 2 files changed, 292 insertions(+), 292 deletions(-) diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index efe642833d..2e3292e85a 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 00:10+0000\n" +"POT-Creation-Date: 2022-03-22 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -194,18 +194,18 @@ msgid "" "exception. For an except clause with an expression, that expression is " "evaluated, and the clause matches the exception if the resulting object is " "\"compatible\" with the exception. An object is compatible with an " -"exception if it is the class or a base class of the exception object, or a " -"tuple containing an item that is the class or a base class of the exception " -"object." +"exception if the object is the class or a :term:`non-virtual base class " +"` of the exception object, or a tuple containing an " +"item that is the class or a non-virtual base class of the exception object." msgstr "" -#: ../../reference/compound_stmts.rst:240 +#: ../../reference/compound_stmts.rst:241 msgid "" "If no except clause matches the exception, the search for an exception " "handler continues in the surrounding code and on the invocation stack. [#]_" msgstr "" -#: ../../reference/compound_stmts.rst:243 +#: ../../reference/compound_stmts.rst:244 msgid "" "If the evaluation of an expression in the header of an except clause raises " "an exception, the original search for a handler is canceled and a search " @@ -214,7 +214,7 @@ msgid "" "exception)." msgstr "" -#: ../../reference/compound_stmts.rst:250 +#: ../../reference/compound_stmts.rst:251 msgid "" "When a matching except clause is found, the exception is assigned to the " "target specified after the :keyword:`!as` keyword in that except clause, if " @@ -226,17 +226,17 @@ msgid "" "exception.)" msgstr "" -#: ../../reference/compound_stmts.rst:258 +#: ../../reference/compound_stmts.rst:259 msgid "" "When an exception has been assigned using ``as target``, it is cleared at " "the end of the except clause. This is as if ::" msgstr "" -#: ../../reference/compound_stmts.rst:264 +#: ../../reference/compound_stmts.rst:265 msgid "was translated to ::" msgstr "" -#: ../../reference/compound_stmts.rst:272 +#: ../../reference/compound_stmts.rst:273 msgid "" "This means the exception must be assigned to a different name to be able to " "refer to it after the except clause. Exceptions are cleared because with " @@ -245,7 +245,7 @@ msgid "" "collection occurs." msgstr "" -#: ../../reference/compound_stmts.rst:281 +#: ../../reference/compound_stmts.rst:282 msgid "" "Before an except clause's suite is executed, details about the exception are " "stored in the :mod:`sys` module and can be accessed via :func:`sys." @@ -256,7 +256,7 @@ msgid "" "are restored to their previous values when leaving an exception handler::" msgstr "" -#: ../../reference/compound_stmts.rst:313 +#: ../../reference/compound_stmts.rst:314 msgid "" "The optional :keyword:`!else` clause is executed if the control flow leaves " "the :keyword:`try` suite, no exception was raised, and no :keyword:" @@ -265,7 +265,7 @@ msgid "" "keyword:`except` clauses." msgstr "" -#: ../../reference/compound_stmts.rst:321 +#: ../../reference/compound_stmts.rst:322 msgid "" "If :keyword:`finally` is present, it specifies a 'cleanup' handler. The :" "keyword:`try` clause is executed, including any :keyword:`except` and :" @@ -279,13 +279,13 @@ msgid "" "exception is discarded::" msgstr "" -#: ../../reference/compound_stmts.rst:340 +#: ../../reference/compound_stmts.rst:341 msgid "" "The exception information is not available to the program during execution " "of the :keyword:`finally` clause." msgstr "" -#: ../../reference/compound_stmts.rst:348 +#: ../../reference/compound_stmts.rst:349 msgid "" "When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " "is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ :keyword:`!" @@ -293,7 +293,7 @@ msgid "" "way out.'" msgstr "" -#: ../../reference/compound_stmts.rst:352 +#: ../../reference/compound_stmts.rst:353 msgid "" "The return value of a function is determined by the last :keyword:`return` " "statement executed. Since the :keyword:`finally` clause always executes, a :" @@ -301,24 +301,24 @@ msgid "" "always be the last one executed::" msgstr "" -#: ../../reference/compound_stmts.rst:366 +#: ../../reference/compound_stmts.rst:367 msgid "" "Additional information on exceptions can be found in section :ref:" "`exceptions`, and information on using the :keyword:`raise` statement to " "generate exceptions may be found in section :ref:`raise`." msgstr "" -#: ../../reference/compound_stmts.rst:370 +#: ../../reference/compound_stmts.rst:371 msgid "" "Prior to Python 3.8, a :keyword:`continue` statement was illegal in the :" "keyword:`finally` clause due to a problem with the implementation." msgstr "" -#: ../../reference/compound_stmts.rst:379 +#: ../../reference/compound_stmts.rst:380 msgid "The :keyword:`!with` statement" msgstr "" -#: ../../reference/compound_stmts.rst:388 +#: ../../reference/compound_stmts.rst:389 msgid "" "The :keyword:`with` statement is used to wrap the execution of a block with " "methods defined by a context manager (see section :ref:`context-managers`). " @@ -326,37 +326,37 @@ msgid "" "`finally` usage patterns to be encapsulated for convenient reuse." msgstr "" -#: ../../reference/compound_stmts.rst:398 +#: ../../reference/compound_stmts.rst:399 msgid "" "The execution of the :keyword:`with` statement with one \"item\" proceeds as " "follows:" msgstr "" -#: ../../reference/compound_stmts.rst:400 +#: ../../reference/compound_stmts.rst:401 msgid "" "The context expression (the expression given in the :token:`~python-grammar:" "with_item`) is evaluated to obtain a context manager." msgstr "" -#: ../../reference/compound_stmts.rst:403 +#: ../../reference/compound_stmts.rst:404 msgid "The context manager's :meth:`__enter__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:405 +#: ../../reference/compound_stmts.rst:406 msgid "The context manager's :meth:`__exit__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:407 +#: ../../reference/compound_stmts.rst:408 msgid "The context manager's :meth:`__enter__` method is invoked." msgstr "" -#: ../../reference/compound_stmts.rst:409 +#: ../../reference/compound_stmts.rst:410 msgid "" "If a target was included in the :keyword:`with` statement, the return value " "from :meth:`__enter__` is assigned to it." msgstr "" -#: ../../reference/compound_stmts.rst:414 +#: ../../reference/compound_stmts.rst:415 msgid "" "The :keyword:`with` statement guarantees that if the :meth:`__enter__` " "method returns without an error, then :meth:`__exit__` will always be " @@ -365,11 +365,11 @@ msgid "" "See step 6 below." msgstr "" -#: ../../reference/compound_stmts.rst:420 +#: ../../reference/compound_stmts.rst:421 msgid "The suite is executed." msgstr "" -#: ../../reference/compound_stmts.rst:422 +#: ../../reference/compound_stmts.rst:423 msgid "" "The context manager's :meth:`__exit__` method is invoked. If an exception " "caused the suite to be exited, its type, value, and traceback are passed as " @@ -377,7 +377,7 @@ msgid "" "supplied." msgstr "" -#: ../../reference/compound_stmts.rst:427 +#: ../../reference/compound_stmts.rst:428 msgid "" "If the suite was exited due to an exception, and the return value from the :" "meth:`__exit__` method was false, the exception is reraised. If the return " @@ -385,119 +385,119 @@ msgid "" "the statement following the :keyword:`with` statement." msgstr "" -#: ../../reference/compound_stmts.rst:432 +#: ../../reference/compound_stmts.rst:433 msgid "" "If the suite was exited for any reason other than an exception, the return " "value from :meth:`__exit__` is ignored, and execution proceeds at the normal " "location for the kind of exit that was taken." msgstr "" -#: ../../reference/compound_stmts.rst:436 -#: ../../reference/compound_stmts.rst:1426 -#: ../../reference/compound_stmts.rst:1467 +#: ../../reference/compound_stmts.rst:437 +#: ../../reference/compound_stmts.rst:1427 +#: ../../reference/compound_stmts.rst:1468 msgid "The following code::" msgstr "" -#: ../../reference/compound_stmts.rst:441 -#: ../../reference/compound_stmts.rst:466 -#: ../../reference/compound_stmts.rst:1472 +#: ../../reference/compound_stmts.rst:442 +#: ../../reference/compound_stmts.rst:467 +#: ../../reference/compound_stmts.rst:1473 msgid "is semantically equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:460 +#: ../../reference/compound_stmts.rst:461 msgid "" "With more than one item, the context managers are processed as if multiple :" "keyword:`with` statements were nested::" msgstr "" -#: ../../reference/compound_stmts.rst:472 +#: ../../reference/compound_stmts.rst:473 msgid "" "You can also write multi-item context managers in multiple lines if the " "items are surrounded by parentheses. For example::" msgstr "" -#: ../../reference/compound_stmts.rst:481 +#: ../../reference/compound_stmts.rst:482 msgid "Support for multiple context expressions." msgstr "" -#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:485 msgid "" "Support for using grouping parentheses to break the statement in multiple " "lines." msgstr "" -#: ../../reference/compound_stmts.rst:490 +#: ../../reference/compound_stmts.rst:491 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/compound_stmts.rst:490 +#: ../../reference/compound_stmts.rst:491 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/compound_stmts.rst:496 +#: ../../reference/compound_stmts.rst:497 msgid "The :keyword:`!match` statement" msgstr "" -#: ../../reference/compound_stmts.rst:509 +#: ../../reference/compound_stmts.rst:510 msgid "The match statement is used for pattern matching. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:518 +#: ../../reference/compound_stmts.rst:519 msgid "" "This section uses single quotes to denote :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:521 +#: ../../reference/compound_stmts.rst:522 msgid "" "Pattern matching takes a pattern as input (following ``case``) and a subject " "value (following ``match``). The pattern (which may contain subpatterns) is " "matched against the subject value. The outcomes are:" msgstr "" -#: ../../reference/compound_stmts.rst:525 +#: ../../reference/compound_stmts.rst:526 msgid "A match success or failure (also termed a pattern success or failure)." msgstr "" -#: ../../reference/compound_stmts.rst:527 +#: ../../reference/compound_stmts.rst:528 msgid "" "Possible binding of matched values to a name. The prerequisites for this " "are further discussed below." msgstr "" -#: ../../reference/compound_stmts.rst:530 +#: ../../reference/compound_stmts.rst:531 msgid "" "The ``match`` and ``case`` keywords are :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:534 -#: ../../reference/compound_stmts.rst:1089 +#: ../../reference/compound_stmts.rst:535 +#: ../../reference/compound_stmts.rst:1090 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../reference/compound_stmts.rst:535 -#: ../../reference/compound_stmts.rst:1090 +#: ../../reference/compound_stmts.rst:536 +#: ../../reference/compound_stmts.rst:1091 msgid ":pep:`636` -- Structural Pattern Matching: Tutorial" msgstr "" -#: ../../reference/compound_stmts.rst:539 +#: ../../reference/compound_stmts.rst:540 msgid "Overview" msgstr "" -#: ../../reference/compound_stmts.rst:541 +#: ../../reference/compound_stmts.rst:542 msgid "Here's an overview of the logical flow of a match statement:" msgstr "" -#: ../../reference/compound_stmts.rst:544 +#: ../../reference/compound_stmts.rst:545 msgid "" "The subject expression ``subject_expr`` is evaluated and a resulting subject " "value obtained. If the subject expression contains a comma, a tuple is " "constructed using :ref:`the standard rules `." msgstr "" -#: ../../reference/compound_stmts.rst:548 +#: ../../reference/compound_stmts.rst:549 msgid "" "Each pattern in a ``case_block`` is attempted to match with the subject " "value. The specific rules for success or failure are described below. The " @@ -507,7 +507,7 @@ msgid "" "outlive the executed block and can be used after the match statement**." msgstr "" -#: ../../reference/compound_stmts.rst:557 +#: ../../reference/compound_stmts.rst:558 msgid "" "During failed pattern matches, some subpatterns may succeed. Do not rely on " "bindings being made for a failed match. Conversely, do not rely on " @@ -516,87 +516,87 @@ msgid "" "made to allow different implementations to add optimizations." msgstr "" -#: ../../reference/compound_stmts.rst:564 +#: ../../reference/compound_stmts.rst:565 msgid "" "If the pattern succeeds, the corresponding guard (if present) is evaluated. " "In this case all name bindings are guaranteed to have happened." msgstr "" -#: ../../reference/compound_stmts.rst:567 +#: ../../reference/compound_stmts.rst:568 msgid "" "If the guard evaluates as true or is missing, the ``block`` inside " "``case_block`` is executed." msgstr "" -#: ../../reference/compound_stmts.rst:570 +#: ../../reference/compound_stmts.rst:571 msgid "Otherwise, the next ``case_block`` is attempted as described above." msgstr "" -#: ../../reference/compound_stmts.rst:572 +#: ../../reference/compound_stmts.rst:573 msgid "If there are no further case blocks, the match statement is completed." msgstr "" -#: ../../reference/compound_stmts.rst:576 +#: ../../reference/compound_stmts.rst:577 msgid "" "Users should generally never rely on a pattern being evaluated. Depending " "on implementation, the interpreter may cache values or use other " "optimizations which skip repeated evaluations." msgstr "" -#: ../../reference/compound_stmts.rst:580 +#: ../../reference/compound_stmts.rst:581 msgid "A sample match statement::" msgstr "" -#: ../../reference/compound_stmts.rst:596 +#: ../../reference/compound_stmts.rst:597 msgid "" "In this case, ``if flag`` is a guard. Read more about that in the next " "section." msgstr "" -#: ../../reference/compound_stmts.rst:599 +#: ../../reference/compound_stmts.rst:600 msgid "Guards" msgstr "" -#: ../../reference/compound_stmts.rst:606 +#: ../../reference/compound_stmts.rst:607 msgid "" "A ``guard`` (which is part of the ``case``) must succeed for code inside the " "``case`` block to execute. It takes the form: :keyword:`if` followed by an " "expression." msgstr "" -#: ../../reference/compound_stmts.rst:611 +#: ../../reference/compound_stmts.rst:612 msgid "The logical flow of a ``case`` block with a ``guard`` follows:" msgstr "" -#: ../../reference/compound_stmts.rst:613 +#: ../../reference/compound_stmts.rst:614 msgid "" "Check that the pattern in the ``case`` block succeeded. If the pattern " "failed, the ``guard`` is not evaluated and the next ``case`` block is " "checked." msgstr "" -#: ../../reference/compound_stmts.rst:617 +#: ../../reference/compound_stmts.rst:618 msgid "If the pattern succeeded, evaluate the ``guard``." msgstr "" -#: ../../reference/compound_stmts.rst:619 +#: ../../reference/compound_stmts.rst:620 msgid "" "If the ``guard`` condition evaluates as true, the case block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:622 +#: ../../reference/compound_stmts.rst:623 msgid "" "If the ``guard`` condition evaluates as false, the case block is not " "selected." msgstr "" -#: ../../reference/compound_stmts.rst:625 +#: ../../reference/compound_stmts.rst:626 msgid "" "If the ``guard`` raises an exception during evaluation, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:628 +#: ../../reference/compound_stmts.rst:629 msgid "" "Guards are allowed to have side effects as they are expressions. Guard " "evaluation must proceed from the first to the last case block, one at a " @@ -605,17 +605,17 @@ msgid "" "block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:638 +#: ../../reference/compound_stmts.rst:639 msgid "Irrefutable Case Blocks" msgstr "" -#: ../../reference/compound_stmts.rst:642 +#: ../../reference/compound_stmts.rst:643 msgid "" "An irrefutable case block is a match-all case block. A match statement may " "have at most one irrefutable case block, and it must be last." msgstr "" -#: ../../reference/compound_stmts.rst:645 +#: ../../reference/compound_stmts.rst:646 msgid "" "A case block is considered irrefutable if it has no guard and its pattern is " "irrefutable. A pattern is considered irrefutable if we can prove from its " @@ -623,47 +623,47 @@ msgid "" "irrefutable:" msgstr "" -#: ../../reference/compound_stmts.rst:650 +#: ../../reference/compound_stmts.rst:651 msgid ":ref:`as-patterns` whose left-hand side is irrefutable" msgstr "" -#: ../../reference/compound_stmts.rst:652 +#: ../../reference/compound_stmts.rst:653 msgid ":ref:`or-patterns` containing at least one irrefutable pattern" msgstr "" -#: ../../reference/compound_stmts.rst:654 +#: ../../reference/compound_stmts.rst:655 msgid ":ref:`capture-patterns`" msgstr ":ref:`capture-patterns`" -#: ../../reference/compound_stmts.rst:656 +#: ../../reference/compound_stmts.rst:657 msgid ":ref:`wildcard-patterns`" msgstr ":ref:`wildcard-patterns`" -#: ../../reference/compound_stmts.rst:658 +#: ../../reference/compound_stmts.rst:659 msgid "parenthesized irrefutable patterns" msgstr "" -#: ../../reference/compound_stmts.rst:662 +#: ../../reference/compound_stmts.rst:663 msgid "Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:669 +#: ../../reference/compound_stmts.rst:670 msgid "This section uses grammar notations beyond standard EBNF:" msgstr "" -#: ../../reference/compound_stmts.rst:671 +#: ../../reference/compound_stmts.rst:672 msgid "the notation ``SEP.RULE+`` is shorthand for ``RULE (SEP RULE)*``" msgstr "" -#: ../../reference/compound_stmts.rst:673 +#: ../../reference/compound_stmts.rst:674 msgid "the notation ``!RULE`` is shorthand for a negative lookahead assertion" msgstr "" -#: ../../reference/compound_stmts.rst:676 +#: ../../reference/compound_stmts.rst:677 msgid "The top-level syntax for ``patterns`` is:" msgstr "" -#: ../../reference/compound_stmts.rst:690 +#: ../../reference/compound_stmts.rst:691 msgid "" "The descriptions below will include a description \"in simple terms\" of " "what a pattern does for illustration purposes (credits to Raymond Hettinger " @@ -673,70 +673,70 @@ msgid "" "forms." msgstr "" -#: ../../reference/compound_stmts.rst:700 +#: ../../reference/compound_stmts.rst:701 msgid "OR Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:702 +#: ../../reference/compound_stmts.rst:703 msgid "" "An OR pattern is two or more patterns separated by vertical bars ``|``. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:708 +#: ../../reference/compound_stmts.rst:709 msgid "" "Only the final subpattern may be :ref:`irrefutable `, and " "each subpattern must bind the same set of names to avoid ambiguity." msgstr "" -#: ../../reference/compound_stmts.rst:711 +#: ../../reference/compound_stmts.rst:712 msgid "" "An OR pattern matches each of its subpatterns in turn to the subject value, " "until one succeeds. The OR pattern is then considered successful. " "Otherwise, if none of the subpatterns succeed, the OR pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:715 +#: ../../reference/compound_stmts.rst:716 msgid "" "In simple terms, ``P1 | P2 | ...`` will try to match ``P1``, if it fails it " "will try to match ``P2``, succeeding immediately if any succeeds, failing " "otherwise." msgstr "" -#: ../../reference/compound_stmts.rst:721 +#: ../../reference/compound_stmts.rst:722 msgid "AS Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:723 +#: ../../reference/compound_stmts.rst:724 msgid "" "An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword " "against a subject. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:729 +#: ../../reference/compound_stmts.rst:730 msgid "" "If the OR pattern fails, the AS pattern fails. Otherwise, the AS pattern " "binds the subject to the name on the right of the as keyword and succeeds. " "``capture_pattern`` cannot be a a ``_``." msgstr "" -#: ../../reference/compound_stmts.rst:733 +#: ../../reference/compound_stmts.rst:734 msgid "" "In simple terms ``P as NAME`` will match with ``P``, and on success it will " "set ``NAME = ``." msgstr "" -#: ../../reference/compound_stmts.rst:740 +#: ../../reference/compound_stmts.rst:741 msgid "Literal Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:742 +#: ../../reference/compound_stmts.rst:743 msgid "" "A literal pattern corresponds to most :ref:`literals ` in Python. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:755 +#: ../../reference/compound_stmts.rst:756 msgid "" "The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:" "`standard Python grammar <./grammar>`. Triple-quoted strings are " @@ -744,42 +744,42 @@ msgid "" "are not supported." msgstr "" -#: ../../reference/compound_stmts.rst:760 +#: ../../reference/compound_stmts.rst:761 msgid "" "The forms ``signed_number '+' NUMBER`` and ``signed_number '-' NUMBER`` are " "for expressing :ref:`complex numbers `; they require a real " "number on the left and an imaginary number on the right. E.g. ``3 + 4j``." msgstr "" -#: ../../reference/compound_stmts.rst:764 +#: ../../reference/compound_stmts.rst:765 msgid "" "In simple terms, ``LITERAL`` will succeed only if `` == LITERAL``. " "For the singletons ``None``, ``True`` and ``False``, the :keyword:`is` " "operator is used." msgstr "" -#: ../../reference/compound_stmts.rst:770 +#: ../../reference/compound_stmts.rst:771 msgid "Capture Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:772 +#: ../../reference/compound_stmts.rst:773 msgid "A capture pattern binds the subject value to a name. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:778 +#: ../../reference/compound_stmts.rst:779 msgid "" "A single underscore ``_`` is not a capture pattern (this is what ``!'_'`` " "expresses). It is instead treated as a :token:`~python-grammar:" "wildcard_pattern`." msgstr "" -#: ../../reference/compound_stmts.rst:782 +#: ../../reference/compound_stmts.rst:783 msgid "" "In a given pattern, a given name can only be bound once. E.g. ``case x, " "x: ...`` is invalid while ``case [x] | x: ...`` is allowed." msgstr "" -#: ../../reference/compound_stmts.rst:785 +#: ../../reference/compound_stmts.rst:786 msgid "" "Capture patterns always succeed. The binding follows scoping rules " "established by the assignment expression operator in :pep:`572`; the name " @@ -787,55 +787,55 @@ msgid "" "there's an applicable :keyword:`global` or :keyword:`nonlocal` statement." msgstr "" -#: ../../reference/compound_stmts.rst:790 +#: ../../reference/compound_stmts.rst:791 msgid "" "In simple terms ``NAME`` will always succeed and it will set ``NAME = " "``." msgstr "" -#: ../../reference/compound_stmts.rst:795 +#: ../../reference/compound_stmts.rst:796 msgid "Wildcard Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:797 +#: ../../reference/compound_stmts.rst:798 msgid "" "A wildcard pattern always succeeds (matches anything) and binds no name. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:803 +#: ../../reference/compound_stmts.rst:804 msgid "" "``_`` is a :ref:`soft keyword ` within any pattern, but only " "within patterns. It is an identifier, as usual, even within ``match`` " "subject expressions, ``guard``\\ s, and ``case`` blocks." msgstr "" -#: ../../reference/compound_stmts.rst:807 +#: ../../reference/compound_stmts.rst:808 msgid "In simple terms, ``_`` will always succeed." msgstr "" -#: ../../reference/compound_stmts.rst:812 +#: ../../reference/compound_stmts.rst:813 msgid "Value Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:814 +#: ../../reference/compound_stmts.rst:815 msgid "A value pattern represents a named value in Python. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:822 +#: ../../reference/compound_stmts.rst:823 msgid "" "The dotted name in the pattern is looked up using standard Python :ref:`name " "resolution rules `. The pattern succeeds if the value found " "compares equal to the subject value (using the ``==`` equality operator)." msgstr "" -#: ../../reference/compound_stmts.rst:827 +#: ../../reference/compound_stmts.rst:828 msgid "" "In simple terms ``NAME1.NAME2`` will succeed only if `` == NAME1." "NAME2``" msgstr "" -#: ../../reference/compound_stmts.rst:831 +#: ../../reference/compound_stmts.rst:832 msgid "" "If the same value occurs multiple times in the same match statement, the " "interpreter may cache the first value found and reuse it rather than repeat " @@ -843,44 +843,44 @@ msgid "" "given match statement." msgstr "" -#: ../../reference/compound_stmts.rst:839 +#: ../../reference/compound_stmts.rst:840 msgid "Group Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:841 +#: ../../reference/compound_stmts.rst:842 msgid "" "A group pattern allows users to add parentheses around patterns to emphasize " "the intended grouping. Otherwise, it has no additional syntax. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:848 +#: ../../reference/compound_stmts.rst:849 msgid "In simple terms ``(P)`` has the same effect as ``P``." msgstr "" -#: ../../reference/compound_stmts.rst:853 +#: ../../reference/compound_stmts.rst:854 msgid "Sequence Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:855 +#: ../../reference/compound_stmts.rst:856 msgid "" "A sequence pattern contains several subpatterns to be matched against " "sequence elements. The syntax is similar to the unpacking of a list or tuple." msgstr "" -#: ../../reference/compound_stmts.rst:866 +#: ../../reference/compound_stmts.rst:867 msgid "" "There is no difference if parentheses or square brackets are used for " "sequence patterns (i.e. ``(...)`` vs ``[...]`` )." msgstr "" -#: ../../reference/compound_stmts.rst:870 +#: ../../reference/compound_stmts.rst:871 msgid "" "A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3 " "| 4)``) is a :ref:`group pattern `. While a single pattern " "enclosed in square brackets (e.g. ``[3 | 4]``) is still a sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:875 +#: ../../reference/compound_stmts.rst:876 msgid "" "At most one star subpattern may be in a sequence pattern. The star " "subpattern may occur in any position. If no star subpattern is present, the " @@ -888,40 +888,40 @@ msgid "" "variable-length sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:880 +#: ../../reference/compound_stmts.rst:881 msgid "" "The following is the logical flow for matching a sequence pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:883 +#: ../../reference/compound_stmts.rst:884 msgid "" "If the subject value is not a sequence [#]_, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:886 +#: ../../reference/compound_stmts.rst:887 msgid "" "If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " "the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:889 +#: ../../reference/compound_stmts.rst:890 msgid "" "The subsequent steps depend on whether the sequence pattern is fixed or " "variable-length." msgstr "" -#: ../../reference/compound_stmts.rst:892 +#: ../../reference/compound_stmts.rst:893 msgid "If the sequence pattern is fixed-length:" msgstr "" -#: ../../reference/compound_stmts.rst:894 +#: ../../reference/compound_stmts.rst:895 msgid "" "If the length of the subject sequence is not equal to the number of " "subpatterns, the sequence pattern fails" msgstr "" -#: ../../reference/compound_stmts.rst:897 +#: ../../reference/compound_stmts.rst:898 msgid "" "Subpatterns in the sequence pattern are matched to their corresponding items " "in the subject sequence from left to right. Matching stops as soon as a " @@ -929,118 +929,118 @@ msgid "" "corresponding item, the sequence pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:902 +#: ../../reference/compound_stmts.rst:903 msgid "Otherwise, if the sequence pattern is variable-length:" msgstr "" -#: ../../reference/compound_stmts.rst:904 +#: ../../reference/compound_stmts.rst:905 msgid "" "If the length of the subject sequence is less than the number of non-star " "subpatterns, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:907 +#: ../../reference/compound_stmts.rst:908 msgid "" "The leading non-star subpatterns are matched to their corresponding items as " "for fixed-length sequences." msgstr "" -#: ../../reference/compound_stmts.rst:910 +#: ../../reference/compound_stmts.rst:911 msgid "" "If the previous step succeeds, the star subpattern matches a list formed of " "the remaining subject items, excluding the remaining items corresponding to " "non-star subpatterns following the star subpattern." msgstr "" -#: ../../reference/compound_stmts.rst:914 +#: ../../reference/compound_stmts.rst:915 msgid "" "Remaining non-star subpatterns are matched to their corresponding subject " "items, as for a fixed-length sequence." msgstr "" -#: ../../reference/compound_stmts.rst:917 +#: ../../reference/compound_stmts.rst:918 msgid "" "The length of the subject sequence is obtained via :func:`len` (i.e. via " "the :meth:`__len__` protocol). This length may be cached by the interpreter " "in a similar manner as :ref:`value patterns `." msgstr "" -#: ../../reference/compound_stmts.rst:923 +#: ../../reference/compound_stmts.rst:924 msgid "" "In simple terms ``[P1, P2, P3,`` ... ``, P]`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:926 +#: ../../reference/compound_stmts.rst:927 msgid "check ```` is a sequence" msgstr "" -#: ../../reference/compound_stmts.rst:927 +#: ../../reference/compound_stmts.rst:928 msgid "``len(subject) == ``" msgstr "``len(subject) == ``" -#: ../../reference/compound_stmts.rst:928 +#: ../../reference/compound_stmts.rst:929 msgid "" "``P1`` matches ``[0]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:929 +#: ../../reference/compound_stmts.rst:930 msgid "" "``P2`` matches ``[1]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:930 +#: ../../reference/compound_stmts.rst:931 msgid "... and so on for the corresponding pattern/element." msgstr "" -#: ../../reference/compound_stmts.rst:935 +#: ../../reference/compound_stmts.rst:936 msgid "Mapping Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:937 +#: ../../reference/compound_stmts.rst:938 msgid "" "A mapping pattern contains one or more key-value patterns. The syntax is " "similar to the construction of a dictionary. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:948 +#: ../../reference/compound_stmts.rst:949 msgid "" "At most one double star pattern may be in a mapping pattern. The double " "star pattern must be the last subpattern in the mapping pattern." msgstr "" -#: ../../reference/compound_stmts.rst:951 +#: ../../reference/compound_stmts.rst:952 msgid "" "Duplicate keys in mapping patterns are disallowed. Duplicate literal keys " "will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value " "will raise a :exc:`ValueError` at runtime." msgstr "" -#: ../../reference/compound_stmts.rst:955 +#: ../../reference/compound_stmts.rst:956 msgid "" "The following is the logical flow for matching a mapping pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:958 +#: ../../reference/compound_stmts.rst:959 msgid "If the subject value is not a mapping [#]_,the mapping pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:960 +#: ../../reference/compound_stmts.rst:961 msgid "" "If every key given in the mapping pattern is present in the subject mapping, " "and the pattern for each key matches the corresponding item of the subject " "mapping, the mapping pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:964 +#: ../../reference/compound_stmts.rst:965 msgid "" "If duplicate keys are detected in the mapping pattern, the pattern is " "considered invalid. A :exc:`SyntaxError` is raised for duplicate literal " "values; or a :exc:`ValueError` for named keys of the same value." msgstr "" -#: ../../reference/compound_stmts.rst:968 +#: ../../reference/compound_stmts.rst:969 msgid "" "Key-value pairs are matched using the two-argument form of the mapping " "subject's ``get()`` method. Matched key-value pairs must already be present " @@ -1048,210 +1048,210 @@ msgid "" "`__getitem__`." msgstr "" -#: ../../reference/compound_stmts.rst:973 +#: ../../reference/compound_stmts.rst:974 msgid "" "In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:976 +#: ../../reference/compound_stmts.rst:977 msgid "check ```` is a mapping" msgstr "" -#: ../../reference/compound_stmts.rst:977 +#: ../../reference/compound_stmts.rst:978 msgid "``KEY1 in ``" msgstr "``KEY1 in ``" -#: ../../reference/compound_stmts.rst:978 +#: ../../reference/compound_stmts.rst:979 msgid "``P1`` matches ``[KEY1]``" msgstr "" -#: ../../reference/compound_stmts.rst:979 +#: ../../reference/compound_stmts.rst:980 msgid "... and so on for the corresponding KEY/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:985 +#: ../../reference/compound_stmts.rst:986 msgid "Class Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:987 +#: ../../reference/compound_stmts.rst:988 msgid "" "A class pattern represents a class and its positional and keyword arguments " "(if any). Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:998 +#: ../../reference/compound_stmts.rst:999 msgid "The same keyword should not be repeated in class patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1000 +#: ../../reference/compound_stmts.rst:1001 msgid "" "The following is the logical flow for matching a class pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:1003 +#: ../../reference/compound_stmts.rst:1004 msgid "" "If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise :" "exc:`TypeError`." msgstr "" -#: ../../reference/compound_stmts.rst:1006 +#: ../../reference/compound_stmts.rst:1007 msgid "" "If the subject value is not an instance of ``name_or_attr`` (tested via :" "func:`isinstance`), the class pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:1009 +#: ../../reference/compound_stmts.rst:1010 msgid "" "If no pattern arguments are present, the pattern succeeds. Otherwise, the " "subsequent steps depend on whether keyword or positional argument patterns " "are present." msgstr "" -#: ../../reference/compound_stmts.rst:1013 +#: ../../reference/compound_stmts.rst:1014 msgid "" "For a number of built-in types (specified below), a single positional " "subpattern is accepted which will match the entire subject; for these types " "keyword patterns also work as for other types." msgstr "" -#: ../../reference/compound_stmts.rst:1017 +#: ../../reference/compound_stmts.rst:1018 msgid "" "If only keyword patterns are present, they are processed as follows, one by " "one:" msgstr "" -#: ../../reference/compound_stmts.rst:1020 +#: ../../reference/compound_stmts.rst:1021 msgid "I. The keyword is looked up as an attribute on the subject." msgstr "" -#: ../../reference/compound_stmts.rst:1022 +#: ../../reference/compound_stmts.rst:1023 msgid "" "If this raises an exception other than :exc:`AttributeError`, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1025 +#: ../../reference/compound_stmts.rst:1026 msgid "If this raises :exc:`AttributeError`, the class pattern has failed." msgstr "" -#: ../../reference/compound_stmts.rst:1027 +#: ../../reference/compound_stmts.rst:1028 msgid "" "Else, the subpattern associated with the keyword pattern is matched against " "the subject's attribute value. If this fails, the class pattern fails; if " "this succeeds, the match proceeds to the next keyword." msgstr "" -#: ../../reference/compound_stmts.rst:1032 +#: ../../reference/compound_stmts.rst:1033 msgid "II. If all keyword patterns succeed, the class pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:1034 +#: ../../reference/compound_stmts.rst:1035 msgid "" "If any positional patterns are present, they are converted to keyword " "patterns using the :data:`~object.__match_args__` attribute on the class " "``name_or_attr`` before matching:" msgstr "" -#: ../../reference/compound_stmts.rst:1038 +#: ../../reference/compound_stmts.rst:1039 msgid "" "I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." msgstr "" -#: ../../reference/compound_stmts.rst:1040 +#: ../../reference/compound_stmts.rst:1041 msgid "If this raises an exception, the exception bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1042 +#: ../../reference/compound_stmts.rst:1043 msgid "" "If the returned value is not a tuple, the conversion fails and :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1045 +#: ../../reference/compound_stmts.rst:1046 msgid "" "If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1048 +#: ../../reference/compound_stmts.rst:1049 msgid "" "Otherwise, positional pattern ``i`` is converted to a keyword pattern using " "``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " "string; if not :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1052 +#: ../../reference/compound_stmts.rst:1053 msgid "If there are duplicate keywords, :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1054 +#: ../../reference/compound_stmts.rst:1055 msgid ":ref:`class-pattern-matching`" msgstr ":ref:`class-pattern-matching`" -#: ../../reference/compound_stmts.rst:1057 +#: ../../reference/compound_stmts.rst:1058 msgid "" "II. Once all positional patterns have been converted to keyword patterns," msgstr "" -#: ../../reference/compound_stmts.rst:1057 +#: ../../reference/compound_stmts.rst:1058 msgid "the match proceeds as if there were only keyword patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1059 +#: ../../reference/compound_stmts.rst:1060 msgid "" "For the following built-in types the handling of positional subpatterns is " "different:" msgstr "" -#: ../../reference/compound_stmts.rst:1062 +#: ../../reference/compound_stmts.rst:1063 msgid ":class:`bool`" msgstr ":class:`bool`" -#: ../../reference/compound_stmts.rst:1063 +#: ../../reference/compound_stmts.rst:1064 msgid ":class:`bytearray`" msgstr ":class:`bytearray`" -#: ../../reference/compound_stmts.rst:1064 +#: ../../reference/compound_stmts.rst:1065 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../reference/compound_stmts.rst:1065 +#: ../../reference/compound_stmts.rst:1066 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../reference/compound_stmts.rst:1066 +#: ../../reference/compound_stmts.rst:1067 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../reference/compound_stmts.rst:1067 +#: ../../reference/compound_stmts.rst:1068 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../reference/compound_stmts.rst:1068 +#: ../../reference/compound_stmts.rst:1069 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../reference/compound_stmts.rst:1069 -#: ../../reference/compound_stmts.rst:1520 +#: ../../reference/compound_stmts.rst:1070 +#: ../../reference/compound_stmts.rst:1521 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../reference/compound_stmts.rst:1070 +#: ../../reference/compound_stmts.rst:1071 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../reference/compound_stmts.rst:1071 +#: ../../reference/compound_stmts.rst:1072 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../reference/compound_stmts.rst:1072 -#: ../../reference/compound_stmts.rst:1523 +#: ../../reference/compound_stmts.rst:1073 +#: ../../reference/compound_stmts.rst:1524 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../reference/compound_stmts.rst:1074 +#: ../../reference/compound_stmts.rst:1075 msgid "" "These classes accept a single positional argument, and the pattern there is " "matched against the whole object rather than an attribute. For example " @@ -1259,46 +1259,46 @@ msgid "" "``False``." msgstr "" -#: ../../reference/compound_stmts.rst:1078 +#: ../../reference/compound_stmts.rst:1079 msgid "" "In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1080 +#: ../../reference/compound_stmts.rst:1081 msgid "``isinstance(, CLS)``" msgstr "``isinstance(, CLS)``" -#: ../../reference/compound_stmts.rst:1081 +#: ../../reference/compound_stmts.rst:1082 msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgstr "" -#: ../../reference/compound_stmts.rst:1083 +#: ../../reference/compound_stmts.rst:1084 msgid "For each keyword argument ``attr=P2``:" msgstr "" -#: ../../reference/compound_stmts.rst:1083 +#: ../../reference/compound_stmts.rst:1084 msgid "``hasattr(, \"attr\")``" msgstr "``hasattr(, \"attr\")``" -#: ../../reference/compound_stmts.rst:1084 +#: ../../reference/compound_stmts.rst:1085 msgid "``P2`` matches ``.attr``" msgstr "" -#: ../../reference/compound_stmts.rst:1085 +#: ../../reference/compound_stmts.rst:1086 msgid "... and so on for the corresponding keyword argument/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:1100 +#: ../../reference/compound_stmts.rst:1101 msgid "Function definitions" msgstr "函式定義" -#: ../../reference/compound_stmts.rst:1115 +#: ../../reference/compound_stmts.rst:1116 msgid "" "A function definition defines a user-defined function object (see section :" "ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1134 +#: ../../reference/compound_stmts.rst:1135 msgid "" "A function definition is an executable statement. Its execution binds the " "function name in the current local namespace to a function object (a wrapper " @@ -1307,13 +1307,13 @@ msgid "" "used when the function is called." msgstr "" -#: ../../reference/compound_stmts.rst:1140 +#: ../../reference/compound_stmts.rst:1141 msgid "" "The function definition does not execute the function body; this gets " "executed only when the function is called. [#]_" msgstr "" -#: ../../reference/compound_stmts.rst:1146 +#: ../../reference/compound_stmts.rst:1147 msgid "" "A function definition may be wrapped by one or more :term:`decorator` " "expressions. Decorator expressions are evaluated when the function is " @@ -1324,28 +1324,28 @@ msgid "" "example, the following code ::" msgstr "" -#: ../../reference/compound_stmts.rst:1157 -#: ../../reference/compound_stmts.rst:1334 +#: ../../reference/compound_stmts.rst:1158 +#: ../../reference/compound_stmts.rst:1335 msgid "is roughly equivalent to ::" msgstr "" "大致等價於:\n" "\n" "::" -#: ../../reference/compound_stmts.rst:1162 +#: ../../reference/compound_stmts.rst:1163 msgid "" "except that the original function is not temporarily bound to the name " "``func``." msgstr "" -#: ../../reference/compound_stmts.rst:1164 +#: ../../reference/compound_stmts.rst:1165 msgid "" "Functions may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1174 +#: ../../reference/compound_stmts.rst:1175 msgid "" "When one or more :term:`parameters ` have the form *parameter* " "``=`` *expression*, the function is said to have \"default parameter values." @@ -1356,7 +1356,7 @@ msgid "" "syntactic restriction that is not expressed by the grammar." msgstr "" -#: ../../reference/compound_stmts.rst:1182 +#: ../../reference/compound_stmts.rst:1183 msgid "" "**Default parameter values are evaluated from left to right when the " "function definition is executed.** This means that the expression is " @@ -1369,7 +1369,7 @@ msgid "" "the default, and explicitly test for it in the body of the function, e.g.::" msgstr "" -#: ../../reference/compound_stmts.rst:1203 +#: ../../reference/compound_stmts.rst:1204 msgid "" "Function call semantics are described in more detail in section :ref:" "`calls`. A function call always assigns values to all parameters mentioned " @@ -1385,13 +1385,13 @@ msgid "" "positional arguments." msgstr "" -#: ../../reference/compound_stmts.rst:1215 +#: ../../reference/compound_stmts.rst:1216 msgid "" "The ``/`` function parameter syntax may be used to indicate positional-only " "parameters. See :pep:`570` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1224 +#: ../../reference/compound_stmts.rst:1225 msgid "" "Parameters may have an :term:`annotation ` of the form " "\"``: expression``\" following the parameter name. Any parameter may have " @@ -1408,7 +1408,7 @@ msgid "" "different order than they appear in the source code." msgstr "" -#: ../../reference/compound_stmts.rst:1239 +#: ../../reference/compound_stmts.rst:1240 msgid "" "It is also possible to create anonymous functions (functions not bound to a " "name), for immediate use in expressions. This uses lambda expressions, " @@ -1420,7 +1420,7 @@ msgid "" "execution of multiple statements and annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1247 +#: ../../reference/compound_stmts.rst:1248 msgid "" "**Programmer's note:** Functions are first-class objects. A \"``def``\" " "statement executed inside a function definition defines a local function " @@ -1429,51 +1429,51 @@ msgid "" "See section :ref:`naming` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1256 +#: ../../reference/compound_stmts.rst:1257 msgid ":pep:`3107` - Function Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1256 +#: ../../reference/compound_stmts.rst:1257 msgid "The original specification for function annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1259 +#: ../../reference/compound_stmts.rst:1260 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/compound_stmts.rst:1259 +#: ../../reference/compound_stmts.rst:1260 msgid "Definition of a standard meaning for annotations: type hints." msgstr "" -#: ../../reference/compound_stmts.rst:1263 +#: ../../reference/compound_stmts.rst:1264 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1262 +#: ../../reference/compound_stmts.rst:1263 msgid "" "Ability to type hint variable declarations, including class variables and " "instance variables" msgstr "" -#: ../../reference/compound_stmts.rst:1266 +#: ../../reference/compound_stmts.rst:1267 msgid ":pep:`563` - Postponed Evaluation of Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1266 +#: ../../reference/compound_stmts.rst:1267 msgid "" "Support for forward references within annotations by preserving annotations " "in a string form at runtime instead of eager evaluation." msgstr "" -#: ../../reference/compound_stmts.rst:1273 +#: ../../reference/compound_stmts.rst:1274 msgid "Class definitions" msgstr "" -#: ../../reference/compound_stmts.rst:1288 +#: ../../reference/compound_stmts.rst:1289 msgid "A class definition defines a class object (see section :ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1295 +#: ../../reference/compound_stmts.rst:1296 msgid "" "A class definition is an executable statement. The inheritance list usually " "gives a list of base classes (see :ref:`metaclasses` for more advanced " @@ -1482,11 +1482,11 @@ msgid "" "default, from the base class :class:`object`; hence, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1304 +#: ../../reference/compound_stmts.rst:1305 msgid "is equivalent to ::" msgstr "" -#: ../../reference/compound_stmts.rst:1309 +#: ../../reference/compound_stmts.rst:1310 msgid "" "The class's suite is then executed in a new execution frame (see :ref:" "`naming`), using a newly created local namespace and the original global " @@ -1498,7 +1498,7 @@ msgid "" "original local namespace." msgstr "" -#: ../../reference/compound_stmts.rst:1318 +#: ../../reference/compound_stmts.rst:1319 msgid "" "The order in which attributes are defined in the class body is preserved in " "the new class's ``__dict__``. Note that this is reliable only right after " @@ -1506,30 +1506,30 @@ msgid "" "definition syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1323 +#: ../../reference/compound_stmts.rst:1324 msgid "" "Class creation can be customized heavily using :ref:`metaclasses " "`." msgstr "" -#: ../../reference/compound_stmts.rst:1328 +#: ../../reference/compound_stmts.rst:1329 msgid "Classes can also be decorated: just like when decorating functions, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1339 +#: ../../reference/compound_stmts.rst:1340 msgid "" "The evaluation rules for the decorator expressions are the same as for " "function decorators. The result is then bound to the class name." msgstr "" -#: ../../reference/compound_stmts.rst:1342 +#: ../../reference/compound_stmts.rst:1343 msgid "" "Classes may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1347 +#: ../../reference/compound_stmts.rst:1348 msgid "" "**Programmer's note:** Variables defined in the class definition are class " "attributes; they are shared by instances. Instance attributes can be set in " @@ -1542,35 +1542,35 @@ msgid "" "implementation details." msgstr "" -#: ../../reference/compound_stmts.rst:1362 +#: ../../reference/compound_stmts.rst:1363 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/compound_stmts.rst:1360 +#: ../../reference/compound_stmts.rst:1361 msgid "" "The proposal that changed the declaration of metaclasses to the current " "syntax, and the semantics for how classes with metaclasses are constructed." msgstr "" -#: ../../reference/compound_stmts.rst:1365 +#: ../../reference/compound_stmts.rst:1366 msgid ":pep:`3129` - Class Decorators" msgstr "" -#: ../../reference/compound_stmts.rst:1365 +#: ../../reference/compound_stmts.rst:1366 msgid "" "The proposal that added class decorators. Function and method decorators " "were introduced in :pep:`318`." msgstr "" -#: ../../reference/compound_stmts.rst:1372 +#: ../../reference/compound_stmts.rst:1373 msgid "Coroutines" msgstr "協程" -#: ../../reference/compound_stmts.rst:1380 +#: ../../reference/compound_stmts.rst:1381 msgid "Coroutine function definition" msgstr "" -#: ../../reference/compound_stmts.rst:1390 +#: ../../reference/compound_stmts.rst:1391 msgid "" "Execution of Python coroutines can be suspended and resumed at many points " "(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` " @@ -1578,184 +1578,184 @@ msgid "" "function." msgstr "" -#: ../../reference/compound_stmts.rst:1394 +#: ../../reference/compound_stmts.rst:1395 msgid "" "Functions defined with ``async def`` syntax are always coroutine functions, " "even if they do not contain ``await`` or ``async`` keywords." msgstr "" -#: ../../reference/compound_stmts.rst:1397 +#: ../../reference/compound_stmts.rst:1398 msgid "" "It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1400 +#: ../../reference/compound_stmts.rst:1401 msgid "An example of a coroutine function::" msgstr "" "一個協程韓式函式範例:\n" "\n" "::" -#: ../../reference/compound_stmts.rst:1406 +#: ../../reference/compound_stmts.rst:1407 msgid "" "``await`` and ``async`` are now keywords; previously they were only treated " "as such inside the body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1414 +#: ../../reference/compound_stmts.rst:1415 msgid "The :keyword:`!async for` statement" msgstr "" -#: ../../reference/compound_stmts.rst:1419 +#: ../../reference/compound_stmts.rst:1420 msgid "" "An :term:`asynchronous iterable` provides an ``__aiter__`` method that " "directly returns an :term:`asynchronous iterator`, which can call " "asynchronous code in its ``__anext__`` method." msgstr "" -#: ../../reference/compound_stmts.rst:1423 +#: ../../reference/compound_stmts.rst:1424 msgid "" "The ``async for`` statement allows convenient iteration over asynchronous " "iterables." msgstr "" -#: ../../reference/compound_stmts.rst:1433 +#: ../../reference/compound_stmts.rst:1434 msgid "Is semantically equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:1449 +#: ../../reference/compound_stmts.rst:1450 msgid "See also :meth:`__aiter__` and :meth:`__anext__` for details." msgstr "更多細節請見 :meth:`__aiter__` 與 :meth:`__anext__`\\ 。" -#: ../../reference/compound_stmts.rst:1451 +#: ../../reference/compound_stmts.rst:1452 msgid "" "It is a :exc:`SyntaxError` to use an ``async for`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1459 +#: ../../reference/compound_stmts.rst:1460 msgid "The :keyword:`!async with` statement" msgstr "" -#: ../../reference/compound_stmts.rst:1464 +#: ../../reference/compound_stmts.rst:1465 msgid "" "An :term:`asynchronous context manager` is a :term:`context manager` that is " "able to suspend execution in its *enter* and *exit* methods." msgstr "" -#: ../../reference/compound_stmts.rst:1491 +#: ../../reference/compound_stmts.rst:1492 msgid "See also :meth:`__aenter__` and :meth:`__aexit__` for details." msgstr "更多細節請見 :meth:`__aenter__` 與 :meth:`__aexit__`\\ 。" -#: ../../reference/compound_stmts.rst:1493 +#: ../../reference/compound_stmts.rst:1494 msgid "" "It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1499 +#: ../../reference/compound_stmts.rst:1500 msgid ":pep:`492` - Coroutines with async and await syntax" msgstr "" -#: ../../reference/compound_stmts.rst:1499 +#: ../../reference/compound_stmts.rst:1500 msgid "" "The proposal that made coroutines a proper standalone concept in Python, and " "added supporting syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1504 +#: ../../reference/compound_stmts.rst:1505 msgid "Footnotes" msgstr "註解" -#: ../../reference/compound_stmts.rst:1505 +#: ../../reference/compound_stmts.rst:1506 msgid "" "The exception is propagated to the invocation stack unless there is a :" "keyword:`finally` clause which happens to raise another exception. That new " "exception causes the old one to be lost." msgstr "" -#: ../../reference/compound_stmts.rst:1509 +#: ../../reference/compound_stmts.rst:1510 msgid "In pattern matching, a sequence is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1511 +#: ../../reference/compound_stmts.rst:1512 msgid "a class that inherits from :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1512 +#: ../../reference/compound_stmts.rst:1513 msgid "" "a Python class that has been registered as :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1513 +#: ../../reference/compound_stmts.rst:1514 msgid "" "a builtin class that has its (CPython) :data:`Py_TPFLAGS_SEQUENCE` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1514 -#: ../../reference/compound_stmts.rst:1533 +#: ../../reference/compound_stmts.rst:1515 +#: ../../reference/compound_stmts.rst:1534 msgid "a class that inherits from any of the above" msgstr "" -#: ../../reference/compound_stmts.rst:1516 +#: ../../reference/compound_stmts.rst:1517 msgid "The following standard library classes are sequences:" msgstr "" -#: ../../reference/compound_stmts.rst:1518 +#: ../../reference/compound_stmts.rst:1519 msgid ":class:`array.array`" msgstr ":class:`array.array`" -#: ../../reference/compound_stmts.rst:1519 +#: ../../reference/compound_stmts.rst:1520 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../reference/compound_stmts.rst:1521 +#: ../../reference/compound_stmts.rst:1522 msgid ":class:`memoryview`" msgstr ":class:`memoryview`" -#: ../../reference/compound_stmts.rst:1522 +#: ../../reference/compound_stmts.rst:1523 msgid ":class:`range`" msgstr ":class:`range`" -#: ../../reference/compound_stmts.rst:1525 +#: ../../reference/compound_stmts.rst:1526 msgid "" "Subject values of type ``str``, ``bytes``, and ``bytearray`` do not match " "sequence patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1528 +#: ../../reference/compound_stmts.rst:1529 msgid "In pattern matching, a mapping is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1530 +#: ../../reference/compound_stmts.rst:1531 msgid "a class that inherits from :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1531 +#: ../../reference/compound_stmts.rst:1532 msgid "" "a Python class that has been registered as :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1532 +#: ../../reference/compound_stmts.rst:1533 msgid "" "a builtin class that has its (CPython) :data:`Py_TPFLAGS_MAPPING` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1535 +#: ../../reference/compound_stmts.rst:1536 msgid "" "The standard library classes :class:`dict` and :class:`types." "MappingProxyType` are mappings." msgstr "" -#: ../../reference/compound_stmts.rst:1538 +#: ../../reference/compound_stmts.rst:1539 msgid "" "A string literal appearing as the first statement in the function body is " "transformed into the function's ``__doc__`` attribute and therefore the " "function's :term:`docstring`." msgstr "" -#: ../../reference/compound_stmts.rst:1542 +#: ../../reference/compound_stmts.rst:1543 msgid "" "A string literal appearing as the first statement in the class body is " "transformed into the namespace's ``__doc__`` item and therefore the class's :" diff --git a/reference/executionmodel.po b/reference/executionmodel.po index 2f2bfaa5e6..065c83d9d5 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-26 09:04+0000\n" +"POT-Creation-Date: 2022-03-22 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -315,12 +315,12 @@ msgstr "" msgid "" "Exceptions are identified by class instances. The :keyword:`except` clause " "is selected depending on the class of the instance: it must reference the " -"class of the instance or a base class thereof. The instance can be received " -"by the handler and can carry additional information about the exceptional " -"condition." +"class of the instance or a :term:`non-virtual base class ` thereof. The instance can be received by the handler and can carry " +"additional information about the exceptional condition." msgstr "" -#: ../../reference/executionmodel.rst:267 +#: ../../reference/executionmodel.rst:268 msgid "" "Exception messages are not part of the Python API. Their contents may " "change from one version of Python to the next without warning and should not " @@ -328,17 +328,17 @@ msgid "" "interpreter." msgstr "" -#: ../../reference/executionmodel.rst:271 +#: ../../reference/executionmodel.rst:272 msgid "" "See also the description of the :keyword:`try` statement in section :ref:" "`try` and :keyword:`raise` statement in section :ref:`raise`." msgstr "" -#: ../../reference/executionmodel.rst:276 +#: ../../reference/executionmodel.rst:277 msgid "Footnotes" msgstr "註解" -#: ../../reference/executionmodel.rst:277 +#: ../../reference/executionmodel.rst:278 msgid "" "This limitation occurs because the code that is executed by these operations " "is not available at the time the module is compiled." From b8ebbfe203d3a6c6127ae4fc16e375420b49611e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Mar 2022 00:16:18 +0000 Subject: [PATCH 4/5] sync with cpython f163ad22 --- library/aifc.po | 78 ++++++++-------- library/audioop.po | 94 +++++++++---------- library/cgi.po | 182 +++++++++++++++++++------------------ library/cgitb.po | 24 ++--- library/chunk.po | 70 ++++++++------- library/crypt.po | 63 +++++++------ library/imghdr.po | 84 ++++++++--------- library/msilib.po | 194 +++++++++++++++++++-------------------- library/nis.po | 28 +++--- library/nntplib.po | 170 ++++++++++++++++++----------------- library/ossaudiodev.po | 199 +++++++++++++++++++++-------------------- library/pipes.po | 42 +++++---- library/sndhdr.po | 16 ++-- library/spwd.po | 90 ++++++++++--------- library/sunau.po | 143 +++++++++++++++-------------- library/telnetlib.po | 96 ++++++++++---------- library/uu.po | 28 +++--- library/xdrlib.po | 110 ++++++++++++----------- 18 files changed, 893 insertions(+), 818 deletions(-) diff --git a/library/aifc.po b/library/aifc.po index 546489e679..14cac5aafa 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-03-23 00:14+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-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" msgstr "" -#: ../../library/aifc.rst:7 +#: ../../library/aifc.rst:8 msgid "**Source code:** :source:`Lib/aifc.py`" msgstr "**原始碼:**\\ :source:`Lib/aifc.py`" #: ../../library/aifc.rst:16 +msgid "The :mod:`aifc` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/aifc.rst:21 msgid "" "This module provides support for reading and writing AIFF and AIFF-C files. " "AIFF is Audio Interchange File Format, a format for storing digital audio " @@ -34,7 +38,7 @@ msgid "" "the ability to compress the audio data." msgstr "" -#: ../../library/aifc.rst:21 +#: ../../library/aifc.rst:26 msgid "" "Audio files have a number of parameters that describe the audio data. The " "sampling rate or frame rate is the number of times per second the sound is " @@ -45,7 +49,7 @@ msgid "" "samplesize * framerate`` bytes." msgstr "" -#: ../../library/aifc.rst:29 +#: ../../library/aifc.rst:34 msgid "" "For example, CD quality audio has a sample size of two bytes (16 bits), uses " "two channels (stereo) and has a frame rate of 44,100 frames/second. This " @@ -53,11 +57,11 @@ msgid "" "2\\*2\\*44100 bytes (176,400 bytes)." msgstr "" -#: ../../library/aifc.rst:34 +#: ../../library/aifc.rst:39 msgid "Module :mod:`aifc` defines the following function:" msgstr ":mod:`aifc` 模組定義了以下函式:" -#: ../../library/aifc.rst:39 +#: ../../library/aifc.rst:44 msgid "" "Open an AIFF or AIFF-C file and return an object instance with methods that " "are described below. The argument *file* is either a string naming a file " @@ -71,53 +75,53 @@ msgid "" "keyword:`!with` block completes, the :meth:`~aifc.close` method is called." msgstr "" -#: ../../library/aifc.rst:50 +#: ../../library/aifc.rst:55 msgid "Support for the :keyword:`with` statement was added." msgstr "" -#: ../../library/aifc.rst:53 +#: ../../library/aifc.rst:58 msgid "" "Objects returned by :func:`.open` when a file is opened for reading have the " "following methods:" msgstr "" -#: ../../library/aifc.rst:59 +#: ../../library/aifc.rst:64 msgid "Return the number of audio channels (1 for mono, 2 for stereo)." msgstr "" -#: ../../library/aifc.rst:64 +#: ../../library/aifc.rst:69 msgid "Return the size in bytes of individual samples." msgstr "" -#: ../../library/aifc.rst:69 +#: ../../library/aifc.rst:74 msgid "Return the sampling rate (number of audio frames per second)." msgstr "" -#: ../../library/aifc.rst:74 +#: ../../library/aifc.rst:79 msgid "Return the number of audio frames in the file." msgstr "" -#: ../../library/aifc.rst:79 +#: ../../library/aifc.rst:84 msgid "" "Return a bytes array of length 4 describing the type of compression used in " "the audio file. For AIFF files, the returned value is ``b'NONE'``." msgstr "" -#: ../../library/aifc.rst:86 +#: ../../library/aifc.rst:91 msgid "" "Return a bytes array convertible to a human-readable description of the type " "of compression used in the audio file. For AIFF files, the returned value " "is ``b'not compressed'``." msgstr "" -#: ../../library/aifc.rst:93 +#: ../../library/aifc.rst:98 msgid "" "Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " "framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" "`get\\*` methods." msgstr "" -#: ../../library/aifc.rst:100 +#: ../../library/aifc.rst:105 msgid "" "Return a list of markers in the audio file. A marker consists of a tuple of " "three elements. The first is the mark ID (an integer), the second is the " @@ -125,40 +129,40 @@ msgid "" "third is the name of the mark (a string)." msgstr "" -#: ../../library/aifc.rst:108 +#: ../../library/aifc.rst:113 msgid "" "Return the tuple as described in :meth:`getmarkers` for the mark with the " "given *id*." msgstr "" -#: ../../library/aifc.rst:114 +#: ../../library/aifc.rst:119 msgid "" "Read and return the next *nframes* frames from the audio file. The returned " "data is a string containing for each frame the uncompressed samples of all " "channels." msgstr "" -#: ../../library/aifc.rst:121 +#: ../../library/aifc.rst:126 msgid "" "Rewind the read pointer. The next :meth:`readframes` will start from the " "beginning." msgstr "" -#: ../../library/aifc.rst:127 +#: ../../library/aifc.rst:132 msgid "Seek to the specified frame number." msgstr "" -#: ../../library/aifc.rst:132 +#: ../../library/aifc.rst:137 msgid "Return the current frame number." msgstr "" -#: ../../library/aifc.rst:137 +#: ../../library/aifc.rst:142 msgid "" "Close the AIFF file. After calling this method, the object can no longer be " "used." msgstr "" -#: ../../library/aifc.rst:140 +#: ../../library/aifc.rst:145 msgid "" "Objects returned by :func:`.open` when a file is opened for writing have all " "the above methods, except for :meth:`readframes` and :meth:`setpos`. In " @@ -168,40 +172,40 @@ msgid "" "parameters except for the number of frames must be filled in." msgstr "" -#: ../../library/aifc.rst:150 +#: ../../library/aifc.rst:155 msgid "" "Create an AIFF file. The default is that an AIFF-C file is created, unless " "the name of the file ends in ``'.aiff'`` in which case the default is an " "AIFF file." msgstr "" -#: ../../library/aifc.rst:156 +#: ../../library/aifc.rst:161 msgid "" "Create an AIFF-C file. The default is that an AIFF-C file is created, " "unless the name of the file ends in ``'.aiff'`` in which case the default is " "an AIFF file." msgstr "" -#: ../../library/aifc.rst:163 +#: ../../library/aifc.rst:168 msgid "Specify the number of channels in the audio file." msgstr "" -#: ../../library/aifc.rst:168 +#: ../../library/aifc.rst:173 msgid "Specify the size in bytes of audio samples." msgstr "" -#: ../../library/aifc.rst:173 +#: ../../library/aifc.rst:178 msgid "Specify the sampling frequency in frames per second." msgstr "" -#: ../../library/aifc.rst:178 +#: ../../library/aifc.rst:183 msgid "" "Specify the number of frames that are to be written to the audio file. If " "this parameter is not set, or not set correctly, the file needs to support " "seeking." msgstr "" -#: ../../library/aifc.rst:189 +#: ../../library/aifc.rst:194 msgid "" "Specify the compression type. If not specified, the audio data will not be " "compressed. In AIFF files, compression is not possible. The name parameter " @@ -211,42 +215,42 @@ msgid "" "``b'ALAW'``, ``b'G722'``." msgstr "" -#: ../../library/aifc.rst:199 +#: ../../library/aifc.rst:204 msgid "" "Set all the above parameters at once. The argument is a tuple consisting of " "the various parameters. This means that it is possible to use the result of " "a :meth:`getparams` call as argument to :meth:`setparams`." msgstr "" -#: ../../library/aifc.rst:206 +#: ../../library/aifc.rst:211 msgid "" "Add a mark with the given id (larger than 0), and the given name at the " "given position. This method can be called at any time before :meth:`close`." msgstr "" -#: ../../library/aifc.rst:213 +#: ../../library/aifc.rst:218 msgid "" "Return the current write position in the output file. Useful in combination " "with :meth:`setmark`." msgstr "" -#: ../../library/aifc.rst:219 +#: ../../library/aifc.rst:224 msgid "" "Write data to the output file. This method can only be called after the " "audio file parameters have been set." msgstr "" -#: ../../library/aifc.rst:222 ../../library/aifc.rst:231 +#: ../../library/aifc.rst:227 ../../library/aifc.rst:236 msgid "Any :term:`bytes-like object` is now accepted." msgstr "" -#: ../../library/aifc.rst:228 +#: ../../library/aifc.rst:233 msgid "" "Like :meth:`writeframes`, except that the header of the audio file is not " "updated." msgstr "" -#: ../../library/aifc.rst:238 +#: ../../library/aifc.rst:243 msgid "" "Close the AIFF file. The header of the file is updated to reflect the " "actual size of the audio data. After calling this method, the object can no " diff --git a/library/audioop.po b/library/audioop.po index 0ef342e96c..da95d502df 100644 --- a/library/audioop.po +++ b/library/audioop.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-03-23 00:14+0000\n" "PO-Revision-Date: 2016-11-19 00:28+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,7 +22,11 @@ msgstr "" msgid ":mod:`audioop` --- Manipulate raw audio data" msgstr "" -#: ../../library/audioop.rst:9 +#: ../../library/audioop.rst:8 +msgid "The :mod:`audioop` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/audioop.rst:13 msgid "" "The :mod:`audioop` module contains some useful operations on sound " "fragments. It operates on sound fragments consisting of signed integer " @@ -31,34 +35,34 @@ msgid "" "otherwise." msgstr "" -#: ../../library/audioop.rst:14 +#: ../../library/audioop.rst:18 msgid "" "Support for 24-bit samples was added. All functions now accept any :term:" "`bytes-like object`. String input now results in an immediate error." msgstr "" -#: ../../library/audioop.rst:25 +#: ../../library/audioop.rst:29 msgid "" "This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings." msgstr "" -#: ../../library/audioop.rst:29 +#: ../../library/audioop.rst:33 msgid "" "A few of the more complicated operations only take 16-bit samples, otherwise " "the sample size (in bytes) is always a parameter of the operation." msgstr "" -#: ../../library/audioop.rst:32 +#: ../../library/audioop.rst:36 msgid "The module defines the following variables and functions:" msgstr "" -#: ../../library/audioop.rst:37 +#: ../../library/audioop.rst:41 msgid "" "This exception is raised on all errors, such as unknown number of bytes per " "sample, etc." msgstr "" -#: ../../library/audioop.rst:43 +#: ../../library/audioop.rst:47 msgid "" "Return a fragment which is the addition of the two samples passed as " "parameters. *width* is the sample width in bytes, either ``1``, ``2``, ``3`` " @@ -66,48 +70,48 @@ msgid "" "truncated in case of overflow." msgstr "" -#: ../../library/audioop.rst:50 +#: ../../library/audioop.rst:54 msgid "" "Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See the " "description of :func:`lin2adpcm` for details on ADPCM coding. Return a tuple " "``(sample, newstate)`` where the sample has the width specified in *width*." msgstr "" -#: ../../library/audioop.rst:57 +#: ../../library/audioop.rst:61 msgid "" "Convert sound fragments in a-LAW encoding to linearly encoded sound " "fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: ../../library/audioop.rst:64 +#: ../../library/audioop.rst:68 msgid "Return the average over all samples in the fragment." msgstr "" -#: ../../library/audioop.rst:69 +#: ../../library/audioop.rst:73 msgid "" "Return the average peak-peak value over all samples in the fragment. No " "filtering is done, so the usefulness of this routine is questionable." msgstr "" -#: ../../library/audioop.rst:75 +#: ../../library/audioop.rst:79 msgid "" "Return a fragment that is the original fragment with a bias added to each " "sample. Samples wrap around in case of overflow." msgstr "" -#: ../../library/audioop.rst:81 +#: ../../library/audioop.rst:85 msgid "" "\"Byteswap\" all samples in a fragment and returns the modified fragment. " "Converts big-endian samples to little-endian and vice versa." msgstr "" -#: ../../library/audioop.rst:89 +#: ../../library/audioop.rst:93 msgid "" "Return the number of zero crossings in the fragment passed as an argument." msgstr "" -#: ../../library/audioop.rst:94 +#: ../../library/audioop.rst:98 msgid "" "Return a factor *F* such that ``rms(add(fragment, mul(reference, -F)))`` is " "minimal, i.e., return the factor with which you should multiply *reference* " @@ -115,11 +119,11 @@ msgid "" "both contain 2-byte samples." msgstr "" -#: ../../library/audioop.rst:99 +#: ../../library/audioop.rst:103 msgid "The time taken by this routine is proportional to ``len(fragment)``." msgstr "" -#: ../../library/audioop.rst:104 +#: ../../library/audioop.rst:108 msgid "" "Try to match *reference* as well as possible to a portion of *fragment* " "(which should be the longer fragment). This is (conceptually) done by " @@ -130,22 +134,22 @@ msgid "" "*factor* is the (floating-point) factor as per :func:`findfactor`." msgstr "" -#: ../../library/audioop.rst:115 +#: ../../library/audioop.rst:119 msgid "" "Search *fragment* for a slice of length *length* samples (not bytes!) with " "maximum energy, i.e., return *i* for which ``rms(fragment[i*2:(i" "+length)*2])`` is maximal. The fragments should both contain 2-byte samples." msgstr "" -#: ../../library/audioop.rst:119 +#: ../../library/audioop.rst:123 msgid "The routine takes time proportional to ``len(fragment)``." msgstr "" -#: ../../library/audioop.rst:124 +#: ../../library/audioop.rst:128 msgid "Return the value of sample *index* from the fragment." msgstr "" -#: ../../library/audioop.rst:129 +#: ../../library/audioop.rst:133 msgid "" "Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an " "adaptive coding scheme, whereby each 4 bit number is the difference between " @@ -154,7 +158,7 @@ msgid "" "standard." msgstr "" -#: ../../library/audioop.rst:134 +#: ../../library/audioop.rst:138 msgid "" "*state* is a tuple containing the state of the coder. The coder returns a " "tuple ``(adpcmfrag, newstate)``, and the *newstate* should be passed to the " @@ -163,7 +167,7 @@ msgid "" "per byte." msgstr "" -#: ../../library/audioop.rst:142 +#: ../../library/audioop.rst:146 msgid "" "Convert samples in the audio fragment to a-LAW encoding and return this as a " "bytes object. a-LAW is an audio encoding format whereby you get a dynamic " @@ -171,24 +175,24 @@ msgid "" "audio hardware, among others." msgstr "" -#: ../../library/audioop.rst:150 +#: ../../library/audioop.rst:154 msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." msgstr "" -#: ../../library/audioop.rst:154 +#: ../../library/audioop.rst:158 msgid "" "In some audio formats, such as .WAV files, 16, 24 and 32 bit samples are " "signed, but 8 bit samples are unsigned. So when converting to 8 bit wide " "samples for these formats, you need to also add 128 to the result::" msgstr "" -#: ../../library/audioop.rst:161 +#: ../../library/audioop.rst:165 msgid "" "The same, in reverse, has to be applied when converting from 8 to 16, 24 or " "32 bit width samples." msgstr "" -#: ../../library/audioop.rst:167 +#: ../../library/audioop.rst:171 msgid "" "Convert samples in the audio fragment to u-LAW encoding and return this as a " "bytes object. u-LAW is an audio encoding format whereby you get a dynamic " @@ -196,33 +200,33 @@ msgid "" "audio hardware, among others." msgstr "" -#: ../../library/audioop.rst:175 +#: ../../library/audioop.rst:179 msgid "" "Return the maximum of the *absolute value* of all samples in a fragment." msgstr "" -#: ../../library/audioop.rst:180 +#: ../../library/audioop.rst:184 msgid "Return the maximum peak-peak value in the sound fragment." msgstr "" -#: ../../library/audioop.rst:185 +#: ../../library/audioop.rst:189 msgid "" "Return a tuple consisting of the minimum and maximum values of all samples " "in the sound fragment." msgstr "" -#: ../../library/audioop.rst:191 +#: ../../library/audioop.rst:195 msgid "" "Return a fragment that has all samples in the original fragment multiplied " "by the floating-point value *factor*. Samples are truncated in case of " "overflow." msgstr "" -#: ../../library/audioop.rst:197 +#: ../../library/audioop.rst:201 msgid "Convert the frame rate of the input fragment." msgstr "" -#: ../../library/audioop.rst:199 +#: ../../library/audioop.rst:203 msgid "" "*state* is a tuple containing the state of the converter. The converter " "returns a tuple ``(newfragment, newstate)``, and *newstate* should be passed " @@ -230,47 +234,47 @@ msgid "" "as the state." msgstr "" -#: ../../library/audioop.rst:203 +#: ../../library/audioop.rst:207 msgid "" "The *weightA* and *weightB* arguments are parameters for a simple digital " "filter and default to ``1`` and ``0`` respectively." msgstr "" -#: ../../library/audioop.rst:209 +#: ../../library/audioop.rst:213 msgid "Reverse the samples in a fragment and returns the modified fragment." msgstr "" -#: ../../library/audioop.rst:214 +#: ../../library/audioop.rst:218 msgid "" "Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``." msgstr "" -#: ../../library/audioop.rst:216 +#: ../../library/audioop.rst:220 msgid "This is a measure of the power in an audio signal." msgstr "" -#: ../../library/audioop.rst:221 +#: ../../library/audioop.rst:225 msgid "" "Convert a stereo fragment to a mono fragment. The left channel is " "multiplied by *lfactor* and the right channel by *rfactor* before adding the " "two channels to give a mono signal." msgstr "" -#: ../../library/audioop.rst:228 +#: ../../library/audioop.rst:232 msgid "" "Generate a stereo fragment from a mono fragment. Each pair of samples in " "the stereo fragment are computed from the mono sample, whereby left channel " "samples are multiplied by *lfactor* and right channel samples by *rfactor*." msgstr "" -#: ../../library/audioop.rst:235 +#: ../../library/audioop.rst:239 msgid "" "Convert sound fragments in u-LAW encoding to linearly encoded sound " "fragments. u-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: ../../library/audioop.rst:239 +#: ../../library/audioop.rst:243 msgid "" "Note that operations such as :func:`.mul` or :func:`.max` make no " "distinction between mono and stereo fragments, i.e. all samples are treated " @@ -279,7 +283,7 @@ msgid "" "that::" msgstr "" -#: ../../library/audioop.rst:253 +#: ../../library/audioop.rst:257 msgid "" "If you use the ADPCM coder to build network packets and you want your " "protocol to be stateless (i.e. to be able to tolerate packet loss) you " @@ -291,14 +295,14 @@ msgid "" "index) in 8." msgstr "" -#: ../../library/audioop.rst:261 +#: ../../library/audioop.rst:265 msgid "" "The ADPCM coders have never been tried against other ADPCM coders, only " "against themselves. It could well be that I misinterpreted the standards in " "which case they will not be interoperable with the respective standards." msgstr "" -#: ../../library/audioop.rst:265 +#: ../../library/audioop.rst:269 msgid "" "The :func:`find\\*` routines might look a bit funny at first sight. They are " "primarily meant to do echo cancellation. A reasonably fast way to do this " diff --git a/library/cgi.po b/library/cgi.po index d6dc84e268..aa8a0532d6 100644 --- a/library/cgi.po +++ b/library/cgi.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-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,31 +22,35 @@ msgstr "" msgid ":mod:`cgi` --- Common Gateway Interface support" msgstr "" -#: ../../library/cgi.rst:7 +#: ../../library/cgi.rst:8 msgid "**Source code:** :source:`Lib/cgi.py`" msgstr "**原始碼:**\\ :source:`Lib/cgi.py`" -#: ../../library/cgi.rst:19 +#: ../../library/cgi.rst:18 +msgid "The :mod:`cgi` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/cgi.rst:23 msgid "Support module for Common Gateway Interface (CGI) scripts." msgstr "" -#: ../../library/cgi.rst:21 +#: ../../library/cgi.rst:25 msgid "" "This module defines a number of utilities for use by CGI scripts written in " "Python." msgstr "" -#: ../../library/cgi.rst:26 +#: ../../library/cgi.rst:30 msgid "Introduction" msgstr "簡介" -#: ../../library/cgi.rst:30 +#: ../../library/cgi.rst:34 msgid "" "A CGI script is invoked by an HTTP server, usually to process user input " "submitted through an HTML ``
`` or ```` element." msgstr "" -#: ../../library/cgi.rst:33 +#: ../../library/cgi.rst:37 msgid "" "Most often, CGI scripts live in the server's special :file:`cgi-bin` " "directory. The HTTP server places all sorts of information about the request " @@ -55,7 +59,7 @@ msgid "" "script, and sends the script's output back to the client." msgstr "" -#: ../../library/cgi.rst:39 +#: ../../library/cgi.rst:43 msgid "" "The script's input is connected to the client too, and sometimes the form " "data is read this way; at other times the form data is passed via the " @@ -66,7 +70,7 @@ msgid "" "supports it)." msgstr "" -#: ../../library/cgi.rst:46 +#: ../../library/cgi.rst:50 msgid "" "The output of a CGI script should consist of two sections, separated by a " "blank line. The first section contains a number of headers, telling the " @@ -74,26 +78,26 @@ msgid "" "header section looks like this::" msgstr "" -#: ../../library/cgi.rst:54 +#: ../../library/cgi.rst:58 msgid "" "The second section is usually HTML, which allows the client software to " "display nicely formatted text with header, in-line images, etc. Here's " "Python code that prints a simple piece of HTML::" msgstr "" -#: ../../library/cgi.rst:66 +#: ../../library/cgi.rst:70 msgid "Using the cgi module" msgstr "" -#: ../../library/cgi.rst:68 +#: ../../library/cgi.rst:72 msgid "Begin by writing ``import cgi``." msgstr "" -#: ../../library/cgi.rst:70 +#: ../../library/cgi.rst:74 msgid "When you write a new script, consider adding these lines::" msgstr "" -#: ../../library/cgi.rst:75 +#: ../../library/cgi.rst:79 msgid "" "This activates a special exception handler that will display detailed " "reports in the web browser if any errors occur. If you'd rather not show " @@ -101,7 +105,7 @@ msgid "" "saved to files instead, with code like this::" msgstr "" -#: ../../library/cgi.rst:83 +#: ../../library/cgi.rst:87 msgid "" "It's very helpful to use this feature during script development. The reports " "produced by :mod:`cgitb` provide information that can save you a lot of time " @@ -109,7 +113,7 @@ msgid "" "you have tested your script and are confident that it works correctly." msgstr "" -#: ../../library/cgi.rst:88 +#: ../../library/cgi.rst:92 msgid "" "To get at submitted form data, use the :class:`FieldStorage` class. If the " "form contains non-ASCII characters, use the *encoding* keyword parameter set " @@ -121,7 +125,7 @@ msgid "" "consume standard input, it should be instantiated only once." msgstr "" -#: ../../library/cgi.rst:97 +#: ../../library/cgi.rst:101 msgid "" "The :class:`FieldStorage` instance can be indexed like a Python dictionary. " "It allows membership testing with the :keyword:`in` operator, and also " @@ -132,14 +136,14 @@ msgid "" "class:`FieldStorage` instance." msgstr "" -#: ../../library/cgi.rst:105 +#: ../../library/cgi.rst:109 msgid "" "For instance, the following code (which assumes that the :mailheader:" "`Content-Type` header and blank line have already been printed) checks that " "the fields ``name`` and ``addr`` are both set to a non-empty string::" msgstr "" -#: ../../library/cgi.rst:119 +#: ../../library/cgi.rst:123 msgid "" "Here the fields, accessed through ``form[key]``, are themselves instances " "of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " @@ -149,7 +153,7 @@ msgid "" "second argument as a default to return if the requested key is not present." msgstr "" -#: ../../library/cgi.rst:126 +#: ../../library/cgi.rst:130 msgid "" "If the submitted form data contains more than one field with the same name, " "the object retrieved by ``form[key]`` is not a :class:`FieldStorage` or :" @@ -162,7 +166,7 @@ msgid "" "username fields, separated by commas::" msgstr "" -#: ../../library/cgi.rst:139 +#: ../../library/cgi.rst:143 msgid "" "If a field represents an uploaded file, accessing the value via the :attr:" "`~FieldStorage.value` attribute or the :meth:`~FieldStorage.getvalue` method " @@ -175,13 +179,13 @@ msgid "" "IOBase.readline` methods will return bytes)::" msgstr "" -#: ../../library/cgi.rst:159 +#: ../../library/cgi.rst:163 msgid "" ":class:`FieldStorage` objects also support being used in a :keyword:`with` " "statement, which will automatically close them when done." msgstr "" -#: ../../library/cgi.rst:162 +#: ../../library/cgi.rst:166 msgid "" "If an error is encountered when obtaining the contents of an uploaded file " "(for example, when the user interrupts the form submission by clicking on a " @@ -189,7 +193,7 @@ msgid "" "object for the field will be set to the value -1." msgstr "" -#: ../../library/cgi.rst:167 +#: ../../library/cgi.rst:171 msgid "" "The file upload draft standard entertains the possibility of uploading " "multiple files from one field (using a recursive :mimetype:`multipart/\\*` " @@ -200,7 +204,7 @@ msgid "" "be iterated over recursively just like the top-level form object." msgstr "" -#: ../../library/cgi.rst:175 +#: ../../library/cgi.rst:179 msgid "" "When a form is submitted in the \"old\" format (as the query string or as a " "single data part of type :mimetype:`application/x-www-form-urlencoded`), the " @@ -209,29 +213,29 @@ msgid "" "are always ``None``." msgstr "" -#: ../../library/cgi.rst:180 +#: ../../library/cgi.rst:184 msgid "" "A form submitted via POST that also has a query string will contain both :" "class:`FieldStorage` and :class:`MiniFieldStorage` items." msgstr "" -#: ../../library/cgi.rst:183 +#: ../../library/cgi.rst:187 msgid "" "The :attr:`~FieldStorage.file` attribute is automatically closed upon the " "garbage collection of the creating :class:`FieldStorage` instance." msgstr "" -#: ../../library/cgi.rst:187 +#: ../../library/cgi.rst:191 msgid "" "Added support for the context management protocol to the :class:" "`FieldStorage` class." msgstr "" -#: ../../library/cgi.rst:193 +#: ../../library/cgi.rst:197 msgid "Higher Level Interface" msgstr "" -#: ../../library/cgi.rst:195 +#: ../../library/cgi.rst:199 msgid "" "The previous section explains how to read CGI form data using the :class:" "`FieldStorage` class. This section describes a higher level interface which " @@ -241,33 +245,33 @@ msgid "" "efficiently, for example." msgstr "" -#: ../../library/cgi.rst:204 +#: ../../library/cgi.rst:208 msgid "" "The interface consists of two simple methods. Using the methods you can " "process form data in a generic way, without the need to worry whether only " "one or more values were posted under one name." msgstr "" -#: ../../library/cgi.rst:208 +#: ../../library/cgi.rst:212 msgid "" "In the previous section, you learned to write following code anytime you " "expected a user to post more than one value under one name::" msgstr "" -#: ../../library/cgi.rst:217 +#: ../../library/cgi.rst:221 msgid "" "This situation is common for example when a form contains a group of " "multiple checkboxes with the same name::" msgstr "" -#: ../../library/cgi.rst:223 +#: ../../library/cgi.rst:227 msgid "" "In most situations, however, there's only one form control with a particular " "name in a form and then you expect and need only one value associated with " "this name. So you write a script containing for example this code::" msgstr "" -#: ../../library/cgi.rst:229 +#: ../../library/cgi.rst:233 msgid "" "The problem with the code is that you should never expect that a client will " "provide valid input to your scripts. For example, if a curious user appends " @@ -278,21 +282,21 @@ msgid "" "an :exc:`AttributeError` exception." msgstr "" -#: ../../library/cgi.rst:237 +#: ../../library/cgi.rst:241 msgid "" "Therefore, the appropriate way to read form data values was to always use " "the code which checks whether the obtained value is a single value or a list " "of values. That's annoying and leads to less readable scripts." msgstr "" -#: ../../library/cgi.rst:241 +#: ../../library/cgi.rst:245 msgid "" "A more convenient approach is to use the methods :meth:`~FieldStorage." "getfirst` and :meth:`~FieldStorage.getlist` provided by this higher level " "interface." msgstr "" -#: ../../library/cgi.rst:247 +#: ../../library/cgi.rst:251 msgid "" "This method always returns only one value associated with form field *name*. " "The method returns only the first value in case that more values were posted " @@ -303,7 +307,7 @@ msgid "" "defaults to ``None`` if not specified." msgstr "" -#: ../../library/cgi.rst:258 +#: ../../library/cgi.rst:262 msgid "" "This method always returns a list of values associated with form field " "*name*. The method returns an empty list if no such form field or value " @@ -311,28 +315,28 @@ msgid "" "such value exists." msgstr "" -#: ../../library/cgi.rst:262 +#: ../../library/cgi.rst:266 msgid "Using these methods you can write nice compact code::" msgstr "" -#: ../../library/cgi.rst:274 +#: ../../library/cgi.rst:278 msgid "Functions" msgstr "函式" -#: ../../library/cgi.rst:276 +#: ../../library/cgi.rst:280 msgid "" "These are useful if you want more control, or if you want to employ some of " "the algorithms implemented in this module in other circumstances." msgstr "" -#: ../../library/cgi.rst:282 +#: ../../library/cgi.rst:286 msgid "" "Parse a query in the environment or from a file (the file defaults to ``sys." "stdin``). The *keep_blank_values*, *strict_parsing* and *separator* " "parameters are passed to :func:`urllib.parse.parse_qs` unchanged." msgstr "" -#: ../../library/cgi.rst:289 +#: ../../library/cgi.rst:293 msgid "" "Parse input of type :mimetype:`multipart/form-data` (for file uploads). " "Arguments are *fp* for the input file, *pdict* for a dictionary containing " @@ -340,63 +344,63 @@ msgid "" "the request encoding." msgstr "" -#: ../../library/cgi.rst:294 +#: ../../library/cgi.rst:298 msgid "" "Returns a dictionary just like :func:`urllib.parse.parse_qs`: keys are the " "field names, each value is a list of values for that field. For non-file " "fields, the value is a list of strings." msgstr "" -#: ../../library/cgi.rst:298 +#: ../../library/cgi.rst:302 msgid "" "This is easy to use but not much good if you are expecting megabytes to be " "uploaded --- in that case, use the :class:`FieldStorage` class instead which " "is much more flexible." msgstr "" -#: ../../library/cgi.rst:302 +#: ../../library/cgi.rst:306 msgid "" "Added the *encoding* and *errors* parameters. For non-file fields, the " "value is now a list of strings, not bytes." msgstr "" -#: ../../library/cgi.rst:306 +#: ../../library/cgi.rst:310 msgid "Added the *separator* parameter." msgstr "新增 *separator* 參數。" -#: ../../library/cgi.rst:312 +#: ../../library/cgi.rst:316 msgid "" "Parse a MIME header (such as :mailheader:`Content-Type`) into a main value " "and a dictionary of parameters." msgstr "" -#: ../../library/cgi.rst:318 +#: ../../library/cgi.rst:322 msgid "" "Robust test CGI script, usable as main program. Writes minimal HTTP headers " "and formats all information provided to the script in HTML format." msgstr "" -#: ../../library/cgi.rst:324 +#: ../../library/cgi.rst:328 msgid "Format the shell environment in HTML." msgstr "" -#: ../../library/cgi.rst:329 +#: ../../library/cgi.rst:333 msgid "Format a form in HTML." msgstr "" -#: ../../library/cgi.rst:334 +#: ../../library/cgi.rst:338 msgid "Format the current directory in HTML." msgstr "" -#: ../../library/cgi.rst:339 +#: ../../library/cgi.rst:343 msgid "Print a list of useful (used by CGI) environment variables in HTML." msgstr "" -#: ../../library/cgi.rst:345 +#: ../../library/cgi.rst:349 msgid "Caring about security" msgstr "" -#: ../../library/cgi.rst:349 +#: ../../library/cgi.rst:353 msgid "" "There's one important rule: if you invoke an external program (via :func:`os." "system`, :func:`os.popen` or other functions with similar functionality), " @@ -407,25 +411,25 @@ msgid "" "since the request doesn't have to come from your form!" msgstr "" -#: ../../library/cgi.rst:357 +#: ../../library/cgi.rst:361 msgid "" "To be on the safe side, if you must pass a string gotten from a form to a " "shell command, you should make sure the string contains only alphanumeric " "characters, dashes, underscores, and periods." msgstr "" -#: ../../library/cgi.rst:363 +#: ../../library/cgi.rst:367 msgid "Installing your CGI script on a Unix system" msgstr "" -#: ../../library/cgi.rst:365 +#: ../../library/cgi.rst:369 msgid "" "Read the documentation for your HTTP server and check with your local system " "administrator to find the directory where CGI scripts should be installed; " "usually this is in a directory :file:`cgi-bin` in the server tree." msgstr "" -#: ../../library/cgi.rst:369 +#: ../../library/cgi.rst:373 msgid "" "Make sure that your script is readable and executable by \"others\"; the " "Unix file mode should be ``0o755`` octal (use ``chmod 0755 filename``). " @@ -433,12 +437,12 @@ msgid "" "column 1 followed by the pathname of the Python interpreter, for instance::" msgstr "" -#: ../../library/cgi.rst:376 +#: ../../library/cgi.rst:380 msgid "" "Make sure the Python interpreter exists and is executable by \"others\"." msgstr "" -#: ../../library/cgi.rst:378 +#: ../../library/cgi.rst:382 msgid "" "Make sure that any files your script needs to read or write are readable or " "writable, respectively, by \"others\" --- their mode should be ``0o644`` for " @@ -453,28 +457,28 @@ msgid "" "anything interesting." msgstr "" -#: ../../library/cgi.rst:389 +#: ../../library/cgi.rst:393 msgid "" "If you need to load modules from a directory which is not on Python's " "default module search path, you can change the path in your script, before " "importing other modules. For example::" msgstr "" -#: ../../library/cgi.rst:397 +#: ../../library/cgi.rst:401 msgid "(This way, the directory inserted last will be searched first!)" msgstr "" -#: ../../library/cgi.rst:399 +#: ../../library/cgi.rst:403 msgid "" "Instructions for non-Unix systems will vary; check your HTTP server's " "documentation (it will usually have a section on CGI scripts)." msgstr "" -#: ../../library/cgi.rst:404 +#: ../../library/cgi.rst:408 msgid "Testing your CGI script" msgstr "" -#: ../../library/cgi.rst:406 +#: ../../library/cgi.rst:410 msgid "" "Unfortunately, a CGI script will generally not run when you try it from the " "command line, and a script that works perfectly from the command line may " @@ -484,17 +488,17 @@ msgid "" "will most likely send a cryptic error to the client." msgstr "" -#: ../../library/cgi.rst:413 +#: ../../library/cgi.rst:417 msgid "" "Assuming your script has no syntax errors, yet it does not work, you have no " "choice but to read the next section." msgstr "" -#: ../../library/cgi.rst:418 +#: ../../library/cgi.rst:422 msgid "Debugging CGI scripts" msgstr "" -#: ../../library/cgi.rst:422 +#: ../../library/cgi.rst:426 msgid "" "First of all, check for trivial installation errors --- reading the section " "above on installing your CGI script carefully can save you a lot of time. " @@ -507,7 +511,7 @@ msgid "" "your browser of the form:" msgstr "" -#: ../../library/cgi.rst:435 +#: ../../library/cgi.rst:439 msgid "" "If this gives an error of type 404, the server cannot find the script -- " "perhaps you need to install it in a different directory. If it gives " @@ -519,19 +523,19 @@ msgid "" "same procedure for your own script, you should now be able to debug it." msgstr "" -#: ../../library/cgi.rst:444 +#: ../../library/cgi.rst:448 msgid "" "The next step could be to call the :mod:`cgi` module's :func:`test` function " "from your script: replace its main code with the single statement ::" msgstr "" -#: ../../library/cgi.rst:449 +#: ../../library/cgi.rst:453 msgid "" "This should produce the same results as those gotten from installing the :" "file:`cgi.py` file itself." msgstr "" -#: ../../library/cgi.rst:452 +#: ../../library/cgi.rst:456 msgid "" "When an ordinary Python script raises an unhandled exception (for whatever " "reason: of a typo in a module name, a file that can't be opened, etc.), the " @@ -541,28 +545,28 @@ msgid "" "or be discarded altogether." msgstr "" -#: ../../library/cgi.rst:459 +#: ../../library/cgi.rst:463 msgid "" "Fortunately, once you have managed to get your script to execute *some* " "code, you can easily send tracebacks to the web browser using the :mod:" "`cgitb` module. If you haven't done so already, just add the lines::" msgstr "" -#: ../../library/cgi.rst:466 +#: ../../library/cgi.rst:470 msgid "" "to the top of your script. Then try running it again; when a problem " "occurs, you should see a detailed report that will likely make apparent the " "cause of the crash." msgstr "" -#: ../../library/cgi.rst:470 +#: ../../library/cgi.rst:474 msgid "" "If you suspect that there may be a problem in importing the :mod:`cgitb` " "module, you can use an even more robust approach (which only uses built-in " "modules)::" msgstr "" -#: ../../library/cgi.rst:479 +#: ../../library/cgi.rst:483 msgid "" "This relies on the Python interpreter to print the traceback. The content " "type of the output is set to plain text, which disables all HTML " @@ -572,47 +576,47 @@ msgid "" "interpretation is going on, the traceback will be readable." msgstr "" -#: ../../library/cgi.rst:488 +#: ../../library/cgi.rst:492 msgid "Common problems and solutions" msgstr "" -#: ../../library/cgi.rst:490 +#: ../../library/cgi.rst:494 msgid "" "Most HTTP servers buffer the output from CGI scripts until the script is " "completed. This means that it is not possible to display a progress report " "on the client's display while the script is running." msgstr "" -#: ../../library/cgi.rst:494 +#: ../../library/cgi.rst:498 msgid "Check the installation instructions above." msgstr "" -#: ../../library/cgi.rst:496 +#: ../../library/cgi.rst:500 msgid "" "Check the HTTP server's log files. (``tail -f logfile`` in a separate " "window may be useful!)" msgstr "" -#: ../../library/cgi.rst:499 +#: ../../library/cgi.rst:503 msgid "" "Always check a script for syntax errors first, by doing something like " "``python script.py``." msgstr "" -#: ../../library/cgi.rst:502 +#: ../../library/cgi.rst:506 msgid "" "If your script does not have any syntax errors, try adding ``import cgitb; " "cgitb.enable()`` to the top of the script." msgstr "" -#: ../../library/cgi.rst:505 +#: ../../library/cgi.rst:509 msgid "" "When invoking external programs, make sure they can be found. Usually, this " "means using absolute path names --- :envvar:`PATH` is usually not set to a " "very useful value in a CGI script." msgstr "" -#: ../../library/cgi.rst:509 +#: ../../library/cgi.rst:513 msgid "" "When reading or writing external files, make sure they can be read or " "written by the userid under which your CGI script will be running: this is " @@ -620,17 +624,17 @@ msgid "" "explicitly specified userid for a web server's ``suexec`` feature." msgstr "" -#: ../../library/cgi.rst:514 +#: ../../library/cgi.rst:518 msgid "" "Don't try to give a CGI script a set-uid mode. This doesn't work on most " "systems, and is a security liability as well." msgstr "" -#: ../../library/cgi.rst:518 +#: ../../library/cgi.rst:522 msgid "Footnotes" msgstr "註解" -#: ../../library/cgi.rst:519 +#: ../../library/cgi.rst:523 msgid "" "Note that some recent versions of the HTML specification do state what order " "the field values should be supplied in, but knowing whether a request was " diff --git a/library/cgitb.po b/library/cgitb.po index 3a8518ca32..b07a62d97a 100644 --- a/library/cgitb.po +++ b/library/cgitb.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-03-23 00:14+0000\n" "PO-Revision-Date: 2016-11-19 00:28+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" msgstr "" -#: ../../library/cgitb.rst:10 +#: ../../library/cgitb.rst:11 msgid "**Source code:** :source:`Lib/cgitb.py`" msgstr "**原始碼:**\\ :source:`Lib/cgitb.py`" -#: ../../library/cgitb.rst:20 +#: ../../library/cgitb.rst:19 +msgid "The :mod:`cgitb` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/cgitb.rst:24 msgid "" "The :mod:`cgitb` module provides a special exception handler for Python " "scripts. (Its name is a bit misleading. It was originally designed to " @@ -40,25 +44,25 @@ msgid "" "instead of sending it to the browser." msgstr "" -#: ../../library/cgitb.rst:30 +#: ../../library/cgitb.rst:34 msgid "To enable this feature, simply add this to the top of your CGI script::" msgstr "" -#: ../../library/cgitb.rst:35 +#: ../../library/cgitb.rst:39 msgid "" "The options to the :func:`enable` function control whether the report is " "displayed in the browser and whether the report is logged to a file for " "later analysis." msgstr "" -#: ../../library/cgitb.rst:44 +#: ../../library/cgitb.rst:48 msgid "" "This function causes the :mod:`cgitb` module to take over the interpreter's " "default handling for exceptions by setting the value of :attr:`sys." "excepthook`." msgstr "" -#: ../../library/cgitb.rst:47 +#: ../../library/cgitb.rst:51 msgid "" "The optional argument *display* defaults to ``1`` and can be set to ``0`` to " "suppress sending the traceback to the browser. If the argument *logdir* is " @@ -71,7 +75,7 @@ msgid "" "\"html\"``." msgstr "" -#: ../../library/cgitb.rst:59 +#: ../../library/cgitb.rst:63 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -80,7 +84,7 @@ msgid "" "source code in the traceback; this defaults to ``5``." msgstr "" -#: ../../library/cgitb.rst:68 +#: ../../library/cgitb.rst:72 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -89,7 +93,7 @@ msgid "" "source code in the traceback; this defaults to ``5``." msgstr "" -#: ../../library/cgitb.rst:77 +#: ../../library/cgitb.rst:81 msgid "" "This function handles an exception using the default settings (that is, show " "a report in the browser, but don't log to a file). This can be used when " diff --git a/library/chunk.po b/library/chunk.po index 38514a0ee5..f284a44121 100644 --- a/library/chunk.po +++ b/library/chunk.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-03-23 00:14+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`chunk` --- Read IFF chunked data" msgstr "" -#: ../../library/chunk.rst:10 +#: ../../library/chunk.rst:11 msgid "**Source code:** :source:`Lib/chunk.py`" msgstr "**原始碼:**\\ :source:`Lib/chunk.py`" -#: ../../library/chunk.rst:21 +#: ../../library/chunk.rst:20 +msgid "The :mod:`chunk` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/chunk.rst:25 msgid "" "This module provides an interface for reading files that use EA IFF 85 " "chunks. [#]_ This format is used in at least the Audio Interchange File " @@ -34,73 +38,73 @@ msgid "" "file format is closely related and can also be read using this module." msgstr "" -#: ../../library/chunk.rst:26 +#: ../../library/chunk.rst:30 msgid "A chunk has the following structure:" msgstr "" -#: ../../library/chunk.rst:29 +#: ../../library/chunk.rst:33 msgid "Offset" msgstr "" -#: ../../library/chunk.rst:29 +#: ../../library/chunk.rst:33 msgid "Length" msgstr "長度" -#: ../../library/chunk.rst:29 +#: ../../library/chunk.rst:33 msgid "Contents" msgstr "內容" -#: ../../library/chunk.rst:31 +#: ../../library/chunk.rst:35 msgid "0" msgstr "0" -#: ../../library/chunk.rst:31 ../../library/chunk.rst:33 +#: ../../library/chunk.rst:35 ../../library/chunk.rst:37 msgid "4" msgstr "4" -#: ../../library/chunk.rst:31 +#: ../../library/chunk.rst:35 msgid "Chunk ID" msgstr "" -#: ../../library/chunk.rst:33 +#: ../../library/chunk.rst:37 msgid "Size of chunk in big-endian byte order, not including the header" msgstr "" -#: ../../library/chunk.rst:37 +#: ../../library/chunk.rst:41 msgid "8" msgstr "8" -#: ../../library/chunk.rst:37 +#: ../../library/chunk.rst:41 msgid "*n*" msgstr "*n*" -#: ../../library/chunk.rst:37 +#: ../../library/chunk.rst:41 msgid "Data bytes, where *n* is the size given in the preceding field" msgstr "" -#: ../../library/chunk.rst:41 +#: ../../library/chunk.rst:45 msgid "8 + *n*" msgstr "8 + *n*" -#: ../../library/chunk.rst:41 +#: ../../library/chunk.rst:45 msgid "0 or 1" msgstr "0 或 1" -#: ../../library/chunk.rst:41 +#: ../../library/chunk.rst:45 msgid "Pad byte needed if *n* is odd and chunk alignment is used" msgstr "" -#: ../../library/chunk.rst:45 +#: ../../library/chunk.rst:49 msgid "The ID is a 4-byte string which identifies the type of chunk." msgstr "" -#: ../../library/chunk.rst:47 +#: ../../library/chunk.rst:51 msgid "" "The size field (a 32-bit value, encoded using big-endian byte order) gives " "the size of the chunk data, not including the 8-byte header." msgstr "" -#: ../../library/chunk.rst:50 +#: ../../library/chunk.rst:54 msgid "" "Usually an IFF-type file consists of one or more chunks. The proposed usage " "of the :class:`Chunk` class defined here is to instantiate an instance at " @@ -109,7 +113,7 @@ msgid "" "creating a new instance will fail with an :exc:`EOFError` exception." msgstr "" -#: ../../library/chunk.rst:59 +#: ../../library/chunk.rst:63 msgid "" "Class which represents a chunk. The *file* argument is expected to be a " "file-like object. An instance of this class is specifically allowed. The " @@ -126,37 +130,37 @@ msgid "" "The default value is false." msgstr "" -#: ../../library/chunk.rst:73 +#: ../../library/chunk.rst:77 msgid "A :class:`Chunk` object supports the following methods:" msgstr "" -#: ../../library/chunk.rst:78 +#: ../../library/chunk.rst:82 msgid "" "Returns the name (ID) of the chunk. This is the first 4 bytes of the chunk." msgstr "" -#: ../../library/chunk.rst:84 +#: ../../library/chunk.rst:88 msgid "Returns the size of the chunk." msgstr "" -#: ../../library/chunk.rst:89 +#: ../../library/chunk.rst:93 msgid "" "Close and skip to the end of the chunk. This does not close the underlying " "file." msgstr "" -#: ../../library/chunk.rst:92 +#: ../../library/chunk.rst:96 msgid "" "The remaining methods will raise :exc:`OSError` if called after the :meth:" "`close` method has been called. Before Python 3.3, they used to raise :exc:" "`IOError`, now an alias of :exc:`OSError`." msgstr "" -#: ../../library/chunk.rst:99 +#: ../../library/chunk.rst:103 msgid "Returns ``False``." msgstr "" -#: ../../library/chunk.rst:104 +#: ../../library/chunk.rst:108 msgid "" "Set the chunk's current position. The *whence* argument is optional and " "defaults to ``0`` (absolute file positioning); other values are ``1`` (seek " @@ -165,11 +169,11 @@ msgid "" "only forward seeks are allowed." msgstr "" -#: ../../library/chunk.rst:113 +#: ../../library/chunk.rst:117 msgid "Return the current position into the chunk." msgstr "" -#: ../../library/chunk.rst:118 +#: ../../library/chunk.rst:122 msgid "" "Read at most *size* bytes from the chunk (less if the read hits the end of " "the chunk before obtaining *size* bytes). If the *size* argument is " @@ -178,7 +182,7 @@ msgid "" "immediately." msgstr "" -#: ../../library/chunk.rst:127 +#: ../../library/chunk.rst:131 msgid "" "Skip to the end of the chunk. All further calls to :meth:`read` for the " "chunk will return ``b''``. If you are not interested in the contents of the " @@ -186,11 +190,11 @@ msgid "" "the next chunk." msgstr "" -#: ../../library/chunk.rst:134 +#: ../../library/chunk.rst:138 msgid "Footnotes" msgstr "註解" -#: ../../library/chunk.rst:135 +#: ../../library/chunk.rst:139 msgid "" "\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " "Electronic Arts, January 1985." diff --git a/library/crypt.po b/library/crypt.po index d4a696d88d..3dedbe2236 100644 --- a/library/crypt.po +++ b/library/crypt.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-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,11 +22,16 @@ msgstr "" msgid ":mod:`crypt` --- Function to check Unix passwords" msgstr "" -#: ../../library/crypt.rst:12 +#: ../../library/crypt.rst:13 msgid "**Source code:** :source:`Lib/crypt.py`" msgstr "**原始碼:**\\ :source:`Lib/crypt.py`" -#: ../../library/crypt.rst:20 +#: ../../library/crypt.rst:19 +#, fuzzy +msgid "The :mod:`crypt` module is deprecated (see :pep:`594` for details)." +msgstr ":mod:`crypt` 模組定義了以下函式:" + +#: ../../library/crypt.rst:24 msgid "" "This module implements an interface to the :manpage:`crypt(3)` routine, " "which is a one-way hash function based upon a modified DES algorithm; see " @@ -35,7 +40,7 @@ msgid "" "attempting to crack Unix passwords with a dictionary." msgstr "" -#: ../../library/crypt.rst:28 +#: ../../library/crypt.rst:32 msgid "" "Notice that the behavior of this module depends on the actual " "implementation of the :manpage:`crypt(3)` routine in the running system. " @@ -43,69 +48,69 @@ msgid "" "be available on this module." msgstr "" -#: ../../library/crypt.rst:34 +#: ../../library/crypt.rst:38 msgid ":ref:`Availability `: Unix. Not available on VxWorks." msgstr ":ref:`適用 `:Unix,在 VxWorks 上不支援。" -#: ../../library/crypt.rst:36 +#: ../../library/crypt.rst:40 msgid "Hashing Methods" msgstr "" -#: ../../library/crypt.rst:40 +#: ../../library/crypt.rst:44 msgid "" "The :mod:`crypt` module defines the list of hashing methods (not all methods " "are available on all platforms):" msgstr "" -#: ../../library/crypt.rst:45 +#: ../../library/crypt.rst:49 msgid "" "A Modular Crypt Format method with 16 character salt and 86 character hash " "based on the SHA-512 hash function. This is the strongest method." msgstr "" -#: ../../library/crypt.rst:50 +#: ../../library/crypt.rst:54 msgid "" "Another Modular Crypt Format method with 16 character salt and 43 character " "hash based on the SHA-256 hash function." msgstr "" -#: ../../library/crypt.rst:55 +#: ../../library/crypt.rst:59 msgid "" "Another Modular Crypt Format method with 22 character salt and 31 character " "hash based on the Blowfish cipher." msgstr "" -#: ../../library/crypt.rst:62 +#: ../../library/crypt.rst:66 msgid "" "Another Modular Crypt Format method with 8 character salt and 22 character " "hash based on the MD5 hash function." msgstr "" -#: ../../library/crypt.rst:67 +#: ../../library/crypt.rst:71 msgid "" "The traditional method with a 2 character salt and 13 characters of hash. " "This is the weakest method." msgstr "" -#: ../../library/crypt.rst:72 +#: ../../library/crypt.rst:76 msgid "Module Attributes" msgstr "模組屬性" -#: ../../library/crypt.rst:78 +#: ../../library/crypt.rst:82 msgid "" "A list of available password hashing algorithms, as ``crypt.METHOD_*`` " "objects. This list is sorted from strongest to weakest." msgstr "" -#: ../../library/crypt.rst:84 +#: ../../library/crypt.rst:88 msgid "Module Functions" msgstr "模組函式" -#: ../../library/crypt.rst:86 +#: ../../library/crypt.rst:90 msgid "The :mod:`crypt` module defines the following functions:" msgstr ":mod:`crypt` 模組定義了以下函式:" -#: ../../library/crypt.rst:90 +#: ../../library/crypt.rst:94 msgid "" "*word* will usually be a user's password as typed at a prompt or in a " "graphical interface. The optional *salt* is either a string as returned " @@ -115,14 +120,14 @@ msgid "" "strongest method will be used (as returned by :func:`methods`)." msgstr "" -#: ../../library/crypt.rst:98 +#: ../../library/crypt.rst:102 msgid "" "Checking a password is usually done by passing the plain-text password as " "*word* and the full results of a previous :func:`crypt` call, which should " "be the same as the results of this call." msgstr "" -#: ../../library/crypt.rst:102 +#: ../../library/crypt.rst:106 msgid "" "*salt* (either a random 2 or 16 character string, possibly prefixed with ``" "$digit$`` to indicate the method) which will be used to perturb the " @@ -131,36 +136,36 @@ msgid "" "$``." msgstr "" -#: ../../library/crypt.rst:108 +#: ../../library/crypt.rst:112 msgid "" "Returns the hashed password as a string, which will be composed of " "characters from the same alphabet as the salt." msgstr "" -#: ../../library/crypt.rst:113 +#: ../../library/crypt.rst:117 msgid "" "Since a few :manpage:`crypt(3)` extensions allow different values, with " "different sizes in the *salt*, it is recommended to use the full crypted " "password as salt when checking for a password." msgstr "" -#: ../../library/crypt.rst:117 +#: ../../library/crypt.rst:121 msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." msgstr "" -#: ../../library/crypt.rst:123 +#: ../../library/crypt.rst:127 msgid "" "Return a randomly generated salt of the specified method. If no *method* is " "given, the strongest method available as returned by :func:`methods` is used." msgstr "" -#: ../../library/crypt.rst:127 +#: ../../library/crypt.rst:131 msgid "" "The return value is a string suitable for passing as the *salt* argument to :" "func:`crypt`." msgstr "" -#: ../../library/crypt.rst:130 +#: ../../library/crypt.rst:134 msgid "" "*rounds* specifies the number of rounds for ``METHOD_SHA256``, " "``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " @@ -170,22 +175,22 @@ msgid "" "sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." msgstr "" -#: ../../library/crypt.rst:140 +#: ../../library/crypt.rst:144 msgid "Added the *rounds* parameter." msgstr "新增 *rounds* 參數。" -#: ../../library/crypt.rst:145 +#: ../../library/crypt.rst:149 msgid "Examples" msgstr "範例" -#: ../../library/crypt.rst:147 +#: ../../library/crypt.rst:151 msgid "" "A simple example illustrating typical use (a constant-time comparison " "operation is needed to limit exposure to timing attacks. :func:`hmac." "compare_digest` is suitable for this purpose)::" msgstr "" -#: ../../library/crypt.rst:167 +#: ../../library/crypt.rst:171 msgid "" "To generate a hash of a password using the strongest available method and " "check it against the original::" diff --git a/library/imghdr.po b/library/imghdr.po index e195a44933..b22868d921 100644 --- a/library/imghdr.po +++ b/library/imghdr.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-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,173 +22,177 @@ msgstr "" msgid ":mod:`imghdr` --- Determine the type of an image" msgstr "" -#: ../../library/imghdr.rst:7 +#: ../../library/imghdr.rst:8 msgid "**Source code:** :source:`Lib/imghdr.py`" msgstr "**原始碼:**\\ :source:`Lib/imghdr.py`" -#: ../../library/imghdr.rst:11 +#: ../../library/imghdr.rst:10 +msgid "The :mod:`imghdr` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/imghdr.rst:15 msgid "" "The :mod:`imghdr` module determines the type of image contained in a file or " "byte stream." msgstr "" -#: ../../library/imghdr.rst:14 +#: ../../library/imghdr.rst:18 msgid "The :mod:`imghdr` module defines the following function:" msgstr "" -#: ../../library/imghdr.rst:19 +#: ../../library/imghdr.rst:23 msgid "" "Tests the image data contained in the file named by *file*, and returns a " "string describing the image type. If optional *h* is provided, the *file* " "argument is ignored and *h* is assumed to contain the byte stream to test." msgstr "" -#: ../../library/imghdr.rst:23 +#: ../../library/imghdr.rst:27 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../library/imghdr.rst:26 +#: ../../library/imghdr.rst:30 msgid "" "The following image types are recognized, as listed below with the return " "value from :func:`what`:" msgstr "" -#: ../../library/imghdr.rst:30 +#: ../../library/imghdr.rst:34 msgid "Value" msgstr "" -#: ../../library/imghdr.rst:30 +#: ../../library/imghdr.rst:34 msgid "Image format" msgstr "" -#: ../../library/imghdr.rst:32 +#: ../../library/imghdr.rst:36 msgid "``'rgb'``" msgstr "``'rgb'``" -#: ../../library/imghdr.rst:32 +#: ../../library/imghdr.rst:36 msgid "SGI ImgLib Files" msgstr "" -#: ../../library/imghdr.rst:34 +#: ../../library/imghdr.rst:38 msgid "``'gif'``" msgstr "``'gif'``" -#: ../../library/imghdr.rst:34 +#: ../../library/imghdr.rst:38 msgid "GIF 87a and 89a Files" msgstr "" -#: ../../library/imghdr.rst:36 +#: ../../library/imghdr.rst:40 msgid "``'pbm'``" msgstr "``'pbm'``" -#: ../../library/imghdr.rst:36 +#: ../../library/imghdr.rst:40 msgid "Portable Bitmap Files" msgstr "" -#: ../../library/imghdr.rst:38 +#: ../../library/imghdr.rst:42 msgid "``'pgm'``" msgstr "``'pgm'``" -#: ../../library/imghdr.rst:38 +#: ../../library/imghdr.rst:42 msgid "Portable Graymap Files" msgstr "" -#: ../../library/imghdr.rst:40 +#: ../../library/imghdr.rst:44 msgid "``'ppm'``" msgstr "``'ppm'``" -#: ../../library/imghdr.rst:40 +#: ../../library/imghdr.rst:44 msgid "Portable Pixmap Files" msgstr "" -#: ../../library/imghdr.rst:42 +#: ../../library/imghdr.rst:46 msgid "``'tiff'``" msgstr "``'tiff'``" -#: ../../library/imghdr.rst:42 +#: ../../library/imghdr.rst:46 msgid "TIFF Files" msgstr "TIFF 檔案" -#: ../../library/imghdr.rst:44 +#: ../../library/imghdr.rst:48 msgid "``'rast'``" msgstr "``'rast'``" -#: ../../library/imghdr.rst:44 +#: ../../library/imghdr.rst:48 msgid "Sun Raster Files" msgstr "" -#: ../../library/imghdr.rst:46 +#: ../../library/imghdr.rst:50 msgid "``'xbm'``" msgstr "``'xbm'``" -#: ../../library/imghdr.rst:46 +#: ../../library/imghdr.rst:50 msgid "X Bitmap Files" msgstr "" -#: ../../library/imghdr.rst:48 +#: ../../library/imghdr.rst:52 msgid "``'jpeg'``" msgstr "``'jpeg'``" -#: ../../library/imghdr.rst:48 +#: ../../library/imghdr.rst:52 msgid "JPEG data in JFIF or Exif formats" msgstr "" -#: ../../library/imghdr.rst:50 +#: ../../library/imghdr.rst:54 msgid "``'bmp'``" msgstr "``'bmp'``" -#: ../../library/imghdr.rst:50 +#: ../../library/imghdr.rst:54 msgid "BMP files" msgstr "BMP 檔案" -#: ../../library/imghdr.rst:52 +#: ../../library/imghdr.rst:56 msgid "``'png'``" msgstr "``'png'``" -#: ../../library/imghdr.rst:52 +#: ../../library/imghdr.rst:56 msgid "Portable Network Graphics" msgstr "" -#: ../../library/imghdr.rst:54 +#: ../../library/imghdr.rst:58 msgid "``'webp'``" msgstr "``'webp'``" -#: ../../library/imghdr.rst:54 +#: ../../library/imghdr.rst:58 msgid "WebP files" msgstr "WebP 檔案" -#: ../../library/imghdr.rst:56 +#: ../../library/imghdr.rst:60 msgid "``'exr'``" msgstr "``'exr'``" -#: ../../library/imghdr.rst:56 +#: ../../library/imghdr.rst:60 msgid "OpenEXR Files" msgstr "OpenEXR 檔案" -#: ../../library/imghdr.rst:59 +#: ../../library/imghdr.rst:63 msgid "The *exr* and *webp* formats were added." msgstr "新增 *exr* 與 *webp* 格式。" -#: ../../library/imghdr.rst:63 +#: ../../library/imghdr.rst:67 msgid "" "You can extend the list of file types :mod:`imghdr` can recognize by " "appending to this variable:" msgstr "" -#: ../../library/imghdr.rst:69 +#: ../../library/imghdr.rst:73 msgid "" "A list of functions performing the individual tests. Each function takes " "two arguments: the byte-stream and an open file-like object. When :func:" "`what` is called with a byte-stream, the file-like object will be ``None``." msgstr "" -#: ../../library/imghdr.rst:73 +#: ../../library/imghdr.rst:77 msgid "" "The test function should return a string describing the image type if the " "test succeeded, or ``None`` if it failed." msgstr "" -#: ../../library/imghdr.rst:76 +#: ../../library/imghdr.rst:80 msgid "Example::" msgstr "" "範例:\n" diff --git a/library/msilib.po b/library/msilib.po index 5df638d39f..43bd1de75b 100644 --- a/library/msilib.po +++ b/library/msilib.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-03-23 00:14+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-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`msilib` --- Read and write Microsoft Installer files" msgstr "" -#: ../../library/msilib.rst:11 +#: ../../library/msilib.rst:12 msgid "**Source code:** :source:`Lib/msilib/__init__.py`" msgstr "**原始碼:**\\ :source:`Lib/msilib/__init__.py`" -#: ../../library/msilib.rst:17 +#: ../../library/msilib.rst:16 +msgid "The :mod:`msilib` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/msilib.rst:21 msgid "" "The :mod:`msilib` supports the creation of Microsoft Installer (``.msi``) " "files. Because these files often contain an embedded \"cabinet\" file (``." @@ -35,7 +39,7 @@ msgid "" "database is possible." msgstr "" -#: ../../library/msilib.rst:22 +#: ../../library/msilib.rst:26 msgid "" "This package aims to provide complete access to all tables in an ``.msi`` " "file, therefore, it is a fairly low-level API. Two primary applications of " @@ -44,40 +48,40 @@ msgid "" "different version of ``msilib``)." msgstr "" -#: ../../library/msilib.rst:28 +#: ../../library/msilib.rst:32 msgid "" "The package contents can be roughly split into four parts: low-level CAB " "routines, low-level MSI routines, higher-level MSI routines, and standard " "table structures." msgstr "" -#: ../../library/msilib.rst:35 +#: ../../library/msilib.rst:39 msgid "" "Create a new CAB file named *cabname*. *files* must be a list of tuples, " "each containing the name of the file on disk, and the name of the file " "inside the CAB file." msgstr "" -#: ../../library/msilib.rst:39 +#: ../../library/msilib.rst:43 msgid "" "The files are added to the CAB file in the order they appear in the list. " "All files are added into a single CAB file, using the MSZIP compression " "algorithm." msgstr "" -#: ../../library/msilib.rst:42 +#: ../../library/msilib.rst:46 msgid "" "Callbacks to Python for the various steps of MSI creation are currently not " "exposed." msgstr "" -#: ../../library/msilib.rst:48 +#: ../../library/msilib.rst:52 msgid "" "Return the string representation of a new unique identifier. This wraps the " "Windows API functions :c:func:`UuidCreate` and :c:func:`UuidToString`." msgstr "" -#: ../../library/msilib.rst:54 +#: ../../library/msilib.rst:58 msgid "" "Return a new database object by calling MsiOpenDatabase. *path* is the " "file name of the MSI file; *persist* can be one of the constants " @@ -88,84 +92,84 @@ msgid "" "new one created." msgstr "" -#: ../../library/msilib.rst:65 +#: ../../library/msilib.rst:69 msgid "" "Return a new record object by calling :c:func:`MSICreateRecord`. *count* is " "the number of fields of the record." msgstr "" -#: ../../library/msilib.rst:71 +#: ../../library/msilib.rst:75 msgid "" "Create and return a new database *name*, initialize it with *schema*, and " "set the properties *ProductName*, *ProductCode*, *ProductVersion*, and " "*Manufacturer*." msgstr "" -#: ../../library/msilib.rst:75 +#: ../../library/msilib.rst:79 msgid "" "*schema* must be a module object containing ``tables`` and " "``_Validation_records`` attributes; typically, :mod:`msilib.schema` should " "be used." msgstr "" -#: ../../library/msilib.rst:79 +#: ../../library/msilib.rst:83 msgid "" "The database will contain just the schema and the validation records when " "this function returns." msgstr "" -#: ../../library/msilib.rst:85 +#: ../../library/msilib.rst:89 msgid "Add all *records* to the table named *table* in *database*." msgstr "" -#: ../../library/msilib.rst:87 +#: ../../library/msilib.rst:91 msgid "" "The *table* argument must be one of the predefined tables in the MSI schema, " "e.g. ``'Feature'``, ``'File'``, ``'Component'``, ``'Dialog'``, " "``'Control'``, etc." msgstr "" -#: ../../library/msilib.rst:91 +#: ../../library/msilib.rst:95 msgid "" "*records* should be a list of tuples, each one containing all fields of a " "record according to the schema of the table. For optional fields, ``None`` " "can be passed." msgstr "" -#: ../../library/msilib.rst:95 +#: ../../library/msilib.rst:99 msgid "Field values can be ints, strings, or instances of the Binary class." msgstr "" -#: ../../library/msilib.rst:100 +#: ../../library/msilib.rst:104 msgid "" "Represents entries in the Binary table; inserting such an object using :func:" "`add_data` reads the file named *filename* into the table." msgstr "" -#: ../../library/msilib.rst:106 +#: ../../library/msilib.rst:110 msgid "" "Add all table content from *module* to *database*. *module* must contain an " "attribute *tables* listing all tables for which content should be added, and " "one attribute per table that has the actual content." msgstr "" -#: ../../library/msilib.rst:110 +#: ../../library/msilib.rst:114 msgid "This is typically used to install the sequence tables." msgstr "" -#: ../../library/msilib.rst:115 +#: ../../library/msilib.rst:119 msgid "" "Add the file *path* into the ``_Stream`` table of *database*, with the " "stream name *name*." msgstr "" -#: ../../library/msilib.rst:121 +#: ../../library/msilib.rst:125 msgid "" "Return a new UUID, in the format that MSI typically requires (i.e. in curly " "braces, and with all hexdigits in upper-case)." msgstr "" -#: ../../library/msilib.rst:127 +#: ../../library/msilib.rst:131 msgid "" "`FCICreate `_ " "`UuidCreate `_" msgstr "" -#: ../../library/msilib.rst:134 +#: ../../library/msilib.rst:138 msgid "Database Objects" msgstr "" -#: ../../library/msilib.rst:139 +#: ../../library/msilib.rst:143 msgid "" "Return a view object, by calling :c:func:`MSIDatabaseOpenView`. *sql* is the " "SQL statement to execute." msgstr "" -#: ../../library/msilib.rst:145 +#: ../../library/msilib.rst:149 msgid "" "Commit the changes pending in the current transaction, by calling :c:func:" "`MSIDatabaseCommit`." msgstr "" -#: ../../library/msilib.rst:151 +#: ../../library/msilib.rst:155 msgid "" "Return a new summary information object, by calling :c:func:" "`MsiGetSummaryInformation`. *count* is the maximum number of updated values." msgstr "" -#: ../../library/msilib.rst:157 +#: ../../library/msilib.rst:161 msgid "Close the database object, through :c:func:`MsiCloseHandle`." msgstr "" -#: ../../library/msilib.rst:163 +#: ../../library/msilib.rst:167 msgid "" "`MSIDatabaseOpenView `_ `MSIDatabaseCommit `_" msgstr "" -#: ../../library/msilib.rst:171 +#: ../../library/msilib.rst:175 msgid "View Objects" msgstr "" -#: ../../library/msilib.rst:176 +#: ../../library/msilib.rst:180 msgid "" "Execute the SQL query of the view, through :c:func:`MSIViewExecute`. If " "*params* is not ``None``, it is a record describing actual values of the " "parameter tokens in the query." msgstr "" -#: ../../library/msilib.rst:183 +#: ../../library/msilib.rst:187 msgid "" "Return a record describing the columns of the view, through calling :c:func:" "`MsiViewGetColumnInfo`. *kind* can be either ``MSICOLINFO_NAMES`` or " "``MSICOLINFO_TYPES``." msgstr "" -#: ../../library/msilib.rst:190 +#: ../../library/msilib.rst:194 msgid "" "Return a result record of the query, through calling :c:func:`MsiViewFetch`." msgstr "" -#: ../../library/msilib.rst:195 +#: ../../library/msilib.rst:199 msgid "" "Modify the view, by calling :c:func:`MsiViewModify`. *kind* can be one of " "``MSIMODIFY_SEEK``, ``MSIMODIFY_REFRESH``, ``MSIMODIFY_INSERT``, " @@ -242,15 +246,15 @@ msgid "" "``MSIMODIFY_VALIDATE_FIELD``, or ``MSIMODIFY_VALIDATE_DELETE``." msgstr "" -#: ../../library/msilib.rst:202 +#: ../../library/msilib.rst:206 msgid "*data* must be a record describing the new data." msgstr "" -#: ../../library/msilib.rst:207 +#: ../../library/msilib.rst:211 msgid "Close the view, through :c:func:`MsiViewClose`." msgstr "" -#: ../../library/msilib.rst:212 +#: ../../library/msilib.rst:216 msgid "" "`MsiViewExecute `_ `MSIViewGetColumnInfo `_" msgstr "" -#: ../../library/msilib.rst:221 +#: ../../library/msilib.rst:225 msgid "Summary Information Objects" msgstr "" -#: ../../library/msilib.rst:226 +#: ../../library/msilib.rst:230 msgid "" "Return a property of the summary, through :c:func:" "`MsiSummaryInfoGetProperty`. *field* is the name of the property, and can be " @@ -276,26 +280,26 @@ msgid "" "``PID_WORDCOUNT``, ``PID_CHARCOUNT``, ``PID_APPNAME``, or ``PID_SECURITY``." msgstr "" -#: ../../library/msilib.rst:237 +#: ../../library/msilib.rst:241 msgid "" "Return the number of summary properties, through :c:func:" "`MsiSummaryInfoGetPropertyCount`." msgstr "" -#: ../../library/msilib.rst:243 +#: ../../library/msilib.rst:247 msgid "" "Set a property through :c:func:`MsiSummaryInfoSetProperty`. *field* can have " "the same values as in :meth:`GetProperty`, *value* is the new value of the " "property. Possible value types are integer and string." msgstr "" -#: ../../library/msilib.rst:250 +#: ../../library/msilib.rst:254 msgid "" "Write the modified properties to the summary information stream, using :c:" "func:`MsiSummaryInfoPersist`." msgstr "" -#: ../../library/msilib.rst:256 +#: ../../library/msilib.rst:260 msgid "" "`MsiSummaryInfoGetProperty `_ `MsiSummaryInfoGetPropertyCount `_" msgstr "" -#: ../../library/msilib.rst:264 +#: ../../library/msilib.rst:268 msgid "Record Objects" msgstr "" -#: ../../library/msilib.rst:269 +#: ../../library/msilib.rst:273 msgid "" "Return the number of fields of the record, through :c:func:" "`MsiRecordGetFieldCount`." msgstr "" -#: ../../library/msilib.rst:275 +#: ../../library/msilib.rst:279 msgid "" "Return the value of *field* as an integer where possible. *field* must be " "an integer." msgstr "" -#: ../../library/msilib.rst:281 +#: ../../library/msilib.rst:285 msgid "" "Return the value of *field* as a string where possible. *field* must be an " "integer." msgstr "" -#: ../../library/msilib.rst:287 +#: ../../library/msilib.rst:291 msgid "" "Set *field* to *value* through :c:func:`MsiRecordSetString`. *field* must be " "an integer; *value* a string." msgstr "" -#: ../../library/msilib.rst:293 +#: ../../library/msilib.rst:297 msgid "" "Set *field* to the contents of the file named *value*, through :c:func:" "`MsiRecordSetStream`. *field* must be an integer; *value* a string." msgstr "" -#: ../../library/msilib.rst:299 +#: ../../library/msilib.rst:303 msgid "" "Set *field* to *value* through :c:func:`MsiRecordSetInteger`. Both *field* " "and *value* must be an integer." msgstr "" -#: ../../library/msilib.rst:305 +#: ../../library/msilib.rst:309 msgid "" "Set all fields of the record to 0, through :c:func:`MsiRecordClearData`." msgstr "" -#: ../../library/msilib.rst:310 +#: ../../library/msilib.rst:314 msgid "" "`MsiRecordGetFieldCount `_ `MsiRecordSetString `_" msgstr "" -#: ../../library/msilib.rst:319 +#: ../../library/msilib.rst:323 msgid "Errors" msgstr "" -#: ../../library/msilib.rst:321 +#: ../../library/msilib.rst:325 msgid "" "All wrappers around MSI functions raise :exc:`MSIError`; the string inside " "the exception will contain more detail." msgstr "" -#: ../../library/msilib.rst:328 +#: ../../library/msilib.rst:332 msgid "CAB Objects" msgstr "CAB 物件" -#: ../../library/msilib.rst:333 +#: ../../library/msilib.rst:337 msgid "" "The class :class:`CAB` represents a CAB file. During MSI construction, files " "will be added simultaneously to the ``Files`` table, and to a CAB file. " @@ -383,34 +387,34 @@ msgid "" "added to the MSI file." msgstr "" -#: ../../library/msilib.rst:338 +#: ../../library/msilib.rst:342 msgid "*name* is the name of the CAB file in the MSI file." msgstr "" -#: ../../library/msilib.rst:343 +#: ../../library/msilib.rst:347 msgid "" "Add the file with the pathname *full* to the CAB file, under the name " "*logical*. If there is already a file named *logical*, a new file name is " "created." msgstr "" -#: ../../library/msilib.rst:347 +#: ../../library/msilib.rst:351 msgid "" "Return the index of the file in the CAB file, and the new name of the file " "inside the CAB file." msgstr "" -#: ../../library/msilib.rst:353 +#: ../../library/msilib.rst:357 msgid "" "Generate a CAB file, add it as a stream to the MSI file, put it into the " "``Media`` table, and remove the generated file from the disk." msgstr "" -#: ../../library/msilib.rst:360 +#: ../../library/msilib.rst:364 msgid "Directory Objects" msgstr "" -#: ../../library/msilib.rst:365 +#: ../../library/msilib.rst:369 msgid "" "Create a new directory in the Directory table. There is a current component " "at each point in time for the directory, which is either explicitly created " @@ -422,7 +426,7 @@ msgid "" "table. *componentflags* specifies the default flags that new components get." msgstr "" -#: ../../library/msilib.rst:377 +#: ../../library/msilib.rst:381 msgid "" "Add an entry to the Component table, and make this component the current " "component for this directory. If no component name is given, the directory " @@ -431,7 +435,7 @@ msgid "" "is given, the KeyPath is left null in the Component table." msgstr "" -#: ../../library/msilib.rst:386 +#: ../../library/msilib.rst:390 msgid "" "Add a file to the current component of the directory, starting a new one if " "there is no current component. By default, the file name in the source and " @@ -440,17 +444,17 @@ msgid "" "*language* can be specified for the entry in the File table." msgstr "" -#: ../../library/msilib.rst:395 +#: ../../library/msilib.rst:399 msgid "" "Add a list of files to the current component as specified in the glob " "pattern. Individual files can be excluded in the *exclude* list." msgstr "" -#: ../../library/msilib.rst:401 +#: ../../library/msilib.rst:405 msgid "Remove ``.pyc`` files on uninstall." msgstr "" -#: ../../library/msilib.rst:406 +#: ../../library/msilib.rst:410 msgid "" "`Directory Table `_ `File Table `_" msgstr "" -#: ../../library/msilib.rst:414 +#: ../../library/msilib.rst:418 msgid "Features" msgstr "" -#: ../../library/msilib.rst:419 +#: ../../library/msilib.rst:423 msgid "" "Add a new record to the ``Feature`` table, using the values *id*, *parent." "id*, *title*, *desc*, *display*, *level*, *directory*, and *attributes*. The " @@ -471,24 +475,24 @@ msgid "" "of :class:`Directory`." msgstr "" -#: ../../library/msilib.rst:427 +#: ../../library/msilib.rst:431 msgid "" "Make this feature the current feature of :mod:`msilib`. New components are " "automatically added to the default feature, unless a feature is explicitly " "specified." msgstr "" -#: ../../library/msilib.rst:434 +#: ../../library/msilib.rst:438 msgid "" "`Feature Table `_" msgstr "" -#: ../../library/msilib.rst:439 +#: ../../library/msilib.rst:443 msgid "GUI classes" msgstr "" -#: ../../library/msilib.rst:441 +#: ../../library/msilib.rst:445 msgid "" ":mod:`msilib` provides several classes that wrap the GUI tables in an MSI " "database. However, no standard user interface is provided; use :mod:" @@ -496,81 +500,81 @@ msgid "" "installing Python packages." msgstr "" -#: ../../library/msilib.rst:449 +#: ../../library/msilib.rst:453 msgid "" "Base class of the dialog controls. *dlg* is the dialog object the control " "belongs to, and *name* is the control's name." msgstr "" -#: ../../library/msilib.rst:455 +#: ../../library/msilib.rst:459 msgid "Make an entry into the ``ControlEvent`` table for this control." msgstr "" -#: ../../library/msilib.rst:460 +#: ../../library/msilib.rst:464 msgid "Make an entry into the ``EventMapping`` table for this control." msgstr "" -#: ../../library/msilib.rst:465 +#: ../../library/msilib.rst:469 msgid "Make an entry into the ``ControlCondition`` table for this control." msgstr "" -#: ../../library/msilib.rst:470 +#: ../../library/msilib.rst:474 msgid "" "Create a radio button control named *name*. *property* is the installer " "property that gets set when a radio button is selected." msgstr "" -#: ../../library/msilib.rst:476 +#: ../../library/msilib.rst:480 msgid "" "Add a radio button named *name* to the group, at the coordinates *x*, *y*, " "*width*, *height*, and with the label *text*. If *value* is ``None``, it " "defaults to *name*." msgstr "" -#: ../../library/msilib.rst:483 +#: ../../library/msilib.rst:487 msgid "" "Return a new :class:`Dialog` object. An entry in the ``Dialog`` table is " "made, with the specified coordinates, dialog attributes, title, name of the " "first, default, and cancel controls." msgstr "" -#: ../../library/msilib.rst:490 +#: ../../library/msilib.rst:494 msgid "" "Return a new :class:`Control` object. An entry in the ``Control`` table is " "made with the specified parameters." msgstr "" -#: ../../library/msilib.rst:493 +#: ../../library/msilib.rst:497 msgid "" "This is a generic method; for specific types, specialized methods are " "provided." msgstr "" -#: ../../library/msilib.rst:499 +#: ../../library/msilib.rst:503 msgid "Add and return a ``Text`` control." msgstr "" -#: ../../library/msilib.rst:504 +#: ../../library/msilib.rst:508 msgid "Add and return a ``Bitmap`` control." msgstr "" -#: ../../library/msilib.rst:509 +#: ../../library/msilib.rst:513 msgid "Add and return a ``Line`` control." msgstr "" -#: ../../library/msilib.rst:514 +#: ../../library/msilib.rst:518 msgid "Add and return a ``PushButton`` control." msgstr "" -#: ../../library/msilib.rst:519 +#: ../../library/msilib.rst:523 msgid "Add and return a ``RadioButtonGroup`` control." msgstr "" -#: ../../library/msilib.rst:524 +#: ../../library/msilib.rst:528 msgid "Add and return a ``CheckBox`` control." msgstr "" -#: ../../library/msilib.rst:529 +#: ../../library/msilib.rst:533 msgid "" "`Dialog Table `_ `Control Table `_" msgstr "" -#: ../../library/msilib.rst:540 +#: ../../library/msilib.rst:544 msgid "Precomputed tables" msgstr "" -#: ../../library/msilib.rst:542 +#: ../../library/msilib.rst:546 msgid "" ":mod:`msilib` provides a few subpackages that contain only schema and table " "definitions. Currently, these definitions are based on MSI version 2.0." msgstr "" -#: ../../library/msilib.rst:548 +#: ../../library/msilib.rst:552 msgid "" "This is the standard MSI schema for MSI 2.0, with the *tables* variable " "providing a list of table definitions, and *_Validation_records* providing " "the data for MSI validation." msgstr "" -#: ../../library/msilib.rst:555 +#: ../../library/msilib.rst:559 msgid "" "This module contains table contents for the standard sequence tables: " "*AdminExecuteSequence*, *AdminUISequence*, *AdvtExecuteSequence*, " "*InstallExecuteSequence*, and *InstallUISequence*." msgstr "" -#: ../../library/msilib.rst:562 +#: ../../library/msilib.rst:566 msgid "" "This module contains definitions for the UIText and ActionText tables, for " "the standard installer actions." diff --git a/library/nis.po b/library/nis.po index 63955eb971..3c4c3e6373 100644 --- a/library/nis.po +++ b/library/nis.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-03-23 00:14+0000\n" "PO-Revision-Date: 2016-11-19 00:32+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,23 +22,27 @@ msgstr "" msgid ":mod:`nis` --- Interface to Sun's NIS (Yellow Pages)" msgstr "" -#: ../../library/nis.rst:14 +#: ../../library/nis.rst:13 +msgid "The :mod:`nis` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/nis.rst:18 msgid "" "The :mod:`nis` module gives a thin wrapper around the NIS library, useful " "for central administration of several hosts." msgstr "" -#: ../../library/nis.rst:17 +#: ../../library/nis.rst:21 msgid "" "Because NIS exists only on Unix systems, this module is only available for " "Unix." msgstr "" -#: ../../library/nis.rst:19 +#: ../../library/nis.rst:23 msgid "The :mod:`nis` module defines the following functions:" msgstr "" -#: ../../library/nis.rst:24 +#: ../../library/nis.rst:28 msgid "" "Return the match for *key* in map *mapname*, or raise an error (:exc:`nis." "error`) if there is none. Both should be strings, *key* is 8-bit clean. " @@ -46,35 +50,35 @@ msgid "" "joys)." msgstr "" -#: ../../library/nis.rst:29 ../../library/nis.rst:41 +#: ../../library/nis.rst:33 ../../library/nis.rst:45 msgid "Note that *mapname* is first checked if it is an alias to another name." msgstr "" -#: ../../library/nis.rst:31 ../../library/nis.rst:43 ../../library/nis.rst:51 +#: ../../library/nis.rst:35 ../../library/nis.rst:47 ../../library/nis.rst:55 msgid "" "The *domain* argument allows overriding the NIS domain used for the lookup. " "If unspecified, lookup is in the default NIS domain." msgstr "" -#: ../../library/nis.rst:37 +#: ../../library/nis.rst:41 msgid "" "Return a dictionary mapping *key* to *value* such that ``match(key, " "mapname)==value``. Note that both keys and values of the dictionary are " "arbitrary arrays of bytes." msgstr "" -#: ../../library/nis.rst:49 +#: ../../library/nis.rst:53 msgid "Return a list of all valid maps." msgstr "" -#: ../../library/nis.rst:57 +#: ../../library/nis.rst:61 msgid "Return the system default NIS domain." msgstr "" -#: ../../library/nis.rst:60 +#: ../../library/nis.rst:64 msgid "The :mod:`nis` module defines the following exception:" msgstr "" -#: ../../library/nis.rst:64 +#: ../../library/nis.rst:68 msgid "An error raised when a NIS function returns an error code." msgstr "" diff --git a/library/nntplib.po b/library/nntplib.po index c9e667bdd1..b11dbd864a 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-03-23 00:14+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-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`nntplib` --- NNTP protocol client" msgstr "" -#: ../../library/nntplib.rst:7 +#: ../../library/nntplib.rst:8 msgid "**Source code:** :source:`Lib/nntplib.py`" msgstr "**原始碼:**\\ :source:`Lib/nntplib.py`" -#: ../../library/nntplib.rst:15 +#: ../../library/nntplib.rst:14 +msgid "The :mod:`nntplib` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/nntplib.rst:19 msgid "" "This module defines the class :class:`NNTP` which implements the client side " "of the Network News Transfer Protocol. It can be used to implement a news " @@ -34,23 +38,23 @@ msgid "" "`3977` as well as the older :rfc:`977` and :rfc:`2980`." msgstr "" -#: ../../library/nntplib.rst:20 +#: ../../library/nntplib.rst:24 msgid "" "Here are two small examples of how it can be used. To list some statistics " "about a newsgroup and print the subjects of the last 10 articles::" msgstr "" -#: ../../library/nntplib.rst:44 +#: ../../library/nntplib.rst:48 msgid "" "To post an article from a binary file (this assumes that the article has " "valid headers, and that you have right to post on the particular newsgroup)::" msgstr "" -#: ../../library/nntplib.rst:54 +#: ../../library/nntplib.rst:58 msgid "The module itself defines the following classes:" msgstr "" -#: ../../library/nntplib.rst:59 +#: ../../library/nntplib.rst:63 msgid "" "Return a new :class:`NNTP` object, representing a connection to the NNTP " "server running on host *host*, listening at port *port*. An optional " @@ -68,40 +72,40 @@ msgid "" "close the NNTP connection when done, e.g.:" msgstr "" -#: ../../library/nntplib.rst:82 ../../library/nntplib.rst:114 +#: ../../library/nntplib.rst:86 ../../library/nntplib.rst:118 msgid "" "Raises an :ref:`auditing event ` ``nntplib.connect`` with " "arguments ``self``, ``host``, ``port``." msgstr "" -#: ../../library/nntplib.rst:84 ../../library/nntplib.rst:116 +#: ../../library/nntplib.rst:88 ../../library/nntplib.rst:120 msgid "" "Raises an :ref:`auditing event ` ``nntplib.putline`` with " "arguments ``self``, ``line``." msgstr "" -#: ../../library/nntplib.rst:86 ../../library/nntplib.rst:118 +#: ../../library/nntplib.rst:90 ../../library/nntplib.rst:122 msgid "" "All commands will raise an :ref:`auditing event ` ``nntplib." "putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes " "about to be sent to the remote host." msgstr "" -#: ../../library/nntplib.rst:90 +#: ../../library/nntplib.rst:94 msgid "*usenetrc* is now ``False`` by default." msgstr "" -#: ../../library/nntplib.rst:93 +#: ../../library/nntplib.rst:97 msgid "Support for the :keyword:`with` statement was added." msgstr "" -#: ../../library/nntplib.rst:96 ../../library/nntplib.rst:129 +#: ../../library/nntplib.rst:100 ../../library/nntplib.rst:133 msgid "" "If the *timeout* parameter is set to be zero, it will raise a :class:" "`ValueError` to prevent the creation of a non-blocking socket." msgstr "" -#: ../../library/nntplib.rst:102 +#: ../../library/nntplib.rst:106 msgid "" "Return a new :class:`NNTP_SSL` object, representing an encrypted connection " "to the NNTP server running on host *host*, listening at port *port*. :class:" @@ -112,85 +116,85 @@ msgid "" "`NNTP`." msgstr "" -#: ../../library/nntplib.rst:110 +#: ../../library/nntplib.rst:114 msgid "" "Note that SSL-on-563 is discouraged per :rfc:`4642`, in favor of STARTTLS as " "described below. However, some servers only support the former." msgstr "" -#: ../../library/nntplib.rst:124 +#: ../../library/nntplib.rst:128 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." msgstr "" -#: ../../library/nntplib.rst:135 +#: ../../library/nntplib.rst:139 msgid "" "Derived from the standard exception :exc:`Exception`, this is the base class " "for all exceptions raised by the :mod:`nntplib` module. Instances of this " "class have the following attribute:" msgstr "" -#: ../../library/nntplib.rst:141 +#: ../../library/nntplib.rst:145 msgid "The response of the server if available, as a :class:`str` object." msgstr "" -#: ../../library/nntplib.rst:146 +#: ../../library/nntplib.rst:150 msgid "Exception raised when an unexpected reply is received from the server." msgstr "" -#: ../../library/nntplib.rst:151 +#: ../../library/nntplib.rst:155 msgid "" "Exception raised when a response code in the range 400--499 is received." msgstr "" -#: ../../library/nntplib.rst:156 +#: ../../library/nntplib.rst:160 msgid "" "Exception raised when a response code in the range 500--599 is received." msgstr "" -#: ../../library/nntplib.rst:161 +#: ../../library/nntplib.rst:165 msgid "" "Exception raised when a reply is received from the server that does not " "begin with a digit in the range 1--5." msgstr "" -#: ../../library/nntplib.rst:167 +#: ../../library/nntplib.rst:171 msgid "Exception raised when there is some error in the response data." msgstr "" -#: ../../library/nntplib.rst:173 +#: ../../library/nntplib.rst:177 msgid "NNTP Objects" msgstr "NNTP 物件" -#: ../../library/nntplib.rst:175 +#: ../../library/nntplib.rst:179 msgid "" "When connected, :class:`NNTP` and :class:`NNTP_SSL` objects support the " "following methods and attributes." msgstr "" -#: ../../library/nntplib.rst:179 +#: ../../library/nntplib.rst:183 msgid "Attributes" msgstr "屬性" -#: ../../library/nntplib.rst:183 +#: ../../library/nntplib.rst:187 msgid "" "An integer representing the version of the NNTP protocol supported by the " "server. In practice, this should be ``2`` for servers advertising :rfc:" "`3977` compliance and ``1`` for others." msgstr "" -#: ../../library/nntplib.rst:191 +#: ../../library/nntplib.rst:195 msgid "" "A string describing the software name and version of the NNTP server, or :" "const:`None` if not advertised by the server." msgstr "" -#: ../../library/nntplib.rst:197 +#: ../../library/nntplib.rst:201 msgid "Methods" msgstr "" -#: ../../library/nntplib.rst:199 +#: ../../library/nntplib.rst:203 msgid "" "The *response* that is returned as the first item in the return tuple of " "almost all methods is the server's response: a string beginning with a three-" @@ -198,7 +202,7 @@ msgid "" "one of the above exceptions." msgstr "" -#: ../../library/nntplib.rst:204 +#: ../../library/nntplib.rst:208 msgid "" "Many of the following methods take an optional keyword-only argument *file*. " "When the *file* argument is supplied, it must be either a :term:`file " @@ -208,26 +212,26 @@ msgid "" "of lines, tuples or objects that the method normally returns will be empty." msgstr "" -#: ../../library/nntplib.rst:211 +#: ../../library/nntplib.rst:215 msgid "" "Many of the following methods have been reworked and fixed, which makes them " "incompatible with their 3.1 counterparts." msgstr "" -#: ../../library/nntplib.rst:218 +#: ../../library/nntplib.rst:222 msgid "" "Send a ``QUIT`` command and close the connection. Once this method has been " "called, no other methods of the NNTP object should be called." msgstr "" -#: ../../library/nntplib.rst:224 +#: ../../library/nntplib.rst:228 msgid "" "Return the welcome message sent by the server in reply to the initial " "connection. (This message sometimes contains disclaimers or help " "information that may be relevant to the user.)" msgstr "" -#: ../../library/nntplib.rst:231 +#: ../../library/nntplib.rst:235 msgid "" "Return the :rfc:`3977` capabilities advertised by the server, as a :class:" "`dict` instance mapping capability names to (possibly empty) lists of " @@ -235,14 +239,14 @@ msgid "" "command, an empty dictionary is returned instead." msgstr "" -#: ../../library/nntplib.rst:245 +#: ../../library/nntplib.rst:249 msgid "" "Send ``AUTHINFO`` commands with the user name and password. If *user* and " "*password* are ``None`` and *usenetrc* is true, credentials from ``~/." "netrc`` will be used if possible." msgstr "" -#: ../../library/nntplib.rst:249 +#: ../../library/nntplib.rst:253 msgid "" "Unless intentionally delayed, login is normally performed during the :class:" "`NNTP` object initialization and separately calling this function is " @@ -250,14 +254,14 @@ msgid "" "or *password* when creating the object, and must set *usenetrc* to False." msgstr "" -#: ../../library/nntplib.rst:260 +#: ../../library/nntplib.rst:264 msgid "" "Send a ``STARTTLS`` command. This will enable encryption on the NNTP " "connection. The *context* argument is optional and should be a :class:`ssl." "SSLContext` object. Please read :ref:`ssl-security` for best practices." msgstr "" -#: ../../library/nntplib.rst:265 +#: ../../library/nntplib.rst:269 msgid "" "Note that this may not be done after authentication information has been " "transmitted, and authentication occurs by default if possible during a :" @@ -265,13 +269,13 @@ msgid "" "on suppressing this behavior." msgstr "" -#: ../../library/nntplib.rst:272 +#: ../../library/nntplib.rst:276 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." msgstr "" -#: ../../library/nntplib.rst:279 +#: ../../library/nntplib.rst:283 msgid "" "Send a ``NEWGROUPS`` command. The *date* argument should be a :class:" "`datetime.date` or :class:`datetime.datetime` object. Return a pair " @@ -280,18 +284,18 @@ msgid "" "will be empty." msgstr "" -#: ../../library/nntplib.rst:295 +#: ../../library/nntplib.rst:299 msgid "" "Send a ``NEWNEWS`` command. Here, *group* is a group name or ``'*'``, and " "*date* has the same meaning as for :meth:`newgroups`. Return a pair " "``(response, articles)`` where *articles* is a list of message ids." msgstr "" -#: ../../library/nntplib.rst:299 +#: ../../library/nntplib.rst:303 msgid "This command is frequently disabled by NNTP server administrators." msgstr "" -#: ../../library/nntplib.rst:304 +#: ../../library/nntplib.rst:308 msgid "" "Send a ``LIST`` or ``LIST ACTIVE`` command. Return a pair ``(response, " "list)`` where *list* is a list of tuples representing all the groups " @@ -301,48 +305,48 @@ msgid "" "article numbers, and *flag* usually takes one of these values:" msgstr "" -#: ../../library/nntplib.rst:312 +#: ../../library/nntplib.rst:316 msgid "``y``: Local postings and articles from peers are allowed." msgstr "" -#: ../../library/nntplib.rst:313 +#: ../../library/nntplib.rst:317 msgid "``m``: The group is moderated and all postings must be approved." msgstr "" -#: ../../library/nntplib.rst:314 +#: ../../library/nntplib.rst:318 msgid "``n``: No local postings are allowed, only articles from peers." msgstr "" -#: ../../library/nntplib.rst:315 +#: ../../library/nntplib.rst:319 msgid "``j``: Articles from peers are filed in the junk group instead." msgstr "" -#: ../../library/nntplib.rst:316 +#: ../../library/nntplib.rst:320 msgid "``x``: No local postings, and articles from peers are ignored." msgstr "" -#: ../../library/nntplib.rst:317 +#: ../../library/nntplib.rst:321 msgid "``=foo.bar``: Articles are filed in the ``foo.bar`` group instead." msgstr "" -#: ../../library/nntplib.rst:319 +#: ../../library/nntplib.rst:323 msgid "" "If *flag* has another value, then the status of the newsgroup should be " "considered unknown." msgstr "" -#: ../../library/nntplib.rst:322 +#: ../../library/nntplib.rst:326 msgid "" "This command can return very large results, especially if *group_pattern* is " "not specified. It is best to cache the results offline unless you really " "need to refresh them." msgstr "" -#: ../../library/nntplib.rst:326 +#: ../../library/nntplib.rst:330 msgid "*group_pattern* was added." msgstr "新增 *group_pattern*\\ 。" -#: ../../library/nntplib.rst:332 +#: ../../library/nntplib.rst:336 msgid "" "Send a ``LIST NEWSGROUPS`` command, where *grouppattern* is a wildmat string " "as specified in :rfc:`3977` (it's essentially the same as DOS or UNIX shell " @@ -350,20 +354,20 @@ msgid "" "*descriptions* is a dictionary mapping group names to textual descriptions." msgstr "" -#: ../../library/nntplib.rst:346 +#: ../../library/nntplib.rst:350 msgid "" "Get a description for a single group *group*. If more than one group " "matches (if 'group' is a real wildmat string), return the first match. If " "no group matches, return an empty string." msgstr "" -#: ../../library/nntplib.rst:350 +#: ../../library/nntplib.rst:354 msgid "" "This elides the response code from the server. If the response code is " "needed, use :meth:`descriptions`." msgstr "" -#: ../../library/nntplib.rst:356 +#: ../../library/nntplib.rst:360 msgid "" "Send a ``GROUP`` command, where *name* is the group name. The group is " "selected as the current group, if it exists. Return a tuple ``(response, " @@ -372,7 +376,7 @@ msgid "" "*last* is the last article number in the group, and *name* is the group name." msgstr "" -#: ../../library/nntplib.rst:366 +#: ../../library/nntplib.rst:370 msgid "" "Send an ``OVER`` command, or an ``XOVER`` command on legacy servers. " "*message_spec* can be either a string representing a message id, or a " @@ -382,7 +386,7 @@ msgid "" "`None` to select the current article in the current group." msgstr "" -#: ../../library/nntplib.rst:373 +#: ../../library/nntplib.rst:377 msgid "" "Return a pair ``(response, overviews)``. *overviews* is a list of " "``(article_number, overview)`` tuples, one for each article selected by " @@ -393,40 +397,40 @@ msgid "" "following items are guaranteed to be present by the NNTP specification:" msgstr "" -#: ../../library/nntplib.rst:381 +#: ../../library/nntplib.rst:385 msgid "" "the ``subject``, ``from``, ``date``, ``message-id`` and ``references`` " "headers" msgstr "" -#: ../../library/nntplib.rst:383 +#: ../../library/nntplib.rst:387 msgid "" "the ``:bytes`` metadata: the number of bytes in the entire raw article " "(including headers and body)" msgstr "" -#: ../../library/nntplib.rst:385 +#: ../../library/nntplib.rst:389 msgid "the ``:lines`` metadata: the number of lines in the article body" msgstr "" -#: ../../library/nntplib.rst:387 +#: ../../library/nntplib.rst:391 msgid "" "The value of each item is either a string, or :const:`None` if not present." msgstr "" -#: ../../library/nntplib.rst:389 +#: ../../library/nntplib.rst:393 msgid "" "It is advisable to use the :func:`decode_header` function on header values " "when they may contain non-ASCII characters::" msgstr "" -#: ../../library/nntplib.rst:409 +#: ../../library/nntplib.rst:413 msgid "" "Send a ``HELP`` command. Return a pair ``(response, list)`` where *list* is " "a list of help strings." msgstr "" -#: ../../library/nntplib.rst:415 +#: ../../library/nntplib.rst:419 msgid "" "Send a ``STAT`` command, where *message_spec* is either a message id " "(enclosed in ``'<'`` and ``'>'``) or an article number in the current group. " @@ -435,15 +439,15 @@ msgid "" "where *number* is the article number and *id* is the message id." msgstr "" -#: ../../library/nntplib.rst:429 +#: ../../library/nntplib.rst:433 msgid "Send a ``NEXT`` command. Return as for :meth:`.stat`." msgstr "" -#: ../../library/nntplib.rst:434 +#: ../../library/nntplib.rst:438 msgid "Send a ``LAST`` command. Return as for :meth:`.stat`." msgstr "" -#: ../../library/nntplib.rst:439 +#: ../../library/nntplib.rst:443 msgid "" "Send an ``ARTICLE`` command, where *message_spec* has the same meaning as " "for :meth:`.stat`. Return a tuple ``(response, info)`` where *info* is a :" @@ -454,21 +458,21 @@ msgid "" "comprising the raw message including headers and body." msgstr "" -#: ../../library/nntplib.rst:464 +#: ../../library/nntplib.rst:468 msgid "" "Same as :meth:`article()`, but sends a ``HEAD`` command. The *lines* " "returned (or written to *file*) will only contain the message headers, not " "the body." msgstr "" -#: ../../library/nntplib.rst:471 +#: ../../library/nntplib.rst:475 msgid "" "Same as :meth:`article()`, but sends a ``BODY`` command. The *lines* " "returned (or written to *file*) will only contain the message body, not the " "headers." msgstr "" -#: ../../library/nntplib.rst:478 +#: ../../library/nntplib.rst:482 msgid "" "Post an article using the ``POST`` command. The *data* argument is either " "a :term:`file object` opened for binary reading, or any iterable of bytes " @@ -478,30 +482,30 @@ msgid "" "appends the termination line." msgstr "" -#: ../../library/nntplib.rst:485 +#: ../../library/nntplib.rst:489 msgid "" "If the method succeeds, the server's response is returned. If the server " "refuses posting, a :class:`NNTPReplyError` is raised." msgstr "" -#: ../../library/nntplib.rst:491 +#: ../../library/nntplib.rst:495 msgid "" "Send an ``IHAVE`` command. *message_id* is the id of the message to send to " "the server (enclosed in ``'<'`` and ``'>'``). The *data* parameter and the " "return value are the same as for :meth:`post()`." msgstr "" -#: ../../library/nntplib.rst:498 +#: ../../library/nntplib.rst:502 msgid "" "Return a pair ``(response, date)``. *date* is a :class:`~datetime.datetime` " "object containing the current date and time of the server." msgstr "" -#: ../../library/nntplib.rst:504 +#: ../../library/nntplib.rst:508 msgid "Send a ``SLAVE`` command. Return the server's *response*." msgstr "" -#: ../../library/nntplib.rst:509 +#: ../../library/nntplib.rst:513 msgid "" "Set the instance's debugging level. This controls the amount of debugging " "output printed. The default, ``0``, produces no debugging output. A value " @@ -511,13 +515,13 @@ msgid "" "the connection (including message text)." msgstr "" -#: ../../library/nntplib.rst:517 +#: ../../library/nntplib.rst:521 msgid "" "The following are optional NNTP extensions defined in :rfc:`2980`. Some of " "them have been superseded by newer commands in :rfc:`3977`." msgstr "" -#: ../../library/nntplib.rst:523 +#: ../../library/nntplib.rst:527 msgid "" "Send an ``XHDR`` command. The *hdr* argument is a header keyword, e.g. " "``'subject'``. The *str* argument should have the form ``'first-last'`` " @@ -532,7 +536,7 @@ msgid "" "*file* is supplied, then the returned *list* is an empty list." msgstr "" -#: ../../library/nntplib.rst:538 +#: ../../library/nntplib.rst:542 msgid "" "Send an ``XOVER`` command. *start* and *end* are article numbers delimiting " "the range of articles to select. The return value is the same of for :meth:" @@ -540,15 +544,15 @@ msgid "" "automatically use the newer ``OVER`` command if available." msgstr "" -#: ../../library/nntplib.rst:546 +#: ../../library/nntplib.rst:550 msgid "Utility functions" msgstr "" -#: ../../library/nntplib.rst:548 +#: ../../library/nntplib.rst:552 msgid "The module also defines the following utility function:" msgstr "" -#: ../../library/nntplib.rst:553 +#: ../../library/nntplib.rst:557 msgid "" "Decode a header value, un-escaping any escaped non-ASCII characters. " "*header_str* must be a :class:`str` object. The unescaped value is " diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index e1979420ec..0c31985d52 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-05 17:14+0800\n" +"POT-Creation-Date: 2022-03-23 00:14+0000\n" "PO-Revision-Date: 2017-09-22 18:27+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,7 +22,12 @@ msgstr "" msgid ":mod:`ossaudiodev` --- Access to OSS-compatible audio devices" msgstr "" -#: ../../library/ossaudiodev.rst:10 +#: ../../library/ossaudiodev.rst:9 +msgid "" +"The :mod:`ossaudiodev` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/ossaudiodev.rst:14 msgid "" "This module allows you to access the OSS (Open Sound System) audio " "interface. OSS is available for a wide range of open-source and commercial " @@ -30,39 +35,39 @@ msgid "" "FreeBSD." msgstr "" -#: ../../library/ossaudiodev.rst:42 +#: ../../library/ossaudiodev.rst:46 msgid "" "Operations in this module now raise :exc:`OSError` where :exc:`IOError` was " "raised." msgstr "" -#: ../../library/ossaudiodev.rst:50 +#: ../../library/ossaudiodev.rst:54 msgid "" "`Open Sound System Programmer's Guide `_" msgstr "" -#: ../../library/ossaudiodev.rst:50 +#: ../../library/ossaudiodev.rst:54 msgid "the official documentation for the OSS C API" msgstr "" -#: ../../library/ossaudiodev.rst:52 +#: ../../library/ossaudiodev.rst:56 msgid "" "The module defines a large number of constants supplied by the OSS device " "driver; see ```` on either Linux or FreeBSD for a listing." msgstr "" -#: ../../library/ossaudiodev.rst:55 +#: ../../library/ossaudiodev.rst:59 msgid ":mod:`ossaudiodev` defines the following variables and functions:" msgstr "" -#: ../../library/ossaudiodev.rst:60 +#: ../../library/ossaudiodev.rst:64 msgid "" "This exception is raised on certain errors. The argument is a string " "describing what went wrong." msgstr "" -#: ../../library/ossaudiodev.rst:63 +#: ../../library/ossaudiodev.rst:67 msgid "" "(If :mod:`ossaudiodev` receives an error from a system call such as :c:func:" "`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`OSError`. " @@ -70,13 +75,13 @@ msgid "" "`OSSAudioError`.)" msgstr "" -#: ../../library/ossaudiodev.rst:67 +#: ../../library/ossaudiodev.rst:71 msgid "" "(For backwards compatibility, the exception class is also available as " "``ossaudiodev.error``.)" msgstr "" -#: ../../library/ossaudiodev.rst:74 +#: ../../library/ossaudiodev.rst:78 msgid "" "Open an audio device and return an OSS audio device object. This object " "supports many file-like methods, such as :meth:`read`, :meth:`write`, and :" @@ -86,14 +91,14 @@ msgid "" "methods." msgstr "" -#: ../../library/ossaudiodev.rst:80 +#: ../../library/ossaudiodev.rst:84 msgid "" "*device* is the audio device filename to use. If it is not specified, this " "module first looks in the environment variable :envvar:`AUDIODEV` for a " "device to use. If not found, it falls back to :file:`/dev/dsp`." msgstr "" -#: ../../library/ossaudiodev.rst:84 +#: ../../library/ossaudiodev.rst:88 msgid "" "*mode* is one of ``'r'`` for read-only (record) access, ``'w'`` for write-" "only (playback) access and ``'rw'`` for both. Since many sound cards only " @@ -103,14 +108,14 @@ msgid "" "not both at once." msgstr "" -#: ../../library/ossaudiodev.rst:91 +#: ../../library/ossaudiodev.rst:95 msgid "" "Note the unusual calling syntax: the *first* argument is optional, and the " "second is required. This is a historical artifact for compatibility with " "the older :mod:`linuxaudiodev` module which :mod:`ossaudiodev` supersedes." msgstr "" -#: ../../library/ossaudiodev.rst:102 +#: ../../library/ossaudiodev.rst:106 msgid "" "Open a mixer device and return an OSS mixer device object. *device* is the " "mixer device filename to use. If it is not specified, this module first " @@ -118,53 +123,53 @@ msgid "" "If not found, it falls back to :file:`/dev/mixer`." msgstr "" -#: ../../library/ossaudiodev.rst:111 +#: ../../library/ossaudiodev.rst:115 msgid "Audio Device Objects" msgstr "" -#: ../../library/ossaudiodev.rst:113 +#: ../../library/ossaudiodev.rst:117 msgid "" "Before you can write to or read from an audio device, you must call three " "methods in the correct order:" msgstr "" -#: ../../library/ossaudiodev.rst:116 +#: ../../library/ossaudiodev.rst:120 msgid ":meth:`setfmt` to set the output format" msgstr "" -#: ../../library/ossaudiodev.rst:118 +#: ../../library/ossaudiodev.rst:122 msgid ":meth:`channels` to set the number of channels" msgstr "" -#: ../../library/ossaudiodev.rst:120 +#: ../../library/ossaudiodev.rst:124 msgid ":meth:`speed` to set the sample rate" msgstr "" -#: ../../library/ossaudiodev.rst:122 +#: ../../library/ossaudiodev.rst:126 msgid "" "Alternately, you can use the :meth:`setparameters` method to set all three " "audio parameters at once. This is more convenient, but may not be as " "flexible in all cases." msgstr "" -#: ../../library/ossaudiodev.rst:126 +#: ../../library/ossaudiodev.rst:130 msgid "" "The audio device objects returned by :func:`.open` define the following " "methods and (read-only) attributes:" msgstr "" -#: ../../library/ossaudiodev.rst:132 +#: ../../library/ossaudiodev.rst:136 msgid "" "Explicitly close the audio device. When you are done writing to or reading " "from an audio device, you should explicitly close it. A closed device " "cannot be used again." msgstr "" -#: ../../library/ossaudiodev.rst:139 +#: ../../library/ossaudiodev.rst:143 msgid "Return the file descriptor associated with the device." msgstr "" -#: ../../library/ossaudiodev.rst:144 +#: ../../library/ossaudiodev.rst:148 msgid "" "Read *size* bytes from the audio input and return them as a Python string. " "Unlike most Unix device drivers, OSS audio devices in blocking mode (the " @@ -172,7 +177,7 @@ msgid "" "is available." msgstr "" -#: ../../library/ossaudiodev.rst:152 +#: ../../library/ossaudiodev.rst:156 msgid "" "Write a :term:`bytes-like object` *data* to the audio device and return the " "number of bytes written. If the audio device is in blocking mode (the " @@ -181,11 +186,11 @@ msgid "" "data may not be written---see :meth:`writeall`." msgstr "" -#: ../../library/ossaudiodev.rst:158 ../../library/ossaudiodev.rst:172 +#: ../../library/ossaudiodev.rst:162 ../../library/ossaudiodev.rst:176 msgid "Writable :term:`bytes-like object` is now accepted." msgstr "" -#: ../../library/ossaudiodev.rst:164 +#: ../../library/ossaudiodev.rst:168 msgid "" "Write a :term:`bytes-like object` *data* to the audio device: waits until " "the audio device is able to accept data, writes as much data as it will " @@ -196,13 +201,13 @@ msgid "" "of data supplied." msgstr "" -#: ../../library/ossaudiodev.rst:176 +#: ../../library/ossaudiodev.rst:180 msgid "" "Audio device objects also support the context management protocol, i.e. they " "can be used in a :keyword:`with` statement." msgstr "" -#: ../../library/ossaudiodev.rst:181 +#: ../../library/ossaudiodev.rst:185 msgid "" "The following methods each map to exactly one :c:func:`ioctl` system call. " "The correspondence is obvious: for example, :meth:`setfmt` corresponds to " @@ -211,103 +216,103 @@ msgid "" "underlying :c:func:`ioctl` fails, they all raise :exc:`OSError`." msgstr "" -#: ../../library/ossaudiodev.rst:190 +#: ../../library/ossaudiodev.rst:194 msgid "" "Put the device into non-blocking mode. Once in non-blocking mode, there is " "no way to return it to blocking mode." msgstr "" -#: ../../library/ossaudiodev.rst:196 +#: ../../library/ossaudiodev.rst:200 msgid "" "Return a bitmask of the audio output formats supported by the soundcard. " "Some of the formats supported by OSS are:" msgstr "" -#: ../../library/ossaudiodev.rst:200 +#: ../../library/ossaudiodev.rst:204 msgid "Format" msgstr "格式" -#: ../../library/ossaudiodev.rst:200 ../../library/ossaudiodev.rst:254 +#: ../../library/ossaudiodev.rst:204 ../../library/ossaudiodev.rst:258 msgid "Description" msgstr "描述" -#: ../../library/ossaudiodev.rst:202 +#: ../../library/ossaudiodev.rst:206 msgid ":const:`AFMT_MU_LAW`" msgstr ":const:`AFMT_MU_LAW`" -#: ../../library/ossaudiodev.rst:202 +#: ../../library/ossaudiodev.rst:206 msgid "" "a logarithmic encoding (used by Sun ``.au`` files and :file:`/dev/audio`)" msgstr "" -#: ../../library/ossaudiodev.rst:205 +#: ../../library/ossaudiodev.rst:209 msgid ":const:`AFMT_A_LAW`" msgstr ":const:`AFMT_A_LAW`" -#: ../../library/ossaudiodev.rst:205 +#: ../../library/ossaudiodev.rst:209 msgid "a logarithmic encoding" msgstr "" -#: ../../library/ossaudiodev.rst:207 +#: ../../library/ossaudiodev.rst:211 msgid ":const:`AFMT_IMA_ADPCM`" msgstr ":const:`AFMT_IMA_ADPCM`" -#: ../../library/ossaudiodev.rst:207 +#: ../../library/ossaudiodev.rst:211 msgid "" "a 4:1 compressed format defined by the Interactive Multimedia Association" msgstr "" -#: ../../library/ossaudiodev.rst:210 +#: ../../library/ossaudiodev.rst:214 msgid ":const:`AFMT_U8`" msgstr ":const:`AFMT_U8`" -#: ../../library/ossaudiodev.rst:210 +#: ../../library/ossaudiodev.rst:214 msgid "Unsigned, 8-bit audio" msgstr "" -#: ../../library/ossaudiodev.rst:212 +#: ../../library/ossaudiodev.rst:216 msgid ":const:`AFMT_S16_LE`" msgstr ":const:`AFMT_S16_LE`" -#: ../../library/ossaudiodev.rst:212 +#: ../../library/ossaudiodev.rst:216 msgid "" "Signed, 16-bit audio, little-endian byte order (as used by Intel processors)" msgstr "" -#: ../../library/ossaudiodev.rst:215 +#: ../../library/ossaudiodev.rst:219 msgid ":const:`AFMT_S16_BE`" msgstr ":const:`AFMT_S16_BE`" -#: ../../library/ossaudiodev.rst:215 +#: ../../library/ossaudiodev.rst:219 msgid "" "Signed, 16-bit audio, big-endian byte order (as used by 68k, PowerPC, Sparc)" msgstr "" -#: ../../library/ossaudiodev.rst:218 +#: ../../library/ossaudiodev.rst:222 msgid ":const:`AFMT_S8`" msgstr ":const:`AFMT_S8`" -#: ../../library/ossaudiodev.rst:218 +#: ../../library/ossaudiodev.rst:222 msgid "Signed, 8 bit audio" msgstr "" -#: ../../library/ossaudiodev.rst:220 +#: ../../library/ossaudiodev.rst:224 msgid ":const:`AFMT_U16_LE`" msgstr ":const:`AFMT_U16_LE`" -#: ../../library/ossaudiodev.rst:220 +#: ../../library/ossaudiodev.rst:224 msgid "Unsigned, 16-bit little-endian audio" msgstr "" -#: ../../library/ossaudiodev.rst:222 +#: ../../library/ossaudiodev.rst:226 msgid ":const:`AFMT_U16_BE`" msgstr ":const:`AFMT_U16_BE`" -#: ../../library/ossaudiodev.rst:222 +#: ../../library/ossaudiodev.rst:226 msgid "Unsigned, 16-bit big-endian audio" msgstr "" -#: ../../library/ossaudiodev.rst:225 +#: ../../library/ossaudiodev.rst:229 msgid "" "Consult the OSS documentation for a full list of audio formats, and note " "that most devices support only a subset of these formats. Some older " @@ -315,7 +320,7 @@ msgid "" "const:`AFMT_S16_LE`." msgstr "" -#: ../../library/ossaudiodev.rst:233 +#: ../../library/ossaudiodev.rst:237 msgid "" "Try to set the current audio format to *format*---see :meth:`getfmts` for a " "list. Returns the audio format that the device was set to, which may not be " @@ -323,7 +328,7 @@ msgid "" "do this by passing an \"audio format\" of :const:`AFMT_QUERY`." msgstr "" -#: ../../library/ossaudiodev.rst:241 +#: ../../library/ossaudiodev.rst:245 msgid "" "Set the number of output channels to *nchannels*. A value of 1 indicates " "monophonic sound, 2 stereophonic. Some devices may have more than 2 " @@ -331,68 +336,68 @@ msgid "" "of channels the device was set to." msgstr "" -#: ../../library/ossaudiodev.rst:249 +#: ../../library/ossaudiodev.rst:253 msgid "" "Try to set the audio sampling rate to *samplerate* samples per second. " "Returns the rate actually set. Most sound devices don't support arbitrary " "sampling rates. Common rates are:" msgstr "" -#: ../../library/ossaudiodev.rst:254 +#: ../../library/ossaudiodev.rst:258 msgid "Rate" msgstr "" -#: ../../library/ossaudiodev.rst:256 +#: ../../library/ossaudiodev.rst:260 msgid "8000" msgstr "8000" -#: ../../library/ossaudiodev.rst:256 +#: ../../library/ossaudiodev.rst:260 msgid "default rate for :file:`/dev/audio`" msgstr "" -#: ../../library/ossaudiodev.rst:258 +#: ../../library/ossaudiodev.rst:262 msgid "11025" msgstr "11025" -#: ../../library/ossaudiodev.rst:258 +#: ../../library/ossaudiodev.rst:262 msgid "speech recording" msgstr "" -#: ../../library/ossaudiodev.rst:260 +#: ../../library/ossaudiodev.rst:264 msgid "22050" msgstr "22050" -#: ../../library/ossaudiodev.rst:262 +#: ../../library/ossaudiodev.rst:266 msgid "44100" msgstr "44100" -#: ../../library/ossaudiodev.rst:262 +#: ../../library/ossaudiodev.rst:266 msgid "CD quality audio (at 16 bits/sample and 2 channels)" msgstr "" -#: ../../library/ossaudiodev.rst:265 +#: ../../library/ossaudiodev.rst:269 msgid "96000" msgstr "96000" -#: ../../library/ossaudiodev.rst:265 +#: ../../library/ossaudiodev.rst:269 msgid "DVD quality audio (at 24 bits/sample)" msgstr "" -#: ../../library/ossaudiodev.rst:271 +#: ../../library/ossaudiodev.rst:275 msgid "" "Wait until the sound device has played every byte in its buffer. (This " "happens implicitly when the device is closed.) The OSS documentation " "recommends closing and re-opening the device rather than using :meth:`sync`." msgstr "" -#: ../../library/ossaudiodev.rst:278 +#: ../../library/ossaudiodev.rst:282 msgid "" "Immediately stop playing or recording and return the device to a state where " "it can accept commands. The OSS documentation recommends closing and re-" "opening the device after calling :meth:`reset`." msgstr "" -#: ../../library/ossaudiodev.rst:285 +#: ../../library/ossaudiodev.rst:289 msgid "" "Tell the driver that there is likely to be a pause in the output, making it " "possible for the device to handle the pause more intelligently. You might " @@ -400,13 +405,13 @@ msgid "" "or before doing disk I/O." msgstr "" -#: ../../library/ossaudiodev.rst:290 +#: ../../library/ossaudiodev.rst:294 msgid "" "The following convenience methods combine several ioctls, or one ioctl and " "some simple calculations." msgstr "" -#: ../../library/ossaudiodev.rst:296 +#: ../../library/ossaudiodev.rst:300 msgid "" "Set the key audio sampling parameters---sample format, number of channels, " "and sampling rate---in one method call. *format*, *nchannels*, and " @@ -419,79 +424,79 @@ msgid "" "`channels`, and :meth:`speed`)." msgstr "" -#: ../../library/ossaudiodev.rst:306 +#: ../../library/ossaudiodev.rst:310 msgid "For example, ::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/ossaudiodev.rst:310 +#: ../../library/ossaudiodev.rst:314 msgid "is equivalent to ::" msgstr "" "等價於:\n" "\n" "::" -#: ../../library/ossaudiodev.rst:319 +#: ../../library/ossaudiodev.rst:323 msgid "Returns the size of the hardware buffer, in samples." msgstr "" -#: ../../library/ossaudiodev.rst:324 +#: ../../library/ossaudiodev.rst:328 msgid "" "Returns the number of samples that are in the hardware buffer yet to be " "played." msgstr "" -#: ../../library/ossaudiodev.rst:329 +#: ../../library/ossaudiodev.rst:333 msgid "" "Returns the number of samples that could be queued into the hardware buffer " "to be played without blocking." msgstr "" -#: ../../library/ossaudiodev.rst:332 +#: ../../library/ossaudiodev.rst:336 msgid "Audio device objects also support several read-only attributes:" msgstr "" -#: ../../library/ossaudiodev.rst:337 +#: ../../library/ossaudiodev.rst:341 msgid "Boolean indicating whether the device has been closed." msgstr "" -#: ../../library/ossaudiodev.rst:342 +#: ../../library/ossaudiodev.rst:346 msgid "String containing the name of the device file." msgstr "" -#: ../../library/ossaudiodev.rst:347 +#: ../../library/ossaudiodev.rst:351 msgid "The I/O mode for the file, either ``\"r\"``, ``\"rw\"``, or ``\"w\"``." msgstr "" -#: ../../library/ossaudiodev.rst:353 +#: ../../library/ossaudiodev.rst:357 msgid "Mixer Device Objects" msgstr "" -#: ../../library/ossaudiodev.rst:355 +#: ../../library/ossaudiodev.rst:359 msgid "The mixer object provides two file-like methods:" msgstr "" -#: ../../library/ossaudiodev.rst:360 +#: ../../library/ossaudiodev.rst:364 msgid "" "This method closes the open mixer device file. Any further attempts to use " "the mixer after this file is closed will raise an :exc:`OSError`." msgstr "" -#: ../../library/ossaudiodev.rst:366 +#: ../../library/ossaudiodev.rst:370 msgid "Returns the file handle number of the open mixer device file." msgstr "" -#: ../../library/ossaudiodev.rst:368 +#: ../../library/ossaudiodev.rst:372 msgid "Mixer objects also support the context management protocol." msgstr "" -#: ../../library/ossaudiodev.rst:372 +#: ../../library/ossaudiodev.rst:376 msgid "The remaining methods are specific to audio mixing:" msgstr "" -#: ../../library/ossaudiodev.rst:377 +#: ../../library/ossaudiodev.rst:381 msgid "" "This method returns a bitmask specifying the available mixer controls " "(\"Control\" being a specific mixable \"channel\", such as :const:" @@ -501,7 +506,7 @@ msgid "" "mixer object supports a PCM mixer, use the following Python code::" msgstr "" -#: ../../library/ossaudiodev.rst:389 +#: ../../library/ossaudiodev.rst:393 msgid "" "For most purposes, the :const:`SOUND_MIXER_VOLUME` (master volume) and :" "const:`SOUND_MIXER_PCM` controls should suffice---but code that uses the " @@ -509,7 +514,7 @@ msgid "" "Gravis Ultrasound, for example, :const:`SOUND_MIXER_VOLUME` does not exist." msgstr "" -#: ../../library/ossaudiodev.rst:397 +#: ../../library/ossaudiodev.rst:401 msgid "" "Returns a bitmask indicating stereo mixer controls. If a bit is set, the " "corresponding control is stereo; if it is unset, the control is either " @@ -517,20 +522,20 @@ msgid "" "`controls` to determine which)." msgstr "" -#: ../../library/ossaudiodev.rst:402 +#: ../../library/ossaudiodev.rst:406 msgid "" "See the code example for the :meth:`controls` function for an example of " "getting data from a bitmask." msgstr "" -#: ../../library/ossaudiodev.rst:408 +#: ../../library/ossaudiodev.rst:412 msgid "" "Returns a bitmask specifying the mixer controls that may be used to record. " "See the code example for :meth:`controls` for an example of reading from a " "bitmask." msgstr "" -#: ../../library/ossaudiodev.rst:414 +#: ../../library/ossaudiodev.rst:418 msgid "" "Returns the volume of a given mixer control. The returned volume is a 2-" "tuple ``(left_volume,right_volume)``. Volumes are specified as numbers from " @@ -538,13 +543,13 @@ msgid "" "still returned, but both volumes are the same." msgstr "" -#: ../../library/ossaudiodev.rst:419 +#: ../../library/ossaudiodev.rst:423 msgid "" "Raises :exc:`OSSAudioError` if an invalid control is specified, or :exc:" "`OSError` if an unsupported control is specified." msgstr "" -#: ../../library/ossaudiodev.rst:425 +#: ../../library/ossaudiodev.rst:429 msgid "" "Sets the volume for a given mixer control to ``(left,right)``. ``left`` and " "``right`` must be ints and between 0 (silent) and 100 (full volume). On " @@ -553,19 +558,19 @@ msgid "" "of some soundcard's mixers." msgstr "" -#: ../../library/ossaudiodev.rst:431 +#: ../../library/ossaudiodev.rst:435 msgid "" "Raises :exc:`OSSAudioError` if an invalid mixer control was specified, or if " "the specified volumes were out-of-range." msgstr "" -#: ../../library/ossaudiodev.rst:437 +#: ../../library/ossaudiodev.rst:441 msgid "" "This method returns a bitmask indicating which control(s) are currently " "being used as a recording source." msgstr "" -#: ../../library/ossaudiodev.rst:443 +#: ../../library/ossaudiodev.rst:447 msgid "" "Call this function to specify a recording source. Returns a bitmask " "indicating the new recording source (or sources) if successful; raises :exc:" diff --git a/library/pipes.po b/library/pipes.po index 2125135192..6357620693 100644 --- a/library/pipes.po +++ b/library/pipes.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-03-23 00:14+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-" @@ -22,71 +22,75 @@ msgstr "" msgid ":mod:`pipes` --- Interface to shell pipelines" msgstr "" -#: ../../library/pipes.rst:10 +#: ../../library/pipes.rst:11 msgid "**Source code:** :source:`Lib/pipes.py`" msgstr "**原始碼:**\\ :source:`Lib/pipes.py`" -#: ../../library/pipes.rst:14 +#: ../../library/pipes.rst:13 +msgid "The :mod:`pipes` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/pipes.rst:18 msgid "" "The :mod:`pipes` module defines a class to abstract the concept of a " "*pipeline* --- a sequence of converters from one file to another." msgstr "" -#: ../../library/pipes.rst:17 +#: ../../library/pipes.rst:21 msgid "" "Because the module uses :program:`/bin/sh` command lines, a POSIX or " "compatible shell for :func:`os.system` and :func:`os.popen` is required." msgstr "" -#: ../../library/pipes.rst:21 +#: ../../library/pipes.rst:25 msgid ":ref:`Availability `: Unix. Not available on VxWorks." msgstr ":ref:`適用 `:Unix,VxWorks 上不支援。" -#: ../../library/pipes.rst:22 +#: ../../library/pipes.rst:26 msgid "The :mod:`pipes` module defines the following class:" msgstr "" -#: ../../library/pipes.rst:27 +#: ../../library/pipes.rst:31 msgid "An abstraction of a pipeline." msgstr "" -#: ../../library/pipes.rst:29 +#: ../../library/pipes.rst:33 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/pipes.rst:44 +#: ../../library/pipes.rst:48 msgid "Template Objects" msgstr "" -#: ../../library/pipes.rst:46 +#: ../../library/pipes.rst:50 msgid "Template objects following methods:" msgstr "" -#: ../../library/pipes.rst:51 +#: ../../library/pipes.rst:55 msgid "Restore a pipeline template to its initial state." msgstr "" -#: ../../library/pipes.rst:56 +#: ../../library/pipes.rst:60 msgid "Return a new, equivalent, pipeline template." msgstr "" -#: ../../library/pipes.rst:61 +#: ../../library/pipes.rst:65 msgid "" "If *flag* is true, turn debugging on. Otherwise, turn debugging off. When " "debugging is on, commands to be executed are printed, and the shell is given " "``set -x`` command to be more verbose." msgstr "" -#: ../../library/pipes.rst:68 +#: ../../library/pipes.rst:72 msgid "" "Append a new action at the end. The *cmd* variable must be a valid bourne " "shell command. The *kind* variable consists of two letters." msgstr "" -#: ../../library/pipes.rst:71 +#: ../../library/pipes.rst:75 msgid "" "The first letter can be either of ``'-'`` (which means the command reads its " "standard input), ``'f'`` (which means the commands reads a given file on the " @@ -94,7 +98,7 @@ msgid "" "must be first.)" msgstr "" -#: ../../library/pipes.rst:76 +#: ../../library/pipes.rst:80 msgid "" "Similarly, the second letter can be either of ``'-'`` (which means the " "command writes to standard output), ``'f'`` (which means the command writes " @@ -102,18 +106,18 @@ msgid "" "write anything, and hence must be last.)" msgstr "" -#: ../../library/pipes.rst:84 +#: ../../library/pipes.rst:88 msgid "" "Add a new action at the beginning. See :meth:`append` for explanations of " "the arguments." msgstr "" -#: ../../library/pipes.rst:90 +#: ../../library/pipes.rst:94 msgid "" "Return a file-like object, open to *file*, but read from or written to by " "the pipeline. Note that only one of ``'r'``, ``'w'`` may be given." msgstr "" -#: ../../library/pipes.rst:96 +#: ../../library/pipes.rst:100 msgid "Copy *infile* to *outfile* through the pipe." msgstr "" diff --git a/library/sndhdr.po b/library/sndhdr.po index 64d1ed9372..b2e122e36a 100644 --- a/library/sndhdr.po +++ b/library/sndhdr.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-03-23 00:14+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-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`sndhdr` --- Determine type of sound file" msgstr "" -#: ../../library/sndhdr.rst:10 +#: ../../library/sndhdr.rst:11 msgid "**Source code:** :source:`Lib/sndhdr.py`" msgstr "**原始碼:**\\ :source:`Lib/sndhdr.py`" -#: ../../library/sndhdr.rst:18 +#: ../../library/sndhdr.rst:17 +msgid "The :mod:`sndhdr` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/sndhdr.rst:22 msgid "" "The :mod:`sndhdr` provides utility functions which attempt to determine the " "type of sound data which is in a file. When these functions are able to " @@ -44,18 +48,18 @@ msgid "" "``'A'`` for A-LAW or ``'U'`` for u-LAW." msgstr "" -#: ../../library/sndhdr.rst:35 +#: ../../library/sndhdr.rst:39 msgid "" "Determines the type of sound data stored in the file *filename* using :func:" "`whathdr`. If it succeeds, returns a namedtuple as described above, " "otherwise ``None`` is returned." msgstr "" -#: ../../library/sndhdr.rst:39 ../../library/sndhdr.rst:49 +#: ../../library/sndhdr.rst:43 ../../library/sndhdr.rst:53 msgid "Result changed from a tuple to a namedtuple." msgstr "" -#: ../../library/sndhdr.rst:45 +#: ../../library/sndhdr.rst:49 msgid "" "Determines the type of sound data stored in a file based on the file " "header. The name of the file is given by *filename*. This function returns " diff --git a/library/spwd.po b/library/spwd.po index 5e2c71db5a..ea49f0e6b4 100644 --- a/library/spwd.po +++ b/library/spwd.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-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,183 +22,187 @@ msgstr "" msgid ":mod:`spwd` --- The shadow password database" msgstr "" -#: ../../library/spwd.rst:10 +#: ../../library/spwd.rst:9 +msgid "The :mod:`spwd` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/spwd.rst:14 msgid "" "This module provides access to the Unix shadow password database. It is " "available on various Unix versions." msgstr "" -#: ../../library/spwd.rst:13 +#: ../../library/spwd.rst:17 msgid "" "You must have enough privileges to access the shadow password database (this " "usually means you have to be root)." msgstr "" -#: ../../library/spwd.rst:16 +#: ../../library/spwd.rst:20 msgid "" "Shadow password database entries are reported as a tuple-like object, whose " "attributes correspond to the members of the ``spwd`` structure (Attribute " "field below, see ````):" msgstr "" -#: ../../library/spwd.rst:21 +#: ../../library/spwd.rst:25 msgid "Index" msgstr "" -#: ../../library/spwd.rst:21 +#: ../../library/spwd.rst:25 msgid "Attribute" msgstr "屬性" -#: ../../library/spwd.rst:21 +#: ../../library/spwd.rst:25 msgid "Meaning" msgstr "" -#: ../../library/spwd.rst:23 +#: ../../library/spwd.rst:27 msgid "0" msgstr "0" -#: ../../library/spwd.rst:23 +#: ../../library/spwd.rst:27 msgid "``sp_namp``" msgstr "``sp_namp``" -#: ../../library/spwd.rst:23 +#: ../../library/spwd.rst:27 msgid "Login name" msgstr "" -#: ../../library/spwd.rst:25 +#: ../../library/spwd.rst:29 msgid "1" msgstr "1" -#: ../../library/spwd.rst:25 +#: ../../library/spwd.rst:29 msgid "``sp_pwdp``" msgstr "``sp_pwdp``" -#: ../../library/spwd.rst:25 +#: ../../library/spwd.rst:29 msgid "Encrypted password" msgstr "" -#: ../../library/spwd.rst:27 +#: ../../library/spwd.rst:31 msgid "2" msgstr "2" -#: ../../library/spwd.rst:27 +#: ../../library/spwd.rst:31 msgid "``sp_lstchg``" msgstr "``sp_lstchg``" -#: ../../library/spwd.rst:27 +#: ../../library/spwd.rst:31 msgid "Date of last change" msgstr "" -#: ../../library/spwd.rst:29 +#: ../../library/spwd.rst:33 msgid "3" msgstr "3" -#: ../../library/spwd.rst:29 +#: ../../library/spwd.rst:33 msgid "``sp_min``" msgstr "``sp_min``" -#: ../../library/spwd.rst:29 +#: ../../library/spwd.rst:33 msgid "Minimal number of days between changes" msgstr "" -#: ../../library/spwd.rst:32 +#: ../../library/spwd.rst:36 msgid "4" msgstr "4" -#: ../../library/spwd.rst:32 +#: ../../library/spwd.rst:36 msgid "``sp_max``" msgstr "``sp_max``" -#: ../../library/spwd.rst:32 +#: ../../library/spwd.rst:36 msgid "Maximum number of days between changes" msgstr "" -#: ../../library/spwd.rst:35 +#: ../../library/spwd.rst:39 msgid "5" msgstr "5" -#: ../../library/spwd.rst:35 +#: ../../library/spwd.rst:39 msgid "``sp_warn``" msgstr "``sp_warn``" -#: ../../library/spwd.rst:35 +#: ../../library/spwd.rst:39 msgid "Number of days before password expires to warn user about it" msgstr "" -#: ../../library/spwd.rst:38 +#: ../../library/spwd.rst:42 msgid "6" msgstr "6" -#: ../../library/spwd.rst:38 +#: ../../library/spwd.rst:42 msgid "``sp_inact``" msgstr "``sp_inact``" -#: ../../library/spwd.rst:38 +#: ../../library/spwd.rst:42 msgid "Number of days after password expires until account is disabled" msgstr "" -#: ../../library/spwd.rst:42 +#: ../../library/spwd.rst:46 msgid "7" msgstr "7" -#: ../../library/spwd.rst:42 +#: ../../library/spwd.rst:46 msgid "``sp_expire``" msgstr "``sp_expire``" -#: ../../library/spwd.rst:42 +#: ../../library/spwd.rst:46 msgid "Number of days since 1970-01-01 when account expires" msgstr "" -#: ../../library/spwd.rst:45 +#: ../../library/spwd.rst:49 msgid "8" msgstr "8" -#: ../../library/spwd.rst:45 +#: ../../library/spwd.rst:49 msgid "``sp_flag``" msgstr "``sp_flag``" -#: ../../library/spwd.rst:45 +#: ../../library/spwd.rst:49 msgid "Reserved" msgstr "" -#: ../../library/spwd.rst:48 +#: ../../library/spwd.rst:52 msgid "" "The sp_namp and sp_pwdp items are strings, all others are integers. :exc:" "`KeyError` is raised if the entry asked for cannot be found." msgstr "" -#: ../../library/spwd.rst:51 +#: ../../library/spwd.rst:55 msgid "The following functions are defined:" msgstr "" -#: ../../library/spwd.rst:56 +#: ../../library/spwd.rst:60 msgid "Return the shadow password database entry for the given user name." msgstr "" -#: ../../library/spwd.rst:58 +#: ../../library/spwd.rst:62 msgid "" "Raises a :exc:`PermissionError` instead of :exc:`KeyError` if the user " "doesn't have privileges." msgstr "" -#: ../../library/spwd.rst:64 +#: ../../library/spwd.rst:68 msgid "" "Return a list of all available shadow password database entries, in " "arbitrary order." msgstr "" -#: ../../library/spwd.rst:71 +#: ../../library/spwd.rst:75 msgid "Module :mod:`grp`" msgstr ":mod:`grp` 模組" -#: ../../library/spwd.rst:71 +#: ../../library/spwd.rst:75 msgid "An interface to the group database, similar to this." msgstr "" -#: ../../library/spwd.rst:73 +#: ../../library/spwd.rst:77 msgid "Module :mod:`pwd`" msgstr ":mod:`pwd` 模組" -#: ../../library/spwd.rst:74 +#: ../../library/spwd.rst:78 msgid "An interface to the normal password database, similar to this." msgstr "" diff --git a/library/sunau.po b/library/sunau.po index d4998c1851..d6fc2e22de 100644 --- a/library/sunau.po +++ b/library/sunau.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-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,329 +22,334 @@ msgstr "" msgid ":mod:`sunau` --- Read and write Sun AU files" msgstr "" -#: ../../library/sunau.rst:9 +#: ../../library/sunau.rst:10 msgid "**Source code:** :source:`Lib/sunau.py`" msgstr "**原始碼:**\\ :source:`Lib/sunau.py`" -#: ../../library/sunau.rst:13 +#: ../../library/sunau.rst:12 +#, fuzzy +msgid "The :mod:`sunau` module is deprecated (see :pep:`594` for details)." +msgstr ":mod:`sunau` 模組定義了以下例外:" + +#: ../../library/sunau.rst:17 msgid "" "The :mod:`sunau` module provides a convenient interface to the Sun AU sound " "format. Note that this module is interface-compatible with the modules :mod:" "`aifc` and :mod:`wave`." msgstr "" -#: ../../library/sunau.rst:17 +#: ../../library/sunau.rst:21 msgid "" "An audio file consists of a header followed by the data. The fields of the " "header are:" msgstr "" -#: ../../library/sunau.rst:21 +#: ../../library/sunau.rst:25 msgid "Field" msgstr "欄位" -#: ../../library/sunau.rst:21 +#: ../../library/sunau.rst:25 msgid "Contents" msgstr "內容" -#: ../../library/sunau.rst:23 +#: ../../library/sunau.rst:27 msgid "magic word" msgstr "" -#: ../../library/sunau.rst:23 +#: ../../library/sunau.rst:27 msgid "The four bytes ``.snd``." msgstr "" -#: ../../library/sunau.rst:25 +#: ../../library/sunau.rst:29 msgid "header size" msgstr "" -#: ../../library/sunau.rst:25 +#: ../../library/sunau.rst:29 msgid "Size of the header, including info, in bytes." msgstr "" -#: ../../library/sunau.rst:27 +#: ../../library/sunau.rst:31 msgid "data size" msgstr "" -#: ../../library/sunau.rst:27 +#: ../../library/sunau.rst:31 msgid "Physical size of the data, in bytes." msgstr "" -#: ../../library/sunau.rst:29 +#: ../../library/sunau.rst:33 msgid "encoding" msgstr "" -#: ../../library/sunau.rst:29 +#: ../../library/sunau.rst:33 msgid "Indicates how the audio samples are encoded." msgstr "" -#: ../../library/sunau.rst:31 +#: ../../library/sunau.rst:35 msgid "sample rate" msgstr "" -#: ../../library/sunau.rst:31 +#: ../../library/sunau.rst:35 msgid "The sampling rate." msgstr "" -#: ../../library/sunau.rst:33 +#: ../../library/sunau.rst:37 msgid "# of channels" msgstr "" -#: ../../library/sunau.rst:33 +#: ../../library/sunau.rst:37 msgid "The number of channels in the samples." msgstr "" -#: ../../library/sunau.rst:35 +#: ../../library/sunau.rst:39 msgid "info" msgstr "" -#: ../../library/sunau.rst:35 +#: ../../library/sunau.rst:39 msgid "" "ASCII string giving a description of the audio file (padded with null bytes)." msgstr "" -#: ../../library/sunau.rst:39 +#: ../../library/sunau.rst:43 msgid "" "Apart from the info field, all header fields are 4 bytes in size. They are " "all 32-bit unsigned integers encoded in big-endian byte order." msgstr "" -#: ../../library/sunau.rst:42 +#: ../../library/sunau.rst:46 msgid "The :mod:`sunau` module defines the following functions:" msgstr "" -#: ../../library/sunau.rst:47 +#: ../../library/sunau.rst:51 msgid "" "If *file* is a string, open the file by that name, otherwise treat it as a " "seekable file-like object. *mode* can be any of" msgstr "" -#: ../../library/sunau.rst:51 +#: ../../library/sunau.rst:55 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/sunau.rst:51 +#: ../../library/sunau.rst:55 msgid "Read only mode." msgstr "" -#: ../../library/sunau.rst:54 +#: ../../library/sunau.rst:58 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/sunau.rst:54 +#: ../../library/sunau.rst:58 msgid "Write only mode." msgstr "" -#: ../../library/sunau.rst:56 +#: ../../library/sunau.rst:60 msgid "Note that it does not allow read/write files." msgstr "" -#: ../../library/sunau.rst:58 +#: ../../library/sunau.rst:62 msgid "" "A *mode* of ``'r'`` returns an :class:`AU_read` object, while a *mode* of " "``'w'`` or ``'wb'`` returns an :class:`AU_write` object." msgstr "" -#: ../../library/sunau.rst:62 +#: ../../library/sunau.rst:66 msgid "The :mod:`sunau` module defines the following exception:" msgstr ":mod:`sunau` 模組定義了以下例外:" -#: ../../library/sunau.rst:66 +#: ../../library/sunau.rst:70 msgid "" "An error raised when something is impossible because of Sun AU specs or " "implementation deficiency." msgstr "" -#: ../../library/sunau.rst:70 +#: ../../library/sunau.rst:74 msgid "The :mod:`sunau` module defines the following data items:" msgstr "" -#: ../../library/sunau.rst:74 +#: ../../library/sunau.rst:78 msgid "" "An integer every valid Sun AU file begins with, stored in big-endian form. " "This is the string ``.snd`` interpreted as an integer." msgstr "" -#: ../../library/sunau.rst:85 +#: ../../library/sunau.rst:89 msgid "" "Values of the encoding field from the AU header which are supported by this " "module." msgstr "" -#: ../../library/sunau.rst:96 +#: ../../library/sunau.rst:100 msgid "" "Additional known values of the encoding field from the AU header, but which " "are not supported by this module." msgstr "" -#: ../../library/sunau.rst:103 +#: ../../library/sunau.rst:107 msgid "AU_read Objects" msgstr "AU_read 物件" -#: ../../library/sunau.rst:105 +#: ../../library/sunau.rst:109 msgid "" "AU_read objects, as returned by :func:`.open` above, have the following " "methods:" msgstr "" -#: ../../library/sunau.rst:110 +#: ../../library/sunau.rst:114 msgid "" "Close the stream, and make the instance unusable. (This is called " "automatically on deletion.)" msgstr "" -#: ../../library/sunau.rst:116 +#: ../../library/sunau.rst:120 msgid "Returns number of audio channels (1 for mono, 2 for stereo)." msgstr "" -#: ../../library/sunau.rst:121 +#: ../../library/sunau.rst:125 msgid "Returns sample width in bytes." msgstr "" -#: ../../library/sunau.rst:126 +#: ../../library/sunau.rst:130 msgid "Returns sampling frequency." msgstr "" -#: ../../library/sunau.rst:131 +#: ../../library/sunau.rst:135 msgid "Returns number of audio frames." msgstr "" -#: ../../library/sunau.rst:136 +#: ../../library/sunau.rst:140 msgid "" "Returns compression type. Supported compression types are ``'ULAW'``, " "``'ALAW'`` and ``'NONE'``." msgstr "" -#: ../../library/sunau.rst:142 +#: ../../library/sunau.rst:146 msgid "" "Human-readable version of :meth:`getcomptype`. The supported types have the " "respective names ``'CCITT G.711 u-law'``, ``'CCITT G.711 A-law'`` and ``'not " "compressed'``." msgstr "" -#: ../../library/sunau.rst:149 +#: ../../library/sunau.rst:153 msgid "" "Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " "framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" "`get\\*` methods." msgstr "" -#: ../../library/sunau.rst:156 +#: ../../library/sunau.rst:160 msgid "" "Reads and returns at most *n* frames of audio, as a :class:`bytes` object. " "The data will be returned in linear format. If the original data is in u-" "LAW format, it will be converted." msgstr "" -#: ../../library/sunau.rst:163 +#: ../../library/sunau.rst:167 msgid "Rewind the file pointer to the beginning of the audio stream." msgstr "" -#: ../../library/sunau.rst:165 +#: ../../library/sunau.rst:169 msgid "" "The following two methods define a term \"position\" which is compatible " "between them, and is otherwise implementation dependent." msgstr "" -#: ../../library/sunau.rst:171 +#: ../../library/sunau.rst:175 msgid "" "Set the file pointer to the specified position. Only values returned from :" "meth:`tell` should be used for *pos*." msgstr "" -#: ../../library/sunau.rst:177 +#: ../../library/sunau.rst:181 msgid "" "Return current file pointer position. Note that the returned value has " "nothing to do with the actual position in the file." msgstr "" -#: ../../library/sunau.rst:180 +#: ../../library/sunau.rst:184 msgid "" "The following two functions are defined for compatibility with the :mod:" "`aifc`, and don't do anything interesting." msgstr "" -#: ../../library/sunau.rst:186 +#: ../../library/sunau.rst:190 msgid "Returns ``None``." msgstr "" -#: ../../library/sunau.rst:191 +#: ../../library/sunau.rst:195 msgid "Raise an error." msgstr "" -#: ../../library/sunau.rst:197 +#: ../../library/sunau.rst:201 msgid "AU_write Objects" msgstr "AU_write 物件" -#: ../../library/sunau.rst:199 +#: ../../library/sunau.rst:203 msgid "" "AU_write objects, as returned by :func:`.open` above, have the following " "methods:" msgstr "" -#: ../../library/sunau.rst:204 +#: ../../library/sunau.rst:208 msgid "Set the number of channels." msgstr "" -#: ../../library/sunau.rst:209 +#: ../../library/sunau.rst:213 msgid "Set the sample width (in bytes.)" msgstr "" -#: ../../library/sunau.rst:211 +#: ../../library/sunau.rst:215 msgid "Added support for 24-bit samples." msgstr "" -#: ../../library/sunau.rst:217 +#: ../../library/sunau.rst:221 msgid "Set the frame rate." msgstr "" -#: ../../library/sunau.rst:222 +#: ../../library/sunau.rst:226 msgid "" "Set the number of frames. This can be later changed, when and if more " "frames are written." msgstr "" -#: ../../library/sunau.rst:228 +#: ../../library/sunau.rst:232 msgid "" "Set the compression type and description. Only ``'NONE'`` and ``'ULAW'`` are " "supported on output." msgstr "" -#: ../../library/sunau.rst:234 +#: ../../library/sunau.rst:238 msgid "" "The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, " "compname)``, with values valid for the :meth:`set\\*` methods. Set all " "parameters." msgstr "" -#: ../../library/sunau.rst:241 +#: ../../library/sunau.rst:245 msgid "" "Return current position in the file, with the same disclaimer for the :meth:" "`AU_read.tell` and :meth:`AU_read.setpos` methods." msgstr "" -#: ../../library/sunau.rst:247 +#: ../../library/sunau.rst:251 msgid "Write audio frames, without correcting *nframes*." msgstr "" -#: ../../library/sunau.rst:249 ../../library/sunau.rst:257 +#: ../../library/sunau.rst:253 ../../library/sunau.rst:261 msgid "Any :term:`bytes-like object` is now accepted." msgstr "" -#: ../../library/sunau.rst:255 +#: ../../library/sunau.rst:259 msgid "Write audio frames and make sure *nframes* is correct." msgstr "" -#: ../../library/sunau.rst:263 +#: ../../library/sunau.rst:267 msgid "Make sure *nframes* is correct, and close the file." msgstr "" -#: ../../library/sunau.rst:265 +#: ../../library/sunau.rst:269 msgid "This method is called upon deletion." msgstr "" -#: ../../library/sunau.rst:267 +#: ../../library/sunau.rst:271 msgid "" "Note that it is invalid to set any parameters after calling :meth:" "`writeframes` or :meth:`writeframesraw`." diff --git a/library/telnetlib.po b/library/telnetlib.po index ec5914f435..78b0ef9636 100644 --- a/library/telnetlib.po +++ b/library/telnetlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-03-23 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:12+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`telnetlib` --- Telnet client" msgstr "" -#: ../../library/telnetlib.rst:9 +#: ../../library/telnetlib.rst:10 msgid "**Source code:** :source:`Lib/telnetlib.py`" msgstr "**原始碼:**\\ :source:`Lib/telnetlib.py`" -#: ../../library/telnetlib.rst:15 +#: ../../library/telnetlib.rst:14 +msgid "The :mod:`telnetlib` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/telnetlib.rst:19 msgid "" "The :mod:`telnetlib` module provides a :class:`Telnet` class that implements " "the Telnet protocol. See :rfc:`854` for details about the protocol. In " @@ -37,7 +41,7 @@ msgid "" "in ``arpa/telnet.h``, see the module source itself." msgstr "" -#: ../../library/telnetlib.rst:23 +#: ../../library/telnetlib.rst:27 msgid "" "The symbolic constants for the telnet commands are: IAC, DONT, DO, WONT, " "WILL, SE (Subnegotiation End), NOP (No Operation), DM (Data Mark), BRK " @@ -45,7 +49,7 @@ msgid "" "(Erase Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin)." msgstr "" -#: ../../library/telnetlib.rst:31 +#: ../../library/telnetlib.rst:35 msgid "" ":class:`Telnet` represents a connection to a Telnet server. The instance is " "initially not connected by default; the :meth:`~Telnet.open` method must be " @@ -57,11 +61,11 @@ msgid "" "global default timeout setting will be used)." msgstr "" -#: ../../library/telnetlib.rst:40 +#: ../../library/telnetlib.rst:44 msgid "Do not reopen an already connected instance." msgstr "" -#: ../../library/telnetlib.rst:42 +#: ../../library/telnetlib.rst:46 msgid "" "This class has many :meth:`read_\\*` methods. Note that some of them " "raise :exc:`EOFError` when the end of the connection is read, because they " @@ -69,100 +73,100 @@ msgid "" "descriptions below." msgstr "" -#: ../../library/telnetlib.rst:46 +#: ../../library/telnetlib.rst:50 msgid "" "A :class:`Telnet` object is a context manager and can be used in a :keyword:" "`with` statement. When the :keyword:`!with` block ends, the :meth:`close` " "method is called::" msgstr "" -#: ../../library/telnetlib.rst:55 +#: ../../library/telnetlib.rst:59 msgid "Context manager support added" msgstr "" -#: ../../library/telnetlib.rst:60 +#: ../../library/telnetlib.rst:64 msgid ":rfc:`854` - Telnet Protocol Specification" msgstr "" -#: ../../library/telnetlib.rst:61 +#: ../../library/telnetlib.rst:65 msgid "Definition of the Telnet protocol." msgstr "" -#: ../../library/telnetlib.rst:67 +#: ../../library/telnetlib.rst:71 msgid "Telnet Objects" msgstr "" -#: ../../library/telnetlib.rst:69 +#: ../../library/telnetlib.rst:73 msgid ":class:`Telnet` instances have the following methods:" msgstr "" -#: ../../library/telnetlib.rst:74 +#: ../../library/telnetlib.rst:78 msgid "" "Read until a given byte string, *expected*, is encountered or until " "*timeout* seconds have passed." msgstr "" -#: ../../library/telnetlib.rst:77 +#: ../../library/telnetlib.rst:81 msgid "" "When no match is found, return whatever is available instead, possibly empty " "bytes. Raise :exc:`EOFError` if the connection is closed and no cooked data " "is available." msgstr "" -#: ../../library/telnetlib.rst:84 +#: ../../library/telnetlib.rst:88 msgid "Read all data until EOF as bytes; block until connection closed." msgstr "" -#: ../../library/telnetlib.rst:89 +#: ../../library/telnetlib.rst:93 msgid "" "Read at least one byte of cooked data unless EOF is hit. Return ``b''`` if " "EOF is hit. Block if no data is immediately available." msgstr "" -#: ../../library/telnetlib.rst:95 +#: ../../library/telnetlib.rst:99 msgid "Read everything that can be without blocking in I/O (eager)." msgstr "" -#: ../../library/telnetlib.rst:97 ../../library/telnetlib.rst:106 +#: ../../library/telnetlib.rst:101 ../../library/telnetlib.rst:110 msgid "" "Raise :exc:`EOFError` if connection closed and no cooked data available. " "Return ``b''`` if no cooked data available otherwise. Do not block unless in " "the midst of an IAC sequence." msgstr "" -#: ../../library/telnetlib.rst:104 +#: ../../library/telnetlib.rst:108 msgid "Read readily available data." msgstr "" -#: ../../library/telnetlib.rst:113 +#: ../../library/telnetlib.rst:117 msgid "Process and return data already in the queues (lazy)." msgstr "" -#: ../../library/telnetlib.rst:115 +#: ../../library/telnetlib.rst:119 msgid "" "Raise :exc:`EOFError` if connection closed and no data available. Return " "``b''`` if no cooked data available otherwise. Do not block unless in the " "midst of an IAC sequence." msgstr "" -#: ../../library/telnetlib.rst:122 +#: ../../library/telnetlib.rst:126 msgid "Return any data available in the cooked queue (very lazy)." msgstr "" -#: ../../library/telnetlib.rst:124 +#: ../../library/telnetlib.rst:128 msgid "" "Raise :exc:`EOFError` if connection closed and no data available. Return " "``b''`` if no cooked data available otherwise. This method never blocks." msgstr "" -#: ../../library/telnetlib.rst:130 +#: ../../library/telnetlib.rst:134 msgid "" "Return the data collected between a SB/SE pair (suboption begin/end). The " "callback should access these data when it was invoked with a ``SE`` command. " "This method never blocks." msgstr "" -#: ../../library/telnetlib.rst:137 +#: ../../library/telnetlib.rst:141 msgid "" "Connect to a host. The optional second argument is the port number, which " "defaults to the standard Telnet port (23). The optional *timeout* parameter " @@ -170,73 +174,73 @@ msgid "" "attempt (if not specified, the global default timeout setting will be used)." msgstr "" -#: ../../library/telnetlib.rst:142 +#: ../../library/telnetlib.rst:146 msgid "Do not try to reopen an already connected instance." msgstr "" -#: ../../library/telnetlib.rst:144 +#: ../../library/telnetlib.rst:148 msgid "" "Raises an :ref:`auditing event ` ``telnetlib.Telnet.open`` with " "arguments ``self``, ``host``, ``port``." msgstr "" -#: ../../library/telnetlib.rst:149 +#: ../../library/telnetlib.rst:153 msgid "" "Print a debug message when the debug level is ``>`` 0. If extra arguments " "are present, they are substituted in the message using the standard string " "formatting operator." msgstr "" -#: ../../library/telnetlib.rst:156 +#: ../../library/telnetlib.rst:160 msgid "" "Set the debug level. The higher the value of *debuglevel*, the more debug " "output you get (on ``sys.stdout``)." msgstr "" -#: ../../library/telnetlib.rst:162 +#: ../../library/telnetlib.rst:166 msgid "Close the connection." msgstr "" -#: ../../library/telnetlib.rst:167 +#: ../../library/telnetlib.rst:171 msgid "Return the socket object used internally." msgstr "" -#: ../../library/telnetlib.rst:172 +#: ../../library/telnetlib.rst:176 msgid "Return the file descriptor of the socket object used internally." msgstr "" -#: ../../library/telnetlib.rst:177 +#: ../../library/telnetlib.rst:181 msgid "" "Write a byte string to the socket, doubling any IAC characters. This can " "block if the connection is blocked. May raise :exc:`OSError` if the " "connection is closed." msgstr "" -#: ../../library/telnetlib.rst:181 +#: ../../library/telnetlib.rst:185 msgid "" "Raises an :ref:`auditing event ` ``telnetlib.Telnet.write`` with " "arguments ``self``, ``buffer``." msgstr "" -#: ../../library/telnetlib.rst:183 +#: ../../library/telnetlib.rst:187 msgid "" "This method used to raise :exc:`socket.error`, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../library/telnetlib.rst:190 +#: ../../library/telnetlib.rst:194 msgid "Interaction function, emulates a very dumb Telnet client." msgstr "" -#: ../../library/telnetlib.rst:195 +#: ../../library/telnetlib.rst:199 msgid "Multithreaded version of :meth:`interact`." msgstr "" -#: ../../library/telnetlib.rst:200 +#: ../../library/telnetlib.rst:204 msgid "Read until one from a list of a regular expressions matches." msgstr "" -#: ../../library/telnetlib.rst:202 +#: ../../library/telnetlib.rst:206 msgid "" "The first argument is a list of regular expressions, either compiled (:ref:" "`regex objects `) or uncompiled (byte strings). The optional " @@ -244,28 +248,28 @@ msgid "" "indefinitely." msgstr "" -#: ../../library/telnetlib.rst:207 +#: ../../library/telnetlib.rst:211 msgid "" "Return a tuple of three items: the index in the list of the first regular " "expression that matches; the match object returned; and the bytes read up " "till and including the match." msgstr "" -#: ../../library/telnetlib.rst:211 +#: ../../library/telnetlib.rst:215 msgid "" "If end of file is found and no bytes were read, raise :exc:`EOFError`. " "Otherwise, when nothing matches, return ``(-1, None, data)`` where *data* is " "the bytes received so far (may be empty bytes if a timeout happened)." msgstr "" -#: ../../library/telnetlib.rst:215 +#: ../../library/telnetlib.rst:219 msgid "" "If a regular expression ends with a greedy match (such as ``.*``) or if more " "than one expression can match the same input, the results are non-" "deterministic, and may depend on the I/O timing." msgstr "" -#: ../../library/telnetlib.rst:222 +#: ../../library/telnetlib.rst:226 msgid "" "Each time a telnet option is read on the input flow, this *callback* (if " "set) is called with the following parameters: callback(telnet socket, " @@ -273,10 +277,10 @@ msgid "" "telnetlib." msgstr "" -#: ../../library/telnetlib.rst:230 +#: ../../library/telnetlib.rst:234 msgid "Telnet Example" msgstr "Telnet 範例" -#: ../../library/telnetlib.rst:235 +#: ../../library/telnetlib.rst:239 msgid "A simple example illustrating typical use::" msgstr "" diff --git a/library/uu.po b/library/uu.po index 67560683f0..127628b591 100644 --- a/library/uu.po +++ b/library/uu.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-03-23 00:14+0000\n" "PO-Revision-Date: 2016-01-31 07:32+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,11 +22,15 @@ msgstr "" msgid ":mod:`uu` --- Encode and decode uuencode files" msgstr "" -#: ../../library/uu.rst:9 +#: ../../library/uu.rst:10 msgid "**Source code:** :source:`Lib/uu.py`" msgstr "**原始碼:**\\ :source:`Lib/uu.py`" -#: ../../library/uu.rst:13 +#: ../../library/uu.rst:12 +msgid "The :mod:`uu` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/uu.rst:17 msgid "" "This module encodes and decodes files in uuencode format, allowing arbitrary " "binary data to be transferred over ASCII-only connections. Wherever a file " @@ -38,16 +42,16 @@ msgid "" "and be sure that, when required, the mode is ``'rb'`` or ``'wb'`` on Windows." msgstr "" -#: ../../library/uu.rst:26 +#: ../../library/uu.rst:30 msgid "" "This code was contributed by Lance Ellinghouse, and modified by Jack Jansen." msgstr "" -#: ../../library/uu.rst:28 +#: ../../library/uu.rst:32 msgid "The :mod:`uu` module defines the following functions:" msgstr "" -#: ../../library/uu.rst:33 +#: ../../library/uu.rst:37 msgid "" "Uuencode file *in_file* into file *out_file*. The uuencoded file will have " "the header specifying *name* and *mode* as the defaults for the results of " @@ -56,11 +60,11 @@ msgid "" "``'`'`` instead of spaces." msgstr "" -#: ../../library/uu.rst:39 +#: ../../library/uu.rst:43 msgid "Added the *backtick* parameter." msgstr "新增 *backtick* 參數。" -#: ../../library/uu.rst:45 +#: ../../library/uu.rst:49 msgid "" "This call decodes uuencoded file *in_file* placing the result on file " "*out_file*. If *out_file* is a pathname, *mode* is used to set the " @@ -69,25 +73,25 @@ msgid "" "in the header already exists, a :exc:`uu.Error` is raised." msgstr "" -#: ../../library/uu.rst:51 +#: ../../library/uu.rst:55 msgid "" ":func:`decode` may print a warning to standard error if the input was " "produced by an incorrect uuencoder and Python could recover from that " "error. Setting *quiet* to a true value silences this warning." msgstr "" -#: ../../library/uu.rst:58 +#: ../../library/uu.rst:62 msgid "" "Subclass of :exc:`Exception`, this can be raised by :func:`uu.decode` under " "various situations, such as described above, but also including a badly " "formatted header, or truncated input file." msgstr "" -#: ../../library/uu.rst:65 +#: ../../library/uu.rst:69 msgid "Module :mod:`binascii`" msgstr ":mod:`binascii` 模組" -#: ../../library/uu.rst:66 +#: ../../library/uu.rst:70 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" diff --git a/library/xdrlib.po b/library/xdrlib.po index 1f4a17f3b5..ab285abb10 100644 --- a/library/xdrlib.po +++ b/library/xdrlib.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-03-23 00:14+0000\n" "PO-Revision-Date: 2016-01-31 07:33+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -22,71 +22,75 @@ msgstr "" msgid ":mod:`xdrlib` --- Encode and decode XDR data" msgstr "" -#: ../../library/xdrlib.rst:7 +#: ../../library/xdrlib.rst:8 msgid "**Source code:** :source:`Lib/xdrlib.py`" msgstr "**原始碼:**\\ :source:`Lib/xdrlib.py`" -#: ../../library/xdrlib.rst:15 +#: ../../library/xdrlib.rst:14 +msgid "The :mod:`xdrlib` module is deprecated (see :pep:`594` for details)." +msgstr "" + +#: ../../library/xdrlib.rst:19 msgid "" "The :mod:`xdrlib` module supports the External Data Representation Standard " "as described in :rfc:`1014`, written by Sun Microsystems, Inc. June 1987. " "It supports most of the data types described in the RFC." msgstr "" -#: ../../library/xdrlib.rst:19 +#: ../../library/xdrlib.rst:23 msgid "" "The :mod:`xdrlib` module defines two classes, one for packing variables into " "XDR representation, and another for unpacking from XDR representation. " "There are also two exception classes." msgstr "" -#: ../../library/xdrlib.rst:26 +#: ../../library/xdrlib.rst:30 msgid "" ":class:`Packer` is the class for packing data into XDR representation. The :" "class:`Packer` class is instantiated with no arguments." msgstr "" -#: ../../library/xdrlib.rst:32 +#: ../../library/xdrlib.rst:36 msgid "" "``Unpacker`` is the complementary class which unpacks XDR data values from a " "string buffer. The input buffer is given as *data*." msgstr "" -#: ../../library/xdrlib.rst:40 +#: ../../library/xdrlib.rst:44 msgid ":rfc:`1014` - XDR: External Data Representation Standard" msgstr "" -#: ../../library/xdrlib.rst:39 +#: ../../library/xdrlib.rst:43 msgid "" "This RFC defined the encoding of data which was XDR at the time this module " "was originally written. It has apparently been obsoleted by :rfc:`1832`." msgstr "" -#: ../../library/xdrlib.rst:42 +#: ../../library/xdrlib.rst:46 msgid ":rfc:`1832` - XDR: External Data Representation Standard" msgstr "" -#: ../../library/xdrlib.rst:43 +#: ../../library/xdrlib.rst:47 msgid "Newer RFC that provides a revised definition of XDR." msgstr "" -#: ../../library/xdrlib.rst:49 +#: ../../library/xdrlib.rst:53 msgid "Packer Objects" msgstr "" -#: ../../library/xdrlib.rst:51 +#: ../../library/xdrlib.rst:55 msgid ":class:`Packer` instances have the following methods:" msgstr "" -#: ../../library/xdrlib.rst:56 +#: ../../library/xdrlib.rst:60 msgid "Returns the current pack buffer as a string." msgstr "" -#: ../../library/xdrlib.rst:61 +#: ../../library/xdrlib.rst:65 msgid "Resets the pack buffer to the empty string." msgstr "" -#: ../../library/xdrlib.rst:63 +#: ../../library/xdrlib.rst:67 msgid "" "In general, you can pack any of the most common XDR data types by calling " "the appropriate ``pack_type()`` method. Each method takes a single " @@ -95,51 +99,51 @@ msgid "" "`pack_bool`, :meth:`pack_uhyper`, and :meth:`pack_hyper`." msgstr "" -#: ../../library/xdrlib.rst:72 +#: ../../library/xdrlib.rst:76 msgid "Packs the single-precision floating point number *value*." msgstr "" -#: ../../library/xdrlib.rst:77 +#: ../../library/xdrlib.rst:81 msgid "Packs the double-precision floating point number *value*." msgstr "" -#: ../../library/xdrlib.rst:79 +#: ../../library/xdrlib.rst:83 msgid "The following methods support packing strings, bytes, and opaque data:" msgstr "" -#: ../../library/xdrlib.rst:84 +#: ../../library/xdrlib.rst:88 msgid "" "Packs a fixed length string, *s*. *n* is the length of the string but it is " "*not* packed into the data buffer. The string is padded with null bytes if " "necessary to guaranteed 4 byte alignment." msgstr "" -#: ../../library/xdrlib.rst:91 +#: ../../library/xdrlib.rst:95 msgid "" "Packs a fixed length opaque data stream, similarly to :meth:`pack_fstring`." msgstr "" -#: ../../library/xdrlib.rst:96 +#: ../../library/xdrlib.rst:100 msgid "" "Packs a variable length string, *s*. The length of the string is first " "packed as an unsigned integer, then the string data is packed with :meth:" "`pack_fstring`." msgstr "" -#: ../../library/xdrlib.rst:103 +#: ../../library/xdrlib.rst:107 msgid "" "Packs a variable length opaque data string, similarly to :meth:`pack_string`." msgstr "" -#: ../../library/xdrlib.rst:108 +#: ../../library/xdrlib.rst:112 msgid "Packs a variable length byte stream, similarly to :meth:`pack_string`." msgstr "" -#: ../../library/xdrlib.rst:110 +#: ../../library/xdrlib.rst:114 msgid "The following methods support packing arrays and lists:" msgstr "" -#: ../../library/xdrlib.rst:115 +#: ../../library/xdrlib.rst:119 msgid "" "Packs a *list* of homogeneous items. This method is useful for lists with " "an indeterminate size; i.e. the size is not available until the entire list " @@ -149,12 +153,12 @@ msgid "" "list, an unsigned integer ``0`` is packed." msgstr "" -#: ../../library/xdrlib.rst:122 +#: ../../library/xdrlib.rst:126 msgid "" "For example, to pack a list of integers, the code might appear like this::" msgstr "" -#: ../../library/xdrlib.rst:131 +#: ../../library/xdrlib.rst:135 msgid "" "Packs a fixed length list (*array*) of homogeneous items. *n* is the length " "of the list; it is *not* packed into the buffer, but a :exc:`ValueError` " @@ -162,103 +166,103 @@ msgid "" "*pack_item* is the function used to pack each element." msgstr "" -#: ../../library/xdrlib.rst:139 +#: ../../library/xdrlib.rst:143 msgid "" "Packs a variable length *list* of homogeneous items. First, the length of " "the list is packed as an unsigned integer, then each element is packed as " "in :meth:`pack_farray` above." msgstr "" -#: ../../library/xdrlib.rst:147 +#: ../../library/xdrlib.rst:151 msgid "Unpacker Objects" msgstr "" -#: ../../library/xdrlib.rst:149 +#: ../../library/xdrlib.rst:153 msgid "The :class:`Unpacker` class offers the following methods:" msgstr "" -#: ../../library/xdrlib.rst:154 +#: ../../library/xdrlib.rst:158 msgid "Resets the string buffer with the given *data*." msgstr "" -#: ../../library/xdrlib.rst:159 +#: ../../library/xdrlib.rst:163 msgid "Returns the current unpack position in the data buffer." msgstr "" -#: ../../library/xdrlib.rst:164 +#: ../../library/xdrlib.rst:168 msgid "" "Sets the data buffer unpack position to *position*. You should be careful " "about using :meth:`get_position` and :meth:`set_position`." msgstr "" -#: ../../library/xdrlib.rst:170 +#: ../../library/xdrlib.rst:174 msgid "Returns the current unpack data buffer as a string." msgstr "" -#: ../../library/xdrlib.rst:175 +#: ../../library/xdrlib.rst:179 msgid "" "Indicates unpack completion. Raises an :exc:`Error` exception if all of the " "data has not been unpacked." msgstr "" -#: ../../library/xdrlib.rst:178 +#: ../../library/xdrlib.rst:182 msgid "" "In addition, every data type that can be packed with a :class:`Packer`, can " "be unpacked with an :class:`Unpacker`. Unpacking methods are of the form " "``unpack_type()``, and take no arguments. They return the unpacked object." msgstr "" -#: ../../library/xdrlib.rst:185 +#: ../../library/xdrlib.rst:189 msgid "Unpacks a single-precision floating point number." msgstr "" -#: ../../library/xdrlib.rst:190 +#: ../../library/xdrlib.rst:194 msgid "" "Unpacks a double-precision floating point number, similarly to :meth:" "`unpack_float`." msgstr "" -#: ../../library/xdrlib.rst:193 +#: ../../library/xdrlib.rst:197 msgid "" "In addition, the following methods unpack strings, bytes, and opaque data:" msgstr "" -#: ../../library/xdrlib.rst:198 +#: ../../library/xdrlib.rst:202 msgid "" "Unpacks and returns a fixed length string. *n* is the number of characters " "expected. Padding with null bytes to guaranteed 4 byte alignment is assumed." msgstr "" -#: ../../library/xdrlib.rst:204 +#: ../../library/xdrlib.rst:208 msgid "" "Unpacks and returns a fixed length opaque data stream, similarly to :meth:" "`unpack_fstring`." msgstr "" -#: ../../library/xdrlib.rst:210 +#: ../../library/xdrlib.rst:214 msgid "" "Unpacks and returns a variable length string. The length of the string is " "first unpacked as an unsigned integer, then the string data is unpacked " "with :meth:`unpack_fstring`." msgstr "" -#: ../../library/xdrlib.rst:217 +#: ../../library/xdrlib.rst:221 msgid "" "Unpacks and returns a variable length opaque data string, similarly to :meth:" "`unpack_string`." msgstr "" -#: ../../library/xdrlib.rst:223 +#: ../../library/xdrlib.rst:227 msgid "" "Unpacks and returns a variable length byte stream, similarly to :meth:" "`unpack_string`." msgstr "" -#: ../../library/xdrlib.rst:226 +#: ../../library/xdrlib.rst:230 msgid "The following methods support unpacking arrays and lists:" msgstr "" -#: ../../library/xdrlib.rst:231 +#: ../../library/xdrlib.rst:235 msgid "" "Unpacks and returns a list of homogeneous items. The list is unpacked one " "element at a time by first unpacking an unsigned integer flag. If the flag " @@ -267,39 +271,39 @@ msgid "" "called to unpack the items." msgstr "" -#: ../../library/xdrlib.rst:240 +#: ../../library/xdrlib.rst:244 msgid "" "Unpacks and returns (as a list) a fixed length array of homogeneous items. " "*n* is number of list elements to expect in the buffer. As above, " "*unpack_item* is the function used to unpack each element." msgstr "" -#: ../../library/xdrlib.rst:247 +#: ../../library/xdrlib.rst:251 msgid "" "Unpacks and returns a variable length *list* of homogeneous items. First, " "the length of the list is unpacked as an unsigned integer, then each element " "is unpacked as in :meth:`unpack_farray` above." msgstr "" -#: ../../library/xdrlib.rst:255 +#: ../../library/xdrlib.rst:259 msgid "Exceptions" msgstr "例外" -#: ../../library/xdrlib.rst:257 +#: ../../library/xdrlib.rst:261 msgid "Exceptions in this module are coded as class instances:" msgstr "" -#: ../../library/xdrlib.rst:262 +#: ../../library/xdrlib.rst:266 msgid "" "The base exception class. :exc:`Error` has a single public attribute :attr:" "`msg` containing the description of the error." msgstr "" -#: ../../library/xdrlib.rst:268 +#: ../../library/xdrlib.rst:272 msgid "" "Class derived from :exc:`Error`. Contains no additional instance variables." msgstr "" -#: ../../library/xdrlib.rst:270 +#: ../../library/xdrlib.rst:274 msgid "Here is an example of how you would catch one of these exceptions::" msgstr "" From 0ce9f5f6007c75f5a074cb449fe7de023be87565 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Wed, 23 Mar 2022 16:17:13 +0800 Subject: [PATCH 5/5] chore: translate titles & deprecation msg for modules listed in PEP594 --- library/aifc.po | 4 ++-- library/asynchat.po | 7 +++++-- library/asyncore.po | 7 +++++-- library/audioop.po | 4 ++-- library/cgi.po | 4 ++-- library/cgitb.po | 4 ++-- library/chunk.po | 4 ++-- library/crypt.po | 5 ++--- library/imghdr.po | 4 ++-- library/msilib.po | 4 ++-- library/nis.po | 4 ++-- library/nntplib.po | 4 ++-- library/ossaudiodev.po | 4 ++-- library/pipes.po | 4 ++-- library/smtpd.po | 8 ++++++-- library/sndhdr.po | 4 ++-- library/spwd.po | 4 ++-- library/sunau.po | 5 ++--- library/telnetlib.po | 4 ++-- library/uu.po | 4 ++-- library/xdrlib.po | 4 ++-- 21 files changed, 52 insertions(+), 44 deletions(-) diff --git a/library/aifc.po b/library/aifc.po index 14cac5aafa..fcf2d97821 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/aifc.rst:2 msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" -msgstr "" +msgstr ":mod:`aifc` --- 讀寫 AIFF 與 AIFC 檔案" #: ../../library/aifc.rst:8 msgid "**Source code:** :source:`Lib/aifc.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/aifc.py`" #: ../../library/aifc.rst:16 msgid "The :mod:`aifc` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`aifc` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/aifc.rst:21 msgid "" diff --git a/library/asynchat.po b/library/asynchat.po index 2893de7370..a0306e42e2 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-21 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 14:38+0000\n" +"PO-Revision-Date: 2022-03-23 15:50+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,10 +17,11 @@ 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/asynchat.rst:2 msgid ":mod:`asynchat` --- Asynchronous socket command/response handler" -msgstr "" +msgstr ":mod:`asynchat` --- 非同步 socket 指令/回應處理函式" #: ../../library/asynchat.rst:11 msgid "**Source code:** :source:`Lib/asynchat.py`" @@ -31,6 +32,8 @@ msgid "" ":mod:`asynchat` will be removed in Python 3.12 (:pep:`594`). Please use :mod:" "`asyncio` instead." msgstr "" +":mod:`asynchat` 將於 Python 3.12 中移除(\\ :pep:`594`\\ )。請改用 :mod:" +"`asyncio`\\ 。" #: ../../library/asynchat.rst:21 msgid "" diff --git a/library/asyncore.po b/library/asyncore.po index 6ba4011ba6..715d1a725b 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-21 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 14:39+0000\n" +"PO-Revision-Date: 2022-03-23 15:51+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,10 +17,11 @@ 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/asyncore.rst:2 msgid ":mod:`asyncore` --- Asynchronous socket handler" -msgstr "" +msgstr ":mod:`asyncore` --- 非同步 socket 處理函式" #: ../../library/asyncore.rst:14 msgid "**Source code:** :source:`Lib/asyncore.py`" @@ -31,6 +32,8 @@ msgid "" ":mod:`asyncore` will be removed in Python 3.12 (:pep:`594`). Please use :mod:" "`asyncio` instead." msgstr "" +":mod:`asyncore` 將於 Python 3.12 中移除(\\ :pep:`594`\\ )。請改用 :mod:" +"`asyncio`\\ 。" #: ../../library/asyncore.rst:24 msgid "" diff --git a/library/audioop.po b/library/audioop.po index da95d502df..64b455dc4d 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -20,11 +20,11 @@ msgstr "" #: ../../library/audioop.rst:2 msgid ":mod:`audioop` --- Manipulate raw audio data" -msgstr "" +msgstr ":mod:`audioop` --- 操作原始聲音檔案" #: ../../library/audioop.rst:8 msgid "The :mod:`audioop` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`audioop` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/audioop.rst:13 msgid "" diff --git a/library/cgi.po b/library/cgi.po index aa8a0532d6..765738fa61 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/cgi.rst:2 msgid ":mod:`cgi` --- Common Gateway Interface support" -msgstr "" +msgstr ":mod:`cgi` --- 通用閘道器介面支援" #: ../../library/cgi.rst:8 msgid "**Source code:** :source:`Lib/cgi.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/cgi.py`" #: ../../library/cgi.rst:18 msgid "The :mod:`cgi` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`cgi` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/cgi.rst:23 msgid "Support module for Common Gateway Interface (CGI) scripts." diff --git a/library/cgitb.po b/library/cgitb.po index b07a62d97a..7916d46c2d 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/cgitb.rst:2 msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" -msgstr "" +msgstr ":mod:`cgitb` --- CGI 腳本的回溯 (traceback) 管理程式" #: ../../library/cgitb.rst:11 msgid "**Source code:** :source:`Lib/cgitb.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/cgitb.py`" #: ../../library/cgitb.rst:19 msgid "The :mod:`cgitb` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`cgitb` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/cgitb.rst:24 msgid "" diff --git a/library/chunk.po b/library/chunk.po index f284a44121..ed37bcf9fa 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/chunk.rst:2 msgid ":mod:`chunk` --- Read IFF chunked data" -msgstr "" +msgstr ":mod:`chunk` --- 讀取 IFF 分塊資料" #: ../../library/chunk.rst:11 msgid "**Source code:** :source:`Lib/chunk.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/chunk.py`" #: ../../library/chunk.rst:20 msgid "The :mod:`chunk` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`chunk` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/chunk.rst:25 msgid "" diff --git a/library/crypt.po b/library/crypt.po index 3dedbe2236..301553a064 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -20,16 +20,15 @@ msgstr "" #: ../../library/crypt.rst:2 msgid ":mod:`crypt` --- Function to check Unix passwords" -msgstr "" +msgstr ":mod:`crypt` --- 用於檢查 Unix 密碼的函式" #: ../../library/crypt.rst:13 msgid "**Source code:** :source:`Lib/crypt.py`" msgstr "**原始碼:**\\ :source:`Lib/crypt.py`" #: ../../library/crypt.rst:19 -#, fuzzy msgid "The :mod:`crypt` module is deprecated (see :pep:`594` for details)." -msgstr ":mod:`crypt` 模組定義了以下函式:" +msgstr ":mod:`crypt` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/crypt.rst:24 msgid "" diff --git a/library/imghdr.po b/library/imghdr.po index b22868d921..281a5d7266 100644 --- a/library/imghdr.po +++ b/library/imghdr.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/imghdr.rst:2 msgid ":mod:`imghdr` --- Determine the type of an image" -msgstr "" +msgstr ":mod:`imghdr` --- 推測圖片種類" #: ../../library/imghdr.rst:8 msgid "**Source code:** :source:`Lib/imghdr.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/imghdr.py`" #: ../../library/imghdr.rst:10 msgid "The :mod:`imghdr` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`imghdr` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/imghdr.rst:15 msgid "" diff --git a/library/msilib.po b/library/msilib.po index 43bd1de75b..1a73596189 100644 --- a/library/msilib.po +++ b/library/msilib.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/msilib.rst:2 msgid ":mod:`msilib` --- Read and write Microsoft Installer files" -msgstr "" +msgstr ":mod:`msilib` --- 讀寫 Microsoft Installer 檔案" #: ../../library/msilib.rst:12 msgid "**Source code:** :source:`Lib/msilib/__init__.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/msilib/__init__.py`" #: ../../library/msilib.rst:16 msgid "The :mod:`msilib` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`msilib` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/msilib.rst:21 msgid "" diff --git a/library/nis.po b/library/nis.po index 3c4c3e6373..b187a3efdd 100644 --- a/library/nis.po +++ b/library/nis.po @@ -20,11 +20,11 @@ msgstr "" #: ../../library/nis.rst:3 msgid ":mod:`nis` --- Interface to Sun's NIS (Yellow Pages)" -msgstr "" +msgstr ":mod:`nis` --- Sun NIS (Yellow Pages) 介面" #: ../../library/nis.rst:13 msgid "The :mod:`nis` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`nis` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/nis.rst:18 msgid "" diff --git a/library/nntplib.po b/library/nntplib.po index b11dbd864a..a003a31969 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/nntplib.rst:2 msgid ":mod:`nntplib` --- NNTP protocol client" -msgstr "" +msgstr ":mod:`nntplib` --- NNTP 協定客戶端" #: ../../library/nntplib.rst:8 msgid "**Source code:** :source:`Lib/nntplib.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/nntplib.py`" #: ../../library/nntplib.rst:14 msgid "The :mod:`nntplib` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`nntlib` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/nntplib.rst:19 msgid "" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 0c31985d52..56d7052102 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -20,12 +20,12 @@ msgstr "" #: ../../library/ossaudiodev.rst:2 msgid ":mod:`ossaudiodev` --- Access to OSS-compatible audio devices" -msgstr "" +msgstr ":mod:`ossaudiodev` --- 對 OSS 相容聲音裝置的存取" #: ../../library/ossaudiodev.rst:9 msgid "" "The :mod:`ossaudiodev` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`ossaudiodev` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/ossaudiodev.rst:14 msgid "" diff --git a/library/pipes.po b/library/pipes.po index 6357620693..8f0b27ceb2 100644 --- a/library/pipes.po +++ b/library/pipes.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/pipes.rst:2 msgid ":mod:`pipes` --- Interface to shell pipelines" -msgstr "" +msgstr ":mod:`pipes` --- shell pipelines 介面" #: ../../library/pipes.rst:11 msgid "**Source code:** :source:`Lib/pipes.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/pipes.py`" #: ../../library/pipes.rst:13 msgid "The :mod:`pipes` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`pipes` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/pipes.rst:18 msgid "" diff --git a/library/smtpd.po b/library/smtpd.po index 0f7b49a1a4..7425e64cb0 100644 --- a/library/smtpd.po +++ b/library/smtpd.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-21 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 16:10+0000\n" +"PO-Revision-Date: 2022-03-23 15:56+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,10 +17,11 @@ 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/smtpd.rst:2 msgid ":mod:`smtpd` --- SMTP Server" -msgstr "" +msgstr ":mod:`smtpd` --- SMTP 伺服器" #: ../../library/smtpd.rst:11 msgid "**Source code:** :source:`Lib/smtpd.py`" @@ -37,6 +38,9 @@ msgid "" "for this module. It is based on :mod:`asyncio` and provides a more " "straightforward API." msgstr "" +":mod:`smtpd` 將於 Python 3.12 中移除(\\ :pep:`594`\\ )。基於 :mod:" +"`asyncio` 且提供了更簡單易用 API 的 `aiosmtpd `_ 套件是個推薦的替代模組 (module)。" #: ../../library/smtpd.rst:23 msgid "" diff --git a/library/sndhdr.po b/library/sndhdr.po index b2e122e36a..117a555fd3 100644 --- a/library/sndhdr.po +++ b/library/sndhdr.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/sndhdr.rst:2 msgid ":mod:`sndhdr` --- Determine type of sound file" -msgstr "" +msgstr ":mod:`imghdr` --- 推測音檔種類" #: ../../library/sndhdr.rst:11 msgid "**Source code:** :source:`Lib/sndhdr.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/sndhdr.py`" #: ../../library/sndhdr.rst:17 msgid "The :mod:`sndhdr` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`sndhdr` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/sndhdr.rst:22 msgid "" diff --git a/library/spwd.po b/library/spwd.po index ea49f0e6b4..cc4497a97d 100644 --- a/library/spwd.po +++ b/library/spwd.po @@ -20,11 +20,11 @@ msgstr "" #: ../../library/spwd.rst:2 msgid ":mod:`spwd` --- The shadow password database" -msgstr "" +msgstr ":mod:`spwd` --- shadow 密碼資料庫" #: ../../library/spwd.rst:9 msgid "The :mod:`spwd` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`spwd` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/spwd.rst:14 msgid "" diff --git a/library/sunau.po b/library/sunau.po index d6fc2e22de..0c56b50064 100644 --- a/library/sunau.po +++ b/library/sunau.po @@ -20,16 +20,15 @@ msgstr "" #: ../../library/sunau.rst:2 msgid ":mod:`sunau` --- Read and write Sun AU files" -msgstr "" +msgstr ":mod:`sunau` --- 讀寫 Sun AU 檔案" #: ../../library/sunau.rst:10 msgid "**Source code:** :source:`Lib/sunau.py`" msgstr "**原始碼:**\\ :source:`Lib/sunau.py`" #: ../../library/sunau.rst:12 -#, fuzzy msgid "The :mod:`sunau` module is deprecated (see :pep:`594` for details)." -msgstr ":mod:`sunau` 模組定義了以下例外:" +msgstr ":mod:`sunau` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/sunau.rst:17 msgid "" diff --git a/library/telnetlib.po b/library/telnetlib.po index 78b0ef9636..76bc508c5c 100644 --- a/library/telnetlib.po +++ b/library/telnetlib.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/telnetlib.rst:2 msgid ":mod:`telnetlib` --- Telnet client" -msgstr "" +msgstr ":mod:`telnetlib` --- Telnet 客戶端" #: ../../library/telnetlib.rst:10 msgid "**Source code:** :source:`Lib/telnetlib.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/telnetlib.py`" #: ../../library/telnetlib.rst:14 msgid "The :mod:`telnetlib` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`telnetlib` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/telnetlib.rst:19 msgid "" diff --git a/library/uu.po b/library/uu.po index 127628b591..1a916186b7 100644 --- a/library/uu.po +++ b/library/uu.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/uu.rst:2 msgid ":mod:`uu` --- Encode and decode uuencode files" -msgstr "" +msgstr ":mod:`xdrlib` --- uuencode 檔案的編碼與解碼" #: ../../library/uu.rst:10 msgid "**Source code:** :source:`Lib/uu.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/uu.py`" #: ../../library/uu.rst:12 msgid "The :mod:`uu` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`uu` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/uu.rst:17 msgid "" diff --git a/library/xdrlib.po b/library/xdrlib.po index ab285abb10..ee320413dd 100644 --- a/library/xdrlib.po +++ b/library/xdrlib.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/xdrlib.rst:2 msgid ":mod:`xdrlib` --- Encode and decode XDR data" -msgstr "" +msgstr ":mod:`xdrlib` --- XDR 資料的編碼與解碼" #: ../../library/xdrlib.rst:8 msgid "**Source code:** :source:`Lib/xdrlib.py`" @@ -28,7 +28,7 @@ msgstr "**原始碼:**\\ :source:`Lib/xdrlib.py`" #: ../../library/xdrlib.rst:14 msgid "The :mod:`xdrlib` module is deprecated (see :pep:`594` for details)." -msgstr "" +msgstr ":mod:`xdrlib` 模組 (module) 即將被棄用(詳見 :pep:`594`\\ )。" #: ../../library/xdrlib.rst:19 msgid ""