Skip to content

Sync with CPython 3.12 #915

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 30 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c28bcf7
sync with cpython 0315fdc2
github-actions[bot] Jun 12, 2024
4351847
sync with cpython f75abf8b
github-actions[bot] Jun 13, 2024
f38e49a
sync with cpython 18344533
github-actions[bot] Jun 14, 2024
2a45ef3
sync with cpython d2105a1e
github-actions[bot] Jun 15, 2024
6ca0d21
sync with cpython 51859513
github-actions[bot] Jun 16, 2024
36f06cb
sync with cpython 717d2bd1
github-actions[bot] Jun 17, 2024
b72a91b
sync with cpython e4f1fed5
github-actions[bot] Jun 18, 2024
30133c4
sync with cpython 70d71fb4
github-actions[bot] Jun 19, 2024
6bd0c97
sync with cpython 6421db1d
github-actions[bot] Jun 20, 2024
21a5722
sync with cpython e58bece8
github-actions[bot] Jun 21, 2024
2dbaff9
sync with cpython a57d917a
github-actions[bot] Jun 22, 2024
a2ba1b2
sync with cpython 69bd1a8d
github-actions[bot] Jun 24, 2024
95212cf
sync with cpython 52bc9974
github-actions[bot] Jun 25, 2024
b1f09ab
sync with cpython 5290e405
github-actions[bot] Jun 26, 2024
2d75999
sync with cpython 709ef004
github-actions[bot] Jun 27, 2024
680cf2a
sync with cpython 5c06b346
github-actions[bot] Jun 29, 2024
f093f74
sync with cpython 21a95361
github-actions[bot] Jun 29, 2024
c6e4a00
sync with cpython d4747727
github-actions[bot] Jun 30, 2024
b004c1a
sync with cpython e5a19b98
github-actions[bot] Jul 2, 2024
99624c7
sync with cpython 81f57542
github-actions[bot] Jul 4, 2024
5d871b5
sync with cpython de86aaa1
github-actions[bot] Jul 5, 2024
0ca399f
sync with cpython e7cea781
github-actions[bot] Jul 6, 2024
03b6540
sync with cpython e1a22343
github-actions[bot] Jul 10, 2024
96b60aa
sync with cpython 847c803c
github-actions[bot] Jul 11, 2024
97e5579
sync with cpython 0ec761a9
github-actions[bot] Jul 12, 2024
2368c59
sync with cpython b6cb209d
github-actions[bot] Jul 14, 2024
7313bb3
sync with cpython d870f413
github-actions[bot] Jul 15, 2024
7cbdc0e
sync with cpython 9d996b52
github-actions[bot] Jul 17, 2024
973a752
sync with cpython 3279a4fb
github-actions[bot] Jul 18, 2024
dbc9d22
fix: resolve fuzzy entries
mattwang44 Jul 18, 2024
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
30 changes: 20 additions & 10 deletions c-api/cell.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-13 00:11+0000\n"
"POT-Creation-Date: 2024-07-10 00:04+0000\n"
"PO-Revision-Date: 2022-10-16 15:33+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -68,29 +68,39 @@ msgid ""
msgstr "建立並回傳一個包含 *ob* 的新 cell 物件。參數可以為 ``NULL``。"

#: ../../c-api/cell.rst:42
msgid "Return the contents of the cell *cell*."
msgstr "回傳 cell 內容中的 *cell*。"
msgid ""
"Return the contents of the cell *cell*, which can be ``NULL``. If *cell* is "
"not a cell object, returns ``NULL`` with an exception set."
msgstr ""
"回傳 cell 物件 *cell* 的內容,其可能為 ``NULL``。如果 *cell* 不是一個 cell 物"
"件,則將回傳 ``NULL`` 並設定例外。"

#: ../../c-api/cell.rst:47
#: ../../c-api/cell.rst:48
msgid ""
"Return the contents of the cell *cell*, but without checking that *cell* is "
"non-``NULL`` and a cell object."
msgstr ""
"回傳 cell 物件 *cell* 的內容,但是不檢查 *cell* 是否非 ``NULL`` 並且為一個 "
"cell 物件。"

#: ../../c-api/cell.rst:53
#: ../../c-api/cell.rst:54
msgid ""
"Set the contents of the cell object *cell* to *value*. This releases the "
"reference to any current content of the cell. *value* may be ``NULL``. "
"*cell* must be non-``NULL``; if it is not a cell object, ``-1`` will be "
"returned. On success, ``0`` will be returned."
"*cell* must be non-``NULL``."
msgstr ""
"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件當前內容的參"
"照。*value* 可以為 ``NULL``。*cell* 必須不為 ``NULL``;如果它不是一個 cell 物"
"件則將回傳 ``-1``。如果設定成功則將回傳 ``0``。"
"照。*value* 可以為 ``NULL``。*cell* 必須不為 ``NULL``。"

#: ../../c-api/cell.rst:58
msgid ""
"On success, return ``0``. If *cell* is not a cell object, set an exception "
"and return ``-1``."
msgstr ""
"在成功時回傳 ``0``。如果 *cell* 不是一個 cell 物件,則將設定例外並回傳 "
"``-1``。"

#: ../../c-api/cell.rst:61
#: ../../c-api/cell.rst:64
msgid ""
"Sets the value of the cell object *cell* to *value*. No reference counts "
"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` "
Expand Down
87 changes: 56 additions & 31 deletions c-api/complex.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: 2023-07-29 00:03+0000\n"
"POT-Creation-Date: 2024-07-18 00:03+0000\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -52,136 +52,161 @@ msgid ""
"The C structure which corresponds to the value portion of a Python complex "
"number object. Most of the functions for dealing with complex number "
"objects use structures of this type as input or output values, as "
"appropriate. It is defined as::"
"appropriate."
msgstr ""
"相對於 Python 複數物件之數值部分的 C 結構。大多數處理複數物件的函式根據需求會"
"使用這種型別的結構作為輸入或輸出值。它定義為: ::"
"使用這種型別的結構作為輸入或輸出值。"

#: ../../c-api/complex.rst:39
#: ../../c-api/complex.rst:33
msgid "The structure is defined as::"
msgstr "該結構被定義為: ::"

#: ../../c-api/complex.rst:43
msgid ""
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數之和。"

#: ../../c-api/complex.rst:45
#: ../../c-api/complex.rst:49
msgid ""
"Return the difference between two complex numbers, using the C :c:type:"
"`Py_complex` representation."
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數間的差。"

#: ../../c-api/complex.rst:51
#: ../../c-api/complex.rst:55
msgid ""
"Return the negation of the complex number *num*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
"以 C 的 :c:type:`Py_complex` 表示形式來回傳複數 *num* 的相反數 (negation)。"

#: ../../c-api/complex.rst:57
#: ../../c-api/complex.rst:61
msgid ""
"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的乘積。"

#: ../../c-api/complex.rst:63
#: ../../c-api/complex.rst:67
msgid ""
"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
"representation."
msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的商。"

#: ../../c-api/complex.rst:66
#: ../../c-api/complex.rst:70
msgid ""
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
"c:macro:`!EDOM`."
msgstr ""
"如果 *divisor* 為 null,則此方法會回傳零並將 :c:data:`errno` 設定為 :c:macro:"
"`!EDOM`。"

#: ../../c-api/complex.rst:72
#: ../../c-api/complex.rst:76
msgid ""
"Return the exponentiation of *num* by *exp*, using the C :c:type:"
"`Py_complex` representation."
msgstr ""
"以 C 的 :c:type:`Py_complex` 表示形式來回傳 *num* 的 *exp* 次方的結果。"

#: ../../c-api/complex.rst:75
#: ../../c-api/complex.rst:79
msgid ""
"If *num* is null and *exp* is not a positive real number, this method "
"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`."
msgstr ""
"如果 *num* 為 null 且 *exp* 不是正實數,則此方法會回傳零並將 :c:data:`errno` "
"設定為 :c:macro:`!EDOM`。"

#: ../../c-api/complex.rst:80
#: ../../c-api/complex.rst:84
msgid "Complex Numbers as Python Objects"
msgstr "作為 Python 物件的複數"

#: ../../c-api/complex.rst:85
#: ../../c-api/complex.rst:89
msgid ""
"This subtype of :c:type:`PyObject` represents a Python complex number object."
msgstr "這個 :c:type:`PyObject` 的子型別代表一個 Python 複數物件。"

#: ../../c-api/complex.rst:90
#: ../../c-api/complex.rst:94
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python complex number "
"type. It is the same object as :class:`complex` in the Python layer."
msgstr ""
"這個 :c:type:`PyTypeObject` 的實例代表 Python 複數型別。它與 Python 層中的 :"
"class:`complex` 是同一個物件。"

#: ../../c-api/complex.rst:96
#: ../../c-api/complex.rst:100
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
"c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
"如果其引數是一個 :c:type:`PyComplexObject` 或者是 :c:type:`PyComplexObject` "
"的子型別,則會回傳 true。這個函式不會失敗。"

#: ../../c-api/complex.rst:102
#: ../../c-api/complex.rst:106
msgid ""
"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
"subtype of :c:type:`PyComplexObject`. This function always succeeds."
msgstr ""
"如果其引數是一個 :c:type:`PyComplexObject`,但不是 :c:type:`PyComplexObject` "
"的子型別,則會回傳 true。這個函式不會失敗。"

#: ../../c-api/complex.rst:108
#: ../../c-api/complex.rst:112
msgid ""
"Create a new Python complex number object from a C :c:type:`Py_complex` "
"value."
msgstr "從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。"

#: ../../c-api/complex.rst:113
msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
msgstr "從 *real* 和 *imag* 回傳一個新的 :c:type:`PyComplexObject` 物件。"
"value. Return ``NULL`` with an exception set on error."
msgstr ""
"從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。在錯誤時回傳 "
"``NULL`` 並設定例外。"

#: ../../c-api/complex.rst:118
msgid ""
"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return "
"``NULL`` with an exception set on error."
msgstr ""
"從 *real* 和 *imag* 回傳一個新的 :c:type:`PyComplexObject` 物件。在錯誤時回"
"傳 ``NULL`` 並設定例外。"

#: ../../c-api/complex.rst:124
msgid "Return the real part of *op* as a C :c:expr:`double`."
msgstr "以 C 的 :c:expr:`double` 形式回傳 *op* 的實部。"

#: ../../c-api/complex.rst:123
#: ../../c-api/complex.rst:126
msgid ""
"Upon failure, this method returns ``-1.0`` with an exception set, so one "
"should call :c:func:`PyErr_Occurred` to check for errors."
msgstr ""
"失敗時,此方法回傳 ``-1.0`` 並設定例外,因此應該呼叫 :c:func:"
"`PyErr_Occurred` 來檢查錯誤。"

#: ../../c-api/complex.rst:132
msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
msgstr "將 *op* 的虛部作為 C 的 :c:expr:`double` 回傳。"

#: ../../c-api/complex.rst:128
#: ../../c-api/complex.rst:137
msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
msgstr "回傳複數 *op* 的 :c:type:`Py_complex` 值。"

#: ../../c-api/complex.rst:130
#: ../../c-api/complex.rst:139
msgid ""
"If *op* is not a Python complex number object but has a :meth:`~object."
"__complex__` method, this method will first be called to convert *op* to a "
"Python complex number object. If :meth:`!__complex__` is not defined then "
"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not "
"defined then it falls back to :meth:`~object.__index__`. Upon failure, this "
"method returns ``-1.0`` as a real value."
"defined then it falls back to :meth:`~object.__index__`."
msgstr ""
"如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
"首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
"未定義,那麼它會回退到 :meth:`~object.__float__`。如果 :meth:`!__float__` 未"
"定義,則它將繼續回退為 :meth:`~object.__index__`。失敗時,此方法回傳 "
"``-1.0`` 作為實部值。"
"定義,則它將繼續回退為 :meth:`~object.__index__`。"

#: ../../c-api/complex.rst:137
#: ../../c-api/complex.rst:145
msgid ""
"Upon failure, this method returns :c:type:`Py_complex` with :c:member:"
"`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should "
"call :c:func:`PyErr_Occurred` to check for errors."
msgstr ""
"失敗時,此方法回傳 :c:type:`Py_complex` 並將 :c:member:`~Py_complex.real` 設"
"為 ``-1.0``,並設定例外,因此應該呼叫 :c:func:`PyErr_Occurred` 來檢查錯誤。"

#: ../../c-api/complex.rst:149
msgid "Use :meth:`~object.__index__` if available."
msgstr "如果可用則使用 :meth:`~object.__index__`。"

Expand Down
Loading
Loading