1
- # Copyright (C) 2001-2023 , Python Software Foundation
1
+ # Copyright (C) 2001-2024 , Python Software Foundation
2
2
# This file is distributed under the same license as the Python package.
3
3
#
4
4
# Translators:
9
9
msgstr ""
10
10
"Project-Id-Version : Python 3.12\n "
11
11
"Report-Msgid-Bugs-To : \n "
12
- "POT-Creation-Date : 2023-07-29 00:03+0000\n "
12
+ "POT-Creation-Date : 2024-01-27 00:03+0000\n "
13
13
"PO-Revision-Date : 2023-12-11 18:26+0000\n "
14
14
"
Last-Translator :
Matt Wang <[email protected] >\n "
15
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -112,6 +112,51 @@ msgstr "以下函式提供與區域設定無關 (locale-independent) 的字串
112
112
113
113
#: ../../c-api/conversion.rst:53
114
114
msgid ""
115
+ "Convert the initial part of the string in ``str`` to an :c:expr:`unsigned "
116
+ "long` value according to the given ``base``, which must be between ``2`` and "
117
+ "``36`` inclusive, or be the special value ``0``."
118
+ msgstr ""
119
+
120
+ #: ../../c-api/conversion.rst:57
121
+ msgid ""
122
+ "Leading white space and case of characters are ignored. If ``base`` is zero "
123
+ "it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If "
124
+ "these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 "
125
+ "(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the "
126
+ "end of the scan."
127
+ msgstr ""
128
+
129
+ #: ../../c-api/conversion.rst:63
130
+ msgid ""
131
+ "If the converted value falls out of range of corresponding return type, "
132
+ "range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:"
133
+ "macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is "
134
+ "returned."
135
+ msgstr ""
136
+
137
+ #: ../../c-api/conversion.rst:68
138
+ msgid "See also the Unix man page :manpage:`strtoul(3)`."
139
+ msgstr "也請見 Unix 手冊頁面 :manpage:`strtoul(3)`。"
140
+
141
+ #: ../../c-api/conversion.rst:75
142
+ msgid ""
143
+ "Convert the initial part of the string in ``str`` to an :c:expr:`long` value "
144
+ "according to the given ``base``, which must be between ``2`` and ``36`` "
145
+ "inclusive, or be the special value ``0``."
146
+ msgstr ""
147
+
148
+ #: ../../c-api/conversion.rst:79
149
+ msgid ""
150
+ "Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead "
151
+ "and :c:macro:`LONG_MAX` on overflows."
152
+ msgstr ""
153
+
154
+ #: ../../c-api/conversion.rst:82
155
+ msgid "See also the Unix man page :manpage:`strtol(3)`."
156
+ msgstr "也請見 Unix 手冊頁面 :manpage:`strtol(3)`。"
157
+
158
+ #: ../../c-api/conversion.rst:89
159
+ msgid ""
115
160
"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on "
116
161
"failure. The set of accepted strings corresponds to the set of strings "
117
162
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
@@ -122,7 +167,7 @@ msgstr ""
122
167
"對應於 Python 的 :func:`float` 建構函式接受的字串集合,但 ``s`` 不得有前導或"
123
168
"尾隨的空格。轉換與目前區域設定無關。"
124
169
125
- #: ../../c-api/conversion.rst:59
170
+ #: ../../c-api/conversion.rst:95
126
171
msgid ""
127
172
"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
128
173
"`ValueError` and return ``-1.0`` if the string is not a valid representation "
@@ -131,7 +176,7 @@ msgstr ""
131
176
"如果 ``endptr`` 為 ``NULL``,則轉換整個字串。如果字串不是浮點數的有效表示,則"
132
177
"引發 :exc:`ValueError` 並回傳 ``-1.0``。"
133
178
134
- #: ../../c-api/conversion.rst:63
179
+ #: ../../c-api/conversion.rst:99
135
180
msgid ""
136
181
"If endptr is not ``NULL``, convert as much of the string as possible and set "
137
182
"``*endptr`` to point to the first unconverted character. If no initial "
@@ -143,7 +188,7 @@ msgstr ""
143
188
"個未轉換的字元。如果字串的初始片段都不是浮點數的有效表示,則設定 ``*endptr`` "
144
189
"指向字串的開頭,引發 ValueError 並回傳 ``-1.0``。"
145
190
146
- #: ../../c-api/conversion.rst:70
191
+ #: ../../c-api/conversion.rst:106
147
192
msgid ""
148
193
"If ``s`` represents a value that is too large to store in a float (for "
149
194
"example, ``\" 1e500\" `` is such a string on many platforms) then if "
@@ -160,23 +205,23 @@ msgstr ""
160
205
"``-1.0``。在這兩種情況下,將 ``*endptr`` 設定為指向轉換後的值之後的第一個字"
161
206
"元。"
162
207
163
- #: ../../c-api/conversion.rst:78
208
+ #: ../../c-api/conversion.rst:114
164
209
msgid ""
165
210
"If any other error occurs during the conversion (for example an out-of-"
166
211
"memory error), set the appropriate Python exception and return ``-1.0``."
167
212
msgstr ""
168
213
"如果轉換期間發生任何其他錯誤(例如記憶體不足的錯誤),請設定適當的 Python 例"
169
214
"外並回傳 ``-1.0``。"
170
215
171
- #: ../../c-api/conversion.rst:87
216
+ #: ../../c-api/conversion.rst:123
172
217
msgid ""
173
218
"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
174
219
"*precision*, and *flags*."
175
220
msgstr ""
176
221
"使用提供的 *format_code*、*precision* 和 *flags* 將 :c:expr:`double` *val* 轉"
177
222
"換為字串。"
178
223
179
- #: ../../c-api/conversion.rst:90
224
+ #: ../../c-api/conversion.rst:126
180
225
msgid ""
181
226
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
182
227
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
@@ -186,36 +231,36 @@ msgstr ""
186
231
"``'r'`` 其中之一。對於 ``'r'``,提供的 *precision* 必須為 0 並會被忽略。"
187
232
"``'r'`` 格式碼指定標準 :func:`repr` 格式。"
188
233
189
- #: ../../c-api/conversion.rst:95
234
+ #: ../../c-api/conversion.rst:131
190
235
msgid ""
191
236
"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
192
237
"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
193
238
msgstr ""
194
239
"*flags* 可以是零個或多個值 ``Py_DTSF_SIGN``、``Py_DTSF_ADD_DOT_0`` 或 "
195
240
"``Py_DTSF_ALT``,會被聯集在一起:"
196
241
197
- #: ../../c-api/conversion.rst:98
242
+ #: ../../c-api/conversion.rst:134
198
243
msgid ""
199
244
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
200
245
"character, even if *val* is non-negative."
201
246
msgstr ""
202
247
"``Py_DTSF_SIGN`` 代表總是在回傳的字串前面加上符號字元,即使 *val* 非負數。"
203
248
204
- #: ../../c-api/conversion.rst:101
249
+ #: ../../c-api/conversion.rst:137
205
250
msgid ""
206
251
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
207
252
"like an integer."
208
253
msgstr "``Py_DTSF_ADD_DOT_0`` 代表確保回傳的字串看起來不會像整數。"
209
254
210
- #: ../../c-api/conversion.rst:104
255
+ #: ../../c-api/conversion.rst:140
211
256
msgid ""
212
257
"``Py_DTSF_ALT`` means to apply \" alternate\" formatting rules. See the "
213
258
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
214
259
msgstr ""
215
260
"``Py_DTSF_ALT`` 代表要套用「備用的 (alternate)」格式化規則。有關詳細資訊,請"
216
261
"參閱 :c:func:`PyOS_snprintf` ``'#'`` 的文件。"
217
262
218
- #: ../../c-api/conversion.rst:108
263
+ #: ../../c-api/conversion.rst:144
219
264
msgid ""
220
265
"If *ptype* is non-``NULL``, then the value it points to will be set to one "
221
266
"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
@@ -226,7 +271,7 @@ msgstr ""
226
271
"``Py_DTST_INFINITE`` 或 ``Py_DTST_NAN`` 其中之一,分別代表 *val* 是有限數、無"
227
272
"限數或非數。"
228
273
229
- #: ../../c-api/conversion.rst:112
274
+ #: ../../c-api/conversion.rst:148
230
275
msgid ""
231
276
"The return value is a pointer to *buffer* with the converted string or "
232
277
"``NULL`` if the conversion failed. The caller is responsible for freeing the "
@@ -235,15 +280,15 @@ msgstr ""
235
280
"回傳值是指向 *buffer* 的指標,其中包含轉換後的字串,如果轉換失敗則回傳 "
236
281
"``NULL``。呼叫者負責透過呼叫 :c:func:`PyMem_Free` 來釋放回傳的字串。"
237
282
238
- #: ../../c-api/conversion.rst:121
283
+ #: ../../c-api/conversion.rst:157
239
284
msgid ""
240
285
"Case insensitive comparison of strings. The function works almost "
241
286
"identically to :c:func:`!strcmp` except that it ignores the case."
242
287
msgstr ""
243
288
"不區分大小寫的字串比較。函式的作用方式幾乎與 :c:func:`!strcmp` 相同,只是它忽"
244
289
"略大小寫。"
245
290
246
- #: ../../c-api/conversion.rst:127
291
+ #: ../../c-api/conversion.rst:163
247
292
msgid ""
248
293
"Case insensitive comparison of strings. The function works almost "
249
294
"identically to :c:func:`!strncmp` except that it ignores the case."
0 commit comments