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