Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with CPython 3.12 #895

Merged
merged 13 commits into from
May 24, 2024
295 changes: 139 additions & 156 deletions .scripts/poetry.lock

Large diffs are not rendered by default.

272 changes: 138 additions & 134 deletions library/dataclasses.po

Large diffs are not rendered by default.

585 changes: 296 additions & 289 deletions library/functions.po

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions library/functools.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
"POT-Creation-Date: 2024-05-14 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 16:02+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -551,20 +551,20 @@ msgid ""
"corresponding attributes from the original function. The default values for "
"these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` "
"(which assigns to the wrapper function's ``__module__``, ``__name__``, "
"``__qualname__``, ``__annotations__`` and ``__doc__``, the documentation "
"string) and ``WRAPPER_UPDATES`` (which updates the wrapper function's "
"``__dict__``, i.e. the instance dictionary)."
"``__qualname__``, ``__annotations__``, ``__type_params__``, and ``__doc__``, "
"the documentation string) and ``WRAPPER_UPDATES`` (which updates the wrapper "
"function's ``__dict__``, i.e. the instance dictionary)."
msgstr ""

#: ../../library/functools.rst:651
#: ../../library/functools.rst:652
msgid ""
"To allow access to the original function for introspection and other "
"purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), "
"this function automatically adds a ``__wrapped__`` attribute to the wrapper "
"that refers to the function being wrapped."
msgstr ""

#: ../../library/functools.rst:656
#: ../../library/functools.rst:657
msgid ""
"The main intended use for this function is in :term:`decorator` functions "
"which wrap the decorated function and return the wrapper. If the wrapper "
Expand All @@ -573,7 +573,7 @@ msgid ""
"is typically less than helpful."
msgstr ""

#: ../../library/functools.rst:662
#: ../../library/functools.rst:663
msgid ""
":func:`update_wrapper` may be used with callables other than functions. Any "
"attributes named in *assigned* or *updated* that are missing from the object "
Expand All @@ -582,64 +582,68 @@ msgid ""
"wrapper function itself is missing any attributes named in *updated*."
msgstr ""

#: ../../library/functools.rst:668
#: ../../library/functools.rst:669
msgid ""
"The ``__wrapped__`` attribute is now automatically added. The "
"``__annotations__`` attribute is now copied by default. Missing attributes "
"no longer trigger an :exc:`AttributeError`."
msgstr ""

#: ../../library/functools.rst:673
#: ../../library/functools.rst:674
msgid ""
"The ``__wrapped__`` attribute now always refers to the wrapped function, "
"even if that function defined a ``__wrapped__`` attribute. (see :issue:"
"`17482`)"
msgstr ""

#: ../../library/functools.rst:681
#: ../../library/functools.rst:679
msgid "The ``__type_params__`` attribute is now copied by default."
msgstr ""

#: ../../library/functools.rst:685
msgid ""
"This is a convenience function for invoking :func:`update_wrapper` as a "
"function decorator when defining a wrapper function. It is equivalent to "
"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, "
"updated=updated)``. For example::"
msgstr ""

#: ../../library/functools.rst:707
#: ../../library/functools.rst:711
msgid ""
"Without the use of this decorator factory, the name of the example function "
"would have been ``'wrapper'``, and the docstring of the original :func:"
"`example` would have been lost."
msgstr ""

#: ../../library/functools.rst:715
#: ../../library/functools.rst:719
msgid ":class:`partial` Objects"
msgstr ":class:`partial` 物件"

#: ../../library/functools.rst:717
#: ../../library/functools.rst:721
msgid ""
":class:`partial` objects are callable objects created by :func:`partial`. "
"They have three read-only attributes:"
msgstr ""

#: ../../library/functools.rst:723
#: ../../library/functools.rst:727
msgid ""
"A callable object or function. Calls to the :class:`partial` object will be "
"forwarded to :attr:`func` with new arguments and keywords."
msgstr ""

#: ../../library/functools.rst:729
#: ../../library/functools.rst:733
msgid ""
"The leftmost positional arguments that will be prepended to the positional "
"arguments provided to a :class:`partial` object call."
msgstr ""

#: ../../library/functools.rst:735
#: ../../library/functools.rst:739
msgid ""
"The keyword arguments that will be supplied when the :class:`partial` object "
"is called."
msgstr ""

#: ../../library/functools.rst:738
#: ../../library/functools.rst:742
msgid ""
":class:`partial` objects are like :class:`function` objects in that they are "
"callable, weak referenceable, and can have attributes. There are some "
Expand Down
9 changes: 5 additions & 4 deletions library/hashlib.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
"POT-Creation-Date: 2024-05-23 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 16:03+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -351,8 +351,9 @@ msgstr ""

#: ../../library/hashlib.rst:331
msgid ""
"*dklen* is the length of the derived key. If *dklen* is ``None`` then the "
"digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512."
"*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` "
"then the digest size of the hash algorithm *hash_name* is used, e.g. 64 for "
"SHA-512."
msgstr ""

#: ../../library/hashlib.rst:340
Expand Down Expand Up @@ -383,7 +384,7 @@ msgstr ""
msgid ""
"*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization "
"factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). "
"*dklen* is the length of the derived key."
"*dklen* is the length of the derived key in bytes."
msgstr ""

#: ../../library/hashlib.rst:366
Expand Down
Loading
Loading