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

Appearance settings

Commit 50a2f20

Browse filesBrowse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.12 (python#607)
* sync with cpython f2cc0052 * sync with cpython 47f60c3f * sync with cpython 200af429 * sync with cpython b312d4fd * sync with cpython 09487a20 * sync with cpython ce37fbc7 * sync with cpython 3e203037 * resolve fuzzy entries * sync with cpython 752d5254 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
1 parent 3a037c0 commit 50a2f20
Copy full SHA for 50a2f20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

52 files changed

+5968
-5630
lines changed

‎.scripts/poetry.lock

Copy file name to clipboardExpand all lines: .scripts/poetry.lock
+95-82Lines changed: 95 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎c-api/datetime.po

Copy file name to clipboardExpand all lines: c-api/datetime.po
+116-67Lines changed: 116 additions & 67 deletions
Large diffs are not rendered by default.

‎c-api/dict.po

Copy file name to clipboardExpand all lines: c-api/dict.po
+41-40Lines changed: 41 additions & 40 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-17 17:39+0800\n"
12+
"POT-Creation-Date: 2023-08-26 00:03+0000\n"
1313
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
1414
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -90,9 +90,9 @@ msgstr ""
9090
#: ../../c-api/dict.rst:75
9191
msgid ""
9292
"Insert *val* into the dictionary *p* using *key* as a key. *key* should be "
93-
"a :c:expr:`const char*`. The key object is created using "
94-
"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on "
95-
"failure. This function *does not* steal a reference to *val*."
93+
"a :c:expr:`const char*` UTF-8 encoded bytes string. The key object is "
94+
"created using ``PyUnicode_FromString(key)``. Return ``0`` on success or "
95+
"``-1`` on failure. This function *does not* steal a reference to *val*."
9696
msgstr ""
9797

9898
#: ../../c-api/dict.rst:83
@@ -105,52 +105,53 @@ msgstr ""
105105

106106
#: ../../c-api/dict.rst:91
107107
msgid ""
108-
"Remove the entry in dictionary *p* which has a key specified by the string "
109-
"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return "
110-
"``0`` on success or ``-1`` on failure."
108+
"Remove the entry in dictionary *p* which has a key specified by the UTF-8 "
109+
"encoded bytes string *key*. If *key* is not in the dictionary, :exc:"
110+
"`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
111111
msgstr ""
112112

113-
#: ../../c-api/dict.rst:98
113+
#: ../../c-api/dict.rst:99
114114
msgid ""
115115
"Return the object from dictionary *p* which has a key *key*. Return "
116116
"``NULL`` if the key *key* is not present, but *without* setting an exception."
117117
msgstr ""
118118

119-
#: ../../c-api/dict.rst:103
119+
#: ../../c-api/dict.rst:104
120120
msgid ""
121121
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
122122
"`~object.__eq__` methods are silently ignored. Prefer the :c:func:"
123123
"`PyDict_GetItemWithError` function instead."
124124
msgstr ""
125125

126-
#: ../../c-api/dict.rst:107
126+
#: ../../c-api/dict.rst:108
127127
msgid ""
128128
"Calling this API without :term:`GIL` held had been allowed for historical "
129129
"reason. It is no longer allowed."
130130
msgstr ""
131131

132-
#: ../../c-api/dict.rst:114
132+
#: ../../c-api/dict.rst:115
133133
msgid ""
134134
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
135135
"Return ``NULL`` **with** an exception set if an exception occurred. Return "
136136
"``NULL`` **without** an exception set if the key wasn't present."
137137
msgstr ""
138138

139-
#: ../../c-api/dict.rst:122
139+
#: ../../c-api/dict.rst:123
140140
msgid ""
141141
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
142-
"expr:`const char*`, rather than a :c:expr:`PyObject*`."
142+
"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
143+
"`PyObject*`."
143144
msgstr ""
144145

145-
#: ../../c-api/dict.rst:127
146+
#: ../../c-api/dict.rst:129
146147
msgid ""
147148
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
148149
"`~object.__eq__` methods or while creating the temporary :class:`str` object "
149150
"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` "
150151
"function with your own :c:func:`PyUnicode_FromString` *key* instead."
151152
msgstr ""
152153

153-
#: ../../c-api/dict.rst:136
154+
#: ../../c-api/dict.rst:138
154155
msgid ""
155156
"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
156157
"it returns the value corresponding to *key* from the dictionary *p*. If the "
@@ -160,29 +161,29 @@ msgid ""
160161
"the insertion."
161162
msgstr ""
162163

163-
#: ../../c-api/dict.rst:146
164+
#: ../../c-api/dict.rst:148
164165
msgid ""
165166
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
166167
msgstr ""
167168

168-
#: ../../c-api/dict.rst:151
169+
#: ../../c-api/dict.rst:153
169170
msgid ""
170171
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
171172
msgstr ""
172173

173-
#: ../../c-api/dict.rst:156
174+
#: ../../c-api/dict.rst:158
174175
msgid ""
175176
"Return a :c:type:`PyListObject` containing all the values from the "
176177
"dictionary *p*."
177178
msgstr ""
178179

179-
#: ../../c-api/dict.rst:164
180+
#: ../../c-api/dict.rst:166
180181
msgid ""
181182
"Return the number of items in the dictionary. This is equivalent to "
182183
"``len(p)`` on a dictionary."
183184
msgstr ""
184185

185-
#: ../../c-api/dict.rst:170
186+
#: ../../c-api/dict.rst:172
186187
msgid ""
187188
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
188189
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
@@ -196,21 +197,21 @@ msgid ""
196197
"structure is sparse, the offsets are not consecutive."
197198
msgstr ""
198199

199-
#: ../../c-api/dict.rst:181
200+
#: ../../c-api/dict.rst:183
200201
msgid "For example::"
201202
msgstr ""
202203
"舉例來說:\n"
203204
"\n"
204205
"::"
205206

206-
#: ../../c-api/dict.rst:191
207+
#: ../../c-api/dict.rst:193
207208
msgid ""
208209
"The dictionary *p* should not be mutated during iteration. It is safe to "
209210
"modify the values of the keys as you iterate over the dictionary, but only "
210211
"so long as the set of keys does not change. For example::"
211212
msgstr ""
212213

213-
#: ../../c-api/dict.rst:216
214+
#: ../../c-api/dict.rst:218
214215
msgid ""
215216
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
216217
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -220,7 +221,7 @@ msgid ""
220221
"or ``-1`` if an exception was raised."
221222
msgstr ""
222223

223-
#: ../../c-api/dict.rst:226
224+
#: ../../c-api/dict.rst:228
224225
msgid ""
225226
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
226227
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -229,7 +230,7 @@ msgid ""
229230
"exception was raised."
230231
msgstr ""
231232

232-
#: ../../c-api/dict.rst:235
233+
#: ../../c-api/dict.rst:237
233234
msgid ""
234235
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
235236
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -238,49 +239,49 @@ msgid ""
238239
"if an exception was raised. Equivalent Python (except for the return value)::"
239240
msgstr ""
240241

241-
#: ../../c-api/dict.rst:249
242+
#: ../../c-api/dict.rst:251
242243
msgid ""
243244
"Register *callback* as a dictionary watcher. Return a non-negative integer "
244245
"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
245246
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
246247
"exception."
247248
msgstr ""
248249

249-
#: ../../c-api/dict.rst:258
250+
#: ../../c-api/dict.rst:260
250251
msgid ""
251252
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
252253
"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
253254
"given *watcher_id* was never registered.)"
254255
msgstr ""
255256

256-
#: ../../c-api/dict.rst:266
257+
#: ../../c-api/dict.rst:268
257258
msgid ""
258259
"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
259260
"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
260261
"deallocated. Return ``0`` on success or ``-1`` on error."
261262
msgstr ""
262263

263-
#: ../../c-api/dict.rst:274
264+
#: ../../c-api/dict.rst:276
264265
msgid ""
265266
"Mark dictionary *dict* as no longer watched. The callback granted "
266267
"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
267268
"*dict* is modified or deallocated. The dict must previously have been "
268269
"watched by this watcher. Return ``0`` on success or ``-1`` on error."
269270
msgstr ""
270271

271-
#: ../../c-api/dict.rst:283
272+
#: ../../c-api/dict.rst:285
272273
msgid ""
273274
"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
274275
"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
275276
"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or "
276277
"``PyDict_EVENT_DEALLOCATED``."
277278
msgstr ""
278279

279-
#: ../../c-api/dict.rst:291
280+
#: ../../c-api/dict.rst:293
280281
msgid "Type of a dict watcher callback function."
281282
msgstr ""
282283

283-
#: ../../c-api/dict.rst:293
284+
#: ../../c-api/dict.rst:295
284285
msgid ""
285286
"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
286287
"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -289,22 +290,22 @@ msgid ""
289290
"dictionary and *new_value* will be ``NULL``."
290291
msgstr ""
291292

292-
#: ../../c-api/dict.rst:299
293+
#: ../../c-api/dict.rst:301
293294
msgid ""
294295
"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
295296
"dict is merged into it. To maintain efficiency of this operation, per-key "
296297
"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single "
297298
"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary."
298299
msgstr ""
299300

300-
#: ../../c-api/dict.rst:305
301+
#: ../../c-api/dict.rst:307
301302
msgid ""
302303
"The callback may inspect but must not modify *dict*; doing so could have "
303304
"unpredictable effects, including infinite recursion. Do not trigger Python "
304305
"code execution in the callback, as it could modify the dict as a side effect."
305306
msgstr ""
306307

307-
#: ../../c-api/dict.rst:309
308+
#: ../../c-api/dict.rst:311
308309
msgid ""
309310
"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
310311
"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -313,20 +314,20 @@ msgid ""
313314
"again."
314315
msgstr ""
315316

316-
#: ../../c-api/dict.rst:315
317+
#: ../../c-api/dict.rst:317
317318
msgid ""
318319
"Callbacks occur before the notified modification to *dict* takes place, so "
319320
"the prior state of *dict* can be inspected."
320321
msgstr ""
321322

322-
#: ../../c-api/dict.rst:318
323+
#: ../../c-api/dict.rst:320
323324
msgid ""
324325
"If the callback sets an exception, it must return ``-1``; this exception "
325326
"will be printed as an unraisable exception using :c:func:"
326327
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
327328
msgstr ""
328329

329-
#: ../../c-api/dict.rst:322
330+
#: ../../c-api/dict.rst:324
330331
msgid ""
331332
"There may already be a pending exception set on entry to the callback. In "
332333
"this case, the callback should return ``0`` with the same exception still "
@@ -347,10 +348,10 @@ msgstr "dictionary(字典)"
347348
msgid "PyUnicode_FromString()"
348349
msgstr "PyUnicode_FromString()"
349350

350-
#: ../../c-api/dict.rst:162
351+
#: ../../c-api/dict.rst:164
351352
msgid "built-in function"
352353
msgstr "built-in function(內建函式)"
353354

354-
#: ../../c-api/dict.rst:162
355+
#: ../../c-api/dict.rst:164
355356
msgid "len"
356357
msgstr "len"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.