From d5e8db985fc3a5524f3af105ed4cbacfcffcca7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jan 2022 00:12:44 +0000 Subject: [PATCH 1/5] sync with cpython 07b12fdf --- c-api/object.po | 81 ++++---- library/datetime.po | 10 +- library/os.po | 5 +- library/stdtypes.po | 469 ++++++++++++++++++++++++++++---------------- 4 files changed, 353 insertions(+), 212 deletions(-) diff --git a/c-api/object.po b/c-api/object.po index d2f5a95fd1..6a49310662 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: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-20 00:10+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-" @@ -89,7 +89,7 @@ msgid "" "descriptors don't. Otherwise, an :exc:`AttributeError` is raised." msgstr "" -#: ../../c-api/object.rst:79 ../../c-api/object.rst:90 +#: ../../c-api/object.rst:79 ../../c-api/object.rst:91 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " @@ -98,17 +98,18 @@ msgstr "" #: ../../c-api/object.rst:84 msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttr`." +"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " +"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " +"plans to remove it." msgstr "" -#: ../../c-api/object.rst:95 +#: ../../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`." msgstr "" -#: ../../c-api/object.rst:101 +#: ../../c-api/object.rst:102 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -120,25 +121,25 @@ msgid "" "returned." msgstr "" -#: ../../c-api/object.rst:113 ../../c-api/object.rst:119 +#: ../../c-api/object.rst:114 ../../c-api/object.rst:120 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." msgstr "" -#: ../../c-api/object.rst:125 +#: ../../c-api/object.rst:126 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." msgstr "" -#: ../../c-api/object.rst:133 +#: ../../c-api/object.rst:134 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." msgstr "" -#: ../../c-api/object.rst:141 +#: ../../c-api/object.rst:142 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" @@ -149,7 +150,7 @@ msgid "" "failure." msgstr "" -#: ../../c-api/object.rst:151 +#: ../../c-api/object.rst:152 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" @@ -160,13 +161,13 @@ msgid "" "to *opid*." msgstr "" -#: ../../c-api/object.rst:160 +#: ../../c-api/object.rst:161 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " "will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`." msgstr "" -#: ../../c-api/object.rst:167 +#: ../../c-api/object.rst:168 msgid "" "Compute a string representation of object *o*. Returns the string " "representation on success, ``NULL`` on failure. This is the equivalent of " @@ -174,13 +175,13 @@ msgid "" "function." msgstr "" -#: ../../c-api/object.rst:171 ../../c-api/object.rst:195 +#: ../../c-api/object.rst:172 ../../c-api/object.rst:196 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." msgstr "" -#: ../../c-api/object.rst:179 +#: ../../c-api/object.rst:180 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " "but escape the non-ASCII characters in the string returned by :c:func:" @@ -189,7 +190,7 @@ msgid "" "Called by the :func:`ascii` built-in function." msgstr "" -#: ../../c-api/object.rst:190 +#: ../../c-api/object.rst:191 msgid "" "Compute a string representation of object *o*. Returns the string " "representation on success, ``NULL`` on failure. This is the equivalent of " @@ -197,7 +198,7 @@ msgid "" "function and, therefore, by the :func:`print` function." msgstr "" -#: ../../c-api/object.rst:204 +#: ../../c-api/object.rst:205 msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " "failure and a bytes object on success. This is equivalent to the Python " @@ -206,20 +207,20 @@ msgid "" "bytes object." msgstr "" -#: ../../c-api/object.rst:213 +#: ../../c-api/object.rst:214 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." msgstr "" -#: ../../c-api/object.rst:216 ../../c-api/object.rst:235 +#: ../../c-api/object.rst:217 ../../c-api/object.rst:236 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " "otherwise it will be ``0``." msgstr "" -#: ../../c-api/object.rst:220 +#: ../../c-api/object.rst:221 msgid "" "If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -227,52 +228,52 @@ msgid "" "e. contained in ``cls.__mro__``." msgstr "" -#: ../../c-api/object.rst:225 +#: ../../c-api/object.rst:226 msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " "a :attr:`__bases__` attribute (which must be a tuple of base classes)." msgstr "" -#: ../../c-api/object.rst:232 +#: ../../c-api/object.rst:233 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." msgstr "" -#: ../../c-api/object.rst:239 +#: ../../c-api/object.rst:240 msgid "" "If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " "*inst* is an instance of *cls* if its class is a subclass of *cls*." msgstr "" -#: ../../c-api/object.rst:243 +#: ../../c-api/object.rst:244 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`__class__` attribute." msgstr "" -#: ../../c-api/object.rst:246 +#: ../../c-api/object.rst:247 msgid "" "An object *cls* can override if it is considered a class, and what its base " "classes are, by having a :attr:`__bases__` attribute (which must be a tuple " "of base classes)." msgstr "" -#: ../../c-api/object.rst:255 +#: ../../c-api/object.rst:256 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" -#: ../../c-api/object.rst:258 +#: ../../c-api/object.rst:259 msgid "" "The return type is now Py_hash_t. This is a signed integer the same size as " "Py_ssize_t." msgstr "" -#: ../../c-api/object.rst:265 +#: ../../c-api/object.rst:266 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and " "return ``-1``. This function receives special treatment when stored in a " @@ -280,21 +281,21 @@ msgid "" "that it is not hashable." msgstr "" -#: ../../c-api/object.rst:273 +#: ../../c-api/object.rst:274 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" -#: ../../c-api/object.rst:280 +#: ../../c-api/object.rst:281 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" -#: ../../c-api/object.rst:289 +#: ../../c-api/object.rst:290 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " @@ -305,13 +306,13 @@ msgid "" "when the incremented reference count is needed." msgstr "" -#: ../../c-api/object.rst:300 +#: ../../c-api/object.rst:301 msgid "" "Return non-zero if the object *o* is of type *type* or a subtype of *type*, " "and ``0`` otherwise. Both parameters must be non-``NULL``." msgstr "" -#: ../../c-api/object.rst:309 +#: ../../c-api/object.rst:310 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -319,7 +320,7 @@ msgid "" "``len(o)``." msgstr "" -#: ../../c-api/object.rst:316 +#: ../../c-api/object.rst:317 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " @@ -328,26 +329,26 @@ msgid "" "defaultvalue)``." msgstr "" -#: ../../c-api/object.rst:326 +#: ../../c-api/object.rst:327 msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o[key]``." msgstr "" -#: ../../c-api/object.rst:332 +#: ../../c-api/object.rst:333 msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " "on failure; return ``0`` on success. This is the equivalent of the Python " "statement ``o[key] = v``. This function *does not* steal a reference to *v*." msgstr "" -#: ../../c-api/object.rst:340 +#: ../../c-api/object.rst:341 msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " "on failure. This is equivalent to the Python statement ``del o[key]``." msgstr "" -#: ../../c-api/object.rst:346 +#: ../../c-api/object.rst:347 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -357,7 +358,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" -#: ../../c-api/object.rst:355 +#: ../../c-api/object.rst:356 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " @@ -365,7 +366,7 @@ msgid "" "object cannot be iterated." msgstr "" -#: ../../c-api/object.rst:363 +#: ../../c-api/object.rst:364 msgid "" "This is the equivalent to the Python expression ``aiter(o)``. Takes an :" "class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " diff --git a/library/datetime.po b/library/datetime.po index 27523e7d52..054df6a8a4 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-01 00:14+0000\n" +"POT-Creation-Date: 2022-01-20 00:10+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-" @@ -2773,7 +2773,7 @@ msgstr "``%U``" #: ../../library/datetime.rst:2376 msgid "" -"Week number of the year (Sunday as the first day of the week) as a zero " +"Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" @@ -2792,9 +2792,9 @@ msgstr "``%W``" #: ../../library/datetime.rst:2384 msgid "" -"Week number of the year (Monday as the first day of the week) as a decimal " -"number. All days in a new year preceding the first Monday are considered to " -"be in week 0." +"Week number of the year (Monday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Monday are " +"considered to be in week 0." msgstr "" #: ../../library/datetime.rst:2392 diff --git a/library/os.po b/library/os.po index 12e99f60c8..1a86648ffd 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-01-08 00:09+0000\n" +"POT-Creation-Date: 2022-01-20 00:10+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-" @@ -5246,7 +5246,8 @@ msgid ":ref:`Availability `: Linux 3.17 and newer." msgstr ":ref:`適用 `:Linux 3.17 以上。" #: ../../library/os.rst:4872 -msgid "Return a string of *size* random bytes suitable for cryptographic use." +msgid "" +"Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" #: ../../library/os.rst:4874 diff --git a/library/stdtypes.po b/library/stdtypes.po index eec5088491..0e487125a0 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-01-02 00:10+0000\n" +"POT-Creation-Date: 2022-01-20 00:10+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-" @@ -5025,49 +5025,76 @@ msgstr "" #: ../../library/stdtypes.rst:4799 msgid "" -"``GenericAlias`` objects are created by subscripting a class (usually a " -"container), such as ``list[int]``. They are intended primarily for :term:" -"`type annotations `." +"``GenericAlias`` objects are generally created by :ref:`subscripting " +"` a class. They are most often used with :ref:`container " +"classes `, such as :class:`list` or :class:`dict`. For " +"example, ``list[int]`` is a ``GenericAlias`` object created by subscripting " +"the ``list`` class with the argument :class:`int`. ``GenericAlias`` objects " +"are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4803 +#: ../../library/stdtypes.rst:4809 msgid "" -"Usually, the :ref:`subscription ` of container objects calls " -"the method :meth:`__getitem__` of the object. However, the subscription of " -"some containers' classes may call the classmethod :meth:`__class_getitem__` " -"of the class instead. The classmethod :meth:`__class_getitem__` should " -"return a ``GenericAlias`` object." +"It is generally only possible to subscript a class if the class implements " +"the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4810 +#: ../../library/stdtypes.rst:4812 msgid "" -"If the :meth:`__getitem__` of the class' metaclass is present, it will take " -"precedence over the :meth:`__class_getitem__` defined in the class (see :pep:" -"`560` for more details)." +"A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " +"implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4814 +#: ../../library/stdtypes.rst:4815 msgid "" -"The ``GenericAlias`` object acts as a proxy for :term:`generic types " -"`, implementing *parameterized generics* - a specific instance " -"of a generic which provides the types for container elements." +"For a container class, the argument(s) supplied to a :ref:`subscription " +"` of the class may indicate the type(s) of the elements an " +"object contains. For example, ``set[bytes]`` can be used in type annotations " +"to signify a :class:`set` in which all the elements are of type :class:" +"`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4818 +#: ../../library/stdtypes.rst:4821 msgid "" -"The user-exposed type for the ``GenericAlias`` object can be accessed from :" -"class:`types.GenericAlias` and used for :func:`isinstance` checks. It can " -"also be used to create ``GenericAlias`` objects directly." +"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 " +"often indicate the return type(s) of one or more methods defined on an " +"object. For example, :mod:`regular expressions ` can be used on both " +"the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4824 +#: ../../library/stdtypes.rst:4827 msgid "" -"Creates a ``GenericAlias`` representing a type ``T`` containing elements of " -"types *X*, *Y*, and more depending on the ``T`` used. For example, a " -"function expecting a :class:`list` containing :class:`float` elements::" +"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 " +"both be of type :class:`str`. We can represent this kind of object in type " +"annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4832 +#: ../../library/stdtypes.rst:4833 +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." +"group(0)`` and ``y[0]`` will both be of type :class:`bytes`. In type " +"annotations, we would represent this variety of :ref:`re.Match ` objects with ``re.Match[bytes]``." +msgstr "" + +#: ../../library/stdtypes.rst:4839 +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 +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 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 " @@ -5075,255 +5102,367 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4840 +#: ../../library/stdtypes.rst:4861 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4848 +#: ../../library/stdtypes.rst:4869 msgid "" "The Python runtime does not enforce :term:`type annotations `. " -"This extends to generic types and their type parameters. When creating an " -"object from a ``GenericAlias``, container elements are not checked against " -"their type. For example, the following code is discouraged, but will run " -"without errors::" +"This extends to generic types and their type parameters. When creating a " +"container object from a ``GenericAlias``, the elements in the container are " +"not checked against their type. For example, the following code is " +"discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4858 +#: ../../library/stdtypes.rst:4879 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4869 +#: ../../library/stdtypes.rst:4890 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4877 +#: ../../library/stdtypes.rst:4898 msgid "" -"The :meth:`__getitem__` method of generics will raise an exception to " -"disallow mistakes like ``dict[str][str]``::" +"The :meth:`~object.__getitem__` method of generic containers will raise an " +"exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4885 +#: ../../library/stdtypes.rst:4906 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:`__args__ `. ::" +"items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4896 -msgid "Standard Generic Collections" +#: ../../library/stdtypes.rst:4917 +msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4898 -msgid "These standard library collections support parameterized generics." +#: ../../library/stdtypes.rst:4919 +msgid "" +"The following standard library classes support parameterized generics. This " +"list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4900 +#: ../../library/stdtypes.rst:4922 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4901 +#: ../../library/stdtypes.rst:4923 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4902 +#: ../../library/stdtypes.rst:4924 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4903 +#: ../../library/stdtypes.rst:4925 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4904 +#: ../../library/stdtypes.rst:4926 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4905 +#: ../../library/stdtypes.rst:4927 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4906 +#: ../../library/stdtypes.rst:4928 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4907 +#: ../../library/stdtypes.rst:4929 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4908 +#: ../../library/stdtypes.rst:4930 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4909 +#: ../../library/stdtypes.rst:4931 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4910 +#: ../../library/stdtypes.rst:4932 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4912 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4913 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4914 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4915 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4916 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4917 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4919 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4920 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4921 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4923 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4925 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4926 +#: ../../library/stdtypes.rst:4948 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4949 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4950 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4951 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4952 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4953 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4954 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4955 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4956 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4957 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4958 +#, fuzzy +msgid ":class:`dataclasses.Field`" +msgstr ":class:`tuple`" + +#: ../../library/stdtypes.rst:4959 +msgid ":class:`functools.cached_property`" +msgstr "" + +#: ../../library/stdtypes.rst:4960 +msgid ":class:`functools.partialmethod`" +msgstr "" + +#: ../../library/stdtypes.rst:4961 +#, fuzzy +msgid ":class:`os.PathLike`" +msgstr ":class:`set`" + +#: ../../library/stdtypes.rst:4962 +#, fuzzy +msgid ":class:`pathlib.Path`" +msgstr ":class:`list`" + +#: ../../library/stdtypes.rst:4963 +#, fuzzy +msgid ":class:`pathlib.PurePath`" +msgstr ":class:`list`" + +#: ../../library/stdtypes.rst:4964 +#, fuzzy +msgid ":class:`pathlib.PurePosixPath`" +msgstr ":class:`list`" + +#: ../../library/stdtypes.rst:4965 +msgid ":class:`pathlib.PureWindowsPath`" +msgstr "" + +#: ../../library/stdtypes.rst:4966 +#, fuzzy +msgid ":class:`queue.LifoQueue`" +msgstr ":class:`frozenset`" + +#: ../../library/stdtypes.rst:4967 +#, fuzzy +msgid ":class:`queue.Queue`" +msgstr ":class:`tuple`" + +#: ../../library/stdtypes.rst:4968 +msgid ":class:`queue.PriorityQueue`" +msgstr "" + +#: ../../library/stdtypes.rst:4969 +#, fuzzy +msgid ":class:`queue.SimpleQueue`" +msgstr ":class:`tuple`" + +#: ../../library/stdtypes.rst:4970 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4971 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4941 -msgid "Special Attributes of Generic Alias" +#: ../../library/stdtypes.rst:4972 +msgid ":class:`shelve.BsdDbShelf`" msgstr "" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4973 +msgid ":class:`shelve.DbfilenameShelf`" +msgstr "" + +#: ../../library/stdtypes.rst:4974 +#, fuzzy +msgid ":class:`shelve.Shelf`" +msgstr ":class:`set`" + +#: ../../library/stdtypes.rst:4975 +#, fuzzy +msgid ":class:`types.MappingProxyType`" +msgstr ":class:`collections.abc.Mapping`" + +#: ../../library/stdtypes.rst:4976 +msgid ":class:`weakref.WeakKeyDictionary`" +msgstr "" + +#: ../../library/stdtypes.rst:4977 +msgid ":class:`weakref.WeakMethod`" +msgstr "" + +#: ../../library/stdtypes.rst:4978 +#, fuzzy +msgid ":class:`weakref.WeakSet`" +msgstr ":class:`frozenset`" + +#: ../../library/stdtypes.rst:4979 +msgid ":class:`weakref.WeakValueDictionary`" +msgstr "" + +#: ../../library/stdtypes.rst:4984 +msgid "Special Attributes of ``GenericAlias`` objects" +msgstr "" + +#: ../../library/stdtypes.rst:4986 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4990 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4998 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " -"passed to the original :meth:`__class_getitem__` of the generic container::" +"passed to the original :meth:`~object.__class_getitem__` of the generic " +"class::" msgstr "" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:5008 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:4976 +#: ../../library/stdtypes.rst:5019 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:4982 -msgid ":pep:`585` -- \"Type Hinting Generics In Standard Collections\"" +#: ../../library/stdtypes.rst:5026 +msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:4983 -msgid ":meth:`__class_getitem__` -- Used to implement parameterized generics." +#: ../../library/stdtypes.rst:5026 +msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:4984 -msgid ":ref:`generics` -- Generics in the :mod:`typing` module." +#: ../../library/stdtypes.rst:5031 +msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:4992 +#: ../../library/stdtypes.rst:5029 +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:5034 +msgid "" +":ref:`Generics`, :ref:`user-defined generics ` and :" +"class:`typing.Generic`" +msgstr "" + +#: ../../library/stdtypes.rst:5034 +msgid "" +"Documentation on how to implement generic classes that can be parameterized " +"at runtime and understood by static type-checkers." +msgstr "" + +#: ../../library/stdtypes.rst:5043 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:4998 +#: ../../library/stdtypes.rst:5049 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5332,7 +5471,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5005 +#: ../../library/stdtypes.rst:5056 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 " @@ -5340,76 +5479,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5015 +#: ../../library/stdtypes.rst:5066 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5017 +#: ../../library/stdtypes.rst:5068 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5021 +#: ../../library/stdtypes.rst:5072 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5025 +#: ../../library/stdtypes.rst:5076 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5029 +#: ../../library/stdtypes.rst:5080 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5033 +#: ../../library/stdtypes.rst:5084 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5040 +#: ../../library/stdtypes.rst:5091 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5046 +#: ../../library/stdtypes.rst:5097 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5054 +#: ../../library/stdtypes.rst:5105 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:5067 +#: ../../library/stdtypes.rst:5118 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:5085 +#: ../../library/stdtypes.rst:5136 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5144 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5095 +#: ../../library/stdtypes.rst:5146 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5102 +#: ../../library/stdtypes.rst:5153 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5104 +#: ../../library/stdtypes.rst:5155 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 " @@ -5420,7 +5559,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5111 +#: ../../library/stdtypes.rst:5162 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5431,32 +5570,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5119 +#: ../../library/stdtypes.rst:5170 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5127 +#: ../../library/stdtypes.rst:5178 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5129 +#: ../../library/stdtypes.rst:5180 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5135 +#: ../../library/stdtypes.rst:5186 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5137 +#: ../../library/stdtypes.rst:5188 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:5140 +#: ../../library/stdtypes.rst:5191 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5464,15 +5603,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5144 +#: ../../library/stdtypes.rst:5195 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5150 +#: ../../library/stdtypes.rst:5201 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5154 +#: ../../library/stdtypes.rst:5205 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 " @@ -5480,7 +5619,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5159 +#: ../../library/stdtypes.rst:5210 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:" @@ -5492,7 +5631,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5168 +#: ../../library/stdtypes.rst:5219 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5502,15 +5641,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5188 ../../library/stdtypes.rst:5219 +#: ../../library/stdtypes.rst:5239 ../../library/stdtypes.rst:5270 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5196 +#: ../../library/stdtypes.rst:5247 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5202 +#: ../../library/stdtypes.rst:5253 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5520,23 +5659,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5209 +#: ../../library/stdtypes.rst:5260 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5216 +#: ../../library/stdtypes.rst:5267 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:5225 +#: ../../library/stdtypes.rst:5276 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5231 +#: ../../library/stdtypes.rst:5282 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 " @@ -5544,30 +5683,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5236 +#: ../../library/stdtypes.rst:5287 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5242 +#: ../../library/stdtypes.rst:5293 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5244 +#: ../../library/stdtypes.rst:5295 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:5248 +#: ../../library/stdtypes.rst:5299 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5255 +#: ../../library/stdtypes.rst:5306 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5257 +#: ../../library/stdtypes.rst:5308 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5575,15 +5714,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5262 +#: ../../library/stdtypes.rst:5313 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5268 +#: ../../library/stdtypes.rst:5319 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5270 +#: ../../library/stdtypes.rst:5321 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 " @@ -5591,15 +5730,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5275 +#: ../../library/stdtypes.rst:5326 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5281 +#: ../../library/stdtypes.rst:5332 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5283 +#: ../../library/stdtypes.rst:5334 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5610,104 +5749,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5296 +#: ../../library/stdtypes.rst:5347 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5302 +#: ../../library/stdtypes.rst:5353 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5304 +#: ../../library/stdtypes.rst:5355 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5311 +#: ../../library/stdtypes.rst:5362 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5313 +#: ../../library/stdtypes.rst:5364 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:5320 +#: ../../library/stdtypes.rst:5371 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5326 +#: ../../library/stdtypes.rst:5377 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5331 +#: ../../library/stdtypes.rst:5382 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5336 +#: ../../library/stdtypes.rst:5387 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5342 +#: ../../library/stdtypes.rst:5393 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5350 +#: ../../library/stdtypes.rst:5401 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5356 +#: ../../library/stdtypes.rst:5407 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:5363 +#: ../../library/stdtypes.rst:5414 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:5372 +#: ../../library/stdtypes.rst:5423 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5373 +#: ../../library/stdtypes.rst:5424 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5376 +#: ../../library/stdtypes.rst:5427 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5379 +#: ../../library/stdtypes.rst:5430 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5381 +#: ../../library/stdtypes.rst:5432 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:5384 +#: ../../library/stdtypes.rst:5435 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." From 509b6f19175dd0fa0dbfc4975c0b0262102315fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jan 2022 00:12:02 +0000 Subject: [PATCH 2/5] sync with cpython 46e6aad1 --- c-api/init_config.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c-api/init_config.po b/c-api/init_config.po index fa0ab254ad..2a77d85af0 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: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-22 00:09+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-" @@ -805,7 +805,7 @@ msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" #: ../../c-api/init_config.rst:637 -msgid "Dump Python refererences?" +msgid "Dump Python references?" msgstr "" #: ../../c-api/init_config.rst:639 From 6fb8ea6e97a3c1db2ee5999e0439c478e0e5b089 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Jan 2022 00:12:04 +0000 Subject: [PATCH 3/5] sync with cpython 83aef4d3 --- library/http.server.po | 54 +++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/library/http.server.po b/library/http.server.po index 861ec2e8fb..2a734e93d7 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-23 00:09+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -488,52 +488,58 @@ msgstr "" #: ../../library/http.server.rst:414 msgid "" ":mod:`http.server` can also be invoked directly using the :option:`-m` " -"switch of the interpreter with a ``port number`` argument. Similar to the " -"previous example, this serves files relative to the current directory::" +"switch of the interpreter. Similar to the previous example, this serves " +"files relative to the current directory::" msgstr "" #: ../../library/http.server.rst:420 msgid "" -"By default, server binds itself to all interfaces. The option ``-b/--bind`` " -"specifies a specific address to which it should bind. Both IPv4 and IPv6 " -"addresses are supported. For example, the following command causes the " +"The server listens to port 8000 by default. The default can be overridden by " +"passing the desired port number as an argument::" +msgstr "" + +#: ../../library/http.server.rst:425 +msgid "" +"By default, the server binds itself to all interfaces. The option ``-b/--" +"bind`` specifies a specific address to which it should bind. Both IPv4 and " +"IPv6 addresses are supported. For example, the following command causes the " "server to bind to localhost only::" msgstr "" -#: ../../library/http.server.rst:427 +#: ../../library/http.server.rst:432 msgid "``--bind`` argument was introduced." msgstr "" -#: ../../library/http.server.rst:430 +#: ../../library/http.server.rst:435 msgid "``--bind`` argument enhanced to support IPv6" msgstr "" -#: ../../library/http.server.rst:433 +#: ../../library/http.server.rst:438 msgid "" -"By default, server uses the current directory. The option ``-d/--directory`` " -"specifies a directory to which it should serve the files. For example, the " -"following command uses a specific directory::" +"By default, the server uses the current directory. The option ``-d/--" +"directory`` specifies a directory to which it should serve the files. For " +"example, the following command uses a specific directory::" msgstr "" -#: ../../library/http.server.rst:439 -msgid "``--directory`` specify alternate directory" +#: ../../library/http.server.rst:444 +msgid "``--directory`` argument was introduced." msgstr "" -#: ../../library/http.server.rst:444 +#: ../../library/http.server.rst:449 msgid "" "This class is used to serve either files or output of CGI scripts from the " "current directory and below. Note that mapping HTTP hierarchic structure to " "local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`." msgstr "" -#: ../../library/http.server.rst:450 +#: ../../library/http.server.rst:455 msgid "" "CGI scripts run by the :class:`CGIHTTPRequestHandler` class cannot execute " "redirects (HTTP code 302), because code 200 (script output follows) is sent " "prior to execution of the CGI script. This pre-empts the status code." msgstr "" -#: ../../library/http.server.rst:455 +#: ../../library/http.server.rst:460 msgid "" "The class will however, run the CGI script, instead of serving it as a file, " "if it guesses it to be a CGI script. Only directory-based CGI are used --- " @@ -541,41 +547,41 @@ msgid "" "denoting CGI scripts." msgstr "" -#: ../../library/http.server.rst:460 +#: ../../library/http.server.rst:465 msgid "" "The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI " "scripts and serve the output, instead of serving files, if the request leads " "to somewhere below the ``cgi_directories`` path." msgstr "" -#: ../../library/http.server.rst:464 +#: ../../library/http.server.rst:469 msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:" msgstr "" -#: ../../library/http.server.rst:468 +#: ../../library/http.server.rst:473 msgid "" "This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to " "treat as containing CGI scripts." msgstr "" -#: ../../library/http.server.rst:471 +#: ../../library/http.server.rst:476 msgid "The :class:`CGIHTTPRequestHandler` defines the following method:" msgstr "" -#: ../../library/http.server.rst:475 +#: ../../library/http.server.rst:480 msgid "" "This method serves the ``'POST'`` request type, only allowed for CGI " "scripts. Error 501, \"Can only POST to CGI scripts\", is output when trying " "to POST to a non-CGI url." msgstr "" -#: ../../library/http.server.rst:479 +#: ../../library/http.server.rst:484 msgid "" "Note that CGI scripts will be run with UID of user nobody, for security " "reasons. Problems with the CGI script will be translated to error 403." msgstr "" -#: ../../library/http.server.rst:482 +#: ../../library/http.server.rst:487 msgid "" ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing " "the ``--cgi`` option::" From 4576d1df4257c4701e94022ba0811f6f8792668a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jan 2022 00:11:57 +0000 Subject: [PATCH 4/5] sync with cpython b2c7fe1f --- library/calendar.po | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/library/calendar.po b/library/calendar.po index 134198bc13..d2f7ae9a6c 100644 --- a/library/calendar.po +++ b/library/calendar.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-01-24 00:09+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-" @@ -51,7 +51,8 @@ msgstr "" #: ../../library/calendar.rst:33 msgid "" "Creates a :class:`Calendar` object. *firstweekday* is an integer specifying " -"the first day of the week. ``0`` is Monday (the default), ``6`` is Sunday." +"the first day of the week. :const:`MONDAY` is ``0`` (the default), :const:" +"`SUNDAY` is ``6``." msgstr "" #: ../../library/calendar.rst:36 @@ -422,20 +423,25 @@ msgid "" "it has a length of 13 and ``month_abbr[0]`` is the empty string." msgstr "" -#: ../../library/calendar.rst:417 +#: ../../library/calendar.rst:420 +msgid "" +"Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``." +msgstr "" + +#: ../../library/calendar.rst:426 msgid "Module :mod:`datetime`" msgstr ":mod:`datetime` 模組" -#: ../../library/calendar.rst:416 +#: ../../library/calendar.rst:425 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." msgstr "" -#: ../../library/calendar.rst:419 +#: ../../library/calendar.rst:428 msgid "Module :mod:`time`" msgstr ":mod:`time` 模組" -#: ../../library/calendar.rst:420 +#: ../../library/calendar.rst:429 msgid "Low-level time related functions." msgstr "" From 42b4d7d05df0db68d03550b9f06032126e504953 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Mon, 24 Jan 2022 17:01:27 +0800 Subject: [PATCH 5/5] fix fuzzy entries --- library/stdtypes.po | 51 ++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/library/stdtypes.po b/library/stdtypes.po index 0e487125a0..cbe482db0b 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -5297,60 +5297,52 @@ msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" #: ../../library/stdtypes.rst:4958 -#, fuzzy msgid ":class:`dataclasses.Field`" -msgstr ":class:`tuple`" +msgstr ":class:`dataclasses.Field`" #: ../../library/stdtypes.rst:4959 msgid ":class:`functools.cached_property`" -msgstr "" +msgstr ":class:`functools.cached_property`" #: ../../library/stdtypes.rst:4960 msgid ":class:`functools.partialmethod`" -msgstr "" +msgstr ":class:`functools.partialmethod`" #: ../../library/stdtypes.rst:4961 -#, fuzzy msgid ":class:`os.PathLike`" -msgstr ":class:`set`" +msgstr ":class:`os.PathLike`" #: ../../library/stdtypes.rst:4962 -#, fuzzy msgid ":class:`pathlib.Path`" -msgstr ":class:`list`" +msgstr ":class:`pathlib.Path`" #: ../../library/stdtypes.rst:4963 -#, fuzzy msgid ":class:`pathlib.PurePath`" -msgstr ":class:`list`" +msgstr ":class:`pathlib.PurePath`" #: ../../library/stdtypes.rst:4964 -#, fuzzy msgid ":class:`pathlib.PurePosixPath`" -msgstr ":class:`list`" +msgstr ":class:`pathlib.PurePosixPath`" #: ../../library/stdtypes.rst:4965 msgid ":class:`pathlib.PureWindowsPath`" -msgstr "" +msgstr ":class:`pathlib.PureWindowsPath`" #: ../../library/stdtypes.rst:4966 -#, fuzzy msgid ":class:`queue.LifoQueue`" -msgstr ":class:`frozenset`" +msgstr ":class:`queue.LifoQueue`" #: ../../library/stdtypes.rst:4967 -#, fuzzy msgid ":class:`queue.Queue`" -msgstr ":class:`tuple`" +msgstr ":class:`queue.Queue`" #: ../../library/stdtypes.rst:4968 msgid ":class:`queue.PriorityQueue`" -msgstr "" +msgstr ":class:`queue.PriorityQueue`" #: ../../library/stdtypes.rst:4969 -#, fuzzy msgid ":class:`queue.SimpleQueue`" -msgstr ":class:`tuple`" +msgstr ":class:`queue.SimpleQueue`" #: ../../library/stdtypes.rst:4970 msgid ":ref:`re.Pattern `" @@ -5362,38 +5354,35 @@ msgstr ":ref:`re.Match `" #: ../../library/stdtypes.rst:4972 msgid ":class:`shelve.BsdDbShelf`" -msgstr "" +msgstr ":class:`shelve.BsdDbShelf`" #: ../../library/stdtypes.rst:4973 msgid ":class:`shelve.DbfilenameShelf`" -msgstr "" +msgstr ":class:`shelve.DbfilenameShelf`" #: ../../library/stdtypes.rst:4974 -#, fuzzy msgid ":class:`shelve.Shelf`" -msgstr ":class:`set`" +msgstr ":class:`shelve.Shelf`" #: ../../library/stdtypes.rst:4975 -#, fuzzy msgid ":class:`types.MappingProxyType`" -msgstr ":class:`collections.abc.Mapping`" +msgstr ":class:`types.MappingProxyType`" #: ../../library/stdtypes.rst:4976 msgid ":class:`weakref.WeakKeyDictionary`" -msgstr "" +msgstr ":class:`weakref.WeakKeyDictionary`" #: ../../library/stdtypes.rst:4977 msgid ":class:`weakref.WeakMethod`" -msgstr "" +msgstr ":class:`weakref.WeakMethod`" #: ../../library/stdtypes.rst:4978 -#, fuzzy msgid ":class:`weakref.WeakSet`" -msgstr ":class:`frozenset`" +msgstr ":class:`weakref.WeakSet`" #: ../../library/stdtypes.rst:4979 msgid ":class:`weakref.WeakValueDictionary`" -msgstr "" +msgstr ":class:`weakref.WeakValueDictionary`" #: ../../library/stdtypes.rst:4984 msgid "Special Attributes of ``GenericAlias`` objects"