55#
66# Translators:
77# Nyuan Zhang, 2025
8+ # Stan Ulbrych, 2025
89#
910#, fuzzy
1011msgid ""
1112msgstr ""
1213"Project-Id-Version : Python 3.11\n "
1314"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2025-07-25 16:48 +0000\n "
15+ "POT-Creation-Date : 2025-09-05 17:03 +0000\n "
1516"PO-Revision-Date : 2025-07-18 20:04+0000\n "
16- "Last-Translator : Nyuan Zhang , 2025\n "
17+ "Last-Translator : Stan Ulbrych , 2025\n "
1718"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1819"MIME-Version : 1.0\n "
1920"Content-Type : text/plain; charset=UTF-8\n "
@@ -75,6 +76,10 @@ msgid ""
7576" falls back to :meth:`~object.__index__`. This method returns ``-1.0`` upon "
7677"failure, so one should call :c:func:`PyErr_Occurred` to check for errors."
7778msgstr ""
79+ "返回 *pyfloat* 的内容的 C :c:expr:`double` 表示形式。 如果 *pyfloat* 不是一个 Python "
80+ "浮点数对象但是具有 :meth:`~object.__float__` 方法,则会先调用此方法来将 *pyfloat* 转换为浮点数。 如果 "
81+ ":meth:`!__float__` 未定义则将回退至 :meth:`~object.__index__`。 此方法在失败时将返回 "
82+ "``-1.0``,因此开发者应当调用 :c:func:`PyErr_Occurred` 来检测错误。"
7883
7984#: ../../c-api/float.rst:54
8085msgid "Use :meth:`~object.__index__` if available."
@@ -84,7 +89,7 @@ msgstr "如果可能将使用 :meth:`~object.__index__`。"
8489msgid ""
8590"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but"
8691" without error checking."
87- msgstr ""
92+ msgstr "返回 *pyfloat* 的 C :c:expr:`double` 表示形式,但不带错误检测。 "
8893
8994#: ../../c-api/float.rst:66
9095msgid ""
@@ -99,17 +104,17 @@ msgstr ""
99104msgid ""
100105"Return the maximum representable finite float *DBL_MAX* as C "
101106":c:expr:`double`."
102- msgstr ""
107+ msgstr "返回 C :c:expr:`double` 形式的最大可表示有限浮点数 *DBL_MAX*。 "
103108
104109#: ../../c-api/float.rst:78
105110msgid ""
106111"Return the minimum normalized positive float *DBL_MIN* as C "
107112":c:expr:`double`."
108- msgstr ""
113+ msgstr "返回 C :c:expr:`double` 形式的最小正规化正浮点数 *DBL_MIN*。 "
109114
110115#: ../../c-api/float.rst:82
111116msgid "Pack and Unpack functions"
112- msgstr ""
117+ msgstr "打包与解包函数 "
113118
114119#: ../../c-api/float.rst:84
115120msgid ""
@@ -119,6 +124,8 @@ msgid ""
119124":c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies "
120125"the number of bytes in the bytes string."
121126msgstr ""
127+ "打包与解包函数提供了独立于平台的高效方式来将浮点数值存储为字节串。 Pack 例程根据 C :c:expr:`double` 产生字节串,而 "
128+ "Unpack 例程根据这样的字节串产生 C :c:expr:`double`。 后缀 (2, 4 or 8) 指明字节串中的字节数。"
122129
123130#: ../../c-api/float.rst:90
124131msgid ""
@@ -131,6 +138,10 @@ msgid ""
131138" attempting to unpack a bytes string containing an IEEE INF or NaN will "
132139"raise an exception."
133140msgstr ""
141+ "在明显使用 IEEE 754 格式的平台上这些函数是通过拷贝比特位来实现的。 在其他平台上,2 字节格式与 IEEE 754 binary16 "
142+ "半精度格式相同,4 字节格式 (32 位) 与 IEEE 754 binary32 单精度格式相同,而 8 字节格式则与 IEEE 754 "
143+ "双精度格式相同,不过 INF 和 NaN (如果平台存在这两种值) 未得到正确处理,而试图对包含 IEEE INF 或 NaN "
144+ "的字节串执行解包将会引发一个异常。"
134145
135146#: ../../c-api/float.rst:99
136147msgid ""
@@ -139,10 +150,12 @@ msgid ""
139150"less precision, or smaller dynamic range, not all values can be unpacked. "
140151"What happens in such cases is partly accidental (alas)."
141152msgstr ""
153+ "在具有比 IEEE 754 所支持的更高精度,或更大动态范围的非 IEEE 平台上,不是所有的值都能被打包;在具有更低精度,或更小动态范围的非 IEEE"
154+ " 平台上,则不是所有的值都能被解包。 在这种情况下发生的事情有一部分将是偶然的(无奈)。"
142155
143156#: ../../c-api/float.rst:107
144157msgid "Pack functions"
145- msgstr ""
158+ msgstr "打包函数 "
146159
147160#: ../../c-api/float.rst:109
148161msgid ""
@@ -154,40 +167,45 @@ msgid ""
154167"is equal to ``1`` on big endian processor, or ``0`` on little endian "
155168"processor."
156169msgstr ""
170+ "打包例程会写入 2, 4 或 8 个字节,从 *p* 开始。 *le* 是一个 :c:expr:`int` 参数,如果你想要字节串为小端序格式 "
171+ "(指数部分放在后面,位于 ``p+1``, ``p+3`` 或 ``p+6`` ``p+7``) 则其应为非零值,如果你想要大端序格式 "
172+ "(指数部分放在前面,位于 *p*) 则其应为零。 :c:macro:`PY_BIG_ENDIAN` 常量可被用于使用本机端序:在大端序处理器上等于 "
173+ "``1``,在小端序处理器上则等于 ``0``。"
157174
158175#: ../../c-api/float.rst:116
159176msgid ""
160177"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, "
161178"most likely :exc:`OverflowError`)."
162179msgstr ""
180+ "返回值: 如果一切正常则为 ``0``,如果出错则为 ``-1`` (并会设置一个异常,最大可能为 :exc:`OverflowError`)。"
163181
164182#: ../../c-api/float.rst:119
165183msgid "There are two problems on non-IEEE platforms:"
166- msgstr ""
184+ msgstr "在非 IEEE 平台上存在两个问题: "
167185
168186#: ../../c-api/float.rst:121
169187msgid "What this does is undefined if *x* is a NaN or infinity."
170- msgstr ""
188+ msgstr "如果 *x* 为 NaN 或无穷大则此函数的行为是未定义的。 "
171189
172190#: ../../c-api/float.rst:122
173191msgid "``-0.0`` and ``+0.0`` produce the same bytes string."
174- msgstr ""
192+ msgstr "``-0.0`` 和 ``+0.0`` 将产生相同的字节串。 "
175193
176194#: ../../c-api/float.rst:126
177195msgid "Pack a C double as the IEEE 754 binary16 half-precision format."
178- msgstr ""
196+ msgstr "将 C double 打包为 IEEE 754 binary16 半精度格式。 "
179197
180198#: ../../c-api/float.rst:130
181199msgid "Pack a C double as the IEEE 754 binary32 single precision format."
182- msgstr ""
200+ msgstr "将 C double 打包为 IEEE 754 binary32 单精度格式。 "
183201
184202#: ../../c-api/float.rst:134
185203msgid "Pack a C double as the IEEE 754 binary64 double precision format."
186- msgstr ""
204+ msgstr "将 C double 打包为 IEEE 754 binary64 双精度格式。 "
187205
188206#: ../../c-api/float.rst:138
189207msgid "Unpack functions"
190- msgstr ""
208+ msgstr "解包函数 "
191209
192210#: ../../c-api/float.rst:140
193211msgid ""
@@ -198,31 +216,37 @@ msgid ""
198216"can be used to use the native endian: it is equal to ``1`` on big endian "
199217"processor, or ``0`` on little endian processor."
200218msgstr ""
219+ "解包例程会读取 2, 4 或 8 个字节,从 *p* 开始。 *le* 是一个 :c:expr:`int` 参数,如果字节串为小端序格式 "
220+ "(指数部门放在后面,位于 ``p+1``, ``p+3`` 或 ``p+6`` 和 ``p+7``) 则其应为非零值,如果为大端序格式 "
221+ "(指数部分放在前面,位于 *p*) 则其应为零。 :c:macro:`PY_BIG_ENDIAN` 常量可被用于使用本机端序:在大端序处理器上等于 "
222+ "``1``,在小端序处理器上则等于 ``0``。"
201223
202224#: ../../c-api/float.rst:147
203225msgid ""
204226"Return value: The unpacked double. On error, this is ``-1.0`` and "
205227":c:func:`PyErr_Occurred` is true (and an exception is set, most likely "
206228":exc:`OverflowError`)."
207229msgstr ""
230+ "返回值: 解包后的 double。 出错时,返回值为 ``-1.0`` 且 :c:func:`PyErr_Occurred` 为真值 "
231+ "(并且会设置一个异常,最大可能为 :exc:`OverflowError`)。"
208232
209233#: ../../c-api/float.rst:151
210234msgid ""
211235"Note that on a non-IEEE platform this will refuse to unpack a bytes string "
212236"that represents a NaN or infinity."
213- msgstr ""
237+ msgstr "请注意在非 IEEE 平台上此函数将拒绝解包表示 NaN 或无穷大的字节串。 "
214238
215239#: ../../c-api/float.rst:156
216240msgid "Unpack the IEEE 754 binary16 half-precision format as a C double."
217- msgstr ""
241+ msgstr "将 IEEE 754 binary16 半精度格式解包为 C double。 "
218242
219243#: ../../c-api/float.rst:160
220244msgid "Unpack the IEEE 754 binary32 single precision format as a C double."
221- msgstr ""
245+ msgstr "将 IEEE 754 binary32 单精度格式解包为 C double。 "
222246
223247#: ../../c-api/float.rst:164
224248msgid "Unpack the IEEE 754 binary64 double precision format as a C double."
225- msgstr ""
249+ msgstr "将 IEEE 754 binary64 双精度格式解包为 C double。 "
226250
227251#: ../../c-api/float.rst:8
228252msgid "object"
0 commit comments