@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.13\n "
1414"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2024-05-17 14:15 +0000\n "
15+ "POT-Creation-Date : 2024-07-19 14:16 +0000\n "
1616"PO-Revision-Date : 2021-06-28 00:48+0000\n "
1717"Last-Translator : Freesand Leo <yuqinju@163.com>, 2024\n "
1818"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -52,162 +52,166 @@ msgid ""
5252"The C structure which corresponds to the value portion of a Python complex "
5353"number object. Most of the functions for dealing with complex number "
5454"objects use structures of this type as input or output values, as "
55- "appropriate. It is defined as::"
56- msgstr "这是一个对应Python复数对象的值部分的C结构体。绝大部分处理复数对象的函数都用这类型的结构体作为输入或者输出值,它可近似地定义为:"
55+ "appropriate."
56+ msgstr ""
57+
58+ #: ../../c-api/complex.rst:33
59+ msgid "The structure is defined as::"
60+ msgstr ""
5761
58- #: ../../c-api/complex.rst:39
62+ #: ../../c-api/complex.rst:43
5963msgid ""
6064"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
6165"representation."
6266msgstr "返回两个复数的和,用 C 类型 :c:type:`Py_complex` 表示。"
6367
64- #: ../../c-api/complex.rst:45
68+ #: ../../c-api/complex.rst:49
6569msgid ""
6670"Return the difference between two complex numbers, using the C "
6771":c:type:`Py_complex` representation."
6872msgstr "返回两个复数的差,用 C 类型 :c:type:`Py_complex` 表示。"
6973
70- #: ../../c-api/complex.rst:51
74+ #: ../../c-api/complex.rst:55
7175msgid ""
7276"Return the negation of the complex number *num*, using the C "
7377":c:type:`Py_complex` representation."
7478msgstr "返回复数 *num* 的负值,用 C :c:type:`Py_complex` 表示。"
7579
76- #: ../../c-api/complex.rst:57
80+ #: ../../c-api/complex.rst:61
7781msgid ""
7882"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
7983"representation."
8084msgstr "返回两个复数的乘积,用 C 类型 :c:type:`Py_complex` 表示。"
8185
82- #: ../../c-api/complex.rst:63
86+ #: ../../c-api/complex.rst:67
8387msgid ""
8488"Return the quotient of two complex numbers, using the C :c:type:`Py_complex`"
8589" representation."
8690msgstr "返回两个复数的商,用 C 类型 :c:type:`Py_complex` 表示。"
8791
88- #: ../../c-api/complex.rst:66
92+ #: ../../c-api/complex.rst:70
8993msgid ""
9094"If *divisor* is null, this method returns zero and sets :c:data:`errno` to "
9195":c:macro:`!EDOM`."
9296msgstr "如果 *divisor* 为空,则此方法将返回零并将 :c:data:`errno` 设为 :c:macro:`!EDOM`。"
9397
94- #: ../../c-api/complex.rst:72
98+ #: ../../c-api/complex.rst:76
9599msgid ""
96100"Return the exponentiation of *num* by *exp*, using the C "
97101":c:type:`Py_complex` representation."
98102msgstr "返回 *num* 的 *exp* 次幂,用 C 类型 :c:type:`Py_complex` 表示。"
99103
100- #: ../../c-api/complex.rst:75
104+ #: ../../c-api/complex.rst:79
101105msgid ""
102106"If *num* is null and *exp* is not a positive real number, this method "
103107"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`."
104108msgstr ""
105109"如果 *num* 为空且 *exp* 不是正实数,则此方法将返回零并将 :c:data:`errno` 设为 :c:macro:`!EDOM`。"
106110
107- #: ../../c-api/complex.rst:80
111+ #: ../../c-api/complex.rst:84
108112msgid "Complex Numbers as Python Objects"
109113msgstr "表示复数的Python对象"
110114
111- #: ../../c-api/complex.rst:85
115+ #: ../../c-api/complex.rst:89
112116msgid ""
113117"This subtype of :c:type:`PyObject` represents a Python complex number "
114118"object."
115119msgstr "这个C类型 :c:type:`PyObject` 的子类型代表一个 Python 复数对象。"
116120
117- #: ../../c-api/complex.rst:90
121+ #: ../../c-api/complex.rst:94
118122msgid ""
119123"This instance of :c:type:`PyTypeObject` represents the Python complex number"
120124" type. It is the same object as :class:`complex` in the Python layer."
121125msgstr ""
122126"这是个属于 :c:type:`PyTypeObject` 的代表Python复数类型的实例。在Python层面的类型 :class:`complex` "
123127"是同一个对象。"
124128
125- #: ../../c-api/complex.rst:96
129+ #: ../../c-api/complex.rst:100
126130msgid ""
127131"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of "
128132":c:type:`PyComplexObject`. This function always succeeds."
129133msgstr ""
130134"如果它的参数是一个 :c:type:`PyComplexObject` 或者 :c:type:`PyComplexObject` 的子类型则返回真值。 "
131135"此函数总是会成功执行。"
132136
133- #: ../../c-api/complex.rst:102
137+ #: ../../c-api/complex.rst:106
134138msgid ""
135139"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
136140"subtype of :c:type:`PyComplexObject`. This function always succeeds."
137141msgstr ""
138142"如果它的参数是一个 :c:type:`PyComplexObject` 但不是 :c:type:`PyComplexObject` 的子类型则返回真值。"
139143" 此函数总是会成功执行。"
140144
141- #: ../../c-api/complex.rst:108
145+ #: ../../c-api/complex.rst:112
142146msgid ""
143147"Create a new Python complex number object from a C :c:type:`Py_complex` "
144- "value."
145- msgstr "根据C类型 :c:type:`Py_complex` 的值生成一个新的Python复数对象。"
146-
147- #: ../../c-api/complex.rst:113
148- msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
149- msgstr "根据 *real* 和 *imag* 返回一个新的C类型 :c:type:`PyComplexObject` 对象。"
148+ "value. Return ``NULL`` with an exception set on error."
149+ msgstr ""
150150
151151#: ../../c-api/complex.rst:118
152+ msgid ""
153+ "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return"
154+ " ``NULL`` with an exception set on error."
155+ msgstr ""
156+
157+ #: ../../c-api/complex.rst:124
152158msgid "Return the real part of *op* as a C :c:expr:`double`."
153159msgstr "以 C 类型 :c:expr:`double` 返回 *op* 的实部。"
154160
155- #: ../../c-api/complex.rst:120
161+ #: ../../c-api/complex.rst:126
156162msgid ""
157163"If *op* is not a Python complex number object but has a "
158164":meth:`~object.__complex__` method, this method will first be called to "
159165"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
160166"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and "
161- "returns its result. Upon failure, this method returns ``-1.0``, so one "
167+ "returns its result."
168+ msgstr ""
169+
170+ #: ../../c-api/complex.rst:132 ../../c-api/complex.rst:148
171+ msgid ""
172+ "Upon failure, this method returns ``-1.0`` with an exception set, so one "
162173"should call :c:func:`PyErr_Occurred` to check for errors."
163174msgstr ""
164- "如果 *op* 不是一个 Python 复数对象但是具有 :meth:`~object.__complex__` 方法,则会先调用该方法将 *op* "
165- "转换为 Python 复数对象。 如果 :meth:`!__complex__` 未定义则将回退为调用 "
166- ":c:func:`PyFloat_AsDouble` 并返回其结果。 当失败时,该方法将返回 ``-1.0``,因此应当调用 "
167- ":c:func:`PyErr_Occurred` 来检测错误。"
168175
169- #: ../../c-api/complex.rst:127 ../../c-api/complex.rst:141
176+ #: ../../c-api/complex.rst:135 ../../c-api/complex.rst:151
170177msgid "Use :meth:`~object.__complex__` if available."
171178msgstr "如果可能将使用 :meth:`~object.__complex__`。"
172179
173- #: ../../c-api/complex.rst:132
180+ #: ../../c-api/complex.rst:140
174181msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
175182msgstr "以 C 类型 :c:expr:`double` 返回 *op* 的虚部。"
176183
177- #: ../../c-api/complex.rst:134
184+ #: ../../c-api/complex.rst:142
178185msgid ""
179186"If *op* is not a Python complex number object but has a "
180187":meth:`~object.__complex__` method, this method will first be called to "
181188"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
182189"not defined then it falls back to call :c:func:`PyFloat_AsDouble` and "
183- "returns ``0.0`` on success. Upon failure, this method returns ``-1.0``, so "
184- "one should call :c:func:`PyErr_Occurred` to check for errors."
190+ "returns ``0.0`` on success."
185191msgstr ""
186- "如果 *op* 不是一个 Python 复数对象但是具有 :meth:`~object.__complex__` 方法,则会先调用该方法将 *op* "
187- "转换为 Python 复数对象。 如果 :meth:`!__complex__` 未定义则将回退为使用 "
188- ":c:func:`PyFloat_AsDouble` 并在成功时返回 ``0.0``。 当失败时,该方法将返回 ``-1.0``,因此应当调用 "
189- ":c:func:`PyErr_Occurred` 来检测错误。"
190192
191- #: ../../c-api/complex.rst:146
193+ #: ../../c-api/complex.rst:156
192194msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
193195msgstr "返回复数 *op* 的C类型 :c:type:`Py_complex` 值。"
194196
195- #: ../../c-api/complex.rst:148
197+ #: ../../c-api/complex.rst:158
196198msgid ""
197199"If *op* is not a Python complex number object but has a "
198200":meth:`~object.__complex__` method, this method will first be called to "
199201"convert *op* to a Python complex number object. If :meth:`!__complex__` is "
200202"not defined then it falls back to :meth:`~object.__float__`. If "
201203":meth:`!__float__` is not defined then it falls back to "
202- ":meth:`~object.__index__`. Upon failure, this method returns ``-1.0`` as a "
203- "real value."
204+ ":meth:`~object.__index__`."
205+ msgstr ""
206+
207+ #: ../../c-api/complex.rst:164
208+ msgid ""
209+ "Upon failure, this method returns :c:type:`Py_complex` with "
210+ ":c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, so "
211+ "one should call :c:func:`PyErr_Occurred` to check for errors."
204212msgstr ""
205- "如果 *op* 不是一个 Python 复数对象但是具有 :meth:`~object.__complex__` 方法,则会先调用该方法将 *op* "
206- "转换为 Python 复数对象。 如果 :meth:`!__complex__` 未定义则将回退至 :meth:`~object.__float__`。"
207- " 如果 :meth:`!__float__` 未定义则将回退至 :meth:`~object.__index__`。 当失败时,该方法将返回实数值 "
208- "``-1.0``。"
209213
210- #: ../../c-api/complex.rst:155
214+ #: ../../c-api/complex.rst:168
211215msgid "Use :meth:`~object.__index__` if available."
212216msgstr "如果可能将使用 :meth:`~object.__index__`。"
213217
0 commit comments