Skip to content

Commit dc40e4c

Browse files
sync with cpython 9f8ec95b
1 parent 4892d8e commit dc40e4c

File tree

1 file changed

+52
-45
lines changed

1 file changed

+52
-45
lines changed

c-api/float.po

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.14\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2025-11-06 00:14+0000\n"
12+
"POT-Creation-Date: 2025-11-07 15:32+0000\n"
1313
"PO-Revision-Date: 2025-11-07 05:06+0000\n"
1414
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -34,35 +34,38 @@ msgid ""
3434
"This instance of :c:type:`PyTypeObject` represents the Python floating-point "
3535
"type. This is the same object as :class:`float` in the Python layer."
3636
msgstr ""
37-
"這個 :c:type:`PyTypeObject` 的實例代表 Python 浮點數型別。這與 Python 層中的 :class:`float` "
38-
"物件相同。"
37+
"這個 :c:type:`PyTypeObject` 的實例代表 Python 浮點數型別。這與 Python 層中"
38+
"的 :class:`float` 物件相同。"
3939

4040
#: ../../c-api/float.rst:24
4141
msgid ""
4242
"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:"
4343
"type:`PyFloatObject`. This function always succeeds."
4444
msgstr ""
45-
"如果其引數是 :c:type:`PyFloatObject` 或 :c:type:`PyFloatObject` 的子型別,則回傳 "
46-
"true。這個函式不會失敗。"
45+
"如果其引數是 :c:type:`PyFloatObject` 或 :c:type:`PyFloatObject` 的子型別,"
46+
"回傳 true。這個函式不會失敗。"
4747

4848
#: ../../c-api/float.rst:30
4949
msgid ""
5050
"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype "
5151
"of :c:type:`PyFloatObject`. This function always succeeds."
5252
msgstr ""
53-
"如果其引數是 :c:type:`PyFloatObject`,但不是 :c:type:`PyFloatObject` 的子型別,"
54-
"則回傳 true。這個函式不會失敗。"
53+
"如果其引數是 :c:type:`PyFloatObject`,但不是 :c:type:`PyFloatObject` 的子型"
54+
"別,則回傳 true。這個函式不會失敗。"
5555

5656
#: ../../c-api/float.rst:36
5757
msgid ""
5858
"Create a :c:type:`PyFloatObject` object based on the string value in *str*, "
5959
"or ``NULL`` on failure."
60-
msgstr "建立一個基於字串值 *str* 的 :c:type:`PyFloatObject` 物件,失敗時回傳 ``NULL``。"
60+
msgstr ""
61+
"建立一個基於字串值 *str* 的 :c:type:`PyFloatObject` 物件,失敗時回傳 "
62+
"``NULL``。"
6163

6264
#: ../../c-api/float.rst:42
6365
msgid ""
6466
"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure."
65-
msgstr "建立一個來自 *v* 的 :c:type:`PyFloatObject` 物件,失敗時回傳 ``NULL``。"
67+
msgstr ""
68+
"建立一個來自 *v* 的 :c:type:`PyFloatObject` 物件,失敗時回傳 ``NULL``。"
6669

6770
#: ../../c-api/float.rst:47
6871
msgid ""
@@ -73,11 +76,11 @@ msgid ""
7376
"meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one "
7477
"should call :c:func:`PyErr_Occurred` to check for errors."
7578
msgstr ""
76-
"回傳 *pyfloat* 內容的 C :c:expr:`double` 表示形式。"
77-
"如果 *pyfloat* 不是 Python 浮點數物件,但具有 :meth:`~object.__float__` 方法,"
78-
"則會先呼叫此方法將 *pyfloat* 轉換為浮點數。"
79-
"如果未定義 :meth:`!__float__`,則會用後備方法 :meth:`~object.__index__`。"
80-
"此方法在失敗時回傳 ``-1.0``,因此應該呼叫 :c:func:`PyErr_Occurred` 來檢查錯誤。"
79+
"回傳 *pyfloat* 內容的 C :c:expr:`double` 表示形式。如果 *pyfloat* 不是 "
80+
"Python 浮點數物件,但具有 :meth:`~object.__float__` 方法,則會先呼叫此方法將 "
81+
"*pyfloat* 轉換為浮點數。如果未定義 :meth:`!__float__`,則會用後備方法 :meth:"
82+
"`~object.__index__`。此方法在失敗時回傳 ``-1.0``,因此應該呼叫 :c:func:"
83+
"`PyErr_Occurred` 來檢查錯誤。"
8184

8285
#: ../../c-api/float.rst:54
8386
msgid "Use :meth:`~object.__index__` if available."
@@ -95,8 +98,8 @@ msgid ""
9598
"minimum and maximum values of a float. It's a thin wrapper around the header "
9699
"file :file:`float.h`."
97100
msgstr ""
98-
"回傳一個 structseq 實例,其中包含有關浮點數的精度、最小值和最大值的資訊。"
99-
"它是對標頭檔 :file:`float.h` 的簡單封裝。"
101+
"回傳一個 structseq 實例,其中包含有關浮點數的精度、最小值和最大值的資訊。它是"
102+
"對標頭檔 :file:`float.h` 的簡單封裝。"
100103

101104
#: ../../c-api/float.rst:73
102105
msgid ""
@@ -122,7 +125,9 @@ msgstr "在大多數平台上,這相當於 ``return PyFloat_FromDouble(NAN)``
122125
msgid ""
123126
"Return :data:`math.inf` or :data:`-math.inf <math.inf>` from a function, "
124127
"depending on the sign of *sign*."
125-
msgstr "根據 *sign* 的正負號,從函式回傳 :data:`math.inf` 或 :data:`-math.inf <math.inf>`。"
128+
msgstr ""
129+
"根據 *sign* 的正負號,從函式回傳 :data:`math.inf` 或 :data:`-math.inf <math."
130+
"inf>`。"
126131

127132
#: ../../c-api/float.rst:93
128133
msgid "On most platforms, this is equivalent to the following::"
@@ -144,8 +149,8 @@ msgid ""
144149
"c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies "
145150
"the number of bytes in the bytes string."
146151
msgstr ""
147-
"打包和解包函式提供了一種有效的跨平台方式,來將浮點數值儲存為位元組字串。"
148-
"打包例程從 C :c:expr:`double` 產生位元組字串,而解包例程則從這樣的位元組字串產生 "
152+
"打包和解包函式提供了一種有效的跨平台方式,來將浮點數值儲存為位元組字串。打包"
153+
"例程從 C :c:expr:`double` 產生位元組字串,而解包例程則從這樣的位元組字串產生 "
149154
"C :c:expr:`double`。後綴(2、4 或 8)標示了位元組字串中的位元組數。"
150155

151156
#: ../../c-api/float.rst:107
@@ -159,20 +164,20 @@ msgid ""
159164
"attempting to unpack a bytes string containing an IEEE INF or NaN will raise "
160165
"an exception."
161166
msgstr ""
162-
"在看似使用 IEEE 754 格式的平台上,這些函式是透過複製位元來運作的。"
163-
"在其他平台上,2 位元組格式與 IEEE 754 binary16 半精度格式相同,"
164-
"4 位元組格式(32 位元)與 IEEE 754 binary32 單精度格式相同,"
165-
"8 位元組格式與 IEEE 754 binary64 雙精度格式相同。"
166-
"儘管如此,INF 和 NaN(如果這些東西在平台上存在)的打包並未正確處理,"
167-
"並且嘗試解包包含 IEEE INF 或 NaN 的位元組字串將引發例外。"
167+
"在看似使用 IEEE 754 格式的平台上,這些函式是透過複製位元來運作的。在其他平台"
168+
"上,2 位元組格式與 IEEE 754 binary16 半精度格式相同,4 位元組格式(32 位元)"
169+
"與 IEEE 754 binary32 單精度格式相同,8 位元組格式與 IEEE 754 binary64 雙精度"
170+
"格式相同。儘管如此,INF 和 NaN(如果這些東西在平台上存在)的打包並未正確處"
171+
"理,並且嘗試解包包含 IEEE INF 或 NaN 的位元組字串將引發例外。"
168172

169173
#: ../../c-api/float.rst:116
174+
#, fuzzy
170175
msgid ""
171-
"Note that NaNs type may not be preserved on IEEE platforms (silent NaN "
172-
"become quiet), for example on x86 systems in 32-bit mode."
176+
"Note that NaNs type may not be preserved on IEEE platforms (signaling NaN "
177+
"become quiet NaN), for example on x86 systems in 32-bit mode."
173178
msgstr ""
174-
"請注意,在 IEEE 平台上可能無法保留 NaN 型別(「靜默型 NaN (silent NaN)」會變成"
175-
"「安靜型 NaN (quiet NaN)」),例如在 32 位元模式的 x86 系統上。"
179+
"請注意,在 IEEE 平台上可能無法保留 NaN 型別(「靜默型 NaN (silent NaN)」會變"
180+
"「安靜型 NaN (quiet NaN)」),例如在 32 位元模式的 x86 系統上。"
176181

177182
#: ../../c-api/float.rst:119
178183
msgid ""
@@ -181,9 +186,9 @@ msgid ""
181186
"less precision, or smaller dynamic range, not all values can be unpacked. "
182187
"What happens in such cases is partly accidental (alas)."
183188
msgstr ""
184-
"在非 IEEE 平台上,如果精度更高或動態範圍比 IEEE 754 支援的更大,"
185-
"則無法打包所有值;在非 IEEE 平台上,如果精度較低或動態範圍較小,"
186-
"則無法解包所有值。在這種案例下發生的情況在某種程度上是偶然的(唉)。"
189+
"在非 IEEE 平台上,如果精度更高或動態範圍比 IEEE 754 支援的更大,則無法打包所"
190+
"有值;在非 IEEE 平台上,如果精度較低或動態範圍較小,則無法解包所有值。在這種"
191+
"案例下發生的情況在某種程度上是偶然的(唉)。"
187192

188193
#: ../../c-api/float.rst:127
189194
msgid "Pack functions"
@@ -199,18 +204,18 @@ msgid ""
199204
"to ``1`` on big endian processor, or ``0`` on little endian processor."
200205
msgstr ""
201206
"打包例程會從 *p* 開始寫入 2、4 或 8 位元組。*le* 是一個 :c:expr:`int` 引數,"
202-
"如果你想要位元組字串為小端序格式(指數在最後,位於 ``p+1``、``p+3``、"
203-
"``p+6`` 或 ``p+7``),則用非零值;如果你想要大端序格式(指數在最前,位於 *p*),"
204-
"則用零。可以使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:"
205-
"在大端序處理器上它等於 ``1``,在小端序處理器上它等於 ``0``。"
207+
"如果你想要位元組字串為小端序格式(指數在最後,位於 ``p+1``、``p+3``、``p+6`` "
208+
"或 ``p+7``),則用非零值;如果你想要大端序格式(指數在最前,位於 *p*),則用"
209+
"。可以使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:在大端序處理器上它"
210+
"等於 ``1``,在小端序處理器上它等於 ``0``。"
206211

207212
#: ../../c-api/float.rst:136
208213
msgid ""
209214
"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, "
210215
"most likely :exc:`OverflowError`)."
211216
msgstr ""
212-
"回傳值:如果一切正常則為 ``0``,如果發生錯誤則為 ``-1``\\並且會設定一個例外,"
213-
"最有可能是 :exc:`OverflowError`)。"
217+
"回傳值:如果一切正常則為 ``0``,如果發生錯誤則為 ``-1``\\並且會設定一個例"
218+
"外,最有可能是 :exc:`OverflowError`)。"
214219

215220
#: ../../c-api/float.rst:139
216221
msgid "There are two problems on non-IEEE platforms:"
@@ -250,25 +255,27 @@ msgid ""
250255
"processor, or ``0`` on little endian processor."
251256
msgstr ""
252257
"解包例程會從 *p* 開始讀取 2、4 或 8 位元組。*le* 是一個 :c:expr:`int` 引數,"
253-
"如果位元組字串為小端序格式(指數在最後,位於 ``p+1``、``p+3``、"
254-
"``p+6`` 或 ``p+7``),則用非零值;如果為大端序格式(指數在最前,位於 *p*),則用零。"
255-
"可以使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:在大端序處理器上它等於 ``1``,"
256-
"在小端序處理器上它等於 ``0``。"
258+
"如果位元組字串為小端序格式(指數在最後,位於 ``p+1``、``p+3``、``p+6`` 或 "
259+
"``p+7``),則用非零值;如果為大端序格式(指數在最前,位於 *p*),則用零。可以"
260+
"使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:在大端序處理器上它等於 "
261+
"``1``,在小端序處理器上它等於 ``0``。"
257262

258263
#: ../../c-api/float.rst:167
259264
msgid ""
260265
"Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:"
261266
"`PyErr_Occurred` is true (and an exception is set, most likely :exc:"
262267
"`OverflowError`)."
263268
msgstr ""
264-
"回傳值:解包後的 double。發生錯誤時,這是 ``-1.0`` 且 :c:func:`PyErr_Occurred` "
265-
"為 true(並且會設置一個例外,最有可能是 :exc:`OverflowError`)。"
269+
"回傳值:解包後的 double。發生錯誤時,這是 ``-1.0`` 且 :c:func:"
270+
"`PyErr_Occurred` 為 true(並且會設置一個例外,最有可能是 :exc:"
271+
"`OverflowError`)。"
266272

267273
#: ../../c-api/float.rst:171
268274
msgid ""
269275
"Note that on a non-IEEE platform this will refuse to unpack a bytes string "
270276
"that represents a NaN or infinity."
271-
msgstr "請注意,在非 IEEE 平台上,這將拒絕解包會表示為 NaN 或無窮大的位元組字串。"
277+
msgstr ""
278+
"請注意,在非 IEEE 平台上,這將拒絕解包會表示為 NaN 或無窮大的位元組字串。"
272279

273280
#: ../../c-api/float.rst:176
274281
msgid "Unpack the IEEE 754 binary16 half-precision format as a C double."

0 commit comments

Comments
 (0)