|
7 | 7 | msgstr ""
|
8 | 8 | "Project-Id-Version: Python 3.12\n"
|
9 | 9 | "Report-Msgid-Bugs-To: \n"
|
10 |
| -"POT-Creation-Date: 2023-07-29 00:03+0000\n" |
| 10 | +"POT-Creation-Date: 2024-07-18 00:03+0000\n" |
11 | 11 | "PO-Revision-Date: 2015-12-09 17:51+0000\n"
|
12 | 12 | "Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
|
13 | 13 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -52,136 +52,161 @@ msgid ""
|
52 | 52 | "The C structure which corresponds to the value portion of a Python complex "
|
53 | 53 | "number object. Most of the functions for dealing with complex number "
|
54 | 54 | "objects use structures of this type as input or output values, as "
|
55 |
| -"appropriate. It is defined as::" |
| 55 | +"appropriate." |
56 | 56 | msgstr ""
|
57 | 57 | "相對於 Python 複數物件之數值部分的 C 結構。大多數處理複數物件的函式根據需求會"
|
58 |
| -"使用這種型別的結構作為輸入或輸出值。它定義為: ::" |
| 58 | +"使用這種型別的結構作為輸入或輸出值。" |
59 | 59 |
|
60 |
| -#: ../../c-api/complex.rst:39 |
| 60 | +#: ../../c-api/complex.rst:33 |
| 61 | +msgid "The structure is defined as::" |
| 62 | +msgstr "該結構被定義為: ::" |
| 63 | + |
| 64 | +#: ../../c-api/complex.rst:43 |
61 | 65 | msgid ""
|
62 | 66 | "Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
|
63 | 67 | "representation."
|
64 | 68 | msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數之和。"
|
65 | 69 |
|
66 |
| -#: ../../c-api/complex.rst:45 |
| 70 | +#: ../../c-api/complex.rst:49 |
67 | 71 | msgid ""
|
68 | 72 | "Return the difference between two complex numbers, using the C :c:type:"
|
69 | 73 | "`Py_complex` representation."
|
70 | 74 | msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數間的差。"
|
71 | 75 |
|
72 |
| -#: ../../c-api/complex.rst:51 |
| 76 | +#: ../../c-api/complex.rst:55 |
73 | 77 | msgid ""
|
74 | 78 | "Return the negation of the complex number *num*, using the C :c:type:"
|
75 | 79 | "`Py_complex` representation."
|
76 | 80 | msgstr ""
|
77 | 81 | "以 C 的 :c:type:`Py_complex` 表示形式來回傳複數 *num* 的相反數 (negation)。"
|
78 | 82 |
|
79 |
| -#: ../../c-api/complex.rst:57 |
| 83 | +#: ../../c-api/complex.rst:61 |
80 | 84 | msgid ""
|
81 | 85 | "Return the product of two complex numbers, using the C :c:type:`Py_complex` "
|
82 | 86 | "representation."
|
83 | 87 | msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的乘積。"
|
84 | 88 |
|
85 |
| -#: ../../c-api/complex.rst:63 |
| 89 | +#: ../../c-api/complex.rst:67 |
86 | 90 | msgid ""
|
87 | 91 | "Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
|
88 | 92 | "representation."
|
89 | 93 | msgstr "以 C 的 :c:type:`Py_complex` 表示形式來回傳兩個複數的商。"
|
90 | 94 |
|
91 |
| -#: ../../c-api/complex.rst:66 |
| 95 | +#: ../../c-api/complex.rst:70 |
92 | 96 | msgid ""
|
93 | 97 | "If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
|
94 | 98 | "c:macro:`!EDOM`."
|
95 | 99 | msgstr ""
|
96 | 100 | "如果 *divisor* 為 null,則此方法會回傳零並將 :c:data:`errno` 設定為 :c:macro:"
|
97 | 101 | "`!EDOM`。"
|
98 | 102 |
|
99 |
| -#: ../../c-api/complex.rst:72 |
| 103 | +#: ../../c-api/complex.rst:76 |
100 | 104 | msgid ""
|
101 | 105 | "Return the exponentiation of *num* by *exp*, using the C :c:type:"
|
102 | 106 | "`Py_complex` representation."
|
103 | 107 | msgstr ""
|
104 | 108 | "以 C 的 :c:type:`Py_complex` 表示形式來回傳 *num* 的 *exp* 次方的結果。"
|
105 | 109 |
|
106 |
| -#: ../../c-api/complex.rst:75 |
| 110 | +#: ../../c-api/complex.rst:79 |
107 | 111 | msgid ""
|
108 | 112 | "If *num* is null and *exp* is not a positive real number, this method "
|
109 | 113 | "returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`."
|
110 | 114 | msgstr ""
|
111 | 115 | "如果 *num* 為 null 且 *exp* 不是正實數,則此方法會回傳零並將 :c:data:`errno` "
|
112 | 116 | "設定為 :c:macro:`!EDOM`。"
|
113 | 117 |
|
114 |
| -#: ../../c-api/complex.rst:80 |
| 118 | +#: ../../c-api/complex.rst:84 |
115 | 119 | msgid "Complex Numbers as Python Objects"
|
116 | 120 | msgstr "作為 Python 物件的複數"
|
117 | 121 |
|
118 |
| -#: ../../c-api/complex.rst:85 |
| 122 | +#: ../../c-api/complex.rst:89 |
119 | 123 | msgid ""
|
120 | 124 | "This subtype of :c:type:`PyObject` represents a Python complex number object."
|
121 | 125 | msgstr "這個 :c:type:`PyObject` 的子型別代表一個 Python 複數物件。"
|
122 | 126 |
|
123 |
| -#: ../../c-api/complex.rst:90 |
| 127 | +#: ../../c-api/complex.rst:94 |
124 | 128 | msgid ""
|
125 | 129 | "This instance of :c:type:`PyTypeObject` represents the Python complex number "
|
126 | 130 | "type. It is the same object as :class:`complex` in the Python layer."
|
127 | 131 | msgstr ""
|
128 | 132 | "這個 :c:type:`PyTypeObject` 的實例代表 Python 複數型別。它與 Python 層中的 :"
|
129 | 133 | "class:`complex` 是同一個物件。"
|
130 | 134 |
|
131 |
| -#: ../../c-api/complex.rst:96 |
| 135 | +#: ../../c-api/complex.rst:100 |
132 | 136 | msgid ""
|
133 | 137 | "Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
|
134 | 138 | "c:type:`PyComplexObject`. This function always succeeds."
|
135 | 139 | msgstr ""
|
136 | 140 | "如果其引數是一個 :c:type:`PyComplexObject` 或者是 :c:type:`PyComplexObject` "
|
137 | 141 | "的子型別,則會回傳 true。這個函式不會失敗。"
|
138 | 142 |
|
139 |
| -#: ../../c-api/complex.rst:102 |
| 143 | +#: ../../c-api/complex.rst:106 |
140 | 144 | msgid ""
|
141 | 145 | "Return true if its argument is a :c:type:`PyComplexObject`, but not a "
|
142 | 146 | "subtype of :c:type:`PyComplexObject`. This function always succeeds."
|
143 | 147 | msgstr ""
|
144 | 148 | "如果其引數是一個 :c:type:`PyComplexObject`,但不是 :c:type:`PyComplexObject` "
|
145 | 149 | "的子型別,則會回傳 true。這個函式不會失敗。"
|
146 | 150 |
|
147 |
| -#: ../../c-api/complex.rst:108 |
| 151 | +#: ../../c-api/complex.rst:112 |
148 | 152 | msgid ""
|
149 | 153 | "Create a new Python complex number object from a C :c:type:`Py_complex` "
|
150 |
| -"value." |
151 |
| -msgstr "從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。" |
152 |
| - |
153 |
| -#: ../../c-api/complex.rst:113 |
154 |
| -msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*." |
155 |
| -msgstr "從 *real* 和 *imag* 回傳一個新的 :c:type:`PyComplexObject` 物件。" |
| 154 | +"value. Return ``NULL`` with an exception set on error." |
| 155 | +msgstr "" |
| 156 | +"從 C 的 :c:type:`Py_complex` 值建立一個新的 Python 複數物件。在錯誤時回傳 " |
| 157 | +"``NULL`` 並設定例外。" |
156 | 158 |
|
157 | 159 | #: ../../c-api/complex.rst:118
|
| 160 | +msgid "" |
| 161 | +"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " |
| 162 | +"``NULL`` with an exception set on error." |
| 163 | +msgstr "" |
| 164 | +"從 *real* 和 *imag* 回傳一個新的 :c:type:`PyComplexObject` 物件。在錯誤時回" |
| 165 | +"傳 ``NULL`` 並設定例外。" |
| 166 | + |
| 167 | +#: ../../c-api/complex.rst:124 |
158 | 168 | msgid "Return the real part of *op* as a C :c:expr:`double`."
|
159 | 169 | msgstr "以 C 的 :c:expr:`double` 形式回傳 *op* 的實部。"
|
160 | 170 |
|
161 |
| -#: ../../c-api/complex.rst:123 |
| 171 | +#: ../../c-api/complex.rst:126 |
| 172 | +msgid "" |
| 173 | +"Upon failure, this method returns ``-1.0`` with an exception set, so one " |
| 174 | +"should call :c:func:`PyErr_Occurred` to check for errors." |
| 175 | +msgstr "" |
| 176 | +"失敗時,此方法回傳 ``-1.0`` 並設定例外,因此應該呼叫 :c:func:" |
| 177 | +"`PyErr_Occurred` 來檢查錯誤。" |
| 178 | + |
| 179 | +#: ../../c-api/complex.rst:132 |
162 | 180 | msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
|
163 | 181 | msgstr "將 *op* 的虛部作為 C 的 :c:expr:`double` 回傳。"
|
164 | 182 |
|
165 |
| -#: ../../c-api/complex.rst:128 |
| 183 | +#: ../../c-api/complex.rst:137 |
166 | 184 | msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
|
167 | 185 | msgstr "回傳複數 *op* 的 :c:type:`Py_complex` 值。"
|
168 | 186 |
|
169 |
| -#: ../../c-api/complex.rst:130 |
| 187 | +#: ../../c-api/complex.rst:139 |
170 | 188 | msgid ""
|
171 | 189 | "If *op* is not a Python complex number object but has a :meth:`~object."
|
172 | 190 | "__complex__` method, this method will first be called to convert *op* to a "
|
173 | 191 | "Python complex number object. If :meth:`!__complex__` is not defined then "
|
174 | 192 | "it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not "
|
175 |
| -"defined then it falls back to :meth:`~object.__index__`. Upon failure, this " |
176 |
| -"method returns ``-1.0`` as a real value." |
| 193 | +"defined then it falls back to :meth:`~object.__index__`." |
177 | 194 | msgstr ""
|
178 | 195 | "如果 *op* 不是 Python 複數物件,但有一個 :meth:`~object.__complex__` 方法,則"
|
179 | 196 | "首先會呼叫該方法將 *op* 轉換為 Python 複數物件。如果 :meth:`!__complex__` 並"
|
180 | 197 | "未定義,那麼它會回退到 :meth:`~object.__float__`。如果 :meth:`!__float__` 未"
|
181 |
| -"定義,則它將繼續回退為 :meth:`~object.__index__`。失敗時,此方法回傳 " |
182 |
| -"``-1.0`` 作為實部值。" |
| 198 | +"定義,則它將繼續回退為 :meth:`~object.__index__`。" |
183 | 199 |
|
184 |
| -#: ../../c-api/complex.rst:137 |
| 200 | +#: ../../c-api/complex.rst:145 |
| 201 | +msgid "" |
| 202 | +"Upon failure, this method returns :c:type:`Py_complex` with :c:member:" |
| 203 | +"`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should " |
| 204 | +"call :c:func:`PyErr_Occurred` to check for errors." |
| 205 | +msgstr "" |
| 206 | +"失敗時,此方法回傳 :c:type:`Py_complex` 並將 :c:member:`~Py_complex.real` 設" |
| 207 | +"為 ``-1.0``,並設定例外,因此應該呼叫 :c:func:`PyErr_Occurred` 來檢查錯誤。" |
| 208 | + |
| 209 | +#: ../../c-api/complex.rst:149 |
185 | 210 | msgid "Use :meth:`~object.__index__` if available."
|
186 | 211 | msgstr "如果可用則使用 :meth:`~object.__index__`。"
|
187 | 212 |
|
|
0 commit comments