diff --git a/c-api/complex.po b/c-api/complex.po index a5e17cbf91..785855d931 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -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 \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -48,47 +48,52 @@ msgstr "" "的。" #: ../../c-api/complex.rst:26 +#, fuzzy 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`." @@ -96,14 +101,14 @@ 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`." @@ -111,16 +116,16 @@ 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." @@ -128,7 +133,7 @@ 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." @@ -136,7 +141,7 @@ 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." @@ -144,36 +149,46 @@ msgstr "" "如果其引數是一個 :c:type:`PyComplexObject`,但不是 :c:type:`PyComplexObject` " "的子型別,則會回傳 true。這個函式不會失敗。" -#: ../../c-api/complex.rst:108 +#: ../../c-api/complex.rst:112 +#, fuzzy msgid "" "Create a new Python complex number object from a C :c:type:`Py_complex` " -"value." +"value. Return ``NULL`` with an exception set on error." msgstr "從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。" -#: ../../c-api/complex.rst:113 -msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*." +#: ../../c-api/complex.rst:118 +#, fuzzy +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` 物件。" -#: ../../c-api/complex.rst:118 +#: ../../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 "" + +#: ../../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 +#, fuzzy 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__` 並" @@ -181,7 +196,14 @@ msgstr "" "定義,則它將繼續回退為 :meth:`~object.__index__`。失敗時,此方法回傳 " "``-1.0`` 作為實部值。" -#: ../../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-api/complex.rst:149 msgid "Use :meth:`~object.__index__` if available." msgstr "如果可用則使用 :meth:`~object.__index__`。"