Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7977a71

Browse files
sync with cpython 21c9c919
1 parent3c685fb commit7977a71

File tree

8 files changed

+1809
-1681
lines changed

8 files changed

+1809
-1681
lines changed

‎c-api/file.po‎

Lines changed: 37 additions & 13 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:2024-09-23 07:52+0800\n"
12+
"POT-Creation-Date:2025-11-12 00:16+0000\n"
1313
"PO-Revision-Date:2023-04-24 20:38+0800\n"
1414
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1515
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -94,11 +94,11 @@ msgid ""
9494
"is reached immediately."
9595
msgstr""
9696
"相當於 ``p.readline([n])``,這個函式從物件 *p* 中讀取一行。 *p* 可以是檔案物"
97-
"件或任何具有 :meth:`~io.IOBase.readline` 方法的物件。如果 *n* 為 ``0``,則不管該行"
98-
"的長度都只會讀取一行。如果 *n* 大於 ``0``,則不會從檔案中讀取超過 *n* "
99-
"個位元組;可以回傳該行的一部分。在這兩種情況下,如果立即到達檔案末尾,則回傳一個空"
100-
"字串。但是,如果 *n* 小於 ``0``,無論長度如何,都會讀取一行,但如果立即到達檔"
101-
"案末尾,則會引發 :exc:`EOFError`。"
97+
"件或任何具有 :meth:`~io.IOBase.readline` 方法的物件。如果 *n* 為 ``0``,則不"
98+
"管該行的長度都只會讀取一行。如果 *n* 大於 ``0``,則不會從檔案中讀取超過 *n* "
99+
"個位元組;可以回傳該行的一部分。在這兩種情況下,如果立即到達檔案末尾,則回傳"
100+
"一個空字串。但是,如果 *n* 小於 ``0``,無論長度如何,都會讀取一行,但如果立即"
101+
"到達檔案末尾,則會引發 :exc:`EOFError`。"
102102

103103
#:../../c-api/file.rst:65
104104
msgid""
@@ -117,8 +117,8 @@ msgid ""
117117
"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, "
118118
"where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
119119
msgstr""
120-
"相當於 :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`,"
121-
"其中*path* 保證為 :c:type:`PyUnicodeObject`。"
120+
"相當於 :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`,其中"
121+
"*path* 保證為 :c:type:`PyUnicodeObject`。"
122122

123123
#:../../c-api/file.rst:77
124124
msgid""
@@ -145,8 +145,8 @@ msgid ""
145145
"returns -1 and sets an exception if the interpreter has been initialized."
146146
msgstr""
147147
"一旦設定了一個掛鉤函式,它就不能被刪除或替換,且後續對 :c:func:"
148-
"`PyFile_SetOpenCodeHook` 的呼叫將會失敗。失敗時,函式回傳 -1且若直譯器已初始化便會設定"
149-
"例外。"
148+
"`PyFile_SetOpenCodeHook` 的呼叫將會失敗。失敗時,函式回傳 -1且若直譯器已初始"
149+
"化便會設定例外。"
150150

151151
#:../../c-api/file.rst:89
152152
msgid"This function is safe to call before :c:func:`Py_Initialize`."
@@ -160,7 +160,31 @@ msgstr ""
160160
"不帶引數地引發一個\\ :ref:`稽核事件 (auditing event) <auditing>` "
161161
"``setopencodehook``。"
162162

163-
#:../../c-api/file.rst:101
163+
#:../../c-api/file.rst:98
164+
msgid""
165+
"Open *path* with the mode ``'rb'``. *path* must be a Python :class:`str` "
166+
"object. The behavior of this function may be overridden by :c:func:"
167+
"`PyFile_SetOpenCodeHook` to allow for some preprocessing of the text."
168+
msgstr""
169+
170+
#:../../c-api/file.rst:103
171+
msgid"This is analogous to :func:`io.open_code` in Python."
172+
msgstr""
173+
174+
#:../../c-api/file.rst:105
175+
msgid""
176+
"On success, this function returns a :term:`strong reference` to a Python "
177+
"file object. On failure, this function returns ``NULL`` with an exception "
178+
"set."
179+
msgstr""
180+
181+
#:../../c-api/file.rst:114
182+
msgid""
183+
"Similar to :c:func:`PyFile_OpenCodeObject`, but *path* is a UTF-8 encoded :c:"
184+
"expr:`const char*`."
185+
msgstr""
186+
187+
#:../../c-api/file.rst:124
164188
msgid""
165189
"Write object *obj* to file object *p*. The only supported flag for *flags* "
166190
"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is "
@@ -171,7 +195,7 @@ msgstr ""
171195
"`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在"
172196
"成功回傳 ``0`` 或在失敗回傳 ``-1``;將設定適當的例外。"
173197

174-
#:../../c-api/file.rst:109
198+
#:../../c-api/file.rst:132
175199
msgid""
176200
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
177201
"failure; the appropriate exception will be set."
@@ -191,6 +215,6 @@ msgstr "file(檔案)"
191215
msgid"EOFError (built-in exception)"
192216
msgstr"EOFError(內建例外)"
193217

194-
#:../../c-api/file.rst:99
218+
#:../../c-api/file.rst:122
195219
msgid"Py_PRINT_RAW (C macro)"
196220
msgstr"Py_PRINT_RAW(C 巨集)"

‎c-api/float.po‎

Lines changed: 60 additions & 28 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-07 15:32+0000\n"
12+
"POT-Creation-Date:2025-11-12 00:16+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-"
@@ -113,35 +113,67 @@ msgid ""
113113
msgstr"將最小的正規化浮點數 *DBL_MIN* 作為 C :c:expr:`double` 回傳。"
114114

115115
#:../../c-api/float.rst:83
116+
msgid""
117+
"This macro expands a to constant expression of type :c:expr:`double`, that "
118+
"represents the positive infinity."
119+
msgstr""
120+
121+
#:../../c-api/float.rst:86
122+
msgid""
123+
"On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from "
124+
"the C11 standard ``<math.h>`` header."
125+
msgstr""
126+
127+
#:../../c-api/float.rst:92
128+
msgid""
129+
"This macro expands a to constant expression of type :c:expr:`double`, that "
130+
"represents a quiet not-a-number (qNaN) value."
131+
msgstr""
132+
133+
#:../../c-api/float.rst:95
134+
msgid""
135+
"On most platforms, this is equivalent to the :c:macro:`!NAN` macro from the "
136+
"C11 standard ``<math.h>`` header."
137+
msgstr""
138+
139+
#:../../c-api/float.rst:101
140+
msgid"High precision (long double) definition of :data:`~math.e` constant."
141+
msgstr""
142+
143+
#:../../c-api/float.rst:106
144+
msgid"High precision (long double) definition of :data:`~math.pi` constant."
145+
msgstr""
146+
147+
#:../../c-api/float.rst:111
116148
msgid"Return :data:`math.nan` from a function."
117149
msgstr"從函式回傳 :data:`math.nan`。"
118150

119-
#:../../c-api/float.rst:85
151+
#:../../c-api/float.rst:113
120152
msgid""
121153
"On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``."
122154
msgstr"在大多數平台上,這相當於 ``return PyFloat_FromDouble(NAN)``。"
123155

124-
#:../../c-api/float.rst:90
156+
#:../../c-api/float.rst:118
125157
msgid""
126158
"Return :data:`math.inf` or :data:`-math.inf <math.inf>` from a function, "
127159
"depending on the sign of *sign*."
128160
msgstr""
129161
"根據 *sign* 的正負號,從函式回傳 :data:`math.inf` 或 :data:`-math.inf <math."
130162
"inf>`。"
131163

132-
#:../../c-api/float.rst:93
164+
#:../../c-api/float.rst:121
133165
msgid"On most platforms, this is equivalent to the following::"
134166
msgstr"在大多數平台上,這相當於以下內容: ::"
135167

136-
#:../../c-api/float.rst:95
168+
#:../../c-api/float.rst:123
137169
msgid"return PyFloat_FromDouble(copysign(INFINITY, sign));"
138170
msgstr"return PyFloat_FromDouble(copysign(INFINITY, sign));"
139171

140-
#:../../c-api/float.rst:99
172+
#:../../c-api/float.rst:127
141173
msgid"Pack and Unpack functions"
142174
msgstr"打包和解包函式"
143175

144-
#:../../c-api/float.rst:101
176+
#:../../c-api/float.rst:129
145177
msgid""
146178
"The pack and unpack functions provide an efficient platform-independent way "
147179
"to store floating-point values as byte strings. The Pack routines produce a "
@@ -153,7 +185,7 @@ msgstr ""
153185
"例程從 C :c:expr:`double` 產生位元組字串,而解包例程則從這樣的位元組字串產生 "
154186
"C :c:expr:`double`。後綴(2、4 或 8)標示了位元組字串中的位元組數。"
155187

156-
#:../../c-api/float.rst:107
188+
#:../../c-api/float.rst:135
157189
msgid""
158190
"On platforms that appear to use IEEE 754 formats these functions work by "
159191
"copying bits. On other platforms, the 2-byte format is identical to the IEEE "
@@ -170,15 +202,15 @@ msgstr ""
170202
"格式相同。儘管如此,INF 和 NaN(如果這些東西在平台上存在)的打包並未正確處"
171203
"理,並且嘗試解包包含 IEEE INF 或 NaN 的位元組字串將引發例外。"
172204

173-
#:../../c-api/float.rst:116
205+
#:../../c-api/float.rst:144
174206
msgid""
175207
"Note that NaNs type may not be preserved on IEEE platforms (signaling NaN "
176208
"become quiet NaN), for example on x86 systems in 32-bit mode."
177209
msgstr""
178-
"請注意,在 IEEE 平台上可能無法保留 NaN 型別(「訊號型 NaN (signaling NaN)」會變"
179-
"「安靜型 NaN (quiet NaN)」),例如在 32 位元模式的 x86 系統上。"
210+
"請注意,在 IEEE 平台上可能無法保留 NaN 型別(「訊號型 NaN (signaling NaN)」"
211+
"變成「安靜型 NaN (quiet NaN)」),例如在 32 位元模式的 x86 系統上。"
180212

181-
#:../../c-api/float.rst:119
213+
#:../../c-api/float.rst:147
182214
msgid""
183215
"On non-IEEE platforms with more precision, or larger dynamic range, than "
184216
"IEEE 754 supports, not all values can be packed; on non-IEEE platforms with "
@@ -189,11 +221,11 @@ msgstr ""
189221
"有值;在非 IEEE 平台上,如果精度較低或動態範圍較小,則無法解包所有值。在這種"
190222
"案例下發生的情況在某種程度上是偶然的(唉)。"
191223

192-
#:../../c-api/float.rst:127
224+
#:../../c-api/float.rst:155
193225
msgid"Pack functions"
194226
msgstr"打包函式"
195227

196-
#:../../c-api/float.rst:129
228+
#:../../c-api/float.rst:157
197229
msgid""
198230
"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:"
199231
"`int` argument, non-zero if you want the bytes string in little-endian "
@@ -208,43 +240,43 @@ msgstr ""
208240
"零。可以使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:在大端序處理器上它"
209241
"等於 ``1``,在小端序處理器上它等於 ``0``。"
210242

211-
#:../../c-api/float.rst:136
243+
#:../../c-api/float.rst:164
212244
msgid""
213245
"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, "
214246
"most likely :exc:`OverflowError`)."
215247
msgstr""
216248
"回傳值:如果一切正常則為 ``0``,如果發生錯誤則為 ``-1``\\ (並且會設定一個例"
217249
"外,最有可能是 :exc:`OverflowError`)。"
218250

219-
#:../../c-api/float.rst:139
251+
#:../../c-api/float.rst:167
220252
msgid"There are two problems on non-IEEE platforms:"
221253
msgstr"在非 IEEE 平台上有兩個問題:"
222254

223-
#:../../c-api/float.rst:141
255+
#:../../c-api/float.rst:169
224256
msgid"What this does is undefined if *x* is a NaN or infinity."
225257
msgstr"如果 *x* 是 NaN 或無窮大,則這樣做是未定義的。"
226258

227-
#:../../c-api/float.rst:142
259+
#:../../c-api/float.rst:170
228260
msgid"``-0.0`` and ``+0.0`` produce the same bytes string."
229261
msgstr"``-0.0`` 和 ``+0.0`` 會產生同樣的位元組字串。"
230262

231-
#:../../c-api/float.rst:146
263+
#:../../c-api/float.rst:174
232264
msgid"Pack a C double as the IEEE 754 binary16 half-precision format."
233265
msgstr"將 C double 打包為 IEEE 754 binary16 半精度格式。"
234266

235-
#:../../c-api/float.rst:150
267+
#:../../c-api/float.rst:178
236268
msgid"Pack a C double as the IEEE 754 binary32 single precision format."
237269
msgstr"將 C double 打包為 IEEE 754 binary32 單精度格式。"
238270

239-
#:../../c-api/float.rst:154
271+
#:../../c-api/float.rst:182
240272
msgid"Pack a C double as the IEEE 754 binary64 double precision format."
241273
msgstr"將 C double 打包為 IEEE 754 binary64 雙精度格式。"
242274

243-
#:../../c-api/float.rst:158
275+
#:../../c-api/float.rst:186
244276
msgid"Unpack functions"
245277
msgstr"解包函式"
246278

247-
#:../../c-api/float.rst:160
279+
#:../../c-api/float.rst:188
248280
msgid""
249281
"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:"
250282
"expr:`int` argument, non-zero if the bytes string is in little-endian format "
@@ -259,7 +291,7 @@ msgstr ""
259291
"使用 :c:macro:`PY_BIG_ENDIAN` 常數來使用原生端序:在大端序處理器上它等於 "
260292
"``1``,在小端序處理器上它等於 ``0``。"
261293

262-
#:../../c-api/float.rst:167
294+
#:../../c-api/float.rst:195
263295
msgid""
264296
"Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:"
265297
"`PyErr_Occurred` is true (and an exception is set, most likely :exc:"
@@ -269,22 +301,22 @@ msgstr ""
269301
"`PyErr_Occurred` 為 true(並且會設置一個例外,最有可能是 :exc:"
270302
"`OverflowError`)。"
271303

272-
#:../../c-api/float.rst:171
304+
#:../../c-api/float.rst:199
273305
msgid""
274306
"Note that on a non-IEEE platform this will refuse to unpack a bytes string "
275307
"that represents a NaN or infinity."
276308
msgstr""
277309
"請注意,在非 IEEE 平台上,這將拒絕解包會表示為 NaN 或無窮大的位元組字串。"
278310

279-
#:../../c-api/float.rst:176
311+
#:../../c-api/float.rst:204
280312
msgid"Unpack the IEEE 754 binary16 half-precision format as a C double."
281313
msgstr"將 IEEE 754 binary16 半精度格式解包為 C double。"
282314

283-
#:../../c-api/float.rst:180
315+
#:../../c-api/float.rst:208
284316
msgid"Unpack the IEEE 754 binary32 single precision format as a C double."
285317
msgstr"將 IEEE 754 binary32 單精度格式解包為 C double。"
286318

287-
#:../../c-api/float.rst:184
319+
#:../../c-api/float.rst:212
288320
msgid"Unpack the IEEE 754 binary64 double precision format as a C double."
289321
msgstr"將 IEEE 754 binary64 雙精度格式解包為 C double。"
290322

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp