Skip to content

Commit c5d2c8f

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.12 (#625)
* sync with cpython f90099c3 * sync with cpython 7c7b2bfb * sync with cpython cdca4af6 * sync with cpython 036dd695 * sync with cpython 320d3982 * sync with cpython 8c3793a5 * sync with cpython 4dc07d2b * sync with cpython dcaacd90 * sync with cpython e0f60808 * sync with cpython 88ff02e3 * sync with cpython 495ba703 * sync with cpython ce370956 * sync with cpython af83d1e8 * sync with cpython af83d1e8 * sync with cpython 21f4e6d6 * sync with cpython 5b38bdea * sync with cpython 35c633d2 * fix: resolve fuzzy entries --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Wang <mattwang44@gmail.com>
1 parent 6309010 commit c5d2c8f

Some content is hidden

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

42 files changed

+6583
-5228
lines changed

c-api/dict.po

+45-47
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-08-26 00:03+0000\n"
12+
"POT-Creation-Date: 2023-09-03 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-"
@@ -87,71 +87,70 @@ msgid ""
8787
"to *val*."
8888
msgstr ""
8989

90-
#: ../../c-api/dict.rst:75
90+
#: ../../c-api/dict.rst:73
9191
msgid ""
92-
"Insert *val* into the dictionary *p* using *key* as a key. *key* should be "
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*."
92+
"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:"
93+
"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
94+
"`PyObject*`."
9695
msgstr ""
9796

98-
#: ../../c-api/dict.rst:83
97+
#: ../../c-api/dict.rst:80
9998
msgid ""
10099
"Remove the entry in dictionary *p* with key *key*. *key* must be :term:"
101100
"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the "
102101
"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on "
103102
"failure."
104103
msgstr ""
105104

106-
#: ../../c-api/dict.rst:91
105+
#: ../../c-api/dict.rst:88
107106
msgid ""
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."
107+
"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:"
108+
"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
109+
"`PyObject*`."
111110
msgstr ""
112111

113-
#: ../../c-api/dict.rst:99
112+
#: ../../c-api/dict.rst:95
114113
msgid ""
115114
"Return the object from dictionary *p* which has a key *key*. Return "
116115
"``NULL`` if the key *key* is not present, but *without* setting an exception."
117116
msgstr ""
118117

119-
#: ../../c-api/dict.rst:104
118+
#: ../../c-api/dict.rst:100
120119
msgid ""
121120
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
122121
"`~object.__eq__` methods are silently ignored. Prefer the :c:func:"
123122
"`PyDict_GetItemWithError` function instead."
124123
msgstr ""
125124

126-
#: ../../c-api/dict.rst:108
125+
#: ../../c-api/dict.rst:104
127126
msgid ""
128127
"Calling this API without :term:`GIL` held had been allowed for historical "
129128
"reason. It is no longer allowed."
130129
msgstr ""
131130

132-
#: ../../c-api/dict.rst:115
131+
#: ../../c-api/dict.rst:111
133132
msgid ""
134133
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
135134
"Return ``NULL`` **with** an exception set if an exception occurred. Return "
136135
"``NULL`` **without** an exception set if the key wasn't present."
137136
msgstr ""
138137

139-
#: ../../c-api/dict.rst:123
138+
#: ../../c-api/dict.rst:119
140139
msgid ""
141140
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
142141
"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
143142
"`PyObject*`."
144143
msgstr ""
145144

146-
#: ../../c-api/dict.rst:129
145+
#: ../../c-api/dict.rst:125
147146
msgid ""
148147
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
149148
"`~object.__eq__` methods or while creating the temporary :class:`str` object "
150149
"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` "
151150
"function with your own :c:func:`PyUnicode_FromString` *key* instead."
152151
msgstr ""
153152

154-
#: ../../c-api/dict.rst:138
153+
#: ../../c-api/dict.rst:134
155154
msgid ""
156155
"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
157156
"it returns the value corresponding to *key* from the dictionary *p*. If the "
@@ -161,29 +160,29 @@ msgid ""
161160
"the insertion."
162161
msgstr ""
163162

164-
#: ../../c-api/dict.rst:148
163+
#: ../../c-api/dict.rst:144
165164
msgid ""
166165
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
167166
msgstr ""
168167

169-
#: ../../c-api/dict.rst:153
168+
#: ../../c-api/dict.rst:149
170169
msgid ""
171170
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
172171
msgstr ""
173172

174-
#: ../../c-api/dict.rst:158
173+
#: ../../c-api/dict.rst:154
175174
msgid ""
176175
"Return a :c:type:`PyListObject` containing all the values from the "
177176
"dictionary *p*."
178177
msgstr ""
179178

180-
#: ../../c-api/dict.rst:166
179+
#: ../../c-api/dict.rst:162
181180
msgid ""
182181
"Return the number of items in the dictionary. This is equivalent to "
183182
"``len(p)`` on a dictionary."
184183
msgstr ""
185184

186-
#: ../../c-api/dict.rst:172
185+
#: ../../c-api/dict.rst:168
187186
msgid ""
188187
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
189188
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
@@ -197,21 +196,21 @@ msgid ""
197196
"structure is sparse, the offsets are not consecutive."
198197
msgstr ""
199198

200-
#: ../../c-api/dict.rst:183
199+
#: ../../c-api/dict.rst:179
201200
msgid "For example::"
202201
msgstr ""
203202
"舉例來說:\n"
204203
"\n"
205204
"::"
206205

207-
#: ../../c-api/dict.rst:193
206+
#: ../../c-api/dict.rst:189
208207
msgid ""
209208
"The dictionary *p* should not be mutated during iteration. It is safe to "
210209
"modify the values of the keys as you iterate over the dictionary, but only "
211210
"so long as the set of keys does not change. For example::"
212211
msgstr ""
213212

214-
#: ../../c-api/dict.rst:218
213+
#: ../../c-api/dict.rst:214
215214
msgid ""
216215
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
217216
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -221,7 +220,7 @@ msgid ""
221220
"or ``-1`` if an exception was raised."
222221
msgstr ""
223222

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

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

242-
#: ../../c-api/dict.rst:251
241+
#: ../../c-api/dict.rst:247
243242
msgid ""
244243
"Register *callback* as a dictionary watcher. Return a non-negative integer "
245244
"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
246245
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
247246
"exception."
248247
msgstr ""
249248

250-
#: ../../c-api/dict.rst:260
249+
#: ../../c-api/dict.rst:256
251250
msgid ""
252251
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
253252
"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
254253
"given *watcher_id* was never registered.)"
255254
msgstr ""
256255

257-
#: ../../c-api/dict.rst:268
256+
#: ../../c-api/dict.rst:264
258257
msgid ""
259258
"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
260259
"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
261260
"deallocated. Return ``0`` on success or ``-1`` on error."
262261
msgstr ""
263262

264-
#: ../../c-api/dict.rst:276
263+
#: ../../c-api/dict.rst:272
265264
msgid ""
266265
"Mark dictionary *dict* as no longer watched. The callback granted "
267266
"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
268267
"*dict* is modified or deallocated. The dict must previously have been "
269268
"watched by this watcher. Return ``0`` on success or ``-1`` on error."
270269
msgstr ""
271270

272-
#: ../../c-api/dict.rst:285
271+
#: ../../c-api/dict.rst:281
273272
msgid ""
274273
"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
275274
"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
276275
"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or "
277276
"``PyDict_EVENT_DEALLOCATED``."
278277
msgstr ""
279278

280-
#: ../../c-api/dict.rst:293
279+
#: ../../c-api/dict.rst:289
281280
msgid "Type of a dict watcher callback function."
282281
msgstr ""
283282

284-
#: ../../c-api/dict.rst:295
283+
#: ../../c-api/dict.rst:291
285284
msgid ""
286285
"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
287286
"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -290,22 +289,22 @@ msgid ""
290289
"dictionary and *new_value* will be ``NULL``."
291290
msgstr ""
292291

293-
#: ../../c-api/dict.rst:301
292+
#: ../../c-api/dict.rst:297
294293
msgid ""
295294
"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
296295
"dict is merged into it. To maintain efficiency of this operation, per-key "
297296
"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single "
298297
"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary."
299298
msgstr ""
300299

301-
#: ../../c-api/dict.rst:307
300+
#: ../../c-api/dict.rst:303
302301
msgid ""
303302
"The callback may inspect but must not modify *dict*; doing so could have "
304303
"unpredictable effects, including infinite recursion. Do not trigger Python "
305304
"code execution in the callback, as it could modify the dict as a side effect."
306305
msgstr ""
307306

308-
#: ../../c-api/dict.rst:311
307+
#: ../../c-api/dict.rst:307
309308
msgid ""
310309
"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
311310
"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -314,20 +313,20 @@ msgid ""
314313
"again."
315314
msgstr ""
316315

317-
#: ../../c-api/dict.rst:317
316+
#: ../../c-api/dict.rst:313
318317
msgid ""
319318
"Callbacks occur before the notified modification to *dict* takes place, so "
320319
"the prior state of *dict* can be inspected."
321320
msgstr ""
322321

323-
#: ../../c-api/dict.rst:320
322+
#: ../../c-api/dict.rst:316
324323
msgid ""
325324
"If the callback sets an exception, it must return ``-1``; this exception "
326325
"will be printed as an unraisable exception using :c:func:"
327326
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
328327
msgstr ""
329328

330-
#: ../../c-api/dict.rst:324
329+
#: ../../c-api/dict.rst:320
331330
msgid ""
332331
"There may already be a pending exception set on entry to the callback. In "
333332
"this case, the callback should return ``0`` with the same exception still "
@@ -344,14 +343,13 @@ msgstr "object(物件)"
344343
msgid "dictionary"
345344
msgstr "dictionary(字典)"
346345

347-
#: ../../c-api/dict.rst:73
348-
msgid "PyUnicode_FromString()"
349-
msgstr "PyUnicode_FromString()"
350-
351-
#: ../../c-api/dict.rst:164
346+
#: ../../c-api/dict.rst:160
352347
msgid "built-in function"
353348
msgstr "built-in function(內建函式)"
354349

355-
#: ../../c-api/dict.rst:164
350+
#: ../../c-api/dict.rst:160
356351
msgid "len"
357352
msgstr "len"
353+
354+
#~ msgid "PyUnicode_FromString()"
355+
#~ msgstr "PyUnicode_FromString()"

0 commit comments

Comments
 (0)