From 04ba747ab63468a56cfa580777434154619caef4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 1 Apr 2022 00:18:01 +0000 Subject: [PATCH 1/7] sync with cpython 9ed179b0 --- howto/functional.po | 8 +- reference/datamodel.po | 46 ++-- reference/expressions.po | 510 ++++++++++++++++++++------------------- 3 files changed, 290 insertions(+), 274 deletions(-) diff --git a/howto/functional.po b/howto/functional.po index cea5ebd7f8..a490402244 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-07 00:10+0000\n" +"POT-Creation-Date: 2022-04-01 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:36+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -678,9 +678,9 @@ msgstr "" #: ../../howto/functional.rst:592 msgid "" -":meth:`throw(type, value=None, traceback=None) ` is used to " -"raise an exception inside the generator; the exception is raised by the " -"``yield`` expression where the generator's execution is paused." +":meth:`throw(value) ` is used to raise an exception inside " +"the generator; the exception is raised by the ``yield`` expression where the " +"generator's execution is paused." msgstr "" #: ../../howto/functional.rst:596 diff --git a/reference/datamodel.po b/reference/datamodel.po index 4b0286d849..0fc511ac39 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-21 00:13+0000\n" +"POT-Creation-Date: 2022-04-01 00:15+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-" @@ -3312,7 +3312,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:2918 +#: ../../reference/datamodel.rst:2919 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -3323,7 +3323,7 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:2929 +#: ../../reference/datamodel.rst:2930 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -3333,99 +3333,99 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:2937 +#: ../../reference/datamodel.rst:2938 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:2943 +#: ../../reference/datamodel.rst:2944 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:2945 +#: ../../reference/datamodel.rst:2946 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:2948 +#: ../../reference/datamodel.rst:2949 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:2952 +#: ../../reference/datamodel.rst:2953 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:2956 +#: ../../reference/datamodel.rst:2957 msgid "" "Must return an *awaitable* resulting in a next value of the iterator. " "Should raise a :exc:`StopAsyncIteration` error when the iteration is over." msgstr "" -#: ../../reference/datamodel.rst:2959 +#: ../../reference/datamodel.rst:2960 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:2976 +#: ../../reference/datamodel.rst:2977 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:2981 +#: ../../reference/datamodel.rst:2982 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " "asynchronous iterator object. Returning anything else will result in a :exc:" "`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:2989 +#: ../../reference/datamodel.rst:2990 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:2991 +#: ../../reference/datamodel.rst:2992 msgid "" "An *asynchronous context manager* is a *context manager* that is able to " "suspend execution in its ``__aenter__`` and ``__aexit__`` methods." msgstr "" -#: ../../reference/datamodel.rst:2994 +#: ../../reference/datamodel.rst:2995 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:2998 +#: ../../reference/datamodel.rst:2999 msgid "" "Semantically similar to :meth:`__enter__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3003 +#: ../../reference/datamodel.rst:3004 msgid "" "Semantically similar to :meth:`__exit__`, the only difference being that it " "must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3006 +#: ../../reference/datamodel.rst:3007 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3019 +#: ../../reference/datamodel.rst:3020 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:3020 +#: ../../reference/datamodel.rst:3021 msgid "" "It *is* possible in some cases to change an object's type, under certain " "controlled conditions. It generally isn't a good idea though, since it can " "lead to some very strange behaviour if it is handled incorrectly." msgstr "" -#: ../../reference/datamodel.rst:3024 +#: ../../reference/datamodel.rst:3025 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, and :meth:`~object.__contains__` methods have special " @@ -3433,7 +3433,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3030 +#: ../../reference/datamodel.rst:3031 msgid "" "\"Does not support\" here means that the class has no such method, or the " "method returns ``NotImplemented``. Do not set the method to ``None`` if you " @@ -3441,7 +3441,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3036 +#: ../../reference/datamodel.rst:3037 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`~object.__add__` -- fails then the overall " diff --git a/reference/expressions.po b/reference/expressions.po index 52dbbd541c..443f9bb2a4 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-08 14:58+0000\n" +"POT-Creation-Date: 2022-04-01 00:15+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-" @@ -612,17 +612,33 @@ msgid "" "expression that could receive the value." msgstr "" -#: ../../reference/expressions.rst:561 +#: ../../reference/expressions.rst:562 msgid "" -"Raises an exception of type ``type`` at the point where the generator was " -"paused, and returns the next value yielded by the generator function. If " -"the generator exits without yielding another value, a :exc:`StopIteration` " -"exception is raised. If the generator function does not catch the passed-in " -"exception, or raises a different exception, then that exception propagates " -"to the caller." +"Raises an exception at the point where the generator was paused, and returns " +"the next value yielded by the generator function. If the generator exits " +"without yielding another value, a :exc:`StopIteration` exception is raised. " +"If the generator function does not catch the passed-in exception, or raises " +"a different exception, then that exception propagates to the caller." msgstr "" -#: ../../reference/expressions.rst:572 +#: ../../reference/expressions.rst:568 +msgid "" +"In typical use, this is called with a single exception instance similar to " +"the way the :keyword:`raise` keyword is used." +msgstr "" + +#: ../../reference/expressions.rst:571 +msgid "" +"For backwards compatability, however, the second signature is supported, " +"following a convention from older versions of Python. The *type* argument " +"should be an exception class, and *value* should be an exception instance. " +"If the *value* is not provided, the *type* constructor is called to get an " +"instance. If *traceback* is provided, it is set on the exception, otherwise " +"any existing :attr:`~BaseException.__traceback__` attribute stored in " +"*value* may be cleared." +msgstr "" + +#: ../../reference/expressions.rst:585 msgid "" "Raises a :exc:`GeneratorExit` at the point where the generator function was " "paused. If the generator function then exits gracefully, is already closed, " @@ -633,34 +649,34 @@ msgid "" "has already exited due to an exception or normal exit." msgstr "" -#: ../../reference/expressions.rst:583 +#: ../../reference/expressions.rst:596 msgid "Examples" msgstr "模組" -#: ../../reference/expressions.rst:585 +#: ../../reference/expressions.rst:598 msgid "" "Here is a simple example that demonstrates the behavior of generators and " "generator functions::" msgstr "" -#: ../../reference/expressions.rst:612 +#: ../../reference/expressions.rst:625 msgid "" "For examples using ``yield from``, see :ref:`pep-380` in \"What's New in " "Python.\"" msgstr "" -#: ../../reference/expressions.rst:618 +#: ../../reference/expressions.rst:631 msgid "Asynchronous generator functions" msgstr "" -#: ../../reference/expressions.rst:620 +#: ../../reference/expressions.rst:633 msgid "" "The presence of a yield expression in a function or method defined using :" "keyword:`async def` further defines the function as an :term:`asynchronous " "generator` function." msgstr "" -#: ../../reference/expressions.rst:624 +#: ../../reference/expressions.rst:637 msgid "" "When an asynchronous generator function is called, it returns an " "asynchronous iterator known as an asynchronous generator object. That object " @@ -670,7 +686,7 @@ msgid "" "keyword:`for` statement." msgstr "" -#: ../../reference/expressions.rst:631 +#: ../../reference/expressions.rst:644 msgid "" "Calling one of the asynchronous generator's methods returns an :term:" "`awaitable` object, and the execution starts when this object is awaited on. " @@ -689,7 +705,7 @@ msgid "" "method." msgstr "" -#: ../../reference/expressions.rst:646 +#: ../../reference/expressions.rst:659 msgid "" "If an asynchronous generator happens to exit early by :keyword:`break`, the " "caller task being cancelled, or other exceptions, the generator's async " @@ -701,7 +717,7 @@ msgid "" "generator and ultimately detach it from the event loop." msgstr "" -#: ../../reference/expressions.rst:656 +#: ../../reference/expressions.rst:669 msgid "" "In an asynchronous generator function, yield expressions are allowed " "anywhere in a :keyword:`try` construct. However, if an asynchronous " @@ -715,7 +731,7 @@ msgid "" "finally` clauses to execute." msgstr "" -#: ../../reference/expressions.rst:667 +#: ../../reference/expressions.rst:680 msgid "" "To take care of finalization upon event loop termination, an event loop " "should define a *finalizer* function which takes an asynchronous generator-" @@ -728,23 +744,23 @@ msgid "" "asyncio/base_events.py`." msgstr "" -#: ../../reference/expressions.rst:676 +#: ../../reference/expressions.rst:689 msgid "" "The expression ``yield from `` is a syntax error when used in an " "asynchronous generator function." msgstr "" -#: ../../reference/expressions.rst:683 +#: ../../reference/expressions.rst:696 msgid "Asynchronous generator-iterator methods" msgstr "" -#: ../../reference/expressions.rst:685 +#: ../../reference/expressions.rst:698 msgid "" "This subsection describes the methods of an asynchronous generator iterator, " "which are used to control the execution of a generator function." msgstr "" -#: ../../reference/expressions.rst:693 +#: ../../reference/expressions.rst:706 msgid "" "Returns an awaitable which when run starts to execute the asynchronous " "generator or resumes it at the last executed yield expression. When an " @@ -759,12 +775,12 @@ msgid "" "has completed." msgstr "" -#: ../../reference/expressions.rst:705 +#: ../../reference/expressions.rst:718 msgid "" "This method is normally called implicitly by a :keyword:`async for` loop." msgstr "" -#: ../../reference/expressions.rst:710 +#: ../../reference/expressions.rst:723 msgid "" "Returns an awaitable which when run resumes the execution of the " "asynchronous generator. As with the :meth:`~generator.send()` method for a " @@ -779,7 +795,7 @@ msgid "" "receive the value." msgstr "" -#: ../../reference/expressions.rst:725 +#: ../../reference/expressions.rst:738 msgid "" "Returns an awaitable that raises an exception of type ``type`` at the point " "where the asynchronous generator was paused, and returns the next value " @@ -791,7 +807,7 @@ msgid "" "that exception propagates to the caller of the awaitable." msgstr "" -#: ../../reference/expressions.rst:740 +#: ../../reference/expressions.rst:753 msgid "" "Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " "the asynchronous generator function at the point where it was paused. If the " @@ -807,25 +823,25 @@ msgid "" "will return an awaitable that does nothing." msgstr "" -#: ../../reference/expressions.rst:756 +#: ../../reference/expressions.rst:769 msgid "Primaries" msgstr "" -#: ../../reference/expressions.rst:760 +#: ../../reference/expressions.rst:773 msgid "" "Primaries represent the most tightly bound operations of the language. Their " "syntax is:" msgstr "" -#: ../../reference/expressions.rst:770 +#: ../../reference/expressions.rst:783 msgid "Attribute references" msgstr "" -#: ../../reference/expressions.rst:776 +#: ../../reference/expressions.rst:789 msgid "An attribute reference is a primary followed by a period and a name:" msgstr "" -#: ../../reference/expressions.rst:786 +#: ../../reference/expressions.rst:799 msgid "" "The primary must evaluate to an object of a type that supports attribute " "references, which most objects do. This object is then asked to produce the " @@ -836,11 +852,11 @@ msgid "" "evaluations of the same attribute reference may yield different objects." msgstr "" -#: ../../reference/expressions.rst:798 +#: ../../reference/expressions.rst:811 msgid "Subscriptions" msgstr "" -#: ../../reference/expressions.rst:813 +#: ../../reference/expressions.rst:826 msgid "" "The subscription of an instance of a :ref:`container class ` " "will generally select an element from the container. The subscription of a :" @@ -848,13 +864,13 @@ msgid "" "`GenericAlias ` object." msgstr "" -#: ../../reference/expressions.rst:821 +#: ../../reference/expressions.rst:834 msgid "" "When an object is subscripted, the interpreter will evaluate the primary and " "the expression list." msgstr "" -#: ../../reference/expressions.rst:824 +#: ../../reference/expressions.rst:837 msgid "" "The primary must evaluate to an object that supports subscription. An object " "may support subscription through defining one or both of :meth:`~object." @@ -864,20 +880,20 @@ msgid "" "called instead of ``__getitem__``, see :ref:`classgetitem-versus-getitem`." msgstr "" -#: ../../reference/expressions.rst:831 +#: ../../reference/expressions.rst:844 msgid "" "If the expression list contains at least one comma, it will evaluate to a :" "class:`tuple` containing the items of the expression list. Otherwise, the " "expression list will evaluate to the value of the list's sole member." msgstr "" -#: ../../reference/expressions.rst:835 +#: ../../reference/expressions.rst:848 msgid "" "For built-in objects, there are two types of objects that support " "subscription via :meth:`~object.__getitem__`:" msgstr "" -#: ../../reference/expressions.rst:838 +#: ../../reference/expressions.rst:851 msgid "" "Mappings. If the primary is a :term:`mapping`, the expression list must " "evaluate to an object whose value is one of the keys of the mapping, and the " @@ -885,7 +901,7 @@ msgid "" "An example of a builtin mapping class is the :class:`dict` class." msgstr "" -#: ../../reference/expressions.rst:842 +#: ../../reference/expressions.rst:855 msgid "" "Sequences. If the primary is a :term:`sequence`, the expression list must " "evaluate to an :class:`int` or a :class:`slice` (as discussed in the " @@ -893,7 +909,7 @@ msgid "" "`str`, :class:`list` and :class:`tuple` classes." msgstr "" -#: ../../reference/expressions.rst:847 +#: ../../reference/expressions.rst:860 msgid "" "The formal syntax makes no special provision for negative indices in :term:" "`sequences `. However, built-in sequences all provide a :meth:" @@ -907,25 +923,25 @@ msgid "" "support." msgstr "" -#: ../../reference/expressions.rst:861 +#: ../../reference/expressions.rst:874 msgid "" "A :class:`string ` is a special kind of sequence whose items are " "*characters*. A character is not a separate data type but a string of " "exactly one character." msgstr "" -#: ../../reference/expressions.rst:869 +#: ../../reference/expressions.rst:882 msgid "Slicings" msgstr "" -#: ../../reference/expressions.rst:883 +#: ../../reference/expressions.rst:896 msgid "" "A slicing selects a range of items in a sequence object (e.g., a string, " "tuple or list). Slicings may be used as expressions or as targets in " "assignment or :keyword:`del` statements. The syntax for a slicing:" msgstr "" -#: ../../reference/expressions.rst:896 +#: ../../reference/expressions.rst:909 msgid "" "There is ambiguity in the formal syntax here: anything that looks like an " "expression list also looks like a slice list, so any subscription can be " @@ -935,7 +951,7 @@ msgid "" "the case if the slice list contains no proper slice)." msgstr "" -#: ../../reference/expressions.rst:908 +#: ../../reference/expressions.rst:921 msgid "" "The semantics for a slicing are as follows. The primary is indexed (using " "the same :meth:`__getitem__` method as normal subscription) with a key that " @@ -950,23 +966,23 @@ msgid "" "expressions." msgstr "" -#: ../../reference/expressions.rst:932 +#: ../../reference/expressions.rst:945 msgid "Calls" msgstr "" -#: ../../reference/expressions.rst:934 +#: ../../reference/expressions.rst:947 msgid "" "A call calls a callable object (e.g., a :term:`function`) with a possibly " "empty series of :term:`arguments `:" msgstr "" -#: ../../reference/expressions.rst:951 +#: ../../reference/expressions.rst:964 msgid "" "An optional trailing comma may be present after the positional and keyword " "arguments but does not affect the semantics." msgstr "" -#: ../../reference/expressions.rst:957 +#: ../../reference/expressions.rst:970 msgid "" "The primary must evaluate to a callable object (user-defined functions, " "built-in functions, methods of built-in objects, class objects, methods of " @@ -976,7 +992,7 @@ msgid "" "formal :term:`parameter` lists." msgstr "" -#: ../../reference/expressions.rst:965 +#: ../../reference/expressions.rst:978 msgid "" "If keyword arguments are present, they are first converted to positional " "arguments, as follows. First, a list of unfilled slots is created for the " @@ -998,7 +1014,7 @@ msgid "" "call." msgstr "" -#: ../../reference/expressions.rst:985 +#: ../../reference/expressions.rst:998 msgid "" "An implementation may provide built-in functions whose positional parameters " "do not have names, even if they are 'named' for the purpose of " @@ -1007,7 +1023,7 @@ msgid "" "`PyArg_ParseTuple` to parse their arguments." msgstr "" -#: ../../reference/expressions.rst:991 +#: ../../reference/expressions.rst:1004 msgid "" "If there are more positional arguments than there are formal parameter " "slots, a :exc:`TypeError` exception is raised, unless a formal parameter " @@ -1016,7 +1032,7 @@ msgid "" "empty tuple if there were no excess positional arguments)." msgstr "" -#: ../../reference/expressions.rst:997 +#: ../../reference/expressions.rst:1010 msgid "" "If any keyword argument does not correspond to a formal parameter name, a :" "exc:`TypeError` exception is raised, unless a formal parameter using the " @@ -1026,7 +1042,7 @@ msgid "" "(new) empty dictionary if there were no excess keyword arguments." msgstr "" -#: ../../reference/expressions.rst:1008 +#: ../../reference/expressions.rst:1021 msgid "" "If the syntax ``*expression`` appears in the function call, ``expression`` " "must evaluate to an :term:`iterable`. Elements from these iterables are " @@ -1036,20 +1052,20 @@ msgid "" "*y1*, ..., *yM*, *x3*, *x4*." msgstr "" -#: ../../reference/expressions.rst:1015 +#: ../../reference/expressions.rst:1028 msgid "" "A consequence of this is that although the ``*expression`` syntax may appear " "*after* explicit keyword arguments, it is processed *before* the keyword " "arguments (and any ``**expression`` arguments -- see below). So::" msgstr "" -#: ../../reference/expressions.rst:1031 +#: ../../reference/expressions.rst:1044 msgid "" "It is unusual for both keyword arguments and the ``*expression`` syntax to " "be used in the same call, so in practice this confusion does not arise." msgstr "" -#: ../../reference/expressions.rst:1037 +#: ../../reference/expressions.rst:1050 msgid "" "If the syntax ``**expression`` appears in the function call, ``expression`` " "must evaluate to a :term:`mapping`, the contents of which are treated as " @@ -1058,35 +1074,35 @@ msgid "" "exception is raised." msgstr "" -#: ../../reference/expressions.rst:1043 +#: ../../reference/expressions.rst:1056 msgid "" "Formal parameters using the syntax ``*identifier`` or ``**identifier`` " "cannot be used as positional argument slots or as keyword argument names." msgstr "" -#: ../../reference/expressions.rst:1046 +#: ../../reference/expressions.rst:1059 msgid "" "Function calls accept any number of ``*`` and ``**`` unpackings, positional " "arguments may follow iterable unpackings (``*``), and keyword arguments may " "follow dictionary unpackings (``**``). Originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1052 +#: ../../reference/expressions.rst:1065 msgid "" "A call always returns some value, possibly ``None``, unless it raises an " "exception. How this value is computed depends on the type of the callable " "object." msgstr "" -#: ../../reference/expressions.rst:1056 +#: ../../reference/expressions.rst:1069 msgid "If it is---" msgstr "" -#: ../../reference/expressions.rst:1069 +#: ../../reference/expressions.rst:1082 msgid "a user-defined function:" msgstr "" -#: ../../reference/expressions.rst:1065 +#: ../../reference/expressions.rst:1078 msgid "" "The code block for the function is executed, passing it the argument list. " "The first thing the code block will do is bind the formal parameters to the " @@ -1095,73 +1111,73 @@ msgid "" "value of the function call." msgstr "" -#: ../../reference/expressions.rst:1083 +#: ../../reference/expressions.rst:1096 msgid "a built-in function or method:" msgstr "" -#: ../../reference/expressions.rst:1082 +#: ../../reference/expressions.rst:1095 msgid "" "The result is up to the interpreter; see :ref:`built-in-funcs` for the " "descriptions of built-in functions and methods." msgstr "" -#: ../../reference/expressions.rst:1090 +#: ../../reference/expressions.rst:1103 msgid "a class object:" msgstr "" -#: ../../reference/expressions.rst:1090 +#: ../../reference/expressions.rst:1103 msgid "A new instance of that class is returned." msgstr "" -#: ../../reference/expressions.rst:1100 +#: ../../reference/expressions.rst:1113 msgid "a class instance method:" msgstr "" -#: ../../reference/expressions.rst:1098 +#: ../../reference/expressions.rst:1111 msgid "" "The corresponding user-defined function is called, with an argument list " "that is one longer than the argument list of the call: the instance becomes " "the first argument." msgstr "" -#: ../../reference/expressions.rst:1109 +#: ../../reference/expressions.rst:1122 msgid "a class instance:" msgstr "" -#: ../../reference/expressions.rst:1107 +#: ../../reference/expressions.rst:1120 msgid "" "The class must define a :meth:`__call__` method; the effect is then the same " "as if that method was called." msgstr "" -#: ../../reference/expressions.rst:1115 ../../reference/expressions.rst:1881 +#: ../../reference/expressions.rst:1128 ../../reference/expressions.rst:1894 msgid "Await expression" msgstr "" -#: ../../reference/expressions.rst:1117 +#: ../../reference/expressions.rst:1130 msgid "" "Suspend the execution of :term:`coroutine` on an :term:`awaitable` object. " "Can only be used inside a :term:`coroutine function`." msgstr "" -#: ../../reference/expressions.rst:1129 +#: ../../reference/expressions.rst:1142 msgid "The power operator" msgstr "" -#: ../../reference/expressions.rst:1135 +#: ../../reference/expressions.rst:1148 msgid "" "The power operator binds more tightly than unary operators on its left; it " "binds less tightly than unary operators on its right. The syntax is:" msgstr "" -#: ../../reference/expressions.rst:1141 +#: ../../reference/expressions.rst:1154 msgid "" "Thus, in an unparenthesized sequence of power and unary operators, the " "operators are evaluated from right to left (this does not constrain the " "evaluation order for the operands): ``-1**2`` results in ``-1``." msgstr "" -#: ../../reference/expressions.rst:1145 +#: ../../reference/expressions.rst:1158 msgid "" "The power operator has the same semantics as the built-in :func:`pow` " "function, when called with two arguments: it yields its left argument raised " @@ -1169,7 +1185,7 @@ msgid "" "converted to a common type, and the result is of that type." msgstr "" -#: ../../reference/expressions.rst:1150 +#: ../../reference/expressions.rst:1163 msgid "" "For int operands, the result has the same type as the operands unless the " "second argument is negative; in that case, all arguments are converted to " @@ -1177,40 +1193,40 @@ msgid "" "``100``, but ``10**-2`` returns ``0.01``." msgstr "" -#: ../../reference/expressions.rst:1155 +#: ../../reference/expressions.rst:1168 msgid "" "Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`. " "Raising a negative number to a fractional power results in a :class:" "`complex` number. (In earlier versions it raised a :exc:`ValueError`.)" msgstr "" -#: ../../reference/expressions.rst:1159 +#: ../../reference/expressions.rst:1172 msgid "" "This operation can be customized using the special :meth:`__pow__` method." msgstr "" -#: ../../reference/expressions.rst:1164 +#: ../../reference/expressions.rst:1177 msgid "Unary arithmetic and bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1170 +#: ../../reference/expressions.rst:1183 msgid "All unary arithmetic and bitwise operations have the same priority:" msgstr "" -#: ../../reference/expressions.rst:1181 +#: ../../reference/expressions.rst:1194 msgid "" "The unary ``-`` (minus) operator yields the negation of its numeric " "argument; the operation can be overridden with the :meth:`__neg__` special " "method." msgstr "" -#: ../../reference/expressions.rst:1189 +#: ../../reference/expressions.rst:1202 msgid "" "The unary ``+`` (plus) operator yields its numeric argument unchanged; the " "operation can be overridden with the :meth:`__pos__` special method." msgstr "" -#: ../../reference/expressions.rst:1196 +#: ../../reference/expressions.rst:1209 msgid "" "The unary ``~`` (invert) operator yields the bitwise inversion of its " "integer argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. " @@ -1218,17 +1234,17 @@ msgid "" "meth:`__invert__` special method." msgstr "" -#: ../../reference/expressions.rst:1205 +#: ../../reference/expressions.rst:1218 msgid "" "In all three cases, if the argument does not have the proper type, a :exc:" "`TypeError` exception is raised." msgstr "" -#: ../../reference/expressions.rst:1212 +#: ../../reference/expressions.rst:1225 msgid "Binary arithmetic operations" msgstr "" -#: ../../reference/expressions.rst:1216 +#: ../../reference/expressions.rst:1229 msgid "" "The binary arithmetic operations have the conventional priority levels. " "Note that some of these operations also apply to certain non-numeric types. " @@ -1236,7 +1252,7 @@ msgid "" "multiplicative operators and one for additive operators:" msgstr "" -#: ../../reference/expressions.rst:1231 +#: ../../reference/expressions.rst:1244 msgid "" "The ``*`` (multiplication) operator yields the product of its arguments. " "The arguments must either both be numbers, or one argument must be an " @@ -1246,19 +1262,19 @@ msgid "" "an empty sequence." msgstr "" -#: ../../reference/expressions.rst:1237 +#: ../../reference/expressions.rst:1250 msgid "" "This operation can be customized using the special :meth:`__mul__` and :meth:" "`__rmul__` methods." msgstr "" -#: ../../reference/expressions.rst:1244 +#: ../../reference/expressions.rst:1257 msgid "" "The ``@`` (at) operator is intended to be used for matrix multiplication. " "No builtin Python types implement this operator." msgstr "" -#: ../../reference/expressions.rst:1255 +#: ../../reference/expressions.rst:1268 msgid "" "The ``/`` (division) and ``//`` (floor division) operators yield the " "quotient of their arguments. The numeric arguments are first converted to a " @@ -1268,13 +1284,13 @@ msgid "" "the :exc:`ZeroDivisionError` exception." msgstr "" -#: ../../reference/expressions.rst:1262 +#: ../../reference/expressions.rst:1275 msgid "" "This operation can be customized using the special :meth:`__truediv__` and :" "meth:`__floordiv__` methods." msgstr "" -#: ../../reference/expressions.rst:1269 +#: ../../reference/expressions.rst:1282 msgid "" "The ``%`` (modulo) operator yields the remainder from the division of the " "first argument by the second. The numeric arguments are first converted to " @@ -1286,7 +1302,7 @@ msgid "" "absolute value of the second operand [#]_." msgstr "" -#: ../../reference/expressions.rst:1278 +#: ../../reference/expressions.rst:1291 msgid "" "The floor division and modulo operators are connected by the following " "identity: ``x == (x//y)*y + (x%y)``. Floor division and modulo are also " @@ -1294,7 +1310,7 @@ msgid "" "y, x%y)``. [#]_." msgstr "" -#: ../../reference/expressions.rst:1283 +#: ../../reference/expressions.rst:1296 msgid "" "In addition to performing the modulo operation on numbers, the ``%`` " "operator is also overloaded by string objects to perform old-style string " @@ -1303,20 +1319,20 @@ msgid "" "formatting`." msgstr "" -#: ../../reference/expressions.rst:1288 +#: ../../reference/expressions.rst:1301 msgid "" "The *modulo* operation can be customized using the special :meth:`__mod__` " "method." msgstr "" -#: ../../reference/expressions.rst:1290 +#: ../../reference/expressions.rst:1303 msgid "" "The floor division operator, the modulo operator, and the :func:`divmod` " "function are not defined for complex numbers. Instead, convert to a " "floating point number using the :func:`abs` function if appropriate." msgstr "" -#: ../../reference/expressions.rst:1299 +#: ../../reference/expressions.rst:1312 msgid "" "The ``+`` (addition) operator yields the sum of its arguments. The " "arguments must either both be numbers or both be sequences of the same " @@ -1324,84 +1340,84 @@ msgid "" "then added together. In the latter case, the sequences are concatenated." msgstr "" -#: ../../reference/expressions.rst:1304 +#: ../../reference/expressions.rst:1317 msgid "" "This operation can be customized using the special :meth:`__add__` and :meth:" "`__radd__` methods." msgstr "" -#: ../../reference/expressions.rst:1312 +#: ../../reference/expressions.rst:1325 msgid "" "The ``-`` (subtraction) operator yields the difference of its arguments. " "The numeric arguments are first converted to a common type." msgstr "" -#: ../../reference/expressions.rst:1315 +#: ../../reference/expressions.rst:1328 msgid "" "This operation can be customized using the special :meth:`__sub__` method." msgstr "" -#: ../../reference/expressions.rst:1321 +#: ../../reference/expressions.rst:1334 msgid "Shifting operations" msgstr "" -#: ../../reference/expressions.rst:1328 +#: ../../reference/expressions.rst:1341 msgid "" "The shifting operations have lower priority than the arithmetic operations:" msgstr "" -#: ../../reference/expressions.rst:1333 +#: ../../reference/expressions.rst:1346 msgid "" "These operators accept integers as arguments. They shift the first argument " "to the left or right by the number of bits given by the second argument." msgstr "" -#: ../../reference/expressions.rst:1336 +#: ../../reference/expressions.rst:1349 msgid "" "This operation can be customized using the special :meth:`__lshift__` and :" "meth:`__rshift__` methods." msgstr "" -#: ../../reference/expressions.rst:1341 +#: ../../reference/expressions.rst:1354 msgid "" "A right shift by *n* bits is defined as floor division by ``pow(2,n)``. A " "left shift by *n* bits is defined as multiplication with ``pow(2,n)``." msgstr "" -#: ../../reference/expressions.rst:1348 +#: ../../reference/expressions.rst:1361 msgid "Binary bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1352 +#: ../../reference/expressions.rst:1365 msgid "Each of the three bitwise operations has a different priority level:" msgstr "" -#: ../../reference/expressions.rst:1363 +#: ../../reference/expressions.rst:1376 msgid "" "The ``&`` operator yields the bitwise AND of its arguments, which must be " "integers or one of them must be a custom object overriding :meth:`__and__` " "or :meth:`__rand__` special methods." msgstr "" -#: ../../reference/expressions.rst:1372 +#: ../../reference/expressions.rst:1385 msgid "" "The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, " "which must be integers or one of them must be a custom object overriding :" "meth:`__xor__` or :meth:`__rxor__` special methods." msgstr "" -#: ../../reference/expressions.rst:1381 +#: ../../reference/expressions.rst:1394 msgid "" "The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which " "must be integers or one of them must be a custom object overriding :meth:" "`__or__` or :meth:`__ror__` special methods." msgstr "" -#: ../../reference/expressions.rst:1389 +#: ../../reference/expressions.rst:1402 msgid "Comparisons" msgstr "" -#: ../../reference/expressions.rst:1401 +#: ../../reference/expressions.rst:1414 msgid "" "Unlike C, all comparison operations in Python have the same priority, which " "is lower than that of any arithmetic, shifting or bitwise operation. Also " @@ -1409,14 +1425,14 @@ msgid "" "conventional in mathematics:" msgstr "" -#: ../../reference/expressions.rst:1411 +#: ../../reference/expressions.rst:1424 msgid "" "Comparisons yield boolean values: ``True`` or ``False``. Custom :dfn:`rich " "comparison methods` may return non-boolean values. In this case Python will " "call :func:`bool` on such value in boolean contexts." msgstr "" -#: ../../reference/expressions.rst:1417 +#: ../../reference/expressions.rst:1430 msgid "" "Comparisons can be chained arbitrarily, e.g., ``x < y <= z`` is equivalent " "to ``x < y and y <= z``, except that ``y`` is evaluated only once (but in " @@ -1424,7 +1440,7 @@ msgid "" "false)." msgstr "" -#: ../../reference/expressions.rst:1421 +#: ../../reference/expressions.rst:1434 msgid "" "Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*, " "*op2*, ..., *opN* are comparison operators, then ``a op1 b op2 c ... y opN " @@ -1432,24 +1448,24 @@ msgid "" "each expression is evaluated at most once." msgstr "" -#: ../../reference/expressions.rst:1426 +#: ../../reference/expressions.rst:1439 msgid "" "Note that ``a op1 b op2 c`` doesn't imply any kind of comparison between *a* " "and *c*, so that, e.g., ``x < y > z`` is perfectly legal (though perhaps not " "pretty)." msgstr "" -#: ../../reference/expressions.rst:1431 +#: ../../reference/expressions.rst:1444 msgid "Value comparisons" msgstr "" -#: ../../reference/expressions.rst:1433 +#: ../../reference/expressions.rst:1446 msgid "" "The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the " "values of two objects. The objects do not need to have the same type." msgstr "" -#: ../../reference/expressions.rst:1436 +#: ../../reference/expressions.rst:1449 msgid "" "Chapter :ref:`objects` states that objects have a value (in addition to type " "and identity). The value of an object is a rather abstract notion in " @@ -1461,7 +1477,7 @@ msgid "" "indirectly, by means of their comparison implementation." msgstr "" -#: ../../reference/expressions.rst:1445 +#: ../../reference/expressions.rst:1458 msgid "" "Because all types are (direct or indirect) subtypes of :class:`object`, they " "inherit the default comparison behavior from :class:`object`. Types can " @@ -1469,7 +1485,7 @@ msgid "" "methods` like :meth:`__lt__`, described in :ref:`customization`." msgstr "" -#: ../../reference/expressions.rst:1451 +#: ../../reference/expressions.rst:1464 msgid "" "The default behavior for equality comparison (``==`` and ``!=``) is based on " "the identity of the objects. Hence, equality comparison of instances with " @@ -1479,14 +1495,14 @@ msgid "" "``x is y`` implies ``x == y``)." msgstr "" -#: ../../reference/expressions.rst:1458 +#: ../../reference/expressions.rst:1471 msgid "" "A default order comparison (``<``, ``>``, ``<=``, and ``>=``) is not " "provided; an attempt raises :exc:`TypeError`. A motivation for this default " "behavior is the lack of a similar invariant as for equality." msgstr "" -#: ../../reference/expressions.rst:1462 +#: ../../reference/expressions.rst:1475 msgid "" "The behavior of the default equality comparison, that instances with " "different identities are always unequal, may be in contrast to what types " @@ -1495,13 +1511,13 @@ msgid "" "in fact, a number of built-in types have done that." msgstr "" -#: ../../reference/expressions.rst:1468 +#: ../../reference/expressions.rst:1481 msgid "" "The following list describes the comparison behavior of the most important " "built-in types." msgstr "" -#: ../../reference/expressions.rst:1471 +#: ../../reference/expressions.rst:1484 msgid "" "Numbers of built-in numeric types (:ref:`typesnumeric`) and of the standard " "library types :class:`fractions.Fraction` and :class:`decimal.Decimal` can " @@ -1511,7 +1527,7 @@ msgid "" "of precision." msgstr "" -#: ../../reference/expressions.rst:1478 +#: ../../reference/expressions.rst:1491 msgid "" "The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are " "special. Any ordered comparison of a number to a not-a-number value is " @@ -1521,32 +1537,32 @@ msgid "" "is compliant with IEEE 754." msgstr "" -#: ../../reference/expressions.rst:1485 +#: ../../reference/expressions.rst:1498 msgid "" "``None`` and ``NotImplemented`` are singletons. :PEP:`8` advises that " "comparisons for singletons should always be done with ``is`` or ``is not``, " "never the equality operators." msgstr "" -#: ../../reference/expressions.rst:1489 +#: ../../reference/expressions.rst:1502 msgid "" "Binary sequences (instances of :class:`bytes` or :class:`bytearray`) can be " "compared within and across their types. They compare lexicographically " "using the numeric values of their elements." msgstr "" -#: ../../reference/expressions.rst:1493 +#: ../../reference/expressions.rst:1506 msgid "" "Strings (instances of :class:`str`) compare lexicographically using the " "numerical Unicode code points (the result of the built-in function :func:" "`ord`) of their characters. [#]_" msgstr "" -#: ../../reference/expressions.rst:1497 +#: ../../reference/expressions.rst:1510 msgid "Strings and binary sequences cannot be directly compared." msgstr "" -#: ../../reference/expressions.rst:1499 +#: ../../reference/expressions.rst:1512 msgid "" "Sequences (instances of :class:`tuple`, :class:`list`, or :class:`range`) " "can be compared only within each of their types, with the restriction that " @@ -1555,7 +1571,7 @@ msgid "" "raises :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1505 +#: ../../reference/expressions.rst:1518 msgid "" "Sequences compare lexicographically using comparison of corresponding " "elements. The built-in containers typically assume identical objects are " @@ -1563,19 +1579,19 @@ msgid "" "objects to improve performance and to maintain their internal invariants." msgstr "" -#: ../../reference/expressions.rst:1510 +#: ../../reference/expressions.rst:1523 msgid "" "Lexicographical comparison between built-in collections works as follows:" msgstr "" -#: ../../reference/expressions.rst:1512 +#: ../../reference/expressions.rst:1525 msgid "" "For two collections to compare equal, they must be of the same type, have " "the same length, and each pair of corresponding elements must compare equal " "(for example, ``[1,2] == (1,2)`` is false because the type is not the same)." msgstr "" -#: ../../reference/expressions.rst:1517 +#: ../../reference/expressions.rst:1530 msgid "" "Collections that support order comparison are ordered the same as their " "first unequal elements (for example, ``[1,2,x] <= [1,2,y]`` has the same " @@ -1584,25 +1600,25 @@ msgid "" "true)." msgstr "" -#: ../../reference/expressions.rst:1523 +#: ../../reference/expressions.rst:1536 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " "equal `(key, value)` pairs. Equality comparison of the keys and values " "enforces reflexivity." msgstr "" -#: ../../reference/expressions.rst:1527 +#: ../../reference/expressions.rst:1540 msgid "" "Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1529 +#: ../../reference/expressions.rst:1542 msgid "" "Sets (instances of :class:`set` or :class:`frozenset`) can be compared " "within and across their types." msgstr "" -#: ../../reference/expressions.rst:1532 +#: ../../reference/expressions.rst:1545 msgid "" "They define order comparison operators to mean subset and superset tests. " "Those relations do not define total orderings (for example, the two sets " @@ -1613,110 +1629,110 @@ msgid "" "sets as inputs)." msgstr "" -#: ../../reference/expressions.rst:1540 +#: ../../reference/expressions.rst:1553 msgid "Comparison of sets enforces reflexivity of its elements." msgstr "" -#: ../../reference/expressions.rst:1542 +#: ../../reference/expressions.rst:1555 msgid "" "Most other built-in types have no comparison methods implemented, so they " "inherit the default comparison behavior." msgstr "" -#: ../../reference/expressions.rst:1545 +#: ../../reference/expressions.rst:1558 msgid "" "User-defined classes that customize their comparison behavior should follow " "some consistency rules, if possible:" msgstr "" -#: ../../reference/expressions.rst:1548 +#: ../../reference/expressions.rst:1561 msgid "" "Equality comparison should be reflexive. In other words, identical objects " "should compare equal:" msgstr "" -#: ../../reference/expressions.rst:1551 +#: ../../reference/expressions.rst:1564 msgid "``x is y`` implies ``x == y``" msgstr "" -#: ../../reference/expressions.rst:1553 +#: ../../reference/expressions.rst:1566 msgid "" "Comparison should be symmetric. In other words, the following expressions " "should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1556 +#: ../../reference/expressions.rst:1569 msgid "``x == y`` and ``y == x``" msgstr "``x == y`` 和 ``y == x``" -#: ../../reference/expressions.rst:1558 +#: ../../reference/expressions.rst:1571 msgid "``x != y`` and ``y != x``" msgstr "``x != y`` 和 ``y != x``" -#: ../../reference/expressions.rst:1560 +#: ../../reference/expressions.rst:1573 msgid "``x < y`` and ``y > x``" msgstr "``x < y`` 和 ``y > x``" -#: ../../reference/expressions.rst:1562 +#: ../../reference/expressions.rst:1575 msgid "``x <= y`` and ``y >= x``" msgstr "``x <= y`` 和 ``y >= x``" -#: ../../reference/expressions.rst:1564 +#: ../../reference/expressions.rst:1577 msgid "" "Comparison should be transitive. The following (non-exhaustive) examples " "illustrate that:" msgstr "" -#: ../../reference/expressions.rst:1567 +#: ../../reference/expressions.rst:1580 msgid "``x > y and y > z`` implies ``x > z``" msgstr "" -#: ../../reference/expressions.rst:1569 +#: ../../reference/expressions.rst:1582 msgid "``x < y and y <= z`` implies ``x < z``" msgstr "" -#: ../../reference/expressions.rst:1571 +#: ../../reference/expressions.rst:1584 msgid "" "Inverse comparison should result in the boolean negation. In other words, " "the following expressions should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1574 +#: ../../reference/expressions.rst:1587 msgid "``x == y`` and ``not x != y``" msgstr "``x == y`` 和 ``not x != y``" -#: ../../reference/expressions.rst:1576 +#: ../../reference/expressions.rst:1589 msgid "``x < y`` and ``not x >= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1578 +#: ../../reference/expressions.rst:1591 msgid "``x > y`` and ``not x <= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1580 +#: ../../reference/expressions.rst:1593 msgid "" "The last two expressions apply to totally ordered collections (e.g. to " "sequences, but not to sets or mappings). See also the :func:`~functools." "total_ordering` decorator." msgstr "" -#: ../../reference/expressions.rst:1584 +#: ../../reference/expressions.rst:1597 msgid "" "The :func:`hash` result should be consistent with equality. Objects that are " "equal should either have the same hash value, or be marked as unhashable." msgstr "" -#: ../../reference/expressions.rst:1588 +#: ../../reference/expressions.rst:1601 msgid "" "Python does not enforce these consistency rules. In fact, the not-a-number " "values are an example for not following these rules." msgstr "" -#: ../../reference/expressions.rst:1597 +#: ../../reference/expressions.rst:1610 msgid "Membership test operations" msgstr "" -#: ../../reference/expressions.rst:1599 +#: ../../reference/expressions.rst:1612 msgid "" "The operators :keyword:`in` and :keyword:`not in` test for membership. ``x " "in s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` " @@ -1727,7 +1743,7 @@ msgid "" "expression ``x in y`` is equivalent to ``any(x is e or x == e for e in y)``." msgstr "" -#: ../../reference/expressions.rst:1607 +#: ../../reference/expressions.rst:1620 msgid "" "For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is " "a substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty " @@ -1735,14 +1751,14 @@ msgid "" "\"\" in \"abc\"`` will return ``True``." msgstr "" -#: ../../reference/expressions.rst:1612 +#: ../../reference/expressions.rst:1625 msgid "" "For user-defined classes which define the :meth:`__contains__` method, ``x " "in y`` returns ``True`` if ``y.__contains__(x)`` returns a true value, and " "``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1616 +#: ../../reference/expressions.rst:1629 msgid "" "For user-defined classes which do not define :meth:`__contains__` but do " "define :meth:`__iter__`, ``x in y`` is ``True`` if some value ``z``, for " @@ -1751,7 +1767,7 @@ msgid "" "as if :keyword:`in` raised that exception." msgstr "" -#: ../../reference/expressions.rst:1622 +#: ../../reference/expressions.rst:1635 msgid "" "Lastly, the old-style iteration protocol is tried: if a class defines :meth:" "`__getitem__`, ``x in y`` is ``True`` if and only if there is a non-negative " @@ -1760,17 +1776,17 @@ msgid "" "raised, it is as if :keyword:`in` raised that exception)." msgstr "" -#: ../../reference/expressions.rst:1634 +#: ../../reference/expressions.rst:1647 msgid "" "The operator :keyword:`not in` is defined to have the inverse truth value " "of :keyword:`in`." msgstr "" -#: ../../reference/expressions.rst:1647 +#: ../../reference/expressions.rst:1660 msgid "Identity comparisons" msgstr "" -#: ../../reference/expressions.rst:1649 +#: ../../reference/expressions.rst:1662 msgid "" "The operators :keyword:`is` and :keyword:`is not` test for an object's " "identity: ``x is y`` is true if and only if *x* and *y* are the same " @@ -1778,11 +1794,11 @@ msgid "" "``x is not y`` yields the inverse truth value. [#]_" msgstr "" -#: ../../reference/expressions.rst:1661 +#: ../../reference/expressions.rst:1674 msgid "Boolean operations" msgstr "" -#: ../../reference/expressions.rst:1672 +#: ../../reference/expressions.rst:1685 msgid "" "In the context of Boolean operations, and also when expressions are used by " "control flow statements, the following values are interpreted as false: " @@ -1793,25 +1809,25 @@ msgid "" "method." msgstr "" -#: ../../reference/expressions.rst:1681 +#: ../../reference/expressions.rst:1694 msgid "" "The operator :keyword:`not` yields ``True`` if its argument is false, " "``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1686 +#: ../../reference/expressions.rst:1699 msgid "" "The expression ``x and y`` first evaluates *x*; if *x* is false, its value " "is returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1691 +#: ../../reference/expressions.rst:1704 msgid "" "The expression ``x or y`` first evaluates *x*; if *x* is true, its value is " "returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1694 +#: ../../reference/expressions.rst:1707 msgid "" "Note that neither :keyword:`and` nor :keyword:`or` restrict the value and " "type they return to ``False`` and ``True``, but rather return the last " @@ -1822,11 +1838,11 @@ msgid "" "argument (for example, ``not 'foo'`` produces ``False`` rather than ``''``.)" msgstr "" -#: ../../reference/expressions.rst:1704 +#: ../../reference/expressions.rst:1717 msgid "Assignment expressions" msgstr "" -#: ../../reference/expressions.rst:1709 +#: ../../reference/expressions.rst:1722 msgid "" "An assignment expression (sometimes also called a \"named expression\" or " "\"walrus\") assigns an :token:`~python-grammar:expression` to an :token:" @@ -1834,44 +1850,44 @@ msgid "" "`~python-grammar:expression`." msgstr "" -#: ../../reference/expressions.rst:1714 +#: ../../reference/expressions.rst:1727 msgid "One common use case is when handling matched regular expressions:" msgstr "" -#: ../../reference/expressions.rst:1721 +#: ../../reference/expressions.rst:1734 msgid "Or, when processing a file stream in chunks:" msgstr "" -#: ../../reference/expressions.rst:1728 +#: ../../reference/expressions.rst:1741 msgid "See :pep:`572` for more details about assignment expressions." msgstr "" -#: ../../reference/expressions.rst:1735 +#: ../../reference/expressions.rst:1748 msgid "Conditional expressions" msgstr "" -#: ../../reference/expressions.rst:1747 +#: ../../reference/expressions.rst:1760 msgid "" "Conditional expressions (sometimes called a \"ternary operator\") have the " "lowest priority of all Python operations." msgstr "" -#: ../../reference/expressions.rst:1750 +#: ../../reference/expressions.rst:1763 msgid "" "The expression ``x if C else y`` first evaluates the condition, *C* rather " "than *x*. If *C* is true, *x* is evaluated and its value is returned; " "otherwise, *y* is evaluated and its value is returned." msgstr "" -#: ../../reference/expressions.rst:1754 +#: ../../reference/expressions.rst:1767 msgid "See :pep:`308` for more details about conditional expressions." msgstr "" -#: ../../reference/expressions.rst:1761 +#: ../../reference/expressions.rst:1774 msgid "Lambdas" msgstr "" -#: ../../reference/expressions.rst:1772 +#: ../../reference/expressions.rst:1785 msgid "" "Lambda expressions (sometimes called lambda forms) are used to create " "anonymous functions. The expression ``lambda parameters: expression`` yields " @@ -1879,25 +1895,25 @@ msgid "" "defined with:" msgstr "" -#: ../../reference/expressions.rst:1781 +#: ../../reference/expressions.rst:1794 msgid "" "See section :ref:`function` for the syntax of parameter lists. Note that " "functions created with lambda expressions cannot contain statements or " "annotations." msgstr "" -#: ../../reference/expressions.rst:1789 +#: ../../reference/expressions.rst:1802 msgid "Expression lists" msgstr "" -#: ../../reference/expressions.rst:1803 +#: ../../reference/expressions.rst:1816 msgid "" "Except when part of a list or set display, an expression list containing at " "least one comma yields a tuple. The length of the tuple is the number of " "expressions in the list. The expressions are evaluated from left to right." msgstr "" -#: ../../reference/expressions.rst:1812 +#: ../../reference/expressions.rst:1825 msgid "" "An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be " "an :term:`iterable`. The iterable is expanded into a sequence of items, " @@ -1905,12 +1921,12 @@ msgid "" "unpacking." msgstr "" -#: ../../reference/expressions.rst:1817 +#: ../../reference/expressions.rst:1830 msgid "" "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1822 +#: ../../reference/expressions.rst:1835 msgid "" "The trailing comma is required only to create a single tuple (a.k.a. a " "*singleton*); it is optional in all other cases. A single expression " @@ -1919,28 +1935,28 @@ msgid "" "parentheses: ``()``.)" msgstr "" -#: ../../reference/expressions.rst:1832 +#: ../../reference/expressions.rst:1845 msgid "Evaluation order" msgstr "" -#: ../../reference/expressions.rst:1836 +#: ../../reference/expressions.rst:1849 msgid "" "Python evaluates expressions from left to right. Notice that while " "evaluating an assignment, the right-hand side is evaluated before the left-" "hand side." msgstr "" -#: ../../reference/expressions.rst:1839 +#: ../../reference/expressions.rst:1852 msgid "" "In the following lines, expressions will be evaluated in the arithmetic " "order of their suffixes::" msgstr "" -#: ../../reference/expressions.rst:1853 +#: ../../reference/expressions.rst:1866 msgid "Operator precedence" msgstr "" -#: ../../reference/expressions.rst:1858 +#: ../../reference/expressions.rst:1871 msgid "" "The following table summarizes the operator precedence in Python, from " "highest precedence (most binding) to lowest precedence (least binding). " @@ -1949,176 +1965,176 @@ msgid "" "left to right (except for exponentiation, which groups from right to left)." msgstr "" -#: ../../reference/expressions.rst:1864 +#: ../../reference/expressions.rst:1877 msgid "" "Note that comparisons, membership tests, and identity tests, all have the " "same precedence and have a left-to-right chaining feature as described in " "the :ref:`comparisons` section." msgstr "" -#: ../../reference/expressions.rst:1870 +#: ../../reference/expressions.rst:1883 msgid "Operator" msgstr "" -#: ../../reference/expressions.rst:1870 +#: ../../reference/expressions.rst:1883 msgid "Description" msgstr "描述" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1885 msgid "``(expressions...)``," msgstr "``(expressions...)``," -#: ../../reference/expressions.rst:1874 +#: ../../reference/expressions.rst:1887 msgid "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" msgstr "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1885 msgid "" "Binding or parenthesized expression, list display, dictionary display, set " "display" msgstr "" -#: ../../reference/expressions.rst:1878 +#: ../../reference/expressions.rst:1891 msgid "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" msgstr "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" -#: ../../reference/expressions.rst:1878 +#: ../../reference/expressions.rst:1891 msgid "Subscription, slicing, call, attribute reference" msgstr "" -#: ../../reference/expressions.rst:1881 +#: ../../reference/expressions.rst:1894 msgid ":keyword:`await` ``x``" msgstr ":keyword:`await` ``x``" -#: ../../reference/expressions.rst:1883 +#: ../../reference/expressions.rst:1896 msgid "``**``" msgstr "``**``" -#: ../../reference/expressions.rst:1883 +#: ../../reference/expressions.rst:1896 msgid "Exponentiation [#]_" msgstr "" -#: ../../reference/expressions.rst:1885 +#: ../../reference/expressions.rst:1898 msgid "``+x``, ``-x``, ``~x``" msgstr "``+x``, ``-x``, ``~x``" -#: ../../reference/expressions.rst:1885 +#: ../../reference/expressions.rst:1898 msgid "Positive, negative, bitwise NOT" msgstr "" -#: ../../reference/expressions.rst:1887 +#: ../../reference/expressions.rst:1900 msgid "``*``, ``@``, ``/``, ``//``, ``%``" msgstr "``*``, ``@``, ``/``, ``//``, ``%``" -#: ../../reference/expressions.rst:1887 +#: ../../reference/expressions.rst:1900 msgid "" "Multiplication, matrix multiplication, division, floor division, remainder " "[#]_" msgstr "" -#: ../../reference/expressions.rst:1891 +#: ../../reference/expressions.rst:1904 msgid "``+``, ``-``" msgstr "``+``, ``-``" -#: ../../reference/expressions.rst:1891 +#: ../../reference/expressions.rst:1904 msgid "Addition and subtraction" msgstr "" -#: ../../reference/expressions.rst:1893 +#: ../../reference/expressions.rst:1906 msgid "``<<``, ``>>``" msgstr "``<<``, ``>>``" -#: ../../reference/expressions.rst:1893 +#: ../../reference/expressions.rst:1906 msgid "Shifts" msgstr "" -#: ../../reference/expressions.rst:1895 +#: ../../reference/expressions.rst:1908 msgid "``&``" msgstr "``&``" -#: ../../reference/expressions.rst:1895 +#: ../../reference/expressions.rst:1908 msgid "Bitwise AND" msgstr "" -#: ../../reference/expressions.rst:1897 +#: ../../reference/expressions.rst:1910 msgid "``^``" msgstr "``^``" -#: ../../reference/expressions.rst:1897 +#: ../../reference/expressions.rst:1910 msgid "Bitwise XOR" msgstr "" -#: ../../reference/expressions.rst:1899 +#: ../../reference/expressions.rst:1912 msgid "``|``" msgstr "``|``" -#: ../../reference/expressions.rst:1899 +#: ../../reference/expressions.rst:1912 msgid "Bitwise OR" msgstr "" -#: ../../reference/expressions.rst:1901 +#: ../../reference/expressions.rst:1914 msgid "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" msgstr "" -#: ../../reference/expressions.rst:1901 +#: ../../reference/expressions.rst:1914 msgid "Comparisons, including membership tests and identity tests" msgstr "" -#: ../../reference/expressions.rst:1905 +#: ../../reference/expressions.rst:1918 msgid ":keyword:`not` ``x``" msgstr ":keyword:`not` ``x``" -#: ../../reference/expressions.rst:1905 +#: ../../reference/expressions.rst:1918 msgid "Boolean NOT" msgstr "" -#: ../../reference/expressions.rst:1907 +#: ../../reference/expressions.rst:1920 msgid ":keyword:`and`" msgstr ":keyword:`and`" -#: ../../reference/expressions.rst:1907 +#: ../../reference/expressions.rst:1920 msgid "Boolean AND" msgstr "" -#: ../../reference/expressions.rst:1909 +#: ../../reference/expressions.rst:1922 msgid ":keyword:`or`" msgstr ":keyword:`or`" -#: ../../reference/expressions.rst:1909 +#: ../../reference/expressions.rst:1922 msgid "Boolean OR" msgstr "" -#: ../../reference/expressions.rst:1911 +#: ../../reference/expressions.rst:1924 msgid ":keyword:`if ` -- :keyword:`!else`" msgstr ":keyword:`if ` -- :keyword:`!else`" -#: ../../reference/expressions.rst:1911 +#: ../../reference/expressions.rst:1924 msgid "Conditional expression" msgstr "" -#: ../../reference/expressions.rst:1913 +#: ../../reference/expressions.rst:1926 msgid ":keyword:`lambda`" msgstr ":keyword:`lambda`" -#: ../../reference/expressions.rst:1913 +#: ../../reference/expressions.rst:1926 msgid "Lambda expression" msgstr "" -#: ../../reference/expressions.rst:1915 +#: ../../reference/expressions.rst:1928 msgid "``:=``" msgstr "``:=``" -#: ../../reference/expressions.rst:1915 +#: ../../reference/expressions.rst:1928 msgid "Assignment expression" msgstr "" -#: ../../reference/expressions.rst:1920 +#: ../../reference/expressions.rst:1933 msgid "Footnotes" msgstr "註解" -#: ../../reference/expressions.rst:1921 +#: ../../reference/expressions.rst:1934 msgid "" "While ``abs(x%y) < abs(y)`` is true mathematically, for floats it may not be " "true numerically due to roundoff. For example, and assuming a platform on " @@ -2130,7 +2146,7 @@ msgid "" "approach is more appropriate depends on the application." msgstr "" -#: ../../reference/expressions.rst:1930 +#: ../../reference/expressions.rst:1943 msgid "" "If x is very close to an exact integer multiple of y, it's possible for ``x//" "y`` to be one larger than ``(x-x%y)//y`` due to rounding. In such cases, " @@ -2138,7 +2154,7 @@ msgid "" "* y + x % y`` be very close to ``x``." msgstr "" -#: ../../reference/expressions.rst:1935 +#: ../../reference/expressions.rst:1948 msgid "" "The Unicode standard distinguishes between :dfn:`code points` (e.g. U+0041) " "and :dfn:`abstract characters` (e.g. \"LATIN CAPITAL LETTER A\"). While most " @@ -2152,7 +2168,7 @@ msgid "" "(COMBINING CEDILLA)." msgstr "" -#: ../../reference/expressions.rst:1946 +#: ../../reference/expressions.rst:1959 msgid "" "The comparison operators on strings compare at the level of Unicode code " "points. This may be counter-intuitive to humans. For example, ``\"\\u00C7\" " @@ -2160,13 +2176,13 @@ msgid "" "same abstract character \"LATIN CAPITAL LETTER C WITH CEDILLA\"." msgstr "" -#: ../../reference/expressions.rst:1951 +#: ../../reference/expressions.rst:1964 msgid "" "To compare strings at the level of abstract characters (that is, in a way " "intuitive to humans), use :func:`unicodedata.normalize`." msgstr "" -#: ../../reference/expressions.rst:1954 +#: ../../reference/expressions.rst:1967 msgid "" "Due to automatic garbage-collection, free lists, and the dynamic nature of " "descriptors, you may notice seemingly unusual behaviour in certain uses of " @@ -2174,13 +2190,13 @@ msgid "" "instance methods, or constants. Check their documentation for more info." msgstr "" -#: ../../reference/expressions.rst:1959 +#: ../../reference/expressions.rst:1972 msgid "" "The power operator ``**`` binds less tightly than an arithmetic or bitwise " "unary operator on its right, that is, ``2**-1`` is ``0.5``." msgstr "" -#: ../../reference/expressions.rst:1962 +#: ../../reference/expressions.rst:1975 msgid "" "The ``%`` operator is also used for string formatting; the same precedence " "applies." From 2801f4fea879eec9ad58697074e79ad8af7362a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 3 Apr 2022 00:16:21 +0000 Subject: [PATCH 2/7] sync with cpython 11f5fd11 --- c-api/bytearray.po | 20 +++--- c-api/bytes.po | 4 +- c-api/call.po | 6 +- c-api/exceptions.po | 6 +- c-api/init.po | 4 +- c-api/init_config.po | 12 ++-- c-api/iter.po | 6 +- c-api/long.po | 4 +- c-api/mapping.po | 11 +-- c-api/memory.po | 4 +- c-api/method.po | 5 +- c-api/number.po | 46 +++++++------ c-api/object.po | 12 ++-- c-api/sequence.po | 20 +++--- c-api/set.po | 26 ++++---- c-api/structures.po | 4 +- c-api/sys.po | 14 ++-- c-api/type.po | 4 +- library/codecs.po | 4 +- library/locale.po | 6 +- library/math.po | 156 ++++++++++++++++++++++--------------------- library/os.po | 4 +- 22 files changed, 197 insertions(+), 181 deletions(-) diff --git a/c-api/bytearray.po b/c-api/bytearray.po index ed9c9b0e47..25c9d50704 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -59,43 +59,43 @@ msgid "" "`buffer protocol `." msgstr "" -#: ../../c-api/bytearray.rst:50 +#: ../../c-api/bytearray.rst:48 msgid "" "Create a new bytearray object from *string* and its length, *len*. On " "failure, ``NULL`` is returned." msgstr "" -#: ../../c-api/bytearray.rst:56 +#: ../../c-api/bytearray.rst:54 msgid "" "Concat bytearrays *a* and *b* and return a new bytearray with the result." msgstr "" -#: ../../c-api/bytearray.rst:61 +#: ../../c-api/bytearray.rst:59 msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." msgstr "" -#: ../../c-api/bytearray.rst:66 +#: ../../c-api/bytearray.rst:64 msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." msgstr "" -#: ../../c-api/bytearray.rst:73 +#: ../../c-api/bytearray.rst:71 msgid "Resize the internal buffer of *bytearray* to *len*." msgstr "" -#: ../../c-api/bytearray.rst:76 +#: ../../c-api/bytearray.rst:74 msgid "Macros" msgstr "" -#: ../../c-api/bytearray.rst:78 +#: ../../c-api/bytearray.rst:76 msgid "These macros trade safety for speed and they don't check pointers." msgstr "" -#: ../../c-api/bytearray.rst:82 +#: ../../c-api/bytearray.rst:80 msgid "Macro version of :c:func:`PyByteArray_AsString`." msgstr "" -#: ../../c-api/bytearray.rst:87 +#: ../../c-api/bytearray.rst:85 msgid "Macro version of :c:func:`PyByteArray_Size`." msgstr "" diff --git a/c-api/bytes.po b/c-api/bytes.po index 80080abad4..3ea22cdce6 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -25,7 +25,7 @@ msgstr "" #: ../../c-api/bytes.rst:8 msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " -"are called with a non-bytes parameter." +"called with a non-bytes parameter." msgstr "" #: ../../c-api/bytes.rst:16 diff --git a/c-api/call.po b/c-api/call.po index 6c2b4eaa3d..4fc109baa2 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-07 00:10+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+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-" @@ -53,8 +53,8 @@ msgstr "" #: ../../c-api/call.rst:29 msgid "" -"To call an object, use :c:func:`PyObject_Call` or other :ref:`call API `." +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." msgstr "" #: ../../c-api/call.rst:36 diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 0c85b440ae..3807ff49e0 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-24 00:12+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -300,7 +300,7 @@ msgstr "" #: ../../c-api/exceptions.rst:284 msgid "" -"Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is " +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" @@ -362,7 +362,7 @@ msgstr "" msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." -"warn_explicit`, see there for more information. The *module* and *registry* " +"warn_explicit`; see there for more information. The *module* and *registry* " "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" diff --git a/c-api/init.po b/c-api/init.po index a7eabc53a4..bff10a2385 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1962,7 +1962,7 @@ msgstr "" #: ../../c-api/init.rst:1728 msgid "" -"A freed key becomes a dangling pointer, you should reset the key to `NULL`." +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." msgstr "" #: ../../c-api/init.rst:1733 diff --git a/c-api/init_config.po b/c-api/init_config.po index 2a77d85af0..774f034ab5 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-22 00:09+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+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-" @@ -37,7 +37,7 @@ msgstr "" msgid "" "The :ref:`Python Configuration ` can be used to build a " "customized Python which behaves as the regular Python. For example, " -"environments variables and command line arguments are used to configure " +"environment variables and command line arguments are used to configure " "Python." msgstr "" @@ -45,8 +45,8 @@ msgstr "" msgid "" "The :ref:`Isolated Configuration ` can be used to embed " "Python into an application. It isolates Python from the system. For example, " -"environments variables are ignored, the LC_CTYPE locale is left unchanged " -"and no signal handler is registered." +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." msgstr "" #: ../../c-api/init_config.rst:27 @@ -1574,7 +1574,7 @@ msgstr "" #: ../../c-api/init_config.rst:1290 msgid "" -"This configuration ignores global configuration variables, environments " +"This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " "and user site directory. The C standard streams (ex: ``stdout``) and the " "LC_CTYPE locale are left unchanged. Signal handlers are not installed." @@ -1842,7 +1842,7 @@ msgstr "" #: ../../c-api/init_config.rst:1434 msgid "" "This section is a private provisional API introducing multi-phase " -"initialization, the core feature of the :pep:`432`:" +"initialization, the core feature of :pep:`432`:" msgstr "" #: ../../c-api/init_config.rst:1437 diff --git a/c-api/iter.po b/c-api/iter.po index 75a357bf5e..0d1b00d022 100644 --- a/c-api/iter.po +++ b/c-api/iter.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: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -34,8 +34,8 @@ msgstr "" #: ../../c-api/iter.rst:17 msgid "" -"Returns non-zero if the object 'obj' provides :class:`AsyncIterator` " -"protocols, and ``0`` otherwise. This function always succeeds." +"Return non-zero if the object *o* provides the :class:`AsyncIterator` " +"protocol, and ``0`` otherwise. This function always succeeds." msgstr "" #: ../../c-api/iter.rst:24 diff --git a/c-api/long.po b/c-api/long.po index 1700ed26fa..f9c70accb6 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -65,7 +65,7 @@ msgstr "" #: ../../c-api/long.rst:43 msgid "" "The current implementation keeps an array of integer objects for all " -"integers between ``-5`` and ``256``, when you create an int in that range " +"integers between ``-5`` and ``256``. When you create an int in that range " "you actually just get back a reference to the existing object." msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po index 3ce745608e..9619f7f4e2 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -30,10 +30,11 @@ msgstr "" #: ../../c-api/mapping.rst:14 msgid "" -"Return ``1`` if the object provides mapping protocol or supports slicing, " -"and ``0`` otherwise. Note that it returns ``1`` for Python classes with a :" -"meth:`__getitem__` method since in general case it is impossible to " -"determine what type of keys it supports. This function always succeeds." +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`__getitem__` method, since in general it is impossible to " +"determine what type of keys the class supports. This function always " +"succeeds." msgstr "" #: ../../c-api/mapping.rst:25 diff --git a/c-api/memory.po b/c-api/memory.po index bfb59a9e59..ce03c92a4a 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -390,7 +390,7 @@ msgstr "" #: ../../c-api/memory.rst:308 msgid "" "There is no guarantee that the memory returned by these allocators can be " -"successfully casted to a Python object when intercepting the allocating " +"successfully cast to a Python object when intercepting the allocating " "functions in this domain by the methods described in the :ref:`Customize " "Memory Allocators ` section." msgstr "" diff --git a/c-api/method.po b/c-api/method.po index 1b85e46868..6d48771431 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2022-01-24 22:22+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -52,8 +52,9 @@ msgstr "" "傳 true。參數必須不為 ``NULL``\\ 。此函式總是會成功執行。" #: ../../c-api/method.rst:30 +#, fuzzy msgid "" -"Return a new instance method object, with *func* being any callable object " +"Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" diff --git a/c-api/number.po b/c-api/number.po index b7d134817d..ab624803bb 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -59,7 +59,7 @@ msgstr "" #: ../../c-api/number.rst:46 msgid "" "Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " -"equivalent to the \"classic\" division of integers." +"the equivalent of the Python expression ``o1 // o2``." msgstr "" #: ../../c-api/number.rst:52 @@ -68,7 +68,8 @@ msgid "" "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " -"point value when passed two integers." +"point value when passed two integers. This is the equivalent of the Python " +"expression ``o1 / o2``." msgstr "" #: ../../c-api/number.rst:61 @@ -187,17 +188,18 @@ msgid "" "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " "point value when passed two integers. The operation is done *in-place* when " -"*o1* supports it." +"*o1* supports it. This is the equivalent of the Python statement ``o1 /= " +"o2``." msgstr "" -#: ../../c-api/number.rst:187 +#: ../../c-api/number.rst:188 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 %= o2``." msgstr "" -#: ../../c-api/number.rst:196 +#: ../../c-api/number.rst:197 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " @@ -207,66 +209,66 @@ msgid "" "an illegal memory access)." msgstr "" -#: ../../c-api/number.rst:205 +#: ../../c-api/number.rst:206 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 <<= o2``." msgstr "" -#: ../../c-api/number.rst:212 +#: ../../c-api/number.rst:213 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 >>= o2``." msgstr "" -#: ../../c-api/number.rst:219 +#: ../../c-api/number.rst:220 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 &= o2``." msgstr "" -#: ../../c-api/number.rst:226 +#: ../../c-api/number.rst:227 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. The operation is done *in-place* when *o1* supports it. This " "is the equivalent of the Python statement ``o1 ^= o2``." msgstr "" -#: ../../c-api/number.rst:233 +#: ../../c-api/number.rst:234 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 |= o2``." msgstr "" -#: ../../c-api/number.rst:242 +#: ../../c-api/number.rst:243 msgid "" "Returns the *o* converted to an integer object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``int(o)``." msgstr "" -#: ../../c-api/number.rst:250 +#: ../../c-api/number.rst:251 msgid "" "Returns the *o* converted to a float object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``float(o)``." msgstr "" -#: ../../c-api/number.rst:256 +#: ../../c-api/number.rst:257 msgid "" "Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" "`TypeError` exception raised on failure." msgstr "" -#: ../../c-api/number.rst:259 +#: ../../c-api/number.rst:260 msgid "" "The result always has exact type :class:`int`. Previously, the result could " "have been an instance of a subclass of ``int``." msgstr "" -#: ../../c-api/number.rst:266 +#: ../../c-api/number.rst:267 msgid "" "Returns the integer *n* converted to base *base* as a string. The *base* " "argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " @@ -275,13 +277,13 @@ msgid "" "`PyNumber_Index` first." msgstr "" -#: ../../c-api/number.rst:275 +#: ../../c-api/number.rst:276 msgid "" "Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an " "integer. If the call fails, an exception is raised and ``-1`` is returned." msgstr "" -#: ../../c-api/number.rst:278 +#: ../../c-api/number.rst:279 msgid "" "If *o* can be converted to a Python int but the attempt to convert to a " "Py_ssize_t value would raise an :exc:`OverflowError`, then the *exc* " @@ -291,9 +293,9 @@ msgid "" "negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" -#: ../../c-api/number.rst:288 +#: ../../c-api/number.rst:289 msgid "" -"Returns ``1`` if *o* is an index integer (has the nb_index slot of the " -"tp_as_number structure filled in), and ``0`` otherwise. This function always " -"succeeds." +"Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " +"``tp_as_number`` structure filled in), and ``0`` otherwise. This function " +"always succeeds." msgstr "" diff --git a/c-api/object.po b/c-api/object.po index 6a49310662..970b6185fa 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-20 00:10+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -105,8 +105,8 @@ msgstr "" #: ../../c-api/object.rst:96 msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttrString`." +"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " +"in favour of using :c:func:`PyObject_DelAttrString`." msgstr "" #: ../../c-api/object.rst:102 @@ -301,9 +301,9 @@ msgid "" "type of object *o*. On failure, raises :exc:`SystemError` and returns " "``NULL``. This is equivalent to the Python expression ``type(o)``. This " "function increments the reference count of the return value. There's really " -"no reason to use this function instead of the common expression ``o-" -">ob_type``, which returns a pointer of type :c:type:`PyTypeObject*`, except " -"when the incremented reference count is needed." +"no reason to use this function instead of the :c:func:`Py_TYPE()` function, " +"which returns a pointer of type :c:type:`PyTypeObject*`, except when the " +"incremented reference count is needed." msgstr "" #: ../../c-api/object.rst:301 diff --git a/c-api/sequence.po b/c-api/sequence.po index 6752e99cdc..4f7f9575f2 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:32+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -24,11 +24,11 @@ msgstr "" #: ../../c-api/sequence.rst:11 msgid "" -"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. " -"Note that it returns ``1`` for Python classes with a :meth:`__getitem__` " -"method unless they are :class:`dict` subclasses since in general case it is " -"impossible to determine what the type of keys it supports. This function " -"always succeeds." +"Return ``1`` if the object provides the sequence protocol, and ``0`` " +"otherwise. Note that it returns ``1`` for Python classes with a :meth:" +"`__getitem__` method, unless they are :class:`dict` subclasses, since in " +"general it is impossible to determine what type of keys the class supports. " +"This function always succeeds." msgstr "" #: ../../c-api/sequence.rst:23 @@ -86,8 +86,8 @@ msgstr "" #: ../../c-api/sequence.rst:72 msgid "" -"If *v* is ``NULL``, the element is deleted, however this feature is " -"deprecated in favour of using :c:func:`PySequence_DelItem`." +"If *v* is ``NULL``, the element is deleted, but this feature is deprecated " +"in favour of using :c:func:`PySequence_DelItem`." msgstr "" #: ../../c-api/sequence.rst:78 @@ -167,8 +167,8 @@ msgstr "" #: ../../c-api/sequence.rst:148 msgid "" "Returns the length of *o*, assuming that *o* was returned by :c:func:" -"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be gotten " -"by calling :c:func:`PySequence_Size` on *o*, but :c:func:" +"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " +"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" "`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " "tuple." msgstr "" diff --git a/c-api/set.po b/c-api/set.po index e9ccb62c46..e8627240f1 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -25,14 +25,14 @@ msgstr "" #: ../../c-api/set.rst:15 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " -"objects. Any functionality not listed below is best accessed using the " -"either the abstract object protocol (including :c:func:" -"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:" -"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:" -"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number " -"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:" -"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :" -"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" +"objects. Any functionality not listed below is best accessed using either " +"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" +"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" +"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" +"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" +"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" +"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" +"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" "`PyNumber_InPlaceXor`)." msgstr "" @@ -43,9 +43,9 @@ msgid "" "`PyDictObject` in that it is a fixed size for small sets (much like tuple " "storage) and will point to a separate, variable sized block of memory for " "medium and large sized sets (much like list storage). None of the fields of " -"this structure should be considered public and are subject to change. All " -"access should be done through the documented API rather than by manipulating " -"the values in the structure." +"this structure should be considered public and all are subject to change. " +"All access should be done through the documented API rather than by " +"manipulating the values in the structure." msgstr "" #: ../../c-api/set.rst:40 @@ -149,7 +149,7 @@ msgstr "" #: ../../c-api/set.rst:133 msgid "" "Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " -"instances (like :c:func:`PyTuple_SetItem` it can be used to fill-in the " +"instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " "values of brand new frozensets before they are exposed to other code). " "Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " "the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " diff --git a/c-api/structures.po b/c-api/structures.po index a83ee6ac38..227a680fbf 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -675,7 +675,7 @@ msgid "getter" msgstr "" #: ../../c-api/structures.rst:497 -msgid "C Function to get the attribute" +msgid "C function to get the attribute" msgstr "" #: ../../c-api/structures.rst:499 diff --git a/c-api/sys.po b/c-api/sys.po index dd4ba94ab1..f82741b2cc 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -204,7 +204,7 @@ msgid "" "`." msgstr "" -#: ../../c-api/sys.rst:166 ../../c-api/sys.rst:208 +#: ../../c-api/sys.rst:166 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:data:" "`Py_LegacyWindowsFSEncodingFlag` is zero;" @@ -222,7 +222,7 @@ msgstr "" msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " -"error" +"error." msgstr "" #: ../../c-api/sys.rst:182 @@ -243,6 +243,12 @@ msgid "" "functions." msgstr "" +#: ../../c-api/sys.rst:208 +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:data:" +"`Py_LegacyWindowsFSEncodingFlag` is zero." +msgstr "" + #: ../../c-api/sys.rst:216 msgid "System Functions" msgstr "系統函式" @@ -391,7 +397,7 @@ msgstr "" #: ../../c-api/sys.rst:340 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " -"for success and non-zero on failure. If the runtime has been initialized, " +"on success and non-zero on failure. If the runtime has been initialized, " "also set an error on failure. Hooks added through this API are called for " "all interpreters created by the runtime." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index a097901d68..ca9f335227 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -360,7 +360,7 @@ msgid "" msgstr "" #: ../../c-api/type.rst:275 -msgid "Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API." +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" #: ../../c-api/type.rst:279 diff --git a/library/codecs.po b/library/codecs.po index 374b76724e..30065e4b31 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-04 00:14+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1154,7 +1154,7 @@ msgid "" "Order Mark\"). This is the Unicode character ``U+FEFF``. This character can " "be prepended to every ``UTF-16`` or ``UTF-32`` byte sequence. The byte " "swapped version of this character (``0xFFFE``) is an illegal character that " -"may not appear in a Unicode text. So when the first character in an " +"may not appear in a Unicode text. So when the first character in a " "``UTF-16`` or ``UTF-32`` byte sequence appears to be a ``U+FFFE`` the bytes " "have to be swapped on decoding. Unfortunately the character ``U+FEFF`` had a " "second purpose as a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no " diff --git a/library/locale.po b/library/locale.po index 610734a873..d19ab91aa9 100644 --- a/library/locale.po +++ b/library/locale.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+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-" @@ -657,8 +657,8 @@ msgstr "" #: ../../library/locale.rst:440 msgid "" -"Converts a string to a floating point number, following the :const:" -"`LC_NUMERIC` settings." +"Converts a string to a number, following the :const:`LC_NUMERIC` settings, " +"by calling *func* on the result of calling :func:`delocalize` on *string*." msgstr "" #: ../../library/locale.rst:446 diff --git a/library/math.po b/library/math.po index bae58ef253..d6f9a1dc8d 100644 --- a/library/math.po +++ b/library/math.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+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-" @@ -53,8 +53,8 @@ msgstr "" #: ../../library/math.rst:34 msgid "" "Return the ceiling of *x*, the smallest integer greater than or equal to " -"*x*. If *x* is not a float, delegates to ``x.__ceil__()``, which should " -"return an :class:`~numbers.Integral` value." +"*x*. If *x* is not a float, delegates to :meth:`x.__ceil__ `, which should return an :class:`~numbers.Integral` value." msgstr "" #: ../../library/math.rst:41 @@ -105,9 +105,9 @@ msgstr "" #: ../../library/math.rst:80 msgid "" -"Return the floor of *x*, the largest integer less than or equal to *x*. If " -"*x* is not a float, delegates to ``x.__floor__()``, which should return an :" -"class:`~numbers.Integral` value." +"Return the floor of *x*, the largest integer less than or equal to *x*. If " +"*x* is not a float, delegates to :meth:`x.__floor__ `, " +"which should return an :class:`~numbers.Integral` value." msgstr "" #: ../../library/math.rst:87 @@ -358,59 +358,61 @@ msgstr "" #: ../../library/math.rst:301 msgid "" -"Return the :class:`~numbers.Real` value *x* truncated to an :class:`~numbers." -"Integral` (usually an integer). Delegates to :meth:`x.__trunc__() `." +"Return *x* with the fractional part removed, leaving the integer part. This " +"rounds toward 0: ``trunc()`` is equivalent to :func:`floor` for positive " +"*x*, and equivalent to :func:`ceil` for negative *x*. If *x* is not a float, " +"delegates to :meth:`x.__trunc__ `, which should return an :" +"class:`~numbers.Integral` value." msgstr "" -#: ../../library/math.rst:307 +#: ../../library/math.rst:309 msgid "Return the value of the least significant bit of the float *x*:" msgstr "" -#: ../../library/math.rst:309 +#: ../../library/math.rst:311 msgid "If *x* is a NaN (not a number), return *x*." msgstr "" -#: ../../library/math.rst:310 +#: ../../library/math.rst:312 msgid "If *x* is negative, return ``ulp(-x)``." msgstr "" -#: ../../library/math.rst:311 +#: ../../library/math.rst:313 msgid "If *x* is a positive infinity, return *x*." msgstr "" -#: ../../library/math.rst:312 +#: ../../library/math.rst:314 msgid "" "If *x* is equal to zero, return the smallest positive *denormalized* " "representable float (smaller than the minimum positive *normalized* float, :" "data:`sys.float_info.min `)." msgstr "" -#: ../../library/math.rst:315 +#: ../../library/math.rst:317 msgid "" "If *x* is equal to the largest positive representable float, return the " "value of the least significant bit of *x*, such that the first float smaller " "than *x* is ``x - ulp(x)``." msgstr "" -#: ../../library/math.rst:318 +#: ../../library/math.rst:320 msgid "" "Otherwise (*x* is a positive finite number), return the value of the least " "significant bit of *x*, such that the first float bigger than *x* is ``x + " "ulp(x)``." msgstr "" -#: ../../library/math.rst:322 +#: ../../library/math.rst:324 msgid "ULP stands for \"Unit in the Last Place\"." msgstr "" -#: ../../library/math.rst:324 +#: ../../library/math.rst:326 msgid "" "See also :func:`math.nextafter` and :data:`sys.float_info.epsilon `." msgstr "" -#: ../../library/math.rst:330 +#: ../../library/math.rst:332 msgid "" "Note that :func:`frexp` and :func:`modf` have a different call/return " "pattern than their C equivalents: they take a single argument and return a " @@ -418,7 +420,7 @@ msgid "" "'output parameter' (there is no such thing in Python)." msgstr "" -#: ../../library/math.rst:335 +#: ../../library/math.rst:337 msgid "" "For the :func:`ceil`, :func:`floor`, and :func:`modf` functions, note that " "*all* floating-point numbers of sufficiently large magnitude are exact " @@ -427,18 +429,18 @@ msgid "" "``abs(x) >= 2**52`` necessarily has no fractional bits." msgstr "" -#: ../../library/math.rst:343 +#: ../../library/math.rst:345 msgid "Power and logarithmic functions" msgstr "" -#: ../../library/math.rst:347 +#: ../../library/math.rst:349 msgid "" "Return *e* raised to the power *x*, where *e* = 2.718281... is the base of " "natural logarithms. This is usually more accurate than ``math.e ** x`` or " "``pow(math.e, x)``." msgstr "" -#: ../../library/math.rst:354 +#: ../../library/math.rst:356 msgid "" "Return *e* raised to the power *x*, minus 1. Here *e* is the base of " "natural logarithms. For small floats *x*, the subtraction in ``exp(x) - 1`` " @@ -447,41 +449,41 @@ msgid "" "compute this quantity to full precision::" msgstr "" -#: ../../library/math.rst:371 +#: ../../library/math.rst:373 msgid "With one argument, return the natural logarithm of *x* (to base *e*)." msgstr "" -#: ../../library/math.rst:373 +#: ../../library/math.rst:375 msgid "" "With two arguments, return the logarithm of *x* to the given *base*, " "calculated as ``log(x)/log(base)``." msgstr "" -#: ../../library/math.rst:379 +#: ../../library/math.rst:381 msgid "" "Return the natural logarithm of *1+x* (base *e*). The result is calculated " "in a way which is accurate for *x* near zero." msgstr "" -#: ../../library/math.rst:385 +#: ../../library/math.rst:387 msgid "" "Return the base-2 logarithm of *x*. This is usually more accurate than " "``log(x, 2)``." msgstr "" -#: ../../library/math.rst:392 +#: ../../library/math.rst:394 msgid "" ":meth:`int.bit_length` returns the number of bits necessary to represent an " "integer in binary, excluding the sign and leading zeros." msgstr "" -#: ../../library/math.rst:398 +#: ../../library/math.rst:400 msgid "" "Return the base-10 logarithm of *x*. This is usually more accurate than " "``log(x, 10)``." msgstr "" -#: ../../library/math.rst:404 +#: ../../library/math.rst:406 msgid "" "Return ``x`` raised to the power ``y``. Exceptional cases follow Annex 'F' " "of the C99 standard as far as possible. In particular, ``pow(1.0, x)`` and " @@ -490,40 +492,40 @@ msgid "" "integer then ``pow(x, y)`` is undefined, and raises :exc:`ValueError`." msgstr "" -#: ../../library/math.rst:411 +#: ../../library/math.rst:413 msgid "" "Unlike the built-in ``**`` operator, :func:`math.pow` converts both its " "arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` " "function for computing exact integer powers." msgstr "" -#: ../../library/math.rst:418 +#: ../../library/math.rst:420 msgid "Return the square root of *x*." msgstr "" -#: ../../library/math.rst:422 +#: ../../library/math.rst:424 msgid "Trigonometric functions" msgstr "" -#: ../../library/math.rst:426 +#: ../../library/math.rst:428 msgid "" "Return the arc cosine of *x*, in radians. The result is between ``0`` and " "``pi``." msgstr "" -#: ../../library/math.rst:432 +#: ../../library/math.rst:434 msgid "" "Return the arc sine of *x*, in radians. The result is between ``-pi/2`` and " "``pi/2``." msgstr "" -#: ../../library/math.rst:438 +#: ../../library/math.rst:440 msgid "" "Return the arc tangent of *x*, in radians. The result is between ``-pi/2`` " "and ``pi/2``." msgstr "" -#: ../../library/math.rst:444 +#: ../../library/math.rst:446 msgid "" "Return ``atan(y / x)``, in radians. The result is between ``-pi`` and " "``pi``. The vector in the plane from the origin to point ``(x, y)`` makes " @@ -533,121 +535,121 @@ msgid "" "``pi/4``, but ``atan2(-1, -1)`` is ``-3*pi/4``." msgstr "" -#: ../../library/math.rst:454 +#: ../../library/math.rst:456 msgid "Return the cosine of *x* radians." msgstr "" -#: ../../library/math.rst:459 +#: ../../library/math.rst:461 msgid "" "Return the Euclidean distance between two points *p* and *q*, each given as " "a sequence (or iterable) of coordinates. The two points must have the same " "dimension." msgstr "" -#: ../../library/math.rst:463 +#: ../../library/math.rst:465 msgid "Roughly equivalent to::" msgstr "" -#: ../../library/math.rst:472 +#: ../../library/math.rst:474 msgid "" "Return the Euclidean norm, ``sqrt(sum(x**2 for x in coordinates))``. This is " "the length of the vector from the origin to the point given by the " "coordinates." msgstr "" -#: ../../library/math.rst:476 +#: ../../library/math.rst:478 msgid "" "For a two dimensional point ``(x, y)``, this is equivalent to computing the " "hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + " "y*y)``." msgstr "" -#: ../../library/math.rst:480 +#: ../../library/math.rst:482 msgid "" "Added support for n-dimensional points. Formerly, only the two dimensional " "case was supported." msgstr "" -#: ../../library/math.rst:484 +#: ../../library/math.rst:486 msgid "" "Improved the algorithm's accuracy so that the maximum error is under 1 ulp " "(unit in the last place). More typically, the result is almost always " "correctly rounded to within 1/2 ulp." msgstr "" -#: ../../library/math.rst:492 +#: ../../library/math.rst:494 msgid "Return the sine of *x* radians." msgstr "" -#: ../../library/math.rst:497 +#: ../../library/math.rst:499 msgid "Return the tangent of *x* radians." msgstr "" -#: ../../library/math.rst:501 +#: ../../library/math.rst:503 msgid "Angular conversion" msgstr "" -#: ../../library/math.rst:505 +#: ../../library/math.rst:507 msgid "Convert angle *x* from radians to degrees." msgstr "" -#: ../../library/math.rst:510 +#: ../../library/math.rst:512 msgid "Convert angle *x* from degrees to radians." msgstr "" -#: ../../library/math.rst:514 +#: ../../library/math.rst:516 msgid "Hyperbolic functions" msgstr "" -#: ../../library/math.rst:516 +#: ../../library/math.rst:518 msgid "" "`Hyperbolic functions `_ " "are analogs of trigonometric functions that are based on hyperbolas instead " "of circles." msgstr "" -#: ../../library/math.rst:522 +#: ../../library/math.rst:524 msgid "Return the inverse hyperbolic cosine of *x*." msgstr "" -#: ../../library/math.rst:527 +#: ../../library/math.rst:529 msgid "Return the inverse hyperbolic sine of *x*." msgstr "" -#: ../../library/math.rst:532 +#: ../../library/math.rst:534 msgid "Return the inverse hyperbolic tangent of *x*." msgstr "" -#: ../../library/math.rst:537 +#: ../../library/math.rst:539 msgid "Return the hyperbolic cosine of *x*." msgstr "" -#: ../../library/math.rst:542 +#: ../../library/math.rst:544 msgid "Return the hyperbolic sine of *x*." msgstr "" -#: ../../library/math.rst:547 +#: ../../library/math.rst:549 msgid "Return the hyperbolic tangent of *x*." msgstr "" -#: ../../library/math.rst:551 +#: ../../library/math.rst:553 msgid "Special functions" msgstr "" -#: ../../library/math.rst:555 +#: ../../library/math.rst:557 msgid "" "Return the `error function `_ " "at *x*." msgstr "" -#: ../../library/math.rst:558 +#: ../../library/math.rst:560 msgid "" "The :func:`erf` function can be used to compute traditional statistical " "functions such as the `cumulative standard normal distribution `_::" msgstr "" -#: ../../library/math.rst:571 +#: ../../library/math.rst:573 msgid "" "Return the complementary error function at *x*. The `complementary error " "function `_ is defined as " @@ -656,31 +658,31 @@ msgid "" "Loss_of_significance>`_\\." msgstr "" -#: ../../library/math.rst:582 +#: ../../library/math.rst:584 msgid "" "Return the `Gamma function `_ " "at *x*." msgstr "" -#: ../../library/math.rst:590 +#: ../../library/math.rst:592 msgid "" "Return the natural logarithm of the absolute value of the Gamma function at " "*x*." msgstr "" -#: ../../library/math.rst:597 +#: ../../library/math.rst:599 msgid "Constants" msgstr "常數" -#: ../../library/math.rst:601 +#: ../../library/math.rst:603 msgid "The mathematical constant *π* = 3.141592..., to available precision." msgstr "" -#: ../../library/math.rst:606 +#: ../../library/math.rst:608 msgid "The mathematical constant *e* = 2.718281..., to available precision." msgstr "" -#: ../../library/math.rst:611 +#: ../../library/math.rst:613 msgid "" "The mathematical constant *τ* = 6.283185..., to available precision. Tau is " "a circle constant equal to 2\\ *π*, the ratio of a circle's circumference to " @@ -689,19 +691,23 @@ msgid "" "celebrating `Tau day `_ by eating twice as much pie!" msgstr "" -#: ../../library/math.rst:622 +#: ../../library/math.rst:624 msgid "" "A floating-point positive infinity. (For negative infinity, use ``-math." "inf``.) Equivalent to the output of ``float('inf')``." msgstr "" -#: ../../library/math.rst:630 +#: ../../library/math.rst:632 msgid "" -"A floating-point \"not a number\" (NaN) value. Equivalent to the output of " -"``float('nan')``." +"A floating-point \"not a number\" (NaN) value. Equivalent to the output of " +"``float('nan')``. Due to the requirements of the `IEEE-754 standard `_, ``math.nan`` and ``float('nan')`` are not " +"considered to equal to any other numeric value, including themselves. To " +"check whether a number is a NaN, use the :func:`isnan` function to test for " +"NaNs instead of ``is`` or ``==``. Example::" msgstr "" -#: ../../library/math.rst:638 +#: ../../library/math.rst:655 msgid "" "The :mod:`math` module consists mostly of thin wrappers around the platform " "C math library functions. Behavior in exceptional cases follows Annex F of " @@ -716,17 +722,17 @@ msgid "" "``hypot(float('nan'), float('inf'))``." msgstr "" -#: ../../library/math.rst:650 +#: ../../library/math.rst:667 msgid "" "Note that Python makes no effort to distinguish signaling NaNs from quiet " "NaNs, and behavior for signaling NaNs remains unspecified. Typical behavior " "is to treat all NaNs as though they were quiet." msgstr "" -#: ../../library/math.rst:657 +#: ../../library/math.rst:674 msgid "Module :mod:`cmath`" msgstr ":mod:`cmath` 模組" -#: ../../library/math.rst:658 +#: ../../library/math.rst:675 msgid "Complex number versions of many of these functions." msgstr "" diff --git a/library/os.po b/library/os.po index 0e7703ff36..c00889fa69 100644 --- a/library/os.po +++ b/library/os.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-15 00:13+0000\n" +"POT-Creation-Date: 2022-04-03 00:14+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -181,7 +181,7 @@ msgstr "" #: ../../library/os.rst:116 msgid "" -"On Unix, :func:`os.device_encoding` returns ``'UTF-8'``. rather than the " +"On Unix, :func:`os.device_encoding` returns ``'UTF-8'`` rather than the " "device encoding." msgstr "" From 49cc94bff9c26fcebe62f6f3b8ee733b672de9ec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Apr 2022 00:15:18 +0000 Subject: [PATCH 3/7] sync with cpython a331d0f6 --- reference/lexical_analysis.po | 364 +++++++++++++++++----------------- reference/simple_stmts.po | 294 +++++++++++++-------------- tutorial/stdlib.po | 85 ++++---- 3 files changed, 374 insertions(+), 369 deletions(-) diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 431db6da07..2d2371fbe9 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-19 00:09+0000\n" +"POT-Creation-Date: 2022-04-04 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -124,16 +124,16 @@ msgstr "" #: ../../reference/lexical_analysis.rst:104 msgid "" -"If an encoding is declared, the encoding name must be recognized by Python. " -"The encoding is used for all lexical analysis, including string literals, " -"comments and identifiers." +"If an encoding is declared, the encoding name must be recognized by Python " +"(see :ref:`standard-encodings`). The encoding is used for all lexical " +"analysis, including string literals, comments and identifiers." msgstr "" -#: ../../reference/lexical_analysis.rst:114 +#: ../../reference/lexical_analysis.rst:113 msgid "Explicit line joining" msgstr "" -#: ../../reference/lexical_analysis.rst:118 +#: ../../reference/lexical_analysis.rst:117 msgid "" "Two or more physical lines may be joined into logical lines using backslash " "characters (``\\``), as follows: when a physical line ends in a backslash " @@ -142,7 +142,7 @@ msgid "" "following end-of-line character. For example::" msgstr "" -#: ../../reference/lexical_analysis.rst:129 +#: ../../reference/lexical_analysis.rst:128 msgid "" "A line ending in a backslash cannot carry a comment. A backslash does not " "continue a comment. A backslash does not continue a token except for string " @@ -151,17 +151,17 @@ msgid "" "line outside a string literal." msgstr "" -#: ../../reference/lexical_analysis.rst:139 +#: ../../reference/lexical_analysis.rst:138 msgid "Implicit line joining" msgstr "" -#: ../../reference/lexical_analysis.rst:141 +#: ../../reference/lexical_analysis.rst:140 msgid "" "Expressions in parentheses, square brackets or curly braces can be split " "over more than one physical line without using backslashes. For example::" msgstr "" -#: ../../reference/lexical_analysis.rst:149 +#: ../../reference/lexical_analysis.rst:148 msgid "" "Implicitly continued lines can carry comments. The indentation of the " "continuation lines is not important. Blank continuation lines are allowed. " @@ -170,11 +170,11 @@ msgid "" "that case they cannot carry comments." msgstr "" -#: ../../reference/lexical_analysis.rst:159 +#: ../../reference/lexical_analysis.rst:158 msgid "Blank lines" msgstr "" -#: ../../reference/lexical_analysis.rst:163 +#: ../../reference/lexical_analysis.rst:162 msgid "" "A logical line that contains only spaces, tabs, formfeeds and possibly a " "comment, is ignored (i.e., no NEWLINE token is generated). During " @@ -185,18 +185,18 @@ msgid "" "statement." msgstr "" -#: ../../reference/lexical_analysis.rst:174 +#: ../../reference/lexical_analysis.rst:173 msgid "Indentation" msgstr "" -#: ../../reference/lexical_analysis.rst:178 +#: ../../reference/lexical_analysis.rst:177 msgid "" "Leading whitespace (spaces and tabs) at the beginning of a logical line is " "used to compute the indentation level of the line, which in turn is used to " "determine the grouping of statements." msgstr "" -#: ../../reference/lexical_analysis.rst:182 +#: ../../reference/lexical_analysis.rst:181 msgid "" "Tabs are replaced (from left to right) by one to eight spaces such that the " "total number of characters up to and including the replacement is a multiple " @@ -207,14 +207,14 @@ msgid "" "the indentation." msgstr "" -#: ../../reference/lexical_analysis.rst:190 +#: ../../reference/lexical_analysis.rst:189 msgid "" "Indentation is rejected as inconsistent if a source file mixes tabs and " "spaces in a way that makes the meaning dependent on the worth of a tab in " "spaces; a :exc:`TabError` is raised in that case." msgstr "" -#: ../../reference/lexical_analysis.rst:194 +#: ../../reference/lexical_analysis.rst:193 msgid "" "**Cross-platform compatibility note:** because of the nature of text editors " "on non-UNIX platforms, it is unwise to use a mixture of spaces and tabs for " @@ -222,7 +222,7 @@ msgid "" "different platforms may explicitly limit the maximum indentation level." msgstr "" -#: ../../reference/lexical_analysis.rst:199 +#: ../../reference/lexical_analysis.rst:198 msgid "" "A formfeed character may be present at the start of the line; it will be " "ignored for the indentation calculations above. Formfeed characters " @@ -230,13 +230,13 @@ msgid "" "instance, they may reset the space count to zero)." msgstr "" -#: ../../reference/lexical_analysis.rst:206 +#: ../../reference/lexical_analysis.rst:205 msgid "" "The indentation levels of consecutive lines are used to generate INDENT and " "DEDENT tokens, using a stack, as follows." msgstr "" -#: ../../reference/lexical_analysis.rst:209 +#: ../../reference/lexical_analysis.rst:208 msgid "" "Before the first line of the file is read, a single zero is pushed on the " "stack; this will never be popped off again. The numbers pushed on the stack " @@ -250,28 +250,28 @@ msgid "" "number remaining on the stack that is larger than zero." msgstr "" -#: ../../reference/lexical_analysis.rst:220 +#: ../../reference/lexical_analysis.rst:219 msgid "" "Here is an example of a correctly (though confusingly) indented piece of " "Python code::" msgstr "" -#: ../../reference/lexical_analysis.rst:235 +#: ../../reference/lexical_analysis.rst:234 msgid "The following example shows various indentation errors::" msgstr "" -#: ../../reference/lexical_analysis.rst:245 +#: ../../reference/lexical_analysis.rst:244 msgid "" "(Actually, the first three errors are detected by the parser; only the last " "error is found by the lexical analyzer --- the indentation of ``return r`` " "does not match a level popped off the stack.)" msgstr "" -#: ../../reference/lexical_analysis.rst:253 +#: ../../reference/lexical_analysis.rst:252 msgid "Whitespace between tokens" msgstr "" -#: ../../reference/lexical_analysis.rst:255 +#: ../../reference/lexical_analysis.rst:254 msgid "" "Except at the beginning of a logical line or in string literals, the " "whitespace characters space, tab and formfeed can be used interchangeably to " @@ -280,11 +280,11 @@ msgid "" "is one token, but a b is two tokens)." msgstr "" -#: ../../reference/lexical_analysis.rst:265 +#: ../../reference/lexical_analysis.rst:264 msgid "Other tokens" msgstr "" -#: ../../reference/lexical_analysis.rst:267 +#: ../../reference/lexical_analysis.rst:266 msgid "" "Besides NEWLINE, INDENT and DEDENT, the following categories of tokens " "exist: *identifiers*, *keywords*, *literals*, *operators*, and *delimiters*. " @@ -294,24 +294,24 @@ msgid "" "from left to right." msgstr "" -#: ../../reference/lexical_analysis.rst:277 +#: ../../reference/lexical_analysis.rst:276 msgid "Identifiers and keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:281 +#: ../../reference/lexical_analysis.rst:280 msgid "" "Identifiers (also referred to as *names*) are described by the following " "lexical definitions." msgstr "" -#: ../../reference/lexical_analysis.rst:284 +#: ../../reference/lexical_analysis.rst:283 msgid "" "The syntax of identifiers in Python is based on the Unicode standard annex " "UAX-31, with elaboration and changes as defined below; see also :pep:`3131` " "for further details." msgstr "" -#: ../../reference/lexical_analysis.rst:288 +#: ../../reference/lexical_analysis.rst:287 msgid "" "Within the ASCII range (U+0001..U+007F), the valid characters for " "identifiers are the same as in Python 2.x: the uppercase and lowercase " @@ -319,7 +319,7 @@ msgid "" "character, the digits ``0`` through ``9``." msgstr "" -#: ../../reference/lexical_analysis.rst:293 +#: ../../reference/lexical_analysis.rst:292 msgid "" "Python 3.0 introduces additional characters from outside the ASCII range " "(see :pep:`3131`). For these characters, the classification uses the " @@ -327,94 +327,94 @@ msgid "" "`unicodedata` module." msgstr "" -#: ../../reference/lexical_analysis.rst:297 +#: ../../reference/lexical_analysis.rst:296 msgid "Identifiers are unlimited in length. Case is significant." msgstr "" -#: ../../reference/lexical_analysis.rst:306 +#: ../../reference/lexical_analysis.rst:305 msgid "The Unicode category codes mentioned above stand for:" msgstr "" -#: ../../reference/lexical_analysis.rst:308 +#: ../../reference/lexical_analysis.rst:307 msgid "*Lu* - uppercase letters" msgstr "" -#: ../../reference/lexical_analysis.rst:309 +#: ../../reference/lexical_analysis.rst:308 msgid "*Ll* - lowercase letters" msgstr "" -#: ../../reference/lexical_analysis.rst:310 +#: ../../reference/lexical_analysis.rst:309 msgid "*Lt* - titlecase letters" msgstr "" -#: ../../reference/lexical_analysis.rst:311 +#: ../../reference/lexical_analysis.rst:310 msgid "*Lm* - modifier letters" msgstr "" -#: ../../reference/lexical_analysis.rst:312 +#: ../../reference/lexical_analysis.rst:311 msgid "*Lo* - other letters" msgstr "" -#: ../../reference/lexical_analysis.rst:313 +#: ../../reference/lexical_analysis.rst:312 msgid "*Nl* - letter numbers" msgstr "" -#: ../../reference/lexical_analysis.rst:314 +#: ../../reference/lexical_analysis.rst:313 msgid "*Mn* - nonspacing marks" msgstr "" -#: ../../reference/lexical_analysis.rst:315 +#: ../../reference/lexical_analysis.rst:314 msgid "*Mc* - spacing combining marks" msgstr "" -#: ../../reference/lexical_analysis.rst:316 +#: ../../reference/lexical_analysis.rst:315 msgid "*Nd* - decimal numbers" msgstr "" -#: ../../reference/lexical_analysis.rst:317 +#: ../../reference/lexical_analysis.rst:316 msgid "*Pc* - connector punctuations" msgstr "" -#: ../../reference/lexical_analysis.rst:318 +#: ../../reference/lexical_analysis.rst:317 msgid "" "*Other_ID_Start* - explicit list of characters in `PropList.txt `_ to support backwards " "compatibility" msgstr "" -#: ../../reference/lexical_analysis.rst:321 +#: ../../reference/lexical_analysis.rst:320 msgid "*Other_ID_Continue* - likewise" msgstr "" -#: ../../reference/lexical_analysis.rst:323 +#: ../../reference/lexical_analysis.rst:322 msgid "" "All identifiers are converted into the normal form NFKC while parsing; " "comparison of identifiers is based on NFKC." msgstr "" -#: ../../reference/lexical_analysis.rst:326 +#: ../../reference/lexical_analysis.rst:325 msgid "" "A non-normative HTML file listing all valid identifier characters for " "Unicode 4.1 can be found at https://www.unicode.org/Public/13.0.0/ucd/" "DerivedCoreProperties.txt" msgstr "" -#: ../../reference/lexical_analysis.rst:334 +#: ../../reference/lexical_analysis.rst:333 msgid "Keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:340 +#: ../../reference/lexical_analysis.rst:339 msgid "" "The following identifiers are used as reserved words, or *keywords* of the " "language, and cannot be used as ordinary identifiers. They must be spelled " "exactly as written here:" msgstr "" -#: ../../reference/lexical_analysis.rst:358 +#: ../../reference/lexical_analysis.rst:357 msgid "Soft Keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:364 +#: ../../reference/lexical_analysis.rst:363 msgid "" "Some identifiers are only reserved under specific contexts. These are known " "as *soft keywords*. The identifiers ``match``, ``case`` and ``_`` can " @@ -423,72 +423,72 @@ msgid "" "tokenizing." msgstr "" -#: ../../reference/lexical_analysis.rst:370 +#: ../../reference/lexical_analysis.rst:369 msgid "" "As soft keywords, their use with pattern matching is possible while still " "preserving compatibility with existing code that uses ``match``, ``case`` " "and ``_`` as identifier names." msgstr "" -#: ../../reference/lexical_analysis.rst:381 +#: ../../reference/lexical_analysis.rst:380 msgid "Reserved classes of identifiers" msgstr "" -#: ../../reference/lexical_analysis.rst:383 +#: ../../reference/lexical_analysis.rst:382 msgid "" "Certain classes of identifiers (besides keywords) have special meanings. " "These classes are identified by the patterns of leading and trailing " "underscore characters:" msgstr "" -#: ../../reference/lexical_analysis.rst:388 +#: ../../reference/lexical_analysis.rst:387 msgid "``_*``" msgstr "``_*``" -#: ../../reference/lexical_analysis.rst:388 +#: ../../reference/lexical_analysis.rst:387 msgid "Not imported by ``from module import *``." msgstr "" -#: ../../reference/lexical_analysis.rst:409 +#: ../../reference/lexical_analysis.rst:408 msgid "``_``" msgstr "``_``" -#: ../../reference/lexical_analysis.rst:391 +#: ../../reference/lexical_analysis.rst:390 msgid "" "In a ``case`` pattern within a :keyword:`match` statement, ``_`` is a :ref:" "`soft keyword ` that denotes a :ref:`wildcard `." msgstr "" -#: ../../reference/lexical_analysis.rst:395 +#: ../../reference/lexical_analysis.rst:394 msgid "" "Separately, the interactive interpreter makes the result of the last " "evaluation available in the variable ``_``. (It is stored in the :mod:" "`builtins` module, alongside built-in functions like ``print``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:400 +#: ../../reference/lexical_analysis.rst:399 msgid "" "Elsewhere, ``_`` is a regular identifier. It is often used to name \"special" "\" items, but it is not special to Python itself." msgstr "" -#: ../../reference/lexical_analysis.rst:405 +#: ../../reference/lexical_analysis.rst:404 msgid "" "The name ``_`` is often used in conjunction with internationalization; refer " "to the documentation for the :mod:`gettext` module for more information on " "this convention." msgstr "" -#: ../../reference/lexical_analysis.rst:409 +#: ../../reference/lexical_analysis.rst:408 msgid "It is also commonly used for unused variables." msgstr "" -#: ../../reference/lexical_analysis.rst:417 +#: ../../reference/lexical_analysis.rst:416 msgid "``__*__``" msgstr "``__*__``" -#: ../../reference/lexical_analysis.rst:412 +#: ../../reference/lexical_analysis.rst:411 msgid "" "System-defined names, informally known as \"dunder\" names. These names are " "defined by the interpreter and its implementation (including the standard " @@ -498,11 +498,11 @@ msgid "" "explicitly documented use, is subject to breakage without warning." msgstr "" -#: ../../reference/lexical_analysis.rst:424 +#: ../../reference/lexical_analysis.rst:423 msgid "``__*``" msgstr "``__*``" -#: ../../reference/lexical_analysis.rst:420 +#: ../../reference/lexical_analysis.rst:419 msgid "" "Class-private names. Names in this category, when used within the context " "of a class definition, are re-written to use a mangled form to help avoid " @@ -510,23 +510,23 @@ msgid "" "section :ref:`atom-identifiers`." msgstr "" -#: ../../reference/lexical_analysis.rst:429 +#: ../../reference/lexical_analysis.rst:428 msgid "Literals" msgstr "" -#: ../../reference/lexical_analysis.rst:433 +#: ../../reference/lexical_analysis.rst:432 msgid "Literals are notations for constant values of some built-in types." msgstr "" -#: ../../reference/lexical_analysis.rst:444 +#: ../../reference/lexical_analysis.rst:443 msgid "String and Bytes literals" msgstr "" -#: ../../reference/lexical_analysis.rst:446 +#: ../../reference/lexical_analysis.rst:445 msgid "String literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:471 +#: ../../reference/lexical_analysis.rst:470 msgid "" "One syntactic restriction not indicated by these productions is that " "whitespace is not allowed between the :token:`~python-grammar:stringprefix` " @@ -536,7 +536,7 @@ msgid "" "`encodings`." msgstr "" -#: ../../reference/lexical_analysis.rst:481 +#: ../../reference/lexical_analysis.rst:480 msgid "" "In plain English: Both types of literals can be enclosed in matching single " "quotes (``'``) or double quotes (``\"``). They can also be enclosed in " @@ -546,7 +546,7 @@ msgid "" "newline, backslash itself, or the quote character." msgstr "" -#: ../../reference/lexical_analysis.rst:492 +#: ../../reference/lexical_analysis.rst:491 msgid "" "Bytes literals are always prefixed with ``'b'`` or ``'B'``; they produce an " "instance of the :class:`bytes` type instead of the :class:`str` type. They " @@ -554,7 +554,7 @@ msgid "" "greater must be expressed with escapes." msgstr "" -#: ../../reference/lexical_analysis.rst:501 +#: ../../reference/lexical_analysis.rst:500 msgid "" "Both string and bytes literals may optionally be prefixed with a letter " "``'r'`` or ``'R'``; such strings are called :dfn:`raw strings` and treat " @@ -564,20 +564,20 @@ msgid "" "3.x's the ``'ur'`` syntax is not supported." msgstr "" -#: ../../reference/lexical_analysis.rst:508 +#: ../../reference/lexical_analysis.rst:507 msgid "" "The ``'rb'`` prefix of raw bytes literals has been added as a synonym of " "``'br'``." msgstr "" -#: ../../reference/lexical_analysis.rst:512 +#: ../../reference/lexical_analysis.rst:511 msgid "" "Support for the unicode legacy literal (``u'value'``) was reintroduced to " "simplify the maintenance of dual Python 2.x and 3.x codebases. See :pep:" "`414` for more information." msgstr "" -#: ../../reference/lexical_analysis.rst:521 +#: ../../reference/lexical_analysis.rst:520 msgid "" "A string literal with ``'f'`` or ``'F'`` in its prefix is a :dfn:`formatted " "string literal`; see :ref:`f-strings`. The ``'f'`` may be combined with " @@ -585,7 +585,7 @@ msgid "" "are possible, but formatted bytes literals are not." msgstr "" -#: ../../reference/lexical_analysis.rst:526 +#: ../../reference/lexical_analysis.rst:525 msgid "" "In triple-quoted literals, unescaped newlines and quotes are allowed (and " "are retained), except that three unescaped quotes in a row terminate the " @@ -593,214 +593,214 @@ msgid "" "either ``'`` or ``\"``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:545 +#: ../../reference/lexical_analysis.rst:544 msgid "" "Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string " "and bytes literals are interpreted according to rules similar to those used " "by Standard C. The recognized escape sequences are:" msgstr "" -#: ../../reference/lexical_analysis.rst:550 -#: ../../reference/lexical_analysis.rst:583 +#: ../../reference/lexical_analysis.rst:549 +#: ../../reference/lexical_analysis.rst:582 msgid "Escape Sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:550 -#: ../../reference/lexical_analysis.rst:583 +#: ../../reference/lexical_analysis.rst:549 +#: ../../reference/lexical_analysis.rst:582 msgid "Meaning" msgstr "" -#: ../../reference/lexical_analysis.rst:550 -#: ../../reference/lexical_analysis.rst:583 +#: ../../reference/lexical_analysis.rst:549 +#: ../../reference/lexical_analysis.rst:582 msgid "Notes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:552 +#: ../../reference/lexical_analysis.rst:551 msgid "``\\newline``" msgstr "``\\newline``" -#: ../../reference/lexical_analysis.rst:552 +#: ../../reference/lexical_analysis.rst:551 msgid "Backslash and newline ignored" msgstr "" -#: ../../reference/lexical_analysis.rst:554 +#: ../../reference/lexical_analysis.rst:553 msgid "``\\\\``" msgstr "``\\\\``" -#: ../../reference/lexical_analysis.rst:554 +#: ../../reference/lexical_analysis.rst:553 msgid "Backslash (``\\``)" msgstr "" -#: ../../reference/lexical_analysis.rst:556 +#: ../../reference/lexical_analysis.rst:555 msgid "``\\'``" msgstr "``\\'``" -#: ../../reference/lexical_analysis.rst:556 +#: ../../reference/lexical_analysis.rst:555 msgid "Single quote (``'``)" msgstr "" -#: ../../reference/lexical_analysis.rst:558 +#: ../../reference/lexical_analysis.rst:557 msgid "``\\\"``" msgstr "``\\\"``" -#: ../../reference/lexical_analysis.rst:558 +#: ../../reference/lexical_analysis.rst:557 msgid "Double quote (``\"``)" msgstr "" -#: ../../reference/lexical_analysis.rst:560 +#: ../../reference/lexical_analysis.rst:559 msgid "``\\a``" msgstr "``\\a``" -#: ../../reference/lexical_analysis.rst:560 +#: ../../reference/lexical_analysis.rst:559 msgid "ASCII Bell (BEL)" msgstr "" -#: ../../reference/lexical_analysis.rst:562 +#: ../../reference/lexical_analysis.rst:561 msgid "``\\b``" msgstr "``\\b``" -#: ../../reference/lexical_analysis.rst:562 +#: ../../reference/lexical_analysis.rst:561 msgid "ASCII Backspace (BS)" msgstr "" -#: ../../reference/lexical_analysis.rst:564 +#: ../../reference/lexical_analysis.rst:563 msgid "``\\f``" msgstr "``\\f``" -#: ../../reference/lexical_analysis.rst:564 +#: ../../reference/lexical_analysis.rst:563 msgid "ASCII Formfeed (FF)" msgstr "" -#: ../../reference/lexical_analysis.rst:566 +#: ../../reference/lexical_analysis.rst:565 msgid "``\\n``" msgstr "``\\n``" -#: ../../reference/lexical_analysis.rst:566 +#: ../../reference/lexical_analysis.rst:565 msgid "ASCII Linefeed (LF)" msgstr "" -#: ../../reference/lexical_analysis.rst:568 +#: ../../reference/lexical_analysis.rst:567 msgid "``\\r``" msgstr "``\\r``" -#: ../../reference/lexical_analysis.rst:568 +#: ../../reference/lexical_analysis.rst:567 msgid "ASCII Carriage Return (CR)" msgstr "" -#: ../../reference/lexical_analysis.rst:570 +#: ../../reference/lexical_analysis.rst:569 msgid "``\\t``" msgstr "``\\t``" -#: ../../reference/lexical_analysis.rst:570 +#: ../../reference/lexical_analysis.rst:569 msgid "ASCII Horizontal Tab (TAB)" msgstr "" -#: ../../reference/lexical_analysis.rst:572 +#: ../../reference/lexical_analysis.rst:571 msgid "``\\v``" msgstr "``\\v``" -#: ../../reference/lexical_analysis.rst:572 +#: ../../reference/lexical_analysis.rst:571 msgid "ASCII Vertical Tab (VT)" msgstr "" -#: ../../reference/lexical_analysis.rst:574 +#: ../../reference/lexical_analysis.rst:573 msgid "``\\ooo``" msgstr "``\\ooo``" -#: ../../reference/lexical_analysis.rst:574 +#: ../../reference/lexical_analysis.rst:573 msgid "Character with octal value *ooo*" msgstr "" -#: ../../reference/lexical_analysis.rst:574 +#: ../../reference/lexical_analysis.rst:573 msgid "(1,3)" msgstr "(1,3)" -#: ../../reference/lexical_analysis.rst:577 +#: ../../reference/lexical_analysis.rst:576 msgid "``\\xhh``" msgstr "``\\xhh``" -#: ../../reference/lexical_analysis.rst:577 +#: ../../reference/lexical_analysis.rst:576 msgid "Character with hex value *hh*" msgstr "" -#: ../../reference/lexical_analysis.rst:577 +#: ../../reference/lexical_analysis.rst:576 msgid "(2,3)" msgstr "(2,3)" -#: ../../reference/lexical_analysis.rst:580 +#: ../../reference/lexical_analysis.rst:579 msgid "Escape sequences only recognized in string literals are:" msgstr "" -#: ../../reference/lexical_analysis.rst:585 +#: ../../reference/lexical_analysis.rst:584 msgid "``\\N{name}``" msgstr "``\\N{name}``" -#: ../../reference/lexical_analysis.rst:585 +#: ../../reference/lexical_analysis.rst:584 msgid "Character named *name* in the Unicode database" msgstr "" -#: ../../reference/lexical_analysis.rst:585 +#: ../../reference/lexical_analysis.rst:584 msgid "\\(4)" msgstr "\\(4)" -#: ../../reference/lexical_analysis.rst:588 +#: ../../reference/lexical_analysis.rst:587 msgid "``\\uxxxx``" msgstr "``\\uxxxx``" -#: ../../reference/lexical_analysis.rst:588 +#: ../../reference/lexical_analysis.rst:587 msgid "Character with 16-bit hex value *xxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:588 +#: ../../reference/lexical_analysis.rst:587 msgid "\\(5)" msgstr "\\(5)" -#: ../../reference/lexical_analysis.rst:591 +#: ../../reference/lexical_analysis.rst:590 msgid "``\\Uxxxxxxxx``" msgstr "``\\Uxxxxxxxx``" -#: ../../reference/lexical_analysis.rst:591 +#: ../../reference/lexical_analysis.rst:590 msgid "Character with 32-bit hex value *xxxxxxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:591 +#: ../../reference/lexical_analysis.rst:590 msgid "\\(6)" msgstr "\\(6)" -#: ../../reference/lexical_analysis.rst:595 +#: ../../reference/lexical_analysis.rst:594 msgid "Notes:" msgstr "註解:" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:597 msgid "As in Standard C, up to three octal digits are accepted." msgstr "" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:600 msgid "Unlike in Standard C, exactly two hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:604 +#: ../../reference/lexical_analysis.rst:603 msgid "" "In a bytes literal, hexadecimal and octal escapes denote the byte with the " "given value. In a string literal, these escapes denote a Unicode character " "with the given value." msgstr "" -#: ../../reference/lexical_analysis.rst:609 +#: ../../reference/lexical_analysis.rst:608 msgid "Support for name aliases [#]_ has been added." msgstr "" -#: ../../reference/lexical_analysis.rst:613 +#: ../../reference/lexical_analysis.rst:612 msgid "Exactly four hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:616 +#: ../../reference/lexical_analysis.rst:615 msgid "" "Any Unicode character can be encoded this way. Exactly eight hex digits are " "required." msgstr "" -#: ../../reference/lexical_analysis.rst:622 +#: ../../reference/lexical_analysis.rst:621 msgid "" "Unlike Standard C, all unrecognized escape sequences are left in the string " "unchanged, i.e., *the backslash is left in the result*. (This behavior is " @@ -810,14 +810,14 @@ msgid "" "category of unrecognized escapes for bytes literals." msgstr "" -#: ../../reference/lexical_analysis.rst:629 +#: ../../reference/lexical_analysis.rst:628 msgid "" "Unrecognized escape sequences produce a :exc:`DeprecationWarning`. In a " "future Python version they will be a :exc:`SyntaxWarning` and eventually a :" "exc:`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:634 +#: ../../reference/lexical_analysis.rst:633 msgid "" "Even in a raw literal, quotes can be escaped with a backslash, but the " "backslash remains in the result; for example, ``r\"\\\"\"`` is a valid " @@ -830,11 +830,11 @@ msgid "" "continuation." msgstr "" -#: ../../reference/lexical_analysis.rst:647 +#: ../../reference/lexical_analysis.rst:646 msgid "String literal concatenation" msgstr "" -#: ../../reference/lexical_analysis.rst:649 +#: ../../reference/lexical_analysis.rst:648 msgid "" "Multiple adjacent string or bytes literals (delimited by whitespace), " "possibly using different quoting conventions, are allowed, and their meaning " @@ -844,7 +844,7 @@ msgid "" "lines, or even to add comments to parts of strings, for example::" msgstr "" -#: ../../reference/lexical_analysis.rst:660 +#: ../../reference/lexical_analysis.rst:659 msgid "" "Note that this feature is defined at the syntactical level, but implemented " "at compile time. The '+' operator must be used to concatenate string " @@ -854,11 +854,11 @@ msgid "" "with plain string literals." msgstr "" -#: ../../reference/lexical_analysis.rst:681 +#: ../../reference/lexical_analysis.rst:680 msgid "Formatted string literals" msgstr "" -#: ../../reference/lexical_analysis.rst:685 +#: ../../reference/lexical_analysis.rst:684 msgid "" "A :dfn:`formatted string literal` or :dfn:`f-string` is a string literal " "that is prefixed with ``'f'`` or ``'F'``. These strings may contain " @@ -867,14 +867,14 @@ msgid "" "are really expressions evaluated at run time." msgstr "" -#: ../../reference/lexical_analysis.rst:691 +#: ../../reference/lexical_analysis.rst:690 msgid "" "Escape sequences are decoded like in ordinary string literals (except when a " "literal is also marked as a raw string). After decoding, the grammar for " "the contents of the string is:" msgstr "" -#: ../../reference/lexical_analysis.rst:705 +#: ../../reference/lexical_analysis.rst:704 msgid "" "The parts of the string outside curly braces are treated literally, except " "that any doubled curly braces ``'{{'`` or ``'}}'`` are replaced with the " @@ -887,7 +887,7 @@ msgid "" "replacement field ends with a closing curly bracket ``'}'``." msgstr "" -#: ../../reference/lexical_analysis.rst:715 +#: ../../reference/lexical_analysis.rst:714 msgid "" "Expressions in formatted string literals are treated like regular Python " "expressions surrounded by parentheses, with a few exceptions. An empty " @@ -898,14 +898,14 @@ msgid "" "where the formatted string literal appears, in order from left to right." msgstr "" -#: ../../reference/lexical_analysis.rst:724 +#: ../../reference/lexical_analysis.rst:723 msgid "" "Prior to Python 3.7, an :keyword:`await` expression and comprehensions " "containing an :keyword:`async for` clause were illegal in the expressions in " "formatted string literals due to a problem with the implementation." msgstr "" -#: ../../reference/lexical_analysis.rst:729 +#: ../../reference/lexical_analysis.rst:728 msgid "" "When the equal sign ``'='`` is provided, the output will have the expression " "text, the ``'='`` and the evaluated value. Spaces after the opening brace " @@ -916,18 +916,18 @@ msgid "" "r'`` is declared." msgstr "" -#: ../../reference/lexical_analysis.rst:737 +#: ../../reference/lexical_analysis.rst:736 msgid "The equal sign ``'='``." msgstr "" -#: ../../reference/lexical_analysis.rst:740 +#: ../../reference/lexical_analysis.rst:739 msgid "" "If a conversion is specified, the result of evaluating the expression is " "converted before formatting. Conversion ``'!s'`` calls :func:`str` on the " "result, ``'!r'`` calls :func:`repr`, and ``'!a'`` calls :func:`ascii`." msgstr "" -#: ../../reference/lexical_analysis.rst:744 +#: ../../reference/lexical_analysis.rst:743 msgid "" "The result is then formatted using the :func:`format` protocol. The format " "specifier is passed to the :meth:`__format__` method of the expression or " @@ -936,7 +936,7 @@ msgid "" "whole string." msgstr "" -#: ../../reference/lexical_analysis.rst:750 +#: ../../reference/lexical_analysis.rst:749 msgid "" "Top-level format specifiers may include nested replacement fields. These " "nested fields may include their own conversion fields and :ref:`format " @@ -945,111 +945,111 @@ msgid "" "as that used by the :meth:`str.format` method." msgstr "" -#: ../../reference/lexical_analysis.rst:756 +#: ../../reference/lexical_analysis.rst:755 msgid "" "Formatted string literals may be concatenated, but replacement fields cannot " "be split across literals." msgstr "" -#: ../../reference/lexical_analysis.rst:759 +#: ../../reference/lexical_analysis.rst:758 msgid "Some examples of formatted string literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:791 +#: ../../reference/lexical_analysis.rst:790 msgid "" "A consequence of sharing the same syntax as regular string literals is that " "characters in the replacement fields must not conflict with the quoting used " "in the outer formatted string literal::" msgstr "" -#: ../../reference/lexical_analysis.rst:798 +#: ../../reference/lexical_analysis.rst:797 msgid "" "Backslashes are not allowed in format expressions and will raise an error::" msgstr "" -#: ../../reference/lexical_analysis.rst:803 +#: ../../reference/lexical_analysis.rst:802 msgid "" "To include a value in which a backslash escape is required, create a " "temporary variable." msgstr "" -#: ../../reference/lexical_analysis.rst:810 +#: ../../reference/lexical_analysis.rst:809 msgid "" "Formatted string literals cannot be used as docstrings, even if they do not " "include expressions." msgstr "" -#: ../../reference/lexical_analysis.rst:821 +#: ../../reference/lexical_analysis.rst:820 msgid "" "See also :pep:`498` for the proposal that added formatted string literals, " "and :meth:`str.format`, which uses a related format string mechanism." msgstr "" -#: ../../reference/lexical_analysis.rst:828 +#: ../../reference/lexical_analysis.rst:827 msgid "Numeric literals" msgstr "" -#: ../../reference/lexical_analysis.rst:834 +#: ../../reference/lexical_analysis.rst:833 msgid "" "There are three types of numeric literals: integers, floating point numbers, " "and imaginary numbers. There are no complex literals (complex numbers can " "be formed by adding a real number and an imaginary number)." msgstr "" -#: ../../reference/lexical_analysis.rst:838 +#: ../../reference/lexical_analysis.rst:837 msgid "" "Note that numeric literals do not include a sign; a phrase like ``-1`` is " "actually an expression composed of the unary operator '``-``' and the " "literal ``1``." msgstr "" -#: ../../reference/lexical_analysis.rst:852 +#: ../../reference/lexical_analysis.rst:851 msgid "Integer literals" msgstr "" -#: ../../reference/lexical_analysis.rst:854 +#: ../../reference/lexical_analysis.rst:853 msgid "Integer literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:868 +#: ../../reference/lexical_analysis.rst:867 msgid "" "There is no limit for the length of integer literals apart from what can be " "stored in available memory." msgstr "" -#: ../../reference/lexical_analysis.rst:871 +#: ../../reference/lexical_analysis.rst:870 msgid "" "Underscores are ignored for determining the numeric value of the literal. " "They can be used to group digits for enhanced readability. One underscore " "can occur between digits, and after base specifiers like ``0x``." msgstr "" -#: ../../reference/lexical_analysis.rst:875 +#: ../../reference/lexical_analysis.rst:874 msgid "" "Note that leading zeros in a non-zero decimal number are not allowed. This " "is for disambiguation with C-style octal literals, which Python used before " "version 3.0." msgstr "" -#: ../../reference/lexical_analysis.rst:879 +#: ../../reference/lexical_analysis.rst:878 msgid "Some examples of integer literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:885 -#: ../../reference/lexical_analysis.rst:917 +#: ../../reference/lexical_analysis.rst:884 +#: ../../reference/lexical_analysis.rst:916 msgid "Underscores are now allowed for grouping purposes in literals." msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:895 msgid "Floating point literals" msgstr "" -#: ../../reference/lexical_analysis.rst:898 +#: ../../reference/lexical_analysis.rst:897 msgid "" "Floating point literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:908 +#: ../../reference/lexical_analysis.rst:907 msgid "" "Note that the integer and exponent parts are always interpreted using radix " "10. For example, ``077e010`` is legal, and denotes the same number as " @@ -1058,19 +1058,19 @@ msgid "" "grouping." msgstr "" -#: ../../reference/lexical_analysis.rst:913 +#: ../../reference/lexical_analysis.rst:912 msgid "Some examples of floating point literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:926 +#: ../../reference/lexical_analysis.rst:925 msgid "Imaginary literals" msgstr "" -#: ../../reference/lexical_analysis.rst:928 +#: ../../reference/lexical_analysis.rst:927 msgid "Imaginary literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:933 +#: ../../reference/lexical_analysis.rst:932 msgid "" "An imaginary literal yields a complex number with a real part of 0.0. " "Complex numbers are represented as a pair of floating point numbers and have " @@ -1079,23 +1079,23 @@ msgid "" "Some examples of imaginary literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:945 +#: ../../reference/lexical_analysis.rst:944 msgid "Operators" msgstr "" -#: ../../reference/lexical_analysis.rst:949 +#: ../../reference/lexical_analysis.rst:948 msgid "The following tokens are operators:" msgstr "" -#: ../../reference/lexical_analysis.rst:962 +#: ../../reference/lexical_analysis.rst:961 msgid "Delimiters" msgstr "" -#: ../../reference/lexical_analysis.rst:966 +#: ../../reference/lexical_analysis.rst:965 msgid "The following tokens serve as delimiters in the grammar:" msgstr "" -#: ../../reference/lexical_analysis.rst:975 +#: ../../reference/lexical_analysis.rst:974 msgid "" "The period can also occur in floating-point and imaginary literals. A " "sequence of three periods has a special meaning as an ellipsis literal. The " @@ -1103,22 +1103,22 @@ msgid "" "as delimiters, but also perform an operation." msgstr "" -#: ../../reference/lexical_analysis.rst:980 +#: ../../reference/lexical_analysis.rst:979 msgid "" "The following printing ASCII characters have special meaning as part of " "other tokens or are otherwise significant to the lexical analyzer:" msgstr "" -#: ../../reference/lexical_analysis.rst:987 +#: ../../reference/lexical_analysis.rst:986 msgid "" "The following printing ASCII characters are not used in Python. Their " "occurrence outside string literals and comments is an unconditional error:" msgstr "" -#: ../../reference/lexical_analysis.rst:996 +#: ../../reference/lexical_analysis.rst:995 msgid "Footnotes" msgstr "註解" -#: ../../reference/lexical_analysis.rst:997 +#: ../../reference/lexical_analysis.rst:996 msgid "https://www.unicode.org/Public/11.0.0/ucd/NameAliases.txt" msgstr "https://www.unicode.org/Public/11.0.0/ucd/NameAliases.txt" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 32e4c89531..bd20b7b3f4 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-28 00:10+0000\n" +"POT-Creation-Date: 2022-04-04 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -103,14 +103,11 @@ msgid "" "parentheses, the object is assigned to that target." msgstr "" -#: ../../reference/simple_stmts.rst:127 ../../reference/simple_stmts.rst:139 -msgid "" -"Else: The object must be an iterable with the same number of items as there " -"are targets in the target list, and the items are assigned, from left to " -"right, to the corresponding targets." +#: ../../reference/simple_stmts.rst:127 +msgid "Else:" msgstr "" -#: ../../reference/simple_stmts.rst:131 +#: ../../reference/simple_stmts.rst:129 msgid "" "If the target list contains one target prefixed with an asterisk, called a " "\"starred\" target: The object must be an iterable with at least as many " @@ -121,36 +118,43 @@ msgid "" "then assigned to the starred target (the list can be empty)." msgstr "" -#: ../../reference/simple_stmts.rst:143 +#: ../../reference/simple_stmts.rst:137 +msgid "" +"Else: The object must be an iterable with the same number of items as there " +"are targets in the target list, and the items are assigned, from left to " +"right, to the corresponding targets." +msgstr "" + +#: ../../reference/simple_stmts.rst:141 msgid "" "Assignment of an object to a single target is recursively defined as follows." msgstr "" -#: ../../reference/simple_stmts.rst:145 +#: ../../reference/simple_stmts.rst:143 msgid "If the target is an identifier (name):" msgstr "" -#: ../../reference/simple_stmts.rst:147 +#: ../../reference/simple_stmts.rst:145 msgid "" "If the name does not occur in a :keyword:`global` or :keyword:`nonlocal` " "statement in the current code block: the name is bound to the object in the " "current local namespace." msgstr "" -#: ../../reference/simple_stmts.rst:151 +#: ../../reference/simple_stmts.rst:149 msgid "" "Otherwise: the name is bound to the object in the global namespace or the " "outer namespace determined by :keyword:`nonlocal`, respectively." msgstr "" -#: ../../reference/simple_stmts.rst:156 +#: ../../reference/simple_stmts.rst:154 msgid "" "The name is rebound if it was already bound. This may cause the reference " "count for the object previously bound to the name to reach zero, causing the " "object to be deallocated and its destructor (if it has one) to be called." msgstr "" -#: ../../reference/simple_stmts.rst:162 +#: ../../reference/simple_stmts.rst:160 msgid "" "If the target is an attribute reference: The primary expression in the " "reference is evaluated. It should yield an object with assignable " @@ -160,7 +164,7 @@ msgid "" "necessarily :exc:`AttributeError`)." msgstr "" -#: ../../reference/simple_stmts.rst:171 +#: ../../reference/simple_stmts.rst:169 msgid "" "Note: If the object is a class instance and the attribute reference occurs " "on both sides of the assignment operator, the right-hand side expression, " @@ -172,13 +176,13 @@ msgid "" "side creates a new instance attribute as the target of the assignment::" msgstr "" -#: ../../reference/simple_stmts.rst:185 +#: ../../reference/simple_stmts.rst:183 msgid "" "This description does not necessarily apply to descriptor attributes, such " "as properties created with :func:`property`." msgstr "" -#: ../../reference/simple_stmts.rst:192 +#: ../../reference/simple_stmts.rst:190 msgid "" "If the target is a subscription: The primary expression in the reference is " "evaluated. It should yield either a mutable sequence object (such as a " @@ -186,7 +190,7 @@ msgid "" "expression is evaluated." msgstr "" -#: ../../reference/simple_stmts.rst:201 +#: ../../reference/simple_stmts.rst:199 msgid "" "If the primary is a mutable sequence object (such as a list), the subscript " "must yield an integer. If it is negative, the sequence's length is added to " @@ -197,7 +201,7 @@ msgid "" "items to a list)." msgstr "" -#: ../../reference/simple_stmts.rst:212 +#: ../../reference/simple_stmts.rst:210 msgid "" "If the primary is a mapping object (such as a dictionary), the subscript " "must have a type compatible with the mapping's key type, and the mapping is " @@ -207,13 +211,13 @@ msgid "" "value existed)." msgstr "" -#: ../../reference/simple_stmts.rst:218 +#: ../../reference/simple_stmts.rst:216 msgid "" "For user-defined objects, the :meth:`__setitem__` method is called with " "appropriate arguments." msgstr "" -#: ../../reference/simple_stmts.rst:223 +#: ../../reference/simple_stmts.rst:221 msgid "" "If the target is a slicing: The primary expression in the reference is " "evaluated. It should yield a mutable sequence object (such as a list). The " @@ -228,14 +232,14 @@ msgid "" "length of the target sequence, if the target sequence allows it." msgstr "" -#: ../../reference/simple_stmts.rst:237 +#: ../../reference/simple_stmts.rst:235 msgid "" "In the current implementation, the syntax for targets is taken to be the " "same as for expressions, and invalid syntax is rejected during the code " "generation phase, causing less detailed error messages." msgstr "" -#: ../../reference/simple_stmts.rst:241 +#: ../../reference/simple_stmts.rst:239 msgid "" "Although the definition of assignment implies that overlaps between the left-" "hand side and the right-hand side are 'simultaneous' (for example ``a, b = " @@ -244,31 +248,31 @@ msgid "" "instance, the following program prints ``[0, 2]``::" msgstr "" -#: ../../reference/simple_stmts.rst:255 +#: ../../reference/simple_stmts.rst:253 msgid ":pep:`3132` - Extended Iterable Unpacking" msgstr "" -#: ../../reference/simple_stmts.rst:256 +#: ../../reference/simple_stmts.rst:254 msgid "The specification for the ``*target`` feature." msgstr "" -#: ../../reference/simple_stmts.rst:262 +#: ../../reference/simple_stmts.rst:260 msgid "Augmented assignment statements" msgstr "" -#: ../../reference/simple_stmts.rst:280 +#: ../../reference/simple_stmts.rst:278 msgid "" "Augmented assignment is the combination, in a single statement, of a binary " "operation and an assignment statement:" msgstr "" -#: ../../reference/simple_stmts.rst:289 +#: ../../reference/simple_stmts.rst:287 msgid "" "(See section :ref:`primaries` for the syntax definitions of the last three " "symbols.)" msgstr "" -#: ../../reference/simple_stmts.rst:292 +#: ../../reference/simple_stmts.rst:290 msgid "" "An augmented assignment evaluates the target (which, unlike normal " "assignment statements, cannot be an unpacking) and the expression list, " @@ -277,7 +281,7 @@ msgid "" "evaluated once." msgstr "" -#: ../../reference/simple_stmts.rst:297 +#: ../../reference/simple_stmts.rst:295 msgid "" "An augmented assignment expression like ``x += 1`` can be rewritten as ``x = " "x + 1`` to achieve a similar, but not exactly equal effect. In the augmented " @@ -286,7 +290,7 @@ msgid "" "object and assigning that to the target, the old object is modified instead." msgstr "" -#: ../../reference/simple_stmts.rst:303 +#: ../../reference/simple_stmts.rst:301 msgid "" "Unlike normal assignments, augmented assignments evaluate the left-hand side " "*before* evaluating the right-hand side. For example, ``a[i] += f(x)`` " @@ -294,7 +298,7 @@ msgid "" "addition, and lastly, it writes the result back to ``a[i]``." msgstr "" -#: ../../reference/simple_stmts.rst:308 +#: ../../reference/simple_stmts.rst:306 msgid "" "With the exception of assigning to tuples and multiple targets in a single " "statement, the assignment done by augmented assignment statements is handled " @@ -303,31 +307,31 @@ msgid "" "assignment is the same as the normal binary operations." msgstr "" -#: ../../reference/simple_stmts.rst:314 +#: ../../reference/simple_stmts.rst:312 msgid "" "For targets which are attribute references, the same :ref:`caveat about " "class and instance attributes ` applies as for regular " "assignments." msgstr "" -#: ../../reference/simple_stmts.rst:321 +#: ../../reference/simple_stmts.rst:319 msgid "Annotated assignment statements" msgstr "" -#: ../../reference/simple_stmts.rst:328 +#: ../../reference/simple_stmts.rst:326 msgid "" ":term:`Annotation ` assignment is the combination, in a " "single statement, of a variable or attribute annotation and an optional " "assignment statement:" msgstr "" -#: ../../reference/simple_stmts.rst:335 +#: ../../reference/simple_stmts.rst:333 msgid "" "The difference from normal :ref:`assignment` is that only single target is " "allowed." msgstr "" -#: ../../reference/simple_stmts.rst:337 +#: ../../reference/simple_stmts.rst:335 msgid "" "For simple names as assignment targets, if in class or module scope, the " "annotations are evaluated and stored in a special class or module attribute :" @@ -337,19 +341,19 @@ msgid "" "if annotations are found statically." msgstr "" -#: ../../reference/simple_stmts.rst:345 +#: ../../reference/simple_stmts.rst:343 msgid "" "For expressions as assignment targets, the annotations are evaluated if in " "class or module scope, but not stored." msgstr "" -#: ../../reference/simple_stmts.rst:348 +#: ../../reference/simple_stmts.rst:346 msgid "" "If a name is annotated in a function scope, then this name is local for that " "scope. Annotations are never evaluated and stored in function scopes." msgstr "" -#: ../../reference/simple_stmts.rst:351 +#: ../../reference/simple_stmts.rst:349 msgid "" "If the right hand side is present, an annotated assignment performs the " "actual assignment before evaluating annotations (where applicable). If the " @@ -358,55 +362,55 @@ msgid "" "meth:`__setattr__` call." msgstr "" -#: ../../reference/simple_stmts.rst:362 +#: ../../reference/simple_stmts.rst:360 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr "" -#: ../../reference/simple_stmts.rst:360 +#: ../../reference/simple_stmts.rst:358 msgid "" "The proposal that added syntax for annotating the types of variables " "(including class variables and instance variables), instead of expressing " "them through comments." msgstr "" -#: ../../reference/simple_stmts.rst:366 +#: ../../reference/simple_stmts.rst:364 msgid ":pep:`484` - Type hints" msgstr "" -#: ../../reference/simple_stmts.rst:365 +#: ../../reference/simple_stmts.rst:363 msgid "" "The proposal that added the :mod:`typing` module to provide a standard " "syntax for type annotations that can be used in static analysis tools and " "IDEs." msgstr "" -#: ../../reference/simple_stmts.rst:369 +#: ../../reference/simple_stmts.rst:367 msgid "" "Now annotated assignments allow same expressions in the right hand side as " "the regular assignments. Previously, some expressions (like un-parenthesized " "tuple expressions) caused a syntax error." msgstr "" -#: ../../reference/simple_stmts.rst:378 +#: ../../reference/simple_stmts.rst:376 msgid "The :keyword:`!assert` statement" msgstr "" -#: ../../reference/simple_stmts.rst:385 +#: ../../reference/simple_stmts.rst:383 msgid "" "Assert statements are a convenient way to insert debugging assertions into a " "program:" msgstr "" -#: ../../reference/simple_stmts.rst:391 +#: ../../reference/simple_stmts.rst:389 msgid "The simple form, ``assert expression``, is equivalent to ::" msgstr "" -#: ../../reference/simple_stmts.rst:396 +#: ../../reference/simple_stmts.rst:394 msgid "" "The extended form, ``assert expression1, expression2``, is equivalent to ::" msgstr "" -#: ../../reference/simple_stmts.rst:405 +#: ../../reference/simple_stmts.rst:403 msgid "" "These equivalences assume that :const:`__debug__` and :exc:`AssertionError` " "refer to the built-in variables with those names. In the current " @@ -418,40 +422,40 @@ msgid "" "in the error message; it will be displayed as part of the stack trace." msgstr "" -#: ../../reference/simple_stmts.rst:414 +#: ../../reference/simple_stmts.rst:412 msgid "" "Assignments to :const:`__debug__` are illegal. The value for the built-in " "variable is determined when the interpreter starts." msgstr "" -#: ../../reference/simple_stmts.rst:421 +#: ../../reference/simple_stmts.rst:419 msgid "The :keyword:`!pass` statement" msgstr "" -#: ../../reference/simple_stmts.rst:431 +#: ../../reference/simple_stmts.rst:429 msgid "" ":keyword:`pass` is a null operation --- when it is executed, nothing " "happens. It is useful as a placeholder when a statement is required " "syntactically, but no code needs to be executed, for example::" msgstr "" -#: ../../reference/simple_stmts.rst:443 +#: ../../reference/simple_stmts.rst:441 msgid "The :keyword:`!del` statement" msgstr "" -#: ../../reference/simple_stmts.rst:453 +#: ../../reference/simple_stmts.rst:451 msgid "" "Deletion is recursively defined very similar to the way assignment is " "defined. Rather than spelling it out in full details, here are some hints." msgstr "" -#: ../../reference/simple_stmts.rst:456 +#: ../../reference/simple_stmts.rst:454 msgid "" "Deletion of a target list recursively deletes each target, from left to " "right." msgstr "" -#: ../../reference/simple_stmts.rst:462 +#: ../../reference/simple_stmts.rst:460 msgid "" "Deletion of a name removes the binding of that name from the local or global " "namespace, depending on whether the name occurs in a :keyword:`global` " @@ -459,7 +463,7 @@ msgid "" "`NameError` exception will be raised." msgstr "" -#: ../../reference/simple_stmts.rst:469 +#: ../../reference/simple_stmts.rst:467 msgid "" "Deletion of attribute references, subscriptions and slicings is passed to " "the primary object involved; deletion of a slicing is in general equivalent " @@ -467,42 +471,42 @@ msgid "" "determined by the sliced object)." msgstr "" -#: ../../reference/simple_stmts.rst:474 +#: ../../reference/simple_stmts.rst:472 msgid "" "Previously it was illegal to delete a name from the local namespace if it " "occurs as a free variable in a nested block." msgstr "" -#: ../../reference/simple_stmts.rst:482 +#: ../../reference/simple_stmts.rst:480 msgid "The :keyword:`!return` statement" msgstr "" -#: ../../reference/simple_stmts.rst:492 +#: ../../reference/simple_stmts.rst:490 msgid "" ":keyword:`return` may only occur syntactically nested in a function " "definition, not within a nested class definition." msgstr "" -#: ../../reference/simple_stmts.rst:495 +#: ../../reference/simple_stmts.rst:493 msgid "" "If an expression list is present, it is evaluated, else ``None`` is " "substituted." msgstr "" -#: ../../reference/simple_stmts.rst:497 +#: ../../reference/simple_stmts.rst:495 msgid "" ":keyword:`return` leaves the current function call with the expression list " "(or ``None``) as return value." msgstr "" -#: ../../reference/simple_stmts.rst:502 +#: ../../reference/simple_stmts.rst:500 msgid "" "When :keyword:`return` passes control out of a :keyword:`try` statement with " "a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " "before really leaving the function." msgstr "" -#: ../../reference/simple_stmts.rst:506 +#: ../../reference/simple_stmts.rst:504 msgid "" "In a generator function, the :keyword:`return` statement indicates that the " "generator is done and will cause :exc:`StopIteration` to be raised. The " @@ -510,7 +514,7 @@ msgid "" "`StopIteration` and becomes the :attr:`StopIteration.value` attribute." msgstr "" -#: ../../reference/simple_stmts.rst:511 +#: ../../reference/simple_stmts.rst:509 msgid "" "In an asynchronous generator function, an empty :keyword:`return` statement " "indicates that the asynchronous generator is done and will cause :exc:" @@ -518,11 +522,11 @@ msgid "" "is a syntax error in an asynchronous generator function." msgstr "" -#: ../../reference/simple_stmts.rst:519 +#: ../../reference/simple_stmts.rst:517 msgid "The :keyword:`!yield` statement" msgstr "" -#: ../../reference/simple_stmts.rst:531 +#: ../../reference/simple_stmts.rst:529 msgid "" "A :keyword:`yield` statement is semantically equivalent to a :ref:`yield " "expression `. The yield statement can be used to omit the " @@ -530,11 +534,11 @@ msgid "" "expression statement. For example, the yield statements ::" msgstr "" -#: ../../reference/simple_stmts.rst:539 +#: ../../reference/simple_stmts.rst:537 msgid "are equivalent to the yield expression statements ::" msgstr "" -#: ../../reference/simple_stmts.rst:544 +#: ../../reference/simple_stmts.rst:542 msgid "" "Yield expressions and statements are only used when defining a :term:" "`generator` function, and are only used in the body of the generator " @@ -542,17 +546,17 @@ msgid "" "definition to create a generator function instead of a normal function." msgstr "" -#: ../../reference/simple_stmts.rst:549 +#: ../../reference/simple_stmts.rst:547 msgid "" "For full details of :keyword:`yield` semantics, refer to the :ref:" "`yieldexpr` section." msgstr "" -#: ../../reference/simple_stmts.rst:555 +#: ../../reference/simple_stmts.rst:553 msgid "The :keyword:`!raise` statement" msgstr "" -#: ../../reference/simple_stmts.rst:566 +#: ../../reference/simple_stmts.rst:564 msgid "" "If no expressions are present, :keyword:`raise` re-raises the exception that " "is currently being handled, which is also known as the *active exception*. " @@ -560,7 +564,7 @@ msgid "" "exception is raised indicating that this is an error." msgstr "" -#: ../../reference/simple_stmts.rst:571 +#: ../../reference/simple_stmts.rst:569 msgid "" "Otherwise, :keyword:`raise` evaluates the first expression as the exception " "object. It must be either a subclass or an instance of :class:" @@ -568,13 +572,13 @@ msgid "" "when needed by instantiating the class with no arguments." msgstr "" -#: ../../reference/simple_stmts.rst:576 +#: ../../reference/simple_stmts.rst:574 msgid "" "The :dfn:`type` of the exception is the exception instance's class, the :dfn:" "`value` is the instance itself." msgstr "" -#: ../../reference/simple_stmts.rst:581 +#: ../../reference/simple_stmts.rst:579 msgid "" "A traceback object is normally created automatically when an exception is " "raised and attached to it as the :attr:`__traceback__` attribute, which is " @@ -584,7 +588,7 @@ msgid "" "argument), like so::" msgstr "" -#: ../../reference/simple_stmts.rst:593 +#: ../../reference/simple_stmts.rst:591 msgid "" "The ``from`` clause is used for exception chaining: if given, the second " "*expression* must be another exception class or instance. If the second " @@ -596,7 +600,7 @@ msgid "" "both exceptions will be printed::" msgstr "" -#: ../../reference/simple_stmts.rst:617 +#: ../../reference/simple_stmts.rst:615 msgid "" "A similar mechanism works implicitly if a new exception is raised when an " "exception is already being handled. An exception may be handled when an :" @@ -605,64 +609,64 @@ msgid "" "exception's :attr:`__context__` attribute::" msgstr "" -#: ../../reference/simple_stmts.rst:638 +#: ../../reference/simple_stmts.rst:636 msgid "" "Exception chaining can be explicitly suppressed by specifying :const:`None` " "in the ``from`` clause::" msgstr "" -#: ../../reference/simple_stmts.rst:650 +#: ../../reference/simple_stmts.rst:648 msgid "" "Additional information on exceptions can be found in section :ref:" "`exceptions`, and information about handling exceptions is in section :ref:" "`try`." msgstr "" -#: ../../reference/simple_stmts.rst:653 +#: ../../reference/simple_stmts.rst:651 msgid ":const:`None` is now permitted as ``Y`` in ``raise X from Y``." msgstr "" -#: ../../reference/simple_stmts.rst:656 +#: ../../reference/simple_stmts.rst:654 msgid "" "The ``__suppress_context__`` attribute to suppress automatic display of the " "exception context." msgstr "" -#: ../../reference/simple_stmts.rst:663 +#: ../../reference/simple_stmts.rst:661 msgid "The :keyword:`!break` statement" msgstr "" -#: ../../reference/simple_stmts.rst:674 +#: ../../reference/simple_stmts.rst:672 msgid "" ":keyword:`break` may only occur syntactically nested in a :keyword:`for` or :" "keyword:`while` loop, but not nested in a function or class definition " "within that loop." msgstr "" -#: ../../reference/simple_stmts.rst:681 +#: ../../reference/simple_stmts.rst:679 msgid "" "It terminates the nearest enclosing loop, skipping the optional :keyword:`!" "else` clause if the loop has one." msgstr "" -#: ../../reference/simple_stmts.rst:684 +#: ../../reference/simple_stmts.rst:682 msgid "" "If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control " "target keeps its current value." msgstr "" -#: ../../reference/simple_stmts.rst:689 +#: ../../reference/simple_stmts.rst:687 msgid "" "When :keyword:`break` passes control out of a :keyword:`try` statement with " "a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " "before really leaving the loop." msgstr "" -#: ../../reference/simple_stmts.rst:697 +#: ../../reference/simple_stmts.rst:695 msgid "The :keyword:`!continue` statement" msgstr "" -#: ../../reference/simple_stmts.rst:709 +#: ../../reference/simple_stmts.rst:707 msgid "" ":keyword:`continue` may only occur syntactically nested in a :keyword:`for` " "or :keyword:`while` loop, but not nested in a function or class definition " @@ -670,41 +674,41 @@ msgid "" "loop." msgstr "" -#: ../../reference/simple_stmts.rst:713 +#: ../../reference/simple_stmts.rst:711 msgid "" "When :keyword:`continue` passes control out of a :keyword:`try` statement " "with a :keyword:`finally` clause, that :keyword:`!finally` clause is " "executed before really starting the next loop cycle." msgstr "" -#: ../../reference/simple_stmts.rst:722 +#: ../../reference/simple_stmts.rst:720 msgid "The :keyword:`!import` statement" msgstr "" -#: ../../reference/simple_stmts.rst:743 +#: ../../reference/simple_stmts.rst:741 msgid "" "The basic import statement (no :keyword:`from` clause) is executed in two " "steps:" msgstr "" -#: ../../reference/simple_stmts.rst:746 +#: ../../reference/simple_stmts.rst:744 msgid "find a module, loading and initializing it if necessary" msgstr "" -#: ../../reference/simple_stmts.rst:747 +#: ../../reference/simple_stmts.rst:745 msgid "" "define a name or names in the local namespace for the scope where the :" "keyword:`import` statement occurs." msgstr "" -#: ../../reference/simple_stmts.rst:750 +#: ../../reference/simple_stmts.rst:748 msgid "" "When the statement contains multiple clauses (separated by commas) the two " "steps are carried out separately for each clause, just as though the clauses " "had been separated out into individual import statements." msgstr "" -#: ../../reference/simple_stmts.rst:755 +#: ../../reference/simple_stmts.rst:753 msgid "" "The details of the first step, finding and loading modules are described in " "greater detail in the section on the :ref:`import system `, " @@ -715,26 +719,26 @@ msgid "" "module, which includes execution of the module's code." msgstr "" -#: ../../reference/simple_stmts.rst:763 +#: ../../reference/simple_stmts.rst:761 msgid "" "If the requested module is retrieved successfully, it will be made available " "in the local namespace in one of three ways:" msgstr "" -#: ../../reference/simple_stmts.rst:768 +#: ../../reference/simple_stmts.rst:766 msgid "" "If the module name is followed by :keyword:`!as`, then the name following :" "keyword:`!as` is bound directly to the imported module." msgstr "" -#: ../../reference/simple_stmts.rst:770 +#: ../../reference/simple_stmts.rst:768 msgid "" "If no other name is specified, and the module being imported is a top level " "module, the module's name is bound in the local namespace as a reference to " "the imported module" msgstr "" -#: ../../reference/simple_stmts.rst:773 +#: ../../reference/simple_stmts.rst:771 msgid "" "If the module being imported is *not* a top level module, then the name of " "the top level package that contains the module is bound in the local " @@ -742,56 +746,56 @@ msgid "" "be accessed using its full qualified name rather than directly" msgstr "" -#: ../../reference/simple_stmts.rst:783 +#: ../../reference/simple_stmts.rst:781 msgid "The :keyword:`from` form uses a slightly more complex process:" msgstr "" -#: ../../reference/simple_stmts.rst:785 +#: ../../reference/simple_stmts.rst:783 msgid "" "find the module specified in the :keyword:`from` clause, loading and " "initializing it if necessary;" msgstr "" -#: ../../reference/simple_stmts.rst:787 +#: ../../reference/simple_stmts.rst:785 msgid "for each of the identifiers specified in the :keyword:`import` clauses:" msgstr "" -#: ../../reference/simple_stmts.rst:789 +#: ../../reference/simple_stmts.rst:787 msgid "check if the imported module has an attribute by that name" msgstr "" -#: ../../reference/simple_stmts.rst:790 +#: ../../reference/simple_stmts.rst:788 msgid "" "if not, attempt to import a submodule with that name and then check the " "imported module again for that attribute" msgstr "" -#: ../../reference/simple_stmts.rst:792 +#: ../../reference/simple_stmts.rst:790 msgid "if the attribute is not found, :exc:`ImportError` is raised." msgstr "" -#: ../../reference/simple_stmts.rst:793 +#: ../../reference/simple_stmts.rst:791 msgid "" "otherwise, a reference to that value is stored in the local namespace, using " "the name in the :keyword:`!as` clause if it is present, otherwise using the " "attribute name" msgstr "" -#: ../../reference/simple_stmts.rst:797 +#: ../../reference/simple_stmts.rst:795 msgid "Examples::" msgstr "" "範例:\n" "\n" "::" -#: ../../reference/simple_stmts.rst:807 +#: ../../reference/simple_stmts.rst:805 msgid "" "If the list of identifiers is replaced by a star (``'*'``), all public names " "defined in the module are bound in the local namespace for the scope where " "the :keyword:`import` statement occurs." msgstr "" -#: ../../reference/simple_stmts.rst:813 +#: ../../reference/simple_stmts.rst:811 msgid "" "The *public names* defined by a module are determined by checking the " "module's namespace for a variable named ``__all__``; if defined, it must be " @@ -804,14 +808,14 @@ msgid "" "API (such as library modules which were imported and used within the module)." msgstr "" -#: ../../reference/simple_stmts.rst:823 +#: ../../reference/simple_stmts.rst:821 msgid "" "The wild card form of import --- ``from module import *`` --- is only " "allowed at the module level. Attempting to use it in class or function " "definitions will raise a :exc:`SyntaxError`." msgstr "" -#: ../../reference/simple_stmts.rst:830 +#: ../../reference/simple_stmts.rst:828 msgid "" "When specifying what module to import you do not have to specify the " "absolute name of the module. When a module or package is contained within " @@ -828,31 +832,31 @@ msgid "" "the :ref:`relativeimports` section." msgstr "" -#: ../../reference/simple_stmts.rst:844 +#: ../../reference/simple_stmts.rst:842 msgid "" ":func:`importlib.import_module` is provided to support applications that " "determine dynamically the modules to be loaded." msgstr "" -#: ../../reference/simple_stmts.rst:847 +#: ../../reference/simple_stmts.rst:845 msgid "" "Raises an :ref:`auditing event ` ``import`` with arguments " "``module``, ``filename``, ``sys.path``, ``sys.meta_path``, ``sys." "path_hooks``." msgstr "" -#: ../../reference/simple_stmts.rst:852 +#: ../../reference/simple_stmts.rst:850 msgid "Future statements" msgstr "" -#: ../../reference/simple_stmts.rst:858 +#: ../../reference/simple_stmts.rst:856 msgid "" "A :dfn:`future statement` is a directive to the compiler that a particular " "module should be compiled using syntax or semantics that will be available " "in a specified future release of Python where the feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:862 +#: ../../reference/simple_stmts.rst:860 msgid "" "The future statement is intended to ease migration to future versions of " "Python that introduce incompatible changes to the language. It allows use " @@ -860,35 +864,35 @@ msgid "" "feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:874 +#: ../../reference/simple_stmts.rst:872 msgid "" "A future statement must appear near the top of the module. The only lines " "that can appear before a future statement are:" msgstr "" -#: ../../reference/simple_stmts.rst:877 +#: ../../reference/simple_stmts.rst:875 msgid "the module docstring (if any)," msgstr "" -#: ../../reference/simple_stmts.rst:878 +#: ../../reference/simple_stmts.rst:876 msgid "comments," msgstr "" -#: ../../reference/simple_stmts.rst:879 +#: ../../reference/simple_stmts.rst:877 msgid "blank lines, and" msgstr "" -#: ../../reference/simple_stmts.rst:880 +#: ../../reference/simple_stmts.rst:878 msgid "other future statements." msgstr "" -#: ../../reference/simple_stmts.rst:882 +#: ../../reference/simple_stmts.rst:880 msgid "" "The only feature that requires using the future statement is ``annotations`` " "(see :pep:`563`)." msgstr "" -#: ../../reference/simple_stmts.rst:885 +#: ../../reference/simple_stmts.rst:883 msgid "" "All historical features enabled by the future statement are still recognized " "by Python 3. The list includes ``absolute_import``, ``division``, " @@ -898,7 +902,7 @@ msgid "" "compatibility." msgstr "" -#: ../../reference/simple_stmts.rst:892 +#: ../../reference/simple_stmts.rst:890 msgid "" "A future statement is recognized and treated specially at compile time: " "Changes to the semantics of core constructs are often implemented by " @@ -908,37 +912,37 @@ msgid "" "cannot be pushed off until runtime." msgstr "" -#: ../../reference/simple_stmts.rst:899 +#: ../../reference/simple_stmts.rst:897 msgid "" "For any given release, the compiler knows which feature names have been " "defined, and raises a compile-time error if a future statement contains a " "feature not known to it." msgstr "" -#: ../../reference/simple_stmts.rst:903 +#: ../../reference/simple_stmts.rst:901 msgid "" "The direct runtime semantics are the same as for any import statement: there " "is a standard module :mod:`__future__`, described later, and it will be " "imported in the usual way at the time the future statement is executed." msgstr "" -#: ../../reference/simple_stmts.rst:907 +#: ../../reference/simple_stmts.rst:905 msgid "" "The interesting runtime semantics depend on the specific feature enabled by " "the future statement." msgstr "" -#: ../../reference/simple_stmts.rst:910 +#: ../../reference/simple_stmts.rst:908 msgid "Note that there is nothing special about the statement::" msgstr "" -#: ../../reference/simple_stmts.rst:914 +#: ../../reference/simple_stmts.rst:912 msgid "" "That is not a future statement; it's an ordinary import statement with no " "special semantics or syntax restrictions." msgstr "" -#: ../../reference/simple_stmts.rst:917 +#: ../../reference/simple_stmts.rst:915 msgid "" "Code compiled by calls to the built-in functions :func:`exec` and :func:" "`compile` that occur in a module :mod:`M` containing a future statement " @@ -947,7 +951,7 @@ msgid "" "--- see the documentation of that function for details." msgstr "" -#: ../../reference/simple_stmts.rst:923 +#: ../../reference/simple_stmts.rst:921 msgid "" "A future statement typed at an interactive interpreter prompt will take " "effect for the rest of the interpreter session. If an interpreter is " @@ -956,19 +960,19 @@ msgid "" "interactive session started after the script is executed." msgstr "" -#: ../../reference/simple_stmts.rst:931 +#: ../../reference/simple_stmts.rst:929 msgid ":pep:`236` - Back to the __future__" msgstr "" -#: ../../reference/simple_stmts.rst:932 +#: ../../reference/simple_stmts.rst:930 msgid "The original proposal for the __future__ mechanism." msgstr "" -#: ../../reference/simple_stmts.rst:938 +#: ../../reference/simple_stmts.rst:936 msgid "The :keyword:`!global` statement" msgstr "" -#: ../../reference/simple_stmts.rst:948 +#: ../../reference/simple_stmts.rst:946 msgid "" "The :keyword:`global` statement is a declaration which holds for the entire " "current code block. It means that the listed identifiers are to be " @@ -977,13 +981,13 @@ msgid "" "globals without being declared global." msgstr "" -#: ../../reference/simple_stmts.rst:954 +#: ../../reference/simple_stmts.rst:952 msgid "" "Names listed in a :keyword:`global` statement must not be used in the same " "code block textually preceding that :keyword:`!global` statement." msgstr "" -#: ../../reference/simple_stmts.rst:957 +#: ../../reference/simple_stmts.rst:955 msgid "" "Names listed in a :keyword:`global` statement must not be defined as formal " "parameters, or as targets in :keyword:`with` statements or :keyword:`except` " @@ -991,14 +995,14 @@ msgid "" "function definition, :keyword:`import` statement, or variable annotation." msgstr "" -#: ../../reference/simple_stmts.rst:964 +#: ../../reference/simple_stmts.rst:962 msgid "" "The current implementation does not enforce some of these restrictions, but " "programs should not abuse this freedom, as future implementations may " "enforce them or silently change the meaning of the program." msgstr "" -#: ../../reference/simple_stmts.rst:973 +#: ../../reference/simple_stmts.rst:971 msgid "" "**Programmer's note:** :keyword:`global` is a directive to the parser. It " "applies only to code parsed at the same time as the :keyword:`!global` " @@ -1010,11 +1014,11 @@ msgid "" "func:`compile` functions." msgstr "" -#: ../../reference/simple_stmts.rst:985 +#: ../../reference/simple_stmts.rst:983 msgid "The :keyword:`!nonlocal` statement" msgstr "" -#: ../../reference/simple_stmts.rst:997 +#: ../../reference/simple_stmts.rst:995 msgid "" "The :keyword:`nonlocal` statement causes the listed identifiers to refer to " "previously bound variables in the nearest enclosing scope excluding globals. " @@ -1023,7 +1027,7 @@ msgid "" "variables outside of the local scope besides the global (module) scope." msgstr "" -#: ../../reference/simple_stmts.rst:1007 +#: ../../reference/simple_stmts.rst:1005 msgid "" "Names listed in a :keyword:`nonlocal` statement, unlike those listed in a :" "keyword:`global` statement, must refer to pre-existing bindings in an " @@ -1031,16 +1035,16 @@ msgid "" "be determined unambiguously)." msgstr "" -#: ../../reference/simple_stmts.rst:1012 +#: ../../reference/simple_stmts.rst:1010 msgid "" "Names listed in a :keyword:`nonlocal` statement must not collide with pre-" "existing bindings in the local scope." msgstr "" -#: ../../reference/simple_stmts.rst:1017 +#: ../../reference/simple_stmts.rst:1015 msgid ":pep:`3104` - Access to Names in Outer Scopes" msgstr "" -#: ../../reference/simple_stmts.rst:1018 +#: ../../reference/simple_stmts.rst:1016 msgid "The specification for the :keyword:`nonlocal` statement." msgstr "" diff --git a/tutorial/stdlib.po b/tutorial/stdlib.po index f1a8cbd366..5f31b9bbb2 100644 --- a/tutorial/stdlib.po +++ b/tutorial/stdlib.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-04-04 00:13+0000\n" "PO-Revision-Date: 2022-01-31 18:14+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -113,7 +113,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:88 +#: ../../tutorial/stdlib.rst:89 msgid "" "When run at the command line with ``python top.py --lines=5 alpha.txt beta." "txt``, the script sets ``args.lines`` to ``5`` and ``args.filenames`` to " @@ -123,11 +123,11 @@ msgstr "" "``args.lines`` 設為 ``5``,並將 ``args.filenames`` 設為 ``['alpha.txt', " "'beta.txt']``。" -#: ../../tutorial/stdlib.rst:96 +#: ../../tutorial/stdlib.rst:97 msgid "Error Output Redirection and Program Termination" msgstr "錯誤輸出重新導向與程式終止" -#: ../../tutorial/stdlib.rst:98 +#: ../../tutorial/stdlib.rst:99 msgid "" "The :mod:`sys` module also has attributes for *stdin*, *stdout*, and " "*stderr*. The latter is useful for emitting warnings and error messages to " @@ -138,15 +138,15 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:105 +#: ../../tutorial/stdlib.rst:106 msgid "The most direct way to terminate a script is to use ``sys.exit()``." msgstr "終止腳本最直接的方式就是利用 ``sys.exit()``。" -#: ../../tutorial/stdlib.rst:111 +#: ../../tutorial/stdlib.rst:112 msgid "String Pattern Matching" msgstr "字串樣式比對" -#: ../../tutorial/stdlib.rst:113 +#: ../../tutorial/stdlib.rst:114 msgid "" "The :mod:`re` module provides regular expression tools for advanced string " "processing. For complex matching and manipulation, regular expressions offer " @@ -157,7 +157,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:123 +#: ../../tutorial/stdlib.rst:124 msgid "" "When only simple capabilities are needed, string methods are preferred " "because they are easier to read and debug::" @@ -167,11 +167,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:133 +#: ../../tutorial/stdlib.rst:134 msgid "Mathematics" msgstr "數學相關" -#: ../../tutorial/stdlib.rst:135 +#: ../../tutorial/stdlib.rst:136 msgid "" "The :mod:`math` module gives access to the underlying C library functions " "for floating point math::" @@ -180,14 +180,14 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:144 +#: ../../tutorial/stdlib.rst:145 msgid "The :mod:`random` module provides tools for making random selections::" msgstr "" ":mod:`random` 模組提供了隨機選擇的工具:\n" "\n" "::" -#: ../../tutorial/stdlib.rst:156 +#: ../../tutorial/stdlib.rst:157 msgid "" "The :mod:`statistics` module calculates basic statistical properties (the " "mean, median, variance, etc.) of numeric data::" @@ -197,17 +197,17 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:168 +#: ../../tutorial/stdlib.rst:169 msgid "" "The SciPy project has many other modules for numerical " "computations." msgstr "SciPy 專案 上也有許多數值計算相關的模組。" -#: ../../tutorial/stdlib.rst:174 +#: ../../tutorial/stdlib.rst:175 msgid "Internet Access" msgstr "網路存取" -#: ../../tutorial/stdlib.rst:176 +#: ../../tutorial/stdlib.rst:177 msgid "" "There are a number of modules for accessing the internet and processing " "internet protocols. Two of the simplest are :mod:`urllib.request` for " @@ -218,15 +218,15 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:199 +#: ../../tutorial/stdlib.rst:200 msgid "(Note that the second example needs a mailserver running on localhost.)" msgstr "(注意第二個例子中需要在本地端執行一個郵件伺服器。)" -#: ../../tutorial/stdlib.rst:205 +#: ../../tutorial/stdlib.rst:206 msgid "Dates and Times" msgstr "日期與時間" -#: ../../tutorial/stdlib.rst:207 +#: ../../tutorial/stdlib.rst:208 msgid "" "The :mod:`datetime` module supplies classes for manipulating dates and times " "in both simple and complex ways. While date and time arithmetic is " @@ -240,11 +240,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:231 +#: ../../tutorial/stdlib.rst:232 msgid "Data Compression" msgstr "資料壓縮" -#: ../../tutorial/stdlib.rst:233 +#: ../../tutorial/stdlib.rst:234 msgid "" "Common data archiving and compression formats are directly supported by " "modules including: :mod:`zlib`, :mod:`gzip`, :mod:`bz2`, :mod:`lzma`, :mod:" @@ -256,11 +256,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:253 +#: ../../tutorial/stdlib.rst:254 msgid "Performance Measurement" msgstr "效能量測" -#: ../../tutorial/stdlib.rst:255 +#: ../../tutorial/stdlib.rst:256 msgid "" "Some Python users develop a deep interest in knowing the relative " "performance of different approaches to the same problem. Python provides a " @@ -269,7 +269,7 @@ msgstr "" "有一些 Python 使用者很想了解同個問題的不同實作方法的效能差異。Python 提供了評" "估效能差異的工具。" -#: ../../tutorial/stdlib.rst:259 +#: ../../tutorial/stdlib.rst:260 msgid "" "For example, it may be tempting to use the tuple packing and unpacking " "feature instead of the traditional approach to swapping arguments. The :mod:" @@ -280,7 +280,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:269 +#: ../../tutorial/stdlib.rst:270 msgid "" "In contrast to :mod:`timeit`'s fine level of granularity, the :mod:`profile` " "and :mod:`pstats` modules provide tools for identifying time critical " @@ -290,11 +290,11 @@ msgstr "" "`pstats` 模組則提供了一些在大型的程式碼識別時間使用上關鍵的區塊 (time " "critical section) 的工具。" -#: ../../tutorial/stdlib.rst:277 +#: ../../tutorial/stdlib.rst:278 msgid "Quality Control" msgstr "品質控管" -#: ../../tutorial/stdlib.rst:279 +#: ../../tutorial/stdlib.rst:280 msgid "" "One approach for developing high quality software is to write tests for each " "function as it is developed and to run those tests frequently during the " @@ -303,7 +303,7 @@ msgstr "" "達到高品質軟體的一個方法,是在開發時對每個函式寫測試,以及在開發過程中要不斷" "地跑這些測試。" -#: ../../tutorial/stdlib.rst:283 +#: ../../tutorial/stdlib.rst:284 msgid "" "The :mod:`doctest` module provides a tool for scanning a module and " "validating tests embedded in a program's docstrings. Test construction is " @@ -319,7 +319,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:301 +#: ../../tutorial/stdlib.rst:302 msgid "" "The :mod:`unittest` module is not as effortless as the :mod:`doctest` " "module, but it allows a more comprehensive set of tests to be maintained in " @@ -330,11 +330,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/stdlib.rst:323 +#: ../../tutorial/stdlib.rst:324 msgid "Batteries Included" msgstr "標準模組庫" -#: ../../tutorial/stdlib.rst:325 +#: ../../tutorial/stdlib.rst:326 msgid "" "Python has a \"batteries included\" philosophy. This is best seen through " "the sophisticated and robust capabilities of its larger packages. For " @@ -343,16 +343,17 @@ msgstr "" "\"Batteries included\" 是 Python 的設計哲學。這個理念可以透過使用它的大型套" "件,感受複雜與強大的功能,來得到印證。例如:" -#: ../../tutorial/stdlib.rst:328 +#: ../../tutorial/stdlib.rst:329 msgid "" "The :mod:`xmlrpc.client` and :mod:`xmlrpc.server` modules make implementing " "remote procedure calls into an almost trivial task. Despite the modules " "names, no direct knowledge or handling of XML is needed." msgstr "" "使用 :mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模組使實作遠端程序呼叫變得" -"更為容易。即使模組名稱裡有 XML,使用者並不需要直接操作 XML 檔案或事先具備相關知識。" +"更為容易。即使模組名稱裡有 XML,使用者並不需要直接操作 XML 檔案或事先具備相關" +"知識。" -#: ../../tutorial/stdlib.rst:332 +#: ../../tutorial/stdlib.rst:333 msgid "" "The :mod:`email` package is a library for managing email messages, including " "MIME and other :rfc:`2822`-based message documents. Unlike :mod:`smtplib` " @@ -363,10 +364,10 @@ msgid "" msgstr "" "函式庫 :mod:`email` 套件用來管理 MIME 和其他 :rfc:`2822` 相關電子郵件訊息的文" "件。相異於 :mod:`smtplib` 和 :mod:`poplib` 這些實際用來發送與接收訊息的模組," -"email 套件擁有更完整的工具集,可用於建立與解碼複雜訊息結構(包含附件檔案)" -"以及實作編碼與標頭協定。" +"email 套件擁有更完整的工具集,可用於建立與解碼複雜訊息結構(包含附件檔案)以" +"及實作編碼與標頭協定。" -#: ../../tutorial/stdlib.rst:339 +#: ../../tutorial/stdlib.rst:340 msgid "" "The :mod:`json` package provides robust support for parsing this popular " "data interchange format. The :mod:`csv` module supports direct reading and " @@ -377,12 +378,12 @@ msgid "" "applications and other tools." msgstr "" ":mod:`json` 套件對 JSON 資料交換格式的剖析,提供強大的支援。\\ :mod:`csv` 模" -"組則提供直接讀寫 CSV(以逗號分隔值的檔案格式,通常資料庫和電子表格都有支援)。\\ :" -"mod:`xml.etree.ElementTree`\\ 、\\ :mod:`xml.dom` 與 :mod:`xml.sax` 套件則支" -"援 XML 的處理。綜觀所有,這些模組和套件都簡化了 Python 應用程式與其他工具之間" -"的資料交換。" +"組則提供直接讀寫 CSV(以逗號分隔值的檔案格式,通常資料庫和電子表格都有支" +"援)。\\ :mod:`xml.etree.ElementTree`\\ 、\\ :mod:`xml.dom` 與 :mod:`xml." +"sax` 套件則支援 XML 的處理。綜觀所有,這些模組和套件都簡化了 Python 應用程式" +"與其他工具之間的資料交換。" -#: ../../tutorial/stdlib.rst:348 +#: ../../tutorial/stdlib.rst:349 msgid "" "The :mod:`sqlite3` module is a wrapper for the SQLite database library, " "providing a persistent database that can be updated and accessed using " @@ -391,7 +392,7 @@ msgstr "" ":mod:`sqllite3` 模組是 SQLite 資料庫函式庫的一層包裝,提供一個具持久性的資料" "庫,可以使用稍微非標準的 SQL 語法來對它進行更新與存取。" -#: ../../tutorial/stdlib.rst:352 +#: ../../tutorial/stdlib.rst:353 msgid "" "Internationalization is supported by a number of modules including :mod:" "`gettext`, :mod:`locale`, and the :mod:`codecs` package." From f1b140669afada258bba58a0efe0efba03159699 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Apr 2022 00:15:09 +0000 Subject: [PATCH 4/7] sync with cpython 6b4b892e --- using/windows.po | 218 ++++++++++++++++++++++++----------------------- 1 file changed, 111 insertions(+), 107 deletions(-) diff --git a/using/windows.po b/using/windows.po index a60523e6de..4fde2d2a22 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-23 00:13+0000\n" +"POT-Creation-Date: 2022-04-05 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1174,11 +1174,15 @@ msgid "" "unless the option was selected on installation." msgstr "" -#: ../../using/windows.rst:714 +#: ../../using/windows.rst:717 +msgid "You should see the currently installed versions of Python." +msgstr "" + +#: ../../using/windows.rst:720 msgid "Virtual environments" msgstr "虛擬環境(Virtual environment)" -#: ../../using/windows.rst:718 +#: ../../using/windows.rst:724 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -1188,27 +1192,27 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:726 +#: ../../using/windows.rst:732 msgid "From a script" msgstr "" -#: ../../using/windows.rst:728 +#: ../../using/windows.rst:734 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:737 +#: ../../using/windows.rst:743 msgid "From the directory in which hello.py lives, execute the command:" msgstr "" -#: ../../using/windows.rst:743 +#: ../../using/windows.rst:749 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:750 +#: ../../using/windows.rst:756 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " @@ -1217,7 +1221,7 @@ msgid "" "information printed." msgstr "" -#: ../../using/windows.rst:756 +#: ../../using/windows.rst:762 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -1225,11 +1229,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:762 +#: ../../using/windows.rst:768 msgid "From file associations" msgstr "從檔案關聯" -#: ../../using/windows.rst:764 +#: ../../using/windows.rst:770 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -1238,17 +1242,17 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:770 +#: ../../using/windows.rst:776 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:774 +#: ../../using/windows.rst:780 msgid "Shebang Lines" msgstr "" -#: ../../using/windows.rst:776 +#: ../../using/windows.rst:782 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -1258,34 +1262,34 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:783 +#: ../../using/windows.rst:789 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:787 +#: ../../using/windows.rst:793 msgid "``/usr/bin/env python``" msgstr "``/usr/bin/env python``" -#: ../../using/windows.rst:788 +#: ../../using/windows.rst:794 msgid "``/usr/bin/python``" msgstr "``/usr/bin/python``" -#: ../../using/windows.rst:789 +#: ../../using/windows.rst:795 msgid "``/usr/local/bin/python``" msgstr "``/usr/local/bin/python``" -#: ../../using/windows.rst:790 +#: ../../using/windows.rst:796 msgid "``python``" msgstr "``python``" -#: ../../using/windows.rst:792 +#: ../../using/windows.rst:798 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:798 +#: ../../using/windows.rst:804 msgid "" "The default Python will be located and used. As many Python scripts written " "to work on Unix will already have this line, you should find these scripts " @@ -1294,7 +1298,7 @@ msgid "" "of the shebang lines starting with ``/usr``." msgstr "" -#: ../../using/windows.rst:804 +#: ../../using/windows.rst:810 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -1303,14 +1307,14 @@ msgid "" "python 2.7." msgstr "" -#: ../../using/windows.rst:812 +#: ../../using/windows.rst:818 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:816 +#: ../../using/windows.rst:822 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -1319,29 +1323,29 @@ msgid "" "search." msgstr "" -#: ../../using/windows.rst:822 +#: ../../using/windows.rst:828 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:824 +#: ../../using/windows.rst:830 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:831 +#: ../../using/windows.rst:837 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:834 +#: ../../using/windows.rst:840 msgid "Customization" msgstr "" -#: ../../using/windows.rst:837 +#: ../../using/windows.rst:843 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:839 +#: ../../using/windows.rst:845 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's \"application data\" directory (i.e. the directory returned by " @@ -1351,7 +1355,7 @@ msgid "" "launcher (i.e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:846 +#: ../../using/windows.rst:852 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -1359,11 +1363,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:851 +#: ../../using/windows.rst:857 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:853 +#: ../../using/windows.rst:859 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -1373,13 +1377,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:859 +#: ../../using/windows.rst:865 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:862 +#: ../../using/windows.rst:868 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -1389,7 +1393,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:869 +#: ../../using/windows.rst:875 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -1400,7 +1404,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:877 +#: ../../using/windows.rst:883 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -1414,30 +1418,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:888 +#: ../../using/windows.rst:894 msgid "Examples:" msgstr "範例:" -#: ../../using/windows.rst:890 +#: ../../using/windows.rst:896 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:894 +#: ../../using/windows.rst:900 msgid "" "The commands ``python3.1`` and ``python2.7`` will not consult any options at " "all as the versions are fully specified." msgstr "" -#: ../../using/windows.rst:897 +#: ../../using/windows.rst:903 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:900 +#: ../../using/windows.rst:906 msgid "" "If ``PY_PYTHON=3.1-32``, the command ``python`` will use the 32-bit " "implementation of 3.1 whereas the command ``python3`` will use the latest " @@ -1445,13 +1449,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:905 +#: ../../using/windows.rst:911 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1``, the commands ``python`` and " "``python3`` will both use specifically 3.1" msgstr "" -#: ../../using/windows.rst:908 +#: ../../using/windows.rst:914 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -1461,25 +1465,25 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:915 +#: ../../using/windows.rst:921 msgid "For example:" msgstr "" -#: ../../using/windows.rst:917 +#: ../../using/windows.rst:923 msgid "Setting ``PY_PYTHON=3.1`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:924 +#: ../../using/windows.rst:930 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:934 +#: ../../using/windows.rst:940 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:936 +#: ../../using/windows.rst:942 msgid "" "If an environment variable ``PYLAUNCH_DEBUG`` is set (to any value), the " "launcher will print diagnostic information to stderr (i.e. to the console). " @@ -1489,11 +1493,11 @@ msgid "" "target Python." msgstr "" -#: ../../using/windows.rst:948 +#: ../../using/windows.rst:954 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:950 +#: ../../using/windows.rst:956 msgid "" "Python usually stores its library (and thereby your site-packages folder) in " "the installation directory. So, if you had installed Python to :file:`C:\\" @@ -1502,7 +1506,7 @@ msgid "" "\\\\site-packages\\\\`." msgstr "" -#: ../../using/windows.rst:956 +#: ../../using/windows.rst:962 msgid "" "To completely override :data:`sys.path`, create a ``._pth`` file with the " "same name as the DLL (``python37._pth``) or the executable (``python._pth``) " @@ -1511,7 +1515,7 @@ msgid "" "allows paths to be restricted for any program loading the runtime if desired." msgstr "" -#: ../../using/windows.rst:962 +#: ../../using/windows.rst:968 msgid "" "When the file exists, all registry and environment variables are ignored, " "isolated mode is enabled, and :mod:`site` is not imported unless one line in " @@ -1521,25 +1525,25 @@ msgid "" "arbitrary code cannot be specified." msgstr "" -#: ../../using/windows.rst:969 +#: ../../using/windows.rst:975 msgid "" "Note that ``.pth`` files (without leading underscore) will be processed " "normally by the :mod:`site` module when ``import site`` has been specified." msgstr "" -#: ../../using/windows.rst:972 +#: ../../using/windows.rst:978 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:975 +#: ../../using/windows.rst:981 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:978 +#: ../../using/windows.rst:984 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1547,7 +1551,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:983 +#: ../../using/windows.rst:989 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1557,7 +1561,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:990 +#: ../../using/windows.rst:996 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1568,31 +1572,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:998 +#: ../../using/windows.rst:1004 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:1002 +#: ../../using/windows.rst:1008 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1005 +#: ../../using/windows.rst:1011 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1009 +#: ../../using/windows.rst:1015 msgid "The end result of all this is:" msgstr "最終這所有的結果為:" -#: ../../using/windows.rst:1011 +#: ../../using/windows.rst:1017 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1600,7 +1604,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1016 +#: ../../using/windows.rst:1022 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1608,20 +1612,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1020 +#: ../../using/windows.rst:1026 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1024 +#: ../../using/windows.rst:1030 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1027 +#: ../../using/windows.rst:1033 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1629,20 +1633,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1032 +#: ../../using/windows.rst:1038 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly call :c:func:`Py_SetPath` or (at least) :c:func:" "`Py_SetProgramName` before :c:func:`Py_Initialize`." msgstr "" -#: ../../using/windows.rst:1036 +#: ../../using/windows.rst:1042 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1045 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1651,7 +1655,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1045 +#: ../../using/windows.rst:1051 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1661,19 +1665,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1054 +#: ../../using/windows.rst:1060 msgid "" "Adds ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1056 +#: ../../using/windows.rst:1062 msgid "" "Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the " "executable." msgstr "" -#: ../../using/windows.rst:1062 +#: ../../using/windows.rst:1068 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1681,88 +1685,88 @@ msgid "" "explicitly added to :attr:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1068 +#: ../../using/windows.rst:1074 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1070 +#: ../../using/windows.rst:1076 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1074 +#: ../../using/windows.rst:1080 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1078 +#: ../../using/windows.rst:1084 msgid "PyWin32" msgstr "PyWin32" -#: ../../using/windows.rst:1080 +#: ../../using/windows.rst:1086 msgid "" "The `PyWin32 `_ module by Mark Hammond is " "a collection of modules for advanced Windows-specific support. This " "includes utilities for:" msgstr "" -#: ../../using/windows.rst:1084 +#: ../../using/windows.rst:1090 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1087 +#: ../../using/windows.rst:1093 msgid "Win32 API calls" msgstr "" -#: ../../using/windows.rst:1088 +#: ../../using/windows.rst:1094 msgid "Registry" msgstr "登錄檔(Registry)" -#: ../../using/windows.rst:1089 +#: ../../using/windows.rst:1095 msgid "Event log" msgstr "事件日誌(Event log)" -#: ../../using/windows.rst:1090 +#: ../../using/windows.rst:1096 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1093 +#: ../../using/windows.rst:1099 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1100 +#: ../../using/windows.rst:1106 msgid "" "`Win32 How Do I...? `_" msgstr "" "`Win32 How Do I...? `_" -#: ../../using/windows.rst:1100 +#: ../../using/windows.rst:1106 msgid "by Tim Golden" msgstr "由 Tim Golden 所著" -#: ../../using/windows.rst:1102 +#: ../../using/windows.rst:1108 msgid "`Python and COM `_" msgstr "`Python and COM `_" -#: ../../using/windows.rst:1103 +#: ../../using/windows.rst:1109 msgid "by David and Paul Boddie" msgstr "由 David 與 Paul Boddie 所著" -#: ../../using/windows.rst:1107 +#: ../../using/windows.rst:1113 msgid "cx_Freeze" msgstr "cx_Freeze" -#: ../../using/windows.rst:1109 +#: ../../using/windows.rst:1115 msgid "" "`cx_Freeze `_ is a :mod:" "`distutils` extension (see :ref:`extending-distutils`) which wraps Python " @@ -1771,28 +1775,28 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1117 +#: ../../using/windows.rst:1123 msgid "WConio" msgstr "WConio" -#: ../../using/windows.rst:1119 +#: ../../using/windows.rst:1125 msgid "" "Since Python's advanced terminal handling layer, :mod:`curses`, is " "restricted to Unix-like systems, there is a library exclusive to Windows as " "well: Windows Console I/O for Python." msgstr "" -#: ../../using/windows.rst:1123 +#: ../../using/windows.rst:1129 msgid "" "`WConio `_ is a wrapper " "for Turbo-C's :file:`CONIO.H`, used to create text user interfaces." msgstr "" -#: ../../using/windows.rst:1129 +#: ../../using/windows.rst:1135 msgid "Compiling Python on Windows" msgstr "編譯 Python 在 Windows" -#: ../../using/windows.rst:1131 +#: ../../using/windows.rst:1137 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -1800,52 +1804,52 @@ msgid "" "devguide.python.org/setup/#getting-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1136 +#: ../../using/windows.rst:1142 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio 2015, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1140 +#: ../../using/windows.rst:1146 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1143 +#: ../../using/windows.rst:1149 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1149 +#: ../../using/windows.rst:1155 msgid "" "`Python + Windows + distutils + SWIG + gcc MinGW `_" msgstr "" -#: ../../using/windows.rst:1148 +#: ../../using/windows.rst:1154 msgid "" "or \"Creating Python extensions in C/C++ with SWIG and compiling them with " "MinGW gcc under Windows\" or \"Installing Python extension with distutils " "and without Microsoft Visual C++\" by Sébastien Sauvage, 2003" msgstr "" -#: ../../using/windows.rst:1154 +#: ../../using/windows.rst:1160 msgid "Other Platforms" msgstr "其他平台" -#: ../../using/windows.rst:1156 +#: ../../using/windows.rst:1162 msgid "" "With ongoing development of Python, some platforms that used to be supported " "earlier are no longer supported (due to the lack of users or developers). " "Check :pep:`11` for details on all unsupported platforms." msgstr "" -#: ../../using/windows.rst:1160 +#: ../../using/windows.rst:1166 msgid "`Windows CE `_ is still supported." msgstr "" -#: ../../using/windows.rst:1161 +#: ../../using/windows.rst:1167 msgid "" "The `Cygwin `_ installer offers to install the Python " "interpreter as well (cf. `Cygwin package source `_)" msgstr "" -#: ../../using/windows.rst:1167 +#: ../../using/windows.rst:1173 msgid "" "See `Python for Windows `_ for " "detailed information about platforms with pre-compiled installers." From 4f71af9fb435261b2b5b19185fc01979777fdb11 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 Apr 2022 00:15:14 +0000 Subject: [PATCH 5/7] sync with cpython 8bce3cb1 --- extending/newtypes_tutorial.po | 6 +- howto/regex.po | 10 +- library/crypt.po | 30 +- library/errno.po | 321 ++++---- library/exceptions.po | 40 +- library/shutil.po | 131 ++- library/stdtypes.po | 1383 ++++++++++++++++---------------- 7 files changed, 975 insertions(+), 946 deletions(-) diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index eebb7c35c3..a6ae0a0d0e 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -99,8 +99,8 @@ msgid "" "This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory " "at the start of each object struct and defines a field called ``ob_base`` of " "type :c:type:`PyObject`, containing a pointer to a type object and a " -"reference count (these can be accessed using the macros :c:macro:`Py_REFCNT` " -"and :c:macro:`Py_TYPE` respectively). The reason for the macro is to " +"reference count (these can be accessed using the macros :c:macro:`Py_TYPE` " +"and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to " "abstract away the layout and to enable additional fields in :ref:`debug " "builds `." msgstr "" diff --git a/howto/regex.po b/howto/regex.po index ef25dd8931..2414500610 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -149,10 +149,10 @@ msgstr "" #: ../../howto/regex.rst:92 msgid "" -"Metacharacters are not active inside classes. For example, ``[akm$]`` will " -"match any of the characters ``'a'``, ``'k'``, ``'m'``, or ``'$'``; ``'$'`` " -"is usually a metacharacter, but inside a character class it's stripped of " -"its special nature." +"Metacharacters (except ``\\``) are not active inside classes. For example, " +"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or " +"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class " +"it's stripped of its special nature." msgstr "" #: ../../howto/regex.rst:97 diff --git a/library/crypt.po b/library/crypt.po index 301553a064..814138f265 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-23 00:14+0000\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,17 +116,17 @@ msgid "" "from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all " "may be available on all platforms), or a full encrypted password including " "salt, as returned by this function. If *salt* is not provided, the " -"strongest method will be used (as returned by :func:`methods`)." +"strongest method available in :attr:`methods` will be used." msgstr "" -#: ../../library/crypt.rst:102 +#: ../../library/crypt.rst:101 msgid "" "Checking a password is usually done by passing the plain-text password as " "*word* and the full results of a previous :func:`crypt` call, which should " "be the same as the results of this call." msgstr "" -#: ../../library/crypt.rst:106 +#: ../../library/crypt.rst:105 msgid "" "*salt* (either a random 2 or 16 character string, possibly prefixed with ``" "$digit$`` to indicate the method) which will be used to perturb the " @@ -135,36 +135,36 @@ msgid "" "$``." msgstr "" -#: ../../library/crypt.rst:112 +#: ../../library/crypt.rst:111 msgid "" "Returns the hashed password as a string, which will be composed of " "characters from the same alphabet as the salt." msgstr "" -#: ../../library/crypt.rst:117 +#: ../../library/crypt.rst:116 msgid "" "Since a few :manpage:`crypt(3)` extensions allow different values, with " "different sizes in the *salt*, it is recommended to use the full crypted " "password as salt when checking for a password." msgstr "" -#: ../../library/crypt.rst:121 +#: ../../library/crypt.rst:120 msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." msgstr "" -#: ../../library/crypt.rst:127 +#: ../../library/crypt.rst:126 msgid "" "Return a randomly generated salt of the specified method. If no *method* is " -"given, the strongest method available as returned by :func:`methods` is used." +"given, the strongest method available in :attr:`methods` is used." msgstr "" -#: ../../library/crypt.rst:131 +#: ../../library/crypt.rst:130 msgid "" "The return value is a string suitable for passing as the *salt* argument to :" "func:`crypt`." msgstr "" -#: ../../library/crypt.rst:134 +#: ../../library/crypt.rst:133 msgid "" "*rounds* specifies the number of rounds for ``METHOD_SHA256``, " "``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " @@ -174,22 +174,22 @@ msgid "" "sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." msgstr "" -#: ../../library/crypt.rst:144 +#: ../../library/crypt.rst:143 msgid "Added the *rounds* parameter." msgstr "新增 *rounds* 參數。" -#: ../../library/crypt.rst:149 +#: ../../library/crypt.rst:148 msgid "Examples" msgstr "範例" -#: ../../library/crypt.rst:151 +#: ../../library/crypt.rst:150 msgid "" "A simple example illustrating typical use (a constant-time comparison " "operation is needed to limit exposure to timing attacks. :func:`hmac." "compare_digest` is suitable for this purpose)::" msgstr "" -#: ../../library/crypt.rst:171 +#: ../../library/crypt.rst:170 msgid "" "To generate a hash of a password using the strongest available method and " "check it against the original::" diff --git a/library/errno.po b/library/errno.po index 5b04101ca2..6c8a6ed372 100644 --- a/library/errno.po +++ b/library/errno.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -26,7 +26,7 @@ msgstr "" msgid "" "This module makes available standard ``errno`` system symbols. The value of " "each symbol is the corresponding integer value. The names and descriptions " -"are borrowed from :file:`linux/include/errno.h`, which should be pretty all-" +"are borrowed from :file:`linux/include/errno.h`, which should be all-" "inclusive." msgstr "" @@ -51,493 +51,524 @@ msgid "" msgstr "" #: ../../library/errno.rst:30 -msgid "Operation not permitted" -msgstr "" - -#: ../../library/errno.rst:35 -msgid "No such file or directory" +msgid "" +"Operation not permitted. This error is mapped to the exception :exc:" +"`PermissionError`." msgstr "" -#: ../../library/errno.rst:40 -msgid "No such process" +#: ../../library/errno.rst:36 +msgid "" +"No such file or directory. This error is mapped to the exception :exc:" +"`FileNotFoundError`." msgstr "" -#: ../../library/errno.rst:45 -msgid "Interrupted system call." +#: ../../library/errno.rst:42 +msgid "" +"No such process. This error is mapped to the exception :exc:" +"`ProcessLookupError`." msgstr "" #: ../../library/errno.rst:48 -msgid "This error is mapped to the exception :exc:`InterruptedError`." +msgid "" +"Interrupted system call. This error is mapped to the exception :exc:" +"`InterruptedError`." msgstr "" -#: ../../library/errno.rst:53 +#: ../../library/errno.rst:54 msgid "I/O error" msgstr "" -#: ../../library/errno.rst:58 +#: ../../library/errno.rst:59 msgid "No such device or address" msgstr "" -#: ../../library/errno.rst:63 +#: ../../library/errno.rst:64 msgid "Arg list too long" msgstr "" -#: ../../library/errno.rst:68 +#: ../../library/errno.rst:69 msgid "Exec format error" msgstr "" -#: ../../library/errno.rst:73 +#: ../../library/errno.rst:74 msgid "Bad file number" msgstr "" -#: ../../library/errno.rst:78 -msgid "No child processes" +#: ../../library/errno.rst:79 +msgid "" +"No child processes. This error is mapped to the exception :exc:" +"`ChildProcessError`." msgstr "" -#: ../../library/errno.rst:83 -msgid "Try again" +#: ../../library/errno.rst:85 +msgid "" +"Try again. This error is mapped to the exception :exc:`BlockingIOError`." msgstr "" -#: ../../library/errno.rst:88 +#: ../../library/errno.rst:90 msgid "Out of memory" msgstr "" -#: ../../library/errno.rst:93 -msgid "Permission denied" +#: ../../library/errno.rst:95 +msgid "" +"Permission denied. This error is mapped to the exception :exc:" +"`PermissionError`." msgstr "" -#: ../../library/errno.rst:98 +#: ../../library/errno.rst:101 msgid "Bad address" msgstr "" -#: ../../library/errno.rst:103 +#: ../../library/errno.rst:106 msgid "Block device required" msgstr "" -#: ../../library/errno.rst:108 +#: ../../library/errno.rst:111 msgid "Device or resource busy" msgstr "" -#: ../../library/errno.rst:113 -msgid "File exists" +#: ../../library/errno.rst:116 +msgid "" +"File exists. This error is mapped to the exception :exc:`FileExistsError`." msgstr "" -#: ../../library/errno.rst:118 +#: ../../library/errno.rst:122 msgid "Cross-device link" msgstr "" -#: ../../library/errno.rst:123 +#: ../../library/errno.rst:127 msgid "No such device" msgstr "" -#: ../../library/errno.rst:128 -msgid "Not a directory" +#: ../../library/errno.rst:132 +msgid "" +"Not a directory. This error is mapped to the exception :exc:" +"`NotADirectoryError`." msgstr "" -#: ../../library/errno.rst:133 -msgid "Is a directory" +#: ../../library/errno.rst:138 +msgid "" +"Is a directory. This error is mapped to the exception :exc:" +"`IsADirectoryError`." msgstr "" -#: ../../library/errno.rst:138 +#: ../../library/errno.rst:144 msgid "Invalid argument" msgstr "" -#: ../../library/errno.rst:143 +#: ../../library/errno.rst:149 msgid "File table overflow" msgstr "" -#: ../../library/errno.rst:148 +#: ../../library/errno.rst:154 msgid "Too many open files" msgstr "" -#: ../../library/errno.rst:153 +#: ../../library/errno.rst:159 msgid "Not a typewriter" msgstr "" -#: ../../library/errno.rst:158 +#: ../../library/errno.rst:164 msgid "Text file busy" msgstr "" -#: ../../library/errno.rst:163 +#: ../../library/errno.rst:169 msgid "File too large" msgstr "" -#: ../../library/errno.rst:168 +#: ../../library/errno.rst:174 msgid "No space left on device" msgstr "" -#: ../../library/errno.rst:173 +#: ../../library/errno.rst:179 msgid "Illegal seek" msgstr "" -#: ../../library/errno.rst:178 +#: ../../library/errno.rst:184 msgid "Read-only file system" msgstr "" -#: ../../library/errno.rst:183 +#: ../../library/errno.rst:189 msgid "Too many links" msgstr "" -#: ../../library/errno.rst:188 -msgid "Broken pipe" +#: ../../library/errno.rst:194 +msgid "" +"Broken pipe. This error is mapped to the exception :exc:`BrokenPipeError`." msgstr "" -#: ../../library/errno.rst:193 +#: ../../library/errno.rst:200 msgid "Math argument out of domain of func" msgstr "" -#: ../../library/errno.rst:198 +#: ../../library/errno.rst:205 msgid "Math result not representable" msgstr "" -#: ../../library/errno.rst:203 +#: ../../library/errno.rst:210 msgid "Resource deadlock would occur" msgstr "" -#: ../../library/errno.rst:208 +#: ../../library/errno.rst:215 msgid "File name too long" msgstr "" -#: ../../library/errno.rst:213 +#: ../../library/errno.rst:220 msgid "No record locks available" msgstr "" -#: ../../library/errno.rst:218 +#: ../../library/errno.rst:225 msgid "Function not implemented" msgstr "" -#: ../../library/errno.rst:223 +#: ../../library/errno.rst:230 msgid "Directory not empty" msgstr "" -#: ../../library/errno.rst:228 +#: ../../library/errno.rst:235 msgid "Too many symbolic links encountered" msgstr "" -#: ../../library/errno.rst:233 -msgid "Operation would block" +#: ../../library/errno.rst:240 +msgid "" +"Operation would block. This error is mapped to the exception :exc:" +"`BlockingIOError`." msgstr "" -#: ../../library/errno.rst:238 +#: ../../library/errno.rst:246 msgid "No message of desired type" msgstr "" -#: ../../library/errno.rst:243 +#: ../../library/errno.rst:251 msgid "Identifier removed" msgstr "" -#: ../../library/errno.rst:248 +#: ../../library/errno.rst:256 msgid "Channel number out of range" msgstr "" -#: ../../library/errno.rst:253 +#: ../../library/errno.rst:261 msgid "Level 2 not synchronized" msgstr "" -#: ../../library/errno.rst:258 +#: ../../library/errno.rst:266 msgid "Level 3 halted" msgstr "" -#: ../../library/errno.rst:263 +#: ../../library/errno.rst:271 msgid "Level 3 reset" msgstr "" -#: ../../library/errno.rst:268 +#: ../../library/errno.rst:276 msgid "Link number out of range" msgstr "" -#: ../../library/errno.rst:273 +#: ../../library/errno.rst:281 msgid "Protocol driver not attached" msgstr "" -#: ../../library/errno.rst:278 +#: ../../library/errno.rst:286 msgid "No CSI structure available" msgstr "" -#: ../../library/errno.rst:283 +#: ../../library/errno.rst:291 msgid "Level 2 halted" msgstr "" -#: ../../library/errno.rst:288 +#: ../../library/errno.rst:296 msgid "Invalid exchange" msgstr "" -#: ../../library/errno.rst:293 +#: ../../library/errno.rst:301 msgid "Invalid request descriptor" msgstr "" -#: ../../library/errno.rst:298 +#: ../../library/errno.rst:306 msgid "Exchange full" msgstr "" -#: ../../library/errno.rst:303 +#: ../../library/errno.rst:311 msgid "No anode" msgstr "" -#: ../../library/errno.rst:308 +#: ../../library/errno.rst:316 msgid "Invalid request code" msgstr "" -#: ../../library/errno.rst:313 +#: ../../library/errno.rst:321 msgid "Invalid slot" msgstr "" -#: ../../library/errno.rst:318 +#: ../../library/errno.rst:326 msgid "File locking deadlock error" msgstr "" -#: ../../library/errno.rst:323 +#: ../../library/errno.rst:331 msgid "Bad font file format" msgstr "" -#: ../../library/errno.rst:328 +#: ../../library/errno.rst:336 msgid "Device not a stream" msgstr "" -#: ../../library/errno.rst:333 +#: ../../library/errno.rst:341 msgid "No data available" msgstr "" -#: ../../library/errno.rst:338 +#: ../../library/errno.rst:346 msgid "Timer expired" msgstr "" -#: ../../library/errno.rst:343 +#: ../../library/errno.rst:351 msgid "Out of streams resources" msgstr "" -#: ../../library/errno.rst:348 +#: ../../library/errno.rst:356 msgid "Machine is not on the network" msgstr "" -#: ../../library/errno.rst:353 +#: ../../library/errno.rst:361 msgid "Package not installed" msgstr "" -#: ../../library/errno.rst:358 +#: ../../library/errno.rst:366 msgid "Object is remote" msgstr "" -#: ../../library/errno.rst:363 +#: ../../library/errno.rst:371 msgid "Link has been severed" msgstr "" -#: ../../library/errno.rst:368 +#: ../../library/errno.rst:376 msgid "Advertise error" msgstr "" -#: ../../library/errno.rst:373 +#: ../../library/errno.rst:381 msgid "Srmount error" msgstr "" -#: ../../library/errno.rst:378 +#: ../../library/errno.rst:386 msgid "Communication error on send" msgstr "" -#: ../../library/errno.rst:383 +#: ../../library/errno.rst:391 msgid "Protocol error" msgstr "" -#: ../../library/errno.rst:388 +#: ../../library/errno.rst:396 msgid "Multihop attempted" msgstr "" -#: ../../library/errno.rst:393 +#: ../../library/errno.rst:401 msgid "RFS specific error" msgstr "" -#: ../../library/errno.rst:398 +#: ../../library/errno.rst:406 msgid "Not a data message" msgstr "" -#: ../../library/errno.rst:403 +#: ../../library/errno.rst:411 msgid "Value too large for defined data type" msgstr "" -#: ../../library/errno.rst:408 +#: ../../library/errno.rst:416 msgid "Name not unique on network" msgstr "" -#: ../../library/errno.rst:413 +#: ../../library/errno.rst:421 msgid "File descriptor in bad state" msgstr "" -#: ../../library/errno.rst:418 +#: ../../library/errno.rst:426 msgid "Remote address changed" msgstr "" -#: ../../library/errno.rst:423 +#: ../../library/errno.rst:431 msgid "Can not access a needed shared library" msgstr "" -#: ../../library/errno.rst:428 +#: ../../library/errno.rst:436 msgid "Accessing a corrupted shared library" msgstr "" -#: ../../library/errno.rst:433 +#: ../../library/errno.rst:441 msgid ".lib section in a.out corrupted" msgstr "" -#: ../../library/errno.rst:438 +#: ../../library/errno.rst:446 msgid "Attempting to link in too many shared libraries" msgstr "" -#: ../../library/errno.rst:443 +#: ../../library/errno.rst:451 msgid "Cannot exec a shared library directly" msgstr "" -#: ../../library/errno.rst:448 +#: ../../library/errno.rst:456 msgid "Illegal byte sequence" msgstr "" -#: ../../library/errno.rst:453 +#: ../../library/errno.rst:461 msgid "Interrupted system call should be restarted" msgstr "" -#: ../../library/errno.rst:458 +#: ../../library/errno.rst:466 msgid "Streams pipe error" msgstr "" -#: ../../library/errno.rst:463 +#: ../../library/errno.rst:471 msgid "Too many users" msgstr "" -#: ../../library/errno.rst:468 +#: ../../library/errno.rst:476 msgid "Socket operation on non-socket" msgstr "" -#: ../../library/errno.rst:473 +#: ../../library/errno.rst:481 msgid "Destination address required" msgstr "" -#: ../../library/errno.rst:478 +#: ../../library/errno.rst:486 msgid "Message too long" msgstr "" -#: ../../library/errno.rst:483 +#: ../../library/errno.rst:491 msgid "Protocol wrong type for socket" msgstr "" -#: ../../library/errno.rst:488 +#: ../../library/errno.rst:496 msgid "Protocol not available" msgstr "" -#: ../../library/errno.rst:493 +#: ../../library/errno.rst:501 msgid "Protocol not supported" msgstr "" -#: ../../library/errno.rst:498 +#: ../../library/errno.rst:506 msgid "Socket type not supported" msgstr "" -#: ../../library/errno.rst:503 +#: ../../library/errno.rst:511 msgid "Operation not supported on transport endpoint" msgstr "" -#: ../../library/errno.rst:508 +#: ../../library/errno.rst:516 msgid "Protocol family not supported" msgstr "" -#: ../../library/errno.rst:513 +#: ../../library/errno.rst:521 msgid "Address family not supported by protocol" msgstr "" -#: ../../library/errno.rst:518 +#: ../../library/errno.rst:526 msgid "Address already in use" msgstr "" -#: ../../library/errno.rst:523 +#: ../../library/errno.rst:531 msgid "Cannot assign requested address" msgstr "" -#: ../../library/errno.rst:528 +#: ../../library/errno.rst:536 msgid "Network is down" msgstr "" -#: ../../library/errno.rst:533 +#: ../../library/errno.rst:541 msgid "Network is unreachable" msgstr "" -#: ../../library/errno.rst:538 +#: ../../library/errno.rst:546 msgid "Network dropped connection because of reset" msgstr "" -#: ../../library/errno.rst:543 -msgid "Software caused connection abort" +#: ../../library/errno.rst:551 +msgid "" +"Software caused connection abort. This error is mapped to the exception :exc:" +"`ConnectionAbortedError`." msgstr "" -#: ../../library/errno.rst:548 -msgid "Connection reset by peer" +#: ../../library/errno.rst:557 +msgid "" +"Connection reset by peer. This error is mapped to the exception :exc:" +"`ConnectionResetError`." msgstr "" -#: ../../library/errno.rst:553 +#: ../../library/errno.rst:563 msgid "No buffer space available" msgstr "" -#: ../../library/errno.rst:558 +#: ../../library/errno.rst:568 msgid "Transport endpoint is already connected" msgstr "" -#: ../../library/errno.rst:563 +#: ../../library/errno.rst:573 msgid "Transport endpoint is not connected" msgstr "" -#: ../../library/errno.rst:568 -msgid "Cannot send after transport endpoint shutdown" +#: ../../library/errno.rst:578 +msgid "" +"Cannot send after transport endpoint shutdown. This error is mapped to the " +"exception :exc:`BrokenPipeError`." msgstr "" -#: ../../library/errno.rst:573 +#: ../../library/errno.rst:584 msgid "Too many references: cannot splice" msgstr "" -#: ../../library/errno.rst:578 -msgid "Connection timed out" +#: ../../library/errno.rst:589 +msgid "" +"Connection timed out. This error is mapped to the exception :exc:" +"`TimeoutError`." msgstr "" -#: ../../library/errno.rst:583 -msgid "Connection refused" +#: ../../library/errno.rst:595 +msgid "" +"Connection refused. This error is mapped to the exception :exc:" +"`ConnectionRefusedError`." msgstr "" -#: ../../library/errno.rst:588 +#: ../../library/errno.rst:601 msgid "Host is down" msgstr "" -#: ../../library/errno.rst:593 +#: ../../library/errno.rst:606 msgid "No route to host" msgstr "" -#: ../../library/errno.rst:598 -msgid "Operation already in progress" +#: ../../library/errno.rst:611 +msgid "" +"Operation already in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." msgstr "" -#: ../../library/errno.rst:603 -msgid "Operation now in progress" +#: ../../library/errno.rst:617 +msgid "" +"Operation now in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." msgstr "" -#: ../../library/errno.rst:608 +#: ../../library/errno.rst:623 msgid "Stale NFS file handle" msgstr "" -#: ../../library/errno.rst:613 +#: ../../library/errno.rst:628 msgid "Structure needs cleaning" msgstr "" -#: ../../library/errno.rst:618 +#: ../../library/errno.rst:633 msgid "Not a XENIX named type file" msgstr "" -#: ../../library/errno.rst:623 +#: ../../library/errno.rst:638 msgid "No XENIX semaphores available" msgstr "" -#: ../../library/errno.rst:628 +#: ../../library/errno.rst:643 msgid "Is a named type file" msgstr "" -#: ../../library/errno.rst:633 +#: ../../library/errno.rst:648 msgid "Remote I/O error" msgstr "" -#: ../../library/errno.rst:638 +#: ../../library/errno.rst:653 msgid "Quota exceeded" msgstr "" diff --git a/library/exceptions.po b/library/exceptions.po index 94ece3ad60..1c932f8237 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-30 00:13+0000\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -749,8 +749,9 @@ msgstr "" #: ../../library/exceptions.rst:645 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" -"blocking operation. Corresponds to :c:data:`errno` ``EAGAIN``, ``EALREADY``, " -"``EWOULDBLOCK`` and ``EINPROGRESS``." +"blocking operation. Corresponds to :c:data:`errno` :py:data:`~errno." +"EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` and :py:" +"data:`~errno.EINPROGRESS`." msgstr "" #: ../../library/exceptions.rst:650 @@ -769,7 +770,7 @@ msgstr "" #: ../../library/exceptions.rst:661 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` ``ECHILD``." +"`errno` :py:data:`~errno.ECHILD`." msgstr "" #: ../../library/exceptions.rst:666 @@ -786,38 +787,40 @@ msgstr "" msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " -"has been shutdown for writing. Corresponds to :c:data:`errno` ``EPIPE`` and " -"``ESHUTDOWN``." +"has been shutdown for writing. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EPIPE` and :py:data:`~errno.ESHUTDOWN`." msgstr "" #: ../../library/exceptions.rst:680 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"aborted by the peer. Corresponds to :c:data:`errno` ``ECONNABORTED``." +"aborted by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNABORTED`." msgstr "" #: ../../library/exceptions.rst:686 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"refused by the peer. Corresponds to :c:data:`errno` ``ECONNREFUSED``." +"refused by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNREFUSED`." msgstr "" #: ../../library/exceptions.rst:692 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " -"the peer. Corresponds to :c:data:`errno` ``ECONNRESET``." +"the peer. Corresponds to :c:data:`errno` :py:data:`~errno.ECONNRESET`." msgstr "" #: ../../library/exceptions.rst:698 msgid "" "Raised when trying to create a file or directory which already exists. " -"Corresponds to :c:data:`errno` ``EEXIST``." +"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." msgstr "" #: ../../library/exceptions.rst:703 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " -"to :c:data:`errno` ``ENOENT``." +"to :c:data:`errno` :py:data:`~errno.ENOENT`." msgstr "" #: ../../library/exceptions.rst:708 @@ -836,7 +839,7 @@ msgstr "" #: ../../library/exceptions.rst:718 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " -"directory. Corresponds to :c:data:`errno` ``EISDIR``." +"directory. Corresponds to :c:data:`errno` :py:data:`~errno.EISDIR`." msgstr "" #: ../../library/exceptions.rst:724 @@ -844,26 +847,27 @@ msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " "on something which is not a directory. On most POSIX platforms, it may also " "be raised if an operation attempts to open or traverse a non-directory file " -"as if it were a directory. Corresponds to :c:data:`errno` ``ENOTDIR``." +"as if it were a directory. Corresponds to :c:data:`errno` :py:data:`~errno." +"ENOTDIR`." msgstr "" #: ../../library/exceptions.rst:732 msgid "" "Raised when trying to run an operation without the adequate access rights - " -"for example filesystem permissions. Corresponds to :c:data:`errno` " -"``EACCES`` and ``EPERM``." +"for example filesystem permissions. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EACCES` and :py:data:`~errno.EPERM`." msgstr "" #: ../../library/exceptions.rst:738 msgid "" -"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " -"``ESRCH``." +"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" +"py:data:`~errno.ESRCH`." msgstr "" #: ../../library/exceptions.rst:743 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." msgstr "" #: ../../library/exceptions.rst:746 diff --git a/library/shutil.po b/library/shutil.po index b1c4d6bbb4..7deea47059 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -590,31 +590,24 @@ msgid "copytree example" msgstr "" #: ../../library/shutil.rst:473 -msgid "" -"This example is the implementation of the :func:`copytree` function, " -"described above, with the docstring omitted. It demonstrates many of the " -"other functions provided by this module. ::" -msgstr "" - -#: ../../library/shutil.rst:508 -msgid "Another example that uses the :func:`ignore_patterns` helper::" +msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../library/shutil.rst:514 +#: ../../library/shutil.rst:479 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../library/shutil.rst:517 +#: ../../library/shutil.rst:482 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../library/shutil.rst:532 +#: ../../library/shutil.rst:497 msgid "rmtree example" msgstr "rmtree 範例" -#: ../../library/shutil.rst:534 +#: ../../library/shutil.rst:499 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onerror callback to " @@ -622,25 +615,25 @@ msgid "" "propagate. ::" msgstr "" -#: ../../library/shutil.rst:552 +#: ../../library/shutil.rst:517 msgid "Archiving operations" msgstr "" -#: ../../library/shutil.rst:556 +#: ../../library/shutil.rst:521 msgid "Added support for the *xztar* format." msgstr "新增 *xztar* 格式的支援。" -#: ../../library/shutil.rst:560 +#: ../../library/shutil.rst:525 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: ../../library/shutil.rst:565 +#: ../../library/shutil.rst:530 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../library/shutil.rst:567 +#: ../../library/shutil.rst:532 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension. *format* is the archive format: one of \"zip" @@ -649,14 +642,14 @@ msgid "" "available), or \"xztar\" (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:573 +#: ../../library/shutil.rst:538 msgid "" "*root_dir* is a directory that will be the root directory of the archive, " "all paths in the archive will be relative to it; for example, we typically " "chdir into *root_dir* before creating the archive." msgstr "" -#: ../../library/shutil.rst:577 +#: ../../library/shutil.rst:542 msgid "" "*base_dir* is the directory where we start archiving from; i.e. *base_dir* " "will be the common prefix of all files and directories in the archive. " @@ -664,90 +657,90 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: ../../library/shutil.rst:583 +#: ../../library/shutil.rst:548 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../library/shutil.rst:585 +#: ../../library/shutil.rst:550 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: ../../library/shutil.rst:588 +#: ../../library/shutil.rst:553 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../library/shutil.rst:591 +#: ../../library/shutil.rst:556 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../library/shutil.rst:594 +#: ../../library/shutil.rst:559 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:596 +#: ../../library/shutil.rst:561 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." msgstr "" -#: ../../library/shutil.rst:600 +#: ../../library/shutil.rst:565 msgid "This function is not thread-safe." msgstr "" -#: ../../library/shutil.rst:602 +#: ../../library/shutil.rst:567 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: ../../library/shutil.rst:609 +#: ../../library/shutil.rst:574 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:612 ../../library/shutil.rst:694 +#: ../../library/shutil.rst:577 ../../library/shutil.rst:659 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:614 +#: ../../library/shutil.rst:579 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:615 +#: ../../library/shutil.rst:580 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:616 ../../library/shutil.rst:699 +#: ../../library/shutil.rst:581 ../../library/shutil.rst:664 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:617 ../../library/shutil.rst:700 +#: ../../library/shutil.rst:582 ../../library/shutil.rst:665 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:618 ../../library/shutil.rst:701 +#: ../../library/shutil.rst:583 ../../library/shutil.rst:666 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:620 +#: ../../library/shutil.rst:585 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../library/shutil.rst:626 +#: ../../library/shutil.rst:591 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:628 +#: ../../library/shutil.rst:593 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -756,33 +749,33 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:634 +#: ../../library/shutil.rst:599 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../library/shutil.rst:637 +#: ../../library/shutil.rst:602 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:643 +#: ../../library/shutil.rst:608 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:648 +#: ../../library/shutil.rst:613 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:650 +#: ../../library/shutil.rst:615 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../library/shutil.rst:653 +#: ../../library/shutil.rst:618 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", \"bztar" "\", or \"xztar\". Or any other format registered with :func:" @@ -791,126 +784,126 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:660 +#: ../../library/shutil.rst:625 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: ../../library/shutil.rst:662 +#: ../../library/shutil.rst:627 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:668 +#: ../../library/shutil.rst:633 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../library/shutil.rst:672 +#: ../../library/shutil.rst:637 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the path of the archive, followed by the directory the " "archive must be extracted to." msgstr "" -#: ../../library/shutil.rst:676 +#: ../../library/shutil.rst:641 msgid "" "When provided, *extra_args* is a sequence of ``(name, value)`` tuples that " "will be passed as keywords arguments to the callable." msgstr "" -#: ../../library/shutil.rst:679 +#: ../../library/shutil.rst:644 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:685 +#: ../../library/shutil.rst:650 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:690 +#: ../../library/shutil.rst:655 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../library/shutil.rst:696 +#: ../../library/shutil.rst:661 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:698 +#: ../../library/shutil.rst:663 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:703 +#: ../../library/shutil.rst:668 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../library/shutil.rst:710 +#: ../../library/shutil.rst:675 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:712 +#: ../../library/shutil.rst:677 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../library/shutil.rst:722 +#: ../../library/shutil.rst:687 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:740 +#: ../../library/shutil.rst:705 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:742 +#: ../../library/shutil.rst:707 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../library/shutil.rst:756 +#: ../../library/shutil.rst:721 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../library/shutil.rst:770 +#: ../../library/shutil.rst:735 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:780 +#: ../../library/shutil.rst:745 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:784 +#: ../../library/shutil.rst:749 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:786 +#: ../../library/shutil.rst:751 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../library/shutil.rst:790 +#: ../../library/shutil.rst:755 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../library/shutil.rst:794 +#: ../../library/shutil.rst:759 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -919,11 +912,11 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:800 +#: ../../library/shutil.rst:765 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:802 +#: ../../library/shutil.rst:767 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." diff --git a/library/stdtypes.po b/library/stdtypes.po index d34c9552ae..f62a4d8049 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: 2022-02-12 00:11+0000\n" +"POT-Creation-Date: 2022-04-06 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,8 +116,8 @@ msgstr "結果" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 #: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 -#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2320 -#: ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2321 +#: ../../library/stdtypes.rst:3542 msgid "Notes" msgstr "註解" @@ -131,8 +131,8 @@ msgstr "" #: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:285 #: ../../library/stdtypes.rst:885 ../../library/stdtypes.rst:888 -#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2326 -#: ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2327 +#: ../../library/stdtypes.rst:3548 msgid "\\(1)" msgstr "\\(1)" @@ -146,8 +146,8 @@ msgstr "" #: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:288 #: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1127 -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:2332 -#: ../../library/stdtypes.rst:3551 ../../library/stdtypes.rst:3553 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:2333 +#: ../../library/stdtypes.rst:3552 ../../library/stdtypes.rst:3554 msgid "\\(2)" msgstr "\\(2)" @@ -160,18 +160,18 @@ msgid "if *x* is false, then ``True``, else ``False``" msgstr "" #: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:897 -#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2334 -#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:2338 -#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3555 -#: ../../library/stdtypes.rst:3557 ../../library/stdtypes.rst:3559 -#: ../../library/stdtypes.rst:3561 +#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2335 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:2339 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:3558 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:3562 msgid "\\(3)" msgstr "\\(3)" #: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:319 #: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:934 -#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2366 -#: ../../library/stdtypes.rst:3591 +#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2367 +#: ../../library/stdtypes.rst:3592 msgid "Notes:" msgstr "註解:" @@ -210,9 +210,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2297 -#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3518 -#: ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2298 +#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:3542 msgid "Meaning" msgstr "" @@ -495,7 +495,7 @@ msgid "" msgstr "" #: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1120 -#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3578 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3579 msgid "\\(6)" msgstr "\\(6)" @@ -533,9 +533,9 @@ msgstr "" #: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 #: ../../library/stdtypes.rst:1109 ../../library/stdtypes.rst:1112 -#: ../../library/stdtypes.rst:2353 ../../library/stdtypes.rst:2356 -#: ../../library/stdtypes.rst:2359 ../../library/stdtypes.rst:3574 -#: ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:2357 +#: ../../library/stdtypes.rst:2360 ../../library/stdtypes.rst:3575 +#: ../../library/stdtypes.rst:3582 msgid "\\(5)" msgstr "\\(5)" @@ -671,8 +671,8 @@ msgstr "" #: ../../library/stdtypes.rst:416 ../../library/stdtypes.rst:419 #: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1133 -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:2346 -#: ../../library/stdtypes.rst:3563 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2347 +#: ../../library/stdtypes.rst:3564 ../../library/stdtypes.rst:3568 msgid "\\(4)" msgstr "\\(4)" @@ -1222,7 +1222,7 @@ msgid "" "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3550 msgid "\\(8)" msgstr "\\(8)" @@ -1954,13 +1954,14 @@ msgstr "" #: ../../library/stdtypes.rst:1481 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" -"`object.__str__() `, which is the \"informal\" or nicely " -"printable string representation of *object*. For string objects, this is " -"the string itself. If *object* does not have a :meth:`~object.__str__` " -"method, then :func:`str` falls back to returning :meth:`repr(object) `." +"`type(object).__str__(object) `, which is the \"informal\" " +"or nicely printable string representation of *object*. For string objects, " +"this is the string itself. If *object* does not have a :meth:`~object." +"__str__` method, then :func:`str` falls back to returning :meth:" +"`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1492 +#: ../../library/stdtypes.rst:1493 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 " @@ -1972,7 +1973,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1501 +#: ../../library/stdtypes.rst:1502 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -1980,7 +1981,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1509 +#: ../../library/stdtypes.rst:1510 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -1988,17 +1989,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1521 +#: ../../library/stdtypes.rst:1522 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1526 +#: ../../library/stdtypes.rst:1527 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1529 +#: ../../library/stdtypes.rst:1530 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2008,33 +2009,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1536 +#: ../../library/stdtypes.rst:1537 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:1542 +#: ../../library/stdtypes.rst:1543 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1545 +#: ../../library/stdtypes.rst:1546 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:1552 +#: ../../library/stdtypes.rst:1553 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1555 +#: ../../library/stdtypes.rst:1556 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2043,27 +2044,27 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1561 +#: ../../library/stdtypes.rst:1562 msgid "" "The casefolding algorithm is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1569 +#: ../../library/stdtypes.rst:1570 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:1577 +#: ../../library/stdtypes.rst:1578 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:1584 +#: ../../library/stdtypes.rst:1585 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 " @@ -2075,24 +2076,24 @@ msgid "" "encodings`." msgstr "" -#: ../../library/stdtypes.rst:1593 +#: ../../library/stdtypes.rst:1594 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:1598 +#: ../../library/stdtypes.rst:1599 msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1601 ../../library/stdtypes.rst:2737 +#: ../../library/stdtypes.rst:1602 ../../library/stdtypes.rst:2738 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." msgstr "" -#: ../../library/stdtypes.rst:1608 +#: ../../library/stdtypes.rst:1609 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. " @@ -2100,7 +2101,7 @@ msgid "" "*end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:1616 +#: ../../library/stdtypes.rst:1617 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 " @@ -2116,21 +2117,21 @@ msgid "" "printed." msgstr "" -#: ../../library/stdtypes.rst:1637 +#: ../../library/stdtypes.rst:1638 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:1643 +#: ../../library/stdtypes.rst:1644 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:1653 +#: ../../library/stdtypes.rst:1654 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2140,13 +2141,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1663 +#: ../../library/stdtypes.rst:1664 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1667 +#: ../../library/stdtypes.rst:1668 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2157,26 +2158,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1676 +#: ../../library/stdtypes.rst:1677 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:1684 +#: ../../library/stdtypes.rst:1685 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:1700 +#: ../../library/stdtypes.rst:1701 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1706 +#: ../../library/stdtypes.rst:1707 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2184,7 +2185,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1714 +#: ../../library/stdtypes.rst:1715 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2194,14 +2195,14 @@ msgid "" "property defined in the Unicode Standard." msgstr "" -#: ../../library/stdtypes.rst:1723 +#: ../../library/stdtypes.rst:1724 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:1732 +#: ../../library/stdtypes.rst:1733 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2210,7 +2211,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1742 +#: ../../library/stdtypes.rst:1743 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2220,32 +2221,32 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1752 +#: ../../library/stdtypes.rst:1753 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1755 +#: ../../library/stdtypes.rst:1756 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:1758 +#: ../../library/stdtypes.rst:1759 msgid "Example: ::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/stdtypes.rst:1771 +#: ../../library/stdtypes.rst:1772 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:1777 +#: ../../library/stdtypes.rst:1778 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2255,7 +2256,7 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:1787 +#: ../../library/stdtypes.rst:1788 msgid "" "Return ``True`` if all characters in the string are printable or the string " "is empty, ``False`` otherwise. Nonprintable characters are those characters " @@ -2266,20 +2267,20 @@ msgid "" "of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: ../../library/stdtypes.rst:1798 +#: ../../library/stdtypes.rst:1799 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:1801 +#: ../../library/stdtypes.rst:1802 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:1809 +#: ../../library/stdtypes.rst:1810 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 " @@ -2287,13 +2288,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:1816 +#: ../../library/stdtypes.rst:1817 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:1832 +#: ../../library/stdtypes.rst:1833 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 " @@ -2301,26 +2302,26 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:1840 +#: ../../library/stdtypes.rst:1841 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:1847 +#: ../../library/stdtypes.rst:1848 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:1850 +#: ../../library/stdtypes.rst:1851 msgid "" "The lowercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:1856 +#: ../../library/stdtypes.rst:1857 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 " @@ -2329,19 +2330,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1866 +#: ../../library/stdtypes.rst:1867 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:1877 +#: ../../library/stdtypes.rst:1878 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:1879 +#: ../../library/stdtypes.rst:1880 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, " @@ -2349,7 +2350,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:1884 +#: ../../library/stdtypes.rst:1885 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 " @@ -2357,7 +2358,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:1892 +#: ../../library/stdtypes.rst:1893 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 " @@ -2365,47 +2366,47 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:1900 +#: ../../library/stdtypes.rst:1901 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:1914 +#: ../../library/stdtypes.rst:1915 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:1928 +#: ../../library/stdtypes.rst:1929 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:1935 +#: ../../library/stdtypes.rst:1936 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:1942 +#: ../../library/stdtypes.rst:1943 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1948 +#: ../../library/stdtypes.rst:1949 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:1955 +#: ../../library/stdtypes.rst:1956 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 " @@ -2413,7 +2414,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:1963 +#: ../../library/stdtypes.rst:1964 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 " @@ -2422,7 +2423,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:1972 +#: ../../library/stdtypes.rst:1973 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 " @@ -2431,13 +2432,13 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:1982 +#: ../../library/stdtypes.rst:1983 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:1992 +#: ../../library/stdtypes.rst:1993 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, " @@ -2446,7 +2447,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:1998 +#: ../../library/stdtypes.rst:1999 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -2455,23 +2456,23 @@ msgid "" "Splitting an empty string with a specified separator returns ``['']``." msgstr "" -#: ../../library/stdtypes.rst:2004 ../../library/stdtypes.rst:2020 -#: ../../library/stdtypes.rst:2072 ../../library/stdtypes.rst:2140 -#: ../../library/stdtypes.rst:2203 ../../library/stdtypes.rst:3053 -#: ../../library/stdtypes.rst:3069 ../../library/stdtypes.rst:3160 -#: ../../library/stdtypes.rst:3176 ../../library/stdtypes.rst:3201 -#: ../../library/stdtypes.rst:3215 ../../library/stdtypes.rst:3243 -#: ../../library/stdtypes.rst:3257 ../../library/stdtypes.rst:3275 -#: ../../library/stdtypes.rst:3302 ../../library/stdtypes.rst:3325 -#: ../../library/stdtypes.rst:3352 ../../library/stdtypes.rst:3394 -#: ../../library/stdtypes.rst:3418 +#: ../../library/stdtypes.rst:2005 ../../library/stdtypes.rst:2021 +#: ../../library/stdtypes.rst:2073 ../../library/stdtypes.rst:2141 +#: ../../library/stdtypes.rst:2204 ../../library/stdtypes.rst:3054 +#: ../../library/stdtypes.rst:3070 ../../library/stdtypes.rst:3161 +#: ../../library/stdtypes.rst:3177 ../../library/stdtypes.rst:3202 +#: ../../library/stdtypes.rst:3216 ../../library/stdtypes.rst:3244 +#: ../../library/stdtypes.rst:3258 ../../library/stdtypes.rst:3276 +#: ../../library/stdtypes.rst:3303 ../../library/stdtypes.rst:3326 +#: ../../library/stdtypes.rst:3353 ../../library/stdtypes.rst:3395 +#: ../../library/stdtypes.rst:3419 msgid "For example::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/stdtypes.rst:2013 +#: ../../library/stdtypes.rst:2014 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, " @@ -2481,131 +2482,131 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2035 +#: ../../library/stdtypes.rst:2036 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:2039 +#: ../../library/stdtypes.rst:2040 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2044 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2044 msgid "Description" msgstr "描述" -#: ../../library/stdtypes.rst:2045 +#: ../../library/stdtypes.rst:2046 msgid "``\\n``" msgstr "``\\n``" -#: ../../library/stdtypes.rst:2045 +#: ../../library/stdtypes.rst:2046 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2047 +#: ../../library/stdtypes.rst:2048 msgid "``\\r``" msgstr "``\\r``" -#: ../../library/stdtypes.rst:2047 +#: ../../library/stdtypes.rst:2048 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2049 +#: ../../library/stdtypes.rst:2050 msgid "``\\r\\n``" msgstr "``\\r\\n``" -#: ../../library/stdtypes.rst:2049 +#: ../../library/stdtypes.rst:2050 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2052 msgid "``\\v`` or ``\\x0b``" msgstr "``\\v`` 或 ``\\x0b``" -#: ../../library/stdtypes.rst:2051 +#: ../../library/stdtypes.rst:2052 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2054 msgid "``\\f`` or ``\\x0c``" msgstr "``\\f`` 或 ``\\x0c``" -#: ../../library/stdtypes.rst:2053 +#: ../../library/stdtypes.rst:2054 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2055 +#: ../../library/stdtypes.rst:2056 msgid "``\\x1c``" msgstr "``\\x1c``" -#: ../../library/stdtypes.rst:2055 +#: ../../library/stdtypes.rst:2056 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2057 +#: ../../library/stdtypes.rst:2058 msgid "``\\x1d``" msgstr "``\\x1d``" -#: ../../library/stdtypes.rst:2057 +#: ../../library/stdtypes.rst:2058 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2059 +#: ../../library/stdtypes.rst:2060 msgid "``\\x1e``" msgstr "``\\x1e``" -#: ../../library/stdtypes.rst:2059 +#: ../../library/stdtypes.rst:2060 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2061 +#: ../../library/stdtypes.rst:2062 msgid "``\\x85``" msgstr "``\\x85``" -#: ../../library/stdtypes.rst:2061 +#: ../../library/stdtypes.rst:2062 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2063 +#: ../../library/stdtypes.rst:2064 msgid "``\\u2028``" msgstr "``\\u2028``" -#: ../../library/stdtypes.rst:2063 +#: ../../library/stdtypes.rst:2064 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2065 +#: ../../library/stdtypes.rst:2066 msgid "``\\u2029``" msgstr "``\\u2029``" -#: ../../library/stdtypes.rst:2065 +#: ../../library/stdtypes.rst:2066 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2070 +#: ../../library/stdtypes.rst:2071 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2079 +#: ../../library/stdtypes.rst:2080 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:2088 +#: ../../library/stdtypes.rst:2089 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2098 +#: ../../library/stdtypes.rst:2099 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -2613,7 +2614,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2106 +#: ../../library/stdtypes.rst:2107 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 " @@ -2622,7 +2623,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2117 +#: ../../library/stdtypes.rst:2118 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -2630,20 +2631,20 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2130 +#: ../../library/stdtypes.rst:2131 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:2137 +#: ../../library/stdtypes.rst:2138 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:2145 ../../library/stdtypes.rst:3362 +#: ../../library/stdtypes.rst:2146 ../../library/stdtypes.rst:3363 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 " @@ -2651,12 +2652,12 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2153 ../../library/stdtypes.rst:3370 +#: ../../library/stdtypes.rst:2154 ../../library/stdtypes.rst:3371 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:2167 +#: ../../library/stdtypes.rst:2168 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 " @@ -2668,19 +2669,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2176 +#: ../../library/stdtypes.rst:2177 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2179 +#: ../../library/stdtypes.rst:2180 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2185 +#: ../../library/stdtypes.rst:2186 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`` " @@ -2689,13 +2690,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2191 +#: ../../library/stdtypes.rst:2192 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2197 +#: ../../library/stdtypes.rst:2198 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 " @@ -2703,11 +2704,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2215 +#: ../../library/stdtypes.rst:2216 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2228 +#: ../../library/stdtypes.rst:2229 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 " @@ -2718,7 +2719,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2236 +#: ../../library/stdtypes.rst:2237 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2728,7 +2729,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2242 +#: ../../library/stdtypes.rst:2243 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 " @@ -2736,36 +2737,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2252 ../../library/stdtypes.rst:3473 +#: ../../library/stdtypes.rst:2253 ../../library/stdtypes.rst:3474 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2255 ../../library/stdtypes.rst:3476 +#: ../../library/stdtypes.rst:2256 ../../library/stdtypes.rst:3477 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2257 ../../library/stdtypes.rst:3478 +#: ../../library/stdtypes.rst:2258 ../../library/stdtypes.rst:3479 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2260 ../../library/stdtypes.rst:3481 +#: ../../library/stdtypes.rst:2261 ../../library/stdtypes.rst:3482 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2263 ../../library/stdtypes.rst:3484 +#: ../../library/stdtypes.rst:2264 ../../library/stdtypes.rst:3485 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:2267 ../../library/stdtypes.rst:3488 +#: ../../library/stdtypes.rst:2268 ../../library/stdtypes.rst:3489 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2773,15 +2774,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3493 +#: ../../library/stdtypes.rst:2273 ../../library/stdtypes.rst:3494 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2274 ../../library/stdtypes.rst:3495 +#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:3496 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2276 +#: ../../library/stdtypes.rst:2277 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 " @@ -2789,279 +2790,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2285 ../../library/stdtypes.rst:3506 +#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3507 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2288 ../../library/stdtypes.rst:3509 +#: ../../library/stdtypes.rst:2289 ../../library/stdtypes.rst:3510 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2297 ../../library/stdtypes.rst:3518 +#: ../../library/stdtypes.rst:2298 ../../library/stdtypes.rst:3519 msgid "Flag" 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 "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3525 +#: ../../library/stdtypes.rst:2305 ../../library/stdtypes.rst:3526 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3525 +#: ../../library/stdtypes.rst:2305 ../../library/stdtypes.rst:3526 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3528 +#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3529 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3528 +#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3529 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2310 ../../library/stdtypes.rst:3531 +#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2314 ../../library/stdtypes.rst:3535 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 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:2317 ../../library/stdtypes.rst:3538 +#: ../../library/stdtypes.rst:2318 ../../library/stdtypes.rst:3539 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2320 ../../library/stdtypes.rst:3541 +#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 +#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:2324 -#: ../../library/stdtypes.rst:3543 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:2325 +#: ../../library/stdtypes.rst:3544 ../../library/stdtypes.rst:3546 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2324 ../../library/stdtypes.rst:3545 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2326 ../../library/stdtypes.rst:3547 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2328 ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2330 ../../library/stdtypes.rst:3551 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3553 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2332 ../../library/stdtypes.rst:3553 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2334 ../../library/stdtypes.rst:3555 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2336 ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:3559 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2338 ../../library/stdtypes.rst:2340 -#: ../../library/stdtypes.rst:3559 ../../library/stdtypes.rst:3561 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:2341 +#: ../../library/stdtypes.rst:3560 ../../library/stdtypes.rst:3562 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2340 ../../library/stdtypes.rst:3561 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3562 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3564 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2342 ../../library/stdtypes.rst:3563 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3564 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:2346 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3568 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2346 ../../library/stdtypes.rst:3567 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3568 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:2350 ../../library/stdtypes.rst:3571 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3572 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2350 +#: ../../library/stdtypes.rst:2351 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2353 ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3585 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2353 +#: ../../library/stdtypes.rst:2354 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2356 ../../library/stdtypes.rst:3578 +#: ../../library/stdtypes.rst:2357 ../../library/stdtypes.rst:3579 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2356 +#: ../../library/stdtypes.rst:2357 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2359 ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:2360 ../../library/stdtypes.rst:3582 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2359 +#: ../../library/stdtypes.rst:2360 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:2363 ../../library/stdtypes.rst:3588 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2362 ../../library/stdtypes.rst:3587 +#: ../../library/stdtypes.rst:2363 ../../library/stdtypes.rst:3588 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2369 ../../library/stdtypes.rst:3594 +#: ../../library/stdtypes.rst:2370 ../../library/stdtypes.rst:3595 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2373 ../../library/stdtypes.rst:3598 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3599 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:2377 ../../library/stdtypes.rst:3602 +#: ../../library/stdtypes.rst:2378 ../../library/stdtypes.rst:3603 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2380 ../../library/stdtypes.rst:3605 +#: ../../library/stdtypes.rst:2381 ../../library/stdtypes.rst:3606 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2384 ../../library/stdtypes.rst:3609 +#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3610 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:2387 ../../library/stdtypes.rst:3612 +#: ../../library/stdtypes.rst:2388 ../../library/stdtypes.rst:3613 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2391 ../../library/stdtypes.rst:3616 +#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3617 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2394 ../../library/stdtypes.rst:3625 +#: ../../library/stdtypes.rst:2395 ../../library/stdtypes.rst:3626 msgid "See :pep:`237`." msgstr "參閱 :pep:`237`\\ 。" -#: ../../library/stdtypes.rst:2396 +#: ../../library/stdtypes.rst:2397 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:2401 +#: ../../library/stdtypes.rst:2402 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2412 +#: ../../library/stdtypes.rst:2413 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2420 +#: ../../library/stdtypes.rst:2421 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 :" @@ -3069,17 +3070,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2425 +#: ../../library/stdtypes.rst:2426 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:2431 +#: ../../library/stdtypes.rst:2432 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2435 +#: ../../library/stdtypes.rst:2436 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3087,40 +3088,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2442 +#: ../../library/stdtypes.rst:2443 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:2445 +#: ../../library/stdtypes.rst:2446 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2446 +#: ../../library/stdtypes.rst:2447 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:2447 +#: ../../library/stdtypes.rst:2448 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2449 +#: ../../library/stdtypes.rst:2450 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:2453 +#: ../../library/stdtypes.rst:2454 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:2457 +#: ../../library/stdtypes.rst:2458 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3133,29 +3134,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2467 +#: ../../library/stdtypes.rst:2468 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2470 +#: ../../library/stdtypes.rst:2471 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2472 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2472 +#: ../../library/stdtypes.rst:2473 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2474 +#: ../../library/stdtypes.rst:2475 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2476 +#: ../../library/stdtypes.rst:2477 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3163,32 +3164,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2482 +#: ../../library/stdtypes.rst:2483 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:2489 +#: ../../library/stdtypes.rst:2490 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2493 +#: ../../library/stdtypes.rst:2494 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2498 ../../library/stdtypes.rst:2592 +#: ../../library/stdtypes.rst:2499 ../../library/stdtypes.rst:2593 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2504 +#: ../../library/stdtypes.rst:2505 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 " @@ -3197,13 +3198,13 @@ msgid "" "negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2520 +#: ../../library/stdtypes.rst:2521 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:2524 +#: ../../library/stdtypes.rst:2525 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 " @@ -3211,14 +3212,14 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2529 +#: ../../library/stdtypes.rst:2530 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:2534 +#: ../../library/stdtypes.rst:2535 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-" @@ -3230,51 +3231,51 @@ msgid "" "objects will always compare unequal." msgstr "" -#: ../../library/stdtypes.rst:2547 +#: ../../library/stdtypes.rst:2548 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2551 +#: ../../library/stdtypes.rst:2552 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2556 +#: ../../library/stdtypes.rst:2557 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2559 +#: ../../library/stdtypes.rst:2560 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2560 +#: ../../library/stdtypes.rst:2561 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2561 +#: ../../library/stdtypes.rst:2562 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2562 +#: ../../library/stdtypes.rst:2563 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2564 +#: ../../library/stdtypes.rst:2565 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:2568 +#: ../../library/stdtypes.rst:2569 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2570 +#: ../../library/stdtypes.rst:2571 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3282,33 +3283,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2576 +#: ../../library/stdtypes.rst:2577 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:2583 +#: ../../library/stdtypes.rst:2584 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2587 +#: ../../library/stdtypes.rst:2588 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2600 +#: ../../library/stdtypes.rst:2601 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:2605 +#: ../../library/stdtypes.rst:2606 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 " @@ -3316,7 +3317,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2610 +#: ../../library/stdtypes.rst:2611 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3324,11 +3325,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2619 +#: ../../library/stdtypes.rst:2620 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2624 +#: ../../library/stdtypes.rst:2625 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3337,97 +3338,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2632 +#: ../../library/stdtypes.rst:2633 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:2639 +#: ../../library/stdtypes.rst:2640 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2644 +#: ../../library/stdtypes.rst:2645 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:2649 +#: ../../library/stdtypes.rst:2650 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:2652 +#: ../../library/stdtypes.rst:2653 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2658 +#: ../../library/stdtypes.rst:2659 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:2662 ../../library/stdtypes.rst:2761 -#: ../../library/stdtypes.rst:2783 ../../library/stdtypes.rst:2849 -#: ../../library/stdtypes.rst:2862 +#: ../../library/stdtypes.rst:2663 ../../library/stdtypes.rst:2762 +#: ../../library/stdtypes.rst:2784 ../../library/stdtypes.rst:2850 +#: ../../library/stdtypes.rst:2863 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:2665 ../../library/stdtypes.rst:2773 -#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:2852 -#: ../../library/stdtypes.rst:2865 +#: ../../library/stdtypes.rst:2666 ../../library/stdtypes.rst:2774 +#: ../../library/stdtypes.rst:2787 ../../library/stdtypes.rst:2853 +#: ../../library/stdtypes.rst:2866 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2672 +#: ../../library/stdtypes.rst:2673 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:2681 +#: ../../library/stdtypes.rst:2682 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2685 ../../library/stdtypes.rst:2707 -#: ../../library/stdtypes.rst:2837 ../../library/stdtypes.rst:2930 -#: ../../library/stdtypes.rst:2944 ../../library/stdtypes.rst:2975 -#: ../../library/stdtypes.rst:2989 ../../library/stdtypes.rst:3031 -#: ../../library/stdtypes.rst:3101 ../../library/stdtypes.rst:3119 -#: ../../library/stdtypes.rst:3147 ../../library/stdtypes.rst:3286 -#: ../../library/stdtypes.rst:3341 ../../library/stdtypes.rst:3384 -#: ../../library/stdtypes.rst:3405 ../../library/stdtypes.rst:3427 -#: ../../library/stdtypes.rst:3629 +#: ../../library/stdtypes.rst:2686 ../../library/stdtypes.rst:2708 +#: ../../library/stdtypes.rst:2838 ../../library/stdtypes.rst:2931 +#: ../../library/stdtypes.rst:2945 ../../library/stdtypes.rst:2976 +#: ../../library/stdtypes.rst:2990 ../../library/stdtypes.rst:3032 +#: ../../library/stdtypes.rst:3102 ../../library/stdtypes.rst:3120 +#: ../../library/stdtypes.rst:3148 ../../library/stdtypes.rst:3287 +#: ../../library/stdtypes.rst:3342 ../../library/stdtypes.rst:3385 +#: ../../library/stdtypes.rst:3406 ../../library/stdtypes.rst:3428 +#: ../../library/stdtypes.rst:3630 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:2694 +#: ../../library/stdtypes.rst:2695 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:2703 +#: ../../library/stdtypes.rst:2704 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2716 +#: ../../library/stdtypes.rst:2717 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3438,25 +3439,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2724 +#: ../../library/stdtypes.rst:2725 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:2730 +#: ../../library/stdtypes.rst:2731 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:2734 +#: ../../library/stdtypes.rst:2735 msgid "Added support for keyword arguments." msgstr "新增關鍵字引數的支援。" -#: ../../library/stdtypes.rst:2745 +#: ../../library/stdtypes.rst:2746 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3464,11 +3465,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2750 +#: ../../library/stdtypes.rst:2751 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2756 +#: ../../library/stdtypes.rst:2757 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 " @@ -3476,20 +3477,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2766 +#: ../../library/stdtypes.rst:2767 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:2780 +#: ../../library/stdtypes.rst:2781 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2793 +#: ../../library/stdtypes.rst:2794 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 " @@ -3499,7 +3500,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2804 +#: ../../library/stdtypes.rst:2805 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 " @@ -3507,7 +3508,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2815 +#: ../../library/stdtypes.rst:2816 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 " @@ -3516,24 +3517,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2822 ../../library/stdtypes.rst:2879 +#: ../../library/stdtypes.rst:2823 ../../library/stdtypes.rst:2880 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2828 +#: ../../library/stdtypes.rst:2829 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:2832 +#: ../../library/stdtypes.rst:2833 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2844 +#: ../../library/stdtypes.rst:2845 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3541,13 +3542,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2859 +#: ../../library/stdtypes.rst:2860 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2872 +#: ../../library/stdtypes.rst:2873 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 " @@ -3556,7 +3557,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2885 +#: ../../library/stdtypes.rst:2886 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3564,11 +3565,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2890 +#: ../../library/stdtypes.rst:2891 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2896 +#: ../../library/stdtypes.rst:2897 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 " @@ -3576,22 +3577,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2901 +#: ../../library/stdtypes.rst:2902 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2904 +#: ../../library/stdtypes.rst:2905 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2910 +#: ../../library/stdtypes.rst:2911 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2914 +#: ../../library/stdtypes.rst:2915 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 " @@ -3600,7 +3601,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2923 +#: ../../library/stdtypes.rst:2924 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). " @@ -3608,7 +3609,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2937 +#: ../../library/stdtypes.rst:2938 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). " @@ -3616,7 +3617,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2951 +#: ../../library/stdtypes.rst:2952 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 " @@ -3626,14 +3627,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2963 +#: ../../library/stdtypes.rst:2964 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:2982 +#: ../../library/stdtypes.rst:2983 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). " @@ -3641,7 +3642,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2996 +#: ../../library/stdtypes.rst:2997 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 " @@ -3651,7 +3652,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:3007 +#: ../../library/stdtypes.rst:3008 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 " @@ -3661,14 +3662,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3019 +#: ../../library/stdtypes.rst:3020 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:3038 +#: ../../library/stdtypes.rst:3039 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 " @@ -3677,7 +3678,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3044 +#: ../../library/stdtypes.rst:3045 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',')`` " @@ -3688,7 +3689,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3062 +#: ../../library/stdtypes.rst:3063 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 " @@ -3698,7 +3699,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3083 +#: ../../library/stdtypes.rst:3084 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 " @@ -3708,13 +3709,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3096 +#: ../../library/stdtypes.rst:3097 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3105 +#: ../../library/stdtypes.rst:3106 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 " @@ -3722,14 +3723,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3113 +#: ../../library/stdtypes.rst:3114 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:3126 +#: ../../library/stdtypes.rst:3127 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 " @@ -3745,7 +3746,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3154 +#: ../../library/stdtypes.rst:3155 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3754,7 +3755,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3171 +#: ../../library/stdtypes.rst:3172 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3762,35 +3763,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3187 +#: ../../library/stdtypes.rst:3188 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:3197 +#: ../../library/stdtypes.rst:3198 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:3212 +#: ../../library/stdtypes.rst:3213 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:3222 ../../library/stdtypes.rst:3264 -#: ../../library/stdtypes.rst:3280 ../../library/stdtypes.rst:3330 -#: ../../library/stdtypes.rst:3399 +#: ../../library/stdtypes.rst:3223 ../../library/stdtypes.rst:3265 +#: ../../library/stdtypes.rst:3281 ../../library/stdtypes.rst:3331 +#: ../../library/stdtypes.rst:3400 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:3230 +#: ../../library/stdtypes.rst:3231 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3798,27 +3799,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3239 +#: ../../library/stdtypes.rst:3240 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:3254 +#: ../../library/stdtypes.rst:3255 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:3272 +#: ../../library/stdtypes.rst:3273 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3297 +#: ../../library/stdtypes.rst:3298 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 " @@ -3826,20 +3827,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3309 +#: ../../library/stdtypes.rst:3310 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:3322 +#: ../../library/stdtypes.rst:3323 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:3334 +#: ../../library/stdtypes.rst:3335 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3847,14 +3848,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3348 +#: ../../library/stdtypes.rst:3349 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:3357 +#: ../../library/stdtypes.rst:3358 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3862,13 +3863,13 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3391 +#: ../../library/stdtypes.rst:3392 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3412 +#: ../../library/stdtypes.rst:3413 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 " @@ -3877,11 +3878,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3434 +#: ../../library/stdtypes.rst:3435 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3451 +#: ../../library/stdtypes.rst:3452 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 " @@ -3889,7 +3890,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3456 +#: ../../library/stdtypes.rst:3457 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3899,7 +3900,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3463 +#: ../../library/stdtypes.rst:3464 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 " @@ -3907,7 +3908,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3497 +#: ../../library/stdtypes.rst:3498 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 " @@ -3915,73 +3916,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3571 +#: ../../library/stdtypes.rst:3572 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:3575 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3574 +#: ../../library/stdtypes.rst:3575 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3578 +#: ../../library/stdtypes.rst:3579 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3581 +#: ../../library/stdtypes.rst:3582 msgid "" "Bytes (converts any Python object using ``repr(obj)." "encode('ascii','backslashreplace)``)." msgstr "" -#: ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:3585 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:3585 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3619 +#: ../../library/stdtypes.rst:3620 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3622 +#: ../../library/stdtypes.rst:3623 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3634 +#: ../../library/stdtypes.rst:3635 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3641 +#: ../../library/stdtypes.rst:3642 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3643 +#: ../../library/stdtypes.rst:3644 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:3649 +#: ../../library/stdtypes.rst:3650 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:3653 +#: ../../library/stdtypes.rst:3654 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 " @@ -3989,7 +3990,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3658 +#: ../../library/stdtypes.rst:3659 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 " @@ -3999,13 +4000,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3665 +#: ../../library/stdtypes.rst:3666 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3678 +#: ../../library/stdtypes.rst:3679 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 " @@ -4016,82 +4017,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3687 +#: ../../library/stdtypes.rst:3688 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3699 +#: ../../library/stdtypes.rst:3700 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3720 +#: ../../library/stdtypes.rst:3721 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:3732 +#: ../../library/stdtypes.rst:3733 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3736 +#: ../../library/stdtypes.rst:3737 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3740 +#: ../../library/stdtypes.rst:3741 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3743 +#: ../../library/stdtypes.rst:3744 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3747 +#: ../../library/stdtypes.rst:3748 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:3751 +#: ../../library/stdtypes.rst:3752 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:3770 +#: ../../library/stdtypes.rst:3771 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:3786 +#: ../../library/stdtypes.rst:3787 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3789 +#: ../../library/stdtypes.rst:3790 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3795 +#: ../../library/stdtypes.rst:3796 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:3804 +#: ../../library/stdtypes.rst:3805 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4099,7 +4100,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3809 +#: ../../library/stdtypes.rst:3810 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' " @@ -4108,36 +4109,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3818 +#: ../../library/stdtypes.rst:3819 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3827 +#: ../../library/stdtypes.rst:3828 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:3834 +#: ../../library/stdtypes.rst:3835 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3844 +#: ../../library/stdtypes.rst:3845 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:3851 +#: ../../library/stdtypes.rst:3852 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3870 +#: ../../library/stdtypes.rst:3871 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 :" @@ -4146,20 +4147,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3876 +#: ../../library/stdtypes.rst:3877 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:3887 +#: ../../library/stdtypes.rst:3888 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3903 +#: ../../library/stdtypes.rst:3904 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 " @@ -4168,57 +4169,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3909 +#: ../../library/stdtypes.rst:3910 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:3914 +#: ../../library/stdtypes.rst:3915 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3937 +#: ../../library/stdtypes.rst:3938 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3950 +#: ../../library/stdtypes.rst:3951 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3976 +#: ../../library/stdtypes.rst:3977 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3990 +#: ../../library/stdtypes.rst:3991 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:3994 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:3997 +#: ../../library/stdtypes.rst:3998 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4008 +#: ../../library/stdtypes.rst:4009 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:4027 +#: ../../library/stdtypes.rst:4028 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4044 +#: ../../library/stdtypes.rst:4045 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4048 +#: ../../library/stdtypes.rst:4049 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 " @@ -4226,59 +4227,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4053 +#: ../../library/stdtypes.rst:4054 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:4059 +#: ../../library/stdtypes.rst:4060 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4072 +#: ../../library/stdtypes.rst:4073 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4077 +#: ../../library/stdtypes.rst:4078 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:4080 ../../library/stdtypes.rst:4088 +#: ../../library/stdtypes.rst:4081 ../../library/stdtypes.rst:4089 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4085 +#: ../../library/stdtypes.rst:4086 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:4093 +#: ../../library/stdtypes.rst:4094 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4097 +#: ../../library/stdtypes.rst:4098 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4103 +#: ../../library/stdtypes.rst:4104 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4109 +#: ../../library/stdtypes.rst:4110 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4117 +#: ../../library/stdtypes.rst:4118 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4121 +#: ../../library/stdtypes.rst:4122 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4288,7 +4289,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4128 +#: ../../library/stdtypes.rst:4129 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 " @@ -4296,7 +4297,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4133 +#: ../../library/stdtypes.rst:4134 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4308,18 +4309,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4141 +#: ../../library/stdtypes.rst:4142 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:4145 +#: ../../library/stdtypes.rst:4146 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4150 +#: ../../library/stdtypes.rst:4151 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 " @@ -4327,92 +4328,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4156 +#: ../../library/stdtypes.rst:4157 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4158 +#: ../../library/stdtypes.rst:4159 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4159 +#: ../../library/stdtypes.rst:4160 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4160 +#: ../../library/stdtypes.rst:4161 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4162 +#: ../../library/stdtypes.rst:4163 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4167 +#: ../../library/stdtypes.rst:4168 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4171 +#: ../../library/stdtypes.rst:4172 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4175 +#: ../../library/stdtypes.rst:4176 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4179 +#: ../../library/stdtypes.rst:4180 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:4185 +#: ../../library/stdtypes.rst:4186 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4189 +#: ../../library/stdtypes.rst:4190 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4195 +#: ../../library/stdtypes.rst:4196 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4199 +#: ../../library/stdtypes.rst:4200 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4205 +#: ../../library/stdtypes.rst:4206 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4210 +#: ../../library/stdtypes.rst:4211 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4215 +#: ../../library/stdtypes.rst:4216 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4220 +#: ../../library/stdtypes.rst:4221 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4224 +#: ../../library/stdtypes.rst:4225 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4227 +#: ../../library/stdtypes.rst:4228 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4422,7 +4423,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4234 +#: ../../library/stdtypes.rst:4235 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 " @@ -4432,14 +4433,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4241 +#: ../../library/stdtypes.rst:4242 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:4245 +#: ../../library/stdtypes.rst:4246 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 " @@ -4447,71 +4448,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4250 +#: ../../library/stdtypes.rst:4251 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:4253 +#: ../../library/stdtypes.rst:4254 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4255 +#: ../../library/stdtypes.rst:4256 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:4259 +#: ../../library/stdtypes.rst:4260 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4265 +#: ../../library/stdtypes.rst:4266 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4270 +#: ../../library/stdtypes.rst:4271 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4275 +#: ../../library/stdtypes.rst:4276 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4280 +#: ../../library/stdtypes.rst:4281 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4284 +#: ../../library/stdtypes.rst:4285 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4288 +#: ../../library/stdtypes.rst:4289 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4293 +#: ../../library/stdtypes.rst:4294 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4297 +#: ../../library/stdtypes.rst:4298 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4302 +#: ../../library/stdtypes.rst:4303 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4305 +#: ../../library/stdtypes.rst:4306 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4519,18 +4520,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4310 +#: ../../library/stdtypes.rst:4311 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:4318 +#: ../../library/stdtypes.rst:4319 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4328 +#: ../../library/stdtypes.rst:4329 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4539,7 +4540,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4334 +#: ../../library/stdtypes.rst:4335 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4551,40 +4552,40 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4343 +#: ../../library/stdtypes.rst:4344 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:4351 +#: ../../library/stdtypes.rst:4352 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4354 +#: ../../library/stdtypes.rst:4355 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4356 +#: ../../library/stdtypes.rst:4357 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:4358 +#: ../../library/stdtypes.rst:4359 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4359 +#: ../../library/stdtypes.rst:4360 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4362 +#: ../../library/stdtypes.rst:4363 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 " @@ -4596,7 +4597,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4372 +#: ../../library/stdtypes.rst:4373 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 " @@ -4604,39 +4605,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4377 +#: ../../library/stdtypes.rst:4378 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4389 +#: ../../library/stdtypes.rst:4390 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:4393 +#: ../../library/stdtypes.rst:4394 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4398 +#: ../../library/stdtypes.rst:4399 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4402 +#: ../../library/stdtypes.rst:4403 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4406 +#: ../../library/stdtypes.rst:4407 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4411 +#: ../../library/stdtypes.rst:4412 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 " @@ -4647,51 +4648,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4429 +#: ../../library/stdtypes.rst:4430 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:4435 +#: ../../library/stdtypes.rst:4436 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4439 +#: ../../library/stdtypes.rst:4440 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4444 +#: ../../library/stdtypes.rst:4445 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4448 +#: ../../library/stdtypes.rst:4449 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4452 +#: ../../library/stdtypes.rst:4453 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4457 +#: ../../library/stdtypes.rst:4458 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4461 +#: ../../library/stdtypes.rst:4462 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4465 +#: ../../library/stdtypes.rst:4466 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4467 +#: ../../library/stdtypes.rst:4468 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 " @@ -4700,70 +4701,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4475 +#: ../../library/stdtypes.rst:4476 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:4481 +#: ../../library/stdtypes.rst:4482 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4486 +#: ../../library/stdtypes.rst:4487 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4491 +#: ../../library/stdtypes.rst:4492 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:4497 +#: ../../library/stdtypes.rst:4498 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:4500 +#: ../../library/stdtypes.rst:4501 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:4504 +#: ../../library/stdtypes.rst:4505 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4510 +#: ../../library/stdtypes.rst:4511 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4517 +#: ../../library/stdtypes.rst:4518 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:4523 +#: ../../library/stdtypes.rst:4524 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4526 +#: ../../library/stdtypes.rst:4527 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 " @@ -4771,71 +4772,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4533 +#: ../../library/stdtypes.rst:4534 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4536 +#: ../../library/stdtypes.rst:4537 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:4546 +#: ../../library/stdtypes.rst:4547 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:4554 +#: ../../library/stdtypes.rst:4555 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:4560 +#: ../../library/stdtypes.rst:4561 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:4564 +#: ../../library/stdtypes.rst:4565 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:4582 +#: ../../library/stdtypes.rst:4583 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4586 +#: ../../library/stdtypes.rst:4587 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4598 +#: ../../library/stdtypes.rst:4599 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4603 +#: ../../library/stdtypes.rst:4604 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4610 +#: ../../library/stdtypes.rst:4611 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4612 +#: ../../library/stdtypes.rst:4613 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 " @@ -4843,23 +4844,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4617 +#: ../../library/stdtypes.rst:4618 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4622 +#: ../../library/stdtypes.rst:4623 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4626 +#: ../../library/stdtypes.rst:4627 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4629 +#: ../../library/stdtypes.rst:4630 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4867,39 +4868,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4634 +#: ../../library/stdtypes.rst:4635 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:4637 +#: ../../library/stdtypes.rst:4638 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4642 +#: ../../library/stdtypes.rst:4643 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:4647 +#: ../../library/stdtypes.rst:4648 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:4650 +#: ../../library/stdtypes.rst:4651 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4655 +#: ../../library/stdtypes.rst:4656 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4660 +#: ../../library/stdtypes.rst:4661 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, " @@ -4909,15 +4910,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4667 +#: ../../library/stdtypes.rst:4668 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4708 +#: ../../library/stdtypes.rst:4709 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4715 +#: ../../library/stdtypes.rst:4716 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 " @@ -4925,7 +4926,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4723 +#: ../../library/stdtypes.rst:4724 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 " @@ -4933,14 +4934,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4728 +#: ../../library/stdtypes.rst:4729 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:4732 +#: ../../library/stdtypes.rst:4733 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 " @@ -4950,7 +4951,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4742 +#: ../../library/stdtypes.rst:4743 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4959,7 +4960,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4747 +#: ../../library/stdtypes.rst:4748 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4970,7 +4971,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4754 +#: ../../library/stdtypes.rst:4755 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4979,7 +4980,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4760 +#: ../../library/stdtypes.rst:4761 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -4988,7 +4989,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4766 +#: ../../library/stdtypes.rst:4767 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -4998,7 +4999,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4773 +#: ../../library/stdtypes.rst:4774 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 " @@ -5007,23 +5008,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4781 +#: ../../library/stdtypes.rst:4782 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4786 +#: ../../library/stdtypes.rst:4787 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4793 +#: ../../library/stdtypes.rst:4794 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4799 +#: ../../library/stdtypes.rst:4800 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5033,19 +5034,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4809 +#: ../../library/stdtypes.rst:4810 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4812 +#: ../../library/stdtypes.rst:4813 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4815 +#: ../../library/stdtypes.rst:4816 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5054,7 +5055,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4821 +#: ../../library/stdtypes.rst:4822 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5063,7 +5064,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4827 +#: ../../library/stdtypes.rst:4828 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5071,7 +5072,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4833 +#: ../../library/stdtypes.rst:4834 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5080,21 +5081,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4839 +#: ../../library/stdtypes.rst:4840 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4845 +#: ../../library/stdtypes.rst:4846 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4853 +#: ../../library/stdtypes.rst:4854 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 " @@ -5102,13 +5103,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4861 +#: ../../library/stdtypes.rst:4862 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4869 +#: ../../library/stdtypes.rst:4870 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5117,325 +5118,325 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4879 +#: ../../library/stdtypes.rst:4880 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4890 +#: ../../library/stdtypes.rst:4891 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4898 +#: ../../library/stdtypes.rst:4899 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4906 +#: ../../library/stdtypes.rst:4907 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4917 +#: ../../library/stdtypes.rst:4918 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4919 +#: ../../library/stdtypes.rst:4920 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4923 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4924 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4925 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4926 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4927 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4928 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4929 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4930 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4931 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4932 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4939 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4940 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4942 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4945 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4948 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4948 +#: ../../library/stdtypes.rst:4949 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4950 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4951 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4952 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4952 +#: ../../library/stdtypes.rst:4953 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4954 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4955 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4956 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4957 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4958 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4959 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4960 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4961 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4962 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4963 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4964 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4965 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4966 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4967 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4968 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4969 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4970 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4971 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4972 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4973 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4974 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4975 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:4976 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4980 +#: ../../library/stdtypes.rst:4981 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4982 +#: ../../library/stdtypes.rst:4983 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:4987 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4994 +#: ../../library/stdtypes.rst:4995 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5004 +#: ../../library/stdtypes.rst:5005 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5015 +#: ../../library/stdtypes.rst:5016 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:5022 +#: ../../library/stdtypes.rst:5023 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5022 +#: ../../library/stdtypes.rst:5023 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5027 +#: ../../library/stdtypes.rst:5028 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5025 +#: ../../library/stdtypes.rst:5026 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5030 +#: ../../library/stdtypes.rst:5031 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5030 +#: ../../library/stdtypes.rst:5031 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5039 +#: ../../library/stdtypes.rst:5040 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5045 +#: ../../library/stdtypes.rst:5046 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5444,7 +5445,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5052 +#: ../../library/stdtypes.rst:5053 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 " @@ -5452,76 +5453,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5062 +#: ../../library/stdtypes.rst:5063 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5064 +#: ../../library/stdtypes.rst:5065 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5068 +#: ../../library/stdtypes.rst:5069 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5072 +#: ../../library/stdtypes.rst:5073 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5076 +#: ../../library/stdtypes.rst:5077 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5080 +#: ../../library/stdtypes.rst:5081 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5087 +#: ../../library/stdtypes.rst:5088 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5094 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5101 +#: ../../library/stdtypes.rst:5102 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:5114 +#: ../../library/stdtypes.rst:5115 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:5132 +#: ../../library/stdtypes.rst:5133 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5140 +#: ../../library/stdtypes.rst:5141 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5142 +#: ../../library/stdtypes.rst:5143 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5149 +#: ../../library/stdtypes.rst:5150 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5151 +#: ../../library/stdtypes.rst:5152 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 " @@ -5532,7 +5533,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5158 +#: ../../library/stdtypes.rst:5159 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5543,32 +5544,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5166 +#: ../../library/stdtypes.rst:5167 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5174 +#: ../../library/stdtypes.rst:5175 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5176 +#: ../../library/stdtypes.rst:5177 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5182 +#: ../../library/stdtypes.rst:5183 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5184 +#: ../../library/stdtypes.rst:5185 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:5187 +#: ../../library/stdtypes.rst:5188 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5576,15 +5577,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5191 +#: ../../library/stdtypes.rst:5192 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5197 +#: ../../library/stdtypes.rst:5198 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5201 +#: ../../library/stdtypes.rst:5202 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 " @@ -5592,7 +5593,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5206 +#: ../../library/stdtypes.rst:5207 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:" @@ -5604,7 +5605,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5215 +#: ../../library/stdtypes.rst:5216 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5614,15 +5615,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5235 ../../library/stdtypes.rst:5266 +#: ../../library/stdtypes.rst:5236 ../../library/stdtypes.rst:5267 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5243 +#: ../../library/stdtypes.rst:5244 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5249 +#: ../../library/stdtypes.rst:5250 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5632,23 +5633,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5256 +#: ../../library/stdtypes.rst:5257 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5263 +#: ../../library/stdtypes.rst:5264 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:5272 +#: ../../library/stdtypes.rst:5273 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5278 +#: ../../library/stdtypes.rst:5279 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 " @@ -5656,30 +5657,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5283 +#: ../../library/stdtypes.rst:5284 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5289 +#: ../../library/stdtypes.rst:5290 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5291 +#: ../../library/stdtypes.rst:5292 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:5295 +#: ../../library/stdtypes.rst:5296 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5302 +#: ../../library/stdtypes.rst:5303 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5304 +#: ../../library/stdtypes.rst:5305 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5687,15 +5688,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5309 +#: ../../library/stdtypes.rst:5310 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5315 +#: ../../library/stdtypes.rst:5316 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5317 +#: ../../library/stdtypes.rst:5318 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 " @@ -5703,15 +5704,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5322 +#: ../../library/stdtypes.rst:5323 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5328 +#: ../../library/stdtypes.rst:5329 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5330 +#: ../../library/stdtypes.rst:5331 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5722,104 +5723,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5343 +#: ../../library/stdtypes.rst:5344 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5349 +#: ../../library/stdtypes.rst:5350 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5351 +#: ../../library/stdtypes.rst:5352 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5358 +#: ../../library/stdtypes.rst:5359 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5360 +#: ../../library/stdtypes.rst:5361 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:5367 +#: ../../library/stdtypes.rst:5368 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5373 +#: ../../library/stdtypes.rst:5374 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5378 +#: ../../library/stdtypes.rst:5379 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5383 +#: ../../library/stdtypes.rst:5384 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5389 +#: ../../library/stdtypes.rst:5390 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5397 +#: ../../library/stdtypes.rst:5398 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5403 +#: ../../library/stdtypes.rst:5404 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:5410 +#: ../../library/stdtypes.rst:5411 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:5419 +#: ../../library/stdtypes.rst:5420 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5420 +#: ../../library/stdtypes.rst:5421 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5423 +#: ../../library/stdtypes.rst:5424 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5426 +#: ../../library/stdtypes.rst:5427 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5428 +#: ../../library/stdtypes.rst:5429 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:5431 +#: ../../library/stdtypes.rst:5432 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." From 3a9823384c019c71833931a018bac95c446d0573 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Apr 2022 00:16:58 +0000 Subject: [PATCH 6/7] sync with cpython b0ec17b6 --- c-api/memory.po | 6 +- library/pkgutil.po | 16 +- library/ssl.po | 11 +- library/stdtypes.po | 1190 ++++++++++++++++++++++--------------------- 4 files changed, 617 insertions(+), 606 deletions(-) diff --git a/c-api/memory.po b/c-api/memory.po index ce03c92a4a..be72772543 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-03 00:14+0000\n" +"POT-Creation-Date: 2022-04-08 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -553,8 +553,8 @@ msgstr "" #: ../../c-api/memory.rst:405 msgid "" -"Structure used to describe a memory block allocator. The structure has four " -"fields:" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" msgstr "" #: ../../c-api/memory.rst:409 ../../c-api/memory.rst:626 diff --git a/library/pkgutil.po b/library/pkgutil.po index a3997e1990..e8daa2cdd5 100644 --- a/library/pkgutil.po +++ b/library/pkgutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-13 00:11+0000\n" +"POT-Creation-Date: 2022-04-08 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -45,9 +45,9 @@ msgstr "" #: ../../library/pkgutil.rst:28 msgid "" "This will add to the package's ``__path__`` all subdirectories of " -"directories on ``sys.path`` named after the package. This is useful if one " -"wants to distribute different parts of a single logical package as multiple " -"directories." +"directories on :data:`sys.path` named after the package. This is useful if " +"one wants to distribute different parts of a single logical package as " +"multiple directories." msgstr "" #: ../../library/pkgutil.rst:33 @@ -164,9 +164,9 @@ msgstr "" #: ../../library/pkgutil.rst:131 msgid "" -"If fullname contains a '.', the finders will be for the package containing " -"fullname, otherwise they will be all registered top level finders (i.e. " -"those on both sys.meta_path and sys.path_hooks)." +"If fullname contains a ``'.'``, the finders will be for the package " +"containing fullname, otherwise they will be all registered top level finders " +"(i.e. those on both :data:`sys.meta_path` and :data:`sys.path_hooks`)." msgstr "" #: ../../library/pkgutil.rst:135 @@ -182,7 +182,7 @@ msgstr "" #: ../../library/pkgutil.rst:147 msgid "" "Yields :class:`ModuleInfo` for all submodules on *path*, or, if *path* is " -"``None``, all top-level modules on ``sys.path``." +"``None``, all top-level modules on :data:`sys.path`." msgstr "" #: ../../library/pkgutil.rst:150 ../../library/pkgutil.rst:171 diff --git a/library/ssl.po b/library/ssl.po index aacb522692..42fd28c7ec 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-22 00:12+0000\n" +"POT-Creation-Date: 2022-04-08 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1514,7 +1514,7 @@ msgstr "" #: ../../library/ssl.rst:1399 msgid "" "Return the actual SSL protocol version negotiated by the connection as a " -"string, or ``None`` is no secure connection is established. As of this " +"string, or ``None`` if no secure connection is established. As of this " "writing, possible return values include ``\"SSLv2\"``, ``\"SSLv3\"``, ``" "\"TLSv1\"``, ``\"TLSv1.1\"`` and ``\"TLSv1.2\"``. Recent OpenSSL versions " "may define more return values." @@ -1735,10 +1735,9 @@ msgid "" "must be the path to a single file in PEM format containing the certificate " "as well as any number of CA certificates needed to establish the " "certificate's authenticity. The *keyfile* string, if present, must point to " -"a file containing the private key in. Otherwise the private key will be " -"taken from *certfile* as well. See the discussion of :ref:`ssl-" -"certificates` for more information on how the certificate is stored in the " -"*certfile*." +"a file containing the private key. Otherwise the private key will be taken " +"from *certfile* as well. See the discussion of :ref:`ssl-certificates` for " +"more information on how the certificate is stored in the *certfile*." msgstr "" #: ../../library/ssl.rst:1556 diff --git a/library/stdtypes.po b/library/stdtypes.po index f62a4d8049..46c20791b6 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: 2022-04-06 00:13+0000\n" +"POT-Creation-Date: 2022-04-08 00:15+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-" @@ -116,8 +116,8 @@ msgstr "結果" #: ../../library/stdtypes.rst:85 ../../library/stdtypes.rst:275 #: ../../library/stdtypes.rst:414 ../../library/stdtypes.rst:883 -#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2321 -#: ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:1088 ../../library/stdtypes.rst:2325 +#: ../../library/stdtypes.rst:3546 msgid "Notes" msgstr "註解" @@ -131,8 +131,8 @@ msgstr "" #: ../../library/stdtypes.rst:87 ../../library/stdtypes.rst:285 #: ../../library/stdtypes.rst:885 ../../library/stdtypes.rst:888 -#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2327 -#: ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:1099 ../../library/stdtypes.rst:2331 +#: ../../library/stdtypes.rst:3552 msgid "\\(1)" msgstr "\\(1)" @@ -146,8 +146,8 @@ msgstr "" #: ../../library/stdtypes.rst:90 ../../library/stdtypes.rst:288 #: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1127 -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:2333 -#: ../../library/stdtypes.rst:3552 ../../library/stdtypes.rst:3554 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:2337 +#: ../../library/stdtypes.rst:3556 ../../library/stdtypes.rst:3558 msgid "\\(2)" msgstr "\\(2)" @@ -160,18 +160,18 @@ msgid "if *x* is false, then ``True``, else ``False``" msgstr "" #: ../../library/stdtypes.rst:93 ../../library/stdtypes.rst:897 -#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2335 -#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:2339 -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3556 -#: ../../library/stdtypes.rst:3558 ../../library/stdtypes.rst:3560 -#: ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:1130 ../../library/stdtypes.rst:2339 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:2343 +#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:3562 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:3566 msgid "\\(3)" msgstr "\\(3)" #: ../../library/stdtypes.rst:102 ../../library/stdtypes.rst:319 #: ../../library/stdtypes.rst:432 ../../library/stdtypes.rst:934 -#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2367 -#: ../../library/stdtypes.rst:3592 +#: ../../library/stdtypes.rst:1138 ../../library/stdtypes.rst:2371 +#: ../../library/stdtypes.rst:3596 msgid "Notes:" msgstr "註解:" @@ -210,9 +210,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2298 -#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3519 -#: ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:143 ../../library/stdtypes.rst:2302 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3523 +#: ../../library/stdtypes.rst:3546 msgid "Meaning" msgstr "" @@ -495,7 +495,7 @@ msgid "" msgstr "" #: ../../library/stdtypes.rst:301 ../../library/stdtypes.rst:1120 -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3579 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3583 msgid "\\(6)" msgstr "\\(6)" @@ -533,9 +533,9 @@ msgstr "" #: ../../library/stdtypes.rst:310 ../../library/stdtypes.rst:312 #: ../../library/stdtypes.rst:1109 ../../library/stdtypes.rst:1112 -#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:2357 -#: ../../library/stdtypes.rst:2360 ../../library/stdtypes.rst:3575 -#: ../../library/stdtypes.rst:3582 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:2361 +#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3579 +#: ../../library/stdtypes.rst:3586 msgid "\\(5)" msgstr "\\(5)" @@ -671,8 +671,8 @@ msgstr "" #: ../../library/stdtypes.rst:416 ../../library/stdtypes.rst:419 #: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1133 -#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2347 -#: ../../library/stdtypes.rst:3564 ../../library/stdtypes.rst:3568 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:2351 +#: ../../library/stdtypes.rst:3568 ../../library/stdtypes.rst:3572 msgid "\\(4)" msgstr "\\(4)" @@ -1222,7 +1222,7 @@ msgid "" "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:910 ../../library/stdtypes.rst:3554 msgid "\\(8)" msgstr "\\(8)" @@ -2087,7 +2087,7 @@ msgstr "" msgid "Support for keyword arguments added." msgstr "" -#: ../../library/stdtypes.rst:1602 ../../library/stdtypes.rst:2738 +#: ../../library/stdtypes.rst:1602 ../../library/stdtypes.rst:2742 msgid "" "The *errors* is now checked in development mode and in :ref:`debug mode " "`." @@ -2458,14 +2458,14 @@ msgstr "" #: ../../library/stdtypes.rst:2005 ../../library/stdtypes.rst:2021 #: ../../library/stdtypes.rst:2073 ../../library/stdtypes.rst:2141 -#: ../../library/stdtypes.rst:2204 ../../library/stdtypes.rst:3054 -#: ../../library/stdtypes.rst:3070 ../../library/stdtypes.rst:3161 -#: ../../library/stdtypes.rst:3177 ../../library/stdtypes.rst:3202 -#: ../../library/stdtypes.rst:3216 ../../library/stdtypes.rst:3244 -#: ../../library/stdtypes.rst:3258 ../../library/stdtypes.rst:3276 -#: ../../library/stdtypes.rst:3303 ../../library/stdtypes.rst:3326 -#: ../../library/stdtypes.rst:3353 ../../library/stdtypes.rst:3395 -#: ../../library/stdtypes.rst:3419 +#: ../../library/stdtypes.rst:2208 ../../library/stdtypes.rst:3058 +#: ../../library/stdtypes.rst:3074 ../../library/stdtypes.rst:3165 +#: ../../library/stdtypes.rst:3181 ../../library/stdtypes.rst:3206 +#: ../../library/stdtypes.rst:3220 ../../library/stdtypes.rst:3248 +#: ../../library/stdtypes.rst:3262 ../../library/stdtypes.rst:3280 +#: ../../library/stdtypes.rst:3307 ../../library/stdtypes.rst:3330 +#: ../../library/stdtypes.rst:3357 ../../library/stdtypes.rst:3399 +#: ../../library/stdtypes.rst:3423 msgid "For example::" msgstr "" "舉例來說:\n" @@ -2644,7 +2644,7 @@ msgid "" "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2146 ../../library/stdtypes.rst:3363 +#: ../../library/stdtypes.rst:2146 ../../library/stdtypes.rst:3367 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 " @@ -2652,12 +2652,19 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2154 ../../library/stdtypes.rst:3371 +#: ../../library/stdtypes.rst:2154 msgid "" -"A workaround for apostrophes can be constructed using regular expressions::" +"The :func:`string.capwords` function does not have this problem, as it " +"splits words on spaces only." msgstr "" -#: ../../library/stdtypes.rst:2168 +#: ../../library/stdtypes.rst:2157 +msgid "" +"Alternatively, a workaround for apostrophes can be constructed using regular " +"expressions::" +msgstr "" + +#: ../../library/stdtypes.rst:2172 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 " @@ -2669,19 +2676,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2177 +#: ../../library/stdtypes.rst:2181 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2180 +#: ../../library/stdtypes.rst:2184 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2186 +#: ../../library/stdtypes.rst:2190 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`` " @@ -2690,13 +2697,13 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2192 +#: ../../library/stdtypes.rst:2196 msgid "" "The uppercasing algorithm used is described in section 3.13 of the Unicode " "Standard." msgstr "" -#: ../../library/stdtypes.rst:2198 +#: ../../library/stdtypes.rst:2202 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 " @@ -2704,11 +2711,11 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2216 +#: ../../library/stdtypes.rst:2220 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2229 +#: ../../library/stdtypes.rst:2233 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 " @@ -2719,7 +2726,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2237 +#: ../../library/stdtypes.rst:2241 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -2729,7 +2736,7 @@ msgid "" "in the C language." msgstr "" -#: ../../library/stdtypes.rst:2243 +#: ../../library/stdtypes.rst:2247 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 " @@ -2737,36 +2744,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2253 ../../library/stdtypes.rst:3474 +#: ../../library/stdtypes.rst:2257 ../../library/stdtypes.rst:3478 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2256 ../../library/stdtypes.rst:3477 +#: ../../library/stdtypes.rst:2260 ../../library/stdtypes.rst:3481 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2258 ../../library/stdtypes.rst:3479 +#: ../../library/stdtypes.rst:2262 ../../library/stdtypes.rst:3483 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2261 ../../library/stdtypes.rst:3482 +#: ../../library/stdtypes.rst:2265 ../../library/stdtypes.rst:3486 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2264 ../../library/stdtypes.rst:3485 +#: ../../library/stdtypes.rst:2268 ../../library/stdtypes.rst:3489 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:2268 ../../library/stdtypes.rst:3489 +#: ../../library/stdtypes.rst:2272 ../../library/stdtypes.rst:3493 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -2774,15 +2781,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2273 ../../library/stdtypes.rst:3494 +#: ../../library/stdtypes.rst:2277 ../../library/stdtypes.rst:3498 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:3496 +#: ../../library/stdtypes.rst:2279 ../../library/stdtypes.rst:3500 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2277 +#: ../../library/stdtypes.rst:2281 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 " @@ -2790,279 +2797,279 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2286 ../../library/stdtypes.rst:3507 +#: ../../library/stdtypes.rst:2290 ../../library/stdtypes.rst:3511 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2289 ../../library/stdtypes.rst:3510 +#: ../../library/stdtypes.rst:2293 ../../library/stdtypes.rst:3514 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2298 ../../library/stdtypes.rst:3519 +#: ../../library/stdtypes.rst:2302 ../../library/stdtypes.rst:3523 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3525 msgid "``'#'``" msgstr "``'#'``" -#: ../../library/stdtypes.rst:2300 ../../library/stdtypes.rst:3521 +#: ../../library/stdtypes.rst:2304 ../../library/stdtypes.rst:3525 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 +#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3528 msgid "``'0'``" msgstr "``'0'``" -#: ../../library/stdtypes.rst:2303 ../../library/stdtypes.rst:3524 +#: ../../library/stdtypes.rst:2307 ../../library/stdtypes.rst:3528 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2305 ../../library/stdtypes.rst:3526 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3530 msgid "``'-'``" msgstr "``'-'``" -#: ../../library/stdtypes.rst:2305 ../../library/stdtypes.rst:3526 +#: ../../library/stdtypes.rst:2309 ../../library/stdtypes.rst:3530 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3529 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3533 msgid "``' '``" msgstr "``' '``" -#: ../../library/stdtypes.rst:2308 ../../library/stdtypes.rst:3529 +#: ../../library/stdtypes.rst:2312 ../../library/stdtypes.rst:3533 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/stdtypes.rst:2311 ../../library/stdtypes.rst:3532 +#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2315 ../../library/stdtypes.rst:3536 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:3540 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:2318 ../../library/stdtypes.rst:3539 +#: ../../library/stdtypes.rst:2322 ../../library/stdtypes.rst:3543 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2321 ../../library/stdtypes.rst:3542 +#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:3544 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/stdtypes.rst:2323 ../../library/stdtypes.rst:2325 -#: ../../library/stdtypes.rst:3544 ../../library/stdtypes.rst:3546 +#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:2329 +#: ../../library/stdtypes.rst:3548 ../../library/stdtypes.rst:3550 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2325 ../../library/stdtypes.rst:3546 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 msgid "``'i'``" msgstr "``'i'``" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/stdtypes.rst:2327 ../../library/stdtypes.rst:3548 +#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 msgid "``'u'``" msgstr "``'u'``" -#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3550 +#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/stdtypes.rst:2331 ../../library/stdtypes.rst:3552 +#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/stdtypes.rst:2333 ../../library/stdtypes.rst:3554 +#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/stdtypes.rst:2335 ../../library/stdtypes.rst:3556 +#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 msgid "Floating point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3562 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/stdtypes.rst:2337 ../../library/stdtypes.rst:3558 +#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3562 msgid "Floating point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:3560 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3564 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/stdtypes.rst:2339 ../../library/stdtypes.rst:2341 -#: ../../library/stdtypes.rst:3560 ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:2345 +#: ../../library/stdtypes.rst:3564 ../../library/stdtypes.rst:3566 msgid "Floating point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2341 ../../library/stdtypes.rst:3562 +#: ../../library/stdtypes.rst:2345 ../../library/stdtypes.rst:3566 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3568 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/stdtypes.rst:2343 ../../library/stdtypes.rst:3564 +#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3568 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:2347 ../../library/stdtypes.rst:3568 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3572 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/stdtypes.rst:2347 ../../library/stdtypes.rst:3568 +#: ../../library/stdtypes.rst:2351 ../../library/stdtypes.rst:3572 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:2351 ../../library/stdtypes.rst:3572 +#: ../../library/stdtypes.rst:2355 ../../library/stdtypes.rst:3576 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/stdtypes.rst:2351 +#: ../../library/stdtypes.rst:2355 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2354 ../../library/stdtypes.rst:3585 +#: ../../library/stdtypes.rst:2358 ../../library/stdtypes.rst:3589 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/stdtypes.rst:2354 +#: ../../library/stdtypes.rst:2358 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2357 ../../library/stdtypes.rst:3579 +#: ../../library/stdtypes.rst:2361 ../../library/stdtypes.rst:3583 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/stdtypes.rst:2357 +#: ../../library/stdtypes.rst:2361 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2360 ../../library/stdtypes.rst:3582 +#: ../../library/stdtypes.rst:2364 ../../library/stdtypes.rst:3586 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/stdtypes.rst:2360 +#: ../../library/stdtypes.rst:2364 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2363 ../../library/stdtypes.rst:3588 +#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3592 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/stdtypes.rst:2363 ../../library/stdtypes.rst:3588 +#: ../../library/stdtypes.rst:2367 ../../library/stdtypes.rst:3592 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2370 ../../library/stdtypes.rst:3595 +#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3599 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2374 ../../library/stdtypes.rst:3599 +#: ../../library/stdtypes.rst:2378 ../../library/stdtypes.rst:3603 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:2378 ../../library/stdtypes.rst:3603 +#: ../../library/stdtypes.rst:2382 ../../library/stdtypes.rst:3607 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2381 ../../library/stdtypes.rst:3606 +#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3610 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2385 ../../library/stdtypes.rst:3610 +#: ../../library/stdtypes.rst:2389 ../../library/stdtypes.rst:3614 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:2388 ../../library/stdtypes.rst:3613 +#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3617 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2392 ../../library/stdtypes.rst:3617 +#: ../../library/stdtypes.rst:2396 ../../library/stdtypes.rst:3621 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2395 ../../library/stdtypes.rst:3626 +#: ../../library/stdtypes.rst:2399 ../../library/stdtypes.rst:3630 msgid "See :pep:`237`." msgstr "參閱 :pep:`237`\\ 。" -#: ../../library/stdtypes.rst:2397 +#: ../../library/stdtypes.rst:2401 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:2402 +#: ../../library/stdtypes.rst:2406 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2413 +#: ../../library/stdtypes.rst:2417 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2421 +#: ../../library/stdtypes.rst:2425 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 :" @@ -3070,17 +3077,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2426 +#: ../../library/stdtypes.rst:2430 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:2432 +#: ../../library/stdtypes.rst:2436 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2436 +#: ../../library/stdtypes.rst:2440 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3088,40 +3095,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2443 +#: ../../library/stdtypes.rst:2447 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:2446 +#: ../../library/stdtypes.rst:2450 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2447 +#: ../../library/stdtypes.rst:2451 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:2448 +#: ../../library/stdtypes.rst:2452 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2450 +#: ../../library/stdtypes.rst:2454 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:2454 +#: ../../library/stdtypes.rst:2458 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:2458 +#: ../../library/stdtypes.rst:2462 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3134,29 +3141,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2468 +#: ../../library/stdtypes.rst:2472 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2475 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2472 +#: ../../library/stdtypes.rst:2476 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2473 +#: ../../library/stdtypes.rst:2477 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2475 +#: ../../library/stdtypes.rst:2479 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2477 +#: ../../library/stdtypes.rst:2481 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3164,32 +3171,32 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2483 +#: ../../library/stdtypes.rst:2487 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:2490 +#: ../../library/stdtypes.rst:2494 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2494 +#: ../../library/stdtypes.rst:2498 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2499 ../../library/stdtypes.rst:2593 +#: ../../library/stdtypes.rst:2503 ../../library/stdtypes.rst:2597 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2505 +#: ../../library/stdtypes.rst:2509 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 " @@ -3198,13 +3205,13 @@ msgid "" "negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2521 +#: ../../library/stdtypes.rst:2525 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:2525 +#: ../../library/stdtypes.rst:2529 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 " @@ -3212,14 +3219,14 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2530 +#: ../../library/stdtypes.rst:2534 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:2535 +#: ../../library/stdtypes.rst:2539 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-" @@ -3231,51 +3238,51 @@ msgid "" "objects will always compare unequal." msgstr "" -#: ../../library/stdtypes.rst:2548 +#: ../../library/stdtypes.rst:2552 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2552 +#: ../../library/stdtypes.rst:2556 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2557 +#: ../../library/stdtypes.rst:2561 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2560 +#: ../../library/stdtypes.rst:2564 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2561 +#: ../../library/stdtypes.rst:2565 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2562 +#: ../../library/stdtypes.rst:2566 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2563 +#: ../../library/stdtypes.rst:2567 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2565 +#: ../../library/stdtypes.rst:2569 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:2569 +#: ../../library/stdtypes.rst:2573 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2571 +#: ../../library/stdtypes.rst:2575 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -3283,33 +3290,33 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2577 +#: ../../library/stdtypes.rst:2581 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:2584 +#: ../../library/stdtypes.rst:2588 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2588 +#: ../../library/stdtypes.rst:2592 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2601 +#: ../../library/stdtypes.rst:2605 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:2606 +#: ../../library/stdtypes.rst:2610 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 " @@ -3317,7 +3324,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2611 +#: ../../library/stdtypes.rst:2615 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -3325,11 +3332,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2620 +#: ../../library/stdtypes.rst:2624 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:2625 +#: ../../library/stdtypes.rst:2629 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -3338,97 +3345,97 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:2633 +#: ../../library/stdtypes.rst:2637 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:2640 +#: ../../library/stdtypes.rst:2644 msgid "and::" msgstr "" "和:\n" "\n" "::" -#: ../../library/stdtypes.rst:2645 +#: ../../library/stdtypes.rst:2649 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:2650 +#: ../../library/stdtypes.rst:2654 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:2653 +#: ../../library/stdtypes.rst:2657 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:2659 +#: ../../library/stdtypes.rst:2663 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:2663 ../../library/stdtypes.rst:2762 -#: ../../library/stdtypes.rst:2784 ../../library/stdtypes.rst:2850 -#: ../../library/stdtypes.rst:2863 +#: ../../library/stdtypes.rst:2667 ../../library/stdtypes.rst:2766 +#: ../../library/stdtypes.rst:2788 ../../library/stdtypes.rst:2854 +#: ../../library/stdtypes.rst:2867 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:2666 ../../library/stdtypes.rst:2774 -#: ../../library/stdtypes.rst:2787 ../../library/stdtypes.rst:2853 -#: ../../library/stdtypes.rst:2866 +#: ../../library/stdtypes.rst:2670 ../../library/stdtypes.rst:2778 +#: ../../library/stdtypes.rst:2791 ../../library/stdtypes.rst:2857 +#: ../../library/stdtypes.rst:2870 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:2673 +#: ../../library/stdtypes.rst:2677 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:2682 +#: ../../library/stdtypes.rst:2686 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2686 ../../library/stdtypes.rst:2708 -#: ../../library/stdtypes.rst:2838 ../../library/stdtypes.rst:2931 -#: ../../library/stdtypes.rst:2945 ../../library/stdtypes.rst:2976 -#: ../../library/stdtypes.rst:2990 ../../library/stdtypes.rst:3032 -#: ../../library/stdtypes.rst:3102 ../../library/stdtypes.rst:3120 -#: ../../library/stdtypes.rst:3148 ../../library/stdtypes.rst:3287 -#: ../../library/stdtypes.rst:3342 ../../library/stdtypes.rst:3385 -#: ../../library/stdtypes.rst:3406 ../../library/stdtypes.rst:3428 -#: ../../library/stdtypes.rst:3630 +#: ../../library/stdtypes.rst:2690 ../../library/stdtypes.rst:2712 +#: ../../library/stdtypes.rst:2842 ../../library/stdtypes.rst:2935 +#: ../../library/stdtypes.rst:2949 ../../library/stdtypes.rst:2980 +#: ../../library/stdtypes.rst:2994 ../../library/stdtypes.rst:3036 +#: ../../library/stdtypes.rst:3106 ../../library/stdtypes.rst:3124 +#: ../../library/stdtypes.rst:3152 ../../library/stdtypes.rst:3291 +#: ../../library/stdtypes.rst:3346 ../../library/stdtypes.rst:3389 +#: ../../library/stdtypes.rst:3410 ../../library/stdtypes.rst:3432 +#: ../../library/stdtypes.rst:3634 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:2695 +#: ../../library/stdtypes.rst:2699 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:2704 +#: ../../library/stdtypes.rst:2708 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2717 +#: ../../library/stdtypes.rst:2721 msgid "" "Return a string decoded from the given bytes. Default encoding is " "``'utf-8'``. *errors* may be given to set a different error handling " @@ -3439,25 +3446,25 @@ msgid "" "encodings, see section :ref:`standard-encodings`." msgstr "" -#: ../../library/stdtypes.rst:2725 +#: ../../library/stdtypes.rst:2729 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:2731 +#: ../../library/stdtypes.rst:2735 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:2735 +#: ../../library/stdtypes.rst:2739 msgid "Added support for keyword arguments." msgstr "新增關鍵字引數的支援。" -#: ../../library/stdtypes.rst:2746 +#: ../../library/stdtypes.rst:2750 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -3465,11 +3472,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2751 +#: ../../library/stdtypes.rst:2755 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2757 +#: ../../library/stdtypes.rst:2761 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 " @@ -3477,20 +3484,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2767 +#: ../../library/stdtypes.rst:2771 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:2781 +#: ../../library/stdtypes.rst:2785 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:2794 +#: ../../library/stdtypes.rst:2798 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 " @@ -3500,7 +3507,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:2805 +#: ../../library/stdtypes.rst:2809 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 " @@ -3508,7 +3515,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:2816 +#: ../../library/stdtypes.rst:2820 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 " @@ -3517,24 +3524,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:2823 ../../library/stdtypes.rst:2880 +#: ../../library/stdtypes.rst:2827 ../../library/stdtypes.rst:2884 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2829 +#: ../../library/stdtypes.rst:2833 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:2833 +#: ../../library/stdtypes.rst:2837 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:2845 +#: ../../library/stdtypes.rst:2849 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -3542,13 +3549,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2860 +#: ../../library/stdtypes.rst:2864 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:2873 +#: ../../library/stdtypes.rst:2877 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 " @@ -3557,7 +3564,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:2886 +#: ../../library/stdtypes.rst:2890 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -3565,11 +3572,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:2891 +#: ../../library/stdtypes.rst:2895 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:2897 +#: ../../library/stdtypes.rst:2901 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 " @@ -3577,22 +3584,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:2902 +#: ../../library/stdtypes.rst:2906 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:2905 +#: ../../library/stdtypes.rst:2909 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:2911 +#: ../../library/stdtypes.rst:2915 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2915 +#: ../../library/stdtypes.rst:2919 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 " @@ -3601,7 +3608,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:2924 +#: ../../library/stdtypes.rst:2928 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). " @@ -3609,7 +3616,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2938 +#: ../../library/stdtypes.rst:2942 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). " @@ -3617,7 +3624,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2952 +#: ../../library/stdtypes.rst:2956 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 " @@ -3627,14 +3634,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2964 +#: ../../library/stdtypes.rst:2968 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:2983 +#: ../../library/stdtypes.rst:2987 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). " @@ -3642,7 +3649,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2997 +#: ../../library/stdtypes.rst:3001 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 " @@ -3652,7 +3659,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:3008 +#: ../../library/stdtypes.rst:3012 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 " @@ -3662,14 +3669,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3020 +#: ../../library/stdtypes.rst:3024 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:3039 +#: ../../library/stdtypes.rst:3043 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 " @@ -3678,7 +3685,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3045 +#: ../../library/stdtypes.rst:3049 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',')`` " @@ -3689,7 +3696,7 @@ msgid "" "object being split. The *sep* argument may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3063 +#: ../../library/stdtypes.rst:3067 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 " @@ -3699,7 +3706,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3084 +#: ../../library/stdtypes.rst:3088 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 " @@ -3709,13 +3716,13 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3097 +#: ../../library/stdtypes.rst:3101 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3106 +#: ../../library/stdtypes.rst:3110 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 " @@ -3723,14 +3730,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3114 +#: ../../library/stdtypes.rst:3118 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:3127 +#: ../../library/stdtypes.rst:3131 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 " @@ -3746,7 +3753,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3155 +#: ../../library/stdtypes.rst:3159 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -3755,7 +3762,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3172 +#: ../../library/stdtypes.rst:3176 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -3763,35 +3770,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3188 +#: ../../library/stdtypes.rst:3192 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:3198 +#: ../../library/stdtypes.rst:3202 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:3213 +#: ../../library/stdtypes.rst:3217 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:3223 ../../library/stdtypes.rst:3265 -#: ../../library/stdtypes.rst:3281 ../../library/stdtypes.rst:3331 -#: ../../library/stdtypes.rst:3400 +#: ../../library/stdtypes.rst:3227 ../../library/stdtypes.rst:3269 +#: ../../library/stdtypes.rst:3285 ../../library/stdtypes.rst:3335 +#: ../../library/stdtypes.rst:3404 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:3231 +#: ../../library/stdtypes.rst:3235 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -3799,27 +3806,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3240 +#: ../../library/stdtypes.rst:3244 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:3255 +#: ../../library/stdtypes.rst:3259 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:3273 +#: ../../library/stdtypes.rst:3277 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3298 +#: ../../library/stdtypes.rst:3302 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 " @@ -3827,20 +3834,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3310 +#: ../../library/stdtypes.rst:3314 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:3323 +#: ../../library/stdtypes.rst:3327 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:3335 +#: ../../library/stdtypes.rst:3339 msgid "" "Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -3848,14 +3855,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3349 +#: ../../library/stdtypes.rst:3353 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:3358 +#: ../../library/stdtypes.rst:3362 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -3863,13 +3870,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3392 +#: ../../library/stdtypes.rst:3375 +msgid "" +"A workaround for apostrophes can be constructed using regular expressions::" +msgstr "" + +#: ../../library/stdtypes.rst:3396 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3413 +#: ../../library/stdtypes.rst:3417 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 " @@ -3878,11 +3890,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3435 +#: ../../library/stdtypes.rst:3439 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3452 +#: ../../library/stdtypes.rst:3456 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 " @@ -3890,7 +3902,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3457 +#: ../../library/stdtypes.rst:3461 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -3900,7 +3912,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3464 +#: ../../library/stdtypes.rst:3468 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 " @@ -3908,7 +3920,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3498 +#: ../../library/stdtypes.rst:3502 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 " @@ -3916,73 +3928,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:3572 +#: ../../library/stdtypes.rst:3576 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:3575 +#: ../../library/stdtypes.rst:3579 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/stdtypes.rst:3575 +#: ../../library/stdtypes.rst:3579 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:3579 +#: ../../library/stdtypes.rst:3583 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3582 +#: ../../library/stdtypes.rst:3586 msgid "" -"Bytes (converts any Python object using ``repr(obj)." -"encode('ascii','backslashreplace)``)." +"Bytes (converts any Python object using ``repr(obj).encode('ascii', " +"'backslashreplace')``)." msgstr "" -#: ../../library/stdtypes.rst:3585 +#: ../../library/stdtypes.rst:3589 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:3585 +#: ../../library/stdtypes.rst:3589 msgid "\\(7)" msgstr "\\(7)" -#: ../../library/stdtypes.rst:3620 +#: ../../library/stdtypes.rst:3624 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3623 +#: ../../library/stdtypes.rst:3627 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:3635 +#: ../../library/stdtypes.rst:3639 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:3642 +#: ../../library/stdtypes.rst:3646 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:3644 +#: ../../library/stdtypes.rst:3648 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:3650 +#: ../../library/stdtypes.rst:3654 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:3654 +#: ../../library/stdtypes.rst:3658 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 " @@ -3990,7 +4002,7 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:3659 +#: ../../library/stdtypes.rst:3663 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 " @@ -4000,13 +4012,13 @@ msgid "" "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:3666 +#: ../../library/stdtypes.rst:3670 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:3679 +#: ../../library/stdtypes.rst:3683 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 " @@ -4017,82 +4029,82 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:3688 +#: ../../library/stdtypes.rst:3692 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:3700 +#: ../../library/stdtypes.rst:3704 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:3721 +#: ../../library/stdtypes.rst:3725 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:3733 +#: ../../library/stdtypes.rst:3737 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now hashable." msgstr "" -#: ../../library/stdtypes.rst:3737 +#: ../../library/stdtypes.rst:3741 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:3741 +#: ../../library/stdtypes.rst:3745 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:3744 +#: ../../library/stdtypes.rst:3748 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:3748 +#: ../../library/stdtypes.rst:3752 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:3752 +#: ../../library/stdtypes.rst:3756 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:3771 +#: ../../library/stdtypes.rst:3775 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:3787 +#: ../../library/stdtypes.rst:3791 msgid "" "Note that, as with floating point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:3790 +#: ../../library/stdtypes.rst:3794 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:3796 +#: ../../library/stdtypes.rst:3800 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:3805 +#: ../../library/stdtypes.rst:3809 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -4100,7 +4112,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:3810 +#: ../../library/stdtypes.rst:3814 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' " @@ -4109,36 +4121,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:3819 +#: ../../library/stdtypes.rst:3823 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:3828 +#: ../../library/stdtypes.rst:3832 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:3835 +#: ../../library/stdtypes.rst:3839 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:3845 +#: ../../library/stdtypes.rst:3849 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:3852 +#: ../../library/stdtypes.rst:3856 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:3871 +#: ../../library/stdtypes.rst:3875 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 :" @@ -4147,20 +4159,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:3877 +#: ../../library/stdtypes.rst:3881 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:3888 +#: ../../library/stdtypes.rst:3892 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:3904 +#: ../../library/stdtypes.rst:3908 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 " @@ -4169,57 +4181,57 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:3910 +#: ../../library/stdtypes.rst:3914 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:3915 +#: ../../library/stdtypes.rst:3919 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:3938 +#: ../../library/stdtypes.rst:3942 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:3951 +#: ../../library/stdtypes.rst:3955 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:3977 +#: ../../library/stdtypes.rst:3981 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:3991 +#: ../../library/stdtypes.rst:3995 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:3994 +#: ../../library/stdtypes.rst:3998 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:3998 +#: ../../library/stdtypes.rst:4002 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4009 +#: ../../library/stdtypes.rst:4013 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:4028 +#: ../../library/stdtypes.rst:4032 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4045 +#: ../../library/stdtypes.rst:4049 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4049 +#: ../../library/stdtypes.rst:4053 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 " @@ -4227,59 +4239,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4054 +#: ../../library/stdtypes.rst:4058 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:4060 +#: ../../library/stdtypes.rst:4064 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4073 +#: ../../library/stdtypes.rst:4077 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4078 +#: ../../library/stdtypes.rst:4082 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:4081 ../../library/stdtypes.rst:4089 +#: ../../library/stdtypes.rst:4085 ../../library/stdtypes.rst:4093 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4086 +#: ../../library/stdtypes.rst:4090 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:4094 +#: ../../library/stdtypes.rst:4098 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4098 +#: ../../library/stdtypes.rst:4102 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4104 +#: ../../library/stdtypes.rst:4108 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4110 +#: ../../library/stdtypes.rst:4114 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4118 +#: ../../library/stdtypes.rst:4122 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4122 +#: ../../library/stdtypes.rst:4126 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -4289,7 +4301,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4129 +#: ../../library/stdtypes.rst:4133 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 " @@ -4297,7 +4309,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4134 +#: ../../library/stdtypes.rst:4138 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -4309,18 +4321,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4142 +#: ../../library/stdtypes.rst:4146 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:4146 +#: ../../library/stdtypes.rst:4150 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4151 +#: ../../library/stdtypes.rst:4155 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 " @@ -4328,92 +4340,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4157 +#: ../../library/stdtypes.rst:4161 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4159 +#: ../../library/stdtypes.rst:4163 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4160 +#: ../../library/stdtypes.rst:4164 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4161 +#: ../../library/stdtypes.rst:4165 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4163 +#: ../../library/stdtypes.rst:4167 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4168 +#: ../../library/stdtypes.rst:4172 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4172 +#: ../../library/stdtypes.rst:4176 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4176 +#: ../../library/stdtypes.rst:4180 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4180 +#: ../../library/stdtypes.rst:4184 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:4186 +#: ../../library/stdtypes.rst:4190 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4190 +#: ../../library/stdtypes.rst:4194 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4196 +#: ../../library/stdtypes.rst:4200 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4200 +#: ../../library/stdtypes.rst:4204 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4206 +#: ../../library/stdtypes.rst:4210 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4211 +#: ../../library/stdtypes.rst:4215 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4216 +#: ../../library/stdtypes.rst:4220 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4221 +#: ../../library/stdtypes.rst:4225 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4225 +#: ../../library/stdtypes.rst:4229 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4228 +#: ../../library/stdtypes.rst:4232 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -4423,7 +4435,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4235 +#: ../../library/stdtypes.rst:4239 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 " @@ -4433,14 +4445,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4242 +#: ../../library/stdtypes.rst:4246 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:4246 +#: ../../library/stdtypes.rst:4250 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 " @@ -4448,71 +4460,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4251 +#: ../../library/stdtypes.rst:4255 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:4254 +#: ../../library/stdtypes.rst:4258 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4256 +#: ../../library/stdtypes.rst:4260 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:4260 +#: ../../library/stdtypes.rst:4264 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4266 +#: ../../library/stdtypes.rst:4270 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4271 +#: ../../library/stdtypes.rst:4275 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4276 +#: ../../library/stdtypes.rst:4280 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4281 +#: ../../library/stdtypes.rst:4285 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4285 +#: ../../library/stdtypes.rst:4289 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4289 +#: ../../library/stdtypes.rst:4293 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4294 +#: ../../library/stdtypes.rst:4298 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4298 +#: ../../library/stdtypes.rst:4302 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4303 +#: ../../library/stdtypes.rst:4307 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4306 +#: ../../library/stdtypes.rst:4310 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -4520,18 +4532,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4311 +#: ../../library/stdtypes.rst:4315 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:4319 +#: ../../library/stdtypes.rst:4323 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4329 +#: ../../library/stdtypes.rst:4333 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -4540,7 +4552,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4335 +#: ../../library/stdtypes.rst:4339 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -4552,40 +4564,40 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4344 +#: ../../library/stdtypes.rst:4348 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:4352 +#: ../../library/stdtypes.rst:4356 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4355 +#: ../../library/stdtypes.rst:4359 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4357 +#: ../../library/stdtypes.rst:4361 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:4359 +#: ../../library/stdtypes.rst:4363 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4360 +#: ../../library/stdtypes.rst:4364 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4363 +#: ../../library/stdtypes.rst:4367 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 " @@ -4597,7 +4609,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4373 +#: ../../library/stdtypes.rst:4377 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 " @@ -4605,39 +4617,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4378 +#: ../../library/stdtypes.rst:4382 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4390 +#: ../../library/stdtypes.rst:4394 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:4394 +#: ../../library/stdtypes.rst:4398 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4399 +#: ../../library/stdtypes.rst:4403 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4403 +#: ../../library/stdtypes.rst:4407 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4407 +#: ../../library/stdtypes.rst:4411 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4412 +#: ../../library/stdtypes.rst:4416 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 " @@ -4648,51 +4660,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4430 +#: ../../library/stdtypes.rst:4434 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:4436 +#: ../../library/stdtypes.rst:4440 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4440 +#: ../../library/stdtypes.rst:4444 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4445 +#: ../../library/stdtypes.rst:4449 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4449 +#: ../../library/stdtypes.rst:4453 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4453 +#: ../../library/stdtypes.rst:4457 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4458 +#: ../../library/stdtypes.rst:4462 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4462 +#: ../../library/stdtypes.rst:4466 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4466 +#: ../../library/stdtypes.rst:4470 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4468 +#: ../../library/stdtypes.rst:4472 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 " @@ -4701,70 +4713,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4476 +#: ../../library/stdtypes.rst:4480 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:4482 +#: ../../library/stdtypes.rst:4486 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4487 +#: ../../library/stdtypes.rst:4491 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4492 +#: ../../library/stdtypes.rst:4496 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:4498 +#: ../../library/stdtypes.rst:4502 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:4501 +#: ../../library/stdtypes.rst:4505 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:4505 +#: ../../library/stdtypes.rst:4509 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4511 +#: ../../library/stdtypes.rst:4515 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4518 +#: ../../library/stdtypes.rst:4522 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:4524 +#: ../../library/stdtypes.rst:4528 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4527 +#: ../../library/stdtypes.rst:4531 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 " @@ -4772,71 +4784,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4534 +#: ../../library/stdtypes.rst:4538 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4537 +#: ../../library/stdtypes.rst:4541 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:4547 +#: ../../library/stdtypes.rst:4551 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:4555 +#: ../../library/stdtypes.rst:4559 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:4561 +#: ../../library/stdtypes.rst:4565 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:4565 +#: ../../library/stdtypes.rst:4569 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:4583 +#: ../../library/stdtypes.rst:4587 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4587 +#: ../../library/stdtypes.rst:4591 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4599 +#: ../../library/stdtypes.rst:4603 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4604 +#: ../../library/stdtypes.rst:4608 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4611 +#: ../../library/stdtypes.rst:4615 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4613 +#: ../../library/stdtypes.rst:4617 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 " @@ -4844,23 +4856,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4618 +#: ../../library/stdtypes.rst:4622 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4623 +#: ../../library/stdtypes.rst:4627 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4627 +#: ../../library/stdtypes.rst:4631 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4630 +#: ../../library/stdtypes.rst:4634 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4868,39 +4880,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4635 +#: ../../library/stdtypes.rst:4639 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:4638 +#: ../../library/stdtypes.rst:4642 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4643 +#: ../../library/stdtypes.rst:4647 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:4648 +#: ../../library/stdtypes.rst:4652 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:4651 +#: ../../library/stdtypes.rst:4655 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4656 +#: ../../library/stdtypes.rst:4660 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4661 +#: ../../library/stdtypes.rst:4665 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, " @@ -4910,15 +4922,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4668 +#: ../../library/stdtypes.rst:4672 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4709 +#: ../../library/stdtypes.rst:4713 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4716 +#: ../../library/stdtypes.rst:4720 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 " @@ -4926,7 +4938,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4724 +#: ../../library/stdtypes.rst:4728 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 " @@ -4934,14 +4946,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4729 +#: ../../library/stdtypes.rst:4733 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:4733 +#: ../../library/stdtypes.rst:4737 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 " @@ -4951,7 +4963,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4743 +#: ../../library/stdtypes.rst:4747 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4960,7 +4972,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4748 +#: ../../library/stdtypes.rst:4752 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4971,7 +4983,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4755 +#: ../../library/stdtypes.rst:4759 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4980,7 +4992,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4761 +#: ../../library/stdtypes.rst:4765 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -4989,7 +5001,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4767 +#: ../../library/stdtypes.rst:4771 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -4999,7 +5011,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4774 +#: ../../library/stdtypes.rst:4778 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 " @@ -5008,23 +5020,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4782 +#: ../../library/stdtypes.rst:4786 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:4791 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4794 +#: ../../library/stdtypes.rst:4798 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4800 +#: ../../library/stdtypes.rst:4804 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5034,19 +5046,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4810 +#: ../../library/stdtypes.rst:4814 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4813 +#: ../../library/stdtypes.rst:4817 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4816 +#: ../../library/stdtypes.rst:4820 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5055,7 +5067,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4822 +#: ../../library/stdtypes.rst:4826 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5064,7 +5076,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4828 +#: ../../library/stdtypes.rst:4832 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5072,7 +5084,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4834 +#: ../../library/stdtypes.rst:4838 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5081,21 +5093,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4840 +#: ../../library/stdtypes.rst:4844 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4846 +#: ../../library/stdtypes.rst:4850 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4854 +#: ../../library/stdtypes.rst:4858 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 " @@ -5103,13 +5115,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4862 +#: ../../library/stdtypes.rst:4866 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4870 +#: ../../library/stdtypes.rst:4874 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5118,325 +5130,325 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4880 +#: ../../library/stdtypes.rst:4884 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4891 +#: ../../library/stdtypes.rst:4895 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4899 +#: ../../library/stdtypes.rst:4903 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4907 +#: ../../library/stdtypes.rst:4911 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4922 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4920 +#: ../../library/stdtypes.rst:4924 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4927 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4928 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4929 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4930 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4931 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4932 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4939 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4940 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4942 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4948 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4945 +#: ../../library/stdtypes.rst:4949 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4950 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4951 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4948 +#: ../../library/stdtypes.rst:4952 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4953 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4954 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4955 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4952 +#: ../../library/stdtypes.rst:4956 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4957 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4958 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4959 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4960 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4961 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4962 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4963 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4964 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4965 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4966 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4967 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4968 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4969 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4970 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4971 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4972 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4973 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4974 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4975 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4976 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4977 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4978 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:4979 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4976 +#: ../../library/stdtypes.rst:4980 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4981 +#: ../../library/stdtypes.rst:4985 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4983 +#: ../../library/stdtypes.rst:4987 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4987 +#: ../../library/stdtypes.rst:4991 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4995 +#: ../../library/stdtypes.rst:4999 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5005 +#: ../../library/stdtypes.rst:5009 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5016 +#: ../../library/stdtypes.rst:5020 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:5023 +#: ../../library/stdtypes.rst:5027 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5023 +#: ../../library/stdtypes.rst:5027 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5028 +#: ../../library/stdtypes.rst:5032 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5026 +#: ../../library/stdtypes.rst:5030 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5031 +#: ../../library/stdtypes.rst:5035 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5031 +#: ../../library/stdtypes.rst:5035 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5040 +#: ../../library/stdtypes.rst:5044 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5046 +#: ../../library/stdtypes.rst:5050 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5445,7 +5457,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5053 +#: ../../library/stdtypes.rst:5057 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 " @@ -5453,76 +5465,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5063 +#: ../../library/stdtypes.rst:5067 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5065 +#: ../../library/stdtypes.rst:5069 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5069 +#: ../../library/stdtypes.rst:5073 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5073 +#: ../../library/stdtypes.rst:5077 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5077 +#: ../../library/stdtypes.rst:5081 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5081 +#: ../../library/stdtypes.rst:5085 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5088 +#: ../../library/stdtypes.rst:5092 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5094 +#: ../../library/stdtypes.rst:5098 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5102 +#: ../../library/stdtypes.rst:5106 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:5115 +#: ../../library/stdtypes.rst:5119 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:5133 +#: ../../library/stdtypes.rst:5137 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5141 +#: ../../library/stdtypes.rst:5145 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5143 +#: ../../library/stdtypes.rst:5147 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5150 +#: ../../library/stdtypes.rst:5154 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5152 +#: ../../library/stdtypes.rst:5156 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 " @@ -5533,7 +5545,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5159 +#: ../../library/stdtypes.rst:5163 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5544,32 +5556,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5167 +#: ../../library/stdtypes.rst:5171 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5175 +#: ../../library/stdtypes.rst:5179 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5177 +#: ../../library/stdtypes.rst:5181 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5183 +#: ../../library/stdtypes.rst:5187 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5185 +#: ../../library/stdtypes.rst:5189 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:5188 +#: ../../library/stdtypes.rst:5192 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5577,15 +5589,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5192 +#: ../../library/stdtypes.rst:5196 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5198 +#: ../../library/stdtypes.rst:5202 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5202 +#: ../../library/stdtypes.rst:5206 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 " @@ -5593,7 +5605,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5207 +#: ../../library/stdtypes.rst:5211 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:" @@ -5605,7 +5617,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5216 +#: ../../library/stdtypes.rst:5220 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5615,15 +5627,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5236 ../../library/stdtypes.rst:5267 +#: ../../library/stdtypes.rst:5240 ../../library/stdtypes.rst:5271 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5244 +#: ../../library/stdtypes.rst:5248 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5250 +#: ../../library/stdtypes.rst:5254 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5633,23 +5645,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5257 +#: ../../library/stdtypes.rst:5261 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5264 +#: ../../library/stdtypes.rst:5268 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:5273 +#: ../../library/stdtypes.rst:5277 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5279 +#: ../../library/stdtypes.rst:5283 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 " @@ -5657,30 +5669,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5284 +#: ../../library/stdtypes.rst:5288 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5290 +#: ../../library/stdtypes.rst:5294 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5292 +#: ../../library/stdtypes.rst:5296 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:5296 +#: ../../library/stdtypes.rst:5300 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5303 +#: ../../library/stdtypes.rst:5307 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5305 +#: ../../library/stdtypes.rst:5309 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5688,15 +5700,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5310 +#: ../../library/stdtypes.rst:5314 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5316 +#: ../../library/stdtypes.rst:5320 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5318 +#: ../../library/stdtypes.rst:5322 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 " @@ -5704,15 +5716,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5323 +#: ../../library/stdtypes.rst:5327 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5329 +#: ../../library/stdtypes.rst:5333 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5331 +#: ../../library/stdtypes.rst:5335 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5723,104 +5735,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5344 +#: ../../library/stdtypes.rst:5348 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5350 +#: ../../library/stdtypes.rst:5354 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5352 +#: ../../library/stdtypes.rst:5356 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5359 +#: ../../library/stdtypes.rst:5363 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5361 +#: ../../library/stdtypes.rst:5365 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:5368 +#: ../../library/stdtypes.rst:5372 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5374 +#: ../../library/stdtypes.rst:5378 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5379 +#: ../../library/stdtypes.rst:5383 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5384 +#: ../../library/stdtypes.rst:5388 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5390 +#: ../../library/stdtypes.rst:5394 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5398 +#: ../../library/stdtypes.rst:5402 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5404 +#: ../../library/stdtypes.rst:5408 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:5411 +#: ../../library/stdtypes.rst:5415 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:5420 +#: ../../library/stdtypes.rst:5424 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5421 +#: ../../library/stdtypes.rst:5425 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5424 +#: ../../library/stdtypes.rst:5428 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5427 +#: ../../library/stdtypes.rst:5431 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5429 +#: ../../library/stdtypes.rst:5433 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:5432 +#: ../../library/stdtypes.rst:5436 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." From 4af541807f8e4a425599a38b05d2fe63ce5c1a4a Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Sat, 9 Apr 2022 02:27:10 +0800 Subject: [PATCH 7/7] resolve fuzzy entry --- c-api/method.po | 1 - 1 file changed, 1 deletion(-) diff --git a/c-api/method.po b/c-api/method.po index 6d48771431..c2a65ab37d 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -52,7 +52,6 @@ msgstr "" "傳 true。參數必須不為 ``NULL``\\ 。此函式總是會成功執行。" #: ../../c-api/method.rst:30 -#, fuzzy msgid "" "Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is "