@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.12\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2024-07-19 14:50 +0000\n "
14+ "POT-Creation-Date : 2024-07-26 14:49 +0000\n "
1515"PO-Revision-Date : 2024-05-11 00:32+0000\n "
1616"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -52,11 +52,11 @@ msgid ""
5252"number object. Most of the functions for dealing with complex number "
5353"objects use structures of this type as input or output values, as "
5454"appropriate."
55- msgstr ""
55+ msgstr "对应于 Python 复数对象的值部分的 C 结构体。 大部分用于处理数据对象的函数都使用该类型的结构体作为相应的输入或输出值。 "
5656
5757#: ../../c-api/complex.rst:33
5858msgid "The structure is defined as::"
59- msgstr ""
59+ msgstr "其结构定义如下: "
6060
6161#: ../../c-api/complex.rst:43
6262msgid ""
@@ -146,12 +146,15 @@ msgid ""
146146"Create a new Python complex number object from a C :c:type:`Py_complex` "
147147"value. Return ``NULL`` with an exception set on error."
148148msgstr ""
149+ "根据一个 C :c:type:`Py_complex` 值新建 Python 复数对象。 当发生错误时将返回 ``NULL`` 并设置一个异常。"
149150
150151#: ../../c-api/complex.rst:118
151152msgid ""
152153"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return"
153154" ``NULL`` with an exception set on error."
154155msgstr ""
156+ "根据 *real* 和 *imag* 返回一个新的 :c:type:`PyComplexObject` 对象。 当发生错误时将返回 ``NULL`` "
157+ "并设置一个异常。"
155158
156159#: ../../c-api/complex.rst:124
157160msgid "Return the real part of *op* as a C :c:expr:`double`."
@@ -162,6 +165,7 @@ msgid ""
162165"Upon failure, this method returns ``-1.0`` with an exception set, so one "
163166"should call :c:func:`PyErr_Occurred` to check for errors."
164167msgstr ""
168+ "当失败时,此方法将返回 ``-1.0`` 并设置一个异常,因此开发者应当调用 :c:func:`PyErr_Occurred` 来检查错误。"
165169
166170#: ../../c-api/complex.rst:132
167171msgid "Return the imaginary part of *op* as a C :c:expr:`double`."
@@ -180,13 +184,18 @@ msgid ""
180184":meth:`!__float__` is not defined then it falls back to "
181185":meth:`~object.__index__`."
182186msgstr ""
187+ "如果 *op* 不是一个 Python 复数对象但是具有 :meth:`~object.__complex__` 方法,则会先调用该方法将 *op* "
188+ "转换为 Python 复数对象。 如果未定义 :meth:`!__complex__` 则将回退至 :meth:`~object.__float__`。"
189+ " 如果未定义 :meth:`!__float__` 则将回退至 :meth:`~object.__index__`。"
183190
184191#: ../../c-api/complex.rst:145
185192msgid ""
186193"Upon failure, this method returns :c:type:`Py_complex` with "
187194":c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, so "
188195"one should call :c:func:`PyErr_Occurred` to check for errors."
189196msgstr ""
197+ "当失败时,此方法将返回 :c:type:`Py_complex` 其中 :c:member:`~Py_complex.real` 为 ``-1.0`` "
198+ "并设置一个异常,因此开发者应当调用 :c:func:`PyErr_Occurred` 来检查错误。"
190199
191200#: ../../c-api/complex.rst:149
192201msgid "Use :meth:`~object.__index__` if available."
0 commit comments