From 30615985145db8bf99f501fed2b6d9040e605b56 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 7 Dec 2021 18:19:33 +0000 Subject: [PATCH 1/3] sync with cpython 14f03ce6 --- library/json.po | 6 +- library/logging.po | 609 +++++++++++++++++++++++---------------------- 2 files changed, 314 insertions(+), 301 deletions(-) diff --git a/library/json.po b/library/json.po index a1f75a96cb..4877336746 100644 --- a/library/json.po +++ b/library/json.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-12 19:07+0000\n" +"POT-Creation-Date: 2021-12-07 18:17+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -133,7 +133,7 @@ msgstr "" msgid "" "If *check_circular* is false (default: ``True``), then the circular " "reference check for container types will be skipped and a circular reference " -"will result in an :exc:`OverflowError` (or worse)." +"will result in an :exc:`RecursionError` (or worse)." msgstr "" #: ../../library/json.rst:164 @@ -504,7 +504,7 @@ msgstr "" msgid "" "If *check_circular* is true (the default), then lists, dicts, and custom " "encoded objects will be checked for circular references during encoding to " -"prevent an infinite recursion (which would cause an :exc:`OverflowError`). " +"prevent an infinite recursion (which would cause an :exc:`RecursionError`). " "Otherwise, no such check takes place." msgstr "" diff --git a/library/logging.po b/library/logging.po index 12cf310be0..e9730e0899 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2021-12-07 18:17+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -134,10 +134,23 @@ msgid "" msgstr "" #: ../../library/logging.rst:83 +msgid "" +"Spelling it out with an example: If the propagate attribute of the logger " +"named ``A.B.C`` evaluates to true, any event logged to ``A.B.C`` via a " +"method call such as ``logging.getLogger('A.B.C').error(...)`` will [subject " +"to passing that logger's level and filter settings] be passed in turn to any " +"handlers attached to loggers named ``A.B``, ``A`` and the root logger, after " +"first being passed to any handlers attached to ``A.B.C``. If any logger in " +"the chain ``A.B.C``, ``A.B``, ``A`` has its ``propagate`` attribute set to " +"false, then that is the last logger whose handlers are offered the event to " +"handle, and propagation stops at that point." +msgstr "" + +#: ../../library/logging.rst:92 msgid "The constructor sets this attribute to ``True``." msgstr "" -#: ../../library/logging.rst:85 +#: ../../library/logging.rst:94 msgid "" "If you attach a handler to a logger *and* one or more of its ancestors, it " "may emit the same record multiple times. In general, you should not need to " @@ -149,7 +162,7 @@ msgid "" "rest." msgstr "" -#: ../../library/logging.rst:96 +#: ../../library/logging.rst:105 msgid "" "Sets the threshold for this logger to *level*. Logging messages which are " "less severe than *level* will be ignored; logging messages which have " @@ -158,7 +171,7 @@ msgid "" "severity level than *level*." msgstr "" -#: ../../library/logging.rst:101 +#: ../../library/logging.rst:110 msgid "" "When a logger is created, the level is set to :const:`NOTSET` (which causes " "all messages to be processed when the logger is the root logger, or " @@ -166,32 +179,32 @@ msgid "" "the root logger is created with level :const:`WARNING`." msgstr "" -#: ../../library/logging.rst:106 +#: ../../library/logging.rst:115 msgid "" "The term 'delegation to the parent' means that if a logger has a level of " "NOTSET, its chain of ancestor loggers is traversed until either an ancestor " "with a level other than NOTSET is found, or the root is reached." msgstr "" -#: ../../library/logging.rst:110 +#: ../../library/logging.rst:119 msgid "" "If an ancestor is found with a level other than NOTSET, then that ancestor's " "level is treated as the effective level of the logger where the ancestor " "search began, and is used to determine how a logging event is handled." msgstr "" -#: ../../library/logging.rst:114 +#: ../../library/logging.rst:123 msgid "" "If the root is reached, and it has a level of NOTSET, then all messages will " "be processed. Otherwise, the root's level will be used as the effective " "level." msgstr "" -#: ../../library/logging.rst:117 ../../library/logging.rst:426 +#: ../../library/logging.rst:126 ../../library/logging.rst:435 msgid "See :ref:`levels` for a list of levels." msgstr "層級清單請見 :ref:`levels`\\ 。" -#: ../../library/logging.rst:119 +#: ../../library/logging.rst:128 msgid "" "The *level* parameter now accepts a string representation of the level such " "as 'INFO' as an alternative to the integer constants such as :const:`INFO`. " @@ -200,7 +213,7 @@ msgid "" "expect to be passed integers." msgstr "" -#: ../../library/logging.rst:129 +#: ../../library/logging.rst:138 msgid "" "Indicates if a message of severity *level* would be processed by this " "logger. This method checks first the module-level level set by ``logging." @@ -208,7 +221,7 @@ msgid "" "meth:`getEffectiveLevel`." msgstr "" -#: ../../library/logging.rst:137 +#: ../../library/logging.rst:146 msgid "" "Indicates the effective level for this logger. If a value other than :const:" "`NOTSET` has been set using :meth:`setLevel`, it is returned. Otherwise, the " @@ -217,7 +230,7 @@ msgid "" "integer, typically one of :const:`logging.DEBUG`, :const:`logging.INFO` etc." msgstr "" -#: ../../library/logging.rst:147 +#: ../../library/logging.rst:156 msgid "" "Returns a logger which is a descendant to this logger, as determined by the " "suffix. Thus, ``logging.getLogger('abc').getChild('def.ghi')`` would return " @@ -226,7 +239,7 @@ msgid "" "named using e.g. ``__name__`` rather than a literal string." msgstr "" -#: ../../library/logging.rst:158 +#: ../../library/logging.rst:167 msgid "" "Logs a message with level :const:`DEBUG` on this logger. The *msg* is the " "message format string, and the *args* are the arguments which are merged " @@ -236,13 +249,13 @@ msgid "" "are supplied." msgstr "" -#: ../../library/logging.rst:164 +#: ../../library/logging.rst:173 msgid "" "There are four keyword arguments in *kwargs* which are inspected: " "*exc_info*, *stack_info*, *stacklevel* and *extra*." msgstr "" -#: ../../library/logging.rst:167 +#: ../../library/logging.rst:176 msgid "" "If *exc_info* does not evaluate as false, it causes exception information to " "be added to the logging message. If an exception tuple (in the format " @@ -251,7 +264,7 @@ msgid "" "information." msgstr "" -#: ../../library/logging.rst:172 ../../library/logging.rst:977 +#: ../../library/logging.rst:181 ../../library/logging.rst:986 msgid "" "The second optional keyword argument is *stack_info*, which defaults to " "``False``. If true, stack information is added to the logging message, " @@ -263,20 +276,20 @@ msgid "" "handlers." msgstr "" -#: ../../library/logging.rst:181 ../../library/logging.rst:986 +#: ../../library/logging.rst:190 ../../library/logging.rst:995 msgid "" "You can specify *stack_info* independently of *exc_info*, e.g. to just show " "how you got to a certain point in your code, even when no exceptions were " "raised. The stack frames are printed following a header line which says:" msgstr "" -#: ../../library/logging.rst:189 ../../library/logging.rst:994 +#: ../../library/logging.rst:198 ../../library/logging.rst:1003 msgid "" "This mimics the ``Traceback (most recent call last):`` which is used when " "displaying exception frames." msgstr "" -#: ../../library/logging.rst:192 +#: ../../library/logging.rst:201 msgid "" "The third optional keyword argument is *stacklevel*, which defaults to " "``1``. If greater than 1, the corresponding number of stack frames are " @@ -288,7 +301,7 @@ msgid "" "module." msgstr "" -#: ../../library/logging.rst:200 +#: ../../library/logging.rst:209 msgid "" "The fourth keyword argument is *extra* which can be used to pass a " "dictionary which is used to populate the __dict__ of the :class:`LogRecord` " @@ -297,18 +310,18 @@ msgid "" "incorporated into logged messages. For example::" msgstr "" -#: ../../library/logging.rst:212 +#: ../../library/logging.rst:221 msgid "would print something like" msgstr "" -#: ../../library/logging.rst:218 ../../library/logging.rst:1014 +#: ../../library/logging.rst:227 ../../library/logging.rst:1023 msgid "" "The keys in the dictionary passed in *extra* should not clash with the keys " "used by the logging system. (See the :class:`Formatter` documentation for " "more information on which keys are used by the logging system.)" msgstr "" -#: ../../library/logging.rst:222 +#: ../../library/logging.rst:231 msgid "" "If you choose to use these attributes in logged messages, you need to " "exercise some care. In the above example, for instance, the :class:" @@ -319,7 +332,7 @@ msgid "" "dictionary with these keys." msgstr "" -#: ../../library/logging.rst:229 ../../library/logging.rst:1025 +#: ../../library/logging.rst:238 ../../library/logging.rst:1034 msgid "" "While this might be annoying, this feature is intended for use in " "specialized circumstances, such as multi-threaded servers where the same " @@ -330,71 +343,71 @@ msgid "" "particular :class:`Handler`\\ s." msgstr "" -#: ../../library/logging.rst:236 ../../library/logging.rst:1032 +#: ../../library/logging.rst:245 ../../library/logging.rst:1041 msgid "The *stack_info* parameter was added." msgstr "新增 *stack_info* 參數。" -#: ../../library/logging.rst:239 +#: ../../library/logging.rst:248 msgid "The *exc_info* parameter can now accept exception instances." msgstr "" -#: ../../library/logging.rst:242 +#: ../../library/logging.rst:251 msgid "The *stacklevel* parameter was added." msgstr "新增 *stacklevel* 參數。" -#: ../../library/logging.rst:248 +#: ../../library/logging.rst:257 msgid "" "Logs a message with level :const:`INFO` on this logger. The arguments are " "interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:254 +#: ../../library/logging.rst:263 msgid "" "Logs a message with level :const:`WARNING` on this logger. The arguments are " "interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:257 +#: ../../library/logging.rst:266 msgid "" "There is an obsolete method ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:263 +#: ../../library/logging.rst:272 msgid "" "Logs a message with level :const:`ERROR` on this logger. The arguments are " "interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:269 +#: ../../library/logging.rst:278 msgid "" "Logs a message with level :const:`CRITICAL` on this logger. The arguments " "are interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:275 +#: ../../library/logging.rst:284 msgid "" "Logs a message with integer level *level* on this logger. The other " "arguments are interpreted as for :meth:`debug`." msgstr "" -#: ../../library/logging.rst:281 +#: ../../library/logging.rst:290 msgid "" "Logs a message with level :const:`ERROR` on this logger. The arguments are " "interpreted as for :meth:`debug`. Exception info is added to the logging " "message. This method should only be called from an exception handler." msgstr "" -#: ../../library/logging.rst:288 +#: ../../library/logging.rst:297 msgid "Adds the specified filter *filter* to this logger." msgstr "" -#: ../../library/logging.rst:293 +#: ../../library/logging.rst:302 msgid "Removes the specified filter *filter* from this logger." msgstr "" -#: ../../library/logging.rst:298 +#: ../../library/logging.rst:307 msgid "" "Apply this logger's filters to the record and return ``True`` if the record " "is to be processed. The filters are consulted in turn, until one of them " @@ -403,22 +416,22 @@ msgid "" "processing of the record occurs." msgstr "" -#: ../../library/logging.rst:307 +#: ../../library/logging.rst:316 msgid "Adds the specified handler *hdlr* to this logger." msgstr "" -#: ../../library/logging.rst:312 +#: ../../library/logging.rst:321 msgid "Removes the specified handler *hdlr* from this logger." msgstr "" -#: ../../library/logging.rst:317 +#: ../../library/logging.rst:326 msgid "" "Finds the caller's source filename and line number. Returns the filename, " "line number, function name and stack information as a 4-element tuple. The " "stack information is returned as ``None`` unless *stack_info* is ``True``." msgstr "" -#: ../../library/logging.rst:321 +#: ../../library/logging.rst:330 msgid "" "The *stacklevel* parameter is passed from code calling the :meth:`debug` and " "other APIs. If greater than 1, the excess is used to skip stack frames " @@ -428,7 +441,7 @@ msgid "" "calls it." msgstr "" -#: ../../library/logging.rst:331 +#: ../../library/logging.rst:340 msgid "" "Handles a record by passing it to all handlers associated with this logger " "and its ancestors (until a false value of *propagate* is found). This method " @@ -437,13 +450,13 @@ msgid "" "filter`." msgstr "" -#: ../../library/logging.rst:339 +#: ../../library/logging.rst:348 msgid "" "This is a factory method which can be overridden in subclasses to create " "specialized :class:`LogRecord` instances." msgstr "" -#: ../../library/logging.rst:344 +#: ../../library/logging.rst:353 msgid "" "Checks to see if this logger has any handlers configured. This is done by " "looking for handlers in this logger and its parents in the logger hierarchy. " @@ -453,15 +466,15 @@ msgid "" "the existence of handlers." msgstr "" -#: ../../library/logging.rst:353 +#: ../../library/logging.rst:362 msgid "Loggers can now be pickled and unpickled." msgstr "" -#: ../../library/logging.rst:359 +#: ../../library/logging.rst:368 msgid "Logging Levels" msgstr "" -#: ../../library/logging.rst:361 +#: ../../library/logging.rst:370 msgid "" "The numeric values of logging levels are given in the following table. These " "are primarily of interest if you want to define your own levels, and need " @@ -470,67 +483,67 @@ msgid "" "value; the predefined name is lost." msgstr "" -#: ../../library/logging.rst:368 +#: ../../library/logging.rst:377 msgid "Level" msgstr "" -#: ../../library/logging.rst:368 +#: ../../library/logging.rst:377 msgid "Numeric value" msgstr "" -#: ../../library/logging.rst:370 +#: ../../library/logging.rst:379 msgid "``CRITICAL``" msgstr "``CRITICAL``" -#: ../../library/logging.rst:370 +#: ../../library/logging.rst:379 msgid "50" msgstr "50" -#: ../../library/logging.rst:372 +#: ../../library/logging.rst:381 msgid "``ERROR``" msgstr "``ERROR``" -#: ../../library/logging.rst:372 +#: ../../library/logging.rst:381 msgid "40" msgstr "40" -#: ../../library/logging.rst:374 +#: ../../library/logging.rst:383 msgid "``WARNING``" msgstr "``WARNING``" -#: ../../library/logging.rst:374 +#: ../../library/logging.rst:383 msgid "30" msgstr "30" -#: ../../library/logging.rst:376 +#: ../../library/logging.rst:385 msgid "``INFO``" msgstr "``INFO``" -#: ../../library/logging.rst:376 +#: ../../library/logging.rst:385 msgid "20" msgstr "20" -#: ../../library/logging.rst:378 +#: ../../library/logging.rst:387 msgid "``DEBUG``" msgstr "``DEBUG``" -#: ../../library/logging.rst:378 +#: ../../library/logging.rst:387 msgid "10" msgstr "10" -#: ../../library/logging.rst:380 +#: ../../library/logging.rst:389 msgid "``NOTSET``" msgstr "``NOTSET``" -#: ../../library/logging.rst:380 +#: ../../library/logging.rst:389 msgid "0" msgstr "0" -#: ../../library/logging.rst:387 +#: ../../library/logging.rst:396 msgid "Handler Objects" msgstr "" -#: ../../library/logging.rst:389 +#: ../../library/logging.rst:398 msgid "" "Handlers have the following attributes and methods. Note that :class:" "`Handler` is never instantiated directly; this class acts as a base for more " @@ -538,53 +551,53 @@ msgid "" "to call :meth:`Handler.__init__`." msgstr "" -#: ../../library/logging.rst:398 +#: ../../library/logging.rst:407 msgid "" "Initializes the :class:`Handler` instance by setting its level, setting the " "list of filters to the empty list and creating a lock (using :meth:" "`createLock`) for serializing access to an I/O mechanism." msgstr "" -#: ../../library/logging.rst:405 +#: ../../library/logging.rst:414 msgid "" "Initializes a thread lock which can be used to serialize access to " "underlying I/O functionality which may not be threadsafe." msgstr "" -#: ../../library/logging.rst:411 +#: ../../library/logging.rst:420 msgid "Acquires the thread lock created with :meth:`createLock`." msgstr "" -#: ../../library/logging.rst:416 +#: ../../library/logging.rst:425 msgid "Releases the thread lock acquired with :meth:`acquire`." msgstr "" -#: ../../library/logging.rst:421 +#: ../../library/logging.rst:430 msgid "" "Sets the threshold for this handler to *level*. Logging messages which are " "less severe than *level* will be ignored. When a handler is created, the " "level is set to :const:`NOTSET` (which causes all messages to be processed)." msgstr "" -#: ../../library/logging.rst:428 +#: ../../library/logging.rst:437 msgid "" "The *level* parameter now accepts a string representation of the level such " "as 'INFO' as an alternative to the integer constants such as :const:`INFO`." msgstr "" -#: ../../library/logging.rst:436 +#: ../../library/logging.rst:445 msgid "Sets the :class:`Formatter` for this handler to *fmt*." msgstr "" -#: ../../library/logging.rst:441 +#: ../../library/logging.rst:450 msgid "Adds the specified filter *filter* to this handler." msgstr "" -#: ../../library/logging.rst:446 +#: ../../library/logging.rst:455 msgid "Removes the specified filter *filter* from this handler." msgstr "" -#: ../../library/logging.rst:451 +#: ../../library/logging.rst:460 msgid "" "Apply this handler's filters to the record and return ``True`` if the record " "is to be processed. The filters are consulted in turn, until one of them " @@ -593,13 +606,13 @@ msgid "" "record." msgstr "" -#: ../../library/logging.rst:460 +#: ../../library/logging.rst:469 msgid "" "Ensure all logging output has been flushed. This version does nothing and is " "intended to be implemented by subclasses." msgstr "" -#: ../../library/logging.rst:466 +#: ../../library/logging.rst:475 msgid "" "Tidy up any resources used by the handler. This version does no output but " "removes the handler from an internal list of handlers which is closed when :" @@ -607,14 +620,14 @@ msgid "" "from overridden :meth:`close` methods." msgstr "" -#: ../../library/logging.rst:474 +#: ../../library/logging.rst:483 msgid "" "Conditionally emits the specified logging record, depending on filters which " "may have been added to the handler. Wraps the actual emission of the record " "with acquisition/release of the I/O thread lock." msgstr "" -#: ../../library/logging.rst:481 +#: ../../library/logging.rst:490 msgid "" "This method should be called from handlers when an exception is encountered " "during an :meth:`emit` call. If the module-level attribute " @@ -627,29 +640,29 @@ msgid "" "more useful during development)." msgstr "" -#: ../../library/logging.rst:494 +#: ../../library/logging.rst:503 msgid "" "Do formatting for a record - if a formatter is set, use it. Otherwise, use " "the default formatter for the module." msgstr "" -#: ../../library/logging.rst:500 +#: ../../library/logging.rst:509 msgid "" "Do whatever it takes to actually log the specified logging record. This " "version is intended to be implemented by subclasses and so raises a :exc:" "`NotImplementedError`." msgstr "" -#: ../../library/logging.rst:504 +#: ../../library/logging.rst:513 msgid "" "For a list of handlers included as standard, see :mod:`logging.handlers`." msgstr "" -#: ../../library/logging.rst:509 +#: ../../library/logging.rst:518 msgid "Formatter Objects" msgstr "" -#: ../../library/logging.rst:513 +#: ../../library/logging.rst:522 msgid "" ":class:`Formatter` objects have the following attributes and methods. They " "are responsible for converting a :class:`LogRecord` to (usually) a string " @@ -660,7 +673,7 @@ msgid "" "information in the formatted output (such as a timestamp), keep reading." msgstr "" -#: ../../library/logging.rst:521 +#: ../../library/logging.rst:530 msgid "" "A Formatter can be initialized with a format string which makes use of " "knowledge of the :class:`LogRecord` attributes - such as the default value " @@ -670,13 +683,13 @@ msgid "" "ref:`old-string-formatting` for more information on string formatting." msgstr "" -#: ../../library/logging.rst:528 +#: ../../library/logging.rst:537 msgid "" "The useful mapping keys in a :class:`LogRecord` are given in the section on :" "ref:`logrecord-attributes`." msgstr "" -#: ../../library/logging.rst:534 +#: ../../library/logging.rst:543 msgid "" "Returns a new instance of the :class:`Formatter` class. The instance is " "initialized with a format string for the message as a whole, as well as a " @@ -685,7 +698,7 @@ msgid "" "format is used which is described in the :meth:`formatTime` documentation." msgstr "" -#: ../../library/logging.rst:540 +#: ../../library/logging.rst:549 msgid "" "The *style* parameter can be one of '%', '{' or '$' and determines how the " "format string will be merged with its data: using one of %-formatting, :meth:" @@ -695,29 +708,29 @@ msgid "" "for more information on using {- and $-formatting for log messages." msgstr "" -#: ../../library/logging.rst:548 +#: ../../library/logging.rst:557 msgid "" "The *defaults* parameter can be a dictionary with default values to use in " "custom fields. For example: ``logging.Formatter('%(ip)s %(message)s', " "defaults={\"ip\": None})``" msgstr "" -#: ../../library/logging.rst:552 +#: ../../library/logging.rst:561 msgid "The *style* parameter was added." msgstr "新增 *style* 參數。" -#: ../../library/logging.rst:555 +#: ../../library/logging.rst:564 msgid "" "The *validate* parameter was added. Incorrect or mismatched style and fmt " "will raise a ``ValueError``. For example: ``logging.Formatter('%(asctime)s - " "%(message)s', style='{')``." msgstr "" -#: ../../library/logging.rst:560 +#: ../../library/logging.rst:569 msgid "The *defaults* parameter was added." msgstr "新增 *defaults* 參數。" -#: ../../library/logging.rst:565 +#: ../../library/logging.rst:574 msgid "" "The record's attribute dictionary is used as the operand to a string " "formatting operation. Returns the resulting string. Before formatting the " @@ -736,13 +749,13 @@ msgid "" "recalculates it afresh." msgstr "" -#: ../../library/logging.rst:581 +#: ../../library/logging.rst:590 msgid "" "If stack information is available, it's appended after the exception " "information, using :meth:`formatStack` to transform it if necessary." msgstr "" -#: ../../library/logging.rst:587 +#: ../../library/logging.rst:596 msgid "" "This method should be called from :meth:`format` by a formatter which wants " "to make use of a formatted time. This method can be overridden in formatters " @@ -755,7 +768,7 @@ msgid "" "resulting string is returned." msgstr "" -#: ../../library/logging.rst:597 +#: ../../library/logging.rst:606 msgid "" "This function uses a user-configurable function to convert the creation time " "to a tuple. By default, :func:`time.localtime` is used; to change this for a " @@ -765,7 +778,7 @@ msgid "" "be shown in GMT, set the ``converter`` attribute in the ``Formatter`` class." msgstr "" -#: ../../library/logging.rst:605 +#: ../../library/logging.rst:614 msgid "" "Previously, the default format was hard-coded as in this example: " "``2010-09-06 22:38:15,292`` where the part before the comma is handled by a " @@ -780,11 +793,11 @@ msgid "" "the millisecond value)." msgstr "" -#: ../../library/logging.rst:618 +#: ../../library/logging.rst:627 msgid "The ``default_msec_format`` can be ``None``." msgstr "" -#: ../../library/logging.rst:623 +#: ../../library/logging.rst:632 msgid "" "Formats the specified exception information (a standard exception tuple as " "returned by :func:`sys.exc_info`) as a string. This default implementation " @@ -792,18 +805,18 @@ msgid "" "returned." msgstr "" -#: ../../library/logging.rst:630 +#: ../../library/logging.rst:639 msgid "" "Formats the specified stack information (a string as returned by :func:" "`traceback.print_stack`, but with the last newline removed) as a string. " "This default implementation just returns the input value." msgstr "" -#: ../../library/logging.rst:637 +#: ../../library/logging.rst:646 msgid "Filter Objects" msgstr "" -#: ../../library/logging.rst:639 +#: ../../library/logging.rst:648 msgid "" "``Filters`` can be used by ``Handlers`` and ``Loggers`` for more " "sophisticated filtering than is provided by levels. The base filter class " @@ -813,7 +826,7 @@ msgid "" "If initialized with the empty string, all events are passed." msgstr "" -#: ../../library/logging.rst:649 +#: ../../library/logging.rst:658 msgid "" "Returns an instance of the :class:`Filter` class. If *name* is specified, it " "names a logger which, together with its children, will have its events " @@ -821,13 +834,13 @@ msgid "" "event." msgstr "" -#: ../../library/logging.rst:656 +#: ../../library/logging.rst:665 msgid "" "Is the specified record to be logged? Returns zero for no, nonzero for yes. " "If deemed appropriate, the record may be modified in-place by this method." msgstr "" -#: ../../library/logging.rst:660 +#: ../../library/logging.rst:669 msgid "" "Note that filters attached to handlers are consulted before an event is " "emitted by the handler, whereas filters attached to loggers are consulted " @@ -837,13 +850,13 @@ msgid "" "setting, unless the filter has also been applied to those descendant loggers." msgstr "" -#: ../../library/logging.rst:667 +#: ../../library/logging.rst:676 msgid "" "You don't actually need to subclass ``Filter``: you can pass any instance " "which has a ``filter`` method with the same semantics." msgstr "" -#: ../../library/logging.rst:670 +#: ../../library/logging.rst:679 msgid "" "You don't need to create specialized ``Filter`` classes, or use other " "classes with a ``filter`` method: you can use a function (or other callable) " @@ -854,7 +867,7 @@ msgid "" "value should conform to that returned by :meth:`~Filter.filter`." msgstr "" -#: ../../library/logging.rst:680 +#: ../../library/logging.rst:689 msgid "" "Although filters are used primarily to filter records based on more " "sophisticated criteria than levels, they get to see every record which is " @@ -866,11 +879,11 @@ msgid "" "contextual information into logs (see :ref:`filters-contextual`)." msgstr "" -#: ../../library/logging.rst:692 +#: ../../library/logging.rst:701 msgid "LogRecord Objects" msgstr "LogRecord 物件" -#: ../../library/logging.rst:694 +#: ../../library/logging.rst:703 msgid "" ":class:`LogRecord` instances are created automatically by the :class:" "`Logger` every time something is logged, and can be created manually via :" @@ -878,11 +891,11 @@ msgid "" "wire)." msgstr "" -#: ../../library/logging.rst:702 +#: ../../library/logging.rst:711 msgid "Contains all the information pertinent to the event being logged." msgstr "" -#: ../../library/logging.rst:704 +#: ../../library/logging.rst:713 msgid "" "The primary information is passed in :attr:`msg` and :attr:`args`, which are " "combined using ``msg % args`` to create the :attr:`message` field of the " @@ -893,58 +906,58 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../library/logging.rst:708 +#: ../../library/logging.rst:717 msgid "" "The name of the logger used to log the event represented by this LogRecord. " "Note that this name will always have this value, even though it may be " "emitted by a handler attached to a different (ancestor) logger." msgstr "" -#: ../../library/logging.rst:712 +#: ../../library/logging.rst:721 msgid "" "The numeric level of the logging event (one of DEBUG, INFO etc.) Note that " "this is converted to *two* attributes of the LogRecord: ``levelno`` for the " "numeric value and ``levelname`` for the corresponding level name." msgstr "" -#: ../../library/logging.rst:716 +#: ../../library/logging.rst:725 msgid "The full pathname of the source file where the logging call was made." msgstr "" -#: ../../library/logging.rst:718 +#: ../../library/logging.rst:727 msgid "The line number in the source file where the logging call was made." msgstr "" -#: ../../library/logging.rst:720 +#: ../../library/logging.rst:729 msgid "" "The event description message, possibly a format string with placeholders " "for variable data." msgstr "" -#: ../../library/logging.rst:722 +#: ../../library/logging.rst:731 msgid "" "Variable data to merge into the *msg* argument to obtain the event " "description." msgstr "" -#: ../../library/logging.rst:724 +#: ../../library/logging.rst:733 msgid "" "An exception tuple with the current exception information, or ``None`` if no " "exception information is available." msgstr "" -#: ../../library/logging.rst:726 +#: ../../library/logging.rst:735 msgid "" "The name of the function or method from which the logging call was invoked." msgstr "" -#: ../../library/logging.rst:728 +#: ../../library/logging.rst:737 msgid "" "A text string representing stack information from the base of the stack in " "the current thread, up to the logging call." msgstr "" -#: ../../library/logging.rst:733 +#: ../../library/logging.rst:742 msgid "" "Returns the message for this :class:`LogRecord` instance after merging any " "user-supplied arguments with the message. If the user-supplied message " @@ -953,7 +966,7 @@ msgid "" "whose ``__str__`` method can return the actual format string to be used." msgstr "" -#: ../../library/logging.rst:740 +#: ../../library/logging.rst:749 msgid "" "The creation of a :class:`LogRecord` has been made more configurable by " "providing a factory which is used to create the record. The factory can be " @@ -961,24 +974,24 @@ msgid "" "this for the factory's signature)." msgstr "" -#: ../../library/logging.rst:746 +#: ../../library/logging.rst:755 msgid "" "This functionality can be used to inject your own values into a :class:" "`LogRecord` at creation time. You can use the following pattern::" msgstr "" -#: ../../library/logging.rst:758 +#: ../../library/logging.rst:767 msgid "" "With this pattern, multiple factories could be chained, and as long as they " "don't overwrite each other's attributes or unintentionally overwrite the " "standard attributes listed above, there should be no surprises." msgstr "" -#: ../../library/logging.rst:767 +#: ../../library/logging.rst:776 msgid "LogRecord attributes" msgstr "" -#: ../../library/logging.rst:769 +#: ../../library/logging.rst:778 msgid "" "The LogRecord has a number of attributes, most of which are derived from the " "parameters to the constructor. (Note that the names do not always correspond " @@ -989,7 +1002,7 @@ msgid "" "style format string." msgstr "" -#: ../../library/logging.rst:777 +#: ../../library/logging.rst:786 msgid "" "If you are using {}-formatting (:func:`str.format`), you can use ``{attrname}" "`` as the placeholder in the format string. If you are using $-formatting (:" @@ -997,7 +1010,7 @@ msgid "" "course, replace ``attrname`` with the actual attribute name you want to use." msgstr "" -#: ../../library/logging.rst:783 +#: ../../library/logging.rst:792 msgid "" "In the case of {}-formatting, you can specify formatting flags by placing " "them after the attribute name, separated from it with a colon. For example: " @@ -1006,308 +1019,308 @@ msgid "" "on the options available to you." msgstr "" -#: ../../library/logging.rst:790 +#: ../../library/logging.rst:799 msgid "Attribute name" msgstr "" -#: ../../library/logging.rst:790 ../../library/logging.rst:1179 +#: ../../library/logging.rst:799 ../../library/logging.rst:1188 msgid "Format" msgstr "格式" -#: ../../library/logging.rst:790 ../../library/logging.rst:1179 +#: ../../library/logging.rst:799 ../../library/logging.rst:1188 msgid "Description" msgstr "描述" -#: ../../library/logging.rst:792 ../../library/logging.rst:0 +#: ../../library/logging.rst:801 ../../library/logging.rst:0 msgid "args" msgstr "" -#: ../../library/logging.rst:792 ../../library/logging.rst:806 -#: ../../library/logging.rst:834 ../../library/logging.rst:852 +#: ../../library/logging.rst:801 ../../library/logging.rst:815 +#: ../../library/logging.rst:843 ../../library/logging.rst:861 msgid "You shouldn't need to format this yourself." msgstr "" -#: ../../library/logging.rst:792 +#: ../../library/logging.rst:801 msgid "" "The tuple of arguments merged into ``msg`` to produce ``message``, or a dict " "whose values are used for the merge (when there is only one argument, and it " "is a dictionary)." msgstr "" -#: ../../library/logging.rst:797 +#: ../../library/logging.rst:806 msgid "asctime" msgstr "" -#: ../../library/logging.rst:797 +#: ../../library/logging.rst:806 msgid "``%(asctime)s``" msgstr "``%(asctime)s``" -#: ../../library/logging.rst:797 +#: ../../library/logging.rst:806 msgid "" "Human-readable time when the :class:`LogRecord` was created. By default " "this is of the form '2003-07-08 16:49:45,896' (the numbers after the comma " "are millisecond portion of the time)." msgstr "" -#: ../../library/logging.rst:803 +#: ../../library/logging.rst:812 msgid "created" msgstr "" -#: ../../library/logging.rst:803 +#: ../../library/logging.rst:812 msgid "``%(created)f``" msgstr "``%(created)f``" -#: ../../library/logging.rst:803 +#: ../../library/logging.rst:812 msgid "" "Time when the :class:`LogRecord` was created (as returned by :func:`time." "time`)." msgstr "" -#: ../../library/logging.rst:806 ../../library/logging.rst:0 +#: ../../library/logging.rst:815 ../../library/logging.rst:0 msgid "exc_info" msgstr "exc_info" -#: ../../library/logging.rst:806 +#: ../../library/logging.rst:815 msgid "" "Exception tuple (à la ``sys.exc_info``) or, if no exception has occurred, " "``None``." msgstr "" -#: ../../library/logging.rst:809 +#: ../../library/logging.rst:818 msgid "filename" msgstr "" -#: ../../library/logging.rst:809 +#: ../../library/logging.rst:818 msgid "``%(filename)s``" msgstr "``%(filename)s``" -#: ../../library/logging.rst:809 +#: ../../library/logging.rst:818 msgid "Filename portion of ``pathname``." msgstr "" -#: ../../library/logging.rst:811 +#: ../../library/logging.rst:820 msgid "funcName" msgstr "" -#: ../../library/logging.rst:811 +#: ../../library/logging.rst:820 msgid "``%(funcName)s``" msgstr "``%(funcName)s``" -#: ../../library/logging.rst:811 +#: ../../library/logging.rst:820 msgid "Name of function containing the logging call." msgstr "" -#: ../../library/logging.rst:813 +#: ../../library/logging.rst:822 msgid "levelname" msgstr "" -#: ../../library/logging.rst:813 +#: ../../library/logging.rst:822 msgid "``%(levelname)s``" msgstr "``%(levelname)s``" -#: ../../library/logging.rst:813 +#: ../../library/logging.rst:822 msgid "" "Text logging level for the message (``'DEBUG'``, ``'INFO'``, ``'WARNING'``, " "``'ERROR'``, ``'CRITICAL'``)." msgstr "" -#: ../../library/logging.rst:817 +#: ../../library/logging.rst:826 msgid "levelno" msgstr "" -#: ../../library/logging.rst:817 +#: ../../library/logging.rst:826 msgid "``%(levelno)s``" msgstr "``%(levelno)s``" -#: ../../library/logging.rst:817 +#: ../../library/logging.rst:826 msgid "" "Numeric logging level for the message (:const:`DEBUG`, :const:`INFO`, :const:" "`WARNING`, :const:`ERROR`, :const:`CRITICAL`)." msgstr "" -#: ../../library/logging.rst:822 +#: ../../library/logging.rst:831 msgid "lineno" msgstr "" -#: ../../library/logging.rst:822 +#: ../../library/logging.rst:831 msgid "``%(lineno)d``" msgstr "``%(lineno)d``" -#: ../../library/logging.rst:822 +#: ../../library/logging.rst:831 msgid "Source line number where the logging call was issued (if available)." msgstr "" -#: ../../library/logging.rst:825 +#: ../../library/logging.rst:834 msgid "message" msgstr "" -#: ../../library/logging.rst:825 +#: ../../library/logging.rst:834 msgid "``%(message)s``" msgstr "``%(message)s``" -#: ../../library/logging.rst:825 +#: ../../library/logging.rst:834 msgid "" "The logged message, computed as ``msg % args``. This is set when :meth:" "`Formatter.format` is invoked." msgstr "" -#: ../../library/logging.rst:829 +#: ../../library/logging.rst:838 msgid "module" msgstr "模組" -#: ../../library/logging.rst:829 +#: ../../library/logging.rst:838 msgid "``%(module)s``" msgstr "``%(module)s``" -#: ../../library/logging.rst:829 +#: ../../library/logging.rst:838 msgid "Module (name portion of ``filename``)." msgstr "" -#: ../../library/logging.rst:831 +#: ../../library/logging.rst:840 msgid "msecs" msgstr "" -#: ../../library/logging.rst:831 +#: ../../library/logging.rst:840 msgid "``%(msecs)d``" msgstr "``%(msecs)d``" -#: ../../library/logging.rst:831 +#: ../../library/logging.rst:840 msgid "" "Millisecond portion of the time when the :class:`LogRecord` was created." msgstr "" -#: ../../library/logging.rst:834 ../../library/logging.rst:0 +#: ../../library/logging.rst:843 ../../library/logging.rst:0 msgid "msg" msgstr "" -#: ../../library/logging.rst:834 +#: ../../library/logging.rst:843 msgid "" "The format string passed in the original logging call. Merged with ``args`` " "to produce ``message``, or an arbitrary object (see :ref:`arbitrary-object-" "messages`)." msgstr "" -#: ../../library/logging.rst:839 ../../library/logging.rst:0 +#: ../../library/logging.rst:848 ../../library/logging.rst:0 msgid "name" msgstr "" -#: ../../library/logging.rst:839 +#: ../../library/logging.rst:848 msgid "``%(name)s``" msgstr "``%(name)s``" -#: ../../library/logging.rst:839 +#: ../../library/logging.rst:848 msgid "Name of the logger used to log the call." msgstr "" -#: ../../library/logging.rst:841 +#: ../../library/logging.rst:850 msgid "pathname" msgstr "" -#: ../../library/logging.rst:841 +#: ../../library/logging.rst:850 msgid "``%(pathname)s``" msgstr "``%(pathname)s``" -#: ../../library/logging.rst:841 +#: ../../library/logging.rst:850 msgid "" "Full pathname of the source file where the logging call was issued (if " "available)." msgstr "" -#: ../../library/logging.rst:844 +#: ../../library/logging.rst:853 msgid "process" msgstr "" -#: ../../library/logging.rst:844 +#: ../../library/logging.rst:853 msgid "``%(process)d``" msgstr "``%(process)d``" -#: ../../library/logging.rst:844 +#: ../../library/logging.rst:853 msgid "Process ID (if available)." msgstr "" -#: ../../library/logging.rst:846 +#: ../../library/logging.rst:855 msgid "processName" msgstr "" -#: ../../library/logging.rst:846 +#: ../../library/logging.rst:855 msgid "``%(processName)s``" msgstr "``%(processName)s``" -#: ../../library/logging.rst:846 +#: ../../library/logging.rst:855 msgid "Process name (if available)." msgstr "" -#: ../../library/logging.rst:848 +#: ../../library/logging.rst:857 msgid "relativeCreated" msgstr "" -#: ../../library/logging.rst:848 +#: ../../library/logging.rst:857 msgid "``%(relativeCreated)d``" msgstr "``%(relativeCreated)d``" -#: ../../library/logging.rst:848 +#: ../../library/logging.rst:857 msgid "" "Time in milliseconds when the LogRecord was created, relative to the time " "the logging module was loaded." msgstr "" -#: ../../library/logging.rst:852 +#: ../../library/logging.rst:861 msgid "stack_info" msgstr "stack_info" -#: ../../library/logging.rst:852 +#: ../../library/logging.rst:861 msgid "" "Stack frame information (where available) from the bottom of the stack in " "the current thread, up to and including the stack frame of the logging call " "which resulted in the creation of this record." msgstr "" -#: ../../library/logging.rst:858 +#: ../../library/logging.rst:867 msgid "thread" msgstr "" -#: ../../library/logging.rst:858 +#: ../../library/logging.rst:867 msgid "``%(thread)d``" msgstr "``%(thread)d``" -#: ../../library/logging.rst:858 +#: ../../library/logging.rst:867 msgid "Thread ID (if available)." msgstr "" -#: ../../library/logging.rst:860 +#: ../../library/logging.rst:869 msgid "threadName" msgstr "" -#: ../../library/logging.rst:860 +#: ../../library/logging.rst:869 msgid "``%(threadName)s``" msgstr "``%(threadName)s``" -#: ../../library/logging.rst:860 +#: ../../library/logging.rst:869 msgid "Thread name (if available)." msgstr "" -#: ../../library/logging.rst:863 +#: ../../library/logging.rst:872 msgid "*processName* was added." msgstr "新增 *processName*\\ 。" -#: ../../library/logging.rst:870 +#: ../../library/logging.rst:879 msgid "LoggerAdapter Objects" msgstr "LoggerAdapter 物件" -#: ../../library/logging.rst:872 +#: ../../library/logging.rst:881 msgid "" ":class:`LoggerAdapter` instances are used to conveniently pass contextual " "information into logging calls. For a usage example, see the section on :ref:" "`adding contextual information to your logging output `." msgstr "" -#: ../../library/logging.rst:878 +#: ../../library/logging.rst:887 msgid "" "Returns an instance of :class:`LoggerAdapter` initialized with an " "underlying :class:`Logger` instance and a dict-like object." msgstr "" -#: ../../library/logging.rst:883 +#: ../../library/logging.rst:892 msgid "" "Modifies the message and/or keyword arguments passed to a logging call in " "order to insert contextual information. This implementation takes the object " @@ -1316,7 +1329,7 @@ msgid "" "(possibly modified) versions of the arguments passed in." msgstr "" -#: ../../library/logging.rst:889 +#: ../../library/logging.rst:898 msgid "" "In addition to the above, :class:`LoggerAdapter` supports the following " "methods of :class:`Logger`: :meth:`~Logger.debug`, :meth:`~Logger.info`, :" @@ -1328,24 +1341,24 @@ msgid "" "interchangeably." msgstr "" -#: ../../library/logging.rst:898 +#: ../../library/logging.rst:907 msgid "" "The :meth:`~Logger.isEnabledFor`, :meth:`~Logger.getEffectiveLevel`, :meth:" "`~Logger.setLevel` and :meth:`~Logger.hasHandlers` methods were added to :" "class:`LoggerAdapter`. These methods delegate to the underlying logger." msgstr "" -#: ../../library/logging.rst:903 +#: ../../library/logging.rst:912 msgid "" "Attribute :attr:`manager` and method :meth:`_log` were added, which delegate " "to the underlying logger and allow adapters to be nested." msgstr "" -#: ../../library/logging.rst:909 +#: ../../library/logging.rst:918 msgid "Thread Safety" msgstr "" -#: ../../library/logging.rst:911 +#: ../../library/logging.rst:920 msgid "" "The logging module is intended to be thread-safe without any special work " "needing to be done by its clients. It achieves this though using threading " @@ -1354,7 +1367,7 @@ msgid "" "O." msgstr "" -#: ../../library/logging.rst:916 +#: ../../library/logging.rst:925 msgid "" "If you are implementing asynchronous signal handlers using the :mod:`signal` " "module, you may not be able to use logging from within such handlers. This " @@ -1362,17 +1375,17 @@ msgid "" "always re-entrant, and so cannot be invoked from such signal handlers." msgstr "" -#: ../../library/logging.rst:923 +#: ../../library/logging.rst:932 msgid "Module-Level Functions" msgstr "" -#: ../../library/logging.rst:925 +#: ../../library/logging.rst:934 msgid "" "In addition to the classes described above, there are a number of module-" "level functions." msgstr "" -#: ../../library/logging.rst:931 +#: ../../library/logging.rst:940 msgid "" "Return a logger with the specified name or, if name is ``None``, return a " "logger which is the root logger of the hierarchy. If specified, the name is " @@ -1381,14 +1394,14 @@ msgid "" "logging." msgstr "" -#: ../../library/logging.rst:936 +#: ../../library/logging.rst:945 msgid "" "All calls to this function with a given name return the same logger " "instance. This means that logger instances never need to be passed between " "different parts of an application." msgstr "" -#: ../../library/logging.rst:943 +#: ../../library/logging.rst:952 msgid "" "Return either the standard :class:`Logger` class, or the last class passed " "to :func:`setLoggerClass`. This function may be called from within a new " @@ -1397,24 +1410,24 @@ msgid "" "example::" msgstr "" -#: ../../library/logging.rst:954 +#: ../../library/logging.rst:963 msgid "Return a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:956 +#: ../../library/logging.rst:965 msgid "" "This function has been provided, along with :func:`setLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:961 +#: ../../library/logging.rst:970 msgid "" "See :func:`setLogRecordFactory` for more information about the how the " "factory is called." msgstr "" -#: ../../library/logging.rst:966 +#: ../../library/logging.rst:975 msgid "" "Logs a message with level :const:`DEBUG` on the root logger. The *msg* is " "the message format string, and the *args* are the arguments which are merged " @@ -1423,7 +1436,7 @@ msgid "" "argument.)" msgstr "" -#: ../../library/logging.rst:971 +#: ../../library/logging.rst:980 msgid "" "There are three keyword arguments in *kwargs* which are inspected: " "*exc_info* which, if it does not evaluate as false, causes exception " @@ -1433,7 +1446,7 @@ msgid "" "exception information." msgstr "" -#: ../../library/logging.rst:997 +#: ../../library/logging.rst:1006 msgid "" "The third optional keyword argument is *extra* which can be used to pass a " "dictionary which is used to populate the __dict__ of the LogRecord created " @@ -1442,11 +1455,11 @@ msgid "" "logged messages. For example::" msgstr "" -#: ../../library/logging.rst:1008 +#: ../../library/logging.rst:1017 msgid "would print something like:" msgstr "" -#: ../../library/logging.rst:1018 +#: ../../library/logging.rst:1027 msgid "" "If you choose to use these attributes in logged messages, you need to " "exercise some care. In the above example, for instance, the :class:" @@ -1457,51 +1470,51 @@ msgid "" "dictionary with these keys." msgstr "" -#: ../../library/logging.rst:1037 +#: ../../library/logging.rst:1046 msgid "" "Logs a message with level :const:`INFO` on the root logger. The arguments " "are interpreted as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1043 +#: ../../library/logging.rst:1052 msgid "" "Logs a message with level :const:`WARNING` on the root logger. The arguments " "are interpreted as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1046 +#: ../../library/logging.rst:1055 msgid "" "There is an obsolete function ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:1053 +#: ../../library/logging.rst:1062 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "are interpreted as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1059 +#: ../../library/logging.rst:1068 msgid "" "Logs a message with level :const:`CRITICAL` on the root logger. The " "arguments are interpreted as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1065 +#: ../../library/logging.rst:1074 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "are interpreted as for :func:`debug`. Exception info is added to the logging " "message. This function should only be called from an exception handler." msgstr "" -#: ../../library/logging.rst:1071 +#: ../../library/logging.rst:1080 msgid "" "Logs a message with level *level* on the root logger. The other arguments " "are interpreted as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1074 +#: ../../library/logging.rst:1083 msgid "" "The above module-level convenience functions, which delegate to the root " "logger, call :func:`basicConfig` to ensure that at least one handler is " @@ -1514,7 +1527,7 @@ msgid "" "messages for the same event." msgstr "" -#: ../../library/logging.rst:1086 +#: ../../library/logging.rst:1095 msgid "" "Provides an overriding level *level* for all loggers which takes precedence " "over the logger's own level. When the need arises to temporarily throttle " @@ -1528,7 +1541,7 @@ msgid "" "individual loggers." msgstr "" -#: ../../library/logging.rst:1097 +#: ../../library/logging.rst:1106 msgid "" "Note that if you have defined any custom logging level higher than " "``CRITICAL`` (this is not recommended), you won't be able to rely on the " @@ -1536,13 +1549,13 @@ msgid "" "a suitable value." msgstr "" -#: ../../library/logging.rst:1102 +#: ../../library/logging.rst:1111 msgid "" "The *level* parameter was defaulted to level ``CRITICAL``. See :issue:" "`28524` for more information about this change." msgstr "" -#: ../../library/logging.rst:1108 +#: ../../library/logging.rst:1117 msgid "" "Associates level *level* with text *levelName* in an internal dictionary, " "which is used to map numeric levels to a textual representation, for example " @@ -1552,17 +1565,17 @@ msgid "" "and they should increase in increasing order of severity." msgstr "" -#: ../../library/logging.rst:1115 +#: ../../library/logging.rst:1124 msgid "" "If you are thinking of defining your own levels, please see the section on :" "ref:`custom-levels`." msgstr "" -#: ../../library/logging.rst:1120 +#: ../../library/logging.rst:1129 msgid "Returns the textual or numeric representation of logging level *level*." msgstr "" -#: ../../library/logging.rst:1122 +#: ../../library/logging.rst:1131 msgid "" "If *level* is one of the predefined levels :const:`CRITICAL`, :const:" "`ERROR`, :const:`WARNING`, :const:`INFO` or :const:`DEBUG` then you get the " @@ -1572,20 +1585,20 @@ msgid "" "the corresponding string representation is returned." msgstr "" -#: ../../library/logging.rst:1129 +#: ../../library/logging.rst:1138 msgid "" "The *level* parameter also accepts a string representation of the level such " "as 'INFO'. In such cases, this functions returns the corresponding numeric " "value of the level." msgstr "" -#: ../../library/logging.rst:1133 +#: ../../library/logging.rst:1142 msgid "" "If no matching numeric or string value is passed in, the string 'Level %s' % " "level is returned." msgstr "" -#: ../../library/logging.rst:1136 +#: ../../library/logging.rst:1145 msgid "" "Levels are internally integers (as they need to be compared in the logging " "logic). This function is used to convert between an integer level and the " @@ -1594,7 +1607,7 @@ msgid "" "versa." msgstr "" -#: ../../library/logging.rst:1142 +#: ../../library/logging.rst:1151 msgid "" "In Python versions earlier than 3.4, this function could also be passed a " "text level, and would return the corresponding numeric value of the level. " @@ -1602,7 +1615,7 @@ msgid "" "Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." msgstr "" -#: ../../library/logging.rst:1150 +#: ../../library/logging.rst:1159 msgid "" "Creates and returns a new :class:`LogRecord` instance whose attributes are " "defined by *attrdict*. This function is useful for taking a pickled :class:" @@ -1610,7 +1623,7 @@ msgid "" "as a :class:`LogRecord` instance at the receiving end." msgstr "" -#: ../../library/logging.rst:1158 +#: ../../library/logging.rst:1167 msgid "" "Does basic configuration for the logging system by creating a :class:" "`StreamHandler` with a default :class:`Formatter` and adding it to the root " @@ -1619,13 +1632,13 @@ msgid "" "no handlers are defined for the root logger." msgstr "" -#: ../../library/logging.rst:1164 +#: ../../library/logging.rst:1173 msgid "" "This function does nothing if the root logger already has handlers " "configured, unless the keyword argument *force* is set to ``True``." msgstr "" -#: ../../library/logging.rst:1167 +#: ../../library/logging.rst:1176 msgid "" "This function should be called from the main thread before other threads are " "started. In versions of Python prior to 2.7.1 and 3.2, if this function is " @@ -1634,54 +1647,54 @@ msgid "" "unexpected results such as messages being duplicated in the log." msgstr "" -#: ../../library/logging.rst:1174 +#: ../../library/logging.rst:1183 msgid "The following keyword arguments are supported." msgstr "" -#: ../../library/logging.rst:1181 +#: ../../library/logging.rst:1190 msgid "*filename*" msgstr "*filename*" -#: ../../library/logging.rst:1181 +#: ../../library/logging.rst:1190 msgid "" "Specifies that a :class:`FileHandler` be created, using the specified " "filename, rather than a :class:`StreamHandler`." msgstr "" -#: ../../library/logging.rst:1185 +#: ../../library/logging.rst:1194 msgid "*filemode*" msgstr "*filemode*" -#: ../../library/logging.rst:1185 +#: ../../library/logging.rst:1194 msgid "" "If *filename* is specified, open the file in this :ref:`mode `. " "Defaults to ``'a'``." msgstr "" -#: ../../library/logging.rst:1189 +#: ../../library/logging.rst:1198 msgid "*format*" msgstr "*format*" -#: ../../library/logging.rst:1189 +#: ../../library/logging.rst:1198 msgid "" "Use the specified format string for the handler. Defaults to attributes " "``levelname``, ``name`` and ``message`` separated by colons." msgstr "" -#: ../../library/logging.rst:1194 +#: ../../library/logging.rst:1203 msgid "*datefmt*" msgstr "*datefmt*" -#: ../../library/logging.rst:1194 +#: ../../library/logging.rst:1203 msgid "" "Use the specified date/time format, as accepted by :func:`time.strftime`." msgstr "" -#: ../../library/logging.rst:1197 +#: ../../library/logging.rst:1206 msgid "*style*" msgstr "*style*" -#: ../../library/logging.rst:1197 +#: ../../library/logging.rst:1206 msgid "" "If *format* is specified, use this style for the format string. One of " "``'%'``, ``'{'`` or ``'$'`` for :ref:`printf-style `." msgstr "" -#: ../../library/logging.rst:1208 +#: ../../library/logging.rst:1217 msgid "*stream*" msgstr "*stream*" -#: ../../library/logging.rst:1208 +#: ../../library/logging.rst:1217 msgid "" "Use the specified stream to initialize the :class:`StreamHandler`. Note that " "this argument is incompatible with *filename* - if both are present, a " "``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1214 +#: ../../library/logging.rst:1223 msgid "*handlers*" msgstr "*handlers*" -#: ../../library/logging.rst:1214 +#: ../../library/logging.rst:1223 msgid "" "If specified, this should be an iterable of already created handlers to add " "to the root logger. Any handlers which don't already have a formatter set " @@ -1721,33 +1734,33 @@ msgid "" "present, a ``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1223 +#: ../../library/logging.rst:1232 msgid "*force*" msgstr "*force*" -#: ../../library/logging.rst:1223 +#: ../../library/logging.rst:1232 msgid "" "If this keyword argument is specified as true, any existing handlers " "attached to the root logger are removed and closed, before carrying out the " "configuration as specified by the other arguments." msgstr "" -#: ../../library/logging.rst:1229 +#: ../../library/logging.rst:1238 msgid "*encoding*" msgstr "*encoding*" -#: ../../library/logging.rst:1229 +#: ../../library/logging.rst:1238 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " "the output file." msgstr "" -#: ../../library/logging.rst:1234 +#: ../../library/logging.rst:1243 msgid "*errors*" msgstr "*errors*" -#: ../../library/logging.rst:1234 +#: ../../library/logging.rst:1243 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " @@ -1756,39 +1769,39 @@ msgid "" "`open`, which means that it will be treated the same as passing 'errors'." msgstr "" -#: ../../library/logging.rst:1245 +#: ../../library/logging.rst:1254 msgid "The *style* argument was added." msgstr "新增 *style* 引數。" -#: ../../library/logging.rst:1248 +#: ../../library/logging.rst:1257 msgid "" "The *handlers* argument was added. Additional checks were added to catch " "situations where incompatible arguments are specified (e.g. *handlers* " "together with *stream* or *filename*, or *stream* together with *filename*)." msgstr "" -#: ../../library/logging.rst:1254 +#: ../../library/logging.rst:1263 msgid "The *force* argument was added." msgstr "新增 *force* 引數。" -#: ../../library/logging.rst:1257 +#: ../../library/logging.rst:1266 msgid "The *encoding* and *errors* arguments were added." msgstr "新增 *encoding* 與 *errors* 引數。" -#: ../../library/logging.rst:1262 +#: ../../library/logging.rst:1271 msgid "" "Informs the logging system to perform an orderly shutdown by flushing and " "closing all handlers. This should be called at application exit and no " "further use of the logging system should be made after this call." msgstr "" -#: ../../library/logging.rst:1266 +#: ../../library/logging.rst:1275 msgid "" "When the logging module is imported, it registers this function as an exit " "handler (see :mod:`atexit`), so normally there's no need to do that manually." msgstr "" -#: ../../library/logging.rst:1273 +#: ../../library/logging.rst:1282 msgid "" "Tells the logging system to use the class *klass* when instantiating a " "logger. The class should define :meth:`__init__` such that only a name " @@ -1800,32 +1813,32 @@ msgid "" "loggers." msgstr "" -#: ../../library/logging.rst:1284 +#: ../../library/logging.rst:1293 msgid "Set a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1286 +#: ../../library/logging.rst:1295 msgid "The factory callable to be used to instantiate a log record." msgstr "" -#: ../../library/logging.rst:1288 +#: ../../library/logging.rst:1297 msgid "" "This function has been provided, along with :func:`getLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1293 +#: ../../library/logging.rst:1302 msgid "The factory has the following signature:" msgstr "" -#: ../../library/logging.rst:1295 +#: ../../library/logging.rst:1304 msgid "" "``factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, " "**kwargs)``" msgstr "" -#: ../../library/logging.rst:1297 +#: ../../library/logging.rst:1306 msgid "The logger name." msgstr "" @@ -1833,7 +1846,7 @@ msgstr "" msgid "level" msgstr "" -#: ../../library/logging.rst:1298 +#: ../../library/logging.rst:1307 msgid "The logging level (numeric)." msgstr "" @@ -1841,7 +1854,7 @@ msgstr "" msgid "fn" msgstr "fn" -#: ../../library/logging.rst:1299 +#: ../../library/logging.rst:1308 msgid "The full pathname of the file where the logging call was made." msgstr "" @@ -1849,19 +1862,19 @@ msgstr "" msgid "lno" msgstr "lno" -#: ../../library/logging.rst:1300 +#: ../../library/logging.rst:1309 msgid "The line number in the file where the logging call was made." msgstr "" -#: ../../library/logging.rst:1301 +#: ../../library/logging.rst:1310 msgid "The logging message." msgstr "" -#: ../../library/logging.rst:1302 +#: ../../library/logging.rst:1311 msgid "The arguments for the logging message." msgstr "" -#: ../../library/logging.rst:1303 +#: ../../library/logging.rst:1312 msgid "An exception tuple, or ``None``." msgstr "" @@ -1869,7 +1882,7 @@ msgstr "" msgid "func" msgstr "func" -#: ../../library/logging.rst:1304 +#: ../../library/logging.rst:1313 msgid "The name of the function or method which invoked the logging call." msgstr "" @@ -1877,7 +1890,7 @@ msgstr "" msgid "sinfo" msgstr "sinfo" -#: ../../library/logging.rst:1306 +#: ../../library/logging.rst:1315 msgid "" "A stack traceback such as is provided by :func:`traceback.print_stack`, " "showing the call hierarchy." @@ -1887,15 +1900,15 @@ msgstr "" msgid "kwargs" msgstr "kwargs" -#: ../../library/logging.rst:1308 +#: ../../library/logging.rst:1317 msgid "Additional keyword arguments." msgstr "額外的關鍵字引數。" -#: ../../library/logging.rst:1312 +#: ../../library/logging.rst:1321 msgid "Module-Level Attributes" msgstr "" -#: ../../library/logging.rst:1316 +#: ../../library/logging.rst:1325 msgid "" "A \"handler of last resort\" is available through this attribute. This is a :" "class:`StreamHandler` writing to ``sys.stderr`` with a level of ``WARNING``, " @@ -1906,22 +1919,22 @@ msgid "" "reason, ``lastResort`` can be set to ``None``." msgstr "" -#: ../../library/logging.rst:1327 +#: ../../library/logging.rst:1336 msgid "Integration with the warnings module" msgstr "" -#: ../../library/logging.rst:1329 +#: ../../library/logging.rst:1338 msgid "" "The :func:`captureWarnings` function can be used to integrate :mod:`logging` " "with the :mod:`warnings` module." msgstr "" -#: ../../library/logging.rst:1334 +#: ../../library/logging.rst:1343 msgid "" "This function is used to turn the capture of warnings by logging on and off." msgstr "" -#: ../../library/logging.rst:1337 +#: ../../library/logging.rst:1346 msgid "" "If *capture* is ``True``, warnings issued by the :mod:`warnings` module will " "be redirected to the logging system. Specifically, a warning will be " @@ -1930,46 +1943,46 @@ msgid "" "`WARNING`." msgstr "" -#: ../../library/logging.rst:1342 +#: ../../library/logging.rst:1351 msgid "" "If *capture* is ``False``, the redirection of warnings to the logging system " "will stop, and warnings will be redirected to their original destinations (i." "e. those in effect before ``captureWarnings(True)`` was called)." msgstr "" -#: ../../library/logging.rst:1350 +#: ../../library/logging.rst:1359 msgid "Module :mod:`logging.config`" msgstr "" -#: ../../library/logging.rst:1350 +#: ../../library/logging.rst:1359 msgid "Configuration API for the logging module." msgstr "" -#: ../../library/logging.rst:1353 +#: ../../library/logging.rst:1362 msgid "Module :mod:`logging.handlers`" msgstr "" -#: ../../library/logging.rst:1353 +#: ../../library/logging.rst:1362 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../library/logging.rst:1357 +#: ../../library/logging.rst:1366 msgid ":pep:`282` - A Logging System" msgstr "" -#: ../../library/logging.rst:1356 +#: ../../library/logging.rst:1365 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/logging.rst:1362 +#: ../../library/logging.rst:1371 msgid "" "`Original Python logging package `_" msgstr "" -#: ../../library/logging.rst:1360 +#: ../../library/logging.rst:1369 msgid "" "This is the original source for the :mod:`logging` package. The version of " "the package available from this site is suitable for use with Python 1.5.2, " From 4855cc7a87a1c4fe708b76efc6078644ded1bb50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Dec 2021 16:25:04 +0000 Subject: [PATCH 2/3] sync with cpython 99c72326 --- library/dis.po | 37 ++++++++++++++++++------------------- whatsnew/3.10.po | 4 ++-- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/library/dis.po b/library/dis.po index 7423652741..cc7bff8fb7 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2021-12-08 16:23+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1228,58 +1228,57 @@ msgstr "" #: ../../library/dis.rst:1255 msgid "" -"Pops TOS. If TOS was not ``None``, raises an exception. The ``kind`` operand " -"corresponds to the type of generator or coroutine and determines the error " -"message. The legal kinds are 0 for generator, 1 for coroutine, and 2 for " +"Pops TOS. The ``kind`` operand corresponds to the type of generator or " +"coroutine. The legal kinds are 0 for generator, 1 for coroutine, and 2 for " "async generator." msgstr "" -#: ../../library/dis.rst:1265 +#: ../../library/dis.rst:1264 msgid "" "Lift the top *count* stack items one position up, and move TOS down to " "position *count*." msgstr "" -#: ../../library/dis.rst:1273 +#: ../../library/dis.rst:1272 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes which don't use their argument and those that do (``< " "HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: ../../library/dis.rst:1277 +#: ../../library/dis.rst:1276 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: ../../library/dis.rst:1285 +#: ../../library/dis.rst:1284 msgid "Opcode collections" msgstr "" -#: ../../library/dis.rst:1287 +#: ../../library/dis.rst:1286 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../library/dis.rst:1292 +#: ../../library/dis.rst:1291 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../library/dis.rst:1297 +#: ../../library/dis.rst:1296 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../library/dis.rst:1302 +#: ../../library/dis.rst:1301 msgid "Sequence of all compare operation names." msgstr "" -#: ../../library/dis.rst:1307 +#: ../../library/dis.rst:1306 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../library/dis.rst:1312 +#: ../../library/dis.rst:1311 msgid "" "Sequence of bytecodes that access a free variable (note that 'free' in this " "context refers to names in the current scope that are referenced by inner " @@ -1287,22 +1286,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: ../../library/dis.rst:1320 +#: ../../library/dis.rst:1319 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../library/dis.rst:1325 +#: ../../library/dis.rst:1324 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../library/dis.rst:1330 +#: ../../library/dis.rst:1329 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../library/dis.rst:1335 +#: ../../library/dis.rst:1334 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../library/dis.rst:1340 +#: ../../library/dis.rst:1339 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index e469a20d30..b5ffe9af65 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-09 00:12+0000\n" +"POT-Creation-Date: 2021-12-08 16:23+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1340,7 +1340,7 @@ msgid "" "keyword:`case `, and :keyword:`_ ` in pattern-" "matching statements. However, this highlighting is not perfect and will be " "incorrect in some rare cases, including some ``_``-s in ``case`` patterns. " -"(Contributed by Tal Einat in bpo-44010.)" +"(Contributed by Tal Einat in :issue:`44010`.)" msgstr "" #: ../../whatsnew/3.10.rst:1168 From 0c9cb28e631d7bacd2506d46b55487e80dac5888 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Dec 2021 00:10:37 +0000 Subject: [PATCH 3/3] sync with cpython 0f21bac6 --- howto/annotations.po | 4 +- library/stdtypes.po | 1989 ++++++++++++++++++++-------------------- reference/datamodel.po | 4 +- 3 files changed, 999 insertions(+), 998 deletions(-) diff --git a/howto/annotations.po b/howto/annotations.po index f74cbfb1b3..06474e5375 100644 --- a/howto/annotations.po +++ b/howto/annotations.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: 2021-12-11 00:08+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -219,7 +219,7 @@ msgstr "" #: ../../howto/annotations.rst:159 msgid "" -":pep:`604` union types using `|`, before support for this was added to " +":pep:`604` union types using ``|``, before support for this was added to " "Python 3.10." msgstr "" diff --git a/library/stdtypes.po b/library/stdtypes.po index 7638151a46..6eb9c950ee 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-23 00:09+0000\n" +"POT-Creation-Date: 2021-12-11 00:08+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-" @@ -102,22 +102,22 @@ msgid "These are the Boolean operations, ordered by ascending priority:" msgstr "" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:143 -#: ../../library/stdtypes.rst:274 ../../library/stdtypes.rst:363 -#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:882 -#: ../../library/stdtypes.rst:1077 +#: ../../library/stdtypes.rst:275 ../../library/stdtypes.rst:364 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:1078 msgid "Operation" msgstr "" -#: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:274 -#: ../../library/stdtypes.rst:363 ../../library/stdtypes.rst:413 -#: ../../library/stdtypes.rst:882 ../../library/stdtypes.rst:1077 +#: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 +#: ../../library/stdtypes.rst:364 ../../library/stdtypes.rst:414 +#: ../../library/stdtypes.rst:883 ../../library/stdtypes.rst:1078 msgid "Result" msgstr "結果" -#: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:274 -#: ../../library/stdtypes.rst:413 ../../library/stdtypes.rst:882 -#: ../../library/stdtypes.rst:1077 ../../library/stdtypes.rst:2309 -#: ../../library/stdtypes.rst:3530 +#: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 +#: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 +#: ../../library/stdtypes.rst:1078 ../../library/stdtypes.rst:2310 +#: ../../library/stdtypes.rst:3531 msgid "Notes" msgstr "註解" @@ -129,10 +129,10 @@ msgstr "``x or y``" msgid "if *x* is false, then *y*, else *x*" msgstr "" -#: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:284 -#: ../../library/stdtypes.rst:884 ../../library/stdtypes.rst:887 -#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2315 -#: ../../library/stdtypes.rst:3536 +#: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:285 +#: ../../library/stdtypes.rst:885 ../../library/stdtypes.rst:888 +#: ../../library/stdtypes.rst:1089 ../../library/stdtypes.rst:2316 +#: ../../library/stdtypes.rst:3537 msgid "\\(1)" msgstr "\\(1)" @@ -144,10 +144,10 @@ msgstr "``x and y``" msgid "if *x* is false, then *x*, else *y*" msgstr "" -#: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:287 -#: ../../library/stdtypes.rst:307 ../../library/stdtypes.rst:1116 -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:2321 -#: ../../library/stdtypes.rst:3540 ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:288 +#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1117 +#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:2322 +#: ../../library/stdtypes.rst:3541 ../../library/stdtypes.rst:3543 msgid "\\(2)" msgstr "\\(2)" @@ -159,19 +159,19 @@ msgstr "``not x``" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:896 -#: ../../library/stdtypes.rst:1119 ../../library/stdtypes.rst:2323 -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:2327 -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3544 -#: ../../library/stdtypes.rst:3546 ../../library/stdtypes.rst:3548 -#: ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:897 +#: ../../library/stdtypes.rst:1120 ../../library/stdtypes.rst:2324 +#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:2328 +#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:3547 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:3551 msgid "\\(3)" msgstr "\\(3)" -#: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:318 -#: ../../library/stdtypes.rst:431 ../../library/stdtypes.rst:923 -#: ../../library/stdtypes.rst:1127 ../../library/stdtypes.rst:2355 -#: ../../library/stdtypes.rst:3580 +#: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:319 +#: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:924 +#: ../../library/stdtypes.rst:1128 ../../library/stdtypes.rst:2356 +#: ../../library/stdtypes.rst:3581 msgid "Notes:" msgstr "註解:" @@ -210,9 +210,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2286 -#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3507 -#: ../../library/stdtypes.rst:3530 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2287 +#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:3508 +#: ../../library/stdtypes.rst:3531 msgid "Meaning" msgstr "" @@ -293,37 +293,38 @@ msgstr "" #: ../../library/stdtypes.rst:180 msgid "" "Non-identical instances of a class normally compare as non-equal unless the " -"class defines the :meth:`__eq__` method." +"class defines the :meth:`~object.__eq__` method." msgstr "" #: ../../library/stdtypes.rst:183 msgid "" "Instances of a class cannot be ordered with respect to other instances of " "the same class, or other types of object, unless the class defines enough of " -"the methods :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, and :meth:" -"`__ge__` (in general, :meth:`__lt__` and :meth:`__eq__` are sufficient, if " -"you want the conventional meanings of the comparison operators)." +"the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object." +"__gt__`, and :meth:`~object.__ge__` (in general, :meth:`~object.__lt__` and :" +"meth:`~object.__eq__` are sufficient, if you want the conventional meanings " +"of the comparison operators)." msgstr "" -#: ../../library/stdtypes.rst:189 +#: ../../library/stdtypes.rst:190 msgid "" "The behavior of the :keyword:`is` and :keyword:`is not` operators cannot be " "customized; also they can be applied to any two objects and never raise an " "exception." msgstr "" -#: ../../library/stdtypes.rst:197 +#: ../../library/stdtypes.rst:198 msgid "" "Two more operations with the same syntactic priority, :keyword:`in` and :" "keyword:`not in`, are supported by types that are :term:`iterable` or " "implement the :meth:`__contains__` method." msgstr "" -#: ../../library/stdtypes.rst:204 +#: ../../library/stdtypes.rst:205 msgid "Numeric Types --- :class:`int`, :class:`float`, :class:`complex`" msgstr "" -#: ../../library/stdtypes.rst:214 +#: ../../library/stdtypes.rst:215 msgid "" "There are three distinct numeric types: :dfn:`integers`, :dfn:`floating " "point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a " @@ -338,7 +339,7 @@ msgid "" "Decimal`, for floating-point numbers with user-definable precision.)" msgstr "" -#: ../../library/stdtypes.rst:236 +#: ../../library/stdtypes.rst:237 msgid "" "Numbers are created by numeric literals or as the result of built-in " "functions and operators. Unadorned integer literals (including hex, octal " @@ -349,7 +350,7 @@ msgid "" "complex number with real and imaginary parts." msgstr "" -#: ../../library/stdtypes.rst:261 +#: ../../library/stdtypes.rst:262 msgid "" "Python fully supports mixed arithmetic: when a binary arithmetic operator " "has operands of different numeric types, the operand with the \"narrower\" " @@ -359,194 +360,194 @@ msgid "" "being compared. [2]_" msgstr "" -#: ../../library/stdtypes.rst:267 +#: ../../library/stdtypes.rst:268 msgid "" "The constructors :func:`int`, :func:`float`, and :func:`complex` can be used " "to produce numbers of a specific type." msgstr "" -#: ../../library/stdtypes.rst:270 +#: ../../library/stdtypes.rst:271 msgid "" "All numeric types (except complex) support the following operations (for " "priorities of the operations, see :ref:`operator-summary`):" msgstr "" -#: ../../library/stdtypes.rst:274 +#: ../../library/stdtypes.rst:275 msgid "Full documentation" msgstr "" -#: ../../library/stdtypes.rst:276 +#: ../../library/stdtypes.rst:277 msgid "``x + y``" msgstr "``x + y``" -#: ../../library/stdtypes.rst:276 +#: ../../library/stdtypes.rst:277 msgid "sum of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:278 +#: ../../library/stdtypes.rst:279 msgid "``x - y``" msgstr "``x - y``" -#: ../../library/stdtypes.rst:278 +#: ../../library/stdtypes.rst:279 msgid "difference of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:280 +#: ../../library/stdtypes.rst:281 msgid "``x * y``" msgstr "``x * y``" -#: ../../library/stdtypes.rst:280 +#: ../../library/stdtypes.rst:281 msgid "product of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:282 +#: ../../library/stdtypes.rst:283 msgid "``x / y``" msgstr "``x / y``" -#: ../../library/stdtypes.rst:282 +#: ../../library/stdtypes.rst:283 msgid "quotient of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:284 +#: ../../library/stdtypes.rst:285 msgid "``x // y``" msgstr "``x // y``" -#: ../../library/stdtypes.rst:284 +#: ../../library/stdtypes.rst:285 msgid "floored quotient of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:287 +#: ../../library/stdtypes.rst:288 msgid "``x % y``" msgstr "``x % y``" -#: ../../library/stdtypes.rst:287 +#: ../../library/stdtypes.rst:288 msgid "remainder of ``x / y``" msgstr "" -#: ../../library/stdtypes.rst:289 +#: ../../library/stdtypes.rst:290 msgid "``-x``" msgstr "``-x``" -#: ../../library/stdtypes.rst:289 +#: ../../library/stdtypes.rst:290 msgid "*x* negated" msgstr "" -#: ../../library/stdtypes.rst:291 +#: ../../library/stdtypes.rst:292 msgid "``+x``" msgstr "``+x``" -#: ../../library/stdtypes.rst:291 +#: ../../library/stdtypes.rst:292 msgid "*x* unchanged" msgstr "" -#: ../../library/stdtypes.rst:293 +#: ../../library/stdtypes.rst:294 msgid "``abs(x)``" msgstr "``abs(x)``" -#: ../../library/stdtypes.rst:293 +#: ../../library/stdtypes.rst:294 msgid "absolute value or magnitude of *x*" msgstr "" -#: ../../library/stdtypes.rst:293 +#: ../../library/stdtypes.rst:294 msgid ":func:`abs`" msgstr ":func:`abs`" -#: ../../library/stdtypes.rst:296 +#: ../../library/stdtypes.rst:297 msgid "``int(x)``" msgstr "``int(x)``" -#: ../../library/stdtypes.rst:296 +#: ../../library/stdtypes.rst:297 msgid "*x* converted to integer" msgstr "" -#: ../../library/stdtypes.rst:296 +#: ../../library/stdtypes.rst:297 msgid "\\(3)\\(6)" msgstr "\\(3)\\(6)" -#: ../../library/stdtypes.rst:296 +#: ../../library/stdtypes.rst:297 msgid ":func:`int`" msgstr ":func:`int`" -#: ../../library/stdtypes.rst:298 +#: ../../library/stdtypes.rst:299 msgid "``float(x)``" msgstr "``float(x)``" -#: ../../library/stdtypes.rst:298 +#: ../../library/stdtypes.rst:299 msgid "*x* converted to floating point" msgstr "" -#: ../../library/stdtypes.rst:298 +#: ../../library/stdtypes.rst:299 msgid "\\(4)\\(6)" msgstr "\\(4)\\(6)" -#: ../../library/stdtypes.rst:298 +#: ../../library/stdtypes.rst:299 msgid ":func:`float`" msgstr ":func:`float`" -#: ../../library/stdtypes.rst:300 +#: ../../library/stdtypes.rst:301 msgid "``complex(re, im)``" msgstr "``complex(re, im)``" -#: ../../library/stdtypes.rst:300 +#: ../../library/stdtypes.rst:301 msgid "" "a complex number with real part *re*, imaginary part *im*. *im* defaults to " "zero." msgstr "" -#: ../../library/stdtypes.rst:300 ../../library/stdtypes.rst:1109 -#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1110 +#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3568 msgid "\\(6)" msgstr "\\(6)" -#: ../../library/stdtypes.rst:300 +#: ../../library/stdtypes.rst:301 msgid ":func:`complex`" msgstr ":func:`complex`" -#: ../../library/stdtypes.rst:304 +#: ../../library/stdtypes.rst:305 msgid "``c.conjugate()``" msgstr "``c.conjugate()``" -#: ../../library/stdtypes.rst:304 +#: ../../library/stdtypes.rst:305 msgid "conjugate of the complex number *c*" msgstr "" -#: ../../library/stdtypes.rst:307 +#: ../../library/stdtypes.rst:308 msgid "``divmod(x, y)``" msgstr "``divmod(x, y)``" -#: ../../library/stdtypes.rst:307 +#: ../../library/stdtypes.rst:308 msgid "the pair ``(x // y, x % y)``" msgstr "" -#: ../../library/stdtypes.rst:307 +#: ../../library/stdtypes.rst:308 msgid ":func:`divmod`" msgstr ":func:`divmod`" -#: ../../library/stdtypes.rst:309 +#: ../../library/stdtypes.rst:310 msgid "``pow(x, y)``" msgstr "``pow(x, y)``" -#: ../../library/stdtypes.rst:309 ../../library/stdtypes.rst:311 +#: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 msgid "*x* to the power *y*" msgstr "" -#: ../../library/stdtypes.rst:309 ../../library/stdtypes.rst:311 -#: ../../library/stdtypes.rst:1098 ../../library/stdtypes.rst:1101 -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:2345 -#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3563 -#: ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 +#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:1102 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2346 +#: ../../library/stdtypes.rst:2349 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:3571 msgid "\\(5)" msgstr "\\(5)" -#: ../../library/stdtypes.rst:309 +#: ../../library/stdtypes.rst:310 msgid ":func:`pow`" msgstr ":func:`pow`" -#: ../../library/stdtypes.rst:311 +#: ../../library/stdtypes.rst:312 msgid "``x ** y``" msgstr "``x ** y``" -#: ../../library/stdtypes.rst:321 +#: ../../library/stdtypes.rst:322 msgid "" "Also referred to as integer division. The resultant value is a whole " "integer, though the result's type is not necessarily int. The result is " @@ -554,101 +555,101 @@ msgid "" "``-1``, ``1//(-2)`` is ``-1``, and ``(-1)//(-2)`` is ``0``." msgstr "" -#: ../../library/stdtypes.rst:327 +#: ../../library/stdtypes.rst:328 msgid "" "Not for complex numbers. Instead convert to floats using :func:`abs` if " "appropriate." msgstr "" -#: ../../library/stdtypes.rst:339 +#: ../../library/stdtypes.rst:340 msgid "" "Conversion from floating point to integer may round or truncate as in C; see " "functions :func:`math.floor` and :func:`math.ceil` for well-defined " "conversions." msgstr "" -#: ../../library/stdtypes.rst:344 +#: ../../library/stdtypes.rst:345 msgid "" "float also accepts the strings \"nan\" and \"inf\" with an optional prefix " "\"+\" or \"-\" for Not a Number (NaN) and positive or negative infinity." msgstr "" -#: ../../library/stdtypes.rst:348 +#: ../../library/stdtypes.rst:349 msgid "" "Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for " "programming languages." msgstr "" -#: ../../library/stdtypes.rst:352 +#: ../../library/stdtypes.rst:353 msgid "" "The numeric literals accepted include the digits ``0`` to ``9`` or any " "Unicode equivalent (code points with the ``Nd`` property)." msgstr "" -#: ../../library/stdtypes.rst:355 +#: ../../library/stdtypes.rst:356 msgid "" "See https://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedNumericType." "txt for a complete list of code points with the ``Nd`` property." msgstr "" -#: ../../library/stdtypes.rst:359 +#: ../../library/stdtypes.rst:360 msgid "" "All :class:`numbers.Real` types (:class:`int` and :class:`float`) also " "include the following operations:" msgstr "" -#: ../../library/stdtypes.rst:365 +#: ../../library/stdtypes.rst:366 msgid ":func:`math.trunc(\\ x) `" msgstr ":func:`math.trunc(\\ x) `" -#: ../../library/stdtypes.rst:365 +#: ../../library/stdtypes.rst:366 msgid "*x* truncated to :class:`~numbers.Integral`" msgstr "" -#: ../../library/stdtypes.rst:368 +#: ../../library/stdtypes.rst:369 msgid ":func:`round(x[, n]) `" msgstr ":func:`round(x[, n]) `" -#: ../../library/stdtypes.rst:368 +#: ../../library/stdtypes.rst:369 msgid "" "*x* rounded to *n* digits, rounding half to even. If *n* is omitted, it " "defaults to 0." msgstr "" -#: ../../library/stdtypes.rst:372 +#: ../../library/stdtypes.rst:373 msgid ":func:`math.floor(\\ x) `" msgstr ":func:`math.floor(\\ x) `" -#: ../../library/stdtypes.rst:372 +#: ../../library/stdtypes.rst:373 msgid "the greatest :class:`~numbers.Integral` <= *x*" msgstr "" -#: ../../library/stdtypes.rst:375 +#: ../../library/stdtypes.rst:376 msgid ":func:`math.ceil(x) `" msgstr ":func:`math.ceil(x) `" -#: ../../library/stdtypes.rst:375 +#: ../../library/stdtypes.rst:376 msgid "the least :class:`~numbers.Integral` >= *x*" msgstr "" -#: ../../library/stdtypes.rst:379 +#: ../../library/stdtypes.rst:380 msgid "" "For additional numeric operations see the :mod:`math` and :mod:`cmath` " "modules." msgstr "" -#: ../../library/stdtypes.rst:388 +#: ../../library/stdtypes.rst:389 msgid "Bitwise Operations on Integer Types" msgstr "" -#: ../../library/stdtypes.rst:402 +#: ../../library/stdtypes.rst:403 msgid "" "Bitwise operations only make sense for integers. The result of bitwise " "operations is calculated as though carried out in two's complement with an " "infinite number of sign bits." msgstr "" -#: ../../library/stdtypes.rst:406 +#: ../../library/stdtypes.rst:407 msgid "" "The priorities of the binary bitwise operations are all lower than the " "numeric operations and higher than the comparisons; the unary operation " @@ -656,89 +657,89 @@ msgid "" "``-``)." msgstr "" -#: ../../library/stdtypes.rst:410 +#: ../../library/stdtypes.rst:411 msgid "This table lists the bitwise operations sorted in ascending priority:" msgstr "" -#: ../../library/stdtypes.rst:415 +#: ../../library/stdtypes.rst:416 msgid "``x | y``" msgstr "``x | y``" -#: ../../library/stdtypes.rst:415 +#: ../../library/stdtypes.rst:416 msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:415 ../../library/stdtypes.rst:418 -#: ../../library/stdtypes.rst:421 ../../library/stdtypes.rst:1122 -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:2335 -#: ../../library/stdtypes.rst:3552 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:416 ../../library/stdtypes.rst:419 +#: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1123 +#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:2336 +#: ../../library/stdtypes.rst:3553 ../../library/stdtypes.rst:3557 msgid "\\(4)" msgstr "\\(4)" -#: ../../library/stdtypes.rst:418 +#: ../../library/stdtypes.rst:419 msgid "``x ^ y``" msgstr "``x ^ y``" -#: ../../library/stdtypes.rst:418 +#: ../../library/stdtypes.rst:419 msgid "bitwise :dfn:`exclusive or` of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:421 +#: ../../library/stdtypes.rst:422 msgid "``x & y``" msgstr "``x & y``" -#: ../../library/stdtypes.rst:421 +#: ../../library/stdtypes.rst:422 msgid "bitwise :dfn:`and` of *x* and *y*" msgstr "" -#: ../../library/stdtypes.rst:424 +#: ../../library/stdtypes.rst:425 msgid "``x << n``" msgstr "``x << n``" -#: ../../library/stdtypes.rst:424 +#: ../../library/stdtypes.rst:425 msgid "*x* shifted left by *n* bits" msgstr "" -#: ../../library/stdtypes.rst:424 +#: ../../library/stdtypes.rst:425 msgid "(1)(2)" msgstr "(1)(2)" -#: ../../library/stdtypes.rst:426 +#: ../../library/stdtypes.rst:427 msgid "``x >> n``" msgstr "``x >> n``" -#: ../../library/stdtypes.rst:426 +#: ../../library/stdtypes.rst:427 msgid "*x* shifted right by *n* bits" msgstr "" -#: ../../library/stdtypes.rst:426 +#: ../../library/stdtypes.rst:427 msgid "(1)(3)" msgstr "(1)(3)" -#: ../../library/stdtypes.rst:428 +#: ../../library/stdtypes.rst:429 msgid "``~x``" msgstr "``~x``" -#: ../../library/stdtypes.rst:428 +#: ../../library/stdtypes.rst:429 msgid "the bits of *x* inverted" msgstr "" -#: ../../library/stdtypes.rst:434 +#: ../../library/stdtypes.rst:435 msgid "" "Negative shift counts are illegal and cause a :exc:`ValueError` to be raised." msgstr "" -#: ../../library/stdtypes.rst:437 +#: ../../library/stdtypes.rst:438 msgid "" "A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``." msgstr "" -#: ../../library/stdtypes.rst:440 +#: ../../library/stdtypes.rst:441 msgid "" "A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``." msgstr "" -#: ../../library/stdtypes.rst:443 +#: ../../library/stdtypes.rst:444 msgid "" "Performing these calculations with at least one extra sign extension bit in " "a finite two's complement representation (a working bit-width of ``1 + max(x." @@ -746,23 +747,23 @@ msgid "" "result as if there were an infinite number of sign bits." msgstr "" -#: ../../library/stdtypes.rst:450 +#: ../../library/stdtypes.rst:451 msgid "Additional Methods on Integer Types" msgstr "" -#: ../../library/stdtypes.rst:452 +#: ../../library/stdtypes.rst:453 msgid "" "The int type implements the :class:`numbers.Integral` :term:`abstract base " "class`. In addition, it provides a few more methods:" msgstr "" -#: ../../library/stdtypes.rst:457 +#: ../../library/stdtypes.rst:458 msgid "" "Return the number of bits necessary to represent an integer in binary, " "excluding the sign and leading zeros::" msgstr "" -#: ../../library/stdtypes.rst:466 +#: ../../library/stdtypes.rst:467 msgid "" "More precisely, if ``x`` is nonzero, then ``x.bit_length()`` is the unique " "positive integer ``k`` such that ``2**(k-1) <= abs(x) < 2**k``. " @@ -771,30 +772,30 @@ msgid "" "bit_length()`` returns ``0``." msgstr "" -#: ../../library/stdtypes.rst:472 ../../library/stdtypes.rst:495 +#: ../../library/stdtypes.rst:473 ../../library/stdtypes.rst:496 msgid "Equivalent to::" msgstr "" "等價於:\n" "\n" "::" -#: ../../library/stdtypes.rst:483 +#: ../../library/stdtypes.rst:484 msgid "" "Return the number of ones in the binary representation of the absolute value " "of the integer. This is also known as the population count. Example::" msgstr "" -#: ../../library/stdtypes.rst:504 +#: ../../library/stdtypes.rst:505 msgid "Return an array of bytes representing an integer." msgstr "" -#: ../../library/stdtypes.rst:516 +#: ../../library/stdtypes.rst:517 msgid "" "The integer is represented using *length* bytes. An :exc:`OverflowError` is " "raised if the integer is not representable with the given number of bytes." msgstr "" -#: ../../library/stdtypes.rst:520 ../../library/stdtypes.rst:552 +#: ../../library/stdtypes.rst:521 ../../library/stdtypes.rst:553 msgid "" "The *byteorder* argument determines the byte order used to represent the " "integer. If *byteorder* is ``\"big\"``, the most significant byte is at the " @@ -804,7 +805,7 @@ msgid "" "value." msgstr "" -#: ../../library/stdtypes.rst:527 +#: ../../library/stdtypes.rst:528 msgid "" "The *signed* argument determines whether two's complement is used to " "represent the integer. If *signed* is ``False`` and a negative integer is " @@ -812,23 +813,23 @@ msgid "" "``False``." msgstr "" -#: ../../library/stdtypes.rst:536 +#: ../../library/stdtypes.rst:537 msgid "Return the integer represented by the given array of bytes." msgstr "" -#: ../../library/stdtypes.rst:549 +#: ../../library/stdtypes.rst:550 msgid "" "The argument *bytes* must either be a :term:`bytes-like object` or an " "iterable producing bytes." msgstr "" -#: ../../library/stdtypes.rst:559 +#: ../../library/stdtypes.rst:560 msgid "" "The *signed* argument indicates whether two's complement is used to " "represent the integer." msgstr "" -#: ../../library/stdtypes.rst:566 +#: ../../library/stdtypes.rst:567 msgid "" "Return a pair of integers whose ratio is exactly equal to the original " "integer and with a positive denominator. The integer ratio of integers " @@ -836,30 +837,30 @@ msgid "" "denominator." msgstr "" -#: ../../library/stdtypes.rst:574 +#: ../../library/stdtypes.rst:575 msgid "Additional Methods on Float" msgstr "" -#: ../../library/stdtypes.rst:576 +#: ../../library/stdtypes.rst:577 msgid "" "The float type implements the :class:`numbers.Real` :term:`abstract base " "class`. float also has the following additional methods." msgstr "" -#: ../../library/stdtypes.rst:581 +#: ../../library/stdtypes.rst:582 msgid "" "Return a pair of integers whose ratio is exactly equal to the original float " "and with a positive denominator. Raises :exc:`OverflowError` on infinities " "and a :exc:`ValueError` on NaNs." msgstr "" -#: ../../library/stdtypes.rst:588 +#: ../../library/stdtypes.rst:589 msgid "" "Return ``True`` if the float instance is finite with integral value, and " "``False`` otherwise::" msgstr "" -#: ../../library/stdtypes.rst:596 +#: ../../library/stdtypes.rst:597 msgid "" "Two methods support conversion to and from hexadecimal strings. Since " "Python's floats are stored internally as binary numbers, converting a float " @@ -869,30 +870,30 @@ msgid "" "numerical work." msgstr "" -#: ../../library/stdtypes.rst:607 +#: ../../library/stdtypes.rst:608 msgid "" "Return a representation of a floating-point number as a hexadecimal string. " "For finite floating-point numbers, this representation will always include a " "leading ``0x`` and a trailing ``p`` and exponent." msgstr "" -#: ../../library/stdtypes.rst:615 +#: ../../library/stdtypes.rst:616 msgid "" "Class method to return the float represented by a hexadecimal string *s*. " "The string *s* may have leading and trailing whitespace." msgstr "" -#: ../../library/stdtypes.rst:620 +#: ../../library/stdtypes.rst:621 msgid "" "Note that :meth:`float.hex` is an instance method, while :meth:`float." "fromhex` is a class method." msgstr "" -#: ../../library/stdtypes.rst:623 +#: ../../library/stdtypes.rst:624 msgid "A hexadecimal string takes the form::" msgstr "" -#: ../../library/stdtypes.rst:627 +#: ../../library/stdtypes.rst:628 msgid "" "where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and " "``fraction`` are strings of hexadecimal digits, and ``exponent`` is a " @@ -906,7 +907,7 @@ msgid "" "by :meth:`float.fromhex`." msgstr "" -#: ../../library/stdtypes.rst:640 +#: ../../library/stdtypes.rst:641 msgid "" "Note that the exponent is written in decimal rather than hexadecimal, and " "that it gives the power of 2 by which to multiply the coefficient. For " @@ -914,50 +915,50 @@ msgid "" "number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::" msgstr "" -#: ../../library/stdtypes.rst:650 +#: ../../library/stdtypes.rst:651 msgid "" "Applying the reverse conversion to ``3740.0`` gives a different hexadecimal " "string representing the same number::" msgstr "" -#: ../../library/stdtypes.rst:660 +#: ../../library/stdtypes.rst:661 msgid "Hashing of numeric types" msgstr "" -#: ../../library/stdtypes.rst:662 +#: ../../library/stdtypes.rst:663 msgid "" "For numbers ``x`` and ``y``, possibly of different types, it's a requirement " -"that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`__hash__` " -"method documentation for more details). For ease of implementation and " -"efficiency across a variety of numeric types (including :class:`int`, :class:" -"`float`, :class:`decimal.Decimal` and :class:`fractions.Fraction`) Python's " -"hash for numeric types is based on a single mathematical function that's " -"defined for any rational number, and hence applies to all instances of :" -"class:`int` and :class:`fractions.Fraction`, and all finite instances of :" -"class:`float` and :class:`decimal.Decimal`. Essentially, this function is " -"given by reduction modulo ``P`` for a fixed prime ``P``. The value of ``P`` " -"is made available to Python as the :attr:`modulus` attribute of :data:`sys." -"hash_info`." +"that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object." +"__hash__` method documentation for more details). For ease of " +"implementation and efficiency across a variety of numeric types (including :" +"class:`int`, :class:`float`, :class:`decimal.Decimal` and :class:`fractions." +"Fraction`) Python's hash for numeric types is based on a single mathematical " +"function that's defined for any rational number, and hence applies to all " +"instances of :class:`int` and :class:`fractions.Fraction`, and all finite " +"instances of :class:`float` and :class:`decimal.Decimal`. Essentially, this " +"function is given by reduction modulo ``P`` for a fixed prime ``P``. The " +"value of ``P`` is made available to Python as the :attr:`modulus` attribute " +"of :data:`sys.hash_info`." msgstr "" -#: ../../library/stdtypes.rst:677 +#: ../../library/stdtypes.rst:678 msgid "" "Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C " "longs and ``P = 2**61 - 1`` on machines with 64-bit C longs." msgstr "" -#: ../../library/stdtypes.rst:680 +#: ../../library/stdtypes.rst:681 msgid "Here are the rules in detail:" msgstr "" -#: ../../library/stdtypes.rst:682 +#: ../../library/stdtypes.rst:683 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible " "by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, " "P)`` gives the inverse of ``n`` modulo ``P``." msgstr "" -#: ../../library/stdtypes.rst:686 +#: ../../library/stdtypes.rst:687 msgid "" "If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by " "``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule " @@ -965,20 +966,20 @@ msgid "" "value ``sys.hash_info.inf``." msgstr "" -#: ../../library/stdtypes.rst:691 +#: ../../library/stdtypes.rst:692 msgid "" "If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-" "hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:695 +#: ../../library/stdtypes.rst:696 msgid "" "The particular values ``sys.hash_info.inf`` and ``-sys.hash_info.inf`` are " "used as hash values for positive infinity or negative infinity " "(respectively)." msgstr "" -#: ../../library/stdtypes.rst:699 +#: ../../library/stdtypes.rst:700 msgid "" "For a :class:`complex` number ``z``, the hash values of the real and " "imaginary parts are combined by computing ``hash(z.real) + sys.hash_info." @@ -987,18 +988,18 @@ msgid "" "1))``. Again, if the result is ``-1``, it's replaced with ``-2``." msgstr "" -#: ../../library/stdtypes.rst:707 +#: ../../library/stdtypes.rst:708 msgid "" "To clarify the above rules, here's some example Python code, equivalent to " "the built-in hash, for computing the hash of a rational number, :class:" "`float`, or :class:`complex`::" msgstr "" -#: ../../library/stdtypes.rst:762 +#: ../../library/stdtypes.rst:763 msgid "Iterator Types" msgstr "" -#: ../../library/stdtypes.rst:770 +#: ../../library/stdtypes.rst:771 msgid "" "Python supports a concept of iteration over containers. This is implemented " "using two distinct methods; these are used to allow user-defined classes to " @@ -1006,13 +1007,13 @@ msgid "" "support the iteration methods." msgstr "" -#: ../../library/stdtypes.rst:775 +#: ../../library/stdtypes.rst:776 msgid "" "One method needs to be defined for container objects to provide :term:" "`iterable` support:" msgstr "" -#: ../../library/stdtypes.rst:782 +#: ../../library/stdtypes.rst:783 msgid "" "Return an :term:`iterator` object. The object is required to support the " "iterator protocol described below. If a container supports different types " @@ -1024,13 +1025,13 @@ msgid "" "in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:791 +#: ../../library/stdtypes.rst:792 msgid "" "The iterator objects themselves are required to support the following two " "methods, which together form the :dfn:`iterator protocol`:" msgstr "" -#: ../../library/stdtypes.rst:797 +#: ../../library/stdtypes.rst:798 msgid "" "Return the :term:`iterator` object itself. This is required to allow both " "containers and iterators to be used with the :keyword:`for` and :keyword:" @@ -1038,7 +1039,7 @@ msgid "" "tp_iter` slot of the type structure for Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:806 +#: ../../library/stdtypes.rst:807 msgid "" "Return the next item from the :term:`iterator`. If there are no further " "items, raise the :exc:`StopIteration` exception. This method corresponds to " @@ -1046,7 +1047,7 @@ msgid "" "Python objects in the Python/C API." msgstr "" -#: ../../library/stdtypes.rst:811 +#: ../../library/stdtypes.rst:812 msgid "" "Python defines several iterator objects to support iteration over general " "and specific sequence types, dictionaries, and other more specialized " @@ -1054,18 +1055,18 @@ msgid "" "the iterator protocol." msgstr "" -#: ../../library/stdtypes.rst:816 +#: ../../library/stdtypes.rst:817 msgid "" "Once an iterator's :meth:`~iterator.__next__` method raises :exc:" "`StopIteration`, it must continue to do so on subsequent calls. " "Implementations that do not obey this property are deemed broken." msgstr "" -#: ../../library/stdtypes.rst:824 +#: ../../library/stdtypes.rst:825 msgid "Generator Types" msgstr "" -#: ../../library/stdtypes.rst:826 +#: ../../library/stdtypes.rst:827 msgid "" "Python's :term:`generator`\\s provide a convenient way to implement the " "iterator protocol. If a container object's :meth:`__iter__` method is " @@ -1075,11 +1076,11 @@ msgid "" "found in :ref:`the documentation for the yield expression `." msgstr "" -#: ../../library/stdtypes.rst:838 +#: ../../library/stdtypes.rst:839 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" msgstr "" -#: ../../library/stdtypes.rst:840 +#: ../../library/stdtypes.rst:841 msgid "" "There are three basic sequence types: lists, tuples, and range objects. " "Additional sequence types tailored for processing of :ref:`binary data " @@ -1087,11 +1088,11 @@ msgid "" "sections." msgstr "" -#: ../../library/stdtypes.rst:849 +#: ../../library/stdtypes.rst:850 msgid "Common Sequence Operations" msgstr "" -#: ../../library/stdtypes.rst:853 +#: ../../library/stdtypes.rst:854 msgid "" "The operations in the following table are supported by most sequence types, " "both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " @@ -1099,7 +1100,7 @@ msgid "" "sequence types." msgstr "" -#: ../../library/stdtypes.rst:858 +#: ../../library/stdtypes.rst:859 msgid "" "This table lists the sequence operations sorted in ascending priority. In " "the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* " @@ -1107,7 +1108,7 @@ msgid "" "restrictions imposed by *s*." msgstr "" -#: ../../library/stdtypes.rst:863 +#: ../../library/stdtypes.rst:864 msgid "" "The ``in`` and ``not in`` operations have the same priorities as the " "comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " @@ -1115,125 +1116,125 @@ msgid "" "[3]_" msgstr "" -#: ../../library/stdtypes.rst:884 +#: ../../library/stdtypes.rst:885 msgid "``x in s``" msgstr "``x in s``" -#: ../../library/stdtypes.rst:884 +#: ../../library/stdtypes.rst:885 msgid "``True`` if an item of *s* is equal to *x*, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:887 +#: ../../library/stdtypes.rst:888 msgid "``x not in s``" msgstr "``x not in s``" -#: ../../library/stdtypes.rst:887 +#: ../../library/stdtypes.rst:888 msgid "``False`` if an item of *s* is equal to *x*, else ``True``" msgstr "" -#: ../../library/stdtypes.rst:890 +#: ../../library/stdtypes.rst:891 msgid "``s + t``" msgstr "``s + t``" -#: ../../library/stdtypes.rst:890 +#: ../../library/stdtypes.rst:891 msgid "the concatenation of *s* and *t*" msgstr "" -#: ../../library/stdtypes.rst:890 +#: ../../library/stdtypes.rst:891 msgid "(6)(7)" msgstr "(6)(7)" -#: ../../library/stdtypes.rst:893 +#: ../../library/stdtypes.rst:894 msgid "``s * n`` or ``n * s``" msgstr "``s * n`` 或 ``n * s``" -#: ../../library/stdtypes.rst:893 +#: ../../library/stdtypes.rst:894 msgid "equivalent to adding *s* to itself *n* times" msgstr "" -#: ../../library/stdtypes.rst:893 +#: ../../library/stdtypes.rst:894 msgid "(2)(7)" msgstr "(2)(7)" -#: ../../library/stdtypes.rst:896 +#: ../../library/stdtypes.rst:897 msgid "``s[i]``" msgstr "``s[i]``" -#: ../../library/stdtypes.rst:896 +#: ../../library/stdtypes.rst:897 msgid "*i*\\ th item of *s*, origin 0" msgstr "" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:899 msgid "``s[i:j]``" msgstr "``s[i:j]``" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:899 msgid "slice of *s* from *i* to *j*" msgstr "" -#: ../../library/stdtypes.rst:898 +#: ../../library/stdtypes.rst:899 msgid "(3)(4)" msgstr "(3)(4)" -#: ../../library/stdtypes.rst:900 +#: ../../library/stdtypes.rst:901 msgid "``s[i:j:k]``" msgstr "``s[i:j:k]``" -#: ../../library/stdtypes.rst:900 +#: ../../library/stdtypes.rst:901 msgid "slice of *s* from *i* to *j* with step *k*" msgstr "" -#: ../../library/stdtypes.rst:900 +#: ../../library/stdtypes.rst:901 msgid "(3)(5)" msgstr "(3)(5)" -#: ../../library/stdtypes.rst:903 +#: ../../library/stdtypes.rst:904 msgid "``len(s)``" msgstr "``len(s)``" -#: ../../library/stdtypes.rst:903 +#: ../../library/stdtypes.rst:904 msgid "length of *s*" msgstr "" -#: ../../library/stdtypes.rst:905 +#: ../../library/stdtypes.rst:906 msgid "``min(s)``" msgstr "``min(s)``" -#: ../../library/stdtypes.rst:905 +#: ../../library/stdtypes.rst:906 msgid "smallest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:907 +#: ../../library/stdtypes.rst:908 msgid "``max(s)``" msgstr "``max(s)``" -#: ../../library/stdtypes.rst:907 +#: ../../library/stdtypes.rst:908 msgid "largest item of *s*" msgstr "" -#: ../../library/stdtypes.rst:909 +#: ../../library/stdtypes.rst:910 msgid "``s.index(x[, i[, j]])``" msgstr "``s.index(x[, i[, j]])``" -#: ../../library/stdtypes.rst:909 +#: ../../library/stdtypes.rst:910 msgid "" "index of the first occurrence of *x* in *s* (at or after index *i* and " "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:909 ../../library/stdtypes.rst:3538 +#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3539 msgid "\\(8)" msgstr "\\(8)" -#: ../../library/stdtypes.rst:913 +#: ../../library/stdtypes.rst:914 msgid "``s.count(x)``" msgstr "``s.count(x)``" -#: ../../library/stdtypes.rst:913 +#: ../../library/stdtypes.rst:914 msgid "total number of occurrences of *x* in *s*" msgstr "" -#: ../../library/stdtypes.rst:917 +#: ../../library/stdtypes.rst:918 msgid "" "Sequences of the same type also support comparisons. In particular, tuples " "and lists are compared lexicographically by comparing corresponding " @@ -1242,7 +1243,7 @@ msgid "" "(For full details see :ref:`comparisons` in the language reference.)" msgstr "" -#: ../../library/stdtypes.rst:926 +#: ../../library/stdtypes.rst:927 msgid "" "While the ``in`` and ``not in`` operations are used only for simple " "containment testing in the general case, some specialised sequences (such " @@ -1250,7 +1251,7 @@ msgid "" "subsequence testing::" msgstr "" -#: ../../library/stdtypes.rst:935 +#: ../../library/stdtypes.rst:936 msgid "" "Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " "sequence of the same type as *s*). Note that items in the sequence *s* are " @@ -1258,7 +1259,7 @@ msgid "" "Python programmers; consider::" msgstr "" -#: ../../library/stdtypes.rst:947 +#: ../../library/stdtypes.rst:948 msgid "" "What has happened is that ``[[]]`` is a one-element list containing an empty " "list, so all three elements of ``[[]] * 3`` are references to this single " @@ -1266,20 +1267,20 @@ msgid "" "list. You can create a list of different lists this way::" msgstr "" -#: ../../library/stdtypes.rst:959 +#: ../../library/stdtypes.rst:960 msgid "" "Further explanation is available in the FAQ entry :ref:`faq-multidimensional-" "list`." msgstr "" -#: ../../library/stdtypes.rst:963 +#: ../../library/stdtypes.rst:964 msgid "" "If *i* or *j* is negative, the index is relative to the end of sequence *s*: " "``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " "still ``0``." msgstr "" -#: ../../library/stdtypes.rst:968 +#: ../../library/stdtypes.rst:969 msgid "" "The slice of *s* from *i* to *j* is defined as the sequence of items with " "index *k* such that ``i <= k < j``. If *i* or *j* is greater than " @@ -1288,7 +1289,7 @@ msgid "" "to *j*, the slice is empty." msgstr "" -#: ../../library/stdtypes.rst:975 +#: ../../library/stdtypes.rst:976 msgid "" "The slice of *s* from *i* to *j* with step *k* is defined as the sequence of " "items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other " @@ -1301,7 +1302,7 @@ msgid "" "``None``, it is treated like ``1``." msgstr "" -#: ../../library/stdtypes.rst:986 +#: ../../library/stdtypes.rst:987 msgid "" "Concatenating immutable sequences always results in a new object. This " "means that building up a sequence by repeated concatenation will have a " @@ -1309,14 +1310,14 @@ msgid "" "runtime cost, you must switch to one of the alternatives below:" msgstr "" -#: ../../library/stdtypes.rst:991 +#: ../../library/stdtypes.rst:992 msgid "" "if concatenating :class:`str` objects, you can build a list and use :meth:" "`str.join` at the end or else write to an :class:`io.StringIO` instance and " "retrieve its value when complete" msgstr "" -#: ../../library/stdtypes.rst:995 +#: ../../library/stdtypes.rst:996 msgid "" "if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes." "join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :" @@ -1324,22 +1325,22 @@ msgid "" "an efficient overallocation mechanism" msgstr "" -#: ../../library/stdtypes.rst:1000 +#: ../../library/stdtypes.rst:1001 msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead" msgstr "" -#: ../../library/stdtypes.rst:1002 +#: ../../library/stdtypes.rst:1003 msgid "for other types, investigate the relevant class documentation" msgstr "" -#: ../../library/stdtypes.rst:1006 +#: ../../library/stdtypes.rst:1007 msgid "" "Some sequence types (such as :class:`range`) only support item sequences " "that follow specific patterns, and hence don't support sequence " "concatenation or repetition." msgstr "" -#: ../../library/stdtypes.rst:1011 +#: ../../library/stdtypes.rst:1012 msgid "" "``index`` raises :exc:`ValueError` when *x* is not found in *s*. Not all " "implementations support passing the additional arguments *i* and *j*. These " @@ -1349,42 +1350,42 @@ msgid "" "start of the sequence rather than the start of the slice." msgstr "" -#: ../../library/stdtypes.rst:1022 +#: ../../library/stdtypes.rst:1023 msgid "Immutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1029 +#: ../../library/stdtypes.rst:1030 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../library/stdtypes.rst:1033 +#: ../../library/stdtypes.rst:1034 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../library/stdtypes.rst:1037 +#: ../../library/stdtypes.rst:1038 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:1044 +#: ../../library/stdtypes.rst:1045 msgid "Mutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1051 +#: ../../library/stdtypes.rst:1052 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../library/stdtypes.rst:1055 +#: ../../library/stdtypes.rst:1056 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1392,145 +1393,145 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../library/stdtypes.rst:1079 +#: ../../library/stdtypes.rst:1080 msgid "``s[i] = x``" msgstr "``s[i] = x``" -#: ../../library/stdtypes.rst:1079 +#: ../../library/stdtypes.rst:1080 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../library/stdtypes.rst:1082 +#: ../../library/stdtypes.rst:1083 msgid "``s[i:j] = t``" msgstr "``s[i:j] = t``" -#: ../../library/stdtypes.rst:1082 +#: ../../library/stdtypes.rst:1083 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../library/stdtypes.rst:1086 +#: ../../library/stdtypes.rst:1087 msgid "``del s[i:j]``" msgstr "``del s[i:j]``" -#: ../../library/stdtypes.rst:1086 +#: ../../library/stdtypes.rst:1087 msgid "same as ``s[i:j] = []``" msgstr "" -#: ../../library/stdtypes.rst:1088 +#: ../../library/stdtypes.rst:1089 msgid "``s[i:j:k] = t``" msgstr "``s[i:j:k] = t``" -#: ../../library/stdtypes.rst:1088 +#: ../../library/stdtypes.rst:1089 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../library/stdtypes.rst:1091 +#: ../../library/stdtypes.rst:1092 msgid "``del s[i:j:k]``" msgstr "``del s[i:j:k]``" -#: ../../library/stdtypes.rst:1091 +#: ../../library/stdtypes.rst:1092 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../library/stdtypes.rst:1094 +#: ../../library/stdtypes.rst:1095 msgid "``s.append(x)``" msgstr "``s.append(x)``" -#: ../../library/stdtypes.rst:1094 +#: ../../library/stdtypes.rst:1095 msgid "" "appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1098 +#: ../../library/stdtypes.rst:1099 msgid "``s.clear()``" msgstr "``s.clear()``" -#: ../../library/stdtypes.rst:1098 +#: ../../library/stdtypes.rst:1099 msgid "removes all items from *s* (same as ``del s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1101 +#: ../../library/stdtypes.rst:1102 msgid "``s.copy()``" msgstr "``s.copy()``" -#: ../../library/stdtypes.rst:1101 +#: ../../library/stdtypes.rst:1102 msgid "creates a shallow copy of *s* (same as ``s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1104 +#: ../../library/stdtypes.rst:1105 msgid "``s.extend(t)`` or ``s += t``" msgstr "``s.extend(t)`` 或 ``s += t``" -#: ../../library/stdtypes.rst:1104 +#: ../../library/stdtypes.rst:1105 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1110 msgid "``s *= n``" msgstr "``s *= n``" -#: ../../library/stdtypes.rst:1109 +#: ../../library/stdtypes.rst:1110 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1113 msgid "``s.insert(i, x)``" msgstr "``s.insert(i, x)``" -#: ../../library/stdtypes.rst:1112 +#: ../../library/stdtypes.rst:1113 msgid "" "inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1116 +#: ../../library/stdtypes.rst:1117 msgid "``s.pop()`` or ``s.pop(i)``" msgstr "``s.pop()`` 或 ``s.pop(i)``" -#: ../../library/stdtypes.rst:1116 +#: ../../library/stdtypes.rst:1117 msgid "retrieves the item at *i* and also removes it from *s*" msgstr "" -#: ../../library/stdtypes.rst:1119 +#: ../../library/stdtypes.rst:1120 msgid "``s.remove(x)``" msgstr "``s.remove(x)``" -#: ../../library/stdtypes.rst:1119 +#: ../../library/stdtypes.rst:1120 msgid "remove the first item from *s* where ``s[i]`` is equal to *x*" msgstr "" -#: ../../library/stdtypes.rst:1122 +#: ../../library/stdtypes.rst:1123 msgid "``s.reverse()``" msgstr "``s.reverse()``" -#: ../../library/stdtypes.rst:1122 +#: ../../library/stdtypes.rst:1123 msgid "reverses the items of *s* in place" msgstr "" -#: ../../library/stdtypes.rst:1130 +#: ../../library/stdtypes.rst:1131 msgid "*t* must have the same length as the slice it is replacing." msgstr "" -#: ../../library/stdtypes.rst:1133 +#: ../../library/stdtypes.rst:1134 msgid "" "The optional argument *i* defaults to ``-1``, so that by default the last " "item is removed and returned." msgstr "" -#: ../../library/stdtypes.rst:1137 +#: ../../library/stdtypes.rst:1138 msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*." msgstr "" -#: ../../library/stdtypes.rst:1140 +#: ../../library/stdtypes.rst:1141 msgid "" "The :meth:`reverse` method modifies the sequence in place for economy of " "space when reversing a large sequence. To remind users that it operates by " "side effect, it does not return the reversed sequence." msgstr "" -#: ../../library/stdtypes.rst:1145 +#: ../../library/stdtypes.rst:1146 msgid "" ":meth:`clear` and :meth:`!copy` are included for consistency with the " "interfaces of mutable containers that don't support slicing operations (such " @@ -1539,11 +1540,11 @@ msgid "" "classes provide it." msgstr "" -#: ../../library/stdtypes.rst:1151 +#: ../../library/stdtypes.rst:1152 msgid ":meth:`clear` and :meth:`!copy` methods." msgstr "" -#: ../../library/stdtypes.rst:1155 +#: ../../library/stdtypes.rst:1156 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1551,39 +1552,39 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../library/stdtypes.rst:1164 +#: ../../library/stdtypes.rst:1165 msgid "Lists" msgstr "List(串列)" -#: ../../library/stdtypes.rst:1168 +#: ../../library/stdtypes.rst:1169 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../library/stdtypes.rst:1174 +#: ../../library/stdtypes.rst:1175 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../library/stdtypes.rst:1176 +#: ../../library/stdtypes.rst:1177 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../library/stdtypes.rst:1177 +#: ../../library/stdtypes.rst:1178 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../library/stdtypes.rst:1178 +#: ../../library/stdtypes.rst:1179 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../library/stdtypes.rst:1179 +#: ../../library/stdtypes.rst:1180 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1181 +#: ../../library/stdtypes.rst:1182 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1594,20 +1595,20 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../library/stdtypes.rst:1190 +#: ../../library/stdtypes.rst:1191 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../library/stdtypes.rst:1193 +#: ../../library/stdtypes.rst:1194 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../library/stdtypes.rst:1199 +#: ../../library/stdtypes.rst:1200 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1615,13 +1616,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../library/stdtypes.rst:1204 +#: ../../library/stdtypes.rst:1205 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../library/stdtypes.rst:1207 +#: ../../library/stdtypes.rst:1208 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1630,19 +1631,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../library/stdtypes.rst:1214 +#: ../../library/stdtypes.rst:1215 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../library/stdtypes.rst:1217 +#: ../../library/stdtypes.rst:1218 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/stdtypes.rst:1220 +#: ../../library/stdtypes.rst:1221 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1650,7 +1651,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../library/stdtypes.rst:1225 +#: ../../library/stdtypes.rst:1226 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1658,12 +1659,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../library/stdtypes.rst:1230 +#: ../../library/stdtypes.rst:1231 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/stdtypes.rst:1234 +#: ../../library/stdtypes.rst:1235 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1671,11 +1672,11 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../library/stdtypes.rst:1243 +#: ../../library/stdtypes.rst:1244 msgid "Tuples" msgstr "" -#: ../../library/stdtypes.rst:1247 +#: ../../library/stdtypes.rst:1248 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -1684,27 +1685,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../library/stdtypes.rst:1255 +#: ../../library/stdtypes.rst:1256 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../library/stdtypes.rst:1257 +#: ../../library/stdtypes.rst:1258 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../library/stdtypes.rst:1258 +#: ../../library/stdtypes.rst:1259 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../library/stdtypes.rst:1259 +#: ../../library/stdtypes.rst:1260 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../library/stdtypes.rst:1260 +#: ../../library/stdtypes.rst:1261 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1262 +#: ../../library/stdtypes.rst:1263 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -1715,7 +1716,7 @@ msgid "" "``()``." msgstr "" -#: ../../library/stdtypes.rst:1270 +#: ../../library/stdtypes.rst:1271 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -1724,70 +1725,70 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../library/stdtypes.rst:1276 +#: ../../library/stdtypes.rst:1277 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../library/stdtypes.rst:1279 +#: ../../library/stdtypes.rst:1280 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../library/stdtypes.rst:1287 +#: ../../library/stdtypes.rst:1288 msgid "Ranges" msgstr "" -#: ../../library/stdtypes.rst:1291 +#: ../../library/stdtypes.rst:1292 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../library/stdtypes.rst:1298 +#: ../../library/stdtypes.rst:1299 msgid "" "The arguments to the range constructor must be integers (either built-in :" -"class:`int` or any object that implements the ``__index__`` special " -"method). If the *step* argument is omitted, it defaults to ``1``. If the " -"*start* argument is omitted, it defaults to ``0``. If *step* is zero, :exc:" -"`ValueError` is raised." +"class:`int` or any object that implements the :meth:`~object.__index__` " +"special method). If the *step* argument is omitted, it defaults to ``1``. " +"If the *start* argument is omitted, it defaults to ``0``. If *step* is " +"zero, :exc:`ValueError` is raised." msgstr "" -#: ../../library/stdtypes.rst:1304 +#: ../../library/stdtypes.rst:1305 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../library/stdtypes.rst:1308 +#: ../../library/stdtypes.rst:1309 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../library/stdtypes.rst:1312 +#: ../../library/stdtypes.rst:1313 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../library/stdtypes.rst:1317 +#: ../../library/stdtypes.rst:1318 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../library/stdtypes.rst:1321 +#: ../../library/stdtypes.rst:1322 msgid "Range examples::" msgstr "" -#: ../../library/stdtypes.rst:1338 +#: ../../library/stdtypes.rst:1339 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -1795,23 +1796,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../library/stdtypes.rst:1345 +#: ../../library/stdtypes.rst:1346 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1350 +#: ../../library/stdtypes.rst:1351 msgid "The value of the *stop* parameter" msgstr "" -#: ../../library/stdtypes.rst:1354 +#: ../../library/stdtypes.rst:1355 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1357 +#: ../../library/stdtypes.rst:1358 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -1820,14 +1821,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../library/stdtypes.rst:1363 +#: ../../library/stdtypes.rst:1364 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../library/stdtypes.rst:1383 +#: ../../library/stdtypes.rst:1384 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -1837,111 +1838,111 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../library/stdtypes.rst:1390 +#: ../../library/stdtypes.rst:1391 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../library/stdtypes.rst:1396 +#: ../../library/stdtypes.rst:1397 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../library/stdtypes.rst:1401 +#: ../../library/stdtypes.rst:1402 msgid "" "The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../library/stdtypes.rst:1407 +#: ../../library/stdtypes.rst:1408 msgid "" "The `linspace recipe `_ shows " "how to implement a lazy version of range suitable for floating point " "applications." msgstr "" -#: ../../library/stdtypes.rst:1419 +#: ../../library/stdtypes.rst:1420 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../library/stdtypes.rst:1421 +#: ../../library/stdtypes.rst:1422 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../library/stdtypes.rst:1426 +#: ../../library/stdtypes.rst:1427 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:1427 +#: ../../library/stdtypes.rst:1428 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``." msgstr "" -#: ../../library/stdtypes.rst:1428 +#: ../../library/stdtypes.rst:1429 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes" "\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:1430 +#: ../../library/stdtypes.rst:1431 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../library/stdtypes.rst:1433 +#: ../../library/stdtypes.rst:1434 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../library/stdtypes.rst:1437 +#: ../../library/stdtypes.rst:1438 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported escape sequences, and the ``r`` (\"raw\") prefix that " "disables most escape sequence processing." msgstr "" -#: ../../library/stdtypes.rst:1441 +#: ../../library/stdtypes.rst:1442 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../library/stdtypes.rst:1444 +#: ../../library/stdtypes.rst:1445 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../library/stdtypes.rst:1450 +#: ../../library/stdtypes.rst:1451 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../library/stdtypes.rst:1454 +#: ../../library/stdtypes.rst:1455 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../library/stdtypes.rst:1466 +#: ../../library/stdtypes.rst:1467 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../library/stdtypes.rst:1470 +#: ../../library/stdtypes.rst:1471 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`object.__str__() `, which is the \"informal\" or nicely " @@ -1950,7 +1951,7 @@ msgid "" "method, then :func:`str` falls back to returning :meth:`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1481 +#: ../../library/stdtypes.rst:1482 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -1962,7 +1963,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1490 +#: ../../library/stdtypes.rst:1491 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -1970,7 +1971,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1498 +#: ../../library/stdtypes.rst:1499 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -1978,17 +1979,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1510 +#: ../../library/stdtypes.rst:1511 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1515 +#: ../../library/stdtypes.rst:1516 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1518 +#: ../../library/stdtypes.rst:1519 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -1998,33 +1999,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1525 +#: ../../library/stdtypes.rst:1526 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../library/stdtypes.rst:1531 +#: ../../library/stdtypes.rst:1532 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1534 +#: ../../library/stdtypes.rst:1535 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../library/stdtypes.rst:1541 +#: ../../library/stdtypes.rst:1542 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1544 +#: ../../library/stdtypes.rst:1545 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2033,27 +2034,27 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1550 +#: ../../library/stdtypes.rst:1551 msgid "" "The casefolding algorithm is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1558 +#: ../../library/stdtypes.rst:1559 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " "returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1566 +#: ../../library/stdtypes.rst:1567 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:1573 +#: ../../library/stdtypes.rst:1574 msgid "" "Return an encoded version of the string as a bytes object. Default encoding " "is ``'utf-8'``. *errors* may be given to set a different error handling " @@ -2065,24 +2066,24 @@ msgid "" "encodings`." msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1583 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first encoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:1587 +#: ../../library/stdtypes.rst:1588 msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1590 ../../library/stdtypes.rst:2726 +#: ../../library/stdtypes.rst:1591 ../../library/stdtypes.rst:2727 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." msgstr "" -#: ../../library/stdtypes.rst:1597 +#: ../../library/stdtypes.rst:1598 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " @@ -2090,7 +2091,7 @@ msgid "" "*end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:1605 +#: ../../library/stdtypes.rst:1606 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2106,21 +2107,21 @@ msgid "" "printed." msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1627 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " "interpreted as in slice notation. Return ``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:1632 +#: ../../library/stdtypes.rst:1633 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:1642 +#: ../../library/stdtypes.rst:1643 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2130,13 +2131,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1652 +#: ../../library/stdtypes.rst:1653 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1656 +#: ../../library/stdtypes.rst:1657 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2147,26 +2148,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1665 +#: ../../library/stdtypes.rst:1666 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../library/stdtypes.rst:1673 +#: ../../library/stdtypes.rst:1674 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../library/stdtypes.rst:1689 +#: ../../library/stdtypes.rst:1690 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1695 +#: ../../library/stdtypes.rst:1696 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2174,7 +2175,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1703 +#: ../../library/stdtypes.rst:1704 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2184,14 +2185,14 @@ msgid "" "property defined in the Unicode Standard." msgstr "" -#: ../../library/stdtypes.rst:1712 +#: ../../library/stdtypes.rst:1713 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range U" "+0000-U+007F." msgstr "" -#: ../../library/stdtypes.rst:1721 +#: ../../library/stdtypes.rst:1722 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2200,7 +2201,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1731 +#: ../../library/stdtypes.rst:1732 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2210,32 +2211,32 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1741 +#: ../../library/stdtypes.rst:1742 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1744 +#: ../../library/stdtypes.rst:1745 msgid "" "Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved " "identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../library/stdtypes.rst:1747 +#: ../../library/stdtypes.rst:1748 msgid "Example: ::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:1760 +#: ../../library/stdtypes.rst:1761 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1766 +#: ../../library/stdtypes.rst:1767 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2245,7 +2246,7 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:1776 +#: ../../library/stdtypes.rst:1777 msgid "" "Return ``True`` if all characters in the string are printable or the string " "is empty, ``False`` otherwise. Nonprintable characters are those characters " @@ -2256,20 +2257,20 @@ msgid "" "of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: ../../library/stdtypes.rst:1787 +#: ../../library/stdtypes.rst:1788 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1790 +#: ../../library/stdtypes.rst:1791 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, space" "\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../library/stdtypes.rst:1798 +#: ../../library/stdtypes.rst:1799 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2277,13 +2278,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:1805 +#: ../../library/stdtypes.rst:1806 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:1821 +#: ../../library/stdtypes.rst:1822 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2291,26 +2292,26 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:1829 +#: ../../library/stdtypes.rst:1830 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1836 +#: ../../library/stdtypes.rst:1837 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:1839 +#: ../../library/stdtypes.rst:1840 msgid "" "The lowercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1845 +#: ../../library/stdtypes.rst:1846 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2319,19 +2320,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1855 +#: ../../library/stdtypes.rst:1856 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1866 +#: ../../library/stdtypes.rst:1867 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:1868 +#: ../../library/stdtypes.rst:1869 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2339,7 +2340,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:1873 +#: ../../library/stdtypes.rst:1874 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in x will be mapped to the character at " @@ -2347,7 +2348,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:1881 +#: ../../library/stdtypes.rst:1882 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2355,47 +2356,47 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:1889 +#: ../../library/stdtypes.rst:1890 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string::" msgstr "" -#: ../../library/stdtypes.rst:1903 +#: ../../library/stdtypes.rst:1904 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string::" msgstr "" -#: ../../library/stdtypes.rst:1917 +#: ../../library/stdtypes.rst:1918 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If the optional argument *count* is given, only the first *count* " "occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:1924 +#: ../../library/stdtypes.rst:1925 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " "and *end* are interpreted as in slice notation. Return ``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:1931 +#: ../../library/stdtypes.rst:1932 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1937 +#: ../../library/stdtypes.rst:1938 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:1944 +#: ../../library/stdtypes.rst:1945 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2403,7 +2404,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:1952 +#: ../../library/stdtypes.rst:1953 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -2412,7 +2413,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:1961 +#: ../../library/stdtypes.rst:1962 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2421,13 +2422,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1971 +#: ../../library/stdtypes.rst:1972 msgid "" "See :meth:`str.removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:1981 +#: ../../library/stdtypes.rst:1982 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -2436,7 +2437,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:1987 +#: ../../library/stdtypes.rst:1988 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -2445,23 +2446,23 @@ msgid "" "Splitting an empty string with a specified separator returns ``['']``." msgstr "" -#: ../../library/stdtypes.rst:1993 ../../library/stdtypes.rst:2009 -#: ../../library/stdtypes.rst:2061 ../../library/stdtypes.rst:2129 -#: ../../library/stdtypes.rst:2192 ../../library/stdtypes.rst:3042 -#: ../../library/stdtypes.rst:3058 ../../library/stdtypes.rst:3149 -#: ../../library/stdtypes.rst:3165 ../../library/stdtypes.rst:3190 -#: ../../library/stdtypes.rst:3204 ../../library/stdtypes.rst:3232 -#: ../../library/stdtypes.rst:3246 ../../library/stdtypes.rst:3264 -#: ../../library/stdtypes.rst:3291 ../../library/stdtypes.rst:3314 -#: ../../library/stdtypes.rst:3341 ../../library/stdtypes.rst:3383 -#: ../../library/stdtypes.rst:3407 +#: ../../library/stdtypes.rst:1994 ../../library/stdtypes.rst:2010 +#: ../../library/stdtypes.rst:2062 ../../library/stdtypes.rst:2130 +#: ../../library/stdtypes.rst:2193 ../../library/stdtypes.rst:3043 +#: ../../library/stdtypes.rst:3059 ../../library/stdtypes.rst:3150 +#: ../../library/stdtypes.rst:3166 ../../library/stdtypes.rst:3191 +#: ../../library/stdtypes.rst:3205 ../../library/stdtypes.rst:3233 +#: ../../library/stdtypes.rst:3247 ../../library/stdtypes.rst:3265 +#: ../../library/stdtypes.rst:3292 ../../library/stdtypes.rst:3315 +#: ../../library/stdtypes.rst:3342 ../../library/stdtypes.rst:3384 +#: ../../library/stdtypes.rst:3408 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/stdtypes.rst:2002 +#: ../../library/stdtypes.rst:2003 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -2471,131 +2472,131 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2024 +#: ../../library/stdtypes.rst:2025 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../library/stdtypes.rst:2028 +#: ../../library/stdtypes.rst:2029 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2032 +#: ../../library/stdtypes.rst:2033 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2032 +#: ../../library/stdtypes.rst:2033 msgid "Description" msgstr "描述" -#: ../../library/stdtypes.rst:2034 +#: ../../library/stdtypes.rst:2035 msgid "``\\n``" msgstr "``\\n``" -#: ../../library/stdtypes.rst:2034 +#: ../../library/stdtypes.rst:2035 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2036 +#: ../../library/stdtypes.rst:2037 msgid "``\\r``" msgstr "``\\r``" -#: ../../library/stdtypes.rst:2036 +#: ../../library/stdtypes.rst:2037 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2038 +#: ../../library/stdtypes.rst:2039 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: ../../library/stdtypes.rst:2038 +#: ../../library/stdtypes.rst:2039 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2040 +#: ../../library/stdtypes.rst:2041 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` 或 ``\\x0b``" -#: ../../library/stdtypes.rst:2040 +#: ../../library/stdtypes.rst:2041 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2042 +#: ../../library/stdtypes.rst:2043 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` 或 ``\\x0c``" -#: ../../library/stdtypes.rst:2042 +#: ../../library/stdtypes.rst:2043 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2044 +#: ../../library/stdtypes.rst:2045 msgid "``\\x1c``" msgstr "``\\x1c``" -#: ../../library/stdtypes.rst:2044 +#: ../../library/stdtypes.rst:2045 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2046 +#: ../../library/stdtypes.rst:2047 msgid "``\\x1d``" msgstr "``\\x1d``" -#: ../../library/stdtypes.rst:2046 +#: ../../library/stdtypes.rst:2047 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2048 +#: ../../library/stdtypes.rst:2049 msgid "``\\x1e``" msgstr "``\\x1e``" -#: ../../library/stdtypes.rst:2048 +#: ../../library/stdtypes.rst:2049 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2050 +#: ../../library/stdtypes.rst:2051 msgid "``\\x85``" msgstr "``\\x85``" -#: ../../library/stdtypes.rst:2050 +#: ../../library/stdtypes.rst:2051 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2052 +#: ../../library/stdtypes.rst:2053 msgid "``\\u2028``" msgstr "``\\u2028``" -#: ../../library/stdtypes.rst:2052 +#: ../../library/stdtypes.rst:2053 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2054 +#: ../../library/stdtypes.rst:2055 msgid "``\\u2029``" msgstr "``\\u2029``" -#: ../../library/stdtypes.rst:2054 +#: ../../library/stdtypes.rst:2055 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2059 +#: ../../library/stdtypes.rst:2060 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2068 +#: ../../library/stdtypes.rst:2069 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:2077 +#: ../../library/stdtypes.rst:2078 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2087 +#: ../../library/stdtypes.rst:2088 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -2603,7 +2604,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2095 +#: ../../library/stdtypes.rst:2096 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -2612,7 +2613,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2106 +#: ../../library/stdtypes.rst:2107 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -2620,20 +2621,20 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2119 +#: ../../library/stdtypes.rst:2120 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../library/stdtypes.rst:2126 +#: ../../library/stdtypes.rst:2127 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2134 ../../library/stdtypes.rst:3351 +#: ../../library/stdtypes.rst:2135 ../../library/stdtypes.rst:3352 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -2641,12 +2642,12 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2142 ../../library/stdtypes.rst:3359 +#: ../../library/stdtypes.rst:2143 ../../library/stdtypes.rst:3360 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:2156 +#: ../../library/stdtypes.rst:2157 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -2658,19 +2659,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2165 +#: ../../library/stdtypes.rst:2166 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2168 +#: ../../library/stdtypes.rst:2169 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2174 +#: ../../library/stdtypes.rst:2175 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -2679,13 +2680,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2180 +#: ../../library/stdtypes.rst:2181 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2186 +#: ../../library/stdtypes.rst:2187 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -2693,11 +2694,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2204 +#: ../../library/stdtypes.rst:2205 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2217 +#: ../../library/stdtypes.rst:2218 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -2708,7 +2709,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2225 +#: ../../library/stdtypes.rst:2226 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2718,7 +2719,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2231 +#: ../../library/stdtypes.rst:2232 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -2726,36 +2727,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2241 ../../library/stdtypes.rst:3462 +#: ../../library/stdtypes.rst:2242 ../../library/stdtypes.rst:3463 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2244 ../../library/stdtypes.rst:3465 +#: ../../library/stdtypes.rst:2245 ../../library/stdtypes.rst:3466 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2246 ../../library/stdtypes.rst:3467 +#: ../../library/stdtypes.rst:2247 ../../library/stdtypes.rst:3468 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2249 ../../library/stdtypes.rst:3470 +#: ../../library/stdtypes.rst:2250 ../../library/stdtypes.rst:3471 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2252 ../../library/stdtypes.rst:3473 +#: ../../library/stdtypes.rst:2253 ../../library/stdtypes.rst:3474 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../library/stdtypes.rst:2256 ../../library/stdtypes.rst:3477 +#: ../../library/stdtypes.rst:2257 ../../library/stdtypes.rst:3478 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2763,15 +2764,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2261 ../../library/stdtypes.rst:3482 +#: ../../library/stdtypes.rst:2262 ../../library/stdtypes.rst:3483 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2263 ../../library/stdtypes.rst:3484 +#: ../../library/stdtypes.rst:2264 ../../library/stdtypes.rst:3485 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2265 +#: ../../library/stdtypes.rst:2266 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -2779,279 +2780,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2274 ../../library/stdtypes.rst:3495 +#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:3496 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2277 ../../library/stdtypes.rst:3498 +#: ../../library/stdtypes.rst:2278 ../../library/stdtypes.rst:3499 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3507 +#: ../../library/stdtypes.rst:2287 ../../library/stdtypes.rst:3508 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2288 ../../library/stdtypes.rst:3509 +#: ../../library/stdtypes.rst:2289 ../../library/stdtypes.rst:3510 msgid "``'#'``" msgstr "``'#'``" -#: ../../library/stdtypes.rst:2288 ../../library/stdtypes.rst:3509 +#: ../../library/stdtypes.rst:2289 ../../library/stdtypes.rst:3510 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2291 ../../library/stdtypes.rst:3512 +#: ../../library/stdtypes.rst:2292 ../../library/stdtypes.rst:3513 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2291 ../../library/stdtypes.rst:3512 +#: ../../library/stdtypes.rst:2292 ../../library/stdtypes.rst:3513 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3514 +#: ../../library/stdtypes.rst:2294 ../../library/stdtypes.rst:3515 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3514 +#: ../../library/stdtypes.rst:2294 ../../library/stdtypes.rst:3515 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2296 ../../library/stdtypes.rst:3517 +#: ../../library/stdtypes.rst:2297 ../../library/stdtypes.rst:3518 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2296 ../../library/stdtypes.rst:3517 +#: ../../library/stdtypes.rst:2297 ../../library/stdtypes.rst:3518 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2299 ../../library/stdtypes.rst:3520 +#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3521 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2299 ../../library/stdtypes.rst:3520 +#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3521 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 +#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3525 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../library/stdtypes.rst:2306 ../../library/stdtypes.rst:3527 +#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3528 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3530 +#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:3531 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3533 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:2313 -#: ../../library/stdtypes.rst:3532 ../../library/stdtypes.rst:3534 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:2314 +#: ../../library/stdtypes.rst:3533 ../../library/stdtypes.rst:3535 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2313 ../../library/stdtypes.rst:3534 +#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3535 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 +#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3537 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 +#: ../../library/stdtypes.rst:2316 ../../library/stdtypes.rst:3537 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3538 +#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3539 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2317 ../../library/stdtypes.rst:3538 +#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3539 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3540 +#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3541 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3540 +#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3541 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:3545 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:3545 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 +#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3547 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 +#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3547 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3549 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:2329 -#: ../../library/stdtypes.rst:3548 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:2330 +#: ../../library/stdtypes.rst:3549 ../../library/stdtypes.rst:3551 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3551 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3553 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3553 msgid "" "Floating point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3557 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3557 msgid "" "Floating point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3561 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2339 +#: ../../library/stdtypes.rst:2340 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3573 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3574 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2342 +#: ../../library/stdtypes.rst:2343 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3568 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2345 +#: ../../library/stdtypes.rst:2346 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2348 ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:2349 ../../library/stdtypes.rst:3571 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2348 +#: ../../library/stdtypes.rst:2349 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3576 +#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3577 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3576 +#: ../../library/stdtypes.rst:2352 ../../library/stdtypes.rst:3577 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3583 +#: ../../library/stdtypes.rst:2359 ../../library/stdtypes.rst:3584 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:2363 ../../library/stdtypes.rst:3588 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../library/stdtypes.rst:2366 ../../library/stdtypes.rst:3591 +#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3592 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2369 ../../library/stdtypes.rst:3594 +#: ../../library/stdtypes.rst:2370 ../../library/stdtypes.rst:3595 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2373 ../../library/stdtypes.rst:3598 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3599 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../library/stdtypes.rst:2376 ../../library/stdtypes.rst:3601 +#: ../../library/stdtypes.rst:2377 ../../library/stdtypes.rst:3602 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2380 ../../library/stdtypes.rst:3605 +#: ../../library/stdtypes.rst:2381 ../../library/stdtypes.rst:3606 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2383 ../../library/stdtypes.rst:3614 +#: ../../library/stdtypes.rst:2384 ../../library/stdtypes.rst:3615 msgid "See :pep:`237`." msgstr "參閱 :pep:`237`\\ 。" -#: ../../library/stdtypes.rst:2385 +#: ../../library/stdtypes.rst:2386 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../library/stdtypes.rst:2390 +#: ../../library/stdtypes.rst:2391 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2401 +#: ../../library/stdtypes.rst:2402 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2409 +#: ../../library/stdtypes.rst:2410 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3059,17 +3060,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2414 +#: ../../library/stdtypes.rst:2415 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../library/stdtypes.rst:2420 +#: ../../library/stdtypes.rst:2421 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2424 +#: ../../library/stdtypes.rst:2425 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3077,40 +3078,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2431 +#: ../../library/stdtypes.rst:2432 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../library/stdtypes.rst:2434 +#: ../../library/stdtypes.rst:2435 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2435 +#: ../../library/stdtypes.rst:2436 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``." msgstr "" -#: ../../library/stdtypes.rst:2436 +#: ../../library/stdtypes.rst:2437 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2438 +#: ../../library/stdtypes.rst:2439 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../library/stdtypes.rst:2442 +#: ../../library/stdtypes.rst:2443 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../library/stdtypes.rst:2446 +#: ../../library/stdtypes.rst:2447 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3123,29 +3124,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2456 +#: ../../library/stdtypes.rst:2457 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2459 +#: ../../library/stdtypes.rst:2460 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2460 +#: ../../library/stdtypes.rst:2461 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2461 +#: ../../library/stdtypes.rst:2462 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2463 +#: ../../library/stdtypes.rst:2464 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2465 +#: ../../library/stdtypes.rst:2466 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3153,32 +3154,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2472 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2478 +#: ../../library/stdtypes.rst:2479 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2482 +#: ../../library/stdtypes.rst:2483 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2487 ../../library/stdtypes.rst:2581 +#: ../../library/stdtypes.rst:2488 ../../library/stdtypes.rst:2582 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2493 +#: ../../library/stdtypes.rst:2494 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default " @@ -3187,13 +3188,13 @@ msgid "" "negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2509 +#: ../../library/stdtypes.rst:2510 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../library/stdtypes.rst:2513 +#: ../../library/stdtypes.rst:2514 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -3201,14 +3202,14 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2518 +#: ../../library/stdtypes.rst:2519 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2523 +#: ../../library/stdtypes.rst:2524 msgid "" "For Python 2.x users: In the Python 2.x series, a variety of implicit " "conversions between 8-bit strings (the closest thing 2.x offers to a built-" @@ -3220,51 +3221,51 @@ msgid "" "objects will always compare unequal." msgstr "" -#: ../../library/stdtypes.rst:2536 +#: ../../library/stdtypes.rst:2537 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2540 +#: ../../library/stdtypes.rst:2541 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2545 +#: ../../library/stdtypes.rst:2546 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2548 +#: ../../library/stdtypes.rst:2549 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2549 +#: ../../library/stdtypes.rst:2550 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2550 +#: ../../library/stdtypes.rst:2551 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2551 +#: ../../library/stdtypes.rst:2552 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2553 +#: ../../library/stdtypes.rst:2554 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../library/stdtypes.rst:2557 +#: ../../library/stdtypes.rst:2558 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2559 +#: ../../library/stdtypes.rst:2560 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3272,33 +3273,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2565 +#: ../../library/stdtypes.rst:2566 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2572 +#: ../../library/stdtypes.rst:2573 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2576 +#: ../../library/stdtypes.rst:2577 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2589 +#: ../../library/stdtypes.rst:2590 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:2594 +#: ../../library/stdtypes.rst:2595 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -3306,7 +3307,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2599 +#: ../../library/stdtypes.rst:2600 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3314,11 +3315,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2608 +#: ../../library/stdtypes.rst:2609 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2613 +#: ../../library/stdtypes.rst:2614 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3327,97 +3328,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2621 +#: ../../library/stdtypes.rst:2622 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../library/stdtypes.rst:2628 +#: ../../library/stdtypes.rst:2629 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2633 +#: ../../library/stdtypes.rst:2634 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../library/stdtypes.rst:2638 +#: ../../library/stdtypes.rst:2639 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../library/stdtypes.rst:2641 +#: ../../library/stdtypes.rst:2642 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2647 +#: ../../library/stdtypes.rst:2648 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:2651 ../../library/stdtypes.rst:2750 -#: ../../library/stdtypes.rst:2772 ../../library/stdtypes.rst:2838 -#: ../../library/stdtypes.rst:2851 +#: ../../library/stdtypes.rst:2652 ../../library/stdtypes.rst:2751 +#: ../../library/stdtypes.rst:2773 ../../library/stdtypes.rst:2839 +#: ../../library/stdtypes.rst:2852 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../library/stdtypes.rst:2654 ../../library/stdtypes.rst:2762 -#: ../../library/stdtypes.rst:2775 ../../library/stdtypes.rst:2841 -#: ../../library/stdtypes.rst:2854 +#: ../../library/stdtypes.rst:2655 ../../library/stdtypes.rst:2763 +#: ../../library/stdtypes.rst:2776 ../../library/stdtypes.rst:2842 +#: ../../library/stdtypes.rst:2855 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2661 +#: ../../library/stdtypes.rst:2662 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../library/stdtypes.rst:2670 +#: ../../library/stdtypes.rst:2671 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2674 ../../library/stdtypes.rst:2696 -#: ../../library/stdtypes.rst:2826 ../../library/stdtypes.rst:2919 -#: ../../library/stdtypes.rst:2933 ../../library/stdtypes.rst:2964 -#: ../../library/stdtypes.rst:2978 ../../library/stdtypes.rst:3020 -#: ../../library/stdtypes.rst:3090 ../../library/stdtypes.rst:3108 -#: ../../library/stdtypes.rst:3136 ../../library/stdtypes.rst:3275 -#: ../../library/stdtypes.rst:3330 ../../library/stdtypes.rst:3373 -#: ../../library/stdtypes.rst:3394 ../../library/stdtypes.rst:3416 -#: ../../library/stdtypes.rst:3618 +#: ../../library/stdtypes.rst:2675 ../../library/stdtypes.rst:2697 +#: ../../library/stdtypes.rst:2827 ../../library/stdtypes.rst:2920 +#: ../../library/stdtypes.rst:2934 ../../library/stdtypes.rst:2965 +#: ../../library/stdtypes.rst:2979 ../../library/stdtypes.rst:3021 +#: ../../library/stdtypes.rst:3091 ../../library/stdtypes.rst:3109 +#: ../../library/stdtypes.rst:3137 ../../library/stdtypes.rst:3276 +#: ../../library/stdtypes.rst:3331 ../../library/stdtypes.rst:3374 +#: ../../library/stdtypes.rst:3395 ../../library/stdtypes.rst:3417 +#: ../../library/stdtypes.rst:3619 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../library/stdtypes.rst:2683 +#: ../../library/stdtypes.rst:2684 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../library/stdtypes.rst:2692 +#: ../../library/stdtypes.rst:2693 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2705 +#: ../../library/stdtypes.rst:2706 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3428,25 +3429,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2713 +#: ../../library/stdtypes.rst:2714 msgid "" "By default, the *errors* argument is not checked for best performances, but " "only used at the first decoding error. Enable the :ref:`Python Development " "Mode `, or use a :ref:`debug build ` to check *errors*." msgstr "" -#: ../../library/stdtypes.rst:2719 +#: ../../library/stdtypes.rst:2720 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary bytes or " "bytearray object." msgstr "" -#: ../../library/stdtypes.rst:2723 +#: ../../library/stdtypes.rst:2724 msgid "Added support for keyword arguments." msgstr "新增關鍵字引數的支援。" -#: ../../library/stdtypes.rst:2734 +#: ../../library/stdtypes.rst:2735 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3454,11 +3455,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2739 +#: ../../library/stdtypes.rst:2740 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2745 +#: ../../library/stdtypes.rst:2746 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -3466,20 +3467,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2755 +#: ../../library/stdtypes.rst:2756 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:2769 +#: ../../library/stdtypes.rst:2770 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2782 +#: ../../library/stdtypes.rst:2783 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -3489,7 +3490,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2793 +#: ../../library/stdtypes.rst:2794 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -3497,7 +3498,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2804 +#: ../../library/stdtypes.rst:2805 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3506,24 +3507,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2811 ../../library/stdtypes.rst:2868 +#: ../../library/stdtypes.rst:2812 ../../library/stdtypes.rst:2869 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2817 +#: ../../library/stdtypes.rst:2818 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:2821 +#: ../../library/stdtypes.rst:2822 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2833 +#: ../../library/stdtypes.rst:2834 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3531,13 +3532,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2848 +#: ../../library/stdtypes.rst:2849 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2861 +#: ../../library/stdtypes.rst:2862 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -3546,7 +3547,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2874 +#: ../../library/stdtypes.rst:2875 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3554,11 +3555,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2879 +#: ../../library/stdtypes.rst:2880 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2885 +#: ../../library/stdtypes.rst:2886 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -3566,22 +3567,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2890 +#: ../../library/stdtypes.rst:2891 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2893 +#: ../../library/stdtypes.rst:2894 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2899 +#: ../../library/stdtypes.rst:2900 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2903 +#: ../../library/stdtypes.rst:2904 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -3590,7 +3591,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2912 +#: ../../library/stdtypes.rst:2913 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3598,7 +3599,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2926 +#: ../../library/stdtypes.rst:2927 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3606,7 +3607,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2940 +#: ../../library/stdtypes.rst:2941 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3616,14 +3617,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2952 +#: ../../library/stdtypes.rst:2953 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2971 +#: ../../library/stdtypes.rst:2972 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -3631,7 +3632,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2985 +#: ../../library/stdtypes.rst:2986 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -3641,7 +3642,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:2996 +#: ../../library/stdtypes.rst:2997 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -3651,14 +3652,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3008 +#: ../../library/stdtypes.rst:3009 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3027 +#: ../../library/stdtypes.rst:3028 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -3667,7 +3668,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3033 +#: ../../library/stdtypes.rst:3034 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -3678,7 +3679,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3051 +#: ../../library/stdtypes.rst:3052 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -3688,7 +3689,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3072 +#: ../../library/stdtypes.rst:3073 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *chars* argument is a binary sequence specifying the set of " @@ -3698,13 +3699,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3085 +#: ../../library/stdtypes.rst:3086 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3094 +#: ../../library/stdtypes.rst:3095 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -3712,14 +3713,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3102 +#: ../../library/stdtypes.rst:3103 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../library/stdtypes.rst:3115 +#: ../../library/stdtypes.rst:3116 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -3735,7 +3736,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3143 +#: ../../library/stdtypes.rst:3144 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3744,7 +3745,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3160 +#: ../../library/stdtypes.rst:3161 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3752,35 +3753,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3176 +#: ../../library/stdtypes.rst:3177 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../library/stdtypes.rst:3186 +#: ../../library/stdtypes.rst:3187 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3201 +#: ../../library/stdtypes.rst:3202 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:3211 ../../library/stdtypes.rst:3253 -#: ../../library/stdtypes.rst:3269 ../../library/stdtypes.rst:3319 -#: ../../library/stdtypes.rst:3388 +#: ../../library/stdtypes.rst:3212 ../../library/stdtypes.rst:3254 +#: ../../library/stdtypes.rst:3270 ../../library/stdtypes.rst:3320 +#: ../../library/stdtypes.rst:3389 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3219 +#: ../../library/stdtypes.rst:3220 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3788,27 +3789,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3228 +#: ../../library/stdtypes.rst:3229 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../library/stdtypes.rst:3243 +#: ../../library/stdtypes.rst:3244 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../library/stdtypes.rst:3261 +#: ../../library/stdtypes.rst:3262 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3286 +#: ../../library/stdtypes.rst:3287 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -3816,20 +3817,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3298 +#: ../../library/stdtypes.rst:3299 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:3311 +#: ../../library/stdtypes.rst:3312 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../library/stdtypes.rst:3323 +#: ../../library/stdtypes.rst:3324 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3837,14 +3838,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3337 +#: ../../library/stdtypes.rst:3338 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../library/stdtypes.rst:3346 +#: ../../library/stdtypes.rst:3347 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3852,13 +3853,13 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3380 +#: ../../library/stdtypes.rst:3381 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3401 +#: ../../library/stdtypes.rst:3402 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -3867,11 +3868,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3423 +#: ../../library/stdtypes.rst:3424 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3440 +#: ../../library/stdtypes.rst:3441 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -3879,7 +3880,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3445 +#: ../../library/stdtypes.rst:3446 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3889,7 +3890,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3452 +#: ../../library/stdtypes.rst:3453 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3897,7 +3898,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3486 +#: ../../library/stdtypes.rst:3487 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -3905,73 +3906,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:3561 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:3564 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:3564 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:3568 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:3571 msgid "" "Bytes (converts any Python object using ``repr(obj)." "encode('ascii','backslashreplace)``)." msgstr "" -#: ../../library/stdtypes.rst:3573 +#: ../../library/stdtypes.rst:3574 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3573 +#: ../../library/stdtypes.rst:3574 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3608 +#: ../../library/stdtypes.rst:3609 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3611 +#: ../../library/stdtypes.rst:3612 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3623 +#: ../../library/stdtypes.rst:3624 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3630 +#: ../../library/stdtypes.rst:3631 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3632 +#: ../../library/stdtypes.rst:3633 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../library/stdtypes.rst:3638 +#: ../../library/stdtypes.rst:3639 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/stdtypes.rst:3642 +#: ../../library/stdtypes.rst:3643 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -3979,7 +3980,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3647 +#: ../../library/stdtypes.rst:3648 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If " "``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is " @@ -3989,13 +3990,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3654 +#: ../../library/stdtypes.rst:3655 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3667 +#: ../../library/stdtypes.rst:3668 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4006,82 +4007,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3676 +#: ../../library/stdtypes.rst:3677 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3688 +#: ../../library/stdtypes.rst:3689 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3709 +#: ../../library/stdtypes.rst:3710 msgid "" "One-dimensional memoryviews of hashable (read-only) types with formats 'B', " "'b' or 'c' are also hashable. The hash is defined as ``hash(m) == hash(m." "tobytes())``::" msgstr "" -#: ../../library/stdtypes.rst:3721 +#: ../../library/stdtypes.rst:3722 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3725 +#: ../../library/stdtypes.rst:3726 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3729 +#: ../../library/stdtypes.rst:3730 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3732 +#: ../../library/stdtypes.rst:3733 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3736 +#: ../../library/stdtypes.rst:3737 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../library/stdtypes.rst:3740 +#: ../../library/stdtypes.rst:3741 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../library/stdtypes.rst:3759 +#: ../../library/stdtypes.rst:3760 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../library/stdtypes.rst:3775 +#: ../../library/stdtypes.rst:3776 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3778 +#: ../../library/stdtypes.rst:3779 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3784 +#: ../../library/stdtypes.rst:3785 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../library/stdtypes.rst:3793 +#: ../../library/stdtypes.rst:3794 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4089,7 +4090,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3798 +#: ../../library/stdtypes.rst:3799 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -4098,36 +4099,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3807 +#: ../../library/stdtypes.rst:3808 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3816 +#: ../../library/stdtypes.rst:3817 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:3823 +#: ../../library/stdtypes.rst:3824 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3833 +#: ../../library/stdtypes.rst:3834 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../library/stdtypes.rst:3840 +#: ../../library/stdtypes.rst:3841 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3859 +#: ../../library/stdtypes.rst:3860 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -4136,20 +4137,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3865 +#: ../../library/stdtypes.rst:3866 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release()` itself which can be called " "multiple times)::" msgstr "" -#: ../../library/stdtypes.rst:3876 +#: ../../library/stdtypes.rst:3877 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3892 +#: ../../library/stdtypes.rst:3893 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -4158,57 +4159,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3898 +#: ../../library/stdtypes.rst:3899 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " "'c'). The byte length of the result must be the same as the original length." msgstr "" -#: ../../library/stdtypes.rst:3903 +#: ../../library/stdtypes.rst:3904 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3926 +#: ../../library/stdtypes.rst:3927 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3939 +#: ../../library/stdtypes.rst:3940 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3965 +#: ../../library/stdtypes.rst:3966 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3979 +#: ../../library/stdtypes.rst:3980 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3982 +#: ../../library/stdtypes.rst:3983 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:3986 +#: ../../library/stdtypes.rst:3987 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:3997 +#: ../../library/stdtypes.rst:3998 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../library/stdtypes.rst:4016 +#: ../../library/stdtypes.rst:4017 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4033 +#: ../../library/stdtypes.rst:4034 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4037 +#: ../../library/stdtypes.rst:4038 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -4216,59 +4217,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4042 +#: ../../library/stdtypes.rst:4043 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../library/stdtypes.rst:4048 +#: ../../library/stdtypes.rst:4049 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4061 +#: ../../library/stdtypes.rst:4062 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4066 +#: ../../library/stdtypes.rst:4067 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../library/stdtypes.rst:4069 ../../library/stdtypes.rst:4077 +#: ../../library/stdtypes.rst:4070 ../../library/stdtypes.rst:4078 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4074 +#: ../../library/stdtypes.rst:4075 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../library/stdtypes.rst:4082 +#: ../../library/stdtypes.rst:4083 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4086 +#: ../../library/stdtypes.rst:4087 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4092 +#: ../../library/stdtypes.rst:4093 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4098 +#: ../../library/stdtypes.rst:4099 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4106 +#: ../../library/stdtypes.rst:4107 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4110 +#: ../../library/stdtypes.rst:4111 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4278,7 +4279,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4117 +#: ../../library/stdtypes.rst:4118 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -4286,7 +4287,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4122 +#: ../../library/stdtypes.rst:4123 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4298,18 +4299,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4130 +#: ../../library/stdtypes.rst:4131 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../library/stdtypes.rst:4134 +#: ../../library/stdtypes.rst:4135 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4139 +#: ../../library/stdtypes.rst:4140 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -4317,92 +4318,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4145 +#: ../../library/stdtypes.rst:4146 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4147 +#: ../../library/stdtypes.rst:4148 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4148 +#: ../../library/stdtypes.rst:4149 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4149 +#: ../../library/stdtypes.rst:4150 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4151 +#: ../../library/stdtypes.rst:4152 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4156 +#: ../../library/stdtypes.rst:4157 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4160 +#: ../../library/stdtypes.rst:4161 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4164 +#: ../../library/stdtypes.rst:4165 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4168 +#: ../../library/stdtypes.rst:4169 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../library/stdtypes.rst:4174 +#: ../../library/stdtypes.rst:4175 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4178 +#: ../../library/stdtypes.rst:4179 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4184 +#: ../../library/stdtypes.rst:4185 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4188 +#: ../../library/stdtypes.rst:4189 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4194 +#: ../../library/stdtypes.rst:4195 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4199 +#: ../../library/stdtypes.rst:4200 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4204 +#: ../../library/stdtypes.rst:4205 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4209 +#: ../../library/stdtypes.rst:4210 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4213 +#: ../../library/stdtypes.rst:4214 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4216 +#: ../../library/stdtypes.rst:4217 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4412,7 +4413,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4223 +#: ../../library/stdtypes.rst:4224 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -4422,14 +4423,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4230 +#: ../../library/stdtypes.rst:4231 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../library/stdtypes.rst:4234 +#: ../../library/stdtypes.rst:4235 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -4437,71 +4438,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4239 +#: ../../library/stdtypes.rst:4240 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../library/stdtypes.rst:4242 +#: ../../library/stdtypes.rst:4243 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4244 +#: ../../library/stdtypes.rst:4245 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../library/stdtypes.rst:4248 +#: ../../library/stdtypes.rst:4249 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4254 +#: ../../library/stdtypes.rst:4255 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4259 +#: ../../library/stdtypes.rst:4260 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4264 +#: ../../library/stdtypes.rst:4265 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4269 +#: ../../library/stdtypes.rst:4270 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4273 +#: ../../library/stdtypes.rst:4274 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4277 +#: ../../library/stdtypes.rst:4278 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4282 +#: ../../library/stdtypes.rst:4283 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4286 +#: ../../library/stdtypes.rst:4287 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4291 +#: ../../library/stdtypes.rst:4292 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4294 +#: ../../library/stdtypes.rst:4295 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4509,18 +4510,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4299 +#: ../../library/stdtypes.rst:4300 msgid "" "Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :" "meth:`discard` methods may be a set. To support searching for an equivalent " "frozenset, a temporary one is created from *elem*." msgstr "" -#: ../../library/stdtypes.rst:4307 +#: ../../library/stdtypes.rst:4308 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4317 +#: ../../library/stdtypes.rst:4318 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4529,7 +4530,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4323 +#: ../../library/stdtypes.rst:4324 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4541,40 +4542,40 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4332 +#: ../../library/stdtypes.rst:4333 msgid "" "Dictionaries can be created by placing a comma-separated list of ``key: " "value`` pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` " "or ``{4098: 'jack', 4127: 'sjoerd'}``, or by the :class:`dict` constructor." msgstr "" -#: ../../library/stdtypes.rst:4340 +#: ../../library/stdtypes.rst:4341 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4343 +#: ../../library/stdtypes.rst:4344 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4345 +#: ../../library/stdtypes.rst:4346 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4347 +#: ../../library/stdtypes.rst:4348 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4348 +#: ../../library/stdtypes.rst:4349 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4351 +#: ../../library/stdtypes.rst:4352 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4586,7 +4587,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4361 +#: ../../library/stdtypes.rst:4362 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4594,39 +4595,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4366 +#: ../../library/stdtypes.rst:4367 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4378 +#: ../../library/stdtypes.rst:4379 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4382 +#: ../../library/stdtypes.rst:4383 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4387 +#: ../../library/stdtypes.rst:4388 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4391 +#: ../../library/stdtypes.rst:4392 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4395 +#: ../../library/stdtypes.rst:4396 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4400 +#: ../../library/stdtypes.rst:4401 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4637,51 +4638,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4418 +#: ../../library/stdtypes.rst:4419 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4424 +#: ../../library/stdtypes.rst:4425 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4428 +#: ../../library/stdtypes.rst:4429 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4433 +#: ../../library/stdtypes.rst:4434 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4437 +#: ../../library/stdtypes.rst:4438 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4441 +#: ../../library/stdtypes.rst:4442 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4446 +#: ../../library/stdtypes.rst:4447 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4450 +#: ../../library/stdtypes.rst:4451 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4454 +#: ../../library/stdtypes.rst:4455 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4456 +#: ../../library/stdtypes.rst:4457 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4690,70 +4691,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4464 +#: ../../library/stdtypes.rst:4465 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4470 +#: ../../library/stdtypes.rst:4471 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4475 +#: ../../library/stdtypes.rst:4476 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4480 +#: ../../library/stdtypes.rst:4481 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4486 +#: ../../library/stdtypes.rst:4487 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4489 +#: ../../library/stdtypes.rst:4490 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4493 +#: ../../library/stdtypes.rst:4494 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4499 +#: ../../library/stdtypes.rst:4500 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4506 +#: ../../library/stdtypes.rst:4507 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4512 +#: ../../library/stdtypes.rst:4513 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4515 +#: ../../library/stdtypes.rst:4516 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4761,71 +4762,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4522 +#: ../../library/stdtypes.rst:4523 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4525 +#: ../../library/stdtypes.rst:4526 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4535 +#: ../../library/stdtypes.rst:4536 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4543 +#: ../../library/stdtypes.rst:4544 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4549 +#: ../../library/stdtypes.rst:4550 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4553 +#: ../../library/stdtypes.rst:4554 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4571 +#: ../../library/stdtypes.rst:4572 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4575 +#: ../../library/stdtypes.rst:4576 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4587 +#: ../../library/stdtypes.rst:4588 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4592 +#: ../../library/stdtypes.rst:4593 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4599 +#: ../../library/stdtypes.rst:4600 msgid "Dictionary view objects" msgstr "" -#: ../../library/stdtypes.rst:4601 +#: ../../library/stdtypes.rst:4602 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4833,23 +4834,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4606 +#: ../../library/stdtypes.rst:4607 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4611 +#: ../../library/stdtypes.rst:4612 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4615 +#: ../../library/stdtypes.rst:4616 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4618 +#: ../../library/stdtypes.rst:4619 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4857,39 +4858,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4623 +#: ../../library/stdtypes.rst:4624 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4626 +#: ../../library/stdtypes.rst:4627 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4631 +#: ../../library/stdtypes.rst:4632 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4636 +#: ../../library/stdtypes.rst:4637 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4639 +#: ../../library/stdtypes.rst:4640 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4644 +#: ../../library/stdtypes.rst:4645 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4649 +#: ../../library/stdtypes.rst:4650 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4899,15 +4900,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4656 +#: ../../library/stdtypes.rst:4657 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4697 +#: ../../library/stdtypes.rst:4698 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4704 +#: ../../library/stdtypes.rst:4705 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4915,7 +4916,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4712 +#: ../../library/stdtypes.rst:4713 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4923,14 +4924,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4717 +#: ../../library/stdtypes.rst:4718 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4721 +#: ../../library/stdtypes.rst:4722 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4940,7 +4941,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4731 +#: ../../library/stdtypes.rst:4732 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4949,7 +4950,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4736 +#: ../../library/stdtypes.rst:4737 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4960,7 +4961,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4743 +#: ../../library/stdtypes.rst:4744 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4969,7 +4970,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4749 +#: ../../library/stdtypes.rst:4750 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -4978,17 +4979,17 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4755 +#: ../../library/stdtypes.rst:4756 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " "generator function is decorated with the :class:`contextlib.contextmanager` " "decorator, it will return a context manager implementing the necessary :meth:" -"`__enter__` and :meth:`__exit__` methods, rather than the iterator produced " -"by an undecorated generator function." +"`~contextmanager.__enter__` and :meth:`~contextmanager.__exit__` methods, " +"rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4762 +#: ../../library/stdtypes.rst:4763 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -4997,30 +4998,30 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4770 +#: ../../library/stdtypes.rst:4771 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4775 +#: ../../library/stdtypes.rst:4776 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4782 +#: ../../library/stdtypes.rst:4783 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4788 +#: ../../library/stdtypes.rst:4789 msgid "" "``GenericAlias`` objects are created by subscripting a class (usually a " "container), such as ``list[int]``. They are intended primarily for :term:" "`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4792 +#: ../../library/stdtypes.rst:4793 msgid "" "Usually, the :ref:`subscription ` of container objects calls " "the method :meth:`__getitem__` of the object. However, the subscription of " @@ -5029,35 +5030,35 @@ msgid "" "return a ``GenericAlias`` object." msgstr "" -#: ../../library/stdtypes.rst:4799 +#: ../../library/stdtypes.rst:4800 msgid "" "If the :meth:`__getitem__` of the class' metaclass is present, it will take " "precedence over the :meth:`__class_getitem__` defined in the class (see :pep:" "`560` for more details)." msgstr "" -#: ../../library/stdtypes.rst:4803 +#: ../../library/stdtypes.rst:4804 msgid "" "The ``GenericAlias`` object acts as a proxy for :term:`generic types " "`, implementing *parameterized generics* - a specific instance " "of a generic which provides the types for container elements." msgstr "" -#: ../../library/stdtypes.rst:4807 +#: ../../library/stdtypes.rst:4808 msgid "" "The user-exposed type for the ``GenericAlias`` object can be accessed from :" "class:`types.GenericAlias` and used for :func:`isinstance` checks. It can " "also be used to create ``GenericAlias`` objects directly." msgstr "" -#: ../../library/stdtypes.rst:4813 +#: ../../library/stdtypes.rst:4814 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` containing elements of " "types *X*, *Y*, and more depending on the ``T`` used. For example, a " "function expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4821 +#: ../../library/stdtypes.rst:4822 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5065,13 +5066,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4829 +#: ../../library/stdtypes.rst:4830 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4837 +#: ../../library/stdtypes.rst:4838 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating an " @@ -5080,25 +5081,25 @@ msgid "" "without errors::" msgstr "" -#: ../../library/stdtypes.rst:4847 +#: ../../library/stdtypes.rst:4848 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4858 +#: ../../library/stdtypes.rst:4859 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4866 +#: ../../library/stdtypes.rst:4867 msgid "" "The :meth:`__getitem__` method of generics will raise an exception to " "disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4874 +#: ../../library/stdtypes.rst:4875 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " @@ -5106,214 +5107,214 @@ msgid "" "__args__>`. ::" msgstr "" -#: ../../library/stdtypes.rst:4885 +#: ../../library/stdtypes.rst:4886 msgid "Standard Generic Collections" msgstr "" -#: ../../library/stdtypes.rst:4887 +#: ../../library/stdtypes.rst:4888 msgid "These standard library collections support parameterized generics." msgstr "" -#: ../../library/stdtypes.rst:4889 +#: ../../library/stdtypes.rst:4890 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4890 +#: ../../library/stdtypes.rst:4891 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4891 +#: ../../library/stdtypes.rst:4892 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4892 +#: ../../library/stdtypes.rst:4893 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4893 +#: ../../library/stdtypes.rst:4894 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4894 +#: ../../library/stdtypes.rst:4895 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4895 +#: ../../library/stdtypes.rst:4896 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4896 +#: ../../library/stdtypes.rst:4897 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4897 +#: ../../library/stdtypes.rst:4898 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4898 +#: ../../library/stdtypes.rst:4899 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4899 +#: ../../library/stdtypes.rst:4900 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4900 +#: ../../library/stdtypes.rst:4901 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4901 +#: ../../library/stdtypes.rst:4902 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4902 +#: ../../library/stdtypes.rst:4903 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4903 +#: ../../library/stdtypes.rst:4904 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4904 +#: ../../library/stdtypes.rst:4905 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4905 +#: ../../library/stdtypes.rst:4906 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4906 +#: ../../library/stdtypes.rst:4907 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4907 +#: ../../library/stdtypes.rst:4908 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4908 +#: ../../library/stdtypes.rst:4909 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4909 +#: ../../library/stdtypes.rst:4910 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4910 +#: ../../library/stdtypes.rst:4911 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4912 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4912 +#: ../../library/stdtypes.rst:4913 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4913 +#: ../../library/stdtypes.rst:4914 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4914 +#: ../../library/stdtypes.rst:4915 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4915 +#: ../../library/stdtypes.rst:4916 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4916 +#: ../../library/stdtypes.rst:4917 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4917 +#: ../../library/stdtypes.rst:4918 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4919 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4919 +#: ../../library/stdtypes.rst:4920 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4920 +#: ../../library/stdtypes.rst:4921 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4921 +#: ../../library/stdtypes.rst:4922 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4923 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4924 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4925 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4926 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4927 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4931 msgid "Special Attributes of Generic Alias" msgstr "" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4933 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4937 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4945 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`__class_getitem__` of the generic container::" msgstr "" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4955 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4966 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4972 msgid ":pep:`585` -- \"Type Hinting Generics In Standard Collections\"" msgstr "" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4973 msgid ":meth:`__class_getitem__` -- Used to implement parameterized generics." msgstr "" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4974 msgid ":ref:`generics` -- Generics in the :mod:`typing` module." msgstr "" -#: ../../library/stdtypes.rst:4981 +#: ../../library/stdtypes.rst:4982 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:4987 +#: ../../library/stdtypes.rst:4988 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5322,7 +5323,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:4994 +#: ../../library/stdtypes.rst:4995 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5330,76 +5331,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5004 +#: ../../library/stdtypes.rst:5005 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5006 +#: ../../library/stdtypes.rst:5007 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5010 +#: ../../library/stdtypes.rst:5011 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5014 +#: ../../library/stdtypes.rst:5015 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5018 +#: ../../library/stdtypes.rst:5019 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5022 +#: ../../library/stdtypes.rst:5023 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5029 +#: ../../library/stdtypes.rst:5030 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5035 +#: ../../library/stdtypes.rst:5036 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5043 +#: ../../library/stdtypes.rst:5044 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5056 +#: ../../library/stdtypes.rst:5057 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5074 +#: ../../library/stdtypes.rst:5075 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5082 +#: ../../library/stdtypes.rst:5083 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5084 +#: ../../library/stdtypes.rst:5085 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5091 +#: ../../library/stdtypes.rst:5092 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5094 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5410,7 +5411,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5100 +#: ../../library/stdtypes.rst:5101 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5421,32 +5422,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5108 +#: ../../library/stdtypes.rst:5109 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5116 +#: ../../library/stdtypes.rst:5117 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5118 +#: ../../library/stdtypes.rst:5119 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5124 +#: ../../library/stdtypes.rst:5125 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5126 +#: ../../library/stdtypes.rst:5127 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5129 +#: ../../library/stdtypes.rst:5130 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5454,15 +5455,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5133 +#: ../../library/stdtypes.rst:5134 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5139 +#: ../../library/stdtypes.rst:5140 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5143 +#: ../../library/stdtypes.rst:5144 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5470,7 +5471,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5148 +#: ../../library/stdtypes.rst:5149 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5482,7 +5483,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5157 +#: ../../library/stdtypes.rst:5158 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5492,15 +5493,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5177 ../../library/stdtypes.rst:5208 +#: ../../library/stdtypes.rst:5178 ../../library/stdtypes.rst:5209 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5185 +#: ../../library/stdtypes.rst:5186 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5191 +#: ../../library/stdtypes.rst:5192 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5510,23 +5511,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5198 +#: ../../library/stdtypes.rst:5199 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5205 +#: ../../library/stdtypes.rst:5206 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5214 +#: ../../library/stdtypes.rst:5215 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5220 +#: ../../library/stdtypes.rst:5221 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5534,30 +5535,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5225 +#: ../../library/stdtypes.rst:5226 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5231 +#: ../../library/stdtypes.rst:5232 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5233 +#: ../../library/stdtypes.rst:5234 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5237 +#: ../../library/stdtypes.rst:5238 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5244 +#: ../../library/stdtypes.rst:5245 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5246 +#: ../../library/stdtypes.rst:5247 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5565,15 +5566,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5251 +#: ../../library/stdtypes.rst:5252 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5257 +#: ../../library/stdtypes.rst:5258 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5259 +#: ../../library/stdtypes.rst:5260 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5581,15 +5582,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5264 +#: ../../library/stdtypes.rst:5265 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5270 +#: ../../library/stdtypes.rst:5271 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5272 +#: ../../library/stdtypes.rst:5273 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5600,104 +5601,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5285 +#: ../../library/stdtypes.rst:5286 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5291 +#: ../../library/stdtypes.rst:5292 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5293 +#: ../../library/stdtypes.rst:5294 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5300 +#: ../../library/stdtypes.rst:5301 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5302 +#: ../../library/stdtypes.rst:5303 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5309 +#: ../../library/stdtypes.rst:5310 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5315 +#: ../../library/stdtypes.rst:5316 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5320 +#: ../../library/stdtypes.rst:5321 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5325 +#: ../../library/stdtypes.rst:5326 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5331 +#: ../../library/stdtypes.rst:5332 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5339 +#: ../../library/stdtypes.rst:5340 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5345 +#: ../../library/stdtypes.rst:5346 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5352 +#: ../../library/stdtypes.rst:5353 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5361 +#: ../../library/stdtypes.rst:5362 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5362 +#: ../../library/stdtypes.rst:5363 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5365 +#: ../../library/stdtypes.rst:5366 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5368 +#: ../../library/stdtypes.rst:5369 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5370 +#: ../../library/stdtypes.rst:5371 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5373 +#: ../../library/stdtypes.rst:5374 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/reference/datamodel.po b/reference/datamodel.po index d988c63372..4a13e60951 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-23 00:09+0000\n" +"POT-Creation-Date: 2021-12-11 00:08+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-" @@ -2134,7 +2134,7 @@ msgstr "" msgid "" "If ``a`` is an instance of :class:`super`, then the binding ``super(B, obj)." "m()`` searches ``obj.__class__.__mro__`` for the base class ``A`` " -"immediately preceding ``B`` and then invokes the descriptor with the call: " +"immediately following ``B`` and then invokes the descriptor with the call: " "``A.__dict__['m'].__get__(obj, obj.__class__)``." msgstr ""