99msgstr ""
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
9191msgid ""
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*."
9696msgstr ""
9797
9898#: ../../c-api/dict.rst:83
@@ -105,52 +105,53 @@ msgstr ""
105105
106106#: ../../c-api/dict.rst:91
107107msgid ""
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."
111111msgstr ""
112112
113- #: ../../c-api/dict.rst:98
113+ #: ../../c-api/dict.rst:99
114114msgid ""
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."
117117msgstr ""
118118
119- #: ../../c-api/dict.rst:103
119+ #: ../../c-api/dict.rst:104
120120msgid ""
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."
124124msgstr ""
125125
126- #: ../../c-api/dict.rst:107
126+ #: ../../c-api/dict.rst:108
127127msgid ""
128128"Calling this API without :term:`GIL` held had been allowed for historical "
129129"reason. It is no longer allowed."
130130msgstr ""
131131
132- #: ../../c-api/dict.rst:114
132+ #: ../../c-api/dict.rst:115
133133msgid ""
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."
137137msgstr ""
138138
139- #: ../../c-api/dict.rst:122
139+ #: ../../c-api/dict.rst:123
140140msgid ""
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*`."
143144msgstr ""
144145
145- #: ../../c-api/dict.rst:127
146+ #: ../../c-api/dict.rst:129
146147msgid ""
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."
151152msgstr ""
152153
153- #: ../../c-api/dict.rst:136
154+ #: ../../c-api/dict.rst:138
154155msgid ""
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."
161162msgstr ""
162163
163- #: ../../c-api/dict.rst:146
164+ #: ../../c-api/dict.rst:148
164165msgid ""
165166"Return a :c:type:`PyListObject` containing all the items from the dictionary."
166167msgstr ""
167168
168- #: ../../c-api/dict.rst:151
169+ #: ../../c-api/dict.rst:153
169170msgid ""
170171"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
171172msgstr ""
172173
173- #: ../../c-api/dict.rst:156
174+ #: ../../c-api/dict.rst:158
174175msgid ""
175176"Return a :c:type:`PyListObject` containing all the values from the "
176177"dictionary *p*."
177178msgstr ""
178179
179- #: ../../c-api/dict.rst:164
180+ #: ../../c-api/dict.rst:166
180181msgid ""
181182"Return the number of items in the dictionary. This is equivalent to "
182183"``len(p)`` on a dictionary."
183184msgstr ""
184185
185- #: ../../c-api/dict.rst:170
186+ #: ../../c-api/dict.rst:172
186187msgid ""
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."
197198msgstr ""
198199
199- #: ../../c-api/dict.rst:181
200+ #: ../../c-api/dict.rst:183
200201msgid "For example::"
201202msgstr ""
202203"舉例來說:\n"
203204"\n"
204205"::"
205206
206- #: ../../c-api/dict.rst:191
207+ #: ../../c-api/dict.rst:193
207208msgid ""
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::"
211212msgstr ""
212213
213- #: ../../c-api/dict.rst:216
214+ #: ../../c-api/dict.rst:218
214215msgid ""
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."
221222msgstr ""
222223
223- #: ../../c-api/dict.rst:226
224+ #: ../../c-api/dict.rst:228
224225msgid ""
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."
230231msgstr ""
231232
232- #: ../../c-api/dict.rst:235
233+ #: ../../c-api/dict.rst:237
233234msgid ""
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)::"
239240msgstr ""
240241
241- #: ../../c-api/dict.rst:249
242+ #: ../../c-api/dict.rst:251
242243msgid ""
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."
247248msgstr ""
248249
249- #: ../../c-api/dict.rst:258
250+ #: ../../c-api/dict.rst:260
250251msgid ""
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.)"
254255msgstr ""
255256
256- #: ../../c-api/dict.rst:266
257+ #: ../../c-api/dict.rst:268
257258msgid ""
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."
261262msgstr ""
262263
263- #: ../../c-api/dict.rst:274
264+ #: ../../c-api/dict.rst:276
264265msgid ""
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."
269270msgstr ""
270271
271- #: ../../c-api/dict.rst:283
272+ #: ../../c-api/dict.rst:285
272273msgid ""
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``."
277278msgstr ""
278279
279- #: ../../c-api/dict.rst:291
280+ #: ../../c-api/dict.rst:293
280281msgid "Type of a dict watcher callback function."
281282msgstr ""
282283
283- #: ../../c-api/dict.rst:293
284+ #: ../../c-api/dict.rst:295
284285msgid ""
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``."
290291msgstr ""
291292
292- #: ../../c-api/dict.rst:299
293+ #: ../../c-api/dict.rst:301
293294msgid ""
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."
298299msgstr ""
299300
300- #: ../../c-api/dict.rst:305
301+ #: ../../c-api/dict.rst:307
301302msgid ""
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."
305306msgstr ""
306307
307- #: ../../c-api/dict.rst:309
308+ #: ../../c-api/dict.rst:311
308309msgid ""
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."
314315msgstr ""
315316
316- #: ../../c-api/dict.rst:315
317+ #: ../../c-api/dict.rst:317
317318msgid ""
318319"Callbacks occur before the notified modification to *dict* takes place, so "
319320"the prior state of *dict* can be inspected."
320321msgstr ""
321322
322- #: ../../c-api/dict.rst:318
323+ #: ../../c-api/dict.rst:320
323324msgid ""
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``."
327328msgstr ""
328329
329- #: ../../c-api/dict.rst:322
330+ #: ../../c-api/dict.rst:324
330331msgid ""
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(字典)"
347348msgid "PyUnicode_FromString()"
348349msgstr "PyUnicode_FromString()"
349350
350- #: ../../c-api/dict.rst:162
351+ #: ../../c-api/dict.rst:164
351352msgid "built-in function"
352353msgstr "built-in function(內建函式)"
353354
354- #: ../../c-api/dict.rst:162
355+ #: ../../c-api/dict.rst:164
355356msgid "len"
356357msgstr "len"
0 commit comments