Skip to content

Sync with CPython 3.10 #252

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

Merged
merged 4 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
499 changes: 250 additions & 249 deletions c-api/exceptions.po

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions c-api/typeobj.po
Original file line number Diff line number Diff line change
Expand Up @@ -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-02-24 00:12+0000\n"
"PO-Revision-Date: 2018-05-23 14:33+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 @@ -1145,11 +1145,10 @@ msgstr ""
#: ../../c-api/typeobj.rst:478
msgid ""
"The type object structure extends the :c:type:`PyVarObject` structure. The :"
"attr:`ob_size` field is used for dynamic types (created by :func:"
"`type_new`, usually called from a class statement). Note that :c:data:"
"`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject."
"tp_itemsize`, which means that its instances (i.e. type objects) *must* have "
"the :attr:`ob_size` field."
"attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, "
"usually called from a class statement). Note that :c:data:`PyType_Type` (the "
"metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means "
"that its instances (i.e. type objects) *must* have the :attr:`ob_size` field."
msgstr ""

#: ../../c-api/typeobj.rst:487
Expand Down Expand Up @@ -1192,7 +1191,7 @@ msgstr ""
#: ../../c-api/typeobj.rst:1910 ../../c-api/typeobj.rst:1921
#: ../../c-api/typeobj.rst:1931 ../../c-api/typeobj.rst:1940
#: ../../c-api/typeobj.rst:1950 ../../c-api/typeobj.rst:1964
#: ../../c-api/typeobj.rst:2002 ../../c-api/typeobj.rst:2019
#: ../../c-api/typeobj.rst:2013 ../../c-api/typeobj.rst:2030
msgid "**Inheritance:**"
msgstr ""

Expand Down Expand Up @@ -1226,7 +1225,7 @@ msgstr ""
#: ../../c-api/typeobj.rst:934 ../../c-api/typeobj.rst:1533
#: ../../c-api/typeobj.rst:1556 ../../c-api/typeobj.rst:1674
#: ../../c-api/typeobj.rst:1692 ../../c-api/typeobj.rst:1783
#: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2004
#: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2015
msgid "This field is inherited by subtypes."
msgstr ""

Expand Down Expand Up @@ -2879,39 +2878,39 @@ msgid ""
"also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit."
msgstr ""

#: ../../c-api/typeobj.rst:2008
#: ../../c-api/typeobj.rst:2002
msgid ""
"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
"tp_dealloc` may be called from any Python thread, not just the thread which "
"created the object (if the object becomes part of a refcount cycle, that "
"cycle might be collected by a garbage collection on any thread). This is "
"not a problem for Python API calls, since the thread on which tp_dealloc is "
"called will own the Global Interpreter Lock (GIL). However, if the object "
"being destroyed in turn destroys objects from some other C or C++ library, "
"care should be taken to ensure that destroying those objects on the thread "
"which called tp_dealloc will not violate any assumptions of the library."
msgstr ""

#: ../../c-api/typeobj.rst:2019
msgid "\"Safe object finalization\" (:pep:`442`)"
msgstr ""

#: ../../c-api/typeobj.rst:2013
#: ../../c-api/typeobj.rst:2024
msgid ""
"Vectorcall function to use for calls of this type object. In other words, it "
"is used to implement :ref:`vectorcall <vectorcall>` for ``type.__call__``. "
"If ``tp_vectorcall`` is ``NULL``, the default call implementation using :"
"attr:`__new__` and :attr:`__init__` is used."
msgstr ""

#: ../../c-api/typeobj.rst:2021
#: ../../c-api/typeobj.rst:2032
msgid "This field is never inherited."
msgstr ""

#: ../../c-api/typeobj.rst:2023
#: ../../c-api/typeobj.rst:2034
msgid "(the field exists since 3.8 but it's only used since 3.9)"
msgstr ""

#: ../../c-api/typeobj.rst:2026
msgid ""
"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
"tp_dealloc` may be called from any Python thread, not just the thread which "
"created the object (if the object becomes part of a refcount cycle, that "
"cycle might be collected by a garbage collection on any thread). This is "
"not a problem for Python API calls, since the thread on which tp_dealloc is "
"called will own the Global Interpreter Lock (GIL). However, if the object "
"being destroyed in turn destroys objects from some other C or C++ library, "
"care should be taken to ensure that destroying those objects on the thread "
"which called tp_dealloc will not violate any assumptions of the library."
msgstr ""

#: ../../c-api/typeobj.rst:2040
msgid "Static Types"
msgstr ""
Expand Down Expand Up @@ -3137,7 +3136,7 @@ msgstr ""

#: ../../c-api/typeobj.rst:2324 ../../c-api/typeobj.rst:2373
#: ../../c-api/typeobj.rst:2427 ../../c-api/typeobj.rst:2438
#: ../../c-api/typeobj.rst:2449 ../../c-api/typeobj.rst:2458
#: ../../c-api/typeobj.rst:2450 ../../c-api/typeobj.rst:2459
msgid "The signature of this function is::"
msgstr ""

Expand Down Expand Up @@ -3278,31 +3277,32 @@ msgstr ""

#: ../../c-api/typeobj.rst:2442
msgid ""
"Must return an :term:`awaitable` object. See :meth:`__anext__` for details."
"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` "
"for details."
msgstr ""

#: ../../c-api/typeobj.rst:2444
#: ../../c-api/typeobj.rst:2445
msgid ""
"This slot may be set to ``NULL`` if an object does not implement "
"asynchronous iteration protocol."
msgstr ""

#: ../../c-api/typeobj.rst:2453
#: ../../c-api/typeobj.rst:2454
msgid ""
"Must return an :term:`awaitable` object. See :meth:`__anext__` for details. "
"This slot may be set to ``NULL``."
msgstr ""

#: ../../c-api/typeobj.rst:2462
#: ../../c-api/typeobj.rst:2463
msgid ""
"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``."
msgstr ""

#: ../../c-api/typeobj.rst:2471
#: ../../c-api/typeobj.rst:2472
msgid "Slot Type typedefs"
msgstr ""

#: ../../c-api/typeobj.rst:2475
#: ../../c-api/typeobj.rst:2476
msgid ""
"The purpose of this function is to separate memory allocation from memory "
"initialization. It should return a pointer to a block of memory of adequate "
Expand All @@ -3316,114 +3316,114 @@ msgid ""
"member:`~PyTypeObject.tp_basicsize`."
msgstr ""

#: ../../c-api/typeobj.rst:2485
#: ../../c-api/typeobj.rst:2486
msgid ""
"This function should not do any other instance initialization, not even to "
"allocate additional memory; that should be done by :c:member:`~PyTypeObject."
"tp_new`."
msgstr ""

#: ../../c-api/typeobj.rst:2492
#: ../../c-api/typeobj.rst:2493
msgid "See :c:member:`~PyTypeObject.tp_free`."
msgstr "請見 :c:member:`~PyTypeObject.tp_free`\\ 。"

#: ../../c-api/typeobj.rst:2496
#: ../../c-api/typeobj.rst:2497
msgid "See :c:member:`~PyTypeObject.tp_new`."
msgstr "請見 :c:member:`~PyTypeObject.tp_new`\\ 。"

#: ../../c-api/typeobj.rst:2500
#: ../../c-api/typeobj.rst:2501
msgid "See :c:member:`~PyTypeObject.tp_init`."
msgstr "請見 :c:member:`~PyTypeObject.tp_init`\\ 。"

#: ../../c-api/typeobj.rst:2504
#: ../../c-api/typeobj.rst:2505
msgid "See :c:member:`~PyTypeObject.tp_repr`."
msgstr "請見 :c:member:`~PyTypeObject.tp_repr`\\ 。"

#: ../../c-api/typeobj.rst:2508 ../../c-api/typeobj.rst:2517
#: ../../c-api/typeobj.rst:2509 ../../c-api/typeobj.rst:2518
msgid "Return the value of the named attribute for the object."
msgstr ""

#: ../../c-api/typeobj.rst:2512 ../../c-api/typeobj.rst:2523
#: ../../c-api/typeobj.rst:2513 ../../c-api/typeobj.rst:2524
msgid ""
"Set the value of the named attribute for the object. The value argument is "
"set to ``NULL`` to delete the attribute."
msgstr ""

#: ../../c-api/typeobj.rst:2519
#: ../../c-api/typeobj.rst:2520
msgid "See :c:member:`~PyTypeObject.tp_getattro`."
msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`\\ 。"

#: ../../c-api/typeobj.rst:2526
#: ../../c-api/typeobj.rst:2527
msgid "See :c:member:`~PyTypeObject.tp_setattro`."
msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`\\ 。"

#: ../../c-api/typeobj.rst:2530
#: ../../c-api/typeobj.rst:2531
msgid "See :c:member:`~PyTypeObject.tp_descrget`."
msgstr "請見 :c:member:`~PyTypeObject.tp_descrget`\\ 。"

#: ../../c-api/typeobj.rst:2534
#: ../../c-api/typeobj.rst:2535
msgid "See :c:member:`~PyTypeObject.tp_descrset`."
msgstr "請見 :c:member:`~PyTypeObject.tp_descrset`\\ 。"

#: ../../c-api/typeobj.rst:2538
#: ../../c-api/typeobj.rst:2539
msgid "See :c:member:`~PyTypeObject.tp_hash`."
msgstr "請見 :c:member:`~PyTypeObject.tp_hash`\\ 。"

#: ../../c-api/typeobj.rst:2542
#: ../../c-api/typeobj.rst:2543
msgid "See :c:member:`~PyTypeObject.tp_richcompare`."
msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`\\ 。"

#: ../../c-api/typeobj.rst:2546
#: ../../c-api/typeobj.rst:2547
msgid "See :c:member:`~PyTypeObject.tp_iter`."
msgstr "請見 :c:member:`~PyTypeObject.tp_iter`\\ 。"

#: ../../c-api/typeobj.rst:2550
#: ../../c-api/typeobj.rst:2551
msgid "See :c:member:`~PyTypeObject.tp_iternext`."
msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`\\ 。"

#: ../../c-api/typeobj.rst:2564
#: ../../c-api/typeobj.rst:2565
msgid "See :c:member:`~PyAsyncMethods.am_send`."
msgstr "請見 :c:member:`~PyAsyncMethods.am_send`\\ 。"

#: ../../c-api/typeobj.rst:2580
#: ../../c-api/typeobj.rst:2581
msgid "Examples"
msgstr "範例"

#: ../../c-api/typeobj.rst:2582
#: ../../c-api/typeobj.rst:2583
msgid ""
"The following are simple examples of Python type definitions. They include "
"common usage you may encounter. Some demonstrate tricky corner cases. For "
"more examples, practical info, and a tutorial, see :ref:`defining-new-types` "
"and :ref:`new-types-topics`."
msgstr ""

#: ../../c-api/typeobj.rst:2587
#: ../../c-api/typeobj.rst:2588
msgid "A basic :ref:`static type <static-types>`::"
msgstr ""

#: ../../c-api/typeobj.rst:2604
#: ../../c-api/typeobj.rst:2605
msgid ""
"You may also find older code (especially in the CPython code base) with a "
"more verbose initializer::"
msgstr ""

#: ../../c-api/typeobj.rst:2648
#: ../../c-api/typeobj.rst:2649
msgid "A type that supports weakrefs, instance dicts, and hashing::"
msgstr ""

#: ../../c-api/typeobj.rst:2675
#: ../../c-api/typeobj.rst:2676
msgid ""
"A str subclass that cannot be subclassed and cannot be called to create "
"instances (e.g. uses a separate factory func) using :c:data:"
"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::"
msgstr ""

#: ../../c-api/typeobj.rst:2694
#: ../../c-api/typeobj.rst:2695
msgid ""
"The simplest :ref:`static type <static-types>` with fixed-length instances::"
msgstr ""

#: ../../c-api/typeobj.rst:2705
#: ../../c-api/typeobj.rst:2706
msgid ""
"The simplest :ref:`static type <static-types>` with variable-length "
"instances::"
Expand Down
16 changes: 11 additions & 5 deletions c-api/unicode.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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-02-24 00:12+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+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 @@ -1208,7 +1208,7 @@ msgstr ""

#: ../../c-api/unicode.rst:1011
msgid ""
"The codecs all use a similar interface. Only deviation from the following "
"The codecs all use a similar interface. Only deviations from the following "
"generic ones are documented for simplicity."
msgstr ""

Expand Down Expand Up @@ -1359,7 +1359,7 @@ msgid ""
"``-1`` or ``1``, any byte order mark is copied to the output."
msgstr ""

#: ../../c-api/unicode.rst:1154 ../../c-api/unicode.rst:1228
#: ../../c-api/unicode.rst:1154
msgid ""
"After completion, *\\*byteorder* is set to the current byte order at the end "
"of input data."
Expand Down Expand Up @@ -1438,6 +1438,12 @@ msgid ""
"result in either a ``\\ufeff`` or a ``\\ufffe`` character)."
msgstr ""

#: ../../c-api/unicode.rst:1228
msgid ""
"After completion, ``*byteorder`` is set to the current byte order at the end "
"of input data."
msgstr ""

#: ../../c-api/unicode.rst:1239
msgid ""
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If "
Expand Down Expand Up @@ -1660,7 +1666,7 @@ msgstr ""
msgid ""
"This codec is special in that it can be used to implement many different "
"codecs (and this is in fact what was done to obtain most of the standard "
"codecs included in the :mod:`encodings` package). The codec uses mapping to "
"codecs included in the :mod:`encodings` package). The codec uses mappings to "
"encode and decode characters. The mapping objects provided must support "
"the :meth:`__getitem__` mapping interface; dictionaries and sequences work "
"well."
Expand Down Expand Up @@ -1848,7 +1854,7 @@ msgstr ""
#: ../../c-api/unicode.rst:1607
msgid ""
"Split a Unicode string at line breaks, returning a list of Unicode strings. "
"CRLF is considered to be one line break. If *keepend* is ``0``, the Line "
"CRLF is considered to be one line break. If *keepend* is ``0``, the line "
"break characters are not included in the resulting strings."
msgstr ""

Expand Down
Loading