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-17 17:39+0800 \n "
12
+ "POT-Creation-Date : 2023-08-26 00:03+0000 \n "
13
13
"PO-Revision-Date : 2017-09-22 18:26+0000\n "
14
14
"
Last-Translator :
Liang-Bo Wang <[email protected] >\n "
15
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -90,9 +90,9 @@ msgstr ""
90
90
#: ../../c-api/dict.rst:75
91
91
msgid ""
92
92
"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*."
96
96
msgstr ""
97
97
98
98
#: ../../c-api/dict.rst:83
@@ -105,52 +105,53 @@ msgstr ""
105
105
106
106
#: ../../c-api/dict.rst:91
107
107
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."
111
111
msgstr ""
112
112
113
- #: ../../c-api/dict.rst:98
113
+ #: ../../c-api/dict.rst:99
114
114
msgid ""
115
115
"Return the object from dictionary *p* which has a key *key*. Return "
116
116
"``NULL`` if the key *key* is not present, but *without* setting an exception."
117
117
msgstr ""
118
118
119
- #: ../../c-api/dict.rst:103
119
+ #: ../../c-api/dict.rst:104
120
120
msgid ""
121
121
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
122
122
"`~object.__eq__` methods are silently ignored. Prefer the :c:func:"
123
123
"`PyDict_GetItemWithError` function instead."
124
124
msgstr ""
125
125
126
- #: ../../c-api/dict.rst:107
126
+ #: ../../c-api/dict.rst:108
127
127
msgid ""
128
128
"Calling this API without :term:`GIL` held had been allowed for historical "
129
129
"reason. It is no longer allowed."
130
130
msgstr ""
131
131
132
- #: ../../c-api/dict.rst:114
132
+ #: ../../c-api/dict.rst:115
133
133
msgid ""
134
134
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
135
135
"Return ``NULL`` **with** an exception set if an exception occurred. Return "
136
136
"``NULL`` **without** an exception set if the key wasn't present."
137
137
msgstr ""
138
138
139
- #: ../../c-api/dict.rst:122
139
+ #: ../../c-api/dict.rst:123
140
140
msgid ""
141
141
"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*`."
143
144
msgstr ""
144
145
145
- #: ../../c-api/dict.rst:127
146
+ #: ../../c-api/dict.rst:129
146
147
msgid ""
147
148
"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:"
148
149
"`~object.__eq__` methods or while creating the temporary :class:`str` object "
149
150
"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` "
150
151
"function with your own :c:func:`PyUnicode_FromString` *key* instead."
151
152
msgstr ""
152
153
153
- #: ../../c-api/dict.rst:136
154
+ #: ../../c-api/dict.rst:138
154
155
msgid ""
155
156
"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
156
157
"it returns the value corresponding to *key* from the dictionary *p*. If the "
@@ -160,29 +161,29 @@ msgid ""
160
161
"the insertion."
161
162
msgstr ""
162
163
163
- #: ../../c-api/dict.rst:146
164
+ #: ../../c-api/dict.rst:148
164
165
msgid ""
165
166
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
166
167
msgstr ""
167
168
168
- #: ../../c-api/dict.rst:151
169
+ #: ../../c-api/dict.rst:153
169
170
msgid ""
170
171
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
171
172
msgstr ""
172
173
173
- #: ../../c-api/dict.rst:156
174
+ #: ../../c-api/dict.rst:158
174
175
msgid ""
175
176
"Return a :c:type:`PyListObject` containing all the values from the "
176
177
"dictionary *p*."
177
178
msgstr ""
178
179
179
- #: ../../c-api/dict.rst:164
180
+ #: ../../c-api/dict.rst:166
180
181
msgid ""
181
182
"Return the number of items in the dictionary. This is equivalent to "
182
183
"``len(p)`` on a dictionary."
183
184
msgstr ""
184
185
185
- #: ../../c-api/dict.rst:170
186
+ #: ../../c-api/dict.rst:172
186
187
msgid ""
187
188
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
188
189
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
@@ -196,21 +197,21 @@ msgid ""
196
197
"structure is sparse, the offsets are not consecutive."
197
198
msgstr ""
198
199
199
- #: ../../c-api/dict.rst:181
200
+ #: ../../c-api/dict.rst:183
200
201
msgid "For example::"
201
202
msgstr ""
202
203
"舉例來說:\n"
203
204
"\n"
204
205
"::"
205
206
206
- #: ../../c-api/dict.rst:191
207
+ #: ../../c-api/dict.rst:193
207
208
msgid ""
208
209
"The dictionary *p* should not be mutated during iteration. It is safe to "
209
210
"modify the values of the keys as you iterate over the dictionary, but only "
210
211
"so long as the set of keys does not change. For example::"
211
212
msgstr ""
212
213
213
- #: ../../c-api/dict.rst:216
214
+ #: ../../c-api/dict.rst:218
214
215
msgid ""
215
216
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
216
217
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -220,7 +221,7 @@ msgid ""
220
221
"or ``-1`` if an exception was raised."
221
222
msgstr ""
222
223
223
- #: ../../c-api/dict.rst:226
224
+ #: ../../c-api/dict.rst:228
224
225
msgid ""
225
226
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
226
227
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
@@ -229,7 +230,7 @@ msgid ""
229
230
"exception was raised."
230
231
msgstr ""
231
232
232
- #: ../../c-api/dict.rst:235
233
+ #: ../../c-api/dict.rst:237
233
234
msgid ""
234
235
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
235
236
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -238,49 +239,49 @@ msgid ""
238
239
"if an exception was raised. Equivalent Python (except for the return value)::"
239
240
msgstr ""
240
241
241
- #: ../../c-api/dict.rst:249
242
+ #: ../../c-api/dict.rst:251
242
243
msgid ""
243
244
"Register *callback* as a dictionary watcher. Return a non-negative integer "
244
245
"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
245
246
"of error (e.g. no more watcher IDs available), return ``-1`` and set an "
246
247
"exception."
247
248
msgstr ""
248
249
249
- #: ../../c-api/dict.rst:258
250
+ #: ../../c-api/dict.rst:260
250
251
msgid ""
251
252
"Clear watcher identified by *watcher_id* previously returned from :c:func:"
252
253
"`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the "
253
254
"given *watcher_id* was never registered.)"
254
255
msgstr ""
255
256
256
- #: ../../c-api/dict.rst:266
257
+ #: ../../c-api/dict.rst:268
257
258
msgid ""
258
259
"Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:"
259
260
"func:`PyDict_AddWatcher` will be called when *dict* is modified or "
260
261
"deallocated. Return ``0`` on success or ``-1`` on error."
261
262
msgstr ""
262
263
263
- #: ../../c-api/dict.rst:274
264
+ #: ../../c-api/dict.rst:276
264
265
msgid ""
265
266
"Mark dictionary *dict* as no longer watched. The callback granted "
266
267
"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
267
268
"*dict* is modified or deallocated. The dict must previously have been "
268
269
"watched by this watcher. Return ``0`` on success or ``-1`` on error."
269
270
msgstr ""
270
271
271
- #: ../../c-api/dict.rst:283
272
+ #: ../../c-api/dict.rst:285
272
273
msgid ""
273
274
"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
274
275
"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
275
276
"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or "
276
277
"``PyDict_EVENT_DEALLOCATED``."
277
278
msgstr ""
278
279
279
- #: ../../c-api/dict.rst:291
280
+ #: ../../c-api/dict.rst:293
280
281
msgid "Type of a dict watcher callback function."
281
282
msgstr ""
282
283
283
- #: ../../c-api/dict.rst:293
284
+ #: ../../c-api/dict.rst:295
284
285
msgid ""
285
286
"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both "
286
287
"*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` "
@@ -289,22 +290,22 @@ msgid ""
289
290
"dictionary and *new_value* will be ``NULL``."
290
291
msgstr ""
291
292
292
- #: ../../c-api/dict.rst:299
293
+ #: ../../c-api/dict.rst:301
293
294
msgid ""
294
295
"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
295
296
"dict is merged into it. To maintain efficiency of this operation, per-key "
296
297
"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single "
297
298
"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary."
298
299
msgstr ""
299
300
300
- #: ../../c-api/dict.rst:305
301
+ #: ../../c-api/dict.rst:307
301
302
msgid ""
302
303
"The callback may inspect but must not modify *dict*; doing so could have "
303
304
"unpredictable effects, including infinite recursion. Do not trigger Python "
304
305
"code execution in the callback, as it could modify the dict as a side effect."
305
306
msgstr ""
306
307
307
- #: ../../c-api/dict.rst:309
308
+ #: ../../c-api/dict.rst:311
308
309
msgid ""
309
310
"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
310
311
"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -313,20 +314,20 @@ msgid ""
313
314
"again."
314
315
msgstr ""
315
316
316
- #: ../../c-api/dict.rst:315
317
+ #: ../../c-api/dict.rst:317
317
318
msgid ""
318
319
"Callbacks occur before the notified modification to *dict* takes place, so "
319
320
"the prior state of *dict* can be inspected."
320
321
msgstr ""
321
322
322
- #: ../../c-api/dict.rst:318
323
+ #: ../../c-api/dict.rst:320
323
324
msgid ""
324
325
"If the callback sets an exception, it must return ``-1``; this exception "
325
326
"will be printed as an unraisable exception using :c:func:"
326
327
"`PyErr_WriteUnraisable`. Otherwise it should return ``0``."
327
328
msgstr ""
328
329
329
- #: ../../c-api/dict.rst:322
330
+ #: ../../c-api/dict.rst:324
330
331
msgid ""
331
332
"There may already be a pending exception set on entry to the callback. In "
332
333
"this case, the callback should return ``0`` with the same exception still "
@@ -347,10 +348,10 @@ msgstr "dictionary(字典)"
347
348
msgid "PyUnicode_FromString()"
348
349
msgstr "PyUnicode_FromString()"
349
350
350
- #: ../../c-api/dict.rst:162
351
+ #: ../../c-api/dict.rst:164
351
352
msgid "built-in function"
352
353
msgstr "built-in function(內建函式)"
353
354
354
- #: ../../c-api/dict.rst:162
355
+ #: ../../c-api/dict.rst:164
355
356
msgid "len"
356
357
msgstr "len"
0 commit comments