8000 Merge branch '3.12' into library_pathlib_part2 · python/python-docs-zh-tw@3b638a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b638a9

Browse files
authored
Merge branch '3.12' into library_pathlib_part2
2 parents 6c51a9b + 5a9e8db commit 3b638a9

File tree

134 files changed

+11692
-10779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
< F987 button data-component="IconButton" type="button" data-testid="collapse-file-tree-button" aria-expanded="true" aria-controls="diff_file_tree" data-analytics-opt-out="true" class="prc-Button-ButtonBase-c50BI d-none d-md-flex position-relative fgColor-muted prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Rcb6lab:-loading-announcement" aria-labelledby="expand-button-file-tree-button">

134 files changed

+11692
-10779
lines changed

.scripts/poetry.lock

Lines changed: 91 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,7 @@ reST 語法注意事項
318318

319319
.. code-block:: rst
320320
321-
以下是個程式範例:
322-
323-
::
324-
325-
注意\ **額外的空行是必須的**。
326-
321+
以下是個程式範例: ::
327322
328323
術語表 Glossary
329324
===============

c-api/conversion.po

Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2023, Python Software Foundation
1+
# Copyright (C) 2001-2024, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.12\n"
1111
"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"
1313
"PO-Revision-Date: 2023-12-11 18:26+0000\n"
1414
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -112,6 +112,51 @@ msgstr "以下函式提供與區域設定無關 (locale-independent) 的字串
112112

113113
#: ../../c-api/conversion.rst:53
114114
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 ""
115160
"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on "
116161
"failure. The set of accepted strings corresponds to the set of strings "
117162
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
@@ -122,7 +167,7 @@ msgstr ""
122167
"對應於 Python 的 :func:`float` 建構函式接受的字串集合,但 ``s`` 不得有前導或"
123168
"尾隨的空格。轉換與目前區域設定無關。"
124169

125-
#: ../../c-api/conversion.rst:59
170+
#: ../../c-api/conversion.rst:95
126171
msgid ""
127172
"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
128173
"`ValueError` and return ``-1.0`` if the string is not a valid representation "
@@ -131,7 +176,7 @@ msgstr ""
131176
"如果 ``endptr`` 為 ``NULL``,則轉換整個字串。如果字串不是浮點數的有效表示,則"
132177
"引發 :exc:`ValueError` 並回傳 ``-1.0``。"
133178

134-
#: ../../c-api/conversion.rst:63
179+
#: ../../c-api/conversion.rst:99
135180
msgid ""
136181
"If endptr is not ``NULL``, convert as much of the string as possible and set "
137182
"``*endptr`` to point to the first unconverted character. If no initial "
@@ -143,7 +188,7 @@ msgstr ""
143188
"個未轉換的字元。如果字串的初始片段都不是浮點數的有效表示,則設定 ``*endptr`` "
144189
"指向字串的開頭,引發 ValueError 並回傳 ``-1.0``。"
145190

146-
#: ../../c-api/conversion.rst:70
191+
#: ../../c-api/conversion.rst:106
147192
msgid ""
148193
"If ``s`` represents a value that is too large to store in a float (for "
149194
"example, ``\"1e500\"`` is such a string on many platforms) then if "
@@ -160,23 +205,23 @@ msgstr ""
160205
"``-1.0``。在這兩種情況下,將 ``*endptr`` 設定為指向轉換後的值之後的第一個字"
161206
"元。"
162207

163-
#: ../../c-api/conversion.rst:78
208+
#: ../../c-api/conversion.rst:114
164209
msgid ""
165210
"If any other error occurs during the conversion (for example an out-of-"
166211
"memory error), set the appropriate Python exception and return ``-1.0``."
167212
msgstr ""
168213
"如果轉換期間發生任何其他錯誤(例如記憶體不足的錯誤),請設定適當的 Python 例"
169214
"外並回傳 ``-1.0``。"
170215

171-
#: ../../c-api/conversion.rst:87
216+
#: ../../c-api/conversion.rst:123
172217
msgid ""
173218
"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
174219
"*precision*, and *flags*."
175220
msgstr ""
176221
"使用提供的 *format_code*、*precision* 和 *flags* 將 :c:expr:`double` *val* 轉"
177222
"換為字串。"
178223

179-
#: ../../c-api/conversion.rst:90
224+
#: ../../c-api/conversion.rst:126
180225
msgid ""
181226
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
182227
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
@@ -186,36 +231,36 @@ msgstr ""
186231
"``'r'`` 其中之一。對於 ``'r'``,提供的 *precision* 必須為 0 並會被忽略。"
187232
"``'r'`` 格式碼指定標準 :func:`repr` 格式。"
188233

189-
#: ../../c-api/conversion.rst:95
234+
#: ../../c-api/conversion.rst:131
190235
msgid ""
191236
"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
192237
"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
193238
msgstr ""
194239
"*flags* 可以是零個或多個值 ``Py_DTSF_SIGN``、``Py_DTSF_ADD_DOT_0`` 或 "
195240
"``Py_DTSF_ALT``,會被聯集在一起:"
196241

197-
#: ../../c-api/conversion.rst:98
242+
#: ../../c-api/conversion.rst:134
198243
msgid ""
199244
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
200245
"character, even if *val* is non-negative."
201246
msgstr ""
202247
"``Py_DTSF_SIGN`` 代表總是在回傳的字串前面加上符號字元,即使 *val* 非負數。"
203248

204-
#: ../../c-api/conversion.rst:101
249+
#: ../../c-api/conversion.rst:137
205250
msgid ""
206251
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
207252
"like an integer."
208253
msgstr "``Py_DTSF_ADD_DOT_0`` 代表確保回傳的字串看起來不會像整數。"
209254

210-
#: ../../c-api/conversion.rst:104
255+
#: ../../c-api/conversion.rst:140
211256
msgid ""
212257
"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the "
213258
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
214259
msgstr ""
215260
"``Py_DTSF_ALT`` 代表要套用「備用的 (alternate)」格式化規則。有關詳細資訊,請"
216261
"參閱 :c:func:`PyOS_snprintf` ``'#'`` 的文件。"
217262

218-
#: ../../c-api/conversion.rst:108
263+
#: ../../c-api/conversion.rst:144
219264
msgid ""
220265
"If *ptype* is non-``NULL``, then the value it points to will be set to one "
2 C2EE 21266
"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
@@ -226,7 +271,7 @@ msgstr ""
226271
"``Py_DTST_INFINITE`` 或 ``Py_DTST_NAN`` 其中之一,分別代表 *val* 是有限數、無"
227272
"限數或非數。"
228273

229-
#: ../../c-api/conversion.rst:112
274+
#: ../../c-api/conversion.rst:148
230275
msgid ""
231276
"The return value is a pointer to *buffer* with the converted string or "
232277
"``NULL`` if the conversion failed. The caller is responsible for freeing the "
@@ -235,15 +280,15 @@ msgstr ""
235280
"回傳值是指向 *buffer* 的指標,其中包含轉換後的字串,如果轉換失敗則回傳 "
236281
"``NULL``。呼叫者負責透過呼叫 :c:func:`PyMem_Free` 來釋放回傳的字串。"
237282

238-
#: ../../c-api/conversion.rst:121
283+
#: ../../c-api/conversion.rst:157
239284
msgid ""
240285
"Case insensitive comparison of strings. The function works almost "
241286
"identically to :c:func:`!strcmp` except that it ignores the case."
242287
msgstr ""
243288
"不區分大小寫的字串比較。函式的作用方式幾乎與 :c:func:`!strcmp` 相同,只是它忽"
244289
"略大小寫。"
245290

246-
#: ../../c-api/conversion.rst:127
291+
#: ../../c-api/conversion.rst:163
247292
msgid ""
248293
"Case insensitive comparison of strings. The function works almost "
249294
"identically to :c:func:`!strncmp` except that it ignores the case."

c-api/exceptions.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-12-14 00:03+0000\n"
11+
"POT-Creation-Date: 2024-01-01 00:03+0000\n"
1212
"PO-Revision-Date: 2018-05-23 14:05+0000\n"
1313
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -454,7 +454,7 @@ msgstr ""
454454
#: ../../c-api/exceptions.rst:429
455455
msgid ""
456456
"Return the exception currently being raised, clearing the error indicator at "
457-
"the same time."
457+
"the same time. Return ``NULL`` if the error indicator is not set."
458458
msgstr ""
459459

460460
#: ../../c-api/exceptions.rst:432

c-api/file.po

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.12\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2023-07-22 00:04+0000\n"
12+
"POT-Creation-Date: 2024-02-05 00:03+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-"
@@ -111,14 +111,19 @@ msgstr ""
111111
"數。"
112112

113113
#: ../../c-api/file.rst:68
114+
msgid "The handler is a function of type:"
115+
msgstr ""
116+
117+
#: ../../c-api/file.rst:72
118+
#, fuzzy
114119
msgid ""
115-
"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, "
116-
"void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
120+
"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, " 10000
121+
"where *path* is guaranteed to be :c:type:`PyUnicodeObject`."
117122
msgstr ""
118123
"處理程式是 :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)` 型別的函"
119124
"式,其中 *path* 保證為 :c:type:`PyUnicodeObject`。"
120125

121-
#: ../../c-api/file.rst:71
126+
#: ../../c-api/file.rst:76
122127
msgid ""
123128
"The *userData* pointer is passed into the hook function. Since hook "
124129
"functions may be called from different runtimes, this pointer should not "
@@ -127,7 +132,7 @@ msgstr ""
127132
"*userData* 指標被傳遞到掛鉤函式 (hook function) 中。由於可能會從不同的執行環"
128133
"境 (runtime) 呼叫掛鉤函式,因此該指標不應直接指向 Python 狀態。"
129134

130-
#: ../../c-api/file.rst:75
135+
#: ../../c-api/file.rst:80
131136
msgid ""
132137
"As this hook is intentionally used during import, avoid importing new "
133138
"modules during its execution unless they are known to be frozen or available "
@@ -136,7 +141,7 @@ msgstr ""
136141
"由於此掛鉤函式是在導入期間有意使用的,因此請避免在其執行期間導入新模組,除非"
137142
"它們已知有被凍結或在 ``sys.modules`` 中可用。"
138143

139-
#: ../../c-api/file.rst:79
144+
#: ../../c-api/file.rst:84
140145
#, fuzzy
141146
msgid ""
142147
"Once a hook has been set, it cannot be removed or replaced, and later calls "
@@ -147,19 +152,19 @@ msgstr ""
147152
"`PyFile_SetOpenCodeHook` 將失敗。失敗時,函式回傳 -1 並在直譯器已初始化時設定"
148153
"例外。"
149154

150-
#: ../../c-api/file.rst:83
155+
#: ../../c-api/file.rst:88
151156
msgid "This function is safe to call before :c:func:`Py_Initialize`."
152157
msgstr "在 :c:func:`Py_Initialize` 之前呼叫此函式是安全的。"
153158

154-
#: ../../c-api/file.rst:85
159+
#: ../../c-api/file.rst:90
155160
msgid ""
156161
"Raises an :ref:`auditing event <auditing>` ``setopencodehook`` with no "
157162
"arguments."
158163
msgstr ""
159164
"不帶引數地引發一個\\ :ref:`稽核事件 (auditing event) <auditing>` "
160165
"``setopencodehook``\\ 。"
161166

162-
#: ../../c-api/file.rst:95
167+
#: ../../c-api/file.rst:100
163168
msgid ""
164169
"Write object *obj* to file object *p*. The only supported flag for *flags* "
165170
"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is "
@@ -170,7 +175,7 @@ msgstr ""
170175
"`Py_PRINT_RAW`;如果有給定,則寫入物件的 :func:`str` 而不是 :func:`repr`。在"
171176
"成功回傳 ``0`` 或在失敗回傳 ``-1``;將設定適當的例外。"
172177

173-
#: ../../c-api/file.rst:103
178+
#: ../../c-api/file.rst:108
174179
msgid ""
175180
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
176181
"failure; the appropriate exception will be set."
@@ -190,6 +195,6 @@ msgstr "file(檔案)"
190195
msgid "EOFError (built-in exception)"
191196
msgstr "EOFError(內建例外)"
192197

193-
#: ../../c-api/file.rst:93
198+
#: ../../c-api/file.rst:98
194199
msgid "Py_PRINT_RAW"
195200
msgstr "Py_PRINT_RAW"

0 commit comments

Comments
 (0)
0